Permalink
Commits on Feb 6, 2012
  1. Linux 3.0.20

    gregkh committed Feb 6, 2012
  2. PCI: Rework ASPM disable code

    commit 3c07635 upstream.
    
    Right now we forcibly clear ASPM state on all devices if the BIOS indicates
    that the feature isn't supported. Based on the Microsoft presentation
    "PCI Express In Depth for Windows Vista and Beyond", I'm starting to think
    that this may be an error. The implication is that unless the platform
    grants full control via _OSC, Windows will not touch any PCIe features -
    including ASPM. In that case clearing ASPM state would be an error unless
    the platform has granted us that control.
    
    This patch reworks the ASPM disabling code such that the actual clearing
    of state is triggered by a successful handoff of PCIe control to the OS.
    The general ASPM code undergoes some changes in order to ensure that the
    ability to clear the bits isn't overridden by ASPM having already been
    disabled. Further, this theoretically now allows for situations where
    only a subset of PCIe roots hand over control, leaving the others in the
    BIOS state.
    
    It's difficult to know for sure that this is the right thing to do -
    there's zero public documentation on the interaction between all of these
    components. But enough vendors enable ASPM on platforms and then set this
    bit that it seems likely that they're expecting the OS to leave them alone.
    
    Measured to save around 5W on an idle Thinkpad X220.
    
    Signed-off-by: Matthew Garrett <mjg@redhat.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Matthew Garrett committed with gregkh Nov 10, 2011
