Skip to content

Commit 4b5b71f

Browse files
Anthony Felicedavem330
authored andcommitted
net: tc35815: Fix phydev supported/advertising mask
Commit 3c1bcc8 ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") updated ethernet drivers to use a linkmode bitmap. It mistakenly dropped a bitwise negation in the tc35815 ethernet driver on a bitmask to set the supported/advertising flags. Found by Anthony via code inspection, not tested as I do not have the required hardware. Fixes: 3c1bcc8 ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") Signed-off-by: Anthony Felice <[email protected]> Reviewed-by: Akshay Bhat <[email protected]> Reviewed-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent df4953e commit 4b5b71f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/toshiba/tc35815.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ static int tc_mii_probe(struct net_device *dev)
643643
linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, mask);
644644
linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, mask);
645645
}
646-
linkmode_and(phydev->supported, phydev->supported, mask);
646+
linkmode_andnot(phydev->supported, phydev->supported, mask);
647647
linkmode_copy(phydev->advertising, phydev->supported);
648648

649649
lp->link = 0;

0 commit comments

Comments
 (0)