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

Commit 9ff6f72f authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: remove hwif->autodma and drive->autodma



* hpt34x.c: disable DMA masks for HPT345
  (hwif->autodma is zero so DMA won't be enabled anyway).

* trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag
  (hwif->autodma is zero so DMA won't be enabled anyway).

* Check noautodma global variable instead of drive->autodma in ide_tune_dma().

  This fixes handling of "ide=nodma" kernel parameter for icside, ide-cris,
  au1xxx-ide, pmac, it821x, jmicron, sgiioc4 and siimage host drivers.

* Remove hwif->autodma (it was not checked by IDE core code anyway) and
  drive->autodma (was set by all host drivers - except HPT345/TRM290 special
  cases - unless "ide=nodma" was used).

While at it:
- remove needless printk() from icside.c
- remove stale FIXME/comment from ide-probe.c
- don't force DMA off if PCI bus-mastering had to be enabled in setup-pci.c
  (this setting was always later over-ridden by host drivers anyway)

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 1b516940
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -415,8 +415,6 @@ static void icside_dma_lost_irq(ide_drive_t *drive)


static void icside_dma_init(ide_hwif_t *hwif)
static void icside_dma_init(ide_hwif_t *hwif)
{
{
	printk("    %s: SG-DMA", hwif->name);

	hwif->atapi_dma		= 1;
	hwif->atapi_dma		= 1;
	hwif->mwdma_mask	= 7; /* MW0..2 */
	hwif->mwdma_mask	= 7; /* MW0..2 */
	hwif->swdma_mask	= 7; /* SW0..2 */
	hwif->swdma_mask	= 7; /* SW0..2 */
@@ -424,7 +422,6 @@ static void icside_dma_init(ide_hwif_t *hwif)
	hwif->dmatable_cpu	= NULL;
	hwif->dmatable_cpu	= NULL;
	hwif->dmatable_dma	= 0;
	hwif->dmatable_dma	= 0;
	hwif->set_dma_mode	= icside_set_dma_mode;
	hwif->set_dma_mode	= icside_set_dma_mode;
	hwif->autodma		= 1;


	hwif->dma_host_off	= icside_dma_host_off;
	hwif->dma_host_off	= icside_dma_host_off;
	hwif->dma_off_quietly	= icside_dma_off_quietly;
	hwif->dma_off_quietly	= icside_dma_off_quietly;
@@ -437,11 +434,6 @@ static void icside_dma_init(ide_hwif_t *hwif)
	hwif->ide_dma_test_irq	= icside_dma_test_irq;
	hwif->ide_dma_test_irq	= icside_dma_test_irq;
	hwif->dma_timeout	= icside_dma_timeout;
	hwif->dma_timeout	= icside_dma_timeout;
	hwif->dma_lost_irq	= icside_dma_lost_irq;
	hwif->dma_lost_irq	= icside_dma_lost_irq;

	hwif->drives[0].autodma = hwif->autodma;
	hwif->drives[1].autodma = hwif->autodma;

	printk(" capable%s\n", hwif->autodma ? ", auto-enable" : "");
}
}
#else
#else
#define icside_dma_init(hwif)	(0)
#define icside_dma_init(hwif)	(0)
+0 −3
Original line number Original line Diff line number Diff line
@@ -810,9 +810,6 @@ init_e100_ide (void)
		hwif->drives[1].autotune = 1;
		hwif->drives[1].autotune = 1;
		hwif->ultra_mask = cris_ultra_mask;
		hwif->ultra_mask = cris_ultra_mask;
		hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
		hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
		hwif->autodma = 1;
		hwif->drives[0].autodma = 1;
		hwif->drives[1].autodma = 1;
	}
	}


	/* Reset pulse */
	/* Reset pulse */
+1 −1
Original line number Original line Diff line number Diff line
@@ -759,7 +759,7 @@ static int ide_tune_dma(ide_drive_t *drive)
{
{
	u8 speed;
	u8 speed;


	if ((drive->id->capability & 1) == 0 || drive->autodma == 0)
	if (noautodma || (drive->id->capability & 1) == 0)
		return 0;
		return 0;


	/* consult the list of known "bad" drives */
	/* consult the list of known "bad" drives */
+0 −9
Original line number Original line Diff line number Diff line
@@ -835,15 +835,6 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))


			drive->nice1 = 1;
			drive->nice1 = 1;


			/*
			 * MAJOR HACK BARF :-/
			 *
			 * FIXME: chipsets own this cruft!
			 */
			/*
			 * Move here to prevent module loading clashing.
			 */
	//		drive->autodma = hwif->autodma;
			if (hwif->ide_dma_on) {
			if (hwif->ide_dma_on) {
				/*
				/*
				 * Force DMAing for the beginning of the check.
				 * Force DMAing for the beginning of the check.
+0 −1
Original line number Original line Diff line number Diff line
@@ -458,7 +458,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
	hwif->select_data		= tmp_hwif->select_data;
	hwif->select_data		= tmp_hwif->select_data;
	hwif->extra_base		= tmp_hwif->extra_base;
	hwif->extra_base		= tmp_hwif->extra_base;
	hwif->extra_ports		= tmp_hwif->extra_ports;
	hwif->extra_ports		= tmp_hwif->extra_ports;
	hwif->autodma			= tmp_hwif->autodma;


	hwif->hwif_data			= tmp_hwif->hwif_data;
	hwif->hwif_data			= tmp_hwif->hwif_data;
}
}
Loading