[lvc-project] [Intel-wired-lan] [PATCH] ixgbe: Fix unreachable retry logic in combined and byte I2C write functions

Rinitha, SX sx.rinitha at intel.com
Fri Mar 21 07:46:21 MSK 2025


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Rand Deeb
> Sent: 06 March 2025 15:42
> To: Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com>; Andrew Lunn <andrew+netdev at lunn.ch>; David S. Miller <davem at davemloft.net>; Eric Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni <pabeni at redhat.com>; moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan at lists.osuosl.org>; open list:NETWORKING DRIVERS <netdev at vger.kernel.org>; open list <linux-kernel at vger.kernel.org>
> Cc: deeb.rand at confident.ru; lvc-project at linuxtesting.org; voskresenski.stanislav at confident.ru; Rand Deeb <rand.sec96 at gmail.com>
> Subject: [Intel-wired-lan] [PATCH] ixgbe: Fix unreachable retry logic in combined and byte I2C write functions
>
> The current implementation of `ixgbe_write_i2c_combined_generic_int` and `ixgbe_write_i2c_byte_generic_int` sets `max_retry` to `1`, which makes the condition `retry < max_retry` always evaluate to `false`. This renders the retry mechanism ineffective, as the debug message and retry logic are never executed.
>
> This patch increases `max_retry` to `3` in both functions, aligning them with the retry logic in `ixgbe_read_i2c_combined_generic_int`. This ensures that the retry mechanism functions as intended, improving robustness in case of I2C write failures.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Rand Deeb <rand.sec96 at gmail.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Tested-by: Rinitha S <sx.rinitha at intel.com> (A Contingent worker at Intel)



More information about the lvc-project mailing list