--- /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
+@@ -1608,8 +1608,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
+@@ -1344,7 +1344,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_or_fallback(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
+@@ -2784,6 +2784,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;
+ }
+
+@@ -2795,7 +2796,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;
+@@ -2816,6 +2817,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
+@@ -1587,6 +1587,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;
+
+@@ -1614,6 +1615,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;
+
+@@ -1636,7 +1638,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 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
+@@ -1661,6 +1661,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:
+@@ -1688,7 +1702,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 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
+@@ -485,6 +485,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,
+@@ -492,6 +496,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 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
+@@ -215,7 +215,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,
arm-7749-1-spinlock-retry-trylock-operation-if-strex-fails-on-free-lock.patch
arm-7812-1-rwlocks-retry-trylock-operation-if-strex-fails-on-free-lock.patch
qla2xxx-fix-kernel-panic-on-selective-retransmission-request.patch
+i7300_edac-fix-device-reference-count.patch
+dma-ste_dma40-don-t-dereference-free-d-descriptor.patch
+dm-mpath-fix-stalls-when-handling-invalid-ioctls.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-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