Skip to content

Commit 0f3b1cf

Browse files
hkallweitdavem330
authored andcommitted
net: phy: fix reading fixed phy status
With the switch to phy_resolve_aneg_linkmode() we don't read from the chip any longer what is advertised but use phydev->advertising directly. For a fixed phy however this bitmap is empty so far, what results in no common mode being found. This breaks DSA. Fix this by advertising everything that is supported. For a normal phy this done by phy_probe(). Fixes: 5502b21 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 726097d commit 0f3b1cf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/net/phy/fixed_phy.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/seqlock.h>
2323
#include <linux/idr.h>
2424
#include <linux/netdevice.h>
25+
#include <linux/linkmode.h>
2526

2627
#include "swphy.h"
2728

@@ -300,6 +301,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq,
300301
phy->supported);
301302
}
302303

304+
linkmode_copy(phy->advertising, phy->supported);
305+
303306
ret = phy_device_register(phy);
304307
if (ret) {
305308
phy_device_free(phy);

0 commit comments

Comments
 (0)