]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: connect and disconnect from the PHY state machine
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 11 Nov 2014 02:06:20 +0000 (18:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 23:23:23 +0000 (18:23 -0500)
commitbea1faede9361375db1d2d8ca9607a7c9e9fb04d
treed3eafd8dd781b00ee660406be1143a94df87e87f
parent2736bff45471530adac9eadff059a8c326f18064
net: bcmgenet: connect and disconnect from the PHY state machine

phy_disconnect() is the only way to guarantee that we are not going to
schedule more work on the PHY state machine workqueue for that
particular PHY device.

This fixes an issue where a network interface was suspended prior to a
system suspend/resume cycle and would then be resumed as part of
mdio_bus_resume(), since the GENET interface clocks would have been
disabled, this basically resulted in bus errors to appear since we are
invoking the GENET driver adjust_link() callback.

Fixes: d2dac18da144 ("net: bcmgenet: add suspend/resume callbacks")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h
drivers/net/ethernet/broadcom/genet/bcmmii.c