diff options
author | Jayaprakash Shanmugam <jayaprakash.shanmugam@intel.com> | 2017-09-07 08:05:55 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-10-09 14:32:18 -0700 |
commit | 4988410f8d3a6fa04381072e2406a1d3979ffb95 (patch) | |
tree | 77a78c23ccfaec3b9dfa24d721106e3dce53ce00 /drivers/net/ethernet/intel/i40evf | |
parent | b861fb762a26144593387b84cd078ef86d99cf6f (diff) | |
download | linux-4988410f8d3a6fa04381072e2406a1d3979ffb95.tar.bz2 |
i40e: Retry AQC GetPhyAbilities to overcome I2CRead hangs
- When the I2C is busy, the PHY reads are delayed. The firmware will
return EGAIN in these cases with an expectation that the SW will
trigger the reads again
- This patch retries the operation for a maximum period of 500ms
Signed-off-by: Jayaprakash Shanmugam <jayaprakash.shanmugam@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf')
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40e_type.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h index 9364b67fff9c..213b773dfad6 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_type.h +++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h @@ -46,6 +46,9 @@ /* Max default timeout in ms, */ #define I40E_MAX_NVM_TIMEOUT 18000 +/* Max timeout in ms for the phy to respond */ +#define I40E_MAX_PHY_TIMEOUT 500 + /* Switch from ms to the 1usec global time (this is the GTIME resolution) */ #define I40E_MS_TO_GTIME(time) ((time) * 1000) |