diff options
| -rw-r--r-- | drivers/ide/alim15x3.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c index 6f0debae4e27..8e29801bbeb0 100644 --- a/drivers/ide/alim15x3.c +++ b/drivers/ide/alim15x3.c | |||
| @@ -72,6 +72,7 @@ static void ali_fifo_control(ide_hwif_t *hwif, ide_drive_t *drive, int on) | |||
| 72 | static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | 72 | static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
| 73 | { | 73 | { |
| 74 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 74 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 75 | ide_drive_t *pair = ide_get_pair_dev(drive); | ||
| 75 | int bus_speed = ide_pci_clk ? ide_pci_clk : 33; | 76 | int bus_speed = ide_pci_clk ? ide_pci_clk : 33; |
| 76 | unsigned long T = 1000000 / bus_speed; /* PCI clock based */ | 77 | unsigned long T = 1000000 / bus_speed; /* PCI clock based */ |
| 77 | int port = hwif->channel ? 0x5c : 0x58; | 78 | int port = hwif->channel ? 0x5c : 0x58; |
| @@ -79,6 +80,16 @@ static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
| 79 | struct ide_timing t; | 80 | struct ide_timing t; |
| 80 | 81 | ||
| 81 | ide_timing_compute(drive, drive->pio_mode, &t, T, 1); | 82 | ide_timing_compute(drive, drive->pio_mode, &t, T, 1); |
| 83 | if (pair) { | ||
| 84 | struct ide_timing p; | ||
| 85 | |||
| 86 | ide_timing_compute(pair, pair->pio_mode, &p, T, 1); | ||
| 87 | ide_timing_merge(&p, &t, &t, IDE_TIMING_SETUP); | ||
| 88 | if (pair->dma_mode) { | ||
| 89 | ide_timing_compute(pair, pair->dma_mode, &p, T, 1); | ||
| 90 | ide_timing_merge(&p, &t, &t, IDE_TIMING_SETUP); | ||
| 91 | } | ||
| 92 | } | ||
| 82 | 93 | ||
| 83 | t.setup = clamp_val(t.setup, 1, 8) & 7; | 94 | t.setup = clamp_val(t.setup, 1, 8) & 7; |
| 84 | t.active = clamp_val(t.active, 1, 8) & 7; | 95 | t.active = clamp_val(t.active, 1, 8) & 7; |
