diff options
author | Robert Richter <robert.richter@amd.com> | 2010-04-23 14:30:22 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-04-23 14:30:22 +0200 |
commit | a36bf32e9e8a86f291f746b7f8292e042ee04a46 (patch) | |
tree | c5c999baa4c214218e3adea9b336cbd9f23950ad /drivers/ide/cs5520.c | |
parent | oprofile: convert oprofile from timer_hook to hrtimer (diff) | |
parent | Linux 2.6.34-rc5 (diff) | |
download | linux-a36bf32e9e8a86f291f746b7f8292e042ee04a46.tar.xz linux-a36bf32e9e8a86f291f746b7f8292e042ee04a46.zip |
Merge commit 'v2.6.34-rc5' into oprofile/core
Diffstat (limited to 'drivers/ide/cs5520.c')
-rw-r--r-- | drivers/ide/cs5520.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c index 09f98ed0731f..2c1e5f7cd261 100644 --- a/drivers/ide/cs5520.c +++ b/drivers/ide/cs5520.c @@ -57,11 +57,11 @@ static struct pio_clocks cs5520_pio_clocks[]={ {1, 2, 1} }; -static void cs5520_set_pio_mode(ide_drive_t *drive, const u8 pio) +static void cs5520_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) { - ide_hwif_t *hwif = drive->hwif; struct pci_dev *pdev = to_pci_dev(hwif->dev); int controller = drive->dn > 1 ? 1 : 0; + const u8 pio = drive->pio_mode - XFER_PIO_0; /* 8bit CAT/CRT - 8bit command timing for channel */ pci_write_config_byte(pdev, 0x62 + controller, @@ -81,11 +81,12 @@ static void cs5520_set_pio_mode(ide_drive_t *drive, const u8 pio) (cs5520_pio_clocks[pio].assert)); } -static void cs5520_set_dma_mode(ide_drive_t *drive, const u8 speed) +static void cs5520_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) { printk(KERN_ERR "cs55x0: bad ide timing.\n"); - cs5520_set_pio_mode(drive, 0); + drive->pio_mode = XFER_PIO_0 + 0; + cs5520_set_pio_mode(hwif, drive); } static const struct ide_port_ops cs5520_port_ops = { |