From 601b747bcd7b499df65ae8eb9b5aa27ba6a126dd Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 30 Jan 2020 06:55:17 -0500 Subject: [PATCH] fixes for 5.4 Signed-off-by: Sasha Levin --- ...-move-some-alc236-pintbls-to-fallbac.patch | 60 ++++ ...nps-fix-allmodconfig-kconfig-warning.patch | 42 +++ ...nfig-aspeed-g5-enable-8250_dw-quirks.patch | 38 +++ ...treflex-add-omap_sr_pdata-definition.patch | 38 +++ ...audmix-add-missed-pm_runtime_disable.patch | 60 ++++ ...sw_rt5645-add-quirk-for-boards-using.patch | 108 +++++++ ...lt-at-driver-unload-after-failed-pro.patch | 49 +++ ...da-hda-dai-fix-oops-on-hda_link-.hw_.patch | 71 +++++ ...event-use-after-free-in-snd_soc_get_.patch | 48 +++ ...i-fix-uninitialized-variable-warning.patch | 52 ++++ ...combination-of-bdaddr_property-and-i.patch | 87 ++++++ ...-btbcm-use-the-bdaddr_property-quirk.patch | 41 +++ ...d-module-enable-quirk-for-audio-aess.patch | 83 +++++ ...missing-force-mstandby-quirk-handlin.patch | 54 ++++ ...le-mstandby-quirk-and-use-it-for-mus.patch | 63 ++++ ...se-swsup-quirks-also-for-am335x-musb.patch | 33 ++ ...n4x5x_parse_config-reset-device-befo.patch | 77 +++++ ...multitouch.c-fix-a-possible-null-poi.patch | 44 +++ ...change-to-non-atomic-bit-operations-.patch | 66 ++++ ...reduce-hdmi-pixel-encoding-if-max-cl.patch | 108 +++++++ ...sriov-add-navi12-pci-id-for-sriov-v2.patch | 36 +++ ...-wc-don-t-reset-usb-data-connection-.patch | 64 ++++ ...d-missing-dependency-on-gpiolib_irqc.patch | 41 +++ ...r-incorrect-input-length-on-lenovo-y.patch | 99 ++++++ ...add-quirk-for-xin-mo-dual-controller.patch | 34 ++ ...asus-vendor-page-usage-code-0xff-eve.patch | 43 +++ ...-intel-ish-hid-ipc-add-cmp-device-id.patch | 47 +++ ...hid-ipc-add-tiger-lake-pci-device-id.patch | 46 +++ ...id-match-for-acer-sw5-012-keyboard-d.patch | 56 ++++ ...dd-lg-melf0410-i2c-touchscreen-suppo.patch | 49 +++ ...-steam-fix-input-device-disappearing.patch | 44 +++ ...m-recognize-new-mobilestudio-pro-pid.patch | 45 +++ ...t-multiple-pci-dma-aliases-in-device.patch | 290 ++++++++++++++++++ ...t-multiple-pci-dma-aliases-in-irq-re.patch | 123 ++++++++ ...fix-variable-cookie-set-but-not-used.patch | 51 +++ ...efined-map-s-__type-macro-handling-o.patch | 59 ++++ ...-support-for-eyetv-geniatech-t2-lite.patch | 51 +++ ...s-add-intel-comet-lake-pch-h-pci-ids.patch | 53 ++++ ...-sdhci-pci-add-support-for-intel-jsl.patch | 48 +++ ...pci-quirk-for-amd-sdhc-device-0x7906.patch | 102 ++++++ ...emove-dma_wmb-before-ringing-doorbel.patch | 71 +++++ ...-cast-from-pointer-to-integer-of-dif.patch | 43 +++ ...dd-dma-alias-quirk-for-intel-vca-ntb.patch | 80 +++++ ...r-add-enhanced-axi-id-filter-support.patch | 117 +++++++ ...event-usb-line-glitches-from-waking-.patch | 94 ++++++ ...-qcom-qmp-increase-phy-ready-timeout.patch | 39 +++ ...l-laptop-disable-kbd-backlight-on-in.patch | 91 ++++++ queue-5.4/series | 56 ++++ ...x-add-support-for-intel-comet-lake-h.patch | 37 +++ ...ock-protect-dw_spi-rx-tx-to-prevent-.patch | 135 ++++++++ ...ci-add-quirks-for-e2-revision-using-.patch | 112 +++++++ ...ntry-name-is-not-be-changed-when-ude.patch | 86 ++++++ ...silence-error-if-code-is-eprobe_defe.patch | 47 +++ ...isable-uas-on-jmicron-sata-enclosure.patch | 47 +++ ...77620_wdt-fix-potential-build-errors.patch | 37 +++ ...rion-fix-platform_get_irq-complaints.patch | 52 ++++ ...chdog-rn5t618_wdt-fix-module-aliases.patch | 37 +++ 57 files changed, 3784 insertions(+) create mode 100644 queue-5.4/alsa-hda-realtek-move-some-alc236-pintbls-to-fallbac.patch create mode 100644 queue-5.4/arc-eznps-fix-allmodconfig-kconfig-warning.patch create mode 100644 queue-5.4/arm-config-aspeed-g5-enable-8250_dw-quirks.patch create mode 100644 queue-5.4/arm-omap2-smartreflex-add-omap_sr_pdata-definition.patch create mode 100644 queue-5.4/asoc-fsl_audmix-add-missed-pm_runtime_disable.patch create mode 100644 queue-5.4/asoc-intel-cht_bsw_rt5645-add-quirk-for-boards-using.patch create mode 100644 queue-5.4/asoc-sof-fix-fault-at-driver-unload-after-failed-pro.patch create mode 100644 queue-5.4/asoc-sof-intel-hda-hda-dai-fix-oops-on-hda_link-.hw_.patch create mode 100644 queue-5.4/asoc-topology-prevent-use-after-free-in-snd_soc_get_.patch create mode 100644 queue-5.4/atm-eni-fix-uninitialized-variable-warning.patch create mode 100644 queue-5.4/bluetooth-allow-combination-of-bdaddr_property-and-i.patch create mode 100644 queue-5.4/bluetooth-btbcm-use-the-bdaddr_property-quirk.patch create mode 100644 queue-5.4/bus-ti-sysc-add-module-enable-quirk-for-audio-aess.patch create mode 100644 queue-5.4/bus-ti-sysc-fix-missing-force-mstandby-quirk-handlin.patch create mode 100644 queue-5.4/bus-ti-sysc-handle-mstandby-quirk-and-use-it-for-mus.patch create mode 100644 queue-5.4/bus-ti-sysc-use-swsup-quirks-also-for-am335x-musb.patch create mode 100644 queue-5.4/can-tcan4x5x-tcan4x5x_parse_config-reset-device-befo.patch create mode 100644 queue-5.4/drivers-hid-hid-multitouch.c-fix-a-possible-null-poi.patch create mode 100644 queue-5.4/drivers-net-b44-change-to-non-atomic-bit-operations-.patch create mode 100644 queue-5.4/drm-amd-display-reduce-hdmi-pixel-encoding-if-max-cl.patch create mode 100644 queue-5.4/drm-amdgpu-sriov-add-navi12-pci-id-for-sriov-v2.patch create mode 100644 queue-5.4/extcon-intel-cht-wc-don-t-reset-usb-data-connection-.patch create mode 100644 queue-5.4/gpio-max77620-add-missing-dependency-on-gpiolib_irqc.patch create mode 100644 queue-5.4/hid-add-quirk-for-incorrect-input-length-on-lenovo-y.patch create mode 100644 queue-5.4/hid-add-quirk-for-xin-mo-dual-controller.patch create mode 100644 queue-5.4/hid-asus-ignore-asus-vendor-page-usage-code-0xff-eve.patch create mode 100644 queue-5.4/hid-intel-ish-hid-ipc-add-cmp-device-id.patch create mode 100644 queue-5.4/hid-intel-ish-hid-ipc-add-tiger-lake-pci-device-id.patch create mode 100644 queue-5.4/hid-ite-add-usb-id-match-for-acer-sw5-012-keyboard-d.patch create mode 100644 queue-5.4/hid-multitouch-add-lg-melf0410-i2c-touchscreen-suppo.patch create mode 100644 queue-5.4/hid-steam-fix-input-device-disappearing.patch create mode 100644 queue-5.4/hid-wacom-recognize-new-mobilestudio-pro-pid.patch create mode 100644 queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-device.patch create mode 100644 queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-irq-re.patch create mode 100644 queue-5.4/iommu-dma-fix-variable-cookie-set-but-not-used.patch create mode 100644 queue-5.4/libbpf-fix-btf-defined-map-s-__type-macro-handling-o.patch create mode 100644 queue-5.4/media-dvbsky-add-support-for-eyetv-geniatech-t2-lite.patch create mode 100644 queue-5.4/mfd-intel-lpss-add-intel-comet-lake-pch-h-pci-ids.patch create mode 100644 queue-5.4/mmc-sdhci-pci-add-support-for-intel-jsl.patch create mode 100644 queue-5.4/mmc-sdhci-pci-quirk-for-amd-sdhc-device-0x7906.patch create mode 100644 queue-5.4/net-google-gve-remove-dma_wmb-before-ringing-doorbel.patch create mode 100644 queue-5.4/net-wan-sdla-fix-cast-from-pointer-to-integer-of-dif.patch create mode 100644 queue-5.4/pci-add-dma-alias-quirk-for-intel-vca-ntb.patch create mode 100644 queue-5.4/perf-imx_ddr-add-enhanced-axi-id-filter-support.patch create mode 100644 queue-5.4/phy-cpcap-usb-prevent-usb-line-glitches-from-waking-.patch create mode 100644 queue-5.4/phy-qcom-qmp-increase-phy-ready-timeout.patch create mode 100644 queue-5.4/platform-x86-dell-laptop-disable-kbd-backlight-on-in.patch create mode 100644 queue-5.4/spi-pxa2xx-add-support-for-intel-comet-lake-h.patch create mode 100644 queue-5.4/spi-spi-dw-add-lock-protect-dw_spi-rx-tx-to-prevent-.patch create mode 100644 queue-5.4/staging-mt7621-pci-add-quirks-for-e2-revision-using-.patch create mode 100644 queue-5.4/stmmac-debugfs-entry-name-is-not-be-changed-when-ude.patch create mode 100644 queue-5.4/usb-musb-jz4740-silence-error-if-code-is-eprobe_defe.patch create mode 100644 queue-5.4/usb-storage-disable-uas-on-jmicron-sata-enclosure.patch create mode 100644 queue-5.4/watchdog-max77620_wdt-fix-potential-build-errors.patch create mode 100644 queue-5.4/watchdog-orion-fix-platform_get_irq-complaints.patch create mode 100644 queue-5.4/watchdog-rn5t618_wdt-fix-module-aliases.patch diff --git a/queue-5.4/alsa-hda-realtek-move-some-alc236-pintbls-to-fallbac.patch b/queue-5.4/alsa-hda-realtek-move-some-alc236-pintbls-to-fallbac.patch new file mode 100644 index 00000000000..feed33b482c --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-move-some-alc236-pintbls-to-fallbac.patch @@ -0,0 +1,60 @@ +From 52fc7fb8ca6e3efd037f6640ada616b30dd17239 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 21 Nov 2019 10:26:44 +0800 +Subject: ALSA: hda/realtek - Move some alc236 pintbls to fallback table + +From: Hui Wang + +[ Upstream commit d64ebdbfd4f71406f58210f5ccb16977b4cd31d2 ] + +We have a new Dell machine which needs to apply the quirk +ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table +to fix it this time. And we could remove all pintbls of alc236 +for applying DELL1_MIC_NO_PRESENCE on Dell machines. + +Signed-off-by: Hui Wang +Link: https://lore.kernel.org/r/20191121022644.8078-2-hui.wang@canonical.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index d293488dc3dd3..68832f52c1ad2 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7563,20 +7563,6 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { + {0x19, 0x02a11020}, + {0x1a, 0x02a11030}, + {0x21, 0x0221101f}), +- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, +- {0x12, 0x90a60140}, +- {0x14, 0x90170110}, +- {0x21, 0x02211020}), +- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, +- {0x12, 0x90a60140}, +- {0x14, 0x90170150}, +- {0x21, 0x02211020}), +- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, +- {0x21, 0x02211020}), +- SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, +- {0x12, 0x40000000}, +- {0x14, 0x90170110}, +- {0x21, 0x02211020}), + SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, + {0x14, 0x90170110}, + {0x21, 0x02211020}), +@@ -7901,6 +7887,9 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { + SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, + {0x19, 0x40000000}, + {0x1a, 0x40000000}), ++ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, ++ {0x19, 0x40000000}, ++ {0x1a, 0x40000000}), + {} + }; + +-- +2.20.1 + diff --git a/queue-5.4/arc-eznps-fix-allmodconfig-kconfig-warning.patch b/queue-5.4/arc-eznps-fix-allmodconfig-kconfig-warning.patch new file mode 100644 index 00000000000..efe57760521 --- /dev/null +++ b/queue-5.4/arc-eznps-fix-allmodconfig-kconfig-warning.patch @@ -0,0 +1,42 @@ +From 77d72f80c8240e577e5bd56cf3ecc3a1314ceba5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 26 Nov 2019 17:54:09 -0800 +Subject: arc: eznps: fix allmodconfig kconfig warning + +From: Randy Dunlap + +[ 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 +Cc: Vineet Gupta +Cc: Ofer Levi +Cc: linux-snps-arc@lists.infradead.org +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +--- + 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 a376a50d3fea8..a931d0a256d01 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 + diff --git a/queue-5.4/arm-config-aspeed-g5-enable-8250_dw-quirks.patch b/queue-5.4/arm-config-aspeed-g5-enable-8250_dw-quirks.patch new file mode 100644 index 00000000000..4c93dbb08ae --- /dev/null +++ b/queue-5.4/arm-config-aspeed-g5-enable-8250_dw-quirks.patch @@ -0,0 +1,38 @@ +From dc7be316278ee705551ba0019bd9b8633aef321d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 12 Nov 2019 10:39:26 +1030 +Subject: ARM: config: aspeed-g5: Enable 8250_DW quirks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Joel Stanley + +[ Upstream commit a5331a7a87ec81d5228b7421acf831b2d0c0de26 ] + +This driver option is used by the AST2600 A0 boards to work around a +hardware issue. + +Reviewed-by: Cédric Le Goater +Acked-by: Arnd Bergmann +Signed-off-by: Joel Stanley +Signed-off-by: Sasha Levin +--- + arch/arm/configs/aspeed_g5_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig +index 597536cc9573d..b87508c7056c9 100644 +--- a/arch/arm/configs/aspeed_g5_defconfig ++++ b/arch/arm/configs/aspeed_g5_defconfig +@@ -139,6 +139,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6 + CONFIG_SERIAL_8250_EXTENDED=y + CONFIG_SERIAL_8250_ASPEED_VUART=y + CONFIG_SERIAL_8250_SHARE_IRQ=y ++CONFIG_SERIAL_8250_DW=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_ASPEED_KCS_IPMI_BMC=y + CONFIG_ASPEED_BT_IPMI_BMC=y +-- +2.20.1 + diff --git a/queue-5.4/arm-omap2-smartreflex-add-omap_sr_pdata-definition.patch b/queue-5.4/arm-omap2-smartreflex-add-omap_sr_pdata-definition.patch new file mode 100644 index 00000000000..3a2a9e9e6d3 --- /dev/null +++ b/queue-5.4/arm-omap2-smartreflex-add-omap_sr_pdata-definition.patch @@ -0,0 +1,38 @@ +From 343746e0d6688a1fc68c1499048a2834cc02622f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 15 Oct 2019 14:12:38 +0100 +Subject: ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition + +From: Ben Dooks + +[ 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 +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Sasha Levin +--- + 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 d0b37e9370372..971c9264179ee 100644 +--- a/include/linux/power/smartreflex.h ++++ b/include/linux/power/smartreflex.h +@@ -293,6 +293,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 + diff --git a/queue-5.4/asoc-fsl_audmix-add-missed-pm_runtime_disable.patch b/queue-5.4/asoc-fsl_audmix-add-missed-pm_runtime_disable.patch new file mode 100644 index 00000000000..d2a003f2d09 --- /dev/null +++ b/queue-5.4/asoc-fsl_audmix-add-missed-pm_runtime_disable.patch @@ -0,0 +1,60 @@ +From 3b2157a6ea54e3fdc51f7126f8a85741e6991f8d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 3 Dec 2019 19:13:03 +0800 +Subject: ASoC: fsl_audmix: add missed pm_runtime_disable + +From: Chuhong Yuan + +[ Upstream commit 77fffa742285f2b587648d6c72b5c705633f146f ] + +The driver forgets to call pm_runtime_disable in probe failure +and remove. +Add the missed calls to fix it. + +Signed-off-by: Chuhong Yuan +Acked-by: Nicolin Chen +Link: https://lore.kernel.org/r/20191203111303.12933-1-hslester96@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/fsl/fsl_audmix.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c +index a1db1bce330fa..5faecbeb54970 100644 +--- a/sound/soc/fsl/fsl_audmix.c ++++ b/sound/soc/fsl/fsl_audmix.c +@@ -505,15 +505,20 @@ static int fsl_audmix_probe(struct platform_device *pdev) + ARRAY_SIZE(fsl_audmix_dai)); + if (ret) { + dev_err(dev, "failed to register ASoC DAI\n"); +- return ret; ++ goto err_disable_pm; + } + + priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0); + if (IS_ERR(priv->pdev)) { + ret = PTR_ERR(priv->pdev); + dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret); ++ goto err_disable_pm; + } + ++ return 0; ++ ++err_disable_pm: ++ pm_runtime_disable(dev); + return ret; + } + +@@ -521,6 +526,8 @@ static int fsl_audmix_remove(struct platform_device *pdev) + { + struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev); + ++ pm_runtime_disable(&pdev->dev); ++ + if (priv->pdev) + platform_device_unregister(priv->pdev); + +-- +2.20.1 + diff --git a/queue-5.4/asoc-intel-cht_bsw_rt5645-add-quirk-for-boards-using.patch b/queue-5.4/asoc-intel-cht_bsw_rt5645-add-quirk-for-boards-using.patch new file mode 100644 index 00000000000..b825de86ade --- /dev/null +++ b/queue-5.4/asoc-intel-cht_bsw_rt5645-add-quirk-for-boards-using.patch @@ -0,0 +1,108 @@ +From 2ffc964a356f9bec630c70e94939eb2039a7e21c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Sep 2019 15:49:33 +1000 +Subject: ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0 + +From: Sam McNally + +[ Upstream commit adebb11139029ddf1fba6f796c4a476f17eacddc ] + +As of commit 648e921888ad ("clk: x86: Stop marking clocks as +CLK_IS_CRITICAL"), the cht_bsw_rt5645 driver needs to enable the clock +it's using for the codec's mclk. It does this from commit 7735bce05a9c +("ASoC: Intel: boards: use devm_clk_get() unconditionally"), enabling +pmc_plt_clk_3. However, Strago family Chromebooks use pmc_plt_clk_0 for +the codec mclk, resulting in white noise with some digital microphones. +Add a DMI-based quirk for Strago family Chromebooks to use pmc_plt_clk_0 +instead - mirroring the changes made to cht_bsw_max98090_ti in +commit a182ecd3809c ("ASoC: intel: cht_bsw_max98090_ti: Add quirk for +boards using pmc_plt_clk_0") and making use of the existing +dmi_check_system() call and related infrastructure added in +commit 22af29114eb4 ("ASoC: Intel: cht-bsw-rt5645: add quirks for +SSP0/AIF1/AIF2 routing"). + +Signed-off-by: Sam McNally +Acked-by: Pierre-Louis Bossart +Link: https://lore.kernel.org/r/20190917054933.209335-1-sammc@chromium.org +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/cht_bsw_rt5645.c | 26 +++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c +index 8879c3be29d5a..c68a5b85a4a03 100644 +--- a/sound/soc/intel/boards/cht_bsw_rt5645.c ++++ b/sound/soc/intel/boards/cht_bsw_rt5645.c +@@ -48,6 +48,7 @@ struct cht_mc_private { + #define CHT_RT5645_SSP2_AIF2 BIT(16) /* default is using AIF1 */ + #define CHT_RT5645_SSP0_AIF1 BIT(17) + #define CHT_RT5645_SSP0_AIF2 BIT(18) ++#define CHT_RT5645_PMC_PLT_CLK_0 BIT(19) + + static unsigned long cht_rt5645_quirk = 0; + +@@ -59,6 +60,8 @@ static void log_quirks(struct device *dev) + dev_info(dev, "quirk SSP0_AIF1 enabled"); + if (cht_rt5645_quirk & CHT_RT5645_SSP0_AIF2) + dev_info(dev, "quirk SSP0_AIF2 enabled"); ++ if (cht_rt5645_quirk & CHT_RT5645_PMC_PLT_CLK_0) ++ dev_info(dev, "quirk PMC_PLT_CLK_0 enabled"); + } + + static int platform_clock_control(struct snd_soc_dapm_widget *w, +@@ -226,15 +229,21 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream, + return 0; + } + +-/* uncomment when we have a real quirk + static int cht_rt5645_quirk_cb(const struct dmi_system_id *id) + { + cht_rt5645_quirk = (unsigned long)id->driver_data; + return 1; + } +-*/ + + static const struct dmi_system_id cht_rt5645_quirk_table[] = { ++ { ++ /* Strago family Chromebooks */ ++ .callback = cht_rt5645_quirk_cb, ++ .matches = { ++ DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_Strago"), ++ }, ++ .driver_data = (void *)CHT_RT5645_PMC_PLT_CLK_0, ++ }, + { + }, + }; +@@ -526,6 +535,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) + int dai_index = 0; + int ret_val = 0; + int i; ++ const char *mclk_name; + + drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); + if (!drv) +@@ -662,11 +672,15 @@ static int snd_cht_mc_probe(struct platform_device *pdev) + if (ret_val) + return ret_val; + +- drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); ++ if (cht_rt5645_quirk & CHT_RT5645_PMC_PLT_CLK_0) ++ mclk_name = "pmc_plt_clk_0"; ++ else ++ mclk_name = "pmc_plt_clk_3"; ++ ++ drv->mclk = devm_clk_get(&pdev->dev, mclk_name); + if (IS_ERR(drv->mclk)) { +- dev_err(&pdev->dev, +- "Failed to get MCLK from pmc_plt_clk_3: %ld\n", +- PTR_ERR(drv->mclk)); ++ dev_err(&pdev->dev, "Failed to get MCLK from %s: %ld\n", ++ mclk_name, PTR_ERR(drv->mclk)); + return PTR_ERR(drv->mclk); + } + +-- +2.20.1 + diff --git a/queue-5.4/asoc-sof-fix-fault-at-driver-unload-after-failed-pro.patch b/queue-5.4/asoc-sof-fix-fault-at-driver-unload-after-failed-pro.patch new file mode 100644 index 00000000000..cc0449a1f23 --- /dev/null +++ b/queue-5.4/asoc-sof-fix-fault-at-driver-unload-after-failed-pro.patch @@ -0,0 +1,49 @@ +From 71136dd26190bc08274d461c3ce53bddd3b34959 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Dec 2019 18:05:16 -0600 +Subject: ASoC: SOF: fix fault at driver unload after failed probe + +From: Kai Vehmanen + +[ Upstream commit b06e46427f987bf83dcb6a69516b57276eb8ec0c ] + +If sof_machine_check() fails during driver probe, the IPC +state is not initialized and this will lead to a NULL +dereference at driver unload. Example log is as follows: + +[ 1535.980630] sof-audio-pci 0000:00:1f.3: error: no matching ASoC machine driver found - aborting probe +[ 1535.980631] sof-audio-pci 0000:00:1f.3: error: failed to get machine info -19 +[ 1535.980632] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -19 +[ 1550.798373] BUG: kernel NULL pointer dereference, address: 0000000000000008 +... +[ 1550.798393] Call Trace: +[ 1550.798397] snd_sof_ipc_free+0x15/0x30 [snd_sof] +[ 1550.798399] snd_sof_device_remove+0x29/0xa0 [snd_sof] +[ 1550.798400] sof_pci_remove+0x10/0x30 [snd_sof_pci] + +Signed-off-by: Kai Vehmanen +Signed-off-by: Pierre-Louis Bossart +Link: https://lore.kernel.org/r/20191218000518.5830-2-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/sof/ipc.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c +index 086eeeab86795..7b6d69783e16a 100644 +--- a/sound/soc/sof/ipc.c ++++ b/sound/soc/sof/ipc.c +@@ -834,6 +834,9 @@ void snd_sof_ipc_free(struct snd_sof_dev *sdev) + { + struct snd_sof_ipc *ipc = sdev->ipc; + ++ if (!ipc) ++ return; ++ + /* disable sending of ipc's */ + mutex_lock(&ipc->tx_mutex); + ipc->disable_ipc_tx = true; +-- +2.20.1 + diff --git a/queue-5.4/asoc-sof-intel-hda-hda-dai-fix-oops-on-hda_link-.hw_.patch b/queue-5.4/asoc-sof-intel-hda-hda-dai-fix-oops-on-hda_link-.hw_.patch new file mode 100644 index 00000000000..4abe4c0f903 --- /dev/null +++ b/queue-5.4/asoc-sof-intel-hda-hda-dai-fix-oops-on-hda_link-.hw_.patch @@ -0,0 +1,71 @@ +From 9b014d1a4e1e73fa93281f25dbf359df36a23b17 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Dec 2019 18:05:17 -0600 +Subject: ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free + +From: Pierre-Louis Bossart + +[ Upstream commit 921162c81a089aa2f442103290f1af9ba281fc9f ] + +When the PCM_PARAM IPC fails while configuring the FE, the kernel +oopses in the HDaudio link DMA .hw_free operation. The root cause is a +NULL dma_data since the BE .hw_params was never called by the SOC +core. + +This error can also happen if the HDaudio link DMA configuration IPC +fails in the BE .hw_params. + +This patches makes sure the dma_data is properly saved in .hw_params, +and tested before being use in hw_free. + +GitHub issue: https://github.com/thesofproject/linux/issues/1417 + +Reviewed-by: Ranjani Sridharan +Reviewed-by: Kai Vehmanen +Signed-off-by: Pierre-Louis Bossart +Link: https://lore.kernel.org/r/20191218000518.5830-3-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/sof/intel/hda-dai.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c +index 8796f385be76c..896d21984b735 100644 +--- a/sound/soc/sof/intel/hda-dai.c ++++ b/sound/soc/sof/intel/hda-dai.c +@@ -216,6 +216,8 @@ static int hda_link_hw_params(struct snd_pcm_substream *substream, + link_dev = hda_link_stream_assign(bus, substream); + if (!link_dev) + return -EBUSY; ++ ++ snd_soc_dai_set_dma_data(dai, substream, (void *)link_dev); + } + + stream_tag = hdac_stream(link_dev)->stream_tag; +@@ -228,8 +230,6 @@ static int hda_link_hw_params(struct snd_pcm_substream *substream, + if (ret < 0) + return ret; + +- snd_soc_dai_set_dma_data(dai, substream, (void *)link_dev); +- + link = snd_hdac_ext_bus_get_link(bus, codec_dai->component->name); + if (!link) + return -EINVAL; +@@ -361,6 +361,13 @@ static int hda_link_hw_free(struct snd_pcm_substream *substream, + bus = hstream->bus; + rtd = snd_pcm_substream_chip(substream); + link_dev = snd_soc_dai_get_dma_data(dai, substream); ++ ++ if (!link_dev) { ++ dev_dbg(dai->dev, ++ "%s: link_dev is not assigned\n", __func__); ++ return -EINVAL; ++ } ++ + hda_stream = hstream_to_sof_hda_stream(link_dev); + + /* free the link DMA channel in the FW */ +-- +2.20.1 + diff --git a/queue-5.4/asoc-topology-prevent-use-after-free-in-snd_soc_get_.patch b/queue-5.4/asoc-topology-prevent-use-after-free-in-snd_soc_get_.patch new file mode 100644 index 00000000000..707f88335ff --- /dev/null +++ b/queue-5.4/asoc-topology-prevent-use-after-free-in-snd_soc_get_.patch @@ -0,0 +1,48 @@ +From ea2a847e1bf529fdfae4b7c5fc7cd0502858e7c6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 4 Dec 2019 15:04:47 -0600 +Subject: ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime() + +From: Dragos Tarcatu + +[ Upstream commit dd836ddf4e4e1c7f1eb2ae44783ccd70872ef24e ] + +remove_link() is currently calling snd_soc_remove_dai_link() after +it has already freed the memory for the link name. But this is later +read from snd_soc_get_pcm_runtime() causing a KASAN use-after-free +warning. Reorder the cleanups to fix this issue. + +Reviewed-by: Ranjani Sridharan +Signed-off-by: Dragos Tarcatu +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Kuninori Morimoto +Link: https://lore.kernel.org/r/20191204210447.11701-4-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/soc-topology.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c +index fd2d22ddc81b0..7ccbca47240d7 100644 +--- a/sound/soc/soc-topology.c ++++ b/sound/soc/soc-topology.c +@@ -548,12 +548,12 @@ static void remove_link(struct snd_soc_component *comp, + if (dobj->ops && dobj->ops->link_unload) + dobj->ops->link_unload(comp, dobj); + ++ list_del(&dobj->list); ++ snd_soc_remove_dai_link(comp->card, link); ++ + kfree(link->name); + kfree(link->stream_name); + kfree(link->cpus->dai_name); +- +- list_del(&dobj->list); +- snd_soc_remove_dai_link(comp->card, link); + kfree(link); + } + +-- +2.20.1 + diff --git a/queue-5.4/atm-eni-fix-uninitialized-variable-warning.patch b/queue-5.4/atm-eni-fix-uninitialized-variable-warning.patch new file mode 100644 index 00000000000..09f492bc22b --- /dev/null +++ b/queue-5.4/atm-eni-fix-uninitialized-variable-warning.patch @@ -0,0 +1,52 @@ +From 643be66637b7ba045c6e45831fa127bf13c07136 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 7 Jan 2020 21:43:59 +0100 +Subject: atm: eni: fix uninitialized variable warning + +From: Arnd Bergmann + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 b23d1e4bad33b..9d0d65efcd94e 100644 +--- a/drivers/atm/eni.c ++++ b/drivers/atm/eni.c +@@ -374,7 +374,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; +@@ -447,7 +447,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 + diff --git a/queue-5.4/bluetooth-allow-combination-of-bdaddr_property-and-i.patch b/queue-5.4/bluetooth-allow-combination-of-bdaddr_property-and-i.patch new file mode 100644 index 00000000000..5ba5116b741 --- /dev/null +++ b/queue-5.4/bluetooth-allow-combination-of-bdaddr_property-and-i.patch @@ -0,0 +1,87 @@ +From 474b4c5168ba072d50bbcdb238cf3812bcf6284a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Nov 2019 00:33:45 +0100 +Subject: Bluetooth: Allow combination of BDADDR_PROPERTY and INVALID_BDADDR + quirks + +From: Marcel Holtmann + +[ Upstream commit 7fdf6c6a0d0e032aac2aa4537a23af1e04a397ce ] + +When utilizing BDADDR_PROPERTY and INVALID_BDADDR quirks together it +results in an unconfigured controller even if the bootloader provides +a valid address. Fix this by allowing a bootloader provided address +to mark the controller as configured. + +Signed-off-by: Marcel Holtmann +Tested-by: Andre Heider +Signed-off-by: Johan Hedberg +Signed-off-by: Sasha Levin +--- + net/bluetooth/hci_core.c | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c +index 0cc9ce9172229..9e19d5a3aac87 100644 +--- a/net/bluetooth/hci_core.c ++++ b/net/bluetooth/hci_core.c +@@ -1444,11 +1444,20 @@ static int hci_dev_do_open(struct hci_dev *hdev) + + if (hci_dev_test_flag(hdev, HCI_SETUP) || + test_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks)) { ++ bool invalid_bdaddr; ++ + hci_sock_dev_event(hdev, HCI_DEV_SETUP); + + if (hdev->setup) + ret = hdev->setup(hdev); + ++ /* The transport driver can set the quirk to mark the ++ * BD_ADDR invalid before creating the HCI device or in ++ * its setup callback. ++ */ ++ invalid_bdaddr = test_bit(HCI_QUIRK_INVALID_BDADDR, ++ &hdev->quirks); ++ + if (ret) + goto setup_failed; + +@@ -1457,20 +1466,33 @@ static int hci_dev_do_open(struct hci_dev *hdev) + hci_dev_get_bd_addr_from_property(hdev); + + if (bacmp(&hdev->public_addr, BDADDR_ANY) && +- hdev->set_bdaddr) ++ hdev->set_bdaddr) { + ret = hdev->set_bdaddr(hdev, + &hdev->public_addr); ++ ++ /* If setting of the BD_ADDR from the device ++ * property succeeds, then treat the address ++ * as valid even if the invalid BD_ADDR ++ * quirk indicates otherwise. ++ */ ++ if (!ret) ++ invalid_bdaddr = false; ++ } + } + + setup_failed: + /* The transport driver can set these quirks before + * creating the HCI device or in its setup callback. + * ++ * For the invalid BD_ADDR quirk it is possible that ++ * it becomes a valid address if the bootloader does ++ * provide it (see above). ++ * + * In case any of them is set, the controller has to + * start up as unconfigured. + */ + if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks) || +- test_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks)) ++ invalid_bdaddr) + hci_dev_set_flag(hdev, HCI_UNCONFIGURED); + + /* For an unconfigured controller it is required to +-- +2.20.1 + diff --git a/queue-5.4/bluetooth-btbcm-use-the-bdaddr_property-quirk.patch b/queue-5.4/bluetooth-btbcm-use-the-bdaddr_property-quirk.patch new file mode 100644 index 00000000000..68ebbdd9652 --- /dev/null +++ b/queue-5.4/bluetooth-btbcm-use-the-bdaddr_property-quirk.patch @@ -0,0 +1,41 @@ +From 85a5f0f3bea401396327ef01011575fe04fbd86b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Nov 2019 13:31:42 +0100 +Subject: Bluetooth: btbcm: Use the BDADDR_PROPERTY quirk + +From: Andre Heider + +[ Upstream commit a4f95f31a9f38d9bb1fd313fcc2d0c0d48116ee3 ] + +Some devices ship with the controller default address, like the +Orange Pi 3 (BCM4345C5). + +Allow the bootloader to set a valid address through the device tree. + +Signed-off-by: Andre Heider +Signed-off-by: Marcel Holtmann +Signed-off-by: Sasha Levin +--- + drivers/bluetooth/btbcm.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c +index 2d2e6d8620681..f02a4bdc0ca75 100644 +--- a/drivers/bluetooth/btbcm.c ++++ b/drivers/bluetooth/btbcm.c +@@ -440,6 +440,12 @@ int btbcm_finalize(struct hci_dev *hdev) + + set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks); + ++ /* Some devices ship with the controller default address. ++ * Allow the bootloader to set a valid address through the ++ * device tree. ++ */ ++ set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); ++ + return 0; + } + EXPORT_SYMBOL_GPL(btbcm_finalize); +-- +2.20.1 + diff --git a/queue-5.4/bus-ti-sysc-add-module-enable-quirk-for-audio-aess.patch b/queue-5.4/bus-ti-sysc-add-module-enable-quirk-for-audio-aess.patch new file mode 100644 index 00000000000..c53b902234e --- /dev/null +++ b/queue-5.4/bus-ti-sysc-add-module-enable-quirk-for-audio-aess.patch @@ -0,0 +1,83 @@ +From 4e83b11d137f5259f0cf32f3d59286df92ae7ad7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Nov 2019 08:25:28 -0800 +Subject: bus: ti-sysc: Add module enable quirk for audio AESS + +From: Tony Lindgren + +[ Upstream commit 020003f763e24e4ed0bb3d8909f3940891536d5d ] + +We must set the autogating bit on enable for AESS (Audio Engine SubSystem) +when probed with ti-sysc interconnect target module driver. Otherwise it +won't idle properly. + +Cc: Peter Ujfalusi +Tested-by: Peter Ujfalusi +Signed-off-by: Tony Lindgren +Signed-off-by: Sasha Levin +--- + drivers/bus/ti-sysc.c | 14 +++++++++++++- + include/linux/platform_data/ti-sysc.h | 1 + + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c +index 0e5cfd752410d..ea16a2d4fb532 100644 +--- a/drivers/bus/ti-sysc.c ++++ b/drivers/bus/ti-sysc.c +@@ -1248,6 +1248,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { + SYSC_QUIRK_SWSUP_SIDLE), + + /* Quirks that need to be set based on detected module */ ++ SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff, ++ SYSC_MODULE_QUIRK_AESS), + SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff, + SYSC_MODULE_QUIRK_HDQ1W), + SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff, +@@ -1276,7 +1278,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { + #ifdef DEBUG + SYSC_QUIRK("adc", 0, 0, 0x10, -1, 0x47300001, 0xffffffff, 0), + SYSC_QUIRK("atl", 0, 0, -1, -1, 0x0a070100, 0xffffffff, 0), +- SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff, 0), + SYSC_QUIRK("cm", 0, 0, -1, -1, 0x40000301, 0xffffffff, 0), + SYSC_QUIRK("control", 0, 0, 0x10, -1, 0x40000900, 0xffffffff, 0), + SYSC_QUIRK("cpgmac", 0, 0x1200, 0x1208, 0x1204, 0x4edb1902, +@@ -1408,6 +1409,14 @@ static void sysc_clk_enable_quirk_hdq1w(struct sysc *ddata) + sysc_write(ddata, offset, val); + } + ++/* AESS (Audio Engine SubSystem) needs autogating set after enable */ ++static void sysc_module_enable_quirk_aess(struct sysc *ddata) ++{ ++ int offset = 0x7c; /* AESS_AUTO_GATING_ENABLE */ ++ ++ sysc_write(ddata, offset, 1); ++} ++ + /* I2C needs extra enable bit toggling for reset */ + static void sysc_clk_quirk_i2c(struct sysc *ddata, bool enable) + { +@@ -1490,6 +1499,9 @@ static void sysc_init_module_quirks(struct sysc *ddata) + return; + } + ++ if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_AESS) ++ ddata->module_enable_quirk = sysc_module_enable_quirk_aess; ++ + if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_SGX) + ddata->module_enable_quirk = sysc_module_enable_quirk_sgx; + +diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h +index b5b7a3423ca81..0b93804751444 100644 +--- a/include/linux/platform_data/ti-sysc.h ++++ b/include/linux/platform_data/ti-sysc.h +@@ -49,6 +49,7 @@ struct sysc_regbits { + s8 emufree_shift; + }; + ++#define SYSC_MODULE_QUIRK_AESS BIT(19) + #define SYSC_MODULE_QUIRK_SGX BIT(18) + #define SYSC_MODULE_QUIRK_HDQ1W BIT(17) + #define SYSC_MODULE_QUIRK_I2C BIT(16) +-- +2.20.1 + diff --git a/queue-5.4/bus-ti-sysc-fix-missing-force-mstandby-quirk-handlin.patch b/queue-5.4/bus-ti-sysc-fix-missing-force-mstandby-quirk-handlin.patch new file mode 100644 index 00000000000..6fcbb54f751 --- /dev/null +++ b/queue-5.4/bus-ti-sysc-fix-missing-force-mstandby-quirk-handlin.patch @@ -0,0 +1,54 @@ +From c06dd62f543059573105917c4084a55655e07b2a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 9 Dec 2019 13:55:15 -0800 +Subject: bus: ti-sysc: Fix missing force mstandby quirk handling + +From: Tony Lindgren + +[ Upstream commit 93c60483b5feefced92b869d5f97769495bc6313 ] + +Commit 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for +musb") added quirk handling for mstandby quirk but did not consider that +we also need a quirk variant for SYSC_QUIRK_FORCE_MSTANDBY. + +We need to use forced idle mode for both SYSC_QUIRK_SWSUP_MSTANDBY and +SYSC_QUIRK_FORCE_MSTANDBY, but SYSC_QUIRK_SWSUP_MSTANDBY also need to +additionally also configure no-idle mode when enabled. + +Fixes: 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for musb") +Signed-off-by: Tony Lindgren +Signed-off-by: Sasha Levin +--- + drivers/bus/ti-sysc.c | 3 ++- + include/linux/platform_data/ti-sysc.h | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c +index ea16a2d4fb532..d9846265a5cd9 100644 +--- a/drivers/bus/ti-sysc.c ++++ b/drivers/bus/ti-sysc.c +@@ -987,7 +987,8 @@ static int sysc_disable_module(struct device *dev) + return ret; + } + +- if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY) ++ if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_MSTANDBY) || ++ ddata->cfg.quirks & (SYSC_QUIRK_FORCE_MSTANDBY)) + best_mode = SYSC_IDLE_FORCE; + + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); +diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h +index 0b93804751444..8cfe570fdece6 100644 +--- a/include/linux/platform_data/ti-sysc.h ++++ b/include/linux/platform_data/ti-sysc.h +@@ -49,6 +49,7 @@ struct sysc_regbits { + s8 emufree_shift; + }; + ++#define SYSC_QUIRK_FORCE_MSTANDBY BIT(20) + #define SYSC_MODULE_QUIRK_AESS BIT(19) + #define SYSC_MODULE_QUIRK_SGX BIT(18) + #define SYSC_MODULE_QUIRK_HDQ1W BIT(17) +-- +2.20.1 + diff --git a/queue-5.4/bus-ti-sysc-handle-mstandby-quirk-and-use-it-for-mus.patch b/queue-5.4/bus-ti-sysc-handle-mstandby-quirk-and-use-it-for-mus.patch new file mode 100644 index 00000000000..f71e1c83122 --- /dev/null +++ b/queue-5.4/bus-ti-sysc-handle-mstandby-quirk-and-use-it-for-mus.patch @@ -0,0 +1,63 @@ +From 45ae65f6ec2ae4638963fbe7b7c849af811e2ce2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 21 Oct 2019 13:36:09 -0700 +Subject: bus: ti-sysc: Handle mstandby quirk and use it for musb + +From: Tony Lindgren + +[ Upstream commit 03856e928b0e1a1c274eece1dfe4330a362c37f3 ] + +We need swsup quirks for sidle and mstandby for musb to work +properly. + +Signed-off-by: Tony Lindgren +Signed-off-by: Sasha Levin +--- + drivers/bus/ti-sysc.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c +index abbf281ee337b..44d4f4864ac2a 100644 +--- a/drivers/bus/ti-sysc.c ++++ b/drivers/bus/ti-sysc.c +@@ -923,6 +923,9 @@ set_midle: + return -EINVAL; + } + ++ if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY) ++ best_mode = SYSC_IDLE_NO; ++ + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); + reg |= best_mode << regbits->midle_shift; + sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg); +@@ -984,6 +987,9 @@ static int sysc_disable_module(struct device *dev) + return ret; + } + ++ if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY) ++ best_mode = SYSC_IDLE_FORCE; ++ + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); + reg |= best_mode << regbits->midle_shift; + sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg); +@@ -1257,6 +1263,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { + SYSC_QUIRK("gpu", 0x50000000, 0x14, -1, -1, 0x00010201, 0xffffffff, 0), + SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -1, 0x40000000 , 0xffffffff, + SYSC_MODULE_QUIRK_SGX), ++ SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050, ++ 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), + SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0, + SYSC_MODULE_QUIRK_WDT), + /* Watchdog on am3 and am4 */ +@@ -1315,8 +1323,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { + SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0), + SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0), + SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -1, 0x50700101, 0xffffffff, 0), +- SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050, +- 0xffffffff, 0), + SYSC_QUIRK("vfpe", 0, 0, 0x104, -1, 0x4d001200, 0xffffffff, 0), + #endif + }; +-- +2.20.1 + diff --git a/queue-5.4/bus-ti-sysc-use-swsup-quirks-also-for-am335x-musb.patch b/queue-5.4/bus-ti-sysc-use-swsup-quirks-also-for-am335x-musb.patch new file mode 100644 index 00000000000..94d263aed3b --- /dev/null +++ b/queue-5.4/bus-ti-sysc-use-swsup-quirks-also-for-am335x-musb.patch @@ -0,0 +1,33 @@ +From 5c2517450fa4047e71e17753fb4fab357e153d8b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 21 Oct 2019 14:15:55 -0700 +Subject: bus: ti-sysc: Use swsup quirks also for am335x musb + +From: Tony Lindgren + +[ Upstream commit 1819ef2e2d12d5b1a6ee54ac1c2afe35cffc677c ] + +Also on am335x we need the swsup quirks for musb. + +Signed-off-by: Tony Lindgren +Signed-off-by: Sasha Levin +--- + drivers/bus/ti-sysc.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c +index 44d4f4864ac2a..0e5cfd752410d 100644 +--- a/drivers/bus/ti-sysc.c ++++ b/drivers/bus/ti-sysc.c +@@ -1265,6 +1265,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { + SYSC_MODULE_QUIRK_SGX), + SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050, + 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), ++ SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -1, 0x4ea2080d, 0xffffffff, ++ SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), + SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0, + SYSC_MODULE_QUIRK_WDT), + /* Watchdog on am3 and am4 */ +-- +2.20.1 + diff --git a/queue-5.4/can-tcan4x5x-tcan4x5x_parse_config-reset-device-befo.patch b/queue-5.4/can-tcan4x5x-tcan4x5x_parse_config-reset-device-befo.patch new file mode 100644 index 00000000000..3c183a20e67 --- /dev/null +++ b/queue-5.4/can-tcan4x5x-tcan4x5x_parse_config-reset-device-befo.patch @@ -0,0 +1,77 @@ +From 55275524e21e04c4026aa0177eacc5db7fd5a4de Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 11 Dec 2019 14:58:51 +0100 +Subject: can: tcan4x5x: tcan4x5x_parse_config(): reset device before register + access + +From: Sean Nyekjaer + +[ Upstream commit c3083124e6a1c0d6cd4fe3b3f627b488bd3b10c4 ] + +It's a good idea to reset a ip-block/spi device before using it, this +patch will reset the device. + +And a generic reset function if needed elsewhere. + +Signed-off-by: Sean Nyekjaer +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Sasha Levin +--- + drivers/net/can/m_can/tcan4x5x.c | 27 ++++++++++++++++++++++++++- + 1 file changed, 26 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c +index d797912e665a5..b233756345f83 100644 +--- a/drivers/net/can/m_can/tcan4x5x.c ++++ b/drivers/net/can/m_can/tcan4x5x.c +@@ -164,6 +164,28 @@ static void tcan4x5x_check_wake(struct tcan4x5x_priv *priv) + } + } + ++static int tcan4x5x_reset(struct tcan4x5x_priv *priv) ++{ ++ int ret = 0; ++ ++ if (priv->reset_gpio) { ++ gpiod_set_value(priv->reset_gpio, 1); ++ ++ /* tpulse_width minimum 30us */ ++ usleep_range(30, 100); ++ gpiod_set_value(priv->reset_gpio, 0); ++ } else { ++ ret = regmap_write(priv->regmap, TCAN4X5X_CONFIG, ++ TCAN4X5X_SW_RESET); ++ if (ret) ++ return ret; ++ } ++ ++ usleep_range(700, 1000); ++ ++ return ret; ++} ++ + static int regmap_spi_gather_write(void *context, const void *reg, + size_t reg_len, const void *val, + size_t val_len) +@@ -341,6 +363,7 @@ static int tcan4x5x_init(struct m_can_classdev *cdev) + static int tcan4x5x_parse_config(struct m_can_classdev *cdev) + { + struct tcan4x5x_priv *tcan4x5x = cdev->device_data; ++ int ret; + + tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake", + GPIOD_OUT_HIGH); +@@ -354,7 +377,9 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev) + if (IS_ERR(tcan4x5x->reset_gpio)) + tcan4x5x->reset_gpio = NULL; + +- usleep_range(700, 1000); ++ ret = tcan4x5x_reset(tcan4x5x); ++ if (ret) ++ return ret; + + tcan4x5x->device_state_gpio = devm_gpiod_get_optional(cdev->dev, + "device-state", +-- +2.20.1 + diff --git a/queue-5.4/drivers-hid-hid-multitouch.c-fix-a-possible-null-poi.patch b/queue-5.4/drivers-hid-hid-multitouch.c-fix-a-possible-null-poi.patch new file mode 100644 index 00000000000..6bf7a3cf8af --- /dev/null +++ b/queue-5.4/drivers-hid-hid-multitouch.c-fix-a-possible-null-poi.patch @@ -0,0 +1,44 @@ +From 0b0eeb01f207cfdb1ea98be7279d0dd3f1911b29 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 19 Dec 2019 10:45:30 +0800 +Subject: drivers/hid/hid-multitouch.c: fix a possible null pointer access. + +From: Pan Zhang + +[ 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 +Signed-off-by: Benjamin Tissoires +Signed-off-by: Sasha Levin +--- + 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 f0d4172d51319..362805ddf3777 100644 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -1019,7 +1019,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 + diff --git a/queue-5.4/drivers-net-b44-change-to-non-atomic-bit-operations-.patch b/queue-5.4/drivers-net-b44-change-to-non-atomic-bit-operations-.patch new file mode 100644 index 00000000000..2c5a02160b1 --- /dev/null +++ b/queue-5.4/drivers-net-b44-change-to-non-atomic-bit-operations-.patch @@ -0,0 +1,66 @@ +From 8b2b26d664dbefdd72e2d76a1740be9a0b375bd6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Signed-off-by: Fenghua Yu +Signed-off-by: Tony Luck +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 97ab0dd255522..1a7710c399d74 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 + diff --git a/queue-5.4/drm-amd-display-reduce-hdmi-pixel-encoding-if-max-cl.patch b/queue-5.4/drm-amd-display-reduce-hdmi-pixel-encoding-if-max-cl.patch new file mode 100644 index 00000000000..2b9edc58e39 --- /dev/null +++ b/queue-5.4/drm-amd-display-reduce-hdmi-pixel-encoding-if-max-cl.patch @@ -0,0 +1,108 @@ +From 38acf6ef52e6bf0f58dd6c752b5d4124749c05b0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 2 Dec 2019 13:47:13 -0800 +Subject: drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded + +From: Thomas Anderson + +[ Upstream commit 840c90fce6c78bc6b2c4cb9e836d70985ed32066 ] + +For high-res (8K) or HFR (4K120) displays, using uncompressed pixel +formats like YCbCr444 would exceed the bandwidth of HDMI 2.0, so the +"interesting" modes would be disabled, leaving only low-res or low +framerate modes. + +This change lowers the pixel encoding to 4:2:2 or 4:2:0 if the max TMDS +clock is exceeded. Verified that 8K30 and 4K120 are now available and +working with a Samsung Q900R over an HDMI 2.0b link from a Radeon 5700. + +Reviewed-by: Harry Wentland +Signed-off-by: Thomas Anderson +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +--- + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 45 ++++++++++--------- + 1 file changed, 23 insertions(+), 22 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +index 4e9c15c409bac..360c87ba45956 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -3266,27 +3266,21 @@ get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing) + return color_space; + } + +-static void reduce_mode_colour_depth(struct dc_crtc_timing *timing_out) +-{ +- if (timing_out->display_color_depth <= COLOR_DEPTH_888) +- return; +- +- timing_out->display_color_depth--; +-} +- +-static void adjust_colour_depth_from_display_info(struct dc_crtc_timing *timing_out, +- const struct drm_display_info *info) ++static bool adjust_colour_depth_from_display_info( ++ struct dc_crtc_timing *timing_out, ++ const struct drm_display_info *info) + { ++ enum dc_color_depth depth = timing_out->display_color_depth; + int normalized_clk; +- if (timing_out->display_color_depth <= COLOR_DEPTH_888) +- return; + do { + normalized_clk = timing_out->pix_clk_100hz / 10; + /* YCbCr 4:2:0 requires additional adjustment of 1/2 */ + if (timing_out->pixel_encoding == PIXEL_ENCODING_YCBCR420) + normalized_clk /= 2; + /* Adjusting pix clock following on HDMI spec based on colour depth */ +- switch (timing_out->display_color_depth) { ++ switch (depth) { ++ case COLOR_DEPTH_888: ++ break; + case COLOR_DEPTH_101010: + normalized_clk = (normalized_clk * 30) / 24; + break; +@@ -3297,14 +3291,15 @@ static void adjust_colour_depth_from_display_info(struct dc_crtc_timing *timing_ + normalized_clk = (normalized_clk * 48) / 24; + break; + default: +- return; ++ /* The above depths are the only ones valid for HDMI. */ ++ return false; + } +- if (normalized_clk <= info->max_tmds_clock) +- return; +- reduce_mode_colour_depth(timing_out); +- +- } while (timing_out->display_color_depth > COLOR_DEPTH_888); +- ++ if (normalized_clk <= info->max_tmds_clock) { ++ timing_out->display_color_depth = depth; ++ return true; ++ } ++ } while (--depth > COLOR_DEPTH_666); ++ return false; + } + + static void fill_stream_properties_from_drm_display_mode( +@@ -3370,8 +3365,14 @@ static void fill_stream_properties_from_drm_display_mode( + + stream->out_transfer_func->type = TF_TYPE_PREDEFINED; + stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB; +- if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) +- adjust_colour_depth_from_display_info(timing_out, info); ++ if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) { ++ if (!adjust_colour_depth_from_display_info(timing_out, info) && ++ drm_mode_is_420_also(info, mode_in) && ++ timing_out->pixel_encoding != PIXEL_ENCODING_YCBCR420) { ++ timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; ++ adjust_colour_depth_from_display_info(timing_out, info); ++ } ++ } + } + + static void fill_audio_info(struct audio_info *audio_info, +-- +2.20.1 + diff --git a/queue-5.4/drm-amdgpu-sriov-add-navi12-pci-id-for-sriov-v2.patch b/queue-5.4/drm-amdgpu-sriov-add-navi12-pci-id-for-sriov-v2.patch new file mode 100644 index 00000000000..755592843e3 --- /dev/null +++ b/queue-5.4/drm-amdgpu-sriov-add-navi12-pci-id-for-sriov-v2.patch @@ -0,0 +1,36 @@ +From 56acaf189be92cc42842d9e7d4f9684d55dbd8bf Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 19 Sep 2019 13:22:59 -0500 +Subject: drm/amdgpu/SRIOV: add navi12 pci id for SRIOV (v2) + +From: Jiange Zhao + +[ Upstream commit 57d4f3b7fd65b56f98b62817f27c461142c0bc2a ] + +Add Navi12 PCI id support. + +v2: flag as experimental for now (Alex) + +Signed-off-by: Jiange Zhao +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +index 33a1099e2f33e..bb9a2771a0f9e 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +@@ -1023,6 +1023,7 @@ static const struct pci_device_id pciidlist[] = { + + /* Navi12 */ + {0x1002, 0x7360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI12|AMD_EXP_HW_SUPPORT}, ++ {0x1002, 0x7362, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI12|AMD_EXP_HW_SUPPORT}, + + {0, 0, 0} + }; +-- +2.20.1 + diff --git a/queue-5.4/extcon-intel-cht-wc-don-t-reset-usb-data-connection-.patch b/queue-5.4/extcon-intel-cht-wc-don-t-reset-usb-data-connection-.patch new file mode 100644 index 00000000000..8032c19d004 --- /dev/null +++ b/queue-5.4/extcon-intel-cht-wc-don-t-reset-usb-data-connection-.patch @@ -0,0 +1,64 @@ +From e0e237dd63d13fea242173544d891295800ce48c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Sep 2019 00:15:36 +0300 +Subject: extcon-intel-cht-wc: Don't reset USB data connection at probe + +From: Yauhen Kharuzhy + +[ Upstream commit e81b88932985c9134d410f4eaaaa9b81a3b4bd0c ] + +Intel Cherry Trail Whiskey Cove extcon driver connect USB data lines to +PMIC at driver probing for further charger detection. This causes reset of +USB data sessions and removing all devices from bus. If system was +booted from Live CD or USB dongle, this makes system unusable. + +Check if USB ID pin is floating and re-route data lines in this case +only, don't touch otherwise. + +Reviewed-by: Hans de Goede +Reviewed-by: Andy Shevchenko +Signed-off-by: Yauhen Kharuzhy +[cw00.choi: Clean-up the minor coding style] +Signed-off-by: Chanwoo Choi +Signed-off-by: Sasha Levin +--- + drivers/extcon/extcon-intel-cht-wc.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/drivers/extcon/extcon-intel-cht-wc.c b/drivers/extcon/extcon-intel-cht-wc.c +index 9d32150e68db5..771f6f4cf92e6 100644 +--- a/drivers/extcon/extcon-intel-cht-wc.c ++++ b/drivers/extcon/extcon-intel-cht-wc.c +@@ -338,6 +338,7 @@ static int cht_wc_extcon_probe(struct platform_device *pdev) + struct intel_soc_pmic *pmic = dev_get_drvdata(pdev->dev.parent); + struct cht_wc_extcon_data *ext; + unsigned long mask = ~(CHT_WC_PWRSRC_VBUS | CHT_WC_PWRSRC_USBID_MASK); ++ int pwrsrc_sts, id; + int irq, ret; + + irq = platform_get_irq(pdev, 0); +@@ -387,8 +388,19 @@ static int cht_wc_extcon_probe(struct platform_device *pdev) + goto disable_sw_control; + } + +- /* Route D+ and D- to PMIC for initial charger detection */ +- cht_wc_extcon_set_phymux(ext, MUX_SEL_PMIC); ++ ret = regmap_read(ext->regmap, CHT_WC_PWRSRC_STS, &pwrsrc_sts); ++ if (ret) { ++ dev_err(ext->dev, "Error reading pwrsrc status: %d\n", ret); ++ goto disable_sw_control; ++ } ++ ++ /* ++ * If no USB host or device connected, route D+ and D- to PMIC for ++ * initial charger detection ++ */ ++ id = cht_wc_extcon_get_id(ext, pwrsrc_sts); ++ if (id != INTEL_USB_ID_GND) ++ cht_wc_extcon_set_phymux(ext, MUX_SEL_PMIC); + + /* Get initial state */ + cht_wc_extcon_pwrsrc_event(ext); +-- +2.20.1 + diff --git a/queue-5.4/gpio-max77620-add-missing-dependency-on-gpiolib_irqc.patch b/queue-5.4/gpio-max77620-add-missing-dependency-on-gpiolib_irqc.patch new file mode 100644 index 00000000000..9a852399136 --- /dev/null +++ b/queue-5.4/gpio-max77620-add-missing-dependency-on-gpiolib_irqc.patch @@ -0,0 +1,41 @@ +From fe48c475150e4396a28e7a82b647f1996261ef8d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Link: https://lore.kernel.org/r/20200106015154.12040-1-digetx@gmail.com +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + drivers/gpio/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig +index ceb908f7dbe51..f9263426af030 100644 +--- a/drivers/gpio/Kconfig ++++ b/drivers/gpio/Kconfig +@@ -1120,6 +1120,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 + diff --git a/queue-5.4/hid-add-quirk-for-incorrect-input-length-on-lenovo-y.patch b/queue-5.4/hid-add-quirk-for-incorrect-input-length-on-lenovo-y.patch new file mode 100644 index 00000000000..ba61c0fc16b --- /dev/null +++ b/queue-5.4/hid-add-quirk-for-incorrect-input-length-on-lenovo-y.patch @@ -0,0 +1,99 @@ +From c527fafd280b1e961d4bc23a706838e357c7ae4a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Nov 2019 03:23:29 +0000 +Subject: HID: Add quirk for incorrect input length on Lenovo Y720 + +From: Pavel Balan + +[ 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 +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + 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 27795eac93e35..5fc82029a03b7 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -631,6 +631,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 ac44bf752ff1f..479934f7d2411 100644 +--- a/drivers/hid/i2c-hid/i2c-hid-core.c ++++ b/drivers/hid/i2c-hid/i2c-hid-core.c +@@ -49,6 +49,8 @@ + #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1) + #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 +@@ -177,6 +179,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 } + }; + +@@ -498,9 +502,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 + diff --git a/queue-5.4/hid-add-quirk-for-xin-mo-dual-controller.patch b/queue-5.4/hid-add-quirk-for-xin-mo-dual-controller.patch new file mode 100644 index 00000000000..a52676e43e5 --- /dev/null +++ b/queue-5.4/hid-add-quirk-for-xin-mo-dual-controller.patch @@ -0,0 +1,34 @@ +From 7c231a3f87397467581a4c2305f7418ae2e6cd79 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 1 Dec 2019 00:22:09 +0200 +Subject: HID: Add quirk for Xin-Mo Dual Controller + +From: Priit Laes + +[ 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 +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + 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 9a35af1e26623..fa58a7cbb3ff2 100644 +--- a/drivers/hid/hid-quirks.c ++++ b/drivers/hid/hid-quirks.c +@@ -174,6 +174,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 + diff --git a/queue-5.4/hid-asus-ignore-asus-vendor-page-usage-code-0xff-eve.patch b/queue-5.4/hid-asus-ignore-asus-vendor-page-usage-code-0xff-eve.patch new file mode 100644 index 00000000000..3f6ecb24451 --- /dev/null +++ b/queue-5.4/hid-asus-ignore-asus-vendor-page-usage-code-0xff-eve.patch @@ -0,0 +1,43 @@ +From 1246c8af131cc309da0fc2135f0a1dc156f73d4a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2019 13:59:09 +0200 +Subject: HID: asus: Ignore Asus vendor-page usage-code 0xff events + +From: Hans de Goede + +[ Upstream commit c07a0254c89e4bb69ca781cd488baa5b628e2754 ] + +At least on a T100HA an Asus vendor-page usage-code 0xff event is send on +every suspend and again on resume, resulting in the following warning: + +asus 0003:0B05:1807.0002: Unmapped Asus vendor usagepage code 0xff + +being logged twice on every suspend/resume. + +This commit silences the "Unmapped Asus vendor usagepage code ..." +warning for usage-code 0xff to avoid these warnings being logged. + +Signed-off-by: Hans de Goede +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + drivers/hid/hid-asus.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c +index 8063b1d567b1d..e6e4c841fb06f 100644 +--- a/drivers/hid/hid-asus.c ++++ b/drivers/hid/hid-asus.c +@@ -261,7 +261,8 @@ static int asus_event(struct hid_device *hdev, struct hid_field *field, + struct hid_usage *usage, __s32 value) + { + if ((usage->hid & HID_USAGE_PAGE) == 0xff310000 && +- (usage->hid & HID_USAGE) != 0x00 && !usage->type) { ++ (usage->hid & HID_USAGE) != 0x00 && ++ (usage->hid & HID_USAGE) != 0xff && !usage->type) { + hid_warn(hdev, "Unmapped Asus vendor usagepage code 0x%02x\n", + usage->hid & HID_USAGE); + } +-- +2.20.1 + diff --git a/queue-5.4/hid-intel-ish-hid-ipc-add-cmp-device-id.patch b/queue-5.4/hid-intel-ish-hid-ipc-add-cmp-device-id.patch new file mode 100644 index 00000000000..a39799aa784 --- /dev/null +++ b/queue-5.4/hid-intel-ish-hid-ipc-add-cmp-device-id.patch @@ -0,0 +1,47 @@ +From 13b09a453e0a6c6ccd440c7525c9b86ec6ee75fa Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Dec 2019 09:11:18 +0800 +Subject: HID: intel-ish-hid: ipc: add CMP device id + +From: Even Xu + +[ Upstream commit abb33ee8a8c0d146b4b2c52937dc86a15ec92d05 ] + +Add Comet Lake H into ishtp support list. + +Signed-off-by: Even Xu +Acked-by: Srinivas Pandruvada +Signed-off-by: Benjamin Tissoires +Signed-off-by: Sasha Levin +--- + drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/drivers/hid/intel-ish-hid/ipc/hw-ish.h b/drivers/hid/intel-ish-hid/ipc/hw-ish.h +index 6c1e6110867f0..905e1bc3f91db 100644 +--- a/drivers/hid/intel-ish-hid/ipc/hw-ish.h ++++ b/drivers/hid/intel-ish-hid/ipc/hw-ish.h +@@ -24,6 +24,7 @@ + #define ICL_MOBILE_DEVICE_ID 0x34FC + #define SPT_H_DEVICE_ID 0xA135 + #define CML_LP_DEVICE_ID 0x02FC ++#define CMP_H_DEVICE_ID 0x06FC + #define EHL_Ax_DEVICE_ID 0x4BB3 + + #define REVISION_ID_CHT_A0 0x6 +diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c +index 784dcc8c70228..9c8cefe16af3e 100644 +--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c ++++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c +@@ -34,6 +34,7 @@ static const struct pci_device_id ish_pci_tbl[] = { + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, ICL_MOBILE_DEVICE_ID)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, SPT_H_DEVICE_ID)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CML_LP_DEVICE_ID)}, ++ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CMP_H_DEVICE_ID)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, EHL_Ax_DEVICE_ID)}, + {0, } + }; +-- +2.20.1 + diff --git a/queue-5.4/hid-intel-ish-hid-ipc-add-tiger-lake-pci-device-id.patch b/queue-5.4/hid-intel-ish-hid-ipc-add-tiger-lake-pci-device-id.patch new file mode 100644 index 00000000000..5e5d78b2ccd --- /dev/null +++ b/queue-5.4/hid-intel-ish-hid-ipc-add-tiger-lake-pci-device-id.patch @@ -0,0 +1,46 @@ +From 8a1d30f77433a1bc39c99eece42f4930ea03a86a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 27 Dec 2019 13:40:57 -0800 +Subject: HID: intel-ish-hid: ipc: Add Tiger Lake PCI device ID + +From: Srinivas Pandruvada + +[ Upstream commit 1479a82d82df68dfac29c72c774cb8bdc17d4eb1 ] + +Added Tiger Lake PCI device ID to the supported device list. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/drivers/hid/intel-ish-hid/ipc/hw-ish.h b/drivers/hid/intel-ish-hid/ipc/hw-ish.h +index 905e1bc3f91db..1fb294ca463e5 100644 +--- a/drivers/hid/intel-ish-hid/ipc/hw-ish.h ++++ b/drivers/hid/intel-ish-hid/ipc/hw-ish.h +@@ -26,6 +26,7 @@ + #define CML_LP_DEVICE_ID 0x02FC + #define CMP_H_DEVICE_ID 0x06FC + #define EHL_Ax_DEVICE_ID 0x4BB3 ++#define TGL_LP_DEVICE_ID 0xA0FC + + #define REVISION_ID_CHT_A0 0x6 + #define REVISION_ID_CHT_Ax_SI 0x0 +diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c +index 9c8cefe16af3e..f491d8b4e24c7 100644 +--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c ++++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c +@@ -36,6 +36,7 @@ static const struct pci_device_id ish_pci_tbl[] = { + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CML_LP_DEVICE_ID)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CMP_H_DEVICE_ID)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, EHL_Ax_DEVICE_ID)}, ++ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, TGL_LP_DEVICE_ID)}, + {0, } + }; + MODULE_DEVICE_TABLE(pci, ish_pci_tbl); +-- +2.20.1 + diff --git a/queue-5.4/hid-ite-add-usb-id-match-for-acer-sw5-012-keyboard-d.patch b/queue-5.4/hid-ite-add-usb-id-match-for-acer-sw5-012-keyboard-d.patch new file mode 100644 index 00000000000..f1a99151938 --- /dev/null +++ b/queue-5.4/hid-ite-add-usb-id-match-for-acer-sw5-012-keyboard-d.patch @@ -0,0 +1,56 @@ +From 148a39d1a0ee6762042f3ceebeab815c0b6e2237 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + 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 2888817261999..27795eac93e35 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -1099,6 +1099,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_DEVICE_ID_SYNAPTICS_ACER_SWITCH5 0x81a7 + +diff --git a/drivers/hid/hid-ite.c b/drivers/hid/hid-ite.c +index a45f2352618d3..c436e12feb233 100644 +--- a/drivers/hid/hid-ite.c ++++ b/drivers/hid/hid-ite.c +@@ -40,6 +40,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 + diff --git a/queue-5.4/hid-multitouch-add-lg-melf0410-i2c-touchscreen-suppo.patch b/queue-5.4/hid-multitouch-add-lg-melf0410-i2c-touchscreen-suppo.patch new file mode 100644 index 00000000000..68de85a120e --- /dev/null +++ b/queue-5.4/hid-multitouch-add-lg-melf0410-i2c-touchscreen-suppo.patch @@ -0,0 +1,49 @@ +From 508e19b8ceee53557c5d17e1b6e2c1169e3560dc Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 4 Dec 2019 20:42:07 +0800 +Subject: HID: multitouch: Add LG MELF0410 I2C touchscreen support + +From: Aaron Ma + +[ Upstream commit 348b80b273fbf4ce2a307f9e38eadecf37828cad ] + +Add multitouch support for LG MELF I2C touchscreen. +Apply the same workaround as LG USB touchscreen. + +Signed-off-by: Aaron Ma +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + 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 6273e7178e785..2888817261999 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -730,6 +730,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 3cfeb1629f79f..f0d4172d51319 100644 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -1985,6 +1985,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 + diff --git a/queue-5.4/hid-steam-fix-input-device-disappearing.patch b/queue-5.4/hid-steam-fix-input-device-disappearing.patch new file mode 100644 index 00000000000..85697c6b9c3 --- /dev/null +++ b/queue-5.4/hid-steam-fix-input-device-disappearing.patch @@ -0,0 +1,44 @@ +From 6ee5954632b5c267691cb96898b98a713eaa4891 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 7 Jan 2020 20:48:13 +0100 +Subject: HID: steam: Fix input device disappearing + +From: Rodrigo Rivas Costa + +[ 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 +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-5.4/hid-wacom-recognize-new-mobilestudio-pro-pid.patch b/queue-5.4/hid-wacom-recognize-new-mobilestudio-pro-pid.patch new file mode 100644 index 00000000000..b70b0c6689e --- /dev/null +++ b/queue-5.4/hid-wacom-recognize-new-mobilestudio-pro-pid.patch @@ -0,0 +1,45 @@ +From dea848c37df959bd16da897ec165603478707609 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 16 Dec 2019 10:18:57 -0800 +Subject: HID: wacom: Recognize new MobileStudio Pro PID + +From: Jason Gerecke + +[ Upstream commit fe4e940f0f91b4a506f048b42e00386f5ad322b6 ] + +A new PID is in use for repaired MobileStudio Pro devices. Add it to the +list of devices that need special-casing in wacom_wac_pad_event. + +Signed-off-by: Jason Gerecke +Signed-off-by: Benjamin Tissoires +Signed-off-by: Sasha Levin +--- + drivers/hid/wacom_wac.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c +index ccb74529bc782..d99a9d407671c 100644 +--- a/drivers/hid/wacom_wac.c ++++ b/drivers/hid/wacom_wac.c +@@ -2096,14 +2096,16 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field + (hdev->product == 0x34d || hdev->product == 0x34e || /* MobileStudio Pro */ + hdev->product == 0x357 || hdev->product == 0x358 || /* Intuos Pro 2 */ + hdev->product == 0x392 || /* Intuos Pro 2 */ +- hdev->product == 0x398 || hdev->product == 0x399)) { /* MobileStudio Pro */ ++ hdev->product == 0x398 || hdev->product == 0x399 || /* MobileStudio Pro */ ++ hdev->product == 0x3AA)) { /* MobileStudio Pro */ + value = (field->logical_maximum - value); + + if (hdev->product == 0x357 || hdev->product == 0x358 || + hdev->product == 0x392) + value = wacom_offset_rotation(input, usage, value, 3, 16); + else if (hdev->product == 0x34d || hdev->product == 0x34e || +- hdev->product == 0x398 || hdev->product == 0x399) ++ hdev->product == 0x398 || hdev->product == 0x399 || ++ hdev->product == 0x3AA) + value = wacom_offset_rotation(input, usage, value, 1, 2); + } + else { +-- +2.20.1 + diff --git a/queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-device.patch b/queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-device.patch new file mode 100644 index 00000000000..b4bc212d345 --- /dev/null +++ b/queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-device.patch @@ -0,0 +1,290 @@ +From 7b39eeda9ddfe1ef708b447b1983c97cfa7de57a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 22 Oct 2019 16:01:20 -0600 +Subject: iommu/amd: Support multiple PCI DMA aliases in device table + +From: Logan Gunthorpe + +[ Upstream commit 3332364e4ebc0581d133a334645a20fd13b580f1 ] + +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 ignores all the PCI aliases except the last one so DMA +transfers from these aliases will be blocked on AMD hardware with the +IOMMU enabled. + +To fix this, ensure the DTEs are cloned for every PCI alias. This is +done by copying the DTE data for each alias as well as the IVRS alias +every time it is changed. + +Signed-off-by: Logan Gunthorpe +Signed-off-by: Joerg Roedel +Signed-off-by: Sasha Levin +--- + drivers/iommu/amd_iommu.c | 133 +++++++++++++++----------------- + drivers/iommu/amd_iommu_types.h | 2 +- + 2 files changed, 62 insertions(+), 73 deletions(-) + +diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c +index dd555078258c4..16e0e3af2de0e 100644 +--- a/drivers/iommu/amd_iommu.c ++++ b/drivers/iommu/amd_iommu.c +@@ -226,71 +226,61 @@ static struct iommu_dev_data *search_dev_data(u16 devid) + return NULL; + } + +-static int __last_alias(struct pci_dev *pdev, u16 alias, void *data) ++static int clone_alias(struct pci_dev *pdev, u16 alias, void *data) + { +- *(u16 *)data = alias; +- return 0; +-} +- +-static u16 get_alias(struct device *dev) +-{ +- struct pci_dev *pdev = to_pci_dev(dev); +- u16 devid, ivrs_alias, pci_alias; ++ u16 devid = pci_dev_id(pdev); + +- /* The callers make sure that get_device_id() does not fail here */ +- devid = get_device_id(dev); +- +- /* For ACPI HID devices, we simply return the devid as such */ +- if (!dev_is_pci(dev)) +- return devid; ++ if (devid == alias) ++ return 0; + +- ivrs_alias = amd_iommu_alias_table[devid]; ++ amd_iommu_rlookup_table[alias] = ++ amd_iommu_rlookup_table[devid]; ++ memcpy(amd_iommu_dev_table[alias].data, ++ amd_iommu_dev_table[devid].data, ++ sizeof(amd_iommu_dev_table[alias].data)); + +- pci_for_each_dma_alias(pdev, __last_alias, &pci_alias); ++ return 0; ++} + +- if (ivrs_alias == pci_alias) +- return ivrs_alias; ++static void clone_aliases(struct pci_dev *pdev) ++{ ++ if (!pdev) ++ return; + + /* +- * DMA alias showdown +- * +- * The IVRS is fairly reliable in telling us about aliases, but it +- * can't know about every screwy device. If we don't have an IVRS +- * reported alias, use the PCI reported alias. In that case we may +- * still need to initialize the rlookup and dev_table entries if the +- * alias is to a non-existent device. ++ * The IVRS alias stored in the alias table may not be ++ * part of the PCI DMA aliases if it's bus differs ++ * from the original device. + */ +- if (ivrs_alias == devid) { +- if (!amd_iommu_rlookup_table[pci_alias]) { +- amd_iommu_rlookup_table[pci_alias] = +- amd_iommu_rlookup_table[devid]; +- memcpy(amd_iommu_dev_table[pci_alias].data, +- amd_iommu_dev_table[devid].data, +- sizeof(amd_iommu_dev_table[pci_alias].data)); +- } ++ clone_alias(pdev, amd_iommu_alias_table[pci_dev_id(pdev)], NULL); + +- return pci_alias; +- } ++ pci_for_each_dma_alias(pdev, clone_alias, NULL); ++} + +- pci_info(pdev, "Using IVRS reported alias %02x:%02x.%d " +- "for device [%04x:%04x], kernel reported alias " +- "%02x:%02x.%d\n", PCI_BUS_NUM(ivrs_alias), PCI_SLOT(ivrs_alias), +- PCI_FUNC(ivrs_alias), pdev->vendor, pdev->device, +- PCI_BUS_NUM(pci_alias), PCI_SLOT(pci_alias), +- PCI_FUNC(pci_alias)); ++static struct pci_dev *setup_aliases(struct device *dev) ++{ ++ struct pci_dev *pdev = to_pci_dev(dev); ++ u16 ivrs_alias; ++ ++ /* For ACPI HID devices, there are no aliases */ ++ if (!dev_is_pci(dev)) ++ return NULL; + + /* +- * If we don't have a PCI DMA alias and the IVRS alias is on the same +- * bus, then the IVRS table may know about a quirk that we don't. ++ * Add the IVRS alias to the pci aliases if it is on the same ++ * bus. The IVRS table may know about a quirk that we don't. + */ +- if (pci_alias == devid && ++ ivrs_alias = amd_iommu_alias_table[pci_dev_id(pdev)]; ++ if (ivrs_alias != pci_dev_id(pdev) && + PCI_BUS_NUM(ivrs_alias) == pdev->bus->number) { + pci_add_dma_alias(pdev, ivrs_alias & 0xff); + pci_info(pdev, "Added PCI DMA alias %02x.%d\n", + PCI_SLOT(ivrs_alias), PCI_FUNC(ivrs_alias)); + } + +- return ivrs_alias; ++ clone_aliases(pdev); ++ ++ return pdev; + } + + static struct iommu_dev_data *find_dev_data(u16 devid) +@@ -428,7 +418,7 @@ static int iommu_init_device(struct device *dev) + if (!dev_data) + return -ENOMEM; + +- dev_data->alias = get_alias(dev); ++ dev_data->pdev = setup_aliases(dev); + + /* + * By default we use passthrough mode for IOMMUv2 capable device. +@@ -453,20 +443,16 @@ static int iommu_init_device(struct device *dev) + + static void iommu_ignore_device(struct device *dev) + { +- u16 alias; + int devid; + + devid = get_device_id(dev); + if (devid < 0) + return; + +- alias = get_alias(dev); +- ++ amd_iommu_rlookup_table[devid] = NULL; + memset(&amd_iommu_dev_table[devid], 0, sizeof(struct dev_table_entry)); +- memset(&amd_iommu_dev_table[alias], 0, sizeof(struct dev_table_entry)); + +- amd_iommu_rlookup_table[devid] = NULL; +- amd_iommu_rlookup_table[alias] = NULL; ++ setup_aliases(dev); + } + + static void iommu_uninit_device(struct device *dev) +@@ -1236,6 +1222,13 @@ static int device_flush_iotlb(struct iommu_dev_data *dev_data, + return iommu_queue_command(iommu, &cmd); + } + ++static int device_flush_dte_alias(struct pci_dev *pdev, u16 alias, void *data) ++{ ++ struct amd_iommu *iommu = data; ++ ++ return iommu_flush_dte(iommu, alias); ++} ++ + /* + * Command send function for invalidating a device table entry + */ +@@ -1246,14 +1239,22 @@ static int device_flush_dte(struct iommu_dev_data *dev_data) + int ret; + + iommu = amd_iommu_rlookup_table[dev_data->devid]; +- alias = dev_data->alias; + +- ret = iommu_flush_dte(iommu, dev_data->devid); +- if (!ret && alias != dev_data->devid) +- ret = iommu_flush_dte(iommu, alias); ++ if (dev_data->pdev) ++ ret = pci_for_each_dma_alias(dev_data->pdev, ++ device_flush_dte_alias, iommu); ++ else ++ ret = iommu_flush_dte(iommu, dev_data->devid); + if (ret) + return ret; + ++ alias = amd_iommu_alias_table[dev_data->devid]; ++ if (alias != dev_data->devid) { ++ ret = iommu_flush_dte(iommu, alias); ++ if (ret) ++ return ret; ++ } ++ + if (dev_data->ats.enabled) + ret = device_flush_iotlb(dev_data, 0, ~0UL); + +@@ -2035,11 +2036,9 @@ static void do_attach(struct iommu_dev_data *dev_data, + struct protection_domain *domain) + { + struct amd_iommu *iommu; +- u16 alias; + bool ats; + + iommu = amd_iommu_rlookup_table[dev_data->devid]; +- alias = dev_data->alias; + ats = dev_data->ats.enabled; + + /* Update data structures */ +@@ -2052,8 +2051,7 @@ static void do_attach(struct iommu_dev_data *dev_data, + + /* Update device table */ + set_dte_entry(dev_data->devid, domain, ats, dev_data->iommu_v2); +- if (alias != dev_data->devid) +- set_dte_entry(alias, domain, ats, dev_data->iommu_v2); ++ clone_aliases(dev_data->pdev); + + device_flush_dte(dev_data); + } +@@ -2062,17 +2060,14 @@ static void do_detach(struct iommu_dev_data *dev_data) + { + struct protection_domain *domain = dev_data->domain; + struct amd_iommu *iommu; +- u16 alias; + + iommu = amd_iommu_rlookup_table[dev_data->devid]; +- alias = dev_data->alias; + + /* Update data structures */ + dev_data->domain = NULL; + list_del(&dev_data->list); + clear_dte_entry(dev_data->devid); +- if (alias != dev_data->devid) +- clear_dte_entry(alias); ++ clone_aliases(dev_data->pdev); + + /* Flush the DTE entry */ + device_flush_dte(dev_data); +@@ -2384,13 +2379,7 @@ static void update_device_table(struct protection_domain *domain) + list_for_each_entry(dev_data, &domain->dev_list, list) { + set_dte_entry(dev_data->devid, domain, dev_data->ats.enabled, + dev_data->iommu_v2); +- +- if (dev_data->devid == dev_data->alias) +- continue; +- +- /* There is an alias, update device table entry for it */ +- set_dte_entry(dev_data->alias, domain, dev_data->ats.enabled, +- dev_data->iommu_v2); ++ clone_aliases(dev_data->pdev); + } + } + +diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h +index 17bd5a349119f..fc956479b94e6 100644 +--- a/drivers/iommu/amd_iommu_types.h ++++ b/drivers/iommu/amd_iommu_types.h +@@ -639,8 +639,8 @@ struct iommu_dev_data { + struct list_head list; /* For domain->dev_list */ + struct llist_node dev_data_list; /* For global dev_data_list */ + struct protection_domain *domain; /* Domain the device is bound to */ ++ struct pci_dev *pdev; + u16 devid; /* PCI Device ID */ +- u16 alias; /* Alias Device ID */ + bool iommu_v2; /* Device can make use of IOMMUv2 */ + bool passthrough; /* Device is identity mapped */ + struct { +-- +2.20.1 + diff --git a/queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-irq-re.patch b/queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-irq-re.patch new file mode 100644 index 00000000000..86c7d6e3b68 --- /dev/null +++ b/queue-5.4/iommu-amd-support-multiple-pci-dma-aliases-in-irq-re.patch @@ -0,0 +1,123 @@ +From a124e8793488e83ad882d2fd55d7131861b60b97 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 22 Oct 2019 16:01:21 -0600 +Subject: iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping + +From: Logan Gunthorpe + +[ 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 +Signed-off-by: Joerg Roedel +Signed-off-by: Sasha Levin +--- + 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 16e0e3af2de0e..454695b372c8c 100644 +--- a/drivers/iommu/amd_iommu.c ++++ b/drivers/iommu/amd_iommu.c +@@ -3741,7 +3741,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; +@@ -3787,7 +3800,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); + +@@ -3804,7 +3822,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; +@@ -3814,7 +3833,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; + +@@ -4247,7 +4266,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) { + /* +@@ -4264,11 +4283,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 + diff --git a/queue-5.4/iommu-dma-fix-variable-cookie-set-but-not-used.patch b/queue-5.4/iommu-dma-fix-variable-cookie-set-but-not-used.patch new file mode 100644 index 00000000000..50a97c9ab88 --- /dev/null +++ b/queue-5.4/iommu-dma-fix-variable-cookie-set-but-not-used.patch @@ -0,0 +1,51 @@ +From e9dc9046fe8ec1a0038593ba0204c2939e83f221 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 6 Jan 2020 10:27:27 -0500 +Subject: iommu/dma: fix variable 'cookie' set but not used + +From: Qian Cai + +[ Upstream commit 55817b340a31951d23d1692db45522560b1d20f9 ] + +The commit c18647900ec8 ("iommu/dma: Relax locking in +iommu_dma_prepare_msi()") introduced a compliation warning, + +drivers/iommu/dma-iommu.c: In function 'iommu_dma_prepare_msi': +drivers/iommu/dma-iommu.c:1206:27: warning: variable 'cookie' set but +not used [-Wunused-but-set-variable] + struct iommu_dma_cookie *cookie; + ^~~~~~ + +Fixes: c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") +Signed-off-by: Qian Cai +Acked-by: Robin Murphy +Signed-off-by: Joerg Roedel +Signed-off-by: Sasha Levin +--- + drivers/iommu/dma-iommu.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c +index 51456e7f264f9..c68a1f072c314 100644 +--- a/drivers/iommu/dma-iommu.c ++++ b/drivers/iommu/dma-iommu.c +@@ -1177,7 +1177,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr) + { + struct device *dev = msi_desc_to_dev(desc); + struct iommu_domain *domain = iommu_get_domain_for_dev(dev); +- struct iommu_dma_cookie *cookie; + struct iommu_dma_msi_page *msi_page; + static DEFINE_MUTEX(msi_prepare_lock); /* see below */ + +@@ -1186,8 +1185,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr) + return 0; + } + +- cookie = domain->iova_cookie; +- + /* + * In fact the whole prepare operation should already be serialised by + * irq_domain_mutex further up the callchain, but that's pretty subtle +-- +2.20.1 + diff --git a/queue-5.4/libbpf-fix-btf-defined-map-s-__type-macro-handling-o.patch b/queue-5.4/libbpf-fix-btf-defined-map-s-__type-macro-handling-o.patch new file mode 100644 index 00000000000..0f2187cb196 --- /dev/null +++ b/queue-5.4/libbpf-fix-btf-defined-map-s-__type-macro-handling-o.patch @@ -0,0 +1,59 @@ +From de43c43fcf9650e2af9874657da8db06ddfbe8c2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 3 Oct 2019 21:02:11 -0700 +Subject: libbpf: Fix BTF-defined map's __type macro handling of arrays + +From: Andrii Nakryiko + +[ Upstream commit a53ba15d81995868651dd28a85d8045aef3d4e20 ] + +Due to a quirky C syntax of declaring pointers to array or function +prototype, existing __type() macro doesn't work with map key/value types +that are array or function prototype. One has to create a typedef first +and use it to specify key/value type for a BPF map. By using typeof(), +pointer to type is now handled uniformly for all kinds of types. Convert +one of self-tests as a demonstration. + +Signed-off-by: Andrii Nakryiko +Signed-off-by: Alexei Starovoitov +Link: https://lore.kernel.org/bpf/20191004040211.2434033-1-andriin@fb.com +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/bpf/bpf_helpers.h | 2 +- + tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h +index 54a50699bbfda..9f77cbaac01c1 100644 +--- a/tools/testing/selftests/bpf/bpf_helpers.h ++++ b/tools/testing/selftests/bpf/bpf_helpers.h +@@ -3,7 +3,7 @@ + #define __BPF_HELPERS__ + + #define __uint(name, val) int (*name)[val] +-#define __type(name, val) val *name ++#define __type(name, val) typeof(val) *name + + /* helper macro to print out debug messages */ + #define bpf_printk(fmt, ...) \ +diff --git a/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c b/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c +index f8ffa3f3d44bb..6cc4479ac9df6 100644 +--- a/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c ++++ b/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c +@@ -47,12 +47,11 @@ struct { + * issue and avoid complicated C programming massaging. + * This is an acceptable workaround since there is one entry here. + */ +-typedef __u64 raw_stack_trace_t[2 * MAX_STACK_RAWTP]; + struct { + __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); + __uint(max_entries, 1); + __type(key, __u32); +- __type(value, raw_stack_trace_t); ++ __type(value, __u64[2 * MAX_STACK_RAWTP]); + } rawdata_map SEC(".maps"); + + SEC("raw_tracepoint/sys_enter") +-- +2.20.1 + diff --git a/queue-5.4/media-dvbsky-add-support-for-eyetv-geniatech-t2-lite.patch b/queue-5.4/media-dvbsky-add-support-for-eyetv-geniatech-t2-lite.patch new file mode 100644 index 00000000000..6c0996c0e3a --- /dev/null +++ b/queue-5.4/media-dvbsky-add-support-for-eyetv-geniatech-t2-lite.patch @@ -0,0 +1,51 @@ +From 29eb023f434a9f71737e026285f8df189d6f0cad Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 2 Oct 2019 14:26:03 -0300 +Subject: media: dvbsky: add support for eyeTV Geniatech T2 lite + +From: Thomas Voegtle + +[ Upstream commit 14494583336880640654300c76d0f5df3360d85f ] + +Adds USB ID for the eyeTV Geniatech T2 lite to the dvbsky driver. +This is a Geniatech T230C based stick without IR and a different USB ID. + +Signed-off-by: Thomas Voegtle +Tested-by: Jan Pieter van Woerkom +Signed-off-by: Sean Young +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Sasha Levin +--- + drivers/media/usb/dvb-usb-v2/dvbsky.c | 3 +++ + include/media/dvb-usb-ids.h | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c +index 617a306f6815d..dc380c0c95369 100644 +--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c ++++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c +@@ -792,6 +792,9 @@ static const struct usb_device_id dvbsky_id_table[] = { + { DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C, + &mygica_t230c_props, "MyGica Mini DVB-T2 USB Stick T230C", + RC_MAP_TOTAL_MEDIA_IN_HAND_02) }, ++ { DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C_LITE, ++ &mygica_t230c_props, "MyGica Mini DVB-T2 USB Stick T230C Lite", ++ NULL) }, + { DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C2, + &mygica_t230c_props, "MyGica Mini DVB-T2 USB Stick T230C v2", + RC_MAP_TOTAL_MEDIA_IN_HAND_02) }, +diff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h +index 7ce4e83324219..1409230ad3a4c 100644 +--- a/include/media/dvb-usb-ids.h ++++ b/include/media/dvb-usb-ids.h +@@ -389,6 +389,7 @@ + #define USB_PID_MYGICA_T230 0xc688 + #define USB_PID_MYGICA_T230C 0xc689 + #define USB_PID_MYGICA_T230C2 0xc68a ++#define USB_PID_MYGICA_T230C_LITE 0xc699 + #define USB_PID_ELGATO_EYETV_DIVERSITY 0x0011 + #define USB_PID_ELGATO_EYETV_DTT 0x0021 + #define USB_PID_ELGATO_EYETV_DTT_2 0x003f +-- +2.20.1 + diff --git a/queue-5.4/mfd-intel-lpss-add-intel-comet-lake-pch-h-pci-ids.patch b/queue-5.4/mfd-intel-lpss-add-intel-comet-lake-pch-h-pci-ids.patch new file mode 100644 index 00000000000..183cfe9ef9b --- /dev/null +++ b/queue-5.4/mfd-intel-lpss-add-intel-comet-lake-pch-h-pci-ids.patch @@ -0,0 +1,53 @@ +From 5ec3266d12f5f14d36521c318103890b72f400ba Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 29 Oct 2019 11:44:09 +0200 +Subject: mfd: intel-lpss: Add Intel Comet Lake PCH-H PCI IDs + +From: Andy Shevchenko + +[ Upstream commit dd047dce3a6f5233b98e792e2287cc549da35879 ] + +Intel Comet Lake PCH-H has the same LPSS than Intel Cannon Lake. +Add the new IDs to the list of supported devices. + +Signed-off-by: Andy Shevchenko +Signed-off-by: Lee Jones +Signed-off-by: Sasha Levin +--- + drivers/mfd/intel-lpss-pci.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c +index 1767f30a16761..b33030e3385c7 100644 +--- a/drivers/mfd/intel-lpss-pci.c ++++ b/drivers/mfd/intel-lpss-pci.c +@@ -140,7 +140,7 @@ static const struct intel_lpss_platform_info cnl_i2c_info = { + }; + + static const struct pci_device_id intel_lpss_pci_ids[] = { +- /* CML */ ++ /* CML-LP */ + { PCI_VDEVICE(INTEL, 0x02a8), (kernel_ulong_t)&spt_uart_info }, + { PCI_VDEVICE(INTEL, 0x02a9), (kernel_ulong_t)&spt_uart_info }, + { PCI_VDEVICE(INTEL, 0x02aa), (kernel_ulong_t)&spt_info }, +@@ -153,6 +153,17 @@ static const struct pci_device_id intel_lpss_pci_ids[] = { + { PCI_VDEVICE(INTEL, 0x02ea), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x02eb), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x02fb), (kernel_ulong_t)&spt_info }, ++ /* CML-H */ ++ { PCI_VDEVICE(INTEL, 0x06a8), (kernel_ulong_t)&spt_uart_info }, ++ { PCI_VDEVICE(INTEL, 0x06a9), (kernel_ulong_t)&spt_uart_info }, ++ { PCI_VDEVICE(INTEL, 0x06aa), (kernel_ulong_t)&spt_info }, ++ { PCI_VDEVICE(INTEL, 0x06ab), (kernel_ulong_t)&spt_info }, ++ { PCI_VDEVICE(INTEL, 0x06c7), (kernel_ulong_t)&spt_uart_info }, ++ { PCI_VDEVICE(INTEL, 0x06e8), (kernel_ulong_t)&cnl_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x06e9), (kernel_ulong_t)&cnl_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x06ea), (kernel_ulong_t)&cnl_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x06eb), (kernel_ulong_t)&cnl_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x06fb), (kernel_ulong_t)&spt_info }, + /* BXT A-Step */ + { PCI_VDEVICE(INTEL, 0x0aac), (kernel_ulong_t)&bxt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x0aae), (kernel_ulong_t)&bxt_i2c_info }, +-- +2.20.1 + diff --git a/queue-5.4/mmc-sdhci-pci-add-support-for-intel-jsl.patch b/queue-5.4/mmc-sdhci-pci-add-support-for-intel-jsl.patch new file mode 100644 index 00000000000..d47e1ddbdd9 --- /dev/null +++ b/queue-5.4/mmc-sdhci-pci-add-support-for-intel-jsl.patch @@ -0,0 +1,48 @@ +From c4249a645b2a49be9c575b757ffcf8c557004e35 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 10 Oct 2019 15:46:30 +0300 +Subject: mmc: sdhci-pci: Add support for Intel JSL + +From: Adrian Hunter + +[ Upstream commit 315e3bd7ac19b18ba704d96cbb9b79bad485c01f ] + +Add PCI Ids for Intel JSL. + +Signed-off-by: Adrian Hunter +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +--- + drivers/mmc/host/sdhci-pci-core.c | 2 ++ + drivers/mmc/host/sdhci-pci.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c +index 96a163f36a395..c9ea365c248c0 100644 +--- a/drivers/mmc/host/sdhci-pci-core.c ++++ b/drivers/mmc/host/sdhci-pci-core.c +@@ -1730,6 +1730,8 @@ static const struct pci_device_id pci_ids[] = { + SDHCI_PCI_DEVICE(INTEL, CML_EMMC, intel_glk_emmc), + SDHCI_PCI_DEVICE(INTEL, CML_SD, intel_byt_sd), + SDHCI_PCI_DEVICE(INTEL, CMLH_SD, intel_byt_sd), ++ SDHCI_PCI_DEVICE(INTEL, JSL_EMMC, intel_glk_emmc), ++ SDHCI_PCI_DEVICE(INTEL, JSL_SD, intel_byt_sd), + SDHCI_PCI_DEVICE(O2, 8120, o2), + SDHCI_PCI_DEVICE(O2, 8220, o2), + SDHCI_PCI_DEVICE(O2, 8221, o2), +diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h +index 558202fe64c67..981bbbe63aff5 100644 +--- a/drivers/mmc/host/sdhci-pci.h ++++ b/drivers/mmc/host/sdhci-pci.h +@@ -55,6 +55,8 @@ + #define PCI_DEVICE_ID_INTEL_CML_EMMC 0x02c4 + #define PCI_DEVICE_ID_INTEL_CML_SD 0x02f5 + #define PCI_DEVICE_ID_INTEL_CMLH_SD 0x06f5 ++#define PCI_DEVICE_ID_INTEL_JSL_EMMC 0x4dc4 ++#define PCI_DEVICE_ID_INTEL_JSL_SD 0x4df8 + + #define PCI_DEVICE_ID_SYSKONNECT_8000 0x8000 + #define PCI_DEVICE_ID_VIA_95D0 0x95d0 +-- +2.20.1 + diff --git a/queue-5.4/mmc-sdhci-pci-quirk-for-amd-sdhc-device-0x7906.patch b/queue-5.4/mmc-sdhci-pci-quirk-for-amd-sdhc-device-0x7906.patch new file mode 100644 index 00000000000..558ec5bb562 --- /dev/null +++ b/queue-5.4/mmc-sdhci-pci-quirk-for-amd-sdhc-device-0x7906.patch @@ -0,0 +1,102 @@ +From 88a27769f1fe0de83ad81bb0561c89dccfdeddb3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 4 Sep 2019 10:46:25 -0600 +Subject: mmc: sdhci-pci: Quirk for AMD SDHC Device 0x7906 + +From: Raul E Rangel + +[ Upstream commit 7a869f00bb15bcefb8804d798a49b086267b03e6 ] + +AMD SDHC 0x7906 requires a hard reset to clear all internal state. +Otherwise it can get into a bad state where the DATA lines are always +read as zeros. + +This change requires firmware that can transition the device into +D3Cold for it to work correctly. If the firmware does not support +transitioning to D3Cold then the power state transitions are a no-op. + +Signed-off-by: Raul E Rangel +Signed-off-by: Shyam Sundar S K +Acked-by: Adrian Hunter +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +--- + drivers/mmc/host/sdhci-pci-core.c | 51 ++++++++++++++++++++++++++++++- + 1 file changed, 50 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c +index 642a9667db4dd..96a163f36a395 100644 +--- a/drivers/mmc/host/sdhci-pci-core.c ++++ b/drivers/mmc/host/sdhci-pci-core.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1598,11 +1599,59 @@ static int amd_probe(struct sdhci_pci_chip *chip) + return 0; + } + ++static u32 sdhci_read_present_state(struct sdhci_host *host) ++{ ++ return sdhci_readl(host, SDHCI_PRESENT_STATE); ++} ++ ++void amd_sdhci_reset(struct sdhci_host *host, u8 mask) ++{ ++ struct sdhci_pci_slot *slot = sdhci_priv(host); ++ struct pci_dev *pdev = slot->chip->pdev; ++ u32 present_state; ++ ++ /* ++ * SDHC 0x7906 requires a hard reset to clear all internal state. ++ * Otherwise it can get into a bad state where the DATA lines are always ++ * read as zeros. ++ */ ++ if (pdev->device == 0x7906 && (mask & SDHCI_RESET_ALL)) { ++ pci_clear_master(pdev); ++ ++ pci_save_state(pdev); ++ ++ pci_set_power_state(pdev, PCI_D3cold); ++ pr_debug("%s: power_state=%u\n", mmc_hostname(host->mmc), ++ pdev->current_state); ++ pci_set_power_state(pdev, PCI_D0); ++ ++ pci_restore_state(pdev); ++ ++ /* ++ * SDHCI_RESET_ALL says the card detect logic should not be ++ * reset, but since we need to reset the entire controller ++ * we should wait until the card detect logic has stabilized. ++ * ++ * This normally takes about 40ms. ++ */ ++ readx_poll_timeout( ++ sdhci_read_present_state, ++ host, ++ present_state, ++ present_state & SDHCI_CD_STABLE, ++ 10000, ++ 100000 ++ ); ++ } ++ ++ return sdhci_reset(host, mask); ++} ++ + static const struct sdhci_ops amd_sdhci_pci_ops = { + .set_clock = sdhci_set_clock, + .enable_dma = sdhci_pci_enable_dma, + .set_bus_width = sdhci_set_bus_width, +- .reset = sdhci_reset, ++ .reset = amd_sdhci_reset, + .set_uhs_signaling = sdhci_set_uhs_signaling, + }; + +-- +2.20.1 + diff --git a/queue-5.4/net-google-gve-remove-dma_wmb-before-ringing-doorbel.patch b/queue-5.4/net-google-gve-remove-dma_wmb-before-ringing-doorbel.patch new file mode 100644 index 00000000000..a0e765b776a --- /dev/null +++ b/queue-5.4/net-google-gve-remove-dma_wmb-before-ringing-doorbel.patch @@ -0,0 +1,71 @@ +From 736cd73ee05dd5e1642f44ad8d905018ed902261 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 3 Jan 2020 18:44:59 +0200 +Subject: net: Google gve: Remove dma_wmb() before ringing doorbell + +From: Liran Alon + +[ Upstream commit b54ef37b1ce892fdf6b632d566246d2f2f539910 ] + +Current code use dma_wmb() to ensure Rx/Tx descriptors are visible +to device before writing to doorbell. + +However, these dma_wmb() are wrong and unnecessary. Therefore, +they should be removed. + +iowrite32be() called from gve_rx_write_doorbell()/gve_tx_put_doorbell() +should guaratee that all previous writes to WB/UC memory is visible to +device before the write done by iowrite32be(). + +E.g. On ARM64, iowrite32be() calls __iowmb() which expands to dma_wmb() +and only then calls __raw_writel(). + +Reviewed-by: Si-Wei Liu +Signed-off-by: Liran Alon +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/google/gve/gve_rx.c | 2 -- + drivers/net/ethernet/google/gve/gve_tx.c | 6 ------ + 2 files changed, 8 deletions(-) + +diff --git a/drivers/net/ethernet/google/gve/gve_rx.c b/drivers/net/ethernet/google/gve/gve_rx.c +index edec61dfc8687..9f52e72ff641d 100644 +--- a/drivers/net/ethernet/google/gve/gve_rx.c ++++ b/drivers/net/ethernet/google/gve/gve_rx.c +@@ -418,8 +418,6 @@ bool gve_clean_rx_done(struct gve_rx_ring *rx, int budget, + rx->cnt = cnt; + rx->fill_cnt += work_done; + +- /* restock desc ring slots */ +- dma_wmb(); /* Ensure descs are visible before ringing doorbell */ + gve_rx_write_doorbell(priv, rx); + return gve_rx_work_pending(rx); + } +diff --git a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c +index f4889431f9b70..d0244feb03011 100644 +--- a/drivers/net/ethernet/google/gve/gve_tx.c ++++ b/drivers/net/ethernet/google/gve/gve_tx.c +@@ -487,10 +487,6 @@ netdev_tx_t gve_tx(struct sk_buff *skb, struct net_device *dev) + * may have added descriptors without ringing the doorbell. + */ + +- /* Ensure tx descs from a prior gve_tx are visible before +- * ringing doorbell. +- */ +- dma_wmb(); + gve_tx_put_doorbell(priv, tx->q_resources, tx->req); + return NETDEV_TX_BUSY; + } +@@ -505,8 +501,6 @@ netdev_tx_t gve_tx(struct sk_buff *skb, struct net_device *dev) + if (!netif_xmit_stopped(tx->netdev_txq) && netdev_xmit_more()) + return NETDEV_TX_OK; + +- /* Ensure tx descs are visible before ringing doorbell */ +- dma_wmb(); + gve_tx_put_doorbell(priv, tx->q_resources, tx->req); + return NETDEV_TX_OK; + } +-- +2.20.1 + diff --git a/queue-5.4/net-wan-sdla-fix-cast-from-pointer-to-integer-of-dif.patch b/queue-5.4/net-wan-sdla-fix-cast-from-pointer-to-integer-of-dif.patch new file mode 100644 index 00000000000..3831b8bcfcd --- /dev/null +++ b/queue-5.4/net-wan-sdla-fix-cast-from-pointer-to-integer-of-dif.patch @@ -0,0 +1,43 @@ +From cc0ac7653df319adba95be0fd9e6db4586617971 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 e2e679a01b65a..77ccf3672ede7 100644 +--- a/drivers/net/wan/sdla.c ++++ b/drivers/net/wan/sdla.c +@@ -708,7 +708,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 + diff --git a/queue-5.4/pci-add-dma-alias-quirk-for-intel-vca-ntb.patch b/queue-5.4/pci-add-dma-alias-quirk-for-intel-vca-ntb.patch new file mode 100644 index 00000000000..74875fd0eab --- /dev/null +++ b/queue-5.4/pci-add-dma-alias-quirk-for-intel-vca-ntb.patch @@ -0,0 +1,80 @@ +From 691faa2ac28aa3503461a5a52ce5f5897c4ecd24 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Sep 2019 09:20:48 +0000 +Subject: PCI: Add DMA alias quirk for Intel VCA NTB + +From: Slawomir Pawlowski + +[ 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 +Signed-off-by: Przemek Kitszel +Signed-off-by: Bjorn Helgaas +Signed-off-by: Sasha Levin +--- + drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 1593b8494ebbc..2f88b1ff7ada4 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -4080,6 +4080,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 + diff --git a/queue-5.4/perf-imx_ddr-add-enhanced-axi-id-filter-support.patch b/queue-5.4/perf-imx_ddr-add-enhanced-axi-id-filter-support.patch new file mode 100644 index 00000000000..b7cc9733d08 --- /dev/null +++ b/queue-5.4/perf-imx_ddr-add-enhanced-axi-id-filter-support.patch @@ -0,0 +1,117 @@ +From 7360af888097cd1176a80ed22820404b176b8ac2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 1 Nov 2019 08:36:16 +0000 +Subject: perf/imx_ddr: Add enhanced AXI ID filter support + +From: Joakim Zhang + +[ Upstream commit 44f8bd014a94ed679ddb77d0b92350d4ac4f23a5 ] + +With DDR_CAP_AXI_ID_FILTER quirk, indicating HW supports AXI ID filter +which only can get bursts from DDR transaction, i.e. DDR read/write +requests. + +This patch add DDR_CAP_AXI_ID_ENHANCED_FILTER quirk, indicating HW +supports AXI ID filter which can get bursts and bytes from DDR +transaction at the same time. We hope PMU always return bytes in the +driver due to it is more meaningful for users. + +Signed-off-by: Joakim Zhang +Signed-off-by: Will Deacon +Signed-off-by: Sasha Levin +--- + drivers/perf/fsl_imx8_ddr_perf.c | 63 +++++++++++++++++++++----------- + 1 file changed, 42 insertions(+), 21 deletions(-) + +diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c +index ce7345745b42c..2a3966d059e70 100644 +--- a/drivers/perf/fsl_imx8_ddr_perf.c ++++ b/drivers/perf/fsl_imx8_ddr_perf.c +@@ -45,7 +45,8 @@ + static DEFINE_IDA(ddr_ida); + + /* DDR Perf hardware feature */ +-#define DDR_CAP_AXI_ID_FILTER 0x1 /* support AXI ID filter */ ++#define DDR_CAP_AXI_ID_FILTER 0x1 /* support AXI ID filter */ ++#define DDR_CAP_AXI_ID_FILTER_ENHANCED 0x3 /* support enhanced AXI ID filter */ + + struct fsl_ddr_devtype_data { + unsigned int quirks; /* quirks needed for different DDR Perf core */ +@@ -178,6 +179,36 @@ static const struct attribute_group *attr_groups[] = { + NULL, + }; + ++static bool ddr_perf_is_filtered(struct perf_event *event) ++{ ++ return event->attr.config == 0x41 || event->attr.config == 0x42; ++} ++ ++static u32 ddr_perf_filter_val(struct perf_event *event) ++{ ++ return event->attr.config1; ++} ++ ++static bool ddr_perf_filters_compatible(struct perf_event *a, ++ struct perf_event *b) ++{ ++ if (!ddr_perf_is_filtered(a)) ++ return true; ++ if (!ddr_perf_is_filtered(b)) ++ return true; ++ return ddr_perf_filter_val(a) == ddr_perf_filter_val(b); ++} ++ ++static bool ddr_perf_is_enhanced_filtered(struct perf_event *event) ++{ ++ unsigned int filt; ++ struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); ++ ++ filt = pmu->devtype_data->quirks & DDR_CAP_AXI_ID_FILTER_ENHANCED; ++ return (filt == DDR_CAP_AXI_ID_FILTER_ENHANCED) && ++ ddr_perf_is_filtered(event); ++} ++ + static u32 ddr_perf_alloc_counter(struct ddr_pmu *pmu, int event) + { + int i; +@@ -209,27 +240,17 @@ static void ddr_perf_free_counter(struct ddr_pmu *pmu, int counter) + + static u32 ddr_perf_read_counter(struct ddr_pmu *pmu, int counter) + { +- return readl_relaxed(pmu->base + COUNTER_READ + counter * 4); +-} +- +-static bool ddr_perf_is_filtered(struct perf_event *event) +-{ +- return event->attr.config == 0x41 || event->attr.config == 0x42; +-} ++ struct perf_event *event = pmu->events[counter]; ++ void __iomem *base = pmu->base; + +-static u32 ddr_perf_filter_val(struct perf_event *event) +-{ +- return event->attr.config1; +-} +- +-static bool ddr_perf_filters_compatible(struct perf_event *a, +- struct perf_event *b) +-{ +- if (!ddr_perf_is_filtered(a)) +- return true; +- if (!ddr_perf_is_filtered(b)) +- return true; +- return ddr_perf_filter_val(a) == ddr_perf_filter_val(b); ++ /* ++ * return bytes instead of bursts from ddr transaction for ++ * axid-read and axid-write event if PMU core supports enhanced ++ * filter. ++ */ ++ base += ddr_perf_is_enhanced_filtered(event) ? COUNTER_DPCR1 : ++ COUNTER_READ; ++ return readl_relaxed(base + counter * 4); + } + + static int ddr_perf_event_init(struct perf_event *event) +-- +2.20.1 + diff --git a/queue-5.4/phy-cpcap-usb-prevent-usb-line-glitches-from-waking-.patch b/queue-5.4/phy-cpcap-usb-prevent-usb-line-glitches-from-waking-.patch new file mode 100644 index 00000000000..50a8c49acff --- /dev/null +++ b/queue-5.4/phy-cpcap-usb-prevent-usb-line-glitches-from-waking-.patch @@ -0,0 +1,94 @@ +From d0a1e9e3aab0f125910ce05d3e872c60a20b63ec Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 22 Dec 2019 10:17:02 -0800 +Subject: phy: cpcap-usb: Prevent USB line glitches from waking up modem + +From: Tony Lindgren + +[ 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 +Cc: Pavel Machek +Cc: Sebastian Reichel +Acked-by: Pavel Machek +Signed-off-by: Tony Lindgren +Signed-off-by: Kishon Vijay Abraham I +Signed-off-by: Sasha Levin +--- + 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 9a38741d3546d..5baf64dfb24de 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, + }; + +@@ -381,7 +381,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; + +@@ -408,6 +409,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: +@@ -420,7 +426,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; + +@@ -460,6 +467,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 + diff --git a/queue-5.4/phy-qcom-qmp-increase-phy-ready-timeout.patch b/queue-5.4/phy-qcom-qmp-increase-phy-ready-timeout.patch new file mode 100644 index 00000000000..6d19f95118f --- /dev/null +++ b/queue-5.4/phy-qcom-qmp-increase-phy-ready-timeout.patch @@ -0,0 +1,39 @@ +From 7f1ae1fe6948609ef9141612220bbb3badee1bc1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 20 Dec 2019 15:47:15 +0530 +Subject: phy: qcom-qmp: Increase PHY ready timeout + +From: Bjorn Andersson + +[ 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 +Tested-by: Evan Green +Tested-by: Vinod Koul +Signed-off-by: Vinod Koul +Signed-off-by: Kishon Vijay Abraham I +Signed-off-by: Sasha Levin +--- + 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 39e8deb8001ea..27dd20a7fe131 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 + diff --git a/queue-5.4/platform-x86-dell-laptop-disable-kbd-backlight-on-in.patch b/queue-5.4/platform-x86-dell-laptop-disable-kbd-backlight-on-in.patch new file mode 100644 index 00000000000..e43aecdf806 --- /dev/null +++ b/queue-5.4/platform-x86-dell-laptop-disable-kbd-backlight-on-in.patch @@ -0,0 +1,91 @@ +From 0ff02e4a7481e807f6cea22a0b2ff78050f4790c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Reviewed-by: Mario Limonciello +Reviewed-by: Pali Rohár +Signed-off-by: Andy Shevchenko +Signed-off-by: Sasha Levin +--- + 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 d27be2836bc21..74e988f839e85 100644 +--- a/drivers/platform/x86/dell-laptop.c ++++ b/drivers/platform/x86/dell-laptop.c +@@ -33,6 +33,7 @@ + + struct quirk_entry { + bool touchpad_led; ++ bool kbd_led_not_present; + bool kbd_led_levels_off_1; + bool kbd_missing_ac_tag; + +@@ -73,6 +74,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", +@@ -310,6 +315,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, ++ }, + { } + }; + +@@ -1493,6 +1516,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 + diff --git a/queue-5.4/series b/queue-5.4/series index b466f095e5c..da9b63fc781 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -41,3 +41,59 @@ udp-segment-looped-gso-packets-correctly.patch mlxsw-minimal-fix-an-error-handling-path-in-mlxsw_m_port_create.patch net-include-struct-nhmsg-size-in-nh-nlmsg-size.patch rxrpc-fix-use-after-free-in-rxrpc_receive_data.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-asus-ignore-asus-vendor-page-usage-code-0xff-eve.patch +hid-add-quirk-for-incorrect-input-length-on-lenovo-y.patch +hid-intel-ish-hid-ipc-add-cmp-device-id.patch +hid-wacom-recognize-new-mobilestudio-pro-pid.patch +asoc-sof-fix-fault-at-driver-unload-after-failed-pro.patch +asoc-sof-intel-hda-hda-dai-fix-oops-on-hda_link-.hw_.patch +drivers-hid-hid-multitouch.c-fix-a-possible-null-poi.patch +phy-qcom-qmp-increase-phy-ready-timeout.patch +asoc-fsl_audmix-add-missed-pm_runtime_disable.patch +asoc-topology-prevent-use-after-free-in-snd_soc_get_.patch +phy-cpcap-usb-prevent-usb-line-glitches-from-waking-.patch +hid-intel-ish-hid-ipc-add-tiger-lake-pci-device-id.patch +watchdog-max77620_wdt-fix-potential-build-errors.patch +watchdog-rn5t618_wdt-fix-module-aliases.patch +watchdog-orion-fix-platform_get_irq-complaints.patch +usb-musb-jz4740-silence-error-if-code-is-eprobe_defe.patch +can-tcan4x5x-tcan4x5x_parse_config-reset-device-befo.patch +spi-spi-dw-add-lock-protect-dw_spi-rx-tx-to-prevent-.patch +net-google-gve-remove-dma_wmb-before-ringing-doorbel.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 +iommu-dma-fix-variable-cookie-set-but-not-used.patch +drm-amd-display-reduce-hdmi-pixel-encoding-if-max-cl.patch +stmmac-debugfs-entry-name-is-not-be-changed-when-ude.patch +atm-eni-fix-uninitialized-variable-warning.patch +hid-steam-fix-input-device-disappearing.patch +extcon-intel-cht-wc-don-t-reset-usb-data-connection-.patch +asoc-intel-cht_bsw_rt5645-add-quirk-for-boards-using.patch +drm-amdgpu-sriov-add-navi12-pci-id-for-sriov-v2.patch +libbpf-fix-btf-defined-map-s-__type-macro-handling-o.patch +staging-mt7621-pci-add-quirks-for-e2-revision-using-.patch +platform-x86-dell-laptop-disable-kbd-backlight-on-in.patch +pci-add-dma-alias-quirk-for-intel-vca-ntb.patch +media-dvbsky-add-support-for-eyetv-geniatech-t2-lite.patch +bus-ti-sysc-handle-mstandby-quirk-and-use-it-for-mus.patch +bus-ti-sysc-use-swsup-quirks-also-for-am335x-musb.patch +spi-pxa2xx-add-support-for-intel-comet-lake-h.patch +iommu-amd-support-multiple-pci-dma-aliases-in-device.patch +iommu-amd-support-multiple-pci-dma-aliases-in-irq-re.patch +perf-imx_ddr-add-enhanced-axi-id-filter-support.patch +mfd-intel-lpss-add-intel-comet-lake-pch-h-pci-ids.patch +arm-config-aspeed-g5-enable-8250_dw-quirks.patch +arm-omap2-smartreflex-add-omap_sr_pdata-definition.patch +mmc-sdhci-pci-quirk-for-amd-sdhc-device-0x7906.patch +mmc-sdhci-pci-add-support-for-intel-jsl.patch +bus-ti-sysc-add-module-enable-quirk-for-audio-aess.patch +usb-storage-disable-uas-on-jmicron-sata-enclosure.patch +alsa-hda-realtek-move-some-alc236-pintbls-to-fallbac.patch +bluetooth-allow-combination-of-bdaddr_property-and-i.patch +bluetooth-btbcm-use-the-bdaddr_property-quirk.patch +bus-ti-sysc-fix-missing-force-mstandby-quirk-handlin.patch diff --git a/queue-5.4/spi-pxa2xx-add-support-for-intel-comet-lake-h.patch b/queue-5.4/spi-pxa2xx-add-support-for-intel-comet-lake-h.patch new file mode 100644 index 00000000000..c7ebc5a5d20 --- /dev/null +++ b/queue-5.4/spi-pxa2xx-add-support-for-intel-comet-lake-h.patch @@ -0,0 +1,37 @@ +From 713aae3d21d32a59e77f6cb6ffca370455ea4097 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 29 Oct 2019 13:58:02 +0200 +Subject: spi: pxa2xx: Add support for Intel Comet Lake-H + +From: Jarkko Nikula + +[ Upstream commit f0cf17ed76cffa365001d263ced1f130ec794917 ] + +Add Intel Comet Lake-H LPSS SPI PCI IDs. + +Signed-off-by: Jarkko Nikula +Link: https://lore.kernel.org/r/20191029115802.6779-1-jarkko.nikula@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/spi/spi-pxa2xx.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c +index 9f92165fe09f8..2fd843b18297d 100644 +--- a/drivers/spi/spi-pxa2xx.c ++++ b/drivers/spi/spi-pxa2xx.c +@@ -1461,6 +1461,10 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = { + { PCI_VDEVICE(INTEL, 0x02aa), LPSS_CNL_SSP }, + { PCI_VDEVICE(INTEL, 0x02ab), LPSS_CNL_SSP }, + { PCI_VDEVICE(INTEL, 0x02fb), LPSS_CNL_SSP }, ++ /* CML-H */ ++ { PCI_VDEVICE(INTEL, 0x06aa), LPSS_CNL_SSP }, ++ { PCI_VDEVICE(INTEL, 0x06ab), LPSS_CNL_SSP }, ++ { PCI_VDEVICE(INTEL, 0x06fb), LPSS_CNL_SSP }, + /* TGL-LP */ + { PCI_VDEVICE(INTEL, 0xa0aa), LPSS_CNL_SSP }, + { PCI_VDEVICE(INTEL, 0xa0ab), LPSS_CNL_SSP }, +-- +2.20.1 + diff --git a/queue-5.4/spi-spi-dw-add-lock-protect-dw_spi-rx-tx-to-prevent-.patch b/queue-5.4/spi-spi-dw-add-lock-protect-dw_spi-rx-tx-to-prevent-.patch new file mode 100644 index 00000000000..bc1a86532dd --- /dev/null +++ b/queue-5.4/spi-spi-dw-add-lock-protect-dw_spi-rx-tx-to-prevent-.patch @@ -0,0 +1,135 @@ +From b07ef32db88a78f9a5be75958df0944f4db0df4e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Link: https://lore.kernel.org/r/1577849981-31489-1-git-send-email-wuxu.wu@huawei.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + 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 45972056ed8c8..11cac7e106635 100644 +--- a/drivers/spi/spi-dw.c ++++ b/drivers/spi/spi-dw.c +@@ -172,9 +172,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) { +@@ -186,13 +188,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 */ +@@ -204,6 +209,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) +@@ -276,18 +282,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); + +@@ -471,6 +479,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 c9c15881e9824..f3a2f157a2b17 100644 +--- a/drivers/spi/spi-dw.h ++++ b/drivers/spi/spi-dw.h +@@ -120,6 +120,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 + diff --git a/queue-5.4/staging-mt7621-pci-add-quirks-for-e2-revision-using-.patch b/queue-5.4/staging-mt7621-pci-add-quirks-for-e2-revision-using-.patch new file mode 100644 index 00000000000..eea88f01777 --- /dev/null +++ b/queue-5.4/staging-mt7621-pci-add-quirks-for-e2-revision-using-.patch @@ -0,0 +1,112 @@ +From 224a6c8349f2ff3a6864ace85fd18035c9ec2de0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 6 Oct 2019 20:10:32 +0200 +Subject: staging: mt7621-pci: add quirks for 'E2' revision using + 'soc_device_attribute' + +From: Sergio Paracuellos + +[ Upstream commit b483b4e4d3f6bfd5089b9e6dc9ba259879c6ce6f ] + +Depending on revision of the chip, reset lines are inverted. Make code +more readable making use of 'soc_device_match' in driver probe function. + +Signed-off-by: Sergio Paracuellos +Link: https://lore.kernel.org/r/20191006181032.19112-1-sergio.paracuellos@gmail.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/staging/mt7621-pci/pci-mt7621.c | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c +index 6b98827da57fd..3633c924848ec 100644 +--- a/drivers/staging/mt7621-pci/pci-mt7621.c ++++ b/drivers/staging/mt7621-pci/pci-mt7621.c +@@ -29,15 +29,14 @@ + #include + #include + #include ++#include + #include + #include + + #include "../../pci/pci.h" + + /* sysctl */ +-#define MT7621_CHIP_REV_ID 0x0c + #define MT7621_GPIO_MODE 0x60 +-#define CHIP_REV_MT7621_E2 0x0101 + + /* MediaTek specific configuration registers */ + #define PCIE_FTS_NUM 0x70c +@@ -126,6 +125,8 @@ struct mt7621_pcie_port { + * @ports: pointer to PCIe port information + * @perst: gpio reset + * @rst: pointer to pcie reset ++ * @resets_inverted: depends on chip revision ++ * reset lines are inverted. + */ + struct mt7621_pcie { + void __iomem *base; +@@ -140,6 +141,7 @@ struct mt7621_pcie { + struct list_head ports; + struct gpio_desc *perst; + struct reset_control *rst; ++ bool resets_inverted; + }; + + static inline u32 pcie_read(struct mt7621_pcie *pcie, u32 reg) +@@ -229,9 +231,9 @@ static inline void mt7621_pcie_port_clk_disable(struct mt7621_pcie_port *port) + + static inline void mt7621_control_assert(struct mt7621_pcie_port *port) + { +- u32 chip_rev_id = rt_sysc_r32(MT7621_CHIP_REV_ID); ++ struct mt7621_pcie *pcie = port->pcie; + +- if ((chip_rev_id & 0xFFFF) == CHIP_REV_MT7621_E2) ++ if (pcie->resets_inverted) + reset_control_assert(port->pcie_rst); + else + reset_control_deassert(port->pcie_rst); +@@ -239,9 +241,9 @@ static inline void mt7621_control_assert(struct mt7621_pcie_port *port) + + static inline void mt7621_control_deassert(struct mt7621_pcie_port *port) + { +- u32 chip_rev_id = rt_sysc_r32(MT7621_CHIP_REV_ID); ++ struct mt7621_pcie *pcie = port->pcie; + +- if ((chip_rev_id & 0xFFFF) == CHIP_REV_MT7621_E2) ++ if (pcie->resets_inverted) + reset_control_deassert(port->pcie_rst); + else + reset_control_assert(port->pcie_rst); +@@ -641,9 +643,14 @@ static int mt7621_pcie_register_host(struct pci_host_bridge *host, + return pci_host_probe(host); + } + ++static const struct soc_device_attribute mt7621_pci_quirks_match[] = { ++ { .soc_id = "mt7621", .revision = "E2" } ++}; ++ + static int mt7621_pci_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; ++ const struct soc_device_attribute *attr; + struct mt7621_pcie *pcie; + struct pci_host_bridge *bridge; + int err; +@@ -661,6 +668,10 @@ static int mt7621_pci_probe(struct platform_device *pdev) + platform_set_drvdata(pdev, pcie); + INIT_LIST_HEAD(&pcie->ports); + ++ attr = soc_device_match(mt7621_pci_quirks_match); ++ if (attr) ++ pcie->resets_inverted = true; ++ + err = mt7621_pcie_parse_dt(pcie); + if (err) { + dev_err(dev, "Parsing DT failed\n"); +-- +2.20.1 + diff --git a/queue-5.4/stmmac-debugfs-entry-name-is-not-be-changed-when-ude.patch b/queue-5.4/stmmac-debugfs-entry-name-is-not-be-changed-when-ude.patch new file mode 100644 index 00000000000..85eac5b9f28 --- /dev/null +++ b/queue-5.4/stmmac-debugfs-entry-name-is-not-be-changed-when-ude.patch @@ -0,0 +1,86 @@ +From 456dface54332ea4cc895773f9e2642a93f04339 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 7 Jan 2020 14:34:00 +0800 +Subject: stmmac: debugfs entry name is not be changed when udev rename device + name. + +From: Jiping Ma + +[ Upstream commit 481a7d154cbbd5ca355cc01cc8969876b240eded ] + +Add one notifier for udev changes net device name. +Fixes: b6601323ef9e ("net: stmmac: debugfs entry name is not be changed when udev rename") + +Signed-off-by: Jiping Ma +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 32 +++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +index 1b3520d0e59ef..06dd65c419c49 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c ++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +@@ -105,6 +105,7 @@ MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode"); + static irqreturn_t stmmac_interrupt(int irq, void *dev_id); + + #ifdef CONFIG_DEBUG_FS ++static const struct net_device_ops stmmac_netdev_ops; + static void stmmac_init_fs(struct net_device *dev); + static void stmmac_exit_fs(struct net_device *dev); + #endif +@@ -4175,6 +4176,34 @@ static int stmmac_dma_cap_show(struct seq_file *seq, void *v) + } + DEFINE_SHOW_ATTRIBUTE(stmmac_dma_cap); + ++/* Use network device events to rename debugfs file entries. ++ */ ++static int stmmac_device_event(struct notifier_block *unused, ++ unsigned long event, void *ptr) ++{ ++ struct net_device *dev = netdev_notifier_info_to_dev(ptr); ++ struct stmmac_priv *priv = netdev_priv(dev); ++ ++ if (dev->netdev_ops != &stmmac_netdev_ops) ++ goto done; ++ ++ switch (event) { ++ case NETDEV_CHANGENAME: ++ if (priv->dbgfs_dir) ++ priv->dbgfs_dir = debugfs_rename(stmmac_fs_dir, ++ priv->dbgfs_dir, ++ stmmac_fs_dir, ++ dev->name); ++ break; ++ } ++done: ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block stmmac_notifier = { ++ .notifier_call = stmmac_device_event, ++}; ++ + static void stmmac_init_fs(struct net_device *dev) + { + struct stmmac_priv *priv = netdev_priv(dev); +@@ -4189,12 +4218,15 @@ static void stmmac_init_fs(struct net_device *dev) + /* Entry to report the DMA HW features */ + debugfs_create_file("dma_cap", 0444, priv->dbgfs_dir, dev, + &stmmac_dma_cap_fops); ++ ++ register_netdevice_notifier(&stmmac_notifier); + } + + static void stmmac_exit_fs(struct net_device *dev) + { + struct stmmac_priv *priv = netdev_priv(dev); + ++ unregister_netdevice_notifier(&stmmac_notifier); + debugfs_remove_recursive(priv->dbgfs_dir); + } + #endif /* CONFIG_DEBUG_FS */ +-- +2.20.1 + diff --git a/queue-5.4/usb-musb-jz4740-silence-error-if-code-is-eprobe_defe.patch b/queue-5.4/usb-musb-jz4740-silence-error-if-code-is-eprobe_defe.patch new file mode 100644 index 00000000000..31594446630 --- /dev/null +++ b/queue-5.4/usb-musb-jz4740-silence-error-if-code-is-eprobe_defe.patch @@ -0,0 +1,47 @@ +From b69c6f859781768f0a7544880a18a9aadf4acef7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 16 Dec 2019 10:24:32 -0600 +Subject: usb: musb: jz4740: Silence error if code is -EPROBE_DEFER + +From: Paul Cercueil + +[ Upstream commit ce03cbcb4b4fd2a3817f32366001f1ca45d213b8 ] + +Avoid printing any error message if the error code is -EPROBE_DEFER. + +Signed-off-by: Paul Cercueil +Signed-off-by: Bin Liu +Link: https://lore.kernel.org/r/20191216162432.1256-1-b-liu@ti.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/musb/jz4740.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c +index 5261f8dfedecd..e3b8c84ccdb80 100644 +--- a/drivers/usb/musb/jz4740.c ++++ b/drivers/usb/musb/jz4740.c +@@ -75,14 +75,17 @@ static struct musb_hdrc_platform_data jz4740_musb_platform_data = { + static int jz4740_musb_init(struct musb *musb) + { + struct device *dev = musb->controller->parent; ++ int err; + + if (dev->of_node) + musb->xceiv = devm_usb_get_phy_by_phandle(dev, "phys", 0); + else + musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); + if (IS_ERR(musb->xceiv)) { +- dev_err(dev, "No transceiver configured\n"); +- return PTR_ERR(musb->xceiv); ++ err = PTR_ERR(musb->xceiv); ++ if (err != -EPROBE_DEFER) ++ dev_err(dev, "No transceiver configured: %d", err); ++ return err; + } + + /* Silicon does not implement ConfigData register. +-- +2.20.1 + diff --git a/queue-5.4/usb-storage-disable-uas-on-jmicron-sata-enclosure.patch b/queue-5.4/usb-storage-disable-uas-on-jmicron-sata-enclosure.patch new file mode 100644 index 00000000000..e12a990b78f --- /dev/null +++ b/queue-5.4/usb-storage-disable-uas-on-jmicron-sata-enclosure.patch @@ -0,0 +1,47 @@ +From 0ba05ad1e94690038995f43c57504342e828b872 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 8 Sep 2015 09:53:38 -0700 +Subject: usb-storage: Disable UAS on JMicron SATA enclosure + +From: Laura Abbott + +[ 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 +Cc: Pacho Ramos +Signed-off-by: Laura Abbott +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + 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 */ ++/* ++ * Initially Reported-by: Takeo Nakayama ++ * UAS Ignore Reported by Steven Ellis ++ */ + 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 */ + UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999, +-- +2.20.1 + diff --git a/queue-5.4/watchdog-max77620_wdt-fix-potential-build-errors.patch b/queue-5.4/watchdog-max77620_wdt-fix-potential-build-errors.patch new file mode 100644 index 00000000000..19e5a29beb7 --- /dev/null +++ b/queue-5.4/watchdog-max77620_wdt-fix-potential-build-errors.patch @@ -0,0 +1,37 @@ +From 6c068a2cc1dc51c7e0d67c29237be093f15f8d00 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Nov 2019 09:46:17 +0100 +Subject: watchdog: max77620_wdt: fix potential build errors + +From: David Engraf + +[ Upstream commit da9e3f4e30a53cd420cf1e6961c3b4110f0f21f0 ] + +max77620_wdt uses watchdog core functions. Enable CONFIG_WATCHDOG_CORE +to fix potential build errors. + +Signed-off-by: David Engraf +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20191127084617.16937-1-david.engraf@sysgo.com +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Sasha Levin +--- + drivers/watchdog/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig +index 4c761abc56883..e2745f6861960 100644 +--- a/drivers/watchdog/Kconfig ++++ b/drivers/watchdog/Kconfig +@@ -687,6 +687,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 + diff --git a/queue-5.4/watchdog-orion-fix-platform_get_irq-complaints.patch b/queue-5.4/watchdog-orion-fix-platform_get_irq-complaints.patch new file mode 100644 index 00000000000..07c2ee6faa5 --- /dev/null +++ b/queue-5.4/watchdog-orion-fix-platform_get_irq-complaints.patch @@ -0,0 +1,52 @@ +From f804454b314d7feee60f8d919114dd5a9dd69fc4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 29 Nov 2019 14:51:35 +0000 +Subject: watchdog: orion: fix platform_get_irq() complaints + +From: Russell King + +[ Upstream commit dcbce5fbcc69bf2553f650004aad44bf390eca73 ] + +Fix: + +orion_wdt f1020300.watchdog: IRQ index 1 not found + +which is caused by platform_get_irq() now complaining when optional +IRQs are not found. Neither interrupt for orion is required, so +make them both optional. + +Signed-off-by: Russell King +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/E1iahcN-0000AT-Co@rmk-PC.armlinux.org.uk +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Sasha Levin +--- + drivers/watchdog/orion_wdt.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c +index 1cccf8eb1c5d4..8e6dfe76f9c9d 100644 +--- a/drivers/watchdog/orion_wdt.c ++++ b/drivers/watchdog/orion_wdt.c +@@ -602,7 +602,7 @@ static int orion_wdt_probe(struct platform_device *pdev) + set_bit(WDOG_HW_RUNNING, &dev->wdt.status); + + /* Request the IRQ only after the watchdog is disabled */ +- irq = platform_get_irq(pdev, 0); ++ irq = platform_get_irq_optional(pdev, 0); + if (irq > 0) { + /* + * Not all supported platforms specify an interrupt for the +@@ -617,7 +617,7 @@ static int orion_wdt_probe(struct platform_device *pdev) + } + + /* Optional 2nd interrupt for pretimeout */ +- irq = platform_get_irq(pdev, 1); ++ irq = platform_get_irq_optional(pdev, 1); + if (irq > 0) { + orion_wdt_info.options |= WDIOF_PRETIMEOUT; + ret = devm_request_irq(&pdev->dev, irq, orion_wdt_pre_irq, +-- +2.20.1 + diff --git a/queue-5.4/watchdog-rn5t618_wdt-fix-module-aliases.patch b/queue-5.4/watchdog-rn5t618_wdt-fix-module-aliases.patch new file mode 100644 index 00000000000..bd0911e0dcd --- /dev/null +++ b/queue-5.4/watchdog-rn5t618_wdt-fix-module-aliases.patch @@ -0,0 +1,37 @@ +From 3f99d6d9cea0f96779dcef0710e48566a5f515ad Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 13 Dec 2019 22:48:02 +0100 +Subject: watchdog: rn5t618_wdt: fix module aliases + +From: Andreas Kemnade + +[ Upstream commit a76dfb859cd42df6e3d1910659128ffcd2fb6ba2 ] + +Platform device aliases were missing so module autoloading +did not work. + +Signed-off-by: Andreas Kemnade +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20191213214802.22268-1-andreas@kemnade.info +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Sasha Levin +--- + 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 2348760474317..6e524c8e26a8f 100644 +--- a/drivers/watchdog/rn5t618_wdt.c ++++ b/drivers/watchdog/rn5t618_wdt.c +@@ -188,6 +188,7 @@ static struct platform_driver rn5t618_wdt_driver = { + + module_platform_driver(rn5t618_wdt_driver); + ++MODULE_ALIAS("platform:rn5t618-wdt"); + MODULE_AUTHOR("Beniamino Galvani "); + MODULE_DESCRIPTION("RN5T618 watchdog driver"); + MODULE_LICENSE("GPL v2"); +-- +2.20.1 + -- 2.47.3