diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-05-28 07:56:31 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-17 13:05:10 -0400 |
commit | 68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (patch) | |
tree | 3f28891df0b3a1ecdfe6a98547d8f3c43b74e905 /drivers/scsi/lpfc/lpfc_scsi.c | |
parent | 94d0e7b805961c44e4dc486ffc21075084bb7175 (diff) |
[SCSI] allow sleeping in ->eh_bus_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 13da26883da3..f2aff3f4042b 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -1054,7 +1054,7 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) | |||
1054 | * Note: midlayer calls this function with the host_lock held | 1054 | * Note: midlayer calls this function with the host_lock held |
1055 | */ | 1055 | */ |
1056 | static int | 1056 | static int |
1057 | lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | 1057 | __lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) |
1058 | { | 1058 | { |
1059 | struct Scsi_Host *shost = cmnd->device->host; | 1059 | struct Scsi_Host *shost = cmnd->device->host; |
1060 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; | 1060 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; |
@@ -1144,6 +1144,16 @@ out: | |||
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | static int | 1146 | static int |
1147 | lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | ||
1148 | { | ||
1149 | int rc; | ||
1150 | spin_lock_irq(cmnd->device->host->host_lock); | ||
1151 | rc = __lpfc_reset_bus_handler(cmnd); | ||
1152 | spin_unlock_irq(cmnd->device->host->host_lock); | ||
1153 | return rc; | ||
1154 | } | ||
1155 | |||
1156 | static int | ||
1147 | lpfc_slave_alloc(struct scsi_device *sdev) | 1157 | lpfc_slave_alloc(struct scsi_device *sdev) |
1148 | { | 1158 | { |
1149 | struct lpfc_hba *phba = (struct lpfc_hba *)sdev->host->hostdata[0]; | 1159 | struct lpfc_hba *phba = (struct lpfc_hba *)sdev->host->hostdata[0]; |