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 6EF5CA0505; Sat, 26 Mar 2022 13:15:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 177DE41142; Sat, 26 Mar 2022 13:15:55 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 75042410F3 for ; Sat, 26 Mar 2022 13:15:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648296953; x=1679832953; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=05K2gd5ZEwFhwO15SR3UQHryhfV+Lzwh4vxYDr1zNcQ=; b=h5zP5Y130kT9+fY+BtAu6BlMA632WYMbWCED8mCW4d3mwP5yBEmqbCnm ilUr1GQ3ZwbgowDDGR+RuSZW3CokjtE1Qz6OGVRGwTkLHLwiy85Q+vGN0 lOI+rpRRbygi9pb83x6MJALCTTQyfagU1bUyphu99CFUhUPF4/DQjeUgW L2BW61BMhLOBmrI++0H80cUJTt78tihZb+YRj6ufMfaD8kmwBmf/MCoeu gpq20UtH+9yrBMzJJckaOiICYVdA1ADK17PhrJLZY250ghKqk75IgS5eU 130gaug/6YnexKb8cq7n4d2ag7lmAAUExtMf9OdIkvpZahC2lgED0yU4W g==; X-IronPort-AV: E=McAfee;i="6200,9189,10297"; a="246265803" X-IronPort-AV: E=Sophos;i="5.90,213,1643702400"; d="scan'208";a="246265803" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2022 05:15:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,213,1643702400"; d="scan'208";a="545388031" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 26 Mar 2022 05:15:50 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sat, 26 Mar 2022 05:15:50 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sat, 26 Mar 2022 05:15:50 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.45) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Sat, 26 Mar 2022 05:15:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hs09ZQIQmEkRd4wlPPOWsDtjLtD5ocjBRf02GngiTisk0la7I23ga4h3pEnnI0Fp8DF0NnkwLNFbsk/IzR3PIEBEDrjJS8yWu1m5jhqkH41OFg2Y693qd//Ho/xN7209sAeaBnaMdw2NclKz6os8PQTjzOgWdsZUD0ORywHJF5/ixSDTHgudDI7oOWrRWKJH+sIvZH9L/5QLA4GGQgFglPs4IHQxLHpyP/fu28lUUGvNXCqLXJuq8fO8rezDNo0CCEfBvS5FPVNarJh1nyj7PnAiHXXqByWKKC/u96Qk10ot/P7wnsbpird8H1C0kfuE0QmpF7DyVU0k4PE6TMfeKg== 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=6F4HxaOqITPix84WPWOaZnQv4EWhXbJLMxRor+9cvgk=; b=kD7OvxFSVYmXrGcjs+dL3u9cpg+EtkKtNIDy6klqp66BCDaAMdVcL++OH/XP1Q7LvZ/2asOHL4WSRzRL78vvomJUf+aY8jB6Qhyze31UnFi5b6Vh/+z/v2XeF9v2J2X+PuVvK7vko7bxe/oy9+eON+3RUF5E+klcMrrMAzS6V+FN1eUN6FWK9HhqdbeHKaI3CdEx/M9DV487zsf9ZSsUGxP6/Yms9DEZbezsXz2nvVEO3Dc28V/ygf/BeKyhIk2fFY6pxQLgZzZtcCoAOcs633GXlibXdsXPEJc/MMzsG5P0gkhe/ocfyyQ6If+B53eF/Z5aS1REWfCzYCHUheNo3w== 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 SN6PR11MB3389.namprd11.prod.outlook.com (2603:10b6:805:c8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Sat, 26 Mar 2022 12:15:45 +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; Sat, 26 Mar 2022 12:15:45 +0000 From: "Wang, Haiyue" To: "Daly, Jeff" , "dev@dpdk.org" CC: Stephen Douthit , "Daly, Jeff" , "Zhang, Qi Z" Subject: RE: [PATCH v4] net/ixgbe: retry SFP ID read to handle misbehaving SFPs Thread-Topic: [PATCH v4] net/ixgbe: retry SFP ID read to handle misbehaving SFPs Thread-Index: AQHYQC5f9x9GzE88Vk2NHHC4Km9ByKzRldvw Date: Sat, 26 Mar 2022 12:15:45 +0000 Message-ID: References: <20220307223337.27876-1-jeffd@silicom-usa.com> <20220325095414.12854-1-jeffd@silicom-usa.com> In-Reply-To: <20220325095414.12854-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: a922c8b0-f9bf-4990-1ad9-08da0f225b1a x-ms-traffictypediagnostic: SN6PR11MB3389: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: cuO/lgg0ltYBlrZOizKC6Le3MdPTfx8X2fliAGqFw31WB/V/1bxJz8+Sx908uUq2RUsysHCnIYdU9sJ6EgkzxEn3LeIcZ/5GRCYNXI3PE3+SGILMp93P4uuJp4b0c7nj5weVRLZWVoR2lqLiHf9x5mkLFiZ5MsZ2fJZIgm+HMWDBZaR52Tg0ENd4HidA/zD2DUgHmySoz5mOim0bTNAoMV6MJQvKapsc/yLngk0A2o3UKlgiJ9Vsfsc6CV9qtFGjwp8oFi6YKlpF1hxxXHYo7By1Hme40u8iTwK1wU/4cGM1G20K8SmHS206r2V6JbpYy+ZcWJ32l3XB5vlavHtBiSh1B0WWD3lJD/ats4Gs8kjFNtjVhD6NTN19B5eR18xHjvcmzUJr6RG/Zi8qNwSmjRUvALgfLSCxc4a14aDh7a51Lqh/v8vYpO1Cnkk6/2Zjp4hjr4oAfh+UhTIMqJkZn96s31/+rAYuTYewS57RndzV1Ga4q0s7mu9wTOFW5CtXX/evDO4sxHwLJRVihf0H+2XcnkfG7gcZuOD3geEdyJ0jMzCrtE0HmKCNCaN3EUUoPEY2rzgPId3+kpsMzyhh7EboOvhGQKYqTpsPVjA85HYkmtBXSCKXDYg2b5lrCmvWYqnqXRJDoRxgrWrV6RbCtTuiWr42mZaQaoAud6KiER3hDe91K7iRHT9PyfQmaJe0vjx08hGbhO7j+LHHd9mqgC4QN8OWDTqlMKnoVQ/31L31K0+r0z4JrO5ZJob3D6W06kHXSuRHwSqm4druIssEcFzBdFJuE5UwiWzF8lOxh7k= 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)(122000001)(66476007)(66946007)(966005)(83380400001)(316002)(186003)(33656002)(2906002)(66446008)(55016003)(9686003)(38070700005)(107886003)(82960400001)(64756008)(38100700002)(7696005)(8936002)(6506007)(53546011)(26005)(52536014)(76116006)(71200400001)(66556008)(86362001)(508600001)(110136005)(5660300002)(4326008)(54906003)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5Jo7sETuQCPM+VMtoCVjOLH9n4a47qmLbOF0Pc+lFtrCxCf1aL3rPQizqSKE?= =?us-ascii?Q?DhYrDr2HkQoQMxeqx2wsQSn5oaN9ZLhdNXuiPuaiMO5NcYCXh9ldPYAojyG2?= =?us-ascii?Q?TlPd3Zi0JO90V0n/cNbBDPgkaUeAG3ip6cyn/1O4Qa6wTsj1q9KrYUYMKtGA?= =?us-ascii?Q?oaeuX0NIcBAGtG8ybQsqK3oNno9OwS3qK3+R4yxT93uo4bqTAv5/+yiC8oCY?= =?us-ascii?Q?yI+rH81GsNOeeNwGdEXGL6h3uDnMDPrChB8L4f8vgD+IwsJMx5xRhdRmlPZX?= =?us-ascii?Q?E4V8ulxI6CG4clW+q3Xke1Yz7nuMWGr26fQa009Zm954ddlvTZgDfXTCiOo0?= =?us-ascii?Q?ALgrDOb2yLlTVF56ow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?us-ascii?Q?RoHVodXQwdKZybfPRTXMqLBSwb1L93yoqBq/mTE4DtrzY/bwaPtQ98LMCK1k?= =?us-ascii?Q?dCf+n3LdRG9lHnW0t82WRD4nokErXVMv9J8SfPQliZ5wnPn6RnPsAovnrngz?= =?us-ascii?Q?e5v+L53EiC7xIN8JJPdh9DLXJoMU+1wh+9Kvo3O2QrhyrsjlE4Q8YX5E94Il?= =?us-ascii?Q?/eBNKoX57D3NTsdTpG1UtINywPvMbgzR37x34kJxP0U60BCTEgfH5nVLbf3I?= =?us-ascii?Q?LzkGO2lN0iuUnvQKv2gEVFRY/wwrmt0Ev/vxq38t7sAZ5ls1Vy9cDhVe5OcV?= =?us-ascii?Q?xu9z+JRX/mKXNh16mXQUSjgBN0freA/C/58hZzHZ1ZqJ0iUTQ0cZMinPvChX?= =?us-ascii?Q?LtA4BtRph3XN8w4mmFL7JmJgVkBE0F1pWI2x2o456CELnZ+eUkDcld+19r4k?= =?us-ascii?Q?Qj6THYFsfyretebSaWkyNMcpMrXGs5cj+UHhFGn+x5KEROC1MX2+bZpOOtHo?= =?us-ascii?Q?zcCJxVxjCA=3D=3D?= 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: a922c8b0-f9bf-4990-1ad9-08da0f225b1a X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2022 12:15:45.7619 (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: b8ETckQC+Kma5L7/AvrCI0PagbYExf7vhSsXqS73sQmzDeQgIkKk38+1pLA8layqLeuRRM6ouCONvRHVGG0Lkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3389 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: Friday, March 25, 2022 17:54 > To: dev@dpdk.org > Cc: Stephen Douthit ; Daly, Jeff ; Wang, Haiyue > > Subject: [PATCH v4] net/ixgbe: retry SFP ID read to handle misbehaving SF= Ps >=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: > v4: > * Fixed git summary >=20 No need v4, have been merged by Qi. ; - ) https://git.dpdk.org/next/dpdk-next-net-intel/commit/?id=3D2f010a904cb06277= d8710bad16ebfe9a38f61b62 > v3: > * Removed extra braces around single statement if >=20 > v2: > * Removed superfluous DEBUGOUT > * Renamed id_reads to retries > * Don't assume status =3D=3D 0 means IXGBE_SUCCESS >=20 > drivers/net/ixgbe/base/ixgbe_phy.c | 27 ++++++++++++++++++++++++--- > 1 file changed, 24 insertions(+), 3 deletions(-) >=20 > -- > 2.25.1