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=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, 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 EA971C43381 for ; Thu, 7 Mar 2019 19:02:10 +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 B752720675 for ; Thu, 7 Mar 2019 19:02:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PEFcRS8a"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="J2F7lP/c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B752720675 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=xAKgxuiprlbSOwXBbKXKdNJTj2DAJJhrpZcyJa5UvtY=; b=PEFcRS8a5bLEgD gWfYNLkkQJYco0ZXTYtuJZSMyfanrR9W6ivaCNpD5v/k7l5ngIW0x+oC5dDv6JZ4f1xxlVfKuM4HR YIOwJtn0NjhVZcHvejrOE4C8EgNqKhTJuPReEH6vkMDjAGg2e/PJTdpREefX3ZyAfYYShwL8WvuCd 8t843p+SjjT+Bx71QISxhSXfzLsuRrUdfRADaRuEcDz6U4oaYsxa+z5nT6KMLbqfrQ/pqIGMEexXk r29sNtaHjbRs3rtXin9+dTG7fA1pgwBe6/Pv7j+3NlbJAtmIktp+h++ZzNrtx6dFug1NNa06usMfY vZGC/c7sAhfXhm9ooEyg==; 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 1h1yHI-0003Pc-SW; Thu, 07 Mar 2019 19:02:00 +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 1h1yHE-0003PE-5o for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2019 19:01:59 +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=F4bjl8/FeEaj52Se0UQ5bm8G1ekFpw+Um1qt5l5zmiM=; b=J2F7lP/cLn9+i3/0jkeY2DS56 HP7dUBIFmVIHBTCmD9mvvadpUvnobwc4YKvXMMyH7gJkJltEUx332l+pjbzQgAORS7VdOu2G7ryoq Vgmu0xILfT+0iSHW6NgnIo+nqVjoQ7f28BS1ZDH/CEh92R9D2hA2oMZvKpcCMxFifAgSJCaKTKa7s d9XBr5sJlTghFwcELjw9QYq5UaJ5cHSzDlPU+VV/T1Ho+1S+X71HqaDE8NBkNyle4cNo7yNvQjDO7 JVItkoI+qnM9hn/dZqfhTWmurz2nF4Zum7BuW6WS4CDA+BAGUoxeyOVV5eYWeFba+5SMVLdotQvRt /bk1hQsvA==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:55002) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1h1yH7-0007iS-30; Thu, 07 Mar 2019 19:01:49 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1h1yH4-00057v-P7; Thu, 07 Mar 2019 19:01:46 +0000 Date: Thu, 7 Mar 2019 19:01:46 +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: <20190307190146.d52jtf6ogkrpipk2@shell.armlinux.org.uk> References: <014801d4d121$d2769620$7763c260$@gmail.com> <20190302202629.GB10359@lunn.ch> <20190303024833.GB25169@lunn.ch> <20190303100128.tgq2kvrtyywwmbe4@shell.armlinux.org.uk> <20190303103152.wfefnwe6n6ja6yk5@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190307_110156_493805_5C1C9F39 X-CRM114-Status: GOOD ( 24.13 ) 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 Thu, Mar 07, 2019 at 01:42:42PM -0500, Marc Micalizzi wrote: > > Yes, it never does respond. Just in case -- I'm not sure if there > > would be any change in power state between retries -- I did increase > > T_PROBE_INIT to 3000ms and T_PROBE_RETRY to 1000, but it didn't make > > any difference. > > So I did get 2 more of the same SFP modules, and plugged one into the > macchiatobin, and it looks like it actually does come up eventually. > On plugging it in I still got: > > Mar 6 19:31:24 mbin kernel: [290926.751494] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:24 mbin kernel: [290926.751509] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:24 mbin kernel: [290926.855277] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:24 mbin kernel: [290926.855291] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:24 mbin kernel: [290926.959276] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:24 mbin kernel: [290926.959288] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:24 mbin kernel: [290927.063271] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:24 mbin kernel: [290927.063283] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:24 mbin kernel: [290927.167272] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:24 mbin kernel: [290927.167283] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:24 mbin kernel: [290927.271269] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:24 mbin kernel: [290927.271280] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:25 mbin kernel: [290927.375268] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:25 mbin kernel: [290927.375279] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:25 mbin kernel: [290927.479268] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:25 mbin kernel: [290927.479279] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:25 mbin kernel: [290927.583268] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:25 mbin kernel: [290927.583279] sfp sfp-eth3: failed to > read EEPROM: -6 > Mar 6 19:31:25 mbin kernel: [290927.687278] i2c i2c-1: No device at > other end-- state: 0x4, status: 0x20, addr: 0x50, flags: 0x0 > Mar 6 19:31:25 mbin kernel: [290927.687289] sfp sfp-eth3: failed to > read EEPROM: -6 > > But then just now, I tried ethtool -m eth3, and it returned me the > EEPROM information correctly. After a reboot (without hard power off), > it was also seen right away. I imagine after a hard poweroff it may > take longer again. > > Revisiting some logs posted by someone else from the boot logs from > the Huawei SFP (i think via serial), it appears that the soft EEPROM > takes about 27 seconds to become available, after power-up, which I > had never even left the module plugged for that long, as it was > interrupting internet for my family. > [ 21.388000] GPON SFP I2C Slave Driver, Version 2.2.1 (c) Copyright 2015, LanG > [ 21.404000] [sfp_i2c] vpe code with size <4108 bytes> load! > [ 21.412000] VPE loader: VPE1 running successfully > [ 21.496000] FALC(tm) ON Optic Driver, version 7.5.1.0 (c) Copyright 2015, LaG > [ 21.896000] FALC(tm) ON Base Driver, Version 7.5.1.0 (c) Copyright 2017, Int5 > [ 21.932000] FALC(tm) ON Ethernet Driver, Version 7.5.1.0 (c) Copyright 2017,5 > MIPS: set unaligned_action to 'SHOW' > [ 27.880000] i2c /dev entries driver > [ 27.904000] Custom GPIO-based I2C driver version 0.1.1 > [ 27.916000] i2c-gpio i2c-gpio.0: using pins 37 (SDA) and 38 (SCL) > > > So this leads to the next problem now: ethtool only show and allows > 1000BASE-X with this SFP. > The EEPROM does say it is: > Transceiver type : Ethernet: 1000BASE-LX > Encoding : 0x03 (NRZ) > BR, Nominal : 1200MBd Well, there's a couple of things wrong there to the SFP EEPROM standard (SFF8472): 1. 1000base-X is not "NRZ", it's 8b/10b encoding, so the value in the encoding field is incorrect. 2. 1G speed is 1.25MBaud, which is supposed to be rounded up, so this should be 1300MBd (another illustration of the sloppy nature of these EEPROMs.) There should also be two more fields, which may be: BR margin, max : 0% BR margin, min : 0% If they are, there is no generic way to identify that this module supports 2.5G, and the only possible way we could do so is to explicitly identify the module by the vendor and part number. > However, the module does link at 2500BASE-X as well. > `ethtool -s eth3 speed 2500 duplex full autoneg off` doesn't throw an > error, but doesn't change anything either. > I see `[ 1095.238452] mvpp2x f4000000.ppv22 eth3: reconfig: pm 4->4 > cm 0->c f a->a` in dmesg. > Any suggestions? Since we decide the module doesn't support 2.5G, we won't switch to 2.5G speeds even with an explicit request. That explicit request should have been refused and errored out. > Also, on an unrelated sidenote, I am, and have been, also seeing a > flood of, but not all the time, after a reboot or, disconnect and > reconnect of the fiber, it stops showing up for a while, sometimes. > Bad SFP maybe? It doesn't interrupt my ssh sessions at least... > Mar 7 12:47:42 mbin kernel: [353105.209698] mvpp2x f2000000.ppv22 > eth0: Link is Down > Mar 7 12:47:42 mbin kernel: [353105.209712] mvpp2x f2000000.ppv22 > eth0: Link is Up - 10Gbps/Full - flow control rx The link status is a culmination of several sources, and knowing which source caused it isn't possible without having phylink debug enabled. Can you enable phylink debug by adding "#define DEBUG" at the top of drivers/net/phy/phylink.c and rebuilding please? > Laser output power : 0.6311 mW / -2.00 dBm > Receiver signal average optical power : 0.5401 mW / -2.68 dBm Looks like the module is getting good signal from the other end. Does the other end also report these sporadic link failures too? -- 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