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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  2. 05 Oct, 2012 1 commit
  3. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  4. 19 Jan, 2010 2 commits
  5. 31 Mar, 2009 4 commits
  6. 27 Mar, 2009 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2) · 22117d6e
      Bartlomiej Zolnierkiewicz authored
      * Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.
      * Add ->dma_timer_expiry method and use it to set hwif->expiry for
        ATA_PROT_DMA protocol in do_rw_taskfile().
      * Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.
      * Move setting hwif->expiry from ide_execute_command() to its users and drop
        'expiry' argument.
      * Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().
      * Remove ->dma_exec_cmd method and its implementations.
      * Unexport ide_execute_command() and ide_dma_intr().
      * Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).
      * Fix *dma_expiry naming (suggested by Sergei Shtylyov).
      There should be no functional changes caused by this patch.
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  7. 06 Jan, 2009 3 commits
  8. 22 Dec, 2008 1 commit
  9. 21 Oct, 2008 1 commit
  10. 13 Oct, 2008 3 commits
  11. 10 Oct, 2008 4 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: include <linux/hdreg.h> only when needed · 3ceca727
      Bartlomiej Zolnierkiewicz authored
      * Include <linux/ata.h> directly in <linux/ide.h>
        instead of through <linux/hdreg.h>.
      * Include <linux/hdreg.h> only when needed.
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      ide: check drive->present in ide_get_paired_drive() · 7e59ea21
      Bartlomiej Zolnierkiewicz authored
      * Change ide_get_paired_drive() to return NULL if peer device
        is not present and update all users accordingly.
      While at it:
      * ide_get_paired_drive() -> ide_get_pair_dev()
      * Use ide_get_pair_dev() in cs5530.c, sc1200.c and via82cxxx.c.
      There should be no functional changes caused by this patch.
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      ide: remove drive->driveid · 48fb2688
      Bartlomiej Zolnierkiewicz authored
      * Factor out HDIO_[OBSOLETE,GET]_IDENTITY ioctls handling
        to ide_get_identity_ioctl().
      * Use temporary buffer in ide_get_identity_ioctl() instead
        of accessing drive->id directly.
      * Add ide_id_to_hd_driveid() inline to convert raw id into
        struct hd_driveid format (needed on big-endian).
      * Use ide_id_to_hd_driveid() in ide_get_identity_ioctl(),
        cleanup ide_fix_driveid() and switch ide to use use raw id.
      * Remove no longer needed drive->driveid.
        This leaves us with 3 users of struct hd_driveid in tree:
        - arch/um/drivers/ubd_kern.c
        - drivers/block/xsysace.c
        - drivers/usb/storage/isd200.c
      While at it:
      * Use ata_id_u{32,64}() and ata_id_has_{dma,lba,iordy}() macros.
      There should be no functional changes caused by this patch.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      ide: make drive->id an union (take 2) · 4dde4492
      Bartlomiej Zolnierkiewicz authored
      Make drive->id an unnamed union so id can be accessed either by using
      'u16 *id' or 'struct hd_driveid *driveid'.  Then convert all existing
      drive->id users accordingly (using 'u16 *id' when possible).
      This is an intermediate step to make ide 'struct hd_driveid'-free.
      While at it:
      - Add missing KERN_CONTs in it821x.c.
      - Use ATA_ID_WORDS and ATA_ID_*_LEN defines.
      - Remove unnecessary checks for drive->id.
      - s/drive_table/table/ in ide_in_drive_list().
      - Cleanup ide_config_drive_speed() a bit.
      - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave().
      Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)
      There should be no functional changes caused by this patch.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  12. 24 Jul, 2008 4 commits
  13. 26 Apr, 2008 4 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: constify struct ide_dma_ops · f37afdac
      Bartlomiej Zolnierkiewicz authored
      * Export ide_dma_exec_cmd() and __ide_dma_test_irq().
      * Constify struct ide_dma_ops.
      * Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma()
        (it is later overriden by ide_init_port() if needed) and drop
        'const struct ide_port_info *d' argument.
      While at it:
      * Rename __ide_dma_test_irq() to ide_dma_test_irq().
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add struct ide_dma_ops (take 3) · 5e37bdc0
      Bartlomiej Zolnierkiewicz authored
      Add struct ide_dma_ops and convert core code + drivers to use it.
      While at it:
      * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods.
      * Drop "ide_" "infixes" from DMA methods.
      * au1xxx-ide.c:
        - use auide_dma_{test_irq,end}() directly in auide_dma_timeout()
      * pdc202xx_old.c:
        - drop "old_" "infixes" from DMA methods
      * siimage.c:
        - add siimage_dma_test_irq() helper
        - print SATA warning in siimage_init_one()
      * Remove no longer needed ->init_hwif implementations.
      * Changes based on review from Sergei:
        - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/
        - s/drive->hwif/hwif/ in idefloppy_pc_intr().
        - fix patch description w.r.t. au1xxx-ide changes
        - fix au1xxx-ide build
        - fix naming for cmd64*_dma_ops
        - drop "ide_" and "old_" infixes
        - s/hpt3xxx_dma_ops/hpt37x_dma_ops/
        - s/hpt370x_dma_ops/hpt370_dma_ops/
        - use correct DMA ops for HPT302/N, HPT371/N and HPT374
        - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/
      * Two bugs slipped in v2 (noticed by Sergei):
        - use correct DMA ops for HPT374 (for real this time)
        - handle HPT370/HPT370A properly
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add struct ide_port_ops (take 2) · ac95beed
      Bartlomiej Zolnierkiewicz authored
      * Move hooks for port/host specific methods from ide_hwif_t to
        'struct ide_port_ops'.
      * Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info'
        and ide_hwif_t.
      * Update host drivers and core code accordingly.
      While at it:
      * Rename ata66_*() cable detect functions to *_cable_detect() to match
        the standard naming. (Suggested by Sergei Shtylyov)
      * Fix build for bast-ide. (Noticed by Andrew Morton)
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    • Bartlomiej Zolnierkiewicz's avatar
      Bartlomiej Zolnierkiewicz authored
      "bootable" should be the default behavior so replace
      There should be no functional changes caused by this patch.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  14. 02 Feb, 2008 1 commit
  15. 01 Feb, 2008 2 commits
  16. 26 Jan, 2008 3 commits
  17. 25 Jan, 2008 3 commits
  18. 13 Nov, 2007 1 commit