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 05E97A0350; Mon, 28 Feb 2022 16:30:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A2A341181; Mon, 28 Feb 2022 16:30:08 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150104.outbound.protection.outlook.com [40.107.15.104]) by mails.dpdk.org (Postfix) with ESMTP id EFF6A41176; Mon, 28 Feb 2022 16:30:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W70BRWsabL0dQAwg2f6+Cfow2ymfcnWnokZE4XRsAdLNfu7F/7KwgrXhPqq4BtrO3kkKsxgfp56tXbOBNw6NzklfpL31XXkAzc1+aRxEUuE/Qe6QHTq5B/2zR+kMI5ar8IGCBUWVTuPFLn1FlL6SM4PwZFFNEaQ2XR/834RLyrHQJ+kcXxubNb8CEce0Z0Vr22+bLjlUadQgWz9f5G4Zi8tvNcu7/arNxUhF5tZ9uc/070qMtJ8boKyjjFXUAFWt7K8TACh3m9Ik/YZS7Whd6hs+GHbwzXcgUs5XJzuJ9fJ1J5ZydZz9K7OcrmwDuLS3wQJkFIXSEi9hgMCHiJxOsA== 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=jvmqoXazswz7UkzrpIc0OcTS5fvS7UgDrBMkP4KtjWQhdWMfklmuBfNEWKUdIUgWpVKZoGKENxPXT0WXB7REeKFsWreDBpsrHpuVQ36E5uvkfGz9FFHsXJy5tJ08L5TeZ+DhtgR6wUjYX3HqJ8fSVJ8ylROhtdkL1SeSRUNr3p+ilhPdk9hivxmIEh3BOyDurdJxQ2WsZ22pT2h0ZjmOYkCsvUkw47PqJeabYfDkDbAKGG5GULHmAVzBfOMZb8q51ubdWS0KwVQ/DFxJWv7eqBHlnxAvrcq/HkH0/HhEfGnjJ6vZPvsHScROr3wxWyn189SVkCZlWOwfT4BfbNGi7w== 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=KXPbN0eQUiJg0MYx5HXJH5LftHpEaSnZyZvVMNNxq5XoEva5jzsnPHmTjhVN5zq1CyacHb9CdIcTJja5BabSnYWnbCMUsLFUu8LMFuFIHWyl5KvXwJ/Viz01EZDru9ALwLCaGgMKNzt96jstZXuXSLFtcS+z6fB+pIFwB/dwY1I= 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 VI1PR04MB5167.eurprd04.prod.outlook.com (2603:10a6:803:5b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Mon, 28 Feb 2022 15:30:04 +0000 Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::ed1d:f50d:740:a182]) by VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::ed1d:f50d:740:a182%4]) with mapi id 15.20.5017.026; Mon, 28 Feb 2022 15:30:04 +0000 From: Jeff Daly To: dev@dpdk.org Cc: Stephen Douthit , stable@dpdk.org, Haiyue Wang , Wenzhuo Lu Subject: [PATCH v4 1/3] net/ixgbe: Fix ixgbe_is_sfp() to return valid result for X550EM_a devs Date: Mon, 28 Feb 2022 10:29:35 -0500 Message-Id: <20220228152937.21247-2-jeffd@silicom-usa.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220228152937.21247-1-jeffd@silicom-usa.com> References: <20211206221922.644187-1-stephend@silicom-usa.com> <20220228152937.21247-1-jeffd@silicom-usa.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BN9PR03CA0248.namprd03.prod.outlook.com (2603:10b6:408:ff::13) 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: b9112749-821b-4d96-6d6e-08d9facf3115 X-MS-TrafficTypeDiagnostic: VI1PR04MB5167: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: Hs4wd4Bw5/ORwls0/XnLZTt2nG3ZHqAQ6Gv4GnlqCTVXlTcQGSd/mpe0mU7nujXjVpweR3trFK7dwmiJeMaFdWGgDaezGI0X0SuYKdkynJ6v/ci9ETgeFV7btPsAb1s9U8keVUR62OMyaSWsYp4FqNSwh0OBXxuNSjIA00dFztheHhOcXASwnj4Xx3mGW26jDLaKfmETIxscjP6GwO/H75BQxro3ZTxKFM9jZKdXnUkkssMdA/qsA+pi/6us82zxRV1fDslgEDtqNHmA8gWaU4NlJ2mrXMy+aoH7cdl9VKqLM+K28V3FKeXWG8RTqX5EOHPMpAQDESpElVKhkUxKckaGaNiTZjFVjKDD27t49Pz5s7uHXoG2VXYT+gUvhOZXjheyPau3wxNR4lUX87JDfp+xSxUdGbGvorQiDeBJsbiiHFowra6tddWcPXgMZG1QelzY+4cU9NQG0CiIaAqfKJfEOUeYQbqWC26D3d6U2IjUu2lK3K11jBzxgabCKEO4eeScRW8HTLTzGtMv9Q7rwrJ6hni5fNS9dnyVoIG863ubXcq/6+EiWIPUoK7kKtZVgt+qejlLhgKhyMQDsrvkPcqPeeTsKpJkAukcGjarDkU+Pe6cFJ4Briefvo3URfc/mW+HJv7jDv87e6Iv6+VmBkbllKSzQoV+iY5UiqQPrbddOEQw253jOCKjB8/Hi14UJQCLpRnp5DK6d/RkP6e6/w== 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)(6512007)(66556008)(8676002)(66476007)(6506007)(66946007)(52116002)(4326008)(86362001)(26005)(186003)(2906002)(38100700002)(8936002)(1076003)(38350700002)(2616005)(5660300002)(54906003)(6916009)(6666004)(36756003)(508600001)(6486002)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?dAuSwYTI5gOPSt4LbOQWeMVyCeSpZrXWuMXldyWuG1tKkAg74cD6Vp0V0/MR?= =?us-ascii?Q?VVH/KIFmwslNUjrJC5KTwB6Y8JdQ2LM6gTjH4CTrBexdymIwdzIRI6cNMy1k?= =?us-ascii?Q?91fM2O70syPktmdnLIcouurkzJ7MwK1ubW4BtqzMYv/XsdWDrXa0+Ws0WETL?= =?us-ascii?Q?Cu5jU4LF8H6HDH4dtXhzT1V9WIts1OOZ1cd2uxaOA/EfomzcC968tyKxFwU5?= =?us-ascii?Q?joAOBN4aA+C0G7rJglgYsD2sIQ1o+cI+ZjFRX4ObLRokjEAKBD82U7RlWTuu?= =?us-ascii?Q?57Ic7Z++2UwZ6FBm3ebR47oceuZCqXryDD6dkDRw0/bpIrIgP7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5Nu93NuX/8DhWKetI3OsTx4jqOib14t4XSRcrr69zJKKZKM3kIsSxq8?= =?us-ascii?Q?Qht0rlUK4KkP1/2QTz6WzQQqW6yn8XMDg4/AajHJiWUVcVHcqwxuyyE5JLAy?= =?us-ascii?Q?0mGijnFPiNKb8jQEGatVbGeGLEyzLlElnL1bwedRLy/riqJnGz+OKD4FwIRr?= =?us-ascii?Q?W4MzYQ61NXvUf7BTQ70K/9kIQgdivGpwMkBkJjaOw3JAvuDuQGCbFKJTzSQx?= =?us-ascii?Q?pNTwWeOGko31ULtlWcA4yqSMcUc8H5NqA7/isbjHG9z+iZXcbThn6z9mYnHQ?= =?us-ascii?Q?zGmKwPr/REv/njAwXZldjKOuKCexIWkWxIJBdhLFaV/0iWRSQp/TI65P7RLK?= =?us-ascii?Q?K2ql3NvTMr8RAwc8QO6O4Oampn5nbc6obiIDSOYIlMxZgGR7pcG7Nug4UnCs?= =?us-ascii?Q?zIaViDeTdvnydpmmeGx4TvI=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9112749-821b-4d96-6d6e-08d9facf3115 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3517.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2022 15:30:04.0797 (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: o98fXUrnIfw1PHH0OQgIkfzr08qUsz3gtvBucINfJuN10FaD71nPKhNaquX/XqjgJ05YD1OtaMHAuiOtlmQjng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5167 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 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