Commit 6c404a68 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3a5bd702
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment