From 8fa728a26886f56a9ee10a44fea0ddda301d21c3 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 28 May 2005 07:54:40 -0400 Subject: [SCSI] allow sleeping in ->eh_abort_handler() Signed-off-by: James Bottomley --- drivers/scsi/scsi_error.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'drivers/scsi/scsi_error.c') diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 113c02d..3877a78 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) * abort a timed out command or not. not sure how * we should treat them differently anyways. */ - spin_lock_irqsave(shost->host_lock, flags); if (shost->hostt->eh_abort_handler) shost->hostt->eh_abort_handler(scmd); - spin_unlock_irqrestore(shost->host_lock, flags); scmd->request->rq_status = RQ_SCSI_DONE; scmd->owner = SCSI_OWNER_ERROR_HANDLER; @@ -735,11 +733,8 @@ static int scsi_eh_get_sense(struct list_head *work_q, **/ static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd) { - unsigned long flags; - int rtn = FAILED; - if (!scmd->device->host->hostt->eh_abort_handler) - return rtn; + return FAILED; /* * 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) scmd->owner = SCSI_OWNER_LOWLEVEL; - spin_lock_irqsave(scmd->device->host->host_lock, flags); - rtn = scmd->device->host->hostt->eh_abort_handler(scmd); - spin_unlock_irqrestore(scmd->device->host->host_lock, flags); - - return rtn; + return scmd->device->host->hostt->eh_abort_handler(scmd); } /** -- cgit v1.1