Commit 30281091 authored by Alan Stern's avatar Alan Stern Committed by James Bottomley

[PATCH] Make the scsi error handler bus settle delay a per template option

On 1 Jun 2004, James Bottomley wrote:
> On Tue, 2004-06-01 at 15:29, Alan Stern wrote:
> > In addition, the settle-time delays would have to be removed from the
> > error handler -- which means adding it to all the low-level drivers.  Is
> > that doable?
>
> Well, for 2.6, I think that a simple flag indicating that the driver
> will implement it's own timeout should suffice rather than altering
> every LLD...
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent d0f6f938
......@@ -1026,6 +1026,7 @@ static int scsi_try_bus_reset(struct scsi_cmnd *scmd)
spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
if (rtn == SUCCESS) {
if (!scmd->device->host->hostt->skip_settle_delay)
scsi_sleep(BUS_RESET_SETTLE_TIME);
spin_lock_irqsave(scmd->device->host->host_lock, flags);
scsi_report_bus_reset(scmd->device->host, scmd->device->channel);
......@@ -1057,6 +1058,7 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd)
spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
if (rtn == SUCCESS) {
if (!scmd->device->host->hostt->skip_settle_delay)
scsi_sleep(HOST_RESET_SETTLE_TIME);
spin_lock_irqsave(scmd->device->host->host_lock, flags);
scsi_report_bus_reset(scmd->device->host, scmd->device->channel);
......
......@@ -409,6 +409,9 @@ struct scsi_host_template usb_stor_host_template = {
/* emulated HBA */
.emulated = TRUE,
/* we do our own delay after a device or bus reset */
.skip_settle_delay = 1,
/* sysfs device attributes */
.sdev_attrs = sysfs_device_attr_list,
......
......@@ -313,6 +313,11 @@ struct scsi_host_template {
*/
unsigned emulated:1;
/*
* True if the low-level driver performs its own reset-settle delays.
*/
unsigned skip_settle_delay:1;
/*
* Countdown for host blocking with no commands outstanding
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment