Skip to content

Commit e24cf6b

Browse files
ffainellidavem330
authored andcommitted
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: 0e01491 ("net: dsa: b53: Add SerDes support") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5b9b0a8 commit e24cf6b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/dsa/b53/b53_serdes.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ int b53_serdes_link_state(struct b53_device *dev, int port,
100100
struct phylink_link_state *state)
101101
{
102102
u8 lane = b53_serdes_map_lane(dev, port);
103-
u16 dig, bmcr, bmsr;
103+
u16 dig, bmsr;
104104

105105
if (lane == B53_INVALID_LANE)
106106
return 1;
107107

108108
dig = b53_serdes_read(dev, lane, B53_SERDES_DIGITAL_STATUS,
109109
SERDES_DIGITAL_BLK);
110-
bmcr = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_BMCR),
111-
SERDES_MII_BLK);
112110
bmsr = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_BMSR),
113111
SERDES_MII_BLK);
114112

@@ -129,7 +127,6 @@ int b53_serdes_link_state(struct b53_device *dev, int port,
129127
}
130128

131129
state->duplex = dig & DUPLEX_STATUS ? DUPLEX_FULL : DUPLEX_HALF;
132-
state->an_enabled = !!(bmcr & BMCR_ANENABLE);
133130
state->an_complete = !!(bmsr & BMSR_ANEGCOMPLETE);
134131
state->link = !!(dig & LINK_STATUS);
135132
if (dig & PAUSE_RESOLUTION_RX_SIDE)

0 commit comments

Comments
 (0)