netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: "Maxime Chevallier" <maxime.chevallier@bootlin.com>,
	davem@davemloft.net, "Andrew Lunn" <andrew@lunn.ch>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Köry Maincent" <kory.maincent@bootlin.com>,
	"Simon Horman" <horms@kernel.org>,
	"Romain Gantois" <romain.gantois@bootlin.com>,
	"Antoine Tenart" <atenart@kernel.org>,
	"Marek Behún" <kabel@kernel.org>
Subject: Re: [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access
Date: Sun, 23 Feb 2025 20:31:01 +0000	[thread overview]
Message-ID: <Z7uFhc1EiPpWHGfa@shell.armlinux.org.uk> (raw)
In-Reply-To: <87r03otsmm.fsf@miraculix.mork.no>

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!

  reply	other threads:[~2025-02-23 20:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-23 17:28 [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access Maxime Chevallier
2025-02-23 17:28 ` [PATCH net-next 1/2] net: phy: sfp: Add support for SMBus module access Maxime Chevallier
2025-02-23 17:28 ` [PATCH net-next 2/2] net: mdio: mdio-i2c: Add support for single-byte SMBus operations Maxime Chevallier
2025-02-24  3:36   ` Andrew Lunn
2025-02-24 10:03     ` Maxime Chevallier
2025-02-23 17:40 ` [PATCH net-next 0/2] net: phy: sfp: Add single-byte SMBus SFP access Russell King (Oracle)
2025-02-23 17:48   ` Maxime Chevallier
2025-02-25 12:38   ` Bjørn Mork
2025-02-25 13:06     ` Maxime Chevallier
2025-02-25 13:29       ` Andrew Lunn
2025-02-25 17:15     ` Russell King (Oracle)
2025-02-25 18:07       ` Bjørn Mork
2025-02-25 18:40         ` Russell King (Oracle)
2025-02-23 18:37 ` Bjørn Mork
2025-02-23 20:31   ` Russell King (Oracle) [this message]
2025-02-24  3:32     ` Andrew Lunn
2025-02-24  7:13       ` Bjørn Mork
2025-02-24  8:47         ` Russell King (Oracle)
2025-02-24  9:35           ` Maxime Chevallier
2025-02-24 13:31         ` Andrew Lunn
2025-02-24 13:48           ` Russell King (Oracle)
2025-02-24 14:18             ` Andrew Lunn
2025-02-24 14:32             ` Marek Behún
2025-02-24 14:38               ` Russell King (Oracle)
2025-02-24 16:24             ` Maxime Chevallier
2025-02-25  8:08               ` Maxime Chevallier
2025-02-24  9:38   ` Maxime Chevallier
2025-02-24 10:36     ` Marek Behún
2025-02-24 16:30 ` Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z7uFhc1EiPpWHGfa@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=kabel@kernel.org \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=romain.gantois@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).