13 Oct, 2007

7 commits

  • Make ata_dev_try_classify() take a pointer to ata_device instead of
    ata_port/port_number combination for consistency and add @present
    argument. @present indicates whether the device seems present during
    reset. It's the result of TF access during softreset and link
    onlineness during hardreset. @present will be used to improve
    diagnostic failure handling.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Currently, port configuration reporting has the following problems.

    * iomapped address is reported instead of raw address
    * report contains irrelevant fields or lacks necessary fields for
    non-SFF controllers.
    * host->irq/irq2 are there just for reporting and hacky.

    This patch implements and uses ata_port_desc() and
    ata_port_pbar_desc(). ata_port_desc() is almost identical to
    ata_ehi_push_desc() except that it takes @ap instead of @ehi, has no
    locking requirement, can only be used during host initialization and "
    " is used as separator instead of ", ". ata_port_pbar_desc() is a
    helper to ease reporting of a PCI BAR or an offsetted address into it.

    LLD pushes whatever description it wants using the above two
    functions. The accumulated description is printed on host
    registration after "[S/P]ATA max MAX_XFERMODE ".

    SFF init helpers and ata_host_activate() automatically add
    descriptions for addresses and irq respectively, so only LLDs which
    isn't standard SFF need to add custom descriptions. In many cases,
    such controllers need to report different things anyway.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • It was always set to ata_port_disable(). Removed the hook, and replaced
    the very few ap->ops->port_disable() callsites with direct calls to
    ata_port_disable().

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • * ->irq_ack() is redundant to what the irq handler already
    performs... chk-status + irq-clear. Furthermore, it is only
    called in one place, when screaming-irq-debugging is enabled,
    so we don't want to bother with a hook just for that.

    * ata_dummy_irq_on() is only ever used in drivers that have
    no callpath reaching ->irq_on(). Remove .irq_on hook from
    those drivers, and the now-unused ata_dummy_irq_on()

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Make reset methods and related functions deal with ata_link instead of
    ata_port.

    * ata_do_reset()
    * ata_eh_reset()
    * all prereset/reset/postreset methods and related functions

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Make the following PHY-related functions to deal with ata_link instead
    of ata_port.

    * sata_print_link_status()
    * sata_down_spd_limit()
    * ata_set_sata_spd_limit() and friends
    * sata_link_debounce/resume()
    * sata_scr_valid/read/write/write_flush()
    * ata_link_on/offline()

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Introduce ata_link. It abstracts PHY and sits between ata_port and
    ata_device. This new level of abstraction is necessary to support
    SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
    a ATA host port. Fields related to command execution, spd_limit and
    EH are per-link and thus moved to ata_link.

    This patch only defines the host link. Multiple link handling will be
    added later. Also, a lot of ap->link derefences are added but many of
    them will be removed as each part is converted to deal directly with
    ata_link instead of ata_port.

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Cc: James Bottomley
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

12 Oct, 2007

1 commit

  • * corruption fix: we only want the lower 16 bits of length (0 == 64kb)

    * ditto: the upper layer sets max-phys-segments to LIBATA_MAX_PRD,
    so we must reset it to own hw-specific length.

    * delete unused mv_fill_sg() return value

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

10 Oct, 2007

1 commit

  • The recent mv_fill_sg() rewrite, to fix a data corruption problem
    related to IOMMU virtual merging, forgot to account for the
    potentially-increased size of the scatter/gather table after its run.

    Additionally, the DMA boundary is reduced from 0xffffffff to 0xffff
    to more closely match the needs of mv_fill_sg().

    Signed-off-by: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     

04 Oct, 2007

1 commit

  • Fix bug in sata_mv for cases where the IOMMU layer has merged SG entries
    to larger than 64KB. They need to be split up before being sent to
    the driver.

    Just for simplicity's sake, split up at 64K boundary instead of 64K size,
    since that's what the common code does anyway.

    Signed-off-by: Olof Johansson
    Signed-off-by: Jeff Garzik

    Olof Johansson
     

31 Aug, 2007

1 commit


15 Aug, 2007

1 commit


20 Jul, 2007

4 commits


18 Jul, 2007

1 commit


13 Jul, 2007

