Re: [PATCH net-next v10 6/9] net: phy: phy_port: Store information about a MII port's vacant state

From: Andrew Lunn

Date: Thu May 14 2026 - 10:00:26 EST


> We have information about what MII they can handle, however we don't
> store anything about whether they are currently connected to an SFP
> module or not. As phy_port aims at listing the front-facing ports, let's
> store an "vacant" bit to know whether or not a MII port is currently
> vacant (i.e. there's no module in the SFP cage), or not (i.e.
> there's an SFP module).

vacant == False actually means a bit more than there is a module in
the cage. It also means that, so far, we have not had any errors
trying to use the module. If there is an error, we might have a module
physically in the cage, but vacant == True.

We should be careful with the wording, both in the commit message, and
here:

> + * @vacant: For MII ports, indicates whether or not the port has a connection to
> + * another device (e.g. for SFP ports, indicates the absence or presence
> + * of an SFP module)
> */

Andrew