1. 16 5月, 2007 7 次提交
    • 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
      cs5530/sc1200: add ->udma_filter methods · 5fd216bb
      Bartlomiej Zolnierkiewicz 提交于
      CS5530/SC1200 specifies that two drives on the same cable cannot mix
      UDMA/MDMA.  Add {cs5530,sc1200}_udma_filter() to handle this.  This also
      makes it possible to remove open-coded best DMA mode selection and use
      standard ide_use_dma()/ide_max_dma_mode() helpers.  While at it bump
      version numbers.
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5fd216bb
    • B
      pdc202xx_new: use ide_tune_dma() · 7f86723a
      Bartlomiej Zolnierkiewicz 提交于
      * remove code enabling IORDY and prefetch from config_chipset_for_dma(),
        as the comment states it has no real effect because these settings are
        overriden when the PIO mode is set (and for this driver ->autotune == 1
        so PIO mode is always programmed)
      
      * use ide_tune_dma() in pdcnew_config_drive_xfer_rate() and remove no longer
        needed config_chipset_for_dma()
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7f86723a
    • B
      alim15x3: use ide_tune_dma() · 38ff8a74
      Bartlomiej Zolnierkiewicz 提交于
      Use ide_tune_dma() in ali15x3_config_drive_for_dma() and remove all the open
      coded DMA tuning code and also config_chipset_for_dma().  Set ->atapi_dma flag
      correctly in init_hwif_common_ali15x3() so ide_tune_dma() can take care of
      checking if ATAPI DMA is allowed and remove open coded ATAPI DMA check from
      ali15x3_config_drive_for_dma().
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      38ff8a74
    • B
      sis5513: PIO mode setup fixes · 6b8cf772
      Bartlomiej Zolnierkiewicz 提交于
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to program PIO5 by config_art_rwp_pio() could result in incorrect PIO
        timings being programmed and possibly the data corruption (for < ATA100
        family chipsets PIO0 timings were used, for ATA100 and ATA100a - the random
        content of test1 variable was used, for ATA133 - MWDMA0 timings were used)
      
      * BUG() in sis5513_tune_chipset() if somebody tries to force unsupported PIO5,
        also cleanup this function a bit while at it
      
      * add comment about PIO0 timings for < ATA100 family chipsets
      
      * remove open-coded best PIO mode selection from config_art_rwp_pio(),
        it contained numerous bugs:
      
        - it didn't check for validity of id->eide_pio_modes and id->eide_pio_iordy
          before using them
      
        - it tried to found out maximum PIO mode basing on minimum IORDY cycle time
          (moreover wrong cycle times were used for PIO1/5)
      
        - it was overriding PIO blacklist and conservative PIO "downgrade" done
          by ide_get_best_pio_mode()
      
      * use sis5513_tune_drive() instead of config_art_rwp_pio()
        in sis5513_config_xfer_rate() so the correct PIO mode is also set
        on drive even if the device is not IORDY/DMA capable
      
      * config_art_rwp_pio() was always setting the best possible mode and not
        the wanted one - fix it and move ide_get_best_pio_mode() call to
        config_chipset_for_pio()
      
      * don't use ide_find_best_mode() in config_chipset_for_pio(), it was being
        overriden by config_art_rwp_pio() for the host timings anyway + we need to
        set the same PIO mode on the device and the host
      
      * pass correct "pio" argument (255 instead of 5) to sis5513_tune_drive() call
        in sis5513_config_xfer_rate() so the best PIO mode is set on the drive
        and not PIO4
      
      * rename sis5513_tune_drive() to sis5513_tuneproc()
        and config_chipset_for_pio() to sis5513_tune_driver()
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6b8cf772
    • B
      serverworks: PIO mode setup fixes · 9445de76
      Bartlomiej Zolnierkiewicz 提交于
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to program PIO5 by svwks_tune_chipset() could result in incorrect PIO
        timings being programmed and possibly the data corruption (it seems that
        the minimum possible values were used but I lack the datasheets to be sure)
      
      * select best PIO mode in svwks_tune_drive() and not in svwks_tune_chipset()
        when doing PIO autotuning (pio == 255)
      
      * don't try to tune PIO in config_chipset_for_dma() as ide_dma_enable() could
        return 1 if DMA was previously enabled (svwks_config_drive_xfer_rate()
        takes care of PIO tuning if no suitable DMA mode is found)
      
      * remove config_chipset_for_pio() and use svwks_tune_drive() instead,
        config_chipset_for_pio() contained numerous bugs when selecting PIO mode
        (luckily it was only used for devices limited to PIO by capabilities/BIOS):
      
        - it didn't check for validity of id->eide_pio_modes and id->eide_pio_iordy
          before using them
      
        - it tried to found out maximum PIO mode basing on minimum IORDY cycle time
          (moreover wrong cycle times were used for PIO0/1/5)
      
        - it was overriding PIO blacklist and conservative PIO "downgrade" done
          by ide_get_best_pio_mode()
      
        - if the max drive PIO was PIO5 then XFER_PIO_0/XFER_PIO_SLOW was selected
          (XFER_PIO_SLOW is not supported by svwks_tune_chipset() so the result
           was the same as if using XFER_PIO_5 => wrong PIO timings were set)
      
        - it was overriding drive->current_speed
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9445de76
    • 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
  2. 10 5月, 2007 7 次提交
    • B
      ide: add ide_proc_register_port() · 5cbf79cd
      Bartlomiej Zolnierkiewicz 提交于
      * create_proc_ide_interfaces() tries to add /proc entries for every probed
        and initialized IDE port, replace it by ide_proc_register_port() which does
        it only for the given port (also rename destroy_proc_ide_interface() to
        ide_proc_unregister_port() for consistency)
        
      * convert {create,destroy}_proc_ide_interface[s]() users to use new functions
      
      * pmac driver depended on proc_ide_create() to add /proc port entries, fix it
        
      * au1xxx-ide, swarm and cs5520 drivers depended indirectly on ide-generic
        driver (CONFIG_IDE_GENERIC=y) to add port /proc entries, fix them
      
      * there is now no need to add /proc entries for IDE ports in proc_ide_create()
        so don't do it
      
      * proc_ide_create() needs now to be called before drivers are probed - fix it,
        while at it make proc_ide_create() create /proc "ide" directory
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5cbf79cd
    • B
      ide: add "initializing" argument to ide_register_hw() · 869c56ee
      Bartlomiej Zolnierkiewicz 提交于
      Add "initializing" argument to ide_register_hw() and use it instead of ide.c
      wide variable of the same name.  Update all users of ide_register_hw()
      accordingly.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      869c56ee
    • 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: make /proc/ide/ optional · ecfd80e4
      Bartlomiej Zolnierkiewicz 提交于
      All important information/features should be already available through
      sysfs and ioctl interfaces.
      
      Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
      disabling it makes IDE driver ~5 kB smaller (on x86-32).
      
      While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
      and remove no longer needed #ifdefs.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ecfd80e4
    • B
      ide: add ide_tune_dma() helper · 29e744d0
      Bartlomiej Zolnierkiewicz 提交于
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      29e744d0
    • 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
    • B
      ide: fix UDMA/MWDMA/SWDMA masks (v3) · 18137207
      Bartlomiej Zolnierkiewicz 提交于
      * use 0x00 instead of 0x80 to disable ->{ultra,mwdma,swdma}_mask
      * add udma_mask field to ide_pci_device_t and use it to initialize
        ->ultra_mask in aec62xx, cmd64x, pdc202xx_{new,old} and piix drivers
      * fix UDMA masks to match with chipset specific *_ratemask()
        (alim15x3, hpt366, serverworks and siimage drivers need UDMA mask
         filtering method - done in the next patch)
      
      v2:
      * piix: fix cable detection for 82801AA_1 and 82372FB_1
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * cmd64x: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * aec62xx: fix newly introduced bug - check DMA status not command register
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * piix: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      18137207
  3. 09 5月, 2007 1 次提交
  4. 07 5月, 2007 1 次提交
  5. 06 5月, 2007 13 次提交
    • S
      hpt366: don't check enablebits for HPT36x · fdb0d72b
      Sergei Shtylyov 提交于
      HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
      from checking them...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Michal Kepien <michal.kepien@poczta.onet.pl>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      fdb0d72b
    • B
      siimage: fix wrong ->swdma_mask · 8e60d376
      Bartlomiej Zolnierkiewicz 提交于
      This driver doesn't support SWDMA so use the correct ->swdma_mask.
      
      While at it:
      
      * no need to call config_chipset_for_pio() in config_chipset_for_dma(),
        if DMA is not available config_chipset_for_pio() will be called
        by siimage_config_drive_for_dma() and if DMA is available
        config_siimage_chipset_for_pio() will be called by siimage_tune_chipset()
      
      * remove needless config_chipset_for_pio() wrapper
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8e60d376
    • B
      it821x: PIO mode setup fixes · 0e9b4e53
      Bartlomiej Zolnierkiewicz 提交于
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to setup PIO5 by it821x_tuneproc() could result in incorrect PIO timings
        + incorrect base clock being set for controller in the passthrough mode
      
      * move code limiting max PIO according to the pair device capabilities from
        config_it821x_chipset_for_pio() to it821x_tuneproc() so the check is also
        applied for mode change requests coming through ->tuneproc and ->speedproc
        interfaces
      
      * set device speed in it821x_tuneproc()
      
      * in it821x_tune_chipset() call it821x_tuneproc() also if the controller is
        in the smart mode (so the check for pair device max PIO is done)
      
      * rename it821x_tuneproc() to it821x_tune_pio(), then add it821x_tuneproc()
        wrapper which does the max PIO mode check;  it worked by the pure luck
        previously, pio[4] and pio_want[4] arrays were used with index == 255
        so random PIO timings and base clock were set for the controller in the
        passthrough mode, thankfully PIO timings and base clock were corrected
        later by config_it821x_chipset_for_pio() call (but it was not called for
        PIO-only devices during resume and for user requested PIO autotuning)
      
      * remove config_it821x_chipset_for_pio() call from config_chipset_for_dma()
        as the driver sets ->autotune to 1 and ->tuneproc does the proper job now
      
      * convert the last user of config_it821x_chipset_for_pio() to use
        it821x_tuneproc(drive, 255) and remove no longer needed function
      
      While at it:
      
      * fix few comments
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0e9b4e53
    • B
      pdc202xx_new: enable DMA for all ATAPI devices · 247b03f8
      Bartlomiej Zolnierkiewicz 提交于
      There is no reason to limit DMA to ide_cdrom type devices.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      247b03f8
    • B
      alim15x3: PIO fallback fix · 072cdcbb
      Bartlomiej Zolnierkiewicz 提交于
      If DMA tuning fails always set the best PIO mode.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      072cdcbb
    • S
      aec62xx: fix PIO/DMA setup issues · 826a1b65
      Sergei Shtylyov 提交于
      Teach the driver's tuneproc() method to do PIO auto-runing properly since it
      treated 5 instead of 255 as auto-tune request, and also passed the mode limit
      of PIO5 to ide_get_best_pio_mode() despite supporting up to PIO4 only.
      
      While at it, also:
      
      - remove the driver's wrong claim about supporting SWDMA modes;
      
      - stop hooking ide_dma_timeout() method as the handler clearly doesn't fit for
        the task...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      826a1b65
    • S
      cmd64x: use interrupt status from MRDMODE register (take 2) · 66602c83
      Sergei Shtylyov 提交于
      Fold the parts of the ide_dma_end() methods identical to __ide_dma_end() into a
      mere call to it.
      Start using faster versions of the ide_dma_end() and ide_dma_test_irq() methods
      for the PCI0646U and newer chips that have the duplicate interrupt status bits
      in the I/O mapped MRDMODE register, determing what methods to use at the driver
      load time. Do some cleanup/renaming in the "old" ide_dma_test_irq() method too.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      66602c83
    • S
      cmd64x: procfs code fixes/cleanups (take 2) · 5826b318
      Sergei Shtylyov 提交于
      Fix several issues with the driver's procfs output:
      
      - when testing if channel is enabled, the code looks at the "simplex" bits, not
        at the real enable bits -- add #define for the primary channel enable bit;
      
      - UltraDMA modes 0, 1, 3 for slave drive reported incorrectly due to using the
        master drive's clock cycle resolution bit.
      
      While at it, also perform the following cleanups:
      
      - don't print extra newline before the first controller's dump;
      
      - correct the chipset names (from CMDxxx to PCI-xxx)
      
      - don't read from the registers which aren't used for dump;
      
      - better align the table column sizes;
      
      - rework UltraDMA mode dump code;
      
      - remove PIO mode dump code that has never been finished;
      
      - remove the duplicate interrupt status (the MRDMODE register bits mirror those
        those in the CFR and ARTTIM23 registers) and fold the dump into single line;
      
      - correct the style of the ?: operators...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5826b318
    • S
      cmd64x: add/fix enablebits (take 2) · 7accbffd
      Sergei Shtylyov 提交于
      The IDE core looks at the wrong bit when checking if the secondary channel is
      enabled on PCI0646 -- CNTRL register bit 7 is read-ahead disable, bit 3 is the
      correct one.
      Starting with PCI0646U chip, the primary channel can also be enabled/disabled --
      so, add 'enablebits' initializers to each 'ide_pci_device_t' structure, handling
      the original PCI0646 via adding the init_setup() method and clearing the 'reg'
      field there if necessary...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7accbffd
    • S
      cmd64x: interrupt status fixes (take 2) · e51e2528
      Sergei Shtylyov 提交于
      The driver's ide_dma_test_irq() method was reading the MRDMODE register even on
      PCI0643/6 where it was write-only -- fix this by always reading the "backward-
      compatible" interrupt bits, renaming dma_alt_stat to irq_stat as the interrupt
      status bits are not coupled to DMA.
      In addition, wrong interrupt bit was tested/cleared for the primary channel --
      it's bit 2 in all the chip specs and the driver used bit 1... :-/
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e51e2528
    • S
      cmd64x: fix multiword and remove single-word DMA support · 60e7a82f
      Sergei Shtylyov 提交于
      Fix the multiword DMA and drop the single-word DMA support (which nobody will
      miss, I think).  In order to do it, a number of changes was necessary:
      
      - rename program_drive_counts() to program_cycle_times(), pass to it cycle's
        total/active times instead of the clock counts, and convert them into the
        active/recovery clocks there instead of cmd64x_tune_pio() -- this causes
        quantize_timing() to also move;
      
      - contrarywise, move all the code handling the address setup timing into
        cmd64x_tune_pio(), so that setting MWDMA mode wouldn't change address setup;
      
      - remove from the speedproc() method the  bogus code pretending to set the DMA
        timings by twiddling bits in the BMIDE status register, handle setting MWDMA
        by just calling program_cycle_times(); while at it, improve the style of that
        whole switch statement;
      
      - stop fiddling with the DMA capable bits in the speedproc() method -- they do
        not enable DMA, and are properly dealt with by the dma_host_{on,off} methods;
      
      - don't set hwif->swdma_mask in the init_hwif() method anymore.
      
      In addition to those changes, do the following:
      
      - in cmd64x_tune_pio(), when writing to ARTTIM23 register preserve the interrupt
        status bit, eliminate local_irq_{save|restore}() around this code as there's
        *no* actual race with the interrupt handler, and move cmdprintk() to a more
        fitting place -- after ide_get_best_pio_mode() call;
      
      - make {arttim|drwtim}_regs arrays single-dimensional, indexed with drive->dn;
      
      - rename {setup|recovery}_counts[] into more fitting {setup|recovery}_values[];
      
      - in  the speedproc() method, get rid of the duplicate reads/writes from/to the
        UDIDETCRx registers and of the extra variable used to store the transfer mode
        value after filtering,  use another method of determining master/slave drive,
        and cleanup useless parens;
      
      - beautify cmdprintk() output here and there.
      
      While at it, remove meaningless comment about the driver being used only on
      UltraSPARC and long non-relevant RCS tag. :-)
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      60e7a82f
    • S
      sl82c105: DMA support code cleanup (take 4) · 688a87d1
      Sergei Shtylyov 提交于
      Fold the now equivalent code in the ide_dma_check() method into a mere call to
      ide_use_dma().  Make config_for_dma() return non-zero if DMA mode has been set
      and call it from the ide_dma_check() method instead of ide_dma_on().
      Defer writing the DMA timings to the chip registers until DMA is really turned
      on (and do not enable IORDY for DMA).
      Remove unneeded code from the init_hwif() method, improve its overall looks.
      Rename the dma_start(), ide_dma_check(), and ide_dma_lostirq() methods, and
      also use more proper hwif->dma_command, fix printk() and comment in the latter
      one as well.  While at it, cleanup style in several places.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      688a87d1
    • S
      sl82c105: rework PIO support (take 2) · e93df705
      Sergei Shtylyov 提交于
      Get rid of the 'pio_speed' member of 'ide_drive_t' that was only used by this
      driver by storing the PIO mode timings in the 'drive_data' instead -- this
      allows us to greatly  simplify the process of "reloading" of the chip's timing
      register and do it right in sl82c150_dma_off_quietly() and to get rid of two
      extra arguments to config_for_pio() -- which got renamed to sl82c105_tune_pio()
      and now returns a PIO mode selected, with ide_config_drive_speed() call moved
      into the tuneproc() method, now called sl82c105_tune_drive() with the code to
      set drive's 'io_32bit' and 'unmask' flags in its turn moved to its proper place
      in the init_hwif() method.
      Also, while at it, rename get_timing_sl82c105() into get_pio_timings() and get
      rid of the code in it clamping cycle counts to 32 which was both incorrect and
      never executed anyway...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e93df705
  6. 24 4月, 2007 1 次提交
  7. 21 4月, 2007 2 次提交
  8. 13 4月, 2007 1 次提交
  9. 27 3月, 2007 1 次提交
    • A
      pdc202xx_new: Enable ATAPI DMA · 362ebd83
      Albert Lee 提交于
      [ bart: the ressurection of 2 years old patch which slipped thru the cracks
        (thanks to Sergei Shtylyov for finding it) ]
      
      These is the patch to turn on pdc202xx_new for ATAPI DMA.  When testing, it
      works fine without the (request_bufflen % 256) workaround as needed in libata.
      ide-scsi filters out (pc->request_transfer % 1024) and use PIO, so the pdc202xx
      ATAPI DMA problem is avoid.  Both ide-cd and ide-scsi won't hit the ATAPI DMA
      problem on pdc202xx_new.
      Signed-off-by: NAlbert Lee <albertcc@tw.ibm.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      362ebd83
  10. 18 3月, 2007 3 次提交
  11. 04 3月, 2007 3 次提交