An error occurred fetching the project authors.
  1. 16 Oct, 2007 1 commit
  2. 13 Oct, 2007 3 commits
    • Bartlomiej Zolnierkiewicz's avatar
      cs5535: add missing ->dma_base check · 7bda292d
      Bartlomiej Zolnierkiewicz authored
      If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
      shouldn't be initialized or bad things will happen.
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7bda292d
    • Bartlomiej Zolnierkiewicz's avatar
      ide: move ide_config_drive_speed() calls to upper layers (take 2) · 88b2b32b
      Bartlomiej Zolnierkiewicz authored
      * 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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      88b2b32b
    • Bartlomiej Zolnierkiewicz's avatar
  3. 11 Oct, 2007 2 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ide_set{_max}_pio() (take 4) · 26bcb879
      Bartlomiej Zolnierkiewicz authored
      * 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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      26bcb879
    • Bartlomiej Zolnierkiewicz's avatar
      ide: move ide_rate_filter() calls to the upper layer (take 2) · f212ff28
      Bartlomiej Zolnierkiewicz authored
      * 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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f212ff28
  4. 01 Aug, 2007 2 commits
    • Bartlomiej Zolnierkiewicz's avatar
      cs5535: PIO fixes · bc0b0b5c
      Bartlomiej Zolnierkiewicz authored
      * Fix cs5535_tuneproc() to pass PIO transfer mode value instead of PIO mode
        number to cs5535_set_speed() (fixes random PIO timings being programmed
        and a possible OOPS).  Do a little cleanup while at it.
      
      * Fix cs5535_set_speed() to check if the mate device is present (fixes PIO0
        taskfile timings being used if there is no other device on the cable).
      
      * Use cs5535_tuneproc() in cs5535_dma_check().  The old code had the same
        issue as cs5535_tuneproc() and add additionally caused 0x00-0x04 transfer
        mode values (== default PIO, default PIO w/ IORDY + two invalid values)
        being set on the device instead of values 0x08-0x0c (XFER_PIO_[0,4]).
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      bc0b0b5c
    • Jordan Crouse's avatar
      ide: Fix an overrun found in the CS5535 IDE driver · 32a70a81
      Jordan Crouse authored
      As found by the Coverity checker, and reported by Adrian Bunk, this
      fixes a overrun error in the CS5535 IDE driver.  Somebody got a little
      excited with the if() statement - the CS5535 only supports UDMA 0-4.
      
      Bart:
      Not a bug per se since the upper layer will never feed this function
      with speed > XFER_UDMA_4 (thanks to ->ultra_mask being set to 0x1f).
      
      Worth fixing anyway.
      Signed-off-by: default avatarJordan Crouse <jordan.crouse@amd.com>
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      32a70a81
  5. 19 Jul, 2007 3 commits
  6. 09 Jul, 2007 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add short cables support · 49521f97
      Bartlomiej Zolnierkiewicz authored
      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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Reviewed-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      49521f97
  7. 09 May, 2007 2 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ide_tune_dma() helper · 29e744d0
      Bartlomiej Zolnierkiewicz authored
      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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      29e744d0
    • Bartlomiej Zolnierkiewicz's avatar
      ide: rework the code for selecting the best DMA transfer mode (v3) · 2d5eaa6d
      Bartlomiej Zolnierkiewicz authored
      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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2d5eaa6d
  8. 17 Feb, 2007 3 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ide_set_dma() helper (v2) · 3608b5d7
      Bartlomiej Zolnierkiewicz authored
      * 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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3608b5d7
    • Bartlomiej Zolnierkiewicz's avatar
      ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2) · d8f4469d
      Bartlomiej Zolnierkiewicz authored
      If DMA is unsupported ->ide_dma_check should disable DMA.
      
      v2:
      * updated for scc_pata
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d8f4469d
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ide_use_fast_pio() helper (v3) · 7569e8dc
      Bartlomiej Zolnierkiewicz authored
      * 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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7569e8dc
  9. 30 Jun, 2006 1 commit
  10. 09 Nov, 2005 1 commit