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 4b1bb529f676..a7620fc368e7 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -170,7 +170,6 @@ MODULE_LICENSE("GPL"); | |||
170 | STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *)); | 170 | STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *)); |
171 | STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); | 171 | STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); |
172 | STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt); | 172 | STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt); |
173 | STATIC int NCR_700_dev_reset(struct scsi_cmnd * SCpnt); | ||
174 | STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); | 173 | STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); |
175 | STATIC void NCR_700_chip_setup(struct Scsi_Host *host); | 174 | STATIC void NCR_700_chip_setup(struct Scsi_Host *host); |
176 | STATIC void NCR_700_chip_reset(struct Scsi_Host *host); | 175 | STATIC void NCR_700_chip_reset(struct Scsi_Host *host); |
@@ -330,7 +329,6 @@ NCR_700_detect(struct scsi_host_template *tpnt, | |||
330 | /* Fill in the missing routines from the host template */ | 329 | /* Fill in the missing routines from the host template */ |
331 | tpnt->queuecommand = NCR_700_queuecommand; | 330 | tpnt->queuecommand = NCR_700_queuecommand; |
332 | tpnt->eh_abort_handler = NCR_700_abort; | 331 | tpnt->eh_abort_handler = NCR_700_abort; |
333 | tpnt->eh_device_reset_handler = NCR_700_dev_reset; | ||
334 | tpnt->eh_bus_reset_handler = NCR_700_bus_reset; | 332 | tpnt->eh_bus_reset_handler = NCR_700_bus_reset; |
335 | tpnt->eh_host_reset_handler = NCR_700_host_reset; | 333 | tpnt->eh_host_reset_handler = NCR_700_host_reset; |
336 | tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; | 334 | tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; |
@@ -1959,34 +1957,31 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) | |||
1959 | printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t", | 1957 | printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t", |
1960 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp); | 1958 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp); |
1961 | scsi_print_command(SCp); | 1959 | scsi_print_command(SCp); |
1960 | |||
1962 | /* In theory, eh_complete should always be null because the | 1961 | /* In theory, eh_complete should always be null because the |
1963 | * eh is single threaded, but just in case we're handling a | 1962 | * eh is single threaded, but just in case we're handling a |
1964 | * reset via sg or something */ | 1963 | * reset via sg or something */ |
1965 | while(hostdata->eh_complete != NULL) { | 1964 | spin_lock_irq(SCp->device->host->host_lock); |
1965 | while (hostdata->eh_complete != NULL) { | ||
1966 | spin_unlock_irq(SCp->device->host->host_lock); | 1966 | spin_unlock_irq(SCp->device->host->host_lock); |
1967 | msleep_interruptible(100); | 1967 | msleep_interruptible(100); |
1968 | spin_lock_irq(SCp->device->host->host_lock); | 1968 | spin_lock_irq(SCp->device->host->host_lock); |
1969 | } | 1969 | } |
1970 | |||
1970 | hostdata->eh_complete = &complete; | 1971 | hostdata->eh_complete = &complete; |
1971 | NCR_700_internal_bus_reset(SCp->device->host); | 1972 | NCR_700_internal_bus_reset(SCp->device->host); |
1973 | |||
1972 | spin_unlock_irq(SCp->device->host->host_lock); | 1974 | spin_unlock_irq(SCp->device->host->host_lock); |
1973 | wait_for_completion(&complete); | 1975 | wait_for_completion(&complete); |
1974 | spin_lock_irq(SCp->device->host->host_lock); | 1976 | spin_lock_irq(SCp->device->host->host_lock); |
1977 | |||
1975 | hostdata->eh_complete = NULL; | 1978 | hostdata->eh_complete = NULL; |
1976 | /* Revalidate the transport parameters of the failing device */ | 1979 | /* Revalidate the transport parameters of the failing device */ |
1977 | if(hostdata->fast) | 1980 | if(hostdata->fast) |
1978 | spi_schedule_dv_device(SCp->device); | 1981 | spi_schedule_dv_device(SCp->device); |
1979 | return SUCCESS; | ||
1980 | } | ||
1981 | 1982 | ||
1982 | STATIC int | 1983 | spin_unlock_irq(SCp->device->host->host_lock); |
1983 | NCR_700_dev_reset(struct scsi_cmnd * SCp) | 1984 | return SUCCESS; |
1984 | { | ||
1985 | printk(KERN_INFO "scsi%d (%d:%d) New error handler wants device reset\n\t", | ||
1986 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun); | ||
1987 | scsi_print_command(SCp); | ||
1988 | |||
1989 | return FAILED; | ||
1990 | } | 1985 | } |
1991 | 1986 | ||
1992 | STATIC int | 1987 | STATIC int |
@@ -1996,8 +1991,13 @@ NCR_700_host_reset(struct scsi_cmnd * SCp) | |||
1996 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun); | 1991 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun); |
1997 | scsi_print_command(SCp); | 1992 | scsi_print_command(SCp); |
1998 | 1993 | ||
1994 | spin_lock_irq(SCp->device->host->host_lock); | ||
1995 | |||
1999 | NCR_700_internal_bus_reset(SCp->device->host); | 1996 | NCR_700_internal_bus_reset(SCp->device->host); |
2000 | NCR_700_chip_reset(SCp->device->host); | 1997 | NCR_700_chip_reset(SCp->device->host); |
1998 | |||
1999 | spin_unlock_irq(SCp->device->host->host_lock); | ||
2000 | |||
2001 | return SUCCESS; | 2001 | return SUCCESS; |
2002 | } | 2002 | } |
2003 | 2003 | ||
@@ -2125,7 +2125,7 @@ static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type) | |||
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | static ssize_t | 2127 | static ssize_t |
2128 | NCR_700_show_active_tags(struct device *dev, char *buf) | 2128 | NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf) |
2129 | { | 2129 | { |
2130 | struct scsi_device *SDp = to_scsi_device(dev); | 2130 | struct scsi_device *SDp = to_scsi_device(dev); |
2131 | 2131 | ||