Linux 3.0.24

commit 12b4af6966843baf7bb3aedbae93e69ae19405b0
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Mar 12 10:58:19 2012 -0700

    Linux 3.0.24

commit 3c75a0e28889e755119ab32310a3385416cd6e7d
Author: Christian Gmeiner <christian.gmeiner@gmail.com>
Date:   Tue Dec 13 21:30:04 2011 +0100

    mfd: Fix cs5535 section mismatch

    commit 97e43c983c721a47546e6db3b7711dcd912a6481 upstream.

    Silence following warnings:
    WARNING: drivers/mfd/cs5535-mfd.o(.data+0x20): Section mismatch in
    reference from the variable cs5535_mfd_drv to the function
    .devinit.text:cs5535_mfd_probe()
    The variable cs5535_mfd_drv references
    the function __devinit cs5535_mfd_probe()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: drivers/mfd/cs5535-mfd.o(.data+0x28): Section mismatch in
    reference from the variable cs5535_mfd_drv to the function
    .devexit.text:cs5535_mfd_remove()
    The variable cs5535_mfd_drv references
    the function __devexit cs5535_mfd_remove()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    Rename the variable from *_drv to *_driver so
    modpost ignore the OK references to __devinit/__devexit
    functions.

    Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
    Acked-by: Andres Salomon <dilinger@queued.net>
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e0f8bcb6766ac0960ec0b92e92c62db48f2a1716
Author: Danny Kukawka <danny.kukawka@bisect.de>
Date:   Thu Feb 2 14:20:29 2012 +0100

    cs5535-mfgpt: don't call __init function from __devinit

    commit 474de3bbadd9cb75ffc32cc759c40d868343d46c upstream.

    Fix scan_timers() to be __devinit and not __init since
    the function get called from cs5535_mfgpt_probe which is
    __devinit.

    Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1a5fab846c9b97358a547031d27eabc1e257bd52
Author: Jonathan E Brassow <jbrassow@redhat.com>
Date:   Wed Mar 7 19:09:48 2012 +0000

    dm raid: fix flush support

    commit 0ca93de9b789e0eb05e103f0c04de72df13da73a upstream.

    Fix dm-raid flush support.

    Both md and dm have support for flush, but the dm-raid target
    forgot to set the flag to indicate that flushes should be
    passed on.  (Important for data integrity e.g. with writeback cache
    enabled.)

    Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
    Acked-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Alasdair G Kergon <agk@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a7a61e534fbf7cd924b14de0e0215dcfebbbb420
Author: Milan Broz <mbroz@redhat.com>
Date:   Wed Mar 7 19:09:37 2012 +0000

    dm io: fix discard support

    commit 0c535e0d6f463365c29623350dbd91642363c39b upstream.

    This patch fixes a crash by recognising discards in dm_io.

    Currently dm_mirror can send REQ_DISCARD bios if running over a
    discard-enabled device and without support in dm_io the system
    crashes badly.

    BUG: unable to handle kernel paging request at 00800000
    IP:  __bio_add_page.part.17+0xf5/0x1e0
    ...
     bio_add_page+0x56/0x70
     dispatch_io+0x1cf/0x240 [dm_mod]
     ? km_get_page+0x50/0x50 [dm_mod]
     ? vm_next_page+0x20/0x20 [dm_mod]
     ? mirror_flush+0x130/0x130 [dm_mirror]
     dm_io+0xdc/0x2b0 [dm_mod]
    ...

    Introduced in 2.6.38-rc1 by commit 5fc2ffeabb9ee0fc0e71ff16b49f34f0ed3d05b4
    (dm raid1: support discard).

    Signed-off-by: Milan Broz <mbroz@redhat.com>
    Acked-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Alasdair G Kergon <agk@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 68294b023ff7d637dbd617a93aa435e1b894760f
Author: Sebastian Siewior <bigeasy@linutronix.de>
Date:   Wed Mar 7 10:19:28 2012 +0000

    net/usbnet: avoid recursive locking in usbnet_stop()

    commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d upstream.

    |kernel BUG at kernel/rtmutex.c:724!
    |[<c029599c>] (rt_spin_lock_slowlock+0x108/0x2bc) from [<c01c2330>] (defer_bh+0x1c/0xb4)
    |[<c01c2330>] (defer_bh+0x1c/0xb4) from [<c01c3afc>] (rx_complete+0x14c/0x194)
    |[<c01c3afc>] (rx_complete+0x14c/0x194) from [<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0)
    |[<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0) from [<c01e1ff4>] (musb_giveback+0x34/0x40)
    |[<c01e1ff4>] (musb_giveback+0x34/0x40) from [<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0)
    |[<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0) from [<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c)
    |[<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c) from [<c01e2ed0>] (musb_urb_dequeue+0xec/0x108)
    |[<c01e2ed0>] (musb_urb_dequeue+0xec/0x108) from [<c01cbb90>] (unlink1+0xbc/0xcc)
    |[<c01cbb90>] (unlink1+0xbc/0xcc) from [<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8)
    |[<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8) from [<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58)
    |[<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58) from [<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c)
    |[<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c) from [<c01c2d68>] (usbnet_stop+0x100/0x15c)
    |[<c01c2d68>] (usbnet_stop+0x100/0x15c) from [<c020f718>] (__dev_close_many+0x94/0xc8)

    defer_bh() takes the lock which is hold during unlink_urbs(). The safe
    walk suggest that the skb will be removed from the list and this is done
    by defer_bh() so it seems to be okay to drop the lock here.

    Reported-by: AnÃ­bal Almeida Pinto <anibal.pinto@efacec.com>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Acked-by: Oliver Neukum <oliver@neukum.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e2d2432af8bd7d9e4b290288240539b26d94de94
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Mar 7 23:33:00 2012 +0100

    drm/radeon/kms: set SX_MISC in the r6xx blit code (v2)

    commit cf00790dea6f210ddd01a6656da58c7c9a4ea0e4 upstream.

    Mesa may set it to 1, causing all primitives to be killed.

    v2: also update the r7xx code

    Signed-off-by: Marek Olšák <maraeo@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2070216144d9c8ff4894a443b093277b42342b12
