Re: [PATCH net-next] mctp i2c: add sysfs control for mux child netdevs

From: Jeremy Kerr

Date: Tue Oct 13 2026 - 03:07:21 EST


Hi Kenny,

> An MCTP netdev is created for an I2C bus that carries an
> "mctp-controller" property in the devicetree. A bus instantiated at
> runtime through the I2C sysfs interface has no devicetree node on which
> to set that property, so it can never get a netdev.
>
> This matters for a mux topology that is only known at runtime. A BMC
> that ships one firmware image across several chassis cannot describe
> every chassis's mux tree in its devicetree. Userspace creates the muxes
> it finds over i2c sysfs instead, and the channels below them have no
> node of their own.
>
> Add a writable "mctp_controller" attribute on mux child adapters below
> a bus that has an mctp-i2c-controller device bound to it. A mux tree
> with no such device is untouched. Writing 1 creates the netdev for that
> bus, writing 0 removes it, and reading reports whether one exists.
> Userspace can then enable MCTP per channel once it has created the
> muxes.

More a request than a review: since you're going to the trouble of
allowing dynamic MCTP devices on mux subordinates, would it be possible
to also allow this for the root controllers as well?

The use-case I have is dynamic I2C devices - say USB-attached - that do
not have any facility for DT configuration. The proposed sysfs property
could allow runtime configuration for those too.

Cheers,


Jeremy