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/ipr.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/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index f9c01a13abef..fd8af643feac 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -2916,7 +2916,7 @@ static int ipr_eh_host_reset(struct scsi_cmnd * scsi_cmd) | |||
2916 | * Return value: | 2916 | * Return value: |
2917 | * SUCCESS / FAILED | 2917 | * SUCCESS / FAILED |
2918 | **/ | 2918 | **/ |
2919 | static int ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd) | 2919 | static int __ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd) |
2920 | { | 2920 | { |
2921 | struct ipr_cmnd *ipr_cmd; | 2921 | struct ipr_cmnd *ipr_cmd; |
2922 | struct ipr_ioa_cfg *ioa_cfg; | 2922 | struct ipr_ioa_cfg *ioa_cfg; |
@@ -2970,6 +2970,17 @@ static int ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd) | |||
2970 | return (IPR_IOASC_SENSE_KEY(ioasc) ? FAILED : SUCCESS); | 2970 | return (IPR_IOASC_SENSE_KEY(ioasc) ? FAILED : SUCCESS); |
2971 | } | 2971 | } |
2972 | 2972 | ||
2973 | static int ipr_eh_dev_reset(struct scsi_cmnd * cmd) | ||
2974 | { | ||
2975 | int rc; | ||
2976 | |||
2977 | spin_lock_irq(cmd->device->host->host_lock); | ||
2978 | rc = __ipr_eh_dev_reset(cmd); | ||
2979 | spin_unlock_irq(cmd->device->host->host_lock); | ||
2980 | |||
2981 | return rc; | ||
2982 | } | ||
2983 | |||
2973 | /** | 2984 | /** |
2974 | * ipr_bus_reset_done - Op done function for bus reset. | 2985 | * ipr_bus_reset_done - Op done function for bus reset. |
2975 | * @ipr_cmd: ipr command struct | 2986 | * @ipr_cmd: ipr command struct |