Author: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Date:   Thu Feb 23 16:53:34 2012 +0100

    carl9170: Fix memory accounting when sta is in power-save mode.

    commit 992d52529d7840236d3059b51c15d5eb9e81a869 upstream.

    On Access Point mode, when transmitting a packet, if the destination
    station is in powersave mode, we abort transmitting the packet to the
    device queue, but we do not reclaim the allocated memory.  Given enough
    packets, we can go in a state where there is no packet on the device
    queue, but we think the device has no memory left, so no packet gets
    transmitted, connections breaks and the AP stops working.

    This undo the allocation done in the TX path when the station is in
    power-save mode.

    Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
    Acked-by: Christian Lamparter <chunkeey@googlemail.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 412821717f792e86941e16f507637b2b5592aa81
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Mon Mar 5 11:13:52 2012 -0800

    hwmon: (jc42) Add support for AT30TS00, TS3000GB2, TSE2002GB2, and MCP9804

    commit 1bd612a25855f4cc9345052b53d7da697dba6358 upstream.

    Also update IDT datasheet locations.

    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Acked-by: Jean Delvare <khali@linux-fr.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f4dddcc20a00ce781025c87b58e1336e09198cfa
Author: Jean Delvare <khali@linux-fr.org>
Date:   Mon Mar 5 08:32:00 2012 -0500

    hwmon: (jc42) Add support for ST Microelectronics STTS2002 and STTS3000

    commit 4de86126a712ba83fa038d277c8282f7ed466a4b upstream.

    These are fully compatible with Jedec JC 42.4 as far as I can see.

    Signed-off-by: Jean Delvare <khali@linux-fr.org>
    Cc: Guenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 170e54cfc7d0aec9a9f3cf34cd8df19fc2594305
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Sun Mar 4 08:10:57 2012 -0800

    hwmon: (pmbus_core) Fix maximum number of POUT alarm attributes

    commit 7cb3c44fb1f7999e4c53b6a52de6bc25da6de079 upstream.

    There are up to three POUT alarm attributes, not two, since cap_alarm was added.

    Reported-by: Michele Petracca <mi.petracca@gmail.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 85746fedf610d9d432bad65c760ef0e05b0b2140
Author: Akio Idehara <zbe64533@gmail.com>
Date:   Thu Mar 8 13:49:15 2012 -0600

    Input: ALPS - fix touchpad detection when buttons are pressed

    commit 99c90ab31fad855b9da9dee3a5aa6c27f263e9d6 upstream.

    ALPS touchpad detection fails if some buttons of ALPS are pressed.
    The reason is that the "E6" query response byte is different from
    what is expected.

    This was tested on a Toshiba Portege R500.

    Signed-off-by: Akio Idehara <zbe64533@gmail.com>
    Tested-by: Seth Forshee <seth.forshee@canonical.com>
    Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 35df833a65492454cffecedbf7a6abc5ae27dcfc
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Wed Nov 16 01:54:04 2011 -0300

    media: staging: lirc_serial: Do not assume error codes returned by request_irq()

    commit affc9a0d59ac49bd304e2137bd5e4ffdd6fdfa52 upstream.

    lirc_serial_probe() must fail if request_irq() returns an error, even if
    it isn't EBUSY or EINVAL,

    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c421942a2c438d3d111222d78704f254ce5201d4
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Wed Nov 16 01:53:25 2011 -0300

    media: staging: lirc_serial: Fix deadlock on resume failure

    commit 1ff1d88e862948ae5bfe490248c023ff8ac2855d upstream.

    A resume function cannot remove the device it is resuming!

    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9971532b094729a08175715fef295cd41d0f7ea7
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Wed Nov 16 01:52:11 2011 -0300

    media: staging: lirc_serial: Free resources on failure paths of lirc_serial_probe()

    commit c8e57e1b766c2321aa76ee5e6878c69bd2313d62 upstream.

    Failure to allocate the I/O region leaves the IRQ allocated.
    A later failure leaves them both allocated.

    Reported-by: Torsten Crass <torsten.crass@eBiology.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 531036606ff0b72c5028134df255e4dd19ad6c20
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Wed Nov 16 01:49:41 2011 -0300

    media: staging: lirc_serial: Fix init/exit order

    commit 9105b8b200410383d0854bbe237ee385d7d33ba6 upstream.

    Currently the module init function registers a platform_device and
    only then allocates its IRQ and I/O region.  This allows allocation to
    race with the device's suspend() function.  Instead, allocate
    resources in the platform driver's probe() function and free them in
    the remove() function.

    The module exit function removes the platform device before the
    character device that provides access to it.  Change it to reverse the
    order of initialisation.

    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a55848dfa041f2a2d1e96243fcb242ebadabeb0a
