HomeFreeBSD

Make miibus(4) fully ifnet(9) agnostic, removing layering violation.

Description

Make miibus(4) fully ifnet(9) agnostic, removing layering violation.

This allows to mii_attach() in drivers prior to if_attach(), but on the
other hand puts some extra work on drivers.

Drivers now should:

  • Do mii_attach() before if_attach().
  • Do baudrate management theirselves in miibus_statchg devmethod.
  • Do link state management theirselves in miibus_linkchg devmethod.

Some PHYs require to obtain MTU of the interface. Instead of doing it
via ifnet(9) layer, provide new miibus method miibus_readvar. Drivers
that expect such PHYs must implement this method and return IF_MTU.

Sponsored by: Nginx, Inc.

Details

Provenance
glebiusAuthored on
Parents
rS277120: Make COMPAT_LINUX compilable with new ifnet(9) code.
Branches
Unknown
Tags
Unknown

Event Timeline