diff options
Diffstat (limited to 'drivers/ide/legacy')
-rw-r--r-- | drivers/ide/legacy/ali14xx.c | 2 | ||||
-rw-r--r-- | drivers/ide/legacy/qd65xx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index 7276c96aaa2a..90da1f953ed0 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c | |||
@@ -131,7 +131,7 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
131 | drive->name, pio, time1, time2, param1, param2, param3, param4); | 131 | drive->name, pio, time1, time2, param1, param2, param3, param4); |
132 | 132 | ||
133 | /* stuff timing parameters into controller registers */ | 133 | /* stuff timing parameters into controller registers */ |
134 | driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; | 134 | driveNum = (drive->hwif->index << 1) + (drive->dn & 1); |
135 | spin_lock_irqsave(&ali14xx_lock, flags); | 135 | spin_lock_irqsave(&ali14xx_lock, flags); |
136 | outb_p(regOn, basePort); | 136 | outb_p(regOn, basePort); |
137 | outReg(param1, regTab[driveNum].reg1); | 137 | outReg(param1, regTab[driveNum].reg1); |
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index ec408b3a7100..bc27c7aba936 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
@@ -305,7 +305,7 @@ static void __init qd6580_init_dev(ide_drive_t *drive) | |||
305 | } else | 305 | } else |
306 | t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA; | 306 | t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA; |
307 | 307 | ||
308 | drive->drive_data = drive->select.b.unit ? t2 : t1; | 308 | drive->drive_data = (drive->dn & 1) ? t2 : t1; |
309 | } | 309 | } |
310 | 310 | ||
311 | static const struct ide_port_ops qd6500_port_ops = { | 311 | static const struct ide_port_ops qd6500_port_ops = { |