linux/drivers/ide
Bartlomiej Zolnierkiewicz 795d74b51a ide: don't try to unregister interfaces if 'initializing' in ide_register_hw()
Host drivers using ide_register_hw() and 'initializing == 1':

* ide-pnp
  - depends on ISA

* ide_arm 
  - ARM arch specific
  - initialized before all other host drivers

* ide-cris
  - CRIS arch specific => IDE_ARCH_OBSOLETE_INIT is not defined
  - broken

* ide-h8300
  - H8300 arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI

* buddha/q40/gayle/macide/falconide
  - M68K arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI

Since the only host drivers which probe interfaces before the above ones are:

* ali14xx/dtc2278/ht6560b/qd65xx/umc8672
  - depend on ISA
  - require IDE_ARCH_OBSOLETE_INIT=y to work

* PCI ones
  - depend on PCI

don't try to unregister interfaces if 'initializing == 1' in ide_register_hw()
(it is possible that built-in host drivers will claim all IDE interfaces but
later ide-pnp host driver will try to unregister them - this change fixes it).

Also skip hwif->hold check if 'initializing == 1' since it is set only by:

* pmac
  - PPC && PMAC specific => no ISA

* au1xxx-ide
  - MIPS && SOC_AU1200 specific => no ISA

and use ide_find_port() helper to find free ide_hwifs[] slot.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26 20:13:03 +01:00
..
arm ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
cris ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
h8300 icside: use ec->dma directly 2007-10-20 00:32:32 +02:00
legacy ali14xx: constify __initdata 2007-11-27 21:35:57 +01:00
mips ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
pci ide: merge ->fixup and ->quirkproc methods 2008-01-26 20:13:03 +01:00
ppc ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
ide-acpi.c ide: remove unnecessary writes to HOB taskfile registers 2008-01-25 22:17:10 +01:00
ide-cd.c ide: add ide_pktcmd_tf_load() helper 2008-01-25 22:17:13 +01:00
ide-cd.h ide-cd: fix SAMSUNG CD-ROM SCR-3231 quirk 2007-12-24 15:23:43 +01:00
ide-disk.c ide: dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined) 2008-01-26 20:13:03 +01:00
ide-dma.c ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
ide-floppy.c ide: add ide_pktcmd_tf_load() helper 2008-01-25 22:17:13 +01:00
ide-generic.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
ide-io.c ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
ide-iops.c ide: merge ->dma_host_{on,off} methods into ->dma_host_set method 2008-01-26 20:13:03 +01:00
ide-lib.c ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag 2008-01-25 22:17:18 +01:00
ide-pnp.c icside: use ec->dma directly 2007-10-20 00:32:32 +02:00
ide-probe.c ide: merge ->fixup and ->quirkproc methods 2008-01-26 20:13:03 +01:00
ide-proc.c ide: add ide_device_add() 2007-10-20 00:32:31 +02:00
ide-tape.c ide: add ide_pktcmd_tf_load() helper 2008-01-25 22:17:13 +01:00
ide-taskfile.c ide: dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined) 2008-01-26 20:13:03 +01:00
ide-timing.h ide: remove ide_find_best_pio_mode() 2007-07-20 01:11:58 +02:00
ide.c ide: don't try to unregister interfaces if 'initializing' in ide_register_hw() 2008-01-26 20:13:03 +01:00
Kconfig ide: remove CONFIG_IDEPCI_SHARE_IRQ config option 2008-01-25 22:17:08 +01:00
Makefile ide: add CONFIG_IDE_H8300 config option 2007-11-27 21:35:54 +01:00
setup-pci.c ide: merge ->fixup and ->quirkproc methods 2008-01-26 20:13:03 +01:00