Skip to contentSkip to conversation

IDE updates part 1

PATCH New Bartlomiej Zolnierkiewicz 1 participant 1 message Apr 17, 2008

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IDE updates part 1

Hi,

Since it's "Merging Spree" again here goes the first IDE update for 2.6.26:

- couple of fixes and preparatory patches for IDE warm-plug support

- rework of PowerMac media-bay support ([un]register IDE devices instead of [un]registering IDE interface)

- IDE warm-plug support, to warm-plug devices on a port 'idex':

  # echo -n "1" > /sys/class/ide_port/idex/delete_devices

unplug old device(s) and plug new device(s)

#echo -n "1" > /sys/class/ide_port/idex/scan

done!

- ability to add new interfaces for ide-generic host driver through /sys/class/ide_generic/add, i.e.

echo -n "0x168:0x36e:10" > /sys/class/ide_generic/add

- generic packet command representation for ATAPI (Borislav Petkov)

- scc_pata update (Akira Iguchi)

- misc stuff...

Because of the above changes some obsoleted/broken code can be removed (~250 LOC) together with PPC specific hacks (~500 LOC).

Almost all patches have been in IDE tree (which is propagated to both -mm and -next trees) since middle of February so they should be pretty polished by now (extra thanks to Sergei Shtylyov for the hard work on reviewing IDE patches).

Linus, please pull from:

master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/

to receive the following updates:

 Documentation/ide/ide.txt               |   47 +---
 Documentation/ide/warm-plug-howto.txt   |   13 +
 Documentation/kernel-parameters.txt     |    4 +-
 arch/powerpc/kernel/setup_32.c          |    8 -
 arch/powerpc/platforms/powermac/pci.c   |   22 --
 arch/powerpc/platforms/powermac/pmac.h  |    5 -
 arch/powerpc/platforms/powermac/setup.c |    8 -
 arch/ppc/configs/sandpoint_defconfig    |    2 +-
 arch/ppc/kernel/ppc_ksyms.c             |    5 -
 arch/ppc/kernel/setup.c                 |    2 -
 arch/ppc/platforms/4xx/bamboo.c         |    1 -
 arch/ppc/platforms/4xx/ebony.c          |    1 -
 arch/ppc/platforms/4xx/luan.c           |    1 -
 arch/ppc/platforms/4xx/ocotea.c         |    1 -
 arch/ppc/platforms/4xx/taishan.c        |    1 -
 arch/ppc/platforms/4xx/yucca.c          |    1 -
 arch/ppc/platforms/chestnut.c           |    1 -
 arch/ppc/platforms/cpci690.c            |    1 -
 arch/ppc/platforms/ev64260.c            |    1 -
 arch/ppc/platforms/hdpu.c               |   36 --
 arch/ppc/platforms/lopec.c              |   85 -----
 arch/ppc/platforms/mvme5100.c           |    1 -
 arch/ppc/platforms/powerpmc250.c        |    1 -
 arch/ppc/platforms/pplus.c              |   58 ----
 arch/ppc/platforms/prep_setup.c         |   38 ---
 arch/ppc/platforms/prpmc750.c           |    1 -
 arch/ppc/platforms/prpmc800.c           |    1 -
 arch/ppc/platforms/radstone_ppc7d.c     |    1 -
 arch/ppc/platforms/residual.c           |    1 -
 arch/ppc/platforms/sandpoint.c          |   94 ------
 arch/ppc/platforms/sandpoint.h          |    3 -
 arch/ppc/platforms/spruce.c             |    1 -
 arch/ppc/syslib/m8xx_setup.c            |    6 -
 arch/ppc/syslib/ppc4xx_setup.c          |   23 --
 block/compat_ioctl.c                    |    1 -
 drivers/ide/Kconfig                     |   44 +--
 drivers/ide/Makefile                    |    2 +-
 drivers/ide/arm/bast-ide.c              |    6 +-
 drivers/ide/arm/palm_bk3710.c           |    6 +-
 drivers/ide/arm/rapide.c                |    2 +-
 drivers/ide/cris/ide-cris.c             |   18 +-
 drivers/ide/ide-acpi.c                  |    2 +
 drivers/ide/ide-cd.c                    |   10 +-
 drivers/ide/ide-floppy.c                |  346 ++++++++------------
 drivers/ide/ide-generic.c               |   89 +++++-
 drivers/ide/ide-io.c                    |   38 ++-
 drivers/ide/ide-iops.c                  |   86 +++--
 drivers/ide/ide-pnp.c                   |    2 +-
 drivers/ide/ide-probe.c                 |  134 +++++++--
 drivers/ide/ide-proc.c                  |   19 +-
 drivers/ide/ide-scan-pci.c              |    9 +-
 drivers/ide/ide-tape.c                  |  536 ++++++++++++++----------------
 drivers/ide/ide-taskfile.c              |   29 +-
 drivers/ide/ide.c                       |  419 ++++++-------------------
 drivers/ide/legacy/Makefile             |    1 +
 drivers/ide/legacy/ali14xx.c            |   12 +
 drivers/ide/legacy/dtc2278.c            |   12 +
 drivers/ide/legacy/ht6560b.c            |   25 ++-
 drivers/ide/legacy/ide-4drives.c        |   50 +++
 drivers/ide/legacy/ide-cs.c             |    8 +-
 drivers/ide/legacy/ide_platform.c       |    2 +-
 drivers/ide/legacy/qd65xx.c             |   19 +-
 drivers/ide/legacy/umc8672.c            |   12 +
 drivers/ide/mips/au1xxx-ide.c           |    5 +-
 drivers/ide/pci/cmd640.c                |   34 +-
 drivers/ide/pci/delkin_cb.c             |    8 +-
 drivers/ide/pci/hpt366.c                |   61 +----
 drivers/ide/pci/ns87415.c               |    4 +
 drivers/ide/pci/scc_pata.c              |   70 +++-
 drivers/ide/pci/sgiioc4.c               |   20 +-
 drivers/ide/pci/siimage.c               |   43 ---
 drivers/ide/pci/sl82c105.c              |    4 +
 drivers/ide/pci/tc86c001.c              |   36 --
 drivers/ide/ppc/mpc8xx.c                |   86 ++----
 drivers/ide/ppc/pmac.c                  |  104 +-----
 drivers/ide/setup-pci.c                 |   20 +--
 drivers/macintosh/mediabay.c            |   17 +-
 drivers/scsi/ide-scsi.c                 |  203 +++++-------
 include/asm-alpha/ide.h                 |   11 -
 include/asm-arm/ide.h                   |    8 -
 include/asm-blackfin/ide.h              |    4 -
 include/asm-ia64/ide.h                  |   10 -
 include/asm-m32r/ide.h                  |   10 -
 include/asm-mips/mach-generic/ide.h     |   10 -
 include/asm-parisc/ide.h                |    2 -
 include/asm-powerpc/ide.h               |   57 ++--
 include/asm-powerpc/mediabay.h          |    6 +-
 include/asm-sh/ide.h                    |    3 -
 include/asm-sparc/ide.h                 |    2 -
 include/asm-sparc64/ide.h               |    2 -
 include/asm-x86/ide.h                   |   10 -
 include/linux/hdreg.h                   |    4 +-
 include/linux/ide.h                     |  174 ++++++----
 93 files changed, 1336 insertions(+), 2106 deletions(-)
 create mode 100644 Documentation/ide/warm-plug-howto.txt
 create mode 100644 drivers/ide/legacy/ide-4drives.c

