Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp725676rdb; Sun, 28 Jan 2024 06:23:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNsNFesRXzWuuJRF/9BcE5MGhzwqyfJ0qcdL7YT+jRvwg7DZxW4VNeeWnxdoWWE6hxTgtW X-Received: by 2002:a05:620a:22a5:b0:783:c0c7:5e0c with SMTP id p5-20020a05620a22a500b00783c0c75e0cmr2905319qkh.3.1706451821935; Sun, 28 Jan 2024 06:23:41 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g4-20020a05620a40c400b0078313d956aesi6083943qko.494.2024.01.28.06.23.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 06:23:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-41647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=outlook.it Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 554371C22748 for ; Sun, 28 Jan 2024 14:23:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6ED525629; Sun, 28 Jan 2024 14:23:28 +0000 (UTC) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2067.outbound.protection.outlook.com [40.92.89.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B97241E7; Sun, 28 Jan 2024 14:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.89.67 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706451808; cv=fail; b=fEXMkVWCt2iMafJDCJTr0lk5w+5kEoxZ1So3xyD57hpHsNHylB7qmzyj+Pm245fFPPMq0qR1Ex8tDFuSZsJ0pE9vIBayTaMgd2ZkJwv/kQQ7+6Z6HizBzPyytZydLo0OYlLZXCJSUN5FJj8Vu/MDauna+XsEj4xLDtjh356zfMk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706451808; c=relaxed/simple; bh=d2WMKZY+3t9jbldqzkavAqU5GD8DKg10YeWWzr3jUrE=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=kzgQwOH4odQFUx+oDfsXepeb9CcMWZxJ0U/itub/WQ/jpRxPQ6cWF/C7g/PJ3H+K/ufC2v1QMFOiNv3JCcrNu2JGR3BfoS0IwkCB4DMev3+SLb1/VKYDINA27vtSPISLYCka6R6GyPdIklBANL9EO5lMC0GL8ouWo3Wi9B+5aoY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.it; spf=pass smtp.mailfrom=outlook.it; arc=fail smtp.client-ip=40.92.89.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.it ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQroOjk/peCMon7TpLfejotRrjQmFBm3uYh+yMeNdiLFR1yaJII+Oa1HhpXCqiL5Qs39/8aeEvq7mNrFxC9yhnZKF6xzwG4vaeogplkU/sDfO9ZV/mvFA2OyoVHHZAhQjQslYlzCik8095ry10izfh738qhxJtOSv/eMvtAuzmv0iDT3F4WRSGzniIWOb1tH3I5M5hexLcCEpg4Bm+eFNjJlqSke1jPi3EUQD2FKFXWaQg/Umk2ukJh41tWlFqpqJN3b7FWA1piwl/ASW4r3SwclZ5p3NWObt9vmD7IN2S8/CnL162FFltGAZqMrsHsxJuE6aZsg+4UDaqJuhcwLwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Qm3HM7lQpUjQ1nzPiH22X/nSNCuj3o416xBMbM7HM50=; b=NsQGvt3gbu0j0hJM83Pc3eWT84OzQiFu8iWaRJPNmqdZZQCiNfmStIwTjXB7o5Q+PM4xPCUuGBYO7UqNv1R03NoRNDPesS2VRMI9TFzKbPciiQFomZM2xdCSt1qGAqByzCUiJhM8kl9lc2HoYTrCrDUxeolmXfPZmK9BAKbDEwsSwdaYeEynLzFgSJqeGmyHUSalaQWpbyWJZUjRrkU9qgPGHYK71ViQdxr8YJP9zStIY7ZA7UYP3gy3xorqb7zS7AUJ1xBZePsXLrpfpjdbxH0SvUjVz6VOg9cKmJ6Md1FlpiVLvtx7+A6eWZuo0XeNNBEgoWYjrygVgM7kmV3n+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AS1PR03MB8189.eurprd03.prod.outlook.com (2603:10a6:20b:47d::10) by DB9PR03MB7401.eurprd03.prod.outlook.com (2603:10a6:10:221::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.31; Sun, 28 Jan 2024 14:23:23 +0000 Received: from AS1PR03MB8189.eurprd03.prod.outlook.com ([fe80::ffb3:3ff8:6ea9:52b5]) by AS1PR03MB8189.eurprd03.prod.outlook.com ([fe80::ffb3:3ff8:6ea9:52b5%5]) with mapi id 15.20.7202.035; Sun, 28 Jan 2024 14:23:23 +0000 From: Sergio Palumbo To: Russell King , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: sfp: add quirk for ODI DFP-34X-2C2 GPON ONU SFP Date: Sun, 28 Jan 2024 15:23:06 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [IIiiBF5+Rhd7ugK03V6Oe7V70fxjqOGl] X-ClientProxiedBy: MR1P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:2e::8) To AS1PR03MB8189.eurprd03.prod.outlook.com (2603:10a6:20b:47d::10) X-Microsoft-Original-Message-ID: <20240128142306.9120-1-palumbo.ser@outlook.it> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS1PR03MB8189:EE_|DB9PR03MB7401:EE_ X-MS-Office365-Filtering-Correlation-Id: 990fe7c8-c0b2-44a4-ec35-08dc200caf5d X-MS-Exchange-SLBlob-MailProps: Mga27o8vReGfIc1VICO0dmEM3GFX/n+pKij/noRrFm75yCKydnQV05IGpsbeQPm3bsAL+K7Ki3WKjxUWTI4EnK74GQnS0jRKN3bo4tAawaKXr2ff/u3ZcnwcYx5ByBZVjO4yqUNl0pJm/vJ0y8sVgbv/ZQpFvU7R+YsRlNiw6nrBmezvwqn1aP2mrOL2fQUThCgVAi44+hPtTzcFUriI9B2NV7dS5Kbr8SiJGqIlnKbqowZuNg/Lkn4jtbYYI/jOI5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wCilBAd?= =?us-ascii?Q?cl58FctlnOkyl2vgJdvPyN9W5hjkjv/lzFlyuaTv3wbxBEAXTEVE19dp4wjV?= =?us-ascii?Q?3U+GtOhviA4W3DLjWodJUWDoDxBIycWAAt+oiZ2OeKIkZ+DR4F8E4IIW596r?= =?us-ascii?Q?C/UOcCeP9uZ2aRABqYEj3EA4wCvz0TMmibKhlZ3H8wUYXSa18gsqSQ/FpZM2?= =?us-ascii?Q?RvF14r6sonVFUhGnWjvXIJotk3sdxiRJeJQhW4spoXYX2O5b+uydiWuhXvqY?= =?us-ascii?Q?drF6om4if6zm6wz2VcRjBQ4y7R/yNu0eSARI+ScAF8wkpIVPMa0lhSF+NLnV?= =?us-ascii?Q?jcWFzL7nkAt0s6vjRmGFdr8EJKQe6iuoqDdEKMZsAtcFbcuvHO/rUkeAQQoy?= =?us-ascii?Q?t05al8egDxLQIKG/yfVD1NCvQTw9qwWv0ni9QupCDovAZe58vx3l2U9ViRNq?= =?us-ascii?Q?TC8w5JTrsseULeILYDmCfX2AGKX90NeBUODco/TLyFdXjQvuiaas8fkvKNuc?= =?us-ascii?Q?A8OOXzdrZ/hArCt4TgKxF3mSu2Y0gJ62eRYdPdfa/rX2fcNFLufgoE1E/Rc?= =?us-ascii?Q?=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 990fe7c8-c0b2-44a4-ec35-08dc200caf5d X-MS-Exchange-CrossTenant-AuthSource: AS1PR03MB8189.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2024 14:23:23.5314 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB7401 DFP-34X-2C2 is a GPON spf module working at both 1000baseX and 2500baseX. Setting the module to LAN_SDS_MODE=6 the module is working at 2500baseX with auto negotiation see at https://hack-gpon.org/ont-odi-realtek-dfp-34x-2c2/ Unfortunatly the module's PHY is accessible at 1000baseX only. ethtool returning: Supported ports: [ Fibre ] Supported link modes: 1000baseX/Full After applying the quirk: Supported ports: [ Fibre ] Supported link modes: 1000baseX/Full 2500baseX/Full Tested on BANANA PI R3 in OpenWRT v 23.05.2 Kernel 5.15.137 Tested on sfp to ethernet Media Converter. Autonegotiating 1000baseX or 2500baseX according to the connected host speed. This module is existing in 2 versions: Vendor = "ODI" Vendor = "OEM" This is the patch for vendor "ODI" Patch has been inserted keeping the list in alphabetical order first by vendor first and then by part string. Signed-off-by: Sergio Palumbo --- 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 3c0028a4af92..410375bc6b94 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -495,6 +495,9 @@ static const struct sfp_quirk sfp_quirks[] = { // 2500MBd NRZ in their EEPROM SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex), + // ODI DFP-34X-2C2 GPON ONU support 2500base-X + SFP_QUIRK_M("ODI", "DFP-34X-2C2", sfp_quirk_2500basex), + SFP_QUIRK_M("UBNT", "UF-INSTANT", sfp_quirk_ubnt_uf_instant), // Walsun HXSX-ATR[CI]-1 don't identify as copper, and use the -- 2.34.1