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 8E607A034F; Mon, 6 Dec 2021 23:20:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D73542744; Mon, 6 Dec 2021 23:20:01 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2108.outbound.protection.outlook.com [40.107.20.108]) by mails.dpdk.org (Postfix) with ESMTP id 78E3041C3D for ; Mon, 6 Dec 2021 23:19:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=joy7EKexSZ4bMfemkgdizazn/QledFBvdpDfxCXQTWoGjRcz5S1w7dfnLQeI5K8oOfbBgnZ37a+BDYN2nqqk5StGuYlwSSMi4YzVHrDnMC0H68BPHJhIJU7XTpBcvE4SmhiSpMo9mcy2N6soOPkgJcKFkagK/Ufy/L+WnHHuxdA1mBMY2adgGkgDQGQ2JLJ9inWs4/Ji3SFRqaQl47Nmah/IBHjTWmU2Ayk6qkNpcoZCjhPaO8xmAfi7mR7uoChMGYxm2mWyM3R6PUtoROUWQoTPCLO6wLFAeoGCxvq/ug5ER1OLK9hu92LN9G1siEKl3ZCN1jDKcVyKfankaWKs7A== 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=UVN2pGrVh75quRq1RIrsljxeE2blaFAa5z5Cgsy2tqwunXqGxgmZdpQgwleZFMtzlQ0pD2H1e4tiOlKTH5fas2h2csRZeCPHH4MfNj4+80Q7O3tavEmdwefsr2UDa0jqdj3K6gTl3bPfojSsuXdls8ouxFp1bd+/IlfGPl6QP7PVHrXqVjjYvVzbZLBKuZKr7bbTBUWhewQnXpiDGVjE/SPij2/z5wpvMibjwbswhWRuOahwov8fvl2kgGl2L/+DSwYIXuzyGOd7iW5l4if9Zp4iyqWFLT69MbV3lXi1S+Bmgl90s2XYoeJuRdkvDbuLjbOHN5JblC+SJrT8POp7lQ== 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=WLoadyGuv5khQjZZRHczJpGB7iBUZvIF/1GVr1hfnJDz1EZMevv7iraeMBbWW0rN8nAztKdxRbDp4bmPJ7nkTbxDKf49qcI+sJTHHM5Rev2o+zdj6uuhdNy1JeqnEw183s0XBBLlh6+QWHNmgV+tapS0Cm0mMnLUV6P8R2mCMZQ= 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 AM0PR04MB6596.eurprd04.prod.outlook.com (2603:10a6:208:173::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Mon, 6 Dec 2021 22:19:56 +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.022; Mon, 6 Dec 2021 22:19:56 +0000 From: Stephen Douthit To: Haiyue Wang Cc: dev@dpdk.org, wenw@silicom-usa.com, Stephen Douthit Subject: [PATCH v2 7/7] net/ixgbe: Treat 1G Cu SFPs as 1G SX on the X550 devices Date: Mon, 6 Dec 2021 17:19:21 -0500 Message-Id: <20211206221922.644187-8-stephend@silicom-usa.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211206221922.644187-1-stephend@silicom-usa.com> References: <20211206221922.644187-1-stephend@silicom-usa.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR20CA0031.namprd20.prod.outlook.com (2603:10b6:208:e8::44) 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 MN2PR20CA0031.namprd20.prod.outlook.com (2603:10b6:208:e8::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.19 via Frontend Transport; Mon, 6 Dec 2021 22:19:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d61e95f7-de27-4a6b-18e9-08d9b906887c X-MS-TrafficTypeDiagnostic: AM0PR04MB6596:EE_ 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: ZL5EJ2XauggwL8A2AeE56YGBeRHYeKmnIcr/bPNafAXdWYTFR+zrr13B8VB1gqifCjos6t4UtVxQjNiK/p7rCqNq/PIurs8SF4JeANYHsVF4NgG3x0ka91k8bXbF+it2jou1TxIIKZmZ9domGMUaPZLdBArT/EGGNGZ2MNk4AJuHcZJaLqY/i4fSOnKj1H1wFIn8kup+9zQ/JiR8hBxgoqYweQXl5H/rUDyLI84w/3ixFhLnnOi4XymNPGdIKsx3G2tz6TBEOE2wX8eC1RKj1408P4S2Uz2m+h6n5cEIGmHCeCnOmv/MzwyR/A66fHh1tuYmK8ww599+9sFRWiLxaEVafDUmJgRLAxpHfCImaatV5rGwcAVBgmcXL1uwMyFhb64+rvqrF4w2G2cVTtOj2JBnYk8bMKCuFEpqFFJ3nQUWRTr89Za5oYOD8rHR4PUVAaEHGAXW48SgOKnc4xBfePSpTZ79cckM8KPFhcNDa0z7fdKD9VyjxmvGoWzG1SZAhtQY8g1Y5x0hkaxFbWy/+mvp5MX6lqKYJs8ZX2onpPfv439It3UI69ThOxBx9OF1zL2xYp6kRzKxFBgK4TR/f23CMvzH/p2/lqLyRn3QAMGoduBVqMe/RKXZI5b/sVoACz4uCD05thRcR+akfYyw+9HEBobR2FE90cpJWepNO88FOvnXor+1AmNutYQbK+9WfBQIJcQrAs2cXF41kisjxg== 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)(8676002)(4326008)(66946007)(6506007)(8936002)(6666004)(2616005)(52116002)(66476007)(66556008)(86362001)(956004)(107886003)(6486002)(6512007)(2906002)(316002)(83380400001)(1076003)(36756003)(38100700002)(38350700002)(26005)(5660300002)(186003)(508600001)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?h2PdCe3mq08m6X8cE1mm2vsSYH03scO1eLeH3Q58yurm1ttcU7ildOo30pOF?= =?us-ascii?Q?9tqdx/Y3fXHZTMfrhurqObgnqokCaXVbKaWW+cy6bGp4fE+syWq/saKU1eIo?= =?us-ascii?Q?mVbSJbK8PDfqf3y+uwOvDFnVeBxWYNyD1XWQMVIXUDHsTYaDWfnhTtZNNnty?= =?us-ascii?Q?feF8IcF29+0+kj4ipBAbEEJgePTZimBY0R6RY/hzEeGU+Z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g/8ZfREwrST+zcqKn8VqFN2OTtSIOH+kC6vEVNXz9z?= =?us-ascii?Q?c9ceXR+hfY1nXfN3qLgRMBzgyceU5cZhqDtvxjUNLxUzQnBDkAgRUTDCHikf?= =?us-ascii?Q?WbjlFlFiWSd46BpMrx2C4ZvCcG2M1oQK6DSUgbq+2qUVlqCqisxsc0xIHp7Y?= =?us-ascii?Q?6HoOaUuHpbEXDQ6x40OvlteRdi55+3nK+H+lEr7jIEBPQ9L+dMjtjWYk98J6?= =?us-ascii?Q?2N28qkmU4ybOoYiiacqS3hPwPZkJk7VxRhCO3SeEBPQYfxhjDKXgHssHQmP/?= =?us-ascii?Q?Tr67ztX1ojRXLOyECd6HosspMxXnfAcgNJH04b+m871i+g+Zd/TYvg06cArE?= =?us-ascii?Q?fSGUE2e0LULyZOysWg4h68hpsrBXOVxW6eQLGnyYJrhc962v9W0MyH3v4x+Q?= =?us-ascii?Q?k6TQz7/7jhOeXilBpFdVcidVw/Nv6Dm7Fr2rooZOoTFvlf3ikY1hDzcup/3O?= =?us-ascii?Q?GszfR8bxfcz87JW5eMlj7Imdgc/KwpSJj4Zh8V3LEVcRU5IgE9J0rV3cUh/O?= =?us-ascii?Q?KFSiMlxIrF7iKUmXNcNiKuulqdT9jZF0iK4Qx0SS+2WsDX1tidvPVSfm7uwL?= =?us-ascii?Q?fr8mPxsQhQibI+/XVEPw/OkHFns=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: d61e95f7-de27-4a6b-18e9-08d9b906887c X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4083.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2021 22:19:56.1871 (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: le+tyvui/1hC+kpra/K5VvdMvwJe4naoEzShWdCtic21C7E6hp2szWK2gispqsLytlftBz4wupVIhk7udOay34y/E+D3aOvfPIT1NIOvHxw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6596 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