Page MenuHomeFreeBSD

etherswitch/e6000sw: probe as an FDT device via new mdio_fdt(4) flavour
Needs ReviewPublic

Authored by jhibbits on Aug 26 2026, 3:02 AM.
Tags
None
Referenced Files
F173594819: D59189.id.diff
Sun, Sep 27, 1:51 AM
F173539243: D59189.diff
Sat, Sep 26, 5:17 PM
Unknown Object (File)
Fri, Sep 25, 11:20 PM
Unknown Object (File)
Thu, Sep 24, 1:33 PM
Unknown Object (File)
Thu, Sep 24, 1:33 PM
Unknown Object (File)
Thu, Sep 24, 1:33 PM
Unknown Object (File)
Wed, Sep 23, 9:19 PM
Unknown Object (File)
Mon, Sep 21, 8:41 AM
Subscribers

Details

Reviewers
adrian
Summary

e6000sw's probe was doing far too much: it walked OF_finddevice("/")
looking for a "marvell,mv88e6085" or "marvell,mv88e6190" node
anywhere in the tree, filled in most of the softc, spun up a
throwaway sx lock just to read SWITCH_ID over MDIO,
port-count / phy-base from the ID. Any board with FDT enabled ran
all of that whether or not it had a Marvell switch on a given MDIO
device.

Split the work along the usual newbus boundary:

  • Make e6000sw_probe() the trivial probe that it should be, moving the meat into e600sw_attach() where it belongs.
  • e6000sw_attach() updates the description after it determines the device in setup.
  • e6000sw_identify() skips FDT parents; on hint-only builds it still adds the wildcard child as before.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76183
Build 73066: arc lint + arc unit