Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29455
b: refs/heads/master
c: d3fb4e8
h: refs/heads/master
i:
  29453: a9083c7
  29451: e5f6fef
  29447: d7ade33
  29439: d7a8cd6
v: v3
  • Loading branch information
Jeff Garzik committed May 24, 2006
1 parent 9053150 commit 0b7987d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c5c81613b0eb0dba97a8f312a2f1162f39fd47b
refs/heads/master: d3fb4e8dddebbf7d6c0b02842c619bfd4fa199f5
19 changes: 15 additions & 4 deletions trunk/drivers/scsi/sata_promise.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,23 @@ static void pdc_sata_phy_reset(struct ata_port *ap)
sata_phy_reset(ap);
}

static void pdc_pata_phy_reset(struct ata_port *ap)
static void pdc_pata_cbl_detect(struct ata_port *ap)
{
/* FIXME: add cable detect. Don't assume 40-pin cable */
ap->cbl = ATA_CBL_PATA40;
ap->udma_mask &= ATA_UDMA_MASK_40C;
u8 tmp;
void __iomem *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03;

tmp = readb(mmio);

if (tmp & 0x01) {
ap->cbl = ATA_CBL_PATA40;
ap->udma_mask &= ATA_UDMA_MASK_40C;
} else
ap->cbl = ATA_CBL_PATA80;
}

static void pdc_pata_phy_reset(struct ata_port *ap)
{
pdc_pata_cbl_detect(ap);
pdc_reset_port(ap);
ata_port_probe(ap);
ata_bus_reset(ap);
Expand Down

0 comments on commit 0b7987d

Please sign in to comment.