Commit d8f4469d authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)



If DMA is unsupported ->ide_dma_check should disable DMA.

v2:
* updated for scc_pata

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 2ad1e558
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -214,13 +214,11 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
	if (ide_use_dma(drive) && config_chipset_for_dma(drive))
		return hwif->ide_dma_on(drive);

	if (ide_use_fast_pio(drive)) {
	if (ide_use_fast_pio(drive))
		aec62xx_tune_drive(drive, 5);

	return hwif->ide_dma_off_quietly(drive);
}
	/* IORDY not supported */
	return 0;
}

static int aec62xx_irq_timeout (ide_drive_t *drive)
{
+2 −3
Original line number Diff line number Diff line
@@ -264,10 +264,9 @@ static int atiixp_dma_check(ide_drive_t *drive)
		tspeed = ide_get_best_pio_mode(drive, 255, 5, NULL);
		speed = atiixp_dma_2_pio(XFER_PIO_0 + tspeed) + XFER_PIO_0;
		hwif->speedproc(drive, speed);
		return hwif->ide_dma_off_quietly(drive);
	}
	/* IORDY not supported */
	return 0;

	return hwif->ide_dma_off_quietly(drive);
}

/**
+3 −5
Original line number Diff line number Diff line
@@ -479,13 +479,11 @@ static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
	if (ide_use_dma(drive) && config_chipset_for_dma(drive))
		return hwif->ide_dma_on(drive);

	if (ide_use_fast_pio(drive)) {
	if (ide_use_fast_pio(drive))
		config_chipset_for_pio(drive, 1);

	return hwif->ide_dma_off_quietly(drive);
}
	/* IORDY not supported */
	return 0;
}

static int cmd64x_alt_dma_status (struct pci_dev *dev)
{
+2 −3
Original line number Diff line number Diff line
@@ -206,10 +206,9 @@ static int cs5535_dma_check(ide_drive_t *drive)
	if (ide_use_fast_pio(drive)) {
		speed = ide_get_best_pio_mode(drive, 255, 4, NULL);
		cs5535_set_drive(drive, speed);
		return hwif->ide_dma_off_quietly(drive);
	}
	/* IORDY not supported */
	return 0;

	return hwif->ide_dma_off_quietly(drive);
}

static u8 __devinit cs5535_cable_detect(struct pci_dev *dev)
+3 −5
Original line number Diff line number Diff line
@@ -120,13 +120,11 @@ static int hpt34x_config_drive_xfer_rate (ide_drive_t *drive)
		return hwif->ide_dma_on(drive);
#endif

	if (ide_use_fast_pio(drive)) {
	if (ide_use_fast_pio(drive))
		hpt34x_tune_drive(drive, 255);

	return hwif->ide_dma_off_quietly(drive);
}
	/* IORDY not supported */
	return 0;
}

/*
 * If the BIOS does not set the IO base addaress to XX00, 343 will fail.
Loading