Author: Will Deacon <will.deacon@arm.com>
Date:   Fri Feb 24 12:12:38 2012 +0100

    ARM: 7345/1: errata: update workaround for A9 erratum #743622

    commit efbc74ace95338484f8d732037b99c7c77098fce upstream.

    Erratum #743622 affects all r2 variants of the Cortex-A9 processor, so
    ensure that the workaround is applied regardless of the revision.

    Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 21189f03d3ec3a74d9949907c828410d7a9a86d5
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Jan 17 11:09:57 2012 +0200

    OMAPDSS: HDMI: PHY burnout fix

    commit c49d005b6cc8491fad5b24f82805be2d6bcbd3dd upstream.

    A hardware bug in the OMAP4 HDMI PHY causes physical damage to the board
    if the HDMI PHY is kept powered on when the cable is not connected.

    This patch solves the problem by adding hot-plug-detection into the HDMI
    IP driver. This is not a real HPD support in the sense that nobody else
    than the IP driver gets to know about the HPD events, but is only meant
    to fix the HW bug.

    The strategy is simple: If the display device is turned off by the user,
    the PHY power is set to OFF. When the display device is turned on by the
    user, the PHY power is set either to LDOON or TXON, depending on whether
    the HDMI cable is connected.

    The reason to avoid PHY OFF when the display device is on, but the cable
    is disconnected, is that when the PHY is turned OFF, the HDMI IP is not
    "ticking" and thus the DISPC does not receive pixel clock from the HDMI
    IP. This would, for example, prevent any VSYNCs from happening, and
    would thus affect the users of omapdss. By using LDOON when the cable is
    disconnected we'll avoid the HW bug, but keep the HDMI working as usual
    from the user's point of view.

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8d1b18d569d59c8aa95964e2e5e4c5d544928258
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Jan 17 11:05:32 2012 +0200

    OMAP: 4430SDP/Panda: add HDMI HPD gpio

    commit aa74274b464d4aa24703963ac89a0ee942d5d267 upstream.

    Both Panda and 4430SDP use GPIO 63 as HDMI hot-plug-detect. Configure
    this GPIO in the board files.

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bdd91fa44646ae9e80e7a716320e9d1e7287766b
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Jan 17 11:02:36 2012 +0200

    OMAP: 4430SDP/Panda: setup HDMI GPIO muxes

    commit 78a1ad8f12db70b8b0a4548b90704de08ee216ce upstream.

    The HDMI GPIO pins LS_OE and CT_CP_HPD are not currently configured.
    This patch configures them as output pins.

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ed3984fec88b0a39f6e66ee40f124e1568f75c12
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Jan 17 10:59:00 2012 +0200

    OMAPDSS: remove wrong HDMI HPD muxing

    commit 7bb122d155f742fe2d79849090c825be7b4a247e upstream.

    "hdmi_hpd" pin is muxed to INPUT and PULLUP, but the pin is not
    currently used, and in the future when it is used, the pin is used as a
    GPIO and is board specific, not an OMAP4 wide thing.

    So remove the muxing for now.

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 61826fb9866fc86c9832263d1f5bb427f4329277
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Jan 17 10:49:38 2012 +0200

    OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD

    commit 3932a32fcf5393f8be70ac99dc718ad7ad0a415b upstream.

    The GPIO 60 on 4430sdp and Panda is not HPD GPIO, as currently marked in
    the board files, but CT_CP_HPD, which is used to enable/disable HPD
    functionality.

    This patch renames the GPIO.

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 850e968cce74f2e242e06d09dd072e51bd85aee3
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Jan 17 11:04:53 2012 +0200

    OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios

    commit 575753e3bea3b67eef8e454fb87f719e3f7da599 upstream.

    Instead of freeing the GPIOs individually, use gpio_free_array().

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1825e65dbb5370d5cebd13dbdfe4bce86caf351c
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Mon Aug 22 13:02:52 2011 +0300

    OMAP: DSS2: HDMI: use default dividers

    commit 8d88767a4377171752c22ac39bcb2b505eb751da upstream.

    Use default regn and regm2 dividers in the hdmi driver if the board file
    does not define them.

    Cc: Mythri P K <mythripk@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2d339926c077870a29181d37839920ce3ecd7409
Author: Andrew Lunn <andrew@lunn.ch>
Date:   Wed Feb 8 15:52:07 2012 +0100

    ARM: orion: Fix Orion5x GPIO regression from MPP cleanup

    commit b06540371063f0f07aafc1d1ac5e974da85c973c upstream.

    Patchset "ARM: orion: Refactor the MPP code common in the orion
    platform" broke at least Orion5x based platforms. These platforms have
    pins configured as GPIO when the selector is not 0x0. However the
    common code assumes the selector is always 0x0 for a GPIO lines. It
    then ignores the GPIO bits in the MPP definitions, resulting in that
    Orion5x machines cannot correctly configure there GPIO lines.

    The Fix removes the assumption that the selector is always 0x0.
    In order that none GPIO configurations are correctly blocked,
    Kirkwood and mv78xx0 MPP definitions are corrected to only set the
    GPIO bits for GPIO configurations.

    This third version, which does not contain any whitespace changes,
    and is rebased on v3.3-rc2.

    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    Acked-by: Nicolas Pitre <nico@linaro.org>
    Signed-off-by: Olof Johansson <olof@lixom.net>

commit 90bb7234900ec12f36028c96fdb320a36f08d383
Author: Andrew Lunn <andrew@lunn.ch>
Date:   Wed Feb 8 15:52:47 2012 +0100

    ARM: orion: Fix USB phy for orion5x.

    commit 72053353583230952c4b187e110e9da00dfc3afb upstream.

    The patch "ARM: orion: Consolidate USB platform setup code.", commit
    4fcd3f374a928081d391cd9a570afe3b2c692fdc broke USB on TS-7800 and
    other orion5x boards, because the wrong type of PHY was being passed
    to the EHCI driver in the platform data. Orion5x needs EHCI_PHY_ORION
    and all the others want EHCI_PHY_NA.

    Allow the mach- code to tell the generic plat-orion code which USB PHY
    enum to place into the platform data.

    Version 2: Rebase to v3.3-rc2.

    Reported-by: Ambroz Bizjak <ambrop7@gmail.com>
    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    Tested-by: Ambroz Bizjak <ambrop7@gmail.com>
    Acked-by: Nicolas Pitre <nico@linaro.org>
    Signed-off-by: Olof Johansson <olof@lixom.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a9941b5ec0105f00a7148d20e320af950dc0a7e9
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Wed Feb 8 12:53:52 2012 -0800

    drm/i915: gen7: Disable the RHWO optimization as it can cause GPU hangs.

    commit d71de14ddf423ccc9a2e3f7e37553c99ead20d7c upstream.

    The BSpec Workarounds page states that bits 10 and 26 must be set to
    avoid 3D ring hangs.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
    Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a80a210c243ce15778d00d93c4726192f5b288ae
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Wed Feb 8 12:53:51 2012 -0800

    drm/i915: gen7: work around a system hang on IVB

    commit db099c8f963fe656108e0a068274c5580a17f69b upstream.

    This adds the workaround for WaCatErrorRejectionIssue which could result
    in a system hang.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
    Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8d5124c4081c166e6b74a6b98c635a3279af0c91
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Wed Feb 8 12:53:50 2012 -0800

    drm/i915: gen7: Implement an L3 caching workaround.

    commit e4e0c058a19c41150d12ad2d3023b3cf09c5de67 upstream.

    This adds two cache-related workarounds for Ivy Bridge which can lead to
    3D ring hangs and corruptions.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
    Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f7f7943d1a0a34c2b8b93388daaa50571eade5e7
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Wed Feb 8 12:53:49 2012 -0800

    drm/i915: gen7: implement rczunit workaround

    commit eae66b50c760233fad526edf4a0d327be17a055d upstream.

    This is yet another workaround related to clock gating which we need on
    Ivy Bridge.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44610
    Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b8a0040ef7112439ad2efac6f1a79aa842b5924f
Author: Jan Beulich <JBeulich@suse.com>
Date:   Tue Feb 28 10:41:37 2012 +0000

    kprobes: adjust "fix a memory leak in function pre_handler_kretprobe()"

    3.0.21's 603b63484725a6e88e4ae5da58716efd88154b1e directly used
    the upstream patch, yet kprobes locking in 3.0.x uses spin_lock...()
    rather than raw_spin_lock...().

    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 896903eb8ed86754935bb65b377e69dc048eac34
Author: Fabio Baltieri <fabio.baltieri@gmail.com>
Date:   Fri Feb 3 15:37:14 2012 -0800

    avr32: select generic atomic64_t support

    commit 31e0017e6f6fb5cfdfaf932c1f98c9bef8d57688 upstream.

    Enable use of the generic atomic64 implementation on AVR32 platforms.
    Without this the kernel fails to build as the architecture does not
    provide its version.

    Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
    Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
    Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3ff2d5a6e8e1f7c793e2354a7917fd20206c4983
Author: Keng-Yu Lin <kengyu@canonical.com>
Date:   Fri Dec 2 00:04:23 2011 +0100

    ACPI / PM: Do not save/restore NVS on Asus K54C/K54HR

    commit 5a50a7c32d630d6cdb13d69afabb0cc81b2f379c upstream.

    The models do not resume correctly without acpi_sleep=nonvs.

    Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
    Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
    Cc: Tim Gardner <tim.gardner@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b38d6b8e1914ed83cc58673341781f4cba4d9d06
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Wed Feb 8 20:02:03 2012 +0100

    bsg: fix sysfs link remove warning

    commit 37b40adf2d1b4a5e51323be73ccf8ddcf3f15dd3 upstream.

    We create "bsg" link if q->kobj.sd is not NULL, so remove it only
    when the same condition is true.

    Fixes:

    WARNING: at fs/sysfs/inode.c:323 sysfs_hash_and_remove+0x2b/0x77()
    sysfs: can not remove 'bsg', no directory
    Call Trace:
      [<c0429683>] warn_slowpath_common+0x6a/0x7f
      [<c0537a68>] ? sysfs_hash_and_remove+0x2b/0x77
      [<c042970b>] warn_slowpath_fmt+0x2b/0x2f
      [<c0537a68>] sysfs_hash_and_remove+0x2b/0x77
      [<c053969a>] sysfs_remove_link+0x20/0x23
      [<c05d88f1>] bsg_unregister_queue+0x40/0x6d
      [<c0692263>] __scsi_remove_device+0x31/0x9d
      [<c069149f>] scsi_forget_host+0x41/0x52
      [<c0689fa9>] scsi_remove_host+0x71/0xe0
      [<f7de5945>] quiesce_and_remove_host+0x51/0x83 [usb_storage]
      [<f7de5a1e>] usb_stor_disconnect+0x18/0x22 [usb_storage]
      [<c06c29de>] usb_unbind_interface+0x4e/0x109
      [<c067a80f>] __device_release_driver+0x6b/0xa6
      [<c067a861>] device_release_driver+0x17/0x22
      [<c067a46a>] bus_remove_device+0xd6/0xe6
      [<c06785e2>] device_del+0xf2/0x137
      [<c06c101f>] usb_disable_device+0x94/0x1a0

    Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1cd5a2cdce1508eabd38e530086b56fad68b89d0
Author: Javier Martin <javier.martin@vista-silicon.com>
Date:   Thu Feb 23 15:43:18 2012 +0100

    ASoC: i.MX SSI: Fix DSP_A format.

    commit 5ed80a75b248bfaf840ea6b38f941edcf6ee7dc7 upstream.

    According to i.MX27 Reference Manual (p 1593) TXBIT0 bit selects
    whether the most significant or the less significant part of the
    data word written to the FIFO is transmitted.

    As DSP_A is the same as DSP_B with a data offset of 1 bit, it
    doesn't make any sense to remove TXBIT0 bit here.

    Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
    Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 973c38c2d69dabf942f510d5bb2af8c3f1669c82
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Wed Feb 22 15:52:56 2012 +0000

    ASoC: dapm: Check for bias level when powering down

    commit 7679e42ec833ed70aa34790a5f39dcb7e5bda4fe upstream.

    Recent enhancements in the bias management means that we might not be
    in standby when the CODEC is idle and can have active widgets without
    being in full power mode but the shutdown functionality assumes these
    things. Add checks for the bias level at each stage so that we don't
    do transitions other than the ON->PREPARE->STANDBY->OFF ones that the
    drivers are expecting.

    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d4d6cc13fa9c22283fdb6c5261ff988d00e018b8
Author: Boaz Harrosh <bharrosh@panasas.com>
Date:   Wed Jan 25 21:42:58 2012 +0200

    osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576

    commit 41f8ad76362e7aefe3a03949c43e23102dae6e0b upstream.

    It used to be that minors where 8 bit. But now they
    are actually 20 bit. So the fix is simplicity itself.

    I've tested with 300 devices and all user-mode utils
    work just fine. I have also mechanically added 10,000
    to the ida (so devices are /dev/osd10000, /dev/osd10001 ...)
    and was able to mkfs an exofs filesystem and access osds
    from user-mode.

    All the open-osd user-mode code uses the same library
    to access devices through their symbolic names in
    /dev/osdX so I'd say it's pretty safe. (Well tested)

    This patch is very important because some of the systems
    that will be deploying the 3.2 pnfs-objects code are larger
    than 64 OSDs and will stop to work properly when reaching
    that number.

    Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
    Signed-off-by: James Bottomley <JBottomley@Parallels.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 56c54856551b8a8199fda32aa7c416c719e5f0b9
Author: Phil Sutter <phil.sutter@viprinet.com>
Date:   Mon Feb 27 12:17:04 2012 +0100

    crypto: mv_cesa - fix final callback not ignoring input data

    commit f8f54e190ddb4ed697036b60f5e2ae6dd45b801c upstream.

    Broken by commit 6ef84509f3d439ed2d43ea40080643efec37f54f for users
    passing a request with non-zero 'nbytes' field, like e.g. testmgr.

    Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 14dfead7ebff3fcd14549f613041c4f777f8b75e
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Mon Feb 27 11:23:45 2012 -0500

    HID: usbhid: Add NOGET quirk for the AIREN Slim+ keyboard

    commit 37891abc8464637964a26ae4b61d307fef831f80 upstream.

    This patch (as1531) adds a NOGET quirk for the Slim+ keyboard marketed
    by AIREN.  This keyboard seems to have a lot of bugs; NOGET works
    around only one of them.

    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Reported-by: okias <d.okias@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3ddb5b56f09929992ac6a4e0c0c1f3fb6cbde509
Author: Andrea Arcangeli <aarcange@redhat.com>
Date:   Mon Mar 5 14:59:20 2012 -0800

    mm: thp: fix BUG on mm->nr_ptes

    commit 1c641e84719429bbfe62a95ed3545ee7fe24408f upstream.

    Dave Jones reports a few Fedora users hitting the BUG_ON(mm->nr_ptes...)
    in exit_mmap() recently.

    Quoting Hugh's discovery and explanation of the SMP race condition:

      "mm->nr_ptes had unusual locking: down_read mmap_sem plus
       page_table_lock when incrementing, down_write mmap_sem (or mm_users
       0) when decrementing; whereas THP is careful to increment and
       decrement it under page_table_lock.

       Now most of those paths in THP also hold mmap_sem for read or write
       (with appropriate checks on mm_users), but two do not: when
       split_huge_page() is called by hwpoison_user_mappings(), and when
       called by add_to_swap().

       It's conceivable that the latter case is responsible for the
       exit_mmap() BUG_ON mm->nr_ptes that has been reported on Fedora."

    The simplest way to fix it without having to alter the locking is to make
    split_huge_page() a noop in nr_ptes terms, so by counting the preallocated
    pagetables that exists for every mapped hugepage.  It was an arbitrary
    choice not to count them and either way is not wrong or right, because
    they are not used but they're still allocated.

    Reported-by: Dave Jones <davej@redhat.com>
    Reported-by: Hugh Dickins <hughd@google.com>
    Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
    Acked-by: Hugh Dickins <hughd@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Josh Boyer <jwboyer@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b0f1b35e3cf604dcafdeae9ba3b4a1a86df7d9e8
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Wed Feb 15 19:31:20 2012 +0100

    ath9k_hw: prevent writes to const data on AR9160

    commit 9bbb8168ed3d8b946f9c1901a63a675012de88f2 upstream.

    Duplicate the data for iniAddac early on, to avoid having to do redundant
    memcpy calls later. While we're at it, make AR5416 < v2.2 use the same
    codepath. Fixes a reported crash on x86.

    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Reported-by: Magnus Määttä <magnus.maatta@logica.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 34a9660ba1a8b98adf852f4f1090bdf084ccf991
Author: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Date:   Mon Feb 20 10:05:31 2012 +0530

    mac80211: zero initialize count field in ieee80211_tx_rate

    commit 8617b093d0031837a7be9b32bc674580cfb5f6b5 upstream.

    rate control algorithms concludes the rate as invalid
    with rate[i].idx < -1 , while they do also check for rate[i].count is
    non-zero. it would be safer to zero initialize the 'count' field.
    recently we had a ath9k rate control crash where the ath9k rate control
    in ath_tx_status assumed to check only for rate[i].count being non-zero
    in one instance and ended up in using invalid rate index for
    'connection monitoring NULL func frames' which eventually lead to the crash.
    thanks to Pavel Roskin for fixing it and finding the root cause.
    https://bugzilla.redhat.com/show_bug.cgi?id=768639

    Cc: Pavel Roskin <proski@gnu.org>
    Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3c156187b23b66ce205a7d8d93ad6ff567fc6608
Author: Jeff Layton <jlayton@redhat.com>
Date:   Thu Feb 23 09:37:45 2012 -0500

    cifs: fix dentry refcount leak when opening a FIFO on lookup

    commit 5bccda0ebc7c0331b81ac47d39e4b920b198b2cd upstream.

    The cifs code will attempt to open files on lookup under certain
    circumstances. What happens though if we find that the file we opened
    was actually a FIFO or other special file?

    Currently, the open filehandle just ends up being leaked leading to
    a dentry refcount mismatch and oops on umount. Fix this by having the
    code close the filehandle on the server if it turns out not to be a
    regular file. While we're at it, change this spaghetti if statement
    into a switch too.

    Reported-by: CAI Qian <caiqian@redhat.com>
    Tested-by: CAI Qian <caiqian@redhat.com>
    Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <smfrench@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0f062a5c0e3b23803c1f5b927ef5e8ba5ec52ff1
Author: David Howells <dhowells@redhat.com>
Date:   Thu Feb 23 13:51:00 2012 +0000

    NOMMU: Don't need to clear vm_mm when deleting a VMA

    commit b94cfaf6685d691dc3fab023cf32f65e9b7be09c upstream.

    Don't clear vm_mm in a deleted VMA as it's unnecessary and might
    conceivably break the filesystem or driver VMA close routine.

    Reported-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Acked-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 509c46f3d4fe2c6043ed2a00856ff4f4dce0f13a
Author: Anton Vorontsov <anton.vorontsov@linaro.org>
Date:   Fri Feb 24 05:14:46 2012 +0400

    mm: memcg: Correct unregistring of events attached to the same eventfd

    commit 371528caec553785c37f73fa3926ea0de84f986f upstream.

    There is an issue when memcg unregisters events that were attached to
    the same eventfd:

    - On the first call mem_cgroup_usage_unregister_event() removes all
      events attached to a given eventfd, and if there were no events left,
      thresholds->primary would become NULL;

    - Since there were several events registered, cgroups core will call
      mem_cgroup_usage_unregister_event() again, but now kernel will oops,
      as the function doesn't expect that threshold->primary may be NULL.

    That's a good question whether mem_cgroup_usage_unregister_event()
    should actually remove all events in one go, but nowadays it can't
    do any better as cftype->unregister_event callback doesn't pass
    any private event-associated cookie. So, let's fix the issue by
    simply checking for threshold->primary.

    FWIW, w/o the patch the following oops may be observed:

     BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
     IP: [<ffffffff810be32c>] mem_cgroup_usage_unregister_event+0x9c/0x1f0
     Pid: 574, comm: kworker/0:2 Not tainted 3.3.0-rc4+ #9 Bochs Bochs
     RIP: 0010:[<ffffffff810be32c>]  [<ffffffff810be32c>] mem_cgroup_usage_unregister_event+0x9c/0x1f0
     RSP: 0018:ffff88001d0b9d60  EFLAGS: 00010246
     Process kworker/0:2 (pid: 574, threadinfo ffff88001d0b8000, task ffff88001de91cc0)
     Call Trace:
      [<ffffffff8107092b>] cgroup_event_remove+0x2b/0x60
      [<ffffffff8103db94>] process_one_work+0x174/0x450
      [<ffffffff8103e413>] worker_thread+0x123/0x2d0

    Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
    Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Kirill A. Shutemov <kirill@shutemov.name>
    Cc: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d5d292475ce5ed9d9cbc3630e0a5fbed8155bb3a
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Fri Feb 17 11:51:49 2012 +0100

    mmc: sdhci-esdhc-imx: fix for mmc cards on i.MX5

    commit 5b6b0ad6e572b32a641116aaa5f897ffebe31e44 upstream.

    On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
    SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
    command. This works for SD cards. However, with MMC cards
    the MMC_SET_BLOCK_COUNT command is used instead, but this
    needs the same handling. Fix MMC cards by testing for the
    MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
    board with a Transcend MMC+ card and eMMC.

    The kernel started used MMC_SET_BLOCK_COUNT in 3.0, so this
    is a regression for these boards introduced in 3.0; it should
    go to 3.0/3.1/3.2-stable.

    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
    Acked-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Chris Ball <cjb@laptop.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f148e8a6cf51419b4dc7c99941054ed3ddad5a87
