--- /dev/null
+From fc4bf75ea300a5e62a2419f89dd0e22189dd7ab7 Mon Sep 17 00:00:00 2001
+From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
+Date: Mon, 25 Apr 2016 23:31:57 -0700
+Subject: aacraid: Fix for aac_command_thread hang
+
+From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
+
+commit fc4bf75ea300a5e62a2419f89dd0e22189dd7ab7 upstream.
+
+Typically under error conditions, it is possible for aac_command_thread()
+to miss the wakeup from kthread_stop() and go back to sleep, causing it
+to hang aac_shutdown.
+
+In the observed scenario, the adapter is not functioning correctly and so
+aac_fib_send() never completes (or time-outs depending on how it was
+called). Shortly after aac_command_thread() starts it performs
+aac_fib_send(SendHostTime) which hangs. When aac_probe_one
+/aac_get_adapter_info send time outs, kthread_stop is called which breaks
+the command thread out of it's hang.
+
+The code will still go back to sleep in schedule_timeout() without
+checking kthread_should_stop() so it causes aac_probe_one to hang until
+the schedule_timeout() which is 30 minutes.
+
+Fixed by: Adding another kthread_should_stop() before schedule_timeout()
+Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/aacraid/commsup.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/scsi/aacraid/commsup.c
++++ b/drivers/scsi/aacraid/commsup.c
+@@ -1921,6 +1921,10 @@ int aac_command_thread(void *data)
+ if (difference <= 0)
+ difference = 1;
+ set_current_state(TASK_INTERRUPTIBLE);
++
++ if (kthread_should_stop())
++ break;
++
+ schedule_timeout(difference);
+
+ if (kthread_should_stop())
--- /dev/null
+From 07beca2be24cc710461c0b131832524c9ee08910 Mon Sep 17 00:00:00 2001
+From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
+Date: Mon, 25 Apr 2016 23:31:26 -0700
+Subject: aacraid: Relinquish CPU during timeout wait
+
+From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
+
+commit 07beca2be24cc710461c0b131832524c9ee08910 upstream.
+
+aac_fib_send has a special function case for initial commands during
+driver initialization using wait < 0(pseudo sync mode). In this case,
+the command does not sleep but rather spins checking for timeout.This
+loop is calls cpu_relax() in an attempt to allow other processes/threads
+to use the CPU, but this function does not relinquish the CPU and so the
+command will hog the processor. This was observed in a KDUMP
+"crashkernel" and that prevented the "command thread" (which is
+responsible for completing the command from being timed out) from
+starting because it could not get the CPU.
+
+Fixed by replacing "cpu_relax()" call with "schedule()"
+Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/aacraid/commsup.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/scsi/aacraid/commsup.c
++++ b/drivers/scsi/aacraid/commsup.c
+@@ -590,10 +590,10 @@ int aac_fib_send(u16 command, struct fib
+ }
+ return -EFAULT;
+ }
+- /* We used to udelay() here but that absorbed
+- * a CPU when a timeout occured. Not very
+- * useful. */
+- cpu_relax();
++ /*
++ * Allow other processes / CPUS to use core
++ */
++ schedule();
+ }
+ } else if (down_interruptible(&fibptr->event_wait)) {
+ /* Do nothing ... satisfy
--- /dev/null
+From 7b9bc799a445aea95f64f15e0083cb19b5789abe Mon Sep 17 00:00:00 2001
+From: Joseph Salisbury <joseph.salisbury@canonical.com>
+Date: Mon, 14 Mar 2016 14:51:48 -0400
+Subject: ath5k: Change led pin configuration for compaq c700 laptop
+
+From: Joseph Salisbury <joseph.salisbury@canonical.com>
+
+commit 7b9bc799a445aea95f64f15e0083cb19b5789abe upstream.
+
+BugLink: http://bugs.launchpad.net/bugs/972604
+
+Commit 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin
+configuration for compaq c700 laptop") added a pin configuration for the Compaq
+c700 laptop. However, the polarity of the led pin is reversed. It should be
+red for wifi off and blue for wifi on, but it is the opposite. This bug was
+reported in the following bug report:
+http://pad.lv/972604
+
+Fixes: 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin configuration for compaq c700 laptop")
+Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
+Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath5k/led.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath5k/led.c
++++ b/drivers/net/wireless/ath/ath5k/led.c
+@@ -77,7 +77,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath5k_led
+ /* HP Compaq CQ60-206US (ddreggors@jumptv.com) */
+ { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137a), ATH_LED(3, 1) },
+ /* HP Compaq C700 (nitrousnrg@gmail.com) */
+- { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 1) },
++ { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 0) },
+ /* LiteOn AR5BXB63 (magooz@salug.it) */
+ { ATH_SDEVICE(PCI_VENDOR_ID_ATHEROS, 0x3067), ATH_LED(3, 0) },
+ /* IBM-specific AR5212 (all others) */
--- /dev/null
+From c998c07836f985b24361629dc98506ec7893e7a0 Mon Sep 17 00:00:00 2001
+From: Dave Gerlach <d-gerlach@ti.com>
+Date: Tue, 5 Apr 2016 14:05:38 -0500
+Subject: cpuidle: Indicate when a device has been unregistered
+
+From: Dave Gerlach <d-gerlach@ti.com>
+
+commit c998c07836f985b24361629dc98506ec7893e7a0 upstream.
+
+Currently the 'registered' member of the cpuidle_device struct is set
+to 1 during cpuidle_register_device. In this same function there are
+checks to see if the device is already registered to prevent duplicate
+calls to register the device, but this value is never set to 0 even on
+unregister of the device. Because of this, any attempt to call
+cpuidle_register_device after a call to cpuidle_unregister_device will
+fail which shouldn't be the case.
+
+To prevent this, set registered to 0 when the device is unregistered.
+
+Fixes: c878a52d3c7c (cpuidle: Check if device is already registered)
+Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
+Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/cpuidle/cpuidle.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/cpuidle/cpuidle.c
++++ b/drivers/cpuidle/cpuidle.c
+@@ -313,6 +313,8 @@ static void __cpuidle_unregister_device(
+ list_del(&dev->device_list);
+ per_cpu(cpuidle_devices, dev->cpu) = NULL;
+ module_put(drv->owner);
++
++ dev->registered = 0;
+ }
+
+ static void __cpuidle_device_init(struct cpuidle_device *dev)
--- /dev/null
+From affa80bd97f7ca282d1faa91667b3ee9e4c590e6 Mon Sep 17 00:00:00 2001
+From: Ricky Liang <jcliang@chromium.org>
+Date: Fri, 20 May 2016 10:58:59 -0700
+Subject: Input: uinput - handle compat ioctl for UI_SET_PHYS
+
+From: Ricky Liang <jcliang@chromium.org>
+
+commit affa80bd97f7ca282d1faa91667b3ee9e4c590e6 upstream.
+
+When running a 32-bit userspace on a 64-bit kernel, the UI_SET_PHYS
+ioctl needs to be treated with special care, as it has the pointer
+size encoded in the command.
+
+Signed-off-by: Ricky Liang <jcliang@chromium.org>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/misc/uinput.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/input/misc/uinput.c
++++ b/drivers/input/misc/uinput.c
+@@ -845,9 +845,15 @@ static long uinput_ioctl(struct file *fi
+ }
+
+ #ifdef CONFIG_COMPAT
++
++#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t)
++
+ static long uinput_compat_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg)
+ {
++ if (cmd == UI_SET_PHYS_COMPAT)
++ cmd = UI_SET_PHYS;
++
+ return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg));
+ }
+ #endif
--- /dev/null
+From ad67b437f187ea818b2860524d10f878fadfdd99 Mon Sep 17 00:00:00 2001
+From: Prarit Bhargava <prarit@redhat.com>
+Date: Wed, 11 May 2016 12:27:16 -0400
+Subject: PCI: Disable all BAR sizing for devices with non-compliant BARs
+
+From: Prarit Bhargava <prarit@redhat.com>
+
+commit ad67b437f187ea818b2860524d10f878fadfdd99 upstream.
+
+b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant
+BARs") disabled BAR sizing for BARs 0-5 of devices that don't comply with
+the PCI spec. But it didn't do anything for expansion ROM BARs, so we
+still try to size them, resulting in warnings like this on Broadwell-EP:
+
+ pci 0000:ff:12.0: BAR 6: failed to assign [mem size 0x00000001 pref]
+
+Move the non-compliant BAR check from __pci_read_base() up to
+pci_read_bases() so it applies to the expansion ROM BAR as well as
+to BARs 0-5.
+
+Note that direct callers of __pci_read_base(), like sriov_init(), will now
+bypass this check. We haven't had reports of devices with broken SR-IOV
+BARs yet.
+
+[bhelgaas: changelog]
+Fixes: b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant BARs")
+Signed-off-by: Prarit Bhargava <prarit@redhat.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+CC: Thomas Gleixner <tglx@linutronix.de>
+CC: Ingo Molnar <mingo@redhat.com>
+CC: "H. Peter Anvin" <hpa@zytor.com>
+CC: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pci/probe.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -175,9 +175,6 @@ int __pci_read_base(struct pci_dev *dev,
+ struct pci_bus_region region, inverted_region;
+ bool bar_too_big = false, bar_disabled = false;
+
+- if (dev->non_compliant_bars)
+- return 0;
+-
+ mask = type ? PCI_ROM_ADDRESS_MASK : ~0;
+
+ /* No printks while decoding is disabled! */
+@@ -319,6 +316,9 @@ static void pci_read_bases(struct pci_de
+ {
+ unsigned int pos, reg;
+
++ if (dev->non_compliant_bars)
++ return;
++
+ for (pos = 0; pos < howmany; pos++) {
+ struct resource *res = &dev->resource[pos];
+ reg = PCI_BASE_ADDRESS_0 + (pos << 2);
mips-math-emu-fix-jalr-emulation-when-rd-0.patch
mips-fix-siginfo.h-to-use-strict-posix-types.patch
mips-ath79-make-bootconsole-wait-for-both-thre-and-temt.patch
+input-uinput-handle-compat-ioctl-for-ui_set_phys.patch
+ath5k-change-led-pin-configuration-for-compaq-c700-laptop.patch
+aacraid-relinquish-cpu-during-timeout-wait.patch
+aacraid-fix-for-aac_command_thread-hang.patch
+cpuidle-indicate-when-a-device-has-been-unregistered.patch
+pci-disable-all-bar-sizing-for-devices-with-non-compliant-bars.patch