Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214132 > unrolled thread
| Started by | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| First post | 2015-08-26 21:00 +0200 |
| Last post | 2015-08-26 21:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [v2] net: phy: fixed: propagate fixed link values to struct Florian Fainelli <f.fainelli@gmail.com> - 2015-08-26 21:00 +0200
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2015-08-26 21:00 +0200 |
| Subject | Re: [v2] net: phy: fixed: propagate fixed link values to struct |
| Message-ID | <q1O5r-5Pg-5@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web