]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] libata: implement presence detection via polling IDENTIFY
authorTejun Heo <htejun@gmail.com>
Fri, 10 Nov 2006 09:08:10 +0000 (18:08 +0900)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 03:45:55 +0000 (22:45 -0500)
commit55a8e2c83ce50548dfef74bb19dfe2b809cb3099
tree1d5ed12c49a254364f9009e9cdbf4609b92f3afb
parentbff0464769f2a1bd348265de704471747378e247
[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>
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata.h
include/linux/libata.h