]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix firmware message delay loop regression.
authorMichael Chan <michael.chan@broadcom.com>
Tue, 8 May 2018 07:18:38 +0000 (03:18 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 May 2018 14:14:21 +0000 (10:14 -0400)
commiteb45aedcd5be1d207b66ab7be8e09668d8f17c3c
treee47b62fac7ba9d3d2a48c2eaead68c83f0188565
parent6ad0fd5be940c2ba9d3f358b828a2a7370e9b169
bnxt_en: Fix firmware message delay loop regression.

A recent change to reduce delay granularity waiting for firmware
reponse has caused a regression.  With a tighter delay loop,
the driver may see the beginning part of the response faster.
The original 5 usec delay to wait for the rest of the message
is not long enough and some messages are detected as invalid.

Increase the maximum wait time from 5 usec to 20 usec.  Also, fix
the debug message that shows the total delay time for the response
when the message times out.  With the new logic, the delay time
is not fixed per iteration of the loop, so we define a macro to
show the total delay time.

Fixes: fc80c3c9ccb7 ("bnxt_en: reduce timeout on initial HWRM calls")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h