Skip to content

Commit f6f978f

Browse files
committed
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>
2 parents 6c461e3 + 758c910 commit f6f978f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int octep_send_mbox_req(struct octep_device *oct,
5555
list_add_tail(&d->list, &oct->ctrl_req_wait_list);
5656
ret = wait_event_interruptible_timeout(oct->ctrl_req_wait_q,
5757
(d->done != 0),
58-
jiffies + msecs_to_jiffies(500));
58+
msecs_to_jiffies(500));
5959
list_del(&d->list);
6060
if (ret == 0 || ret == 1)
6161
return -EAGAIN;

drivers/net/ethernet/marvell/octeon_ep/octep_main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,10 @@ static void octep_device_cleanup(struct octep_device *oct)
10381038
{
10391039
int i;
10401040

1041+
oct->poll_non_ioq_intr = false;
1042+
cancel_delayed_work_sync(&oct->intr_poll_task);
1043+
cancel_work_sync(&oct->ctrl_mbox_task);
1044+
10411045
dev_info(&oct->pdev->dev, "Cleaning up Octeon Device ...\n");
10421046

10431047
for (i = 0; i < OCTEP_MAX_VF; i++) {
@@ -1200,14 +1204,11 @@ static void octep_remove(struct pci_dev *pdev)
12001204
if (!oct)
12011205
return;
12021206

1203-
cancel_work_sync(&oct->tx_timeout_task);
1204-
cancel_work_sync(&oct->ctrl_mbox_task);
12051207
netdev = oct->netdev;
12061208
if (netdev->reg_state == NETREG_REGISTERED)
12071209
unregister_netdev(netdev);
12081210

1209-
oct->poll_non_ioq_intr = false;
1210-
cancel_delayed_work_sync(&oct->intr_poll_task);
1211+
cancel_work_sync(&oct->tx_timeout_task);
12111212
octep_device_cleanup(oct);
12121213
pci_release_mem_regions(pdev);
12131214
free_netdev(netdev);

0 commit comments

Comments
 (0)