Skip to content

Commit

Permalink
sata_promise: fix missing PATA cable detection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mikael Pettersson authored and Jeff Garzik committed Feb 15, 2007
1 parent f99c6bb commit 2fb8b49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/ata/sata_promise.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,13 @@ static void pdc_thaw(struct ata_port *ap)
readl(mmio + PDC_CTLSTAT); /* flush */
}

static int pdc_pre_reset(struct ata_port *ap)
{
if (!sata_scr_valid(ap))
pdc_pata_cbl_detect(ap);
return ata_std_prereset(ap);
}

static void pdc_error_handler(struct ata_port *ap)
{
ata_reset_fn_t hardreset;
Expand All @@ -576,7 +583,7 @@ static void pdc_error_handler(struct ata_port *ap)
hardreset = sata_std_hardreset;

/* perform recovery */
ata_do_eh(ap, ata_std_prereset, ata_std_softreset, hardreset,
ata_do_eh(ap, pdc_pre_reset, ata_std_softreset, hardreset,
ata_std_postreset);
}

Expand Down

0 comments on commit 2fb8b49

Please sign in to comment.