On 17. 08. 23 21:28, Aleksandr Loktionov wrote:
Before the i40e_nvm code didn't take into account that 32bit FW gtime
wraps ~70minutes, timeout was calculated as 64bit gtime + NVM_TIMEOUT
, so when gtime was ~70minutes, then gtime could not become greater
than 64bit timeout value and the semaphore to be considered as expired.

Decrease hw_semaphore_timeout size down to 32bits, because FW
I40E_GLVFGEN_TIMER register is 32bits only anyway, but having
both variables same u32 size simplifies code.
Fix FW write semaphore expiration condition, taking into account
that I40E_GLVFGEN_TIMER wraps, by checking the sign of subtraction
of two 32 bit values.

Fixes: 56a62fc86895 ("i40e: init code and hardware support")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktio...@intel.com>
---
v2->v3 fix commit message
v1->v2 in commit message: add 'Fixes' tag, fix a typo
---
---
  drivers/net/ethernet/intel/i40e/i40e_nvm.c  | 8 ++++----
  drivers/net/ethernet/intel/i40e/i40e_type.h | 2 +-
  2 files changed, 5 insertions(+), 5 deletions(-)


The same here, v3 was without any comment but marked as ChangesRequested. The patch is nowhere now... upstream, your dev-queue...

Thanks,
Ivan

Reply via email to