mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
octeontx2-pf: Use default max_active works instead of one
[ Upstream commit7558ce0d97
] 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:d424b6c024
("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e545e4b1c1
commit
53ae0f3669
1 changed files with 4 additions and 3 deletions
|
@ -583,8 +583,9 @@ static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)
|
|||
if (!pf->mbox_pfvf)
|
||||
return -ENOMEM;
|
||||
|
||||
pf->mbox_pfvf_wq = alloc_ordered_workqueue("otx2_pfvf_mailbox",
|
||||
WQ_HIGHPRI | WQ_MEM_RECLAIM);
|
||||
pf->mbox_pfvf_wq = alloc_workqueue("otx2_pfvf_mailbox",
|
||||
WQ_UNBOUND | WQ_HIGHPRI |
|
||||
WQ_MEM_RECLAIM, 0);
|
||||
if (!pf->mbox_pfvf_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -3086,7 +3087,7 @@ static void otx2_vf_link_event_task(struct work_struct *work)
|
|||
|
||||
otx2_mbox_wait_for_zero(&pf->mbox_pfvf[0].mbox_up, vf_idx);
|
||||
|
||||
otx2_mbox_msg_send_up(&pf->mbox_pfvf[0].mbox_up, vf_idx);
|
||||
otx2_sync_mbox_up_msg(&pf->mbox_pfvf[0], vf_idx);
|
||||
|
||||
mutex_unlock(&pf->mbox.lock);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue