Re: [PATCH] libata: blacklist for early irq problem

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

 



Albert Lee wrote:
...
+ /* some drives raise INTRQ early before clearing BSY */
+	if (unlikely(qc->dev->horkage & ATA_HORKAGE_EARLY_IRQ))
+		/* wait up to 10 microseconds for BSY to clear */
+		ata_busy_wait_alt(ap, ATA_BUSY, ATA_EARLY_IRQ_WAIT);
+
 	/* check altstatus */
 	status = ata_altstatus(ap);
 	if (status & ATA_BUSY)
...

I dunno.

I think a much simpler patch could address the same situation,
with *no blacklist* to maintain, and no added overhead required:

	/* check altstatus */
+	retries = 10;
+	while (((status = ata_altstatus(ap)) & ATA_BUSY) && --retries) {
+		udelay(1);
+	}
-	status = ata_altstatus(ap);
	if (status & ATA_BUSY)

This still just does a single access in the hot path, but without any
real added complexity otherwise.

????
-
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