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>
This commit is contained in:
parent
819f80c955
commit
44257a1b36
@ -168,7 +168,6 @@ MODULE_LICENSE("GPL");
|
|||||||
|
|
||||||
STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *);
|
STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *);
|
||||||
STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
|
STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
|
||||||
STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt);
|
|
||||||
STATIC int NCR_700_host_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_setup(struct Scsi_Host *host);
|
||||||
STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
|
STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
|
||||||
@ -315,7 +314,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
|
|||||||
/* Fill in the missing routines from the host template */
|
/* Fill in the missing routines from the host template */
|
||||||
tpnt->queuecommand = NCR_700_queuecommand;
|
tpnt->queuecommand = NCR_700_queuecommand;
|
||||||
tpnt->eh_abort_handler = NCR_700_abort;
|
tpnt->eh_abort_handler = NCR_700_abort;
|
||||||
tpnt->eh_bus_reset_handler = NCR_700_bus_reset;
|
|
||||||
tpnt->eh_host_reset_handler = NCR_700_host_reset;
|
tpnt->eh_host_reset_handler = NCR_700_host_reset;
|
||||||
tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
|
tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
|
||||||
tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
|
tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
|
||||||
@ -1938,14 +1936,14 @@ NCR_700_abort(struct scsi_cmnd * SCp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
STATIC int
|
STATIC int
|
||||||
NCR_700_bus_reset(struct scsi_cmnd * SCp)
|
NCR_700_host_reset(struct scsi_cmnd * SCp)
|
||||||
{
|
{
|
||||||
DECLARE_COMPLETION_ONSTACK(complete);
|
DECLARE_COMPLETION_ONSTACK(complete);
|
||||||
struct NCR_700_Host_Parameters *hostdata =
|
struct NCR_700_Host_Parameters *hostdata =
|
||||||
(struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
|
(struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
|
||||||
|
|
||||||
scmd_printk(KERN_INFO, SCp,
|
scmd_printk(KERN_INFO, SCp,
|
||||||
"New error handler wants BUS reset, cmd %p\n\t", SCp);
|
"New error handler wants HOST reset, cmd %p\n\t", SCp);
|
||||||
scsi_print_command(SCp);
|
scsi_print_command(SCp);
|
||||||
|
|
||||||
/* In theory, eh_complete should always be null because the
|
/* In theory, eh_complete should always be null because the
|
||||||
@ -1960,6 +1958,7 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp)
|
|||||||
|
|
||||||
hostdata->eh_complete = &complete;
|
hostdata->eh_complete = &complete;
|
||||||
NCR_700_internal_bus_reset(SCp->device->host);
|
NCR_700_internal_bus_reset(SCp->device->host);
|
||||||
|
NCR_700_chip_reset(SCp->device->host);
|
||||||
|
|
||||||
spin_unlock_irq(SCp->device->host->host_lock);
|
spin_unlock_irq(SCp->device->host->host_lock);
|
||||||
wait_for_completion(&complete);
|
wait_for_completion(&complete);
|
||||||
@ -1974,22 +1973,6 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC int
|
|
||||||
NCR_700_host_reset(struct scsi_cmnd * SCp)
|
|
||||||
{
|
|
||||||
scmd_printk(KERN_INFO, SCp, "New error handler wants HOST reset\n\t");
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
STATIC void
|
STATIC void
|
||||||
NCR_700_set_period(struct scsi_target *STp, int period)
|
NCR_700_set_period(struct scsi_target *STp, int period)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user