From: Sylvain Lemieux <slemieux.tyco@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: vivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net: dsa: mv88e6xxx: fix mdio bus name when using devicetree
Date: Tue, 02 May 2017 10:26:03 -0400 [thread overview]
Message-ID: <1493735163.19031.2.camel@gmail.com> (raw)
In-Reply-To: <20170501152054.GD1285@lunn.ch>
Hi Andrew,
On Mon, 2017-05-01 at 17:20 +0200, Andrew Lunn wrote:
> On Mon, May 01, 2017 at 10:54:04AM -0400, Sylvain Lemieux wrote:
> > From: Liam Beguin <lbeguin@tycoint.com>
> >
> > mv88e6xxx_mdio_register automatically generates mdio buses for each switch
> > discovered in the devicetree. When switch nodes are embedded in other nodes,
> > this can cause sysfs naming collisions since full_name may be truncated.
> >
> > Only use devicetree node name instead of the full devicetree path
> > as the mdio bus name.
>
> Hi Sylvain
>
> I'm not sure this is a good idea. It probably breaks my boards:
>
> :/sys/class/mdio_bus# ls
> !mdio-mux!mdio@1!switch@0!mdio 0.1 0.4 400d0000.ethernet-1 fixed-0
> !mdio-mux!mdio@2!switch@0!mdio 0.2 0.8 400d1000.ethernet-2 mv88e6xxx-0
>
> np->name is not unique, where as np->full_name is unique.
>
> However, i can understand your problem with truncation. Maybe a better
> solution is to detect if truncation is going to happen. If so, use a
> concatenation of a hash of np->full_name, and the right hand part of
> np->full_name?
>
Thanks for the feedback.
I am currently busy on something else; I should be able to look at this
next week or the following.
Regards,
Sylvain
> Andrew
prev parent reply other threads:[~2017-05-02 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 14:54 [PATCH] net: dsa: mv88e6xxx: fix mdio bus name when using devicetree Sylvain Lemieux
2017-05-01 15:20 ` Andrew Lunn
2017-05-02 14:26 ` Sylvain Lemieux [this message]
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=1493735163.19031.2.camel@gmail.com \
--to=slemieux.tyco@gmail.com \
--cc=andrew@lunn.ch \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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: 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.