]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: apply MII configuration in bcmgenet_open()
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 11 Nov 2014 02:06:21 +0000 (18:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 23:23:23 +0000 (18:23 -0500)
commit230d26b1a5f96f04844a7f2fec8eb9b7a58cb74b
treedcf90116b98a288d62d3675b55d7b0a84e0f0163
parentbea1faede9361375db1d2d8ca9607a7c9e9fb04d
net: bcmgenet: apply MII configuration in bcmgenet_open()

In case an interface has been brought down before entering S3, and then
brought up out of S3, all the initialization done during
bcmgenet_probe() by bcmgenet_mii_init() calling bcmgenet_mii_config() is
just lost since register contents are restored to their reset values.

Re-apply this configuration anytime we call bcmgenet_open() to make sure
our port multiplexer is properly configured to match the PHY interface.

Since we are now calling bcmgenet_mii_config() everytime bcmgenet_open()
is called, make sure we only print the message during initialization
time not to pollute the console.

Fixes: d2dac18da144 ("net: bcmgenet: add suspend/resume callbacks")
Fixes: 390dff99da874 ("net: bcmgenet: add main driver file")
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