aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/triflex.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/triflex.c')
-rw-r--r--drivers/ide/pci/triflex.c9
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)
38{ 38{
39 ide_hwif_t *hwif = HWIF(drive); 39 ide_hwif_t *hwif = HWIF(drive);
40 struct pci_dev *dev = to_pci_dev(hwif->dev); 40 struct pci_dev *dev = to_pci_dev(hwif->dev);
41 u8 channel_offset = hwif->channel ? 0x74 : 0x70;
42 u16 timing = 0;
43 u32 triflex_timings = 0; 41 u32 triflex_timings = 0;
44 u8 unit = (drive->select.b.unit & 0x01); 42 u16 timing = 0;
45 43 u8 channel_offset = hwif->channel ? 0x74 : 0x70, unit = drive->dn & 1;
44
46 pci_read_config_dword(dev, channel_offset, &triflex_timings); 45 pci_read_config_dword(dev, channel_offset, &triflex_timings);
47 46
48 switch(speed) { 47 switch(speed) {
49 case XFER_MW_DMA_2: 48 case XFER_MW_DMA_2:
50 timing = 0x0103; 49 timing = 0x0103;