1. 19 1月, 2010 2 次提交
  2. 07 1月, 2009 1 次提交
  3. 22 10月, 2008 1 次提交
  4. 14 10月, 2008 2 次提交
  5. 11 10月, 2008 2 次提交
    • B
      ide: add proper PCI PM support (v2) · feb22b7f
      Bartlomiej Zolnierkiewicz 提交于
      * Keep pointer to ->init_chipset method also in
        struct ide_host and set it in ide_host_alloc_all().
      
      * Add ide_pci_suspend() and ide_pci_resume() helpers
        (default ->suspend and ->resume implementations).
      
      * ->init_chipset can no longer be marked __devinit.
      
      * Add proper PCI PM support to IDE PCI host drivers
        (rz1000.c and tc86c001.c are skipped for now since
        they need to be converted from using ->init_hwif
        to use ->init_chipset instead).
      
      v2:
      * Cleanup CONFIG_PM #ifdef-s per akpm's suggestion.
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      feb22b7f
    • B
      ide: include <linux/hdreg.h> only when needed · 3ceca727
      Bartlomiej Zolnierkiewicz 提交于
      * Include <linux/ata.h> directly in <linux/ide.h>
        instead of through <linux/hdreg.h>.
      
      * Include <linux/hdreg.h> only when needed.
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ceca727
  6. 25 7月, 2008 3 次提交
    • B
      ide: prefix messages from IDE PCI host drivers by driver name · ced3ec8a
      Bartlomiej Zolnierkiewicz 提交于
      Prefix messages from IDE PCI host drivers by driver name instead of marketed
      chipset name (it is still possible to exactly identify the particular chipset
      basing on driver messages).
      
      As a bonus this provides nice code savings for some drivers:
      
         text    data     bss     dec     hex filename
         3826     112       8    3946     f6a drivers/ide/pci/amd74xx.o.before
         2786     112       8    2906     b5a drivers/ide/pci/amd74xx.o.after
          764     108       0     872     368 drivers/ide/pci/cs5520.o.before
          680     108       0     788     314 drivers/ide/pci/cs5520.o.after
         1680     112       4    1796     704 drivers/ide/pci/generic.o.before
         1155     112       4    1271     4f7 drivers/ide/pci/generic.o.after
         7128     792       0    7920    1ef0 drivers/ide/pci/hpt366.o.before
         6984     792       0    7776    1e60 drivers/ide/pci/hpt366.o.after
         2800     148       0    2948     b84 drivers/ide/pci/pdc202xx_new.o.before
         2523     148       0    2671     a6f drivers/ide/pci/pdc202xx_new.o.after
         2831     148       0    2979     ba3 drivers/ide/pci/pdc202xx_old.o.before
         2683     148       0    2831     b0f drivers/ide/pci/pdc202xx_old.o.after
         3776     112       4    3892     f34 drivers/ide/pci/piix.o.before
         2804     112       4    2920     b68 drivers/ide/pci/piix.o.after
         4693     116       0    4809    12c9 drivers/ide/pci/siimage.o.before
         4600     116       0    4716    126c drivers/ide/pci/siimage.o.after
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ced3ec8a
    • B
    • B
      ide: add ->dev and ->host_priv fields to struct ide_host · 6cdf6eb3
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'struct device *dev[2]' and 'void *host_priv' fields
        to struct ide_host.
      
      * Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s]().
      
      * Pass 'void *priv' argument to ide_setup_pci_device[s]()
        and use it to set ->host_priv.
      
      * Set PCI dev's ->driver_data to point to the struct ide_host
        instance if PCI host driver wants to use ->host_priv.
      
      * Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6cdf6eb3
  7. 27 4月, 2008 1 次提交
  8. 26 4月, 2008 1 次提交
  9. 03 2月, 2008 1 次提交
  10. 02 2月, 2008 2 次提交
  11. 26 1月, 2008 1 次提交
    • B
      ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag · 4db90a14
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide
        what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate().
      
      * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it
        (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old,
        serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode
        methods in host drivers that don't (IDE core code guarantees that
        ->set_dma_mode will be called only for modes which are present
        in SWDMA/MWDMA/UDMA masks).
      
      While at it:
      
      * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in
        hpt34x/hpt366/pdc202xx_old/serverworks host driver.
      
      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>
      4db90a14
  12. 20 10月, 2007 2 次提交
  13. 19 10月, 2007 6 次提交
  14. 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
  15. 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
  16. 12 10月, 2007 2 次提交
    • 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
  17. 21 8月, 2007 1 次提交
  18. 20 7月, 2007 3 次提交
  19. 10 5月, 2007 2 次提交
    • B
      ide: add ide_tune_dma() helper · 29e744d0
      Bartlomiej Zolnierkiewicz 提交于
      After reworking the code responsible for selecting the best DMA
      transfer mode it is now possible to add generic ide_tune_dma() helper.
      
      Convert some IDE PCI host drivers to use it (the ones left need more work).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      29e744d0
    • 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
  20. 17 2月, 2007 3 次提交
    • 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
    • B
      ide: add ide_use_fast_pio() helper (v3) · 7569e8dc
      Bartlomiej Zolnierkiewicz 提交于
      * add ide_use_fast_pio() helper for use by host drivers
      
      * add DMA capability and hwif->autodma checks to ide_use_dma()
      
        - au1xxx-ide/it8213/it821x drivers didn't check for (id->capability & 1)
      
          [ for the IT8211/2 in SMART mode this check shouldn't be made but since
            in it821x_fixups() we set DMA bit explicitly:
      
                     if(strstr(id->model, "Integrated Technology Express")) {
                             /* In raid mode the ident block is slightly buggy
                                We need to set the bits so that the IDE layer knows
                                LBA28. LBA48 and DMA ar valid */
                             id->capability |= 3;            /* LBA28, DMA */
      
             we are better off using generic helper if we can ]
      
        - ide-cris driver didn't set ->autodma
      
          [ before the patch hwif->autodma was only checked in the chipset specific
            hwif->ide_dma_check implementations, for ide-cris it is cris_dma_check()
            function so there no behavior change here ]
      
      v2:
      * updated patch description (thanks to Alan Cox for the feedback)
      
      v3:
      * updated for scc_pata driver
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7569e8dc
    • B
      atiixp/jmicron/triflex: fix PIO fallback · 39baf8a7
      Bartlomiej Zolnierkiewicz 提交于
      * atiixp: if DMA can't be used atiixp_config_drive_for_dma() should return 0,
        atiixp_dma_check() will tune the correct PIO mode anyway
      
      * jmicron: if DMA can't be used config_chipset_for_dma() should return 0,
        micron_config_drive_for_dma() will tune the correct PIO mode anyway
      
        config_jmicron_chipset_for_pio(drive, !speed) doesn't program
        device transfer mode for speed != 0 (only wastes some CPU cycles
        on ide_get_best_pio_mode() call) so remove it
      
      * triflex: if DMA can't be used triflex_config_drive_for_dma() should return 0,
        triflex_config_drive_xfer_rate() will tune correct PIO mode anyway
      
      Above changes also fix (theoretical) issue when ->speedproc fails to set
      device transfer mode (i.e. when ide_config_drive_speed() fails to program it)
      but one of DMA transfer modes is already enabled on the device by the BIOS.
      In such scenario ide_dma_enable() will incorrectly return true statement
      and ->ide_dma_check will try to enable DMA on the device.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      39baf8a7