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=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 AD15AC43381 for ; Thu, 14 Mar 2019 11:30:37 +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 7A60720854 for ; Thu, 14 Mar 2019 11:30:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LNrryIzM"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="i3agW8/N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A60720854 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=WjqSqimwfYQKljN9J8zdcHQu/tICFFKEXLs0ZRZD7IU=; b=LNrryIzMzq+oqN U0fNru8jPj4qdN3jd1hBPc7XKUYyKFBucDbs4ybmRQDwh7SJ7vbGTZvPW5ebtz71m/N4LGJxcYVSp H73ZXvtMDYUV31cY23D0TVqZzHsUMl0fbtgV2yTZvI5T2gDA16Le26402PfE/wVrqB7db7Po0mmxO CsoVIIFtAxfbfcucThHl4j/NdjoFVOPElBDGGbY2sElTvO6QjhEeVXqamMmBh1MVI3ZAyU9PV05WS fDxjgocXZ/5F0z25wwe8vgSbWJuOK4NVmOVT4gwG/NduvvDIl+BzCkAhaY+uVSxhFt2hVfII0Hzwf SmOnMhtKYk3whj0ii9PQ==; 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 1h4OZF-00084V-8Q; Thu, 14 Mar 2019 11:30:33 +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 1h4OZB-00083i-9w for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2019 11:30:32 +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=dkVFz+sW2GmWXKlWBjlStZkVS3VhvanXaNIfrNmQu+Y=; b=i3agW8/Nz2cqngWFzoupEw+5d TGkw23IWAWTajPCn3yt6SSY66HJAZnZFpv6ZTqRXu49HfAtGxqdNqVUmLa++qIj02XNByTheEPJZz B7g7vT9+hy27BgSxtVgWLT2HioQhmF/QbxXVccptPcNP907hmUTNgRx/zx8c5zZWLMObTqSNHiseP aiLy0p1ITXj+V82r09UaONGFw1Ulf7GGurZFmywslyTcnUTo55JQCxWjBptU3BDNM0JxuJaw92x7/ UTFGnv0fo7qkjPp+Tckfzqyl2gbv3Si9auQ0j+xb3kLcSXPSVM2bwZ0YtzxfZ7IomfK2J6uhNzS2Y /uDZaSyHw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:51736) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1h4OZ2-0007uQ-0F; Thu, 14 Mar 2019 11:30:20 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1h4OZ0-0002Io-OY; Thu, 14 Mar 2019 11:30:18 +0000 Date: Thu, 14 Mar 2019 11:30:18 +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: <20190314113018.ujni2ji3vvlsmrix@shell.armlinux.org.uk> References: <014801d4d121$d2769620$7763c260$@gmail.com> <20190308110930.g4iqlnwlcbnstqga@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-20190314_043029_516095_83F4119B X-CRM114-Status: GOOD ( 24.06 ) 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: 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 Hi Marc, Sorry I haven't been back to you yet, I've been struggling with some other issues. On Wed, Mar 13, 2019 at 11:45:47AM -0400, Marc Micalizzi wrote: > So for testing I patched sfp-bus.c with the special case for the > module (not sure if the patch would conform to good form for the > kernel or not, but it seems functional)--shows up on ethtool as 2500 > now, and seems to work--but I'm not able to fully test it > unfortunately (so I'm not sure if there would need to be additional > changes to have it working or not). > > ------ > diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c > index ad9db65..079ee5c 100644 > --- a/drivers/net/phy/sfp-bus.c > +++ b/drivers/net/phy/sfp-bus.c > @@ -233,6 +233,11 @@ void sfp_parse_support(struct sfp_bus *bus, const > struct sfp_eeprom_id *id, > phylink_set(modes, 1000baseX_Full); > } > > + if (!memcmp(id->base.vendor_name, "HUAWEI ", 16) && > + !memcmp(id->base.vendor_pn , "MA5671A ", 16)) { > + phylink_set(modes, 2500baseX_Full); > + } > + > bitmap_or(support, support, modes, __ETHTOOL_LINK_MODE_MASK_NBITS); > > phylink_set(support, Autoneg); That is good enough. > ------ > > What I've discovered though, when I went to test it, is while the 2 > SFPs that I bought do come up eventually (between 120-300 seconds or > so after plug/cold boot for the eeprom to be readable, followed by mac > link up), my ISP provided SFP, despite being the same model number and > revision, actually does never come up (or at least not over 10 minutes > or so). No EEPROM read and no mac link up. It does, however, still > work in my server with the modified (to support SC modules and link at > 2500BaseX) bnx2x, and also with ixgbe (albeit not at 2500BaseX). Presumably when the module is plugged into these other cards, it comes up faster, and the EEPROM is readable before the 120-300 seconds it seems to take on the mcbin? Maybe if we knew why it takes that long we may have a clue why the other module never comes up. > I'll see if I can find any useful information off the SFP for figuring > out why one works and the other doesn't, maybe it's a different > software version running on the SFP? But at this point I'm at a bit of > a loss again. Unfortunately, I'd have to have my ISP switch the SLIC > ID to the other SFP to test with it, if they were even willing to, and > then there would be no guarantee that a software update pushed over > OMCI wouldn't break it too. There are two different initialisation scenarios that the SFP specifications permit - powering on/hotplugging with TX_DISABLE asserted (which is what we do) and powering on/hotplugging with TX_DISABLE negated. I really don't want to change to the negated style because it means that an optical modules laser will become active as soon as the module is plugged in, and if you happen to be looking into the module while plugging it in (eg, it's at eye-level height) that wouldn't be good. LED based modules (as opposed to laser modules) aren't a concern of course. If you want to try the "other" style of initialisation, towards the top of sfp_sm_event(), change: if (event == SFP_E_INSERT && sfp->attached) { - sfp_module_tx_disable(sfp); + sfp_module_tx_enable(sfp); sfp_sm_ins_next(sfp, SFP_MOD_PROBE, T_PROBE_INIT); and see whether that makes a difference. -- 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