Commit 607a7a45 authored by Michal Schmidt's avatar Michal Schmidt Committed by Jakub Kicinski

octeon_ep: cancel ctrl_mbox_task after intr_poll_task

intr_poll_task may queue ctrl_mbox_task. The function
octep_poll_non_ioq_interrupts_cn93_pf does this.

When removing the driver and canceling these two works, cancel
ctrl_mbox_task last to guarantee it does not run anymore.

Fixes: 24d43332 ("octeon_ep: poll for control messages")
Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
Link: https://lore.kernel.org/r/20230810150114.107765-4-mschmidt@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 28458c80
......@@ -1200,7 +1200,6 @@ static void octep_remove(struct pci_dev *pdev)
if (!oct)
return;
cancel_work_sync(&oct->ctrl_mbox_task);
netdev = oct->netdev;
if (netdev->reg_state == NETREG_REGISTERED)
unregister_netdev(netdev);
......@@ -1208,6 +1207,7 @@ static void octep_remove(struct pci_dev *pdev)
cancel_work_sync(&oct->tx_timeout_task);
oct->poll_non_ioq_intr = false;
cancel_delayed_work_sync(&oct->intr_poll_task);
cancel_work_sync(&oct->ctrl_mbox_task);
octep_device_cleanup(oct);
pci_release_mem_regions(pdev);
free_netdev(netdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment