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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 E9A34C43381 for ; Sun, 3 Mar 2019 02:48:44 +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 AABF220838 for ; Sun, 3 Mar 2019 02:48:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qtwziQPR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="GjjYxjTZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AABF220838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch 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=5UBkT4LrOiws/JTrukv+6KryZDCPH+WyavSl8IBAizs=; b=qtwziQPRN5stA0 TAT2pm1fNM9DSN3h8N409GxSXzdKxHQCsMBMHoJwgpM0EsaV8dQE+N27RhoDnwwpOObdDo5lzDz0J pX8zuiaptb3FG/Ve2P9Y/lXRY/35P5M4pdAyZmwMYKgJPxbEIQxFM/H/2T09cdLT/Hi8Vg7Xs5e1k 8PN4N9qCh423eS0MGbRdUHFTSwkNawlqz6BaEXt7uCI86k5EZoR0n/2a3rJUXq6QDk/7wgxOEbxXV HM6psdezjRZK86LndgmVg9dHSGLiDYjdJQ0/FgOEKNE0JRRl3v+buLYTgEMjKvJ9RyF0jskTkejv1 lCvXRd6pavmjXq11kNlA==; 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 1h0HB9-0001Oa-Ss; Sun, 03 Mar 2019 02:48:39 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0HB6-0001Nu-8y for linux-arm-kernel@lists.infradead.org; Sun, 03 Mar 2019 02:48:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender: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=Rh1hgyei6+CWcVAMvfI04t34kaPQZYc59kHLKLLS6NM=; b=GjjYxjTZAw8G/r6xahC8dU4bKs UDIaosp6RuONXLj+1fTZu5V9CRGtIDz3CHRT8lToT8tajh8ftvlqnKGjRE3kfjfqgt3DlYN4j4TzS pFtp973xnQ7usCldzpl5dkBIWSip32UdxE7wqovFqmzNlZIUoV30v8AalYixndCJm3w0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1h0HB3-0007fm-Dk; Sun, 03 Mar 2019 03:48:33 +0100 Date: Sun, 3 Mar 2019 03:48:33 +0100 From: Andrew Lunn To: Marc Micalizzi Subject: Re: MacchiatoBin SingleShot 2500BASE-X port (eth3) with GPON SFP on mvpp2x Message-ID: <20190303024833.GB25169@lunn.ch> References: <014801d4d121$d2769620$7763c260$@gmail.com> <20190302202629.GB10359@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190302_184836_461416_433E36D0 X-CRM114-Status: GOOD ( 16.61 ) 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 On Sat, Mar 02, 2019 at 09:17:56PM -0500, Marc Micalizzi wrote: > On Sat, Mar 2, 2019 at 3:26 PM Andrew Lunn wrote: > > I've received reports that some GPON SFPs don't like block reads of > > their i2c bus. You have to do 16bit word reads. > > > > There was a patch a while ago to deal with i2c bus drivers which could > > also not handle big block transfers: > > > > https://www.spinics.net/lists/netdev/msg546524.html > > > I looked into that patch, and after doing a bit of investigation in to > where it's actually failing, I'm not sure it would make any > difference. I added a debug message in i2c_mv64xxx.c > mv64xxx_i2c_fsm(), which is where my -6 ENXIO is originating from, > immediately after the fallthrough for > MV64XXX_I2C_STATUS_MAST_WR_ADDR_NO_ACK (on line 314), and that > provided me with: > ```i2c i2c-1: No device at other end-- state: 0x4, status: 0x20, addr: > 0x50, flags: 0x0``` This fits with your comment about it taking a bit of time to boot before it starts answering on the i2c bus. You might want to play with the value of T_PROBE_INIT in drivers/net/phy/sfp.c. The driver will keep trying to talk to the SFP, but it waits 300ms before making its first try, and then retries every 100ms. Maybe a longer first wait will help. At the moment, you need to play around and see if you can make it reliable. Once you know what to do to make it reliable, we can figure out a clean way to implement it. > I am going to see if I can get my hands on a second GPON SFP of the > same make and model somehow, so at the very least I don't have to > bring my internet down for my family every single time I want to test > something. Yes, buy one to use and a second one to hack on :-) Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel