summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2019-04-05 17:09:13 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-04-09 04:18:35 +0200
commit5c2442fd78998af60e13aba506d103f7f43f8701 (patch)
tree4b3dea422115364d591e128bbe122435e233a9e9
parentscsi: lpfc: Fix missing wakeups on abort threads (diff)
downloadlinux-5c2442fd78998af60e13aba506d103f7f43f8701.tar.xz
linux-5c2442fd78998af60e13aba506d103f7f43f8701.zip
scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/csiostor/csio_scsi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 462560b2855e..469d0bc9f5fe 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -1713,8 +1713,11 @@ csio_scsi_err_handler(struct csio_hw *hw, struct csio_ioreq *req)
}
out:
- if (req->nsge > 0)
+ if (req->nsge > 0) {
scsi_dma_unmap(cmnd);
+ if (req->dcopy && (host_status == DID_OK))
+ host_status = csio_scsi_copy_to_sgl(hw, req);
+ }
cmnd->result = (((host_status) << 16) | scsi_status);
cmnd->scsi_done(cmnd);