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/dc395x.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/dc395x.c')
-rw-r--r-- | drivers/scsi/dc395x.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index cca41cf8d3e7..ae13c002f60d 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -1310,7 +1310,7 @@ static void reset_dev_param(struct AdapterCtlBlk *acb) | |||
1310 | * @cmd - some command for this host (for fetching hooks) | 1310 | * @cmd - some command for this host (for fetching hooks) |
1311 | * Returns: SUCCESS (0x2002) on success, else FAILED (0x2003). | 1311 | * Returns: SUCCESS (0x2002) on success, else FAILED (0x2003). |
1312 | */ | 1312 | */ |
1313 | static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd) | 1313 | static int __dc395x_eh_bus_reset(struct scsi_cmnd *cmd) |
1314 | { | 1314 | { |
1315 | struct AdapterCtlBlk *acb = | 1315 | struct AdapterCtlBlk *acb = |
1316 | (struct AdapterCtlBlk *)cmd->device->host->hostdata; | 1316 | (struct AdapterCtlBlk *)cmd->device->host->hostdata; |
@@ -1356,6 +1356,16 @@ static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd) | |||
1356 | return SUCCESS; | 1356 | return SUCCESS; |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd) | ||
1360 | { | ||
1361 | int rc; | ||
1362 | |||
1363 | spin_lock_irq(cmd->device->host->host_lock); | ||
1364 | rc = __dc395x_eh_bus_reset(cmd); | ||
1365 | spin_unlock_irq(cmd->device->host->host_lock); | ||
1366 | |||
1367 | return rc; | ||
1368 | } | ||
1359 | 1369 | ||
1360 | /* | 1370 | /* |
1361 | * abort an errant SCSI command | 1371 | * abort an errant SCSI command |