aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-02-02 02:22:31 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-21 04:58:16 -0500
commit7d47e8d4d4fb0c3d3bdc706759e70d5453b61ec3 (patch)
treef197f58dde8fbc795a37c9645b02490749f16e7a /include
parent4ae72a1e469a3bcfd3c1f77dac62392c489bf9ca (diff)
libata: put some intelligence into EH speed down sequence
The current EH speed down code is more of a proof that the EH framework is capable of adjusting transfer speed in response to error. This patch puts some intelligence into EH speed down sequence. The rules are.. * If there have been more than three timeout, HSM violation or unclassified DEV errors for known supported commands during last 10 mins, NCQ is turned off. * If there have been more than three timeout or HSM violation for known supported command, transfer mode is slowed down. If DMA is active, it is first slowered by one grade (e.g. UDMA133->100). If that doesn't help, it's slowered to 40c limit (UDMA33). If PIO is active, it's slowered by one grade first. If that doesn't help, PIO0 is forced. Note that this rule does not change transfer mode. DMA is never degraded into PIO by this rule. * If there have been more than ten ATA bus, timeout, HSM violation or unclassified device errors for known supported commands && speeding down DMA mode didn't help, the device is forced into PIO mode. Note that this rule is considered only for PATA devices and is pretty difficult to trigger. One error can only trigger one rule at a time. After a rule is triggered, error history is cleared such that the next speed down happens only after some number of errors are accumulated. This makes sense because now speed down is done in bigger stride. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 60dfc5f7e882..5db50fa594ac 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -495,6 +495,7 @@ struct ata_device {
495 495
496 /* error history */ 496 /* error history */
497 struct ata_ering ering; 497 struct ata_ering ering;
498 int spdn_cnt;
498 unsigned int horkage; /* List of broken features */ 499 unsigned int horkage; /* List of broken features */
499#ifdef CONFIG_SATA_ACPI 500#ifdef CONFIG_SATA_ACPI
500 /* ACPI objects info */ 501 /* ACPI objects info */