From 68b3aa7c9805aee9005a8ca53c5e99177961fbb9 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 28 May 2005 07:56:31 -0400 Subject: [SCSI] allow sleeping in ->eh_bus_reset_handler() Signed-off-by: James Bottomley --- drivers/scsi/fd_mcs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/scsi/fd_mcs.c') diff --git a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c index 4a358aec2e59..fa652f8aa643 100644 --- a/drivers/scsi/fd_mcs.c +++ b/drivers/scsi/fd_mcs.c @@ -1243,6 +1243,7 @@ static int fd_mcs_abort(Scsi_Cmnd * SCpnt) static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) { struct Scsi_Host *shpnt = SCpnt->device->host; + unsigned long flags; #if DEBUG_RESET static int called_once = 0; @@ -1259,6 +1260,8 @@ static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) { called_once = 1; #endif + spin_lock_irqsave(shpnt->host_lock, flags); + outb(1, SCSI_Cntl_port); do_pause(2); outb(0, SCSI_Cntl_port); @@ -1266,6 +1269,8 @@ static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) { outb(0, SCSI_Mode_Cntl_port); outb(PARITY_MASK, TMC_Cntl_port); + spin_unlock_irqrestore(shpnt->host_lock, flags); + /* Unless this is the very first call (i.e., SCPnt == NULL), everything is probably hosed at this point. We will, however, try to keep things going by informing the high-level code that we need help. */ -- cgit v1.2.2