]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 7 Mar 2022 10:46:00 +0000 (11:46 +0100)
commitacd883e5895915123a394cda816f661cbd06e413
treec2bab7327e6d4b2a6fa5d68a52d31c9f2e69a60b
parent7aa49cfd7f3bf7ec34f2b331c797675924e2b856
bnxt_en: Increase firmware message response DMA wait time

BugLink: https://bugs.launchpad.net/bugs/1963891
[ Upstream commit b891106da52b2c12dbaf73400f6d225b06a38d80 ]

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: 3c8c20db769c ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h