hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/scsi/snic/snic_disc.c
....@@ -111,8 +111,8 @@
111111
112112 SNIC_BUG_ON((((unsigned long)buf) % SNIC_SG_DESC_ALIGN) != 0);
113113
114
- pa = pci_map_single(snic->pdev, buf, buf_len, PCI_DMA_FROMDEVICE);
115
- if (pci_dma_mapping_error(snic->pdev, pa)) {
114
+ pa = dma_map_single(&snic->pdev->dev, buf, buf_len, DMA_FROM_DEVICE);
115
+ if (dma_mapping_error(&snic->pdev->dev, pa)) {
116116 SNIC_HOST_ERR(snic->shost,
117117 "Rpt-tgt rspbuf %p: PCI DMA Mapping Failed\n",
118118 buf);
....@@ -138,7 +138,8 @@
138138
139139 ret = snic_queue_wq_desc(snic, rqi->req, rqi->req_len);
140140 if (ret) {
141
- pci_unmap_single(snic->pdev, pa, buf_len, PCI_DMA_FROMDEVICE);
141
+ dma_unmap_single(&snic->pdev->dev, pa, buf_len,
142
+ DMA_FROM_DEVICE);
142143 kfree(buf);
143144 rqi->sge_va = 0;
144145 snic_release_untagged_req(snic, rqi);