From: Sasha Levin Date: Fri, 29 May 2020 15:05:01 +0000 (-0400) Subject: Fixes for 4.19 X-Git-Tag: v4.4.226~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73f27f97418f9e3b939718ecea102fcd235fa0bc;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- diff --git a/queue-4.19/alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch b/queue-4.19/alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch new file mode 100644 index 00000000000..6c5e6fa0865 --- /dev/null +++ b/queue-4.19/alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch @@ -0,0 +1,60 @@ +From b1d0960326dc5643327d23fd31144237e81c8fb8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 May 2020 15:16:39 +0100 +Subject: ALSA: usb-audio: add mapping for ASRock TRX40 Creator + +From: Andrew Oakley + +[ Upstream commit da7a8f1a8fc3e14c6dcc52b4098bddb8f20390be ] + +This is another TRX40 based motherboard with ALC1220-VB USB-audio +that requires a static mapping table. + +This motherboard also has a PCI device which advertises no codecs. The +PCI ID is 1022:1487 and PCI SSID is 1022:d102. As this is using the AMD +vendor ID, don't blacklist for now in case other boards have a working +audio device with the same ssid. + +alsa-info.sh report for this board: +http://alsa-project.org/db/?f=0a742f89066527497b77ce16bca486daccf8a70c + +Signed-off-by: Andrew Oakley +Link: https://lore.kernel.org/r/20200503141639.35519-1-andrew@adoakley.name +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/mixer_maps.c | 5 +++++ + sound/usb/quirks-table.h | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c +index 1689e4f242df..d7a8b23b335b 100644 +--- a/sound/usb/mixer_maps.c ++++ b/sound/usb/mixer_maps.c +@@ -543,6 +543,11 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { + .map = trx40_mobo_map, + .connector_map = trx40_mobo_connector_map, + }, ++ { /* Asrock TRX40 Creator */ ++ .id = USB_ID(0x26ce, 0x0a01), ++ .map = trx40_mobo_map, ++ .connector_map = trx40_mobo_connector_map, ++ }, + { 0 } /* terminator */ + }; + +diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h +index 774aeedde071..4f8a2b98e090 100644 +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -3412,6 +3412,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), + ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */ + ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */ + ALC1220_VB_DESKTOP(0x0db0, 0x543d), /* MSI TRX40 */ ++ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */ + #undef ALC1220_VB_DESKTOP + + #undef USB_DEVICE_VENDOR_SPEC +-- +2.25.1 + diff --git a/queue-4.19/arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch b/queue-4.19/arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch new file mode 100644 index 00000000000..5d7428de495 --- /dev/null +++ b/queue-4.19/arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch @@ -0,0 +1,49 @@ +From dea737c91267dadbfea9cf271dcc2cc75a6f8413 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 16 Apr 2020 19:03:20 +0200 +Subject: ARM: dts: rockchip: fix phy nodename for rk3228-evb + +From: Johan Jonker + +[ Upstream commit 287e0d538fcec2f6e8eb1e565bf0749f3b90186d ] + +A test with the command below gives for example this error: + +arch/arm/boot/dts/rk3228-evb.dt.yaml: phy@0: +'#phy-cells' is a required property + +The phy nodename is normally used by a phy-handle. +This node is however compatible with +"ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22" +which is just been added to 'ethernet-phy.yaml'. +So change nodename to 'ethernet-phy' for which '#phy-cells' +is not a required property + +make ARCH=arm dtbs_check +DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/ +phy/phy-provider.yaml + +Signed-off-by: Johan Jonker +Signed-off-by: Heiko Stuebner +Link: https://lore.kernel.org/r/20200416170321.4216-1-jbx6244@gmail.com +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk3228-evb.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/rk3228-evb.dts b/arch/arm/boot/dts/rk3228-evb.dts +index 5670b33fd1bd..aed879db6c15 100644 +--- a/arch/arm/boot/dts/rk3228-evb.dts ++++ b/arch/arm/boot/dts/rk3228-evb.dts +@@ -46,7 +46,7 @@ + #address-cells = <1>; + #size-cells = <0>; + +- phy: phy@0 { ++ phy: ethernet-phy@0 { + compatible = "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"; + reg = <0>; + clocks = <&cru SCLK_MAC_PHY>; +-- +2.25.1 + diff --git a/queue-4.19/arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch b/queue-4.19/arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch new file mode 100644 index 00000000000..4da6794937a --- /dev/null +++ b/queue-4.19/arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch @@ -0,0 +1,61 @@ +From 3e34db28b6dd10adff1a5ca80c6acc9b1dfa7f8c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 24 Apr 2020 14:39:23 +0200 +Subject: ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi + +From: Johan Jonker + +[ Upstream commit 855bdca1781c79eb661f89c8944c4a719ce720e8 ] + +A test with the command below gives these errors: + +arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-0: +'#address-cells' is a required property +arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-1: +'#address-cells' is a required property +arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-0: +'#address-cells' is a required property +arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-1: +'#address-cells' is a required property + +The $nodename pattern for spi nodes is +"^spi(@.*|-[0-9a-f])*$". To prevent warnings rename +'spi-0' and 'spi-1' pinctrl sub nodenames to +'spi0' and 'spi1' in 'rk322x.dtsi'. + +make ARCH=arm dtbs_check +DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/spi-controller.yaml + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200424123923.8192-1-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk322x.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi +index bada942ef38d..2aa74267ae51 100644 +--- a/arch/arm/boot/dts/rk322x.dtsi ++++ b/arch/arm/boot/dts/rk322x.dtsi +@@ -944,7 +944,7 @@ + }; + }; + +- spi-0 { ++ spi0 { + spi0_clk: spi0-clk { + rockchip,pins = <0 9 RK_FUNC_2 &pcfg_pull_up>; + }; +@@ -962,7 +962,7 @@ + }; + }; + +- spi-1 { ++ spi1 { + spi1_clk: spi1-clk { + rockchip,pins = <0 23 RK_FUNC_2 &pcfg_pull_up>; + }; +-- +2.25.1 + diff --git a/queue-4.19/arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch b/queue-4.19/arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch new file mode 100644 index 00000000000..679f814ed22 --- /dev/null +++ b/queue-4.19/arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch @@ -0,0 +1,67 @@ +From 3ad4d0ace80cf9b0dab55b4fa66951e4280a1841 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 21:25:00 +0200 +Subject: ARM: dts: rockchip: swap clock-names of gpu nodes + +From: Johan Jonker + +[ Upstream commit b14f3898d2c25a9b47a61fb879d0b1f3af92c59b ] + +Dts files with Rockchip 'gpu' nodes were manually verified. +In order to automate this process arm,mali-utgard.txt +has been converted to yaml. In the new setup dtbs_check with +arm,mali-utgard.yaml expects clock-names values +in the same order, so fix that. + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200425192500.1808-1-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/rk3036.dtsi | 2 +- + arch/arm/boot/dts/rk322x.dtsi | 2 +- + arch/arm/boot/dts/rk3xxx.dtsi | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi +index d560fc4051c5..db612271371b 100644 +--- a/arch/arm/boot/dts/rk3036.dtsi ++++ b/arch/arm/boot/dts/rk3036.dtsi +@@ -128,7 +128,7 @@ + assigned-clocks = <&cru SCLK_GPU>; + assigned-clock-rates = <100000000>; + clocks = <&cru SCLK_GPU>, <&cru SCLK_GPU>; +- clock-names = "core", "bus"; ++ clock-names = "bus", "core"; + resets = <&cru SRST_GPU>; + status = "disabled"; + }; +diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi +index cd8f2a3b0e91..bada942ef38d 100644 +--- a/arch/arm/boot/dts/rk322x.dtsi ++++ b/arch/arm/boot/dts/rk322x.dtsi +@@ -539,7 +539,7 @@ + "pp1", + "ppmmu1"; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; +- clock-names = "core", "bus"; ++ clock-names = "bus", "core"; + resets = <&cru SRST_GPU_A>; + status = "disabled"; + }; +diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi +index d752dc611fd7..86a0d98d28ff 100644 +--- a/arch/arm/boot/dts/rk3xxx.dtsi ++++ b/arch/arm/boot/dts/rk3xxx.dtsi +@@ -84,7 +84,7 @@ + compatible = "arm,mali-400"; + reg = <0x10090000 0x10000>; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; +- clock-names = "core", "bus"; ++ clock-names = "bus", "core"; + assigned-clocks = <&cru ACLK_GPU>; + assigned-clock-rates = <100000000>; + resets = <&cru SRST_GPU>; +-- +2.25.1 + diff --git a/queue-4.19/arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch b/queue-4.19/arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch new file mode 100644 index 00000000000..ac162dfcb28 --- /dev/null +++ b/queue-4.19/arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch @@ -0,0 +1,37 @@ +From a4aefd4e27eb7147d5cf2d6f35d06117a89f1e14 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 14:23:45 +0200 +Subject: arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts + +From: Johan Jonker + +[ Upstream commit c617ed88502d0b05149e7f32f3b3fd8a0663f7e2 ] + +The status was removed of the '&gmac2phy' node with the apply +of a patch long time ago, so fix status for '&gmac2phy' +in 'rk3328-evb.dts'. + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200425122345.12902-2-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts +index 212dd8159da9..d89f3451ace5 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts +@@ -86,7 +86,7 @@ + assigned-clock-rate = <50000000>; + assigned-clocks = <&cru SCLK_MAC2PHY>; + assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>; +- ++ status = "okay"; + }; + + &i2c1 { +-- +2.25.1 + diff --git a/queue-4.19/arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch b/queue-4.19/arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch new file mode 100644 index 00000000000..f193d5b24ff --- /dev/null +++ b/queue-4.19/arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch @@ -0,0 +1,49 @@ +From 8239301394bc5ea182f18f503210e4f8a8a6b152 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 16:38:37 +0200 +Subject: arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node + +From: Johan Jonker + +[ Upstream commit c604fd810bda667bdc20b2c041917baa7803e0fb ] + +Dts files with Rockchip rk3399 'gpu' nodes were manually verified. +In order to automate this process arm,mali-midgard.txt +has been converted to yaml. In the new setup dtbs_check with +arm,mali-midgard.yaml expects interrupts and interrupt-names values +in the same order. Fix this for rk3399. + +make ARCH=arm64 dtbs_check +DT_SCHEMA_FILES=Documentation/devicetree/bindings/gpu/ +arm,mali-midgard.yaml + +Signed-off-by: Johan Jonker +Link: https://lore.kernel.org/r/20200425143837.18706-1-jbx6244@gmail.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +index 451f00a631c4..f14e8c5c41ac 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +@@ -1817,10 +1817,10 @@ + gpu: gpu@ff9a0000 { + compatible = "rockchip,rk3399-mali", "arm,mali-t860"; + reg = <0x0 0xff9a0000 0x0 0x10000>; +- interrupts = , +- , +- ; +- interrupt-names = "gpu", "job", "mmu"; ++ interrupts = , ++ , ++ ; ++ interrupt-names = "job", "mmu", "gpu"; + clocks = <&cru ACLK_GPU>; + power-domains = <&power RK3399_PD_GPU>; + status = "disabled"; +-- +2.25.1 + diff --git a/queue-4.19/cachefiles-fix-race-between-read_waiter-and-read_cop.patch b/queue-4.19/cachefiles-fix-race-between-read_waiter-and-read_cop.patch new file mode 100644 index 00000000000..bb578b5a6c0 --- /dev/null +++ b/queue-4.19/cachefiles-fix-race-between-read_waiter-and-read_cop.patch @@ -0,0 +1,126 @@ +From eb757da01b6ba0b17778a744d6dc907f20f60590 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 7 May 2020 08:50:22 -0400 +Subject: cachefiles: Fix race between read_waiter and read_copier involving + op->to_do + +From: Lei Xue + +[ Upstream commit 7bb0c5338436dae953622470d52689265867f032 ] + +There is a potential race in fscache operation enqueuing for reading and +copying multiple pages from cachefiles to netfs. The problem can be seen +easily on a heavy loaded system (for example many processes reading files +continually on an NFS share covered by fscache triggered this problem within +a few minutes). + +The race is due to cachefiles_read_waiter() adding the op to the monitor +to_do list and then then drop the object->work_lock spinlock before +completing fscache_enqueue_operation(). Once the lock is dropped, +cachefiles_read_copier() grabs the op, completes processing it, and +makes it through fscache_retrieval_complete() which sets the op->state to +the final state of FSCACHE_OP_ST_COMPLETE(4). When cachefiles_read_waiter() +finally gets through the remainder of fscache_enqueue_operation() +it sees the invalid state, and hits the ASSERTCMP and the following +oops is seen: +[ 2259.612361] FS-Cache: +[ 2259.614785] FS-Cache: Assertion failed +[ 2259.618639] FS-Cache: 4 == 5 is false +[ 2259.622456] ------------[ cut here ]------------ +[ 2259.627190] kernel BUG at fs/fscache/operation.c:70! +... +[ 2259.791675] RIP: 0010:[] [] fscache_enqueue_operation+0xff/0x170 [fscache] +[ 2259.802059] RSP: 0000:ffffa0263d543be0 EFLAGS: 00010046 +[ 2259.807521] RAX: 0000000000000019 RBX: ffffa01a4d390480 RCX: 0000000000000006 +[ 2259.814847] RDX: 0000000000000000 RSI: 0000000000000046 RDI: ffffa0263d553890 +[ 2259.822176] RBP: ffffa0263d543be8 R08: 0000000000000000 R09: ffffa0263c2d8708 +[ 2259.829502] R10: 0000000000001e7f R11: 0000000000000000 R12: ffffa01a4d390480 +[ 2259.844483] R13: ffff9fa9546c5920 R14: ffffa0263d543c80 R15: ffffa0293ff9bf10 +[ 2259.859554] FS: 00007f4b6efbd700(0000) GS:ffffa0263d540000(0000) knlGS:0000000000000000 +[ 2259.875571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +[ 2259.889117] CR2: 00007f49e1624ff0 CR3: 0000012b38b38000 CR4: 00000000007607e0 +[ 2259.904015] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +[ 2259.918764] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 +[ 2259.933449] PKRU: 55555554 +[ 2259.943654] Call Trace: +[ 2259.953592] +[ 2259.955577] [] cachefiles_read_waiter+0x92/0xf0 [cachefiles] +[ 2259.978039] [] __wake_up_common+0x82/0x120 +[ 2259.991392] [] __wake_up_common_lock+0x83/0xc0 +[ 2260.004930] [] ? task_rq_unlock+0x20/0x20 +[ 2260.017863] [] __wake_up+0x13/0x20 +[ 2260.030230] [] __wake_up_bit+0x50/0x70 +[ 2260.042535] [] unlock_page+0x2b/0x30 +[ 2260.054495] [] page_endio+0x29/0x90 +[ 2260.066184] [] mpage_end_io+0x51/0x80 + +CPU1 +cachefiles_read_waiter() + 20 static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode, + 21 int sync, void *_key) + 22 { +... + 61 spin_lock(&object->work_lock); + 62 list_add_tail(&monitor->op_link, &op->to_do); + 63 spin_unlock(&object->work_lock); + + 64 + 65 fscache_enqueue_retrieval(op); +182 static inline void fscache_enqueue_retrieval(struct fscache_retrieval *op) +183 { +184 fscache_enqueue_operation(&op->op); +185 } + 58 void fscache_enqueue_operation(struct fscache_operation *op) + 59 { + 60 struct fscache_cookie *cookie = op->object->cookie; + 61 + 62 _enter("{OBJ%x OP%x,%u}", + 63 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); + 64 + 65 ASSERT(list_empty(&op->pend_link)); + 66 ASSERT(op->processor != NULL); + 67 ASSERT(fscache_object_is_available(op->object)); + 68 ASSERTCMP(atomic_read(&op->usage), >, 0); + + +CPU2 +cachefiles_read_copier() +168 while (!list_empty(&op->to_do)) { +... +202 fscache_end_io(op, monitor->netfs_page, error); +203 put_page(monitor->netfs_page); +204 fscache_retrieval_complete(op, 1); + +CPU1 + 58 void fscache_enqueue_operation(struct fscache_operation *op) + 59 { +... + 69 ASSERTIFCMP(op->state != FSCACHE_OP_ST_IN_PROGRESS, + 70 op->state, ==, FSCACHE_OP_ST_CANCELLED); + +Signed-off-by: Lei Xue +Signed-off-by: Dave Wysochanski +Signed-off-by: David Howells +Signed-off-by: Sasha Levin +--- + fs/cachefiles/rdwr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c +index 8a577409d030..f822ac9e3cb0 100644 +--- a/fs/cachefiles/rdwr.c ++++ b/fs/cachefiles/rdwr.c +@@ -64,9 +64,9 @@ static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode, + object = container_of(op->op.object, struct cachefiles_object, fscache); + spin_lock(&object->work_lock); + list_add_tail(&monitor->op_link, &op->to_do); ++ fscache_enqueue_retrieval(op); + spin_unlock(&object->work_lock); + +- fscache_enqueue_retrieval(op); + fscache_put_retrieval(op); + return 0; + } +-- +2.25.1 + diff --git a/queue-4.19/cifs-fix-null-pointer-check-in-cifs_read.patch b/queue-4.19/cifs-fix-null-pointer-check-in-cifs_read.patch new file mode 100644 index 00000000000..911d84fbe25 --- /dev/null +++ b/queue-4.19/cifs-fix-null-pointer-check-in-cifs_read.patch @@ -0,0 +1,36 @@ +From c970a23e871baa01745a94e3a3452b6b35a10e16 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 13 May 2020 10:27:16 -0500 +Subject: cifs: Fix null pointer check in cifs_read + +From: Steve French + +[ Upstream commit 9bd21d4b1a767c3abebec203342f3820dcb84662 ] + +Coverity scan noted a redundant null check + +Coverity-id: 728517 +Reported-by: Coverity +Signed-off-by: Steve French +Reviewed-by: Shyam Prasad N +Signed-off-by: Sasha Levin +--- + fs/cifs/file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/cifs/file.c b/fs/cifs/file.c +index cfb0d91289ec..128cbd69911b 100644 +--- a/fs/cifs/file.c ++++ b/fs/cifs/file.c +@@ -3532,7 +3532,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset) + * than it negotiated since it will refuse the read + * then. + */ +- if ((tcon->ses) && !(tcon->ses->capabilities & ++ if (!(tcon->ses->capabilities & + tcon->ses->server->vals->cap_large_files)) { + current_read_size = min_t(uint, + current_read_size, CIFSMaxBufSize); +-- +2.25.1 + diff --git a/queue-4.19/gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch b/queue-4.19/gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch new file mode 100644 index 00000000000..969434295e6 --- /dev/null +++ b/queue-4.19/gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch @@ -0,0 +1,46 @@ +From db5d96345cfac06d6e24d91b9dc8ca3a1129564e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 May 2020 11:55:03 -0500 +Subject: gfs2: don't call quota_unhold if quotas are not locked + +From: Bob Peterson + +[ Upstream commit c9cb9e381985bbbe8acd2695bbe6bd24bf06b81c ] + +Before this patch, function gfs2_quota_unlock checked if quotas are +turned off, and if so, it branched to label out, which called +gfs2_quota_unhold. With the new system of gfs2_qa_get and put, we +no longer want to call gfs2_quota_unhold or we won't balance our +gets and puts. + +Signed-off-by: Bob Peterson +Signed-off-by: Andreas Gruenbacher +Signed-off-by: Sasha Levin +--- + fs/gfs2/quota.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c +index dd0f9bc13164..ce47c8233612 100644 +--- a/fs/gfs2/quota.c ++++ b/fs/gfs2/quota.c +@@ -1116,7 +1116,7 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) + int found; + + if (!test_and_clear_bit(GIF_QD_LOCKED, &ip->i_flags)) +- goto out; ++ return; + + for (x = 0; x < ip->i_qadata->qa_qd_num; x++) { + struct gfs2_quota_data *qd; +@@ -1153,7 +1153,6 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) + qd_unlock(qda[x]); + } + +-out: + gfs2_quota_unhold(ip); + } + +-- +2.25.1 + diff --git a/queue-4.19/gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch b/queue-4.19/gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch new file mode 100644 index 00000000000..fdc1690b4d4 --- /dev/null +++ b/queue-4.19/gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch @@ -0,0 +1,57 @@ +From f3fbc2ead844f209fbd1ad343932e3fe0da0acae Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 May 2020 11:53:21 -0500 +Subject: gfs2: move privileged user check to gfs2_quota_lock_check + +From: Bob Peterson + +[ Upstream commit 4ed0c30811cb4d30ef89850b787a53a84d5d2bcb ] + +Before this patch, function gfs2_quota_lock checked if it was called +from a privileged user, and if so, it bypassed the quota check: +superuser can operate outside the quotas. +That's the wrong place for the check because the lock/unlock functions +are separate from the lock_check function, and you can do lock and +unlock without actually checking the quotas. + +This patch moves the check to gfs2_quota_lock_check. + +Signed-off-by: Bob Peterson +Signed-off-by: Andreas Gruenbacher +Signed-off-by: Sasha Levin +--- + fs/gfs2/quota.c | 3 +-- + fs/gfs2/quota.h | 3 ++- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c +index 0efae7a0ee80..dd0f9bc13164 100644 +--- a/fs/gfs2/quota.c ++++ b/fs/gfs2/quota.c +@@ -1043,8 +1043,7 @@ int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid) + u32 x; + int error = 0; + +- if (capable(CAP_SYS_RESOURCE) || +- sdp->sd_args.ar_quota != GFS2_QUOTA_ON) ++ if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON) + return 0; + + error = gfs2_quota_hold(ip, uid, gid); +diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h +index 836f29480be6..e3a6e2404d11 100644 +--- a/fs/gfs2/quota.h ++++ b/fs/gfs2/quota.h +@@ -47,7 +47,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip, + int ret; + + ap->allowed = UINT_MAX; /* Assume we are permitted a whole lot */ +- if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) ++ if (capable(CAP_SYS_RESOURCE) || ++ sdp->sd_args.ar_quota == GFS2_QUOTA_OFF) + return 0; + ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); + if (ret) +-- +2.25.1 + diff --git a/queue-4.19/gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch b/queue-4.19/gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch new file mode 100644 index 00000000000..e90ddad6578 --- /dev/null +++ b/queue-4.19/gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch @@ -0,0 +1,39 @@ +From c5ce704747a31067e35437b3af376656faf15882 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 27 Apr 2020 17:26:05 -0600 +Subject: gpio: tegra: mask GPIO IRQs during IRQ shutdown + +From: Stephen Warren + +[ Upstream commit 0cf253eed5d2bdf7bb3152457b38f39b012955f7 ] + +The driver currently leaves GPIO IRQs unmasked even when the GPIO IRQ +client has released the GPIO IRQ. This allows the HW to raise IRQs, and +SW to process them, after shutdown. Fix this by masking the IRQ when it's +shut down. This is usually taken care of by the irqchip core, but since +this driver has a custom irq_shutdown implementation, it must do this +explicitly itself. + +Signed-off-by: Stephen Warren +Link: https://lore.kernel.org/r/20200427232605.11608-1-swarren@wwwdotorg.org +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + drivers/gpio/gpio-tegra.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c +index 47dbd19751d0..57903501821e 100644 +--- a/drivers/gpio/gpio-tegra.c ++++ b/drivers/gpio/gpio-tegra.c +@@ -357,6 +357,7 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d) + struct tegra_gpio_info *tgi = bank->tgi; + unsigned int gpio = d->hwirq; + ++ tegra_gpio_irq_mask(d); + gpiochip_unlock_as_irq(&tgi->gc, gpio); + } + +-- +2.25.1 + diff --git a/queue-4.19/ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch b/queue-4.19/ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch new file mode 100644 index 00000000000..25d13c476bb --- /dev/null +++ b/queue-4.19/ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch @@ -0,0 +1,92 @@ +From d21d1661c1898c59f1c1025558e046ffd2e23908 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 28 Apr 2020 16:15:11 +0300 +Subject: IB/i40iw: Remove bogus call to netdev_master_upper_dev_get() + +From: Denis V. Lunev + +[ Upstream commit 856ec7f64688387b100b7083cdf480ce3ac41227 ] + +Local variable netdev is not used in these calls. + +It should be noted, that this change is required to work in bonded mode. +Otherwise we would get the following assert: + + "RTNL: assertion failed at net/core/dev.c (5665)" + +With the calltrace as follows: + dump_stack+0x19/0x1b + netdev_master_upper_dev_get+0x61/0x70 + i40iw_addr_resolve_neigh+0x1e8/0x220 + i40iw_make_cm_node+0x296/0x700 + ? i40iw_find_listener.isra.10+0xcc/0x110 + i40iw_receive_ilq+0x3d4/0x810 + i40iw_puda_poll_completion+0x341/0x420 + i40iw_process_ceq+0xa5/0x280 + i40iw_ceq_dpc+0x1e/0x40 + tasklet_action+0x83/0x140 + __do_softirq+0x125/0x2bb + call_softirq+0x1c/0x30 + do_softirq+0x65/0xa0 + irq_exit+0x105/0x110 + do_IRQ+0x56/0xf0 + common_interrupt+0x16a/0x16a + ? cpuidle_enter_state+0x57/0xd0 + cpuidle_idle_call+0xde/0x230 + arch_cpu_idle+0xe/0xc0 + cpu_startup_entry+0x14a/0x1e0 + start_secondary+0x1f7/0x270 + start_cpu+0x5/0x14 + +Link: https://lore.kernel.org/r/20200428131511.11049-1-den@openvz.org +Signed-off-by: Denis V. Lunev +Acked-by: Shiraz Saleem +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/hw/i40iw/i40iw_cm.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c +index 771eb6bd0785..4321b9e3dbb4 100644 +--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c ++++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c +@@ -1984,7 +1984,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev, + struct rtable *rt; + struct neighbour *neigh; + int rc = arpindex; +- struct net_device *netdev = iwdev->netdev; + __be32 dst_ipaddr = htonl(dst_ip); + __be32 src_ipaddr = htonl(src_ip); + +@@ -1994,9 +1993,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev, + return rc; + } + +- if (netif_is_bond_slave(netdev)) +- netdev = netdev_master_upper_dev_get(netdev); +- + neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr); + + rcu_read_lock(); +@@ -2062,7 +2058,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, + { + struct neighbour *neigh; + int rc = arpindex; +- struct net_device *netdev = iwdev->netdev; + struct dst_entry *dst; + struct sockaddr_in6 dst_addr; + struct sockaddr_in6 src_addr; +@@ -2083,9 +2078,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, + return rc; + } + +- if (netif_is_bond_slave(netdev)) +- netdev = netdev_master_upper_dev_get(netdev); +- + neigh = dst_neigh_lookup(dst, dst_addr.sin6_addr.in6_u.u6_addr32); + + rcu_read_lock(); +-- +2.25.1 + diff --git a/queue-4.19/net-freescale-select-config_fixed_phy-where-needed.patch b/queue-4.19/net-freescale-select-config_fixed_phy-where-needed.patch new file mode 100644 index 00000000000..82d773a0edf --- /dev/null +++ b/queue-4.19/net-freescale-select-config_fixed_phy-where-needed.patch @@ -0,0 +1,66 @@ +From f260a114245a33cf0c9a6d64e865f14ca28d57af Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 9 May 2020 14:04:52 +0200 +Subject: net: freescale: select CONFIG_FIXED_PHY where needed + +From: Arnd Bergmann + +[ Upstream commit 99352c79af3e5f2e4724abf37fa5a2a3299b1c81 ] + +I ran into a randconfig build failure with CONFIG_FIXED_PHY=m +and CONFIG_GIANFAR=y: + +x86_64-linux-ld: drivers/net/ethernet/freescale/gianfar.o:(.rodata+0x418): undefined reference to `fixed_phy_change_carrier' + +It seems the same thing can happen with dpaa and ucc_geth, so change +all three to do an explicit 'select FIXED_PHY'. + +The fixed-phy driver actually has an alternative stub function that +theoretically allows building network drivers when fixed-phy is +disabled, but I don't see how that would help here, as the drivers +presumably would not work then. + +Signed-off-by: Arnd Bergmann +Acked-by: Florian Fainelli +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/freescale/Kconfig | 2 ++ + drivers/net/ethernet/freescale/dpaa/Kconfig | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig +index a580a3dcbe59..e9f4326a0afa 100644 +--- a/drivers/net/ethernet/freescale/Kconfig ++++ b/drivers/net/ethernet/freescale/Kconfig +@@ -76,6 +76,7 @@ config UCC_GETH + depends on QUICC_ENGINE + select FSL_PQ_MDIO + select PHYLIB ++ select FIXED_PHY + ---help--- + This driver supports the Gigabit Ethernet mode of the QUICC Engine, + which is available on some Freescale SOCs. +@@ -89,6 +90,7 @@ config GIANFAR + depends on HAS_DMA + select FSL_PQ_MDIO + select PHYLIB ++ select FIXED_PHY + select CRC32 + ---help--- + This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx, +diff --git a/drivers/net/ethernet/freescale/dpaa/Kconfig b/drivers/net/ethernet/freescale/dpaa/Kconfig +index a654736237a9..8fec41e57178 100644 +--- a/drivers/net/ethernet/freescale/dpaa/Kconfig ++++ b/drivers/net/ethernet/freescale/dpaa/Kconfig +@@ -2,6 +2,7 @@ menuconfig FSL_DPAA_ETH + tristate "DPAA Ethernet" + depends on FSL_DPAA && FSL_FMAN + select PHYLIB ++ select FIXED_PHY + select FSL_FMAN_MAC + ---help--- + Data Path Acceleration Architecture Ethernet driver, +-- +2.25.1 + diff --git a/queue-4.19/net-microchip-encx24j600-add-missed-kthread_stop.patch b/queue-4.19/net-microchip-encx24j600-add-missed-kthread_stop.patch new file mode 100644 index 00000000000..994cd9a4a04 --- /dev/null +++ b/queue-4.19/net-microchip-encx24j600-add-missed-kthread_stop.patch @@ -0,0 +1,53 @@ +From 9a87c84b6f1a8c4ff0220fdefbb7fc1958e2c2f0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 7 May 2020 23:13:20 +0800 +Subject: net: microchip: encx24j600: add missed kthread_stop + +From: Chuhong Yuan + +[ Upstream commit ff8ce319e9c25e920d994cc35236f0bb32dfc8f3 ] + +This driver calls kthread_run() in probe, but forgets to call +kthread_stop() in probe failure and remove. +Add the missed kthread_stop() to fix it. + +Signed-off-by: Chuhong Yuan +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/microchip/encx24j600.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net/ethernet/microchip/encx24j600.c +index f831238d9793..84b6ad76f5bc 100644 +--- a/drivers/net/ethernet/microchip/encx24j600.c ++++ b/drivers/net/ethernet/microchip/encx24j600.c +@@ -1075,7 +1075,7 @@ static int encx24j600_spi_probe(struct spi_device *spi) + if (unlikely(ret)) { + netif_err(priv, probe, ndev, "Error %d initializing card encx24j600 card\n", + ret); +- goto out_free; ++ goto out_stop; + } + + eidled = encx24j600_read_reg(priv, EIDLED); +@@ -1093,6 +1093,8 @@ static int encx24j600_spi_probe(struct spi_device *spi) + + out_unregister: + unregister_netdev(priv->ndev); ++out_stop: ++ kthread_stop(priv->kworker_task); + out_free: + free_netdev(ndev); + +@@ -1105,6 +1107,7 @@ static int encx24j600_spi_remove(struct spi_device *spi) + struct encx24j600_priv *priv = dev_get_drvdata(&spi->dev); + + unregister_netdev(priv->ndev); ++ kthread_stop(priv->kworker_task); + + free_netdev(priv->ndev); + +-- +2.25.1 + diff --git a/queue-4.19/riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch b/queue-4.19/riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch new file mode 100644 index 00000000000..3886f406a7e --- /dev/null +++ b/queue-4.19/riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch @@ -0,0 +1,37 @@ +From 92664bab7478b1e65eea7997ca31c6f7f89546b0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 11 May 2020 10:19:53 +0800 +Subject: riscv: stacktrace: Fix undefined reference to `walk_stackframe' + +From: Kefeng Wang + +[ Upstream commit 0502bee37cdef755d63eee60236562e5605e2480 ] + +Drop static declaration to fix following build error if FRAME_POINTER disabled, + riscv64-linux-ld: arch/riscv/kernel/perf_callchain.o: in function `.L0': + perf_callchain.c:(.text+0x2b8): undefined reference to `walk_stackframe' + +Reported-by: Hulk Robot +Signed-off-by: Kefeng Wang +Signed-off-by: Palmer Dabbelt +Signed-off-by: Sasha Levin +--- + arch/riscv/kernel/stacktrace.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c +index a4b1d94371a0..74b2168d7298 100644 +--- a/arch/riscv/kernel/stacktrace.c ++++ b/arch/riscv/kernel/stacktrace.c +@@ -75,7 +75,7 @@ static void notrace walk_stackframe(struct task_struct *task, + + #else /* !CONFIG_FRAME_POINTER */ + +-static void notrace walk_stackframe(struct task_struct *task, ++void notrace walk_stackframe(struct task_struct *task, + struct pt_regs *regs, bool (*fn)(unsigned long, void *), void *arg) + { + unsigned long sp, pc; +-- +2.25.1 + diff --git a/queue-4.19/samples-bpf-fix-build-error.patch b/queue-4.19/samples-bpf-fix-build-error.patch new file mode 100644 index 00000000000..cb4617eede8 --- /dev/null +++ b/queue-4.19/samples-bpf-fix-build-error.patch @@ -0,0 +1,42 @@ +From f5cc5d1dfcdc46d450489faf2dec35f44caf1907 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 11 May 2020 13:32:34 +0200 +Subject: samples: bpf: Fix build error + +From: Matteo Croce + +[ Upstream commit 23ad04669f81f958e9a4121b0266228d2eb3c357 ] + +GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains +a symbol which clashes with libbpf: + +/usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here +collect2: error: ld returned 1 exit status + +bpf_log_buf here seems to be a leftover, so removing it. + +Signed-off-by: Matteo Croce +Signed-off-by: Alexei Starovoitov +Acked-by: Yonghong Song +Link: https://lore.kernel.org/bpf/20200511113234.80722-1-mcroce@redhat.com +Signed-off-by: Sasha Levin +--- + samples/bpf/lwt_len_hist_user.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/samples/bpf/lwt_len_hist_user.c b/samples/bpf/lwt_len_hist_user.c +index 587b68b1f8dd..430a4b7e353e 100644 +--- a/samples/bpf/lwt_len_hist_user.c ++++ b/samples/bpf/lwt_len_hist_user.c +@@ -15,8 +15,6 @@ + #define MAX_INDEX 64 + #define MAX_STARS 38 + +-char bpf_log_buf[BPF_LOG_BUF_SIZE]; +- + static void stars(char *str, long val, long max, int width) + { + int i; +-- +2.25.1 + diff --git a/queue-4.19/series b/queue-4.19/series index da1f53c4787..5153c5a171e 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -16,3 +16,21 @@ net-mlx5-annotate-mutex-destroy-for-root-ns.patch net-sun-fix-missing-release-regions-in-cas_init_one.patch net-mlx4_core-fix-a-memory-leak-bug.patch mlxsw-spectrum-fix-use-after-free-of-split-unsplit-type_set-in-case-reload-fails.patch +arm-dts-rockchip-fix-phy-nodename-for-rk3228-evb.patch +arm64-dts-rockchip-fix-status-for-gmac2phy-in-rk3328.patch +arm64-dts-rockchip-swap-interrupts-interrupt-names-r.patch +arm-dts-rockchip-swap-clock-names-of-gpu-nodes.patch +arm-dts-rockchip-fix-pinctrl-sub-nodename-for-spi-in.patch +gpio-tegra-mask-gpio-irqs-during-irq-shutdown.patch +alsa-usb-audio-add-mapping-for-asrock-trx40-creator.patch +net-microchip-encx24j600-add-missed-kthread_stop.patch +gfs2-move-privileged-user-check-to-gfs2_quota_lock_c.patch +gfs2-don-t-call-quota_unhold-if-quotas-are-not-locke.patch +cachefiles-fix-race-between-read_waiter-and-read_cop.patch +usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch +usb-gadget-legacy-fix-redundant-initialization-warni.patch +net-freescale-select-config_fixed_phy-where-needed.patch +ib-i40iw-remove-bogus-call-to-netdev_master_upper_de.patch +riscv-stacktrace-fix-undefined-reference-to-walk_sta.patch +cifs-fix-null-pointer-check-in-cifs_read.patch +samples-bpf-fix-build-error.patch diff --git a/queue-4.19/usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch b/queue-4.19/usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch new file mode 100644 index 00000000000..81722f869a2 --- /dev/null +++ b/queue-4.19/usb-dwc3-pci-enable-extcon-driver-for-intel-merrifie.patch @@ -0,0 +1,36 @@ +From c5bab80517dfd9cca487cd5f53b75105d55f9bab Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 4 May 2020 12:33:52 +0300 +Subject: usb: dwc3: pci: Enable extcon driver for Intel Merrifield + +From: Andy Shevchenko + +[ Upstream commit 066c09593454e89bc605ffdff1c9810061f9b1e1 ] + +Intel Merrifield provides a DR support via PMIC which has its own +extcon driver. + +Add a property string to link to that driver. + +Signed-off-by: Andy Shevchenko +Signed-off-by: Felipe Balbi +Signed-off-by: Sasha Levin +--- + drivers/usb/dwc3/dwc3-pci.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c +index edf7984707b7..b2fd505938a0 100644 +--- a/drivers/usb/dwc3/dwc3-pci.c ++++ b/drivers/usb/dwc3/dwc3-pci.c +@@ -112,6 +112,7 @@ static const struct property_entry dwc3_pci_intel_properties[] = { + + static const struct property_entry dwc3_pci_mrfld_properties[] = { + PROPERTY_ENTRY_STRING("dr_mode", "otg"), ++ PROPERTY_ENTRY_STRING("linux,extcon-name", "mrfld_bcove_pwrsrc"), + PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), + {} + }; +-- +2.25.1 + diff --git a/queue-4.19/usb-gadget-legacy-fix-redundant-initialization-warni.patch b/queue-4.19/usb-gadget-legacy-fix-redundant-initialization-warni.patch new file mode 100644 index 00000000000..b0ea0837c9c --- /dev/null +++ b/queue-4.19/usb-gadget-legacy-fix-redundant-initialization-warni.patch @@ -0,0 +1,63 @@ +From fce4f153d3b04174a6f9cb91e3e157801e009ac1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 3 Apr 2020 22:16:51 +0900 +Subject: usb: gadget: legacy: fix redundant initialization warnings + +From: Masahiro Yamada + +[ Upstream commit d13cce757954fa663c69845611957396843ed87a ] + +Fix the following cppcheck warnings: + +drivers/usb/gadget/legacy/inode.c:1364:8: style: Redundant initialization for 'value'. The initialized value is overwritten$ + value = -EOPNOTSUPP; + ^ +drivers/usb/gadget/legacy/inode.c:1331:15: note: value is initialized + int value = -EOPNOTSUPP; + ^ +drivers/usb/gadget/legacy/inode.c:1364:8: note: value is overwritten + value = -EOPNOTSUPP; + ^ +drivers/usb/gadget/legacy/inode.c:1817:8: style: Redundant initialization for 'value'. The initialized value is overwritten$ + value = -EINVAL; + ^ +drivers/usb/gadget/legacy/inode.c:1787:18: note: value is initialized + ssize_t value = len, length = len; + ^ +drivers/usb/gadget/legacy/inode.c:1817:8: note: value is overwritten + value = -EINVAL; + ^ +Acked-by: Alan Stern +Reported-by: kbuild test robot +Signed-off-by: Masahiro Yamada +Signed-off-by: Felipe Balbi + +Signed-off-by: Sasha Levin +--- + drivers/usb/gadget/legacy/inode.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c +index 37ca0e669bd8..25d417ad9000 100644 +--- a/drivers/usb/gadget/legacy/inode.c ++++ b/drivers/usb/gadget/legacy/inode.c +@@ -1360,7 +1360,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) + + req->buf = dev->rbuf; + req->context = NULL; +- value = -EOPNOTSUPP; + switch (ctrl->bRequest) { + + case USB_REQ_GET_DESCRIPTOR: +@@ -1783,7 +1782,7 @@ static ssize_t + dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) + { + struct dev_data *dev = fd->private_data; +- ssize_t value = len, length = len; ++ ssize_t value, length = len; + unsigned total; + u32 tag; + char *kbuf; +-- +2.25.1 +