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:   Fri, 26 Nov 2021 15:38:43 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Wells Lu 呂芳騰 <wells.lu@...plus.com>
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

On Fri, Nov 26, 2021 at 03:56:28AM +0000, Wells Lu 呂芳騰 wrote:
> 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