diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 19:56:29 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 19:56:29 +0100 |
commit | b4d1c73dcd2b3575921df06f42217bc281b83a9b (patch) | |
tree | 11121631fa44292c6bae4b66c06c1f583ce5f8f5 /drivers/ide/pci/cs5535.c | |
parent | bd38dd3c13c143c60d6284d145bf1273a0f64004 (diff) |
atiixp/cs5535/scc_pata: fix "idex=ata66" parameter handling
Don't override the cable type if the "idex=ata66" parameter was used.
While at it:
* atiixp.c: factor out cable detection to atiixp_cable_detect() from
init_hwif_atiixp().
* cs5535.c: pass 'ide_hwif_t *hwif' instead of 'struct pci_dev *dev' to
cs5535_cable_detect().
* scc_pata.c: factor out cable detection to scc_cable_detect() from
init_hwif_scc() and remove incorrect comment.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/cs5535.c')
-rw-r--r-- | drivers/ide/pci/cs5535.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 66433aa53f5..50046436a56 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c @@ -155,8 +155,9 @@ static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) cs5535_set_speed(drive, XFER_PIO_0 + pio); } -static u8 __devinit cs5535_cable_detect(struct pci_dev *dev) +static u8 __devinit cs5535_cable_detect(ide_hwif_t *hwif) { + struct pci_dev *dev = to_pci_dev(hwif->dev); u8 bit; /* if a 80 wire cable was detected */ @@ -175,15 +176,14 @@ static u8 __devinit cs5535_cable_detect(struct pci_dev *dev) */ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) { - struct pci_dev *dev = to_pci_dev(hwif->dev); - hwif->set_pio_mode = &cs5535_set_pio_mode; hwif->set_dma_mode = &cs5535_set_dma_mode; if (hwif->dma_base == 0) return; - hwif->cbl = cs5535_cable_detect(dev); + if (hwif->cbl != ATA_CBL_PATA40_SHORT) + hwif->cbl = cs5535_cable_detect(hwif); } static const struct ide_port_info cs5535_chipset __devinitdata = { |