mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Patrick <gregspatrick@hotmail.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Manuel Stocker <mensi@mensi.ch>
Subject: Re: [PATCH net-next v2] net: phy: sfp: detect presence via I2C when no MOD_DEF0 GPIO
Date: Thu, 11 Jun 2026 17:54:44 +0000	[thread overview]
Message-ID: <20260611175444.2223563-1-gregspatrick@hotmail.com> (raw)
In-Reply-To: <399497f5-ab96-4a8c-81ef-d3c4588fe341@bootlin.com>

Hi Maxime,

Thanks for the review.

> I'm genuinly wondering if 2s for this isn't too slow. With a 4s total
> including the retry, this definitely leaves time for a user to swap the
> module with another different one, and we wouldn't see the hotswap from
> linux here, leading to very interesting problems. I think we need a
> faster removal-detection time.

Agreed. v3 drops the re-probe interval to 500ms and keeps a 3-failure
debounce, so removal is detected in ~1.5s instead of ~4s, while still
riding out a transient I2C error on a live module:

  https://lore.kernel.org/netdev/20260611175341.2223184-1-gregspatrick@hotmail.com/

I've now validated v3 on the hardware (it's running from flash). Some real
numbers from physically pulling/inserting modules:

 - Insertion into a cage that was empty at boot: detected and linked in ~1s.
 - Removal, clean pull: 1.2-1.5s (the design floor, 3 x 500ms).
 - Removal, slow manual extraction: 2.6-3.5s. A human sliding a module out
   chatters the I2C contacts (intermittent ACKs), and the 3-NAK debounce
   deliberately rides that out rather than false-flagging the live link.
   Tightening the debounce below this trades directly against spurious
   removals on a good link, so I've kept it where it reliably never flapped.

On the same-cage swap-to-a-different-module-within-the-window case you
raised: that one is inherent to a polled scheme with no presence edge - we
can narrow the window but not close it without a readable MOD_ABS line,
which this hardware doesn't have. I've noted it as a known limitation in
the commit.

Manuel Stocker independently confirmed the I2C-presence mechanism on a
second board (Horaco ZX-SW82TS-L2P, RTL9302D); his Tested-by is carried on
v3.

No rush at all on your end - whenever you get a chance to try it is
appreciated.

Thanks,
Greg

      reply	other threads:[~2026-06-11 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 15:16 Greg Patrick
2026-06-10  0:07 ` Jakub Kicinski
2026-06-10  7:30 ` Maxime Chevallier
2026-06-11 17:54   ` Greg Patrick [this message]

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=20260611175444.2223563-1-gregspatrick@hotmail.com \
    --to=gregspatrick@hotmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mensi@mensi.ch \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®