summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2017-04-06 15:36:33 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-04-06 13:07:33 -0400
commit8e8c9d01c5ea33e0d21f13264a9caeed255526d1 (patch)
treebf9748c6e26a839b43cf841ceb59b4efa4bc1ec4 /include/scsi
parent909657615d9b3ce709be4fd95b9a9e8c8c7c2be6 (diff)
downloadlinux-stable-8e8c9d01c5ea33e0d21f13264a9caeed255526d1.tar.gz
linux-stable-8e8c9d01c5ea33e0d21f13264a9caeed255526d1.tar.bz2
linux-stable-8e8c9d01c5ea33e0d21f13264a9caeed255526d1.zip
scsi: make eh_eflags persistent
If a failed command is retried and fails again we need to enter SCSI EH, otherwise we will never be able to recover the command. To detect this situation we must not clear scmd->eh_eflags when EH finishes but rather make it persistent throughout the lifetime of the command. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_eh.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index 98d366b55770..a25b3285dd6f 100644
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -31,6 +31,7 @@ extern int scsi_ioctl_reset(struct scsi_device *, int __user *);
struct scsi_eh_save {
/* saved state */
int result;
+ int eh_eflags;
enum dma_data_direction data_direction;
unsigned underflow;
unsigned char cmd_len;