1. 27 1月, 2008 11 次提交
    • B
      ide: remove broken disk byte-swapping support · 9e47be0c
      Bartlomiej Zolnierkiewicz 提交于
      Remove broken disk byte-swapping support:
      - it can cause a data corruption on SMP (or if using PREEMPT on UP)
      - all data coming from disk are byte-swapped by taskfile_*_data() which
        results in incorrect identify data being reported by /proc/ide/ and IOCTLs
      - "hdx=bswap/byteswap" kernel parameter has been broken on m68k host drivers
        (including Atari/Q40 ones) since 2.5.x days (because of 'hwif' zero-ing)
      - byte-swapping is limited to PIO transfers (for working with TiVo disks on
        x86 machines using user-space solutions or dm-byteswap should result in
        much better performance because DMA can be used)
      
      For previous discussions please see:
      
      http://www.ussg.iu.edu/hypermail/linux/kernel/0201.0/0768.html
      http://lkml.org/lkml/2004/2/28/111
      
      [ I have dm-byteswap device mapper target if somebody is interested
        (patch is for 2.6.4 though but I'll dust it off if needed). ]
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9e47be0c
    • B
      ide: add ide_set_irq() inline helper · 81ca6919
      Bartlomiej Zolnierkiewicz 提交于
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      81ca6919
    • B
      ide: make remaining built-in only IDE host drivers modular (take 2) · ade2daf9
      Bartlomiej Zolnierkiewicz 提交于
      * Make remaining built-in only IDE host drivers modular, add ide-scan-pci.c
        file for probing PCI host drivers registered with IDE core (special case
        for built-in IDE and CONFIG_IDEPCI_PCIBUS_ORDER=y) and then take care of
        the ordering in which all IDE host drivers are probed when IDE is built-in
        during link time.
      
      * Move probing of gayle, falconide, macide, q40ide and buddha (m68k arch
        specific) host drivers, before PCI ones (no PCI on m68k), ide-cris (cris
        arch specific), cmd640 (x86 arch specific) and pmac (ppc arch specific).
      
      * Move probing of ide-cris (cris arch specific) host driver before cmd640
        (x86 arch specific).
      
      * Move probing of mpc8xx (ppc specific) host driver before ide-pnp (depends
        on ISA and none of ppc platform that use mpc8xx supports ISA) and ide-h8300
        (h8300 arch specific).
      
      * Add "probe_vlb" kernel parameter to cmd640 host driver and update
        Documentation/ide.txt accordingly.
      
      * Make IDE_ARM config option visible so it can also be disabled if needed.
      
      * Remove bogus comment from ide.c while at it.
      
      v2:
      * Fix two issues spotted by Sergei:
        - replace ENOMEM error value by ENOENT in ide-h8300 host driver
        - fix MODULE_PARM_DESC() in cmd640 host driver
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ade2daf9
    • B
      ide: drop 'initializing' argument from ide_register_hw() · cbb010c1
      Bartlomiej Zolnierkiewicz 提交于
      * Rename init_hwif_data() to ide_init_port_data() and export it.
      
      * For all users of ide_register_hw() with 'initializing' argument set
        hwif->present and hwif->hold are always zero so convert these host
        drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw()
        instead (also no need for init_hwif_default() call since the setup
        done by it gets over-ridden by ide_init_port_hw() call).
      
      * Drop 'initializing' argument from ide_register_hw().
      
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      cbb010c1
    • B
      ide: add ide_init_port_hw() helper · 57c802e8
      Bartlomiej Zolnierkiewicz 提交于
      * Add ide_init_port_hw() helper.
      
      * rapide.c: convert rapide_locate_hwif() to rapide_setup_ports()
        and use ide_init_port_hw().
      
      * ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports()
        and use ide_init_port_hw().
      
      * sgiioc4.c: use ide_init_port_hw().
      
      * pmac.c: add 'hw_regs_t *hw' argument to pmac_ide_setup_device(),
        setup 'hw' in pmac_ide_{macio,pci}_attach() and use ide_init_port_hw()
        in pmac_ide_setup_device().
      
      This patch is a preparation for the future changes in the IDE probing code.
      
      There should be no functionality changes caused by this patch.
      
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
      Cc: Jeremy Higdon <jeremy@sgi.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      57c802e8
    • O
      ide: Fix build break caused by "ide: remove ideprobe_init()" · b0d5bc27
      Olof Johansson 提交于
      Fix build break of powerpc holly_defconfig:
      
      In file included from arch/powerpc/platforms/embedded6xx/holly.c:24:
      include/linux/ide.h:1206: error: 'CONFIG_IDE_MAX_HWIFS' undeclared here (not in a function)
      
      There's no need to have a sized array in the prototype, might as well
      turn it into a pointer.
      
      It could probably be argued that large parts of the include file can be
      covered under #ifdef CONFIG_IDE, but that's a larger undertaking.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b0d5bc27
    • B
      ide: remove ideprobe_init() · 151575e4
      Bartlomiej Zolnierkiewicz 提交于
      * Rename ide_device_add() to ide_device_add_all() and make it accept
        'u8 idx[MAX_HWIFS]' instead of 'u8 idx[4]' as an argument.
      
      * Add ide_device_add() wrapper for ide_device_add_all().
      
      * Convert ide_generic_init() to use ide_device_add_all().
      
      * Remove no longer needed ideprobe_init().
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      151575e4
    • B
      ide: merge ->fixup and ->quirkproc methods · f01393e4
      Bartlomiej Zolnierkiewicz 提交于
      * Assign drive->quirk_list in ->quirkproc implementations:
        - hpt366.c::hpt3xx_quirkproc()
        - pdc202xx_new.c::pdcnew_quirkproc()
        - pdc202xx_old.c::pdc202xx_quirkproc()
      
      * Make ->quirkproc void.
      
      * Move calling ->quirkproc from do_identify() to probe_hwif().
      
      * Convert it821x_fixups() to it821x_quirkproc() in it821x.c.
      
      * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove
        no longer needed drive->present check from is_dev_seagate_sata().
      
      * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif'
        as an argument.  Then convert ide_register_hw() to accept 'quirkproc'
        argument instead of 'fixup' one.
      
      * Remove no longer needed ->fixup method.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f01393e4
    • B
      ide: merge ->dma_host_{on,off} methods into ->dma_host_set method · 15ce926a
      Bartlomiej Zolnierkiewicz 提交于
      Merge ->dma_host_{on,off} methods into ->dma_host_set method
      which takes 'int on' argument.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      15ce926a
    • B
      ide: remove ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_t · 4a546e04
      Bartlomiej Zolnierkiewicz 提交于
      * Make ide_dma_off_quietly() and __ide_dma_on() always available.
      
      * Drop "__" prefix from __ide_dma_on().
      
      * Check for presence of ->dma_host_on instead of ->ide_dma_on.
      
      * Convert all users of ->ide_dma_on and ->dma_off_quietly methods
        to use ide_dma_on() and ide_dma_off_quietly() instead.
      
      * Remove no longer needed ->ide_dma_on and ->dma_off_quietly methods
        from ide_hwif_t.
      
      * Make ide_dma_on() void.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4a546e04
    • B
      cy82c693: add ->set_dma_mode method · 8704de8f
      Bartlomiej Zolnierkiewicz 提交于
      * Fix SWDMA/MWDMA masks in cy82c693_chipset.
      
      * Add IDE_HFLAG_CY82C693 host flag and use it in ide_tune_dma() to
        check whether the DMA should be enabled even if ide_max_dma_mode()
        fails.
      
      * Convert cy82c693_dma_enable() to become cy82c693_set_dma_mode()
        and remove no longer needed cy82c693_ide_dma_on().  Then set
        IDE_HFLAG_CY82C693 instead of IDE_HFLAG_TRUST_BIOS_FOR_DMA in
        cy82c693_chipset.
      
      * Bump driver version.
      
      As a result of this patch cy82c693 driver will configure and use DMA on
      all SWDMA0-2 and MWDMA0-2 capable ATA devices instead of relying on BIOS.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8704de8f
  2. 26 1月, 2008 29 次提交