Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756781AbbHZSug (ORCPT ); Wed, 26 Aug 2015 14:50:36 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34825 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbbHZSue (ORCPT ); Wed, 26 Aug 2015 14:50:34 -0400 Message-ID: <55DE09E5.1080008@gmail.com> Date: Wed, 26 Aug 2015 11:48:05 -0700 From: Florian Fainelli User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 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 References: <1440601127-7663-1-git-send-email-madalin.bucur@freescale.com> In-Reply-To: <1440601127-7663-1-git-send-email-madalin.bucur@freescale.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1449 Lines: 49 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 Reviewed-by: Florian Fainelli > --- > 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/