1. 01 Apr, 2014 40 commits
    • Denis V. Lunev's avatar
      ata: enable quirk from jmicron JMB350 for JMB394 · e86e416d
      Denis V. Lunev authored
      commit efb9e0f4 upstream.
      
      Without the patch the kernel generates the following error.
      
       ata11.15: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
       ata11.15: Port Multiplier vendor mismatch '0x197b' != '0x123'
       ata11.15: PMP revalidation failed (errno=-19)
       ata11.15: failed to recover PMP after 5 tries, giving up
      
      This patch helps to bypass this error and the device becomes
      functional.
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: <linux-ide@vger.kernel.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      e86e416d
    • David Rientjes's avatar
      mm, oom: base root bonus on current usage · 41cf82c2
      David Rientjes authored
      commit 778c14af upstream.
      
      A 3% of system memory bonus is sometimes too excessive in comparison to
      other processes.
      
      With commit a63d83f4 ("oom: badness heuristic rewrite"), the OOM
      killer tries to avoid killing privileged tasks by subtracting 3% of
      overall memory (system or cgroup) from their per-task consumption.  But
      as a result, all root tasks that consume less than 3% of overall memory
      are considered equal, and so it only takes 33+ privileged tasks pushing
      the system out of memory for the OOM killer to do something stupid and
      kill dhclient or other root-owned processes.  For example, on a 32G
      machine it can't tell the difference between the 1M agetty and the 10G
      fork bomb member.
      
      The changelog describes this 3% boost as the equivalent to the global
      overcommit limit being 3% higher for privileged tasks, but this is not
      the same as discounting 3% of overall memory from _every privileged task
      individually_ during OOM selection.
      
      Replace the 3% of system memory bonus with a 3% of current memory usage
      bonus.
      
      By giving root tasks a bonus that is proportional to their actual size,
      they remain comparable even when relatively small.  In the example
      above, the OOM killer will discount the 1M agetty's 256 badness points
      down to 179, and the 10G fork bomb's 262144 points down to 183500 points
      and make the right choice, instead of discounting both to 0 and killing
      agetty because it's first in the task list.
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Reported-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      [bwh: Backported to 3.2: existing code changes 'points' directly rather
       than using 'adj' variable]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      41cf82c2
    • Harald Freudenberger's avatar
      crypto: s390 - fix des and des3_ede ctr concurrency issue · 60745e70
      Harald Freudenberger authored
      commit ee97dc7d upstream.
      
      In s390 des and 3des ctr mode there is one preallocated page
      used to speed up the en/decryption. This page is not protected
      against concurrent usage and thus there is a potential of data
      corruption with multiple threads.
      
      The fix introduces locking/unlocking the ctr page and a slower
      fallback solution at concurrency situations.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      60745e70
    • Harald Freudenberger's avatar
      crypto: s390 - fix des and des3_ede cbc concurrency issue · 33b121eb
      Harald Freudenberger authored
      commit adc3fcf1 upstream.
      
      In s390 des and des3_ede cbc mode the iv value is not protected
      against concurrency access and modifications from another running
      en/decrypt operation which is using the very same tfm struct
      instance. This fix copies the iv to the local stack before
      the crypto operation and stores the value back when done.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      33b121eb
    • Harald Freudenberger's avatar
      crypto: s390 - fix concurrency issue in aes-ctr mode · fc211c9a
      Harald Freudenberger authored
      commit 0519e9ad upstream.
      
      The aes-ctr mode uses one preallocated page without any concurrency
      protection. When multiple threads run aes-ctr encryption or decryption
      this can lead to data corruption.
      
      The patch introduces locking for the page and a fallback solution with
      slower en/decryption performance in concurrency situations.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      fc211c9a
    • Jan Glauber's avatar
      s390/crypto: Don't panic after crypto instruction failures · 501ec62e
      Jan Glauber authored
      commit 36eb2caa upstream.
      
      Remove the BUG_ON's that check for failure or incomplete
      results of the s390 hardware crypto instructions.
      Rather report the errors as -EIO to the crypto layer.
      Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      501ec62e
    • Andy Grover's avatar
      target/iscsi: Fix network portal creation race · 6b1246d9
      Andy Grover authored
      commit ee291e63 upstream.
      
      When creating network portals rapidly, such as when restoring a
      configuration, LIO's code to reuse existing portals can return a false
      negative if the thread hasn't run yet and set np_thread_state to
      ISCSI_NP_THREAD_ACTIVE. This causes an error in the network stack
      when attempting to bind to the same address/port.
      
      This patch sets NP_THREAD_ACTIVE before the np is placed on g_np_list,
      so even if the thread hasn't run yet, iscsit_get_np will return the
      existing np.
      
      Also, convert np_lock -> np_mutex + hold across adding new net portal
      to g_np_list to prevent a race where two threads may attempt to create
      the same network portal, resulting in one of them failing.
      
      (nab: Add missing mutex_unlocks in iscsit_add_np failure paths)
      (DanC: Fix incorrect spin_unlock -> spin_unlock_bh)
      Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      6b1246d9
    • Dan Carpenter's avatar
      KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio() · 64006c84
      Dan Carpenter authored
      commit aac5c422 upstream.
      
      If kvm_io_bus_register_dev() fails then it returns success but it should
      return an error code.
      
      I also did a little cleanup like removing an impossible NULL test.
      
      Fixes: 2b3c246a ('KVM: Make coalesced mmio use a device per zone')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      64006c84
    • Alex Deucher's avatar
      drm/radeon/DCE4+: clear bios scratch dpms bit (v2) · 8d4853d0
      Alex Deucher authored
      commit 6802d4ba upstream.
      
      The BlankCrtc table in some DCE8 boards has some
      logic shortcuts for the vbios when this bit is set.
      Clear it for driver use.
      
      v2: fix typo
      
      Bug:
      https://bugs.freedesktop.org/show_bug.cgi?id=73420Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      8d4853d0
    • Chris Mason's avatar
      Btrfs: setup inode location during btrfs_init_inode_locked · 5da1d479
      Chris Mason authored
      commit 90d3e592 upstream.
      
      We have a race during inode init because the BTRFS_I(inode)->location is setup
      after the inode hash table lock is dropped.  btrfs_find_actor uses the location
      field, so our search might not find an existing inode in the hash table if we
      race with the inode init code.
      
      This commit changes things to setup the location field sooner.  Also the find actor now
      uses only the location objectid to match inodes.  For inode hashing, we just
      need a unique and stable test, it doesn't have to reflect the inode numbers we
      show to userland.
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      [bwh: Backported to 3.2:
       - No hashval in btrfs_iget_locked()]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      5da1d479
    • Paul Mackerras's avatar
      powerpc: Make sure "cache" directory is removed when offlining cpu · 1d4b777f
      Paul Mackerras authored
      commit 91b973f9 upstream.
      
      The code in remove_cache_dir() is supposed to remove the "cache"
      subdirectory from the sysfs directory for a CPU when that CPU is
      being offlined.  It tries to do this by calling kobject_put() on
      the kobject for the subdirectory.  However, the subdirectory only
      gets removed once the last reference goes away, and the reference
      being put here may well not be the last reference.  That means
      that the "cache" subdirectory may still exist when the offlining
      operation has finished.  If the same CPU subsequently gets onlined,
      the code tries to add a new "cache" subdirectory.  If the old
      subdirectory has not yet been removed, we get a WARN_ON in the
      sysfs code, with stack trace, and an error message printed on the
      console.  Further, we ultimately end up with an online cpu with no
      "cache" subdirectory.
      
      This fixes it by doing an explicit kobject_del() at the point where
      we want the subdirectory to go away.  kobject_del() removes the sysfs
      directory even though the object still exists in memory.  The object
      will get freed at some point in the future.  A subsequent onlining
      operation can create a new sysfs directory, even if the old object
      still exists in memory, without causing any problems.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      1d4b777f
    • Mark Brown's avatar
      ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API · a0746611
      Mark Brown authored
      commit 49a12877 upstream.
      
      There is currently no facility in ACPI to express the hookup of voltage
      regulators, the expectation is that the regulators that exist in the
      system will be handled transparently by firmware if they need software
      control at all. This means that if for some reason the regulator API is
      enabled on such a system it should assume that any supplies that devices
      need are provided by the system at all relevant times without any software
      intervention.
      
      Tell the regulator core to make this assumption by calling
      regulator_has_full_constraints(). Do this as soon as we know we are using
      ACPI so that the information is available to the regulator core as early
      as possible. This will cause the regulator core to pretend that there is
      an always on regulator supplying any supply that is requested but that has
      not otherwise been mapped which is the behaviour expected on a system with
      ACPI.
      
      Should the ability to specify regulators be added in future revisions of
      ACPI then once we have support for ACPI mappings in the kernel the same
      assumptions will apply. It is also likely that systems will default to a
      mode of operation which does not require any interpretation of these
      mappings in order to be compatible with existing operating system releases
      so it should remain safe to make these assumptions even if the mappings
      exist but are not supported by the kernel.
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      a0746611
    • David Sterba's avatar
      btrfs: restrict snapshotting to own subvolumes · 72b10438
      David Sterba authored
      commit d0242061 upstream.
      
      Currently, any user can snapshot any subvolume if the path is accessible and
      thus indirectly create and keep files he does not own under his direcotries.
      This is not possible with traditional directories.
      
      In security context, a user can snapshot root filesystem and pin any
      potentially buggy binaries, even if the updates are applied.
      
      All the snapshots are visible to the administrator, so it's possible to
      verify if there are suspicious snapshots.
      
      Another more practical problem is that any user can pin the space used
      by eg. root and cause ENOSPC.
      
      Original report:
      https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/484786Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      [bwh: Backported to 3.2:
       - Adjust context
       - Use the same cleanup code for success and error cases, as done
         upstream in commit ecd18815
         ('switch btrfs_ioctl_snap_create_transid() to fget_light()')]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      72b10438
    • Wang Shilong's avatar
      Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() · 1ff4cfa5
      Wang Shilong authored
      commit 90515e7f upstream.
      
      We may return early in btrfs_drop_snapshot(), we shouldn't
      call btrfs_std_err() for this case, fix it.
      Signed-off-by: default avatarWang Shilong <wangsl.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      1ff4cfa5
    • Mihai Caraman's avatar
      KVM: PPC: e500: Fix bad address type in deliver_tlb_misss() · dca0911e
      Mihai Caraman authored
      commit 70713fe3 upstream.
      
      Use gva_t instead of unsigned int for eaddr in deliver_tlb_miss().
      Signed-off-by: default avatarMihai Caraman <mihai.caraman@freescale.com>
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      [bwh: Backported to 3.2: adjust filename]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      dca0911e
    • Shane Huang's avatar
      i2c: piix4: Add support for AMD ML and CZ SMBus changes · a1d1c11c
      Shane Huang authored
      commit 032f708b upstream.
      
      The locations of SMBus register base address and enablement bit are changed
      from AMD ML, which need this patch to be supported.
      Signed-off-by: default avatarShane Huang <shane.huang@amd.com>
      Reviewed-by: default avatarJean Delvare <khali@linux-fr.org>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      [bwh: Backported to 3.2:
       - Adjust context
       - Aux bus support is not included]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      a1d1c11c
    • ZHAO Gang's avatar
      b43: fix the wrong assignment of status.freq in b43_rx() · e4c0c199
      ZHAO Gang authored
      commit 64e5acb0 upstream.
      
      Use the right function to update frequency value.
      
      If rx skb is probe response or beacon, the wrong frequency value can
      cause problem that bss info can't be updated when it should be.
      
      Fixes: 8318d78a ("cfg80211 API for channels/bitrates, mac80211
      and driver conversion")
      Signed-off-by: default avatarZHAO Gang <gamerh2o@gmail.com>
      Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      e4c0c199
    • Boaz Harrosh's avatar
      ore: Fix wrong math in allocation of per device BIO · c99cf525
      Boaz Harrosh authored
      commit aad560b7 upstream.
      
      At IO preparation we calculate the max pages at each device and
      allocate a BIO per device of that size. The calculation was wrong
      on some unaligned corner cases offset/length combination and would
      make prepare return with -ENOMEM. This would be bad for pnfs-objects
      that would in that case IO through MDS. And fatal for exofs were it
      would fail writes with EIO.
      
      Fix it by doing the proper math, that will work in all cases. (I
      ran a test with all possible offset/length combinations this time
      round).
      
      Also when reading we do not need to allocate for the parity units
      since we jump over them.
      
      Also lower the max_io_length to take into account the parity pages
      so not to allocate BIOs bigger than PAGE_SIZE
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c99cf525
    • Ira Weiny's avatar
      IB/qib: Fix QP check when looping back to/from QP1 · 17c9dc71
      Ira Weiny authored
      commit 6e0ea9e6 upstream.
      
      The GSI QP type is compatible with and should be allowed to send data
      to/from any UD QP.  This was found when testing ibacm on the same node
      as an SA.
      Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      17c9dc71
    • Miklos Szeredi's avatar
      fuse: fix pipe_buf_operations · c4047a30
      Miklos Szeredi authored
      commit 28a625cb upstream.
      
      Having this struct in module memory could Oops when if the module is
      unloaded while the buffer still persists in a pipe.
      
      Since sock_pipe_buf_ops is essentially the same as fuse_dev_pipe_buf_steal
      merge them into nosteal_pipe_buf_ops (this is the same as
      default_pipe_buf_ops except stealing the page from the buffer is not
      allowed).
      Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c4047a30
    • Alex Williamson's avatar
      intel-iommu: fix off-by-one in pagetable freeing · d43cc1a6
      Alex Williamson authored
      commit 08336fd2 upstream.
      
      dma_pte_free_level() has an off-by-one error when checking whether a pte
      is completely covered by a range.  Take for example the case of
      attempting to free pfn 0x0 - 0x1ff, ie.  512 entries covering the first
      2M superpage.
      
      The level_size() is 0x200 and we test:
      
        static void dma_pte_free_level(...
      	...
      
      	if (!(0 > 0 || 0x1ff < 0 + 0x200)) {
      		...
      	}
      
      Clearly the 2nd test is true, which means we fail to take the branch to
      clear and free the pagetable entry.  As a result, we're leaking
      pagetables and failing to install new pages over the range.
      
      This was found with a PCI device assigned to a QEMU guest using vfio-pci
      without a VGA device present.  The first 1M of guest address space is
      mapped with various combinations of 4K pages, but eventually the range
      is entirely freed and replaced with a 2M contiguous mapping.
      intel-iommu errors out with something like:
      
        ERROR: DMA PTE for vPFN 0x0 already set (to 5c2b8003 not 849c00083)
      
      In this case 5c2b8003 is the pointer to the previous leaf page that was
      neither freed nor cleared and 849c00083 is the superpage entry that
      we're trying to replace it with.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Joerg Roedel <joro@8bytes.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      d43cc1a6
    • Takashi Iwai's avatar
      hp_accel: Add a new PnP ID HPQ6007 for new HP laptops · 55cea4b5
      Takashi Iwai authored
      commit b0ad4ff3 upstream.
      
      The DriveGuard chips on the new HP laptops are with a new PnP ID
      "HPQ6007".  It should be compatible with older chips.
      Acked-by: default avatarÉric Piel <eric.piel@tremplin-utc.net>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      55cea4b5
    • Alex Deucher's avatar
      drm/radeon: set the full cache bit for fences on r7xx+ · 7bf56b6a
      Alex Deucher authored
      commit d45b964a upstream.
      
      Needed to properly flush the read caches for fences.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      [bwh: Backported to 3.2:
       - Adjust context
       - s/\bring\b/rdev/]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      7bf56b6a
    • Alex Deucher's avatar
      drm/radeon: disable ss on DP for DCE3.x · 03ee9dc3
      Alex Deucher authored
      commit d8e24525 upstream.
      
      Seems to cause problems with certain DP monitors.
      
      Bug:
      https://bugs.freedesktop.org/show_bug.cgi?id=40699Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      [bwh: Backported to 3.2: s/radeon_crtc->//]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      03ee9dc3
    • Josh Triplett's avatar
      turbostat: Use GCC's CPUID functions to support PIC · c9ae63f0
      Josh Triplett authored
      commit 2b92865e upstream.
      
      turbostat uses inline assembly to call cpuid.  On 32-bit x86, on systems
      that have certain security features enabled by default that make -fPIC
      the default, this causes a build error:
      
      turbostat.c: In function ‘check_cpuid’:
      turbostat.c:1906:2: error: PIC register clobbered by ‘ebx’ in ‘asm’
        asm("cpuid" : "=a" (fms), "=c" (ecx), "=d" (edx) : "a" (1) : "ebx");
        ^
      
      GCC provides a header cpuid.h, containing a __get_cpuid function that
      works with both PIC and non-PIC.  (On PIC, it saves and restores ebx
      around the cpuid instruction.)  Use that instead.
      Signed-off-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c9ae63f0
    • Aisheng Dong's avatar
      mmc: sdhci: fix lockdep error in tuning routine · 4fab5343
      Aisheng Dong authored
      commit 2b35bd83 upstream.
      
      The sdhci_execute_tuning routine gets lock separately by
      disable_irq(host->irq);
      spin_lock(&host->lock);
      It will cause the following lockdep error message since the &host->lock
      could also be got in irq context.
      Use spin_lock_irqsave/spin_unlock_restore instead to get rid of
      this error message.
      
      [ INFO: inconsistent lock state ]
      3.13.0-rc1+ #287 Not tainted
      ---------------------------------
      inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
      kworker/u2:1/33 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (&(&host->lock)->rlock){?.-...}, at: [<8045f7f4>] sdhci_execute_tuning+0x4c/0x710
      {IN-HARDIRQ-W} state was registered at:
        [<8005f030>] mark_lock+0x140/0x6ac
        [<80060760>] __lock_acquire+0xb30/0x1cbc
        [<800620d0>] lock_acquire+0x70/0x84
        [<8061d1c8>] _raw_spin_lock+0x30/0x40
        [<804605cc>] sdhci_irq+0x24/0xa68
        [<8006b1d4>] handle_irq_event_percpu+0x54/0x18c
        [<8006b350>] handle_irq_event+0x44/0x64
        [<8006e50c>] handle_fasteoi_irq+0xa0/0x170
        [<8006a8f0>] generic_handle_irq+0x30/0x44
        [<8000f238>] handle_IRQ+0x54/0xbc
        [<8000864c>] gic_handle_irq+0x30/0x64
        [<80013024>] __irq_svc+0x44/0x5c
        [<80329bf4>] dev_vprintk_emit+0x50/0x58
        [<80329c24>] dev_printk_emit+0x28/0x30
        [<80329fec>] __dev_printk+0x4c/0x90
        [<8032a180>] dev_err+0x3c/0x48
        [<802dd4f0>] _regulator_get+0x158/0x1cc
        [<802dd5b4>] regulator_get_optional+0x18/0x1c
        [<80461df4>] sdhci_add_host+0x42c/0xbd8
        [<80464820>] sdhci_esdhc_imx_probe+0x378/0x67c
        [<8032ee88>] platform_drv_probe+0x20/0x50
        [<8032d48c>] driver_probe_device+0x118/0x234
        [<8032d690>] __driver_attach+0x9c/0xa0
        [<8032b89c>] bus_for_each_dev+0x68/0x9c
        [<8032cf44>] driver_attach+0x20/0x28
        [<8032cbc8>] bus_add_driver+0x148/0x1f4
        [<8032dce0>] driver_register+0x80/0x100
        [<8032ee54>] __platform_driver_register+0x50/0x64
        [<8084b094>] sdhci_esdhc_imx_driver_init+0x18/0x20
        [<80008980>] do_one_initcall+0x108/0x16c
        [<8081cca4>] kernel_init_freeable+0x10c/0x1d0
        [<80611b28>] kernel_init+0x10/0x120
        [<8000e9c8>] ret_from_fork+0x14/0x2c
      irq event stamp: 805
      hardirqs last  enabled at (805): [<8061d43c>] _raw_spin_unlock_irqrestore+0x38/0x4c
      hardirqs last disabled at (804): [<8061d2c8>] _raw_spin_lock_irqsave+0x24/0x54
      softirqs last  enabled at (570): [<8002b824>] __do_softirq+0x1c4/0x290
      softirqs last disabled at (561): [<8002bcf4>] irq_exit+0xb4/0x10c
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&(&host->lock)->rlock);
        <Interrupt>
          lock(&(&host->lock)->rlock);
      
       *** DEADLOCK ***
      
      2 locks held by kworker/u2:1/33:
       #0:  (kmmcd){.+.+..}, at: [<8003db18>] process_one_work+0x128/0x468
       #1:  ((&(&host->detect)->work)){+.+...}, at: [<8003db18>] process_one_work+0x128/0x468
      
      stack backtrace:
      CPU: 0 PID: 33 Comm: kworker/u2:1 Not tainted 3.13.0-rc1+ #287
      Workqueue: kmmcd mmc_rescan
      Backtrace:
      [<80012160>] (dump_backtrace+0x0/0x10c) from [<80012438>] (show_stack+0x18/0x1c)
       r6:bfad0900 r5:00000000 r4:8088ecc8 r3:bfad0900
      [<80012420>] (show_stack+0x0/0x1c) from [<806169ec>] (dump_stack+0x84/0x9c)
      [<80616968>] (dump_stack+0x0/0x9c) from [<806147b4>] (print_usage_bug+0x260/0x2d0)
       r5:8076ba88 r4:80977410
      [<80614554>] (print_usage_bug+0x0/0x2d0) from [<8005f0d0>] (mark_lock+0x1e0/0x6ac)
       r9:8005e678 r8:00000000 r7:bfad0900 r6:00001015 r5:bfad0cd0
      r4:00000002
      [<8005eef0>] (mark_lock+0x0/0x6ac) from [<80060234>] (__lock_acquire+0x604/0x1cbc)
      [<8005fc30>] (__lock_acquire+0x0/0x1cbc) from [<800620d0>] (lock_acquire+0x70/0x84)
      [<80062060>] (lock_acquire+0x0/0x84) from [<8061d1c8>] (_raw_spin_lock+0x30/0x40)
       r7:00000000 r6:bfb63000 r5:00000000 r4:bfb60568
      [<8061d198>] (_raw_spin_lock+0x0/0x40) from [<8045f7f4>] (sdhci_execute_tuning+0x4c/0x710)
       r4:bfb60000
      [<8045f7a8>] (sdhci_execute_tuning+0x0/0x710) from [<80453454>] (mmc_sd_init_card+0x5f8/0x660)
      [<80452e5c>] (mmc_sd_init_card+0x0/0x660) from [<80453748>] (mmc_attach_sd+0xb4/0x180)
       r9:bf92d400 r8:8065f364 r7:00061a80 r6:bfb60000 r5:8065f358
      r4:bfb60000
      [<80453694>] (mmc_attach_sd+0x0/0x180) from [<8044d9f8>] (mmc_rescan+0x284/0x2f0)
       r5:8065f358 r4:bfb602f8
      [<8044d774>] (mmc_rescan+0x0/0x2f0) from [<8003db94>] (process_one_work+0x1a4/0x468)
       r8:00000000 r7:bfb55eb0 r6:bf80dc00 r5:bfb602f8 r4:bfb35980
      r3:8044d774
      [<8003d9f0>] (process_one_work+0x0/0x468) from [<8003e850>] (worker_thread+0x118/0x3e0)
      [<8003e738>] (worker_thread+0x0/0x3e0) from [<80044de0>] (kthread+0xd4/0xf0)
      [<80044d0c>] (kthread+0x0/0xf0) from [<8000e9c8>] (ret_from_fork+0x14/0x2c)
       r7:00000000 r6:00000000 r5:80044d0c r4:bfb37b40
      Signed-off-by: default avatarDong Aisheng <b29396@freescale.com>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      [bwh: Backported to 3.2:
       - Adjust context
       - There's no platform_execute_tuning hook]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      4fab5343
    • Tejun Heo's avatar
      libata: disable LPM for some WD SATA-I devices · d6d0a918
      Tejun Heo authored
      commit ecd75ad5 upstream.
      
      For some reason, some early WD drives spin up and down drives
      erratically when the link is put into slumber mode which can reduce
      the life expectancy of the device significantly.  Unfortunately, we
      don't have full list of devices and given the nature of the issue it'd
      be better to err on the side of false positives than the other way
      around.  Let's disable LPM on all WD devices which match one of the
      known problematic model prefixes and are SATA-I.
      
      As horkage list doesn't support matching SATA capabilities, this is
      implemented as two horkages - WD_BROKEN_LPM and NOLPM.  The former is
      set for the known prefixes and sets the latter if the matched device
      is SATA-I.
      
      Note that this isn't optimal as this disables all LPM operations and
      partial link power state reportedly works fine on these; however, the
      way LPM is implemented in libata makes it difficult to precisely map
      libata LPM setting to specific link power state.  Well, these devices
      are already fairly outdated.  Let's just disable whole LPM for now.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-and-tested-by: default avatarNikos Barkas <levelwol@gmail.com>
      Reported-and-tested-by: default avatarIoannis Barkas <risc4all@yahoo.com>
      References: https://bugzilla.kernel.org/show_bug.cgi?id=57211
      [bwh: Backported to 3.2:
       - Adjust context
       - Use literal 76 instead of ATA_ID_SATA_CAPABILITY]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      d6d0a918
    • Prarit Bhargava's avatar
      x86: Add check for number of available vectors before CPU down · a7c1da5b
      Prarit Bhargava authored
      commit da6139e4 upstream.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791
      
      When a cpu is downed on a system, the irqs on the cpu are assigned to
      other cpus.  It is possible, however, that when a cpu is downed there
      aren't enough free vectors on the remaining cpus to account for the
      vectors from the cpu that is being downed.
      
      This results in an interesting "overflow" condition where irqs are
      "assigned" to a CPU but are not handled.
      
      For example, when downing cpus on a 1-64 logical processor system:
      
      <snip>
      [  232.021745] smpboot: CPU 61 is now offline
      [  238.480275] smpboot: CPU 62 is now offline
      [  245.991080] ------------[ cut here ]------------
      [  245.996270] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x246/0x250()
      [  246.005688] NETDEV WATCHDOG: p786p1 (ixgbe): transmit queue 0 timed out
      [  246.013070] Modules linked in: lockd sunrpc iTCO_wdt iTCO_vendor_support sb_edac ixgbe microcode e1000e pcspkr joydev edac_core lpc_ich ioatdma ptp mdio mfd_core i2c_i801 dca pps_core i2c_core wmi acpi_cpufreq isci libsas scsi_transport_sas
      [  246.037633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #14
      [  246.044451] Hardware name: Intel Corporation S4600LH ........../SVRBD-ROW_T, BIOS SE5C600.86B.01.08.0003.022620131521 02/26/2013
      [  246.057371]  0000000000000009 ffff88081fa03d40 ffffffff8164fbf6 ffff88081fa0ee48
      [  246.065728]  ffff88081fa03d90 ffff88081fa03d80 ffffffff81054ecc ffff88081fa13040
      [  246.074073]  0000000000000000 ffff88200cce0000 0000000000000040 0000000000000000
      [  246.082430] Call Trace:
      [  246.085174]  <IRQ>  [<ffffffff8164fbf6>] dump_stack+0x46/0x58
      [  246.091633]  [<ffffffff81054ecc>] warn_slowpath_common+0x8c/0xc0
      [  246.098352]  [<ffffffff81054fb6>] warn_slowpath_fmt+0x46/0x50
      [  246.104786]  [<ffffffff815710d6>] dev_watchdog+0x246/0x250
      [  246.110923]  [<ffffffff81570e90>] ? dev_deactivate_queue.constprop.31+0x80/0x80
      [  246.119097]  [<ffffffff8106092a>] call_timer_fn+0x3a/0x110
      [  246.125224]  [<ffffffff8106280f>] ? update_process_times+0x6f/0x80
      [  246.132137]  [<ffffffff81570e90>] ? dev_deactivate_queue.constprop.31+0x80/0x80
      [  246.140308]  [<ffffffff81061db0>] run_timer_softirq+0x1f0/0x2a0
      [  246.146933]  [<ffffffff81059a80>] __do_softirq+0xe0/0x220
      [  246.152976]  [<ffffffff8165fedc>] call_softirq+0x1c/0x30
      [  246.158920]  [<ffffffff810045f5>] do_softirq+0x55/0x90
      [  246.164670]  [<ffffffff81059d35>] irq_exit+0xa5/0xb0
      [  246.170227]  [<ffffffff8166062a>] smp_apic_timer_interrupt+0x4a/0x60
      [  246.177324]  [<ffffffff8165f40a>] apic_timer_interrupt+0x6a/0x70
      [  246.184041]  <EOI>  [<ffffffff81505a1b>] ? cpuidle_enter_state+0x5b/0xe0
      [  246.191559]  [<ffffffff81505a17>] ? cpuidle_enter_state+0x57/0xe0
      [  246.198374]  [<ffffffff81505b5d>] cpuidle_idle_call+0xbd/0x200
      [  246.204900]  [<ffffffff8100b7ae>] arch_cpu_idle+0xe/0x30
      [  246.210846]  [<ffffffff810a47b0>] cpu_startup_entry+0xd0/0x250
      [  246.217371]  [<ffffffff81646b47>] rest_init+0x77/0x80
      [  246.223028]  [<ffffffff81d09e8e>] start_kernel+0x3ee/0x3fb
      [  246.229165]  [<ffffffff81d0989f>] ? repair_env_string+0x5e/0x5e
      [  246.235787]  [<ffffffff81d095a5>] x86_64_start_reservations+0x2a/0x2c
      [  246.242990]  [<ffffffff81d0969f>] x86_64_start_kernel+0xf8/0xfc
      [  246.249610] ---[ end trace fb74fdef54d79039 ]---
      [  246.254807] ixgbe 0000:c2:00.0 p786p1: initiating reset due to tx timeout
      [  246.262489] ixgbe 0000:c2:00.0 p786p1: Reset adapter
      Last login: Mon Nov 11 08:35:14 from 10.18.17.119
      [root@(none) ~]# [  246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5
      [  249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
      [  246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5
      [  249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
      
      (last lines keep repeating.  ixgbe driver is dead until module reload.)
      
      If the downed cpu has more vectors than are free on the remaining cpus on the
      system, it is possible that some vectors are "orphaned" even though they are
      assigned to a cpu.  In this case, since the ixgbe driver had a watchdog, the
      watchdog fired and notified that something was wrong.
      
      This patch adds a function, check_vectors(), to compare the number of vectors
      on the CPU going down and compares it to the number of vectors available on
      the system.  If there aren't enough vectors for the CPU to go down, an
      error is returned and propogated back to userspace.
      
      v2: Do not need to look at percpu irqs
      v3: Need to check affinity to prevent counting of MSIs in IOAPIC Lowest
          Priority Mode
      v4: Additional changes suggested by Gong Chen.
      v5/v6/v7/v8: Updated comment text
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Link: http://lkml.kernel.org/r/1389613861-3853-1-git-send-email-prarit@redhat.comReviewed-by: default avatarGong Chen <gong.chen@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Yang Zhang <yang.z.zhang@Intel.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Janet Morgan <janet.morgan@intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Ruiv Wang <ruiv.wang@gmail.com>
      Cc: Gong Chen <gong.chen@linux.intel.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      a7c1da5b
    • NeilBrown's avatar
      md/raid5: fix long-standing problem with bitmap handling on write failure. · adce73df
      NeilBrown authored
      commit 9f97e4b1 upstream.
      
      Before a write starts we set a bit in the write-intent bitmap.
      When the write completes we clear that bit if the write was successful
      to all devices.  However if the write wasn't fully successful we
      should not clear the bit.  If the faulty drive is subsequently
      re-added, the fact that the bit is still set ensure that we will
      re-write the data that is missing.
      
      This logic is mediated by the STRIPE_DEGRADED flag - we only clear the
      bitmap bit when this flag is not set.
      Currently we correctly set the flag if a write starts when some
      devices are failed or missing.  But we do *not* set the flag if some
      device failed during the write attempt.
      This is wrong and can result in clearing the bit inappropriately.
      
      So: set the flag when a write fails.
      
      This bug has been present since bitmaps were introduces, so the fix is
      suitable for any -stable kernel.
      Reported-by: default avatarEthan Wilson <ethan.wilson@shiftmail.org>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      [bwh: Backported to 3.2: adjust context, indentation]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      adce73df
    • Marcelo Tosatti's avatar
      KVM: x86: limit PIT timer frequency · 7a9175ab
      Marcelo Tosatti authored
      commit 9ed96e87 upstream.
      
      Limit PIT timer frequency similarly to the limit applied by
      LAPIC timer.
      Reviewed-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      [bwh: Backported to 3.2:
       - Adjust context
       - s/ps->period/pt->period/]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      7a9175ab
    • Mikulas Patocka's avatar
      dm sysfs: fix a module unload race · 43057146
      Mikulas Patocka authored
      commit 2995fa78 upstream.
      
      This reverts commit be35f486 ("dm: wait until embedded kobject is
      released before destroying a device") and provides an improved fix.
      
      The kobject release code that calls the completion must be placed in a
      non-module file, otherwise there is a module unload race (if the process
      calling dm_kobject_release is preempted and the DM module unloaded after
      the completion is triggered, but before dm_kobject_release returns).
      
      To fix this race, this patch moves the completion code to dm-builtin.c
      which is always compiled directly into the kernel if BLK_DEV_DM is
      selected.
      
      The patch introduces a new dm_kobject_holder structure, its purpose is
      to keep the completion and kobject in one place, so that it can be
      accessed from non-module code without the need to export the layout of
      struct mapped_device to that code.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      [bwh: Backported to 3.2:
       - Adjust context
       - Remove paranoid check of container_of() result in dm_get_from_kobject(),
         which would now be incorrect
       - Include <linux/export.h> in dm-builtin.c, included indirectly upstream]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      43057146
    • Peter Chen's avatar
      usb: ehci: add freescale imx28 special write register method · b7785833
      Peter Chen authored
      commit feffe09f upstream.
      
      According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB
      register error issue", All USB register write operations must
      use the ARM SWP instruction. So, we implement a special ehci_write
      for imx28.
      
      Discussion for it at below:
      http://marc.info/?l=linux-usb&m=137996395529294&w=2
      
      Without this patcheset, imx28 works unstable at high AHB bus loading.
      If the bus loading is not high, the imx28 usb can work well at the most
      of time. There is a IC errata for this problem, usually, we consider
      IC errata is a problem not a new feature, and this workaround is needed
      for that, so we need to add them to stable tree 3.11+.
      
      Cc: robert.hodaszi@digi.com
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Tested-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      [bwh: Backported to 3.2:adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b7785833
    • Weston Andros Adamson's avatar
      nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME · b2cf3f5e
      Weston Andros Adamson authored
      commit 78b19bae upstream.
      
      Don't check for -NFS4ERR_NOTSUPP, it's already been mapped to -ENOTSUPP
      by nfs4_stat_to_errno.
      
      This allows the client to mount v4.1 servers that don't support
      SECINFO_NO_NAME by falling back to the "guess and check" method of
      nfs4_find_root_sec.
      Signed-off-by: default avatarWeston Andros Adamson <dros@primarydata.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b2cf3f5e
    • Larry Finger's avatar
      c9d051d0
    • Steven Rostedt (Red Hat)'s avatar
      ftrace: Fix synchronization location disabling and freeing ftrace_ops · 82d12fc8
      Steven Rostedt (Red Hat) authored
      commit a4c35ed2 upstream.
      
      The synchronization needed after ftrace_ops are unregistered must happen
      after the callback is disabled from becing called by functions.
      
      The current location happens after the function is being removed from the
      internal lists, but not after the function callbacks were disabled, leaving
      the functions susceptible of being called after their callbacks are freed.
      
      This affects perf and any externel users of function tracing (LTTng and
      SystemTap).
      
      Fixes: cdbe61bf "ftrace: Allow dynamically allocated function tracers"
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      [bwh: Backported to 3.2: drop change for control ops]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      82d12fc8
    • Steven Rostedt's avatar
      ftrace: Use schedule_on_each_cpu() as a heavy synchronize_sched() · 9f9b9ac2
      Steven Rostedt authored
      commit 7614c3dc upstream.
      
      The function tracer uses preempt_disable/enable_notrace() for
      synchronization between reading registered ftrace_ops and unregistering
      them.
      
      Most of the ftrace_ops are global permanent structures that do not
      require this synchronization. That is, ops may be added and removed from
      the hlist but are never freed, and wont hurt if a synchronization is
      missed.
      
      But this is not true for dynamically created ftrace_ops or control_ops,
      which are used by the perf function tracing.
      
      The problem here is that the function tracer can be used to trace
      kernel/user context switches as well as going to and from idle.
      Basically, it can be used to trace blind spots of the RCU subsystem.
      This means that even though preempt_disable() is done, a
      synchronize_sched() will ignore CPUs that haven't made it out of user
      space or idle. These can include functions that are being traced just
      before entering or exiting the kernel sections.
      
      To implement the RCU synchronization, instead of using
      synchronize_sched() the use of schedule_on_each_cpu() is performed. This
      means that when a dynamically allocated ftrace_ops, or a control ops is
      being unregistered, all CPUs must be touched and execute a ftrace_sync()
      stub function via the work queues. This will rip CPUs out from idle or
      in dynamic tick mode. This only happens when a user disables perf
      function tracing or other dynamically allocated function tracers, but it
      allows us to continue to debug RCU and context tracking with function
      tracing.
      
      Link: http://lkml.kernel.org/r/1369785676.15552.55.camel@gandalf.local.home
      
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      [bwh: Backported to 3.2: drop change for control ops]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      9f9b9ac2
    • Ludovic Desroches's avatar
      mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA · c98df443
      Ludovic Desroches authored
      commit 66b512ed upstream.
      
      With some SDIO devices, timeout errors can happen when reading data.
      To solve this issue, the DMA transfer has to be activated before sending
      the command to the device. This order is incorrect in PDC mode. So we
      have to take care if we are using DMA or PDC to know when to send the
      MMC command.
      Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarChris Ball <cjb@laptop.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c98df443
    • Hartmut Knaack's avatar
      staging:iio:ad799x fix error_free_irq which was freeing an irq that may not have been requested · 96540b62
      Hartmut Knaack authored
      commit 38408d05 upstream.
      
      Only free an IRQ in error_free_irq, if it has been requested previously.
      Signed-off-by: default avatarHartmut Knaack <knaack.h@gmx.de>
      Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      96540b62
    • Takashi Iwai's avatar
      ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks · b7e031b8
      Takashi Iwai authored
      commit 80ab8eae upstream.
      
      The PCI devices with DMA masks smaller than 32bit should enable
      CONFIG_ZONE_DMA.  Since the recent change of page allocator, page
      allocations via dma_alloc_coherent() with the limited DMA mask bits
      may fail more frequently, ended up with no available buffers, when
      CONFIG_ZONE_DMA isn't enabled.  With CONFIG_ZONE_DMA, the system has
      much more chance to obtain such pages.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b7e031b8
    • Larry Finger's avatar
      staging: r8712u: Set device type to wlan · 900a2253
      Larry Finger authored
      commit 3a21f00a upstream.
      
      The latest version of NetworkManager does not recognize the device as wireless
      without this change.
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      900a2253