Re: [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access
From: Maxime Chevallier
Date: Mon Feb 24 2025 - 04:36:27 EST
On Mon, 24 Feb 2025 08:47:18 +0000
"Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx> wrote:
> On Mon, Feb 24, 2025 at 08:13:22AM +0100, Bjørn Mork wrote:
> > Andrew Lunn <andrew@xxxxxxx> writes:
> >
> > >> So, not only do I think that hwmon should be disabled if using SMBus,
> > >> but I also think that the kernel should print a warning that SMBus is
> > >> being used and therefore e.g. copper modules will be unreliable. We
> > >> don't know how the various firmwares in various microprocessors that
> > >> convert I2C to MDIO will behave when faced with SMBus transfers.
> > >
> > > I agree, hwmon should be disabled, and that the kernel should printing
> > > a warning that the hardware is broken and that networking is not
> > > guaranteed to be reliable.
> >
> > What do you think will be the effect of such a warning? Who is the
> > target audience?
> >
> > You can obviously add it, and I don't really care. But I believe the
> > result will be an endless stream of end users worrying about this scary
> > warning and wanting to know what they can do about it. What will be
> > your answer?
>
> ... which is good, because it raises the visibility of crap hardware
> and will make people think twice about whether to purchase it, thus
> penalising (a little) the sales of badly designed hardware.
It's also going to allow users to understand a bit more why all
features aren't available. Plugging modules in a true i2c connected
cage will report all the features, while plugging on an smbus cage will
cause the use of a degraded mode. Not only for hwmon, but as Russell
specifies, I doubt all SFP PHY will behave exactly the same...
I'll respin without hwmon and with the warning then.
Maxime