--- /dev/null
+From 1f166499ce006b3770a3166122eda64e160736ab Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Thu, 10 Nov 2016 10:39:19 +0530
+Subject: ARM: dts: am57xx-beagle-x15-common: Add overide powerhold property
+
+From: Keerthy <j-keerthy@ti.com>
+
+commit 1f166499ce006b3770a3166122eda64e160736ab upstream.
+
+The PMICs have POWERHOLD set by default which prevents PMIC shutdown
+even on DEV_CTRL On bit set to 0 as the Powerhold has higher priority.
+So to enable pmic power off this property lets one over ride the default
+value and enable pmic power off.
+
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
++++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
+@@ -411,6 +411,7 @@
+ interrupt-controller;
+
+ ti,system-power-controller;
++ ti,palmas-override-powerhold;
+
+ tps659038_pmic {
+ compatible = "ti,tps659038-pmic";
--- /dev/null
+From 7c62de5f3fc92291decc0dac5f36949bdc3fb575 Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Thu, 13 Apr 2017 10:21:21 +0530
+Subject: ARM: dts: dra7: Add power hold and power controller properties to palmas
+
+From: Keerthy <j-keerthy@ti.com>
+
+commit 7c62de5f3fc92291decc0dac5f36949bdc3fb575 upstream.
+
+Add power hold and power controller properties to palmas node.
+This is needed to shutdown pmic correctly on boards with
+powerhold set.
+
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/dra7-evm.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm/boot/dts/dra7-evm.dts
++++ b/arch/arm/boot/dts/dra7-evm.dts
+@@ -410,6 +410,8 @@
+ tps659038: tps659038@58 {
+ compatible = "ti,tps659038";
+ reg = <0x58>;
++ ti,palmas-override-powerhold;
++ ti,system-power-controller;
+
+ tps659038_pmic {
+ compatible = "ti,tps659038-pmic";
--- /dev/null
+From 0ea66f76ba17a4b229caaadd77de694111b21769 Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Mon, 28 Nov 2016 09:31:58 +0530
+Subject: Documentation: pinctrl: palmas: Add ti,palmas-powerhold-override property definition
+
+From: Keerthy <j-keerthy@ti.com>
+
+commit 0ea66f76ba17a4b229caaadd77de694111b21769 upstream.
+
+GPIO7 is configured in POWERHOLD mode which has higher priority
+over DEV_ON bit and keeps the PMIC supplies on even after the DEV_ON
+bit is turned off. This property enables driver to over ride the
+POWERHOLD value to GPIO7 so as to turn off the PMIC in power off
+scenarios.
+
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt
++++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt
+@@ -35,6 +35,15 @@ Optional properties:
+ - ti,palmas-enable-dvfs2: Enable DVFS2. Configure pins for DVFS2 mode.
+ Selection primary or secondary function associated to GPADC_START
+ and SYSEN2 pin/pad for DVFS2 interface
++- ti,palmas-override-powerhold: This is applicable for PMICs for which
++ GPIO7 is configured in POWERHOLD mode which has higher priority
++ over DEV_ON bit and keeps the PMIC supplies on even after the DEV_ON
++ bit is turned off. This property enables driver to over ride the
++ POWERHOLD value to GPIO7 so as to turn off the PMIC in power off
++ scenarios. So for GPIO7 if ti,palmas-override-powerhold is set
++ then the GPIO_7 field should never be muxed to anything else.
++ It should be set to POWERHOLD by default and only in case of
++ power off scenarios the driver will over ride the mux value.
+
+ This binding uses the following generic properties as defined in
+ pinctrl-bindings.txt:
--- /dev/null
+From b18cb64ead400c01bf1580eeba330ace51f8087d Mon Sep 17 00:00:00 2001
+From: Andy Lutomirski <luto@kernel.org>
+Date: Fri, 30 Sep 2016 10:58:57 -0700
+Subject: fs/proc: Stop trying to report thread stacks
+
+From: Andy Lutomirski <luto@kernel.org>
+
+commit b18cb64ead400c01bf1580eeba330ace51f8087d upstream.
+
+This reverts more of:
+
+ b76437579d13 ("procfs: mark thread stack correctly in proc/<pid>/maps")
+
+... which was partially reverted by:
+
+ 65376df58217 ("proc: revert /proc/<pid>/maps [stack:TID] annotation")
+
+Originally, /proc/PID/task/TID/maps was the same as /proc/TID/maps.
+
+In current kernels, /proc/PID/maps (or /proc/TID/maps even for
+threads) shows "[stack]" for VMAs in the mm's stack address range.
+
+In contrast, /proc/PID/task/TID/maps uses KSTK_ESP to guess the
+target thread's stack's VMA. This is racy, probably returns garbage
+and, on arches with CONFIG_TASK_INFO_IN_THREAD=y, is also crash-prone:
+KSTK_ESP is not safe to use on tasks that aren't known to be running
+ordinary process-context kernel code.
+
+This patch removes the difference and just shows "[stack]" for VMAs
+in the mm's stack range. This is IMO much more sensible -- the
+actual "stack" address really is treated specially by the VM code,
+and the current thread stack isn't even well-defined for programs
+that frequently switch stacks on their own.
+
+Reported-by: Jann Horn <jann@thejh.net>
+Signed-off-by: Andy Lutomirski <luto@kernel.org>
+Acked-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Johannes Weiner <hannes@cmpxchg.org>
+Cc: Kees Cook <keescook@chromium.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Linux API <linux-api@vger.kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Tycho Andersen <tycho.andersen@canonical.com>
+Link: http://lkml.kernel.org/r/3e678474ec14e0a0ec34c611016753eea2e1b8ba.1475257877.git.luto@kernel.org
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/filesystems/proc.txt | 26 --------------------------
+ fs/proc/task_mmu.c | 29 ++++++++++-------------------
+ fs/proc/task_nommu.c | 26 +++++++++-----------------
+ 3 files changed, 19 insertions(+), 62 deletions(-)
+
+--- a/Documentation/filesystems/proc.txt
++++ b/Documentation/filesystems/proc.txt
+@@ -383,32 +383,6 @@ is not associated with a file:
+
+ or if empty, the mapping is anonymous.
+
+-The /proc/PID/task/TID/maps is a view of the virtual memory from the viewpoint
+-of the individual tasks of a process. In this file you will see a mapping marked
+-as [stack] if that task sees it as a stack. Hence, for the example above, the
+-task-level map, i.e. /proc/PID/task/TID/maps for thread 1001 will look like this:
+-
+-08048000-08049000 r-xp 00000000 03:00 8312 /opt/test
+-08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test
+-0804a000-0806b000 rw-p 00000000 00:00 0 [heap]
+-a7cb1000-a7cb2000 ---p 00000000 00:00 0
+-a7cb2000-a7eb2000 rw-p 00000000 00:00 0
+-a7eb2000-a7eb3000 ---p 00000000 00:00 0
+-a7eb3000-a7ed5000 rw-p 00000000 00:00 0 [stack]
+-a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6
+-a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6
+-a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6
+-a800b000-a800e000 rw-p 00000000 00:00 0
+-a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0
+-a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0
+-a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0
+-a8024000-a8027000 rw-p 00000000 00:00 0
+-a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2
+-a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2
+-a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2
+-aff35000-aff4a000 rw-p 00000000 00:00 0
+-ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
+-
+ The /proc/PID/smaps is an extension based on maps, showing the memory
+ consumption for each of the process's mappings. For each of mappings there
+ is a series of lines such as the following:
+--- a/fs/proc/task_mmu.c
++++ b/fs/proc/task_mmu.c
+@@ -253,24 +253,15 @@ static int do_maps_open(struct inode *in
+ * /proc/PID/maps that is the stack of the main task.
+ */
+ static int is_stack(struct proc_maps_private *priv,
+- struct vm_area_struct *vma, int is_pid)
++ struct vm_area_struct *vma)
+ {
+- int stack = 0;
+-
+- if (is_pid) {
+- stack = vma->vm_start <= vma->vm_mm->start_stack &&
+- vma->vm_end >= vma->vm_mm->start_stack;
+- } else {
+- struct inode *inode = priv->inode;
+- struct task_struct *task;
+-
+- rcu_read_lock();
+- task = pid_task(proc_pid(inode), PIDTYPE_PID);
+- if (task)
+- stack = vma_is_stack_for_task(vma, task);
+- rcu_read_unlock();
+- }
+- return stack;
++ /*
++ * We make no effort to guess what a given thread considers to be
++ * its "stack". It's not even well-defined for programs written
++ * languages like Go.
++ */
++ return vma->vm_start <= vma->vm_mm->start_stack &&
++ vma->vm_end >= vma->vm_mm->start_stack;
+ }
+
+ static void
+@@ -337,7 +328,7 @@ show_map_vma(struct seq_file *m, struct
+ goto done;
+ }
+
+- if (is_stack(priv, vma, is_pid))
++ if (is_stack(priv, vma))
+ name = "[stack]";
+ }
+
+@@ -1560,7 +1551,7 @@ static int show_numa_map(struct seq_file
+ seq_file_path(m, file, "\n\t= ");
+ } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
+ seq_puts(m, " heap");
+- } else if (is_stack(proc_priv, vma, is_pid)) {
++ } else if (is_stack(proc_priv, vma)) {
+ seq_puts(m, " stack");
+ }
+
+--- a/fs/proc/task_nommu.c
++++ b/fs/proc/task_nommu.c
+@@ -124,25 +124,17 @@ unsigned long task_statm(struct mm_struc
+ }
+
+ static int is_stack(struct proc_maps_private *priv,
+- struct vm_area_struct *vma, int is_pid)
++ struct vm_area_struct *vma)
+ {
+ struct mm_struct *mm = vma->vm_mm;
+- int stack = 0;
+
+- if (is_pid) {
+- stack = vma->vm_start <= mm->start_stack &&
+- vma->vm_end >= mm->start_stack;
+- } else {
+- struct inode *inode = priv->inode;
+- struct task_struct *task;
+-
+- rcu_read_lock();
+- task = pid_task(proc_pid(inode), PIDTYPE_PID);
+- if (task)
+- stack = vma_is_stack_for_task(vma, task);
+- rcu_read_unlock();
+- }
+- return stack;
++ /*
++ * We make no effort to guess what a given thread considers to be
++ * its "stack". It's not even well-defined for programs written
++ * languages like Go.
++ */
++ return vma->vm_start <= mm->start_stack &&
++ vma->vm_end >= mm->start_stack;
+ }
+
+ /*
+@@ -184,7 +176,7 @@ static int nommu_vma_show(struct seq_fil
+ if (file) {
+ seq_pad(m, ' ');
+ seq_file_path(m, file, "");
+- } else if (mm && is_stack(priv, vma, is_pid)) {
++ } else if (mm && is_stack(priv, vma)) {
+ seq_pad(m, ' ');
+ seq_printf(m, "[stack]");
+ }
--- /dev/null
+From b56af54ac78c54a519d82813836f305d7f76ef27 Mon Sep 17 00:00:00 2001
+From: Dennis Wassenberg <dennis.wassenberg@secunet.com>
+Date: Thu, 8 Mar 2018 15:32:09 -0800
+Subject: Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list
+
+From: Dennis Wassenberg <dennis.wassenberg@secunet.com>
+
+commit b56af54ac78c54a519d82813836f305d7f76ef27 upstream.
+
+Reset i8042 before probing because of insufficient BIOS initialisation of
+the i8042 serial controller. This makes Synaptics touchpad detection
+possible. Without resetting the Synaptics touchpad is not detected because
+there are always NACK messages from AUX port.
+
+Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -693,6 +693,13 @@ static const struct dmi_system_id __init
+ },
+ },
+ {
++ /* Lenovo ThinkPad L460 */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L460"),
++ },
++ },
++ {
+ /* Clevo P650RS, 650RP6, Sager NP8152-S, and others */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
--- /dev/null
+From 04bb1719c4de94700056241d4c0fe3c1413f5aff Mon Sep 17 00:00:00 2001
+From: Ondrej Zary <linux@rainbow-software.org>
+Date: Tue, 3 Apr 2018 10:24:34 -0700
+Subject: Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad
+
+From: Ondrej Zary <linux@rainbow-software.org>
+
+commit 04bb1719c4de94700056241d4c0fe3c1413f5aff upstream.
+
+The touch sensor buttons on Sony VAIO VGN-CS series laptops (e.g.
+VGN-CS31S) are a separate PS/2 device. As the MUX is disabled for all
+VAIO machines by the nomux blacklist, the data from touch sensor
+buttons and touchpad are combined. The protocol used by the buttons is
+probably similar to the touchpad protocol (both are Synaptics) so both
+devices get enabled. The controller combines the data, creating a mess
+which results in random button clicks, touchpad stopping working and
+lost sync error messages:
+psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 4
+psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
+psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
+psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
+psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
+psmouse serio1: issuing reconnect request
+
+Add a new i8042_dmi_forcemux_table whitelist with VGN-CS.
+With MUX enabled, touch sensor buttons are detected as separate device
+(and left disabled as there's currently no driver), fixing all touchpad
+problems.
+
+Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -530,6 +530,20 @@ static const struct dmi_system_id __init
+ { }
+ };
+
++static const struct dmi_system_id i8042_dmi_forcemux_table[] __initconst = {
++ {
++ /*
++ * Sony Vaio VGN-CS series require MUX or the touch sensor
++ * buttons will disturb touchpad operation
++ */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "VGN-CS"),
++ },
++ },
++ { }
++};
++
+ /*
+ * On some Asus laptops, just running self tests cause problems.
+ */
+@@ -1230,6 +1244,9 @@ static int __init i8042_platform_init(vo
+ if (dmi_check_system(i8042_dmi_nomux_table))
+ i8042_nomux = true;
+
++ if (dmi_check_system(i8042_dmi_forcemux_table))
++ i8042_nomux = false;
++
+ if (dmi_check_system(i8042_dmi_notimeout_table))
+ i8042_notimeout = true;
+
--- /dev/null
+From 6f287ca6046edd34ed83aafb7f9033c9c2e809e2 Mon Sep 17 00:00:00 2001
+From: Guoqing Jiang <gqjiang@suse.com>
+Date: Thu, 6 Apr 2017 09:12:18 +0800
+Subject: md/raid10: reset the 'first' at the end of loop
+
+From: Guoqing Jiang <gqjiang@suse.com>
+
+commit 6f287ca6046edd34ed83aafb7f9033c9c2e809e2 upstream.
+
+We need to set "first = 0' at the end of rdev_for_each
+loop, so we can get the array's min_offset_diff correctly
+otherwise min_offset_diff just means the last rdev's
+offset diff.
+
+[only the first chunk, due to b506335e5d2b ("md/raid10: skip spare disk as
+'first' disk") being already applied - gregkh]
+
+Suggested-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
+Reviewed-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Shaohua Li <shli@fb.com>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/raid10.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/md/raid10.c
++++ b/drivers/md/raid10.c
+@@ -3638,6 +3638,7 @@ static int run(struct mddev *mddev)
+
+ if (blk_queue_discard(bdev_get_queue(rdev->bdev)))
+ discard_supported = true;
++ first = 0;
+ }
+
+ if (mddev->queue) {
--- /dev/null
+From d61d263c8d82db7c4404a29ebc29674b1c0c05c9 Mon Sep 17 00:00:00 2001
+From: Matthias Brugger <matthias.bgg@gmail.com>
+Date: Thu, 15 Mar 2018 17:54:20 +0100
+Subject: net: hns: Fix ethtool private flags
+
+From: Matthias Brugger <matthias.bgg@gmail.com>
+
+commit d61d263c8d82db7c4404a29ebc29674b1c0c05c9 upstream.
+
+The driver implementation returns support for private flags, while
+no private flags are present. When asked for the number of private
+flags it returns the number of statistic flag names.
+
+Fix this by returning EOPNOTSUPP for not implemented ethtool flags.
+
+Signed-off-by: Matthias Brugger <mbrugger@suse.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 2 +-
+ drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 2 +-
+ drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 2 +-
+ drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 +++-
+ 4 files changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
++++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
+@@ -648,7 +648,7 @@ static void hns_gmac_get_strings(u32 str
+
+ static int hns_gmac_get_sset_count(int stringset)
+ {
+- if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
++ if (stringset == ETH_SS_STATS)
+ return ARRAY_SIZE(g_gmac_stats_string);
+
+ return 0;
+--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
++++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
+@@ -384,7 +384,7 @@ void hns_ppe_update_stats(struct hns_ppe
+
+ int hns_ppe_get_sset_count(int stringset)
+ {
+- if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
++ if (stringset == ETH_SS_STATS)
+ return ETH_PPE_STATIC_NUM;
+ return 0;
+ }
+--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
++++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+@@ -807,7 +807,7 @@ void hns_rcb_get_stats(struct hnae_queue
+ */
+ int hns_rcb_get_ring_sset_count(int stringset)
+ {
+- if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
++ if (stringset == ETH_SS_STATS)
+ return HNS_RING_STATIC_REG_NUM;
+
+ return 0;
+--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
++++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+@@ -1000,8 +1000,10 @@ int hns_get_sset_count(struct net_device
+ cnt--;
+
+ return cnt;
+- } else {
++ } else if (stringset == ETH_SS_STATS) {
+ return (HNS_NET_STATS_CNT + ops->get_sset_count(h, stringset));
++ } else {
++ return -EOPNOTSUPP;
+ }
+ }
+
--- /dev/null
+From 1d91c1d2c80cb70e2e553845e278b87a960c04da Mon Sep 17 00:00:00 2001
+From: Dan Williams <dan.j.williams@intel.com>
+Date: Fri, 16 Feb 2018 13:20:42 -0800
+Subject: nospec: Kill array_index_nospec_mask_check()
+
+From: Dan Williams <dan.j.williams@intel.com>
+
+commit 1d91c1d2c80cb70e2e553845e278b87a960c04da upstream.
+
+There are multiple problems with the dynamic sanity checking in
+array_index_nospec_mask_check():
+
+* It causes unnecessary overhead in the 32-bit case since integer sized
+ @index values will no longer cause the check to be compiled away like
+ in the 64-bit case.
+
+* In the 32-bit case it may trigger with user controllable input when
+ the expectation is that should only trigger during development of new
+ kernel enabling.
+
+* The macro reuses the input parameter in multiple locations which is
+ broken if someone passes an expression like 'index++' to
+ array_index_nospec().
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Cc: Andy Lutomirski <luto@kernel.org>
+Cc: Arjan van de Ven <arjan@linux.intel.com>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Dave Hansen <dave.hansen@linux.intel.com>
+Cc: David Woodhouse <dwmw2@infradead.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Josh Poimboeuf <jpoimboe@redhat.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Will Deacon <will.deacon@arm.com>
+Cc: linux-arch@vger.kernel.org
+Link: http://lkml.kernel.org/r/151881604278.17395.6605847763178076520.stgit@dwillia2-desk3.amr.corp.intel.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/nospec.h | 22 +---------------------
+ 1 file changed, 1 insertion(+), 21 deletions(-)
+
+--- a/include/linux/nospec.h
++++ b/include/linux/nospec.h
+@@ -31,26 +31,6 @@ static inline unsigned long array_index_
+ #endif
+
+ /*
+- * Warn developers about inappropriate array_index_nospec() usage.
+- *
+- * Even if the CPU speculates past the WARN_ONCE branch, the
+- * sign bit of @index is taken into account when generating the
+- * mask.
+- *
+- * This warning is compiled out when the compiler can infer that
+- * @index and @size are less than LONG_MAX.
+- */
+-#define array_index_mask_nospec_check(index, size) \
+-({ \
+- if (WARN_ONCE(index > LONG_MAX || size > LONG_MAX, \
+- "array_index_nospec() limited to range of [0, LONG_MAX]\n")) \
+- _mask = 0; \
+- else \
+- _mask = array_index_mask_nospec(index, size); \
+- _mask; \
+-})
+-
+-/*
+ * array_index_nospec - sanitize an array index after a bounds check
+ *
+ * For a code sequence like:
+@@ -68,7 +48,7 @@ static inline unsigned long array_index_
+ ({ \
+ typeof(index) _i = (index); \
+ typeof(size) _s = (size); \
+- unsigned long _mask = array_index_mask_nospec_check(_i, _s); \
++ unsigned long _mask = array_index_mask_nospec(_i, _s); \
+ \
+ BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
+ BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \
--- /dev/null
+From 8fa80c503b484ddc1abbd10c7cb2ab81f3824a50 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will.deacon@arm.com>
+Date: Mon, 5 Feb 2018 14:16:06 +0000
+Subject: nospec: Move array_index_nospec() parameter checking into separate macro
+
+From: Will Deacon <will.deacon@arm.com>
+
+commit 8fa80c503b484ddc1abbd10c7cb2ab81f3824a50 upstream.
+
+For architectures providing their own implementation of
+array_index_mask_nospec() in asm/barrier.h, attempting to use WARN_ONCE() to
+complain about out-of-range parameters using WARN_ON() results in a mess
+of mutually-dependent include files.
+
+Rather than unpick the dependencies, simply have the core code in nospec.h
+perform the checking for us.
+
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Acked-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Dan Williams <dan.j.williams@intel.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lkml.kernel.org/r/1517840166-15399-1-git-send-email-will.deacon@arm.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/nospec.h | 36 +++++++++++++++++++++---------------
+ 1 file changed, 21 insertions(+), 15 deletions(-)
+
+--- a/include/linux/nospec.h
++++ b/include/linux/nospec.h
+@@ -21,20 +21,6 @@ static inline unsigned long array_index_
+ unsigned long size)
+ {
+ /*
+- * Warn developers about inappropriate array_index_nospec() usage.
+- *
+- * Even if the CPU speculates past the WARN_ONCE branch, the
+- * sign bit of @index is taken into account when generating the
+- * mask.
+- *
+- * This warning is compiled out when the compiler can infer that
+- * @index and @size are less than LONG_MAX.
+- */
+- if (WARN_ONCE(index > LONG_MAX || size > LONG_MAX,
+- "array_index_nospec() limited to range of [0, LONG_MAX]\n"))
+- return 0;
+-
+- /*
+ * Always calculate and emit the mask even if the compiler
+ * thinks the mask is not needed. The compiler does not take
+ * into account the value of @index under speculation.
+@@ -45,6 +31,26 @@ static inline unsigned long array_index_
+ #endif
+
+ /*
++ * Warn developers about inappropriate array_index_nospec() usage.
++ *
++ * Even if the CPU speculates past the WARN_ONCE branch, the
++ * sign bit of @index is taken into account when generating the
++ * mask.
++ *
++ * This warning is compiled out when the compiler can infer that
++ * @index and @size are less than LONG_MAX.
++ */
++#define array_index_mask_nospec_check(index, size) \
++({ \
++ if (WARN_ONCE(index > LONG_MAX || size > LONG_MAX, \
++ "array_index_nospec() limited to range of [0, LONG_MAX]\n")) \
++ _mask = 0; \
++ else \
++ _mask = array_index_mask_nospec(index, size); \
++ _mask; \
++})
++
++/*
+ * array_index_nospec - sanitize an array index after a bounds check
+ *
+ * For a code sequence like:
+@@ -62,7 +68,7 @@ static inline unsigned long array_index_
+ ({ \
+ typeof(index) _i = (index); \
+ typeof(size) _s = (size); \
+- unsigned long _mask = array_index_mask_nospec(_i, _s); \
++ unsigned long _mask = array_index_mask_nospec_check(_i, _s); \
+ \
+ BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
+ BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \
parport_pc-add-support-for-wch-ch382l-pci-e-single-parallel-port-card.patch
crypto-ahash-fix-early-termination-in-hash-walk.patch
crypto-x86-cast5-avx-fix-ecb-encryption-when-long-sg-follows-short-one.patch
+fs-proc-stop-trying-to-report-thread-stacks.patch
+staging-comedi-ni_mio_common-ack-ai-fifo-error-interrupts.patch
+input-i8042-add-lenovo-thinkpad-l460-to-i8042-reset-list.patch
+input-i8042-enable-mux-on-sony-vaio-vgn-cs-series-to-fix-touchpad.patch
+vt-change-sgr-21-to-follow-the-standards.patch
+documentation-pinctrl-palmas-add-ti-palmas-powerhold-override-property-definition.patch
+arm-dts-dra7-add-power-hold-and-power-controller-properties-to-palmas.patch
+arm-dts-am57xx-beagle-x15-common-add-overide-powerhold-property.patch
+md-raid10-reset-the-first-at-the-end-of-loop.patch
+net-hns-fix-ethtool-private-flags.patch
+nospec-move-array_index_nospec-parameter-checking-into-separate-macro.patch
+nospec-kill-array_index_nospec_mask_check.patch
--- /dev/null
+From e1d9fc04c41840a4688ef6ce90b6dcca157ea4d7 Mon Sep 17 00:00:00 2001
+From: Frank Mori Hess <fmh6jj@gmail.com>
+Date: Thu, 15 Mar 2018 10:25:44 +0000
+Subject: staging: comedi: ni_mio_common: ack ai fifo error interrupts.
+
+From: Frank Mori Hess <fmh6jj@gmail.com>
+
+commit e1d9fc04c41840a4688ef6ce90b6dcca157ea4d7 upstream.
+
+Ack ai fifo error interrupts in interrupt handler to clear interrupt
+after fifo overflow. It should prevent lock-ups after the ai fifo
+overflows.
+
+Cc: <stable@vger.kernel.org> # v4.2+
+Signed-off-by: Frank Mori Hess <fmh6jj@gmail.com>
+Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/comedi/drivers/ni_mio_common.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/staging/comedi/drivers/ni_mio_common.c
++++ b/drivers/staging/comedi/drivers/ni_mio_common.c
+@@ -1348,6 +1348,8 @@ static void ack_a_interrupt(struct comed
+ ack |= NISTC_INTA_ACK_AI_START;
+ if (a_status & NISTC_AI_STATUS1_STOP)
+ ack |= NISTC_INTA_ACK_AI_STOP;
++ if (a_status & NISTC_AI_STATUS1_OVER)
++ ack |= NISTC_INTA_ACK_AI_ERR;
+ if (ack)
+ ni_stc_writew(dev, ack, NISTC_INTA_ACK_REG);
+ }
--- /dev/null
+From 65d9982d7e523a1a8e7c9af012da0d166f72fc56 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Mon, 29 Jan 2018 17:08:21 -0500
+Subject: vt: change SGR 21 to follow the standards
+
+From: Mike Frysinger <vapier@chromium.org>
+
+commit 65d9982d7e523a1a8e7c9af012da0d166f72fc56 upstream.
+
+ECMA-48 [1] (aka ISO 6429) has defined SGR 21 as "doubly underlined"
+since at least March 1984. The Linux kernel has treated it as SGR 22
+"normal intensity" since it was added in Linux-0.96b in June 1992.
+Before that, it was simply ignored. Other terminal emulators have
+either ignored it, or treat it as double underline now. xterm for
+example added support in its 304 release (May 2014) [2] where it was
+previously ignoring it.
+
+Changing this behavior shouldn't be an issue:
+- It isn't a named capability in ncurses's terminfo database, so no
+ script is using libtinfo/libcurses to look this up, or using tput
+ to query & output the right sequence.
+- Any script assuming SGR 21 will reset intensity in all terminals
+ already do not work correctly on non-Linux VTs (including running
+ under screen/tmux/etc...).
+- If someone has written a script that only runs in the Linux VT, and
+ they're using SGR 21 (instead of SGR 22), the output should still
+ be readable.
+
+imo it's important to change this as the Linux VT's non-conformance
+is sometimes used as an argument for other terminal emulators to not
+implement SGR 21 at all, or do so incorrectly.
+
+[1]: https://www.ecma-international.org/publications/standards/Ecma-048.htm
+[2]: https://github.com/ThomasDickey/xterm-snapshots/commit/2fd29cb98d214cb536bcafbee00bc73b3f1eeb9d
+
+Signed-off-by: Mike Frysinger <vapier@chromium.org>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/vt/vt.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/tty/vt/vt.c
++++ b/drivers/tty/vt/vt.c
+@@ -1312,6 +1312,11 @@ static void csi_m(struct vc_data *vc)
+ case 3:
+ vc->vc_italic = 1;
+ break;
++ case 21:
++ /*
++ * No console drivers support double underline, so
++ * convert it to a single underline.
++ */
+ case 4:
+ vc->vc_underline = 1;
+ break;
+@@ -1348,7 +1353,6 @@ static void csi_m(struct vc_data *vc)
+ vc->vc_disp_ctrl = 1;
+ vc->vc_toggle_meta = 1;
+ break;
+- case 21:
+ case 22:
+ vc->vc_intensity = 1;
+ break;