[PATCH v2 1/3] scsi: mvumi: stop the controller bus-mastering before freeing its buffers
From: Yehyeong Lee
Date: Sun Nov 15 2026 - 07:22:15 EST
mvumi_detach_one() frees the controller's buffers before stopping its DMA:
mvumi_release_fw(mhba); /* frees them */
scsi_host_put(host);
pci_disable_device(pdev); /* stops the DMA */
mvumi_release_fw() frees everything on mhba->res_list and the handshake
page. The controller is given those addresses during the handshake and
may read or write them for as long as it is bus-mastering, and only
pci_disable_device() stops that.
Disable the device first. Nothing in mvumi_release_fw() needs it
enabled: it contains no ioread32() or iowrite32() at all.
I have no mvumi hardware.
Fixes: f0c568a478f0 ("[SCSI] mvumi: Add Marvell UMI driver")
Signed-off-by: Yehyeong Lee <yhlee@xxxxxxxxxxxxxxxxxx>
---
drivers/scsi/mvumi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 91c2db697c6913..8d22d370d8608f 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -2548,9 +2548,9 @@ static void mvumi_detach_one(struct pci_dev *pdev)
mhba->instancet->disable_intr(mhba);
free_irq(mhba->pdev->irq, mhba);
+ pci_disable_device(pdev);
mvumi_release_fw(mhba);
scsi_host_put(host);
- pci_disable_device(pdev);
dev_dbg(&pdev->dev, "driver is removed!\n");
}
--
2.43.0