1. 17 7月, 2008 1 次提交
  2. 29 4月, 2008 1 次提交
  3. 27 4月, 2008 2 次提交
  4. 26 4月, 2008 2 次提交
  5. 22 3月, 2008 1 次提交
  6. 11 2月, 2008 1 次提交
  7. 06 2月, 2008 1 次提交
  8. 02 2月, 2008 1 次提交
  9. 27 1月, 2008 1 次提交
  10. 26 1月, 2008 10 次提交
  11. 13 12月, 2007 1 次提交
    • B
      ide: DMA reporting and validity checking fixes (take 3) · 3ab7efe8
      Bartlomiej Zolnierkiewicz 提交于
      * ide_xfer_verbose() fixups:
        - beautify returned mode names
        - fix PIO5 reporting
        - make it return 'const char *'
      
      * Change printk() level from KERN_DEBUG to KERN_INFO in ide_find_dma_mode().
      
      * Add ide_id_dma_bug() helper based on ide_dma_verbose() to check for invalid
        DMA info in identify block.
      
      * Use ide_id_dma_bug() in ide_tune_dma() and ide_driveid_update().
      
        As a result DMA won't be tuned or will be disabled after tuning if device
        reports inconsistent info about enabled DMA mode (ide_dma_verbose() does the
        same checks while the IDE device is probed by ide-{cd,disk} device driver).
      
      * Remove no longer needed ide_dma_verbose().
      
      This patch should fix the following problem with out-of-sync IDE messages
      reported by Nick Warne:
      
             hdd: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache<7>hdd:
             skipping word 93 validity check
              , UDMA(66)
      
      and later debugged by Mark Lord to be caused by:
      
              ide_dma_verbose()
                      printk( ... "2048kB Cache");
              eighty_ninty_three()
                      printk(KERN_DEBUG "%s: skipping word 93 validity check\n");
              ide_dma_verbose()
                      printk(", UDMA(66)"
      
      Please note that as a result ide-{cd,disk} device drivers won't report the
      DMA speed used but this is intended since now DMA mode being used is always
      reported by IDE core code.
      
      v2:
      * fixes suggested by Randy:
        - use KERN_CONT for printk()-s in ide-{cd,disk}.c
        - don't remove argument name from ide_xfer_verbose() declaration
      
      v3:
      * Remove incorrect check for (id->field_valid & 1) from ide_id_dma_bug()
        (spotted by Sergei).
      
      * "XFER SLOW" -> "PIO SLOW" in ide_xfer_verbose() (suggested by Sergei).
      
      * Fix ide_find_dma_mode() to report the correct mode ('mode' after being
        limited by 'req_mode').
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Nick Warne <nick@ukfsn.org>
      Cc: Mark Lord <lkml@rtr.ca>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ab7efe8
  12. 14 11月, 2007 1 次提交
  13. 17 10月, 2007 1 次提交
  14. 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
  15. 12 10月, 2007 4 次提交
    • 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
    • B
      ide: mode limiting fixes for user requested speed changes · 7670df73
      Bartlomiej Zolnierkiewicz 提交于
      * Add an extra argument to ide_max_dma_mode() for passing requested transfer
        mode.  Use it as an upper limit when finding the best DMA for device/host.
      
      * Rename ide_max_dma_mode() to ide_find_dma_mode() and at the same time add
        ide_max_dma_mode() wrapper which passes XFER_UDMA_6 as a requested mode to
        ide_find_dma_mode().  Also add inline ide_find_dma_mode() version for
        CONFIG_BLK_DEV_IDEDMA=n case.
      
      * Pass requested transfer mode from ide_find_dma_mode() to ide_get_mode_mask()
        to avoid false warning from eighty_ninty_three().
      
      * Use ide_find_dma_mode() to limit the user requested transfer mode in
        ide_rate_filter().  Also limit the requested mode by host max PIO mode.
      
      
      Above changes make ide_rate_filter() to:
      
      * Clip desired transfer mode down if it is invalid (values 0x0F, 0x13-0x19
        and 0x25-0x39, values > 0x46 were already clipped down, same for values
        0x25-0x39 but iff UDMA was not supported by the host).
      
      * Clip desired transfer mode down if it is currently unsupported by IDE core
        (PIO6 and MWDMA3-4, the latter were already clipped down but iff UDMA was
        not supported by the host).
      
      * Clip desired transfer mode down according to the host capabilities
        (UDMA modes were already clipped down but MWDMA/SWDMA/PIO weren't,
        also ->atapi_dma flag was not respected).
      
      * Clip desired transfer mode down according to the device capabilities
        (except PIO modes for now which require mode work) - shouldn't be a
        problem since ide_set_xfer_rate() is called _after_ device has accepted
        given transfer mode.
      
      and also result in a number of host driver specific bugfixes:
      
      * icside
        - clip unsupported PIO5 mode down
        - fix unsupported/invalid modes being set in drive->current_speed
      
      * ide-cris
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - clip DMA modes down for ATAPI devices
        - fix BUG() on unsupported/invalid modes
      
      * au1xxx-ide
        - clip unsupported PIO5, SWDMA0-2 and MWDMA0-2
          (if BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=n) modes down
      
      * aec62xx
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - clip DMA modes down for ATAPI devices
        - fix 0x00 being programmed as PIO timing for unsupported/invalid modes
        - fix unsupported/invalid modes being set on the device
      
      * alim15x3
        - clip DMA modes down for ATAPI devices (chipset revision == 0x20 only)
        - fix theoretical OOPS for 0x0F mode
        - fix unsupported/invalid modes being set on the device
      
      * amd74xx
        - clip unsupported SWDMA0-2 (on COBRA_7401 revs <= 7) modes down
        - fix random PIO timings being set for unsupported/invalid modes
        - fix unsupported/invalid modes being set on the device
      
      * atiixp
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix cached MWDMA mode being cleared for unsupported/invalid modes
        - fix PIO{0,2} timings being programmed for unsupported/invalid modes
        - fix theoretical OOPS for PIO5-6 and 0x0F modes
        - fix unsupported/invalid modes being set on the device
      
      * cmd64x
        - clip unsupported SWDMA0-2 modes down
      
      * cs5530
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix unsupported/invalid modes being set on the device
        - fix BUG() on unsupported/invalid modes
          (which happened if the device accepted the setting)
      
      * cs5535
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix unsupported/invalid modes being set on the device
        - fix theoretical OOPS for PIO5-6 and 0x0F modes
      
      * hpt34x
        - clip DMA modes down for ATAPI devices
        - fix invalid timings being programmed for unsupported/invalid modes
        - fix unsupported/invalid modes being set on the device
      
      * hpt366
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix PIO0 timings being programmed for unsupported/invalid modes
        - fix DMA timings being cleared for MWDMA3-4 and 0x25-0x39 modes
        - fix unsupported/invalid modes being set on the device
      
      * it8213
        - clip unsupported PIO5, SWDMA0-1 and MWDMA0 modes down
      
      * it821x
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - clip DMA modes down for ATAPI devices
          (chipset in smart mode and revision 0x10 in pass-through mode)
      
      * jmicron
        - clip unsupported SWDMA0-2 modes down
        - fix unsupported/invalid modes being set on the device
      
      * pdc202xx_new
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix unsupported/invalid modes being set on the device
      
      * pdc202xx_old
        - clip unsupported PIO5 mode down
        - fix incorrect timings being set for unsupported/invalid modes
        - fix unsupported/invalid modes being set on the device
      
      * piix
        - clip unsupported PIO5, SWDMA0-1 and MWDMA0 modes down
      
      * sc1200
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix unsupported/invalid modes being set on the device
        - fix BUG() on unsupported/invalid modes
          (which happened if the device accepted the setting)
      
      * scc_pata
        - clip unsupported PIO5, SWDMA0-2 and MWDMA0-2 modes down
      
      * serverworks
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix DMA/UDMA timings/settings being cleared for unsupported/invalid modes
        - fix unsupported/invalid modes being set on the device
      
      * siimage
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - clip DMA modes down for ATAPI devices (SATA chipsets)
      
      * sis5513
        - clip unsupported PIO5 mode down
        - fix BUG() on unsupported/invalid modes
      
      * sl82c105
        - clip unsupported SWDMA0-2 modes down
      
      * slc90e66
        - clip unsupported PIO5, SWDMA0-1 and MWDMA0 modes down
      
      * tc86c001
        - clip unsupported PIO5 and SWDMA0-2 modes down
        - fix PIO0 timings being programmed for PIO5/0x0F/SWDMA0-2/0x13-0x19 modes
        - fix invalid 0x00 DMA timing being programmed for MWDMA3-4/0x25-0x39 modes
        - fix unsupported/invalid modes being set on the device
      
      * triflex
        - clip unsupported PIO5 mode down
      
      * via82cxxx
        - fix random PIO timings being set for unsupported/invalid modes
        - fix unsupported/invalid modes being set on the device
      
      * pmac
        - clip unsupported PIO5 and SWDMA0-2 modes down
      
      * cmd640/ht6560b
        - clip DMA modes down (if CONFIG_BLK_DEV_IDEDMA=y)
        - fix PIO5 being clipped to PIO4 (if CONFIG_BLK_DEV_IDEDMA=n)
      
      * opti621
        - clip DMA modes down (if CONFIG_BLK_DEV_IDEDMA=y)
        - clip unsupported PIO4 to PIO3 (if CONFIG_BLK_DEV_IDEDMA=n)
      
      
      While at it:
      
      * Use ide_rate_filter() in cs5520.c::cs5520_tune_chipset().
      
      * Remove no longer needed checks from hpt366.c::hpt3{6,7}x_tune_chipset().
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7670df73
  16. 20 7月, 2007 5 次提交
  17. 16 5月, 2007 1 次提交
  18. 10 5月, 2007 2 次提交
    • B
      ide: cable detection fixes (take 2) · 7f8f48af
      Bartlomiej Zolnierkiewicz 提交于
      Tejun's recent eighty_ninty_three() fix has inspired me to do more thorough
      review of the cable detection code...
      
      * print user-friendly warning about limiting the maximum transfer speed
        to UDMA33 (and the reason behind it) when 80-wire cable is not detected,
        also while at it cleanup eighty_ninty_three() a bit
      
      * use eighty_ninty_three() in ide_ata66_check(), this actually fixes 3 bugs:
        - bit 14 (word 93 validity check) == 1 && bit 13 (80-wire cable test) == 1
          were used as 80-wire cable present test for CONFIG_IDEDMA_IVB=n case
          (please see FIXME comment in eighty_ninty_three() for more details)
        - CONFIG_IDEDMA_IVB=y/n cases were interchanged
        - check for SATA devices was missing
      
      * remove private cable warnings from pdc_202xx{old,new} drivers now that core
        code provides this functionality (plus, in pdc202xx_new case the test could
        give false warnings for ATAPI devices because pdc202xx_new driver doesn't
        even support ATAPI DMA)
      
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7f8f48af
    • 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
  19. 04 3月, 2007 1 次提交
  20. 17 2月, 2007 2 次提交
    • 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
      ide: unexport ide_set_xfer_rate() (v2) · 056a697b
      Bartlomiej Zolnierkiewicz 提交于
      In cmd64x, siimage and scc_pata drivers:
      * don't set drive->init_speed as it should be already
        set by successful execution of ide_set_xfer_rate()
      * use hwif->speedproc functions directly
      
      Above changes allows removal of EXPORT_SYMBOL_GPL(ide_set_xfer_rate).
      
      v2:
      * updated for scc_pata driver
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      056a697b