Skip to content

Commit 3c6a002

Browse files
Michael ChanNipaLocal
Michael Chan
authored and
NipaLocal
committed
bnxt_en: bring back rtnl_lock() in bnxt_fw_reset_task()
RTNL assertion failed in netif_set_real_num_tx_queues() in the error recovery path: RTNL: assertion failed at net/core/dev.c (3178) WARNING: CPU: 3 PID: 3392 at net/core/dev.c:3178 netif_set_real_num_tx_queues+0x1fd/0x210 Call Trace: <TASK> ? __pfx_bnxt_msix+0x10/0x10 [bnxt_en] __bnxt_open_nic+0x1ef/0xb20 [bnxt_en] bnxt_open+0xda/0x130 [bnxt_en] bnxt_fw_reset_task+0x21f/0x780 [bnxt_en] process_scheduled_works+0x9d/0x400 Bring back the rtnl_lock() for now in bnxt_fw_reset_task(). Fixes: 004b500 ("eth: bnxt: remove most dependencies on RTNL") Reviewed-by: Kalesh AP <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 35f23da commit 3c6a002

File tree

1 file changed

+4
-1
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+4
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15002,15 +15002,17 @@ static void bnxt_fw_reset_task(struct work_struct *work)
1500215002
bp->fw_reset_state = BNXT_FW_RESET_STATE_OPENING;
1500315003
fallthrough;
1500415004
case BNXT_FW_RESET_STATE_OPENING:
15005-
while (!netdev_trylock(bp->dev)) {
15005+
while (!rtnl_trylock()) {
1500615006
bnxt_queue_fw_reset_work(bp, HZ / 10);
1500715007
return;
1500815008
}
15009+
netdev_lock(bp->dev);
1500915010
rc = bnxt_open(bp->dev);
1501015011
if (rc) {
1501115012
netdev_err(bp->dev, "bnxt_open() failed during FW reset\n");
1501215013
bnxt_fw_reset_abort(bp, rc);
1501315014
netdev_unlock(bp->dev);
15015+
rtnl_unlock();
1501415016
goto ulp_start;
1501515017
}
1501615018

@@ -15030,6 +15032,7 @@ static void bnxt_fw_reset_task(struct work_struct *work)
1503015032
bnxt_dl_health_fw_status_update(bp, true);
1503115033
}
1503215034
netdev_unlock(bp->dev);
15035+
rtnl_unlock();
1503315036
bnxt_ulp_start(bp, 0);
1503415037
bnxt_reenable_sriov(bp);
1503515038
netdev_lock(bp->dev);

0 commit comments

Comments
 (0)