]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Increase firmware message response DMA wait time
authorMichael Chan <michael.chan@broadcom.com>
Sun, 20 Feb 2022 09:05:52 +0000 (04:05 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Feb 2022 13:47:15 +0000 (13:47 +0000)
commit09cebb8db10298d5c757e61752c1ae8abdf47789
tree6b8fae1601cfccc4eaa48c02c9c852ae0770bdca
parent69a246b90405f0893ba246265b70fdce69e6a4ea
bnxt_en: Increase firmware message response DMA wait time

When polling for the firmware message response, we first poll for the
response message header.  Once the valid length is detected in the
header, we poll for the valid bit at the end of the message which
signals DMA completion.  Normally, this poll time for DMA completion
is extremely short (0 to a few usec).  But on some devices under some
rare conditions, it can be up to about 20 msec.

Increase this delay to 50 msec and use udelay() for the first 10 usec
for the common case, and usleep_range() beyond that.

Also, change the error message to include the above delay time when
printing the timeout value.

Fixes: e15c98e1589f ("bnxt_en: move HWRM API implementation into separate file")
Reviewed-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h