diff options
Diffstat (limited to 'drivers/scsi/nsp32.c')
-rw-r--r-- | drivers/scsi/nsp32.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index d28c0d99c344..5159ceea319e 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -294,7 +294,6 @@ static struct scsi_host_template nsp32_template = { | |||
294 | .this_id = NSP32_HOST_SCSIID, | 294 | .this_id = NSP32_HOST_SCSIID, |
295 | .use_clustering = DISABLE_CLUSTERING, | 295 | .use_clustering = DISABLE_CLUSTERING, |
296 | .eh_abort_handler = nsp32_eh_abort, | 296 | .eh_abort_handler = nsp32_eh_abort, |
297 | /* .eh_device_reset_handler = NULL, */ | ||
298 | .eh_bus_reset_handler = nsp32_eh_bus_reset, | 297 | .eh_bus_reset_handler = nsp32_eh_bus_reset, |
299 | .eh_host_reset_handler = nsp32_eh_host_reset, | 298 | .eh_host_reset_handler = nsp32_eh_host_reset, |
300 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)) | 299 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)) |
@@ -2988,6 +2987,8 @@ static int nsp32_eh_bus_reset(struct scsi_cmnd *SCpnt) | |||
2988 | nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; | 2987 | nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; |
2989 | unsigned int base = SCpnt->device->host->io_port; | 2988 | unsigned int base = SCpnt->device->host->io_port; |
2990 | 2989 | ||
2990 | spin_lock_irq(SCpnt->device->host->host_lock); | ||
2991 | |||
2991 | nsp32_msg(KERN_INFO, "Bus Reset"); | 2992 | nsp32_msg(KERN_INFO, "Bus Reset"); |
2992 | nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt); | 2993 | nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt); |
2993 | 2994 | ||
@@ -2995,6 +2996,7 @@ static int nsp32_eh_bus_reset(struct scsi_cmnd *SCpnt) | |||
2995 | nsp32_do_bus_reset(data); | 2996 | nsp32_do_bus_reset(data); |
2996 | nsp32_write2(base, IRQ_CONTROL, 0); | 2997 | nsp32_write2(base, IRQ_CONTROL, 0); |
2997 | 2998 | ||
2999 | spin_unlock_irq(SCpnt->device->host->host_lock); | ||
2998 | return SUCCESS; /* SCSI bus reset is succeeded at any time. */ | 3000 | return SUCCESS; /* SCSI bus reset is succeeded at any time. */ |
2999 | } | 3001 | } |
3000 | 3002 | ||
@@ -3049,11 +3051,14 @@ static int nsp32_eh_host_reset(struct scsi_cmnd *SCpnt) | |||
3049 | nsp32_msg(KERN_INFO, "Host Reset"); | 3051 | nsp32_msg(KERN_INFO, "Host Reset"); |
3050 | nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt); | 3052 | nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt); |
3051 | 3053 | ||
3054 | spin_lock_irq(SCpnt->device->host->host_lock); | ||
3055 | |||
3052 | nsp32hw_init(data); | 3056 | nsp32hw_init(data); |
3053 | nsp32_write2(base, IRQ_CONTROL, IRQ_CONTROL_ALL_IRQ_MASK); | 3057 | nsp32_write2(base, IRQ_CONTROL, IRQ_CONTROL_ALL_IRQ_MASK); |
3054 | nsp32_do_bus_reset(data); | 3058 | nsp32_do_bus_reset(data); |
3055 | nsp32_write2(base, IRQ_CONTROL, 0); | 3059 | nsp32_write2(base, IRQ_CONTROL, 0); |
3056 | 3060 | ||
3061 | spin_unlock_irq(SCpnt->device->host->host_lock); | ||
3057 | return SUCCESS; /* Host reset is succeeded at any time. */ | 3062 | return SUCCESS; /* Host reset is succeeded at any time. */ |
3058 | } | 3063 | } |
3059 | 3064 | ||