1. 06 8月, 2008 1 次提交
  2. 25 7月, 2008 5 次提交
    • B
      ide: drop 'name' parameter from ->init_chipset method · a326b02b
      Bartlomiej Zolnierkiewicz 提交于
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a326b02b
    • B
      ide: prefix messages from IDE PCI host drivers by driver name · ced3ec8a
      Bartlomiej Zolnierkiewicz 提交于
      Prefix messages from IDE PCI host drivers by driver name instead of marketed
      chipset name (it is still possible to exactly identify the particular chipset
      basing on driver messages).
      
      As a bonus this provides nice code savings for some drivers:
      
         text    data     bss     dec     hex filename
         3826     112       8    3946     f6a drivers/ide/pci/amd74xx.o.before
         2786     112       8    2906     b5a drivers/ide/pci/amd74xx.o.after
          764     108       0     872     368 drivers/ide/pci/cs5520.o.before
          680     108       0     788     314 drivers/ide/pci/cs5520.o.after
         1680     112       4    1796     704 drivers/ide/pci/generic.o.before
         1155     112       4    1271     4f7 drivers/ide/pci/generic.o.after
         7128     792       0    7920    1ef0 drivers/ide/pci/hpt366.o.before
         6984     792       0    7776    1e60 drivers/ide/pci/hpt366.o.after
         2800     148       0    2948     b84 drivers/ide/pci/pdc202xx_new.o.before
         2523     148       0    2671     a6f drivers/ide/pci/pdc202xx_new.o.after
         2831     148       0    2979     ba3 drivers/ide/pci/pdc202xx_old.o.before
         2683     148       0    2831     b0f drivers/ide/pci/pdc202xx_old.o.after
         3776     112       4    3892     f34 drivers/ide/pci/piix.o.before
         2804     112       4    2920     b68 drivers/ide/pci/piix.o.after
         4693     116       0    4809    12c9 drivers/ide/pci/siimage.o.before
         4600     116       0    4716    126c drivers/ide/pci/siimage.o.after
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ced3ec8a
    • B
      ide: include PCI device name in messages from IDE PCI host drivers · 28cfd8af
      Bartlomiej Zolnierkiewicz 提交于
      While at it:
      
      * Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc).
      
      * Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO.
      
      * Move printk() call from ide_pci_clear_simplex() to the caller.
      
      * Cleanup do_ide_setup_pci_device() a bit.
      
      * amd74xx.c: remove superfluous PCI device revision information.
      
      * hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO.
      
      * pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO.
      
      * pdc202xx_old.c: fix driver message in pdc202xx_init_one().
      
      * via82cxxx.c: fix driver warning message in via_init_one().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      28cfd8af
    • B
    • B
      ide: add ->dev and ->host_priv fields to struct ide_host · 6cdf6eb3
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'struct device *dev[2]' and 'void *host_priv' fields
        to struct ide_host.
      
      * Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s]().
      
      * Pass 'void *priv' argument to ide_setup_pci_device[s]()
        and use it to set ->host_priv.
      
      * Set PCI dev's ->driver_data to point to the struct ide_host
        instance if PCI host driver wants to use ->host_priv.
      
      * Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6cdf6eb3
  3. 17 7月, 2008 1 次提交
    • B
      ide: convert ide-timing.h to ide-timings.c library (take 2) · f06ab340
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f06ab340
  4. 11 6月, 2008 1 次提交
  5. 27 4月, 2008 1 次提交
  6. 26 4月, 2008 3 次提交
  7. 03 2月, 2008 2 次提交
  8. 02 2月, 2008 2 次提交
  9. 26 1月, 2008 2 次提交
  10. 28 11月, 2007 1 次提交
  11. 14 11月, 2007 1 次提交
  12. 20 10月, 2007 3 次提交
  13. 19 10月, 2007 6 次提交
  14. 17 10月, 2007 9 次提交
    • B
      sis5513: remove /proc/ide/sis · a718122c
      Bartlomiej Zolnierkiewicz 提交于
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a718122c
    • 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
      sis5513: clear prefetch and postwrite for ATAPI devices · d83fca58
      Bartlomiej Zolnierkiewicz 提交于
      Clear prefetch and postwrite for ATAPI devices instead of depending on BIOS.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d83fca58
    • 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
    • B
      sis5513: always tune PIO · 4960ab7c
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4960ab7c
    • B
      sis5513: DMA setup fixes · c77a89cd
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c77a89cd
  15. 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
  16. 12 10月, 2007 1 次提交