Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[realtek] Update link state when device is opened
The link state is currently set at probe time, and updated only when
the device is polled.  This results in the user seeing a misleading
stale "Link: down" message, if autonegotiation did not complete within
the short timespan of the probe routine.

Fix by updating the link state when the device is opened, so that the
message that ends up being displayed to the user reflects the real
link state at device open time.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Apr 23, 2012
1 parent 44d5ef9 commit 5b18489
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/drivers/net/realtek.c
Expand Up @@ -426,6 +426,9 @@ static int realtek_open ( struct net_device *netdev ) {
/* Enable transmitter and receiver */
writeb ( ( RTL_CR_TE | RTL_CR_RE ), rtl->regs + RTL_CR );

/* Update link state */
realtek_check_link ( netdev );

return 0;

realtek_destroy_ring ( rtl, &rtl->rx );
Expand Down

0 comments on commit 5b18489

Please sign in to comment.