From: Florian Fainelli <f.fainelli@gmail.com> To: Bo Shen <voice.shen@atmel.com> Cc: netdev <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [RFC PATCH] phy: micrel: make phy_has_fixups attribute read correctly Date: Thu, 26 Jun 2014 11:00:17 -0700 [thread overview] Message-ID: <CAGVrzcaN9KKW6vN5Xy775RTBD3ODpK95-o0V+pKDcCCxetPycA@mail.gmail.com> (raw) In-Reply-To: <1403681075-16181-1-git-send-email-voice.shen@atmel.com> Hello, 2014-06-25 0:24 GMT-07:00 Bo Shen <voice.shen@atmel.com>: > If the fixups parameters get from dtb, it won't set has_fixups > parameters, so when read phy_has_fixups attribute, it always > present as 0. > Add this patch to make phy_has_fixups attribute read correctly. I am not entirely sure whether loading values from Device Tree should be considered a PHY fixup per-se. They do override the hardware reset default values, but I am not sure if we should consider that as a fixup. Assuming that you need to troubleshoot a given system, one of the first things you will surely ask for is the DTS used by that platform, and in that case you can quickly check whether the PHY default settings are changed, right? > > Signed-off-by: Bo Shen <voice.shen@atmel.com> > --- > drivers/net/phy/micrel.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c > index bc7c7d2..c384922 100644 > --- a/drivers/net/phy/micrel.c > +++ b/drivers/net/phy/micrel.c > @@ -237,6 +237,8 @@ static int ksz9021_load_values_from_of(struct phy_device *phydev, > > if (!matches) > return 0; > + else > + phydev->has_fixups = true; There is no need for the else here > > if (matches < 4) > newval = kszphy_extended_read(phydev, reg); > @@ -330,6 +332,8 @@ static int ksz9031_of_load_skew_values(struct phy_device *phydev, > > if (!matches) > return 0; > + else > + phydev->has_fixups = true; Same here > > if (matches < numfields) > newval = ksz9031_extended_read(phydev, OP_DATA, 2, reg); > -- > 1.8.5.2 > -- Florian
WARNING: multiple messages have this Message-ID (diff)
From: f.fainelli@gmail.com (Florian Fainelli) To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH] phy: micrel: make phy_has_fixups attribute read correctly Date: Thu, 26 Jun 2014 11:00:17 -0700 [thread overview] Message-ID: <CAGVrzcaN9KKW6vN5Xy775RTBD3ODpK95-o0V+pKDcCCxetPycA@mail.gmail.com> (raw) In-Reply-To: <1403681075-16181-1-git-send-email-voice.shen@atmel.com> Hello, 2014-06-25 0:24 GMT-07:00 Bo Shen <voice.shen@atmel.com>: > If the fixups parameters get from dtb, it won't set has_fixups > parameters, so when read phy_has_fixups attribute, it always > present as 0. > Add this patch to make phy_has_fixups attribute read correctly. I am not entirely sure whether loading values from Device Tree should be considered a PHY fixup per-se. They do override the hardware reset default values, but I am not sure if we should consider that as a fixup. Assuming that you need to troubleshoot a given system, one of the first things you will surely ask for is the DTS used by that platform, and in that case you can quickly check whether the PHY default settings are changed, right? > > Signed-off-by: Bo Shen <voice.shen@atmel.com> > --- > drivers/net/phy/micrel.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c > index bc7c7d2..c384922 100644 > --- a/drivers/net/phy/micrel.c > +++ b/drivers/net/phy/micrel.c > @@ -237,6 +237,8 @@ static int ksz9021_load_values_from_of(struct phy_device *phydev, > > if (!matches) > return 0; > + else > + phydev->has_fixups = true; There is no need for the else here > > if (matches < 4) > newval = kszphy_extended_read(phydev, reg); > @@ -330,6 +332,8 @@ static int ksz9031_of_load_skew_values(struct phy_device *phydev, > > if (!matches) > return 0; > + else > + phydev->has_fixups = true; Same here > > if (matches < numfields) > newval = ksz9031_extended_read(phydev, OP_DATA, 2, reg); > -- > 1.8.5.2 > -- Florian
next prev parent reply other threads:[~2014-06-26 18:01 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-25 7:24 [RFC PATCH] phy: micrel: make phy_has_fixups attribute read correctly Bo Shen 2014-06-25 7:24 ` Bo Shen 2014-06-26 18:00 ` Florian Fainelli [this message] 2014-06-26 18:00 ` Florian Fainelli 2014-06-26 18:00 ` Florian Fainelli 2014-06-27 3:33 ` Bo Shen 2014-06-27 3:33 ` Bo Shen 2014-06-27 3:33 ` Bo Shen
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=CAGVrzcaN9KKW6vN5Xy775RTBD3ODpK95-o0V+pKDcCCxetPycA@mail.gmail.com \ --to=f.fainelli@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=voice.shen@atmel.com \ /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: linkBe 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.