Akira Iguchi (1):
scc_pata.c: do setup itself instead of ide_setup_pci_device()

Bartlomiej Zolnierkiewicz (46):
ide-generic: set hwif->chipset
ide: fix ide_find_port()
ide: use ide_find_port() instead of ide_deprecated_find_port()
ide-acpi: add missing drive->acpidata zeroing
ide: factor out cable detection from ide_init_port()
ide: remove IDE devices from /proc/ide/ before unregistering them
ide: factor out code unregistering devices from ide_unregister()
ide: factor out devices init from ide_init_port_data()
ide: move ide_port_setup_devices() call to ide_device_add_all()
ide: rework PowerMac media-bay support (take 2)
ide: remove dead/obsolete ->busproc method
ide: add warm-plug support for IDE devices (take 2)
ide-generic: add ide_generic class and attribute for adding new interfaces
ide: remove needless CONFIG_BLK_DEV_HD hack from init_hwif()
ide: remove CONFIG_BLK_DEV_HD_IDE config option (take 2)
ide: remove obsoleted "idex=base[,ctl[,irq]]" kernel parameters (take 2)
ide: remove broken/dangerous HDIO_[UNREGISTER,SCAN]_HWIF ioctls (take 3)
ide: remove ->hold field from ide_hwif_t (take 2)
ide: remove init_hwif_default()
ide: remove ide_init_hwif_ports()
ide: add ide_atapi_{discard_data,write_zeros} inline helpers
ide: remove IDE_*_REG macros
ide-pmac: remove dead code
ppc/hdpu: remove dead IDE code
ppc/ppc4xx: remove ppc_ide_md hooks
ppc/pmac: remove ppc_ide_md hooks
ppc/mpc8xx: remove ppc_ide_md hooks
ppc/lopec: remove ppc_ide_md hooks
ppc/sandpoint: remove ppc_ide_md hooks
ppc/pplus: remove ppc_ide_md.ide_init_hwif hook
ppc: remove ppc_ide_md
ppc: don't include <linux/ide.h>
ppc/pmac: remove no longer needed IDE quirk
ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2)
ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT
ide: remove ide_default_io_ctl() macro
ide: remove ppc ifdef from init_ide_data()
ide: add ide-4drives host driver (take 3)
cmd640: cleanup setup_device_ptrs()
cmd640: init hwif->{io_ports,irq} explicitly
ide: limit legacy VLB host drivers to alpha, x86 and mips
ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers
ide: remove needless hwif->irq check from ide_hwif_configure()
ide: remove obsoleted "idex=noprobe" kernel parameter (take 2)
ide: move default IDE ports setup to ide_generic host driver
ide: remove ide_init_default_irq() macro

Borislav Petkov (10):
ide-floppy: remove struct idefloppy_id_gcw
ide-tape: move all struct and other defs at the top
ide-tape: remove atomic test/set macros for packet commands
ide: add generic packet command representation ide_atapi_pc
ide-tape: convert driver to using generic ide_atapi_pc
ide-floppy: convert driver to using generic ide_atapi_pc
ide-scsi: convert driver to using generic ide_atapi_pc
ide-floppy: rename end_request handler properly
ide: use generic ATAPI packet command flags in ide-{floppy,tape}
ide-scsi: do non-atomic pc->flags testing

Greg Kroah-Hartman (1):
IDE: remove ide=reverse IDE core

Documentation/ide/ide.txt +4 -43
index 818676a..486c699 100644
@@ -71,29 +71,6 @@ This driver automatically probes for most IDE interfaces (including all PCI
 ones), for the drives/geometries attached to those interfaces, and for the IRQ
 lines being used by the interfaces (normally 14, 15 for ide0/ide1).
 
-For special cases, interfaces may be specified using kernel "command line"
-options.  For example,
-
-	ide3=0x168,0x36e,10	/* ioports 0x168-0x16f,0x36e, irq 10 */
-
-Normally the irq number need not be specified, as ide.c will probe for it:
-
-	ide3=0x168,0x36e	/* ioports 0x168-0x16f,0x36e */
-
-The standard port, and irq values are these:
-
-	ide0=0x1f0,0x3f6,14
-	ide1=0x170,0x376,15
-	ide2=0x1e8,0x3ee,11
-	ide3=0x168,0x36e,10
-
-Note that the first parameter reserves 8 contiguous ioports, whereas the
-second value denotes a single ioport. If in doubt, do a 'cat /proc/ioports'.
-
-In all probability the device uses these ports and IRQs if it is attached
-to the appropriate ide channel.  Pass the parameter for the correct ide
-channel to the kernel, as explained above.
-
 Any number of interfaces may share a single IRQ if necessary, at a slight
 performance penalty, whether on separate cards or a single VLB card.
 The IDE driver automatically detects and handles this.  However, this may
@@ -184,13 +161,6 @@ provided it is mounted with the default block size of 1024 (as above).
 Please pass on any feedback on any of this stuff to the maintainer,
 whose address can be found in linux/MAINTAINERS.
 
