Merge branch 'octeon_ep-fixes-for-error-and-remove-paths'
Michal Schmidt says: ==================== octeon_ep: fixes for error and remove paths I have an Octeon card that's misconfigured in a way that exposes a couple of bugs in the octeon_ep driver's error paths. It can reproduce the issues that patches 1 & 4 are fixing. Patches 2 & 3 are a result of reviewing the nearby code. ==================== Link: https://lore.kernel.org/r/20230810150114.107765-1-mschmidt@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
f6f978fc4d
|
@ -55,7 +55,7 @@ static int octep_send_mbox_req(struct octep_device *oct,
|
|||
list_add_tail(&d->list, &oct->ctrl_req_wait_list);
|
||||
ret = wait_event_interruptible_timeout(oct->ctrl_req_wait_q,
|
||||
(d->done != 0),
|
||||
jiffies + msecs_to_jiffies(500));
|
||||
msecs_to_jiffies(500));
|
||||
list_del(&d->list);
|
||||
if (ret == 0 || ret == 1)
|
||||
return -EAGAIN;
|
||||
|
|
|
@ -1038,6 +1038,10 @@ static void octep_device_cleanup(struct octep_device *oct)
|
|||
{
|
||||
int i;
|
||||
|
||||
oct->poll_non_ioq_intr = false;
|
||||
cancel_delayed_work_sync(&oct->intr_poll_task);
|
||||
cancel_work_sync(&oct->ctrl_mbox_task);
|
||||
|
||||
dev_info(&oct->pdev->dev, "Cleaning up Octeon Device ...\n");
|
||||
|
||||
for (i = 0; i < OCTEP_MAX_VF; i++) {
|
||||
|
@ -1200,14 +1204,11 @@ static void octep_remove(struct pci_dev *pdev)
|
|||
if (!oct)
|
||||
return;
|
||||
|
||||
cancel_work_sync(&oct->tx_timeout_task);
|
||||
cancel_work_sync(&oct->ctrl_mbox_task);
|
||||
netdev = oct->netdev;
|
||||
if (netdev->reg_state == NETREG_REGISTERED)
|
||||
unregister_netdev(netdev);
|
||||
|
||||
oct->poll_non_ioq_intr = false;
|
||||
cancel_delayed_work_sync(&oct->intr_poll_task);
|
||||
cancel_work_sync(&oct->tx_timeout_task);
|
||||
octep_device_cleanup(oct);
|
||||
pci_release_mem_regions(pdev);
|
||||
free_netdev(netdev);
|
||||
|
|
Loading…
Reference in New Issue