summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2017-08-25 07:57:17 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 17:21:11 -0400
commit44257a1b36fc7b69c021d25ab0d18bb734846ccb (patch)
treef32789d10526955d832bbecfc6b1d6ae0d345c69 /drivers/scsi/53c700.c
parent819f80c95575286fd4538ab2fbdfcf7ad9cc0b9a (diff)
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>
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r--drivers/scsi/53c700.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 4b3b08025ef6..6be77b3aa8a5 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -168,7 +168,6 @@ MODULE_LICENSE("GPL");
168 168
169STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *); 169STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *);
170STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); 170STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
171STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt);
172STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); 171STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt);
173STATIC void NCR_700_chip_setup(struct Scsi_Host *host); 172STATIC void NCR_700_chip_setup(struct Scsi_Host *host);
174STATIC void NCR_700_chip_reset(struct Scsi_Host *host); 173STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
@@ -315,7 +314,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
315 /* Fill in the missing routines from the host template */ 314 /* Fill in the missing routines from the host template */
316 tpnt->queuecommand = NCR_700_queuecommand; 315 tpnt->queuecommand = NCR_700_queuecommand;
317 tpnt->eh_abort_handler = NCR_700_abort; 316 tpnt->eh_abort_handler = NCR_700_abort;
318 tpnt->eh_bus_reset_handler = NCR_700_bus_reset;
319 tpnt->eh_host_reset_handler = NCR_700_host_reset; 317 tpnt->eh_host_reset_handler = NCR_700_host_reset;
320 tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; 318 tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
321 tpnt->sg_tablesize = NCR_700_SG_SEGMENTS; 319 tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
@@ -1938,14 +1936,14 @@ NCR_700_abort(struct scsi_cmnd * SCp)
1938} 1936}
1939 1937
1940STATIC int 1938STATIC int
1941NCR_700_bus_reset(struct scsi_cmnd * SCp) 1939NCR_700_host_reset(struct scsi_cmnd * SCp)
1942{ 1940{
1943 DECLARE_COMPLETION_ONSTACK(complete); 1941 DECLARE_COMPLETION_ONSTACK(complete);
1944 struct NCR_700_Host_Parameters *hostdata = 1942 struct NCR_700_Host_Parameters *hostdata =
1945 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; 1943 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
1946 1944
1947 scmd_printk(KERN_INFO, SCp, 1945 scmd_printk(KERN_INFO, SCp,
1948 "New error handler wants BUS reset, cmd %p\n\t", SCp); 1946 "New error handler wants HOST reset, cmd %p\n\t", SCp);
1949 scsi_print_command(SCp); 1947 scsi_print_command(SCp);
1950 1948
1951 /* In theory, eh_complete should always be null because the 1949 /* In theory, eh_complete should always be null because the
@@ -1960,6 +1958,7 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp)
1960 1958
1961 hostdata->eh_complete = &complete; 1959 hostdata->eh_complete = &complete;
1962 NCR_700_internal_bus_reset(SCp->device->host); 1960 NCR_700_internal_bus_reset(SCp->device->host);
1961 NCR_700_chip_reset(SCp->device->host);
1963 1962
1964 spin_unlock_irq(SCp->device->host->host_lock); 1963 spin_unlock_irq(SCp->device->host->host_lock);
1965 wait_for_completion(&complete); 1964 wait_for_completion(&complete);
@@ -1974,22 +1973,6 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp)
1974 return SUCCESS; 1973 return SUCCESS;
1975} 1974}
1976 1975
1977STATIC int
1978NCR_700_host_reset(struct scsi_cmnd * SCp)
1979{
1980 scmd_printk(KERN_INFO, SCp, "New error handler wants HOST reset\n\t");
1981 scsi_print_command(SCp);
1982
1983 spin_lock_irq(SCp->device->host->host_lock);
1984
1985 NCR_700_internal_bus_reset(SCp->device->host);
1986 NCR_700_chip_reset(SCp->device->host);
1987
1988 spin_unlock_irq(SCp->device->host->host_lock);
1989
1990 return SUCCESS;
1991}
1992
1993STATIC void 1976STATIC void
1994NCR_700_set_period(struct scsi_target *STp, int period) 1977NCR_700_set_period(struct scsi_target *STp, int period)
1995{ 1978{