-Note that if BOTH hd.c and ide.c are configured into the kernel,
-hd.c will normally be allowed to control the primary IDE interface.
-This is useful for older hardware that may be incompatible with ide.c,
-and still allows newer hardware to run on the 2nd/3rd/4th IDE ports
-under control of ide.c.   To have ide.c also "take over" the primary
-IDE port in this situation, use the "command line" parameter:  ide0=0x1f0
-
 The IDE driver is modularized.  The high level disk/CD-ROM/tape/floppy
 drivers can always be compiled as loadable modules, the chipset drivers
 can only be compiled into the kernel, and the core code (ide.c) can be
@@ -206,7 +176,7 @@ When ide.c is used as a module, you can pass command line parameters to the
 driver using the "options=" keyword to insmod, while replacing any ',' with
 ';'.  For example:
 
-	insmod ide.o options="ide0=serialize ide1=serialize ide2=0x1e8;0x3ee;11"
+	insmod ide.o options="hda=nodma hdb=nodma"
 
 
 ================================================================================
@@ -247,21 +217,11 @@ Summary of ide driver parameters for kernel command line
 			  As for VLB, it is safest to not specify it.
 			  Bigger values are safer than smaller ones.
 
- "idex=base"		: probe for an interface at the addr specified,
-			  where "base" is usually 0x1f0 or 0x170
-			  and "ctl" is assumed to be "base"+0x206
-
- "idex=base,ctl"	: specify both base and ctl
-
- "idex=base,ctl,irq"	: specify base, ctl, and irq number
-
  "idex=serialize"	: do not overlap operations on idex. Please note
 			  that you will have to specify this option for
 			  both the respective primary and secondary channel
 			  to take effect.
 
- "idex=four"		: four drives on idex and ide(x^1) share same ports
-
  "idex=reset"		: reset interface after probe
 
  "idex=ata66"		: informs the interface that it has an 80c cable
@@ -269,8 +229,6 @@ Summary of ide driver parameters for kernel command line
 			  ability to bit test for detection is currently
 			  unknown.
 
- "ide=reverse"		: formerly called to pci sub-system, but now local.
-
  "ide=doubler"		: probe/support IDE doublers on Amiga
 
 There may be more options than shown -- use the source, Luke!
@@ -290,6 +248,9 @@ Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb"
 kernel paremeter to enable probing for VLB version of the chipset (PCI ones
 are detected automatically).
 
+You also need to use "probe" kernel parameter for ide-4drives driver
+(support for IDE generic chipset with four drives on one port).
+
 ================================================================================
 
 Some Terminology
Documentation/ide/warm-plug-howto.txt new file +13 -0
new file mode 100644
index 0000000..d588546
@@ -0,0 +1,13 @@
+
+IDE warm-plug HOWTO
+===================
+
+To warm-plug devices on a port 'idex':
+
+# echo -n "1" > /sys/class/ide_port/idex/delete_devices
+
+unplug old device(s) and plug new device(s)
+
+# echo -n "1" > /sys/class/ide_port/idex/scan
+
+done
Documentation/kernel-parameters.txt +2 -2
index dafd001..239e78a 100644
@@ -763,11 +763,11 @@ and is between 256 and 4096 characters. It is defined in the file
 			Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
 
 	ide=		[HW] (E)IDE subsystem
-			Format: ide=nodma or ide=doubler or ide=reverse
+			Format: ide=nodma or ide=doubler
 			See Documentation/ide/ide.txt.
 
 	ide?=		[HW] (E)IDE subsystem
-			Format: ide?=noprobe or chipset specific parameters.
+			Format: ide?=ata66 or chipset specific parameters.
 			See Documentation/ide/ide.txt.
 
 	idebus=		[HW] (E)IDE subsystem - VLB/PCI bus speed
arch/powerpc/kernel/setup_32.c +0 -8
index cd870a8..06d918d 100644
@@ -10,9 +10,6 @@
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
-#if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE)
-#include <linux/ide.h>
-#endif
 #include <linux/tty.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
@@ -51,11 +48,6 @@
 
 extern void bootx_init(unsigned long r4, unsigned long phys);
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-struct ide_machdep_calls ppc_ide_md;
-EXPORT_SYMBOL(ppc_ide_md);
-#endif
-
 int boot_cpuid;
 EXPORT_SYMBOL_GPL(boot_cpuid);
 int boot_cpuid_phys;
