From: Florian Fainelli <f.fainelli@gmail.com>
To: madalin.bucur@freescale.com, stsp@list.ru
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Igal.Liberman@freescale.com, andrew@lunn.ch
Subject: Re: [v2] net: phy: fixed: propagate fixed link values to struct
Date: Wed, 26 Aug 2015 11:48:05 -0700 [thread overview]
Message-ID: <55DE09E5.1080008@gmail.com> (raw)
In-Reply-To: <1440601127-7663-1-git-send-email-madalin.bucur@freescale.com>
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
next prev parent reply other threads:[~2015-08-26 18:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 16:12 ` Madalin-Cristian Bucur
2015-08-26 18:48 ` Florian Fainelli [this message]
2015-08-27 18:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55DE09E5.1080008@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Igal.Liberman@freescale.com \
--cc=andrew@lunn.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@freescale.com \
--cc=netdev@vger.kernel.org \
--cc=stsp@list.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.