Skip to content

net: enetc: remove bootloader dependency

Michael Walle lkml netdev 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 1 replyIn review
  2. v64 patches 13 repliesSuperseded
  3. v54 patches 2 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v43 patches3 repliesSuperseded
v3 posting 2/23 patches6 repliesSuperseded
v3 posting 1/23 patches3 repliesSuperseded
v22 patches3 repliesSuperseded

Changes in v7 from the cover letter

- dropped _LPA_ infix for USXGMII constants

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: phy: add USXGMII link partner ability constantsinclude/uapi/linux/mdio.h+26 -00 replies
2/4net: dsa: felix: (re)use already existing constantsdrivers/net/dsa/ocelot/felix_vsc9959.c+12 -330 replies
3/4net: enetc: Initialize SerDes for SGMII and USXGMII protocolsdrivers/net/ethernet/freescale/enetc/enetc_hw.h drivers/net/ethernet/freescale/enetc/enetc_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.h+140 -00 replies
4/4net: enetc: Use DT protocol information to set up the portsdrivers/net/ethernet/freescale/enetc/enetc_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.h+34 -260 replies

Reviews trailers per patch

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

PatchRussell KingClaudiu ManoilVladimir Oltean
1/4R-b
2/4T-b
3/4R-b T-b
4/4T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH net-next v7 0/4] net: enetc: remove bootloader dependency

These patches were picked from the following series:
https://lore.kernel.org/netdev/[email protected]/
They have never been resent. I've picked them up, addressed Andrews comments, fixed some more bugs and asked Claudiu if I can keep their SOB tags; he agreed. I've tested this on our board which happens to have a bootloader which doesn't do the enetc setup in all cases. Though, only SGMII mode was tested.

changes since v6:
- dropped _LPA_ infix for USXGMII constants

changes since v5:
- fixed pcs->autoneg_complete and pcs->link assignment. Thanks Vladimir.

changes since v4:
- moved (and renamed) the USXGMII constants to include/uapi/linux/mdio.h. Suggested by Russell King.

changes since v3:
- rebased to latest net-next where devm_mdiobus_free() was removed. replace it by mdiobus_free(). The internal MDIO bus is optional, if there is any error, we try to run with the bootloader default PCS settings, thus in the error case, we need to free the mdiobus.

changes since v2:
- removed SOBs from "net: enetc: Initialize SerDes for SGMII and USXGMII protocols" because almost everything has changed.
- get a phy_device for the internal PCS PHY so we can use the phy_ functions instead of raw mdiobus writes
- reuse macros already defined in fsl_mdio.h, move missing bits from felix to fsl_mdio.h, because they share the same PCS PHY building block
- added 2500BaseX mode (based on felix init routine)
- changed xgmii mode to usxgmii mode, because it is actually USXGMII and felix does the same.
- fixed devad, which is 0x1f (MMD_VEND2)

changes since v1:
- mdiobus id is '"imdio-%s", dev_name(dev)' because the plain dev_name() is used by the emdio.
- use mdiobus_write() instead of imdio->write(imdio, ..), since this is already a full featured mdiobus
- set phy_mask to ~0 to avoid scanning the bus
- use phy_interface_mode_is_rgmii(phy_mode) to also include the RGMII modes with pad delays.
- move enetc_imdio_init() to enetc_pf.c, there shouldn't be any other users, should it?
- renamed serdes to SerDes
- printing the error code of mdiobus_register() in the error path
- call mdiobus_unregister() on _remove()
- call devm_mdiobus_free() if mdiobus_register() fails, since an error is not fatal
Alex Marginean (1):
net: enetc: Use DT protocol information to set up the ports

Michael Walle (3):
net: phy: add USXGMII link partner ability constants
net: dsa: felix: (re)use already existing constants
net: enetc: Initialize SerDes for SGMII and USXGMII protocols

 drivers/net/dsa/ocelot/felix_vsc9959.c        |  45 ++---
 .../net/ethernet/freescale/enetc/enetc_hw.h   |   3 +
 .../net/ethernet/freescale/enetc/enetc_pf.c   | 188 +++++++++++++++---
 .../net/ethernet/freescale/enetc/enetc_pf.h   |   5 +
 include/uapi/linux/mdio.h                     |  26 +++
 5 files changed, 210 insertions(+), 57 deletions(-)
Signature · 1 line
2.20.1