1. 03 Oct, 2011 40 commits
    • Troy Kisky's avatar
      MXC: iomux-v3: correct NO_PAD_CTRL definition · 5607cbd1
      Troy Kisky authored
      commit 425933b3 upstream.
      
      iomux-v3.c uses NO_PAD_CTRL as a 32 bit value
      so it should not be shifted left by MUX_PAD_CTRL_SHIFT(41)
      
      Previously, anything requesting NO_PAD_CTRL would get
      their pad control register set to 0.
      
      Since it is a pad control mask, place it with the other mask values.
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      Acked-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
      Tested-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Cc: John Ogness <john.ogness@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5607cbd1
    • Carolyn Wyborny's avatar
      igb: fix WOL on second port of i350 device · 0dd4154f
      Carolyn Wyborny authored
      commit 6d337dce upstream.
      
      This patch fixes a problem where WOL would fail on second port of i350
      device.
      Reported-by: default avatarMartin Wilck <martin.wilck@ts.fujitsu.com>
      Reported-by: Stefan Assmann<sassmann@redhat.com>
      Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: default avatarAaron Brown  <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0dd4154f
    • Mel Gorman's avatar
      mm: page allocator: reconsider zones for allocation after direct reclaim · 66d52cb7
      Mel Gorman authored
      commit 76d3fbf8 upstream.
      
      With zone_reclaim_mode enabled, it's possible for zones to be considered
      full in the zonelist_cache so they are skipped in the future.  If the
      process enters direct reclaim, the ZLC may still consider zones to be full
      even after reclaiming pages.  Reconsider all zones for allocation if
      direct reclaim returns successfully.
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Stefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      66d52cb7
    • Mel Gorman's avatar
      mm: page allocator: initialise ZLC for first zone eligible for zone_reclaim · 42274b5f
      Mel Gorman authored
      commit cd38b115 upstream.
      
      There have been a small number of complaints about significant stalls
      while copying large amounts of data on NUMA machines reported on a
      distribution bugzilla.  In these cases, zone_reclaim was enabled by
      default due to large NUMA distances.  In general, the complaints have not
      been about the workload itself unless it was a file server (in which case
      the recommendation was disable zone_reclaim).
      
      The stalls are mostly due to significant amounts of time spent scanning
      the preferred zone for pages to free.  After a failure, it might fallback
      to another node (as zonelists are often node-ordered rather than
      zone-ordered) but stall quickly again when the next allocation attempt
      occurs.  In bad cases, each page allocated results in a full scan of the
      preferred zone.
      
      Patch 1 checks the preferred zone for recent allocation failure
              which is particularly important if zone_reclaim has failed
              recently.  This avoids rescanning the zone in the near future and
              instead falling back to another node.  This may hurt node locality
              in some cases but a failure to zone_reclaim is more expensive than
              a remote access.
      
      Patch 2 clears the zlc information after direct reclaim.
              Otherwise, zone_reclaim can mark zones full, direct reclaim can
              reclaim enough pages but the zone is still not considered for
              allocation.
      
      This was tested on a 24-thread 2-node x86_64 machine.  The tests were
      focused on large amounts of IO.  All tests were bound to the CPUs on
      node-0 to avoid disturbances due to processes being scheduled on different
      nodes.  The kernels tested are
      
      3.0-rc6-vanilla		Vanilla 3.0-rc6
      zlcfirst		Patch 1 applied
      zlcreconsider		Patches 1+2 applied
      
      FS-Mark
      ./fs_mark  -d  /tmp/fsmark-10813  -D  100  -N  5000  -n  208  -L  35  -t  24  -S0  -s  524288
                      fsmark-3.0-rc6       3.0-rc6       		3.0-rc6
                         vanilla			 zlcfirs 	zlcreconsider
      Files/s  min          54.90 ( 0.00%)       49.80 (-10.24%)       49.10 (-11.81%)
      Files/s  mean        100.11 ( 0.00%)      135.17 (25.94%)      146.93 (31.87%)
      Files/s  stddev       57.51 ( 0.00%)      138.97 (58.62%)      158.69 (63.76%)
      Files/s  max         361.10 ( 0.00%)      834.40 (56.72%)      802.40 (55.00%)
      Overhead min       76704.00 ( 0.00%)    76501.00 ( 0.27%)    77784.00 (-1.39%)
      Overhead mean    1485356.51 ( 0.00%)  1035797.83 (43.40%)  1594680.26 (-6.86%)
      Overhead stddev  1848122.53 ( 0.00%)   881489.88 (109.66%)  1772354.90 ( 4.27%)
      Overhead max     7989060.00 ( 0.00%)  3369118.00 (137.13%) 10135324.00 (-21.18%)
      MMTests Statistics: duration
      User/Sys Time Running Test (seconds)        501.49    493.91    499.93
      Total Elapsed Time (seconds)               2451.57   2257.48   2215.92
      
      MMTests Statistics: vmstat
      Page Ins                                       46268       63840       66008
      Page Outs                                   90821596    90671128    88043732
      Swap Ins                                           0           0           0
      Swap Outs                                          0           0           0
      Direct pages scanned                        13091697     8966863     8971790
      Kswapd pages scanned                               0     1830011     1831116
      Kswapd pages reclaimed                             0     1829068     1829930
      Direct pages reclaimed                      13037777     8956828     8648314
      Kswapd efficiency                               100%         99%         99%
      Kswapd velocity                                0.000     810.643     826.346
      Direct efficiency                                99%         99%         96%
      Direct velocity                             5340.128    3972.068    4048.788
      Percentage direct scans                         100%         83%         83%
      Page writes by reclaim                             0           3           0
      Slabs scanned                                 796672      720640      720256
      Direct inode steals                          7422667     7160012     7088638
      Kswapd inode steals                                0     1736840     2021238
      
      Test completes far faster with a large increase in the number of files
      created per second.  Standard deviation is high as a small number of
      iterations were much higher than the mean.  The number of pages scanned by
      zone_reclaim is reduced and kswapd is used for more work.
      
      LARGE DD
                     		3.0-rc6       3.0-rc6       3.0-rc6
                         	vanilla     zlcfirst     zlcreconsider
      download tar           59 ( 0.00%)   59 ( 0.00%)   55 ( 7.27%)
      dd source files       527 ( 0.00%)  296 (78.04%)  320 (64.69%)
      delete source          36 ( 0.00%)   19 (89.47%)   20 (80.00%)
      MMTests Statistics: duration
      User/Sys Time Running Test (seconds)        125.03    118.98    122.01
      Total Elapsed Time (seconds)                624.56    375.02    398.06
      
      MMTests Statistics: vmstat
      Page Ins                                     3594216f      439368      407032
      Page Outs                                   23380832    23380488    23377444
      Swap Ins                                           0           0           0
      Swap Outs                                          0         436         287
      Direct pages scanned                        17482342    69315973    82864918
      Kswapd pages scanned                               0      519123      575425
      Kswapd pages reclaimed                             0      466501      522487
      Direct pages reclaimed                       5858054     2732949     2712547
      Kswapd efficiency                               100%         89%         90%
      Kswapd velocity                                0.000    1384.254    1445.574
      Direct efficiency                                33%          3%          3%
      Direct velocity                            27991.453  184832.737  208171.929
      Percentage direct scans                         100%         99%         99%
      Page writes by reclaim                             0        5082       13917
      Slabs scanned                                  17280       29952       35328
      Direct inode steals                           115257     1431122      332201
      Kswapd inode steals                                0           0      979532
      
      This test downloads a large tarfile and copies it with dd a number of
      times - similar to the most recent bug report I've dealt with.  Time to
      completion is reduced.  The number of pages scanned directly is still
      disturbingly high with a low efficiency but this is likely due to the
      number of dirty pages encountered.  The figures could probably be improved
      with more work around how kswapd is used and how dirty pages are handled
      but that is separate work and this result is significant on its own.
      
      Streaming Mapped Writer
      MMTests Statistics: duration
      User/Sys Time Running Test (seconds)        124.47    111.67    112.64
      Total Elapsed Time (seconds)               2138.14   1816.30   1867.56
      
      MMTests Statistics: vmstat
      Page Ins                                       90760       89124       89516
      Page Outs                                  121028340   120199524   120736696
      Swap Ins                                           0          86          55
      Swap Outs                                          0           0           0
      Direct pages scanned                       114989363    96461439    96330619
      Kswapd pages scanned                        56430948    56965763    57075875
      Kswapd pages reclaimed                      27743219    27752044    27766606
      Direct pages reclaimed                         49777       46884       36655
      Kswapd efficiency                                49%         48%         48%
      Kswapd velocity                            26392.541   31363.631   30561.736
      Direct efficiency                                 0%          0%          0%
      Direct velocity                            53780.091   53108.759   51581.004
      Percentage direct scans                          67%         62%         62%
      Page writes by reclaim                           385         122        1513
      Slabs scanned                                  43008       39040       42112
      Direct inode steals                                0          10           8
      Kswapd inode steals                              733         534         477
      
      This test just creates a large file mapping and writes to it linearly.
      Time to completion is again reduced.
      
      The gains are mostly down to two things.  In many cases, there is less
      scanning as zone_reclaim simply gives up faster due to recent failures.
      The second reason is that memory is used more efficiently.  Instead of
      scanning the preferred zone every time, the allocator falls back to
      another zone and uses it instead improving overall memory utilisation.
      
      This patch: initialise ZLC for first zone eligible for zone_reclaim.
      
      The zonelist cache (ZLC) is used among other things to record if
      zone_reclaim() failed for a particular zone recently.  The intention is to
      avoid a high cost scanning extremely long zonelists or scanning within the
      zone uselessly.
      
      Currently the zonelist cache is setup only after the first zone has been
      considered and zone_reclaim() has been called.  The objective was to avoid
      a costly setup but zone_reclaim is itself quite expensive.  If it is
      failing regularly such as the first eligible zone having mostly mapped
      pages, the cost in scanning and allocation stalls is far higher than the
      ZLC initialisation step.
      
      This patch initialises ZLC before the first eligible zone calls
      zone_reclaim().  Once initialised, it is checked whether the zone failed
      zone_reclaim recently.  If it has, the zone is skipped.  As the first zone
      is now being checked, additional care has to be taken about zones marked
      full.  A zone can be marked "full" because it should not have enough
      unmapped pages for zone_reclaim but this is excessive as direct reclaim or
      kswapd may succeed where zone_reclaim fails.  Only mark zones "full" after
      zone_reclaim fails if it failed to reclaim enough pages after scanning.
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Stefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      42274b5f
    • Alex Deucher's avatar
      drm/radeon/kms: make sure pci max read request size is valid on evergreen+ (v2) · 10927d96
      Alex Deucher authored
      commit d054ac16 upstream.
      
      If the bios or OS sets the pci max read request size to 0 or an
      invalid value (6,7), it can result in a hang or slowdown.  Check
      and set it to something sane if it's invalid.
      
      Fixes:
      https://bugzilla.kernel.org/show_bug.cgi?id=42162
      
      v2: use pci reg defines from include/linux/pci_regs.h
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      10927d96
    • Dave Airlie's avatar
      drm/radeon/kms: set a default max_pixel_clock · 34b64435
      Dave Airlie authored
      commit 9adceaa5 upstream.
      
      On some Power rv100 cards, we have no ATY OF table, but we have
      no combios table either, and hence we refuse all modes on VGA-0
      since we end up with a 0 max pixel clock.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Reviewed-by: default avatarAlex Deucher <alexdeucher@gmail.com>
      Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      34b64435
    • NeilBrown's avatar
      md/linear: avoid corrupting structure while waiting for rcu_free to complete. · c122ead3
      NeilBrown authored
      commit 1b6afa17 upstream.
      
      I don't know what I was thinking putting 'rcu' after a dynamically
      sized array!  The array could still be in use when we call rcu_free()
      (That is the point) so we mustn't corrupt it.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c122ead3
    • Srinivas Kandagatla's avatar
      ARM: 7014/1: cache-l2x0: Fix L2 Cache size calculation. · 0dbf5d84
      Srinivas Kandagatla authored
      commit 43c734be upstream.
      
      This patch fixes L2 Cache size calculations for L2C-210, L2C-310 and
      PL310, by changing the L2X0_AUX_CTRL_WAY_SIZE_MASK from 2 bits to 3
      bits.
      
      The Auxiliary Control Register for L2C-210, L2C-310 and PL310 has 3bits
      [19:17] for Way size, however the existing code only uses 2 bits to
      get this value. This results in incorrect cachesize calculations.
      
      It also results in performing operations on the whole cache when we
      erroneously decide that the range is big enough (due to l2x0_size being
      too small) and also prints incorrect cachesize.
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0dbf5d84
    • Jerome Glisse's avatar
      drm/radeon/kms: evergreen & ni reset SPI block on CP resume · 5297aef4
      Jerome Glisse authored
      commit a49a50da upstream.
      
      For some reason SPI block is in broken state after module
      unloading. This lead to broken rendering after reloading
      module. Fix this by reseting SPI block in CP resume function
      Signed-off-by: default avatarJerome Glisse <jglisse@redhat.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5297aef4
    • Alex Deucher's avatar
      drm/radeon/kms: add s/r quirk for Compaq Presario V5245EU · 795464a5
      Alex Deucher authored
      commit 302a8e8b upstream.
      
      Fixes resume on Compaq Presario V5245EU.
      
      Fixes:
      https://bugzilla.kernel.org/show_bug.cgi?id=41642Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      795464a5
    • David S. Miller's avatar
      sparc64: Only Panther cheetah+ chips have POPC. · f7ae5caa
      David S. Miller authored
      commit 1a8e0da5 upstream.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f7ae5caa
    • Axel Lin's avatar
      regulator: tps65910: Add missing breaks in switch/case · 94dea720
      Axel Lin authored
      commit d04156bc upstream.
      
      Also add a default case in tps65910_list_voltage_dcdc to silence
      'volt' may be used uninitialized in this function warning.
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      Cc: Johan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      94dea720
    • Kjetil Oftedal's avatar
      sparc32,sun4d: Change IPI IRQ level to prevent collision between IPI and timer interrupt · 8d537b9f
      Kjetil Oftedal authored
      commit 38f7f8f0 upstream.
      
      On Sun4d systems running in SMP mode, IRQ 14 is used for timer interrupts
      and has a specialized interrupt handler. IPI is currently set to use IRQ 14
      as well, which causes it to trigger the timer interrupt handler, and not the
      IPI interrupt handler.
      
      The IPI interrupt is therefore changed to IRQ 13, which is the highest
      normally handled interrupt. This IRQ is also used for SBUS interrupts,
      however there is nothing in the IPI/SBUS interrupt handlers that indicate
      that they will not handle sharing the interrupt.
      (IRQ 13 is indicated as audio interrupt, which is unlikely to be found in a
      sun4d system)
      Signed-off-by: default avatarKjetil Oftedal <oftedal@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8d537b9f
    • Ian Campbell's avatar
      sparc: fix array bounds error setting up PCIC NMI trap · d91d1dde
      Ian Campbell authored
      commit 4a0342ca upstream.
      
        CC      arch/sparc/kernel/pcic.o
      arch/sparc/kernel/pcic.c: In function 'pcic_probe':
      arch/sparc/kernel/pcic.c:359:33: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:359:8: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:360:33: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:360:8: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:361:33: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:361:8: error: array subscript is above array bounds [-Werror=array-bounds]
      cc1: all warnings being treated as errors
      
      I'm not particularly familiar with sparc but t_nmi (defined in head_32.S via
      the TRAP_ENTRY macro) and pcic_nmi_trap_patch (defined in entry.S) both appear
      to be 4 instructions long and I presume from the usage that instructions are
      int sized.
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d91d1dde
    • David S. Miller's avatar
      sparc64: Set HAVE_C_RECORDMCOUNT · 69c4ec5d
      David S. Miller authored
      [ Upstream commit 178a2960 ]
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      69c4ec5d
    • David S. Miller's avatar
      sparc: Allow handling signals when stack is corrupted. · a9d0a363
      David S. Miller authored
      commit 5598473a upstream.
      
      If we can't push the pending register windows onto the user's stack,
      we disallow signal delivery even if the signal would be delivered on a
      valid seperate signal stack.
      
      Add a register window save area in the signal frame, and store any
      unsavable windows there.
      
      On sigreturn, if any windows are still queued up in the signal frame,
      try to push them back onto the stack and if that fails we kill the
      process immediately.
      
      This allows the debug/tst-longjmp_chk2 glibc test case to pass.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a9d0a363
    • Mikael Pettersson's avatar
      sparc32: unbreak arch_write_unlock() · 7fe1e169
      Mikael Pettersson authored
      commit 3f6aa0b1 upstream.
      
      The sparc32 version of arch_write_unlock() is just a plain assignment.
      Unfortunately this allows the compiler to schedule side-effects in a
      protected region to occur after the HW-level unlock, which is broken.
      E.g., the following trivial test case gets miscompiled:
      
      	#include <linux/spinlock.h>
      	rwlock_t lock;
      	int counter;
      	void foo(void) { write_lock(&lock); ++counter; write_unlock(&lock); }
      
      Fixed by adding a compiler memory barrier to arch_write_unlock().  The
      sparc64 version combines the barrier and assignment into a single asm(),
      and implements the operation as a static inline, so that's what I did too.
      
      Compile-tested with sparc32_defconfig + CONFIG_SMP=y.
      Signed-off-by: default avatarMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7fe1e169
    • Mikael Pettersson's avatar
      sparc64: remove unnecessary macros from spinlock_64.h · b60c440f
      Mikael Pettersson authored
      commit a0fba3eb upstream.
      
      The sparc64 spinlock_64.h contains a number of operations defined
      first as static inline functions, and then as macros with the same
      names and parameters as the functions.  Maybe this was needed at
      some point in the past, but now nothing seems to depend on these
      macros (checked with a recursive grep looking for ifdefs on these
      names).  Other archs don't define these identity-macros.
      
      So this patch deletes these unnecessary macros.
      
      Compile-tested with sparc64_defconfig.
      Signed-off-by: default avatarMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b60c440f
    • Stanislaw Gruszka's avatar
      rt2x00: fix crash in rt2800usb_get_txwi · d6b0fa55
      Stanislaw Gruszka authored
      commit 674db134 upstream.
      
      Patch should fix this oops:
      
      BUG: unable to handle kernel NULL pointer dereference at 000000a0
      IP: [<f81b30c9>] rt2800usb_get_txwi+0x19/0x70 [rt2800usb]
      *pdpt = 0000000000000000 *pde = f000ff53f000ff53
      Oops: 0000 [#1] SMP
      Pid: 198, comm: kworker/u:3 Tainted: G        W   3.0.0-wl+ #9 LENOVO 6369CTO/6369CTO
      EIP: 0060:[<f81b30c9>] EFLAGS: 00010283 CPU: 1
      EIP is at rt2800usb_get_txwi+0x19/0x70 [rt2800usb]
      EAX: 00000000 EBX: f465e140 ECX: f4494960 EDX: ef24c5f8
      ESI: 810f21f5 EDI: f1da9960 EBP: f4581e80 ESP: f4581e70
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process kworker/u:3 (pid: 198, ti=f4580000 task=f4494960 task.ti=f4580000)
      Call Trace:
       [<f804790f>] rt2800_txdone_entry+0x2f/0xf0 [rt2800lib]
       [<c045110d>] ? warn_slowpath_common+0x7d/0xa0
       [<f81b3a38>] ? rt2800usb_work_txdone+0x288/0x360 [rt2800usb]
       [<f81b3a38>] ? rt2800usb_work_txdone+0x288/0x360 [rt2800usb]
       [<f81b3a13>] rt2800usb_work_txdone+0x263/0x360 [rt2800usb]
       [<c046a8d6>] process_one_work+0x186/0x440
       [<c046a85a>] ? process_one_work+0x10a/0x440
       [<f81b37b0>] ? rt2800usb_probe_hw+0x120/0x120 [rt2800usb]
       [<c046c283>] worker_thread+0x133/0x310
       [<c04885db>] ? trace_hardirqs_on+0xb/0x10
       [<c046c150>] ? manage_workers+0x1e0/0x1e0
       [<c047054c>] kthread+0x7c/0x90
       [<c04704d0>] ? __init_kthread_worker+0x60/0x60
       [<c0826b42>] kernel_thread_helper+0x6/0x1
      
      Oops might happen because we check rt2x00queue_empty(queue) twice,
      but this condition can change and we can process entry in
      rt2800_txdone_entry(), which was already processed by
      rt2800usb_txdone_entry_check() -> rt2x00lib_txdone_noinfo() and
      has nullify entry->skb .
      Reported-by: default avatarJustin Piszcz <jpiszcz@lucidpixels.com>
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d6b0fa55
    • Stanislaw Gruszka's avatar
      rt2x00: fix crash in rt2800usb_write_tx_desc · 341b1e99
      Stanislaw Gruszka authored
      commit 4b1bfb7d upstream.
      
      Patch should fix this oops:
      
      BUG: unable to handle kernel NULL pointer dereference at 000000a0
      IP: [<f8e06078>] rt2800usb_write_tx_desc+0x18/0xc0 [rt2800usb]
      *pdpt = 000000002408c001 *pde = 0000000024079067 *pte = 0000000000000000
      Oops: 0000 [#1] SMP
      EIP: 0060:[<f8e06078>] EFLAGS: 00010282 CPU: 0
      EIP is at rt2800usb_write_tx_desc+0x18/0xc0 [rt2800usb]
      EAX: 00000035 EBX: ef2bef10 ECX: 00000000 EDX: d40958a0
      ESI: ef1865f8 EDI: ef1865f8 EBP: d4095878 ESP: d409585c
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Call Trace:
       [<f8da5e85>] rt2x00queue_write_tx_frame+0x155/0x300 [rt2x00lib]
       [<f8da424c>] rt2x00mac_tx+0x7c/0x370 [rt2x00lib]
       [<c04882b2>] ? mark_held_locks+0x62/0x90
       [<c081f645>] ? _raw_spin_unlock_irqrestore+0x35/0x60
       [<c04884ba>] ? trace_hardirqs_on_caller+0x5a/0x170
       [<c04885db>] ? trace_hardirqs_on+0xb/0x10
       [<f8d618ac>] __ieee80211_tx+0x5c/0x1e0 [mac80211]
       [<f8d631fc>] ieee80211_tx+0xbc/0xe0 [mac80211]
       [<f8d63163>] ? ieee80211_tx+0x23/0xe0 [mac80211]
       [<f8d632e1>] ieee80211_xmit+0xc1/0x200 [mac80211]
       [<f8d63220>] ? ieee80211_tx+0xe0/0xe0 [mac80211]
       [<c0487d45>] ? lock_release_holdtime+0x35/0x1b0
       [<f8d63986>] ? ieee80211_subif_start_xmit+0x446/0x5f0 [mac80211]
       [<f8d637dd>] ieee80211_subif_start_xmit+0x29d/0x5f0 [mac80211]
       [<f8d63924>] ? ieee80211_subif_start_xmit+0x3e4/0x5f0 [mac80211]
       [<c0760188>] ? sock_setsockopt+0x6a8/0x6f0
       [<c0760000>] ? sock_setsockopt+0x520/0x6f0
       [<c076daef>] dev_hard_start_xmit+0x2ef/0x650
      
      Oops might happen because we perform parallel putting new entries in a
      queue (rt2x00queue_write_tx_frame()) and removing entries after
      finishing transmitting (rt2800usb_work_txdone()). There are cases when
      _txdone may process an entry that was not fully send and nullify
      entry->skb .
      
      To fix check in _txdone if entry has flags that indicate pending
      transmission and wait until flags get cleared.
      Reported-by: default avatarJustin Piszcz <jpiszcz@lucidpixels.com>
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      341b1e99
    • Daniel Schwierzeck's avatar
      atm: br2684: Fix oops due to skb->dev being NULL · bdfd59ed
      Daniel Schwierzeck authored
      commit fbe5e29e upstream.
      
      This oops have been already fixed with commit
      
          27141666
      
          atm: [br2684] Fix oops due to skb->dev being NULL
      
          It happens that if a packet arrives in a VC between the call to open it on
          the hardware and the call to change the backend to br2684, br2684_regvcc
          processes the packet and oopses dereferencing skb->dev because it is
          NULL before the call to br2684_push().
      
      but have been introduced again with commit
      
          b6211ae7
      
          atm: Use SKB queue and list helpers instead of doing it by-hand.
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@googlemail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bdfd59ed
    • Tejun Heo's avatar
      pata_via: disable ATAPI DMA on AVERATEC 3200 · e4dd9ac2
      Tejun Heo authored
      commit 6d0e194d upstream.
      
      On AVERATEC 3200, pata_via causes memory corruption with ATAPI DMA,
      which often leads to random kernel oops.  The cause of the problem is
      not well understood yet and only small subset of machines using the
      controller seem affected.  Blacklist ATAPI DMA on the machine.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11426Reported-and-tested-by: default avatarJim Bray <jimsantelmo@gmail.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e4dd9ac2
    • John Stanley's avatar
      savagedb: Fix typo causing regression in savage4 series video chip detection · 088412ec
      John Stanley authored
      commit 4b00e4b3 upstream.
      
      Two additional savage4 variants were added, but the S3_SAVAGE4_SERIES
      macro was incompletely modified, resulting in a false positive detection
      of a savage4 card regardless of which savage card is actually present.
      
      For non-savage4 series cards, such as a Savage/IX-MV card, this results
      in garbled video and/or a hard-hang at boot time.  Fix this by changing
      an '||' to an '&&' in the S3_SAVAGE4_SERIES macro.
      Signed-off-by: default avatarJohn P. Stanley <jpsinthemix@verizon.net>
      Reviewed-by: default avatarTormod Volden <debian.tormod@gmail.com>
      [ The macros have incomplete parenthesis too, but whatever ..  -Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      088412ec
    • Stanislaw Gruszka's avatar
      rt2x00: do not drop usb dev reference counter on suspend · dea59206
      Stanislaw Gruszka authored
      commit 543cc38c upstream.
      
      When hibernating ->resume may not be called by usb core, but disconnect
      and probe instead, so we do not increase the counter after decreasing
      it in ->supend. As a result we free memory early, and get crash when
      unplugging usb dongle.
      
      BUG: unable to handle kernel paging request at 6b6b6b9f
      IP: [<c06909b0>] driver_sysfs_remove+0x10/0x30
      *pdpt = 0000000034f21001 *pde = 0000000000000000
      Pid: 20, comm: khubd Not tainted 3.1.0-rc1-wl+ #20 LENOVO 6369CTO/6369CTO
      EIP: 0060:[<c06909b0>] EFLAGS: 00010202 CPU: 1
      EIP is at driver_sysfs_remove+0x10/0x30
      EAX: 6b6b6b6b EBX: f52bba34 ECX: 00000000 EDX: 6b6b6b6b
      ESI: 6b6b6b6b EDI: c0a0ea20 EBP: f61c9e68 ESP: f61c9e64
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process khubd (pid: 20, ti=f61c8000 task=f6138270 task.ti=f61c8000)
      Call Trace:
       [<c06909ef>] __device_release_driver+0x1f/0xa0
       [<c0690b20>] device_release_driver+0x20/0x40
       [<c068fd64>] bus_remove_device+0x84/0xe0
       [<c068e12a>] ? device_remove_attrs+0x2a/0x80
       [<c068e267>] device_del+0xe7/0x170
       [<c06d93d4>] usb_disconnect+0xd4/0x180
       [<c06d9d61>] hub_thread+0x691/0x1600
       [<c0473260>] ? wake_up_bit+0x30/0x30
       [<c0442a39>] ? complete+0x49/0x60
       [<c06d96d0>] ? hub_disconnect+0xd0/0xd0
       [<c06d96d0>] ? hub_disconnect+0xd0/0xd0
       [<c0472eb4>] kthread+0x74/0x80
       [<c0472e40>] ? kthread_worker_fn+0x150/0x150
       [<c0809b3e>] kernel_thread_helper+0x6/0x10
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dea59206
    • Senthil Balasubramanian's avatar
      ath9k_hw: Fix STA (AR9485) bringup issue due to incorrect MAC address · 6417bec1
      Senthil Balasubramanian authored
      commit b503c7a2 upstream.
      
      Due to some recent optimization done in the way the mac address
      bytes are written into the OTP memory, some AR9485 chipsets were
      forced to use the first byte from the eeprom template and the
      remaining bytes are read from OTP.
      
      AR9485 happens to use generic eeprom template which has 0x1 as
      the first byte causes issues in bringing up the card.
      
      So fixed the eeprom template accordingly to address the issue.
      
      Cc: Paul Stewart <pstew@google.com>
      Signed-off-by: default avatarSenthil Balasubramanian <senthilb@qca.qualcomm.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6417bec1
    • Alexey Khoroshilov's avatar
      carl9170: Fix mismatch in carl9170_op_set_key mutex lock-unlock · 8a9f335d
      Alexey Khoroshilov authored
      commit 66cb54bd upstream.
      
      If is_main_vif(ar, vif) reports that we have to fall back
      to software encryption, we goto err_softw; before locking ar->mutex.
      As a result, we have unprotected call to carl9170_set_operating_mode
      and unmatched mutex_unlock.
      
      The patch fix the issue by adding mutex_lock before goto.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Acked-By: default avatarChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8a9f335d
    • Anton Blanchard's avatar
      ibmveth: Fix leak when recycling skb and hypervisor returns error · 0b1511be
      Anton Blanchard authored
      commit c6f59d13 upstream.
      
      If h_add_logical_lan_buffer returns an error we need to free
      the skb.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0b1511be
    • Mohammed Shafi Shajakhan's avatar
      ath9k: Fix PS wrappers in ath9k_set_coverage_class · ec518b00
      Mohammed Shafi Shajakhan authored
      commit 8b2a3827 upstream.
      
      this callback is called during suspend/resume and also via iw command.
      it configures parameters like sifs, slottime, acktimeout in
      ath9k_hw_init_global_settings where few REG_READ, REG_RMW are also done
      and hence the need for PS wrappers
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ec518b00
    • Mathieu Desnoyers's avatar
      sendmmsg/sendmsg: fix unsafe user pointer access · 5772ee1f
      Mathieu Desnoyers authored
      commit bc909d9d upstream.
      
      Dereferencing a user pointer directly from kernel-space without going
      through the copy_from_user family of functions is a bad idea. Two of
      such usages can be found in the sendmsg code path called from sendmmsg,
      added by
      
      commit c71d8ebe upstream.
      commit 5b47b803 in the 3.0-stable tree.
      
      Usages are performed through memcmp() and memcpy() directly. Fix those
      by using the already copied msg_sys structure instead of the __user *msg
      structure. Note that msg_sys can be set to NULL by verify_compat_iovec()
      or verify_iovec(), which requires additional NULL pointer checks.
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarDavid Goulet <dgoulet@ev0ke.net>
      CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      CC: Anton Blanchard <anton@samba.org>
      CC: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5772ee1f
    • Sarah Sharp's avatar
      xhci: Handle zero-length isochronous packets. · f1d44226
      Sarah Sharp authored
      commit 48df4a6f upstream.
      
      For a long time, the xHCI driver has had this note:
      	/* FIXME: Ignoring zero-length packets, can those happen? */
      
      It turns out that, yes, there are drivers that need to queue zero-length
      transfers for isochronous OUT transfers.  Without this patch, users will
      see kernel hang messages when a driver attempts to enqueue an isochronous
      URB with a zero length transfer (because count_isoc_trbs_needed will return
      zero for that TD, xhci_td->last_trb will never be set, and updating the
      dequeue pointer will cause an infinite loop).
      
      Matěj ran into this issue when using an NI Audio4DJ USB soundcard
      with the snd-usb-caiaq driver.  See
      	https://bugzilla.kernel.org/show_bug.cgi?id=40702
      
      Fix count_isoc_trbs_needed() to return 1 for zero-length transfers (thanks
      Alan on the math help).  Update the various TRB field calculations to deal
      with zero-length transfers.  We're still transferring one packet with a
      zero-length data payload, so the total_packet_count should be 1. The
      Transfer Burst Count (TBC) and Transfer Last Burst Packet Count (TLBPC)
      fields should be set to zero.
      
      This patch should be backported to kernels as old as 2.6.36.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarMatěj Laitl <matej@laitl.cz>
      Cc: Daniel Mack <zonque@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f1d44226
    • Sarah Sharp's avatar
      xhci: Remove TDs from TD lists when URBs are canceled. · 4343d2a2
      Sarah Sharp authored
      commit 585df1d9 upstream.
      
      When a driver tries to cancel an URB, and the host controller is dying,
      xhci_urb_dequeue will giveback the URB without removing the xhci_tds
      that comprise that URB from the td_list or the cancelled_td_list.  This
      can cause a race condition between the driver calling URB dequeue and
      the stop endpoint command watchdog timer.
      
      If the timer fires on a dying host, and a driver attempts to resubmit
      while the watchdog timer has dropped the xhci->lock to giveback a
      cancelled URB, URBs may be given back by the xhci_urb_dequeue() function.
      At that point, the URB's priv pointer will be freed and set to NULL, but
      the TDs will remain on the td_list.  This will cause an oops in
      xhci_giveback_urb_in_irq() when the watchdog timer attempts to loop
      through the endpoints' td_lists, giving back killed URBs.
      
      Make sure that xhci_urb_dequeue() removes TDs from the TD lists and
      canceled TD lists before it gives back the URB.
      
      This patch should be backported to kernels as old as 2.6.36.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Andiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4343d2a2
    • Sarah Sharp's avatar
      xhci: Fix failed enqueue in the middle of isoch TD. · 8a8045bd
      Sarah Sharp authored
      commit 522989a2 upstream.
      
      When an isochronous transfer is enqueued, xhci_queue_isoc_tx_prepare()
      will ensure that there is enough room on the transfer rings for all of the
      isochronous TDs for that URB.  However, when xhci_queue_isoc_tx() is
      enqueueing individual isoc TDs, the prepare_transfer() function can fail
      if the endpoint state has changed to disabled, error, or some other
      unknown state.
      
      With the current code, if Nth TD (not the first TD) fails, the ring is
      left in a sorry state.  The partially enqueued TDs are left on the ring,
      and the first TRB of the TD is not given back to the hardware.  The
      enqueue pointer is left on the TRB after the last successfully enqueued
      TD.  This means the ring is basically useless.  Any new transfers will be
      enqueued after the failed TDs, which the hardware will never read because
      the cycle bit indicates it does not own them.  The ring will fill up with
      untransferred TDs, and the endpoint will be basically unusable.
      
      The untransferred TDs will also remain on the TD list.  Since the td_list
      is a FIFO, this basically means the ring handler will be waiting on TDs
      that will never be completed (or worse, dereference memory that doesn't
      exist any more).
      
      Change the code to clean up the isochronous ring after a failed transfer.
      If the first TD failed, simply return and allow the xhci_urb_enqueue
      function to free the urb_priv.  If the Nth TD failed, first remove the TDs
      from the td_list.  Then convert the TRBs that were enqueued into No-op
      TRBs.  Make sure to flip the cycle bit on all enqueued TRBs (including any
      link TRBs in the middle or between TDs), but leave the cycle bit of the
      first TRB (which will show software-owned) intact.  Then move the ring
      enqueue pointer back to the first TRB and make sure to change the
      xhci_ring's cycle state to what is appropriate for that ring segment.
      
      This ensures that the No-op TRBs will be overwritten by subsequent TDs,
      and the hardware will not start executing random TRBs because the cycle
      bit was left as hardware-owned.
      
      This bug is unlikely to be hit, but it was something I noticed while
      tracking down the watchdog timer issue.  I verified that the fix works by
      injecting some errors on the 250th isochronous URB queued, although I
      could not verify that the ring is in the correct state because uvcvideo
      refused to talk to the device after the first usb_submit_urb() failed.
      Ring debugging shows that the ring looks correct, however.
      
      This patch should be backported to kernels as old as 2.6.36.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Andiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8a8045bd
    • Sarah Sharp's avatar
      xhci: Fix memory leak during failed enqueue. · e0a45189
      Sarah Sharp authored
      commit d13565c1 upstream.
      
      When the isochronous transfer support was introduced, and the xHCI driver
      switched to using urb->hcpriv to store an "urb_priv" pointer, a couple of
      memory leaks were introduced into the URB enqueue function in its error
      handling paths.
      
      xhci_urb_enqueue allocates urb_priv, but it doesn't free it if changing
      the control endpoint's max packet size fails or the bulk endpoint is in
      the middle of allocating or deallocating streams.
      
      xhci_urb_enqueue also doesn't free urb_priv if any of the four endpoint
      types' enqueue functions fail.  Instead, it expects those functions to
      free urb_priv if an error occurs.  However, the bulk, control, and
      interrupt enqueue functions do not free urb_priv if the endpoint ring is
      NULL.  It will, however, get freed if prepare_transfer() fails in those
      enqueue functions.
      
      Several of the error paths in the isochronous endpoint enqueue function
      also fail to free it.  xhci_queue_isoc_tx_prepare() doesn't free urb_priv
      if prepare_ring() indicates there is not enough room for all the
      isochronous TDs in this URB.  If individual isochronous TDs fail to be
      queued (perhaps due to an endpoint state change), urb_priv is also leaked.
      
      This argues that the freeing of urb_priv should be done in the function
      that allocated it, xhci_urb_enqueue.
      
      This patch looks rather ugly, but refactoring the code will have to wait
      because this patch needs to be backported to stable kernels.
      
      This patch should be backported to kernels as old as 2.6.36.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Andiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e0a45189
    • Andiry Xu's avatar
      xHCI: report USB2 port in resuming as suspend · dbb2e00b
      Andiry Xu authored
      commit 8a8ff2f9 upstream.
      
      When a USB2 port initiate a remote wakeup, software shall ensure that
      resume is signaled for at least 20ms, and then write '0' to the PLS field.
      According to this, xhci driver do the following things:
      
      1. When receive a remote wakeup event in irq_handler, set the resume_done
         value as jiffies + 20ms, and modify rh_timer to poll root hub status at
         that time;
      2. When receive a GetPortStatus request, if the jiffies is after the
         resume_done value, clear the resume signal and resume_done.
      
      However, if usb_port_resume() is called before the rh_timer triggered, it
      will indicate the port as Suspend Cleared and skip the clear resume signal
      part. The device will fail the usb_get_status request in finish_port_resume(),
      and usbcore will try a reset-resume instead. Device will work OK after
      reset-resume, but resume_done value is not cleared in this case, and
      xhci_bus_suspend() will fail because when it finds a non-zero resume_done
      value, it will regard the port as resuming and return -EBUSY.
      
      This causes issue on some platforms that the system fail to suspend
      after remote wakeup from suspend by USB2 devices connected to xHCI port.
      
      To fix this issue, report the port status as suspend if the resume is
      signaling less that 20ms, and usb_port_resume() will wait 25ms and check
      port status again, so xHCI driver can clear the resume signaling and
      resume_done value.
      
      This should be backported to kernels as old as 2.6.37.
      Signed-off-by: default avatarAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dbb2e00b
    • Andiry Xu's avatar
      xHCI: fix port U3 status check condition · eff52962
      Andiry Xu authored
      commit 5ac04bf1 upstream.
      
      Fix the port U3 status check when Clear PORT_SUSPEND Feature.
      The port status should be masked with PORT_PLS_MASK to check if it's in
      U3 state.
      
      This should be backported to kernels as old as 2.6.37.
      Signed-off-by: default avatarAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      eff52962
    • Wang Zhi's avatar
      USB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resume(). · cde5eaf3
      Wang Zhi authored
      commit d0f2fb25 upstream.
      
      From EHCI Spec p.28 HC should clear PORT_SUSPEND when SW clears
      PORT_RESUME. In Intel Oaktrail platform, MPH (Multi-Port Host
      Controller) core clears PORT_SUSPEND directly when SW sets PORT_RESUME
      bit. If we rely on PORT_SUSPEND bit to stop USB resume, we will miss
      the action of clearing PORT_RESUME. This will cause unexpected long
      resume signal on USB bus.
      Signed-off-by: default avatarWang Zhi <zhi.wang@windriver.com>
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cde5eaf3
    • Per Forlin's avatar
      usb: musb: cppi: fix build errors due to DBG and missing musb variable · f91364f8
      Per Forlin authored
      commit f847a79a upstream.
      
      Replace DBG with dev_dbg and fix invalid access of musb->controller.
      With this patch cppi_dma builds successfully.
      Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f91364f8
    • Andrew Bird's avatar
      USB option driver K3765/K4505 avoid CDC_DATA interface · 6ab711f9
      Andrew Bird authored
      commit 6118514e upstream.
      
      Currently the Option driver avoids binding interface 1 on Huawei K3765
      and K4505 broadband modems as it should be handled by the cdc_ether
      driver instead. This patch ensures we don't bind the interface 2
      on those devices as that is CDC_DATA.
      Signed-off-by: default avatarAndrew Bird <ajb@spheresystems.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6ab711f9
    • Gavin.zhu's avatar
      USB: option: add YUGA device id to driver · 42dc061e
      Gavin.zhu authored
      commit c6eb2d75 upstream.
      Signed-off-by: default avatarGavin.zhu <gavin.kx@qq.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      42dc061e
    • Andrew Bird's avatar
      USB option driver add PID of Huawei Vodafone K4605 · f5cda959
      Andrew Bird authored
      commit 7e180584 upstream.
      
      This patch adds the product ID of Huawei's Vodafone K4605 mobile broadband
      modem to option.c. This is necessary so that the driver gets loaded on
      demand without the intervention of usb_modeswitch. This has the benefit of
      it becoming available faster and also ensures that the option driver is not
      bound to a network interface that should be claimed by suitable network
      driver.
      Signed-off-by: default avatarAndrew Bird <ajb@spheresystems.co.uk>
      Signed-off-by: default avatarAlex Chiang <achiang@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f5cda959