arch/powerpc/platforms/powermac/pci.c +0 -22
index 1c58db9..bcf50d7 100644
@@ -1144,28 +1144,6 @@ void __init pmac_pcibios_after_init(void)
 {
 	struct device_node* nd;
 
-#ifdef CONFIG_BLK_DEV_IDE
-	struct pci_dev *dev = NULL;
-
-	/* OF fails to initialize IDE controllers on macs
-	 * (and maybe other machines)
-	 *
-	 * Ideally, this should be moved to the IDE layer, but we need
-	 * to check specifically with Andre Hedrick how to do it cleanly
-	 * since the common IDE code seem to care about the fact that the
-	 * BIOS may have disabled a controller.
-	 *
-	 * -- BenH
-	 */
-	for_each_pci_dev(dev) {
-		if ((dev->class >> 16) != PCI_BASE_CLASS_STORAGE)
-			continue;
-		if (pci_enable_device(dev))
-			printk(KERN_WARNING
-			       "pci: Failed to enable %s\n", pci_name(dev));
-	}
-#endif /* CONFIG_BLK_DEV_IDE */
-
 	for_each_node_by_name(nd, "firewire") {
 		if (nd->parent && (of_device_is_compatible(nd, "pci106b,18") ||
 				   of_device_is_compatible(nd, "pci106b,30") ||
arch/powerpc/platforms/powermac/pmac.h +0 -5
index b3abaaf..3362e78 100644
@@ -2,7 +2,6 @@
 #define __PMAC_H__
 
 #include <linux/pci.h>
-#include <linux/ide.h>
 #include <linux/irq.h>
 
 /*
@@ -35,10 +34,6 @@ extern void pmac_check_ht_link(void);
 
 extern void pmac_setup_smp(void);
 
-extern unsigned long pmac_ide_get_base(int index);
-extern void pmac_ide_init_hwif_ports(hw_regs_t *hw,
-	unsigned long data_port, unsigned long ctrl_port, int *irq);
-
 extern int pmac_nvram_init(void);
 extern void pmac_pic_init(void);
 
arch/powerpc/platforms/powermac/setup.c +0 -8
index 36ff1b6..2693fc3 100644
@@ -574,14 +574,6 @@ static int __init pmac_probe(void)
 	ISA_DMA_THRESHOLD = ~0L;
 	DMA_MODE_READ = 1;
 	DMA_MODE_WRITE = 2;
-
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-#ifdef CONFIG_BLK_DEV_IDE_PMAC
-        ppc_ide_md.ide_init_hwif	= pmac_ide_init_hwif_ports;
-        ppc_ide_md.default_io_base	= pmac_ide_get_base;
-#endif /* CONFIG_BLK_DEV_IDE_PMAC */
-#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
-
 #endif /* CONFIG_PPC32 */
 
 #ifdef CONFIG_PMAC_SMU
arch/ppc/configs/sandpoint_defconfig +1 -1
index fb493a6..9525e34 100644
@@ -189,7 +189,7 @@ CONFIG_IDE_TASKFILE_IO=y
 #
 # IDE chipset support/bugfixes
 #
-CONFIG_IDE_GENERIC=y
+CONFIG_BLK_DEV_SL82C105=y
 # CONFIG_BLK_DEV_IDEPCI is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
arch/ppc/kernel/ppc_ksyms.c +0 -5
index c353502..2ba659f 100644
@@ -12,7 +12,6 @@
 #include <linux/irq.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/pm.h>
 #include <linux/bitops.h>
 
@@ -124,10 +123,6 @@ EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(iounmap);
 EXPORT_SYMBOL(ioremap_bot);	/* aka VMALLOC_END */
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-EXPORT_SYMBOL(ppc_ide_md);
-#endif
-
 #ifdef CONFIG_PCI
 EXPORT_SYMBOL(isa_io_base);
 EXPORT_SYMBOL(isa_mem_base);
arch/ppc/kernel/setup.c +0 -2
index 2940559..bfddfde 100644
@@ -10,7 +10,6 @@
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
-#include <linux/ide.h>
 #include <linux/screen_info.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
@@ -57,7 +56,6 @@ extern void ppc6xx_idle(void);
 extern void power4_idle(void);
 
 extern boot_infos_t *boot_infos;
-struct ide_machdep_calls ppc_ide_md;
 
 /* Used with the BI_MEMSIZE bootinfo parameter to store the memory
    size value reported by the boot loader. */
arch/ppc/platforms/4xx/bamboo.c +0 -1
index 017623c..01f20f4 100644
@@ -22,7 +22,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/4xx/ebony.c +0 -1
index 453643a..8027a36 100644
@@ -25,7 +25,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/4xx/luan.c +0 -1
index b79ebb8..f6d8c2e 100644
@@ -23,7 +23,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/4xx/ocotea.c +0 -1
index 28a712c..308386e 100644
@@ -23,7 +23,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/4xx/taishan.c +0 -1
index f6a0c66..1156942 100644
@@ -23,7 +23,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/4xx/yucca.c +0 -1
index 66a44ff..f6cfd44 100644
@@ -24,7 +24,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/chestnut.c +0 -1
index dcd6070..27c140f 100644
@@ -22,7 +22,6 @@
 #include <linux/initrd.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
-#include <linux/ide.h>
 #include <linux/serial.h>
 #include <linux/serial_core.h>
 #include <linux/serial_8250.h>
arch/ppc/platforms/cpci690.c +0 -1
index e78bccf..07f672d 100644
@@ -10,7 +10,6 @@
  */
 #include <linux/delay.h>
 #include <linux/pci.h>
-#include <linux/ide.h>
 #include <linux/irq.h>
 #include <linux/fs.h>
 #include <linux/seq_file.h>
arch/ppc/platforms/ev64260.c +0 -1
index c1f77e1..f522b31 100644
@@ -23,7 +23,6 @@
 
 #include <linux/delay.h>
 #include <linux/pci.h>
-#include <linux/ide.h>
 #include <linux/irq.h>
 #include <linux/fs.h>
 #include <linux/seq_file.h>
arch/ppc/platforms/hdpu.c +0 -36
index ca5de13..904b518 100644
@@ -16,7 +16,6 @@
 #include <linux/pci.h>
 #include <linux/delay.h>
 #include <linux/irq.h>
-#include <linux/ide.h>
 #include <linux/seq_file.h>
 #include <linux/platform_device.h>
 
@@ -604,41 +603,6 @@ static void parse_bootinfo(unsigned long r3,
 	}
 }
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-static void
-hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name)
-{
-	request_region(from, extent, name);
-	return;
-}
-
-static void hdpu_ide_release_region(ide_ioreg_t from, unsigned int extent)
-{
-	release_region(from, extent);
-	return;
-}
-
-static void __init
-hdpu_ide_pci_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port,
-			     ide_ioreg_t ctrl_port, int *irq)
-{
-	struct pci_dev *dev;
-
-	pci_for_each_dev(dev) {
-		if (((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) ||
-		    ((dev->class >> 8) == PCI_CLASS_STORAGE_RAID)) {
-			hw->irq = dev->irq;
-
-			if (irq != NULL) {
-				*irq = dev->irq;
-			}
-		}
-	}
-
-	return;
-}
-#endif
-
 void hdpu_heartbeat(void)
 {
 	if (mv64x60_read(&bh, MV64x60_GPP_VALUE) & (1 << 5))
arch/ppc/platforms/lopec.c +0 -85

103 lines not on this page · raw message

arch/ppc/platforms/mvme5100.c +0 -1
index bb8d4a4..053b54a 100644
@@ -17,7 +17,6 @@
 #include <linux/initrd.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/seq_file.h>
 #include <linux/kdev_t.h>
 #include <linux/root_dev.h>
arch/ppc/platforms/powerpmc250.c +0 -1
index 4d46650..162dc85 100644
@@ -25,7 +25,6 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/seq_file.h>
-#include <linux/ide.h>
 #include <linux/root_dev.h>
 
 #include <asm/byteorder.h>
arch/ppc/platforms/pplus.c +0 -58

76 lines not on this page · raw message

arch/ppc/platforms/prep_setup.c +0 -38
index 3844985..465b658 100644
@@ -33,7 +33,6 @@
 #include <linux/console.h>
 #include <linux/timex.h>
 #include <linux/pci.h>
-#include <linux/ide.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
 
@@ -894,38 +893,6 @@ prep_init_IRQ(void)
 		i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR, 0);
 }
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-/*
- * IDE stuff.
- */
-static int
-prep_ide_default_irq(unsigned long base)
-{
-	switch (base) {
-		case 0x1f0: return 13;
-		case 0x170: return 13;
-		case 0x1e8: return 11;
-		case 0x168: return 10;
-		case 0xfff0: return 14;		/* MCP(N)750 ide0 */
-		case 0xffe0: return 15;		/* MCP(N)750 ide1 */
-		default: return 0;
-	}
-}
-
-static unsigned long
-prep_ide_default_io_base(int index)
-{
-	switch (index) {
-		case 0: return 0x1f0;
-		case 1: return 0x170;
-		case 2: return 0x1e8;
-		case 3: return 0x168;
-		default:
-			return 0;
-	}
-}
-#endif
-
 #ifdef CONFIG_SMP
 /* PReP (MTX) support */
 static int __init
@@ -1070,11 +1037,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
 	ppc_md.setup_io_mappings = prep_map_io;
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-	ppc_ide_md.default_irq = prep_ide_default_irq;
-	ppc_ide_md.default_io_base = prep_ide_default_io_base;
-#endif
-
 #ifdef CONFIG_SMP
 	smp_ops			 = &prep_smp_ops;
 #endif /* CONFIG_SMP */
arch/ppc/platforms/prpmc750.c +0 -1
index fcab513..93bd593 100644
@@ -22,7 +22,6 @@
 #include <linux/console.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
-#include <linux/ide.h>
 #include <linux/root_dev.h>
 #include <linux/slab.h>
 #include <linux/serial_reg.h>
arch/ppc/platforms/prpmc800.c +0 -1
index f4ade5c..5bcda7f 100644
@@ -20,7 +20,6 @@
 #include <linux/console.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
-#include <linux/ide.h>
 #include <linux/root_dev.h>
 #include <linux/harrier_defs.h>
 
arch/ppc/platforms/radstone_ppc7d.c +0 -1
index 44d4398..179b4a9 100644
@@ -29,7 +29,6 @@
 #include <linux/initrd.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
 #include <linux/serial.h>
arch/ppc/platforms/residual.c +0 -1
index c991160..18495e7 100644
@@ -38,7 +38,6 @@
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/pci.h>
-#include <linux/ide.h>
 
 #include <asm/sections.h>
 #include <asm/mmu.h>
arch/ppc/platforms/sandpoint.c +0 -94

110 lines not on this page · raw message

arch/ppc/platforms/sandpoint.h +0 -3
index 3b64e64..ed83759 100644
@@ -28,9 +28,6 @@
  */
 #define SANDPOINT_IDE_INT0		23	/* EPIC 7 */
 #define SANDPOINT_IDE_INT1		24	/* EPIC 8 */
-#else
-#define SANDPOINT_IDE_INT0		14	/* 8259 Test */
-#define SANDPOINT_IDE_INT1		15	/* 8259 Test */
 #endif
 
 /*
arch/ppc/platforms/spruce.c +0 -1
index f4de50b..a344134 100644
@@ -22,7 +22,6 @@
 #include <linux/console.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
-#include <linux/ide.h>
 #include <linux/root_dev.h>
 #include <linux/serial.h>
 #include <linux/tty.h>
arch/ppc/syslib/m8xx_setup.c +0 -6
index 9caf850..19749e9 100644
@@ -87,8 +87,6 @@ void m8xx_calibrate_decr(void);
 
 unsigned char __res[sizeof(bd_t)];
 
-extern void m8xx_ide_init(void);
-
 extern unsigned long find_available_memory(void);
 extern void m8xx_cpm_reset(void);
 extern void m8xx_wdt_handler_install(bd_t *bp);
@@ -474,8 +472,4 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
 	ppc_md.find_end_of_memory	= m8xx_find_end_of_memory;
 	ppc_md.setup_io_mappings	= m8xx_map_io;
-
-#if defined(CONFIG_BLK_DEV_MPC8xx_IDE)
-	m8xx_ide_init();
-#endif
 }
arch/ppc/syslib/ppc4xx_setup.c +0 -23
index debe14c..353d746 100644
@@ -24,7 +24,6 @@
 #include <linux/pci.h>
 #include <linux/rtc.h>
 #include <linux/console.h>
-#include <linux/ide.h>
 #include <linux/serial_reg.h>
 #include <linux/seq_file.h>
 
@@ -189,24 +188,6 @@ ppc4xx_calibrate_decr(void)
 	mtspr(SPRN_PIT, tb_ticks_per_jiffy);
 }
 
-/*
- * IDE stuff.
- * should be generic for every IDE PCI chipset
- */
-#if defined(CONFIG_PCI) && defined(CONFIG_IDE)
-static void
-ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, unsigned long data_port,
-			   unsigned long ctrl_port, int *irq)
-{
-	int i;
-
-	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; ++i)
-		hw->io_ports[i] = data_port + i - IDE_DATA_OFFSET;
-
-	hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
-
 TODC_ALLOC();
 
 /*
@@ -271,10 +252,6 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
 	ppc_md.progress = gen550_progress;
 #endif
-
-#if defined(CONFIG_PCI) && defined(CONFIG_IDE)
-	ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
 }
 
 /* Called from machine_check_exception */
