Skip to content
Commits on Jun 1, 2012
  1. @gregkh

    Linux 3.4.1

    gregkh committed
  2. @gregkh

    i2c: tegra: notify transfer-complete after clearing status.

    Laxman Dewangan committed with gregkh
    commit c889e91 upstream.
    The notification of the transfer complete by calling complete()
    should be done after clearing all interrupt status.
    This avoids the race condition of misconfigure the i2c controller
    in multi-core environment.
    Signed-off-by: Laxman Dewangan <>
    Acked-by: Stephen Warren <>
    Signed-off-by: Wolfram Sang <>
    Signed-off-by: Greg Kroah-Hartman <>
  3. @marcusfolkesson @gregkh

    i2c: davinci: Free requested IRQ in remove

    marcusfolkesson committed with gregkh
    commit 9868a06 upstream.
    The freed IRQ is not necessary the one requested in probe.
    Even if it was, with two or more i2c-controllers it will fails anyway.
    Signed-off-by: Marcus Folkesson <>
    Signed-off-by: Wolfram Sang <>
    Signed-off-by: Greg Kroah-Hartman <>
  4. @gregkh

    MCE: Fix vm86 handling for 32bit mce handler

    Andi Kleen committed with gregkh
    commit a129a7c upstream.
    When running on 32bit the mce handler could misinterpret
    vm86 mode as ring 0. This can affect whether it does recovery
    or not; it was possible to panic when recovery was actually
    Fix this by always forcing vm86 to look like ring 3.
    Signed-off-by: Andi Kleen <>
    Signed-off-by: Tony Luck <>
    Signed-off-by: Greg Kroah-Hartman <>
  5. @swarren @gregkh

    ARM: dt: tegra cardhu: fix typo in SDHCI node name

    swarren committed with gregkh
    commit 1dfebb4 upstream.
    Cardhu's eMMC controller is on sdhci@7800060, not sdhci@7800040.
    Fix the typo. This roughly doubles the IO performance, since the
    support-8bit property actually takes effect.
    Signed-off-by: Stephen Warren <>
    Signed-off-by: Greg Kroah-Hartman <>
  6. @gregkh

    ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held

    Dima Zavin committed with gregkh
    commit 435a7ef upstream.
    We can't be holding the mmap_sem while calling flush_cache_user_range
    because the flush can fault. If we fault on a user address, the
    page fault handler will try to take mmap_sem again. Since both places
    acquire the read lock, most of the time it succeeds. However, if another
    thread tries to acquire the write lock on the mmap_sem (e.g. mmap) in
    between the call to flush_cache_user_range and the fault, the down_read
    in do_page_fault will deadlock.
    [will: removed drop of vma parameter as already queued by rmk (7365/1)]
    Acked-by: Catalin Marinas <>
    Signed-off-by: Dima Zavin <>
    Signed-off-by: John Stultz <>
    Signed-off-by: Will Deacon <>
    Signed-off-by: Russell King <>
    Signed-off-by: Greg Kroah-Hartman <>
  7. @gregkh

    ARM: 7365/1: drop unused parameter from flush_cache_user_range

    Dima Zavin committed with gregkh
    commit 4542b6a upstream.
    vma isn't used and flush_cache_user_range isn't a standard macro that
    is used on several archs with the same prototype. In fact only unicore32
    has a macro with the same name (with an identical implementation and no
    in-tree users).
    This is a part of a patch proposed by Dima Zavin (with Message-id: that didn't get
    Cc: Dima Zavin <>
    Acked-by: Catalin Marinas <>
    Signed-off-by: Uwe Kleine-König <>
    Signed-off-by: Russell King <>
    Cc: Will Deacon <>
    Signed-off-by: Greg Kroah-Hartman <>
  8. @gregkh

    iommu: Fix off by one in dmar_get_fault_reason()

    Dan Carpenter committed with gregkh
    commit fefe1ed upstream.
    fault_reason - 0x20 == ARRAY_SIZE(irq_remap_fault_reasons) is
    one past the end of the array.
    Signed-off-by: Dan Carpenter <>
    Cc: Joerg Roedel <>
    Cc: Youquan Song <>
    Cc: walter harms <>
    Cc: Suresh Siddha <>
    Signed-off-by: Ingo Molnar <>
    [bwh: Backported to 3.2: s/irq_remap_fault_reasons/intr_remap_fault_reasons/]
    Signed-off-by: Ben Hutchings <>
    Signed-off-by: Greg Kroah-Hartman <>
  9. @dwmw2 @gregkh

    intel-iommu: Add device info into list before doing context mapping

    dwmw2 committed with gregkh
    commit e2ad23d upstream.
    Add device info into list before doing context mapping, because device
    info will be used by iommu_enable_dev_iotlb(). Without it, ATS won't get
    enabled as it should be.
    ATS, while a dubious decision from a security point of view, can be very
    important for performance.
    Signed-off-by: Xudong Hao <>
    Signed-off-by: Xiantao Zhang <>
    Acked-by: Chris Wright <>
    Signed-off-by: David Woodhouse <>
    Signed-off-by: Linus Torvalds <>
    Signed-off-by: Greg Kroah-Hartman <>
  10. @cmetcalf-tilera @gregkh

    tile: fix bug where fls(0) was not returning 0

    cmetcalf-tilera committed with gregkh
    commit 9f1d62b upstream.
    This is because __builtin_clz(0) returns 64 for the "undefined" case
    of 0, since the builtin just does a right-shift 32 and "clz" instruction.
    So, use the alpha approach of casting to u32 and using __builtin_clzll().
    Signed-off-by: Chris Metcalf <>
    Signed-off-by: Greg Kroah-Hartman <>
  11. @gregkh

    mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq

    Ming Lei committed with gregkh
    commit db35f83 upstream.
    The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
    otherwise the following failure message should be dumped because
    hardware handler is defined as NULL:
    [    3.383483] genirq: Threaded irq requested with handler=NULL and
    !ONESHOT for irq 368
    [    3.392730] omap_hsmmc: probe of omap_hsmmc.0 failed with error -22
    The patch fixes one kernel hang bug which is caused by mmc card
    probe failure and root device can't be brought up.
    Signed-off-by: Ming Lei <>
    Acked-by: Venkatraman S <>
    Signed-off-by: Chris Ball <>
    Signed-off-by: Greg Kroah-Hartman <>
  12. @lyakh @gregkh

    mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free()

    lyakh committed with gregkh
    commit 0e9f480 upstream.
    Do not oops, even if mmc_cd_gpio_free() is mistakenly called on a driver
    cleanup path, even though a previous call to mmc_cd_gpio_request() failed.
    Signed-off-by: Guennadi Liakhovetski <>
    [stable@: please apply to 3.3-stable]
    Signed-off-by: Chris Ball <>
    Signed-off-by: Greg Kroah-Hartman <>
  13. @gregkh

    mmc: sdio: avoid spurious calls to interrupt handlers

    Nicolas Pitre committed with gregkh
    commit bbbc4c4 upstream.
    Commit 06e8935 ("optimized SDIO IRQ handling for single irq")
    introduced some spurious calls to SDIO function interrupt handlers,
    such as when the SDIO IRQ thread is started, or the safety check
    performed upon a system resume.  Let's add a flag to perform the
    optimization only when a real interrupt is signaled by the host
    driver and we know there is no point confirming it.
    Reported-by: Sujit Reddy Thumma <>
    Signed-off-by: Nicolas Pitre <>
    Signed-off-by: Chris Ball <>
    Signed-off-by: Greg Kroah-Hartman <>
  14. @gregkh

    x86/mce: Fix check for processor context when machine check was taken.

    Tony Luck committed with gregkh
    commit 875e266 upstream.
    Linus pointed out that there was no value is checking whether m->ip
    was zero - because zero is a legimate value.  If we have a reliable
    (or faked in the VM86 case) "m->cs" we can use it to tell whether we
    were in user mode or kernelwhen the machine check hit.
    Reported-by: Linus Torvalds <>
    Signed-off-by: Tony Luck <>
    Signed-off-by: Greg Kroah-Hartman <>
  15. @gregkh

    x86, relocs: Add jiffies and jiffies_64 to the relative whitelist

    H. Peter Anvin committed with gregkh
    commit ea17e74 upstream.
    The symbol jiffies is created in the linker script as an alias to
    jiffies_64.  Unfortunately this is done outside any section, and
    apparently GNU ld 2.21 doesn't carry the section with it, so we end up
    with an absolute symbol and therefore a broken kernel.
    Add jiffies and jiffies_64 to the whitelist.
    The most disturbing bit with this discovery is that it shows that we
    have had multiple linker bugs in this area crossing multiple
    generations, and have been silently building bad kernels for some time.
    Reported-by: Stephen Rothwell <>
    Signed-off-by: H. Peter Anvin <>
    Signed-off-by: Greg Kroah-Hartman <>
  16. @gregkh

    x86-32, relocs: Whitelist more symbols for ld bug workaround

    H. Peter Anvin committed with gregkh
    commit fd95281 upstream.
    As noted in checkin:
    a3e854d x86, relocs: Workaround for binutils section bug
    ld version[12] can incorrectly promote relative symbols to
    absolute, if the output section they appear in is otherwise empty.
    Since checkin:
    6520fe5 x86, realmode: 16-bit real-mode code support for relocs tool
    we actually check for this and error out rather than silently creating
    a kernel which will malfunction if relocated.
    Ingo found a configuration in which __start_builtin_fw triggered the
    Go through the linker script sources and look for more symbols that
    could plausibly get bogusly promoted to absolute, and add them to the
    In general, if the following error triggers:
    	Invalid absolute R_386_32 relocation: <symbol>
    ... then we should verify that <symbol> is really meant to be
    relocated, and add it and any related symbols manually to the S_REL
    Please note that 6520fe5 does not introduce the error, only the check
    for the error -- without 6520fe5 this version of ld will simply
    produce a corrupt kernel if CONFIG_RELOCATABLE is set on x86-32.
    Reported-by: Ingo Molnar <>
    Signed-off-by: H. Peter Anvin <>
    Signed-off-by: Greg Kroah-Hartman <>
  17. @gregkh

    x86, relocs: Build clean fix

    Jarkko Sakkinen committed with gregkh
    commit b2d668d upstream.
    relocs was not cleaned up when "make clean" is issued. This
    patch fixes the issue.
    Signed-off-by: Jarkko Sakkinen <>
    Signed-off-by: H. Peter Anvin <>
    Signed-off-by: Greg Kroah-Hartman <>
  18. @pinchartl @gregkh

    media: uvcvideo: Fix ENUMINPUT handling

    pinchartl committed with gregkh
    commit 31c5f0c upstream.
    Properly validate the user-supplied index against the number of inputs.
    The code used the pin local variable instead of the index by mistake.
    Reported-by: Jozef Vesely <>
    Signed-off-by: Laurent Pinchart <>
    Signed-off-by: Mauro Carvalho Chehab <>
    Signed-off-by: Greg Kroah-Hartman <>
  19. @mkrufky @gregkh

    smsusb: add autodetection support for USB ID 2040:c0a0

    mkrufky committed with gregkh
    commit 4d1b58b upstream.
    Signed-off-by: Michael Krufky <>
    Signed-off-by: Mauro Carvalho Chehab <>
    Signed-off-by: Greg Kroah-Hartman <>
  20. @gregkh

    nouveau: nouveau_set_bo_placement takes TTM flags

    Dave Airlie committed with gregkh
    commit c284815 upstream.
    This seems to be wrong to me, spotted while thinking about dma-buf.
    Reviewed-by: Ben Skeggs <>
    Signed-off-by: Dave Airlie <>
    Signed-off-by: Greg Kroah-Hartman <>
  21. @sstabellini @gregkh

    xen: do not map the same GSI twice in PVHVM guests.

    sstabellini committed with gregkh
    commit 68c2c39 upstream.
    PV on HVM guests map GSIs into event channels. At restore time the
    event channels are resumed by restore_pirqs.
    Device drivers might try to register the same GSI again through ACPI at
    restore time, but the GSI has already been mapped and bound by
    restore_pirqs. This patch detects these situations and avoids
     mapping the same GSI multiple times.
    Without this patch we get:
    (XEN) irq.c:2235: dom4: pirq 23 or emuirq 28 already mapped
    and waste a pirq.
    Signed-off-by: Stefano Stabellini <>
    Signed-off-by: Konrad Rzeszutek Wilk <>
    Signed-off-by: Greg Kroah-Hartman <>
  22. @gregkh

    hvc_xen: NULL dereference on allocation failure

    Dan Carpenter committed with gregkh
    commit 201a52b upstream.
    If kzalloc() returns a NULL here, we pass a NULL to
    xencons_disconnect_backend() which will cause an Oops.
    Also I removed the __GFP_ZERO while I was at it since kzalloc() implies
    Acked-by: Stefano Stabellini <>
    Signed-off-by: Dan Carpenter <>
    Signed-off-by: Konrad Rzeszutek Wilk <>
    Signed-off-by: Greg Kroah-Hartman <>
  23. @gregkh

    spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control

    Herton Ronaldo Krzesinski committed with gregkh
    commit 067aa48 upstream.
    Commit 178db7d, "spi: Fix device unregistration when unregistering
    the bus master", changed spi device initialization of dev.parent pointer
    to be the master's device pointer instead of his parent.
    This introduced a bug in spi-fsl-spi, since its usage of spi device
    pointer was not updated accordingly. This was later fixed by commit
    5039a86, "spi/mpc83xx: fix NULL pdata dereference bug", but it missed
    another spot on fsl_spi_cs_control function where we also need to update
    usage of spi device pointer. This change address that.
    Signed-off-by: Herton Ronaldo Krzesinski <>
    Acked-by: Joakim Tjernlund <>
    Signed-off-by: Grant Likely <>
    Signed-off-by: Greg Kroah-Hartman <>
  24. @gregkh

    gpio: mpc8xxx: Prevent NULL pointer deref in demux handler

    Thomas Gleixner committed with gregkh
    commit d6de85e upstream.
    commit cfadd83(powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO
    driver) added an unconditional call of chip->irq_eoi() to the demux
    This leads to a NULL pointer derefernce on MPC512x platforms which use
    this driver as well.
    Make it conditional.
    Reported-by: Thomas Wucher <>
    Signed-off-by: Thomas Gleixner <>
    Cc: Felix Radensky <>
    Cc: Kumar Gala <>
    Cc: Grant Likely <>
    Signed-off-by: Grant Likely <>
    Signed-off-by: Greg Kroah-Hartman <>
  25. @danvet @gregkh

    drm/i915: don't clobber the pipe param in sanitize_modesetting

    danvet committed with gregkh
    commit a9dcf84 upstream.
    ... we need it later on in the function to clean up pipe <-> plane
    associations. This regression has been introduced in
    commit f47166d
    Author: Chris Wilson <>
    Date:   Thu Mar 22 15:00:50 2012 +0000
        drm/i915: Sanitize BIOS debugging bits from PIPECONF
    Spotted by staring at debug output of an (as it turns out) totally
    unrelated bug.
    v2: I've totally failed to do the s/pipe/i/ correctly, spotted by
    Chris Wilson.
    Reviewed-by: Chris Wilson <>
    Reviewed-by: Eugeni Dodonov <>
    Signed-Off-by: Daniel Vetter <>
    Signed-off-by: Greg Kroah-Hartman <>
  26. @bwidawsk @gregkh

    drm/i915: [GEN7] Use HW scheduler for fixed function shaders

    bwidawsk committed with gregkh
    commit a1e969e upstream.
    This originally started as a patch from Bernard as a way of simply
    setting the VS scheduler. After submitting the RFC patch, we decided to
    also modify the DS scheduler. To be most explicit, I've made the patch
    explicitly set all scheduler modes, and included the defines for other
    modes (in case someone feels frisky later).
    The rest of the story gets a bit weird. The first version of the patch
    showed an almost unbelievable performance improvement. Since rebasing my
    branch it appears the performance improvement has gone, unfortunately.
    But setting these bits seem to be the right thing to do given that the
    docs describe corruption that can occur with the default settings.
    In summary, I am seeing no more perf improvements (or regressions) in my
    limited testing, but we believe this should be set to prevent rendering
    corruption, therefore cc stable.
    v1: Clear bit 4 also (Ken + Eugeni)
    Do a full clear + set of the bits we want (Me).
    Cc: Bernard Kilarski <>
    Reviewed-by (RFC): Kenneth Graunke <>
    Signed-off-by: Ben Widawsky <>
    Reviewed-by: Eugeni Dodonov <>
    Reviewed-by: Kenneth Graunke <>
    Signed-off-by: Daniel Vetter <>
    Signed-off-by: Greg Kroah-Hartman <>
  27. @ickle @gregkh

    drm/i915: Avoid a double-read of PCH_IIR during interrupt handling

    ickle committed with gregkh
    commit 9adab8b upstream.
    Currently the code re-reads PCH_IIR during the hotplug interrupt
    processing. Not only is this a wasted read, but introduces a potential
    for handling a spurious interrupt as we then may not clear all the
    interrupts processed (since the re-read IIR may contains more interrupts
    asserted than we clear using the result of the original read).
    Signed-off-by: Chris Wilson <>
    Cc: Jesse Barnes <>
    Signed-off-by: Daniel Vetter <>
    Signed-off-by: Greg Kroah-Hartman <>
  28. @lwfinger @gregkh

    b43legacy: Fix error due to MMIO access with SSB unpowered

    lwfinger committed with gregkh
    commit 8f4b203 upstream.
    There is a dummy read of a PCI MMIO register that occurs before the SSB bus
    has been powered, which is an error. This bug has not been seen earlier,
    but was apparently exposed when udev was updated to version 182.
    Signed-off-by: Larry Finger <>
    Signed-off-by: John W. Linville <>
    Signed-off-by: Greg Kroah-Hartman <>
  29. @gregkh

    gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports

    Alan Cox committed with gregkh
    commit 7beff62 upstream.
    Reported-by: Guillaume Clément <>
    Signed-off-by: Alan Cox <>
    Signed-off-by: Dave Airlie <>
    Signed-off-by: Greg Kroah-Hartman <>
  30. @Andiry @gregkh

    usbcore: enable USB2 LPM if port suspend fails

    Andiry committed with gregkh
    commit c3e751e upstream.
    USB2 LPM is disabled when device begin to suspend and enabled after device
    is resumed. That's because USB spec does not define the transition from
    U1/U2 state to U3 state.
    If usb_port_suspend() fails, usb_port_resume() is never called, and USB2 LPM
    is disabled in this situation. Enable USB2 LPM if port suspend fails.
    This patch should be backported to kernels as old as 3.2, that contain
    the commit 65580b4 "xHCI: set USB2
    hardware LPM".
    Signed-off-by: Andiry Xu <>
    Signed-off-by: Sarah Sharp <>
    Signed-off-by: Greg Kroah-Hartman <>
  31. @gregkh

    USB: fix resource leak in xhci power loss path

    Oliver Neukum committed with gregkh
    commit f8a9e72 upstream.
    Some more data structures must be freed and counters
    reset if an XHCI controller has lost power. The failure
    to do so renders some chips inoperative after a certain number
    of S4 cycles.
    This patch should be backported to kernels as old as 3.2,
    that contain the commits c29eea6
    "xhci: Implement HS/FS/LS bandwidth checking." and
    commit 839c817
    "xhci: Implement HS/FS/LS bandwidth checking."
    Signed-off-by: Oliver Neukum <>
    Signed-off-by: Sarah Sharp <>
    Signed-off-by: Greg Kroah-Hartman <>
  32. @gregkh

    xhci: Add new short TX quirk for Fresco Logic host.

    Sarah Sharp committed with gregkh
    commit 1530bbc upstream.
    Sergio reported that when he recorded audio from a USB headset mic
    plugged into the USB 3.0 port on his ASUS N53SV-DH72, the audio sounded
    "robotic".  When plugged into the USB 2.0 port under EHCI on the same
    laptop, the audio sounded fine.  The device is:
    Bus 002 Device 004: ID 046d:0a0c Logitech, Inc. Clear Chat Comfort USB Headset
    The problem was tracked down to the Fresco Logic xHCI host controller
    not correctly reporting short transfers on isochronous IN endpoints.
    The driver would submit a 96 byte transfer, the device would only send
    88 or 90 bytes, and the xHCI host would report the transfer had a
    "successful" completion code, with an untransferred buffer length of 8
    or 6 bytes.
    The successful completion code and non-zero untransferred length is a
    contradiction.  The xHCI host is supposed to only mark a transfer as
    successful if all the bytes are transferred.  Otherwise, the transfer
    should be marked with a short packet completion code.  Without the EHCI
    bus trace, we wouldn't know whether the xHCI driver should trust the
    completion code or the untransferred length.  With it, we know to trust
    the untransferred length.
    Add a new xHCI quirk for the Fresco Logic host controller.  If a
    transfer is reported as successful, but the untransferred length is
    non-zero, print a warning.  For the Fresco Logic host, change the
    completion code to COMP_SHORT_TX and process the transfer like a short
    This should be backported to stable kernels that contain the commit
    f5182b4 "xhci: Disable MSI for some
    Fresco Logic hosts."  That commit was marked for stable kernels as old
    as 2.6.36.
    Signed-off-by: Sarah Sharp <>
    Reported-by: Sergio Correia <>
    Tested-by: Sergio Correia <>
    Signed-off-by: Sarah Sharp <>
    Signed-off-by: Greg Kroah-Hartman <>
  33. @gregkh

    xhci: Reset reserved command ring TRBs on cleanup.

    Sarah Sharp committed with gregkh
    commit 33b2831 upstream.
    When the xHCI driver needs to clean up memory (perhaps due to a failed
    register restore on resume from S3 or resume from S4), it needs to reset
    the number of reserved TRBs on the command ring to zero.  Otherwise,
    several resume cycles (about 30) with a UAS device attached will
    continually increment the number of reserved TRBs, until all command
    submissions fail because there isn't enough room on the command ring.
    This patch should be backported to kernels as old as 2.6.32,
    that contain the commit 913a8a3
    "USB: xhci: Change how xHCI commands are handled."
    Signed-off-by: Sarah Sharp <>
    Signed-off-by: Greg Kroah-Hartman <>
  34. @jwrdegoede @gregkh

    usb-xhci: Handle COMP_TX_ERR for isoc tds

    jwrdegoede committed with gregkh
    commit 9c74599 upstream.
    While testing unplugging an UVC HD webcam with usb-redirection (so through
    usbdevfs), my userspace usb-redir code was getting a value of -1 in
    iso_frame_desc[n].status, which according to Documentation/usb/error-codes.txt
    is not a valid value.
    The source of this -1 is the default case in xhci-ring.c:process_isoc_td()
    adding a kprintf there showed the value of trb_comp_code to be COMP_TX_ERR
    in this case, so this patch adds handling for that completion code to
    This was observed and tested with the following xhci controller:
    1033:0194 NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
    Note: I also wonder if setting frame->status to -1 (-EPERM) is the best we can
    do, but since I cannot come up with anything better I've left that as is.
    This patch should be backported to kernels as old as 2.6.36, which contain the
    commit 04e5190 "USB: xHCI: Isochronous
    transfer implementation".
    Signed-off-by: Hans de Goede <>
    Signed-off-by: Sarah Sharp <>
    Signed-off-by: Greg Kroah-Hartman <>
  35. @gregkh

    xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n

    Sarah Sharp committed with gregkh
    commit 51c9e6c upstream.
    If the user chooses to say "no" to CONFIG_USB_XHCI_HCD on a system
    with an Intel Panther Point chipset, the PCI quirks code or the EHCI
    driver will switch the ports over to the xHCI host, but the xHCI driver
    will never load.  The ports will be powered off and seem "dead" to the
    Fix this by only switching the ports over if CONFIG_USB_XHCI_HCD is
    either compiled in, or compiled as a module.
    This patch should be backported to stable kernels as old as 3.0,
    that contain commit 69e848c
    "Intel xhci: Support EHCI/xHCI port switching."
    Signed-off-by: Sarah Sharp <>
    Reported-by: Eric Anholt <>
    Reported-by: David Bein <>
    Signed-off-by: Greg Kroah-Hartman <>
Something went wrong with that request. Please try again.