From 39e22066fa51a8d54e8e1741bdd7cbb9239cd262 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 29 Aug 2019 22:30:30 -0400 Subject: [PATCH] fixes for 4.4 Signed-off-by: Sasha Levin --- ..._dma40-fix-unneeded-variable-warning.patch | 54 +++++++++++++++++++ queue-4.4/series | 5 ++ ...hv-fix-kvp-and-vss-daemons-exit-code.patch | 52 ++++++++++++++++++ ...site-clear-suspended-on-reset-discon.patch | 33 ++++++++++++ ...t-fotg2-restart-hcd-after-port-reset.patch | 37 +++++++++++++ ...hdog-bcm2835_wdt-fix-module-autoload.patch | 35 ++++++++++++ 6 files changed, 216 insertions(+) create mode 100644 queue-4.4/dmaengine-ste_dma40-fix-unneeded-variable-warning.patch create mode 100644 queue-4.4/tools-hv-fix-kvp-and-vss-daemons-exit-code.patch create mode 100644 queue-4.4/usb-gadget-composite-clear-suspended-on-reset-discon.patch create mode 100644 queue-4.4/usb-host-fotg2-restart-hcd-after-port-reset.patch create mode 100644 queue-4.4/watchdog-bcm2835_wdt-fix-module-autoload.patch diff --git a/queue-4.4/dmaengine-ste_dma40-fix-unneeded-variable-warning.patch b/queue-4.4/dmaengine-ste_dma40-fix-unneeded-variable-warning.patch new file mode 100644 index 00000000000..547ca0708fb --- /dev/null +++ b/queue-4.4/dmaengine-ste_dma40-fix-unneeded-variable-warning.patch @@ -0,0 +1,54 @@ +From a15f0cb9890c27222ea7396ac7d7ed8a93ea93a0 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 12 Jul 2019 11:13:30 +0200 +Subject: dmaengine: ste_dma40: fix unneeded variable warning + +[ Upstream commit 5d6fb560729a5d5554e23db8d00eb57cd0021083 ] + +clang-9 points out that there are two variables that depending on the +configuration may only be used in an ARRAY_SIZE() expression but not +referenced: + +drivers/dma/ste_dma40.c:145:12: error: variable 'd40_backup_regs' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] +static u32 d40_backup_regs[] = { + ^ +drivers/dma/ste_dma40.c:214:12: error: variable 'd40_backup_regs_chan' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] +static u32 d40_backup_regs_chan[] = { + +Mark these __maybe_unused to shut up the warning. + +Signed-off-by: Arnd Bergmann +Reviewed-by: Nathan Chancellor +Reviewed-by: Linus Walleij +Link: https://lore.kernel.org/r/20190712091357.744515-1-arnd@arndb.de +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +--- + drivers/dma/ste_dma40.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c +index dd3e7ba273ad0..0fede051f4e1c 100644 +--- a/drivers/dma/ste_dma40.c ++++ b/drivers/dma/ste_dma40.c +@@ -142,7 +142,7 @@ enum d40_events { + * when the DMA hw is powered off. + * TODO: Add save/restore of D40_DREG_GCC on dma40 v3 or later, if that works. + */ +-static u32 d40_backup_regs[] = { ++static __maybe_unused u32 d40_backup_regs[] = { + D40_DREG_LCPA, + D40_DREG_LCLA, + D40_DREG_PRMSE, +@@ -211,7 +211,7 @@ static u32 d40_backup_regs_v4b[] = { + + #define BACKUP_REGS_SZ_V4B ARRAY_SIZE(d40_backup_regs_v4b) + +-static u32 d40_backup_regs_chan[] = { ++static __maybe_unused u32 d40_backup_regs_chan[] = { + D40_CHAN_REG_SSCFG, + D40_CHAN_REG_SSELT, + D40_CHAN_REG_SSPTR, +-- +2.20.1 + diff --git a/queue-4.4/series b/queue-4.4/series index ec4a138e25a..2cbd880862b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -48,3 +48,8 @@ revert-perf-test-6-fix-missing-kvm-module-load-for-s.patch x86-pm-introduce-quirk-framework-to-save-restore-ext.patch x86-cpu-amd-clear-rdrand-cpuid-bit-on-amd-family-15h.patch scsi-ufs-fix-null-pointer-dereference-in-ufshcd_conf.patch +dmaengine-ste_dma40-fix-unneeded-variable-warning.patch +usb-gadget-composite-clear-suspended-on-reset-discon.patch +usb-host-fotg2-restart-hcd-after-port-reset.patch +tools-hv-fix-kvp-and-vss-daemons-exit-code.patch +watchdog-bcm2835_wdt-fix-module-autoload.patch diff --git a/queue-4.4/tools-hv-fix-kvp-and-vss-daemons-exit-code.patch b/queue-4.4/tools-hv-fix-kvp-and-vss-daemons-exit-code.patch new file mode 100644 index 00000000000..947aeaf069a --- /dev/null +++ b/queue-4.4/tools-hv-fix-kvp-and-vss-daemons-exit-code.patch @@ -0,0 +1,52 @@ +From 69dcc9b705cfd67436760a208a3e8e09d15075bd Mon Sep 17 00:00:00 2001 +From: Adrian Vladu +Date: Mon, 6 May 2019 16:50:58 +0000 +Subject: tools: hv: fix KVP and VSS daemons exit code + +[ Upstream commit b0995156071b0ff29a5902964a9dc8cfad6f81c0 ] + +HyperV KVP and VSS daemons should exit with 0 when the '--help' +or '-h' flags are used. + +Signed-off-by: Adrian Vladu + +Cc: "K. Y. Srinivasan" +Cc: Haiyang Zhang +Cc: Stephen Hemminger +Cc: Sasha Levin +Cc: Alessandro Pilotti +Signed-off-by: Sasha Levin +--- + tools/hv/hv_kvp_daemon.c | 2 ++ + tools/hv/hv_vss_daemon.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c +index 1774800668168..fffc7c4184599 100644 +--- a/tools/hv/hv_kvp_daemon.c ++++ b/tools/hv/hv_kvp_daemon.c +@@ -1379,6 +1379,8 @@ int main(int argc, char *argv[]) + daemonize = 0; + break; + case 'h': ++ print_usage(argv); ++ exit(0); + default: + print_usage(argv); + exit(EXIT_FAILURE); +diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c +index 5d51d6ff08e6a..b5465f92ed50e 100644 +--- a/tools/hv/hv_vss_daemon.c ++++ b/tools/hv/hv_vss_daemon.c +@@ -164,6 +164,8 @@ int main(int argc, char *argv[]) + daemonize = 0; + break; + case 'h': ++ print_usage(argv); ++ exit(0); + default: + print_usage(argv); + exit(EXIT_FAILURE); +-- +2.20.1 + diff --git a/queue-4.4/usb-gadget-composite-clear-suspended-on-reset-discon.patch b/queue-4.4/usb-gadget-composite-clear-suspended-on-reset-discon.patch new file mode 100644 index 00000000000..f9bc81f6bb4 --- /dev/null +++ b/queue-4.4/usb-gadget-composite-clear-suspended-on-reset-discon.patch @@ -0,0 +1,33 @@ +From 93a3714bc51d992f010f87781aeb6be66af443fa Mon Sep 17 00:00:00 2001 +From: Benjamin Herrenschmidt +Date: Fri, 26 Jul 2019 14:59:03 +1000 +Subject: usb: gadget: composite: Clear "suspended" on reset/disconnect + +[ Upstream commit 602fda17c7356bb7ae98467d93549057481d11dd ] + +In some cases, one can get out of suspend with a reset or +a disconnect followed by a reconnect. Previously we would +leave a stale suspended flag set. + +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Felipe Balbi +Signed-off-by: Sasha Levin +--- + drivers/usb/gadget/composite.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c +index 8bf54477f4724..351a406b97af7 100644 +--- a/drivers/usb/gadget/composite.c ++++ b/drivers/usb/gadget/composite.c +@@ -1889,6 +1889,7 @@ void composite_disconnect(struct usb_gadget *gadget) + * disconnect callbacks? + */ + spin_lock_irqsave(&cdev->lock, flags); ++ cdev->suspended = 0; + if (cdev->config) + reset_config(cdev); + if (cdev->driver->disconnect) +-- +2.20.1 + diff --git a/queue-4.4/usb-host-fotg2-restart-hcd-after-port-reset.patch b/queue-4.4/usb-host-fotg2-restart-hcd-after-port-reset.patch new file mode 100644 index 00000000000..e64e93614c7 --- /dev/null +++ b/queue-4.4/usb-host-fotg2-restart-hcd-after-port-reset.patch @@ -0,0 +1,37 @@ +From c042bea14ccf31dcfbaf3f1904630505517ec698 Mon Sep 17 00:00:00 2001 +From: Hans Ulli Kroll +Date: Sat, 10 Aug 2019 17:04:58 +0200 +Subject: usb: host: fotg2: restart hcd after port reset + +[ Upstream commit 777758888ffe59ef754cc39ab2f275dc277732f4 ] + +On the Gemini SoC the FOTG2 stalls after port reset +so restart the HCD after each port reset. + +Signed-off-by: Hans Ulli Kroll +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20190810150458.817-1-linus.walleij@linaro.org +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/host/fotg210-hcd.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c +index 2341af4f34909..11b3a8c57eabc 100644 +--- a/drivers/usb/host/fotg210-hcd.c ++++ b/drivers/usb/host/fotg210-hcd.c +@@ -1653,6 +1653,10 @@ static int fotg210_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, + /* see what we found out */ + temp = check_reset_complete(fotg210, wIndex, status_reg, + fotg210_readl(fotg210, status_reg)); ++ ++ /* restart schedule */ ++ fotg210->command |= CMD_RUN; ++ fotg210_writel(fotg210, fotg210->command, &fotg210->regs->command); + } + + if (!(temp & (PORT_RESUME|PORT_RESET))) { +-- +2.20.1 + diff --git a/queue-4.4/watchdog-bcm2835_wdt-fix-module-autoload.patch b/queue-4.4/watchdog-bcm2835_wdt-fix-module-autoload.patch new file mode 100644 index 00000000000..33260a9f57c --- /dev/null +++ b/queue-4.4/watchdog-bcm2835_wdt-fix-module-autoload.patch @@ -0,0 +1,35 @@ +From 9631edad19028de6cef04b819bb5e83bed4b4aa6 Mon Sep 17 00:00:00 2001 +From: Stefan Wahren +Date: Wed, 15 May 2019 19:14:18 +0200 +Subject: watchdog: bcm2835_wdt: Fix module autoload + +[ Upstream commit 215e06f0d18d5d653d6ea269e4dfc684854d48bf ] + +The commit 5e6acc3e678e ("bcm2835-pm: Move bcm2835-watchdog's DT probe +to an MFD.") broke module autoloading on Raspberry Pi. So add a +module alias this fix this. + +Signed-off-by: Stefan Wahren +Reviewed-by: Guenter Roeck +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Sasha Levin +--- + drivers/watchdog/bcm2835_wdt.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c +index 8a5ce5b5a0b6f..199b1fb3669c0 100644 +--- a/drivers/watchdog/bcm2835_wdt.c ++++ b/drivers/watchdog/bcm2835_wdt.c +@@ -248,6 +248,7 @@ module_param(nowayout, bool, 0); + MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + ++MODULE_ALIAS("platform:bcm2835-wdt"); + MODULE_AUTHOR("Lubomir Rintel "); + MODULE_DESCRIPTION("Driver for Broadcom BCM2835 watchdog timer"); + MODULE_LICENSE("GPL"); +-- +2.20.1 + -- 2.47.3