]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Correctly handle MII ioctl which changes autonegotiation.
authorBrian Hill <brian@houston-radar.com>
Tue, 11 Nov 2014 20:39:39 +0000 (13:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 21:21:26 +0000 (16:21 -0500)
commit626cb109f9a470029855665a55b1bc826234bb82
tree0eca7b7c4bfa9d5fdee591d2e64693a86a29779c
parent394dbee6404cc1ccd48a7dd8dbaa2cfb868ecf02
net: phy: Correctly handle MII ioctl which changes autonegotiation.

When advertised capabilities are changed with mii-tool, such as:
mii-tool -A 10baseT
the existing handler has two errors.

- An actual PHY register value is provided by mii-tool, and this
  must be mapped to internal state with mii_adv_to_ethtool_adv_t().
- The PHY state machine needs to be told that autonegotiation has
  again been performed.  If not, the MAC will not be notified of
  the new link speed and duplex, resulting in a possible config
  mismatch.

Signed-off-by: Brian Hill <Brian@houston-radar.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c