aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/tc86c001.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/tc86c001.c')
-rw-r--r--drivers/ide/tc86c001.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c
index f2cb62bf3f2..e444d24934b 100644
--- a/drivers/ide/tc86c001.c
+++ b/drivers/ide/tc86c001.c
@@ -13,11 +13,11 @@
#define DRV_NAME "tc86c001"
-static void tc86c001_set_mode(ide_drive_t *drive, const u8 speed)
+static void tc86c001_set_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
- ide_hwif_t *hwif = drive->hwif;
unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00);
u16 mode, scr = inw(scr_port);
+ const u8 speed = drive->dma_mode;
switch (speed) {
case XFER_UDMA_4: mode = 0x00c0; break;
@@ -43,7 +43,8 @@ static void tc86c001_set_mode(ide_drive_t *drive, const u8 speed)
static void tc86c001_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
- tc86c001_set_mode(drive, drive->pio_mode);
+ drive->dma_mode = drive->pio_mode;
+ tc86c001_set_mode(hwif, drive);
}
/*