Re: [PATCH] libata: add 150ms between completion of hardreset and status checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun,

There is still something else bad going on in your driver.  I've tried
everything I can think of (timing changes, flushes, and whatnot)
but I still get random timeouts and random results from md5sum
on large files.  Even in the case where I don't get a timeout on a large
iso file, the md5sum is still random.  Strangely enough, though, 
the files may be good on-disk, since totem seems to play the DVD.iso
that I'm testing with without a problem.  I'm using debian with a 2.6.19.2
kernel.

Bob


--- Tejun Heo <htejun@xxxxxxxxx> wrote:

> Follow the old SRST rule and delay 150ms between completion of
> hardreset and status checking.  Debouncing delay should usually cover
> this but debounce duration could be shorter than 150ms under certain
> circumstances.
> 
> Usefulness depends on host controller implementation but it can't hurt
> and serves as a reminder that 2s delay for GoVault should also be
> added here.
> 
> Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
> ---
>  drivers/ata/libata-core.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index f210dbd..582e44d 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -3014,6 +3014,9 @@ int sata_std_hardreset(struct ata_port *ap, unsigned
> int *class)
>  		return 0;
>  	}
>  
> +	/* wait a while before checking status, see SRST for more info */
> +	msleep(150);
> +
>  	if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
>  		ata_port_printk(ap, KERN_ERR,
>  				"COMRESET failed (device not ready)\n");
> -- 
> 1.4.4.4
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux