From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7D2048A2C4 for ; Thu, 11 Jun 2026 17:54:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781200488; cv=none; b=Qw4yzTx4pBw0d0OOYGxOG0EuSxtXxcq0k7KvSaOZ54XHzx53PdlJ6/SDIpAI2AB9QfWdcfBqkmkADbYODAfnYPZRBw41ApnCrr138bAriDy1m6WCVYg4otK0qxs/hxp6yYX+DMgzBboCplXyjMdgrcY/R5SaA5soRDuY75BjqMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781200488; c=relaxed/simple; bh=N3qMiFXWa3P4vzXQt0vNb0DSrMF+54zK+S61h7juR2k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ai0U1FW1fR9uvAvlG05gnHP1kFTZNPfQDJhL7SxQ+aadnFAXfLVUEbpTbGpMFc3IHsWlWmcjgkgvrDM2RlXaaCqw7OlJpulMr+TwIkEpr2i6XfhhZAELPXt/00/0nO7t6Yd9DMts6DGUMUcHHMwI/XPVTF7K9YhGY/OGdsYKytU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=hotmail.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.219.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=hotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-8ce0f17a69cso1416776d6.0 for ; Thu, 11 Jun 2026 10:54:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781200486; x=1781805286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=A3MyD5sgrCXG8g8emQHBeewZ1qL+fszaeWMzfNzWpns=; b=DB+VxFXOHlf86jN2Ygty8C6BiMA3vSlVjr4cZMvYvGHdaLpt0nWncCAH9HrHgGLFfv mw+8eU9LY6HsqjTxyYBQP34owSd1l89vH/qOdE1OMqk5iwmnEwN8VZZj4TRCHPXg6DId bwL62cimJvk3JGBBPdmFafJ1h/jYPK8gCZTNSP8S7aOx9NDgu8QHW3YRtkqBIUNNgrHn gSEn/K3tYUmTAqRrTV3KeIKpLR1/aosaxtgo7fnVKVUbiNuwKQKfK/NOfFqz9Q7YsR+m KUsW5be54I55I3GlHwlLgwsUnO7l48m2XW9MVGUN3/Ergifd4F0DGJTVhYx/6eEWl4iw UHmg== X-Forwarded-Encrypted: i=1; AFNElJ+WVoxFqRhJd7rq5kOp+rdfU29IK+5EzIbgvuxHBOj3XFoYnHnOZsofjV4kHfXgpVQWsu1ZwvGbpVafKV8=@vger.kernel.org X-Gm-Message-State: AOJu0YyqcZayT8coiiFfNBNLmQEenvj0mItHBu4LBJVSbDEEcMH/tsYm QkPZzY6qhmarMtCmA6YOLbdYU2ZUPIj/CXhMLNAdIR9NQNMoV9K/X8J1 X-Gm-Gg: Acq92OGQYVOqqrJYrdKnX0+IzcwAoqC+4jQbg3cijtUFURsNHWo11xO2Nr0RC7XY3No P/gz9qP3iVbAIeCzvWYIcaDnzDu7U1iE2ez1tGyXmTAvs1R7ZwcpnqIRklUZZ4Wscrbf65E1nEb aBNFSXqeQzHgg0Puy5m+tpyhoV5/EmsssxBK0oAgTkDcvakRfH3IaT/2fNUnFmZ01gVFIVTtBzS pa9YusDiNBYzdxG1/DdnEkI/WPGNBS+5ebKL+dJSkhpPqu3aIC4Y9kI1XbUNH3sV7rCIZlS2H9T zir+XNcrXiPSiRBOtGGGCmGrbOA+4FekAYhleIxhRXlzPGzmtFma6yltlSTTAig3meB6P1HQouu 8IUkFiTJYD5/s7oWZ8mV8p9X4Z3PYE7hS99WQ1pSpHsze+fvLk9DcyGHroH4+DLwJhH45SrleHm IjvNkNcLfHVGqWazOGg316S7OATs9TEHDHhs92+cZIIL9A8TMZEqECFZw1Rc4MsfTrLsHPyjCxg 6z/S8S3u1jG7f12ipzu8Q== X-Received: by 2002:ad4:574b:0:b0:8ca:1cee:7c5a with SMTP id 6a1803df08f44-8d1d7f63589mr64073926d6.12.1781200485513; Thu, 11 Jun 2026 10:54:45 -0700 (PDT) Received: from lxc-docker-tertiary.local (pool-108-45-26-115.washdc.fios.verizon.net. [108.45.26.115]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8d1ea7c0d98sm24121476d6.31.2026.06.11.10.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 10:54:45 -0700 (PDT) From: Greg Patrick To: Maxime Chevallier Cc: Russell King , Andrew Lunn , Heiner Kallweit , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manuel Stocker 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 Message-ID: <20260611175444.2223563-1-gregspatrick@hotmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <399497f5-ab96-4a8c-81ef-d3c4588fe341@bootlin.com> References: <399497f5-ab96-4a8c-81ef-d3c4588fe341@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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