Skip to contentSkip to conversation

RDMA/vmw_pvrdma: Disable device before releasing PCI region

PATCH Adit Ranadive 1 participant 1 message Feb 3, 2020 1 message not in the archive InfiniBand

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Adit Ranadive

author Acked-by
#1 lore raw
Quoted 18 lines · On 2/3/20 10:36 AM, "Yuval Shaia yuval.shaia.ml"@gmail.com wrote:

From: Yuval Shaia <[email protected]>

From Documentation/PCI/pci.tx.txt:
Drivers should call pci_release_region() after calling pci_disable_device() in order to prevent two devices colliding on the same address range.

---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +0 -0
index 780fd2dfc07e..3ef5b4b60f42 100644

drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c static void pvrdma_pci_remove(struct pci_dev *pdev) · line 1144

Quoted 9 lines
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +1 -1
@@ -1137,8 +1137,8 @@ static void pvrdma_pci_remove(struct pci_dev *pdev)
 	ib_dealloc_device(&dev->ib_dev);
 
 	/* Free pci resources */
-	pci_release_regions(pdev);
 	pci_disable_device(pdev);
+	pci_release_regions(pdev);
 	pci_set_drvdata(pdev, NULL);
 }
 

Looks fine to me. Please add a Fixes tag and cc stable.