]> 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)
commit5aadb00aa78a840651751c5997d34d77fbffcfd7
tree0eca7b7c4bfa9d5fdee591d2e64693a86a29779c
parent97ec3f108a24d0c42604ecbd917166750513b8ae
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