aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-02-12 19:15:09 -0500
committerJeff Garzik <jeff@garzik.org>2008-02-20 12:12:28 -0500
commit332673257056d8be8a69d759eda90a799af5472d (patch)
treeb2ff47054b6424f70a6c10bcffd47f2bdd70e4c8 /drivers/ata/libata-eh.c
parent0fca0d6f2ce3336022a22bc7fc2e009e599e63a4 (diff)
libata: implement libata.force module parameter
This patch implements libata.force module parameter which can selectively override ATA port, link and device configurations including cable type, SATA PHY SPD limit, transfer mode and NCQ. For example, you can say "use 1.5Gbps for all fan-out ports attached to the second port but allow 3.0Gbps for the PMP device itself, oh, the device attached to the third fan-out port chokes on NCQ and shouldn't go over UDMA4" by the following. libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 4e31071acc0..698ce2cea52 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2393,9 +2393,11 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
2393 } 2393 }
2394 2394
2395 /* PDIAG- should have been released, ask cable type if post-reset */ 2395 /* PDIAG- should have been released, ask cable type if post-reset */
2396 if (ata_is_host_link(link) && ap->ops->cable_detect && 2396 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) {
2397 (ehc->i.flags & ATA_EHI_DID_RESET)) 2397 if (ap->ops->cable_detect)
2398 ap->cbl = ap->ops->cable_detect(ap); 2398 ap->cbl = ap->ops->cable_detect(ap);
2399 ata_force_cbl(ap);
2400 }
2399 2401
2400 /* Configure new devices forward such that user doesn't see 2402 /* Configure new devices forward such that user doesn't see
2401 * device detection messages backwards. 2403 * device detection messages backwards.