lkml.org 
[lkml]   [2007]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] libata: Fix (hopefully) all the remaining problems with devices failing setup/identify
Alan wrote:
> @@ -5142,6 +5174,20 @@
> status = ata_chk_status(ap);
> if (unlikely(status & ATA_BUSY))
> goto idle_irq;
> +
> + if (unlikely(qc->tf.command == ATA_CMD_SET_FEATURES &&
> + qc->tf.feature == SETFEATURES_XFER)) {
> + /* Let the timings change settle and the drive catch up as
> + some hardware needs up to 10uS to get its brain back in
> + gear. Taken from the workarounds in drivers/ide done by
> + Matthew Faupel/Niccolo Rigacci */
> + for (i = 0; i < 10; i++) {
> + if ((status & (ATA_BUSY | ATA_DRQ | ATA_ERR)) == 0)
> + break;
> + udelay(1);
> + status = ata_chk_status(ap);
> + }


Looks like you should use ata_busy_wait() here, rather than reproducing
the same code again.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-31 18:27    [W:0.045 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site