Skip to content

Commit 5159721

Browse files
Geetha sowjanyaPaolo Abeni
authored andcommitted
octeontx2-pf: Fix adding mbox work queue entry when num_vfs > 64
When more than 64 VFs are enabled for a PF then mbox communication between VF and PF is not working as mbox work queueing for few VFs are skipped due to wrong calculation of VF numbers. Fixes: d424b6c ("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Link: https://lore.kernel.org/r/1700930042-5400-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent e54d628 commit 5159721

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • drivers/net/ethernet/marvell/octeontx2/nic

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,15 +566,18 @@ static irqreturn_t otx2_pfvf_mbox_intr_handler(int irq, void *pf_irq)
566566
otx2_write64(pf, RVU_PF_VFPF_MBOX_INTX(1), intr);
567567
otx2_queue_work(mbox, pf->mbox_pfvf_wq, 64, vfs, intr,
568568
TYPE_PFVF);
569-
vfs -= 64;
569+
if (intr)
570+
trace_otx2_msg_interrupt(mbox->mbox.pdev, "VF(s) to PF", intr);
571+
vfs = 64;
570572
}
571573

572574
intr = otx2_read64(pf, RVU_PF_VFPF_MBOX_INTX(0));
573575
otx2_write64(pf, RVU_PF_VFPF_MBOX_INTX(0), intr);
574576

575577
otx2_queue_work(mbox, pf->mbox_pfvf_wq, 0, vfs, intr, TYPE_PFVF);
576578

577-
trace_otx2_msg_interrupt(mbox->mbox.pdev, "VF(s) to PF", intr);
579+
if (intr)
580+
trace_otx2_msg_interrupt(mbox->mbox.pdev, "VF(s) to PF", intr);
578581

579582
return IRQ_HANDLED;
580583
}

0 commit comments

Comments
 (0)