]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] More USB deadlock fixes
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 10 Apr 2014 20:36:11 +0000 (13:36 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 21 Apr 2014 18:10:34 +0000 (11:10 -0700)
This patch fixes a corner case in the previous USB Deadlock fix patch (12023e7
[SCSI] Fix USB deadlock caused by SCSI error handling).

The scenario is abort command, set flag, abort completes, send TUR, TUR
doesn't return, so we now try to abort the TUR, but scsi_abort_eh_cmnd()
will skip the abort because the flag is set and move straight to reset.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_error.c

index ad064d2d730bd331954d582282929fa959fdc0ca..f17aa7aa78796e7f6d358b8cd5f68fd43cfee4d4 100644 (file)
@@ -921,6 +921,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
        ses->prot_op = scmd->prot_op;
 
        scmd->prot_op = SCSI_PROT_NORMAL;
+       scmd->eh_eflags = 0;
        scmd->cmnd = ses->eh_cmnd;
        memset(scmd->cmnd, 0, BLK_MAX_CDB);
        memset(&scmd->sdb, 0, sizeof(scmd->sdb));