-
Notifications
You must be signed in to change notification settings - Fork 3k
lwip - power up emac before reading its settings #4238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
emac settings are only available after powered up. Signed-off-by: Tony Wu <[email protected]>
mbed_lwip_set_mac_address calls mbed_mac_address to get hwaddr from device, but device may not be accessible until it is powered up and initialized. This patch delays mbed_lwip_set_mac_address call until device is ready. Signed-off-by: Tony Wu <[email protected]>
Looks good to me 👍 |
I've tried to check if the changes work with Odin board, but it's seems to be broken on master (I'll open an issue for that). |
@@ -411,6 +409,7 @@ nsapi_error_t mbed_lwip_init(emac_interface_t *emac) | |||
return NSAPI_ERROR_DEVICE_ERROR; | |||
} | |||
|
|||
mbed_lwip_set_mac_address(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that should be in the 'if' scope, so we don't do it twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bulislaw It's in the if (!mbed_lwip_get_mac_address()) scope. The closing bracket above it is for the case when netif_add fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! yes, sorry you're right :)
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
The above reports - looks like RZ_A1H got disconnected or something, lets restart /morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
Apologies everyone. As @0xc0170 noticed we had some device failures last night so I had to abort this test. Please hold off on running more tests at the moment, we will restart this test when things are back up. |
Shall we restart? |
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
@bridadan restart the CI? |
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputExample Build failed! |
/morph test-nightly |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Description
Power up emac before reading its settings, such as mac address, for some emac settings are only available after device is powered up.
Status
READY
Migrations
NO
Related PRs
#3758
Todos
NONE
Deploy notes
NONE
Steps to test or reproduce
NONE