aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_promise.c
diff options
context:
space:
mode:
authorMikael Pettersson <mikpe@it.uu.se>2007-02-07 16:29:56 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-15 18:04:00 -0500
commit2fb8b49fb2eac583f0e8dd0ece06f9ad6d8fd792 (patch)
tree72d5fa2296aaf459939bbb8b6d2f761a2d047d02 /drivers/ata/sata_promise.c
parentf99c6bb6e2e9c35bd3dc0b1d0faa28bd6970930d (diff)
sata_promise: fix missing PATA cable detection
This patch fixes an oversight which caused sata_promise to not perform cable detection on the TX2plus chips' PATA ports. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_promise.c')
-rw-r--r--drivers/ata/sata_promise.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index b2e2e695c92e..da8c362c3eb0 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -564,6 +564,13 @@ static void pdc_thaw(struct ata_port *ap)
564 readl(mmio + PDC_CTLSTAT); /* flush */ 564 readl(mmio + PDC_CTLSTAT); /* flush */
565} 565}
566 566
567static int pdc_pre_reset(struct ata_port *ap)
568{
569 if (!sata_scr_valid(ap))
570 pdc_pata_cbl_detect(ap);
571 return ata_std_prereset(ap);
572}
573
567static void pdc_error_handler(struct ata_port *ap) 574static void pdc_error_handler(struct ata_port *ap)
568{ 575{
569 ata_reset_fn_t hardreset; 576 ata_reset_fn_t hardreset;
@@ -576,7 +583,7 @@ static void pdc_error_handler(struct ata_port *ap)
576 hardreset = sata_std_hardreset; 583 hardreset = sata_std_hardreset;
577 584
578 /* perform recovery */ 585 /* perform recovery */
579 ata_do_eh(ap, ata_std_prereset, ata_std_softreset, hardreset, 586 ata_do_eh(ap, pdc_pre_reset, ata_std_softreset, hardreset,
580 ata_std_postreset); 587 ata_std_postreset);
581} 588}
582 589