Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: 53c700: move bus reset to host reset

bus reset always returns SUCCESS, meaning host reset was never
tested. At the same time the only difference to the HBA is a missing
call to NCR_700_chip_reset(). So add the missing call to bus reset,
drop host reset, and move bus reset to host reset.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Hannes Reinecke and committed by
Martin K. Petersen
44257a1b 819f80c9

+3 -20
+3 -20
drivers/scsi/53c700.c
··· 168 168 169 169 STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *); 170 170 STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); 171 - STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt); 172 171 STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); 173 172 STATIC void NCR_700_chip_setup(struct Scsi_Host *host); 174 173 STATIC void NCR_700_chip_reset(struct Scsi_Host *host); ··· 314 315 /* Fill in the missing routines from the host template */ 315 316 tpnt->queuecommand = NCR_700_queuecommand; 316 317 tpnt->eh_abort_handler = NCR_700_abort; 317 - tpnt->eh_bus_reset_handler = NCR_700_bus_reset; 318 318 tpnt->eh_host_reset_handler = NCR_700_host_reset; 319 319 tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; 320 320 tpnt->sg_tablesize = NCR_700_SG_SEGMENTS; ··· 1936 1938 } 1937 1939 1938 1940 STATIC int 1939 - NCR_700_bus_reset(struct scsi_cmnd * SCp) 1941 + NCR_700_host_reset(struct scsi_cmnd * SCp) 1940 1942 { 1941 1943 DECLARE_COMPLETION_ONSTACK(complete); 1942 1944 struct NCR_700_Host_Parameters *hostdata = 1943 1945 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; 1944 1946 1945 1947 scmd_printk(KERN_INFO, SCp, 1946 - "New error handler wants BUS reset, cmd %p\n\t", SCp); 1948 + "New error handler wants HOST reset, cmd %p\n\t", SCp); 1947 1949 scsi_print_command(SCp); 1948 1950 1949 1951 /* In theory, eh_complete should always be null because the ··· 1958 1960 1959 1961 hostdata->eh_complete = &complete; 1960 1962 NCR_700_internal_bus_reset(SCp->device->host); 1963 + NCR_700_chip_reset(SCp->device->host); 1961 1964 1962 1965 spin_unlock_irq(SCp->device->host->host_lock); 1963 1966 wait_for_completion(&complete); ··· 1970 1971 spi_schedule_dv_device(SCp->device); 1971 1972 1972 1973 spin_unlock_irq(SCp->device->host->host_lock); 1973 - return SUCCESS; 1974 - } 1975 - 1976 - STATIC int 1977 - NCR_700_host_reset(struct scsi_cmnd * SCp) 1978 - { 1979 - scmd_printk(KERN_INFO, SCp, "New error handler wants HOST reset\n\t"); 1980 - scsi_print_command(SCp); 1981 - 1982 - spin_lock_irq(SCp->device->host->host_lock); 1983 - 1984 - NCR_700_internal_bus_reset(SCp->device->host); 1985 - NCR_700_chip_reset(SCp->device->host); 1986 - 1987 - spin_unlock_irq(SCp->device->host->host_lock); 1988 - 1989 1974 return SUCCESS; 1990 1975 } 1991 1976