Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185802
b: refs/heads/master
c: cde727b
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and David S. Miller committed Jan 19, 2010
1 parent 56ca48f commit a98f77c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e714a074bc4da070807d019d4287dcd32af55f5
refs/heads/master: cde727be967a86aee01042f35c8a861728272cf1
11 changes: 11 additions & 0 deletions trunk/drivers/ide/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,24 @@ static void ali_fifo_control(ide_hwif_t *hwif, ide_drive_t *drive, int on)
static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
ide_drive_t *pair = ide_get_pair_dev(drive);
int bus_speed = ide_pci_clk ? ide_pci_clk : 33;
unsigned long T = 1000000 / bus_speed; /* PCI clock based */
int port = hwif->channel ? 0x5c : 0x58;
u8 unit = drive->dn & 1;
struct ide_timing t;

ide_timing_compute(drive, drive->pio_mode, &t, T, 1);
if (pair) {
struct ide_timing p;

ide_timing_compute(pair, pair->pio_mode, &p, T, 1);
ide_timing_merge(&p, &t, &t, IDE_TIMING_SETUP);
if (pair->dma_mode) {
ide_timing_compute(pair, pair->dma_mode, &p, T, 1);
ide_timing_merge(&p, &t, &t, IDE_TIMING_SETUP);
}
}

t.setup = clamp_val(t.setup, 1, 8) & 7;
t.active = clamp_val(t.active, 1, 8) & 7;
Expand Down

0 comments on commit a98f77c

Please sign in to comment.