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 DCD5DA034E for ; Mon, 20 Dec 2021 22:33:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D63C940E01; Mon, 20 Dec 2021 22:33:04 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20118.outbound.protection.outlook.com [40.107.2.118]) by mails.dpdk.org (Postfix) with ESMTP id 7D3404003C; Mon, 20 Dec 2021 22:33:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GZbeGbKynhoKzB9TxoHoO8jLuGB9w+zsNR+tKVTE9ZoMCY+vYuq1yVcV7MsmUnNf88Y246Nhjdew3LvXrOnp3UdzQ7XzTuSsl66Y7l511Czzau9oa5HE94aFes+mp3nJHwjypZGCA/y4samdb/z09/TKvUJwNVsWv8xie2YlfdGCZCQxJt7CvYFibOWz5uDINbjqT9R3DQxttS0SNU4BDxtyj7FhLSzYZuMPWXwfyca0MuSfAOpLChTS+ryQfvOmfF3OvKNtJ1N2NtTXyYn6IW7p2KA2Kk7W1K1Ubpwnnh5p4aF3hYW5fEUG1FWhvBZdtdIIxcZnoiSXlMZayPn89g== 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=Io3KozTokzD9pC8A7bsJExZ2hsx9Oy7cAB9dlWp+3Tg=; b=SfFvEa3rR80kzSvI2iNgNjqcshAVDefwp9fAYg1KhYytf5p/nqYnzFujbsRY+dv3qo6h4pQtOlrsodFM4Je+BAaa94hi9fb8H7hKWyMfWVgazzBprAmv4PukWu7YeQosWW8eTakk5kMuMaflpT73JO0L6eBNE5fG9dXOTCsUXIEm67Fq5DOv0L4U8cZ8efExp8Dpy37cVLsu3S37Zy6AXG+Gvlu61aT8MipPE0Y1KiVHB8zYz1IsVZGTfbMOG4s++wXi1VulR5odhR6IAEB3ZBpPOWjRBO27pYX5DR+vcfYCxaWakBnDDAP3Dvcc4NS+yg/d9x2xIk71DE4R5IBfNA== 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=Io3KozTokzD9pC8A7bsJExZ2hsx9Oy7cAB9dlWp+3Tg=; b=TdHksvqAdrw9H8/KMKr0Qexw4fJF5CX/MbIO7uZ4k1hap2eg5HCCKO52I8Ze1+/8FAYg2otFp93xFZ0BsSJFBJkMukSQ0YuMm+TR8Az9sloKtseeUmNGk0WEQDg+j9g2Amwi94TIXALpJKlWjq1yoDEiy4iblKSCWq/882fhtVk= 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 AM9PR04MB7537.eurprd04.prod.outlook.com (2603:10a6:20b:282::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Mon, 20 Dec 2021 21:33:00 +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.4801.020; Mon, 20 Dec 2021 21:33:00 +0000 Message-ID: Date: Mon, 20 Dec 2021 16:32:55 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v2 3/7] net/ixgbe: Check that SFF-8472 soft rate select is supported before write Content-Language: en-US To: "Wang, Haiyue" , "Lu, Wenzhuo" , Changchun Ouyang , "Zhang, Helin" Cc: "dev@dpdk.org" , "Wang, Wen" , "stable@dpdk.org" References: <20211206221922.644187-1-stephend@silicom-usa.com> <20211206221922.644187-4-stephend@silicom-usa.com> From: Stephen Douthit Organization: Silicom, Ltd. In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1P221CA0024.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:2c5::31) To AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c07ae6e-f5ce-48fd-c730-08d9c4004c10 X-MS-TrafficTypeDiagnostic: AM9PR04MB7537: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: TjCFi0oY0B0D/J9pZG9G5N0FCRVh3PRZ+6F708lldYWp+mZB9Li1yxh+ksbtwWa9a/c7KEaAbSr//CQU1MQgTjsPnOwObEGmolxcTpsm54Ee+A7edrpjlKmHwrDqC08os+eZhqaGEv1wAvFZIUrLj+NMsh4OTPRtX0PpF/fjQnYgQrgIo3tQ9XlGyWV3gAWYPxVnTfEno/FJmeuM7G0xlk4yQVZDluQjgHbdljZDsW0rDvcYBsKcmTq1kumdmD91m3r6UQWSIN6oPpSUZekVZa3b9AIvjnIWytK6OCDOu+2PnSE6At5bqzKAJRav4QLqfhUiAubI0y16vkeAU7oA55x9NXGCps555zPhe629H9h74rTEA7EG2svnabT0Gh7IdZIzO59SEB05+C6oFYUMyR8RWrHE6IwVqC6FN1X4Sa0DIx/SIjo2queS3CUrEk6F45jcRPPC9901VXr3PIKK0Cn3NxkMxpmHJjtPrYbuO32o8jr/TAHOCEoIzrcjbTfFpprI5ILeLLqwPk+BztGGbt09LjhZmHV6wc0dtFv5EUPiXmDlyXCmXkCCqRqMhSybf9R9QKSZgAsYwXtHlUPucuvvOlUUFh/UNHq59F/VPucRSYB67v0MjEtQE3Xpbv9kTbDmsxuvSPQmSutMPOwXMf5Jhrrhqs5JTFynmMMgjTcKDGOzAagx9QueTUHTcvOmujcBpmaf0T/GFPzjqB5AJ7k6i3QR9ydIoXNA96lXCw8r8ITD6wQzVixyExuY8FkGwknIdfcw6fRCy2cEkcH7Z2R6V48mIPwMxXAdSf4ReREsQluL1OJqNCuLvOJRAw6/NDdTCkNm/edXLgBJDfl6ysztlAqlxlI647Lhe9dpVG4= 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)(966005)(66476007)(66556008)(66946007)(186003)(31696002)(54906003)(26005)(83380400001)(6506007)(8676002)(38350700002)(110136005)(2616005)(508600001)(53546011)(4326008)(36916002)(316002)(5660300002)(52116002)(38100700002)(8936002)(6486002)(86362001)(6666004)(2906002)(3450700001)(36756003)(6512007)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VWlXSFA0L2l0QkYyWmljWTFPZjdVUGxQQ3B1UURoMElrZUluSGUwTW9hR3hD?= =?utf-8?B?Rm5oY2EzR083eEFmTkxxZ1BkdFU5aFhYbkJVdGxzUWZqUnRsMnduODN3d2F5?= =?utf-8?B?T0FDZmR3alJXRDh6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= =?utf-8?B?SE91V3JBS2NaeWNycTZWeExjampMY3RUZzVPV3JkaHMvUWt6ZkhqdG9SVXE4?= =?utf-8?B?VnZod3RNOEJqc1lVRHdKUjV4WmRDc2QxbWNmRTU4M2o2dktCeHc1cVVxUEg4?= =?utf-8?B?aTY5OHdLbVVId25HQVIzUDJqMWExTTkzaUwvOUl3d29jcEtTeEx6MmFDWjcr?= =?utf-8?B?VTlXSmYwM3htUnhwQlpveDJpSE1PdEhTbnRmb00vVXMrbWM4SHZWUmdsS1Ba?= =?utf-8?B?eU9DUFVIV0JKRzErVXo4RlByRWJNTTgxRmZuVEMyZWpzWjhXaEM2K0U2dHNa?= =?utf-8?Q?KZQMffZ2YvoqBxFOJNDGEsoSgudON5FX+ha46q8P2M=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c07ae6e-f5ce-48fd-c730-08d9c4004c10 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4083.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2021 21:33:00.6357 (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: +olt4GRjqQsaqg9NaScLroWd/WLNXQbjcObVitbeZ8EF+DK7TrPYZ99/OlhUJsf1pjpIgoYjcszQ8rAgaDjVqBTEiO5+nNzCcm+fIRcBnwQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7537 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: , Reply-To: stephend@silicom-usa.com Errors-To: stable-bounces@dpdk.org On 12/20/21 02:53, Wang, Haiyue wrote: >> -----Original Message----- >> From: Stephen Douthit >> Sent: Tuesday, December 7, 2021 06:19 >> To: Wang, Haiyue ; Lu, Wenzhuo ; Changchun Ouyang >> ; Zhang, Helin >> Cc: dev@dpdk.org; Wen Wang ; Stephen Douthit ; >> stable@dpdk.org >> Subject: [PATCH v2 3/7] net/ixgbe: Check that SFF-8472 soft rate select is supported before write >> >> Make sure an SFP is really a SFF-8472 device that supports the optional >> soft rate select feature before just blindly poking those I2C registers. >> >> Skip all I2C traffic if we know there's no SFP. >> >> Fixes: f3430431aba ("ixgbe/base: add SFP+ dual-speed support") >> Cc: stable@dpdk.org >> >> Signed-off-by: Stephen Douthit >> --- > > >> /* Set RS0 */ >> status = hw->phy.ops.read_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB, >> IXGBE_I2C_EEPROM_DEV_ADDR2, >> diff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h >> index ceefbb3e68..cd57ce040f 100644 >> --- a/drivers/net/ixgbe/base/ixgbe_phy.h >> +++ b/drivers/net/ixgbe/base/ixgbe_phy.h >> @@ -21,6 +21,7 @@ >> #define IXGBE_SFF_CABLE_TECHNOLOGY 0x8 >> #define IXGBE_SFF_CABLE_SPEC_COMP 0x3C >> #define IXGBE_SFF_SFF_8472_SWAP 0x5C >> +#define IXGBE_SFF_SFF_8472_EOPT 0x5D > > Looks like this is YOUR platform specific, then this patchset can't be > merged. : - ( This isn't anything unique to our hardware, these values are coming from the SFF-8472 SFP+ I2C specification. The ability to do a soft rate select via I2C is an optional feature, and modules that support it are supposed to set bit 3 in byte 93 (0x5d), the "Enhanced Options" register, to advertise the functionality. Please see section 8.10 and Table 8-6 in the SFF-8472 spec. Checking the RATE_SELECT bit flag may be overkill since the transceiver is supposed to ignore writes to rate select control bits if the feature isn't implemented. I can drop that check if you like, but the other checks for a 8472 device (vs 8079) aren't anything different than what already happens in the driver elsewhere[1]. I'd argue that testing that a feature is supported in hardware before trying to use it is normal driver behavior. If instead you mean that the entire series is somehow applicable only to our hardware, I'm not sure why. That hotplug issue isn't seen on the same hardware when using the Linux driver; so it's a dpdk problem (at least on C3000 ixgbe devs), and not a hardware problem. Fixing the hotplug/rateswap issue was my primary goal, the other patches fix problems I found along the way while debugging. I can also reproduce the hotplug/rateswap issue on the PLCC-B, an Intel reference design for the C3000 family, so again, not unique to this platform. Please let me know if that addresses your concerns, or if I've missed your point. Thanks, Steve [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c?h=v5.16-rc6 >> #define IXGBE_SFF_SFF_8472_COMP 0x5E >> #define IXGBE_SFF_SFF_8472_OSCB 0x6E >> #define IXGBE_SFF_SFF_8472_ESCB 0x76 >> @@ -48,6 +49,8 @@ >> #define IXGBE_SFF_SOFT_RS_SELECT_10G 0x8 >> -- >> 2.31.1 >