Skip to content

Commit eabd0f8

Browse files
Rakesh Babu Saladidavem330
authored andcommitted
octeontx2-nicvf: Free VF PTP resources.
When a VF is removed respective PTP resources are not being freed currently. This patch fixes it. Fixes: 43510ef ("octeontx2-nicvf: Add PTP hardware clock support to NIX VF") Signed-off-by: Rakesh Babu Saladi <[email protected]> Signed-off-by: Subbaraya Sundeep <[email protected]> Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 93440f4 commit eabd0f8

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ static int otx2vf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
684684
err = register_netdev(netdev);
685685
if (err) {
686686
dev_err(dev, "Failed to register netdevice\n");
687-
goto err_detach_rsrc;
687+
goto err_ptp_destroy;
688688
}
689689

690690
err = otx2_wq_init(vf);
@@ -709,6 +709,8 @@ static int otx2vf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
709709

710710
err_unreg_netdev:
711711
unregister_netdev(netdev);
712+
err_ptp_destroy:
713+
otx2_ptp_destroy(vf);
712714
err_detach_rsrc:
713715
if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))
714716
qmem_free(vf->dev, vf->dync_lmt);
@@ -742,6 +744,7 @@ static void otx2vf_remove(struct pci_dev *pdev)
742744
unregister_netdev(netdev);
743745
if (vf->otx2_wq)
744746
destroy_workqueue(vf->otx2_wq);
747+
otx2_ptp_destroy(vf);
745748
otx2vf_disable_mbox_intr(vf);
746749
otx2_detach_resources(&vf->mbox);
747750
if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))

0 commit comments

Comments
 (0)