block/compat_ioctl.c +0 -1
index b733732..c70d0b6 100644
@@ -624,7 +624,6 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file,
 	case HDIO_GET_IDENTITY:
 	case HDIO_DRIVE_TASK:
 	case HDIO_DRIVE_CMD:
-	case HDIO_SCAN_HWIF:
 	/* 0x330 is reserved -- it used to be HDIO_GETGEO_BIG */
 	case 0x330:
 	/* 0x02 -- Floppy ioctls */
drivers/ide/Kconfig +10 -34

101 lines not on this page · raw message

drivers/ide/Makefile +1 -1
index a4a4323..571544c 100644
@@ -36,9 +36,9 @@ ifeq ($(CONFIG_BLK_DEV_CMD640), y)
 endif
 
 obj-$(CONFIG_BLK_DEV_IDE)		+= cris/ ppc/
-obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
 obj-$(CONFIG_IDE_H8300)			+= h8300/
 obj-$(CONFIG_IDE_GENERIC)		+= ide-generic.o
+obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
 
 ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o
 
drivers/ide/arm/bast-ide.c +3 -3
index 161d30c..ec46c44 100644
@@ -41,15 +41,15 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
 	hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20);
 	hw.irq = irq;
 
-	hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
 	if (hwif == NULL)
 		goto out;
 
 	i = hwif->index;
 
 	if (hwif->present)
