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]
Message-ID: <38e40bc4c0de409ca959bcb847c1fc96@sphcmbx02.sunplus.com.tw>
Date:   Fri, 26 Nov 2021 16:12:46 +0000
From:   Wells Lu 呂芳騰 <wells.lu@...plus.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     Wells Lu <wellslutw@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        Vincent Shih 施錕鴻 
        <vincent.shih@...plus.com>
Subject: RE: [PATCH v2 2/2] net: ethernet: Add driver for Sunplus SP7021

Hi Andrew,


From data provided by ASIC engineer, MAC of SP7021 only
reads the 4 registers of PHY:
0: Control register
1: Status register
4: Auto-negotiation advertisement register
5: Auto-negotiation link partner ability register

It does not read any other registers of PHY.


Best regards,
Wells Lu


> > Hi Andrew,
> >
> > I set phy-id registers to 30 and 31 and found the read-back values of
> > mdio read commands from CPU are all 0x0000.
> >
> > I consulted with an ASIC engineer. She confirmed that if phy-id of a
> > mdio command from CPU does not match any phy-id registers, the mdio
> > command will not be sent out.
> >
> > She explained if phy-id of a mdio command does not match any phy-id
> > registers (represent addresses of external PHYs), why MAC needs to
> > send a command to non-existing PHY?
> 
> Reads or writes on a real PHY which Linux is driving can have side effects. There is a
> link statue register which latches. Read it once, you get the last status, read it again,
> you get the current status. If the MAC hardware is reading this register as well a Linux,
> bad things will happen. A read on the interrupt status register often clears the interrupts.
> So Linux will not see the interrupts.
> 
> So you need to make sure you hardware is not touching a PHY which Linux uses. Which is
> why i suggested using MDIO bus address 31, which generally does not have a PHY at that
> address.
> 
> 	  Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