Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532635

Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support
Date 2016-11-29 19:30 +0100
Message-ID <sIVke-3Ce-5@gated-at.bofh.it> (permalink)
References (5 earlier) <sIgTL-2sI-3@gated-at.bofh.it> <sIpkl-84F-7@gated-at.bofh.it> <sIu0F-2yY-11@gated-at.bofh.it> <sIwlP-3V2-11@gated-at.bofh.it> <sIURc-3bn-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 29, 2016 at 12:54:24PM -0500, Vivien Didelot wrote:
> Hi,
> 
> Uwe Kleine-König <uwe@kleine-koenig.org> writes:
> 
> > Also it seems wrong to write "marvell,mv88e6085" (only) if I know the
> > hardware is really a "marvell,mv88e6176".
> 
> I agree. It might be complex for a user to dig into the driver in order
> to figure out how the switch ID is read and which compatible to choose.
> 
> I've sent a patch to change this https://lkml.org/lkml/2016/6/8/1198 but
> Andrew had a stronger opinion on compatible strings, which makes sense.
> 
> >> Linus has said he does not like ARM devices because of all the busses
> >> which are not enumerable. Here we have a device which with a little
> >> bit of help we can enumerate. So we should. 
> >
> > If you write
> >
> > 	compatible = "marvell,mv88e6176", "marvell,mv88e6085";
> >
> > you can still enumerate in the same way as before.
> 
> So we don't break the existing DTS files, I like this.
> 
> The driver already prints info about the detected switch. Instead of
> failing at probe, which seems against the notion of compatible and
> breaks the existing behavior, it could report the eventual mismatch?

I'm still against it.

Say we let the driver probe and warn when the compatible string is
wrong. Is this likely to get fixed? Probably not, it is just a
warning, people ignore them.

A few years later, we have accumulated a number of broken device
trees. And suddenly we really do have a Marvell device with a broken
ID in its port register, or more likely, the revision number was not
incremented but there was incompatible register changes. We suddenly
do have to look at the compatible string. But we know many are actually
wrong. How do we know which to trust? We basically have to say, if the
compatible is "marvell,mv88e6042" we trust it, all the others we don't
trust and ignore.

Isn't that madness?

What we have today is verified correct. If this hypothetical
"marvell,mv88e6042" does happen, then no problems, we add a compatible
string for it, and it works.

We should probably add a comment to the mv88e6xxx_of_match array,
explaining how it currently works.

      Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] Documentation: net: dsa: marvell: Add 88E6176 Andreas Färber <afaerber@suse.de> - 2016-11-27 22:00 +0100
  [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andreas Färber <afaerber@suse.de> - 2016-11-27 22:00 +0100
    Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andrew Lunn <andrew@lunn.ch> - 2016-11-27 22:30 +0100
      Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andreas Färber <afaerber@suse.de> - 2016-11-27 23:00 +0100
        Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andrew Lunn <andrew@lunn.ch> - 2016-11-27 23:10 +0100
          Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andreas Färber <afaerber@suse.de> - 2016-11-27 23:50 +0100
            Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andrew Lunn <andrew@lunn.ch> - 2016-11-28 00:20 +0100
              Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Uwe Kleine-König <uwe@kleine-koenig.org> - 2016-11-28 09:20 +0100
                Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andrew Lunn <andrew@lunn.ch> - 2016-11-28 14:20 +0100
                Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Uwe Kleine-König <uwe@kleine-koenig.org> - 2016-11-28 16:50 +0100
                Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andrew Lunn <andrew@lunn.ch> - 2016-11-28 17:20 +0100
                Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-11-29 19:00 +0100
                Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Andrew Lunn <andrew@lunn.ch> - 2016-11-29 19:30 +0100

csiph-web