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

Commit 07232b97 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: fix ->io_32bit race in set_io_32bit()
  ide: remove stale changelog from ide-probe.c
  ide: remove stale changelog from ide-disk.c
  ide: remove dead code from __ide_dma_test_irq()
  hpt366: fix HPT37x PIO mode timings (take 2)
  pdc202xx_new: fix Promise TX4 support
  ide-cd: remove dead post_transform_command()
  ide: DMA reporting and validity checking fixes (take 3)
  ide: add /sys/bus/ide/devices/*/{model,firmware,serial} sysfs entries
  ide: coding style fixes for drivers/ide/setup-pci.c
  ide: fix ide_scan_pcibus() error message
  ide: deprecate CONFIG_BLK_DEV_OFFBOARD
  ide: add missing checks for control register existence
  ide-scsi: add ide_scsi_hex_dump() helper
parents ea9e7b55 644a9d76
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ config IDEPCI_PCIBUS_ORDER

# TODO: split it on per host driver config options (or module parameters)
config BLK_DEV_OFFBOARD
	bool "Boot off-board chipsets first support"
	bool "Boot off-board chipsets first support (DEPRECATED)"
	depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001)
	help
	  Normally, IDE controllers built into the motherboard (on-board
@@ -410,6 +410,10 @@ config BLK_DEV_OFFBOARD
	  Note that, if you do this, the order of the hd* devices will be
	  rearranged which may require modification of fstab and other files.

	  Please also note that this method of assuring stable naming of
	  IDE devices is unreliable and use other means for achieving it
	  (i.e. udev).

	  If in doubt, say N.

config BLK_DEV_GENERIC
+1 −34
Original line number Diff line number Diff line
@@ -1650,31 +1650,6 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
	return 1;
}

static void post_transform_command(struct request *req)
{
	u8 *c = req->cmd;
	char *ibuf;

	if (!blk_pc_request(req))
		return;

	if (req->bio)
		ibuf = bio_data(req->bio);
	else
		ibuf = req->data;

	if (!ibuf)
		return;

	/*
	 * set ansi-revision and response data as atapi
	 */
	if (c[0] == GPCMD_INQUIRY) {
		ibuf[2] |= 2;
		ibuf[3] = (ibuf[3] & 0xf0) | 2;
	}
}

typedef void (xfer_func_t)(ide_drive_t *, void *, u32);

/*
@@ -1810,9 +1785,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
	return ide_started;

end_request:
	if (!rq->data_len)
		post_transform_command(rq);

	spin_lock_irqsave(&ide_lock, flags);
	blkdev_dequeue_request(rq);
	end_that_request_last(rq, 1);
@@ -3049,12 +3021,7 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive)
        else 	
        	printk(" drive");

	printk(", %dkB Cache", be16_to_cpu(cap.buffer_size));

	if (drive->using_dma)
		ide_dma_verbose(drive);

	printk("\n");
	printk(KERN_CONT ", %dkB Cache\n", be16_to_cpu(cap.buffer_size));

	return nslots;
}
+2 −31
Original line number Diff line number Diff line
@@ -13,32 +13,6 @@
 *                and Andre Hedrick <andre@linux-ide.org>
 *
 * This is the IDE/ATA disk driver, as evolved from hd.c and ide.c.
 *
 * Version 1.00		move disk only code from ide.c to ide-disk.c
 *			support optional byte-swapping of all data
 * Version 1.01		fix previous byte-swapping code
 * Version 1.02		remove ", LBA" from drive identification msgs
 * Version 1.03		fix display of id->buf_size for big-endian
 * Version 1.04		add /proc configurable settings and S.M.A.R.T support
 * Version 1.05		add capacity support for ATA3 >= 8GB
 * Version 1.06		get boot-up messages to show full cyl count
 * Version 1.07		disable door-locking if it fails
 * Version 1.08		fixed CHS/LBA translations for ATA4 > 8GB,
 *			process of adding new ATA4 compliance.
 *			fixed problems in allowing fdisk to see
 *			the entire disk.
 * Version 1.09		added increment of rq->sector in ide_multwrite
 *			added UDMA 3/4 reporting
 * Version 1.10		request queue changes, Ultra DMA 100
 * Version 1.11		added 48-bit lba
 * Version 1.12		adding taskfile io access method
 * Version 1.13		added standby and flush-cache for notifier
 * Version 1.14		added acoustic-wcache
 * Version 1.15		convert all calls to ide_raw_taskfile
 *				since args will return register content.
 * Version 1.16		added suspend-resume-checkpower
 * Version 1.17		do flush on standby, do flush on ATA < ATA6
 *			fix wcache setup.
 */