-		ide_unregister(i, 0, 0);
-	else if (!hwif->hold)
+		ide_unregister(i);
+	else
 		ide_init_port_data(hwif, i);
 
 	ide_init_port_hw(hwif, &hw);
drivers/ide/arm/palm_bk3710.c +3 -3
index 8e1f6bd..474162c 100644
@@ -378,15 +378,15 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
 	hw.irq = irq->start;
 	hw.chipset = ide_palm3710;
 
-	hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
 	if (hwif == NULL)
 		goto out;
 
 	i = hwif->index;
 
 	if (hwif->present)
-		ide_unregister(i, 0, 0);
-	else if (!hwif->hold)
+		ide_unregister(i);
+	else
 		ide_init_port_data(hwif, i);
 
 	ide_init_port_hw(hwif, &hw);
drivers/ide/arm/rapide.c +1 -1
index efba00d..b30adcf 100644
@@ -76,7 +76,7 @@ static void __devexit rapide_remove(struct expansion_card *ec)
 
 	ecard_set_drvdata(ec, NULL);
 
-	ide_unregister(hwif->index, 0, 0);
+	ide_unregister(hwif->index);
 
 	ecard_release_resources(ec);
 }
drivers/ide/cris/ide-cris.c +14 -4
index c8ffbaf..31266d2 100644
@@ -228,7 +228,10 @@ cris_ide_fill_descriptor(cris_dma_descr_type *d, void* buf, unsigned int len, in
 static void
 cris_ide_start_dma(ide_drive_t *drive, cris_dma_descr_type *d, int dir,int type,int len)
 {
-	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int, IDE_DATA_REG);
+	ide_hwif_t *hwif = drive->hwif;
+
+	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int,
+					       hwif->io_ports[IDE_DATA_OFFSET]);
 	reg_ata_rw_trf_cnt trf_cnt = {0};
 
 	mycontext.saved_data = (dma_descr_data*)virt_to_phys(d);
@@ -264,8 +267,12 @@ cris_ide_wait_dma(int dir)
 
 static int cris_dma_test_irq(ide_drive_t *drive)
 {
+	ide_hwif_t *hwif = drive->hwif;
 	int intr = REG_RD_INT(ata, regi_ata, r_intr);
-	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int, IDE_DATA_REG);
+
+	reg_ata_rw_ctrl2 ctrl2 = REG_TYPE_CONV(reg_ata_rw_ctrl2, int,
+					       hwif->io_ports[IDE_DATA_OFFSET]);
+
 	return intr & (1 << ctrl2.sel) ? 1 : 0;
 }
 
@@ -523,7 +530,8 @@ static void cris_ide_start_dma(ide_drive_t *drive, cris_dma_descr_type *d, int d
 	                          IO_STATE(R_ATA_CTRL_DATA, handsh, dma);
 	*R_ATA_CTRL_DATA =
 		cmd |
-		IO_FIELD(R_ATA_CTRL_DATA, data, IDE_DATA_REG) |
+		IO_FIELD(R_ATA_CTRL_DATA, data,
+			 drive->hwif->io_ports[IDE_DATA_OFFSET]) |
 		IO_STATE(R_ATA_CTRL_DATA, src_dst,  dma)  |
 		IO_STATE(R_ATA_CTRL_DATA, multi,    on)   |
 		IO_STATE(R_ATA_CTRL_DATA, dma_size, word);
@@ -541,7 +549,9 @@ cris_ide_wait_dma(int dir)
 static int cris_dma_test_irq(ide_drive_t *drive)
 {
 	int intr = *R_IRQ_MASK0_RD;
-	int bus = IO_EXTRACT(R_ATA_CTRL_DATA, sel, IDE_DATA_REG);
+	int bus = IO_EXTRACT(R_ATA_CTRL_DATA, sel,
+			     drive->hwif->io_ports[IDE_DATA_OFFSET]);
+
 	return intr & (1 << (bus + IO_BITNR(R_IRQ_MASK0_RD, ata_irq0))) ? 1 : 0;
 }
 
drivers/ide/ide-acpi.c +2 -0
index e07b189..0f6fb6b 100644
@@ -710,6 +710,8 @@ void ide_acpi_port_init_devices(ide_hwif_t *hwif)
 	for (i = 0; i < MAX_DRIVES; i++) {
 		drive = &hwif->drives[i];
 
+		memset(drive->acpidata, 0, sizeof(*drive->acpidata));
+
 		if (!drive->present)
 			continue;
 
drivers/ide/ide-cd.c +6 -4
index c8d0e87..3960002 100644
@@ -542,7 +542,8 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
 
 		/* packet command */
 		spin_lock_irqsave(&ide_lock, flags);
-		hwif->OUTBSYNC(drive, WIN_PACKETCMD, IDE_COMMAND_REG);
+		hwif->OUTBSYNC(drive, WIN_PACKETCMD,
+			       hwif->io_ports[IDE_COMMAND_OFFSET]);
 		ndelay(400);
 		spin_unlock_irqrestore(&ide_lock, flags);
 
@@ -992,6 +993,7 @@ static int cdrom_newpc_intr_dummy_cb(struct request *rq)
 
 static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
 {
+	ide_hwif_t *hwif = drive->hwif;
 	struct cdrom_info *info = drive->driver_data;
 	struct request *rq = HWGROUP(drive)->rq;
 	xfer_func_t *xferfunc;
@@ -1032,9 +1034,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
 	/*
 	 * ok we fall to pio :/
 	 */
-	ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3;
-	lowcyl  = HWIF(drive)->INB(IDE_BCOUNTL_REG);
-	highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG);
+	ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]) & 0x3;
+	lowcyl  = hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]);
+	highcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]);
 
 	len = lowcyl + (256 * highcyl);
 
drivers/ide/ide-floppy.c +139 -207

822 lines not on this page · raw message

