Skip to content

RFC net: phy: C45-over-C22 access

Michael Walle lkml netdev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest8 patches 0 repliesNew
  2. v1 RFC5 patches 23 repliesSuperseded

Changes in v2 from the cover letter

- use __phy_mmd_indirect() in mdiobus_probe_mmd_read()
- add new properties has_c45 c45_over_c22 (and remove is_c45)
- drop MDIOBUS_NO_CAP handling, Andrew is preparing a series to add probe_capabilities to mark all C45 capable MDIO bus drivers

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8net: phy: mscc-miim: reject clause 45 register accessesdrivers/net/mdio/mdio-mscc-miim.c+6 -00 replies
2/8net: phy: mscc-miim: add probe_capabilitiesdrivers/net/mdio/mdio-mscc-miim.c+1 -00 replies
3/8net: phy: add error checks in __phy_mmd_indirect() and export itdrivers/net/phy/phy-core.c include/linux/phy.h+28 -80 replies
4/8net: phy: add error handling for __phy_{read,write}_mmddrivers/net/phy/phy-core.c+8 -50 replies
5/8net: phy: support indirect c45 access in get_phy_c45_ids()drivers/net/phy/phy_device.c+27 -50 replies
6/8net: phy: add support for C45-over-C22 transfersdrivers/net/ethernet/hisilicon/hns/hns_ethtool.c drivers/net/phy/bcm84881.c drivers/net/phy/marvell10g.c +6 more+40 -210 replies
7/8phy: net: introduce phy_promote_to_c45()drivers/net/phy/mxl-gpy.c drivers/net/phy/phy_device.c include/linux/phy.h+18 -110 replies
8/8net: phy: mxl-gpy: remove unneeded opsdrivers/net/phy/mxl-gpy.c+0 -240 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchAndrew LunnFlorian Fainelli
1/8R-b R-b
2/8R-b
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH RFC net-next v2 0/8] net: phy: C45-over-C22 access

Hi,

This is the result of this discussion:
https://lore.kernel.org/netdev/[email protected]/

The goal here is to get the GYP215 and LAN8814 running on the Microchip LAN9668 SoC. The LAN9668 suppports one external bus and unfortunately, the LAN8814 has a bug which makes it impossible to use C45 on that bus. Fortunately, it was the intention of the GPY215 driver to be used on a C22 bus. But I think this could have never really worked, because the phy_get_c45_ids() will always do c45 accesses and thus on MDIO bus drivers which will correctly check for the MII_ADDR_C45 flag and return -EOPNOTSUPP the function call will fail and thus gpy_probe() will fail. This series tries to fix that and will lay the foundation to add a workaround for the LAN8814 bug by forcing an MDIO bus to be c22-only.

At the moment, the probe_capabilities is taken into account to decide if we have to use C45-over-C22. What is still missing from this series is the handling of a device tree property to restrict the probe_capabilities to c22-only.

Since net-next is closed, this is marked as RFC to get some early feedback.

Changes since RFC v1:
- use __phy_mmd_indirect() in mdiobus_probe_mmd_read()
- add new properties has_c45 c45_over_c22 (and remove is_c45)
- drop MDIOBUS_NO_CAP handling, Andrew is preparing a series to add probe_capabilities to mark all C45 capable MDIO bus drivers

Michael Walle (8):
net: phy: mscc-miim: reject clause 45 register accesses
net: phy: mscc-miim: add probe_capabilities
net: phy: add error checks in __phy_mmd_indirect() and export it
net: phy: add error handling for __phy_{read,write}_mmd
net: phy: support indirect c45 access in get_phy_c45_ids()
net: phy: add support for C45-over-C22 transfers
phy: net: introduce phy_promote_to_c45()
net: phy: mxl-gpy: remove unneeded ops

 .../net/ethernet/hisilicon/hns/hns_ethtool.c  |  4 +-
 drivers/net/mdio/mdio-mscc-miim.c             |  7 ++
 drivers/net/phy/bcm84881.c                    |  2 +-
 drivers/net/phy/marvell10g.c                  |  2 +-
 drivers/net/phy/mxl-gpy.c                     | 31 +------
 drivers/net/phy/phy-core.c                    | 47 +++++++---
 drivers/net/phy/phy.c                         |  6 +-
 drivers/net/phy/phy_device.c                  | 87 ++++++++++++++++---
 drivers/net/phy/phylink.c                     |  8 +-
 include/linux/phy.h                           | 12 ++-
 10 files changed, 136 insertions(+), 70 deletions(-)
Signature · 1 line
2.30.2