Skip to content

Commit cbf2f24

Browse files
Subbaraya Sundeepdavem330
authored andcommitted
octeontx2-pf: Wait till detach_resources msg is complete
During VF driver remove, a message is sent to detach VF resources to PF but VF is not waiting until message is complete. Also mailbox interrupts need to be turned off after the detach resource message is complete. This patch fixes that problem. Fixes: 05fcc9e ("octeontx2-pf: Attach NIX and NPA block LFs") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a88e0f9 commit cbf2f24

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ int otx2_detach_resources(struct mbox *mbox)
15921592
detach->partial = false;
15931593

15941594
/* Send detach request to AF */
1595-
otx2_mbox_msg_send(&mbox->mbox, 0);
1595+
otx2_sync_mbox_msg(mbox);
15961596
mutex_unlock(&mbox->lock);
15971597
return 0;
15981598
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,8 +775,8 @@ static void otx2vf_remove(struct pci_dev *pdev)
775775
otx2_mcam_flow_del(vf);
776776
otx2_shutdown_tc(vf);
777777
otx2_shutdown_qos(vf);
778-
otx2vf_disable_mbox_intr(vf);
779778
otx2_detach_resources(&vf->mbox);
779+
otx2vf_disable_mbox_intr(vf);
780780
free_percpu(vf->hw.lmt_info);
781781
if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))
782782
qmem_free(vf->dev, vf->dync_lmt);

0 commit comments

Comments
 (0)