1. 03 Jan, 2013 1 commit
    • Greg Kroah-Hartman's avatar
      Drivers: ide: remove __dev* attributes. · fe31edc8
      Greg Kroah-Hartman authored
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  2. 05 Oct, 2012 1 commit
  3. 19 Jan, 2010 3 commits
  4. 02 Dec, 2009 1 commit
  5. 21 Oct, 2008 1 commit
  6. 13 Oct, 2008 2 commits
  7. 10 Oct, 2008 2 commits
  8. 05 Aug, 2008 1 commit
  9. 24 Jul, 2008 3 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: prefix messages from IDE PCI host drivers by driver name · ced3ec8a
      Bartlomiej Zolnierkiewicz authored
      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: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ->dev and ->host_priv fields to struct ide_host · 6cdf6eb3
      Bartlomiej Zolnierkiewicz authored
      * 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: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  10. 23 Jul, 2008 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      ide: filter out "default" transfer mode values in set_xfer_rate() · 3b2a5c71
      Bartlomiej Zolnierkiewicz authored
      * Filter out "default" transfer mode values (0x00 - default PIO mode,
        0x01 - default PIO mode w/ IORDY disabled) in write handler for obsoleted
        /proc/ide/hd?/settings:current_speed setting.
        Allowing "default" transfer mode values is a dangerous thing to do as
        we don't support programming controller to the "default" transfer mode
        and devices often use different values for the default and maximum PIO
        mode (i.e. PIO2 default and PIO4 maximum) so the controller will stay
        programmed for higher PIO mode while device will use the lower PIO mode.
        There is no functionality loss as by using special IOCTLs device can
        still be programmed to "default" transfer modes (it is only useful for
        debugging/testing purposes anyway).
      * Remove no longer needed IDE_HFLAG_ABUSE_SET_DMA_MODE host flag, it was
        previously used by few host drivers to program the controller to PIO0
        timings for "default" transfer mode == 0x01 (although some host drivers
        would program invalid PIO timings instead).
      * Cleanup ide_set_xfer_rate() and add BUG_ON().
      Suggested-by: 's avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  11. 16 Jul, 2008 2 commits
  12. 26 Apr, 2008 2 commits
  13. 02 Feb, 2008 2 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ->cable_detect method to ide_hwif_t · bfa14b42
      Bartlomiej Zolnierkiewicz authored
      * Add ->cable_detect method to ide_hwif_t.
      * Call the new method in ide_init_port() if:
        - the host supports UDMA modes > UDMA2 ('hwif->ultra_mask & 78')
        - DMA initialization was successful (if hwif->dma_base is not set
          ide_init_port() sets hwif->ultra_mask to zero)
        - "idex=ata66" is not used ('hwif->cbl != ATA_CBL_PATA40_SHORT')
      * Convert PCI host drivers to use ->cable_detect method.
      While at it:
      * Factor out cable detection to separate functions (if not already done).
      * hpt366.c/it8213.c/slc90e66.c:
        - don't check cable type if "idex=ata66" is used
      * pdc202xx_new.c:
        - add __devinit tag to pdcnew_cable_detect()
      * pdc202xx_old.c:
        - rename pdc202xx_old_cable_detect() to pdc2026x_old_cable_detect()
        - add __devinit tag to pdc2026x_old_cable_detect()
      Reviewed-by: 's avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      atiixp/cs5535/scc_pata: fix "idex=ata66" parameter handling · b4d1c73d
      Bartlomiej Zolnierkiewicz authored
      Don't override the cable type if the "idex=ata66" parameter was used.
      While at it:
      * atiixp.c: factor out cable detection to atiixp_cable_detect() from
      * cs5535.c: pass 'ide_hwif_t *hwif' instead of 'struct pci_dev *dev' to
      * scc_pata.c: factor out cable detection to scc_cable_detect() from
        init_hwif_scc() and remove incorrect comment.
      Signed-off-by: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  14. 01 Feb, 2008 2 commits
  15. 25 Jan, 2008 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag · 4db90a14
      Bartlomiej Zolnierkiewicz authored
      * 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: 's avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  16. 24 Dec, 2007 1 commit
  17. 19 Oct, 2007 2 commits
  18. 18 Oct, 2007 6 commits
  19. 16 Oct, 2007 5 commits
    • 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: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • 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: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • 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.
      * 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: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • 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: 's avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • 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: 's avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  20. 13 Oct, 2007 1 commit