scsi: always send command aborts
authorHannes Reinecke <hare@suse.de>
Thu, 6 Apr 2017 13:36:31 +0000 (15:36 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 6 Apr 2017 17:07:32 +0000 (13:07 -0400)
When a command has timed out we always should be sending an
abort; with the previous code a failed abort might signal
SCSI EH to start, and all other timed out commands will
never be aborted, even though they might belong to a
different ITL nexus.

Cc: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c

index 370f6c045b60e32f6c20dae425dadd9b669789f8..cff7d9de79f2b70e1379202bc109dbed5883b6af 100644 (file)
@@ -196,19 +196,7 @@ scsi_abort_command(struct scsi_cmnd *scmd)
                return FAILED;
        }
 
-       /*
-        * Do not try a command abort if
-        * SCSI EH has already started.
-        */
        spin_lock_irqsave(shost->host_lock, flags);
-       if (scsi_host_in_recovery(shost)) {
-               spin_unlock_irqrestore(shost->host_lock, flags);
-               SCSI_LOG_ERROR_RECOVERY(3,
-                       scmd_printk(KERN_INFO, scmd,
-                                   "not aborting, host in recovery\n"));
-               return FAILED;
-       }
-
        if (shost->eh_deadline != -1 && !shost->last_reset)
                shost->last_reset = jiffies;
        spin_unlock_irqrestore(shost->host_lock, flags);