aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-11-10 04:08:10 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:45:55 -0500
commit55a8e2c83ce50548dfef74bb19dfe2b809cb3099 (patch)
tree1d5ed12c49a254364f9009e9cdbf4609b92f3afb /include/linux/libata.h
parentbff0464769f2a1bd348265de704471747378e247 (diff)
[PATCH] libata: implement presence detection via polling IDENTIFY
On some controllers (ICHs in piix mode), there is *NO* reliable way to determine device presence other than issuing IDENTIFY and see how the transaction proceeds by watching the TF status register. libata acted this way before irq-pio and phantom devices caused very little problem but now that IDENTIFY is performed using IRQ drive PIO, such phantom devices now result in multiple 30sec timeouts during boot. This patch implements ATA_FLAG_DETECT_POLLING. If a LLD sets this flag, libata core issues the initial IDENTIFY in polling mode and if the initial data transfer fails w/ HSM violation, the port is considered to be empty thus replicating the old libata and IDE behavior. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 36e233cc3886..9080789913f7 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -176,6 +176,8 @@ enum {
176 ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H 176 ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H
177 * Register FIS clearing BSY */ 177 * Register FIS clearing BSY */
178 ATA_FLAG_DEBUGMSG = (1 << 13), 178 ATA_FLAG_DEBUGMSG = (1 << 13),
179 ATA_FLAG_DETECT_POLLING = (1 << 14), /* detect device presence by
180 * polling IDENTIFY */
179 181
180 /* The following flag belongs to ap->pflags but is kept in 182 /* The following flag belongs to ap->pflags but is kept in
181 * ap->flags because it's referenced in many LLDs and will be 183 * ap->flags because it's referenced in many LLDs and will be
@@ -335,6 +337,7 @@ enum ata_completion_errors {
335 AC_ERR_SYSTEM = (1 << 6), /* system error */ 337 AC_ERR_SYSTEM = (1 << 6), /* system error */
336 AC_ERR_INVALID = (1 << 7), /* invalid argument */ 338 AC_ERR_INVALID = (1 << 7), /* invalid argument */
337 AC_ERR_OTHER = (1 << 8), /* unknown */ 339 AC_ERR_OTHER = (1 << 8), /* unknown */
340 AC_ERR_NODEV_HINT = (1 << 9), /* polling device detection hint */
338}; 341};
339 342
340/* forward declarations */ 343/* forward declarations */