1. 14 10月, 2008 2 次提交
    • S
      sgiioc4: fix messages · 9b5a18e1
      Sergei Shtylylov 提交于
      Fix several issues with the log messages printed by ide_dma_sgiioc4() and
      sgiioc4_ide_setup_pci_device():
      
      - IOC4 registers are memory-mapped but the "BM-DMA at" format corresponds to
        I/O  mapped registers;
      
      - "%p" format specifiers and type casts used to print non-pointer values;
      
      - using KERN_INFO log level for the error message;
      
      - 'hwif->name' printed as drive's name.
      
      While at it, also:
      
      - return more fitting -EBUSY if request_mem_region() fails;
      
      - make the error message style consistent;
      
      - fix indentation, put the printk() facility and message on the same line;
      
      - use comparisions with NULL instead of ! operator..
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: jeremy@sgi.com
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9b5a18e1
    • S
      sgiioc4: sgiioc4_read_status drive busy check fix · aa95f0e7
      Sergei Shtylylov 提交于
      Fix the drive non-busy criterion used by sgiioc4_read_status(): neither of the
      bits it expects to be set guarantees that the drive is not busy (and might be
      interrupting), only the BSY bit itself being zero gurantees that.
      While at it, use ATA_BUSY instead of hardcoded value everywhere...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: jeremy@sgi.com
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      aa95f0e7
  2. 11 10月, 2008 10 次提交
    • 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
      hpt366: add hpt3xx_disable_fast_irq() helper · 1785192b
      Bartlomiej Zolnierkiewicz 提交于
      * Factor out disabling of "fast interrupt" prediction from
        init_hwif_hpt366() to hpt3xx_disable_fast_irq() helper.
      
      * Use hpt3xx_disable_fast_irq() in ->init_chipset instead of
        ->init_hwif method.
      
        This is a preparation for adding proper PCI PM support.
      
      While at it:
      
      * Cache chip type in chip_type variable in hpt3xx_disable_fast_irq().
      
      There should be no functional changes caused by this patch.
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1785192b
    • B
      ide: ide_dev_is_sata() -> ata_id_is_sata() · 367d7e78
      Bartlomiej Zolnierkiewicz 提交于
      * Use optimized ATA version check from Sergei in ata_id_is_sata().
      
      * ide_dev_is_sata() -> ata_id_is_sata()
      
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      367d7e78
    • B
      ide: ide_dev_has_iordy() -> ata_id_has_iordy() · 5d5870f0
      Bartlomiej Zolnierkiewicz 提交于
      * Remove (id[ATA_ID_FIELD_VALID] & 2) check from ide_dev_has_iordy()
        (it is for validity of words 64-70, IORDY is in word 49).
      
      * ide_dev_has_iordy() -> ata_id_has_iordy()
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5d5870f0
    • B
      cmd640: add __set_prefetch_mode() · af5dfe8c
      Bartlomiej Zolnierkiewicz 提交于
      Factor out the common code from check_prefetch()
      and set_prefetch_mode() to __set_prefetch_mode().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      af5dfe8c
    • 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: use ATA_* defines instead of *_STAT and *_ERR ones · 3a7d2484
      Bartlomiej Zolnierkiewicz 提交于
      * ERR_STAT   -> ATA_ERR
      * INDEX_STAT -> ATA_IDX
      * ECC_STAT   -> ATA_CORR
      * DRQ_STAT   -> ATA_DRQ
      * SEEK_STAT  -> ATA_DSC
      * WRERR_STAT -> ATA_DF
      * READY_STAT -> ATA_DRDY
      * BUSY_STAT  -> ATA_BUSY
      
      * MARK_ERR   -> ATA_AMNF
      * TRK0_ERR   -> ATA_TRK0NF
      * ABRT_ERR   -> ATA_ABORTED
      * MCR_ERR    -> ATA_MCR
      * ID_ERR     -> ATA_IDNF
      * MC_ERR     -> ATA_MC
      * ECC_ERR    -> ATA_UNC
      * ICRC_ERR   -> ATA_ICRC
      
      * BBD_ERR    -> ATA_BBK
      
      Also:
      
      * ILI_ERR    -> ATAPI_ILI
      * EOM_ERR    -> ATAPI_EOM
      * LFS_ERR    -> ATAPI_LFS
      
      * CD         -> ATAPI_COD
      * IO         -> ATAPI_IO
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3a7d2484
    • B
      ide: remove drive->driveid · 48fb2688
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      48fb2688
    • 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. 11 9月, 2008 1 次提交
    • M
      ide: Fix pointer arithmetic in hpt3xx driver code (3rd try) · 62ff2ecf
      Masoud Sharbiani 提交于
      git commit 74811f35 causes crash at
      module load (or boot) time on my machine with a hpt374 controller.
      The reason for this is that for initializing second controller which sets
      (hwif->dev == host->dev[1]) to true (1), adds 1 to a void ptr, which
      advances it by one byte instead of advancing it by sizeof(hpt_info) bytes.
      Because of this, all initialization functions get corrupted data in info
      variable which causes a crash at boot time.
      
      This patch fixes that and makes my machine boot again.
      
      The card itself is a HPT374 raid conroller: Here is the lspci -v output:
      03:06.0 RAID bus controller: HighPoint Technologies, Inc. HPT374 (rev
      07)
              Subsystem: HighPoint Technologies, Inc. Unknown device 0001
              Flags: bus master, 66MHz, medium devsel, latency 120, IRQ 28
              I/O ports at 8000 [size=8]
              I/O ports at 7800 [size=4]
              I/O ports at 7400 [size=8]
              I/O ports at 7000 [size=4]
              I/O ports at 6800 [size=256]
              Expansion ROM at fe8e0000 [disabled] [size=128K]
              Capabilities: [60] Power Management version 2
      
      03:06.1 RAID bus controller: HighPoint Technologies, Inc. HPT374 (rev
      07)
              Subsystem: HighPoint Technologies, Inc. Unknown device 0001
              Flags: bus master, 66MHz, medium devsel, latency 120, IRQ 28
              I/O ports at 9800 [size=8]
              I/O ports at 9400 [size=4]
              I/O ports at 9000 [size=8]
              I/O ports at 8800 [size=4]
              I/O ports at 8400 [size=256]
              Capabilities: [60] Power Management version 2
      Signed-off-by: NMasoud Sharbiani <masouds@google.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      [bart: use dev_get_drvdata() per Sergei's suggestion]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      62ff2ecf
  4. 19 8月, 2008 2 次提交
  5. 06 8月, 2008 3 次提交
  6. 25 7月, 2008 22 次提交