* [PATCH] net: phy: fixed: propagate fixed link values to struct
@ 2015-08-26 14:48 Madalin Bucur
2015-08-26 14:57 ` Stas Sergeev
0 siblings, 1 reply; 2+ messages in thread
From: Madalin Bucur @ 2015-08-26 14:48 UTC (permalink / raw)
To: f.fainelli, stsp; +Cc: netdev, linux-kernel, Igal.Liberman, Madalin Bucur
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 <madalin.bucur@freescale.com>
---
drivers/net/phy/fixed_phy.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 479b93f..20731fc 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -292,6 +292,15 @@ struct phy_device *fixed_phy_register(unsigned int irq,
return ERR_PTR(-EINVAL);
}
+ /* propagate the fixed link values to struct phy_device */
+ if (status->link) {
+ phy->link = 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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: phy: fixed: propagate fixed link values to struct
2015-08-26 14:48 [PATCH] net: phy: fixed: propagate fixed link values to struct Madalin Bucur
@ 2015-08-26 14:57 ` Stas Sergeev
0 siblings, 0 replies; 2+ messages in thread
From: Stas Sergeev @ 2015-08-26 14:57 UTC (permalink / raw)
To: madalin.bucur, f.fainelli; +Cc: netdev, linux-kernel, Igal.Liberman
26.08.2015 17:48, Madalin Bucur пишет:
> 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 <madalin.bucur@freescale.com>
> ---
> drivers/net/phy/fixed_phy.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
> index 479b93f..20731fc 100644
> --- a/drivers/net/phy/fixed_phy.c
> +++ b/drivers/net/phy/fixed_phy.c
> @@ -292,6 +292,15 @@ struct phy_device *fixed_phy_register(unsigned int irq,
> return ERR_PTR(-EINVAL);
> }
>
> + /* propagate the fixed link values to struct phy_device */
> + if (status->link) {
> + phy->link = status->link;
Oh, I wonder if you want to initialize phy->link regardless,
outside of the "if (status->link)" block.
Other than that,
Acked-by: Stas Sergeev <stsp@users.sourceforge.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-26 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 14:48 [PATCH] net: phy: fixed: propagate fixed link values to struct Madalin Bucur
2015-08-26 14:57 ` Stas Sergeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox