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 78024A0C41; Fri, 3 Dec 2021 23:56:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47AC942759; Fri, 3 Dec 2021 23:56:09 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2132.outbound.protection.outlook.com [40.107.21.132]) by mails.dpdk.org (Postfix) with ESMTP id B48E34271D for ; Fri, 3 Dec 2021 23:56:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L4M7lej9AkEWBaf+RmBp95Ity075RBZYillDO8rMcW69lSW6jAdBeb39rrz1tUHNvKZeGDYZOQzZlpviEd2qpxds2WgCyo43ZrR/G96bJEEKFqOPjQebJBat1jDJKH895YrKu94tZNSZKNFtGUrnqZvaSTAmmovToHiXo7AUNfWoRkzSgSPVmcLgNNyb08yyAY6Q5ct0+sBhOWYuSh/kKn6tk8PpMMvsT5CPMUK1LPiPp1Izw3Ry98U/P5TCyB5h7zGDeoMztPN3eqbII86Zj9zEk6vqCRXnD4YPUPa5tZ6SYVmBGm6ekHkocjUymyoGa66LNOTT8ryL0k8V1T3JHQ== 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=QCkqmpXDhg6PR044ZOe+C9OcdE6ElO08vdxaTxTFEhv5oNaWuG7JXvGc3kBVg7/QLafd6rM8DK82G/mMnTOdbg5bePzBkAEtKJZuAL6buxLCgg8oFSnRZhJrblY1GSEskt7ns3xBuxbuQB9RkDOcL2WoZEoOdSRvGKpCNDcrygom6pzaEvNDoDp6vDNqw2cZfrLrdhmqyxKkr6NT51cRFGvpBJocpaKXOkN6vP04uCFhfT/vfuCOUhw0Bu3Il1Hn6tahFPurR1UdAvXMobPJvdOBEMraUpopXxL2xWjXNyPkm25t8nc3QLmVl2YJMxXeKB0EA6r7AF+ZnfUpDPwWPA== 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=MA91BfGxstuIq21cMgBkdeatvd6DLV8IF/hfFa4oLsYdp44qPwfUq1ymOl2kc7dZDW/TzrzTAwi9XCoIWioj52tavfKZFfqfUS7h046zLrH79R1YNAww826c47CEIC/WEYt44tG2unBWkc+XCFOGGq3y6R+bZ6NYVdMYJHvMXYw= 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 AM0PR04MB6404.eurprd04.prod.outlook.com (2603:10a6:208:178::23) 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:56:01 +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:56:01 +0000 From: Stephen Douthit To: dev@dpdk.org Cc: wenw@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:55:16 -0500 Message-Id: <20211203225516.571368-8-stephend@silicom-usa.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203225516.571368-1-stephend@silicom-usa.com> References: <20211203225516.571368-1-stephend@silicom-usa.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BL1PR13CA0431.namprd13.prod.outlook.com (2603:10b6:208:2c3::16) 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 BL1PR13CA0431.namprd13.prod.outlook.com (2603:10b6:208:2c3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.10 via Frontend Transport; Fri, 3 Dec 2021 22:56:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc52deee-f257-4cf2-939c-08d9b6b013a0 X-MS-TrafficTypeDiagnostic: AM0PR04MB6404: 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: k78TtY+4e+zgqyHFdgpHt+0ltGPjK1d0GxN70LMsagVlrZ1ZrI50Yl2YlNw+LR2Mr6p7ethC/YNGAyL8ajlUeJixvr31/TyKb5DPPBm8C+XVF+VO3QxoP3bU9Hvi9tRiXL8v55XuVKL514ANCGe5Dx4R55CyJNhv9hDtx+io/c4OEcdYj4EaZY8tr+KozXtxk5okfslBvpprrWK91PlfCWuMSByGVbzy8Bwo1M4Ci7NWgIUA9IZyK7/lq2iMCb3GUdMoUTcGeqLFQ3q03sJ03F/uprOuFmxHh/DZ75Ny46TwHButrOjqNAOnkYzPN2zXKpbrnxa5OBgK6/A1mKwISfPGH+aw10zzZx0OY85Lepzq4M2BdLQw1KfZWjD5q8thQqU0cHhZSBL4VgJQchY0FKtngT9eFYIFXJon/w7Nlh6t7cIbRpAwiLyb7uSZF3+moreFoYljk551nDobDyJF0lKiAJEyqu6CtZiHO1fpxZWNTFbdPTHR/Q5+VL344zqq9cqY5ah2PURrMv8QqRW4TPYXvBiwa0Hs16vwYtJTYr/cgvHevjkkB3xgYDzmp8gIvIHQmUEp96MMwKhC3swpjTVsBFmxZnxaXlOyTl41kGOzNyrZgVRbrBynMzorXnfXjGs54LI2duq+SxmgLj/jEX8ytC/WdXAPVRvZaXBQhelgsCXaO4s10N5IfQkvCOOleCLuMDQh+cduF0Yb6o7zmg== 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)(8936002)(2906002)(508600001)(6916009)(8676002)(6486002)(26005)(956004)(83380400001)(316002)(1076003)(36756003)(5660300002)(86362001)(186003)(4326008)(66946007)(2616005)(38100700002)(38350700002)(6506007)(66556008)(52116002)(66476007)(6666004)(6512007)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?YII58Gfkwo7dH7vmIYrgFKTP0b5AFACWoBwe4ZmNFCoKkKFi+vPYSCLF/y6F?= =?us-ascii?Q?hxYjEw+bDazCHn2Sn4euTWpshglz1foNGVJyRABDeRaNGnVFz0LyxInRV/9v?= =?us-ascii?Q?rvVW9t1wq2xp90S1jI+asyMA9jyvj7eQVFw+lO0JB2tJXGymAvwPjNtV0e0r?= =?us-ascii?Q?ZLk/mAgT9qQPWz9I69jlhWS2DvtjX2Id/v4iJAeQ1lDplUKPUC+UECNiNJ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/ZA30lMhVckTX1Ofewv?= =?us-ascii?Q?/10zrdMWCCuOfvL+LQT+mVFBDxVEE3QWJH2meLalAzqO5inPIJNeVRa+1xTe?= =?us-ascii?Q?WqF9iwYsPHvmW1XS5dkQFExjuvEE4YSKii1B6AOlhqBE3QXiv6Ot4TGAqrYO?= =?us-ascii?Q?7ArvDp3OLCQhGIkOTkK5swtso0VXYYBsCamVoBPc01fE7dTBH/hD18BrjnlJ?= =?us-ascii?Q?BNZUIUMe4RlmiN1EB2Vz0ybLnJfe5KGwgsBpcPbxB/U9Z1QRou7Rwu8LNlh1?= =?us-ascii?Q?u3s1jfgK2PBIdC8Mi5U1JBXqWrkUdWA67CvxxIOQhkPwaD9f2uZqee0UWuNy?= =?us-ascii?Q?8cvzXLvpQN594RiInWsbsBe0awRrK5/YTg+hWx/slSudGQm+sB201s9TvMwk?= =?us-ascii?Q?0LM+FUSYs+tfQ4Eq0C7rlcgaM6mL68Xxi9b6jslUCUzSF7hd5xSB0KL06XJF?= =?us-ascii?Q?1u6LfmAozW6MaXAHfN7nMnZr9E6QNeV46GXpv4NteMUGnlgdxsok6PmaI2dR?= =?us-ascii?Q?zk6sfx33pGtOhP/Q26ecQvz0dDVQZItQ57VI6wgRnjAVU18cuffAWQyQ3v0m?= =?us-ascii?Q?kBXJrZ33nrdBxeFgrBooBUszKX4=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc52deee-f257-4cf2-939c-08d9b6b013a0 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:56:01.0315 (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: azL4i22uRab7n6HVmUUKfDBHdh4+AMptBHWVVEPT3wCKugAndVl5vVqa0Q5VDANL5zW88JIXtJuafhF/d1FnJh24xyH5hFz1yyDzzts0byk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6404 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