diff options
author | Anthony Felice <tony.felice@timesys.com> | 2020-04-27 04:00:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-27 20:52:10 +0200 |
commit | 4b5b71f770e2edefbfe74203777264bfe6a9927c (patch) | |
tree | bbd516ca4e04e3972018d3d34658967535e23c3d /drivers/net/ethernet/toshiba | |
parent | sch_sfq: validate silly quantum values (diff) | |
download | linux-4b5b71f770e2edefbfe74203777264bfe6a9927c.tar.xz linux-4b5b71f770e2edefbfe74203777264bfe6a9927c.zip |
net: tc35815: Fix phydev supported/advertising mask
Commit 3c1bcc8614db ("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: 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
Signed-off-by: Anthony Felice <tony.felice@timesys.com>
Reviewed-by: Akshay Bhat <akshay.bhat@timesys.com>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/toshiba')
-rw-r--r-- | drivers/net/ethernet/toshiba/tc35815.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c index b50c3ec3495b..6bcda20ed7e7 100644 --- a/drivers/net/ethernet/toshiba/tc35815.c +++ b/drivers/net/ethernet/toshiba/tc35815.c @@ -643,7 +643,7 @@ static int tc_mii_probe(struct net_device *dev) linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, mask); linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, mask); } - linkmode_and(phydev->supported, phydev->supported, mask); + linkmode_andnot(phydev->supported, phydev->supported, mask); linkmode_copy(phydev->advertising, phydev->supported); lp->link = 0; |