Skip to content

Commit 7558ce0

Browse files
Subbaraya Sundeepdavem330
authored andcommitted
octeontx2-pf: Use default max_active works instead of one
Only one execution context for the workqueue used for PF and VFs mailbox communication is incorrect since multiple works are queued simultaneously by all the VFs and PF link UP messages. Hence use default number of execution contexts by passing zero as max_active to alloc_workqueue function. With this fix in place, modify UP messages also to wait until completion. Fixes: d424b6c ("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Subbaraya Sundeep <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cbf2f24 commit 7558ce0

File tree

1 file changed

+4
-3
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+4
-3
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,9 @@ static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)
584584
if (!pf->mbox_pfvf)
585585
return -ENOMEM;
586586

587-
pf->mbox_pfvf_wq = alloc_ordered_workqueue("otx2_pfvf_mailbox",
588-
WQ_HIGHPRI | WQ_MEM_RECLAIM);
587+
pf->mbox_pfvf_wq = alloc_workqueue("otx2_pfvf_mailbox",
588+
WQ_UNBOUND | WQ_HIGHPRI |
589+
WQ_MEM_RECLAIM, 0);
589590
if (!pf->mbox_pfvf_wq)
590591
return -ENOMEM;
591592

@@ -3146,7 +3147,7 @@ static void otx2_vf_link_event_task(struct work_struct *work)
31463147

31473148
otx2_mbox_wait_for_zero(&pf->mbox_pfvf[0].mbox_up, vf_idx);
31483149

3149-
otx2_mbox_msg_send_up(&pf->mbox_pfvf[0].mbox_up, vf_idx);
3150+
otx2_sync_mbox_up_msg(&pf->mbox_pfvf[0], vf_idx);
31503151

31513152
mutex_unlock(&pf->mbox.lock);
31523153
}

0 commit comments

Comments
 (0)