Author: Andrew Morton <akpm@linux-foundation.org>
Date:   Mon Mar 5 14:59:19 2012 -0800

    alpha: fix 32/64-bit bug in futex support

    commit 62aca403657fe30e5235c5331e9871e676d9ea0a upstream.

    Michael Cree said:

    : : I have noticed some user space problems (pulseaudio crashes in pthread
    : : code, glibc/nptl test suite failures, java compiler freezes on SMP alpha
    : : systems) that arise when using a 2.6.39 or later kernel on Alpha.
    : : Bisecting between 2.6.38 and 2.6.39 (using glibc/nptl test suite as
    : : criterion for good/bad kernel) eventually leads to:
    : :
    : : 8d7718aa082aaf30a0b4989e1f04858952f941bc is the first bad commit
    : : commit 8d7718aa082aaf30a0b4989e1f04858952f941bc
    : : Author: Michel Lespinasse <walken@google.com>
    : : Date:   Thu Mar 10 18:50:58 2011 -0800
    : :
    : :     futex: Sanitize futex ops argument types
    : :
    : :     Change futex_atomic_op_inuser and futex_atomic_cmpxchg_inatomic
    : :     prototypes to use u32 types for the futex as this is the data type the
    : :     futex core code uses all over the place.
    : :
    : : Looking at the commit I see there is a change of the uaddr argument in
    : : the Alpha architecture specific code for futexes from int to u32, but I
    : : don't see why this should cause a problem.

    Richard Henderson said:

    : futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
    :                               u32 oldval, u32 newval)
    : ...
    :         :       "r"(uaddr), "r"((long)oldval), "r"(newval)
    :
    :
    : There is no 32-bit compare instruction.  These are implemented by
    : consistently extending the values to a 64-bit type.  Since the
    : load instruction sign-extends, we want to sign-extend the other
    : quantity as well (despite the fact it's logically unsigned).
    :
    : So:
    :
    : -        :       "r"(uaddr), "r"((long)oldval), "r"(newval)
    : +        :       "r"(uaddr), "r"((long)(int)oldval), "r"(newval)
    :
    : should do the trick.

    Michael said:

    : This fixes the glibc test suite failures and the pulseaudio related
    : crashes, but it does not fix the java compiiler lockups that I was (and
    : are still) observing.  That is some other problem.

    Reported-by: Michael Cree <mcree@orcon.net.nz>
    Tested-by: Michael Cree <mcree@orcon.net.nz>
    Acked-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
    Cc: Richard Henderson <rth@twiddle.net>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c2235bf93207cbd4d72c8e560d59b6adf36611b2
Author: Scott Talbert <talbert@techie.net>
Date:   Tue Feb 21 13:06:00 2012 +0000

    Move Logitech Harmony 900 from cdc_ether to zaurus

    commit ee932bf9acb2e2c6a309e808000f24856330e3f9 upstream.

    In the current kernel implementation, the Logitech Harmony 900 remote
    control is matched to the cdc_ether driver through the generic
    USB_CDC_SUBCLASS_MDLM entry.  However, this device appears to be of the
    pseudo-MDLM (Belcarra) type, rather than the standard one.  This patch
    blacklists the Harmony 900 from the cdc_ether driver and whitelists it for
    the pseudo-MDLM driver in zaurus.

    Signed-off-by: Scott Talbert <talbert@techie.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0cd0b02bfce1497e21e11b33311fd4da6d10ea55
Author: Gusakov Andrey <dron0gus@gmail.com>
Date:   Sat Mar 3 07:32:36 2012 +0900

    ARM: S3C24XX: DMA resume regression fix

    commit e39d40c65dfd8390b50c03482ae9e289b8a8f351 upstream.

    s3c2410_dma_suspend suspends channels from 0 to dma_channels.
    s3c2410_dma_resume resumes channels in reverse order. So
    pointer should be decremented instead of being incremented.

    Signed-off-by: Gusakov Andrey <dron0gus@gmail.com>
    Reviewed-by: Heiko Stuebner <heiko@sntech.de>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c847ac8e8e7447730aef70b94915f1c0880e6578
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Tue Mar 6 23:18:54 2012 +0100

    genirq: Clear action->thread_mask if IRQ_ONESHOT is not set

    commit 52abb700e16a9aa4cbc03f3d7f80206cbbc80680 upstream.

    Xommit ac5637611(genirq: Unmask oneshot irqs when thread was not woken)
    fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
    handle_level_irq.

    This happens because thread_mask is or'ed unconditionally in
    irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared.  So
    the check for !desc->thread_active fails and keeps the interrupt
    disabled.

    Keep the thread_mask zero for !IRQ_ONESHOT interrupts.

    Document the thread_mask magic while at it.

    Reported-and-tested-by: Sven Joachim <svenjoac@gmx.de>
    Reported-and-tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d7838b04ecb08709b09063a8ada0aa2d29636c12
Author: Jean Delvare <khali@linux-fr.org>
Date:   Sat Feb 18 17:54:23 2012 +0100

    mfd: Fix ACPI conflict check

    commit 81b5482c32769abb6dfb979560dab2f952ba86fa upstream.

    The code is currently always checking the first resource of every
    device only (several times.) This has been broken since the ACPI check
    was added in February 2010 in commit
    91fedede0338eb6203cdd618d8ece873fdb7c22c.

    Fix the check to run on each resource individually, once.

    Signed-off-by: Jean Delvare <khali@linux-fr.org>
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4b77339222a1d8809cde5d8920714a6cd180e5e0
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Fri Mar 2 10:43:49 2012 -0800

    regset: Return -EFAULT, not -EIO, on host-side memory fault

    commit 5189fa19a4b2b4c3bec37c3a019d446148827717 upstream.

    There is only one error code to return for a bad user-space buffer
    pointer passed to a system call in the same address space as the
    system call is executed, and that is EFAULT.  Furthermore, the
    low-level access routines, which catch most of the faults, return
    EFAULT already.

    Signed-off-by: H. Peter Anvin <hpa@zytor.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Acked-by: Roland McGrath <roland@hack.frob.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ec521c173fe9b56343808dfde63e3d75b223da07
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Fri Mar 2 10:43:48 2012 -0800

    regset: Prevent null pointer reference on readonly regsets

    commit c8e252586f8d5de906385d8cf6385fee289a825e upstream.

    The regset common infrastructure assumed that regsets would always
    have .get and .set methods, but not necessarily .active methods.
    Unfortunately people have since written regsets without .set methods.

    Rather than putting in stub functions everywhere, handle regsets with
    null .get or .set methods explicitly.

    Signed-off-by: H. Peter Anvin <hpa@zytor.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Acked-by: Roland McGrath <roland@hack.frob.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ca32b5c30d690d299e814fa98284a00d56e72339
Author: Takashi Iwai <tiwai@suse.de>
Date:   Wed Feb 29 09:41:17 2012 +0100

    ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecs

    commit 7bff172a352a2fbe9856bba517d71a2072aab041 upstream.

    A bug report with an old Sony laptop showed that we can't rely on BIOS
    setting the pins of headphones but the driver should set always by
    itself.

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9c2143082d8e7797f6a63720100d06bec7586fd5
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Feb 27 15:00:58 2012 +0100

    ALSA: hda - Add a fake mute feature

    commit 3868137ea41866773e75d9ac4b9988dcc361ff1d upstream.

    Some codecs don't supply the mute amp-capabilities although the lowest
    volume gives the mute.  It'd be handy if the parser provides the mute
    mixers in such a case.

    This patch adds an extension amp-cap bit (which is used only in the
    driver) to represent the min volume = mute state.  Also modified the
    amp cache code to support the fake mute feature when this bit is set
    but the real mute bit is unset.

    In addition, conexant cx5051 parser uses this new feature to implement
    the missing mute controls.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42825

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a8e161f4c38c371974319359165d544604e06b78
Author: David Howells <dhowells@redhat.com>
Date:   Fri Feb 24 18:01:27 2012 +0100

    S390: KEYS: Enable the compat keyctl wrapper on s390x

    commit 1d057720609ed052a6371fe1d53300e5e6328e94 upstream.

    Enable the compat keyctl wrapper on s390x so that 32-bit s390 userspace can
    call the keyctl() syscall.

    There's an s390x assembly wrapper that truncates all the register values to
    32-bits and this then calls compat_sys_keyctl() - but the latter only exists if
    CONFIG_KEYS_COMPAT is enabled, and the s390 Kconfig doesn't enable it.

    Without this patch, 32-bit calls to the keyctl() syscall are given an ENOSYS
    error:

    	[root@devel4 ~]# keyctl show
    	Session Keyring
    	-3: key inaccessible (Function not implemented)

    Signed-off-by: David Howells <dhowells@redhat.com>
    Acked-by: dan@danny.cz
    Cc: Carsten Otte <cotte@de.ibm.com>
    Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: linux-s390@vger.kernel.org
    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e821453d52c2c984d9522a84a68d5b1f01de210a
Author: Jett.Zhou <jtzhou@marvell.com>
Date:   Thu Feb 23 19:52:08 2012 +0800

    regulator: fix the ldo configure according to 88pm860x spec

    commit 3380643b0eaa7ecf99c4f095bdfcb6e5df471616 upstream.

    Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 58cc48d37c4394fdfa8e70315dba705a1f4eb866
Author: Wolfram Sang <w.sang@pengutronix.de>
Date:   Fri Jan 13 12:14:26 2012 +0100

    i2c: mxs: only flag completion when queue is completely done

    commit 844990daa2e69a4258049ba9c2bae1180657dac3 upstream.

    The hardware generates an interrupt for every completed command in the
    queue while the code assumed that it will only generate one interrupt
    when the queue is empty. So, explicitly check if the queue is really
    empty. This patch fixed problems which occurred due to high traffic on
    the bus. While we are here, move the completion-initialization after the
    parameter error checking.

    Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
    Cc: Shawn Guo <shawn.guo@linaro.org>
    Cc: Marek Vasut <marek.vasut@gmail.com>
    Cc: Lothar Waßmann <LW@KARO-electronics.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 645507f2e948f022a30f1bc8811ca3b516c6c9bf
Author: Maxim Uvarov <maxim.uvarov@oracle.com>
Date:   Sun Jan 15 20:02:50 2012 -0800

    watchdog: hpwdt: clean up set_memory_x call for 32 bit

    commit 97d2a10d5804d585ab0b58efbd710948401b886a upstream.

    1. address has to be page aligned.
    2. set_memory_x uses page size argument, not size.
    Bug causes with following commit:
    	commit da28179b4e90dda56912ee825c7eaa62fc103797
    	Author: Mingarelli, Thomas <Thomas.Mingarelli@hp.com>
    	Date:   Mon Nov 7 10:59:00 2011 +0100

         watchdog: hpwdt: Changes to handle NX secure bit in 32bit path

        commit e67d668e147c3b4fec638c9e0ace04319f5ceccd upstream.

        This patch makes use of the set_memory_x() kernel API in order
        to make necessary BIOS calls to source NMIs.

    Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bb3b47ceebd8a5b8a8684fde8e2ba0b8f0127d05
Author: Roland Stigge <stigge@antcom.de>
Date:   Mon Feb 27 17:28:02 2012 +0100

    ARM: LPC32xx: Fix irq on GPI_28

    commit f6737055c1c432a9628a9a731f9881ad8e0a9eee upstream.

    The GPI_28 IRQ was not registered properly. The registration of
    IRQ_LPC32XX_GPI_28 was added and the (wrong) IRQ_LPC32XX_GPI_11 at
    LPC32XX_SIC1_IRQ(4) was replaced by IRQ_LPC32XX_GPI_28 (see manual of
    LPC32xx / interrupt controller).

    Signed-off-by: Roland Stigge <stigge@antcom.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 53fcf6ba805ffd82171a4f9459c2767ce0b3b580
Author: Roland Stigge <stigge@antcom.de>
Date:   Mon Feb 27 17:28:02 2012 +0100

    ARM: LPC32xx: Fix interrupt controller init

    commit 35dd0a75d4a382e7f769dd0277732e7aa5235718 upstream.

    This patch fixes the initialization of the interrupt controller of the LPC32xx
    by correctly setting up SIC1 and SIC2 instead of (wrongly) using the same value
    as for the Main Interrupt Controller (MIC).

    Signed-off-by: Roland Stigge <stigge@antcom.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 19399c348f59bb2aa2321efe6e29ece9797717f7
Author: Roland Stigge <stigge@antcom.de>
Date:   Mon Feb 27 17:28:02 2012 +0100

    ARM: LPC32xx: irq.c: Clear latched event

    commit 94ed7830cba4dce57b18a2926b5d826bfd184bd6 upstream.

    This patch fixes the wakeup disable function by clearing latched events.

    Signed-off-by: Roland Stigge <stigge@antcom.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 280e54b164802662ff59ba9cc24b66595f9a6bb9
Author: Roland Stigge <stigge@antcom.de>
Date:   Mon Feb 27 17:28:03 2012 +0100

    ARM: LPC32xx: serial.c: Fixed loop limit

    commit ff424aa4c89d19082e8ae5a3351006bc8a4cd91b upstream.

    This patch fixes a wrong loop limit on UART init.

    Signed-off-by: Roland Stigge <stigge@antcom.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fd3fb91a55d4a8f7eff63b26631a4a34c4ba76d0
Author: Roland Stigge <stigge@antcom.de>
Date:   Mon Feb 27 17:28:02 2012 +0100

    ARM: LPC32xx: serial.c: HW bug workaround

    commit 2707208ee8a80dbbd5426f5aa1a934f766825bb5 upstream.

    This patch fixes a HW bug by flushing RX FIFOs of the UARTs on init. It was
    ported from NXP's git.lpclinux.com tree.

    Signed-off-by: Roland Stigge <stigge@antcom.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 46ef1956475fd62f21ee67b3f49dbfe2a60fa13d
Author: Alban Browaeys <prahal@yahoo.com>
Date:   Fri Feb 24 17:12:45 2012 +0000

    drm/i915: Prevent a machine hang by checking crtc->active before loading lut

    commit aed3f09db39596e539f90b11a5016aea4d8442e1 upstream.

    Before loading the lut (gamma), check the active state of intel_crtc,
    otherwise at least on gen2 hang ensue.

    This is reproducible in Xorg via:
      xset dpms force off
    then
      xgamma -rgamma 2.0 # freeze.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44505
    Signed-off-by: Alban Browaeys <prahal@yahoo.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9eb9e47632735bb3bb3da343663ea10a6954ef31
Author: Heiko Carstens <heiko.carstens@de.ibm.com>
Date:   Mon Feb 27 10:01:52 2012 +0100

    compat: fix compile breakage on s390

    commit 048cd4e51d24ebf7f3552226d03c769d6ad91658 upstream.

    The new is_compat_task() define for the !COMPAT case in
    include/linux/compat.h conflicts with a similar define in
    arch/s390/include/asm/compat.h.

    This is the minimal patch which fixes the build issues.

    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a3ea6c14ec93e67c08de43bdf8ce7d701835152f
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Feb 26 09:44:55 2012 -0800

    Fix autofs compile without CONFIG_COMPAT

    commit 3c761ea05a8900a907f32b628611873f6bef24b2 upstream.

    The autofs compat handling fix caused a compile failure when
    CONFIG_COMPAT isn't defined.

    Instead of adding random #ifdef'fery in autofs, let's just make the
    compat helpers earlier to use: without CONFIG_COMPAT, is_compat_task()
    just hardcodes to zero.

    We could probably do something similar for a number of other cases where
    we have #ifdef's in code, but this is the low-hanging fruit.

    Reported-and-tested-by: Andreas Schwab <schwab@linux-m68k.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 499f286dc02cde6b668e2d757dfe100cb0c43445
Author: Ian Kent <raven@themaw.net>
Date:   Wed Feb 22 20:45:44 2012 +0800

    autofs: work around unhappy compat problem on x86-64

    commit a32744d4abae24572eff7269bc17895c41bd0085 upstream.

    When the autofs protocol version 5 packet type was added in commit
    5c0a32fc2cd0 ("autofs4: add new packet type for v5 communications"), it
    obvously tried quite hard to be word-size agnostic, and uses explicitly
    sized fields that are all correctly aligned.

    However, with the final "char name[NAME_MAX+1]" array at the end, the
    actual size of the structure ends up being not very well defined:
    because the struct isn't marked 'packed', doing a "sizeof()" on it will
    align the size of the struct up to the biggest alignment of the members
    it has.

    And despite all the members being the same, the alignment of them is
    different: a "__u64" has 4-byte alignment on x86-32, but native 8-byte
    alignment on x86-64.  And while 'NAME_MAX+1' ends up being a nice round
    number (256), the name[] array starts out a 4-byte aligned.

    End result: the "packed" size of the structure is 300 bytes: 4-byte, but
    not 8-byte aligned.

    As a result, despite all the fields being in the same place on all
    architectures, sizeof() will round up that size to 304 bytes on
    architectures that have 8-byte alignment for u64.

    Note that this is *not* a problem for 32-bit compat mode on POWER, since
    there __u64 is 8-byte aligned even in 32-bit mode.  But on x86, 32-bit
    and 64-bit alignment is different for 64-bit entities, and as a result
    the structure that has exactly the same layout has different sizes.

    So on x86-64, but no other architecture, we will just subtract 4 from
    the size of the structure when running in a compat task.  That way we
    will write the properly sized packet that user mode expects.

    Not pretty.  Sadly, this very subtle, and unnecessary, size difference
    has been encoded in user space that wants to read packets of *exactly*
    the right size, and will refuse to touch anything else.

    Reported-and-tested-by: Thomas Meyer <thomas@m3y3r.de>
    Signed-off-by: Ian Kent <raven@themaw.net>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>