From: Greg Kroah-Hartman Date: Sat, 4 Jun 2016 19:15:02 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v3.14.72~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0359767df7d7248cc66bf3ddc395c17c36ef99b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: aacraid-fix-for-aac_command_thread-hang.patch aacraid-relinquish-cpu-during-timeout-wait.patch ath5k-change-led-pin-configuration-for-compaq-c700-laptop.patch cpuidle-indicate-when-a-device-has-been-unregistered.patch input-uinput-handle-compat-ioctl-for-ui_set_phys.patch pci-disable-all-bar-sizing-for-devices-with-non-compliant-bars.patch --- diff --git a/queue-3.14/aacraid-fix-for-aac_command_thread-hang.patch b/queue-3.14/aacraid-fix-for-aac_command_thread-hang.patch new file mode 100644 index 00000000000..d4416f30dd1 --- /dev/null +++ b/queue-3.14/aacraid-fix-for-aac_command_thread-hang.patch @@ -0,0 +1,47 @@ +From fc4bf75ea300a5e62a2419f89dd0e22189dd7ab7 Mon Sep 17 00:00:00 2001 +From: Raghava Aditya Renukunta +Date: Mon, 25 Apr 2016 23:31:57 -0700 +Subject: aacraid: Fix for aac_command_thread hang + +From: Raghava Aditya Renukunta + +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 +Reviewed-by: Johannes Thumshirn +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + 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()) diff --git a/queue-3.14/aacraid-relinquish-cpu-during-timeout-wait.patch b/queue-3.14/aacraid-relinquish-cpu-during-timeout-wait.patch new file mode 100644 index 00000000000..5887d8adba0 --- /dev/null +++ b/queue-3.14/aacraid-relinquish-cpu-during-timeout-wait.patch @@ -0,0 +1,46 @@ +From 07beca2be24cc710461c0b131832524c9ee08910 Mon Sep 17 00:00:00 2001 +From: Raghava Aditya Renukunta +Date: Mon, 25 Apr 2016 23:31:26 -0700 +Subject: aacraid: Relinquish CPU during timeout wait + +From: Raghava Aditya Renukunta + +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 +Reviewed-by: Johannes Thumshirn +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + 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 diff --git a/queue-3.14/ath5k-change-led-pin-configuration-for-compaq-c700-laptop.patch b/queue-3.14/ath5k-change-led-pin-configuration-for-compaq-c700-laptop.patch new file mode 100644 index 00000000000..b4777ae0038 --- /dev/null +++ b/queue-3.14/ath5k-change-led-pin-configuration-for-compaq-c700-laptop.patch @@ -0,0 +1,38 @@ +From 7b9bc799a445aea95f64f15e0083cb19b5789abe Mon Sep 17 00:00:00 2001 +From: Joseph Salisbury +Date: Mon, 14 Mar 2016 14:51:48 -0400 +Subject: ath5k: Change led pin configuration for compaq c700 laptop + +From: Joseph Salisbury + +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 +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + 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) */ diff --git a/queue-3.14/cpuidle-indicate-when-a-device-has-been-unregistered.patch b/queue-3.14/cpuidle-indicate-when-a-device-has-been-unregistered.patch new file mode 100644 index 00000000000..ef871d3f74c --- /dev/null +++ b/queue-3.14/cpuidle-indicate-when-a-device-has-been-unregistered.patch @@ -0,0 +1,40 @@ +From c998c07836f985b24361629dc98506ec7893e7a0 Mon Sep 17 00:00:00 2001 +From: Dave Gerlach +Date: Tue, 5 Apr 2016 14:05:38 -0500 +Subject: cpuidle: Indicate when a device has been unregistered + +From: Dave Gerlach + +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 +Acked-by: Daniel Lezcano +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + 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) diff --git a/queue-3.14/input-uinput-handle-compat-ioctl-for-ui_set_phys.patch b/queue-3.14/input-uinput-handle-compat-ioctl-for-ui_set_phys.patch new file mode 100644 index 00000000000..24cd954c7d4 --- /dev/null +++ b/queue-3.14/input-uinput-handle-compat-ioctl-for-ui_set_phys.patch @@ -0,0 +1,39 @@ +From affa80bd97f7ca282d1faa91667b3ee9e4c590e6 Mon Sep 17 00:00:00 2001 +From: Ricky Liang +Date: Fri, 20 May 2016 10:58:59 -0700 +Subject: Input: uinput - handle compat ioctl for UI_SET_PHYS + +From: Ricky Liang + +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 +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + 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 diff --git a/queue-3.14/pci-disable-all-bar-sizing-for-devices-with-non-compliant-bars.patch b/queue-3.14/pci-disable-all-bar-sizing-for-devices-with-non-compliant-bars.patch new file mode 100644 index 00000000000..0728bb28053 --- /dev/null +++ b/queue-3.14/pci-disable-all-bar-sizing-for-devices-with-non-compliant-bars.patch @@ -0,0 +1,60 @@ +From ad67b437f187ea818b2860524d10f878fadfdd99 Mon Sep 17 00:00:00 2001 +From: Prarit Bhargava +Date: Wed, 11 May 2016 12:27:16 -0400 +Subject: PCI: Disable all BAR sizing for devices with non-compliant BARs + +From: Prarit Bhargava + +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 +Signed-off-by: Bjorn Helgaas +CC: Thomas Gleixner +CC: Ingo Molnar +CC: "H. Peter Anvin" +CC: Andi Kleen +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-3.14/series b/queue-3.14/series index 374d6561f01..268c3b37e9c 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -1,3 +1,9 @@ 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