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

Commit bcd11eaa authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (27 commits)
  alim15x3: remove redundant m5229_revision check
  sc1200: fix ->dma_base equal zero handling
  cs5520: fix ->dma_base equal zero handling
  sgiioc4: add missing ->dma_base check
  cs5535: add missing ->dma_base check
  ide: remove CONFIG_IDEDMA_IVB config option
  ide: change master/slave IDENTIFY order
  ide: move ide_config_drive_speed() calls to upper layers (take 2)
  pdc202xx_new: check ide_config_drive_speed() return value
  cs5535: check ide_config_drive_speed() return value
  amd74xx/via82cxxx: check ide_config_drive_speed() return value
  au1xxx: fix au1xxx_set_pio_mode()
  icside: use ide_tune_dma()
  ide-pmac: fix PIO setup and enable autotune
  ide-pmac: use ide_tune_dma() (take 2)
  ide-pmac: remove pmac_ide_do_setfeature() (take 2)
  ide-pmac: remove nIEN clearing from pmac_ide_do_setfeature()
  ide-pmac: use __ide_wait_stat()
  ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
  ide: add __ide_wait_stat() helper
  ...
parents c8c55bcb 99149a48
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -1074,22 +1074,6 @@ endif
config BLK_DEV_IDEDMA
	def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA

config IDEDMA_IVB
	bool "IGNORE word93 Validation BITS"
	depends on BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS
	---help---
	  There are unclear terms in ATA-4 and ATA-5 standards how certain
	  hardware (an 80c ribbon) should be detected. Different interpretations
	  of the standards have been released in hardware. This causes problems:
	  for example, a host with Ultra Mode 4 (or higher) will not run
	  in that mode with an 80c ribbon.

	  If you are experiencing compatibility or performance problems, you
	  MAY try to answer Y here. However, it does not necessarily solve
	  any of your problems, it could even cause more of them.

	  It is normally safe to answer Y; however, the default is N.

endif

config BLK_DEV_HD_ONLY
+6 −39
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ static void icside_build_sglist(ide_drive_t *drive, struct request *rq)
 *	MW1	80	50	50	150	C
 *	MW2	70	25	25	120	C
 */
static int icside_set_speed(ide_drive_t *drive, const u8 xfer_mode)
static void icside_set_dma_mode(ide_drive_t *drive, const u8 xfer_mode)
{
	int cycle_time, use_dma_info = 0;

@@ -273,7 +273,7 @@ static int icside_set_speed(ide_drive_t *drive, const u8 xfer_mode)
		cycle_time = 480;
		break;
	default:
		return 1;
		return;
	}

	/*
@@ -287,8 +287,6 @@ static int icside_set_speed(ide_drive_t *drive, const u8 xfer_mode)

	printk("%s: %s selected (peak %dMB/s)\n", drive->name,
		ide_xfer_verbose(xfer_mode), 2000 / drive->drive_data);

	return ide_config_drive_speed(drive, xfer_mode);
}

static void icside_dma_host_off(ide_drive_t *drive)
@@ -313,41 +311,10 @@ static int icside_dma_on(ide_drive_t *drive)

static int icside_dma_check(ide_drive_t *drive)
{
	struct hd_driveid *id = drive->id;
	ide_hwif_t *hwif = HWIF(drive);
	int xfer_mode = 0;

	if (!(id->capability & 1) || !hwif->autodma)
		goto out;

	/*
	 * Consult the list of known "bad" drives
	 */
	if (__ide_dma_bad_drive(drive))
		goto out;

	/*
	 * Enable DMA on any drive that has multiword DMA
	 */
	if (id->field_valid & 2) {
		xfer_mode = ide_max_dma_mode(drive);
		goto out;
	}

	/*
	 * Consult the list of known "good" drives
	 */
	if (__ide_dma_good_drive(drive)) {
		if (id->eide_dma_time > 150)
			goto out;
		xfer_mode = XFER_MW_DMA_1;
	}
	if (ide_tune_dma(drive))
		return 0;

out:
	if (xfer_mode == 0)
	return -1;

	return icside_set_speed(drive, xfer_mode) ? -1 : 0;
}

