]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: fix sleep in atomic when flashing PHY firmware
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 11 Jun 2021 06:47:46 +0000 (12:17 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jun 2021 18:15:00 +0000 (11:15 -0700)
commit7ae1989871fd6bd6d364b9ac571b666012e5e51b
treebb061e3c1ec6ed2276ac5d2e377bbca39e89b6b2
parent54f6177ea2baca51756e4d423a53d3ed335cf5e4
cxgb4: fix sleep in atomic when flashing PHY firmware

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: 27ef1b87424c ("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>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c