1. 06 7月, 2008 1 次提交
    • B
      ide: fix hwif->gendev refcounting · 7cd95f56
      Bartlomiej Zolnierkiewicz 提交于
      class->dev_release is called by device_release() iff dev->release
      is not present so ide_port_class_release() is never called and the
      last hwif->gendev reference is not dropped.
      
      Fix it by removing ide_port_class_release() and get_device() call
      from ide_register_port() (device_create_drvdata() takes a hwif->gendev
      reference anyway).
      
      This patch fixes hang on wait_for_completion(&hwif->gendev_rel_comp)
      in ide_unregister() reported by Pavel Machek.
      
      Cc: Pavel Machek <pavel@suse.cz>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7cd95f56
  2. 29 4月, 2008 1 次提交
  3. 27 4月, 2008 21 次提交
  4. 26 4月, 2008 5 次提交
  5. 18 4月, 2008 12 次提交
    • B
      ide: move default IDE ports setup to ide_generic host driver · 486c92e2
      Bartlomiej Zolnierkiewicz 提交于
      * Make CONFIG_IDE_GENERIC depended on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS.
      
      * Move default IDE ports setup from init_ide_data() to ide_generic.
      
      * Use ide_init_port_hw() in ide_generic.
      
      * Remove no longer needed CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      486c92e2
    • B
      ide: remove obsoleted "idex=noprobe" kernel parameter (take 2) · f01674e4
      Bartlomiej Zolnierkiewicz 提交于
      * Remove obsoleted "idex=noprobe" kernel parameter.
      
      * Remove no longer needed hwif->noprobe quirk from ide_hwif_configure()
        and hwif->noprobe checking from cmd640.c.
      
      v2:
      * "ide?=noprobe" -> "ide?=ata66" in Documentation/kernel-parameters.txt.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f01674e4
    • B
      ide: add ide-4drives host driver (take 3) · ffd4f6f0
      Bartlomiej Zolnierkiewicz 提交于
      CONFIG_BLK_DEV_4DRIVES deserves its own host driver:
      
      * Add drivers/ide/legacy/ide-4drives.c and move "4drives" support there.
      
      * Add ide-4drives.o in the link order after all other legacy host
        drivers enabled by "ide0=" options (they all are mutually exclusive).
      
      * Make ide-4drives host driver probe itself for IDE devices instead of
        indirectly depending on ide_generic host driver.
      
      * Add "probe" module parameter to ide-4drives and update documentation.
      
      v2:
      * s/paramater/parameter/ in ide.txt. (Noticed by Randy Dunlap)
      
      v3:
      * s/ide_4drives.probe/ide-4drives.probe/ in help entry.
        (Noticed by Sergei Shtylyov)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ffd4f6f0
    • B
      ide: remove ppc ifdef from init_ide_data() · 26d799b7
      Bartlomiej Zolnierkiewicz 提交于
      On PPC32 ide_init_default_irq() is non-zero only for PPLUS and PPC_PREP
      (the latter marked as BROKEN currently) so this ifdef can be removed.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      26d799b7
    • B
      ide: remove ide_default_io_ctl() macro · 9dfcd15a
      Bartlomiej Zolnierkiewicz 提交于
      It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
      and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9dfcd15a
    • B
      ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT · 5c504270
      Bartlomiej Zolnierkiewicz 提交于
      * Use CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS instead of
        CONFIG_IDE_ARCH_OBSOLETE_INIT in init_ide_data().
      
      * Remove no longer needed CONFIG_IDE_ARCH_OBSOLETE_INIT.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5c504270
    • B
      ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2) · 0e33555f
      Bartlomiej Zolnierkiewicz 提交于
      * Add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS to drivers/ide/Kconfig and use
        it instead of defining IDE_ARCH_OBSOLETE_DEFAULTS in <arch/ide.h>.
      
      v2:
      * Define ide_default_irq() in ide-probe.c/ns87415.c if not already defined
        and drop defining ide_default_irq() for CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=n.
      
        [ Thanks to Stephen Rothwell and David Miller for noticing the problem. ]
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0e33555f
    • B
      ppc: remove ppc_ide_md · 1d850bd0
      Bartlomiej Zolnierkiewicz 提交于
      * Add special cases for pplus and prep to ide_default_{irq,io_base}()
        (+ FIXMEs about the need to use IDE platform host driver instead).
      
      * Remove no longer needed ppc_ide_md and struct ide_machdep_calls.
      
      * Then remove <linux/ide.h> include from:
        - arch/powerpc/kernel/setup_32.c
        - arch/ppc/kernel/ppc_ksyms.c
        - arch/ppc/kernel/setup.c
        - arch/ppc/platforms/pplus.c
        - arch/ppc/platforms/prep_setup.c
      
      There should be no functional changes caused by this patch.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1d850bd0
    • B
      ppc/pplus: remove ppc_ide_md.ide_init_hwif hook · 5d682e44
      Bartlomiej Zolnierkiewicz 提交于
      * Call ide_init_default_irq() for pplus in init_ide_data().
      
      * Remove no longer needed pplus_ide_init_hwif_ports().
      
      There should be no functional changes caused by this patch.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5d682e44
    • B
      ide: remove ide_init_hwif_ports() · e6bfa38a
      Bartlomiej Zolnierkiewicz 提交于
      ide_init_hwif_ports() is only used by init_ide_data() now, inline it there.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e6bfa38a
    • B
      ide: remove init_hwif_default() · 05734266
      Bartlomiej Zolnierkiewicz 提交于
      init_hwif_default() is only used by init_ide_data() now, inline it there.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      05734266
    • B
      ide: remove broken/dangerous HDIO_[UNREGISTER,SCAN]_HWIF ioctls (take 3) · 93de00fd
      Bartlomiej Zolnierkiewicz 提交于
      hdparm explicitely marks HDIO_[UNREGISTER,SCAN]_HWIF ioctls as DANGEROUS
      and given the number of bugs we can assume that there are no real users:
      
      * DMA has no chance of working because DMA resources are released by
        ide_unregister() and they are never allocated again.
      
      * Since ide_init_hwif_ports() is used for ->io_ports[] setup the ioctls
        don't work for almost all hosts with "non-standard" (== non ISA-like)
        layout of IDE taskfile registers (there is a lot of such host drivers).
      
      * ide_port_init_devices() is not called when probing IDE devices so:
        - drive->autotune is never set and IDE host/devices are not programmed
          for the correct PIO/DMA transfer modes (=> possible data corruption)
        - host specific I/O 32-bit and IRQ unmasking settings are not applied
          (=> possible data corruption)
        - host specific ->port_init_devs method is not called (=> no luck with
          ht6560b, qd65xx and opti621 host drivers)
      
      * ->rw_disk method is not preserved (=> no HPT3xxN chipsets support).
      
      * ->serialized flag is not preserved (=> possible data corruption when
         using icside, aec62xx (ATP850UF chipset), cmd640, cs5530, hpt366
         (HPT3xxN chipsets), rz1000, sc1200, dtc2278 and ht6560b host drivers).
      
      * ->ack_intr method is not preserved (=> needed by ide-cris, buddha,
        gayle and macide host drivers).
      
      * ->sata_scr[] and sata_misc[] is cleared by ide_unregister() and it
        isn't initialized again (SiI3112 support needs them).
      
      * To issue an ioctl() there need to be at least one IDE device present
        in the system.
      
      * ->cable_detect method is not preserved + it is not called when probing
        IDE devices so cable detection is broken (however since DMA support is
        also broken it doesn't really matter ;-).
      
      * Some objects which may have already been freed in ide_unregister()
        are restored by ide_hwif_restore() (i.e. ->hwgroup).
      
      * ide_register_hw() may unregister unrelated IDE ports if free ide_hwifs[]
        slot cannot be found.
      
      * When IDE host drivers are modular unregistered port may be re-used by
        different host driver that owned it first causing subtle bugs.
      
      Since we now have a proper warm-plug support remove these ioctls,
      then remove no longer needed:
      - ide_register_hw() and ide_hwif_restore() functions
      - 'init_default' and 'restore' arguments of ide_unregister()
      - zeroeing of hwif->{dma,extra}_* fields in ide_unregister()
      
      As an added bonus IDE core code size shrinks by ~3kB (x86-32).
      
      v2:
      * fix ide_unregister() arguments in cleanup_module() (Andrew Morton).
      
      v3:
      * fix ide_unregister() arguments in palm_bk3710.c.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      93de00fd