* [v2] net: phy: fixed: propagate fixed link values to struct
@ 2015-08-26 14:58 Madalin Bucur
2015-08-26 15:51 ` Stas Sergeev
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Madalin Bucur @ 2015-08-26 14:58 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>
---
v2: always setting phy->link, thanks Stas
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..99d9bc1 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 */
+ 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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [v2] net: phy: fixed: propagate fixed link values to struct
2015-08-26 14:58 [v2] net: phy: fixed: propagate fixed link values to struct Madalin Bucur
@ 2015-08-26 15:51 ` Stas Sergeev
2015-08-26 16:12 ` Madalin-Cristian Bucur
2015-08-26 18:48 ` Florian Fainelli
2015-08-27 18:25 ` David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Stas Sergeev @ 2015-08-26 15:51 UTC (permalink / raw)
To: madalin.bucur, f.fainelli; +Cc: netdev, linux-kernel, Igal.Liberman
26.08.2015 17:58, 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.
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [v2] net: phy: fixed: propagate fixed link values to struct
2015-08-26 15:51 ` Stas Sergeev
@ 2015-08-26 16:12 ` Madalin-Cristian Bucur
0 siblings, 0 replies; 5+ messages in thread
From: Madalin-Cristian Bucur @ 2015-08-26 16:12 UTC (permalink / raw)
To: Stas Sergeev, f.fainelli@gmail.com, David Miller
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Liberman Igal
> -----Original Message-----
> From: Stas Sergeev [mailto:stsp@list.ru]
> Sent: Wednesday, August 26, 2015 6:51 PM
> To: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>;
> f.fainelli@gmail.com
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Liberman Igal-
> B31950 <Igal.Liberman@freescale.com>
> Subject: Re: [v2] net: phy: fixed: propagate fixed link values to struct
>
> 26.08.2015 17:58, 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.
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2] net: phy: fixed: propagate fixed link values to struct
2015-08-26 14:58 [v2] net: phy: fixed: propagate fixed link values to struct Madalin Bucur
2015-08-26 15:51 ` Stas Sergeev
@ 2015-08-26 18:48 ` Florian Fainelli
2015-08-27 18:25 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2015-08-26 18:48 UTC (permalink / raw)
To: madalin.bucur, stsp; +Cc: netdev, linux-kernel, Igal.Liberman, andrew
On 26/08/15 07:58, Madalin Bucur wrote:
> 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.
>
> Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> v2: always setting phy->link, thanks Stas
>
> 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..99d9bc1 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 */
> + 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;
>
>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2] net: phy: fixed: propagate fixed link values to struct
2015-08-26 14:58 [v2] net: phy: fixed: propagate fixed link values to struct Madalin Bucur
2015-08-26 15:51 ` Stas Sergeev
2015-08-26 18:48 ` Florian Fainelli
@ 2015-08-27 18:25 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-08-27 18:25 UTC (permalink / raw)
To: madalin.bucur; +Cc: f.fainelli, stsp, netdev, linux-kernel, Igal.Liberman
From: Madalin Bucur <madalin.bucur@freescale.com>
Date: Wed, 26 Aug 2015 17:58:47 +0300
> 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>
> ---
> v2: always setting phy->link, thanks Stas
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-27 18:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 14:58 [v2] net: phy: fixed: propagate fixed link values to struct Madalin Bucur
2015-08-26 15:51 ` Stas Sergeev
2015-08-26 16:12 ` Madalin-Cristian Bucur
2015-08-26 18:48 ` Florian Fainelli
2015-08-27 18:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).