libata: limit post SRST nsect/lbal wait to ~100ms
commite141d999b682cda9907179e3b843acb64c34a1d8
authorTejun Heo <htejun@gmail.com>
Sun, 10 Jun 2007 05:26:20 +0000 (10 14:26 +0900)
committerJeff Garzik <jeff@garzik.org>
Mon, 11 Jun 2007 04:52:53 +0000 (11 00:52 -0400)
tree2b9c7ebb9d01e7b335077a11a6ec982f3906dd7f
parent5acd50f641e697cb42240f278350a4f8eac9b4f5
libata: limit post SRST nsect/lbal wait to ~100ms

After SRST, libata used to wait for nsect/lbal to be set to 1/1 for
the slave device.  However, some ATAPI devices don't set nsect/lbal
after SRST and the wait itself isn't too useful as we're gonna wait
for !BSY right after that anyway.

Before reset-seq update, nsect/lbal wait failure used to be ignored
and caused 30sec delay during detection.  After reset-seq, all
timeouts are considered error conditions making libata fail to detect
such ATAPI devices.

This patch limits nsect/lbal wait to around 100ms.  This should give
acceptable behavior to such ATAPI devices while not disturbing the
heavily used code path too much.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c