* [PATCH] Add Domain Validation to 53c700 driver
@ 2004-03-14 5:35 James Bottomley
0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2004-03-14 5:35 UTC (permalink / raw)
To: SCSI Mailing List
This simply throws out the 53c700 driver's optimistic setting of the
best possible transport parameters and replaces it with DV
determination. It also adds a missing report_bus_reset() callback and
finally does a delayed DV on device errors.
James
===== drivers/scsi/53c700.c 1.48 vs edited =====
--- 1.48/drivers/scsi/53c700.c Fri Mar 12 06:52:13 2004
+++ edited/drivers/scsi/53c700.c Sat Mar 13 23:17:21 2004
@@ -1522,6 +1522,8 @@
printk(KERN_ERR "scsi%d: Bus Reset detected, executing command %p, slot %p, dsp %08x[%04x]\n",
host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript);
+ scsi_report_bus_reset(host, 0);
+
/* clear all the negotiated parameters */
__shost_for_each_device(SDp, host)
SDp->hostdata = 0;
@@ -1967,6 +1969,9 @@
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;
}
@@ -2051,9 +2056,11 @@
scsi_adjust_queue_depth(SDp, 0, SDp->host->cmd_per_lun);
}
if(hostdata->fast) {
- NCR_700_set_period(SDp, hostdata->min_period);
- NCR_700_set_offset(SDp, hostdata->chip710
- ? NCR_710_MAX_OFFSET : NCR_700_MAX_OFFSET);
+ /* Find the correct offset and period via domain validation */
+ spi_dv_device(SDp);
+ } else {
+ spi_offset(SDp) = 0;
+ spi_period(SDp) = 0;
}
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-14 5:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-14 5:35 [PATCH] Add Domain Validation to 53c700 driver James Bottomley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.