linux/drivers/net/ethernet/broadcom/genet
Florian Fainelli c677ba8b3c net: bcmgenet: update UMAC_CMD only when link is detected
When we bring the interface down, phy_stop() will schedule the PHY state
machine to call our link adjustment callback. By the time we do so, we
may have clock gated off the GENET hardware block, and this will cause
bus errors to happen in bcmgenet_mii_setup():

Make sure that we only touch the UMAC_CMD register when there is an
actual link. This is safe to do for two reasons:

- updating the Ethernet MAC registers only make sense when a physical
  link is present
- the PHY library state machine first set phydev->link = 0 before
  invoking phydev->adjust_link in the PHY_HALTED case

Fixes: 240524089d ("net: bcmgenet: only update UMAC_CMD if something changed")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11 15:10:11 -07:00
..
bcmgenet_wol.c net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00
bcmgenet.c net: bcmgenet: correctly suspend and resume PHY device 2014-08-11 15:10:11 -07:00
bcmgenet.h net: bcmgenet: re-align multiple lines correctly 2014-07-23 15:14:25 -07:00
bcmmii.c net: bcmgenet: update UMAC_CMD only when link is detected 2014-08-11 15:10:11 -07:00
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00