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 83317A0505 for ; Thu, 19 May 2022 20:03:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CC1E42B75; Thu, 19 May 2022 20:03:17 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2114.outbound.protection.outlook.com [40.107.22.114]) by mails.dpdk.org (Postfix) with ESMTP id EE62D40156; Thu, 19 May 2022 20:03:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7UNk0fp8AAnQLZocWVLGqVtUJmD4B45vTo+Rce8AkpAJ2H56LjA4Yh9Yu4XtPJDd9xzhG+Bx5iY5vhTaPnnqGeYORz/JRDtl1T5t7aS3UgblnpqxkoKELdxpXTrRcVYVQSFzw7JlIDzGfRm6yhv8PFtC/Ava94XdNhF8/U+rBOB1A/Fs1iv+H6uMfKj/wsfx392TBAcyry+UBrjUjKPayOI4QYM/BVRNp5QueaNwbHoI6iFUEppdnSrGIVz7XkJu8MIWt4ZkLuXAWtsKQsO7ix6xchv6ryJPLI/8J4MS5e6Y2QkxlgdpI2h4PbLmKLIeRqLsDRHJt4GjSbSaPrhgQ== 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=V8n7T4TOWCUylXICp9NAR0R4bcS9JF+mVi7j03K2J6o=; b=gQMpx39UfLvIp/m5XZ77QaobO4VMIO/f4QNGjdsL6eFT/t2YSIMon63WpO62+d2hrm6+WP7zwGjbyI2qklWrKVRClBtbuCeWFVg81wey5bmIz+SxHX13faIvwP1ixVfA1Es4U4f9Q9TDTUPK0gF5CNo9WP0yw0vMDFaHJPvZZorl9J18mAzQeMp1wfmHeWxl2k4TWh6TBwQyjcTVWRF35kIBZPEBGHmy4EVf36YO+3B8wM+/EdDeFKtADkiYSH3bO6Jo7erm+XadfpdYEjg5VF9wTQVnLghv1m1kc+c7XaGYoh1zZlbVtC7EIna+RCT1AWQuQEaWO/XfDI0OPErbOA== 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=V8n7T4TOWCUylXICp9NAR0R4bcS9JF+mVi7j03K2J6o=; b=gvyZwjktR77gJ+HClnhnrN/voQpz0xsmLOFyo8W9pRJTZ7q6pcUjzt32m0Wtj/pTxMcsJspWV1ed109J9K30FSuwTdFBVv5lWkjggQ7nciZi6MVQ5VeMaFWhoM44EBs2uXu9JaNEP7uMAxCLLgzgr5eC6LCVe0JBDWMVDoHEwYs= 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 AM9PR04MB9001.eurprd04.prod.outlook.com (2603:10a6:20b:408::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Thu, 19 May 2022 18:03:14 +0000 Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::a8d9:7211:83e:46db]) by VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::a8d9:7211:83e:46db%4]) with mapi id 15.20.5250.018; Thu, 19 May 2022 18:03:14 +0000 From: Jeff Daly To: dev@dpdk.org Cc: stable@dpdk.org Subject: [PATCH 0/3] ixgbe: Fix SFP hotplug detection Date: Thu, 19 May 2022 14:02:45 -0400 Message-Id: <20220519180248.23831-1-jeffd@silicom-usa.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR03CA0006.namprd03.prod.outlook.com (2603:10b6:208:23a::11) 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: 04bc2756-7827-4903-3d54-08da39c1d803 X-MS-TrafficTypeDiagnostic: AM9PR04MB9001: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: mNlqK0JvYgZ876hd0Mnd54N4GzVTZ/Hbu3noGQua8aos21hQxknJrdnTqdAVbGOLL50FcYi4C7veHFZZkchwUaEftlI0tW8WJH4MeKaoyM17AaqUs+mCJyXxPGP8koz+C7L3t29NZKCNyFTDKTalqIOuL8haXqLyyg6xr80v9Sm064ICeEgxjKatusi/ETZPaAPBTnNYHG5lSTfD5B8AGdD4nUr5euTz486/Su0xJq08/ZFS8dhAkIPKdMoqOhysDKDnFXW6C2ueYzdt+OvbNnN9Vh1NQXD4KLkG/12eqwTPnzxL1apymbCGD2P0rafExbLyPJ9LkZcKwwcVqv/Bn4s/+ifa/75pegU0PbMPZCz4X02NqcKNMaVHcBJ/JIFLP4ZhD74j95YHaUPXhxDkJdAlnwV0vI6xJwrLjF7b5mUkekxb2aKiblPPSF59o3mWmypNeFfforQgw/H/A3clAMH394MNiziZm5uHsmbuOAVfWeSiDCcYcKTUi+e2pKmRaK/tzP42U3MFtKdWOrv3SNbg6p/kcuT428x7+ABmDaH4K3tGfkV3XllYSZ+/St4umGGu27IghSUkK/gBH3CjeuCeNWysKizJ2y1UVllZ8eQBScGOWbxyzZfZD2VkNXPzSSKo6Ka+1O90E5vvB4AGL8Mvvyr1pKxF77KsWwVPDc4dUPSqUs9ywrIc6WjtACzgPOfF3uSgUnOyFYbzbdJ/Aw== 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)(83380400001)(2906002)(52116002)(6666004)(1076003)(186003)(26005)(6512007)(6506007)(2616005)(316002)(6916009)(8936002)(36756003)(66556008)(4326008)(66946007)(66476007)(8676002)(86362001)(450100002)(5660300002)(508600001)(38100700002)(6486002)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RfGf3REHq4EisjlgQU33v9sTsOvmRsgG1AYVZlGVg8GTyxr+IowPqB4MjN21?= =?us-ascii?Q?a+gl97EqEFCSuBoXUfYGgayC1bcV9liVR3rH/+NiMnPXm9kuusX9f/OTIc3S?= =?us-ascii?Q?9odm/fz7FiGkLJVrH/24c915bQksKM9ufZTJHDbuO7Ed0WrDHE1mqJEghnQo?= =?us-ascii?Q?NUGWp7ZBPl5ZIdrehYvH9ul6oc0z74x1z4WJ+OmI62nLp1vqVqy+BRPZ2H7U?= =?us-ascii?Q?HR6HnCGDBN5Z7Jwr/w41w7prnBwoMAL9Rzdd1E7+6O6FMARzy4Ow3AL9DhmP?= =?us-ascii?Q?D3mAP2dZqJlQIvTKOqDdRlstsRaAy48/IWelmWz5B/i+2fIvphIVZscB0oyS?= =?us-ascii?Q?p4rgENqg6o0HfoKacNKKfcXLqpL3bdckfQF1rGfRktkoSE1IO+5SvhQDGMcl?= =?us-ascii?Q?CxqUQmAvfN45374k3bkwCbErzrPWuc6yyuha+Z0tfDiuSbIcrd98vXnFs0Ph?= =?us-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VnkE0hFWByuSos0vBj8D+PRG8DLRueWA?= =?us-ascii?Q?VscU3zbk/fAs9OqEi2h5Po1undETBwxRagmo8kHGXQ4nPhPhfZcnl8CaIs89?= =?us-ascii?Q?f7SXtsgKu3UMWNAp0l/kb7q1gQVzA0Vx2U17Fdp2DdrxcZeWV24pVuGAhTHp?= =?us-ascii?Q?EHcW1+TPCfVPF4NhUM5pCqQDLaBZORt4P3Ha5AXRjCWG6M3OpxtKoHZAhJt5?= =?us-ascii?Q?qoGP8FplUlD4b8WaxVKIyUWV2nif2vZcRPTpWcIoEQcRz4JomA9jQD4ECaPb?= =?us-ascii?Q?yP491B52ymy6Ix0nQocr3HS0ljJcRdno6PkBzPEhoLYrlZDUAW9rjrjf7QQW?= =?us-ascii?Q?DP34tGJIi1Tlfjrzt26II0rIy49BDvvFSEY5U9RP1zTQilxHeVTtGDtN+MlY?= =?us-ascii?Q?cRJbJ8H1bw=3D=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04bc2756-7827-4903-3d54-08da39c1d803 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3517.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2022 18:03:14.4096 (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: PUMkHagKrf8aLLgyN0wlv0A4W+kI3Uh5DgDCDefzlK3XWP9PZPKGkhWud+Rg8CwxaLgea/t1bpm6KC0GFY3oLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB9001 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 the ixgbe driver does not ID any SFP except for the first one plugged in. This can lead to no-link, or incorrect speed conditions. For example: * If link is initially established with a 1G SFP, and later a 1G/10G multispeed part is later installed, then the MAC link setup functions are never called to change from 1000BASE-X to 10GBASE-R mode, and the link stays running at the slower rate. * If link is initially established with a 1G SFP, and later a 10G only module is later installed, no link is established, since we are still trasnsmitting in 1000BASE-X mode to a 10GBASE-R only partner. Refactor the SFP ID/setup, and link setup code, to more closely match the flow of the mainline kernel driver which does not have these issues. In that driver a service task runs periodically to handle these operations based on bit flags that have been set (usually via interrupt or userspace request), and then get cleared once the requested subtask has been completed. Fixes: af75078fece ("first public release") Cc: stable@dpdk.org