Re: [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access
From: Russell King (Oracle)
Date: Sun Feb 23 2025 - 15:31:28 EST
On Sun, Feb 23, 2025 at 07:37:05PM +0100, Bjørn Mork wrote:
> As for Russel's comments regarding atomic reads, I'm hoping for the
> pragmatic approach and allow all possible features over SMBus. It's not
> like we have the option of using i2c on a host which only supports
> SMBus. My experience is that both hwmon and phy access works pretty
> well with SMBus byte accesses.
The pragmatic approach is to avoid using things that are unsafe (and
thus unreliable.) As I said, disabling hwmon makes sense because you
don't want to read the 16-bit values non-atomically and end up with
scrambled readings that then trigger alarms because they've exceeded
the thresholds.
Merely proving that "oh look it works because I can read stuff"
doesn't address my point.
SMBus being used is as bad as all those crappy SFP modules out there
that don't conform to the SFP MSA but claim they do. It's just yet
another hardware designer cocking the design up in a way that makes
SFPs unreliable. Unfortunately, there's not much that we can do to
influence that, but not publishing stuff that's ultimately unreliable
helps to make the issue known.
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.
All in all, I'm not happy with this, and I do wish hardware designers
would get a clue.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!