static int icside_dma_end(ide_drive_t *drive)
@@ -464,7 +431,7 @@ static void icside_dma_init(ide_hwif_t *hwif)

	hwif->dmatable_cpu	= NULL;
	hwif->dmatable_dma	= 0;
	hwif->speedproc		= icside_set_speed;
	hwif->set_dma_mode	= icside_set_dma_mode;
	hwif->autodma		= 1;

	hwif->ide_dma_check	= icside_dma_check;
+2 −6
Original line number Diff line number Diff line
@@ -716,11 +716,9 @@ static void cris_set_pio_mode(ide_drive_t *drive, const u8 pio)
	}

	cris_ide_set_speed(TYPE_PIO, setup, strobe, hold);

	(void)ide_config_drive_speed(drive, XFER_PIO_0 + pio);
}

static int speed_cris_ide(ide_drive_t *drive, const u8 speed)
static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed)
{
	int cyc = 0, dvs = 0, strobe = 0, hold = 0;

@@ -759,8 +757,6 @@ static int speed_cris_ide(ide_drive_t *drive, const u8 speed)
		cris_ide_set_speed(TYPE_UDMA, cyc, dvs, 0);
	else
		cris_ide_set_speed(TYPE_DMA, 0, strobe, hold);

	return ide_config_drive_speed(drive, speed);
}

void __init
@@ -791,7 +787,7 @@ init_e100_ide (void)
		hwif->mmio = 1;
		hwif->chipset = ide_etrax100;
		hwif->set_pio_mode = &cris_set_pio_mode;
		hwif->speedproc = &speed_cris_ide;
		hwif->set_dma_mode = &cris_set_dma_mode;
		hwif->ata_input_data = &cris_ide_input_data;
		hwif->ata_output_data = &cris_ide_output_data;
		hwif->atapi_input_bytes = &cris_atapi_input_bytes;
+0 −1
Original line number Diff line number Diff line
@@ -649,7 +649,6 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on)
	if (!on)
		acpi_bus_set_power(hwif->acpidata->obj_handle, ACPI_STATE_D3);
}
EXPORT_SYMBOL_GPL(ide_acpi_set_state);

/**
 * ide_acpi_init - initialize the ACPI link for an IDE interface
+18 −10
Original line number Diff line number Diff line
@@ -169,6 +169,11 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)

EXPORT_SYMBOL_GPL(ide_dma_intr);

static int ide_dma_good_drive(ide_drive_t *drive)
{
	return ide_in_drive_list(drive->id, drive_whitelist);
}

#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
 *	ide_build_sglist	-	map IDE scatter gather for DMA I/O
@@ -357,7 +362,7 @@ static int config_drive_for_dma (ide_drive_t *drive)
				return 0;

		/* Consult the list of known "good" drives */
		if (__ide_dma_good_drive(drive))
		if (ide_dma_good_drive(drive))
			return 0;
	}

@@ -639,14 +644,6 @@ int __ide_dma_bad_drive (ide_drive_t *drive)

EXPORT_SYMBOL(__ide_dma_bad_drive);

int __ide_dma_good_drive (ide_drive_t *drive)
{
	struct hd_driveid *id = drive->id;
	return ide_in_drive_list(id, drive_whitelist);
}

EXPORT_SYMBOL(__ide_dma_good_drive);

static const u8 xfer_mode_bases[] = {
	XFER_UDMA_0,
	XFER_MW_DMA_0,
@@ -746,6 +743,14 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode)
		}
	}

	if (hwif->chipset == ide_acorn && mode == 0) {
		/*
		 * is this correct?
		 */
		if (ide_dma_good_drive(drive) && drive->id->eide_dma_time < 150)
			mode = XFER_MW_DMA_1;
	}

	printk(KERN_DEBUG "%s: selected mode 0x%x\n", drive->name, mode);

	return min(mode, req_mode);
@@ -769,7 +774,10 @@ int ide_tune_dma(ide_drive_t *drive)
	if (!speed)
		return 0;

	if (drive->hwif->speedproc(drive, speed))
	if (drive->hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
		return 0;

	if (ide_set_dma_mode(drive, speed))
		return 0;

	return 1;
Loading