drivers/ide/ide-generic.c +86 -3

118 lines not on this page · raw message

drivers/ide/ide-io.c +23 -15
index 7153796..31e5afa 100644
@@ -301,39 +301,45 @@ void ide_tf_read(ide_drive_t *drive, ide_task_t *task)
 	struct ide_taskfile *tf = &task->tf;
 
 	if (task->tf_flags & IDE_TFLAG_IN_DATA) {
-		u16 data = hwif->INW(IDE_DATA_REG);
+		u16 data = hwif->INW(hwif->io_ports[IDE_DATA_OFFSET]);
 
 		tf->data = data & 0xff;
 		tf->hob_data = (data >> 8) & 0xff;
 	}
 
 	/* be sure we're looking at the low order bits */
-	hwif->OUTB(drive->ctl & ~0x80, IDE_CONTROL_REG);
+	hwif->OUTB(drive->ctl & ~0x80, hwif->io_ports[IDE_CONTROL_OFFSET]);
 
 	if (task->tf_flags & IDE_TFLAG_IN_NSECT)
-		tf->nsect  = hwif->INB(IDE_NSECTOR_REG);
+		tf->nsect  = hwif->INB(hwif->io_ports[IDE_NSECTOR_OFFSET]);
 	if (task->tf_flags & IDE_TFLAG_IN_LBAL)
-		tf->lbal   = hwif->INB(IDE_SECTOR_REG);
+		tf->lbal   = hwif->INB(hwif->io_ports[IDE_SECTOR_OFFSET]);
 	if (task->tf_flags & IDE_TFLAG_IN_LBAM)
-		tf->lbam   = hwif->INB(IDE_LCYL_REG);
+		tf->lbam   = hwif->INB(hwif->io_ports[IDE_LCYL_OFFSET]);
 	if (task->tf_flags & IDE_TFLAG_IN_LBAH)
-		tf->lbah   = hwif->INB(IDE_HCYL_REG);
+		tf->lbah   = hwif->INB(hwif->io_ports[IDE_HCYL_OFFSET]);
 	if (task->tf_flags & IDE_TFLAG_IN_DEVICE)
-		tf->device = hwif->INB(IDE_SELECT_REG);
+		tf->device = hwif->INB(hwif->io_ports[IDE_SELECT_OFFSET]);
 
 	if (task->tf_flags & IDE_TFLAG_LBA48) {
-		hwif->OUTB(drive->ctl | 0x80, IDE_CONTROL_REG);
+		hwif->OUTB(drive->ctl | 0x80,
+			   hwif->io_ports[IDE_CONTROL_OFFSET]);
 
 		if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE)
-			tf->hob_feature = hwif->INB(IDE_FEATURE_REG);
+			tf->hob_feature =
+				hwif->INB(hwif->io_ports[IDE_FEATURE_OFFSET]);
 		if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-			tf->hob_nsect   = hwif->INB(IDE_NSECTOR_REG);
+			tf->hob_nsect   =
+				hwif->INB(hwif->io_ports[IDE_NSECTOR_OFFSET]);
 		if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-			tf->hob_lbal    = hwif->INB(IDE_SECTOR_REG);
+			tf->hob_lbal    =
+				hwif->INB(hwif->io_ports[IDE_SECTOR_OFFSET]);
 		if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-			tf->hob_lbam    = hwif->INB(IDE_LCYL_REG);
+			tf->hob_lbam    =
+				hwif->INB(hwif->io_ports[IDE_LCYL_OFFSET]);
 		if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-			tf->hob_lbah    = hwif->INB(IDE_HCYL_REG);
+			tf->hob_lbah    =
+				hwif->INB(hwif->io_ports[IDE_HCYL_OFFSET]);
 	}
 }
 
@@ -448,7 +454,8 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
 		if (err == ABRT_ERR) {
 			if (drive->select.b.lba &&
 			    /* some newer drives don't support WIN_SPECIFY */
-			    hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY)
+			    hwif->INB(hwif->io_ports[IDE_COMMAND_OFFSET]) ==
+				WIN_SPECIFY)
 				return ide_stopped;
 		} else if ((err & BAD_CRC) == BAD_CRC) {
 			/* UDMA crc error, just retry the operation */
@@ -500,7 +507,8 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
 
 	if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
 		/* force an abort */
-		hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
+		hwif->OUTB(WIN_IDLEIMMEDIATE,
+			   hwif->io_ports[IDE_COMMAND_OFFSET]);
 
 	if (rq->errors >= ERROR_MAX) {
 		ide_kill_rq(drive, rq);
drivers/ide/ide-iops.c +50 -36

182 lines not on this page · raw message

drivers/ide/ide-pnp.c +1 -1
index c14bb53..34c2ad3 100644
@@ -62,7 +62,7 @@ static void idepnp_remove(struct pnp_dev * dev)
 	ide_hwif_t *hwif = pnp_get_drvdata(dev);
 
 	if (hwif)
-		ide_unregister(hwif->index, 0, 0);
+		ide_unregister(hwif->index);
 	else
 		printk(KERN_ERR "idepnp: Unable to remove device, please report.\n");
 }
drivers/ide/ide-probe.c +113 -21

263 lines not on this page · raw message

drivers/ide/ide-proc.c +2 -17
index bab88ca..edd7f18 100644
@@ -46,9 +46,6 @@ static int proc_ide_read_imodel
 	int		len;
 	const char	*name;
 
-	/*
-	 * Neither ide_unknown nor ide_forced should be set at this point.
-	 */
 	switch (hwif->chipset) {
 		case ide_generic:	name = "generic";	break;
 		case ide_pci:		name = "pci";		break;
@@ -764,27 +761,16 @@ void ide_proc_port_register_devices(ide_hwif_t *hwif)
 	}
 }
 
-static void destroy_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
+void ide_proc_unregister_device(ide_drive_t *drive)
 {
 	if (drive->proc) {
 		ide_remove_proc_entries(drive->proc, generic_drive_entries);
 		remove_proc_entry(drive->name, proc_ide_root);
-		remove_proc_entry(drive->name, hwif->proc);
+		remove_proc_entry(drive->name, drive->hwif->proc);
 		drive->proc = NULL;
 	}
 }
 
