mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 01:04:08 +08:00
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>
This commit is contained in:
parent
3a5bd70211
commit
6c404a68bf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user