[PATCH v4] net/ixgbe: retry SFP ID read to handle misbehaving SFPs
Wang, Haiyue
haiyue.wang at intel.com
Sat Mar 26 13:15:45 CET 2022
> -----Original Message-----
> From: jeffd at silicom-usa.com <jeffd at silicom-usa.com>
> Sent: Friday, March 25, 2022 17:54
> 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 v4] net/ixgbe: retry SFP ID read 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:
> v4:
> * Fixed git summary
>
No need v4, have been merged by Qi. ; - )
https://git.dpdk.org/next/dpdk-next-net-intel/commit/?id=2f010a904cb06277d8710bad16ebfe9a38f61b62
> v3:
> * Removed extra braces around single statement if
>
> v2:
> * Removed superfluous DEBUGOUT
> * Renamed id_reads to retries
> * Don't assume status == 0 means IXGBE_SUCCESS
>
> drivers/net/ixgbe/base/ixgbe_phy.c | 27 ++++++++++++++++++++++++---
> 1 file changed, 24 insertions(+), 3 deletions(-)
>
> --
> 2.25.1
More information about the dev
mailing list