]> git.baikalelectronics.ru Git - kernel.git/commit
smsc911x: power-up phydev before doing a software reset.
authorEnric Balletbo i Serra <eballetbo@iseebcn.com>
Thu, 13 Nov 2014 08:14:34 +0000 (09:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Nov 2014 20:09:28 +0000 (15:09 -0500)
commitadbf8ca28b95fe2d19c16a894462725fe4160f7a
tree83f4fbe419e32adce9844eade6babcda96aa8aa1
parent3c11a0c8259c1831a8698a9c1679590810f53158
smsc911x: power-up phydev before doing a software reset.

With commit 5ed327e49f0f43ae1 ("net: phy: suspend phydev when going
to HALTED"), the PHY device will be put in a low-power mode using
BMCR_PDOWN if the the interface is set down. The smsc911x driver does
a software_reset opening the device driver (ndo_open). In such case,
the PHY must be powered-up before access to any register and before
calling the software_reset function. Otherwise, as the PHY is powered
down the software reset fails and the interface can not be enabled
again.

This patch fixes this scenario that is easy to reproduce setting down
the network interface and setting up again.

    $ ifconfig eth0 down
    $ ifconfig eth0 up
    ifconfig: SIOCSIFFLAGS: Input/output error

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c