[PATCH v3] net/ixgbe: Retry SFP ID read field to handle misbehaving SFPs

Wang, Haiyue haiyue.wang at intel.com
Thu Mar 24 02:00:36 CET 2022


> -----Original Message-----
> From: jeffd at silicom-usa.com <jeffd at silicom-usa.com>
> Sent: Thursday, March 24, 2022 04:04
> To: dev at dpdk.org
> Cc: Stephen Douthit <stephend at silicom-usa.com>; Daly, Jeff <jeffd at silicom-usa.com>; Wang, Haiyue
> <haiyue.wang at intel.com>
> Subject: [PATCH v3] net/ixgbe: Retry SFP ID read field to handle misbehaving SFPs
> 
> From: Stephen Douthit <stephend at silicom-usa.com>
> 
> 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.
> 
> Retry the ID read several times looking not just for NAK, but also for a
> valid ID field.
> 
> Since the device isn't NAKing the trasanction the existing longer retry
> code in ixgbe_read_i2c_byte_generic_int() doesn't apply here.
> 
> Signed-off-by: Stephen Douthit <stephend at silicom-usa.com>
> Signed-off-by: Jeff Daly <jeffd at silicom-usa.com>
> ---
> 
> Notes:
>     v2:
>     * Removed superfluous DEBUGOUT
>     * Renamed id_reads to retries
>     * Don't assume status == 0 means IXGBE_SUCCESS
> 
>     v3:
>     * Removed extra braces around single statement if
> 
>  drivers/net/ixgbe/base/ixgbe_phy.c | 27 ++++++++++++++++++++++++---
>  1 file changed, 24 insertions(+), 3 deletions(-)
> 

Thanks!

Reviewed-by: Haiyue Wang <haiyue.wang at intel.com>

> --
> 2.25.1



More information about the dev mailing list