commit 4ff62ca06c0c0b084f585f7a2cfcf832b21d94fc
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sun Aug 16 20:52:51 2015 -0700

    Linux 4.1.6

commit 1ccdd6c6e9a342c2ed4ced38faa67303226a2a6a
Author: Jeff Layton <jlayton@poochiereds.net>
Date:   Thu Jul 30 06:57:46 2015 -0400

    nfsd: do nfs4_check_fh in nfs4_check_file instead of nfs4_check_olstateid
    
    commit 8fcd461db7c09337b6d2e22d25eb411123f379e3 upstream.
    
    Currently, preprocess_stateid_op calls nfs4_check_olstateid which
    verifies that the open stateid corresponds to the current filehandle in the
    call by calling nfs4_check_fh.
    
    If the stateid is a NFS4_DELEG_STID however, then no such check is done.
    This could cause incorrect enforcement of permissions, because the
    nfsd_permission() call in nfs4_check_file uses current the current
    filehandle, but any subsequent IO operation will use the file descriptor
    in the stateid.
    
    Move the call to nfs4_check_fh into nfs4_check_file instead so that it
    can be done for all stateid types.
    
    Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
    [bfields: moved fh check to avoid NULL deref in special stateid case]
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3b5c2aed0e5557c6bc4a305e7627a16a764b4cdb
Author: Christoph Hellwig <hch@lst.de>
Date:   Thu Jun 18 16:44:59 2015 +0200

    nfsd: refactor nfs4_preprocess_stateid_op
    
    commit a0649b2d3fffb1cde8745568c767f3a55a3462bc upstream.
    
    Split out two self contained helpers to make the function more readable.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Cc: Jeff Layton <jlayton@poochiereds.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f627ab0afcd983b3cb5f6d47c5006fd14cfc9a01
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Sat May 30 14:31:24 2015 +0200

    kvm: x86: fix kvm_apic_has_events to check for NULL pointer
    
    commit ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009 upstream.
    
    Malicious (or egregiously buggy) userspace can trigger it, but it
    should never happen in normal operation.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Wang Kai <morgan.wang@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 52124831a34a52764a2ce76f1ba0703ecf9d220a
Author: Amanieu d'Antras <amanieu@gmail.com>
Date:   Thu Aug 6 15:46:26 2015 -0700

    signal: fix information leak in copy_siginfo_from_user32
    
    commit 3c00cb5e68dc719f2fc73a33b1b230aadfcb1309 upstream.
    
    This function can leak kernel stack data when the user siginfo_t has a
    positive si_code value.  The top 16 bits of si_code descibe which fields
    in the siginfo_t union are active, but they are treated inconsistently
    between copy_siginfo_from_user32, copy_siginfo_to_user32 and
    copy_siginfo_to_user.
    
    copy_siginfo_from_user32 is called from rt_sigqueueinfo and
    rt_tgsigqueueinfo in which the user has full control overthe top 16 bits
    of si_code.
    
    This fixes the following information leaks:
    x86:   8 bytes leaked when sending a signal from a 32-bit process to
           itself. This leak grows to 16 bytes if the process uses x32.
           (si_code = __SI_CHLD)
    x86:   100 bytes leaked when sending a signal from a 32-bit process to
           a 64-bit process. (si_code = -1)
    sparc: 4 bytes leaked when sending a signal from a 32-bit process to a
           64-bit process. (si_code = any)
    
    parsic and s390 have similar bugs, but they are not vulnerable because
    rt_[tg]sigqueueinfo have checks that prevent sending a positive si_code
    to a different process.  These bugs are also fixed for consistency.
    
    Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Russell King <rmk@arm.linux.org.uk>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    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 c08a75d950725cdd87c19232a5a3850c51520359
Author: Amanieu d'Antras <amanieu@gmail.com>
Date:   Thu Aug 6 15:46:29 2015 -0700

    signal: fix information leak in copy_siginfo_to_user
    
    commit 26135022f85105ad725cda103fa069e29e83bd16 upstream.
    
    This function may copy the si_addr_lsb, si_lower and si_upper fields to
    user mode when they haven't been initialized, which can leak kernel
    stack data to user mode.
    
    Just checking the value of si_code is insufficient because the same
    si_code value is shared between multiple signals.  This is solved by
    checking the value of si_signo in addition to si_code.
    
    Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Russell King <rmk@arm.linux.org.uk>
    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 8a97f0e58abc93f67f1f6ca571e4ff758739cedf
Author: Amanieu d'Antras <amanieu@gmail.com>
Date:   Thu Aug 6 15:46:33 2015 -0700

    signalfd: fix information leak in signalfd_copyinfo
    
    commit 3ead7c52bdb0ab44f4bb1feed505a8323cc12ba7 upstream.
    
    This function may copy the si_addr_lsb field to user mode when it hasn't
    been initialized, which can leak kernel stack data to user mode.
    
    Just checking the value of si_code is insufficient because the same
    si_code value is shared between multiple signals.  This is solved by
    checking the value of si_signo in addition to si_code.
    
    Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    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 7f488aad4f9dbaced8a4529817a7404658406a96
