Skip to content

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

Merged
merged 2 commits into from
May 8, 2017

Conversation

tung7970
Copy link
Contributor

@tung7970 tung7970 commented Apr 27, 2017

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

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 27, 2017

cc @geky @bulislaw

tung7970 and others added 2 commits April 28, 2017 00:15
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]>
@geky
Copy link
Contributor

geky commented Apr 27, 2017

Looks good to me 👍

@bulislaw
Copy link
Member

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();
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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 :)

@bulislaw
Copy link
Member

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 104

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 28, 2017

The above reports - looks like RZ_A1H got disconnected or something, lets restart

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 105

Test failed!

@bridadan
Copy link
Contributor

bridadan commented Apr 28, 2017

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.

@0xc0170
Copy link
Contributor

0xc0170 commented May 2, 2017

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?

@bridadan
Copy link
Contributor

bridadan commented May 2, 2017

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented May 3, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 129

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented May 3, 2017

@bridadan restart the CI?

@bridadan
Copy link
Contributor

bridadan commented May 3, 2017

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented May 3, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 144

Example Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented May 4, 2017

/morph test-nightly

@adbridge
Copy link
Contributor

adbridge commented May 4, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented May 4, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 146

All builds and test passed!

@mbed-bot
Copy link

mbed-bot commented May 4, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 151

All builds and test passed!

@theotherjimmy theotherjimmy merged commit 3b11b23 into ARMmbed:master May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants