Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B80F5C43381 for ; Sun, 3 Mar 2019 10:32:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DBF620866 for ; Sun, 3 Mar 2019 10:32:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JBNkxSgA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="ip3aXAXf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DBF620866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZvMkRu3/DmHVLp5xo3X73ZimSfvF5Yg3d07iqMD6+b8=; b=JBNkxSgAyeB8Xh viJ/4c6AuWK2IIET8EOnrLGGyA+etBEhGLOskVlckOrnfFot6yu9H0InDasb1GXkyfMKZm/xcocuZ jeCQj8xD1++x05nsJQMyoqfKtmhsXvmzm4TUlplwVOWHvUHFB00OdLXUZgjy3/t7iQVO/HxfBL7Bj vObfqLQwsjpQLjUZ+OJ3MpvlOnJKJD0f+0aS3RJC3RJIcxbEj0aJt+H6BaGhRsP2mAZizVuQ7LlEw hUl2qJn+pHi7WzWl5A+T9a7GR/sNQ5WyrgzbYupRqrybbmaHry3J4yFr+5JdFfcssHwLlZQt4t9zC A27RhB+Y1A/pWhAh1BOg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0OPb-0000G6-UU; Sun, 03 Mar 2019 10:32:03 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0OPX-0000FQ-Rh for linux-arm-kernel@lists.infradead.org; Sun, 03 Mar 2019 10:32:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9V7jaJBHnswDf/hN7x76akBmHDUvQw67L6gQ/qvyMOY=; b=ip3aXAXfzdIKGNRgcey+Qsqiu r4E1/dszliFm1oDCbjxy/RetjOirtYlKdI8HNhGkgiXKjZBblaGLkmUorJtriCIYK7CK8mQI7z0kA WsQfTLucY+T21h4EiIE9UGOkgb/W3gCiB02Q/ffE8mTmgHZg3B8DSGtoazow02IM66nTJzTmhWvxR r9oxNzU/OMNo06UZOgEX9Vxa2M1Fkw4bfTDZEl3Qxs/QuftohCGIdsw1pKHtpJnsYuxeHiYD0tQC3 7qFSGi5pHIqpmUpTDsIjapfb7UX1MYksrOqeH4q7nGDS4yH8AYSKDmNL69UXetcC5GikWu9JPTd4n 9M7HPXDPA==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:54918) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1h0OPS-00043c-DJ; Sun, 03 Mar 2019 10:31:54 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1h0OPR-0001QF-4f; Sun, 03 Mar 2019 10:31:53 +0000 Date: Sun, 3 Mar 2019 10:31:53 +0000 From: Russell King - ARM Linux admin To: Marc Micalizzi Subject: Re: MacchiatoBin SingleShot 2500BASE-X port (eth3) with GPON SFP on mvpp2x Message-ID: <20190303103152.wfefnwe6n6ja6yk5@shell.armlinux.org.uk> References: <014801d4d121$d2769620$7763c260$@gmail.com> <20190302202629.GB10359@lunn.ch> <20190303024833.GB25169@lunn.ch> <20190303100128.tgq2kvrtyywwmbe4@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190303100128.tgq2kvrtyywwmbe4@shell.armlinux.org.uk> User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190303_023159_899725_BEB50323 X-CRM114-Status: GOOD ( 18.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Mar 03, 2019 at 10:01:28AM +0000, Russell King - ARM Linux admin wrote: > The original report is that it _never_ responds on the I2C bus when > plugged into the Macchiatobin, but it does when plugged into other > systems. > > Thinking a little more about this, this morning, I've remembered that > there's the pull-up resistor issue on the Macchiatobin, which are way > too strong. (IMHO, even the reworked boards are out of spec for SFP > modules.) > > There are two very small resistor packs (8 pin black devices with > three digits on the top) labelled RN3001 and RN3004 near the reset > button. They're directly next to the PCA9548 I2C multiplexer U44. > The three digits will be either with 222 or 112 - please can you > check which they are? The following patch should avoid endlessly trying to probe the module, eventually dropping into error state when all retries are exhausted. I have one module where there the I2S lines are not wired (it's a Metanoia VDSL module) but it's also unresponsive over Serdes, and the information for it is not available. It's been a while since I tested with that module, but I have replaced the last "SFP_MOD_ERROR" below with "SFP_MOD_PRESENT" so we believe that the module is present. 8<==== From: Russell King Subject: net: sfp: avoid endlessly retrying SFP module probe Rather than endlessly retrying to probe a SFP module, place a limit of ten tries (each attempted at 100ms intervals) before deciding that the module is unresponsive, and dropping into error state. This leads to a maximum of 1s after insertion for the EEPROM to become readable. There have been reports that endlessly retrying eventually leads to RCU lockups - although given that we run these in a workqueue and relinquish the CPU between attempts (which are triggered by a timer) it's hard to see why the RCU lockups are happening. Signed-off-by: Russell King --- drivers/net/phy/sfp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 024578a81112..9a3be348d791 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -1745,6 +1745,7 @@ static void sfp_sm_event(struct sfp *sfp, unsigned int event) if (event == SFP_E_INSERT && sfp->attached) { sfp_module_tx_disable(sfp); sfp_sm_ins_next(sfp, SFP_MOD_PROBE, T_PROBE_INIT); + sfp->sm_retries = 10; } break; @@ -1760,8 +1761,10 @@ static void sfp_sm_event(struct sfp *sfp, unsigned int event) sfp_sm_ins_next(sfp, SFP_MOD_HPOWER, val); else if (val != -EAGAIN) sfp_sm_ins_next(sfp, SFP_MOD_ERROR, 0); - else + else if (--sfp->sm_retries) sfp_sm_set_timer(sfp, T_PROBE_RETRY); + else + sfp_sm_ins_next(sfp, SFP_MOD_ERROR, 0); } break; -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel