1. 17 4月, 2008 1 次提交
  2. 03 2月, 2008 2 次提交
  3. 02 2月, 2008 2 次提交
  4. 27 1月, 2008 1 次提交
    • 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
  5. 14 11月, 2007 1 次提交
  6. 20 10月, 2007 3 次提交
  7. 19 10月, 2007 5 次提交
  8. 17 10月, 2007 3 次提交
    • B
      ide: remove hwif->autodma and drive->autodma · 9ff6f72f
      Bartlomiej Zolnierkiewicz 提交于
      * hpt34x.c: disable DMA masks for HPT345
        (hwif->autodma is zero so DMA won't be enabled anyway).
      
      * trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag
        (hwif->autodma is zero so DMA won't be enabled anyway).
      
      * Check noautodma global variable instead of drive->autodma in ide_tune_dma().
      
        This fixes handling of "ide=nodma" kernel parameter for icside, ide-cris,
        au1xxx-ide, pmac, it821x, jmicron, sgiioc4 and siimage host drivers.
      
      * Remove hwif->autodma (it was not checked by IDE core code anyway) and
        drive->autodma (was set by all host drivers - except HPT345/TRM290 special
        cases - unless "ide=nodma" was used).
      
      While at it:
      - remove needless printk() from icside.c
      - remove stale FIXME/comment from ide-probe.c
      - don't force DMA off if PCI bus-mastering had to be enabled in setup-pci.c
        (this setting was always later over-ridden by host drivers anyway)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9ff6f72f
    • B
      ide: use PCI_VDEVICE() macro · 9cbcc5e3
      Bartlomiej Zolnierkiewicz 提交于
      While at it:
      - make struct pci_device_id tables const
      - use PCI_DEVICE_ID_ITE_8213 define in it8213.c
      - fix comment in generic.c
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9cbcc5e3
    • B
      ide: remove ->ide_dma_check (take 2) · 0ae2e178
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_TRUST_BIOS_FOR_DMA host flag for host drivers that depend
        on BIOS for programming device/controller for DMA.  Set it in cy82c693,
        generic, ns87415, opti621 and trm290 host drivers.
      
      * Add IDE_HFLAG_VDMA host flag for host drivers using VDMA.  Set it in cs5520
        host driver.
      
      * Teach ide_tune_dma() about IDE_HFLAG_TRUST_BIOS_FOR_DMA flag.
      
      * Add generic ide_dma_check() helper and remove all open coded ->ide_dma_check
        implementations.  Fix all places checking for presence of ->ide_dma_check
        hook to check for ->ide_dma_on instead.
      
      * Remove no longer needed code from config_drive_for_dma().
      
      * Make ide_tune_dma() static.
      
      v2:
      * Fix config_drive_for_dma() return values.
      
      * Fix ide-dma.c build for CONFIG_BLK_DEV_IDEDMA_PCI=n by adding
        dummy config_drive_for_dma() inline.
      
      * Fix IDE_HFLAG_TRUST_BIOS_FOR_DMA handling in ide_dma_check().
      
      * Fix init_hwif_it8213() comment.
      
      There should be no functionality changes caused by this patch.
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0ae2e178
  9. 13 10月, 2007 1 次提交
    • B
      ide: move ide_config_drive_speed() calls to upper layers (take 2) · 88b2b32b
      Bartlomiej Zolnierkiewicz 提交于
      * Convert {ide_hwif_t,ide_pci_device_t}->host_flag to be u16.
      
      * Add IDE_HFLAG_POST_SET_MODE host flag to indicate the need to program 
        the host for the transfer mode after programming the device.  Set it
        in au1xxx-ide, amd74xx, cs5530, cs5535, pdc202xx_new, sc1200, pmac
        and via82cxxx host drivers.
      
      * Add IDE_HFLAG_NO_SET_MODE host flag to indicate the need to completely
        skip programming of host/device for the transfer mode ("smart" hosts).
        Set it in it821x host driver and check it in ide_tune_dma().
      
      * Add ide_set_pio_mode()/ide_set_dma_mode() helpers and convert all
        direct ->set_pio_mode/->speedproc users to use these helpers.
      
      * Move ide_config_drive_speed() calls from ->set_pio_mode/->speedproc
        methods to callers.
      
      * Rename ->speedproc method to ->set_dma_mode, make it void and update
        all implementations accordingly.
      
      * Update ide_set_xfer_rate() comments.
      
      * Unexport ide_config_drive_speed().
      
      v2:
      * Fix issues noticed by Sergei:
        - export ide_set_dma_mode() instead of moving ->set_pio_mode abuse wrt
          to setting DMA modes from sc1200_set_pio_mode() to do_special()
        - check IDE_HFLAG_NO_SET_MODE in ide_tune_dma()
        - check for (hwif->set_pio_mode) == NULL in ide_set_pio_mode()
        - check for (hwif->set_dma_mode) == NULL in ide_set_dma_mode()
        - return -1 from ide_set_{pio,dma}_mode() if ->set_{pio,dma}_mode == NULL
        - don't set ->set_{pio,dma}_mode on it821x in "smart" mode
        - fix build problem in pmac.c
        - minor fixes in au1xxx-ide.c/cs5530.c/siimage.c
        - improve patch description
      
      Changes in behavior caused by this patch:
      - HDIO_SET_PIO_MODE ioctl would now return -ENOSYS for attempts to change
        PIO mode if it821x controller is in "smart" mode
      - removal of two debugging printk-s (from cs5530.c and sc1200.c)
      - transfer modes 0x00-0x07 passed from user space may be programmed twice on
        the device (not really an issue since 0x00 is not supported correctly by
        any host driver ATM, 0x01 is not supported at all and 0x02-0x07 are invalid)
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      88b2b32b
  10. 12 10月, 2007 3 次提交
    • B
      ide: use only ->set_pio_mode method for programming PIO modes (take 2) · 8f4dd2e4
      Bartlomiej Zolnierkiewicz 提交于
      Use ->set_pio_mode method to program PIO modes in ide_set_xfer_rate()
      (the only place which used ->speedproc to program PIO modes) and remove
      handling of PIO modes from all ->speedproc implementations.
      
      v2:
      * Fix pmac_ide_tune_chipset() comment.
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8f4dd2e4
    • B
      ide: add ide_set{_max}_pio() (take 4) · 26bcb879
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_ABUSE_{PREFETCH,FAST_DEVSEL,DMA_MODES} flags
        and set them in ht6560, cmd640, cmd64x and sc1200 host drivers.
      
      * Add set_pio_mode_abuse() for checking if host driver has a non-standard
        ->tuneproc() implementation and use it in do_special().
      
      * Add ide_set_pio() for setting PIO mode (it uses hwif->pio_mask to find
        the maximum PIO mode supported by the host), also add ide_set_max_pio()
        wrapper for ide_set_pio() to use for auto-tuning.  Convert users of
        ->tuneproc to use ide_set{_max}_pio() where possible.  This leaves only
        do_special(), set_using_pio(), ide_hwif_restore() and ide_set_pio() as
        a direct users of ->tuneproc.
      
      * Remove no longer needed ide_get_best_pio_mode() calls and printk-s
        reporting PIO mode selected from ->tuneproc implementations.
      
      * Rename ->tuneproc hook to ->set_pio_mode and make 'pio' argument const.
      
      * Remove stale comment from ide_config_drive_speed().
      
      v2:
      * Fix "ata_" prefix (Noticed by Jeff).
      
      v3:
      * Minor cleanups/fixups per Sergei's suggestions.
      
      v4:
      * Fix compile problem in drivers/ide/pci/cmd640.c
        (Noticed by Andrew Morton).
      
      * Improve some ->set_pio_mode comments.
      Reviewed-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      26bcb879
    • B
      ide: move ide_rate_filter() calls to the upper layer (take 2) · f212ff28
      Bartlomiej Zolnierkiewicz 提交于
      * Move ide_rate_filter() calls from host drivers to IDE core.
      
      * Make ide_rate_filter() static.
      
      * Make 'speed' argument of ->speedproc const.
      
      v2:
      * Fix it8213_tune_chipset() comment.
      
      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>
      f212ff28
  11. 20 7月, 2007 3 次提交
  12. 10 7月, 2007 1 次提交
    • B
      ide: add short cables support · 49521f97
      Bartlomiej Zolnierkiewicz 提交于
      This patch allows users to override both host and device side cable detection
      with "ideX=ata66" kernel parameter.  Thanks to this it should be now possible
      to use UDMA > 2 modes on systems (laptops mainly) which use short 40-pin cable
      instead of 80-pin one.
      
      Next patches add automatic detection of some systems using short cables.
      
      Changes:
      
      * Rename hwif->udma_four to hwif->cbl and make it u8.
      
      * Convert all existing users accordingly (use ATA_CBL_* defines while at it).  
      
      * Add ATA_CBL_PATA40_SHORT support to ide-iops.c:eighty_ninty_three().
      
      * Use ATA_CBL_PATA40_SHORT for "ideX=ata66" kernel parameter.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Reviewed-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      49521f97
  13. 04 7月, 2007 1 次提交
  14. 08 6月, 2007 1 次提交
    • B
      it821x: RAID mode fixes · 0380dad4
      Bartlomiej Zolnierkiewicz 提交于
      The DMA support for RAID mode broke after:
      
      	commit 71ef51cc
      	Author: Jens Axboe <axboe@suse.de>
      	Date:   Fri Jul 28 09:02:17 2006 +0200
      
      	    [PATCH] it821x: fix ide dma setup bug
      
      	    Only enable dma for a valid speed setting.
      
      	    Signed-off-by: Jens Axboe <axboe@suse.de>
      
      	commit 0a8348d0
      	Author: Jens Axboe <axboe@suse.de>
      	Date:   Fri Jul 28 08:58:26 2006 +0200
      
      	    [PATCH] ide: if the id fields looks screwy, disable DMA
      
      	    It's the safer choice. Originally due to a bug in itx821x, but a
      	    generally sound thing to do.
      
      	    Signed-off-by: Jens Axboe <axboe@suse.de>
      
      However it worked by pure luck before Jens' fixes: bogus ide_dma_enable()
      usage in it821x driver combined with loosy check in ide_dma_verbose() allowed
      the hardware to operate in DMA mode.  When these problems were fixed the DMA
      support broke...
      
      The source root for the regression turned out to be that the it821x.c code
      was clearing too much of id->field_valid.  The IDE core code was using the
      original value of id->field_valid to do the tuning but later DMA got disabled
      in ide_dma_verbose() because of the incorrect id->field_valid fixup.  Fix it.
      
      While at it:
      
      * Do fixup() after probing the drives but before tuning them (which is also
        OK w.r.t. ide_undecoded_slave() fixup).  This change fixes device IDENTIFY
        data to be consistent before/after the tuning and allows us to remove extra
        re-tuning of drives from it821x_fixups().
      
      * Fake MWDMA0 enabled/supported bits in IDENTIFY data if the device has
        DMA capable bit set (this is just to tell the IDE core that DMA is
        supported since it821x firmware takes care of DMA mode programming).
      
      * Don't touch timing registers and don't program transfer modes on devices
        et all when in RAID mode - depend solely on firmware to do the tuning
        (as suggested by Alan Cox and done in libata pata_it821x driver).
      
      Thanks for testing the patch goes out to Thomas Kuther.
      
      Cc: Thomas Kuther <gimpel@sonnenkinder.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Jens Axboe <axboe@suse.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0380dad4
  15. 16 5月, 2007 1 次提交
  16. 10 5月, 2007 1 次提交
    • B
      ide: rework the code for selecting the best DMA transfer mode (v3) · 2d5eaa6d
      Bartlomiej Zolnierkiewicz 提交于
      Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.
      
      * add ide_hwif_t.udma_filter hook for filtering UDMA mask
        (use it in alim15x3, hpt366, siimage and serverworks drivers)
      * add ide_max_dma_mode() for finding best DMA mode for the device
        (loosely based on some older libata-core.c code)
      * convert ide_dma_speed() users to use ide_max_dma_mode()
      * make ide_rate_filter() take "ide_drive_t *drive" as an argument instead
        of "u8 mode" and teach it to how to use UDMA mask to do filtering
      * use ide_rate_filter() in hpt366 driver
      * remove no longer needed ide_dma_speed() and *_ratemask()
      * unexport eighty_ninty_three()
      
      v2:
      * rename ->filter_udma_mask to ->udma_filter
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space
        originated transfer mode change requests when 100MHz clock is used)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2d5eaa6d
  17. 06 5月, 2007 1 次提交
    • B
      it821x: PIO mode setup fixes · 0e9b4e53
      Bartlomiej Zolnierkiewicz 提交于
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to setup PIO5 by it821x_tuneproc() could result in incorrect PIO timings
        + incorrect base clock being set for controller in the passthrough mode
      
      * move code limiting max PIO according to the pair device capabilities from
        config_it821x_chipset_for_pio() to it821x_tuneproc() so the check is also
        applied for mode change requests coming through ->tuneproc and ->speedproc
        interfaces
      
      * set device speed in it821x_tuneproc()
      
      * in it821x_tune_chipset() call it821x_tuneproc() also if the controller is
        in the smart mode (so the check for pair device max PIO is done)
      
      * rename it821x_tuneproc() to it821x_tune_pio(), then add it821x_tuneproc()
        wrapper which does the max PIO mode check;  it worked by the pure luck
        previously, pio[4] and pio_want[4] arrays were used with index == 255
        so random PIO timings and base clock were set for the controller in the
        passthrough mode, thankfully PIO timings and base clock were corrected
        later by config_it821x_chipset_for_pio() call (but it was not called for
        PIO-only devices during resume and for user requested PIO autotuning)
      
      * remove config_it821x_chipset_for_pio() call from config_chipset_for_dma()
        as the driver sets ->autotune to 1 and ->tuneproc does the proper job now
      
      * convert the last user of config_it821x_chipset_for_pio() to use
        it821x_tuneproc(drive, 255) and remove no longer needed function
      
      While at it:
      
      * fix few comments
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0e9b4e53
  18. 17 2月, 2007 2 次提交
    • B
      ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2) · 7469aaf6
      Bartlomiej Zolnierkiewicz 提交于
      * since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0'
        make these functions void and while at it drop "ide_" prefix
      * fix comment for __ide_dma_off_quietly()
      * make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix
      
      v2:
      * while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(),
        sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}()
        and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly()
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7469aaf6
    • B
      ide: add ide_set_dma() helper (v2) · 3608b5d7
      Bartlomiej Zolnierkiewicz 提交于
      * add ide_set_dma() helper and make ide_hwif_t.ide_dma_check return
        -1 when DMA needs to be disabled (== need to call ->ide_dma_off_quietly)
         0 when DMA needs to be enabled  (== need to call ->ide_dma_on)
         1 when DMA setting shouldn't be changed
      * fix IDE code to use ide_set_dma() instead if using ->ide_dma_check directly
      
      v2:
      * updated for scc_pata
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3608b5d7
  19. 28 7月, 2006 1 次提交
  20. 02 7月, 2006 1 次提交
  21. 01 7月, 2006 1 次提交
  22. 04 2月, 2006 1 次提交
  23. 07 11月, 2005 1 次提交
  24. 28 6月, 2005 1 次提交
    • A
      [PATCH] ide: it8212 backport for Bartlomiej IDE · da9091ee
      Alan Cox 提交于
      This lets you throw out the iteraid stuff that has ended up back in due
      to stupid goings on in the IDE world. Its the same heavily tested code
      shipped in Fedora/Red Hat products but without the other dependancies on
      the Bartlomiej IDE layer.
      
      Pre-requisite: the ide-disk patch I sent to handle pure LBA devices.
      
      Obviously you lose things like hot unplug with the Bartlomiej IDE layer
      at the moment but that won't matter to most users.
      
      The patch does the following
      - Add IT8211/12 to pci_ids.h
      - Add Makefile/Kconfig entry
      - Add it8212 driver
      
      No core IDE code is touched by this diff
      
      Embedded system testing and the ability to force raid mode off by David
      Howells
      
      Made possible by the ite reference code, documentation and also several
      clarifications and pieces of assistance provided by ITE themselves
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Acked-by: NBartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      da9091ee