]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: dc395x: fix dma API usage in srb_done
authorChristoph Hellwig <hch@lst.de>
Thu, 11 Oct 2018 14:17:14 +0000 (16:17 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 18 Oct 2018 01:34:20 +0000 (21:34 -0400)
commitb4e95f1e7dadfebc2f5f8f407fc4a465381b9535
treebcb0d7509dc78b4d8adc8688ba9437975a368304
parent0f0c9bf5e73afdae4f11b2390f344e017e54f716
scsi: dc395x: fix dma API usage in srb_done

We can't just transfer ownership to the CPU and then unmap, as this will
break with swiotlb.

Instead unmap the command and sense buffer a little earlier in the I/O
completion handler and get rid of the pci_dma_sync_sg_for_cpu call
entirely.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/dc395x.c