4 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits)
    PCI: Only build PCI syscalls on architectures that want them
    PCI: limit pci_get_bus_and_slot to domain 0
    PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure
    PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge
    PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3
    PCI: hotplug: pciehp: wait for 1 second after power off slot
    PCI: pci_set_power_state(): check for PM capabilities earlier
    PCI: cpci_hotplug: Convert to use the kthread API
    PCI: add pci_try_set_mwi
    PCI: pcie: remove SPIN_LOCK_UNLOCKED
    PCI: ROUND_UP macro cleanup in drivers/pci
    PCI: remove pci_dac_dma_... APIs
    PCI: pci-x-pci-express-read-control-interfaces cleanups
    PCI: Fix typo in include/linux/pci.h
    PCI: pci_ids, remove double or more empty lines
    PCI: pci_ids, add atheros and 3com_2 vendors
    PCI: pci_ids, reorder some entries
    PCI: i386: traps, change VENDOR to DEVICE
    PCI: ATM: lanai, change VENDOR to DEVICE
    PCI: Change all drivers to use pci_device->revision
    ...

    Linus Torvalds
     
  • Due to a mistake in test logic, Gen-IIE chips were being treated as
    Gen-II chips in some cases. Fix this, and in the process, clean up
    IS_50XX/IS_60XX tests to the more uniform IS_GEN_{I,II,IIE} tests.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • This makes hotplug, NCQ, etc. possible, and removes one of the few
    remaining old-EH drivers.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • * Continue replacing "CONSTANT & var" tests with "var & CONSTANT"
    * Don't clear EDMA_CFG_NCQ_GO_ON_ERR on Gen-IIE, where that bit does
    not exist
    * Set I/O Id field in descriptor, where present. Appears to work
    fine on all versions, even though queueing is still disabled.
    * call pci_set_mwi(), to (a) make sure cacheline size is set properly,
    and (b) enable MWI transactions
    * Remove never-used handling of coalescing interrupt bits (these events
    are always masked)

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

12 Jul, 2007

2 commits

  • Instead of all drivers reading pci config space to get the revision
    ID, they can now use the pci_device->revision member.

    This exposes some issues where drivers where reading a word or a dword
    for the revision number, and adding useless error-handling around the
    read. Some drivers even just read it for no purpose of all.

    In devices where the revision ID is being copied over and used in what
    appears to be the equivalent of hotpath, I have left the copy code
    and the cached copy as not to influence the driver's performance.

    Compile tested with make all{yes,mod}config on x86_64 and i386.

    Signed-off-by: Auke Kok
    Acked-by: Dave Jones
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     
  • Minor cleanups, new definitions, and code movement, preparing for
    upcoming new-EH and NCQ changes. This commit shoult not change behavior
    at all.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

10 Jul, 2007

2 commits


03 Jul, 2007

1 commit


25 May, 2007

1 commit


22 May, 2007

1 commit


29 Apr, 2007

5 commits

  • Convert ahci, sata_sil, sata_sil24, sata_svw, sata_qstor, sata_mv,
    sata_sx4, sata_vsc and sata_inic162x to new init model.

    Now that host and ap are available during intialization, functions are
    converted to take either host or ap instead of low level parameters
    which were inevitable for functions shared between init and other
    paths. This simplifies code quite a bit.

    * init_one()'s now follow more consistent init order

    * ahci_setup_port() and ahci_host_init() collapsed into
    ahci_init_one() for init order consistency

    * sata_vsc uses port_info instead of setting fields manually

    * in sata_svw, k2_board_info converted to port_info (info is now in
    port flags). port number is honored now.

    Tested on ICH7/8 AHCI, jmb360, sil3112, 3114, 3124 and 3132.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Added Support for Marvell 7042 Chip - 7042 has same capabilities & behavior
    as 6042.

    Signed-off-by: Thomas A. Morrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Morrison, Tom
     
  • The chips covered by sata_mv have a 32-bit DMA boundary they must not
    cross, not a 64K boundary. We are merely limited to a 64K maximum
    segment size. Therefore, the DMA scatter/gather table fill code can be
    greatly simplified, and we need not cut in half the S/G table size as
    reported to the SCSI layer.

    Also, the driver forget to turn on 64-bit DMA at the PCI layer. All
    other data structures (both hardware and software) have been prepped for
    64-bit PCI DMA. It was simply never turned on. let's
    see if it still works...

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Signed-off-by: Jeff Garzik

    Jeff Garzik
     

26 Feb, 2007

3 commits


25 Feb, 2007

1 commit


21 Feb, 2007

2 commits

  • ata_port has two different id fields - id and port_no. id is
    system-wide 1-based unique id for the port while port_no is 0-based
    host-wide port number. The former is primarily used to identify the
    ATA port to the user in printk messages while the latter is used in
    various places in libata core and LLDs to index the port inside the
    host.

    The two fields feel quite similar and sometimes ap->id is used in
    place of ap->port_no, which is very difficult to spot. This patch
    renames ap->id to ap->print_id to reduce the possibility of such bugs.

    Some printk messages are adjusted such that id string (ata%u[.%u])
    isn't printed twice and/or to use ata_*_printk() instead of hardcoded
    id format.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Fix sparse warnings in SATA:
    drivers/ata/sata_sil.c:342:9: warning: Using plain integer as NULL pointer
    drivers/ata/sata_mv.c:2056:55: warning: Using plain integer as NULL pointer

    Signed-off-by: Randy Dunlap
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Randy Dunlap
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau