1. 11 10月, 2008 1 次提交
    • 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
  2. 06 8月, 2008 1 次提交
  3. 25 7月, 2008 6 次提交
  4. 24 7月, 2008 1 次提交
    • B
      ide: filter out "default" transfer mode values in set_xfer_rate() · 3b2a5c71
      Bartlomiej Zolnierkiewicz 提交于
      * Filter out "default" transfer mode values (0x00 - default PIO mode,
        0x01 - default PIO mode w/ IORDY disabled) in write handler for obsoleted
        /proc/ide/hd?/settings:current_speed setting.
      
        Allowing "default" transfer mode values is a dangerous thing to do as
        we don't support programming controller to the "default" transfer mode
        and devices often use different values for the default and maximum PIO
        mode (i.e. PIO2 default and PIO4 maximum) so the controller will stay
        programmed for higher PIO mode while device will use the lower PIO mode.
      
        There is no functionality loss as by using special IOCTLs device can
        still be programmed to "default" transfer modes (it is only useful for
        debugging/testing purposes anyway).
      
      * Remove no longer needed IDE_HFLAG_ABUSE_SET_DMA_MODE host flag, it was
        previously used by few host drivers to program the controller to PIO0
        timings for "default" transfer mode == 0x01 (although some host drivers
        would program invalid PIO timings instead).
      
      * Cleanup ide_set_xfer_rate() and add BUG_ON().
      Suggested-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3b2a5c71
  5. 17 7月, 2008 1 次提交
    • B
      ide: convert ide-timing.h to ide-timings.c library (take 2) · f06ab340
      Bartlomiej Zolnierkiewicz 提交于
      * Don't include ide-timing.h in cs5535 and sis5513 host drivers
        (they don't need it currently).
      
      * Convert ide-timing.h to ide-timings.c library and add CONFIG_IDE_TIMINGS
        config option to be selected by host drivers using the library.
      
      While at it:
      
      - fix ide_timing_find_mode() placement
      
      v2:
      * Add missing EXPORT_SYMBOLs. (Stephen Rothwell <sfr@canb.auug.org.au>)
      
      There should be no functional changes caused by this patch.
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f06ab340
  6. 16 7月, 2008 2 次提交
  7. 27 4月, 2008 2 次提交
  8. 26 4月, 2008 2 次提交
  9. 03 2月, 2008 2 次提交
  10. 02 2月, 2008 4 次提交
    • B
      ide: delete filenames/versions from comments · 58f189fc
      Bartlomiej Zolnierkiewicz 提交于
      Delete filenames/versions from comments.
      
      I'm leaving decisions about adding DRV_VERSION defines and MODULE_VERSION()-s
      to maintainers of the respective drivers.
      
      While at it:
      
      * Remove unused VERSION define from ide.c.
      
      * Remove unused/stale DRV_VERSION define from au1xxx-ide.c.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      58f189fc
    • B
      ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t · 36501650
      Bartlomiej Zolnierkiewicz 提交于
      Keep pointer to struct device instead of struct pci_dev in ide_hwif_t.
      
      While on it:
      * Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce().
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      36501650
    • B
      ide: add IDE_HFLAG_CLEAR_SIMPLEX host flag · 8ac2b42a
      Bartlomiej Zolnierkiewicz 提交于
      * Rename 'simplex_stat' variable to 'dma_stat' in ide_get_or_set_dma_base().
      
      * Factor out code for forcing host out of "simplex" mode from
        ide_get_or_set_dma_base() to ide_pci_clear_simplex() helper.
      
      * Add IDE_HFLAG_CLEAR_SIMPLEX host flag and set it in alim15x3 (for M5229),
        amd74xx (for AMD 7409), cmd64x (for CMD643), generic (for Netcell) and
        serverworks (for CSB5) host drivers.
      
      * Make ide_get_or_set_dma_base() test for IDE_HFLAG_CLEAR_SIMPLEX host flag
        instead of checking dev->device (BTW the code was buggy because it didn't
        check for dev->vendor, luckily none of these PCI Device IDs was used by
        some other vendor for PCI IDE controller).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8ac2b42a
    • B
      amd74xx: remove amd_ide_chips table · 993da8f9
      Bartlomiej Zolnierkiewicz 提交于
      * Remove no longer needed assertion from amd74xx_probe().
      
      * Factor out cable detection for AMD7409 to amd7409_cable_detect() and for
        chipsets >= AMD7411 to amd7411_cable_detect().
      
      * Use dev->vendor and dev->device instead of amd_config->udma_mask when
        selecting cable detection method and checking for broken FIFO support in
        init_chipset_amd74xx().
      
      * Remove no longer needed AMD_BAD_FIFO define.
      
      * Add 'swdma' parameter for setting .swdma_mask to DECLARE_AMD_DEV() macro.
      
      * Add 'udma' parameter for setting .udma_mask to DECLARE_{AMD,NV}_DEV() macro.
      
      * Keep a copy of a current amd74xx_chipsets[] entry in amd74xx_probe()
        in order to fix ->swdma_mask on early AMD7409 revisions and ->udma_mask
        on Serenade mainboards.
      
      * Remove no longer needed fixups from init_chipset_amd74xx()
        and AMD_CHECK_{SWDMA,SERENADE} defines.
      
      * Move printing banner message from init_chipset_amd74xx() to amd74xx_probe(),
        also remove incorrect comment while at it.
      
      * Use hwif->ultra_mask instead of amd_config->udma_mask in amd_set_drive().
      
      * Add 'udma_mask' argument to amd_set_speed() and pass UDMA mask from
        amd_set_drive() instead of using amd_config->udma_mask.
      
      * Move amd_config->base from AMD_* defines to users of these defines and add
        0x40 the defined values.  Then add amd_offset() inline helper for selecting
        offset from 0x40 base (needed for nVidia controllers) and finally use it in
        amd_set_speed(), amd7411_cable_detect() and init_chipset_amd74xx() instead
        of amd_config->base.
      
      * Remove no longer needed AMD_BAD_SWDMA define, ->{swdma,ultra}_mask setup
        from init_hwif_amd74xx(), amd_{config,chipset} variables and amd_ide_chips
        table.
      
      * Fix init_chipset_amd74xx() comment.
      
      * Bump driver version.
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      993da8f9
  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 3 次提交
  13. 19 10月, 2007 6 次提交
  14. 17 10月, 2007 5 次提交
    • B
      amd74xx: remove /proc/ide/amd74xx · b02fcae0
      Bartlomiej Zolnierkiewicz 提交于
      This belongs to user-space (and only if really needed).
      
         text    data     bss     dec     hex filename
         6723    2000      28    8751    222f drivers/ide/pci/amd74xx.o.before
         3833    2000      16    5849    16d9 drivers/ide/pci/amd74xx.o.after
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b02fcae0
    • B
      amd74xx/via82cxxx: don't initialize drive->dn · 8fcb2ea8
      Bartlomiej Zolnierkiewicz 提交于
      drive->dn is initialized by ide-probe.c::probe_hwif() so no need to do it
      in ->init_hwif method.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8fcb2ea8
    • 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 2 次提交
    • 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
    • B
      amd74xx/via82cxxx: check ide_config_drive_speed() return value · 3b4024d4
      Bartlomiej Zolnierkiewicz 提交于
      * Check ide_config_drive_speed() return value.
      
      * While at also call ide_config_drive_speed() if the transfer mode is
        XFER_PIO_SLOW (this case happens iff the transfer mode has already been
        set on the device by ide-proc.c::set_xfer_rate()) and remove redundant
        setting of ->{init,current}_speed.
      
      * Bump driver version.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3b4024d4
  16. 12 10月, 2007 1 次提交