From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id E594DCD4F54 for ; Wed, 27 May 2026 11:21:34 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C4A540650; Wed, 27 May 2026 13:21:34 +0200 (CEST) Received: from smtpbgeu1.qq.com (smtpbgeu1.qq.com [52.59.177.22]) by mails.dpdk.org (Postfix) with ESMTP id 00D314028A for ; Wed, 27 May 2026 13:21:31 +0200 (CEST) X-QQ-mid: Yeas9t1779880885t808t18771 Received: from 0F57A7141CBF4D1588B97A6ED8A17143 (zaiyuwang@trustnetic.com [122.231.28.113]) X-QQ-SSF: 0000000000000000000000000000000 From: =?utf-8?b?WmFpeXUgV2FuZw==?= X-BIZMAIL-ID: 7455510100251041051 To: "'Stephen Hemminger'" Cc: References: <20260423034024.14404-1-zaiyuwang@trustnetic.com> <20260511103604.19724-1-zaiyuwang@trustnetic.com> <20260511103604.19724-17-zaiyuwang@trustnetic.com> <20260517165225.6ba8b774@phoenix.local> In-Reply-To: <20260517165225.6ba8b774@phoenix.local> Subject: RE: [PATCH v4 16/20] net/txgbe: fix SFP module identification Date: Wed, 27 May 2026 19:21:24 +0800 Message-ID: <00c201dcedca$f41e37b0$dc5aa710$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIzGrJ934oa1ka+Tuv/tXGR6pozcwG6Z/2aAV3T1uMCsX/db7U79aXg Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvrsz:qybglogicsvrsz3b-0 X-QQ-XMAILINFO: OJVhEmJj02aqmhIIzu74I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hAo7tdZpuwY4Tt Q== X-QQ-XMRINFO: NI4Ajvh11aEjEMj13RCX7UuhPEoou2bs1g== X-QQ-RECHKSPAM: 0 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 > ## Errors >=20 > ### 1. Resource leak in `txgbe_identify_sfp_module()` - multiple error = paths > missing unlock No code change The review is incorrect =E2=80=94 all error paths after acquiring the = lock do properly release it. There is no lock leak. > ### 2. `txgbe_write_i2c_byte()` removes STOP condition - probable = hardware No code change This change was ported from our out=E2=80=91of=E2=80=91tree Linux kernel = driver. It was found that the previous write_i2c interface had problems, = which caused ethtool -m to read some 40G optical module information = incorrectly. Removing the intermediate STOP is intentional and fixes = that issue. > ### 3. Removed validation logic without replacement - SFP vendor = checking No code change The old code was inherited from the Intel driver. The restriction has = been removed intentionally: the driver now supports all optical modules = that comply with the relevant standards, without limiting to a specific = vendor. > ## Warnings >=20 > ### 1. `txgbe_identify_qsfp_module()` GPIO config runs unconditionally No code change. The function txgbe_identify_qsfp_module is only called for the = Amber=E2=80=91Lite 40G NIC. Among the three NIC types supported by txgbe = (Sapphire 10G, Amber=E2=80=91Lite 25G, Amber=E2=80=91Lite 40G), only the = 40G variant uses QSFP; the other two use SFP. Based on the aml40 = hardware design, we need to configure the GPIO before using I2C. > ### 2. Missing error propagation - `txgbe_read_i2c_sff8636()` page = select failure > ignored Fixed. > ### 3. Implicit comparison on pointer Fixed. =20 > ### 5. Function pointer assignments removed but functions still = defined Already verified. =20