1. 14 10月, 2008 1 次提交
  2. 11 10月, 2008 4 次提交
    • B
      ide: add proper PCI PM support (v2) · feb22b7f
      Bartlomiej Zolnierkiewicz 提交于
      * Keep pointer to ->init_chipset method also in
        struct ide_host and set it in ide_host_alloc_all().
      
      * Add ide_pci_suspend() and ide_pci_resume() helpers
        (default ->suspend and ->resume implementations).
      
      * ->init_chipset can no longer be marked __devinit.
      
      * Add proper PCI PM support to IDE PCI host drivers
        (rz1000.c and tc86c001.c are skipped for now since
        they need to be converted from using ->init_hwif
        to use ->init_chipset instead).
      
      v2:
      * Cleanup CONFIG_PM #ifdef-s per akpm's suggestion.
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      feb22b7f
    • B
      ide: include <linux/hdreg.h> only when needed · 3ceca727
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ceca727
    • B
      ide: check drive->present in ide_get_paired_drive() · 7e59ea21
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7e59ea21
    • B
      ide: make drive->id an union (take 2) · 4dde4492
      Bartlomiej Zolnierkiewicz 提交于
      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().
      
      v2:
      Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4dde4492
  3. 19 8月, 2008 1 次提交
  4. 06 8月, 2008 2 次提交
  5. 25 7月, 2008 6 次提交
  6. 24 7月, 2008 2 次提交
  7. 17 7月, 2008 1 次提交
  8. 16 7月, 2008 1 次提交
  9. 30 4月, 2008 1 次提交
  10. 29 4月, 2008 5 次提交
    • S
      siimage: coding style cleanup (take 2) · 7b255436
      Sergei Shtylyov 提交于
      Fix 18 errors and several warnings given by checkpatch.pl:
      
      - use of C99 // comments;
      
      - trailing whitespace;
      
      - 'switch' and 'case' not at the same indentation level;
      
      - no space before the open parenthesis of the 'if' and 'switch' statements;
      
      - space between function name and open parenthesis (though I have introduced
        such warnins in some places since the code looks prettier with the spaces);
      
      - including <asm/io.h> instead of <linux/io.h>;
      
      - line over 80 characters.
      
      In addition to these changes, also do the following:
      
      - make the arrays in sil_set_pio_mode() 'static', and make the arrays in
        sil_set_dma_mode() 'static const';
      
      - change the string of the 'if' statements into the 'switch' statement in
        sil_pata_udma_filter();
      
      - drop the needless '==' operators from the 'if' statements where a condition
        is a mere bit test;
      
      - remove needless initializer for the 'tmp' variable in init_chipset_siimage();
      
      - beautify groups of the variable initializers and assignment operators;
      
      - add new line after variable definitions;
      
      - remove new line between the comment and the statements it refers to;
      
      - remove needless curly braces and parentheses;
      
      - fix typos, capitalize acronyms, etc. in the comments...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7b255436
    • B
      siimage: remove proc_reports_siimage() · 24cc434a
      Bartlomiej Zolnierkiewicz 提交于
      * proc_reports_siimage() is now only called by init_chipset_siimage()
        so inline it there.
      
      * Use array instead of switch statement for reporting clock modes.
      
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      24cc434a
    • B
      siimage: add sil_* I/O ops · 165701d9
      Bartlomiej Zolnierkiewicz 提交于
      Add sil_iowrite{8,16,32}() and sil_ioread{8,16}() helpers, then use them to
      merge code accessing configuration registers through PCI and MMIO together.
      
      [ because of this SATA initialization bits from setup_mmio_siimage() are
        moved to init_chipset_siimage() ]
      
      This also cuts code size a bit:
      
         text    data     bss     dec     hex filename
         4437     164       0    4601    11f9 drivers/ide/pci/siimage.o.before
         3979     164       0    4143    102f drivers/ide/pci/siimage.o.after
      
      While at it:
      
      * Use I/O ops directly instead of using ->IN{B,W} and ->OUT{B,W}.
      
      * Fixup CodingStyle in setup_mmio_siimage().
      
      * Rename 'tmpbyte' variable to 'tmp' in init_chipset_siimage().
      
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      165701d9
    • B
      siimage: do clocking register posting earlier in setup_mmio_siimage() · 24a96ae0
      Bartlomiej Zolnierkiewicz 提交于
      Do clocking register posting earlier in setup_mmio_siimage()
      to match code in init_chipset_siimage().
      
      This is a preparation for the next patch which merges PCI and MMIO
      code paths together.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      24a96ae0
    • B
      ide: add IDE_HFLAG_MMIO host flag (take 2) · c5dd43ec
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_MMIO host flag and set it for hosts which use
        default_hwif_mmiops().
      
      v2:
      * Fix kernel panic in pmac host driver (',' should be '|').
      
        Thanks to Kamalesh for reporting it + testing the fix
        and to Andrew for hinting me about the source of the issue.
      
      Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c5dd43ec
  11. 27 4月, 2008 4 次提交
    • B
      ide: add struct ide_io_ports (take 3) · 4c3032d8
      Bartlomiej Zolnierkiewicz 提交于
      * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
        in ide_hwif_t.
      
      * Rename io_ports[] in hw_regs_t to io_ports_array[].
      
      * Use un-named union for 'unsigned long io_ports_array[]' and 'struct
        ide_io_ports io_ports' in hw_regs_t.
      
      * Remove IDE_*_OFFSET defines.
      
      v2:
      * scc_pata.c build fix from Stephen Rothwell.
      
      v3:
      * Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
        (Noticed by Andrew Morton)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4c3032d8
    • B
      ide: add struct ide_dma_ops (take 3) · 5e37bdc0
      Bartlomiej Zolnierkiewicz 提交于
      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.
      
      v2:
      * 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/
      
      v3:
      * Two bugs slipped in v2 (noticed by Sergei):
        - use correct DMA ops for HPT374 (for real this time)
        - handle HPT370/HPT370A properly
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e37bdc0
    • H
      ide: replace remaining __FUNCTION__ occurrences · eb63963a
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__
      
      [bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it]
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      eb63963a
    • B
      ide: add struct ide_port_ops (take 2) · ac95beed
      Bartlomiej Zolnierkiewicz 提交于
      * 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)
      
      v2:
      * Fix build for bast-ide. (Noticed by Andrew Morton)
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ac95beed
  12. 26 4月, 2008 1 次提交
  13. 18 4月, 2008 1 次提交
    • B
      ide: remove dead/obsolete ->busproc method · 50672e5d
      Bartlomiej Zolnierkiewicz 提交于
      ->busproc method is used by HDIO_SET_BUSSTATE ioctl but it has no chance
      of working as intended (in 2.4.x days) because to issue an ioctl there
      is a device node needed and:
      
      - for BUSSTATE_TRISTATE+OFF it is too late (devices are already gone)
      
      - for BUSSTATE_TRISTATE+ON it is too early (devices are not registered yet)
      
      Just remove ->busproc method for now (it was only implemented by hpt366,
      siimage and tc86c001 host drivers).
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      50672e5d
  14. 08 4月, 2008 1 次提交
    • S
      siimage: fix kernel oops on PPC 44x · c976816b
      Sergei Shtylyov 提交于
      Fix kernel oops due to machine check occuring in init_chipset_siimage() on PPC
      44x platforms.  These 32-bit CPUs have 36-bit physical address and PCI I/O and
      memory spaces are mapped beyond 4 GB; arch/ppc/ code has a fixup in ioremap()
      that creates an illusion of the PCI I/O and memory resources being mapped below
      4 GB, while arch/powerpc/ code got rid of this fixup with PPC 44x having instead
      CONFIG_RESOURCES_64BIT=y -- this causes the resources to be truncated to 32-bit
      'unsigned long' type in this driver, and so non-existant memory being ioremap'ed
      and then accessed...
      
      Thanks to Valentine Barshak for providing an initial patch and explanations.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c976816b
  15. 06 2月, 2008 1 次提交
  16. 03 2月, 2008 3 次提交
  17. 02 2月, 2008 2 次提交
  18. 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
  19. 26 1月, 2008 1 次提交
    • 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
  20. 28 11月, 2007 1 次提交