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 3FE0BA0351 for ; Thu, 24 Feb 2022 16:24:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36254426FF; Thu, 24 Feb 2022 16:24:47 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2122.outbound.protection.outlook.com [40.107.22.122]) by mails.dpdk.org (Postfix) with ESMTP id 7E13D40040; Thu, 24 Feb 2022 16:24:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ddRrR5QeKaYPQ/558W4TpVDiqrWPNEAui4uBLtQ8Rz/AWOU04c+7tsd/Zm1YvorR5U8WurPZtsNVWbgQdRayjiKGE0BvNuy+ltDtEcKuaan62z3133eSDqy1rJhPTc0ZKb1Mwcy5smtBQGBq3RBVESrHh8QdW0+XA35WiMjaoLLm95/NMW0FHyagGqJCjjTDkCMMQJmAg5ugMpt5tUZxGdoCX5uue5eRvRd2beeGR3TcDCVc369QCOifmo5vZ1PdOHZQ03l0gT64ZkakPWFHWdM3awt+vMmO1S1mbBcstq24Bmq/PMyzmhLvYkBUDfRqg0KMuzTSjRl2PjRxzOzPyA== 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=xfe2bm7ZWGva896MbzuwhjK0Rm9bFw4l/GglJlJO5zM=; b=CKGLgUfRMPSccB7jFhvYQ/LcTU5PWBNS5qVcXqTjFXfHDFYDz/5zuey7+WUg1Ft9+rg+vAcdrLENDiS91coHV2oKRd0tXJx+AZYofev6lkRyapQR7JIrrR92biYlyQwD3+ZTJ6Yk1mXvVaD050E6yruz3npda6+6cFP58EfCvYHV3QPlg2YN9MRlB9a69jTNMh8d1lZ7pD2ZKrRU2z68coDkE81sKFefq7mkA9aqkg0pf1m60S9Gourwggb80MYqRytzByXyfD+o5C3qrMvwYjPO54gYp3SZZHH9Dhu91JHqIZRrzVdtA2Tm2mJGwYaDGfleh48cBvZ5oR0nhuUHFw== 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=xfe2bm7ZWGva896MbzuwhjK0Rm9bFw4l/GglJlJO5zM=; b=EbHVZI6puzbkrUXFp8uX9o7fmy6TNXOzITGyQS8oMP0CunSF/5JzIKvY/qQbAl9FAJML8pZfTsLHFbfFU9pT1f8MNpQOZHxQBhINOm7qeD4pBrm5z+gxmsLwvKVnZZwCp7VF0J2b0kicVH/a45D48TigZs+Wd9FQoK6Uwt2n4aY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com (2603:10a6:803:b::16) by AM6PR04MB4200.eurprd04.prod.outlook.com (2603:10a6:209:4f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Thu, 24 Feb 2022 15:24:44 +0000 Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::60a7:f65b:9a18:4d71]) by VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::60a7:f65b:9a18:4d71%4]) with mapi id 15.20.4975.021; Thu, 24 Feb 2022 15:24:44 +0000 From: Jeff Daly To: dev@dpdk.org Cc: Stephen Douthit , stable@dpdk.org, Haiyue Wang , Wenzhuo Lu Subject: [PATCH v3 1/3] net/ixgbe: Fix ixgbe_is_sfp() to return valid result for X550EM_a devs Date: Thu, 24 Feb 2022 10:23:55 -0500 Message-Id: <20220224152357.12277-2-jeffd@silicom-usa.com> In-Reply-To: <20220224152357.12277-1-jeffd@silicom-usa.com> References: <20211206221922.644187-1-stephend@silicom-usa.com> <20220224152357.12277-1-jeffd@silicom-usa.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BN0PR03CA0043.namprd03.prod.outlook.com (2603:10b6:408:e7::18) To VI1PR0402MB3517.eurprd04.prod.outlook.com (2603:10a6:803:b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b979ba49-0709-413d-a63b-08d9f7a9c8ed X-MS-TrafficTypeDiagnostic: AM6PR04MB4200:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x7OR4vWD2A1hsY3ErXqbYxfABay92ZF3z3KiHOcYgN/11CI3uLgnx+b3pmsPWLDAYZ19uwGDDge76nAymrOoL/XRPP70+vs78hQnlU5+ow/frERYiKOHK/dspAmPdFhT0lm1oJJWCffDwp2EI+IVPiQnFEf7qOXTzXuL3lpEzIjMYVqOzdWE9bZ/iYfSAsZ+JA6rlcW3g8h0c1DYlABRlNjcZvOrnmoI3DMHWX3YGDi+gV9kyA6fHjWr/M0V5Wk/7yxXvfcfSxCksrpF1cimxo1Mof6Y9GQkna8iPCA3hwpvCWP5cRCNmlP4prljm0NLEySkmaWdMjw2NAXc6j5TeNPl9ZFpsOaAOKiuJgS72R4iDKnCkP6EDxpJUk7p0GB/es4ESEHJMAWoumHCRH2hWxynHPKtvxVEWbU0UWQoRs4q2Ex0iwgsXS/td/6lCRvGAclKb4qI4zVOllUPlz8eOHU7gzzsWXTzSIDx/ng2i8N5yL8vnxovpcbA+dc4TrG5OhYCXyDyhoDwOk67ckhVHslRNFe6iZ3HwGHp740Y8hPJUs7OIrcUUEFNd2QlOOvttGQfaCUjUjxO55w7YXkQD4QTo5mDTa8jvyO+VC633YzcH9ueKshIvcTh4rnIUIyJwGtdT/JcHi8DVOG7NXJ7NIf0dhhY97wC2eSEoIv7vRC2gPyMJ9FKycHdjSFf8TjeRWkHYKuJIW97lcpAo3mgMw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3517.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(8936002)(5660300002)(66556008)(66946007)(36756003)(4326008)(8676002)(2906002)(38350700002)(38100700002)(186003)(316002)(6916009)(6506007)(66476007)(54906003)(26005)(52116002)(6512007)(2616005)(1076003)(6666004)(6486002)(508600001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?n0/hRrh6Gjx66euQ3LaTaDAJPbFe5BdqQOoShLTLvJlwUBy163K9wpDJeuC2?= =?us-ascii?Q?sy+qB+jSakNIn9x497r/zMvh5vNMTeHAhZD2PszRDbBQstOj/afCPw3mSwhF?= =?us-ascii?Q?80e7QAqIDFkuSqK0YU/7Zt66ePJg1ovp2AKantW8RZSQiK18/q4hh/kcCJw1?= =?us-ascii?Q?ZgfYwcXCY1im5oEFaf9YCM+ao2UJip4IeH9rlBOgZ8HjFn1K1BZQZryeODT+?= =?us-ascii?Q?qSSl2/IUuIVyzHsR7npHnXksC/shoMWFDNh7Gj8u7+4zlUgTpzGRd2K1/2cR?= =?us-ascii?Q?tmdlDcjzKYDQB0AKqJV6VpkjrYOICUd/YagNItdY2Zu7gS1QQBD6B76jYbuh?= =?us-ascii?Q?I4n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ZUCVHt?= =?us-ascii?Q?sCrCIgf4fGxjLJhj2Mg+XFGY2wPyPEXRVIJqsqjLRZ5H/19qHxOqP2B/764H?= =?us-ascii?Q?6RX5RuBXYLDoWQLTi7IZFJ4BbAoePMwiWx3SzQMXOyFCxHv3NlgdhjWmw51x?= =?us-ascii?Q?gy4rLJOgIFHFCVH76qXWzsOhrZva18sSBWtv/9UPHtWqu9m1CRDgmMWPj1zH?= =?us-ascii?Q?tqBECt1GMSyigBqtkZC2YFVL/UJZg7oXzMeQUXQXduNDGqCuPuNMDQhcg7Ff?= =?us-ascii?Q?9zVzeQAqWyfCdjGgAn166AIdzMoTEm5sffydryNb6LX2xl+HxJfJA5AMYQ2z?= =?us-ascii?Q?onyhD0WQ27V1MBRsS4rKTs304haM1EA/pyMKRU4GEntQE7FEO7wIz3bWddLe?= =?us-ascii?Q?GNYpw2m8O4TJMcLUtiF6Rsg=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: b979ba49-0709-413d-a63b-08d9f7a9c8ed X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3517.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 15:24:44.4843 (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: HSqcNOfD354+Ki9Ut48Hz5jgoS/WMu1dp2XxjZbYns1voE4ddDK2CujpVE/y7Z46PH+RM7ebb0qVdLgRJ5vEag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4200 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Stephen Douthit Currently all X500EM* MAC types fallthrough to the default case and get reported as non-SFP regardless of media type, which isn't correct. Fixes: 0790adeb567 ("ixgbe/base: support X550em_a device") Cc: stable@dpdk.org Signed-off-by: Stephen Douthit Signed-off-by: Jeff Daly --- drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3d799d2187..68b28b1ce6 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -781,6 +781,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw) case ixgbe_phy_sfp_passive_unknown: return 1; default: + /* x550em devices may be SFP, check media type */ + switch (hw->mac.type) { + case ixgbe_mac_X550EM_x: + case ixgbe_mac_X550EM_a: + switch (ixgbe_get_media_type(hw)) { + case ixgbe_media_type_fiber: + case ixgbe_media_type_fiber_qsfp: + return 1; + default: + break; + } + default: + break; + } return 0; } } -- 2.25.1