Author: Michal Hocko <mhocko@suse.cz>
Date:   Tue Aug 4 14:36:58 2015 -0700

    mm, vmscan: Do not wait for page writeback for GFP_NOFS allocations
    
    commit ecf5fc6e9654cd7a268c782a523f072b2f1959f9 upstream.
    
    Nikolay has reported a hang when a memcg reclaim got stuck with the
    following backtrace:
    
    PID: 18308  TASK: ffff883d7c9b0a30  CPU: 1   COMMAND: "rsync"
      #0 __schedule at ffffffff815ab152
      #1 schedule at ffffffff815ab76e
      #2 schedule_timeout at ffffffff815ae5e5
      #3 io_schedule_timeout at ffffffff815aad6a
      #4 bit_wait_io at ffffffff815abfc6
      #5 __wait_on_bit at ffffffff815abda5
      #6 wait_on_page_bit at ffffffff8111fd4f
      #7 shrink_page_list at ffffffff81135445
      #8 shrink_inactive_list at ffffffff81135845
      #9 shrink_lruvec at ffffffff81135ead
     #10 shrink_zone at ffffffff811360c3
     #11 shrink_zones at ffffffff81136eff
     #12 do_try_to_free_pages at ffffffff8113712f
     #13 try_to_free_mem_cgroup_pages at ffffffff811372be
     #14 try_charge at ffffffff81189423
     #15 mem_cgroup_try_charge at ffffffff8118c6f5
     #16 __add_to_page_cache_locked at ffffffff8112137d
     #17 add_to_page_cache_lru at ffffffff81121618
     #18 pagecache_get_page at ffffffff8112170b
     #19 grow_dev_page at ffffffff811c8297
     #20 __getblk_slow at ffffffff811c91d6
     #21 __getblk_gfp at ffffffff811c92c1
     #22 ext4_ext_grow_indepth at ffffffff8124565c
     #23 ext4_ext_create_new_leaf at ffffffff81246ca8
     #24 ext4_ext_insert_extent at ffffffff81246f09
     #25 ext4_ext_map_blocks at ffffffff8124a848
     #26 ext4_map_blocks at ffffffff8121a5b7
     #27 mpage_map_one_extent at ffffffff8121b1fa
     #28 mpage_map_and_submit_extent at ffffffff8121f07b
     #29 ext4_writepages at ffffffff8121f6d5
     #30 do_writepages at ffffffff8112c490
     #31 __filemap_fdatawrite_range at ffffffff81120199
     #32 filemap_flush at ffffffff8112041c
     #33 ext4_alloc_da_blocks at ffffffff81219da1
     #34 ext4_rename at ffffffff81229b91
     #35 ext4_rename2 at ffffffff81229e32
     #36 vfs_rename at ffffffff811a08a5
     #37 SYSC_renameat2 at ffffffff811a3ffc
     #38 sys_renameat2 at ffffffff811a408e
     #39 sys_rename at ffffffff8119e51e
     #40 system_call_fastpath at ffffffff815afa89
    
    Dave Chinner has properly pointed out that this is a deadlock in the
    reclaim code because ext4 doesn't submit pages which are marked by
    PG_writeback right away.
    
    The heuristic was introduced by commit e62e384e9da8 ("memcg: prevent OOM
    with too many dirty pages") and it was applied only when may_enter_fs
    was specified.  The code has been changed by c3b94f44fcb0 ("memcg:
    further prevent OOM with too many dirty pages") which has removed the
    __GFP_FS restriction with a reasoning that we do not get into the fs
    code.  But this is not sufficient apparently because the fs doesn't
    necessarily submit pages marked PG_writeback for IO right away.
    
    ext4_bio_write_page calls io_submit_add_bh but that doesn't necessarily
    submit the bio.  Instead it tries to map more pages into the bio and
    mpage_map_one_extent might trigger memcg charge which might end up
    waiting on a page which is marked PG_writeback but hasn't been submitted
    yet so we would end up waiting for something that never finishes.
    
    Fix this issue by replacing __GFP_IO by may_enter_fs check (for case 2)
    before we go to wait on the writeback.  The page fault path, which is
    the only path that triggers memcg oom killer since 3.12, shouldn't
    require GFP_NOFS and so we shouldn't reintroduce the premature OOM
    killer issue which was originally addressed by the heuristic.
    
    As per David Chinner the xfs is doing similar thing since 2.6.15 already
    so ext4 is not the only affected filesystem.  Moreover he notes:
    
    : For example: IO completion might require unwritten extent conversion
    : which executes filesystem transactions and GFP_NOFS allocations. The
    : writeback flag on the pages can not be cleared until unwritten
    : extent conversion completes. Hence memory reclaim cannot wait on
    : page writeback to complete in GFP_NOFS context because it is not
    : safe to do so, memcg reclaim or otherwise.
    
    Cc: stable@vger.kernel.org # 3.9+
    [tytso@mit.edu: corrected the control flow]
    Fixes: c3b94f44fcb0 ("memcg: further prevent OOM with too many dirty pages")
    Reported-by: Nikolay Borisov <kernel@kyup.com>
    Signed-off-by: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 00d707ae64f062c2c4b488c76306278a1298557a
Author: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date:   Mon Jun 8 10:35:49 2015 +0900

    thermal: exynos: Disable the regulator on probe failure
    
    commit 5f09a5cbd14ae16e93866040fa44d930ff885650 upstream.
    
    During probe the regulator (if present) was enabled but not disabled in
    case of failure. So an unsuccessful probe lead to enabling the
    regulator which was actually not needed because the device was not
    enabled.
    
    Additionally each deferred probe lead to increase of regulator enable
    count so it would not be effectively disabled during removal of the
    device.
    
    Test HW: Exynos4412 - Trats2 board
    
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Fixes: 498d22f616f6 ("thermal: exynos: Support for TMU regulator defined at device tree")
    Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
    Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
    Tested-by: Lukasz Majewski <l.majewski@samsung.com>
    Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1770acb5356360a373c58835a8d1e786506a3f76
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Aug 3 14:06:24 2015 -0700

    Input: alps - only Dell laptops have separate button bits for v2 dualpoint sticks
    
    commit 073e570d7c2caae9910a993d56f340be4548a4a8 upstream.
    
    It turns out that only Dell laptops have the separate button bits for
    v2 dualpoint sticks and that commit 92bac83dd79e ("Input: alps - non
    interleaved V2 dualpoint has separate stick button bits") causes
    regressions on Toshiba laptops.
    
    This commit adds a check for Dell laptops to the code for handling these
    extra button bits, fixing this regression.
    
    This patch has been tested on a Dell Latitude D620 to make sure that it
    does not reintroduce the original problem.
    
    Reported-and-tested-by: Douglas Christman <douglaschristman@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit be9a404609b44c0fd35b40491d387ee5646da2d1
Author: Scott Wood <scottwood@freescale.com>
Date:   Fri Jun 26 19:43:58 2015 -0500

    mtd: nand: Fix NAND_USE_BOUNCE_BUFFER flag conflict
    
    commit 5f867db63473f32cce1b868e281ebd42a41f8fad upstream.
    
    Commit 66507c7bc8895f0da6b ("mtd: nand: Add support to use nand_base
    poi databuf as bounce buffer") added a flag NAND_USE_BOUNCE_BUFFER
    using the same bit value as the existing NAND_BUSWIDTH_AUTO.
    
    Cc: Kamal Dasu <kdasu.kdev@gmail.com>
    Fixes: 66507c7bc8895f0da6b ("mtd: nand: Add support to use nand_base
    	poi databuf as bounce buffer")
    Signed-off-by: Scott Wood <scottwood@freescale.com>
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a1e6e21f9ed08a436290af81bc3e8b51c8b2cfff
Author: Pieter Hollants <pieter@hollants.com>
Date:   Mon Jul 20 11:56:17 2015 +0200

    USB: qcserial: Add support for Dell Wireless 5809e 4G Modem
    
    commit 6da3700c98cdc8360f55c5510915efae1d66deea upstream.
    
    Added the USB IDs 0x413c:0x81b1 for the "Dell Wireless 5809e Gobi(TM) 4G
    LTE Mobile Broadband Card", a Dell-branded Sierra Wireless EM7305 LTE
    card in M.2 form factor, used eg. in Dell's Latitude E7540 Notebook
    series.
    
    "lsusb -v" output for this device:
    
    Bus 002 Device 003: ID 413c:81b1 Dell Computer Corp.
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      idVendor           0x413c Dell Computer Corp.
      idProduct          0x81b1
      bcdDevice            0.06
      iManufacturer           1 Sierra Wireless, Incorporated
      iProduct                2 Dell Wireless 5809e Gobiâ„¢ 4G LTE Mobile Broadband Card
      iSerial                 3
      bNumConfigurations      2
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength          204
        bNumInterfaces          4
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower              500mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        2
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      0
          bInterfaceProtocol      0
          iInterface              0
          ** UNRECOGNIZED:  05 24 00 10 01
          ** UNRECOGNIZED:  05 24 01 00 00
          ** UNRECOGNIZED:  04 24 02 02
          ** UNRECOGNIZED:  05 24 06 00 00
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x83  EP 3 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x000c  1x 12 bytes
            bInterval               9
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        3
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      0
          bInterfaceProtocol      0
          iInterface              0
          ** UNRECOGNIZED:  05 24 00 10 01
          ** UNRECOGNIZED:  05 24 01 00 00
          ** UNRECOGNIZED:  04 24 02 02
          ** UNRECOGNIZED:  05 24 06 00 00
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x85  EP 5 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x000c  1x 12 bytes
            bInterval               9
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x03  EP 3 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        8
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x87  EP 7 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x000a  1x 10 bytes
            bInterval               9
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x86  EP 6 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x04  EP 4 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
            ** UNRECOGNIZED:  2c ff 42 49 53 54 00 01 07 f5 40 f6 00 00 00 00 01 f7 c4 09 02 f8 c4 09 03 f9 88 13 04 fa 10 27 05 fb 10 27 06 fc c4 09 07 fd c4 09
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           95
        bNumInterfaces          2
        bConfigurationValue     2
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower              500mA
        Interface Association:
          bLength                 8
          bDescriptorType        11
          bFirstInterface        12
          bInterfaceCount         2
          bFunctionClass          2 Communications
          bFunctionSubClass      14
          bFunctionProtocol       0
          iFunction               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber       12
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         2 Communications
          bInterfaceSubClass     14
          bInterfaceProtocol      0
          iInterface              0
          CDC Header:
            bcdCDC               1.10
          CDC Union:
            bMasterInterface        12
            bSlaveInterface         13
          CDC MBIM:
            bcdMBIMVersion       1.00
            wMaxControlMessage   4096
            bNumberFilters       32
            bMaxFilterSize       128
            wMaxSegmentSize      1500
            bmNetworkCapabilities 0x20
              8-byte ntb input size
          CDC MBIM Extended:
            bcdMBIMExtendedVersion           1.00
            bMaxOutstandingCommandMessages     64
            wMTU                             1500
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               9
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber       13
          bAlternateSetting       0
          bNumEndpoints           0
          bInterfaceClass        10 CDC Data
          bInterfaceSubClass      0
          bInterfaceProtocol      2
          iInterface              0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber       13
          bAlternateSetting       1
          bNumEndpoints           2
          bInterfaceClass        10 CDC Data
          bInterfaceSubClass      0
          bInterfaceProtocol      2
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      bNumConfigurations      2
    Device Status:     0x0000
      (Bus Powered)
    
    Signed-off-by: Pieter Hollants <pieter@hollants.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8dc811bbac76eb7433d9731de2e7d0f91e0f9bc2
Author: Reinhard Speyerer <rspmn@arcor.de>
Date:   Tue Jul 14 22:55:06 2015 +0200

    USB: qcserial/option: make AT URCs work for Sierra Wireless MC7305/MC7355
    
    commit 653cdc13a340ad1cef29f1bab0d05d0771fa1d57 upstream.
    
    Tests with a Sierra Wireless MC7355 have shown that 1199:9041 devices
    also require the option_send_setup() code to be used on the USB
    interface for the AT port to make unsolicited response codes work
    correctly. Move these devices from the qcserial driver to the option
    driver like it has been done for the 1199:68c0 devices in commit
    d80c0d14183516f184a5ac88e11008ee4c7d2a2e ("USB: qcserial/option: make
    AT URCs work for Sierra Wireless MC73xx").
    
    Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 49b38223eaf3947542f18fec68c03ae6588c4abb
Author: Peter Chen <peter.chen@freescale.com>
Date:   Mon Jul 27 14:51:47 2015 +0800

    usb: gadget: f_uac2: fix calculation of uac2->p_interval
    
    commit c41b7767673cb76adeb2b5fde220209f717ea13c upstream.
    
    The p_interval should be less if the 'bInterval' at the descriptor
    is larger, eg, if 'bInterval' is 5 for HS, the p_interval should be
    8000 / 16 = 500.
    
    It fixes the patch 9bb87f168931 ("usb: gadget: f_uac2: send
    reasonably sized packets")
    
    Fixes: 9bb87f168931 ("usb: gadget: f_uac2: send reasonably sized packets")
    Acked-by: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Peter Chen <peter.chen@freescale.com>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7f49ff48592f08bc2419c0b87103c6e62bb5385a
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Sat Aug 1 07:01:24 2015 -0700

    staging: lustre: Include unaligned.h instead of access_ok.h
    
    commit fb1de5a4c825a389f054cc3803e06116d2fbdc7e upstream.
    
    Including access_ok.h causes the ia64:allmodconfig build (and maybe others)
    to fail with
    
    include/linux/unaligned/le_struct.h:6:19: error:
    	redefinition of 'get_unaligned_le16'
    include/linux/unaligned/access_ok.h:7:19: note:
    	previous definition of 'get_unaligned_le16' was here
    include/linux/unaligned/le_struct.h:26:20: error:
    	redefinition of 'put_unaligned_le32'
    include/linux/unaligned/access_ok.h:42:20: note:
    	previous definition of 'put_unaligned_le32' was here
    include/linux/unaligned/le_struct.h:31:20: error:
    	redefinition of 'put_unaligned_le64'
    include/linux/unaligned/access_ok.h:47:20: note:
    	previous definition of 'put_unaligned_le64' was here
    
    Include unaligned.h instead and leave it up to the architecture to decide
    how to implement unaligned accesses.
    
    Fixes: 8c4f136497315 ("Staging: lustre: Use put_unaligned_le64")
    Cc: Vaishali Thakkar <vthakkar1994@gmail.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 18d08fe123ad241d9cc9c3ab0562a607bb3189ef
Author: Malcolm Priestley <tvboxspy@gmail.com>
Date:   Sun Aug 2 12:34:46 2015 +0100

    staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULL
    
    commit 1f17124006b65482d9084c01e252b59dbca8db8f upstream.
    
    conf->beacon_rate can be NULL on association. So check conf->beacon_rate
    
    BSS_CHANGED_BEACON_INFO needs to flagged in changed as the beacon_rate
    will appear later.
    
    Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8ce686edc53a87b40c53597f03dc9c72877518a4
Author: Mike Snitzer <snitzer@redhat.com>
Date:   Mon Aug 3 09:54:58 2015 -0400

    dm: fix dm_merge_bvec regression on 32 bit systems
    
    commit bd4aaf8f9b85d6b2df3231fd62b219ebb75d3568 upstream.
    
    A DM regression on 32 bit systems was reported against v4.2-rc3 here:
    https://lkml.org/lkml/2015/7/29/401
    
    Fix this by reverting both commit 1c220c69 ("dm: fix casting bug in
    dm_merge_bvec()") and 148e51ba ("dm: improve documentation and code
    clarity in dm_merge_bvec").  This combined revert is done to eliminate
    the possibility of a partial revert in stable@ kernels.
    
    In hindsight the correct fix, at the time 1c220c69 was applied to fix
    the regression that 148e51ba introduced, should've been to simply revert
    148e51ba.
    
    Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
    Tested-by: Adam Williamson <awilliam@redhat.com>
    Acked-by: Joe Thornber <ejt@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 24a9fa79d5b9f3cf555c24336f56c0fcbbdd98bf
Author: NeilBrown <neilb@suse.com>
Date:   Mon Jul 27 11:48:52 2015 +1000

    md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies
    
    commit 423f04d63cf421ea436bcc5be02543d549ce4b28 upstream.
    
    raid1_end_read_request() assumes that the In_sync bits are consistent
    with the ->degaded count.
    raid1_spare_active updates the In_sync bit before the ->degraded count
    and so exposes an inconsistency, as does error()
    So extend the spinlock in raid1_spare_active() and error() to hide those
    inconsistencies.
    
    This should probably be part of
      Commit: 34cab6f42003 ("md/raid1: fix test for 'was read error from
      last working device'.")
    as it addresses the same issue.  It fixes the same bug and should go
    to -stable for same reasons.
    
    Fixes: 76073054c95b ("md/raid1: clean up read_balance.")
    Signed-off-by: NeilBrown <neilb@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit be424ace3767c8b632e88d110341e2a9fba8c9bb
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Tue Jul 14 18:27:46 2015 -0500

    PCI: Restore PCI_MSIX_FLAGS_BIRMASK definition
    
    commit c9ddbac9c89110f77cb0fa07e634aaf1194899aa upstream.
    
    09a2c73ddfc7 ("PCI: Remove unused PCI_MSIX_FLAGS_BIRMASK definition")
    removed PCI_MSIX_FLAGS_BIRMASK from an exported header because it was
    unused in the kernel.  But that breaks user programs that were using it
    (QEMU in particular).
    
    Restore the PCI_MSIX_FLAGS_BIRMASK definition.
    
    [bhelgaas: changelog]
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c7e6f05156402364f34669e0fa6fd69b834f994b
Author: Kinglong Mee <kinglongmee@gmail.com>
Date:   Tue Jul 7 10:16:37 2015 +0800

    nfsd: Drop BUG_ON and ignore SECLABEL on absent filesystem
    
    commit c2227a39a078473115910512aa0f8d53bd915e60 upstream.
    
    On an absent filesystem (one served by another server), we need to be
    able to handle requests for certain attributest (like fs_locations, so
    the client can find out which server does have the filesystem), but
    others we can't.
    
    We forgot to take that into account when adding another attribute
    bitmask work for the SECURITY_LABEL attribute.
    
    There an export entry with the "refer" option can result in:
    
    [   88.414272] kernel BUG at fs/nfsd/nfs4xdr.c:2249!
    [   88.414828] invalid opcode: 0000 [#1] SMP
    [   88.415368] Modules linked in: rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache nfsd xfs libcrc32c iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi iosf_mbi ppdev btrfs coretemp crct10dif_pclmul crc32_pclmul crc32c_intel xor ghash_clmulni_intel raid6_pq vmw_balloon parport_pc parport i2c_piix4 shpchp vmw_vmci acpi_cpufreq auth_rpcgss nfs_acl lockd grace sunrpc vmwgfx drm_kms_helper ttm drm mptspi mptscsih serio_raw mptbase e1000 scsi_transport_spi ata_generic pata_acpi [last unloaded: nfsd]
    [   88.417827] CPU: 0 PID: 2116 Comm: nfsd Not tainted 4.0.7-300.fc22.x86_64 #1
    [   88.418448] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
    [   88.419093] task: ffff880079146d50 ti: ffff8800785d8000 task.ti: ffff8800785d8000
    [   88.419729] RIP: 0010:[<ffffffffa04b3c10>]  [<ffffffffa04b3c10>] nfsd4_encode_fattr+0x820/0x1f00 [nfsd]
    [   88.420376] RSP: 0000:ffff8800785db998  EFLAGS: 00010206
    [   88.421027] RAX: 0000000000000001 RBX: 000000000018091a RCX: ffff88006668b980
    [   88.421676] RDX: 00000000fffef7fc RSI: 0000000000000000 RDI: ffff880078d05000
    [   88.422315] RBP: ffff8800785dbb58 R08: ffff880078d043f8 R09: ffff880078d4a000
    [   88.422968] R10: 0000000000010000 R11: 0000000000000002 R12: 0000000000b0a23a
    [   88.423612] R13: ffff880078d05000 R14: ffff880078683100 R15: ffff88006668b980
    [   88.424295] FS:  0000000000000000(0000) GS:ffff88007c600000(0000) knlGS:0000000000000000
    [   88.424944] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   88.425597] CR2: 00007f40bc370f90 CR3: 0000000035af5000 CR4: 00000000001407f0
    [   88.426285] Stack:
    [   88.426921]  ffff8800785dbaa8 ffffffffa049e4af ffff8800785dba08 ffffffff813298f0
    [   88.427585]  ffff880078683300 ffff8800769b0de8 0000089d00000001 0000000087f805e0
    [   88.428228]  ffff880000000000 ffff880079434a00 0000000000000000 ffff88006668b980
    [   88.428877] Call Trace:
    [   88.429527]  [<ffffffffa049e4af>] ? exp_get_by_name+0x7f/0xb0 [nfsd]
    [   88.430168]  [<ffffffff813298f0>] ? inode_doinit_with_dentry+0x210/0x6a0
    [   88.430807]  [<ffffffff8123833e>] ? d_lookup+0x2e/0x60
    [   88.431449]  [<ffffffff81236133>] ? dput+0x33/0x230
    [   88.432097]  [<ffffffff8123f214>] ? mntput+0x24/0x40
    [   88.432719]  [<ffffffff812272b2>] ? path_put+0x22/0x30
    [   88.433340]  [<ffffffffa049ac87>] ? nfsd_cross_mnt+0xb7/0x1c0 [nfsd]
    [   88.433954]  [<ffffffffa04b54e0>] nfsd4_encode_dirent+0x1b0/0x3d0 [nfsd]
    [   88.434601]  [<ffffffffa04b5330>] ? nfsd4_encode_getattr+0x40/0x40 [nfsd]
    [   88.435172]  [<ffffffffa049c991>] nfsd_readdir+0x1c1/0x2a0 [nfsd]
    [   88.435710]  [<ffffffffa049a530>] ? nfsd_direct_splice_actor+0x20/0x20 [nfsd]
    [   88.436447]  [<ffffffffa04abf30>] nfsd4_encode_readdir+0x120/0x220 [nfsd]
    [   88.437011]  [<ffffffffa04b58cd>] nfsd4_encode_operation+0x7d/0x190 [nfsd]
    [   88.437566]  [<ffffffffa04aa6dd>] nfsd4_proc_compound+0x24d/0x6f0 [nfsd]
    [   88.438157]  [<ffffffffa0496103>] nfsd_dispatch+0xc3/0x220 [nfsd]
    [   88.438680]  [<ffffffffa006f0cb>] svc_process_common+0x43b/0x690 [sunrpc]
    [   88.439192]  [<ffffffffa0070493>] svc_process+0x103/0x1b0 [sunrpc]
    [   88.439694]  [<ffffffffa0495a57>] nfsd+0x117/0x190 [nfsd]
    [   88.440194]  [<ffffffffa0495940>] ? nfsd_destroy+0x90/0x90 [nfsd]
    [   88.440697]  [<ffffffff810bb728>] kthread+0xd8/0xf0
    [   88.441260]  [<ffffffff810bb650>] ? kthread_worker_fn+0x180/0x180
    [   88.441762]  [<ffffffff81789e58>] ret_from_fork+0x58/0x90
    [   88.442322]  [<ffffffff810bb650>] ? kthread_worker_fn+0x180/0x180
    [   88.442879] Code: 0f 84 93 05 00 00 83 f8 ea c7 85 a0 fe ff ff 00 00 27 30 0f 84 ba fe ff ff 85 c0 0f 85 a5 fe ff ff e9 e3 f9 ff ff 0f 1f 44 00 00 <0f> 0b 66 0f 1f 44 00 00 be 04 00 00 00 4c 89 ef 4c 89 8d 68 fe
    [   88.444052] RIP  [<ffffffffa04b3c10>] nfsd4_encode_fattr+0x820/0x1f00 [nfsd]
    [   88.444658]  RSP <ffff8800785db998>
    [   88.445232] ---[ end trace 6cb9d0487d94a29f ]---
    
    Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4b6bf170e83e666974ce00d7251dd0d4b5ca5439
Author: Joseph Qi <joseph.qi@huawei.com>
Date:   Thu Aug 6 15:46:48 2015 -0700

    ocfs2: fix shift left overflow
    
    commit 32e5a2a2be6b085febaac36efff495ad65a55e6c upstream.
    
    When using a large volume, for example 9T volume with 2T already used,
    frequent creation of small files with O_DIRECT when the IO is not
    cluster aligned may clear sectors in the wrong place.  This will cause
    filesystem corruption.
    
    This is because p_cpos is a u32.  When calculating the corresponding
    sector it should be converted to u64 first, otherwise it may overflow.
    
    Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
    Cc: Mark Fasheh <mfasheh@suse.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    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 c42af788a7e6a33ff8d19b964d9e91df204fde9b
Author: Joseph Qi <joseph.qi@huawei.com>
Date:   Thu Aug 6 15:46:23 2015 -0700

    ocfs2: fix BUG in ocfs2_downconvert_thread_do_work()
    
    commit 209f7512d007980fd111a74a064d70a3656079cf upstream.
    
    The "BUG_ON(list_empty(&osb->blocked_lock_list))" in
    ocfs2_downconvert_thread_do_work can be triggered in the following case:
    
    ocfs2dc has firstly saved osb->blocked_lock_count to local varibale
    processed, and then processes the dentry lockres.  During the dentry
    put, it calls iput and then deletes rw, inode and open lockres from
    blocked list in ocfs2_mark_lockres_freeing.  And this causes the
    variable `processed' to not reflect the number of blocked lockres to be
    processed, which triggers the BUG.
    
    Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
    Cc: Mark Fasheh <mfasheh@suse.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    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 dbbf0fec573be060c7869674ec112b4c3de58957
Author: Marcus Gelderie <redmnic@gmail.com>
Date:   Thu Aug 6 15:46:10 2015 -0700

    ipc: modify message queue accounting to not take kernel data structures into account
    
    commit de54b9ac253787c366bbfb28d901a31954eb3511 upstream.
    
    A while back, the message queue implementation in the kernel was
    improved to use btrees to speed up retrieval of messages, in commit
    d6629859b36d ("ipc/mqueue: improve performance of send/recv").
    
    That patch introducing the improved kernel handling of message queues
    (using btrees) has, as a by-product, changed the meaning of the QSIZE
    field in the pseudo-file created for the queue.  Before, this field
    reflected the size of the user-data in the queue.  Since, it also takes
    kernel data structures into account.  For example, if 13 bytes of user
    data are in the queue, on my machine the file reports a size of 61
    bytes.
    
    There was some discussion on this topic before (for example
    https://lkml.org/lkml/2014/10/1/115).  Commenting on a th lkml, Michael
    Kerrisk gave the following background
    (https://lkml.org/lkml/2015/6/16/74):
    
        The pseudofiles in the mqueue filesystem (usually mounted at
        /dev/mqueue) expose fields with metadata describing a message
        queue. One of these fields, QSIZE, as originally implemented,
        showed the total number of bytes of user data in all messages in
        the message queue, and this feature was documented from the
        beginning in the mq_overview(7) page. In 3.5, some other (useful)
        work happened to break the user-space API in a couple of places,
        including the value exposed via QSIZE, which now includes a measure
        of kernel overhead bytes for the queue, a figure that renders QSIZE
        useless for its original purpose, since there's no way to deduce
        the number of overhead bytes consumed by the implementation.
        (The other user-space breakage was subsequently fixed.)
    
    This patch removes the accounting of kernel data structures in the
    queue.  Reporting the size of these data-structures in the QSIZE field
    was a breaking change (see Michael's comment above).  Without the QSIZE
    field reporting the total size of user-data in the queue, there is no
    way to deduce this number.
    
    It should be noted that the resource limit RLIMIT_MSGQUEUE is counted
    against the worst-case size of the queue (in both the old and the new
    implementation).  Therefore, the kernel overhead accounting in QSIZE is
    not necessary to help the user understand the limitations RLIMIT imposes
    on the processes.
    
    Signed-off-by: Marcus Gelderie <redmnic@gmail.com>
    Acked-by: Doug Ledford <dledford@redhat.com>
    Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
    Acked-by: Davidlohr Bueso <dbueso@suse.de>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: John Duffy <jb_duffy@btinternet.com>
    Cc: Arto Bendiken <arto@bendiken.net>
    Cc: Manfred Spraul <manfred@colorfullife.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 25ab1617bf735b8a411104c60852651cae6769fd
Author: Pali Rohár <pali.rohar@gmail.com>
Date:   Thu Jul 30 20:41:57 2015 +0200

    hwmon: (dell-smm) Blacklist Dell Studio XPS 8100
    
    commit a4b45b25f18d1e798965efec429ba5fc01b9f0b6 upstream.
    
    CPU fan speed going up and down on Dell Studio XPS 8100 for
    unknown reasons. Without further debugging on the affected
    machine, it is not possible to find the problem.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=100121
    Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
    Tested-by: Jan C Peters <jcpeters89@gmail.com>
    [groeck: cleaned up description, comments]
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f03bde70841d33615dc6921cca369f4035ee6c68
Author: Javier Martinez Canillas <javier@osg.samsung.com>
Date:   Thu Jul 30 18:18:39 2015 +0200

    hwmon: (nct7904) Export I2C module alias information
    
    commit 1252be9ce0ab4f622b8692b648894d09c0df71ce upstream.
    
    The I2C core always reports the MODALIAS uevent as "i2c:<client name"
    regardless if the driver was matched using the I2C id_table or the
    of_match_table. So the driver needs to export the I2C table and this
    be built into the module or udev won't have the necessary information
    to auto load the correct module when the device is added.
    
    Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4a4a6ddbd97f8942916c88dba7f6a189434fd222
Author: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Date:   Wed Aug 5 09:21:05 2015 +0900

    ALSA: fireworks/firewire-lib: add support for recent firmware quirk
    
    commit 18f5ed365d3f188a91149d528c853000330a4a58 upstream.
    
    Fireworks uses TSB43CB43(IceLynx-Micro) as its IEC 61883-1/6 interface.
    This chip includes ARM7 core, and loads and runs program. The firmware
    is stored in on-board memory and loaded every powering-on from it.
    
    Echo Audio ships several versions of firmwares for each model. These
    firmwares have each quirk and the quirk changes a sequence of packets.
    
    As long as I investigated, AudioFire2/AudioFire4/AudioFirePre8 have a
    quirk to transfer a first packet with 0x02 in its dbc field. This causes
    ALSA Fireworks driver to detect discontinuity. In this case, firmware
    version 5.7.0, 5.7.3 and 5.8.0 are used.
    
    Payload  CIP      CIP
    quadlets header1  header2
    02       00050002 90ffffff <-
    42       0005000a 90013000
    42       00050012 90014400
    42       0005001a 90015800
    02       0005001a 90ffffff
    42       00050022 90019000
    42       0005002a 9001a400
    42       00050032 9001b800
    02       00050032 90ffffff
    42       0005003a 9001d000
    42       00050042 9001e400
    42       0005004a 9001f800
    02       0005004a 90ffffff
    (AudioFire2 with firmware version 5.7.)
    
    $ dmesg
    snd-fireworks fw1.0: Detect discontinuity of CIP: 00 02
    
    These models, AudioFire8 (since Jul 2009 ) and Gibson Robot Interface
    Pack series uses the same ARM binary as their firmware. Thus, this
    quirk may be observed among them.
    
    This commit adds a new member for AMDTP structure. This member represents
    the value of dbc field in a first AMDTP packet. Drivers can set it with
    a preferred value according to model's quirk.
    
    Tested-by: Johannes Oertei <johannes.oertel@uni-due.de>
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 852fbebb7c8aa17fdea227299f45be119a65bd1c
Author: Hui Wang <hui.wang@canonical.com>
Date:   Wed Aug 5 18:03:34 2015 +0800

    ALSA: hda - one Dell machine needs the headphone white noise fixup
    
    commit 73851b36fe73819f8c201971e913324d4846a7ea upstream.
    
    The fixup ALC292_FIXUP_DISABLE_AAMIX can fix the white noise of
    the headphone on this Dell machine.
    
    Signed-off-by: Hui Wang <hui.wang@canonical.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 66832d90e275ca52f348d6599f4769f9a99aea1a
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Sat Jul 25 03:03:38 2015 +0300

    ALSA: hda - fix cs4210_spdif_automute()
    
    commit 44008f0896ae205b02b0882dbf807f0de149efc4 upstream.
    
    Smatch complains that we have nested checks for "spdif_present".  It
    turns out the current behavior isn't correct, we should remove the first
    check and keep the second.
    
    Fixes: 1077a024812d ('ALSA: hda - Use generic parser for Cirrus codec driver')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit dcee583335047bcc1501e3b49d4537a8320022c6
Author: Roger Quadros <rogerq@ti.com>
Date:   Thu Jul 16 16:16:44 2015 +0300

    ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc
    
    commit 9a258afa928b45e6dd2efcac46ccf7eea705d35a upstream.
    
    For hwmods without sysc, _init_mpu_rt_base(oh) won't be called and so
    _find_mpu_rt_port(oh) will return NULL thus preventing ready state check
    on those modules after the module is enabled.
    
    This can potentially cause a bus access error if the module is accessed
    before the module is ready.
    
    Fix this by unconditionally calling _init_mpu_rt_base() during hwmod
    _init(). Do ioremap only if we need SYSC access.
    
    Eventhough _wait_target_ready() check doesn't really need MPU RT port but
    just the PRCM registers, we still mandate that the hwmod must have an
    MPU RT port if ready state check needs to be done. Else it would mean that
    the module is not accessible by MPU so there is no point in waiting
    for target to be ready.
    
    e.g. this fixes the below DCAN bus access error on AM437x-gp-evm.
    
    [   16.672978] ------------[ cut here ]------------
    [   16.677885] WARNING: CPU: 0 PID: 1580 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x234/0x35c()
    [   16.687946] 44000000.ocp:L3 Custom Error: MASTER M2 (64-bit) TARGET L4_PER_0 (Read): Data Access in User mode during Functional access
    [   16.700654] Modules linked in: xhci_hcd btwilink ti_vpfe dwc3 videobuf2_core ov2659 bluetooth v4l2_common videodev ti_am335x_adc kfifo_buf industrialio c_can_platform videobuf2_dma_contig media snd_soc_tlv320aic3x pixcir_i2c_ts c_can dc
    [   16.731144] CPU: 0 PID: 1580 Comm: rpc.statd Not tainted 3.14.26-02561-gf733aa036398 #180
    [   16.739747] Backtrace:
    [   16.742336] [<c0011108>] (dump_backtrace) from [<c00112a4>] (show_stack+0x18/0x1c)
    [   16.750285]  r6:00000093 r5:00000009 r4:eab5b8a8 r3:00000000
    [   16.756252] [<c001128c>] (show_stack) from [<c05a4418>] (dump_stack+0x20/0x28)
    [   16.763870] [<c05a43f8>] (dump_stack) from [<c0037120>] (warn_slowpath_common+0x6c/0x8c)
    [   16.772408] [<c00370b4>] (warn_slowpath_common) from [<c00371e4>] (warn_slowpath_fmt+0x38/0x40)
    [   16.781550]  r8:c05d1f90 r7:c0730844 r6:c0730448 r5:80080003 r4:ed0cd210
    [   16.788626] [<c00371b0>] (warn_slowpath_fmt) from [<c027fa94>] (l3_interrupt_handler+0x234/0x35c)
    [   16.797968]  r3:ed0cd480 r2:c0730508
    [   16.801747] [<c027f860>] (l3_interrupt_handler) from [<c0063758>] (handle_irq_event_percpu+0x54/0x1bc)
    [   16.811533]  r10:ed005600 r9:c084855b r8:0000002a r7:00000000 r6:00000000 r5:0000002a
    [   16.819780]  r4:ed0e6d80
    [   16.822453] [<c0063704>] (handle_irq_event_percpu) from [<c00638f0>] (handle_irq_event+0x30/0x40)
    [   16.831789]  r10:eb2b6938 r9:eb2b6960 r8:bf011420 r7:fa240100 r6:00000000 r5:0000002a
    [   16.840052]  r4:ed005600
    [   16.842744] [<c00638c0>] (handle_irq_event) from [<c00661d8>] (handle_fasteoi_irq+0x74/0x128)
    [   16.851702]  r4:ed005600 r3:00000000
    [   16.855479] [<c0066164>] (handle_fasteoi_irq) from [<c0063068>] (generic_handle_irq+0x28/0x38)
    [   16.864523]  r4:0000002a r3:c0066164
    [   16.868294] [<c0063040>] (generic_handle_irq) from [<c000ef60>] (handle_IRQ+0x38/0x8c)
    [   16.876612]  r4:c081c640 r3:00000202
    [   16.880380] [<c000ef28>] (handle_IRQ) from [<c00084f0>] (gic_handle_irq+0x30/0x5c)
    [   16.888328]  r6:eab5ba38 r5:c0804460 r4:fa24010c r3:00000100
    [   16.894303] [<c00084c0>] (gic_handle_irq) from [<c05a8d80>] (__irq_svc+0x40/0x50)
    [   16.902193] Exception stack(0xeab5ba38 to 0xeab5ba80)
    [   16.907499] ba20:                                                       00000000 00000006
    [   16.916108] ba40: fa1d0000 fa1d0008 ed3d3000 eab5bab4 ed3d3460 c0842af4 bf011420 eb2b6960
    [   16.924716] ba60: eb2b6938 eab5ba8c eab5ba90 eab5ba80 bf035220 bf07702c 600f0013 ffffffff
    [   16.933317]  r7:eab5ba6c r6:ffffffff r5:600f0013 r4:bf07702c
    [   16.939317] [<bf077000>] (c_can_plat_read_reg_aligned_to_16bit [c_can_platform]) from [<bf035220>] (c_can_get_berr_counter+0x38/0x64 [c_can])
    [   16.952696] [<bf0351e8>] (c_can_get_berr_counter [c_can]) from [<bf010294>] (can_fill_info+0x124/0x15c [can_dev])
    [   16.963480]  r5:ec8c9740 r4:ed3d3000
    [   16.967253] [<bf010170>] (can_fill_info [can_dev]) from [<c0502fa8>] (rtnl_fill_ifinfo+0x58c/0x8fc)
    [   16.976749]  r6:ec8c9740 r5:ed3d3000 r4:eb2b6780
    [   16.981613] [<c0502a1c>] (rtnl_fill_ifinfo) from [<c0503408>] (rtnl_dump_ifinfo+0xf0/0x1dc)
    [   16.990401]  r10:ec8c9740 r9:00000000 r8:00000000 r7:00000000 r6:ebd4d1b4 r5:ed3d3000
    [   16.998671]  r4:00000000
    [   17.001342] [<c0503318>] (rtnl_dump_ifinfo) from [<c050e6e4>] (netlink_dump+0xa8/0x1e0)
    [   17.009772]  r10:00000000 r9:00000000 r8:c0503318 r7:ebf3e6c0 r6:ebd4d1b4 r5:ec8c9740
    [   17.018050]  r4:ebd4d000
    [   17.020714] [<c050e63c>] (netlink_dump) from [<c050ec10>] (__netlink_dump_start+0x104/0x154)
    [   17.029591]  r6:eab5bd34 r5:ec8c9980 r4:ebd4d000
    [   17.034454] [<c050eb0c>] (__netlink_dump_start) from [<c0505604>] (rtnetlink_rcv_msg+0x110/0x1f4)
    [   17.043778]  r7:00000000 r6:ec8c9980 r5:00000f40 r4:ebf3e6c0
    [   17.049743] [<c05054f4>] (rtnetlink_rcv_msg) from [<c05108e8>] (netlink_rcv_skb+0xb4/0xc8)
    [   17.058449]  r8:eab5bdac r7:ec8c9980 r6:c05054f4 r5:ec8c9980 r4:ebf3e6c0
    [   17.065534] [<c0510834>] (netlink_rcv_skb) from [<c0504134>] (rtnetlink_rcv+0x24/0x2c)
    [   17.073854]  r6:ebd4d000 r5:00000014 r4:ec8c9980 r3:c0504110
    [   17.079846] [<c0504110>] (rtnetlink_rcv) from [<c05102ac>] (netlink_unicast+0x180/0x1ec)
    [   17.088363]  r4:ed0c6800 r3:c0504110
    [   17.092113] [<c051012c>] (netlink_unicast) from [<c0510670>] (netlink_sendmsg+0x2ac/0x380)
    [   17.100813]  r10:00000000 r8:00000008 r7:ec8c9980 r6:ebd4d000 r5:eab5be70 r4:eab5bee4
    [   17.109083] [<c05103c4>] (netlink_sendmsg) from [<c04dfdb4>] (sock_sendmsg+0x90/0xb0)
    [   17.117305]  r10:00000000 r9:eab5a000 r8:becdda3c r7:0000000c r6:ea978400 r5:eab5be70
    [   17.125563]  r4:c05103c4
    [   17.128225] [<c04dfd24>] (sock_sendmsg) from [<c04e1c28>] (SyS_sendto+0xb8/0xdc)
    [   17.136001]  r6:becdda5c r5:00000014 r4:ecd37040
    [   17.140876] [<c04e1b70>] (SyS_sendto) from [<c000e680>] (ret_fast_syscall+0x0/0x30)
    [   17.148923]  r10:00000000 r8:c000e804 r7:00000122 r6:becdda5c r5:0000000c r4:becdda5c
    [   17.157169] ---[ end trace 2b71e15b38f58bad ]---
    
    Fixes: 6423d6df1440 ("ARM: OMAP2+: hwmod: check for module address space during init")
    Signed-off-by: Roger Quadros <rogerq@ti.com>
    Signed-off-by: Paul Walmsley <paul@pwsan.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d13a03e5e2ae19babd18be7814ec52992c618c69
Author: Denis Carikli <denis@eukrea.com>
Date:   Thu Jul 23 10:31:12 2015 +0200

    ARM: dts: i.MX35: Fix can support.
    
    commit e053f96b1a00022b4e2c7ceb7ac0229646626507 upstream.
    
    Since commit 3d42a379b6fa5b46058e3302b1802b29f64865bb
    ("can: flexcan: add 2nd clock to support imx53 and newer")
    the can driver requires a dt nodes to have a second clock.
    Add them to imx35 to fix probing the flex can driver on the
    respective platforms.
    
    Signed-off-by: Denis Carikli <denis@eukrea.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1fc5d70706d0de5dba99b541689c1c6a66727711
Author: Ilya Dryomov <idryomov@gmail.com>
Date:   Thu Jul 16 17:36:11 2015 +0300

    rbd: fix copyup completion race
    
    commit 2761713d35e370fd640b5781109f753066b746c4 upstream.
    
    For write/discard obj_requests that involved a copyup method call, the
    opcode of the first op is CEPH_OSD_OP_CALL and the ->callback is
    rbd_img_obj_copyup_callback().  The latter frees copyup pages, sets
    ->xferred and delegates to rbd_img_obj_callback(), the "normal" image
    object callback, for reporting to block layer and putting refs.
    
    rbd_osd_req_callback() however treats CEPH_OSD_OP_CALL as a trivial op,
    which means obj_request is marked done in rbd_osd_trivial_callback(),
    *before* ->callback is invoked and rbd_img_obj_copyup_callback() has
    a chance to run.  Marking obj_request done essentially means giving
    rbd_img_obj_callback() a license to end it at any moment, so if another
    obj_request from the same img_request is being completed concurrently,
    rbd_img_obj_end_request() may very well be called on such prematurally
    marked done request:
    
    <obj_request-1/2 reply>
    handle_reply()
      rbd_osd_req_callback()
        rbd_osd_trivial_callback()
        rbd_obj_request_complete()
        rbd_img_obj_copyup_callback()
        rbd_img_obj_callback()
                                        <obj_request-2/2 reply>
                                        handle_reply()
                                          rbd_osd_req_callback()
                                            rbd_osd_trivial_callback()
          for_each_obj_request(obj_request->img_request) {
            rbd_img_obj_end_request(obj_request-1/2)
            rbd_img_obj_end_request(obj_request-2/2) <--
          }
    
    Calling rbd_img_obj_end_request() on such a request leads to trouble,
    in particular because its ->xfferred is 0.  We report 0 to the block
    layer with blk_update_request(), get back 1 for "this request has more
    data in flight" and then trip on
    
        rbd_assert(more ^ (which == img_request->obj_request_count));
    
    with rhs (which == ...) being 1 because rbd_img_obj_end_request() has
    been called for both requests and lhs (more) being 1 because we haven't
    got a chance to set ->xfferred in rbd_img_obj_copyup_callback() yet.
    
    To fix this, leverage that rbd wants to call class methods in only two
    cases: one is a generic method call wrapper (obj_request is standalone)
    and the other is a copyup (obj_request is part of an img_request).  So
    make a dedicated handler for CEPH_OSD_OP_CALL and directly invoke
    rbd_img_obj_copyup_callback() from it if obj_request is part of an
    img_request, similar to how CEPH_OSD_OP_READ handler invokes
    rbd_img_obj_request_read_callback().
    
    Since rbd_img_obj_copyup_callback() is now being called from the OSD
    request callback (only), it is renamed to rbd_osd_copyup_callback().
    
    Cc: Alex Elder <elder@linaro.org>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Reviewed-by: Alex Elder <elder@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 593b1559bb5024f922724b86c161a13006948d63
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Wed Jul 22 18:05:35 2015 +0800

    crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer
    
    commit f898c522f0e9ac9f3177d0762b76e2ab2d2cf9c0 upstream.
    
    This patch removes a bogus BUG_ON in the ablkcipher path that
    triggers when the destination buffer is different from the source
    buffer and is scattered.
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7047312d383203f7b8447261f1a473cf54aedec3
Author: Tadeusz Struk <tadeusz.struk@intel.com>
Date:   Tue Jul 21 22:07:47 2015 -0700

    crypto: qat - Fix invalid synchronization between register/unregister sym algs
    
    commit 6f043b50da8e03bdcc5703fd37ea45bc6892432f upstream.
    
    The synchronization method used atomic was bogus.
    Use a proper synchronization with mutex.
    
    Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 640e60174d90fe6043fd79c645dce206eb2d1ab9
Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date:   Fri Jul 24 13:13:30 2015 +0200

    hwrng: core - correct error check of kthread_run call
    
    commit 17fb874dee093139923af8ed36061faa92cc8e79 upstream.
    
    The kthread_run() function can return two different error values
    but the hwrng core only checks for -ENOMEM. If the other error
    value -EINTR is returned it is assigned to hwrng_fill and later
    used on a kthread_stop() call which naturally crashes.
    
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f90781aa88aaf93f78d8ef7ad002f6ae526ac132
Author: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Date:   Fri Jun 26 03:28:24 2015 +0200

    xen/gntdevt: Fix race condition in gntdev_release()
    
    commit 30b03d05e07467b8c6ec683ea96b5bffcbcd3931 upstream.
    
    While gntdev_release() is called the MMU notifier is still registered
    and can traverse priv->maps list even if no pages are mapped (which is
    the case -- gntdev_release() is called after all). But
    gntdev_release() will clear that list, so make sure that only one of
    those things happens at the same time.
    
    Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d24944adc3fb3e128ddb9c695f339b395e798cfb
Author: Andy Lutomirski <luto@kernel.org>
Date:   Thu Jul 30 14:31:31 2015 -0700

    x86/xen: Probe target addresses in set_aliased_prot() before the hypercall
    
    commit aa1acff356bbedfd03b544051f5b371746735d89 upstream.
    
    The update_va_mapping hypercall can fail if the VA isn't present
    in the guest's page tables.  Under certain loads, this can
    result in an OOPS when the target address is in unpopulated vmap
    space.
    
    While we're at it, add comments to help explain what's going on.
    
    This isn't a great long-term fix.  This code should probably be
    changed to use something like set_memory_ro.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Cc: Andrew Cooper <andrew.cooper3@citrix.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: David Vrabel <dvrabel@cantab.net>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Jan Beulich <jbeulich@suse.com>
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Sasha Levin <sasha.levin@oracle.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: security@kernel.org <security@kernel.org>
    Cc: xen-devel <xen-devel@lists.xen.org>
    Link: http://lkml.kernel.org/r/0b0e55b995cda11e7829f140b833ef932fcabe3a.1438291540.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 07d74a4b2fd2d3ec063b5350a185a18cfedc3712
Author: Lars-Peter Clausen <lars@metafoo.de>
Date:   Tue Jul 21 11:51:35 2015 +0200

    ASoC: dapm: Don't add prefix to widget stream name
    
    commit a798c24a69b64f09e2d323ac8155a36373e5d5fd upstream.
    
    Commit fdb6eb0a1287 ("ASoC: dapm: Modify widget stream name according to
    prefix") fixed the case where a DAPM route between a DAI widget and a
    DAC/ADC/AIF widget with a matching stream name was not created when the
    DAPM context was using a prefix.
    
    Unfortunately the patch introduced a few issues on its own like leaking the
    dynamically allocated stream name memory and also not checking whether the
    allocation succeeded in the first place.
    
    It is also incomplete in that it still does not handle the case where
    stream name of the widget is a substring of the stream name of the DAI,
    which is explicitly allowed and works fine if no DAPM prefix is used.
    
    Revert the commit and take a slightly different approach to solving the
    issue. Instead of comparing the widget's stream name to the name of the DAI
    widget compare it to the stream name of the DAI widget. The stream name of
    the DAI widget is identical to the name of the DAI widget except that it
    wont have the DAPM prefix added. So this approach behaves identical
    regardless to whether the DAPM context uses a prefix or not.
    
    We don't have to worry about potentially matching with a widget with the
    same stream name, but from a different DAPM context with a different
    prefix, since the code already makes sure that both the DAI widget and the
    matched widget are from the same DAPM context.
    
    Fixes: fdb6eb0a1287 ("ASoC: dapm: Modify widget stream name according to prefix")
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d90d06680f8287f11a5ad6d83680790e5da86f08
Author: Lars-Peter Clausen <lars@metafoo.de>
Date:   Mon Jul 6 17:01:24 2015 +0200

    ASoC: dapm: Lock during userspace access
    
    commit e50b1e06b79e9d51efbff9627b4dd407184ef43f upstream.
    
    The DAPM lock must be held when accessing the DAPM graph status through
    sysfs or debugfs, otherwise concurrent changes to the graph can result in
    undefined behaviour.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e52e67a7832367967b3a1b363eb2f90c4f5e153a
Author: Axel Lin <axel.lin@ingics.com>
Date:   Thu Jul 23 23:22:26 2015 +0800

    ASoC: pcm1681: Fix setting de-emphasis sampling rate selection
    
    commit fa8173a3ef0570affde7da352de202190b3786c2 upstream.
    
    The de-emphasis sampling rate selection is controlled by BIT[3:4] of
    PCM1681_DEEMPH_CONTROL register. Do proper left shift to set it.
    
    Signed-off-by: Axel Lin <axel.lin@ingics.com>
    Acked-by: Marek Belisko <marek.belisko@streamunlimited.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b0e4d399f6c4d463250cd28c0be6cccf4c7127d5
Author: Ben Zhang <benzh@chromium.org>
Date:   Tue Jul 21 14:46:26 2015 -0700

    ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
    
    commit a6c2a32ac83567f15e9af3dcbc73148ce68b2ced upstream.
    
    The regmap_write in ssm4567_set_dai_fmt accidentally clears the
    TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.
    
    This patch fixes it by using regmap_update_bits with proper mask.
    
    Signed-off-by: Ben Zhang <benzh@chromium.org>
    Acked-by: Lars-Peter Clausen <lars@metafoo.de>
    Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ba8d2b484d19090e0c19b38c4f3d8d1ab65107bb
Author: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
Date:   Wed Jul 15 07:58:09 2015 -0700

    ASoC: Intel: Get correct usage_count value to load firmware
    
    commit 412efa73dcd3bd03c1838c91e094533a95529039 upstream.
    
    The usage_count variable was read before it was set to the correct
    value, due to which the firmware load was failing. Because of this
    IPC messages sent to the firmware were timing out causing a delay
    of about 1 second while playing audio from the internal speakers.
    
    With this patch the usage_count is read after the function call
    pm_runtime_get_sync which will increment the usage_count variable
    and the firmware load is successful and all the IPC messages are
    processed correctly.
    
    Signed-off-by: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com>
    Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 40114a3e4210f30b5d16788e6e7b928868881cfd
Author: Murali Karicheri <m-karicheri2@ti.com>
Date:   Fri May 29 12:04:13 2015 -0400

    ARM: dts: keystone: fix dt bindings to use post div register for mainpll
    
    commit c1bfa985ded82cacdfc6403e78f329c44e35534a upstream.
    
    All of the keystone devices have a separate register to hold post
    divider value for main pll clock. Currently the fixed-postdiv
    value used for k2hk/l/e SoCs works by sheer luck as u-boot happens to
    use a value of 2 for this. Now that we have fixed this in the pll
    clock driver change the dt bindings for the same.
    
    Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
    Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
    Signed-off-by: Olof Johansson <olof@lixom.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c6fdd1b52bb30abd861708f18509493cbb84ec44
Author: Murali Karicheri <m-karicheri2@ti.com>
Date:   Fri May 29 12:04:12 2015 -0400

    clk: keystone: add support for post divider register for main pll
    
    commit 02fdfd708fd252a778709beb6c65d5e7360341ac upstream.
    
    Main PLL controller has post divider bits in a separate register in
    pll controller. Use the value from this register instead of fixed
    divider when available.
    
    Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
    Signed-off-by: Michael Turquette <mturquette@baylibre.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b75513b0f1c734b1e084a6e9952ea6260d4724e3
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Aug 6 19:13:25 2015 -0700

    sparc64: Fix userspace FPU register corruptions.
    
    [ Upstream commit 44922150d87cef616fd183220d43d8fde4d41390 ]
    
    If we have a series of events from userpsace, with %fprs=FPRS_FEF,
    like follows:
    
    ETRAP
    	ETRAP
    		VIS_ENTRY(fprs=0x4)
    		VIS_EXIT
    		RTRAP (kernel FPU restore with fpu_saved=0x4)
    	RTRAP
    
    We will not restore the user registers that were clobbered by the FPU
    using kernel code in the inner-most trap.
    
    Traps allocate FPU save slots in the thread struct, and FPU using
    sequences save the "dirty" FPU registers only.
    
    This works at the initial trap level because all of the registers
    get recorded into the top-level FPU save area, and we'll return
    to userspace with the FPU disabled so that any FPU use by the user
    will take an FPU disabled trap wherein we'll load the registers
    back up properly.
    
    But this is not how trap returns from kernel to kernel operate.
    
    The simplest fix for this bug is to always save all FPU register state
    for anything other than the top-most FPU save area.
    
    Getting rid of the optimized inner-slot FPU saving code ends up
    making VISEntryHalf degenerate into plain VISEntry.
    
    Longer term we need to do something smarter to reinstate the partial
    save optimizations.  Perhaps the fundament error is having trap entry
    and exit allocate FPU save slots and restore register state.  Instead,
    the VISEntry et al. calls should be doing that work.
    
    This bug is about two decades old.
    
    Reported-by: James Y Knight <jyknight@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2d089963836a8e884df3788fad73d5048d0d88b1
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Jul 7 17:30:25 2015 +0800

    crypto: nx - Fix reentrancy bugs
    
    commit 030f4e968741d65aea9cd5f7814d1164967801ef upstream.
    
    This patch fixes a host of reentrancy bugs in the nx driver.  The
    following algorithms are affected:
    
    * CCM
    * GCM
    * CTR
    * XCBC
    * SHA256
    * SHA512
    
    The crypto API allows a single transform to be used by multiple
    threads simultaneously.  For example, IPsec will use a single tfm
    to process packets for a given SA.  As packets may arrive on
    multiple CPUs that tfm must be reentrant.
    
    The nx driver does try to deal with this by using a spin lock.
    Unfortunately only the basic AES/CBC/ECB algorithms do this in
    the correct way.
    
    The symptom of these bugs may range from the generation of incorrect
    output to memory corruption.
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 71a0c1ecf7004a5949cceaa4bb1240923e9d2000
Author: Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Date:   Thu Apr 23 17:41:43 2015 -0300

    crypto: nx - Fixing SHA update bug
    
    commit 10d87b730e1d9f1442cae6487bb3aef8632bed23 upstream.
    
    Bug happens when a data size less than SHA block size is passed.
    Since first attempt will be saved in buffer, second round attempt
    get into two step to calculate op.inlen and op.outlen. The issue
    resides in this step. A  wrong value of op.inlen and outlen was being
    calculated.
    
    This patch fix this eliminate the nx_sha_build_sg_list, that is
    useless in SHA's algorithm context. Instead we call nx_build_sg_list
    directly and pass a previous calculated max_sg_len to it.
    
    Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b2b6e1667f52af6477f4a360cefe8c463dfb60fa
Author: Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Date:   Thu Apr 23 17:40:30 2015 -0300

    crypto: nx - Fixing NX data alignment with nx_sg list
    
    commit c3365ce130e50176533debe1cabebcdb8e61156c upstream.
    
    In NX we need to pass always a 16 multiple size nx_sg_list to
    co processor. Trim function handle with this assuring all nx_sg_lists
    are 16 multiple size, although data was not being considerated when
    crop was done. It was causing an unalignment between size of the list
    and data, corrupting csbcpb fields returning a -23 H_ST_PARM error, or
    invalid operation.
    
    This patch fix this recalculating how much data should be put back
    in to_process variable what assures the size of sg_list will be
    correct with size of the data.
    
    Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c0e0ec977861b29059691d51a68bf563d3bc218a
Author: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Date:   Tue Jun 30 14:36:57 2015 +0200

    dmaengine: at_xdmac: fix transfer data width in at_xdmac_prep_slave_sg()
    
    commit 1c8a38b1268aebc1a903b21b11575077e02d2cf7 upstream.
    
    This patch adds the missing update of the transfer data width in
    at_xdmac_prep_slave_sg().
    
    Indeed, for each item in the scatter-gather list, we check whether the
    transfer length is aligned with the data width provided by
    dmaengine_slave_config(). If so, we directly use this data width for the
    current part of the transfer we are preparing. Otherwise, the data width
    is reduced to 8 bits (1 byte). Of course, the actual number of register
    accesses must also be updated to match the new data width.
    
    So one chunk was missing in the original patch (see Fixes tag below): the
    number of register accesses was correctly set to (len >> fixed_dwidth) in
    mbr_ubc but the real data width was not updated in mbr_cfg. Since mbr_cfg
    may change for each part of the scatter-gather transfer this also explains
    why the original patch used the Descriptor View 2 instead of the
    Descriptor View 1.
    
    Let's take the example of a DMA transfer to write 8bit data into an Atmel
    USART with FIFOs. When FIFOs are enabled in the USART, its Transmit
    Holding Register (THR) works in multidata mode, that is to say that up to
    4 8bit data can be written into the THR in a single 32bit access and it is
    still possible to write only one data with a 8bit access. To take
    advantage of this new feature, the DMA driver was modified to allow
    multiple dwidths when doing slave transfers.
    For instance, when the total length is 22 bytes, the USART driver splits
    the transfer into 2 parts:
    
    First part: 20 bytes transferred through 5 32bit writes into THR
    Second part: 2 bytes transferred though 2 8bit writes into THR
    
    For the second part, the data width was first set to 4_BYTES by the USART
    driver thanks to dmaengine_slave_config() then at_xdmac_prep_slave_sg()
    reduces this data width to 1_BYTE because the 2 byte length is not aligned
    with the original 4_BYTES data width. Since the data width is modified,
    the actual number of writes into THR must be set accordingly.
    
    Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
    Fixes: 6d3a7d9e3ada ("dmaengine: at_xdmac: allow muliple dwidths when doing slave transfers")
    Cc: stable@vger.kernel.org #4.0 and later
    Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
    Signed-off-by: Vinod Koul <vinod.koul@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 37df1cab0c4d4ec0f4bec868b2e26b84e725c478
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Jul 15 10:29:38 2015 -0700

    x86/nmi/64: Use DF to avoid userspace RSP confusing nested NMI detection
    
    commit 810bc075f78ff2c221536eb3008eac6a492dba2d upstream.
    
    We have a tricky bug in the nested NMI code: if we see RSP
    pointing to the NMI stack on NMI entry from kernel mode, we
    assume that we are executing a nested NMI.
    
    This isn't quite true.  A malicious userspace program can point
    RSP at the NMI stack, issue SYSCALL, and arrange for an NMI to
    happen while RSP is still pointing at the NMI stack.
    
    Fix it with a sneaky trick.  Set DF in the region of code that
    the RSP check is intended to detect.  IRET will clear DF
    atomically.
    
    ( Note: other than paravirt, there's little need for all this
      complexity. We could check RIP instead of RSP. )
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: stable@vger.kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d8246ca4e3ce08c9ed98ebe292f36ee2bc5f54ab
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Jul 15 10:29:37 2015 -0700

    x86/nmi/64: Reorder nested NMI checks
    
    commit a27507ca2d796cfa8d907de31ad730359c8a6d06 upstream.
    
    Check the repeat_nmi .. end_repeat_nmi special case first.  The
    next patch will rework the RSP check and, as a side effect, the
    RSP check will no longer detect repeat_nmi .. end_repeat_nmi, so
    we'll need this ordering of the checks.
    
    Note: this is more subtle than it appears.  The check for
    repeat_nmi .. end_repeat_nmi jumps straight out of the NMI code
    instead of adjusting the "iret" frame to force a repeat.  This
    is necessary, because the code between repeat_nmi and
    end_repeat_nmi sets "NMI executing" and then writes to the
    "iret" frame itself.  If a nested NMI comes in and modifies the
    "iret" frame while repeat_nmi is also modifying it, we'll end up
    with garbage.  The old code got this right, as does the new
    code, but the new code is a bit more explicit.
    
    If we were to move the check right after the "NMI executing"
    check, then we'd get it wrong and have random crashes.
    
    ( Because the "NMI executing" check would jump to the code that would
      modify the "iret" frame without checking if the interrupted NMI was
      currently modifying it. )
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: stable@vger.kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1dd191d72fdfb46988d8c97c8b19fc6d83d44d3e
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Jul 15 10:29:36 2015 -0700

    x86/nmi/64: Improve nested NMI comments
    
    commit 0b22930ebad563ae97ff3f8d7b9f12060b4c6e6b upstream.
    
    I found the nested NMI documentation to be difficult to follow.
    Improve the comments.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 60e6cbaf875edd9aef40948d0790decb8e1a77cc
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Jul 15 10:29:35 2015 -0700

    x86/nmi/64: Switch stacks on userspace NMI entry
    
    commit 9b6e6a8334d56354853f9c255d1395c2ba570e0a upstream.
    
    Returning to userspace is tricky: IRET can fail, and ESPFIX can
    rearrange the stack prior to IRET.
    
    The NMI nesting fixup relies on a precise stack layout and
    atomic IRET.  Rather than trying to teach the NMI nesting fixup
    to handle ESPFIX and failed IRET, punt: run NMIs that came from
    user mode on the normal kernel stack.
    
    This will make some nested NMIs visible to C code, but the C
    code is okay with that.
    
    As a side effect, this should speed up perf: it eliminates an
    RDMSR when NMIs come from user mode.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Reviewed-by: Borislav Petkov <bp@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: stable@vger.kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f163d838c24833d4493e693a612be275b723d5e8
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Jul 15 10:29:34 2015 -0700

    x86/nmi/64: Remove asm code that saves CR2
    
    commit 0e181bb58143cb4a2e8f01c281b0816cd0e4798e upstream.
    
    Now that do_nmi saves CR2, we don't need to save it in asm.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Acked-by: Borislav Petkov <bp@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e0146756cb2b7122adbe9b5bb97da4a99c5437b3
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Jul 15 10:29:33 2015 -0700

    x86/nmi: Enable nested do_nmi() handling for 64-bit kernels
    
    commit 9d05041679904b12c12421cbcf9cb5f4860a8d7b upstream.
    
    32-bit kernels handle nested NMIs in C.  Enable the exact same
    handling on 64-bit kernels as well.  This isn't currently
    necessary, but it will become necessary once the asm code starts
    allowing limited nesting.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4e1fb62bc119a4a130b01ff538c2b9a4c0853acc
Author: Andy Lutomirski <luto@kernel.org>
Date:   Thu Jun 4 13:24:29 2015 -0700

    x86/asm/entry/64: Remove pointless jump to irq_return
    
    commit 5ca6f70f387b4f82903037cc3c5488e2c97dcdbc upstream.
    
    INTERRUPT_RETURN turns into a jmp instruction.  There's no need
    for extra indirection.
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Cc: <linux-kernel@vger.kernel.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/2f2318653dbad284a59311f13f08cea71298fd7c.1433449436.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b235edce5cbe4e978d44d8c57ec15afc4ba27d50
Author: Michal Kazior <michal.kazior@tieto.com>
Date:   Mon Apr 20 09:20:41 2015 +0000

    ath10k: fix qca61x4 hw2.1 support
    
    commit 11a002efbaa7fbd9f6e616695ab42aa9f1caf060 upstream.
    
    During initialization firmware does some sort of
    memory switch between DRAM and IRAM. If
    configuration value for bank switching isn't
    correct device crashes during init.
    
    The new value prevents firmware 11.0.0.302 (and
    possibly others) for qca61x4 hw2.1 from crashing
    during init.
    
    Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
    Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 33afeac21b9cb79ad8fc5caf239af89c79e25e1e
Author: Benjamin Randazzo <benjamin@randazzo.fr>
Date:   Sat Jul 25 16:36:50 2015 +0200

    md: use kzalloc() when bitmap is disabled
    
    commit b6878d9e03043695dbf3fa1caa6dfc09db225b16 upstream.
    
    In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
    mdu_bitmap_file_t called "file".
    
    5769         file = kmalloc(sizeof(*file), GFP_NOIO);
    5770         if (!file)
    5771                 return -ENOMEM;
    
    This structure is copied to user space at the end of the function.
    
    5786         if (err == 0 &&
    5787             copy_to_user(arg, file, sizeof(*file)))
    5788                 err = -EFAULT
    
    But if bitmap is disabled only the first byte of "file" is initialized
    with zero, so it's possible to read some bytes (up to 4095) of kernel
    space memory from user space. This is an information leak.
    
    5775         /* bitmap disabled, zero the first byte and copy out */
    5776         if (!mddev->bitmap_info.file)
    5777                 file->pathname[0] = '\0';
    
    Signed-off-by: Benjamin Randazzo <benjamin@randazzo.fr>
    Signed-off-by: NeilBrown <neilb@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 73f7d1ff06aaee5a51ef26fbe48252878c98bd0e
Author: NeilBrown <neilb@suse.de>
Date:   Thu Apr 16 18:03:04 2015 +1000

    phy: twl4030-usb: make runtime pm more reliable.
    
    commit 56301df6bcaaed31e77b8c500ca1b437f46a3158 upstream.
    
    A construct like:
    
            if (pm_runtime_suspended(twl->dev))
                   pm_runtime_get_sync(twl->dev);
    
    is against the spirit of the runtime_pm interface as it
    makes the internal refcounting useless.
    
    In this case it is also racy, particularly as 'put_autosuspend'
    is used to drop a reference.
    When that happens a timer is started and the device is
    runtime-suspended after the timeout.
    If the above code runs in this window, the device will not be
    found to be suspended so no pm_runtime reference is taken.
    When the timer expires the device will be suspended, which is
    against the intention of the code.
    
    So be more direct is taking and dropping references.
    If twl->linkstat is VBUS_VALID or ID_GROUND, then hold a
    pm_runtime reference, otherwise don't.
    Define "cable_present()" to test for this condition.
    
    Tested-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: NeilBrown <neilb@suse.de>
    Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
    Cc: Alexander Holler <holler@ahsoftware.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 87a73d80571ac563db67c72b0827c22f979c5936
Author: Peter Chen <peter.chen@freescale.com>
Date:   Tue Jul 21 09:51:29 2015 +0800

    usb: chipidea: ehci_init_driver is intended to call one time
    
    commit 2f01a33bd26545c16fea7592697f7f15c416402b upstream.
    
    The ehci_init_driver is used to initialize hcd APIs for each
    ehci controller driver, it is designed to be called only one time
    and before driver register is called. The current design will
    cause ehci_init_driver is called multiple times at probe process,
    it will cause hc_driver's initialization affect current running hcd.
    
    We run out NULL pointer dereference problem when one hcd is started
    by module_init, and the other is started by otg thread at SMP platform.
    The reason for this problem is ehci_init_driver will do memory copy
    for current uniform hc_driver, and this memory copy will do memset (as 0)
    first, so when the first hcd is running usb_add_hcd, and the second
    hcd may clear the uniform hc_driver's space (at ehci_init_driver),
    then the first hcd will meet NULL pointer at the same time.
    
    See below two logs:
    
    LOG_1:
    ci_hdrc ci_hdrc.0: EHCI Host Controller
    ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    ci_hdrc ci_hdrc.1: doesn't support gadget
    Unable to handle kernel NULL pointer dereference at virtual address 00000014
    pgd = 80004000
    [00000014] *pgd=00000000
    Internal error: Oops: 805 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 108 Comm: kworker/u8:2 Not tainted 3.14.38-222193-g24b2734-dirty #25
    Workqueue: ci_otg ci_otg_work
    task: d839ec00 ti: d8400000 task.ti: d8400000
    PC is at ehci_run+0x4c/0x284
    LR is at _raw_spin_unlock_irqrestore+0x28/0x54
    pc : [<8041f9a0>]    lr : [<8070ea84>]    psr: 60000113
    sp : d8401e30  ip : 00000000  fp : d8004400
    r10: 00000001  r9 : 00000001  r8 : 00000000
    r7 : 00000000  r6 : d8419940  r5 : 80dd24c0  r4 : d8419800
    r3 : 8001d060  r2 : 00000000  r1 : 00000001  r0 : 00000000
    Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    Control: 10c53c7d  Table: 1000404a  DAC: 00000015
    Process kworker/u8:2 (pid: 108, stack limit = 0xd8400238)
    Stack: (0xd8401e30 to 0xd8402000)
    1e20:                                     d87523c0 d8401e48 66667562 d8419800
    1e40: 00000000 00000000 d8419800 00000000 00000000 00000000 d84198b0 8040fcdc
    1e60: 00000000 80dd320c d8477610 d8419c00 d803d010 d8419800 00000000 00000000
    1e80: d8004400 00000000 d8400008 80431494 80431374 d803d100 d803d010 d803d1ac
    1ea0: 00000000 80432428 804323d4 d803d100 00000001 80435eb8 80e0d0bc d803d100
    1ec0: 00000006 80436458 00000000 d803d100 80e92ec8 80436f44 d803d010 d803d100
    1ee0: d83fde00 8043292c d8752710 d803d1f4 d803d010 8042ddfc 8042ddb8 d83f3b00
    1f00: d803d1f4 80042b60 00000000 00000003 00000001 00000001 80054598 d83f3b00
    1f20: d8004400 d83f3b18 d8004414 d8400000 80e3957b 00000089 d8004400 80043814
    1f40: d839ec00 00000000 d83fcd80 d83f3b00 800436e4 00000000 00000000 00000000
    1f60: 00000000 80048f34 00000000 00000000 00000000 d83f3b00 00000000 00000000
    1f80: d8401f80 d8401f80 00000000 00000000 d8401f90 d8401f90 d8401fac d83fcd80
    1fa0: 80048e68 00000000 00000000 8000e538 00000000 00000000 00000000 00000000
    1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
    [<8041f9a0>] (ehci_run) from [<8040fcdc>] (usb_add_hcd+0x248/0x6e8)
    [<8040fcdc>] (usb_add_hcd) from [<80431494>] (host_start+0x120/0x2e4)
    [<80431494>] (host_start) from [<80432428>] (ci_otg_start_host+0x54/0xbc)
    [<80432428>] (ci_otg_start_host) from [<80435eb8>] (otg_set_protocol+0xa4/0xd0)
    [<80435eb8>] (otg_set_protocol) from [<80436458>] (otg_set_state+0x574/0xc58)
    [<80436458>] (otg_set_state) from [<80436f44>] (otg_statemachine+0x408/0x46c)
    [<80436f44>] (otg_statemachine) from [<8043292c>] (ci_otg_fsm_work+0x3c/0x190)
    [<8043292c>] (ci_otg_fsm_work) from [<8042ddfc>] (ci_otg_work+0x44/0x1c4)
    [<8042ddfc>] (ci_otg_work) from [<80042b60>] (process_one_work+0xf4/0x35c)
    [<80042b60>] (process_one_work) from [<80043814>] (worker_thread+0x130/0x3bc)
    [<80043814>] (worker_thread) from [<80048f34>] (kthread+0xcc/0xe4)
    [<80048f34>] (kthread) from [<8000e538>] (ret_from_fork+0x14/0x3c)
    Code: e5953018 e3530000 0a000000 e12fff33 (e5878014)
    
    LOG_2:
    ci_hdrc ci_hdrc.0: EHCI Host Controller
    ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    ci_hdrc ci_hdrc.1: doesn't support gadget
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = 80004000
    [00000000] *pgd=00000000
    In Online 00:00ternal e      Offline rror: Oops: 80000005 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 108 Comm: kworker/u8:2 Not tainted 3.14.38-02007-g24b2734-dirty #127
    Workque Online 00:00ue: ci_o      Offline tg ci_otg_work
    Online 00:00task: d8      Offline 39ec00 ti: d83ea000 task.ti: d83ea000
    PC is at 0x0
    LR is at usb_add_hcd+0x248/0x6e8
    pc : [<00000000>]    lr : [<8040f644>]    psr: 60000113
    sp : d83ebe60  ip : 00000000  fp : d8004400
    r10: 00000001  r9 : 00000001  r8 : d85fd4b0
    r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : d85fd400
    r3 : 00000000  r2 : d85fd4f4  r1 : 80410178  r0 : d85fd400
    Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    Control: 10c53c7d  Table: 1000404a  DAC: 00000015
    Process kworker/u8:2 (pid: 108, stack limit = 0xd83ea238)
    Stack: (0xd83ebe60 to 0xd83ec000)
    be60: 00000000 80dd920c d8654e10 d85fd800 d803e010 d85fd400 00000000 00000000
    be80: d8004400 00000000 d83ea008 80430e34 80430d14 d803e100 d803e010 d803e1ac
    bea0: 00000000 80431dc8 80431d74 d803e100 00000001 80435858 80e130bc d803e100
    bec0: 00000006 80435df8 00000000 d803e100 80e98ec8 804368e4 d803e010 d803e100
    bee0: d86e8100 804322cc d86cf050 d803e1f4 d803e010 8042d79c 8042d758 d83cf900
    bf00: d803e1f4 80042b78 00000000 00000003 00000001 00000001 800545e8 d83cf900
    bf20: d8004400 d83cf918 d8004414 d83ea000 80e3f57b 00000089 d8004400 8004382c
    bf40: d839ec00 00000000 d8393780 d83cf900 800436fc 00000000 00000000 00000000
    bf60: 00000000 80048f50 80e019f4 00000000 0000264c d83cf900 00000000 00000000
    bf80: d83ebf80 d83ebf80 00000000 00000000 d83ebf90 d83ebf90 d83ebfac d8393780
    bfa0: 80048e84 00000000 00000000 8000e538 00000000 00000000 00000000 00000000
    bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ee66e85d 133ebd03
    [<804 Online 00:000f644>]       Offline (usb_add_hcd) from [<80430e34>] (host_start+0x120/0x2e4)
    [<80430e34>] (host_start) from [<80431dc8>] (ci_otg_start_host+0x54/0xbc)
    [<80431dc8>] (ci_otg_start_host) from [<80435858>] (otg_set_protocol+0xa4/0xd0)
    [<80435858>] (otg_set_protocol) from [<80435df8>] (otg_set_state+0x574/0xc58)
    [<80435df8>] (otg_set_state) from [<804368e4>] (otg_statemachine+0x408/0x46c)
    [<804368e4>] (otg_statemachine) from [<804322cc>] (ci_otg_fsm_work+0x3c/0x190)
    [<804322cc>] (ci_otg_fsm_work) from [<8042d79c>] (ci_otg_work+0x44/0x1c4)
    [<8042d79c>] (ci_otg_work) from [<80042b78>] (process_one_work+0xf4/0x35c)
    [<80042b78>] (process_one_work) from [<8004382c>] (worker_thread+0x130/0x3bc)
    [<8004382c>] (worker_thread) from [<80048f50>] (kthread+0xcc/0xe4)
    [<80048f50>] (kthread) from [<8000e538>] (ret_from_fork+0x14/0x3c)
    Code: bad PC value
    
    Cc: Jun Li <jun.li@freescale.com>
    Cc: Alan Stern <stern@rowland.harvard.edu>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Peter Chen <peter.chen@freescale.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 89dd0d8ca5069df6d18493a852285cc2dfb3bdfe
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Fri Jan 16 11:32:51 2015 -0500

    usb: udc: core: add device_del() call to error pathway
    
    commit c93e64e91248becd0edb8f01723dff9da890e2ab upstream.
    
    This patch fixes a bug in the error pathway of
    usb_add_gadget_udc_release() in udc-core.c.  If the udc registration
    fails, the gadget registration is not fully undone; there's a
    put_device(&gadget->dev) call but no device_del().
    
    Acked-by: Peter Chen <peter.chen@freescale.com>
    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b5c270edd80f00434b8b15ae12e9ecbd5c038b2a
Author: Dirk Behme <dirk.behme@de.bosch.com>
Date:   Mon Jul 27 08:56:05 2015 +0200

    USB: sierra: add 1199:68AB device ID
    
    commit 74472233233f577eaa0ca6d6e17d9017b6e53150 upstream.
    
    Add support for the Sierra Wireless AR8550 device with
    USB descriptor 0x1199, 0x68AB.
    
    It is common with MC879x modules 1199:683c/683d which
    also are composite devices with 7 interfaces (0..6)
    and also MDM62xx based as the AR8550.
    
    The major difference are only the interface attributes
    02/02/01 on interfaces 3 and 4 on the AR8550. They are
    vendor specific ff/ff/ff on MC879x modules.
    
    lsusb reports:
    
    Bus 001 Device 004: ID 1199:68ab Sierra Wireless, Inc.
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      idVendor           0x1199 Sierra Wireless, Inc.
      idProduct          0x68ab
      bcdDevice            0.06
      iManufacturer           3 Sierra Wireless, Incorporated
      iProduct                2 AR8550
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength          198
        bNumInterfaces          7
        bConfigurationValue     1
        iConfiguration          1 Sierra Configuration
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        2
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x83  EP 3 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x03  EP 3 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        3
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass         2 Communications
          bInterfaceSubClass      2 Abstract (modem)
          bInterfaceProtocol      1 AT-commands (v.25ter)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               5
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x85  EP 5 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x04  EP 4 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        4
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass         2 Communications
          bInterfaceSubClass      2 Abstract (modem)
          bInterfaceProtocol      1 AT-commands (v.25ter)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x86  EP 6 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               5
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x87  EP 7 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x05  EP 5 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        5
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x88  EP 8 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               5
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x89  EP 9 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x06  EP 6 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        6
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x8a  EP 10 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               5
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x8b  EP 11 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x07  EP 7 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval              32
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      bNumConfigurations      1
    Device Status:     0x0001
      Self Powered
    
    Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
    Cc: Lars Melin <larsm17@gmail.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 57e5880a312a6985e76e32d959de76deeb770d76
Author: Gavin Shan <gwshan@linux.vnet.ibm.com>
Date:   Mon Aug 3 16:07:49 2015 +0300

    drivers/usb: Delete XHCI command timer if necessary
    
    commit ffe5adcb7661d94e952d6b5ed7f493cb4ef0c7bc upstream.
    
    When xhci_mem_cleanup() is called, it's possible that the command
    timer isn't initialized and scheduled. For those cases, to delete
    the command timer causes soft-lockup as below stack dump shows.
    
    The patch avoids deleting the command timer if it's not scheduled
    with the help of timer_pending().
    
    NMI watchdog: BUG: soft lockup - CPU#40 stuck for 23s! [kworker/40:1:8140]
          :
    NIP [c000000000150b30] lock_timer_base.isra.34+0x90/0xa0
    LR [c000000000150c24] try_to_del_timer_sync+0x34/0xa0
    Call Trace:
    [c000000f67c975e0] [c0000000015b84f8] mon_ops+0x0/0x8 (unreliable)
    [c000000f67c97620] [c000000000150c24] try_to_del_timer_sync+0x34/0xa0
    [c000000f67c97660] [c000000000150cf0] del_timer_sync+0x60/0x80
    [c000000f67c97690] [c00000000070ac0c] xhci_mem_cleanup+0x5c/0x5e0
    [c000000f67c97740] [c00000000070c2e8] xhci_mem_init+0x1158/0x13b0
    [c000000f67c97860] [c000000000700978] xhci_init+0x88/0x110
    [c000000f67c978e0] [c000000000701644] xhci_gen_setup+0x2b4/0x590
    [c000000f67c97970] [c0000000006d4410] xhci_pci_setup+0x40/0x190
    [c000000f67c979f0] [c0000000006b1af8] usb_add_hcd+0x418/0xba0
    [c000000f67c97ab0] [c0000000006cb15c] usb_hcd_pci_probe+0x1dc/0x5c0
    [c000000f67c97b50] [c0000000006d3ba4] xhci_pci_probe+0x64/0x1f0
    [c000000f67c97ba0] [c0000000004fe9ac] local_pci_probe+0x6c/0x130
    [c000000f67c97c30] [c0000000000e5ce8] work_for_cpu_fn+0x38/0x60
    [c000000f67c97c60] [c0000000000eacb8] process_one_work+0x198/0x470
    [c000000f67c97cf0] [c0000000000eb6ac] worker_thread+0x37c/0x5a0
    [c000000f67c97d80] [c0000000000f2730] kthread+0x110/0x130
    [c000000f67c97e30] [c000000000009660] ret_from_kernel_thread+0x5c/0x7c
    
    Reported-by: Priya M. A <priyama2@in.ibm.com>
    Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5c09786f13e2d0db8d0e8d0175a87c5a19bb3349
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Mon Aug 3 16:07:48 2015 +0300

    xhci: fix off by one error in TRB DMA address boundary check
    
    commit 7895086afde2a05fa24a0e410d8e6b75ca7c8fdd upstream.
    
    We need to check that a TRB is part of the current segment
    before calculating its DMA address.
    
    Previously a ring segment didn't use a full memory page, and every
    new ring segment got a new memory page, so the off by one
    error in checking the upper bound was never seen.
    
    Now that we use a full memory page, 256 TRBs (4096 bytes), the off by one
    didn't catch the case when a TRB was the first element of the next segment.
    
    This is triggered if the virtual memory pages for a ring segment are
    next to each in increasing order where the ring buffer wraps around and
    causes errors like:
    
    [  106.398223] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 0 comp_code 1
    [  106.398230] xhci_hcd 0000:00:14.0: Looking for event-dma fffd3000 trb-start fffd4fd0 trb-end fffd5000 seg-start fffd4000 seg-end fffd4ff0
    
    The trb-end address is one outside the end-seg address.
    
    Tested-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e925654834c583e62d08777c6993e20a362a69ac
Author: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Date:   Mon Jun 15 23:00:09 2015 +0900

    dmaengine: pl330: Really fix choppy sound because of wrong residue calculation
    
    commit 5dd90e5b91e0f5c925b12b132c7cd27538870256 upstream.
    
    When pl330 driver was used during sound playback, after some time or
    after a number of plays the sound became choppy or totally noisy. For
    example on Odroid XU3 board the first four executions of aplay with
    small WAVE worked fine, but fifth was unrecognizable with errors:
    	$ aplay /usr/share/sounds/alsa/Front_Right.wava
    	underrun!!! (at least 0.095 ms long)
    
    Issue was caused by wrong residue reported by pl330 driver to
    pcm_dmaengine for its cyclic dma transfers.
    
    The pl330_tx_status(), residue reporting function, used a "last" flag in
    a descriptor to indicate that there is no more data to send.
    
    The pl330_tx_submit() iterated over descriptors trying to remove this
    flag from them and then mark last descriptor as "last".  However when
    iterating it actually removed the flag not from descriptors but always
    from last of it (and then reset it). Thus effectively once some
    descriptor was marked as last, then it stayed like this forever causing
    residue to be reported too low.
    
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
    Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function")
    Reported-by: gabriel@unseen.is
    Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Tested-by: Lars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: Vinod Koul <vinod.koul@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9cd4b78cd56489755fcba685b5e1a243cea6e6cf
Author: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date:   Mon Jun 15 17:25:16 2015 +0900

    dmaengine: pl330: Fix overflow when reporting residue in memcpy
    
    commit ae128293d97404f491dc76f1843c7adacfec3441 upstream.
    
    During memcpy operations the residue was always set to an u32 overflowed
    value.
    
    In pl330_tx_status() function number of currently transferred bytes was
    subtracted from internal "bytes_requested" field. However this
    "bytes_requested" was not initialized at start to length of memcpy
    buffer so transferred bytes were subtracted from 0 causing overflow.
    
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function")
    Signed-off-by: Vinod Koul <vinod.koul@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4e200fcacc37eebe93acfc3d751b6b7b79bf85a1
Author: Johan Hedberg <johan.hedberg@intel.com>
Date:   Mon Jul 20 20:31:25 2015 +0300

    Bluetooth: Fix NULL pointer dereference in smp_conn_security
    
    commit 25ba265390c09b0a2b2f3fd9ba82e37248b7a371 upstream.
    
    The l2cap_conn->smp pointer may be NULL for various valid reasons where SMP has
    failed to initialize properly. One such scenario is when crypto support is
    missing, another when the adapter has been powered on through a legacy method.
    The smp_conn_security() function should have the appropriate check for this
    situation to avoid NULL pointer dereferences.
    
    Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ccd98d0cc1bd2c31a065258256727217e112db96
Author: Brian King <brking@linux.vnet.ibm.com>
Date:   Tue Jul 14 11:41:33 2015 -0500

    ipr: Fix invalid array indexing for HRRQ
    
    commit 3f1c0581310d5d94bd72740231507e763a6252a4 upstream.
    
    Fixes another signed / unsigned array indexing bug in the ipr driver.
    Currently, when hrrq_index wraps, it becomes a negative number. We
    do the modulo, but still have a negative number, so we end up indexing
    backwards in the array. Given where the hrrq array is located in memory,
    we probably won't actually reference memory we don't own, but nonetheless
    ipr is still looking at data within struct ipr_ioa_cfg and interpreting it as
    struct ipr_hrr_queue data, so bad things could certainly happen.
    
    Each ipr adapter has anywhere from 1 to 16 HRRQs. By default, we use 2 on new
    adapters.  Let's take an example:
    
    Assume ioa_cfg->hrrq_index=0x7fffffffe and ioa_cfg->hrrq_num=4:
    
    The atomic_add_return will then return -1. We mod this with 3 and get -2, add
    one and get -1 for an array index.
    
    On adapters which support more than a single HRRQ, we dedicate HRRQ to adapter
    initialization and error interrupts so that we can optimize the other queues
    for fast path I/O. So all normal I/O uses HRRQ 1-15. So we want to spread the
    I/O requests across those HRRQs.
    
    With the default module parameter settings, this bug won't hit, only when
    someone sets the ipr.number_of_msix parameter to a value larger than 3 is when
    bad things start to happen.
    
    Tested-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
    Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
    Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
    Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
    Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: James Bottomley <JBottomley@Odin.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b91250c3f7be2ac7705027f06a0edb98194c33ed
Author: Brian King <brking@linux.vnet.ibm.com>
Date:   Tue Jul 14 11:41:31 2015 -0500

    ipr: Fix incorrect trace indexing
    
    commit bb7c54339e6a10ecce5c4961adf5e75b3cf0af30 upstream.
    
    When ipr's internal driver trace was changed to an atomic, a signed/unsigned
    bug slipped in which results in us indexing backwards in our memory buffer
    writing on memory that does not belong to us. This patch fixes this by removing
    the modulo and instead just mask off the low bits.
    
    Tested-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
    Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
    Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
    Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
    Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: James Bottomley <JBottomley@Odin.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 65f3a9d893f17796575aaa0c43898edf1c709eb6
Author: Brian King <brking@linux.vnet.ibm.com>
Date:   Tue Jul 14 11:41:29 2015 -0500

    ipr: Fix locking for unit attention handling
    
    commit 36b8e180e1e929e00b351c3b72aab3147fc14116 upstream.
    
    Make sure we have the host lock held when calling scsi_report_bus_reset. Fixes
    a crash seen as the __devices list in the scsi host was changing as we were
    iterating through it.
    
    Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
    Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
    Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
    Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: James Bottomley <JBottomley@Odin.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 220dad5a140841103c0f25ccc659e4ec6035dc61
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Aug 3 17:24:10 2015 +0200

    drm/dp-mst: Remove debug WARN_ON
    
    commit 42639ba554655c280ae6cb72df0522b1201f2961 upstream.
    
    Apparently been in there since forever and fairly easy to hit when
    hotplugging really fast. I can do that since my mst hub has a manual
    button to flick the hpd line for reprobing. The resulting WARNING spam
    isn't pretty.
    
    Cc: Dave Airlie <airlied@gmail.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7b449d0568bc9522969009d52337b46f6ce8a2f1
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Jul 27 19:24:31 2015 -0400

    drm/radeon/combios: add some validation of lvds values
    
    commit 0a90a0cff9f429f886f423967ae053150dce9259 upstream.
    
    Fixes a broken hsync start value uncovered by:
    abc0b1447d4974963548777a5ba4a4457c82c426
    (drm: Perform basic sanity checks on probed modes)
    
    The driver handled the bad hsync start elsewhere, but
    the above commit prevented it from getting added.
    
    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=91401
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6f9dbb525abc7b21b76bdee6558b6e706425d1a8
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Thu Jul 23 10:01:09 2015 -0400

    drm/radeon: rework audio detect (v4)
    
    commit d0ea397e22f9ad0113c1dbdaab14eded050472eb upstream.
    
    1. Always assign audio function pointers even if the display does
    not support audio.  We need to properly disable the audio stream
    when when using a non-audio capable monitor.  Fixes purple line
    on some hdmi monitors.
    
    2. Check if a pin is in use by another encoder before disabling
    it.
    
    v2: make sure we've fetched the edid before checking audio and
        look up the encoder before calling audio_detect since
        connector->encoder may not be assigned yet.  Separate
        pin and afmt.  They are allocated at different times and
        have no dependency on eachother.
    v3: fix connector fetching in encoder functions
    v4: fix missed dig->pin check in dce6_afmt_write_latency_fields
    
    bugs:
    https://bugzilla.kernel.org/show_bug.cgi?id=93701
    https://bugzilla.redhat.com/show_bug.cgi?id=1236337
    https://bugs.freedesktop.org/show_bug.cgi?id=91041
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7f62822ffdb19561d89f9da7956d125f95300eed
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 15 09:50:42 2015 +0100

    drm/i915: Replace WARN inside I915_READ64_2x32 with retry loop
    
    commit ee0a227b7ac6e75f28e10269f81c7ec6eb600952 upstream.
    
    Since we may conceivably encounter situations where the upper part of the
    64bit register changes between reads, for example when a timestamp
    counter overflows, change the WARN into a retry loop.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Michał Winiarski <michal.winiarski@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 57689a9f86b856fcdfd3102cb95b7e930856524a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jun 28 09:19:26 2015 +0100

    drm/i915: Declare the swizzling unknown for L-shaped configurations
    
    commit 5eb3e5a5e11d14f9deb2a4b83555443b69ab9940 upstream.
    
    The old style of memory interleaving swizzled upto the end of the
    first even bank of memory, and then used the remainder as unswizzled on
    the unpaired bank - i.e. swizzling is not constant for all memory. This
    causes problems when we try to migrate memory and so the kernel prevents
    migration at all when we detect L-shaped inconsistent swizzling.
    However, this issue also extends to userspace who try to manually detile
    into memory as the swizzling for an individual page is unknown (it
    depends on its physical address only known to the kernel), userspace
    cannot correctly swizzle.
    
    Note that this is a new attempt for the previously merged one,
    reverted in
    
    commit d82c0ba6e306f079407f07003e53c262d683397b
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Tue Jul 14 12:29:27 2015 +0200
    
        Revert "drm/i915: Declare the swizzling unknown for L-shaped configurations"
    
    This is cc: stable since we need it to fix up troubles with wc cpu
    mmaps that userspace recently started to use widely.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    [danvet: Add note about previous (failed attempt).]
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 14e69b5a7229454f662b976d4518e84f6eb7d825
Author: Jan Kara <jack@suse.com>
Date:   Thu Aug 6 15:46:42 2015 -0700

    fsnotify: fix oops in fsnotify_clear_marks_by_group_flags()
    
    commit 8f2f3eb59dff4ec538de55f2e0592fec85966aab upstream.
    
    fsnotify_clear_marks_by_group_flags() can race with
    fsnotify_destroy_marks() so that when fsnotify_destroy_mark_locked()
    drops mark_mutex, a mark from the list iterated by
    fsnotify_clear_marks_by_group_flags() can be freed and thus the next
    entry pointer we have cached may become stale and we dereference free
    memory.
    
    Fix the problem by first moving marks to free to a special private list
    and then always free the first entry in the special list.  This method
    is safe even when entries from the list can disappear once we drop the
    lock.
    
    Signed-off-by: Jan Kara <jack@suse.com>
    Reported-by: Ashish Sangwan <a.sangwan@samsung.com>
    Reviewed-by: Ashish Sangwan <a.sangwan@samsung.com>
    Cc: Lino Sanfilippo <LinoSanfilippo@gmx.de>
    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 f797296322df8950e358d18e1f0168fe8d7a9e24
Author: David Daney <david.daney@cavium.com>
Date:   Mon Aug 3 17:48:43 2015 -0700

    MIPS: Make set_pte() SMP safe.
    
    commit 46011e6ea39235e4aca656673c500eac81a07a17 upstream.
    
    On MIPS the GLOBAL bit of the PTE must have the same value in any
    aligned pair of PTEs.  These pairs of PTEs are referred to as
    "buddies".  In a SMP system is is possible for two CPUs to be calling
    set_pte() on adjacent PTEs at the same time.  There is a race between
    setting the PTE and a different CPU setting the GLOBAL bit in its
    buddy PTE.
    
    This race can be observed when multiple CPUs are executing
    vmap()/vfree() at the same time.
    
    Make setting the buddy PTE's GLOBAL bit an atomic operation to close
    the race condition.
    
    The case of CONFIG_64BIT_PHYS_ADDR && CONFIG_CPU_MIPS32 is *not*
    handled.
    
    Signed-off-by: David Daney <david.daney@cavium.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10835/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9bc226acd9f692206851b9323d42c7dc02c2dbdd
Author: James Hogan <james.hogan@imgtec.com>
Date:   Fri Jul 31 16:29:38 2015 +0100

    MIPS: Flush RPS on kernel entry with EVA
    
    commit 3aff47c062b944a5e1f9af56a37a23f5295628fc upstream.
    
    When EVA is enabled, flush the Return Prediction Stack (RPS) present on
    some MIPS cores on entry to the kernel from user mode.
    
    This is important specifically for interAptiv with EVA enabled,
    otherwise kernel mode RPS mispredicts may trigger speculative fetches of
    user return addresses, which may be sensitive in the kernel address
    space due to EVA's overlapping user/kernel address spaces.
    
    Signed-off-by: James Hogan <james.hogan@imgtec.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Markos Chandras <markos.chandras@imgtec.com>
    Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10812/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 701af4aeccff8d196859dd66b1e298cacd454414
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Tue Jul 28 19:24:24 2015 -0700

    Revert "MIPS: BCM63xx: Provide a plat_post_dma_flush hook"
    
    commit 247bfb65d731350093f5d1a0a8b3d65e49c17baa upstream.
    
    This reverts commit 3cf29543413207d3ab1c3f62a88c09bb46f2264e ("MIPS:
    BCM63xx: Provide a plat_post_dma_flush hook") since this commit was
    found to prevent BCM6358 (early BMIPS4350 cores) and some BCM6368
    (BMIPS4380 cores) from booting reliably.
    
    Alvaro was able to track this down to an issue specifically located to
    devices that use the second thread (TP1) when booting. Since BCM63xx did
    not have a need for plat_post_dma_flush() hook before, let's just keep
    things the way they were.
    
    Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
    Reported-by: Jonas Gorski <jogo@openwrt.org>
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Cc: Kevin Cernekee <cernekee@gmail.com>
    Cc: Nicolas Schichan <nschichan@freebox.fr>
    Cc: linux-mips@linux-mips.org
    Cc: blogic@openwrt.org
    Cc: noltari@gmail.com
    Cc: jogo@openwrt.org
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10804/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c6adca1ab5a611c46f7acdb4ef4990966d34184b
Author: James Hogan <james.hogan@imgtec.com>
Date:   Mon Jul 27 13:50:22 2015 +0100

    MIPS: show_stack: Fix stack trace with EVA
    
    commit 1e77863a51698c4319587df34171bd823691a66a upstream.
    
    The show_stack() function deals exclusively with kernel contexts, but if
    it gets called in user context with EVA enabled, show_stacktrace() will
    attempt to access the stack using EVA accesses, which will either read
    other user mapped data, or more likely cause an exception which will be
    handled by __get_user().
    
    This is easily reproduced using SysRq t to show all task states, which
    results in the following stack dump output:
    
     Stack : (Bad stack address)
    
    Fix by setting the current user access mode to kernel around the call to
    show_stacktrace(). This causes __get_user() to use normal loads to read
    the kernel stack.
    
    Now we get the correct output, like this:
    
     Stack : 00000000 80168960 00000000 004a0000 00000000 00000000 8060016c 1f3abd0c
               1f172cd8 8056f09c 7ff1e450 8014fc3c 00000001 806dd0b0 0000001d 00000002
               1f17c6a0 1f17c804 1f17c6a0 8066f6e0 00000000 0000000a 00000000 00000000
               00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
               00000000 00000000 00000000 00000000 00000000 0110e800 1f3abd6c 1f17c6a0
               ...
    
    Signed-off-by: James Hogan <james.hogan@imgtec.com>
    Cc: Markos Chandras <markos.chandras@imgtec.com>
    Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10778/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 47650397eb480f99a1ae9c43e5d79dbb220b94c3
Author: James Hogan <james.hogan@imgtec.com>
Date:   Mon Jul 27 13:50:21 2015 +0100

    MIPS: do_mcheck: Fix kernel code dump with EVA
    
    commit 55c723e181ccec30fb5c672397fe69ec35967d97 upstream.
    
    If a machine check exception is raised in kernel mode, user context,
    with EVA enabled, then the do_mcheck handler will attempt to read the
    code around the EPC using EVA load instructions, i.e. as if the reads
    were from user mode. This will either read random user data if the
    process has anything mapped at the same address, or it will cause an
    exception which is handled by __get_user, resulting in this output:
    
     Code: (Bad address in epc)
    
    Fix by setting the current user access mode to kernel if the saved
    register context indicates the exception was taken in kernel mode. This
    causes __get_user to use normal loads to read the kernel code.
    
    Signed-off-by: James Hogan <james.hogan@imgtec.com>
    Cc: Markos Chandras <markos.chandras@imgtec.com>
    Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10777/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6adda660861c3dbdc41629bef2b9d6ffad783be6
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Thu Jul 23 18:59:52 2015 +0200

    MIPS: Export get_c0_perfcount_int()
    
    commit 0cb0985f57783c2f3c6c8ffe7e7665e80c56bd92 upstream.
    
    get_c0_perfcount_int is tested from oprofile code. If oprofile is
    compiled as module, get_c0_perfcount_int needs to be exported, otherwise
    it cannot be resolved.
    
    Fixes: a669efc4a3b4 ("MIPS: Add hook to get C0 performance counter interrupt")
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Cc: linux-mips@linux-mips.org
    Cc: abrestic@chromium.org
    Patchwork: https://patchwork.linux-mips.org/patch/10763/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6300e59fa9852292d2fafc733e75b449b2286d8e
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Sun Jul 19 00:38:41 2015 +0200

    MIPS: Fix sched_getaffinity with MT FPAFF enabled
    
    commit 1d62d737555e1378eb62a8bba26644f7d97139d2 upstream.
    
    p->thread.user_cpus_allowed is zero-initialized and is only filled on
    the first sched_setaffinity call.
    
    To avoid adding overhead in the task initialization codepath, simply OR
    the returned mask in sched_getaffinity with p->cpus_allowed.
    
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10740/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 00bccfd7af02de130a6fbebb3095688a439dc561
Author: James Hogan <james.hogan@imgtec.com>
Date:   Fri Jul 17 15:54:41 2015 +0100

    MIPS: Malta: Don't reinitialise RTC
    
    commit 106eccb4d20f35ebc58ff2286c170d9e79c5ff68 upstream.
    
    On Malta, since commit a87ea88d8f6c ("MIPS: Malta: initialise the RTC at
    boot"), the RTC is reinitialised and forced into binary coded decimal
    (BCD) mode during init, even if the bootloader has already initialised
    it, and may even have already put it into binary mode (as YAMON does).
    This corrupts the current time, can result in the RTC seconds being an
    invalid BCD (e.g. 0x1a..0x1f) for up to 6 seconds, as well as confusing
    YAMON for a while after reset, enough for it to report timeouts when
    attempting to load from TFTP (it actually uses the RTC in that code).
    
    Therefore only initialise the RTC to the extent that is necessary so
    that Linux avoids interfering with the bootloader setup, while also
    allowing it to estimate the CPU frequency without hanging, without a
    bootloader necessarily having done anything with the RTC (for example
    when the kernel is loaded via EJTAG).
    
    The divider control is configured for a 32KHZ reference clock if
    necessary, and the SET bit of the RTC_CONTROL register is cleared if
    necessary without changing any other bits (this bit will be set when
    coming out of reset if the battery has been disconnected).
    
    Fixes: a87ea88d8f6c ("MIPS: Malta: initialise the RTC at boot")
    Signed-off-by: James Hogan <james.hogan@imgtec.com>
    Reviewed-by: Paul Burton <paul.burton@imgtec.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Maciej W. Rozycki <macro@linux-mips.org>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10739/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 672f42875d1ad80c6f7c58db3a6dcf5b34a57e7c
Author: James Cowgill <James.Cowgill@imgtec.com>
Date:   Wed Jun 17 17:12:50 2015 +0100

    MIPS: Replace add and sub instructions in relocate_kernel.S with addiu
    
    commit a4504755e7dc8d43ed2a934397032691cd03adf7 upstream.
    
    Fixes the assembler errors generated when compiling a MIPS R6 kernel with
    CONFIG_KEXEC on, by replacing the offending add and sub instructions with
    addiu instructions.
    
    Build errors:
    arch/mips/kernel/relocate_kernel.S: Assembler messages:
    arch/mips/kernel/relocate_kernel.S:27: Error: invalid operands `dadd $16,$16,8'
    arch/mips/kernel/relocate_kernel.S:64: Error: invalid operands `dadd $20,$20,8'
    arch/mips/kernel/relocate_kernel.S:65: Error: invalid operands `dadd $18,$18,8'
    arch/mips/kernel/relocate_kernel.S:66: Error: invalid operands `dsub $22,$22,1'
    scripts/Makefile.build:294: recipe for target 'arch/mips/kernel/relocate_kernel.o' failed
    
    Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10558/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 80e2e4be68de3ab6ae1c93830c786b50f8fa017d
Author: James Cowgill <James.Cowgill@imgtec.com>
Date:   Tue Jun 23 12:02:00 2015 +0100

    MIPS: unaligned: Fix build error on big endian R6 kernels
    
    commit 531a6d599f4304156236ebdd531aaa80be61868d upstream.
    
    Commit eeb538950367 ("MIPS: unaligned: Prevent EVA instructions on kernel
    unaligned accesses") renamed the Load* and Store* defines in unaligned.c
    to _Load* and _Store* as part of its fix. One define was missed out which
    causes big endian R6 kernels to fail to build.
    
    arch/mips/kernel/unaligned.c:880:35:
    error: implicit declaration of function '_StoreDW'
     #define StoreDW(addr, value, res) _StoreDW(addr, value, res)
                                       ^
    
    Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
    Fixes: eeb538950367 ("MIPS: unaligned: Prevent EVA instructions on kernel unaligned accesses")
    Cc: Markos Chandras <markos.chandras@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10575/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>