OSDN Git Service

i40e: Retry AQC GetPhyAbilities to overcome I2CRead hangs
authorJayaprakash Shanmugam <jayaprakash.shanmugam@intel.com>
Thu, 7 Sep 2017 12:05:55 +0000 (08:05 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Oct 2017 21:32:18 +0000 (14:32 -0700)
commit4988410f8d3a6fa04381072e2406a1d3979ffb95
tree77a78c23ccfaec3b9dfa24d721106e3dce53ce00
parentb861fb762a26144593387b84cd078ef86d99cf6f
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>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h