cxgb4: fix sleep in atomic when flashing PHY firmware

[ Upstream commit f046bd0ae1 ]

Before writing new PHY firmware to on-chip memory, driver queries
firmware for current running PHY firmware version, which can result
in sleep waiting for reply. So, move spinlock closer to the actual
on-chip memory write operation, instead of taking it at the callers.

Fixes: 5fff701c83 ("cxgb4: always sync access when flashing PHY firmware")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Rahul Lakkireddy 2021-06-11 12:17:46 +05:30 • committed by Greg Kroah-Hartman
commit b38ec782d0
3 changed files with 2 additions and 4 deletions