1. 24 Jul, 2008 2 commits
  2. 16 Jul, 2008 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      ide: convert ide-timing.h to ide-timings.c library (take 2) · f06ab340
      Bartlomiej Zolnierkiewicz authored
      
      
      * 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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f06ab340
  3. 10 Jun, 2008 1 commit
  4. 26 Apr, 2008 4 commits
  5. 02 Feb, 2008 2 commits
  6. 01 Feb, 2008 2 commits
  7. 25 Jan, 2008 2 commits
  8. 27 Nov, 2007 1 commit
  9. 13 Nov, 2007 1 commit
  10. 19 Oct, 2007 3 commits
  11. 18 Oct, 2007 6 commits
  12. 16 Oct, 2007 9 commits
    • Bartlomiej Zolnierkiewicz's avatar
      sis5513: remove /proc/ide/sis · a718122c
      Bartlomiej Zolnierkiewicz authored
      
      
      This belongs to user-space (and only if really needed).
      
         text    data     bss     dec     hex filename
         7129     404       8    7541    1d75 drivers/ide/pci/sis5513.o.before
         3916     404       1    4321    10e1 drivers/ide/pci/sis5513.o.after
      
      Additionaly to being bloat the code contained two bugs:
      - wrong cable bit was checked (0x0001 instead of 0x8000) on ATA_133 chipsets
      - incorrect UDMA cycle time was reported on ATA_100a/ATA_133 chipsets
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a718122c
    • Bartlomiej Zolnierkiewicz's avatar
      ide: remove hwif->autodma and drive->autodma · 9ff6f72f
      Bartlomiej Zolnierkiewicz authored
      
      
      * 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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9ff6f72f
    • Bartlomiej Zolnierkiewicz's avatar
      ide: use PCI_VDEVICE() macro · 9cbcc5e3
      Bartlomiej Zolnierkiewicz authored
      
      
      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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9cbcc5e3
    • Bartlomiej Zolnierkiewicz's avatar
      sis5513: clear prefetch and postwrite for ATAPI devices · d83fca58
      Bartlomiej Zolnierkiewicz authored
      
      
      Clear prefetch and postwrite for ATAPI devices instead of depending on BIOS.
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d83fca58
    • Bartlomiej Zolnierkiewicz's avatar
      ide: remove ->ide_dma_check (take 2) · 0ae2e178
      Bartlomiej Zolnierkiewicz authored
      
      
      * 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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0ae2e178
    • Bartlomiej Zolnierkiewicz's avatar
      ide: remove ide_use_fast_pio() · 65c9cd23
      Bartlomiej Zolnierkiewicz authored
      
      
      Remove ide_use_fast_pio() and just re-tune PIO unconditionally if DMA tuning
      has failed in ->ide_dma_check.  All host drivers using ide_use_fast_pio() set
      drive->autotune so PIO is always tuned anyway and in some cases we _really_
      need to re-tune PIO because PIO and DMA timings are shared.
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      65c9cd23
    • Bartlomiej Zolnierkiewicz's avatar
      ide: remove drive->init_speed zeroing · d3b90baf
      Bartlomiej Zolnierkiewicz authored
      
      
      Several host drivers used to reset drive->init_speed in their ->ide_dma_check
      implementations which resulted in incorrect init speed being reported to the
      user, fix it.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d3b90baf
    • Bartlomiej Zolnierkiewicz's avatar
      sis5513: always tune PIO · 4960ab7c
      Bartlomiej Zolnierkiewicz authored
      
      
      * Always set ->autotune in init_hwif_sis5513(), this means practically
        no change in behavior since PIO was always tuned in ->ide_dma_check
        and >autotune was always set for ->dma_base == 0 case.
      
      * Bump driver version.
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4960ab7c
    • Bartlomiej Zolnierkiewicz's avatar
      sis5513: DMA setup fixes · c77a89cd
      Bartlomiej Zolnierkiewicz authored
      
      
      * Add sis_ata133_get_base() helper function for obtaining the address of
        the drive control registers on chipset_family == ATA_133 chipsets.
      
      * Add three helper functions for programming PIO/MWDMA timings:
        - sis_ata16_program_timings()  (for ATA_16/33/66/100a chipset families)
        - sis_ata100_program_timings() (for ATA_100/133a chipset families)
        - sis_ata133_program_timings() (for ATA_133 chipset family)
      
        MWDMA timings are taken from datasheets and they match ATA spec.
      
      * Add generic helper function sis_program_timings() and use it in
        ->set_pio_mode and ->set_dma_mode methods (previously the driver
        depended on BIOS to program the correct MWDMA timings).
      
      * Remove redundant !chipset_family check from init_hwif_sis5513()
        (init_chipset_sis5513() guarantees that we will never get here if
         chipset_family cannot be determined).
      
      * SWDMA seems to be unsupported by SiS chipsets (no info about SWDMA in
        datasheets and for SWDMA0 mode timing requirements are impossible to
        fulfill) so remove ->swdma_mask from init_hwif_sis5513() and handling
        of SWDMA modes from sis_set_dma_mode().
      
      * Enable DMA support for chipset_family == ATA_16.
      
      * Bump driver version.
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c77a89cd
  13. 13 Oct, 2007 1 commit
    • 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
  14. 11 Oct, 2007 5 commits