Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7610c4f5 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: fix IDE_DFLAG_NO_IO_32BIT handling



* IDE_DFLAG_NO_IO_32BIT may be set by cmd640's ->init_dev method
  so don't clear it in ide_port_tune_devices() (+ no need to do it).

* Move IDE_DFLAG_NO_IO_32BIT handling to ide_port_init_devices().

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 8e0ee43b
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -848,13 +848,6 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
				ide_set_dma(drive);
				ide_set_dma(drive);
		}
		}
	}
	}

	ide_port_for_each_dev(i, drive, hwif) {
		if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
			drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
		else
			drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
	}
}
}


/*
/*
@@ -1192,6 +1185,8 @@ static void ide_port_init_devices(ide_hwif_t *hwif)


		if (hwif->host_flags & IDE_HFLAG_IO_32BIT)
		if (hwif->host_flags & IDE_HFLAG_IO_32BIT)
			drive->io_32bit = 1;
			drive->io_32bit = 1;
		if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
			drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
		if (hwif->host_flags & IDE_HFLAG_UNMASK_IRQS)
		if (hwif->host_flags & IDE_HFLAG_UNMASK_IRQS)
			drive->dev_flags |= IDE_DFLAG_UNMASK;
			drive->dev_flags |= IDE_DFLAG_UNMASK;
		if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
		if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)