Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4456540pxb; Tue, 5 Oct 2021 03:35:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJhPDF+QN9x3qTqh1d8ChPqduD9A/GyBQgZ4XiwU0vu4Ku1Ozu6Bbds985qmVeCA6Da0qi X-Received: by 2002:a17:906:5d6:: with SMTP id t22mr24128838ejt.98.1633430112560; Tue, 05 Oct 2021 03:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633430112; cv=none; d=google.com; s=arc-20160816; b=oVwQEse/kBE616N6Pt+9bHaW3NjWlNcGNaaxiPtdcrkVvh9IiPNQXjMDS9I2xWr7MO bou8lo6Tpg3RS6kwUoMz2gdHU6/xv0z2XCs+qe2r0fSaEEES/Lfi3gu4SI3K1aRt1VMj wM2hBMFXQmCbdiZG5AwEM50gOt1Qxv1IXai7v3/8O9IYetzj7yQBaJevrWvMKu0olltY dT3kauscOYv8wiHuts1cVK7M+HgRDosEaGo1X7MAveKKVvtvwRlWsef+PvgTr/WTWuPy 1LGQTtHybYEJ2JIIaDdhXNi+UJX/8oYYAtxk3kIHXfGcF3s/KG9G2dCupDSZWs3XKAXN 6oCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kT0Hjr/F9NQrOS6/YDbtKD9/7NDOpyJOJCXmfpl4TQY=; b=T+6udLX8bj4OyrHszMjQkFugsbIYbDmaPDFvPOYjFJ3x/fPcdQ+3ZHsPZrlQ3vBCMp W8RynWsjtuHyt/0mlAfjekcLiSSUrysOw5qJWZIgsSM7ZKaFSCCkIyk1bLTMfy68Ah/q iAEy4/g6ScR80YyGQZDtx3kAgxFMnaQPbN9PdDfsV3Pgc5gys6+K6i/2m0DnKuH/rXFC R/CnALZDGnShrWi6qmin4uwPI5c4Uyuc3jkqdv1hCf2EKdRW3B52cLA1UWXG4E8sNgvO Slec/n/7/kZhJh1jqoBJzJ2w2v+7/e/vuKCoEGghCWzcbjRUwtLTnxto3CNBPsYSphMM lvTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=sAozXbhw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si4026366edv.125.2021.10.05.03.34.48; Tue, 05 Oct 2021 03:35:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=sAozXbhw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233966AbhJEKfU (ORCPT + 99 others); Tue, 5 Oct 2021 06:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233490AbhJEKfT (ORCPT ); Tue, 5 Oct 2021 06:35:19 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 009B4C06161C; Tue, 5 Oct 2021 03:33:28 -0700 (PDT) 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=kT0Hjr/F9NQrOS6/YDbtKD9/7NDOpyJOJCXmfpl4TQY=; b=sAozXbhwy6ljtDTsQq6amThNlY HnVkHvaEeJCEe0cJDtdlEe1tzejoJP4C5YZ8ndryKD7f78Tg/fxa1C34ciWHUZEjHpCVeLfHaTXyT 36fnMw6UtlydkRd8fT1FXHgZ9n9NavNLrusL09kYe1OU+bRvvKatFQkGrLCyHpS7a6Gi1aFAyKeLr SI9gaL5EulVjCI+MM2EUbOgL/Ab1K/AihTz+QYIi5b7Q69A7pQ5AFioocV5gRxUXp93Nnh0pPwq1i DQpQksVuweSFVnOmT9U1cqBMgT3/G1hfueSiYDMnchwfpnsx+c1rJr8VhbVnpFWJzr+ZyKAQzDzrD aiC3/jzA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54954) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mXhlG-000095-Lh; Tue, 05 Oct 2021 11:33:26 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mXhlF-0008OZ-L9; Tue, 05 Oct 2021 11:33:25 +0100 Date: Tue, 5 Oct 2021 11:33:25 +0100 From: "Russell King (Oracle)" To: Sean Anderson Cc: netdev@vger.kernel.org, "David S . Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, Andrew Lunn , Heiner Kallweit Subject: Re: [RFC net-next PATCH 16/16] net: sfp: Add quirk to ignore PHYs Message-ID: References: <20211004191527.1610759-1-sean.anderson@seco.com> <20211004191527.1610759-17-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211004191527.1610759-17-sean.anderson@seco.com> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 04, 2021 at 03:15:27PM -0400, Sean Anderson wrote: > Some modules have something at SFP_PHY_ADDR which isn't a PHY. If we try to > probe it, we might attach genphy anyway if addresses 2 and 3 return > something other than all 1s. To avoid this, add a quirk for these modules > so that we do not probe their PHY. > > The particular module in this case is a Finisar SFP-GB-GE-T. This module is > also worked around in xgbe_phy_finisar_phy_quirks() by setting the support > manually. However, I do not believe that it has a PHY in the first place: > > $ i2cdump -y -r 0-31 $BUS 0x56 w > 0,8 1,9 2,a 3,b 4,c 5,d 6,e 7,f > 00: ff01 ff01 ff01 c20c 010c 01c0 0f00 0120 > 08: fc48 000e ff78 0000 0000 0000 0000 00f0 > 10: 7800 00bc 0000 401c 680c 0300 0000 0000 > 18: ff41 0000 0a00 8890 0000 0000 0000 0000 Actually, I think that is a PHY. It's byteswapped (which is normal using i2cdump in this way). The real contents of the registers are: 00: 01ff 01ff 01ff 0cc2 0c01 c001 000f 2001 08: 48fc 0e00 78ff 0000 0000 0000 0000 f000 10: 0078 bc00 0000 1c40 0c68 0003 0000 0000 18: 41ff 0000 000a 9088 0000 0000 0000 0000 It's advertising pause + asym pause, 1000BASE-T FD, link partner is also advertising 1000BASE-T FD but no pause abilities. When comparing this with a Marvell 88e1111: 00: 1140 7949 0141 0cc2 05e1 0000 0004 2001 08: 0000 0e00 4000 0000 0000 0000 0000 f000 10: 0078 8100 0000 0040 0568 0000 0000 0000 18: 4100 0000 0002 8084 0000 0000 0000 0000 It looks remarkably similar. However, The first few reads seem to be corrupted with 0x01ff. It may be that the module is slow to allow the PHY to start responding - we've had similar with Champion One SFPs. It looks like it's a Marvell 88e1111. The register at 0x11 is the Marvell status register, and 0xbc00 indicates 1000Mbit, FD, AN resolved, link up which agrees with what's in the various other registers. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!