17 Jun, 2009

18 commits


12 Jun, 2009

22 commits

  • Addition of one unknown subsystem identifier to the quirks handler for
    chipset i82855GM_HB on notebook Asus A6L. This exposes the otherwise
    hidden SMBus controller within the south bridge ICH4-M.

    Signed-off-by: Mats Erik Andersson
    Signed-off-by: Jesse Barnes

    Mats Erik Andersson
     
  • Adds support for PCI Express transaction layer end-to-end CRC checking
    (ECRC). This patch will enable/disable ECRC checking by setting/clearing
    the ECRC Check Enable and/or ECRC Generation Enable bits for devices that
    support ECRC.

    The ECRC setting is controlled by the "pci=ecrc=" command-line
    option. If this option is not set or is set to 'bios", the enable and
    generation bits are left in whatever state that firmware/BIOS set them to.
    The "off" setting turns them off, and the "on" option turns them on (if the
    device supports it).

    Turning ECRC on or off can be a data integrity versus performance
    tradeoff. In theory, turning it on will catch more data errors, turning
    it off means possibly better performance since CRC does not need to be
    calculated by the PCIe hardware and packet sizes are reduced.

    Signed-off-by: Andrew Patterson
    Signed-off-by: Jesse Barnes

    Andrew Patterson
     
  • According to the PCI PM specification (PCI Bus Power Management
    Interface Specification, Rev. 1.2, Section 5.4.1) we are supposed to
    reinitialize devices that have PCI_PM_CTRL_NO_SOFT_RESET clear during
    all transitions from PCI_D3hot to PCI_D0, but we only do it if the
    device's current_state field is equal to PCI_UNKNOWN.

    This may lead to problems if a device with PCI_PM_CTRL_NO_SOFT_RESET
    unset is put into PCI_D3hot at run time by its driver and
    pci_set_power_state() is used to put it back into PCI_D0, because in
    that case the device will remain uninitialized after
    pci_set_power_state() has returned. Prevent that from happening by
    modifying pci_raw_set_power_state() to reinitialize devices with
    PCI_PM_CTRL_NO_SOFT_RESET unset during all transitions from D3 to D0.

    Cc: stable@kernel.org
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • PCIe root complex integrated endpoint does not implement ARI, so this
    kind of endpoint uses 3-bit function number. The function dependency
    link of the integrated endpoint should be calculated using the device
    number plus the value from function dependency link register.

    Normal endpoint always implements ARI and the function dependency link
    register contains 8-bit function number (i.e. `devfn' from software's
    perspective).

    Signed-off-by: Yu Zhao
    Signed-off-by: Jesse Barnes

    Yu Zhao
     
  • We always call pci_stop_bus_device before calling pci_destroy_dev.

    Since pci_stop_bus_device calls pci_stop_dev, there is no need
    for pci_destroy_dev to repeat the call.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • pci_enable_msix currently returns -EINVAL if you ask
    for more vectors than supported by the device, which would
    typically cause fallback to regular interrupts.

    It's better to return the table size, making the driver retry
    MSI-X with less vectors.

    Reviewed-by: Matthew Wilcox
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Jesse Barnes

    Michael S. Tsirkin
     
  • VIA has a strange chipset, it has root port under a bridge. Disable ASPM
    for such strange chipset.

    Cc: stable@kernel.org
    Tested-by: Wolfgang Denk
    Signed-off-by: Shaohua Li
    Signed-off-by: Jesse Barnes

    Shaohua Li
     
  • At this point, it seems to solve more problems than it causes, so let's try using it by default. It's an easy revert if it ends up causing trouble.

    Reviewed-by: Yinghai Lu
    Acked-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Jesse Barnes
     
  • The last in-tree caller of pci_find_slot has been converted, so
    let's get rid of this deprecated interface.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Convert uses of pci_find_slot to modern API.

    In the conversion sites, we end up calling pci_dev_put() right away.

    This may seem like it misses the entire point of doing something like
    pci_get_bus_and_slot(), since we drop the reference so soon, but it turns
    out we don't actually do much with the returned pci_dev.

    I plan on untangling cpqphp further, but clearly cpqphp never worried too
    much about a properly refcounted pci_dev anyway. For now, this conversion
    seems reasonable, as it gets rid of the last in-tree caller of pci_find_slot.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Eliminate this warning:
    warning: return discards qualifiers from pointer target type

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • I have no clue what the original intent here was, but the code as
    written is useless.

    The old dbg() statement above the old callsite might lead one to think
    that at one point, there was supposed to be some recursion, but any
    sense of sanity here has been lost to the ravages of time.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Instead of making multiple calls to pcibios_get_irq_routing_table, let's
    just do it once and save the answer.

    The reason we were making multiple calls is because we liked to calculate
    its length and perform some loop over it. Instead of open-coding the length
    calculation every time, provide it in an inline helper function.

    Finally, since pci_print_IRQ_route() is used only for debug, let's only
    do it when cpqhp_debug is set.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Handle an empty slot at the top of the loop, and continue early.

    This allows us to un-indent the rest of the function by one level.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Clean up style, whitespace in cpqphp_pci.c

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Check for an empty slot, and return early if so.

    This allows us to un-indent the rest of the function by one level.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Style and whitespace cleanups, no functional change.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Apply DeMorgan's theorem:

    if ((pdev->revision > 2) || (vendor_id == PCI_VENDOR_ID_INTEL))

    turns into

    if ((pdev->revision
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Clean up style and eliminate superfluous braces and parens.

    No functional change.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Impact: refactor

    Refactor code to follow convention more closely and eliminate the need
    for some useless prototypes.

    No functional change.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Clean up cpqphp.h to follow 80 column convention.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Fix up comments from C++ to C-style, wrapping if necessary, etc.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang