]> git.baikalelectronics.ru Git - kernel.git/commit
phylib: fixes for PHY_RESUMING state changes
authorWade Farnsworth <wfarnsworth@mvista.com>
Wed, 1 Jul 2009 13:00:34 +0000 (13:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jul 2009 20:16:55 +0000 (13:16 -0700)
commitbc1ca2a106b259f31509856451a22f248f74e16c
tree669d03e8d66964989ca3486f2fc0802f0196dcf9
parent8a2e99fdb423a3af4adbdcda8d8c61b021a63b59
phylib: fixes for PHY_RESUMING state changes

The PHY_HALTED state disables phydev->link, but the link will not be
updated upon entering PHY_RESUMING.  Add a call to phy_read_status() to
update the link before entering PHY_RUNNING.  If the link is not up at
this point, enter the PHY_NOLINK state instead.

Also, when transitioning from PHY_RESUMING to PHY_RUNNING, calls to
netif_carrier_on() and phydev->adjust_link() are missing.  Add the calls
similar to the other transitions to PHY_RUNNING.

Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c