aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2005-12-13 00:48:31 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-13 01:34:45 -0500
commita2a7a662f80d8b7f2295a36de1f9b033ed0b910c (patch)
treea04872ba93c1eff094d2d37a0435e1d965d43f22 /include/linux/libata.h
parent575ab52a218e4ff0667a6cbd972c3af443ee8713 (diff)
[PATCH] libata: implement ata_exec_internal()
This patch implements ata_exec_internal() function which performs libata internal command execution. Previously, this was done by each user by manually initializing a qc, issueing it, waiting for its completion and handling errors. In addition to obvious code factoring, using ata_exec_internal() fixes the following bugs. * qc not freed on issue failure * ap->qactive clearing could race with the next internal command * race between timeout handling and irq * ignoring error condition not represented in tf->status Also, qc & hardware are not accessed anymore once it's completed, making internal commands more conformant with general semantics. ata_exec_internal() also makes it easy to issue internal commands from multiple threads if that becomes necessary. This patch only implements ata_exec_internal(). A following patch will convert all users. Signed-off-by: Tejun Heo <htejun@gmail.com> -- Jeff, all patches have been regenerated against upstream branch as of today. (575ab52a218e4ff0667a6cbd972c3af443ee8713) Also, I took out a debug printk from ata_exec_internal (don't know how that one got left there). Other than that, all patches are identical to the previous posting. Thanks. :-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index e18ce039cdfd..833e57afd54c 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -135,6 +135,8 @@ enum {
135 ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ 135 ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */
136 ATA_TMOUT_CDB = 30 * HZ, 136 ATA_TMOUT_CDB = 30 * HZ,
137 ATA_TMOUT_CDB_QUICK = 5 * HZ, 137 ATA_TMOUT_CDB_QUICK = 5 * HZ,
138 ATA_TMOUT_INTERNAL = 30 * HZ,
139 ATA_TMOUT_INTERNAL_QUICK = 5 * HZ,
138 140
139 /* ATA bus states */ 141 /* ATA bus states */
140 BUS_UNKNOWN = 0, 142 BUS_UNKNOWN = 0,