diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-05-28 07:55:48 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-17 13:05:03 -0400 |
commit | 94d0e7b805961c44e4dc486ffc21075084bb7175 (patch) | |
tree | 1609752ea7a9adb28583147f0bea33a9f10877d7 /drivers/scsi/scsi_error.c | |
parent | 8fa728a26886f56a9ee10a44fea0ddda301d21c3 (diff) |
[SCSI] allow sleeping in ->eh_device_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 3877a78f5e50..87d925055b47 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -857,17 +857,14 @@ static int scsi_eh_abort_cmds(struct list_head *work_q, | |||
857 | **/ | 857 | **/ |
858 | static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) | 858 | static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) |
859 | { | 859 | { |
860 | unsigned long flags; | 860 | int rtn; |
861 | int rtn = FAILED; | ||
862 | 861 | ||
863 | if (!scmd->device->host->hostt->eh_device_reset_handler) | 862 | if (!scmd->device->host->hostt->eh_device_reset_handler) |
864 | return rtn; | 863 | return FAILED; |
865 | 864 | ||
866 | scmd->owner = SCSI_OWNER_LOWLEVEL; | 865 | scmd->owner = SCSI_OWNER_LOWLEVEL; |
867 | 866 | ||
868 | spin_lock_irqsave(scmd->device->host->host_lock, flags); | ||
869 | rtn = scmd->device->host->hostt->eh_device_reset_handler(scmd); | 867 | rtn = scmd->device->host->hostt->eh_device_reset_handler(scmd); |
870 | spin_unlock_irqrestore(scmd->device->host->host_lock, flags); | ||
871 | 868 | ||
872 | if (rtn == SUCCESS) { | 869 | if (rtn == SUCCESS) { |
873 | scmd->device->was_reset = 1; | 870 | scmd->device->was_reset = 1; |