Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: b53: Don't assign autonegotiation enabled

PHYLINK takes care of filing the right information into
state->an_enabled, get rid of the read from the SerDes's BMCR register.

Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Fainelli and committed by
David S. Miller
e24cf6b3 5b9b0a80

+1 -4
+1 -4
drivers/net/dsa/b53/b53_serdes.c
··· 100 100 struct phylink_link_state *state) 101 101 { 102 102 u8 lane = b53_serdes_map_lane(dev, port); 103 - u16 dig, bmcr, bmsr; 103 + u16 dig, bmsr; 104 104 105 105 if (lane == B53_INVALID_LANE) 106 106 return 1; 107 107 108 108 dig = b53_serdes_read(dev, lane, B53_SERDES_DIGITAL_STATUS, 109 109 SERDES_DIGITAL_BLK); 110 - bmcr = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_BMCR), 111 - SERDES_MII_BLK); 112 110 bmsr = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_BMSR), 113 111 SERDES_MII_BLK); 114 112 ··· 127 129 } 128 130 129 131 state->duplex = dig & DUPLEX_STATUS ? DUPLEX_FULL : DUPLEX_HALF; 130 - state->an_enabled = !!(bmcr & BMCR_ANENABLE); 131 132 state->an_complete = !!(bmsr & BMSR_ANEGCOMPLETE); 132 133 state->link = !!(dig & LINK_STATUS); 133 134 if (dig & PAUSE_RESOLUTION_RX_SIDE)