From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5EDBA034F; Mon, 6 Dec 2021 10:51:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D48AC4115E; Mon, 6 Dec 2021 10:51:44 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70128.outbound.protection.outlook.com [40.107.7.128]) by mails.dpdk.org (Postfix) with ESMTP id BA8F4410DC for ; Fri, 3 Dec 2021 23:48:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FkfR1AZstFuq/saI10vndt+hq/QwywjdIFgNwVThoJwsDLV+qGvLRsL+efxbpGfmguyvrAxtfMsXOhP9oQNrMODSIq9QX+KYBxxcfz6tTv9pZQwxS0WrMM+W1lXYKNHkXT4V5OE92YwGoA5jG9ozhU4GUMqnPxzQY881KSB5UAPMwsXzohfOtLm22OBv47jDAbUrmqFac0z2p6kmb7A3k4mMIVWY23hjv93zDgpLzzP09lXdRmpRhrHL/L4bnJ32Vb5I3BDJqh9KGLlDbM+CyE8fsl6hESQuofLU5dYGbKJcAjtAxn5Jv/xjdPSndh2sp65I0q02clmFkhgWxfY6UQ== 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=W/qS6nt4ZP5zaFSNM8uhgBoE0AYFIw0QJIFIPHLMqn0=; b=gQKxZGiBF5sYqwvFcuEvAZh+MzUZfHQh2UIECT14MerWrL6lZSbc+55BanhVujY63vVnlShW9GvNMPU4W59ZH3rlZf7JOpKL2hy+vUZTpm4s63LGzk0hLZTbuvJz24/A0A64PT3eS+GaxDZro7ngs3NoFwAAFV08Mn1Kj3daR/WrQ6vrPuRCQDefih0H+aac6CB9fd2a+Wbcgc3URcQfUKWydSvp+QLPJKfpkDVjtC5qbuKMsSQS8T3QxQgFOyoJv0dcjgrrz30dM5sKIzkEw/UDoc0QMlcQ4uQufsIQA7D8fCeD88GQVsiIcrx4D96pUqoSosHIjcNNShfU9xXwmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silicom-usa.com; dmarc=pass action=none header.from=silicom-usa.com; dkim=pass header.d=silicom-usa.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SILICOMLTD.onmicrosoft.com; s=selector2-SILICOMLTD-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W/qS6nt4ZP5zaFSNM8uhgBoE0AYFIw0QJIFIPHLMqn0=; b=njG4i7qgslsIeRb5J7eU+qJzJzDjORJ9yF0MBjQx6QiMe516/dvTmaQXGiGm6kl13klrkMHlDOmGQFbZJk/YGk60wxOn0MYX+1Xf9CedJfZRFxZ9wiJQa8utYbv2hWdpV6Ocs4F5/CA6KuAac8XThIyBqlI+0Kc9hT4TS2QfzLc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; Received: from AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) by AM0PR04MB4722.eurprd04.prod.outlook.com (2603:10a6:208:c3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 22:48:12 +0000 Received: from AM0PR04MB4083.eurprd04.prod.outlook.com ([fe80::f4db:d40d:a746:7bfc]) by AM0PR04MB4083.eurprd04.prod.outlook.com ([fe80::f4db:d40d:a746:7bfc%7]) with mapi id 15.20.4755.019; Fri, 3 Dec 2021 22:48:12 +0000 From: Stephen Douthit To: dev@dpdk.org Cc: wens@silicom-usa.com, Stephen Douthit , Haiyue Wang Subject: [PATCH 7/7] net/ixgbe: Treat 1G Cu SFPs as 1G SX on the X550 devices Date: Fri, 3 Dec 2021 17:47:06 -0500 Message-Id: <20211203224706.569618-8-stephend@silicom-usa.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203224706.569618-1-stephend@silicom-usa.com> References: <20211203224706.569618-1-stephend@silicom-usa.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR20CA0004.namprd20.prod.outlook.com (2603:10b6:208:e8::17) To AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) MIME-Version: 1.0 Received: from lappy.adi.eng (173.14.114.227) by MN2PR20CA0004.namprd20.prod.outlook.com (2603:10b6:208:e8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11 via Frontend Transport; Fri, 3 Dec 2021 22:48:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 374c288d-0d0c-4bd4-74e4-08d9b6aefc08 X-MS-TrafficTypeDiagnostic: AM0PR04MB4722: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EUdsM1tDxn1crkVv3lY63YUUpefTH5pJ9j42ydjrUfugwW25Cbfs+U+P2vuz7ylEtMhffuvGdlkO9UZH+qKI+Bt2f7lQf+PdiIUf0VOT63UBtbNx2gLgOtHeFmXt91ydu8CYQPlo3RcpTmaLJJ4Qv2iK4w5datLD+t2ervLHqwy8A5oudrnIpJUyU56fDRwCVkmwiUwXNKrbDpBlIYlZHdvwp3gCDB43du6cDzNimPXbi7JSLXaey5BfqlPR9BLc/GUTS0NCS/REwIr4/zoo3v4TwDjtH0eZKbpm3SIAPSXnJwiNPrzxWpdfZFNgtuNw1Jj8G/AyqJEjM/T08KhhO+ijg63L1fRt6+5w19DH9q/z8B8FCRWlcBtksiP+VSIWDRyOdtzVneaPb32aU60JLymaaRboA6YPPKgAgVOU0R97zPWeRgA60j2yaGx0Mru+hb5ElNOn5ASwcqQA+73EU1Z7KnsWP2D79X3ARW59YT8EcSNDtLvyKtTWdB6JP+CpfiZF8YHG4jhhFJ9BSB75a0DRAdsBBoE5n9v2rBCNVpH2HPPbBEeYj10ninImRttizZyCxVO7lMVhmgKK5VT11LKdFZcjh1XtJPONTVkRnvoBTCqW2+RYC/kbMZHjCrbdSnX8SwAEf+qYRNCcot4J2I/awxvANJMd5whoWA7HrJEpLAibWAGoULDnniiJpxLslX4ZynVLyAVJhhU0ecFA3Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4083.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(2906002)(5660300002)(6916009)(4326008)(6666004)(6506007)(38100700002)(52116002)(36756003)(508600001)(86362001)(38350700002)(956004)(66556008)(316002)(54906003)(186003)(26005)(66476007)(66946007)(1076003)(6486002)(8936002)(8676002)(6512007)(83380400001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hE14IJWjbjAX9PP17N+Mw0dsrPqtf0M6r+LhO015G+3nAgU49cINMtBTadLU?= =?us-ascii?Q?AdlrL/b5lDPfS4f0MjSB8kOYTmnGQdHemdMmaeMgDW4Xpvtkugrm9z2KREkE?= =?us-ascii?Q?kv4a0fTfis9mfskTpAeU9qS71WyKGfHkjT7sobVIAYqKAkXt2pPPvd286avl?= =?us-ascii?Q?qmc/BMp1mG3PyCAVyLdbD0mu3d5INdu9hy+8xhDTAF4GsHSuuQh1lzva2D6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+6OCCnOnWnL22tkqqSO9XmsJE?= =?us-ascii?Q?3o+ucspcgBCOIDS+3k89Fk8l3h0/W50UNWQ6I142VN2SZiG3caH8VNT47IxH?= =?us-ascii?Q?x3IeUVzeBwgzB0h+DbS+R+YaJj178izKXa3OgPbPrlbG1TU9gRlpCZLkNNxL?= =?us-ascii?Q?FCu8Cz7d4YuzspBbPuiIstuvmZb12ZhiGOLpQKUpKpW8skZ/ObqMIwjho6TJ?= =?us-ascii?Q?BuTRGhiBOlOSGNBs1v++lVMRL2AqIMCjlrlaVNDl+8+SkbL9KxhJb/zuwBMD?= =?us-ascii?Q?ncxi0tdSm6okeNNqB21ERRUC0MU95Ee68OiW+TU+JHSLuFEk1kdcUPeko97y?= =?us-ascii?Q?ZP9wUF/ZZSgeFIqpYu3Phtx9cM/g1fXtWYlSJZam8XyT7vBd9RBgQJnJE2m8?= =?us-ascii?Q?2PiPkva50t6cJK4p7XNwFi+UQhO1PVwpdR2GqOgXwEMWxzRUKJooS5x9HTrl?= =?us-ascii?Q?Zi3Qs0Fp3/Cg4iDpikxcusiulOKhZIX7hMKtmjRtIeKEZn2pGJYKpLfHoz6U?= =?us-ascii?Q?sur6KUR8ri2NkhKIFAK7yOIVXWDDwRAElVu45TjUBHLKC/tOAeDWpw5Ns7j6?= =?us-ascii?Q?eaL6sOQT9yLJYzMvehxtrWtob78=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 374c288d-0d0c-4bd4-74e4-08d9b6aefc08 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4083.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 22:48:11.9502 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c9e326d8-ce47-4930-8612-cc99d3c87ad1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3/47cgAyAwhdA4328JwNZHojSbwfug1Qur0rPIaVe0Q9MFl2v2YdbLcSen3mYjPZsVZ7RUnnQ/QqIcN2FSGhba+BvRGJenqsWOQQFjZ9HW4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4722 X-Mailman-Approved-At: Mon, 06 Dec 2021 10:51:43 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 1G Cu SFPs are not officially supported on the X552/X553 family of devices but treat them as 1G SX modules since they usually work. Print a warning though since support isn't validated, similar to what already happens for other unofficially supported SFPs enabled via the allow_unsupported_sfps parameter inherited from the mainline Linux driver. Signed-off-by: Stephen Douthit --- drivers/net/ixgbe/base/ixgbe_x550.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 8810d1658e..8d1bc6c80d 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -1538,9 +1538,21 @@ STATIC s32 ixgbe_supported_sfp_modules_X550em(struct ixgbe_hw *hw, bool *linear) case ixgbe_sfp_type_1g_lha_core1: *linear = false; break; - case ixgbe_sfp_type_unknown: + /* Copper SFPs are not officially supported for x550em devices, but can + * often be made to work at fixed 1G speeds. Pretend they're 1g_sx + * modules here to allow g.Fast DSL SFPs to work. + */ case ixgbe_sfp_type_1g_cu_core0: + EWARN(hw, "Pretending that unsupported 1g_cu SFP is 1g_sx\n"); + *linear = false; + hw->phy.sfp_type = ixgbe_sfp_type_1g_sx_core0; + break; case ixgbe_sfp_type_1g_cu_core1: + EWARN(hw, "Pretending that unsupported 1g_cu SFP is 1g_sx\n"); + *linear = false; + hw->phy.sfp_type = ixgbe_sfp_type_1g_sx_core1; + break; + case ixgbe_sfp_type_unknown: default: return IXGBE_ERR_SFP_NOT_SUPPORTED; } -- 2.31.1