aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 113c02dbb2df..3877a78f5e50 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -526,10 +526,8 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
526 * abort a timed out command or not. not sure how 526 * abort a timed out command or not. not sure how
527 * we should treat them differently anyways. 527 * we should treat them differently anyways.
528 */ 528 */
529 spin_lock_irqsave(shost->host_lock, flags);
530 if (shost->hostt->eh_abort_handler) 529 if (shost->hostt->eh_abort_handler)
531 shost->hostt->eh_abort_handler(scmd); 530 shost->hostt->eh_abort_handler(scmd);
532 spin_unlock_irqrestore(shost->host_lock, flags);
533 531
534 scmd->request->rq_status = RQ_SCSI_DONE; 532 scmd->request->rq_status = RQ_SCSI_DONE;
535 scmd->owner = SCSI_OWNER_ERROR_HANDLER; 533 scmd->owner = SCSI_OWNER_ERROR_HANDLER;
@@ -735,11 +733,8 @@ static int scsi_eh_get_sense(struct list_head *work_q,
735 **/ 733 **/
736static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd) 734static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd)
737{ 735{
738 unsigned long flags;
739 int rtn = FAILED;
740
741 if (!scmd->device->host->hostt->eh_abort_handler) 736 if (!scmd->device->host->hostt->eh_abort_handler)
742 return rtn; 737 return FAILED;
743 738
744 /* 739 /*
745 * scsi_done was called just after the command timed out and before 740 * scsi_done was called just after the command timed out and before
@@ -750,11 +745,7 @@ static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd)
750 745
751 scmd->owner = SCSI_OWNER_LOWLEVEL; 746 scmd->owner = SCSI_OWNER_LOWLEVEL;
752 747
753 spin_lock_irqsave(scmd->device->host->host_lock, flags); 748 return scmd->device->host->hostt->eh_abort_handler(scmd);
754 rtn = scmd->device->host->hostt->eh_abort_handler(scmd);
755 spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
756
757 return rtn;
758} 749}
759 750
760/** 751/**