From patchwork Fri Jul 21 06:00:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raju Lakkaraju X-Patchwork-Id: 123580 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp4411vqg; Thu, 20 Jul 2023 23:26:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGSxiAJxPilIXXPjna4ck5TnI6cfPmZ+rDBT26/Yv3sSV8Vtd+zGKcw9hJL9yIImmRODUaZ X-Received: by 2002:a17:903:1106:b0:1bb:1e69:28be with SMTP id n6-20020a170903110600b001bb1e6928bemr1199496plh.42.1689920818628; Thu, 20 Jul 2023 23:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689920818; cv=none; d=google.com; s=arc-20160816; b=QE+NSVX3pPF6gB4w98d2B9my74ZL3D1yFkpRwdGA10KaxR+OJNDxAU6PACcrqlVis/ F4XpCNzJ037gLdLsUqquIY2kN1zMEPlH1tw3WVFsjCL591og8NwGZLTHc7gAbJrfHnsO I5IwJUTudxu+yyLOGYwSmGJ20SRIqhTXH7zWW3q65ZmBk3GjrZesLPgmanAZ//1EmGs/ D4t+gf2d4Fq82AOPcd6+xSecgynGL9sP8RJ1viZ6W01GW+2s3tBsq9MpzqbJ1hSVYyds h+OZaR2pSAyQ4uWcQhwwzqmjJnMN09NHhs9MFj7r68gVcdpLnyYWMOvqASWe0jDfMSXY Usaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HHGayFUryZQyvWE933K9mbkd7xTvCEtDh0CCk701nqs=; fh=RBaypeXNm7gQwotTf4laopALbRVHhyEi3OQcUIEQoDY=; b=CFmofBNrFh4kCA9UyIgneJinmkdErkAkL0eTQqpM6PDZ5rhkQTVI6aTLcfr09BVP59 h5qWrDMrp4xwo++wIfN9kJjOYMlUbdG5dVReehJuBl9ldm1Rt05X9rS+vdOYEi9weQAB QfeCtbHO+IlkFv5yhpT8+MybVrOtZFLJoYfdJavnRLrphPXjZvDJhYB/yovqahugsNvS bpLDOj1lcvvS8OdqnJtokKUQ7b24Kz3jx9u50qXCRD4KtFO+fV3GCSnSw5JLLkQxXNYM j0gIaOizu9J9Q/1lChCT6LDb/o9A8h1zW1V7765/gDuPBwPqiGBYDOYT4xArIQULlw8H U1gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=hIvSYjKS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902c40700b001b3d6d125f9si2539372plk.524.2023.07.20.23.26.46; Thu, 20 Jul 2023 23:26:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=hIvSYjKS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230117AbjGUGCq (ORCPT + 99 others); Fri, 21 Jul 2023 02:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbjGUGCL (ORCPT ); Fri, 21 Jul 2023 02:02:11 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B14DB358C; Thu, 20 Jul 2023 23:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1689919290; x=1721455290; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fPZbxttjj9qWYO88Io5KOquMMVwiS/BesVJMZmPhAeM=; b=hIvSYjKSYqpsFqAs8hbhSCVzJ9AoCl42jQSLszCqdE9wUgfwCH9Ywwn7 XstPFN+vyZSv6a5h8xjnp8HekZrLtsTC9Xy7U6isAodsvIxm95TNzmjg1 kEnKfCKXcfMRt0UO1d/lvdkpbiDzuOF98NgRW1ixyVqQw0bILO9flf2lK VwQ4qGslUdjBkHM95xXkfaPTPnqiydwPnpgS58b6CZj2HUgey8fbTxgbO RXIfxRmcBLOXh707tdEh7YOLhTUaeMcjW/9nacYrF4ljuytU8bdonkIqr BwZc4u2fMYB4I5NDjiogdvogl02L3a4SourGqv7SLVRXoX1TICQeTSaWN A==; X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="221463715" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Jul 2023 23:01:16 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 20 Jul 2023 23:01:14 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Thu, 20 Jul 2023 23:01:11 -0700 From: Raju Lakkaraju To: CC: , , , , , Subject: [PATCH net-next 1/2] net: sfp: add quirk for FS's 2.5G copper SFP Date: Fri, 21 Jul 2023 11:30:56 +0530 Message-ID: <20230721060057.2998-2-Raju.Lakkaraju@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721060057.2998-1-Raju.Lakkaraju@microchip.com> References: <20230721060057.2998-1-Raju.Lakkaraju@microchip.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772010412349798859 X-GMAIL-MSGID: 1772010412349798859 Add a quirk for a copper SFP that identifies itself as "FS" "SFP-2.5G-T". This module's PHY is inaccessible, and can only run at 2500base-X with the host without negotiation. Add a quirk to enable the 2500base-X interface mode with 2500base-T support and disable auto negotiation. Signed-off-by: Raju Lakkaraju --- drivers/net/phy/sfp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index d855a18308d7..ee049efdf71b 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -463,6 +463,9 @@ static const struct sfp_quirk sfp_quirks[] = { SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex, sfp_fixup_ignore_tx_fault), + // FS 2.5G Base-T + SFP_QUIRK_M("FS", "SFP-2.5G-T", sfp_quirk_oem_2_5g), + // Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report // 2500MBd NRZ in their EEPROM SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex),