diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-11 17:17:15 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-18 04:34:20 +0300 |
commit | 6c404a68bf83b4135a8a9aa1c388ebdf98e8ba7f (patch) | |
tree | b9cc3f231ce5fe0167b39e1007f4f8af4a23754b /drivers/scsi/dc395x.c | |
parent | 3a5bd7021184dec2946f2a4d7a8943f8a5713e52 (diff) | |
download | linux-6c404a68bf83b4135a8a9aa1c388ebdf98e8ba7f.tar.xz |
scsi: dc395x: fix DMA API usage in sg_update_list
We need to transfer device ownership to the CPU before we can manipulate
the mapped data.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/dc395x.c')
-rw-r--r-- | drivers/scsi/dc395x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 8d7a26a33951..f3b65e5efe2b 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -1871,6 +1871,11 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) xferred -= psge->length; } else { /* Partial SG entry done */ + pci_dma_sync_single_for_cpu(srb->dcb-> + acb->dev, + srb->sg_bus_addr, + SEGMENTX_LEN, + PCI_DMA_TODEVICE); psge->length -= xferred; psge->address += xferred; srb->sg_index = idx; |