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/ieee1394/sbp2.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/ieee1394/sbp2.c')
-rw-r--r-- | drivers/ieee1394/sbp2.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index de552486b1c9..fcfddcc8e7ba 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -2615,7 +2615,7 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt) | |||
2615 | /* | 2615 | /* |
2616 | * Called by scsi stack when something has really gone wrong. | 2616 | * Called by scsi stack when something has really gone wrong. |
2617 | */ | 2617 | */ |
2618 | static int sbp2scsi_reset(struct scsi_cmnd *SCpnt) | 2618 | static int __sbp2scsi_reset(struct scsi_cmnd *SCpnt) |
2619 | { | 2619 | { |
2620 | struct scsi_id_instance_data *scsi_id = | 2620 | struct scsi_id_instance_data *scsi_id = |
2621 | (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; | 2621 | (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; |
@@ -2630,6 +2630,18 @@ static int sbp2scsi_reset(struct scsi_cmnd *SCpnt) | |||
2630 | return(SUCCESS); | 2630 | return(SUCCESS); |
2631 | } | 2631 | } |
2632 | 2632 | ||
2633 | static int sbp2scsi_reset(struct scsi_cmnd *SCpnt) | ||
2634 | { | ||
2635 | unsigned long flags; | ||
2636 | int rc; | ||
2637 | |||
2638 | spin_lock_irqsave(SCpnt->device->host->host_lock, flags); | ||
2639 | rc = __sbp2scsi_reset(SCpnt); | ||
2640 | spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags); | ||
2641 | |||
2642 | return rc; | ||
2643 | } | ||
2644 | |||
2633 | static const char *sbp2scsi_info (struct Scsi_Host *host) | 2645 | static const char *sbp2scsi_info (struct Scsi_Host *host) |
2634 | { | 2646 | { |
2635 | return "SCSI emulation for IEEE-1394 SBP-2 Devices"; | 2647 | return "SCSI emulation for IEEE-1394 SBP-2 Devices"; |