提交 6c404a68 编写于 作者: C Christoph Hellwig 提交者: 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: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册