17 Jun, 2009

3 commits


12 Jun, 2009

29 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
     
  • Clean up all stray whitespace issues, such as trailing whitespace,
    spaces before tabs, etc. and whatever else vim's c_space_errors
    highlights in red.

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

    Alex Chiang
     
  • We could run out of space under under 4g, but devices under transparent
    bridges can use 64bit resources, so keep trying on the parent bus until
    we hit a non-transparent bridge.

    Impact: better support for assigning unassigned resources

    Reviewed-by: Ivan Kokshaysky
    Signed-off-by: Yinghai Lu
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     
  • We should not assign 64bit ranges to PCI devices that only take 32bit
    prefetchable addresses.

    Try to set IORESOURCE_MEM_64 in 64bit resource of pci_device/pci_bridge
    and make the bus resource only have that bit set when all devices under
    it support 64bit prefetchable memory. Use that flag to allocate
    resources from that range.

    Reported-by: Yannick
    Reviewed-by: Ivan Kokshaysky
    Signed-off-by: Yinghai Lu
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     
  • Impact: cleanup, improve readability

    Define PCI_MSI_MASK_32/64 for 32/64bit devices, instead of using
    implicit offset (-4), "PCI_MSI_MASK_BIT - 4" and "PCI_MSI_MASK_BIT".

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Matthew Wilcox
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • drivers/pci/hotplug/ibmphp_core.c:1414: warning: `ibmphp_exit' defined but not used

    Signed-off-by: Zhenwen Xu
    Signed-off-by: Andrew Morton
    Signed-off-by: Jesse Barnes

    akpm@linux-foundation.org
     
  • In the near future, the driver core is going to not allow direct access
    to the driver_data pointer in struct device. Instead, the functions
    dev_get_drvdata() and dev_set_drvdata() should be used. These functions
    have been around since the beginning, so are backwards compatible with
    all older kernel versions.

    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Jesse Barnes

    Greg Kroah-Hartman
     
  • Impact: cleanup, spec compliance

    This patch does:

    - Remove unused msi/msix_enable/disable macros.
    User should use msi/msix_set_enable() functions instead.

    - Remove unused msix_mask/unmask/pending macros.
    These macros are useless because they are not based on any of
    the PCI Local Bus Specifications properly.
    It seems that they were written based on a draft of PCI spec,
    and that the draft was the MSI-X ECN that underwent membership
    review in September 2002.
    (* In the draft, the size of a entry in MSI-X table was 64bit,
    containing 32bit message data and DWORD aligned lower address
    plus a pending bit and a mask bit.(30+1+1bit) The higher
    address was placed in MSI-X capability structure and shared
    by all entries.)

    - Remove PCI_MSIX_FLAGS_BITMASK.
    This definition also come from the draft ECN.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Matthew Wilcox
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     

10 Jun, 2009

5 commits

  • Linus Torvalds
     
  • There's a bug in the mxser kernel module that still appears in the
    2.6.29.4 kernel.

    mxser_get_ISA_conf takes a ioaddress as its first argument, by passing the
    not of the ioaddr, you're effectively passing 0 which means it won't be
    able to talk to an ISA card. I have tested this, and removing the !
    fixes the problem.

    Cc: "Peter Botha"
    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Botha
     
  • In commit code, we scan buffers attached to a transaction. During this
    scan, we sometimes have to drop j_list_lock and then we recheck whether
    the journal buffer head didn't get freed by journal_try_to_free_buffers().
    But checking for buffer_jbd(bh) isn't enough because a new journal head
    could get attached to our buffer head. So add a check whether the journal
    head remained the same and whether it's still at the same transaction and
    list.

    This is a nasty bug and can cause problems like memory corruption (use after
    free) or trigger various assertions in JBD code (observed).

    Signed-off-by: Jan Kara
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • The recent ->lookup() deadlock correction required the directory inode
    mutex to be dropped while waiting for expire completion. We were
    concerned about side effects from this change and one has been identified.

    I saw several error messages.

    They cause autofs to become quite confused and don't really point to the
    actual problem.

    Things like:

    handle_packet_missing_direct:1376: can't find map entry for (43,1827932)

    which is usually totally fatal (although in this case it wouldn't be
    except that I treat is as such because it normally is).

    do_mount_direct: direct trigger not valid or already mounted
    /test/nested/g3c/s1/ss1

    which is recoverable, however if this problem is at play it can cause
    autofs to become quite confused as to the dependencies in the mount tree
    because mount triggers end up mounted multiple times. It's hard to
    accurately check for this over mounting case and automount shouldn't need
    to if the kernel module is doing its job.

    There was one other message, similar in consequence of this last one but I
    can't locate a log example just now.

    When checking if a mount has already completed prior to adding a new mount
    request to the wait queue we check if the dentry is hashed and, if so, if
    it is a mount point. But, if a mount successfully completed while we
    slept on the wait queue mutex the dentry must exist for the mount to have
    completed so the test is not really needed.

    Mounts can also be done on top of a global root dentry, so for the above
    case, where a mount request completes and the wait queue entry has already
    been removed, the hashed test returning false can cause an incorrect
    callback to the daemon. Also, d_mountpoint() is not sufficient to check
    if a mount has completed for the multi-mount case when we don't have a
    real mount at the base of the tree.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • The massive nommu update (8feae131) resulted in these warnings:
    ipc/shm.c: In function `sys_shmdt':
    ipc/shm.c:974: warning: unused variable `size'
    ipc/shm.c:972: warning: unused variable `next'

    Signed-off-by: Mike Frysinger
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     

09 Jun, 2009

3 commits