Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2822764pxp; Mon, 14 Mar 2022 05:49:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLE3+a3Hy901fYDJZcDb7AhwxiihVSUz+mecR9gZIiP+hgySP5ac4E325hhtar4m0xC/yd X-Received: by 2002:a63:e:0:b0:37f:fa5b:6ce3 with SMTP id 14-20020a63000e000000b0037ffa5b6ce3mr20196504pga.559.1647262145733; Mon, 14 Mar 2022 05:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647262145; cv=none; d=google.com; s=arc-20160816; b=J1y1SEgwkB86ZYp4Zu91E+odWu8MQVccQ8Icjfa7RH6gF4h7VmLaC+g09UTOvr0B/Y mMvp9tqIMSGedoAblRh02PO1r1Iuv2a76HymVBJESxMPOljBV5qIzNMTqOjzOA7pqBTN rT3+wDli1FqsMtOYPFpSSf1k5ADPuwJr0jib7iwTxV0MRgGwr1hqFnECypb9HxnPxr2O RKMYpKVwinkk6CpRSfm5I5LpMe2wZxDDfDLZvYSM5CneNR6rp9rxrXxgCskItqltOspU IGdADktXr/GUJ+MqjUghqTeu2l2D9qVyZFbgbnzHEwJfHIVMTcGCS7Bjj374Wl0w8JzT uUTw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=vMgLswBA0/NbjgyCuBu9aMBgpNZnNIEHqc7S0Jyg3rE=; b=GzumknADcviGysc445WjKIm6aKSLRlO5RLrRiwsEx5dqodmPrXOXPaujkHQYrzqGXS 0pPNoVYeQM8aCzG887kVdHH+9ap9jNqkBgKozl1e35dIxHq8Km3cOqs3OeD/0F/6vflr HrxaGSjtKNckuwU/4HgbsrOSdB/+lnUSg+5StG/2xk1VeiFg0d1E/9aCe+aDJ0AGgCN8 MqXL+jD69sxdgmYfQKwQ2qLgYD/4m8ijmheh3P2PgMHhH/2VziG1ljZXR3+MwJ4hpzRC 6ASXxii0zKKrwMXaAXTZD3cSLIvXAZS/H/sqBHdugCSsH5SskcjdKM9UOqYt9mrsM2i/ JWgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=ce7amQ7B; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a63ce11000000b00380437ab898si15919480pgf.84.2022.03.14.05.48.42; Mon, 14 Mar 2022 05:49:05 -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=@walle.cc header.s=mail2016061301 header.b=ce7amQ7B; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232672AbiCLU5K (ORCPT + 99 others); Sat, 12 Mar 2022 15:57:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231488AbiCLU5G (ORCPT ); Sat, 12 Mar 2022 15:57:06 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE5B1BAF33; Sat, 12 Mar 2022 12:55:59 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id A5C9B22239; Sat, 12 Mar 2022 21:55:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1647118558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=vMgLswBA0/NbjgyCuBu9aMBgpNZnNIEHqc7S0Jyg3rE=; b=ce7amQ7BEY6accaQP6fbi3KtF154KsNPlUep2oetXRO2av6Gt1tVkxnBV+ee8kCBIjYKPN tqrDjAifF5sfhQsRjQuaPDjh0tbXI2MO2+hGoP1BmMtJqF+MwWeZNP3g0EWJOov41viXHM 5Zlh0D3gfr2hrmr2QGHvPvWAmdRhZWs= From: Michael Walle To: Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , Michael Walle Subject: [PATCH net-next] net: sfp: add 2500base-X quirk for Lantech SFP module Date: Sat, 12 Mar 2022 21:50:14 +0100 Message-Id: <20220312205014.4154907-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The Lantech 8330-262D-E module is 2500base-X capable, but it reports the nominal bitrate as 2500MBd instead of 3125MBd. Add a quirk for the module. The following in an EEPROM dump of such a SFP with the serial number redacted: 00: 03 04 07 00 00 00 01 20 40 0c 05 01 19 00 00 00 ???...? @????... 10: 1e 0f 00 00 4c 61 6e 74 65 63 68 20 20 20 20 20 ??..Lantech 20: 20 20 20 20 00 00 00 00 38 33 33 30 2d 32 36 32 ....8330-262 30: 44 2d 45 20 20 20 20 20 56 31 2e 30 03 52 00 cb D-E V1.0?R.? 40: 00 1a 00 00 46 43 XX XX XX XX XX XX XX XX XX XX .?..FCXXXXXXXXXX 50: 20 20 20 20 32 32 30 32 31 34 20 20 68 b0 01 98 220214 h??? 60: 45 58 54 52 45 4d 45 4c 59 20 43 4f 4d 50 41 54 EXTREMELY COMPAT 70: 49 42 4c 45 20 20 20 20 20 20 20 20 20 20 20 20 IBLE Signed-off-by: Michael Walle --- drivers/net/phy/sfp-bus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index c1512c9925a6..15aa5ac1ff49 100644 --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c @@ -74,6 +74,12 @@ static const struct sfp_quirk sfp_quirks[] = { .vendor = "HUAWEI", .part = "MA5671A", .modes = sfp_quirk_2500basex, + }, { + // Lantech 8330-262D-E can operate at 2500base-X, but + // incorrectly report 2500MBd NRZ in their EEPROM + .vendor = "Lantech", + .part = "8330-262D-E", + .modes = sfp_quirk_2500basex, }, { .vendor = "UBNT", .part = "UF-INSTANT", -- 2.30.2