#define IDEDISK_VERSION	"1.18"
@@ -961,11 +935,8 @@ static void idedisk_setup (ide_drive_t *drive)
	if (id->buf_size)
		printk (" w/%dKiB Cache", id->buf_size/2);

	printk(", CHS=%d/%d/%d", 
	printk(KERN_CONT ", CHS=%d/%d/%d\n",
			 drive->bios_cyl, drive->bios_head, drive->bios_sect);
	if (drive->using_dma)
		ide_dma_verbose(drive);
	printk("\n");

	/* write cache enabled? */
	if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5)))
+15 −51
Original line number Diff line number Diff line
@@ -611,12 +611,6 @@ static int __ide_dma_test_irq(ide_drive_t *drive)
	ide_hwif_t *hwif	= HWIF(drive);
	u8 dma_stat		= hwif->INB(hwif->dma_status);

#if 0  /* do not set unless you know what you are doing */
	if (dma_stat & 4) {
		u8 stat = hwif->INB(IDE_STATUS_REG);
		hwif->OUTB(hwif->dma_status, dma_stat & 0xE4);
	}
#endif
	/* return 1 if INTR asserted */
	if ((dma_stat & 4) == 4)
		return 1;
@@ -753,10 +747,12 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode)
			mode = XFER_MW_DMA_1;
	}

	printk(KERN_DEBUG "%s: %s mode selected\n", drive->name,
	mode = min(mode, req_mode);

	printk(KERN_INFO "%s: %s mode selected\n", drive->name,
			  mode ? ide_xfer_verbose(mode) : "no DMA");

	return min(mode, req_mode);
	return mode;
}

EXPORT_SYMBOL_GPL(ide_find_dma_mode);
@@ -772,6 +768,9 @@ static int ide_tune_dma(ide_drive_t *drive)
	if (__ide_dma_bad_drive(drive))
		return 0;

	if (ide_id_dma_bug(drive))
		return 0;

	if (drive->hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA)
		return config_drive_for_dma(drive);

@@ -806,58 +805,23 @@ static int ide_dma_check(ide_drive_t *drive)
	return vdma ? 0 : -1;
}

void ide_dma_verbose(ide_drive_t *drive)
int ide_id_dma_bug(ide_drive_t *drive)
{
	struct hd_driveid *id = drive->id;
	ide_hwif_t *hwif	= HWIF(drive);

	if (id->field_valid & 4) {
		if ((id->dma_ultra >> 8) && (id->dma_mword >> 8))
			goto bug_dma_off;
		if (id->dma_ultra & ((id->dma_ultra >> 8) & hwif->ultra_mask)) {
			if (((id->dma_ultra >> 11) & 0x1F) &&
			    eighty_ninty_three(drive)) {
				if ((id->dma_ultra >> 15) & 1) {
					printk(", UDMA(mode 7)");
				} else if ((id->dma_ultra >> 14) & 1) {
					printk(", UDMA(133)");
				} else if ((id->dma_ultra >> 13) & 1) {
					printk(", UDMA(100)");
				} else if ((id->dma_ultra >> 12) & 1) {
					printk(", UDMA(66)");
				} else if ((id->dma_ultra >> 11) & 1) {
					printk(", UDMA(44)");
				} else
					goto mode_two;
			} else {
		mode_two:
				if ((id->dma_ultra >> 10) & 1) {
					printk(", UDMA(33)");
				} else if ((id->dma_ultra >> 9) & 1) {
					printk(", UDMA(25)");
				} else if ((id->dma_ultra >> 8) & 1) {
					printk(", UDMA(16)");
				}
			}
		} else {
			printk(", (U)DMA");	/* Can be BIOS-enabled! */
		}
			goto err_out;
	} else if (id->field_valid & 2) {
		if ((id->dma_mword >> 8) && (id->dma_1word >> 8))
			goto bug_dma_off;
		printk(", DMA");
	} else if (id->field_valid & 1) {
		goto bug_dma_off;
			goto err_out;
	}
	return;
bug_dma_off:
	printk(", BUG DMA OFF");
	hwif->dma_off_quietly(drive);
	return;
	return 0;
err_out:
	printk(KERN_ERR "%s: bad DMA info in identify block\n", drive->name);
	return 1;
}

EXPORT_SYMBOL(ide_dma_verbose);

int ide_set_dma(ide_drive_t *drive)
{
	ide_hwif_t *hwif = drive->hwif;
+2 −1
Original line number Diff line number Diff line
@@ -970,7 +970,8 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
		if (rc)
			printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name);
		SELECT_DRIVE(drive);
		HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]);
		if (IDE_CONTROL_REG)
			HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
		rc = ide_wait_not_busy(HWIF(drive), 100000);
		if (rc)
			printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);
Loading