1. 03 2月, 2008 3 次提交
  2. 02 2月, 2008 3 次提交
  3. 27 1月, 2008 1 次提交
    • B
      ide: merge ->fixup and ->quirkproc methods · f01393e4
      Bartlomiej Zolnierkiewicz 提交于
      * Assign drive->quirk_list in ->quirkproc implementations:
        - hpt366.c::hpt3xx_quirkproc()
        - pdc202xx_new.c::pdcnew_quirkproc()
        - pdc202xx_old.c::pdc202xx_quirkproc()
      
      * Make ->quirkproc void.
      
      * Move calling ->quirkproc from do_identify() to probe_hwif().
      
      * Convert it821x_fixups() to it821x_quirkproc() in it821x.c.
      
      * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove
        no longer needed drive->present check from is_dev_seagate_sata().
      
      * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif'
        as an argument.  Then convert ide_register_hw() to accept 'quirkproc'
        argument instead of 'fixup' one.
      
      * Remove no longer needed ->fixup method.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f01393e4
  4. 26 1月, 2008 2 次提交
    • 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
    • B
      ide: remove ->dma_master field from ide_hwif_t (take 5) · 1c029fd6
      Bartlomiej Zolnierkiewicz 提交于
      * Convert cmd64x, hpt366 and pdc202xx_old host drivers to use
        pci_resource_start(hwif->pci_dev, 4) instead of hwif->dma_master.
      
      * Remove no longer needed ->dma_master field from ide_hwif_t.
      
      v2:
      * Use the more readable 'hwif->dma_base - (hwif->channel * 8)' instead of
        pci_resource_start(hwif->pci_dev, 4).
      
      v3:
      * Use hwif->extra_base in hpt366/pdc20xx_old + some cosmetic fixups over v2
        (suggested by Sergei).
      
      v4:
      * Correct offsets in hpt3xxn_set_clock().
      
      v5:
      * Use hwif->extra_base in hpt366 for _real_ this time. (Noticed by Sergei)
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1c029fd6
  5. 20 10月, 2007 3 次提交
  6. 19 10月, 2007 9 次提交
  7. 17 10月, 2007 5 次提交
    • 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
    • B
      ide: remove ide_use_fast_pio() · 65c9cd23
      Bartlomiej Zolnierkiewicz 提交于
      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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      65c9cd23
    • B
      ide: remove drive->init_speed zeroing · d3b90baf
      Bartlomiej Zolnierkiewicz 提交于
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d3b90baf
  8. 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
  9. 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
  10. 21 8月, 2007 1 次提交
  11. 20 7月, 2007 4 次提交
  12. 10 7月, 2007 3 次提交
    • B
      ide: add short cables support · 49521f97
      Bartlomiej Zolnierkiewicz 提交于
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Reviewed-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      49521f97
    • S
      ide: make void and rename ide_dma_timeout() method · c283f5db
      Sergei Shtylyov 提交于
      Since ide_dma_timeout() method's result is discarded, make it return 'void'.
      While at it, drop 'ide_' from the method's name, drop the '__' prefix from
      the default method's name, and do some cleanups in this method driver-wise:
      
      - in ide-dma.c, au1xxx-ide.c, and pdc202xx_old.c, define/use 'hwif' variable;
      
      - in au1xxx-ide.c, get rid of commented out printk();
      
      - in sl82c105.c, get rid of unnecessary variables.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c283f5db
    • S
      ide: make void and rename ide_dma_lostirq() method · 841d2a9b
      Sergei Shtylyov 提交于
      Since ide_dma_lostirq() method's result is discarded, make it return 'void'.
      While at it, rename the method to dma_lost_irq(), drop the '__' prefix from the
      default method's name, and do some cleanups in this method driver-wise:
      
      - in aec62xx.c, rename the method in accordance with other drivers, and get rid
        of unnecessary variables there;
      
      - in pdc202xx_old.c, define/use 'hwif' variable;
      
      - in sgiioc4.c, rearrange the code to call the resetproc() method directly.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      841d2a9b
  13. 16 5月, 2007 2 次提交
    • B
      ide: use ide_tune_dma() part #2 · bd203b57
      Bartlomiej Zolnierkiewicz 提交于
      Use ide_tune_dma() in ide-cris/it821x/pdc202xx_old/serverworks drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      bd203b57
    • B
      pdc202xx_old: rewrite mode programming code (v2) · 4fce3164
      Bartlomiej Zolnierkiewicz 提交于
      This patch is based on the documentation (I would like to thank Promise
      for it) and also partially on the older vendor driver.
      
      Rewrite mode programming code:
      
      * disable 66MHz clock in pdc202xx_tune_chipset() so it is correctly disabled
        even if both devices on the channel are not DMA capable and after reset
      
      * enable/disable IORDY and PREFETCH bits in pdc202xx_tune_chipset()
        as they need to be setup correctly also for PIO only devices, plus IORDY
        wasn't disabled for non-IORDY devices and PREFETCH wasn't disabled for
        ATAPI devices
      
      * remove dead code for setting SYNC_ERDDY_EN bits from config_chipset_for_dma()
        (driver sets ->autotune to 1 so PIO modes are always programmed => lower
         nibble of register A never equals 4 => "chipset_is_set" is always true)
      
      * enable PIO mode programming for all ATAPI devices
        (it was limited to ->media == ide_cdrom devices)
      
      * remove extra reads of registers A/B/C, don't read register D et all
      
      * do clearing / programming of registers A/B/C in one go
        (gets rid of extra PCI config space read/write cycle)
      
      * set initial values of drive_conf/AP/BP/CP variables to zero
        (paranoia for the case when PCI reads fail)
      
      * remove XFER_UDMA6 to XFER_UDMA5 remapping case - it can't happen
        (ide_rate_filter() takes care of it)
      
      * fix XFER_MW_DMA0 timings (they were overclocked, use the official ones)
      
      * fix bitmasks for clearing bits of register B:
      
        - when programming DMA mode bit 0x10 of register B was cleared which
          resulted in overclocked PIO timing setting (iff PIO0 was used)
      
        - when programming PIO mode bits 0x18 weren't cleared so suboptimal
          timings were used for PIO1-4 if PIO0 was previously set (bit 0x10)
          and for PIO0/3/4 if PIO1/2 was previously set (bit 0x08)
      
      * add FIXME comment about missing locking for 66MHz clock register
      
      Also while at it:
      
      * remove unused defines
      
      * do a few cosmetic / CodingStyle fixes
      
      * bump driver version
      
      v2:
      * in pdc202xx_tune_chipset() the old content of drive configuration
        registers is used only by the debugging code so cover "drive_conf"
        PCI registers read by #if PDC202XX_DEBUG_DRIVE_INFO
        (Noticed by Sergei Shtylyov)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4fce3164
  14. 10 5月, 2007 1 次提交
    • 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