Re: [PATCH net-next v10 6/9] net: phy: phy_port: Store information about a MII port's vacant state
From: Maxime Chevallier
Date: Fri May 15 2026 - 03:30:08 EST
Hi Andrew,
On 5/14/26 15:58, Andrew Lunn wrote:
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.
This is a good point. Even with an error, we should have vacant = false.
TBH I'm unsure how to name this, vacant may not be the best word there, but I'm struggling to find a better term.
maybe "empty" ?
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)
*/
I'll reword this along with the netlink doc. Thank you very very much for the reviews,
Maxime
Andrew