--- /dev/null
+From c6eda5e81c4fcc77185117255c7419eda771f67f Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Fri, 31 Jan 2014 14:11:54 -0500
+Subject: dm cache: move hook_info into common portion of per_bio_data structure
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit c6eda5e81c4fcc77185117255c7419eda771f67f upstream.
+
+Commit c9d28d5d ("dm cache: promotion optimisation for writes")
+incorrectly placed the 'hook_info' member in the writethrough-only
+portion of the per_bio_data structure.
+
+Given that the overwrite optimization may be used for writeback the
+'hook_info' member must be placed above the 'cache' member of the
+per_bio_data structure. Any members above 'cache' are available from
+both writeback and writethrough modes' per_bio_data structure.
+
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Acked-by: Joe Thornber <ejt@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-cache-target.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/md/dm-cache-target.c
++++ b/drivers/md/dm-cache-target.c
+@@ -283,6 +283,7 @@ struct per_bio_data {
+ bool tick:1;
+ unsigned req_nr:2;
+ struct dm_deferred_entry *all_io_entry;
++ struct dm_hook_info hook_info;
+
+ /*
+ * writethrough fields. These MUST remain at the end of this
+@@ -291,7 +292,6 @@ struct per_bio_data {
+ */
+ struct cache *cache;
+ dm_cblock_t cblock;
+- struct dm_hook_info hook_info;
+ struct dm_bio_details bio_details;
+ };
+
--- /dev/null
+From a1989b330093578ea5470bea0a00f940c444c466 Mon Sep 17 00:00:00 2001
+From: Hannes Reinecke <hare@suse.de>
+Date: Wed, 26 Feb 2014 10:07:04 +0100
+Subject: dm mpath: fix stalls when handling invalid ioctls
+
+From: Hannes Reinecke <hare@suse.de>
+
+commit a1989b330093578ea5470bea0a00f940c444c466 upstream.
+
+An invalid ioctl will never be valid, irrespective of whether multipath
+has active paths or not. So for invalid ioctls we do not have to wait
+for multipath to activate any paths, but can rather return an error
+code immediately. This fix resolves numerous instances of:
+
+ udevd[]: worker [] unexpectedly returned with status 0x0100
+
+that have been seen during testing.
+
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-mpath.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -1626,8 +1626,11 @@ static int multipath_ioctl(struct dm_tar
+ /*
+ * Only pass ioctls through if the device sizes match exactly.
+ */
+- if (!r && ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT)
+- r = scsi_verify_blk_ioctl(NULL, cmd);
++ if (!bdev || ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT) {
++ int err = scsi_verify_blk_ioctl(NULL, cmd);
++ if (err)
++ r = err;
++ }
+
+ if (r == -ENOTCONN && !fatal_signal_pending(current))
+ queue_work(kmultipathd, &m->process_queued_ios);
--- /dev/null
+From 4d1662a30dde6e545086fe0e8fd7e474c4e0b639 Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Thu, 6 Feb 2014 06:08:56 -0500
+Subject: dm thin: avoid metadata commit if a pool's thin devices haven't changed
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit 4d1662a30dde6e545086fe0e8fd7e474c4e0b639 upstream.
+
+Commit 905e51b ("dm thin: commit outstanding data every second")
+introduced a periodic commit. This commit occurs regardless of whether
+any thin devices have made changes.
+
+Fix the periodic commit to check if any of a pool's thin devices have
+changed using dm_pool_changed_this_transaction().
+
+Reported-by: Alexander Larsson <alexl@redhat.com>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Acked-by: Joe Thornber <ejt@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-thin-metadata.c | 17 +++++++++++++++++
+ drivers/md/dm-thin-metadata.h | 2 ++
+ drivers/md/dm-thin.c | 3 ++-
+ 3 files changed, 21 insertions(+), 1 deletion(-)
+
+--- a/drivers/md/dm-thin-metadata.c
++++ b/drivers/md/dm-thin-metadata.c
+@@ -1489,6 +1489,23 @@ bool dm_thin_changed_this_transaction(st
+ return r;
+ }
+
++bool dm_pool_changed_this_transaction(struct dm_pool_metadata *pmd)
++{
++ bool r = false;
++ struct dm_thin_device *td, *tmp;
++
++ down_read(&pmd->root_lock);
++ list_for_each_entry_safe(td, tmp, &pmd->thin_devices, list) {
++ if (td->changed) {
++ r = td->changed;
++ break;
++ }
++ }
++ up_read(&pmd->root_lock);
++
++ return r;
++}
++
+ bool dm_thin_aborted_changes(struct dm_thin_device *td)
+ {
+ bool r;
+--- a/drivers/md/dm-thin-metadata.h
++++ b/drivers/md/dm-thin-metadata.h
+@@ -161,6 +161,8 @@ int dm_thin_remove_block(struct dm_thin_
+ */
+ bool dm_thin_changed_this_transaction(struct dm_thin_device *td);
+
++bool dm_pool_changed_this_transaction(struct dm_pool_metadata *pmd);
++
+ bool dm_thin_aborted_changes(struct dm_thin_device *td);
+
+ int dm_thin_get_highest_mapped_block(struct dm_thin_device *td,
+--- a/drivers/md/dm-thin.c
++++ b/drivers/md/dm-thin.c
+@@ -1354,7 +1354,8 @@ static void process_deferred_bios(struct
+ bio_list_init(&pool->deferred_flush_bios);
+ spin_unlock_irqrestore(&pool->lock, flags);
+
+- if (bio_list_empty(&bios) && !need_commit_due_to_time(pool))
++ if (bio_list_empty(&bios) &&
++ !(dm_pool_changed_this_transaction(pool->pmd) && need_commit_due_to_time(pool)))
+ return;
+
+ if (commit(pool)) {
--- /dev/null
+From 1acacc0784aab45627b6009e0e9224886279ac0b Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Wed, 19 Feb 2014 20:32:33 -0500
+Subject: dm thin: fix the error path for the thin device constructor
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit 1acacc0784aab45627b6009e0e9224886279ac0b upstream.
+
+dm_pool_close_thin_device() must be called if dm_set_target_max_io_len()
+fails in thin_ctr(). Otherwise __pool_destroy() will fail because the
+pool will still have an open thin device:
+
+ device-mapper: thin metadata: attempt to close pmd when 1 device(s) are still open
+ device-mapper: thin: __pool_destroy: dm_pool_metadata_close() failed.
+
+Also, must establish error code if failing thin_ctr() because the pool
+is in fail_io mode.
+
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Acked-by: Joe Thornber <ejt@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-thin.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/md/dm-thin.c
++++ b/drivers/md/dm-thin.c
+@@ -2848,6 +2848,7 @@ static int thin_ctr(struct dm_target *ti
+
+ if (get_pool_mode(tc->pool) == PM_FAIL) {
+ ti->error = "Couldn't open thin device, Pool is in fail mode";
++ r = -EINVAL;
+ goto bad_thin_open;
+ }
+
+@@ -2859,7 +2860,7 @@ static int thin_ctr(struct dm_target *ti
+
+ r = dm_set_target_max_io_len(ti, tc->pool->sectors_per_block);
+ if (r)
+- goto bad_thin_open;
++ goto bad_target_max_io_len;
+
+ ti->num_flush_bios = 1;
+ ti->flush_supported = true;
+@@ -2880,6 +2881,8 @@ static int thin_ctr(struct dm_target *ti
+
+ return 0;
+
++bad_target_max_io_len:
++ dm_pool_close_thin_device(tc->td);
+ bad_thin_open:
+ __pool_dec(tc->pool);
+ bad_pool_lookup:
--- /dev/null
+From e9baa9d9d520fb0e24cca671e430689de2d4a4b2 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Thu, 13 Feb 2014 10:39:01 +0100
+Subject: dma: ste_dma40: don't dereference free:d descriptor
+
+From: Linus Walleij <linus.walleij@linaro.org>
+
+commit e9baa9d9d520fb0e24cca671e430689de2d4a4b2 upstream.
+
+It appears that in the DMA40 driver the DMA tasklet will very
+often dereference memory for a descriptor just free:d from the
+DMA40 slab. Nothing happens because no other part of the driver
+has yet had a chance to claim this memory, but it's really
+nasty to dereference free:d memory, so let's check the flag
+before the descriptor is free and store it in a bool variable.
+
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Vinod Koul <vinod.koul@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma/ste_dma40.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/dma/ste_dma40.c
++++ b/drivers/dma/ste_dma40.c
+@@ -1641,6 +1641,7 @@ static void dma_tasklet(unsigned long da
+ struct d40_chan *d40c = (struct d40_chan *) data;
+ struct d40_desc *d40d;
+ unsigned long flags;
++ bool callback_active;
+ dma_async_tx_callback callback;
+ void *callback_param;
+
+@@ -1668,6 +1669,7 @@ static void dma_tasklet(unsigned long da
+ }
+
+ /* Callback to client */
++ callback_active = !!(d40d->txd.flags & DMA_PREP_INTERRUPT);
+ callback = d40d->txd.callback;
+ callback_param = d40d->txd.callback_param;
+
+@@ -1690,7 +1692,7 @@ static void dma_tasklet(unsigned long da
+
+ spin_unlock_irqrestore(&d40c->lock, flags);
+
+- if (callback && (d40d->txd.flags & DMA_PREP_INTERRUPT))
++ if (callback_active && callback)
+ callback(callback_param);
+
+ return;
--- /dev/null
+From f51a44b9a6c4982cc25bfb3727de9bb893621ebc Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Tue, 11 Feb 2014 11:52:05 +0200
+Subject: drm/i915/dp: add native aux defer retry limit
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit f51a44b9a6c4982cc25bfb3727de9bb893621ebc upstream.
+
+Retrying indefinitely places too much trust on the aux implementation of
+the sink devices.
+
+Reported-by: Daniel Martin <consume.noise@gmail.com>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71267
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Tested-by: Theodore Ts'o <tytso@mit.edu>
+Tested-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -537,6 +537,7 @@ intel_dp_aux_native_write(struct intel_d
+ uint8_t msg[20];
+ int msg_bytes;
+ uint8_t ack;
++ int retry;
+
+ if (WARN_ON(send_bytes > 16))
+ return -E2BIG;
+@@ -548,18 +549,20 @@ intel_dp_aux_native_write(struct intel_d
+ msg[3] = send_bytes - 1;
+ memcpy(&msg[4], send, send_bytes);
+ msg_bytes = send_bytes + 4;
+- for (;;) {
++ for (retry = 0; retry < 7; retry++) {
+ ret = intel_dp_aux_ch(intel_dp, msg, msg_bytes, &ack, 1);
+ if (ret < 0)
+ return ret;
+ if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
+- break;
++ return send_bytes;
+ else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
+ usleep_range(400, 500);
+ else
+ return -EIO;
+ }
+- return send_bytes;
++
++ DRM_ERROR("too many retries, giving up\n");
++ return -EIO;
+ }
+
+ /* Write a single byte to the aux channel in native mode */
+@@ -581,6 +584,7 @@ intel_dp_aux_native_read(struct intel_dp
+ int reply_bytes;
+ uint8_t ack;
+ int ret;
++ int retry;
+
+ if (WARN_ON(recv_bytes > 19))
+ return -E2BIG;
+@@ -594,7 +598,7 @@ intel_dp_aux_native_read(struct intel_dp
+ msg_bytes = 4;
+ reply_bytes = recv_bytes + 1;
+
+- for (;;) {
++ for (retry = 0; retry < 7; retry++) {
+ ret = intel_dp_aux_ch(intel_dp, msg, msg_bytes,
+ reply, reply_bytes);
+ if (ret == 0)
+@@ -611,6 +615,9 @@ intel_dp_aux_native_read(struct intel_dp
+ else
+ return -EIO;
+ }
++
++ DRM_ERROR("too many retries, giving up\n");
++ return -EIO;
+ }
+
+ static int
--- /dev/null
+From 04eada25d1f72efdecd32d702706594f81de65d5 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Tue, 11 Feb 2014 11:52:04 +0200
+Subject: drm/i915/dp: increase native aux defer retry timeout
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit 04eada25d1f72efdecd32d702706594f81de65d5 upstream.
+
+Give more slack to sink devices before retrying on native aux
+defer. AFAICT the 100 us timeout was not based on the DP spec.
+
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Cc: stable@vger.kernel.org (on Jani's request)
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -555,7 +555,7 @@ intel_dp_aux_native_write(struct intel_d
+ if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
+ break;
+ else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
+- udelay(100);
++ usleep_range(400, 500);
+ else
+ return -EIO;
+ }
+@@ -607,7 +607,7 @@ intel_dp_aux_native_read(struct intel_dp
+ return ret - 1;
+ }
+ else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
+- udelay(100);
++ usleep_range(400, 500);
+ else
+ return -EIO;
+ }
--- /dev/null
+From 9ef4e1d000a5b335fcebfcf8aef3405e59574c89 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 25 Feb 2014 10:21:43 -0500
+Subject: drm/radeon: disable pll sharing for DP on DCE4.1
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 9ef4e1d000a5b335fcebfcf8aef3405e59574c89 upstream.
+
+Causes display problems. We had already disabled
+sharing for non-DP displays.
+
+Based on a patch from:
+Niels Ole Salscheider <niels_ole@salscheider-online.de>
+
+bug:
+https://bugzilla.kernel.org/show_bug.cgi?id=58121
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/atombios_crtc.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/atombios_crtc.c
++++ b/drivers/gpu/drm/radeon/atombios_crtc.c
+@@ -1767,6 +1767,20 @@ static int radeon_atom_pick_pll(struct d
+ return ATOM_PPLL1;
+ DRM_ERROR("unable to allocate a PPLL\n");
+ return ATOM_PPLL_INVALID;
++ } else if (ASIC_IS_DCE41(rdev)) {
++ /* Don't share PLLs on DCE4.1 chips */
++ if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) {
++ if (rdev->clock.dp_extclk)
++ /* skip PPLL programming if using ext clock */
++ return ATOM_PPLL_INVALID;
++ }
++ pll_in_use = radeon_get_pll_use_mask(crtc);
++ if (!(pll_in_use & (1 << ATOM_PPLL1)))
++ return ATOM_PPLL1;
++ if (!(pll_in_use & (1 << ATOM_PPLL2)))
++ return ATOM_PPLL2;
++ DRM_ERROR("unable to allocate a PPLL\n");
++ return ATOM_PPLL_INVALID;
+ } else if (ASIC_IS_DCE4(rdev)) {
+ /* in DP mode, the DP ref clock can come from PPLL, DCPLL, or ext clock,
+ * depending on the asic:
+@@ -1794,7 +1808,7 @@ static int radeon_atom_pick_pll(struct d
+ if (pll != ATOM_PPLL_INVALID)
+ return pll;
+ }
+- } else if (!ASIC_IS_DCE41(rdev)) { /* Don't share PLLs on DCE4.1 chips */
++ } else {
+ /* use the same PPLL for all monitors with the same clock */
+ pll = radeon_get_shared_nondp_ppll(crtc);
+ if (pll != ATOM_PPLL_INVALID)
--- /dev/null
+From d7eb0a0940618f36e5937d81c06ad7bf438a99e2 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 18 Feb 2014 10:25:39 -0500
+Subject: drm/radeon: fix audio disable on dce6+
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit d7eb0a0940618f36e5937d81c06ad7bf438a99e2 upstream.
+
+Properly clear the enable bit when audio disable is requested.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/dce6_afmt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/dce6_afmt.c
++++ b/drivers/gpu/drm/radeon/dce6_afmt.c
+@@ -283,7 +283,7 @@ static void dce6_audio_enable(struct rad
+ bool enable)
+ {
+ WREG32_ENDPOINT(pin->offset, AZ_F0_CODEC_PIN_CONTROL_HOTPLUG_CONTROL,
+- AUDIO_ENABLED);
++ enable ? AUDIO_ENABLED : 0);
+ DRM_INFO("%s audio %d support\n", enable ? "Enabling" : "Disabling", pin->id);
+ }
+
--- /dev/null
+From 5e386b574cf7e1593e1296e5b0feea4108ed6ad8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Thu, 20 Feb 2014 18:47:14 +0100
+Subject: drm/radeon: fix missing bo reservation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+
+commit 5e386b574cf7e1593e1296e5b0feea4108ed6ad8 upstream.
+
+Otherwise we might get a crash here.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/gpu/drm/radeon/radeon_kms.c
++++ b/drivers/gpu/drm/radeon/radeon_kms.c
+@@ -530,6 +530,10 @@ int radeon_driver_open_kms(struct drm_de
+
+ radeon_vm_init(rdev, &fpriv->vm);
+
++ r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false);
++ if (r)
++ return r;
++
+ /* map the ib pool buffer read only into
+ * virtual address space */
+ bo_va = radeon_vm_bo_add(rdev, &fpriv->vm,
+@@ -537,6 +541,8 @@ int radeon_driver_open_kms(struct drm_de
+ r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET,
+ RADEON_VM_PAGE_READABLE |
+ RADEON_VM_PAGE_SNOOPED);
++
++ radeon_bo_unreserve(rdev->ring_tmp_bo.bo);
+ if (r) {
+ radeon_vm_fini(rdev, &fpriv->vm);
+ kfree(fpriv);
--- /dev/null
+From d965441342f3b7d63db784cad852328d17d47942 Mon Sep 17 00:00:00 2001
+From: Jerome Glisse <jglisse@redhat.com>
+Date: Wed, 26 Feb 2014 19:22:47 -0500
+Subject: drm/radeon: free uvd ring on unload
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jerome Glisse <jglisse@redhat.com>
+
+commit d965441342f3b7d63db784cad852328d17d47942 upstream.
+
+Need to free the uvd ring. Also reshuffle gart tear down to
+happen after uvd tear down.
+
+Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/evergreen.c | 2 +-
+ drivers/gpu/drm/radeon/radeon_uvd.c | 2 ++
+ drivers/gpu/drm/radeon/rv770.c | 2 +-
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/evergreen.c
++++ b/drivers/gpu/drm/radeon/evergreen.c
+@@ -5418,9 +5418,9 @@ void evergreen_fini(struct radeon_device
+ radeon_wb_fini(rdev);
+ radeon_ib_pool_fini(rdev);
+ radeon_irq_kms_fini(rdev);
+- evergreen_pcie_gart_fini(rdev);
+ uvd_v1_0_fini(rdev);
+ radeon_uvd_fini(rdev);
++ evergreen_pcie_gart_fini(rdev);
+ r600_vram_scratch_fini(rdev);
+ radeon_gem_fini(rdev);
+ radeon_fence_driver_fini(rdev);
+--- a/drivers/gpu/drm/radeon/radeon_uvd.c
++++ b/drivers/gpu/drm/radeon/radeon_uvd.c
+@@ -171,6 +171,8 @@ void radeon_uvd_fini(struct radeon_devic
+
+ radeon_bo_unref(&rdev->uvd.vcpu_bo);
+
++ radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_UVD_INDEX]);
++
+ release_firmware(rdev->uvd_fw);
+ }
+
+--- a/drivers/gpu/drm/radeon/rv770.c
++++ b/drivers/gpu/drm/radeon/rv770.c
+@@ -1921,9 +1921,9 @@ void rv770_fini(struct radeon_device *rd
+ radeon_wb_fini(rdev);
+ radeon_ib_pool_fini(rdev);
+ radeon_irq_kms_fini(rdev);
+- rv770_pcie_gart_fini(rdev);
+ uvd_v1_0_fini(rdev);
+ radeon_uvd_fini(rdev);
++ rv770_pcie_gart_fini(rdev);
+ r600_vram_scratch_fini(rdev);
+ radeon_gem_fini(rdev);
+ radeon_fence_driver_fini(rdev);
--- /dev/null
+From 9f050c7f9738ffa746c63415136645ad231b1348 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 20 Feb 2014 09:16:01 -0500
+Subject: drm/radeon: print the supported atpx function mask
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 9f050c7f9738ffa746c63415136645ad231b1348 upstream.
+
+Print the supported functions mask in addition to
+the version. This is useful in debugging PX
+problems since we can see what functions are available.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
++++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+@@ -219,7 +219,8 @@ static int radeon_atpx_verify_interface(
+ memcpy(&output, info->buffer.pointer, size);
+
+ /* TODO: check version? */
+- printk("ATPX version %u\n", output.version);
++ printk("ATPX version %u, functions 0x%08x\n",
++ output.version, output.function_bits);
+
+ radeon_atpx_parse_functions(&atpx->functions, output.function_bits);
+
--- /dev/null
+From 75135da0d68419ef8a925f4c1d5f63d8046e314d Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 25 Feb 2014 09:43:13 +0100
+Subject: i7300_edac: Fix device reference count
+
+From: Jean Delvare <jdelvare@suse.de>
+
+commit 75135da0d68419ef8a925f4c1d5f63d8046e314d upstream.
+
+pci_get_device() decrements the reference count of "from" (last
+argument) so when we break off the loop successfully we have only one
+device reference - and we don't know which device we have. If we want
+a reference to each device, we must take them explicitly and let
+the pci_get_device() walk complete to avoid duplicate references.
+
+This is serious, as over-putting device references will cause
+the device to eventually disappear. Without this fix, the kernel
+crashes after a few insmod/rmmod cycles.
+
+Tested on an Intel S7000FC4UR system with a 7300 chipset.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Link: http://lkml.kernel.org/r/20140224111656.09bbb7ed@endymion.delvare
+Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
+Cc: Doug Thompson <dougthompson@xmission.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/edac/i7300_edac.c | 38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+--- a/drivers/edac/i7300_edac.c
++++ b/drivers/edac/i7300_edac.c
+@@ -943,33 +943,35 @@ static int i7300_get_devices(struct mem_
+
+ /* Attempt to 'get' the MCH register we want */
+ pdev = NULL;
+- while (!pvt->pci_dev_16_1_fsb_addr_map ||
+- !pvt->pci_dev_16_2_fsb_err_regs) {
+- pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
+- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR, pdev);
+- if (!pdev) {
+- /* End of list, leave */
+- i7300_printk(KERN_ERR,
+- "'system address,Process Bus' "
+- "device not found:"
+- "vendor 0x%x device 0x%x ERR funcs "
+- "(broken BIOS?)\n",
+- PCI_VENDOR_ID_INTEL,
+- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
+- goto error;
+- }
+-
++ while ((pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
++ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR,
++ pdev))) {
+ /* Store device 16 funcs 1 and 2 */
+ switch (PCI_FUNC(pdev->devfn)) {
+ case 1:
+- pvt->pci_dev_16_1_fsb_addr_map = pdev;
++ if (!pvt->pci_dev_16_1_fsb_addr_map)
++ pvt->pci_dev_16_1_fsb_addr_map =
++ pci_dev_get(pdev);
+ break;
+ case 2:
+- pvt->pci_dev_16_2_fsb_err_regs = pdev;
++ if (!pvt->pci_dev_16_2_fsb_err_regs)
++ pvt->pci_dev_16_2_fsb_err_regs =
++ pci_dev_get(pdev);
+ break;
+ }
+ }
+
++ if (!pvt->pci_dev_16_1_fsb_addr_map ||
++ !pvt->pci_dev_16_2_fsb_err_regs) {
++ /* At least one device was not found */
++ i7300_printk(KERN_ERR,
++ "'system address,Process Bus' device not found:"
++ "vendor 0x%x device 0x%x ERR funcs (broken BIOS?)\n",
++ PCI_VENDOR_ID_INTEL,
++ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
++ goto error;
++ }
++
+ edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n",
+ pci_name(pvt->pci_dev_16_0_fsb_ctlr),
+ pvt->pci_dev_16_0_fsb_ctlr->vendor,
--- /dev/null
+From f8d5b9e9e5372f0deb7bc1ab1088a9b60b0a793d Mon Sep 17 00:00:00 2001
+From: Sebastian Capella <sebastian.capella@linaro.org>
+Date: Tue, 18 Feb 2014 17:52:08 -0800
+Subject: PM / hibernate: Fix restore hang in freeze_processes()
+
+From: Sebastian Capella <sebastian.capella@linaro.org>
+
+commit f8d5b9e9e5372f0deb7bc1ab1088a9b60b0a793d upstream.
+
+During restore, pm_notifier chain are called with
+PM_RESTORE_PREPARE. The firmware_class driver handler
+fw_pm_notify does not have a handler for this. As a result,
+it keeps a reader on the kmod.c umhelper_sem. During
+freeze_processes, the call to __usermodehelper_disable tries to
+take a write lock on this semaphore and hangs waiting.
+
+Signed-off-by: Sebastian Capella <sebastian.capella@linaro.org>
+Acked-by: Ming Lei <ming.lei@canonical.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/firmware_class.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/base/firmware_class.c
++++ b/drivers/base/firmware_class.c
+@@ -1541,6 +1541,7 @@ static int fw_pm_notify(struct notifier_
+ switch (mode) {
+ case PM_HIBERNATION_PREPARE:
+ case PM_SUSPEND_PREPARE:
++ case PM_RESTORE_PREPARE:
+ kill_requests_without_uevent();
+ device_cache_fw_images();
+ break;
irq-metag-stop-set_affinity-vectoring-to-offline-cpus.patch
arm64-unwind-fix-pc-calculation.patch
qla2xxx-fix-kernel-panic-on-selective-retransmission-request.patch
+i7300_edac-fix-device-reference-count.patch
+pm-hibernate-fix-restore-hang-in-freeze_processes.patch
+dma-ste_dma40-don-t-dereference-free-d-descriptor.patch
+dm-mpath-fix-stalls-when-handling-invalid-ioctls.patch
+dm-cache-move-hook_info-into-common-portion-of-per_bio_data-structure.patch
+dm-thin-avoid-metadata-commit-if-a-pool-s-thin-devices-haven-t-changed.patch
+dm-thin-fix-the-error-path-for-the-thin-device-constructor.patch
+drm-radeon-fix-audio-disable-on-dce6.patch
+drm-radeon-print-the-supported-atpx-function-mask.patch
+drm-radeon-fix-missing-bo-reservation.patch
+drm-radeon-disable-pll-sharing-for-dp-on-dce4.1.patch
+drm-radeon-free-uvd-ring-on-unload.patch
+drm-i915-dp-increase-native-aux-defer-retry-timeout.patch
+drm-i915-dp-add-native-aux-defer-retry-limit.patch