Commits on Feb 3, 2012
  1. Linux 3.0.19

    gregkh committed Feb 3, 2012
  2. USB: cp210x: allow more baud rates above 1Mbaud

    commit d1620ca upstream.
    
    Allow more baud rates to be set in [1M,2M] baud.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Cc: Preston Fick <preston.fick@silabs.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold committed with gregkh Jan 15, 2012
  3. USB: cp210x: initialise baud rate at open

    commit cdc32fd upstream.
    
    The newer cp2104 devices require the baud rate to be initialised after
    power on. Make sure it is set when port is opened.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Cc: Preston Fick <preston.fick@silabs.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold committed with gregkh Jan 15, 2012
  4. USB: cp210x: clean up, refactor and document speed handling

    commit e599087 upstream.
    
    Clean up and refactor speed handling.
    Document baud rate handling for CP210{1,2,4,5,10}.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Cc: Preston Fick <preston.fick@silabs.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold committed with gregkh Jan 15, 2012
  5. USB: cp210x: fix up set_termios variables

    commit 34b76fc upstream.
    
    [Based on a patch from Johan, mangled by gregkh to keep things in line]
    
    Fix up the variable usage in the set_termios call.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Cc: Preston Fick <preston.fick@silabs.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold committed with gregkh Jan 15, 2012
  6. USB: cp210x: do not map baud rates to B0

    commit be125d9 upstream.
    
    We do not implement B0 hangup yet so map low baudrates to 300bps.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Cc: Preston Fick <preston.fick@silabs.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold committed with gregkh Jan 15, 2012
  7. USB: cp210x: fix CP2104 baudrate usage

    commit 7f482fc upstream.
    
    This fix changes the way baudrates are set on the CP210x devices from
    Silicon Labs. The CP2101/2/3 will respond to both a GET/SET_BAUDDIV
    command, and GET/SET_BAUDRATE command, while CP2104 and higher devices
    only respond to GET/SET_BAUDRATE. The current cp210x.ko driver in
    kernel version 3.2.0 only implements the GET/SET_BAUDDIV command.
    
    This patch implements the two new codes for the GET/SET_BAUDRATE
    commands. Then there is a change in the way that the baudrate is
    assigned or retrieved. This is done according to the CP210x USB
    specification in AN571. This document can be found here:
    http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/AN571.pdf&src=DocumentationWebPart
    
    Sections 5.3/5.4 describe the USB packets for the old baudrate method.
    Sections 5.5/5.6 describe the USB packets for the new method. This
    patch also implements the new request scheme, and eliminates the
    unnecessary baudrate calculations since it uses the "actual baudrate"
    method.
    
    This patch solves the problem reported for the CP2104 in bug 42586,
    and also keeps support for all other devices (CP2101/2/3).
    
    This patchfile is also attached to the bug report on
    bugzilla.kernel.org. This patch has been developed and test on the
    3.2.0 mainline kernel version under Ubuntu 10.11.
    
    Signed-off-by: Preston Fick <preston.fick@silabs.com>
    [duplicate patch also sent by Johan - gregkh]
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    prestonfick committed with gregkh Jan 17, 2012
  8. USB: cp210x: call generic open last in open

    commit 55b2afb upstream.
    
    Make sure port is fully initialised before calling generic open.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold committed with gregkh Jan 15, 2012
  9. USB: serial: CP210x: Added USB-ID for the Link Instruments MSO-19

    commit 791b7d7 upstream.
    
    This device is a Oscilloscope/Logic Analizer/Pattern Generator/TDR,
    using a Silabs CP2103 USB to UART Bridge.
    
    Signed-off-by: Renato Caldas <rmsc@fe.up.pt>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    rmsc committed with gregkh Jan 6, 2012
  10. tcp: md5: using remote adress for md5 lookup in rst packet

    [ Upstream commit 8a622e7 ]
    
    md5 key is added in socket through remote address.
    remote address should be used in finding md5 key when
    sending out reset packet.
    
    Signed-off-by: shawnlu <shawn.lu@ericsson.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    shawnlu committed with gregkh Jan 20, 2012
  11. tcp: fix tcp_trim_head() to adjust segment count with skb MSS

    [ Upstream commit 5b35e1e ]
    
    This commit fixes tcp_trim_head() to recalculate the number of
    segments in the skb with the skb's existing MSS, so trimming the head
    causes the skb segment count to be monotonically non-increasing - it
    should stay the same or go down, but not increase.
    
    Previously tcp_trim_head() used the current MSS of the connection. But
    if there was a decrease in MSS between original transmission and ACK
    (e.g. due to PMTUD), this could cause tcp_trim_head() to
    counter-intuitively increase the segment count when trimming bytes off
    the head of an skb. This violated assumptions in tcp_tso_acked() that
    tcp_trim_head() only decreases the packet count, so that packets_acked
    in tcp_tso_acked() could underflow, leading tcp_clean_rtx_queue() to
    pass u32 pkts_acked values as large as 0xffffffff to
    ca_ops->pkts_acked().
    
    As an aside, if tcp_trim_head() had really wanted the skb to reflect
    the current MSS, it should have called tcp_set_skb_tso_segs()
    unconditionally, since a decrease in MSS would mean that a
    single-packet skb should now be sliced into multiple segments.
    
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Acked-by: Nandita Dukkipati <nanditad@google.com>
    Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Neal Cardwell committed with gregkh Jan 28, 2012
  12. rds: Make rds_sock_lock BH rather than IRQ safe.

    [ Upstream commit efc3dbc ]
    
    rds_sock_info() triggers locking warnings because we try to perform a
    local_bh_enable() (via sock_i_ino()) while hardware interrupts are
    disabled (via taking rds_sock_lock).
    
    There is no reason for rds_sock_lock to be a hardware IRQ disabling
    lock, none of these access paths run in hardware interrupt context.
    
    Therefore making it a BH disabling lock is safe and sufficient to
    fix this bug.
    
    Reported-by: Kumar Sanghvi <kumaras@chelsio.com>
    Reported-by: Josh Boyer <jwboyer@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    davem330 committed with gregkh Jan 24, 2012
  13. net: bpf_jit: fix divide by 0 generation

    [ Upstream commit d00a9dd ]
    
    Several problems fixed in this patch :
    
    1) Target of the conditional jump in case a divide by 0 is performed
       by a bpf is wrong.
    
    2) Must 'generate' the full function prologue/epilogue at pass=0,
       or else we can stop too early in pass=1 if the proglen doesnt change.
       (if the increase of prologue/epilogue equals decrease of all
        instructions length because some jumps are converted to near jumps)
    
    3) Change the wrong length detection at the end of code generation to
       issue a more explicit message, no need for a full stack trace.
    
    Reported-by: Phil Oester <kernel@linuxace.com>
    Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Eric Dumazet committed with gregkh Jan 18, 2012
  14. l2tp: l2tp_ip - fix possible oops on packet receive

    [ Upstream commit 6831580 ]
    
    When a packet is received on an L2TP IP socket (L2TPv3 IP link
    encapsulation), the l2tpip socket's backlog_rcv function calls
    xfrm4_policy_check(). This is not necessary, since it was called
    before the skb was added to the backlog. With CONFIG_NET_NS enabled,
    xfrm4_policy_check() will oops if skb->dev is null, so this trivial
    patch removes the call.
    
    This bug has always been present, but only when CONFIG_NET_NS is
    enabled does it cause problems. Most users are probably using UDP
    encapsulation for L2TP, hence the problem has only recently
    surfaced.
    
    EIP: 0060:[<c12bb62b>] EFLAGS: 00210246 CPU: 0
    EIP is at l2tp_ip_recvmsg+0xd4/0x2a7
    EAX: 00000001 EBX: d77b5180 ECX: 00000000 EDX: 00200246
    ESI: 00000000 EDI: d63cbd30 EBP: d63cbd18 ESP: d63cbcf4
     DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Call Trace:
     [<c1218568>] sock_common_recvmsg+0x31/0x46
     [<c1215c92>] __sock_recvmsg_nosec+0x45/0x4d
     [<c12163a1>] __sock_recvmsg+0x31/0x3b
     [<c1216828>] sock_recvmsg+0x96/0xab
     [<c10b2693>] ? might_fault+0x47/0x81
     [<c10b2693>] ? might_fault+0x47/0x81
     [<c1167fd0>] ? _copy_from_user+0x31/0x115
     [<c121e8c8>] ? copy_from_user+0x8/0xa
     [<c121ebd6>] ? verify_iovec+0x3e/0x78
     [<c1216604>] __sys_recvmsg+0x10a/0x1aa
     [<c1216792>] ? sock_recvmsg+0x0/0xab
     [<c105a99b>] ? __lock_acquire+0xbdf/0xbee
     [<c12d5a99>] ? do_page_fault+0x193/0x375
     [<c10d1200>] ? fcheck_files+0x9b/0xca
     [<c10d1259>] ? fget_light+0x2a/0x9c
     [<c1216bbb>] sys_recvmsg+0x2b/0x43
     [<c1218145>] sys_socketcall+0x16d/0x1a5
     [<c11679f0>] ? trace_hardirqs_on_thunk+0xc/0x10
     [<c100305f>] sysenter_do_call+0x12/0x38
    Code: c6 05 8c ea a8 c1 01 e8 0c d4 d9 ff 85 f6 74 07 3e ff 86 80 00 00 00 b9 17 b6 2b c1 ba 01 00 00 00 b8 78 ed 48 c1 e8 23 f6 d9 ff <ff> 76 0c 68 28 e3 30 c1 68 2d 44 41 c1 e8 89 57 01 00 83 c4 0c
    
    Signed-off-by: James Chapman <jchapman@katalix.com>
    Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    James Chapman committed with gregkh Jan 25, 2012
  15. bonding: fix enslaving in alb mode when link down

    [ Upstream commit b924551 ]
    
    bond_alb_init_slave() is called from bond_enslave() and sets the slave's MAC
    address. This is done differently for TLB and ALB modes.
    bond->alb_info.rlb_enabled is used to discriminate between the two modes but
    this flag may be uninitialized if the slave is being enslaved prior to calling
    bond_open() -> bond_alb_initialize() on the master.
    
    It turns out all the callers of alb_set_slave_mac_addr() pass
    bond->alb_info.rlb_enabled as the hw parameter.
    
    This patch cleans up the unnecessary parameter of alb_set_slave_mac_addr() and
    makes the function decide based on the bonding mode instead, which fixes the
    above problem.
    
    Reported-by: Narendra K <Narendra_K@Dell.com>
    Signed-off-by: Jiri Bohac <jbohac@suse.cz>
    Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jiribohac committed with gregkh Jan 18, 2012
  16. net caif: Register properly as a pernet subsystem.

    [ Upstream commit 8a8ee9a ]
    
    caif is a subsystem and as such it needs to register with
    register_pernet_subsys instead of register_pernet_device.
    
    Among other problems using register_pernet_device was resulting in
    net_generic being called before the caif_net structure was allocated.
    Which has been causing net_generic to fail with either BUG_ON's or by
    return NULL pointers.
    
    A more ugly problem that could be caused is packets in flight why the
    subsystem is shutting down.
    
    To remove confusion also remove the cruft cause by inappropriately
    trying to fix this bug.
    
    With the aid of the previous patch I have tested this patch and
    confirmed that using register_pernet_subsys makes the failure go away as
    it should.
    
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
    Tested-by: Sasha Levin <levinsasha928@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ebiederm committed with gregkh Jan 26, 2012
  17. netns: Fail conspicously if someone uses net_generic at an inappropri…

    …ate time.
    
    [ Upstream commit 5ee4433 ]
    
    By definition net_generic should never be called when it can return
    NULL.  Fail conspicously with a BUG_ON to make it clear when people mess
    up that a NULL return should never happen.
    
    Recently there was a bug in the CAIF subsystem where it was registered
    with register_pernet_device instead of register_pernet_subsys.  It was
    erroneously concluded that net_generic could validly return NULL and
    that net_assign_generic was buggy (when it was just inefficient).
    Hopefully this BUG_ON will prevent people to coming to similar erroneous
    conclusions in the futrue.
    
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    Tested-by: Sasha Levin <levinsasha928@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ebiederm committed with gregkh Jan 26, 2012
  18. netns: fix net_alloc_generic()

    [ Upstream commit 073862b ]
    
    When a new net namespace is created, we should attach to it a "struct
    net_generic" with enough slots (even empty), or we can hit the following
    BUG_ON() :
    
    [  200.752016] kernel BUG at include/net/netns/generic.h:40!
    ...
    [  200.752016]  [<ffffffff825c3cea>] ? get_cfcnfg+0x3a/0x180
    [  200.752016]  [<ffffffff821cf0b0>] ? lockdep_rtnl_is_held+0x10/0x20
    [  200.752016]  [<ffffffff825c41be>] caif_device_notify+0x2e/0x530
    [  200.752016]  [<ffffffff810d61b7>] notifier_call_chain+0x67/0x110
    [  200.752016]  [<ffffffff810d67c1>] raw_notifier_call_chain+0x11/0x20
    [  200.752016]  [<ffffffff821bae82>] call_netdevice_notifiers+0x32/0x60
    [  200.752016]  [<ffffffff821c2b26>] register_netdevice+0x196/0x300
    [  200.752016]  [<ffffffff821c2ca9>] register_netdev+0x19/0x30
    [  200.752016]  [<ffffffff81c1c67a>] loopback_net_init+0x4a/0xa0
    [  200.752016]  [<ffffffff821b5e62>] ops_init+0x42/0x180
    [  200.752016]  [<ffffffff821b600b>] setup_net+0x6b/0x100
    [  200.752016]  [<ffffffff821b6466>] copy_net_ns+0x86/0x110
    [  200.752016]  [<ffffffff810d5789>] create_new_namespaces+0xd9/0x190
    
    net_alloc_generic() should take into account the maximum index into the
    ptr array, as a subsystem might use net_generic() anytime.
    
    This also reduces number of reallocations in net_assign_generic()
    
    Reported-by: Sasha Levin <levinsasha928@gmail.com>
    Tested-by: Sasha Levin <levinsasha928@gmail.com>
    Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
    Cc: Sjur Brændeland <sjur.brandeland@stericsson.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: Pavel Emelyanov <xemul@openvz.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Eric Dumazet committed with gregkh Jan 26, 2012
  19. USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE

    commit 15699e6 upstream.
    
    The probe does not strictly require the USB_CDC_DMM_TYPE
    descriptor, which is a good thing as it makes the driver
    usable on non-conforming interfaces.  A user could e.g.
    bind to it to a CDC ECM interface by using the new_id and
    bind sysfs files.  But this would fail with a 0 buffer length
    due to the missing descriptor.
    
    Fix by defining a reasonable fallback size: The minimum
    device receive buffer size required by the CDC WMC standard,
    revision 1.1
    
    Signed-off-by: Bjørn Mork <bjorn@mork.no>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    bmork committed with gregkh Jan 20, 2012
  20. USB: cdc-wdm: better allocate a buffer that is at least as big as we …

    …tell the USB core
    
    commit 655e247 upstream.
    
    As it turns out, there was a mismatch between the allocated inbuf size
    (desc->bMaxPacketSize0, typically something like 64) and the length we
    specified in the URB (desc->wMaxCommand, typically something like 2048)
    
    Signed-off-by: Bjørn Mork <bjorn@mork.no>
    Cc: Oliver Neukum <oliver@neukum.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    bmork committed with gregkh Jan 16, 2012
  21. USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device …

    …removal
    
    commit 62aaf24 upstream.
    
    wdm_disconnect() waits for the mutex held by wdm_read() before
    calling wake_up_all().  This causes a deadlock, preventing device removal
    to complete.  Do the wake_up_all() before we start waiting for the locks.
    
    Signed-off-by: Bjørn Mork <bjorn@mork.no>
    Cc: Oliver Neukum <oliver@neukum.org>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    bmork committed with gregkh Jan 16, 2012
  22. hwmon: (sht15) fix bad error code

    commit 6edf3c3 upstream.
    
    When no platform data was supplied, returned error code was 0.
    
    Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vivien committed with gregkh Jan 26, 2012
  23. hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776F

    commit ad77c3e upstream.
    
    NCT6776F only supports pwm mode for pwm2 and pwm3. Return error if an attempt
    is made to set those pwm channels to DC mode.
    
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Acked-by: Jean Delvare <khali@linux-fr.org>
    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    groeck committed with gregkh Jan 28, 2012
  24. hwmon: (f71805f) Fix clamping of temperature limits

    commit 86b2bbf upstream.
    
    Properly clamp temperature limits set by the user. Without this fix,
    attempts to write temperature limits above the maximum supported by
    the chip (255 degrees Celsius) would arbitrarily and unexpectedly
    result in the limit being set to 0 degree Celsius.
    
    Signed-off-by: Jean Delvare <khali@linux-fr.org>
    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Jean Delvare committed with gregkh Jan 20, 2012
  25. xHCI: Cleanup isoc transfer ring when TD length mismatch found

    commit cf84055 upstream.
    
    When a TD length mismatch is found during isoc TRB enqueue, it directly
    returns -EINVAL. However, isoc transfer is partially enqueued at this time,
    and the ring should be cleared.
    
    This should be backported to kernels as old as 2.6.36, which contain the
    commit 522989a "xhci: Fix failed
    enqueue in the middle of isoch TD."
    
    Signed-off-by: Andiry Xu <andiry.xu@amd.com>
    Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Andiry Xu committed with gregkh Jan 18, 2012
  26. xhci: Fix USB 3.0 device restart on resume.

    commit d0cd5d4 upstream.
    
    The xHCI hub port code gets passed a zero-based port number by the USB
    core.  It then adds one to in order to find a device slot by port number
    and device speed by calling xhci_find_slot_id_by_port.  That function
    clearly states it requires a one-based port number.  The xHCI port
    status change event handler was using a zero-based port number that it
    got from find_faked_portnum_from_hw_portnum, not a one-based port
    number.  This lead to the doorbells never being rung for a device after
    a resume, or worse, a different device with the same speed having its
    doorbell rung (which could lead to bad power management in the xHCI host
    controller).
    
    This patch should be backported to kernels as old as 2.6.39.
    
    Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
    Acked-by: Andiry Xu <andiry.xu@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Sarah Sharp committed with gregkh Nov 15, 2011
  27. drivers/usb/host/ehci-fsl.c: add missing iounmap

    commit 2492c6e upstream.
    
    Add missing iounmap in error handling code, in a case where the function
    already preforms iounmap on some other execution path.
    
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    
    // <smpl>
    @@
    expression e;
    statement S,S1;
    int ret;
    @@
    e = \(ioremap\|ioremap_nocache\)(...)
    ... when != iounmap(e)
    if (<+...e...+>) S
    ... when any
        when != iounmap(e)
    *if (...)
       { ... when != iounmap(e)
         return ...; }
    ... when any
    iounmap(e);
    // </smpl>
    
    Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    JuliaLawall committed with gregkh Jan 12, 2012
  28. USB: usbsevseg: fix max length

    commit 1097cce upstream.
    
    This changes the max length for the usb seven segment delcom device to 8
    from 6. Delcom has both 6 and 8 variants and having 8 works fine with
    devices which are only 6.
    
    Signed-off-by: Harrison Metzger <harrisonmetz@gmail.com>
    Signed-off-by: Stuart Pook <stuart@acm.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    harrisonmetz committed with gregkh Jan 15, 2012
  29. vmwgfx: Fix assignment in vmw_framebuffer_create_handle

    commit bf9c05d upstream.
    
    The assignment of handle in vmw_framebuffer_create_handle doesn't actually do anything useful and is incorrectly assigning an integer value to a pointer argument. It appears that this is a typo and should be dereferencing handle rather than assigning to it directly. This fixes a bug where an undefined handle value is potentially returned to user-space.
    
    Signed-off-by: Ryan Mallon <rmallon@gmail.com>
    Reviewed-by: Jakob Bornecrantz<jakob@vmware.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    RyanMallon committed with gregkh Jan 27, 2012
  30. jsm: Fixed EEH recovery error

    commit 26aa38c upstream.
    
    There was an error on the jsm driver that would cause it to be unable to
    recover after a second error is detected.
    
    At the first error, the device recovers properly:
    
    [72521.485691] EEH: Detected PCI bus error on device 0003:02:00.0
    [72521.485695] EEH: This PCI device has failed 1 times in the last hour:
    ...
    [72532.035693] ttyn3 at MMIO 0x0 (irq = 49) is a jsm
    [72532.105689] jsm: Port 3 added
    
    However, at the second error, it cascades until EEH disables the device:
    
    [72631.229549] Call Trace:
    ...
    [72641.725687] jsm: Port 3 added
    [72641.725695] EEH: Detected PCI bus error on device 0003:02:00.0
    [72641.725698] EEH: This PCI device has failed 3 times in the last hour:
    
    It was caused because the PCI state was not being saved after the first
    restore. Therefore, at the second recovery the PCI state would not be
    restored.
    
    Signed-off-by: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
    Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
    Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Lucas Kannebley Tavares committed with gregkh Jan 9, 2012
  31. serial: amba-pl011: lock console writes against interrupts

    commit ef605fd upstream.
    
    Protect against pl011_console_write() and the interrupt for
    the console UART running concurrently on different CPUs.
    
    Otherwise the console_write could spin for a long time
    waiting for the UART to become not busy, while the other
    CPU continuously services UART interrupts and keeps the
    UART busy.
    
    The checks for sysrq and oops_in_progress are taken
    from 8250.c.
    
    Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
    Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
    Reviewed-by: Bibek Basu <bibek.basu@stericsson.com>
    Reviewed-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    rabinv committed with gregkh Jan 17, 2012
  32. TTY: fix UV serial console regression

    commit 0eee50a upstream.
    
    Commit 74c2107 (serial: Use block_til_ready helper) and its fixup
    3f582b8 (serial: fix termios settings in open) introduced a
    regression on UV systems. The serial eventually freezes while being
    used. It's completely unpredictable and sometimes needs a heap of
    traffic to happen first.
    
    To reproduce this, yast installation was used as it turned out to be
    pretty reliable in reproducing. Especially during installation process
    where one doesn't have an SSH daemon running. And no monitor as the HW
    is completely headless. So this was fun to find. Given the machine
    doesn't boot on vanilla before 2.6.36 final. (And the commits above
    are older.)
    
    Unless there is some bad race in the code, the hardware seems to be
    pretty broken. Otherwise pure MSR read should not cause such a bug,
    or?
    
    So to prevent the bug, revert to the old behavior. I.e. read modem
    status only if we really have to -- for non-CLOCAL set serials.
    Non-CLOCAL works on this hardware OK, I tried. See? I don't.
    
    And document that shit.
    
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    References: https://lkml.org/lkml/2011/12/6/573
    References: https://bugzilla.novell.com/show_bug.cgi?id=718518
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Jiri Slaby committed with gregkh Jan 12, 2012
  33. usb: io_ti: Make edge_remove_sysfs_attrs the port_remove method.

    commit 6d443d8 upstream.
    
    Calling edge_remove_sysfs_attrs from edge_disconnect is too late
    as the device has already been removed from sysfs.
    
    Do the simple and obvious thing and make edge_remove_sysfs_attrs
    the port_remove method.
    
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    Reported-by: Wolfgang Frisch <wfpub@roembden.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ebiederm committed with gregkh Jan 14, 2012