lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Dec 2018 14:19:59 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Greg Ungerer <gerg@...nel.org>
Cc:     Florian Fainelli <f.fainelli@...il.com>, sean.wang@...iatek.com,
        vivien.didelot@...oirfairelinux.com, netdev@...r.kernel.org,
        blogic@...nwrt.org, neil@...wn.name
Subject: Re: [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530

> >I don't think any of these properties are necessary, if you can either
> >use a compatible string, and/or infer the actual model at runtime in the
> >driver's probe function, then you can assess based on that chip model as
> 
> There is an ID register in the 7530 - though I don't know if the lower
> 16 bits of it can tell us enough information about the device. For me on
> the MT7621 they return "0001", I assume it is a revsion ID of some type.
> Problem is we do not read that until after the regulators and some of
> the clocking is setup.

Hi Greg

I would suggest you refactor the code, so you know the ID early
on. Reading such an ID is very common in device drivers, to decide
what to do. The silicon is generally more reliable than device tree
when it comes to identification.

The only time you need a different device tree compatibly string is
when you cannot actually get to the ID, e.g. you need to turn some
clock on, or the ID is in a different place.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