19 May, 2010

3 commits


12 May, 2010

30 commits

  • This patch adds additional LPC Controller DeviceIDs for the Intel Cougar
    Point PCH.

    The DeviceIDs are defined and referenced as a range of values, the same
    way Ibex Peak was implemented.

    Signed-off-by: Seth Heasley
    Signed-off-by: Jesse Barnes

    Seth Heasley
     
  • Style cleanup for pci_{en,dis}able_pcie_error_reporting().

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Skip zero-ing in aer_alloc_rpc() since it is allocated by kzalloc().
    The closing comment marker "*/" is recommended for kernel-doc comments.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • I noticed that when I inject a fatal error to an endpoint via
    aer-inject, aer_root_reset() is called as reset_link for a
    downstream port at upstream of the endpoint:

    pcieport 0000:00:06.0: AER: Uncorrected (Fatal) error received: id=5401
    :
    pcieport 0000:52:02.0: Root Port link has been reset

    It externally appears to be working, but internally issues some
    accesses to PCI_ERR_ROOT_COMMAND/STATUS registers that is for
    root port so not available on downstream port.

    This patch introduces default_downstream_reset_link that is
    a version of aer_root_reset() with no accesses to root port's
    register. It is used for downstream ports that has no reset_link
    function its specific.

    This patch also updates related description in pcieaer-howto.txt.
    Some minor fixes are included.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • The structure find_aer_service_data is no longer useful.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Reviewed-by: Jin Dongming
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • The pcie->port of port service device points the port associated
    the service with. The find_aer_service iterates over children of
    given port udev.

    So it is clear that the pcie->port of port service of given port
    udev must always point the udev.

    Therefore we can know the type of udev without checking its children.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Make it clear that we only interest in 2 *_RCV bits.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • The Error Source Identification Register (Offset 34h) is 4 byte
    which contains a couple of 2 byte field, "[15:0] ERR_COR Source
    Identification" and "[31:16] ERR_FATAL/NONFATAL Source Identification."

    This patch defines PCI_ERR_ROOT_ERR_SRC to make dword access sensible.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Move dev_printks for debug into do_recovery().
    This allows do_recovery() to return void.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Current get_e_source() returns pointer to an element of array.
    However since it also progress consume counter, it is possible
    that the element is overwritten by newly produced data before
    the element is really consumed.

    This patch changes get_e_source() to copy contents of the element
    to address pointed by its caller. Once copied the element in
    array can be consumed.

    And relocate this function to more innocuous place.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Divide tricky for-loop into readable if-blocks.

    The logic to set multi_error_valid (to force walking pci bus
    hierarchy to find 2nd~ error devices) is changed too, to check
    MULTI_{,_UN}COR_RCV bit individually and to force walk only when
    it is required.

    And rework setting e_info->severity for uncorrectable, not to use
    magic numbers.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Stop iteration if we cannot register any more.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Inline too-simple subroutine only used here.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Take core part of find_device_iter() to make a new function
    is_error_source() that checks given device has report an error
    or not.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Return bool to indicate that the source device is found or not.
    This allows us to skip calling aer_process_err_devices() if we can.

    And move dev_printk for debug into this function.

    v2: return bool instead of int

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • These functions are only called from init/remove path of aerdrv,
    so move them from aerdrv_core.c to aerdrv.c, to make them static.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • This cleanup solves some minor naming issues by removing unuseful
    function aer_delete_rootport() and by renaming disable_root_aer()
    to aer_disable_rootport().

    - Inconsistent location of alloc & free:
    The struct rpc is allocated in aer_alloc_rpc() at aerdrv.c
    while it is implicitly freed in aer_delete_rootport() at
    aerdrv_core.c.

    - Inconsistent function name:
    It makes a bit confusion that aer_delete_rootport() is seemed
    to be paired with aer_enable_rootport(), i.e. there is neither
    "add" against "delete" nor "disable" against "enable".

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Handle preserved bits properly.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • Follow new format.

    Signed-off-by: Hidetoshi Seto
    Reviewed-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Hidetoshi Seto
     
  • A successful write() to the "reset" sysfs attribute should return the
    number of bytes written, not 0. Otherwise userspace (bash) retries the
    write over and over again.

    Acked-by: Michael S. Tsirkin
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Michal Schmidt
    Signed-off-by: Jesse Barnes

    Michal Schmidt
     
  • Most current machines have no problem with this, and in fact many devices and
    features work best (or only!) with MSI.

    Reported-by: Petteri Räty
    Signed-off-by: Jesse Barnes

    Jesse Barnes
     
  • SuperIO devices share regions and use lock/unlock operations to chip
    select. We therefore need to be able to request a resource and wait for
    it to be freed by whichever other SuperIO device currently hogs it.
    Right now you have to poll which is horrible.

    Add a MUXED field to IO port resources. If the MUXED field is set on the
    resource and on the request (via request_muxed_region) then we block
    until the previous owner of the muxed resource releases their region.

    This allows us to implement proper resource sharing and locking for
    superio chips using code of the form

    enable_my_superio_dev() {
    request_muxed_region(0x44, 0x02, "superio:watchdog");
    outb() ..sequence to enable chip
    }

    disable_my_superio_dev() {
    outb() .. sequence of disable chip
    release_region(0x44, 0x02);
    }

    Signed-off-by: Giel van Schijndel
    Signed-off-by: Alan Cox
    Signed-off-by: Jesse Barnes

    Alan Cox
     
  • pci_config_lock must be a real spinlock in preempt-rt. Convert it to
    raw_spinlock. No change for !RT kernels.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Jesse Barnes

    Thomas Gleixner
     
  • pci_lock must be a real spinlock in preempt-rt. Convert it to
    raw_spinlock. No change for !RT kernels.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Jesse Barnes

    Thomas Gleixner
     
  • This patch (as1353) removes a couple of unnecessary assignments from
    the PCI core. The should_wakeup flag is naturally initialized to 0;
    there's no need to clear it.

    Acked-by: Rafael J. Wysocki
    Signed-off-by: Alan Stern
    Signed-off-by: Jesse Barnes

    Alan Stern
     
  • Create convenience symlinks in sysfs, linking slots to device
    functions, and vice versa. These links make it easier for users to
    figure out which devices actually live in what slots.

    For example:

    sapphire:/sys/bus/pci/slots # ls
    1 10 2 3 4 5 6 7 8 9

    sapphire:/sys/bus/pci/slots # ls -l 3
    total 0
    -r--r--r-- 1 root root 65536 Aug 18 14:10 address
    lrwxrwxrwx 1 root root 0 Aug 18 14:10 function0 ->
    ../../../../devices/pci0000:23/0000:23:01.0
    lrwxrwxrwx 1 root root 0 Aug 18 14:10 function1 ->
    ../../../../devices/pci0000:23/0000:23:01.1

    sapphire:/sys/bus/pci/slots # ls -l 3/function0/slot
    lrwxrwxrwx 1 root root 0 Aug 18 14:13 3/function0/slot ->
    ../../../bus/pci/slots/3

    The original form of this patch was written by Matthew Wilcox,
    and was enhanced to include links from the sysfs slots/ directory
    pointing back at the device functions.

    Cc: willy@linux.intel.com
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon: Fix 3 regressions - since buffer rework

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Fix FDDI and TR config checks in ipv4 arp and LLC.
    IPv4: unresolved multicast route cleanup
    mac80211: remove association work when processing deauth request
    ar9170: wait for asynchronous firmware loading
    ipv4: udp: fix short packet and bad checksum logging
    phy: Fix initialization in micrel driver.
    sctp: Fix a race between ICMP protocol unreachable and connect()
    veth: Dont kfree_skb() after dev_forward_skb()
    IPv6: fix IPV6_RECVERR handling of locally-generated errors
    net/gianfar: drop recycled skbs on MTU change
    iwlwifi: work around passive scan issue

    Linus Torvalds
     
  • Fix an occasional EIO returned by a call to vfs_unlink():

    [ 4868.465413] CacheFiles: I/O Error: Unlink failed
    [ 4868.465444] FS-Cache: Cache cachefiles stopped due to I/O error
    [ 4947.320011] CacheFiles: File cache on md3 unregistering
    [ 4947.320041] FS-Cache: Withdrawing cache "mycache"
    [ 5127.348683] FS-Cache: Cache "mycache" added (type cachefiles)
    [ 5127.348716] CacheFiles: File cache on md3 registered
    [ 7076.871081] CacheFiles: I/O Error: Unlink failed
    [ 7076.871130] FS-Cache: Cache cachefiles stopped due to I/O error
    [ 7116.780891] CacheFiles: File cache on md3 unregistering
    [ 7116.780937] FS-Cache: Withdrawing cache "mycache"
    [ 7296.813394] FS-Cache: Cache "mycache" added (type cachefiles)
    [ 7296.813432] CacheFiles: File cache on md3 registered

    What happens is this:

    (1) A cached NFS file is seen to have become out of date, so NFS retires the
    object and immediately acquires a new object with the same key.

    (2) Retirement of the old object is done asynchronously - so the lookup/create
    to generate the new object may be done first.

    This can be a problem as the old object and the new object must exist at
    the same point in the backing filesystem (i.e. they must have the same
    pathname).

    (3) The lookup for the new object sees that a backing file already exists,
    checks to see whether it is valid and sees that it isn't. It then deletes
    that file and creates a new one on disk.

    (4) The retirement phase for the old file is then performed. It tries to
    delete the dentry it has, but ext4_unlink() returns -EIO because the inode
    attached to that dentry no longer matches the inode number associated with
    the filename in the parent directory.

    The trace below shows this quite well.

    [md5sum] ==> __fscache_relinquish_cookie(ffff88002d12fb58{NFS.fh,ffff88002ce62100},1)
    [md5sum] ==> __fscache_acquire_cookie({NFS.server},{NFS.fh},ffff88002ce62100)

    NFS has retired the old cookie and asked for a new one.

    [kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_ACTIVE,24})
    [kslowd] OBJECT_DYING]
    [kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_INIT,0})
    [kslowd] OBJECT_LOOKING_UP]
    [kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_DYING,24})
    [kslowd] OBJECT_RECYCLING]

    The old object (OBJ52) is going through the terminal states to get rid of it,
    whilst the new object - (OBJ53) - is coming into being.

    [kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_LOOKING_UP,0})
    [kslowd] ==> cachefiles_walk_to_object({ffff88003029d8b8},OBJ53,@68,)
    [kslowd] lookup '@68'
    [kslowd] next -> ffff88002ce41bd0 positive
    [kslowd] advance
    [kslowd] lookup 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
    [kslowd] next -> ffff8800369faac8 positive

    The new object has looked up the subdir in which the file would be in (getting
    dentry ffff88002ce41bd0) and then looked up the file itself (getting dentry
    ffff8800369faac8).

    [kslowd] validate 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
    [kslowd] ==> cachefiles_bury_object(,'@68','Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA')
    [kslowd] remove ffff8800369faac8 from ffff88002ce41bd0
    [kslowd] unlink stale object
    [kslowd] inode does not match i_ino.

    [kslowd] OBJECT_DEAD]
    [kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_AVAILABLE,0})
    [kslowd] OBJECT_ACTIVE]

    (Note that the above trace includes extra information beyond that produced by
    the upstream code).

    The fix is to note when an object that is being retired has had its object
    deleted preemptively by a replacement object that is being created, and to
    skip the second removal attempt in such a case.

    Reported-by: Greg M
    Reported-by: Mark Moseley
    Reported-by: Romain DEGEZ
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Duplicate entries ended up acpisleep_dmi_table[] by accident.
    They don't hurt functionality, but they are ugly, so let's get
    rid of them.

    Cc: stable@kernel.org
    Signed-off-by: Alex Chiang
    Signed-off-by: Linus Torvalds

    Alex Chiang
     

11 May, 2010

5 commits


10 May, 2010

2 commits