]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: fix write to mii-ctrl1000 register
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 4 Oct 2019 16:05:58 +0000 (17:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Oct 2019 01:11:08 +0000 (18:11 -0700)
commit2d0a8330332ec2e87f35e12aaecc6fc802d7144e
tree9e09dd1b4a1045a649f9b12fd1775d794700abab
parentb2ab7efc9f0650d4ef46f9cf6a501827956067b0
net: phy: fix write to mii-ctrl1000 register

When userspace writes to the MII_ADVERTISE register, we update phylib's
advertising mask and trigger a renegotiation.  However, writing to the
MII_CTRL1000 register, which contains the gigabit advertisement, does
neither.  This can lead to phylib's copy of the advertisement becoming
de-synced with the values in the PHY register set, which can result in
incorrect negotiation resolution.

Fixes: cbae4c582172 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
include/linux/mii.h