Skip to content

Commit

Permalink
net: dsa: b53: Don't assign autonegotiation enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Sep 22, 2018
1 parent 5b9b0a8 commit e24cf6b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/dsa/b53/b53_serdes.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,13 @@ int b53_serdes_link_state(struct b53_device *dev, int port,
struct phylink_link_state *state)
{
u8 lane = b53_serdes_map_lane(dev, port);
u16 dig, bmcr, bmsr;
u16 dig, bmsr;

if (lane == B53_INVALID_LANE)
return 1;

dig = b53_serdes_read(dev, lane, B53_SERDES_DIGITAL_STATUS,
SERDES_DIGITAL_BLK);
bmcr = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_BMCR),
SERDES_MII_BLK);
bmsr = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_BMSR),
SERDES_MII_BLK);

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

state->duplex = dig & DUPLEX_STATUS ? DUPLEX_FULL : DUPLEX_HALF;
state->an_enabled = !!(bmcr & BMCR_ANENABLE);
state->an_complete = !!(bmsr & BMSR_ANEGCOMPLETE);
state->link = !!(dig & LINK_STATUS);
if (dig & PAUSE_RESOLUTION_RX_SIDE)
Expand Down

0 comments on commit e24cf6b

Please sign in to comment.