summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-04-13 23:37:49 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-13 23:37:49 +0200
commit87af0c3813570193c6708f6fddbf85178a5bab7e (patch)
tree21c2cbd1d325431edba79eeb83a6757e2abf5af5 /drivers
parentMerge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parentscsi: csiostor: fix missing data copy in csio_scsi_err_handler() (diff)
downloadlinux-87af0c3813570193c6708f6fddbf85178a5bab7e.tar.xz
linux-87af0c3813570193c6708f6fddbf85178a5bab7e.zip
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "One obvious fix for a ciostor data corruption on error bug" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
Diffstat (limited to 'drivers')
-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);