]> git.droids-corp.org - dpdk.git/commit
net/ixgbe: retry misbehaving SFP read
authorStephen Douthit <stephend@silicom-usa.com>
Wed, 23 Mar 2022 20:03:46 +0000 (16:03 -0400)
committerQi Zhang <qi.z.zhang@intel.com>
Mon, 18 Apr 2022 05:47:18 +0000 (07:47 +0200)
commit774263bb4e7cda84417e117a4d6c4931cd72cf3a
tree5e85192a92fb4a18f4199d321f7f749351bb3daf
parent02f11b4af687adea2bf717e6eb2116664d03110c
net/ixgbe: retry misbehaving SFP read

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 transaction, the existing longer retry
code in ixgbe_read_i2c_byte_generic_int() doesn't apply here.

Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/ixgbe/base/ixgbe_phy.c