The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.
Signed-off-by: Madalin Bucur <redacted>
---
v2: always setting phy->link, thanks Stas
drivers/net/phy/fixed_phy.c | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -292,6 +292,15 @@ struct phy_device *fixed_phy_register(unsigned int irq,returnERR_PTR(-EINVAL);}+/* propagate the fixed link values to struct phy_device */+phy->link=status->link;+if(status->link){+phy->speed=status->speed;+phy->duplex=status->duplex;+phy->pause=status->pause;+phy->asym_pause=status->asym_pause;+}+of_node_get(np);phy->dev.of_node=np;
The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.
ACK, but IMHO it will make more sense if you include that
into your upcoming patch set rather than sending separately,
as otherwise there is simply no in-kernel users of that new
functionality (all the current users likely do not access
these fields as early as you want to, so they don't care).
In any case, the patch looks good to me and the policy is
up to others.
The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.
ACK, but IMHO it will make more sense if you include that
into your upcoming patch set rather than sending separately,
as otherwise there is simply no in-kernel users of that new
functionality (all the current users likely do not access
these fields as early as you want to, so they don't care).
In any case, the patch looks good to me and the policy is
up to others.
Given that it's more of a fix than a feature, I think it can be picked up separate
from a certain driver that accesses those fields early but I guess Florian, David
will decide this.
Thanks,
Madalin
The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.
Arguably you need to start the PHY state machine for this to work
properly, but this looks fine to me.
@@ -292,6 +292,15 @@ struct phy_device *fixed_phy_register(unsigned int irq,returnERR_PTR(-EINVAL);}+/* propagate the fixed link values to struct phy_device */+phy->link=status->link;+if(status->link){+phy->speed=status->speed;+phy->duplex=status->duplex;+phy->pause=status->pause;+phy->asym_pause=status->asym_pause;+}+of_node_get(np);phy->dev.of_node=np;
The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.
Signed-off-by: Madalin Bucur <redacted>
---
v2: always setting phy->link, thanks Stas