diff options
Diffstat (limited to 'drivers/ide/pci/triflex.c')
-rw-r--r-- | drivers/ide/pci/triflex.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index be8715dcee05..42fb98f268d5 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c @@ -38,13 +38,12 @@ static void triflex_set_mode(ide_drive_t *drive, const u8 speed) { ide_hwif_t *hwif = HWIF(drive); struct pci_dev *dev = to_pci_dev(hwif->dev); - u8 channel_offset = hwif->channel ? 0x74 : 0x70; - u16 timing = 0; u32 triflex_timings = 0; - u8 unit = (drive->select.b.unit & 0x01); - + u16 timing = 0; + u8 channel_offset = hwif->channel ? 0x74 : 0x70, unit = drive->dn & 1; + pci_read_config_dword(dev, channel_offset, &triflex_timings); - + switch(speed) { case XFER_MW_DMA_2: timing = 0x0103; |