Skip to contentSkip to conversation

nvme-pci: fix DMA direction of unmapping integrity data

PATCH Applied Ming Lei 3 participants 3 messages Jul 13, 2023 NVMe

lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 nvme-pci: fix DMA direction of unmapping integrity data

DMA direction should be taken in dma_unmap_page() for unmapping integrity data.

Fix this DMA direction, and reported in Guangwu's test.

Fixes 4aedb705437f ("nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_data")
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
index cb13ba203956..88383371a5a4 100644
@@ -967,7 +967,7 @@ static __always_inline void nvme_pci_unmap_rq(struct request *req)
 	        struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
 
 		dma_unmap_page(dev->dev, iod->meta_dma,
-			       rq_integrity_vec(req)->bv_len, rq_data_dir(req));
+			       rq_integrity_vec(req)->bv_len, rq_dma_dir(req));
 	}
 
 	if (blk_rq_nr_phys_segments(req))
Signature · 1 line
2.40.1