--- /dev/null
+From 7159a2a2bda0fa746d38e8c9ff4393cf7bd6ccb8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 26 Nov 2019 17:54:09 -0800
+Subject: arc: eznps: fix allmodconfig kconfig warning
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 1928b36cfa4df1aeedf5f2644d0c33f3a1fcfd7b ]
+
+Fix kconfig warning for arch/arc/plat-eznps/Kconfig allmodconfig:
+
+WARNING: unmet direct dependencies detected for CLKSRC_NPS
+ Depends on [n]: GENERIC_CLOCKEVENTS [=y] && !PHYS_ADDR_T_64BIT [=y]
+ Selected by [y]:
+ - ARC_PLAT_EZNPS [=y]
+
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: Vineet Gupta <vgupta@synopsys.com>
+Cc: Ofer Levi <oferle@mellanox.com>
+Cc: linux-snps-arc@lists.infradead.org
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arc/plat-eznps/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arc/plat-eznps/Kconfig b/arch/arc/plat-eznps/Kconfig
+index 8eff057efcaeb..ce908e2c52824 100644
+--- a/arch/arc/plat-eznps/Kconfig
++++ b/arch/arc/plat-eznps/Kconfig
+@@ -7,7 +7,7 @@
+ menuconfig ARC_PLAT_EZNPS
+ bool "\"EZchip\" ARC dev platform"
+ select CPU_BIG_ENDIAN
+- select CLKSRC_NPS
++ select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
+ select EZNPS_GIC
+ select EZCHIP_NPS_MANAGEMENT_ENET if ETHERNET
+ help
+--
+2.20.1
+
--- /dev/null
+From 51953718a5e95de172c0d0b1dee77d91f9b59797 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Oct 2019 14:12:38 +0100
+Subject: ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition
+
+From: Ben Dooks <ben.dooks@codethink.co.uk>
+
+[ Upstream commit 2079fe6ea8cbd2fb2fbadba911f1eca6c362eb9b ]
+
+The omap_sr_pdata is not declared but is exported, so add a
+define for it to fix the following warning:
+
+arch/arm/mach-omap2/pdata-quirks.c:609:36: warning: symbol 'omap_sr_pdata' was not declared. Should it be static?
+
+Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/power/smartreflex.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h
+index 7b81dad712de8..37d9b70ed8f0a 100644
+--- a/include/linux/power/smartreflex.h
++++ b/include/linux/power/smartreflex.h
+@@ -296,6 +296,9 @@ struct omap_sr_data {
+ struct voltagedomain *voltdm;
+ };
+
++
++extern struct omap_sr_data omap_sr_pdata[OMAP_SR_NR];
++
+ #ifdef CONFIG_POWER_AVS_OMAP
+
+ /* Smartreflex module enable/disable interface */
+--
+2.20.1
+
--- /dev/null
+From 17a8b9ad2c4c0fa0ccaaf65563f215c5c1af0f09 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 7 Jan 2020 21:43:59 +0100
+Subject: atm: eni: fix uninitialized variable warning
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+[ Upstream commit 30780d086a83332adcd9362281201cee7c3d9d19 ]
+
+With -O3, gcc has found an actual unintialized variable stored
+into an mmio register in two instances:
+
+drivers/atm/eni.c: In function 'discard':
+drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized]
+ writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4);
+ ^
+drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized]
+
+Change the code to always write zeroes instead.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/atm/eni.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
+index 6470e3c4c9907..7323e9210f4b1 100644
+--- a/drivers/atm/eni.c
++++ b/drivers/atm/eni.c
+@@ -372,7 +372,7 @@ static int do_rx_dma(struct atm_vcc *vcc,struct sk_buff *skb,
+ here = (eni_vcc->descr+skip) & (eni_vcc->words-1);
+ dma[j++] = (here << MID_DMA_COUNT_SHIFT) | (vcc->vci
+ << MID_DMA_VCI_SHIFT) | MID_DT_JK;
+- j++;
++ dma[j++] = 0;
+ }
+ here = (eni_vcc->descr+size+skip) & (eni_vcc->words-1);
+ if (!eff) size += skip;
+@@ -445,7 +445,7 @@ static int do_rx_dma(struct atm_vcc *vcc,struct sk_buff *skb,
+ if (size != eff) {
+ dma[j++] = (here << MID_DMA_COUNT_SHIFT) |
+ (vcc->vci << MID_DMA_VCI_SHIFT) | MID_DT_JK;
+- j++;
++ dma[j++] = 0;
+ }
+ if (!j || j > 2*RX_DMA_BUF) {
+ printk(KERN_CRIT DEV_LABEL "!j or j too big!!!\n");
+--
+2.20.1
+
--- /dev/null
+From 687486175cadf14c20a9b045f2289af94e78d06e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 19 Dec 2019 10:45:30 +0800
+Subject: drivers/hid/hid-multitouch.c: fix a possible null pointer access.
+
+From: Pan Zhang <zhangpan26@huawei.com>
+
+[ Upstream commit 306d5acbfc66e7cccb4d8f91fc857206b8df80d1 ]
+
+1002 if ((quirks & MT_QUIRK_IGNORE_DUPLICATES) && mt) {
+1003 struct input_mt_slot *i_slot = &mt->slots[slotnum];
+1004
+1005 if (input_mt_is_active(i_slot) &&
+1006 input_mt_is_used(mt, i_slot))
+1007 return -EAGAIN;
+1008 }
+
+We previously assumed 'mt' could be null (see line 1002).
+
+The following situation is similar, so add a judgement.
+
+Signed-off-by: Pan Zhang <zhangpan26@huawei.com>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-multitouch.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index 8403251992abb..19dfd8acd0dab 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -1007,7 +1007,7 @@ static int mt_process_slot(struct mt_device *td, struct input_dev *input,
+ tool = MT_TOOL_DIAL;
+ else if (unlikely(!confidence_state)) {
+ tool = MT_TOOL_PALM;
+- if (!active &&
++ if (!active && mt &&
+ input_mt_is_active(&mt->slots[slotnum])) {
+ /*
+ * The non-confidence was reported for
+--
+2.20.1
+
--- /dev/null
+From 902e18070d92b925485a0eaf22c38d385ad70a48 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 2 Jan 2020 13:27:06 -0800
+Subject: drivers/net/b44: Change to non-atomic bit operations on pwol_mask
+
+From: Fenghua Yu <fenghua.yu@intel.com>
+
+[ Upstream commit f11421ba4af706cb4f5703de34fa77fba8472776 ]
+
+Atomic operations that span cache lines are super-expensive on x86
+(not just to the current processor, but also to other processes as all
+memory operations are blocked until the operation completes). Upcoming
+x86 processors have a switch to cause such operations to generate a #AC
+trap. It is expected that some real time systems will enable this mode
+in BIOS.
+
+In preparation for this, it is necessary to fix code that may execute
+atomic instructions with operands that cross cachelines because the #AC
+trap will crash the kernel.
+
+Since "pwol_mask" is local and never exposed to concurrency, there is
+no need to set bits in pwol_mask using atomic operations.
+
+Directly operate on the byte which contains the bit instead of using
+__set_bit() to avoid any big endian concern due to type cast to
+unsigned long in __set_bit().
+
+Suggested-by: Peter Zijlstra <peterz@infradead.org>
+Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
+Signed-off-by: Tony Luck <tony.luck@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/broadcom/b44.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
+index e445ab724827f..88f8d31e4c833 100644
+--- a/drivers/net/ethernet/broadcom/b44.c
++++ b/drivers/net/ethernet/broadcom/b44.c
+@@ -1519,8 +1519,10 @@ static int b44_magic_pattern(u8 *macaddr, u8 *ppattern, u8 *pmask, int offset)
+ int ethaddr_bytes = ETH_ALEN;
+
+ memset(ppattern + offset, 0xff, magicsync);
+- for (j = 0; j < magicsync; j++)
+- set_bit(len++, (unsigned long *) pmask);
++ for (j = 0; j < magicsync; j++) {
++ pmask[len >> 3] |= BIT(len & 7);
++ len++;
++ }
+
+ for (j = 0; j < B44_MAX_PATTERNS; j++) {
+ if ((B44_PATTERN_SIZE - len) >= ETH_ALEN)
+@@ -1532,7 +1534,8 @@ static int b44_magic_pattern(u8 *macaddr, u8 *ppattern, u8 *pmask, int offset)
+ for (k = 0; k< ethaddr_bytes; k++) {
+ ppattern[offset + magicsync +
+ (j * ETH_ALEN) + k] = macaddr[k];
+- set_bit(len++, (unsigned long *) pmask);
++ pmask[len >> 3] |= BIT(len & 7);
++ len++;
+ }
+ }
+ return len - 1;
+--
+2.20.1
+
--- /dev/null
+From 03e3c058ef96e8486c63e7466c79fa802e71642a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 6 Jan 2020 04:51:54 +0300
+Subject: gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Dmitry Osipenko <digetx@gmail.com>
+
+[ Upstream commit c5706c7defc79de68a115b5536376298a8fef111 ]
+
+Driver fails to compile in a minimized kernel's configuration because of
+the missing dependency on GPIOLIB_IRQCHIP.
+
+ error: ‘struct gpio_chip’ has no member named ‘irq’
+ 44 | virq = irq_find_mapping(gpio->gpio_chip.irq.domain, offset);
+
+Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
+Link: https://lore.kernel.org/r/20200106015154.12040-1-digetx@gmail.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
+index ed51221621a5c..2c34e9537f9e4 100644
+--- a/drivers/gpio/Kconfig
++++ b/drivers/gpio/Kconfig
+@@ -1059,6 +1059,7 @@ config GPIO_MADERA
+ config GPIO_MAX77620
+ tristate "GPIO support for PMIC MAX77620 and MAX20024"
+ depends on MFD_MAX77620
++ select GPIOLIB_IRQCHIP
+ help
+ GPIO driver for MAX77620 and MAX20024 PMIC from Maxim Semiconductor.
+ MAX77620 PMIC has 8 pins that can be configured as GPIOs. The
+--
+2.20.1
+
--- /dev/null
+From 75f67406cb52fced90f7c48262d8a72ad7deaeee Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 27 Nov 2019 03:23:29 +0000
+Subject: HID: Add quirk for incorrect input length on Lenovo Y720
+
+From: Pavel Balan <admin@kryma.net>
+
+[ Upstream commit fd0913768701612fc2b8ab9c8a5c019133e8d978 ]
+
+Apply it to the Lenovo Y720 gaming laptop I2C peripheral then.
+
+This fixes dmesg being flooded with errors visible on un-suspend
+in Linux Mint 19 Cinnamon.
+
+Example of error log:
+
+<...>
+[ 4.326588] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4)
+[ 4.326845] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4)
+[ 4.327095] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4)
+[ 4.327341] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4)
+[ 4.327609] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4)
+<...>
+
+Example of fixed log (debug on)
+
+<...>
+[ 3731.333183] i2c_hid i2c-ITE33D1:00: input: 02 00
+[ 3731.333581] i2c_hid i2c-ITE33D1:00: input: 02 00
+[ 3731.333842] i2c_hid i2c-ITE33D1:00: input: 02 00
+[ 3731.334107] i2c_hid i2c-ITE33D1:00: input: 02 00
+[ 3731.334367] i2c_hid i2c-ITE33D1:00: input: 02 00
+<...>
+
+[jkosina@suse.cz: rebase onto more recent codebase]
+Signed-off-by: Pavel Balan <admin@kryma.net>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-ids.h | 1 +
+ drivers/hid/i2c-hid/i2c-hid-core.c | 16 +++++++++++++---
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
+index 03d65b6910673..f491092f36ff9 100644
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -620,6 +620,7 @@
+ #define USB_VENDOR_ID_ITE 0x048d
+ #define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386
+ #define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350
++#define I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720 0x837a
+ #define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396
+ #define USB_DEVICE_ID_ITE8595 0x8595
+
+diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
+index 0a39e444e3080..f2c8c59fc5823 100644
+--- a/drivers/hid/i2c-hid/i2c-hid-core.c
++++ b/drivers/hid/i2c-hid/i2c-hid-core.c
+@@ -52,6 +52,8 @@
+ #define I2C_HID_QUIRK_DELAY_AFTER_SLEEP BIT(3)
+ #define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
+ #define I2C_HID_QUIRK_RESET_ON_RESUME BIT(5)
++#define I2C_HID_QUIRK_BAD_INPUT_SIZE BIT(6)
++
+
+ /* flags */
+ #define I2C_HID_STARTED 0
+@@ -185,6 +187,8 @@ static const struct i2c_hid_quirks {
+ I2C_HID_QUIRK_BOGUS_IRQ },
+ { USB_VENDOR_ID_ALPS_JP, HID_ANY_ID,
+ I2C_HID_QUIRK_RESET_ON_RESUME },
++ { USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720,
++ I2C_HID_QUIRK_BAD_INPUT_SIZE },
+ { 0, 0 }
+ };
+
+@@ -516,9 +520,15 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
+ }
+
+ if ((ret_size > size) || (ret_size < 2)) {
+- dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
+- __func__, size, ret_size);
+- return;
++ if (ihid->quirks & I2C_HID_QUIRK_BAD_INPUT_SIZE) {
++ ihid->inbuf[0] = size & 0xff;
++ ihid->inbuf[1] = size >> 8;
++ ret_size = size;
++ } else {
++ dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
++ __func__, size, ret_size);
++ return;
++ }
+ }
+
+ i2c_hid_dbg(ihid, "input: %*ph\n", ret_size, ihid->inbuf);
+--
+2.20.1
+
--- /dev/null
+From 67eb065c8698210d260b1728058f1c2d8f0f6d83 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 1 Dec 2019 00:22:09 +0200
+Subject: HID: Add quirk for Xin-Mo Dual Controller
+
+From: Priit Laes <plaes@plaes.org>
+
+[ Upstream commit c62f7cd8ed066a93a243643ebf57ca99f754388e ]
+
+Without the quirk, joystick shows up as single controller
+for both first and second player pads/pins.
+
+Signed-off-by: Priit Laes <plaes@plaes.org>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-quirks.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
+index 57d6fe9ed4163..b9529bed4d763 100644
+--- a/drivers/hid/hid-quirks.c
++++ b/drivers/hid/hid-quirks.c
+@@ -175,6 +175,7 @@ static const struct hid_device_id hid_quirks[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT },
+ { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
+ { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
++ { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
+
+ { 0 }
+ };
+--
+2.20.1
+
--- /dev/null
+From db24269e238271401eb94ef3471157f221da40ff Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 19 Nov 2019 15:57:11 +0100
+Subject: HID: ite: Add USB id match for Acer SW5-012 keyboard dock
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 8f18eca9ebc57d6b150237033f6439242907e0ba ]
+
+The Acer SW5-012 2-in-1 keyboard dock uses a Synaptics S91028 touchpad
+which is connected to an ITE 8595 USB keyboard controller chip.
+
+This keyboard has the same quirk for its rfkill / airplane mode hotkey as
+other keyboards with the ITE 8595 chip, it only sends a single release
+event when pressed and released, it never sends a press event.
+
+This commit adds this keyboards USB id to the hid-ite id-table, fixing
+the rfkill key not working on this keyboard.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-ids.h | 1 +
+ drivers/hid/hid-ite.c | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
+index ee243bf8cc3df..03d65b6910673 100644
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -1075,6 +1075,7 @@
+ #define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10
+ #define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3
+ #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3
++#define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012 0x2968
+ #define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710
+
+ #define USB_VENDOR_ID_TEXAS_INSTRUMENTS 0x2047
+diff --git a/drivers/hid/hid-ite.c b/drivers/hid/hid-ite.c
+index 98b059d79bc89..2ce1eb0c92125 100644
+--- a/drivers/hid/hid-ite.c
++++ b/drivers/hid/hid-ite.c
+@@ -43,6 +43,9 @@ static int ite_event(struct hid_device *hdev, struct hid_field *field,
+ static const struct hid_device_id ite_devices[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_258A, USB_DEVICE_ID_258A_6A88) },
++ /* ITE8595 USB kbd ctlr, with Synaptics touchpad connected to it. */
++ { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS,
++ USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) },
+ { }
+ };
+ MODULE_DEVICE_TABLE(hid, ite_devices);
+--
+2.20.1
+
--- /dev/null
+From f78e4b6d205667742c8b3877ded542daec3fc706 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 4 Dec 2019 20:42:07 +0800
+Subject: HID: multitouch: Add LG MELF0410 I2C touchscreen support
+
+From: Aaron Ma <aaron.ma@canonical.com>
+
+[ Upstream commit 348b80b273fbf4ce2a307f9e38eadecf37828cad ]
+
+Add multitouch support for LG MELF I2C touchscreen.
+Apply the same workaround as LG USB touchscreen.
+
+Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-ids.h | 1 +
+ drivers/hid/hid-multitouch.c | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
+index 1949d6fca53e5..ee243bf8cc3df 100644
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -717,6 +717,7 @@
+ #define USB_DEVICE_ID_LG_MULTITOUCH 0x0064
+ #define USB_DEVICE_ID_LG_MELFAS_MT 0x6007
+ #define I2C_DEVICE_ID_LG_8001 0x8001
++#define I2C_DEVICE_ID_LG_7010 0x7010
+
+ #define USB_VENDOR_ID_LOGITECH 0x046d
+ #define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index f9167d0e095ce..8403251992abb 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -1972,6 +1972,9 @@ static const struct hid_device_id mt_devices[] = {
+ { .driver_data = MT_CLS_LG,
+ HID_USB_DEVICE(USB_VENDOR_ID_LG,
+ USB_DEVICE_ID_LG_MELFAS_MT) },
++ { .driver_data = MT_CLS_LG,
++ HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
++ USB_VENDOR_ID_LG, I2C_DEVICE_ID_LG_7010) },
+
+ /* MosArt panels */
+ { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
+--
+2.20.1
+
--- /dev/null
+From a5313e71f7e71229f4c9801f769391e1ad59c25c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 7 Jan 2020 20:48:13 +0100
+Subject: HID: steam: Fix input device disappearing
+
+From: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
+
+[ Upstream commit 20eee6e5af35d9586774e80b6e0b1850e7cc9899 ]
+
+The `connected` value for wired devices was not properly initialized,
+it must be set to `true` upon creation, because wired devices do not
+generate connection events.
+
+When a raw client (the Steam Client) uses the device, the input device
+is destroyed. Then, when the raw client finishes, it must be recreated.
+But since the `connected` variable was false this never happended.
+
+Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-steam.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
+index 8dae0f9b819e0..6286204d4c560 100644
+--- a/drivers/hid/hid-steam.c
++++ b/drivers/hid/hid-steam.c
+@@ -768,8 +768,12 @@ static int steam_probe(struct hid_device *hdev,
+
+ if (steam->quirks & STEAM_QUIRK_WIRELESS) {
+ hid_info(hdev, "Steam wireless receiver connected");
++ /* If using a wireless adaptor ask for connection status */
++ steam->connected = false;
+ steam_request_conn_status(steam);
+ } else {
++ /* A wired connection is always present */
++ steam->connected = true;
+ ret = steam_register(steam);
+ if (ret) {
+ hid_err(hdev,
+--
+2.20.1
+
--- /dev/null
+From 94bbcd69b09d7e9dff02d604a32b98b475e5a3e2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 22 Oct 2019 16:01:21 -0600
+Subject: iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping
+
+From: Logan Gunthorpe <logang@deltatee.com>
+
+[ Upstream commit 3c124435e8dd516df4b2fc983f4415386fd6edae ]
+
+Non-Transparent Bridge (NTB) devices (among others) may have many DMA
+aliases seeing the hardware will send requests with different device ids
+depending on their origin across the bridged hardware.
+
+See commit ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec
+NTB") for more information on this.
+
+The AMD IOMMU IRQ remapping functionality ignores all PCI aliases for
+IRQs so if devices send an interrupt from one of their aliases they
+will be blocked on AMD hardware with the IOMMU enabled.
+
+To fix this, ensure IRQ remapping is enabled for all aliases with
+MSI interrupts.
+
+This is analogous to the functionality added to the Intel IRQ remapping
+code in commit 3f0c625c6ae7 ("iommu/vt-d: Allow interrupts from the entire
+bus for aliased devices")
+
+Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
+Signed-off-by: Joerg Roedel <jroedel@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/iommu/amd_iommu.c | 37 ++++++++++++++++++++++++++++++-------
+ 1 file changed, 30 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
+index bea19aa337587..0783f44e9afe5 100644
+--- a/drivers/iommu/amd_iommu.c
++++ b/drivers/iommu/amd_iommu.c
+@@ -3709,7 +3709,20 @@ static void set_remap_table_entry(struct amd_iommu *iommu, u16 devid,
+ iommu_flush_dte(iommu, devid);
+ }
+
+-static struct irq_remap_table *alloc_irq_table(u16 devid)
++static int set_remap_table_entry_alias(struct pci_dev *pdev, u16 alias,
++ void *data)
++{
++ struct irq_remap_table *table = data;
++
++ irq_lookup_table[alias] = table;
++ set_dte_irq_entry(alias, table);
++
++ iommu_flush_dte(amd_iommu_rlookup_table[alias], alias);
++
++ return 0;
++}
++
++static struct irq_remap_table *alloc_irq_table(u16 devid, struct pci_dev *pdev)
+ {
+ struct irq_remap_table *table = NULL;
+ struct irq_remap_table *new_table = NULL;
+@@ -3755,7 +3768,12 @@ static struct irq_remap_table *alloc_irq_table(u16 devid)
+ table = new_table;
+ new_table = NULL;
+
+- set_remap_table_entry(iommu, devid, table);
++ if (pdev)
++ pci_for_each_dma_alias(pdev, set_remap_table_entry_alias,
++ table);
++ else
++ set_remap_table_entry(iommu, devid, table);
++
+ if (devid != alias)
+ set_remap_table_entry(iommu, alias, table);
+
+@@ -3772,7 +3790,8 @@ out_unlock:
+ return table;
+ }
+
+-static int alloc_irq_index(u16 devid, int count, bool align)
++static int alloc_irq_index(u16 devid, int count, bool align,
++ struct pci_dev *pdev)
+ {
+ struct irq_remap_table *table;
+ int index, c, alignment = 1;
+@@ -3782,7 +3801,7 @@ static int alloc_irq_index(u16 devid, int count, bool align)
+ if (!iommu)
+ return -ENODEV;
+
+- table = alloc_irq_table(devid);
++ table = alloc_irq_table(devid, pdev);
+ if (!table)
+ return -ENODEV;
+
+@@ -4215,7 +4234,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
+ struct irq_remap_table *table;
+ struct amd_iommu *iommu;
+
+- table = alloc_irq_table(devid);
++ table = alloc_irq_table(devid, NULL);
+ if (table) {
+ if (!table->min_index) {
+ /*
+@@ -4232,11 +4251,15 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
+ } else {
+ index = -ENOMEM;
+ }
+- } else {
++ } else if (info->type == X86_IRQ_ALLOC_TYPE_MSI ||
++ info->type == X86_IRQ_ALLOC_TYPE_MSIX) {
+ bool align = (info->type == X86_IRQ_ALLOC_TYPE_MSI);
+
+- index = alloc_irq_index(devid, nr_irqs, align);
++ index = alloc_irq_index(devid, nr_irqs, align, info->msi_dev);
++ } else {
++ index = alloc_irq_index(devid, nr_irqs, false, NULL);
+ }
++
+ if (index < 0) {
+ pr_warn("Failed to allocate IRTE\n");
+ ret = index;
+--
+2.20.1
+
--- /dev/null
+From e128418e9a9074747a15b35950189ac9a941ed73 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 4 Jan 2020 15:31:43 +0100
+Subject: net: wan: sdla: Fix cast from pointer to integer of different size
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Krzysztof Kozlowski <krzk@kernel.org>
+
+[ Upstream commit 00c0688cecadbf7ac2f5b4cdb36d912a2d3f0cca ]
+
+Since net_device.mem_start is unsigned long, it should not be cast to
+int right before casting to pointer. This fixes warning (compile
+testing on alpha architecture):
+
+ drivers/net/wan/sdla.c: In function ‘sdla_transmit’:
+ drivers/net/wan/sdla.c:711:13: warning:
+ cast to pointer from integer of different size [-Wint-to-pointer-cast]
+
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wan/sdla.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
+index 57ed259c8208d..09fde60a5f9de 100644
+--- a/drivers/net/wan/sdla.c
++++ b/drivers/net/wan/sdla.c
+@@ -711,7 +711,7 @@ static netdev_tx_t sdla_transmit(struct sk_buff *skb,
+
+ spin_lock_irqsave(&sdla_lock, flags);
+ SDLA_WINDOW(dev, addr);
+- pbuf = (void *)(((int) dev->mem_start) + (addr & SDLA_ADDR_MASK));
++ pbuf = (void *)(dev->mem_start + (addr & SDLA_ADDR_MASK));
+ __sdla_write(dev, pbuf->buf_addr, skb->data, skb->len);
+ SDLA_WINDOW(dev, addr);
+ pbuf->opp_flag = 1;
+--
+2.20.1
+
--- /dev/null
+From 13729d41957de136721856b630b028edb107ddb6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 17 Sep 2019 09:20:48 +0000
+Subject: PCI: Add DMA alias quirk for Intel VCA NTB
+
+From: Slawomir Pawlowski <slawomir.pawlowski@intel.com>
+
+[ Upstream commit 56b4cd4b7da9ee95778eb5c8abea49f641ebfd91 ]
+
+Intel Visual Compute Accelerator (VCA) is a family of PCIe add-in devices
+exposing computational units via Non Transparent Bridges (NTB, PEX 87xx).
+
+Similarly to MIC x200, we need to add DMA aliases to allow buffer access
+when IOMMU is enabled.
+
+Add aliases to allow computational unit access to host memory. These
+aliases mark the whole VCA device as one IOMMU group.
+
+All possible slot numbers (0x20) are used, since we are unable to tell what
+slot is used on other side. This quirk is intended for both host and
+computational unit sides. The VCA devices have up to five functions: four
+for DMA channels and one additional.
+
+Link: https://lore.kernel.org/r/5683A335CC8BE1438C3C30C49DCC38DF637CED8E@IRSMSX102.ger.corp.intel.com
+Signed-off-by: Slawomir Pawlowski <slawomir.pawlowski@intel.com>
+Signed-off-by: Przemek Kitszel <przemyslawx.kitszel@intel.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
+index 36f8eb9f24a73..5b4c36ab15962 100644
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -3986,6 +3986,40 @@ static void quirk_mic_x200_dma_alias(struct pci_dev *pdev)
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2260, quirk_mic_x200_dma_alias);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2264, quirk_mic_x200_dma_alias);
+
++/*
++ * Intel Visual Compute Accelerator (VCA) is a family of PCIe add-in devices
++ * exposing computational units via Non Transparent Bridges (NTB, PEX 87xx).
++ *
++ * Similarly to MIC x200, we need to add DMA aliases to allow buffer access
++ * when IOMMU is enabled. These aliases allow computational unit access to
++ * host memory. These aliases mark the whole VCA device as one IOMMU
++ * group.
++ *
++ * All possible slot numbers (0x20) are used, since we are unable to tell
++ * what slot is used on other side. This quirk is intended for both host
++ * and computational unit sides. The VCA devices have up to five functions
++ * (four for DMA channels and one additional).
++ */
++static void quirk_pex_vca_alias(struct pci_dev *pdev)
++{
++ const unsigned int num_pci_slots = 0x20;
++ unsigned int slot;
++
++ for (slot = 0; slot < num_pci_slots; slot++) {
++ pci_add_dma_alias(pdev, PCI_DEVFN(slot, 0x0));
++ pci_add_dma_alias(pdev, PCI_DEVFN(slot, 0x1));
++ pci_add_dma_alias(pdev, PCI_DEVFN(slot, 0x2));
++ pci_add_dma_alias(pdev, PCI_DEVFN(slot, 0x3));
++ pci_add_dma_alias(pdev, PCI_DEVFN(slot, 0x4));
++ }
++}
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2954, quirk_pex_vca_alias);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2955, quirk_pex_vca_alias);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2956, quirk_pex_vca_alias);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2958, quirk_pex_vca_alias);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2959, quirk_pex_vca_alias);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x295A, quirk_pex_vca_alias);
++
+ /*
+ * The IOMMU and interrupt controller on Broadcom Vulcan/Cavium ThunderX2 are
+ * associated not at the root bus, but at a bridge below. This quirk avoids
+--
+2.20.1
+
--- /dev/null
+From d7bc3c805d8ee4455bdf0df66a2786d0f235c99d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 22 Dec 2019 10:17:02 -0800
+Subject: phy: cpcap-usb: Prevent USB line glitches from waking up modem
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit 63078b6ba09e842f09df052c5728857389fddcd2 ]
+
+The micro-USB connector on Motorola Mapphone devices can be muxed between
+the SoC and the mdm6600 modem. But even when used for the SoC, configuring
+the PHY with ID pin grounded will wake up the modem from idle state. Looks
+like the issue is probably caused by line glitches.
+
+We can prevent the glitches by using a previously unknown mode of the
+GPIO mux to prevent the USB lines from being connected to the moden while
+configuring the USB PHY, and enable the USB lines after configuring the
+PHY.
+
+Note that this only prevents waking up mdm6600 as regular USB A-host mode,
+and does not help when connected to a lapdock. The lapdock specific issue
+still needs to be debugged separately.
+
+Cc: Merlijn Wajer <merlijn@wizzup.org>
+Cc: Pavel Machek <pavel@ucw.cz>
+Cc: Sebastian Reichel <sre@kernel.org>
+Acked-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/phy/motorola/phy-cpcap-usb.c | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
+index 4ba3634009afc..593c77dbde2eb 100644
+--- a/drivers/phy/motorola/phy-cpcap-usb.c
++++ b/drivers/phy/motorola/phy-cpcap-usb.c
+@@ -115,7 +115,7 @@ struct cpcap_usb_ints_state {
+ enum cpcap_gpio_mode {
+ CPCAP_DM_DP,
+ CPCAP_MDM_RX_TX,
+- CPCAP_UNKNOWN,
++ CPCAP_UNKNOWN_DISABLED, /* Seems to disable USB lines */
+ CPCAP_OTG_DM_DP,
+ };
+
+@@ -379,7 +379,8 @@ static int cpcap_usb_set_uart_mode(struct cpcap_phy_ddata *ddata)
+ {
+ int error;
+
+- error = cpcap_usb_gpio_set_mode(ddata, CPCAP_DM_DP);
++ /* Disable lines to prevent glitches from waking up mdm6600 */
++ error = cpcap_usb_gpio_set_mode(ddata, CPCAP_UNKNOWN_DISABLED);
+ if (error)
+ goto out_err;
+
+@@ -406,6 +407,11 @@ static int cpcap_usb_set_uart_mode(struct cpcap_phy_ddata *ddata)
+ if (error)
+ goto out_err;
+
++ /* Enable UART mode */
++ error = cpcap_usb_gpio_set_mode(ddata, CPCAP_DM_DP);
++ if (error)
++ goto out_err;
++
+ return 0;
+
+ out_err:
+@@ -418,7 +424,8 @@ static int cpcap_usb_set_usb_mode(struct cpcap_phy_ddata *ddata)
+ {
+ int error;
+
+- error = cpcap_usb_gpio_set_mode(ddata, CPCAP_OTG_DM_DP);
++ /* Disable lines to prevent glitches from waking up mdm6600 */
++ error = cpcap_usb_gpio_set_mode(ddata, CPCAP_UNKNOWN_DISABLED);
+ if (error)
+ return error;
+
+@@ -458,6 +465,11 @@ static int cpcap_usb_set_usb_mode(struct cpcap_phy_ddata *ddata)
+ if (error)
+ goto out_err;
+
++ /* Enable USB mode */
++ error = cpcap_usb_gpio_set_mode(ddata, CPCAP_OTG_DM_DP);
++ if (error)
++ goto out_err;
++
+ return 0;
+
+ out_err:
+--
+2.20.1
+
--- /dev/null
+From 6c9b767113bdd31ecb8c233a925afab1ca938656 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 20 Dec 2019 15:47:15 +0530
+Subject: phy: qcom-qmp: Increase PHY ready timeout
+
+From: Bjorn Andersson <bjorn.andersson@linaro.org>
+
+[ Upstream commit cd217ee6867d285ceecd610fa1006975d5c683fa ]
+
+It's typical for the QHP PHY to take slightly above 1ms to initialize,
+so increase the timeout of the PHY ready check to 10ms - as already done
+in the downstream PCIe driver.
+
+Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Tested-by: Evan Green <evgreen@chromium.org>
+Tested-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
+index 4c470104a0d61..cf515928fed09 100644
+--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
++++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
+@@ -66,7 +66,7 @@
+ /* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */
+ #define CLAMP_EN BIT(0) /* enables i/o clamp_n */
+
+-#define PHY_INIT_COMPLETE_TIMEOUT 1000
++#define PHY_INIT_COMPLETE_TIMEOUT 10000
+ #define POWER_DOWN_DELAY_US_MIN 10
+ #define POWER_DOWN_DELAY_US_MAX 11
+
+--
+2.20.1
+
--- /dev/null
+From c83ddb78ae807e589758ffae7c043f8cb24b6a31 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 27 Sep 2019 23:19:03 +0200
+Subject: platform/x86: dell-laptop: disable kbd backlight on Inspiron 10xx
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pacien TRAN-GIRARD <pacien.trangirard@pacien.net>
+
+[ Upstream commit 10b65e2915b2fcc606d173e98a972850101fb4c4 ]
+
+This patch adds a quirk disabling keyboard backlight support for the
+Dell Inspiron 1012 and 1018.
+
+Those models wrongly report supporting keyboard backlight control
+features (through SMBIOS tokens) even though they're not equipped with
+a backlit keyboard. This led to broken controls being exposed
+through sysfs by this driver which froze the system when used.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107651
+Signed-off-by: Pacien TRAN-GIRARD <pacien.trangirard@pacien.net>
+Reviewed-by: Mario Limonciello <mario.limonciello@dell.com>
+Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/dell-laptop.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
+index 3433986d52200..949dbc8aab413 100644
+--- a/drivers/platform/x86/dell-laptop.c
++++ b/drivers/platform/x86/dell-laptop.c
+@@ -37,6 +37,7 @@
+
+ struct quirk_entry {
+ bool touchpad_led;
++ bool kbd_led_not_present;
+ bool kbd_led_levels_off_1;
+ bool kbd_missing_ac_tag;
+
+@@ -77,6 +78,10 @@ static struct quirk_entry quirk_dell_latitude_e6410 = {
+ .kbd_led_levels_off_1 = true,
+ };
+
++static struct quirk_entry quirk_dell_inspiron_1012 = {
++ .kbd_led_not_present = true,
++};
++
+ static struct platform_driver platform_driver = {
+ .driver = {
+ .name = "dell-laptop",
+@@ -314,6 +319,24 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
+ },
+ .driver_data = &quirk_dell_latitude_e6410,
+ },
++ {
++ .callback = dmi_matched,
++ .ident = "Dell Inspiron 1012",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
++ },
++ .driver_data = &quirk_dell_inspiron_1012,
++ },
++ {
++ .callback = dmi_matched,
++ .ident = "Dell Inspiron 1018",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1018"),
++ },
++ .driver_data = &quirk_dell_inspiron_1012,
++ },
+ { }
+ };
+
+@@ -1497,6 +1520,9 @@ static void kbd_init(void)
+ {
+ int ret;
+
++ if (quirks && quirks->kbd_led_not_present)
++ return;
++
+ ret = kbd_init_info();
+ kbd_init_tokens();
+
+--
+2.20.1
+
zd1211rw-fix-storage-endpoint-lookup.patch
net_sched-ematch-reject-invalid-tcf_em_simple.patch
net_sched-fix-ops-bind_class-implementations.patch
+hid-multitouch-add-lg-melf0410-i2c-touchscreen-suppo.patch
+arc-eznps-fix-allmodconfig-kconfig-warning.patch
+hid-add-quirk-for-xin-mo-dual-controller.patch
+hid-ite-add-usb-id-match-for-acer-sw5-012-keyboard-d.patch
+hid-add-quirk-for-incorrect-input-length-on-lenovo-y.patch
+drivers-hid-hid-multitouch.c-fix-a-possible-null-poi.patch
+phy-qcom-qmp-increase-phy-ready-timeout.patch
+phy-cpcap-usb-prevent-usb-line-glitches-from-waking-.patch
+watchdog-max77620_wdt-fix-potential-build-errors.patch
+watchdog-rn5t618_wdt-fix-module-aliases.patch
+spi-spi-dw-add-lock-protect-dw_spi-rx-tx-to-prevent-.patch
+drivers-net-b44-change-to-non-atomic-bit-operations-.patch
+net-wan-sdla-fix-cast-from-pointer-to-integer-of-dif.patch
+gpio-max77620-add-missing-dependency-on-gpiolib_irqc.patch
+atm-eni-fix-uninitialized-variable-warning.patch
+hid-steam-fix-input-device-disappearing.patch
+platform-x86-dell-laptop-disable-kbd-backlight-on-in.patch
+pci-add-dma-alias-quirk-for-intel-vca-ntb.patch
+iommu-amd-support-multiple-pci-dma-aliases-in-irq-re.patch
+arm-omap2-smartreflex-add-omap_sr_pdata-definition.patch
+usb-storage-disable-uas-on-jmicron-sata-enclosure.patch
--- /dev/null
+From 234ed940b9f6fda537e3a204a56ccfe9a89bcf87 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 1 Jan 2020 11:39:41 +0800
+Subject: spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent
+ calls
+
+From: wuxu.wu <wuxu.wu@huawei.com>
+
+[ Upstream commit 19b61392c5a852b4e8a0bf35aecb969983c5932d ]
+
+dw_spi_irq() and dw_spi_transfer_one concurrent calls.
+
+I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null,
+dw->len==4, and dw->tx_end==1.
+
+When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one
+may concurrent visit dw_spi, so I think dw_spi structure lack of protection.
+
+Otherwise dw_spi_transfer_one set dw rx/tx buffer and then open irq,
+store dw rx/tx instructions and other cores handle irq load dw rx/tx
+instructions may out of order.
+
+ [ 1025.321302] Call trace:
+ ...
+ [ 1025.321319] __crash_kexec+0x98/0x148
+ [ 1025.321323] panic+0x17c/0x314
+ [ 1025.321329] die+0x29c/0x2e8
+ [ 1025.321334] die_kernel_fault+0x68/0x78
+ [ 1025.321337] __do_kernel_fault+0x90/0xb0
+ [ 1025.321346] do_page_fault+0x88/0x500
+ [ 1025.321347] do_translation_fault+0xa8/0xb8
+ [ 1025.321349] do_mem_abort+0x68/0x118
+ [ 1025.321351] el1_da+0x20/0x8c
+ [ 1025.321362] dw_writer+0xc8/0xd0
+ [ 1025.321364] interrupt_transfer+0x60/0x110
+ [ 1025.321365] dw_spi_irq+0x48/0x70
+ ...
+
+Signed-off-by: wuxu.wu <wuxu.wu@huawei.com>
+Link: https://lore.kernel.org/r/1577849981-31489-1-git-send-email-wuxu.wu@huawei.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-dw.c | 15 ++++++++++++---
+ drivers/spi/spi-dw.h | 1 +
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
+index ac2eb89ef7a5a..5a47e28e38c16 100644
+--- a/drivers/spi/spi-dw.c
++++ b/drivers/spi/spi-dw.c
+@@ -179,9 +179,11 @@ static inline u32 rx_max(struct dw_spi *dws)
+
+ static void dw_writer(struct dw_spi *dws)
+ {
+- u32 max = tx_max(dws);
++ u32 max;
+ u16 txw = 0;
+
++ spin_lock(&dws->buf_lock);
++ max = tx_max(dws);
+ while (max--) {
+ /* Set the tx word if the transfer's original "tx" is not null */
+ if (dws->tx_end - dws->len) {
+@@ -193,13 +195,16 @@ static void dw_writer(struct dw_spi *dws)
+ dw_write_io_reg(dws, DW_SPI_DR, txw);
+ dws->tx += dws->n_bytes;
+ }
++ spin_unlock(&dws->buf_lock);
+ }
+
+ static void dw_reader(struct dw_spi *dws)
+ {
+- u32 max = rx_max(dws);
++ u32 max;
+ u16 rxw;
+
++ spin_lock(&dws->buf_lock);
++ max = rx_max(dws);
+ while (max--) {
+ rxw = dw_read_io_reg(dws, DW_SPI_DR);
+ /* Care rx only if the transfer's original "rx" is not null */
+@@ -211,6 +216,7 @@ static void dw_reader(struct dw_spi *dws)
+ }
+ dws->rx += dws->n_bytes;
+ }
++ spin_unlock(&dws->buf_lock);
+ }
+
+ static void int_error_stop(struct dw_spi *dws, const char *msg)
+@@ -283,18 +289,20 @@ static int dw_spi_transfer_one(struct spi_controller *master,
+ {
+ struct dw_spi *dws = spi_controller_get_devdata(master);
+ struct chip_data *chip = spi_get_ctldata(spi);
++ unsigned long flags;
+ u8 imask = 0;
+ u16 txlevel = 0;
+ u32 cr0;
+ int ret;
+
+ dws->dma_mapped = 0;
+-
++ spin_lock_irqsave(&dws->buf_lock, flags);
+ dws->tx = (void *)transfer->tx_buf;
+ dws->tx_end = dws->tx + transfer->len;
+ dws->rx = transfer->rx_buf;
+ dws->rx_end = dws->rx + transfer->len;
+ dws->len = transfer->len;
++ spin_unlock_irqrestore(&dws->buf_lock, flags);
+
+ spi_enable_chip(dws, 0);
+
+@@ -485,6 +493,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
+ dws->type = SSI_MOTO_SPI;
+ dws->dma_inited = 0;
+ dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR);
++ spin_lock_init(&dws->buf_lock);
+
+ spi_controller_set_devdata(master, dws);
+
+diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
+index 0168b08364d5d..20a09fe79ae7d 100644
+--- a/drivers/spi/spi-dw.h
++++ b/drivers/spi/spi-dw.h
+@@ -118,6 +118,7 @@ struct dw_spi {
+ size_t len;
+ void *tx;
+ void *tx_end;
++ spinlock_t buf_lock;
+ void *rx;
+ void *rx_end;
+ int dma_mapped;
+--
+2.20.1
+
--- /dev/null
+From 16b1dd8a96240a387067a03ab0f3047bcc603d76 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 8 Sep 2015 09:53:38 -0700
+Subject: usb-storage: Disable UAS on JMicron SATA enclosure
+
+From: Laura Abbott <labbott@fedoraproject.org>
+
+[ Upstream commit bc3bdb12bbb3492067c8719011576370e959a2e6 ]
+
+Steve Ellis reported incorrect block sizes and alignement
+offsets with a SATA enclosure. Adding a quirk to disable
+UAS fixes the problems.
+
+Reported-by: Steven Ellis <sellis@redhat.com>
+Cc: Pacho Ramos <pachoramos@gmail.com>
+Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/usb/storage/unusual_uas.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
+index d0bdebd87ce3a..1b23741036ee8 100644
+--- a/drivers/usb/storage/unusual_uas.h
++++ b/drivers/usb/storage/unusual_uas.h
+@@ -87,12 +87,15 @@ UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999,
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ US_FL_IGNORE_UAS),
+
+-/* Reported-by: Takeo Nakayama <javhera@gmx.com> */
++/*
++ * Initially Reported-by: Takeo Nakayama <javhera@gmx.com>
++ * UAS Ignore Reported by Steven Ellis <sellis@redhat.com>
++ */
+ UNUSUAL_DEV(0x357d, 0x7788, 0x0000, 0x9999,
+ "JMicron",
+ "JMS566",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+- US_FL_NO_REPORT_OPCODES),
++ US_FL_NO_REPORT_OPCODES | US_FL_IGNORE_UAS),
+
+ /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
+ UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999,
+--
+2.20.1
+
--- /dev/null
+From 664b7379dafd1ff8fb43f79ab402d7d3874d3bc0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 27 Nov 2019 09:46:17 +0100
+Subject: watchdog: max77620_wdt: fix potential build errors
+
+From: David Engraf <david.engraf@sysgo.com>
+
+[ Upstream commit da9e3f4e30a53cd420cf1e6961c3b4110f0f21f0 ]
+
+max77620_wdt uses watchdog core functions. Enable CONFIG_WATCHDOG_CORE
+to fix potential build errors.
+
+Signed-off-by: David Engraf <david.engraf@sysgo.com>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Link: https://lore.kernel.org/r/20191127084617.16937-1-david.engraf@sysgo.com
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/watchdog/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
+index b165c46aca741..709d4de11f40f 100644
+--- a/drivers/watchdog/Kconfig
++++ b/drivers/watchdog/Kconfig
+@@ -594,6 +594,7 @@ config MAX63XX_WATCHDOG
+ config MAX77620_WATCHDOG
+ tristate "Maxim Max77620 Watchdog Timer"
+ depends on MFD_MAX77620 || COMPILE_TEST
++ select WATCHDOG_CORE
+ help
+ This is the driver for the Max77620 watchdog timer.
+ Say 'Y' here to enable the watchdog timer support for
+--
+2.20.1
+
--- /dev/null
+From 4848fbcdd0695195ec6abac491500327780be1f5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Dec 2019 22:48:02 +0100
+Subject: watchdog: rn5t618_wdt: fix module aliases
+
+From: Andreas Kemnade <andreas@kemnade.info>
+
+[ Upstream commit a76dfb859cd42df6e3d1910659128ffcd2fb6ba2 ]
+
+Platform device aliases were missing so module autoloading
+did not work.
+
+Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Link: https://lore.kernel.org/r/20191213214802.22268-1-andreas@kemnade.info
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/watchdog/rn5t618_wdt.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c
+index e60f55702ab79..d2e79cf70e774 100644
+--- a/drivers/watchdog/rn5t618_wdt.c
++++ b/drivers/watchdog/rn5t618_wdt.c
+@@ -193,6 +193,7 @@ static struct platform_driver rn5t618_wdt_driver = {
+
+ module_platform_driver(rn5t618_wdt_driver);
+
++MODULE_ALIAS("platform:rn5t618-wdt");
+ MODULE_AUTHOR("Beniamino Galvani <b.galvani@gmail.com>");
+ MODULE_DESCRIPTION("RN5T618 watchdog driver");
+ MODULE_LICENSE("GPL v2");
+--
+2.20.1
+