mbox series

[RFC,0/7] Clause 45 PHY probing cleanups

Message ID 20200526142948.GY1551@shell.armlinux.org.uk
Headers show
Series Clause 45 PHY probing cleanups | expand

Message

Russell King (Oracle) May 26, 2020, 2:29 p.m. UTC
Hi,

In response to the patch set that Jeremy posted, this is my proposal
to expand our Clause 45 PHY probing.

I've taken a slightly different approach, with the view to avoiding
as much behavioural change as possible.  The biggest difference is
to do with "devices_in_package" - we were using it for two different
purposes, which are now separated.

This is not against net-next nor net trees, but against my own private
tree, but I'm posting it to serve as an illustration of what I think
should be done - I knocked this up this morning.

The only potential regression that I'm expecting is with 88x3310 PHYs
of the later revision, which have the clause 22 registers implemented.
I haven't yet checked whether they set bit 0, but if they do, the
various decision points that we have based on that bit could adversely
affect this PHY - it needs testing, which I'll do when I dig out the
appropriate hardware.  Probably also needs the 2110 PHYs checked as
well.

I haven't tested this series yet beyond compile testing.

Given the proximity of the merge window, this *isn't* code I'd like to
see merged into net-next - it's way too risky at this point.  So, we
have time to consider our options.

 drivers/net/phy/bcm87xx.c    |   2 +-
 drivers/net/phy/cortina.c    |   3 +-
 drivers/net/phy/phy-c45.c    |   4 +-
 drivers/net/phy/phy-core.c   |  11 ++--
 drivers/net/phy/phy.c        |   4 +-
 drivers/net/phy/phy_device.c | 141 +++++++++++++++++++++++++++----------------
 drivers/net/phy/phylink.c    |  19 +++---
 include/linux/mdio.h         |  31 ++++++++++
 include/linux/phy.h          |  14 ++---
 9 files changed, 146 insertions(+), 83 deletions(-)

Comments

Russell King (Oracle) May 26, 2020, 3:43 p.m. UTC | #1
On Tue, May 26, 2020 at 03:29:48PM +0100, Russell King - ARM Linux admin wrote:
> Hi,
> 
> In response to the patch set that Jeremy posted, this is my proposal
> to expand our Clause 45 PHY probing.
> 
> I've taken a slightly different approach, with the view to avoiding
> as much behavioural change as possible.  The biggest difference is
> to do with "devices_in_package" - we were using it for two different
> purposes, which are now separated.
> 
> This is not against net-next nor net trees, but against my own private
> tree, but I'm posting it to serve as an illustration of what I think
> should be done - I knocked this up this morning.
> 
> The only potential regression that I'm expecting is with 88x3310 PHYs
> of the later revision, which have the clause 22 registers implemented.
> I haven't yet checked whether they set bit 0, but if they do, the
> various decision points that we have based on that bit could adversely
> affect this PHY - it needs testing, which I'll do when I dig out the
> appropriate hardware.  Probably also needs the 2110 PHYs checked as
> well.

Tested on the later revision of the 88x3310 PHY with some additional
prints:

orion-mdio f212a600.mdio: scanning prt 0 mmd 1...
orion-mdio f212a600.mdio: prt 0: dip=c000009a
orion-mdio f212a600.mdio: prt 0 mmd 1: id 0x002b09ab
orion-mdio f212a600.mdio: prt 0 mmd 3: id 0x002b09ab
orion-mdio f212a600.mdio: prt 0 mmd 4: id 0x01410dab
orion-mdio f212a600.mdio: prt 0 mmd 7: id 0x002b09ab
orion-mdio f212a600.mdio: prt 0 mmd 30: prs=0
orion-mdio f212a600.mdio: prt 0 mmd 31: prs=0

orion-mdio f212a600.mdio: scanning prt 8 mmd 1...
orion-mdio f212a600.mdio: prt 8: dip=c000009a
orion-mdio f212a600.mdio: prt 8 mmd 1: id 0x002b09ab
orion-mdio f212a600.mdio: prt 8 mmd 3: id 0x002b09ab
orion-mdio f212a600.mdio: prt 8 mmd 4: id 0x01410dab
orion-mdio f212a600.mdio: prt 8 mmd 7: id 0x002b09ab
orion-mdio f212a600.mdio: prt 8 mmd 30: prs=0
orion-mdio f212a600.mdio: prt 8 mmd 31: prs=0

which is what is expected from this PHY.