-static void destroy_proc_ide_drives(ide_hwif_t *hwif)
-{
-	int	d;
-
-	for (d = 0; d < MAX_DRIVES; d++) {
-		ide_drive_t *drive = &hwif->drives[d];
-		if (drive->proc)
-			destroy_proc_ide_device(hwif, drive);
-	}
-}
-
 static ide_proc_entry_t hwif_entries[] = {
 	{ "channel",	S_IFREG|S_IRUGO,	proc_ide_read_channel,	NULL },
 	{ "mate",	S_IFREG|S_IRUGO,	proc_ide_read_mate,	NULL },
@@ -816,7 +802,6 @@ EXPORT_SYMBOL_GPL(ide_pci_create_host_proc);
 void ide_proc_unregister_port(ide_hwif_t *hwif)
 {
 	if (hwif->proc) {
-		destroy_proc_ide_drives(hwif);
 		ide_remove_proc_entries(hwif->proc, hwif_entries);
 		remove_proc_entry(hwif->name, proc_ide_root);
 		hwif->proc = NULL;
drivers/ide/ide-scan-pci.c +2 -7
index 93d2e41..98888da 100644
@@ -88,13 +88,8 @@ static int __init ide_scan_pcibus(void)
 	struct list_head *l, *n;
 
 	pre_init = 0;
-	if (!ide_scan_direction)
-		while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)))
-			ide_scan_pcidev(dev);
-	else
-		while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID,
-						     dev)))
-			ide_scan_pcidev(dev);
+	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)))
+		ide_scan_pcidev(dev);
 
 	/*
 	 *	Hand the drivers over to the PCI layer now we
drivers/ide/ide-tape.c +250 -286

427 lines not on this page · raw message

drivers/ide/ide-taskfile.c +16 -13
index 4c86a8d..155cc90 100644

Lines of this file are not shown. View the raw message.

drivers/ide/ide.c +95 -324

419 lines not on this page · raw message

drivers/ide/legacy/Makefile +1 -0
index 7043ec7..6939329 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/ali14xx.c +12 -0
index d4d1a6b..bc8b1f8 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/dtc2278.c +12 -0
index 73396f7..5f69cd2 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/ht6560b.c +19 -6
index 78ca68e..88fe907 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/ide-4drives.c new file +50 -0

50 lines not on this page · raw message

drivers/ide/legacy/ide-cs.c +4 -4
index 15ccf69..9a23b94 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/ide_platform.c +1 -1
index 688fcae..249651e 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/qd65xx.c +17 -2
index 2f4f47a..7016bdf 100644

Lines of this file are not shown. View the raw message.

drivers/ide/legacy/umc8672.c +12 -0
index 5696ba0..bc19448 100644

Lines of this file are not shown. View the raw message.

drivers/ide/mips/au1xxx-ide.c +1 -4
index 85c016b..9b62824 100644

Lines of this file are not shown. View the raw message.

drivers/ide/pci/cmd640.c +18 -16
index 29fbc5e..a1cfe03 100644

Lines of this file are not shown. View the raw message.

drivers/ide/pci/delkin_cb.c +4 -4
index 3f9cd64..961698d 100644

Lines of this file are not shown. View the raw message.

drivers/ide/pci/hpt366.c +1 -60

61 lines not on this page · raw message

drivers/ide/pci/ns87415.c +4 -0
index bf0d3b2..7551332 100644

Lines of this file are not shown. View the raw message.

drivers/ide/pci/scc_pata.c +52 -18

70 lines not on this page · raw message

drivers/ide/pci/sgiioc4.c +9 -11
index 0546264..9d1a303 100644

Lines of this file are not shown. View the raw message.

drivers/ide/pci/siimage.c +0 -43

43 lines not on this page · raw message

drivers/ide/pci/sl82c105.c +4 -0
index ee261ae..1f00251 100644

Lines of this file are not shown. View the raw message.

drivers/ide/pci/tc86c001.c +0 -36
index 2ef2ed2..1e4a626 100644

Lines of this file are not shown. View the raw message.

drivers/ide/ppc/mpc8xx.c +22 -64

86 lines not on this page · raw message

drivers/ide/ppc/pmac.c +15 -89

104 lines not on this page · raw message

drivers/ide/setup-pci.c +1 -19
index 634e3f6..f7ede0e 100644

Lines of this file are not shown. View the raw message.

drivers/macintosh/mediabay.c +7 -10
index bd8a1d1..82add26 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ide-scsi.c +90 -113

203 lines not on this page · raw message

include/asm-alpha/ide.h +0 -11
index b7bf68d..f44129a 100644

Lines of this file are not shown. View the raw message.

include/asm-arm/ide.h +0 -8
index f348fcf..88f4d23 100644

Lines of this file are not shown. View the raw message.

include/asm-blackfin/ide.h +0 -4
index 121e272..5b88de1 100644

Lines of this file are not shown. View the raw message.

include/asm-ia64/ide.h +0 -10
index 1ccf238..8fa3f8c 100644

Lines of this file are not shown. View the raw message.

include/asm-m32r/ide.h +0 -10
index 5d2044e..1e7f647 100644

Lines of this file are not shown. View the raw message.

include/asm-mips/mach-generic/ide.h +0 -10
index 4ec2b93..0f6c251 100644

Lines of this file are not shown. View the raw message.

include/asm-parisc/ide.h +0 -2
index be8760f..db0c944 100644

Lines of this file are not shown. View the raw message.

include/asm-powerpc/ide.h +32 -25

57 lines not on this page · raw message

include/asm-powerpc/mediabay.h +5 -1
index de83fe1..df111c3 100644

Lines of this file are not shown. View the raw message.

include/asm-sh/ide.h +0 -3
index 9f8e914..58e0bdd 100644

Lines of this file are not shown. View the raw message.

include/asm-sparc/ide.h +0 -2
index 4076cb5..afd1736 100644

Lines of this file are not shown. View the raw message.

include/asm-sparc64/ide.h +0 -2
index ac7eb21..c5fdabe 100644

Lines of this file are not shown. View the raw message.

include/asm-x86/ide.h +0 -10
index c2552d8..cf9c98e 100644

Lines of this file are not shown. View the raw message.

include/linux/hdreg.h +3 -1
index e38e759..c37e924 100644

Lines of this file are not shown. View the raw message.

include/linux/ide.h +103 -71

174 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.