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 AC54BA0C45 for ; Fri, 3 Dec 2021 23:56:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C7064271F; Fri, 3 Dec 2021 23:56:02 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2111.outbound.protection.outlook.com [40.107.21.111]) by mails.dpdk.org (Postfix) with ESMTP id 232894014F; Fri, 3 Dec 2021 23:55:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CelTMhXbWsYR7AX9d+Lz+msWbZXFsssX3oAUkJX3lMCIS/5q3SM8Uqpcwd2DI4dLdqBMW5gXHfYio/7A2xedzviM3kR80dVUqmffsLF7wU+ybRLHM9qKKdCUxKlaK8KbuVU+giq65Jd1twOAXy/yU8wWDsvAhKO9bUtkPk4LSxrYRnEs1CzPt0M7ozoog9OvLBnIzUkcJkooV9Mqqc1Acv5DdddF532BPLXT/3/Kc2WvUicX6YVBngtWF3M2DyxKZzEKrne4t/IVoW5HTYCuHD4MbHSnvZSOUyHvx0QMg/0TIzBI+Ct6vl+yeUWfKnlAsR8NNwX5AfmZxIIWy81cXg== 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=PRuATptSwonVXkKArDFsft/Uw79V6p0fKdX4cOWIM2Q=; b=RL9OTXhH5J7z5t1hTNezim2tVvffuIVQt1H7GQ0AWa8bOwbuSN4GQx9GPGjbeYFYNH7P7DYpJ+TX3Onm9scSD9t4gZs0unw8e3+NjRby1thk6NCEDUBAT/ywyN1QNg/80wwqU5dduXwqv7RMB9oZMRjS4jDvONFDGeryu6ls/ya4fsujZq5RbsjKc/POAJTx4FchDJadvNoxZE41qwT/YDjYyaTUvtPwJDSJt9Yunfy0mWOr1etX20MxsisSEdKB7G7+fADrkEX2fQ6inhAJeLhuRIAe1wLNcA/HqkrlEKHAvPwMGwAzMDepe67Ued0ouvrfByQTKx4B5g+2PkqDIQ== 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=PRuATptSwonVXkKArDFsft/Uw79V6p0fKdX4cOWIM2Q=; b=QeeuVTm7gpiL21kLAUEUTHFQiVcjIvRB3gA60OPHIuSxgExaAt2/gHlOlU5QDpP6VACorZk1PlyhIrkW4XVzVFv49PPZmZnxJ69Sc0ph5VFwpkxCwPxGJBBKaNSHfx1a6SqKWEn4uSF3keRiFpwTc7pMa5+fQ7KPhfOGVrt04Jw= 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:55:53 +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:55:53 +0000 From: Stephen Douthit To: dev@dpdk.org Cc: wenw@silicom-usa.com, Stephen Douthit , stable@dpdk.org, Haiyue Wang , Wenzhuo Lu Subject: [PATCH 1/7] net/ixgbe: Fix ixgbe_is_sfp() to return valid result for X550EM_a devs Date: Fri, 3 Dec 2021 17:55:10 -0500 Message-Id: <20211203225516.571368-2-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:55:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e6e6040-35b6-45f6-1ed0-08d9b6b00f29 X-MS-TrafficTypeDiagnostic: AM0PR04MB6404: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tAq1K5PH9YXAStnF7/1MWyQDgDSXv5I9ckugqkZACH42u0hWVkm0niqrGJ71fi49jUdOHWCMYaZfuUmrhtm+Mx2lnEBnzryqN/wi8bTwvbXHsWyjR39nu4DRNqljkGt2xRHkY5vKPnt3GZA4OXQDNqLUUYHjI3vjPeWFFLv1+D3MtgMJ3pjBfkusrggBHbvkdI37f2YS60ObbBkiAilucYxnFFQAwWjJBOX1U+VDkjWXj2LpLWFmSDHrKi56y08TEmynNg9917HdRwdyj2otPUqbycb3btYZUYizNjQf35Ku3og84PZu3lWTSXC00kHMFFHyNwgiL8bEWkvf90AivMES1PWCJAV7Fso7934AvXiYAwtYertz4/9YfrcnWLTZKvm513eWammf1Ske0fyZ/YGH+RSl+0lhxEVvMEx5t//ewiU1y/nk1KagidFr3O2v6w/grHl1csKGsCHqbwrAj3+DlCSbAJJaybXHHfgVPqWN9CyU9Klv1oVCEfaJFiCM8zOLR6X8c+ORqdVyjPlpQf8ejEUR/+3jYEdg5Wy/bOxzy/3L63jq4Rvsse/bCKBfQ4d+51GC4YQgb94IQNr4cTcYM5+H+vgAq+IvjIyODNF791MEKQQbg0klFTU7FnTTxxWqK+bHG77Ozdrx0sHrSzpqnQwGgcqK+x9nhpbp7qIv+CybLwIqVY114zWdG3+p4k7j+TaL4Bv0FqoT+9nThw== 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)(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?uKRxLmfvsYQO0yCHOYdicCvYFW+Y1BYGt8X5sB9WSRwBTzxwVgqzfd1y3Wxg?= =?us-ascii?Q?b1bFYDcKx4CHX5yQHNsr5rJTtFvUfZyvfBYIKaH55uiGHHOPvwWGtNCxrQND?= =?us-ascii?Q?FfW2AvRN4G+aEyXlHDN0hcY7l75ygDwG7vqlxlUB/fndkLUtOCdXL3fPwC3P?= =?us-ascii?Q?/p9eB/3TepJqus5xTkT8mkgMZ8w1ASf2GN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ZVrErQUwEthn5M+PPre7vGD3vl17FHBO6uLZVEwUKZhHA?= =?us-ascii?Q?f9AO0WjOjNtq8k0X116/Shy+D05fUqi23JGX20QrYUJ/YCLnJ64FzRmRkDvp?= =?us-ascii?Q?x1Vv4kwLABzx33t5w73XAgBDWjYVGwqJSLhiNStmEcPF1psmwJQdqSyclCcl?= =?us-ascii?Q?T6sNIAiPYnkkhCTiu567Ub7Wr/DsT6TR7kEOH0Ne5F7yzSXO3/c7un7x33uM?= =?us-ascii?Q?kqTYbgKYFb0iCUvK/kSKu5Ct/Z48u8uswnJiRfr+KDBCb8jlnSH+Qz+H4l83?= =?us-ascii?Q?Ewj7beykpaIHzVGnHkaikWUREBes9i9a0BjnP7MkGGEaCHc5BelDPZA4WZ2c?= =?us-ascii?Q?6R/0w/YQZo4kX5FHyaF3fefPra80UrKD9Zrz+Hr1rm9MPpdXUMMpQ3Wk7rsP?= =?us-ascii?Q?pHK75qhmCD48kF5oGKuy80FgAyhgBCdXX/kBVoj41UrfWqLq9A7Jrrkft5ZO?= =?us-ascii?Q?RsLVW+ElSFNWO+hZrrKVHoshdL2/X8SovmLKZkkKHlvA2wjyd1hojoqOL+G6?= =?us-ascii?Q?OyK/FcRivs5RVkKeZ0vrief0MVlebN5agaSKk9ltiSSn9YcV8ZfIgzd1G3tq?= =?us-ascii?Q?Aqqex7XVlLWZ7JwHiW2KnziYjbs=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e6e6040-35b6-45f6-1ed0-08d9b6b00f29 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:55:53.6826 (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: 06ZGybW7rviFJOTx3o9dypWzacwaOZqx6RNVovIhHvCe+jloVGaYnSHy6FNNo/PkzHOVZqlH85fBEdB9rpwqyxNQ43sBM3uEtN7H38L3k/E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6404 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 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 --- 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 fe61dba81d..66f7af95de 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 (hw->mac.ops.get_media_type(hw)) { + case ixgbe_media_type_fiber: + case ixgbe_media_type_fiber_qsfp: + return 1; + default: + return 0; + } + default: + return 0; + } return 0; } } -- 2.31.1