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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42ea108673200b3076d1b4f8d1fcb221b42d8e32.camel@microchip.com>
Date:   Thu, 10 Feb 2022 15:30:16 +0000
From:   <Prasanna.VengateshanVaradharajan@...rochip.com>
To:     <enguerrand.de-ribaucourt@...oirfairelinux.com>, <andrew@...n.ch>
CC:     <Vlad.Lyalikov@...rochip.com>, <Sundararaman.H@...rochip.com>,
        <Lars.Povlsen@...rochip.com>, <Yuiko.Oshino@...rochip.com>,
        <Allan.Nielsen@...rochip.com>, <netdev@...r.kernel.org>,
        <David.Cai@...rochip.com>, <Joergen.Andreasen@...rochip.com>,
        <Scott.Kasten@...rochip.com>, <Horatiu.Vultur@...rochip.com>,
        <Nisar.Sayed@...rochip.com>, <Arun.Ramadoss@...rochip.com>,
        <Divya.Koppera@...rochip.com>, <linux@...linux.org.uk>,
        <Kavyasree.Kotagiri@...rochip.com>,
        <Balaje.Rajasundaram@...rochip.com>, <hkallweit1@...il.com>,
        <Prasanna.VengateshanVaradharajan@...rochip.com>,
        <john.oleary@...rochip.com>, <Bryan.Whitehead@...rochip.com>,
        <Raju.Lakkaraju@...rochip.com>, <Ravi.Hegde@...rochip.com>,
        <Woojung.Huh@...rochip.com>, <Sukanya.Palanisami@...rochip.com>,
        <Ronnie.Kunin@...rochip.com>, <Tristram.Ha@...rochip.com>,
        <Antoine.Sebert@...rochip.com>,
        <Selvakannan.Murugesan@...rochip.com>,
        <Steen.Hegelund@...rochip.com>, <Sushovan.Ranjanroy@...rochip.com>,
        <Bjarni.Jonasson@...rochip.com>, <John.Haechten@...rochip.com>,
        <Andre.Edich@...rochip.com>,
        <Pandiselvan.Soundrapandian@...rochip.com>
Subject: Re: [PATCH v2 1/2] net: phy: micrel: add Microchip KSZ 9897 Switch
 PHY support

On Tue, 2022-02-08 at 14:13 +0100, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> On Tue, Feb 08, 2022 at 03:38:41AM -0500, Enguerrand de Ribaucourt wrote:
> > ----- Original Message -----
> > > From: "Andrew Lunn" <andrew@...n.ch>
> > > To: "Enguerrand de Ribaucourt" < 
> > > enguerrand.de-ribaucourt@...oirfairelinux.com>
> > > Cc: "netdev" <netdev@...r.kernel.org>, "hkallweit1"
> > > <hkallweit1@...il.com>, "linux" <linux@...linux.org.uk>
> > > Sent: Tuesday, February 8, 2022 12:28:53 AM
> > > Subject: Re: [PATCH v2 1/2] net: phy: micrel: add Microchip KSZ 9897
> > > Switch PHY support
> > 
> > > > + /* KSZ8081A3/KSZ8091R1 PHY and KSZ9897 switch share the same
> > > > + * exact PHY ID. However, they can be told apart by the default value
> > > > + * of the LED mode. It is 0 for the PHY, and 1 for the switch.
> > > > + */
> > > > + ret &= (MICREL_KSZ8081_CTRL2_LED_MODE0 |
> > > > MICREL_KSZ8081_CTRL2_LED_MODE1);
> > > > + if (!ksz_8081)
> > > > + return ret;
> > > > + else
> > > > + return !ret;
> > 
> > > What exactly does MICREL_KSZ8081_CTRL2_LED_MODE0 and
> > > MICREL_KSZ8081_CTRL2_LED_MODE1 mean? We have to be careful in that
> > > there could be use cases which actually wants to configure the
> > > LEDs. There have been recent discussions for two other PHYs recently
> > > where the bootloader is configuring the LEDs, to something other than
> > > their default value.
> > 
> > Those registers configure the LED Mode according to the KSZ8081 datasheet:
> > [00] = LED1: Speed LED0: Link/Activity
> > [01] = LED1: Activity LED0: Link
> > [10], [11] = Reserved
> > default value is [00].
> > 
> > Indeed, if the bootloader changes them, we would match the wrong
> > device. However, I closely examined all the registers, and there is no
> > read-only bit that we can use to differentiate both models. The
> > LED mode bits are the only ones that have a different default value on the
> > KSZ8081: [00] and the KSZ9897: [01]. Also, the RMII registers are not
> > documented in the KSZ9897 datasheet so that value is not guaranteed to
> > be [01] even though that's what I observed.
> > 
> > Do you think we should find another way to match KSZ8081 and KSZ9897?
> > The good news is that I'm now confident about the phy_id emitted by
> > both models.
> 
> Lets try asking Prasanna Vengateshan, who is working on other
> Microchip switches and PHYs at Microchip.
> 
>      Andrew

I have already forwarded to the team who worked on the KSZ9897 PHY and added
here (part of UNGLinuxDriver).

Prasanna V

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