From 8e8c9d01c5ea33e0d21f13264a9caeed255526d1 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 6 Apr 2017 15:36:33 +0200 Subject: 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 Reviewed-by: Benjamin Block Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- include/scsi/scsi_eh.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/scsi/scsi_eh.h') 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; -- cgit