netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roosen Henri <Henri.Roosen@ginzinger.com>
To: 'Florian Fainelli' <f.fainelli@gmail.com>,
	"david.daney@cavium.com" <david.daney@cavium.com>
Cc: "buytenh@wantstofly.org" <buytenh@wantstofly.org>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Andrew Lunn <andrew@lunn.ch>
Subject: AW: Commit-8b63ec18 breaks setting PHY pad-skew settings
Date: Tue, 22 Dec 2015 10:04:31 +0000	[thread overview]
Message-ID: <FC629F1A536C6F42B960B5E32E20BD356A969BC7@exc2.buero.ginzinger.com> (raw)
In-Reply-To: <56785808.6050804@gmail.com>

> -----Ursprüngliche Nachricht-----
> Von: Florian Fainelli [mailto:f.fainelli@gmail.com]
> Gesendet: Montag, 21. Dezember 2015 20:51
> An: Roosen Henri; david.daney@cavium.com
> Cc: buytenh@wantstofly.org; grant.likely@secretlab.ca;
> davem@davemloft.net; netdev@vger.kernel.org; Andrew Lunn
> Betreff: Re: Commit-8b63ec18 breaks setting PHY pad-skew settings
>
> On 21/12/15 02:40, Roosen Henri wrote:
> > Hi David,
> >
> > Unfortunately Linux kernel commit-
> 8b63ec1837fa4c1ea604b278d201454eb3b85066 breaks setting pad-skew
> settings for Micrel PHY's.
> >
> > Please see Documentation/devicetree/bindings/net/micrel-ksz90x1.txt: at
> the examples, it proposes to do PHY pad skew settings at the Ethernet
> device for autodetected PHY's.
> >
> > Multiple boards are using this at the devicetree files: see imx6qdl-
> nitrogen6x.dtsi, imx6qdl-sabrelite.dtsi, socfpga_arria5_socdk.dts,
> socfpga_cyclone5_socdk.dts and socfpga_cyclone5_sockit.dts. But of course
> there might be more users depending on this than the ones which have an
> in-kernel dts file.
> >
> > The micrel.c file searches for the parent of its OpenFirmware node for the
> skew settings: see ksz9031_config_init(): of_node = dev->parent->of_node;
> I don't think that was a clean implementation to start with.. But for sure it's
> incompatible with commit-8b63ec18, because the node of the Ethernet
> device which has the settings is not found anymore.
> >
> > I'm not sure who to put on the copy list to discuss a proper solution, so feel
> free to get these persons and lists in the loop.
>
> Usually, the best thing is to reply on the mailing-list directive, so more people
> can jump in.

Thanks Florian for your reply and getting the mailing-list into the loop!

>
> This particular issue is fixed with the following commit:
>
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=651
> df2183543bc92f5dbcf99cd9e236ead0bc4c5

Unfortunately the patch is incomplete: it only fixes the issue for the KSZ9021. Please have a look at the funcion ksz9031_config_init() which has the the same (broken) search for the parent node.

As both the code for KSZ9021 as well as the code for KSZ9031 parse the same pad skew settings from the OF node (and to prevent incomplete fixes in the future), I think this code is a candidate to be cleaned up. Or is cooking up a similar patch for the KSZ9031 as for the KSZ9021 preferred?

Additionally, if this is a deprecated feature (like the commit states), then the devicetree binding documentation (Documentation/devicetree/bindings/net/micrel-ksz90x1.txt) should be updated. At least the deprecated example for autodetected PHY's should be corrected/removed.

--
Henri
> --
> Florian

________________________________

Ginzinger electronic systems GmbH
Gewerbegebiet Pirath 16
4952 Weng im Innkreis
www.ginzinger.com

Firmenbuchnummer: FN 364958d
Firmenbuchgericht: Ried im Innkreis
UID-Nr.: ATU66521089

________________________________
*** WEIHNACHTSURLAUB VON DONNERSTAG, DEN 24. DEZEMBER 2015 BIS MITTWOCH, DEN 6. JAENNER 2016 ***
*** CHRISTMAS VACATION FROM THURSDAY, THE 24 DECEMBER 2015 TO WEDNESDAY, 6 JANUARY 2016 ***

  reply	other threads:[~2015-12-22 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <FC629F1A536C6F42B960B5E32E20BD356A967AF0@exc2.buero.ginzinger.com>
2015-12-21 19:50 ` Commit-8b63ec18 breaks setting PHY pad-skew settings Florian Fainelli
2015-12-22 10:04   ` Roosen Henri [this message]
2015-12-22 10:18     ` Andrew Lunn

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=FC629F1A536C6F42B960B5E32E20BD356A969BC7@exc2.buero.ginzinger.com \
    --to=henri.roosen@ginzinger.com \
    --cc=andrew@lunn.ch \
    --cc=buytenh@wantstofly.org \
    --cc=davem@davemloft.net \
    --cc=david.daney@cavium.com \
    --cc=f.fainelli@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=netdev@vger.kernel.org \
    /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 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).