Commit 0f3b1cf2 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

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: 5502b218 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 726097d6
......@@ -22,6 +22,7 @@
#include <linux/seqlock.h>
#include <linux/idr.h>
#include <linux/netdevice.h>
#include <linux/linkmode.h>
#include "swphy.h"
......@@ -300,6 +301,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq,
phy->supported);
}
linkmode_copy(phy->advertising, phy->supported);
ret = phy_device_register(phy);
if (ret) {
phy_device_free(phy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment