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 D308AA0503; Thu, 24 Mar 2022 02:00:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B15541151; Thu, 24 Mar 2022 02:00:44 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 617C2410FC for ; Thu, 24 Mar 2022 02:00:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648083642; x=1679619642; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=M26IRr6wKNxv0qfCkumDSZ1oGvSMYCQwEyg46JBLnGY=; b=X7yacZUfUWPjI3P6xwPQNip3oTKDDXmAvV2ApBwfWMWhqfVuZbcQTGFa HiewtfDE4HqO4iUb12g1+uNmsaYByLYSb/guaq1BVQZQGSiR1eRVGPFb+ tbeZ67xzoUijEP8KSxBE6urfib7rwNS4cRGJ6yMZm31++/tBYqctNCo90 1F8hi2S8m0WbWaezWpIam2eNlarv5s/4xob/N/RiLrMN4nWT57pQHLu+a +mMGJH4D/C9uPB4SeLyL6NETSgTTZ1qtdjvuwnCu6E7nMV2L0dH3QVLav cOBV4yqemY3U++DN5JMKdFNezyoAmwmMFD59gfOA52asPEeIMvqrDC2// A==; X-IronPort-AV: E=McAfee;i="6200,9189,10295"; a="257972817" X-IronPort-AV: E=Sophos;i="5.90,205,1643702400"; d="scan'208";a="257972817" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 18:00:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,205,1643702400"; d="scan'208";a="647684163" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 23 Mar 2022 18:00:40 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 23 Mar 2022 18:00:40 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Mar 2022 18:00:39 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 23 Mar 2022 18:00:39 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Wed, 23 Mar 2022 18:00:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mzI6gOmSsfD0bhuPU8AzULc2PhZN/mKMX9fPEsjksI4S1Hz/T46UZvJVjkj0gD4OcqapiQ/+4NCI/cIXTzhf1ItY6ifsF+6ilHaG5N1bsWTdncFHXboyW6TDXhanU5cIssjigk6RYAj/gOqqpDlGob/13yya8N0kqikO+sBhSINRZf4fEg8roAH2oXHbDt6QkJsBkZHk831kYR8ZnN6/HnIxwJXZyvKOFwvlVgUXBh6ELkDuuVMis1wkz3HewvQRtVMWO94JgnnV3NX0i3RoaoAT11QevTmaelmcYkZLoOAM1FJlkaoVSBxMhr6+iqQArl28LTKajbMa/Qu7hap7gA== 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=QbqbHo3tF/XfMq3XDswEgpe/iQpKxNXg8BYiGrw7xVg=; b=laIUP6GhuVlOJXnoCt7O+z3iRWu9zo1TLsPfwV0MZu9K3mBT7PGxA5ZLVo3UIIth6wQlwIPig9BnMIw7EJA2QnHw8TdzZGXt4G8js2O5078A/uy85SoW8MS+BiQZsrn0H0USJAmEZR/0UH2LMkCD/fMXrXTJbPC2phzwrSCeMllI9H926tCQSi3XXunuNM24ghqCAHUy4zYfVPy7fc6g+Y3eLwYGGlR0wUnZoemk1eeD/MUkVM9qiWdutyOX5AWL+8FGv80DhfvqxEusT/6djjFHJQju4tdX/tLKkb74c/goszL5o53ILAmHiDc7kmOlwa6YLsb7EqZ3FWbWdQjhfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3495.namprd11.prod.outlook.com (2603:10b6:a03:8a::14) by CY4PR11MB1239.namprd11.prod.outlook.com (2603:10b6:903:2d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.17; Thu, 24 Mar 2022 01:00:36 +0000 Received: from BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::cc6f:9806:bca7:2297]) by BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::cc6f:9806:bca7:2297%7]) with mapi id 15.20.5081.022; Thu, 24 Mar 2022 01:00:36 +0000 From: "Wang, Haiyue" To: "Daly, Jeff" , "dev@dpdk.org" CC: Stephen Douthit , "Daly, Jeff" Subject: RE: [PATCH v3] net/ixgbe: Retry SFP ID read field to handle misbehaving SFPs Thread-Topic: [PATCH v3] net/ixgbe: Retry SFP ID read field to handle misbehaving SFPs Thread-Index: AQHYPvEzBj5VLgvebkmq0L8OK0rmrqzNtv3A Date: Thu, 24 Mar 2022 01:00:36 +0000 Message-ID: References: <20220307223337.27876-1-jeffd@silicom-usa.com> <20220323200346.22318-1-jeffd@silicom-usa.com> In-Reply-To: <20220323200346.22318-1-jeffd@silicom-usa.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 36f8cee2-c288-4599-199b-08da0d31b508 x-ms-traffictypediagnostic: CY4PR11MB1239:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr 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: HUbec3FkNWoE6SSO0fXX7Ph3XCxdiwSUuXvTAw9pIk32OR+W8t42S4bmv/YnQSMdsV9+IzQDCKL8fdpalwMreqllbY8CZF6/wN0oOqxV9SA/i+JtnKAnkj/tUY/FLmAvveruRi1Jv+OZhjuBy+rgi1OTrayIpcymjCxECZlUnejGSandTt+vc/kzRmAxPoERXxoxHnybi3vIZ6b5vT28w7ycB9AbDYslgzhN3GNjpCUb176jhQhIIrS/l3wnXo+cqR8KRFDLWVRcD+xd4EYtg3xI7Wr2yAqZyR6maV3HKgGEYf6J004EZlwa56tejxCQBb9sJFKRoe9uliHUS8LCzqgLuyZ/q69L/CfTiT8L1O50UoHIgEhwrO9eQPJrQjWYm/QovyM582ArXmtYU+ZpRDywum96vGdnrRDAB76Ui7l+QN7yE12lXH2UkhGzNIK8u9PaTUIhtvjYUxhYJJDr4MZ17vJn69E/CZ4Fopzw/W7NyCq3HvWBmzXJxI/8ZVkxhNZnQ195vTUE+VCB3PiWiVpUvArITuUGw9KO3XcwpZucSaBlNunE2Juwh5jWz3tZK03gBU2/WJjHP8/ftALWmyxs62a9YypFfSeMasQkPo8W+bWgo0r/u/iUvo8gt2Poc0bXYY50Afxx+egAIHbup/PqXpc7rJm8Ff9xSB/5/0iOQtBOjlf29TTB4DBNCbzPH75HPIejrTiOxZ8nnkvJxg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3495.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(82960400001)(186003)(316002)(38100700002)(55016003)(86362001)(54906003)(110136005)(9686003)(8676002)(71200400001)(66556008)(2906002)(64756008)(4326008)(66476007)(66446008)(53546011)(7696005)(122000001)(76116006)(66946007)(6506007)(83380400001)(26005)(5660300002)(8936002)(52536014)(33656002)(38070700005)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4DtC8hmYu9lDtuVt69US2Zqh0vi3PJjHJYHnzP++IJVW0EP2QWgXzQwnHW3j?= =?us-ascii?Q?wsbFPzDQu+qsyffNsT2qCK6uWklCauYaCn/X1FlBXz5oA98P+K8RcF1Prlhr?= =?us-ascii?Q?3mdHnZyPv0RXWF0fLZ4NtzmC7nf7SkgSdQcGTPmcyyvPivsUhp0x7KOpBRlr?= =?us-ascii?Q?snOpp3Lp+OdZjncRXQ5f522riuYtB9fo0TNxaDWRsTzR4fSFNSQCH/nT6oGr?= =?us-ascii?Q?E5cbqGoB3bBLz+kOV+3N9bLU6A0Np9i/xtH8RKSkJu5HzQETogbHcGtr/OxS?= =?us-ascii?Q?ZPrhAClIEt0QTVS2jSsl0NnBdbp4mS9wfFbQblKxULetaaFg1qfQslkbuxtS?= =?us-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IVjBTepSv8DgjVoVG?= =?us-ascii?Q?ua3wMb5tEufJ3mF2Dh1DBHdy9jWOuTiTIQulinESd4RsxbDKUCIZw2PP7Q/R?= =?us-ascii?Q?nEaX7uT82wRSLU6rLuBEY97EIIYyzckjx80Os4k4r3Eu9Re9lmfDQTg4SiLD?= =?us-ascii?Q?Ob6l1SK1NvLv3n5EA6MTgYi5/63Bhr9FMEw/JbUnRrHyHxdAWxV2n62xZ/lA?= =?us-ascii?Q?1ZWtAAsiNM/Y80RJ6RfovUiHqVKsh3eN?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3495.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36f8cee2-c288-4599-199b-08da0d31b508 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2022 01:00:36.7330 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zlXUo0ETSXCQSbYw3FF+0vRCYrYaFdRZfBFfy9mXABzmqyXcHfCsoUi6LyHjupRJIqNI6mm17DLLr8F7wnMf4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1239 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: jeffd@silicom-usa.com > Sent: Thursday, March 24, 2022 04:04 > To: dev@dpdk.org > Cc: Stephen Douthit ; Daly, Jeff ; Wang, Haiyue > > Subject: [PATCH v3] net/ixgbe: Retry SFP ID read field to handle misbehav= ing SFPs >=20 > From: Stephen Douthit >=20 > Some XGS-PON SFPs have been observed ACKing I2C reads and returning > uninitialized garbage while their uC boots. This can lead to the SFP ID > code marking an otherwise working SFP module as unsupported if a bogus > ID value is read while its internal PHY/microcontroller is still > booting. >=20 > Retry the ID read several times looking not just for NAK, but also for a > valid ID field. >=20 > Since the device isn't NAKing the trasanction the existing longer retry > code in ixgbe_read_i2c_byte_generic_int() doesn't apply here. >=20 > Signed-off-by: Stephen Douthit > Signed-off-by: Jeff Daly > --- >=20 > Notes: > v2: > * Removed superfluous DEBUGOUT > * Renamed id_reads to retries > * Don't assume status =3D=3D 0 means IXGBE_SUCCESS >=20 > v3: > * Removed extra braces around single statement if >=20 > drivers/net/ixgbe/base/ixgbe_phy.c | 27 ++++++++++++++++++++++++--- > 1 file changed, 24 insertions(+), 3 deletions(-) >=20 Thanks! Reviewed-by: Haiyue Wang > -- > 2.25.1