diff options
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r-- | drivers/scsi/53c700.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 4b1bb529f67..a7620fc368e 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -170,7 +170,6 @@ MODULE_LICENSE("GPL"); STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *)); STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt); -STATIC int NCR_700_dev_reset(struct scsi_cmnd * SCpnt); STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); STATIC void NCR_700_chip_setup(struct Scsi_Host *host); STATIC void NCR_700_chip_reset(struct Scsi_Host *host); @@ -330,7 +329,6 @@ NCR_700_detect(struct scsi_host_template *tpnt, /* Fill in the missing routines from the host template */ tpnt->queuecommand = NCR_700_queuecommand; tpnt->eh_abort_handler = NCR_700_abort; - tpnt->eh_device_reset_handler = NCR_700_dev_reset; tpnt->eh_bus_reset_handler = NCR_700_bus_reset; tpnt->eh_host_reset_handler = NCR_700_host_reset; tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; @@ -1959,34 +1957,31 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp); scsi_print_command(SCp); + /* In theory, eh_complete should always be null because the * eh is single threaded, but just in case we're handling a * reset via sg or something */ - while(hostdata->eh_complete != NULL) { + spin_lock_irq(SCp->device->host->host_lock); + while (hostdata->eh_complete != NULL) { spin_unlock_irq(SCp->device->host->host_lock); msleep_interruptible(100); spin_lock_irq(SCp->device->host->host_lock); } + hostdata->eh_complete = &complete; NCR_700_internal_bus_reset(SCp->device->host); + spin_unlock_irq(SCp->device->host->host_lock); wait_for_completion(&complete); spin_lock_irq(SCp->device->host->host_lock); + hostdata->eh_complete = NULL; /* Revalidate the transport parameters of the failing device */ if(hostdata->fast) spi_schedule_dv_device(SCp->device); - return SUCCESS; -} -STATIC int -NCR_700_dev_reset(struct scsi_cmnd * SCp) -{ - printk(KERN_INFO "scsi%d (%d:%d) New error handler wants device reset\n\t", - SCp->device->host->host_no, SCp->device->id, SCp->device->lun); - scsi_print_command(SCp); - - return FAILED; + spin_unlock_irq(SCp->device->host->host_lock); + return SUCCESS; } STATIC int @@ -1996,8 +1991,13 @@ NCR_700_host_reset(struct scsi_cmnd * SCp) SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scsi_print_command(SCp); + spin_lock_irq(SCp->device->host->host_lock); + NCR_700_internal_bus_reset(SCp->device->host); NCR_700_chip_reset(SCp->device->host); + + spin_unlock_irq(SCp->device->host->host_lock); + return SUCCESS; } @@ -2125,7 +2125,7 @@ static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type) } static ssize_t -NCR_700_show_active_tags(struct device *dev, char *buf) +NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf) { struct scsi_device *SDp = to_scsi_device(dev); |