From: Sasha Levin Date: Mon, 14 Sep 2020 02:58:36 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.19.146~49^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=022770b65488e628ab16e8744622c40d5ba58b64;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/alsa-hda-fix-2-channel-swapping-for-tegra.patch b/queue-4.14/alsa-hda-fix-2-channel-swapping-for-tegra.patch new file mode 100644 index 00000000000..b65bdc19516 --- /dev/null +++ b/queue-4.14/alsa-hda-fix-2-channel-swapping-for-tegra.patch @@ -0,0 +1,50 @@ +From ca89aa9467e8d912008756246cf670f0355a4530 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 25 Aug 2020 10:54:14 +0530 +Subject: ALSA: hda: Fix 2 channel swapping for Tegra + +From: Mohan Kumar + +[ Upstream commit 216116eae43963c662eb84729507bad95214ca6b ] + +The Tegra HDA codec HW implementation has an issue related to not +swapping the 2 channel Audio Sample Packet(ASP) channel mapping. +Whatever the FL and FR mapping specified the left channel always +comes out of left speaker and right channel on right speaker. So +add condition to disallow the swapping of FL,FR during the playback. + +Signed-off-by: Mohan Kumar +Acked-by: Sameer Pujar +Link: https://lore.kernel.org/r/20200825052415.20626-2-mkumard@nvidia.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_hdmi.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c +index cb7047bf844df..75bdcede04e63 100644 +--- a/sound/pci/hda/patch_hdmi.c ++++ b/sound/pci/hda/patch_hdmi.c +@@ -3399,6 +3399,7 @@ static int tegra_hdmi_build_pcms(struct hda_codec *codec) + + static int patch_tegra_hdmi(struct hda_codec *codec) + { ++ struct hdmi_spec *spec; + int err; + + err = patch_generic_hdmi(codec); +@@ -3406,6 +3407,10 @@ static int patch_tegra_hdmi(struct hda_codec *codec) + return err; + + codec->patch_ops.build_pcms = tegra_hdmi_build_pcms; ++ spec = codec->spec; ++ spec->chmap.ops.chmap_cea_alloc_validate_get_type = ++ nvhdmi_chmap_cea_alloc_validate_get_type; ++ spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; + + return 0; + } +-- +2.25.1 + diff --git a/queue-4.14/alsa-hda-fix-a-runtime-pm-issue-in-sof-when-integrat.patch b/queue-4.14/alsa-hda-fix-a-runtime-pm-issue-in-sof-when-integrat.patch new file mode 100644 index 00000000000..e96e3abbaff --- /dev/null +++ b/queue-4.14/alsa-hda-fix-a-runtime-pm-issue-in-sof-when-integrat.patch @@ -0,0 +1,52 @@ +From 843fedc122814a80fe913c62f9f965e8c0c833c8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 2 Sep 2020 18:42:18 +0300 +Subject: ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is + disabled + +From: Rander Wang + +[ Upstream commit 13774d81f38538c5fa2924bdcdfa509155480fa6 ] + +In snd_hdac_device_init pm_runtime_set_active is called to +increase child_count in parent device. But when it is failed +to build connection with GPU for one case that integrated +graphic gpu is disabled, snd_hdac_ext_bus_device_exit will be +invoked to clean up a HD-audio extended codec base device. At +this time the child_count of parent is not decreased, which +makes parent device can't get suspended. + +This patch calls pm_runtime_set_suspended to decrease child_count +in parent device in snd_hdac_device_exit to match with +snd_hdac_device_init. pm_runtime_set_suspended can make sure that +it will not decrease child_count if the device is already suspended. + +Signed-off-by: Rander Wang +Reviewed-by: Ranjani Sridharan +Reviewed-by: Pierre-Louis Bossart +Reviewed-by: Bard Liao +Reviewed-by: Guennadi Liakhovetski +Signed-off-by: Kai Vehmanen +Link: https://lore.kernel.org/r/20200902154218.1440441-1-kai.vehmanen@linux.intel.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/hda/hdac_device.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c +index 19deb306facb7..4a843eb7cc940 100644 +--- a/sound/hda/hdac_device.c ++++ b/sound/hda/hdac_device.c +@@ -123,6 +123,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_init); + void snd_hdac_device_exit(struct hdac_device *codec) + { + pm_runtime_put_noidle(&codec->dev); ++ /* keep balance of runtime PM child_count in parent device */ ++ pm_runtime_set_suspended(&codec->dev); + snd_hdac_bus_remove_device(codec->bus, codec); + kfree(codec->vendor_name); + kfree(codec->chip_name); +-- +2.25.1 + diff --git a/queue-4.14/arc-hsdk-wireup-perf-irq.patch b/queue-4.14/arc-hsdk-wireup-perf-irq.patch new file mode 100644 index 00000000000..4cf0ae8d19d --- /dev/null +++ b/queue-4.14/arc-hsdk-wireup-perf-irq.patch @@ -0,0 +1,36 @@ +From 9700401df47d6be6d0b4a401189aa8d1b3c27e02 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 9 Jul 2020 19:52:32 -0700 +Subject: ARC: HSDK: wireup perf irq + +From: Vineet Gupta + +[ Upstream commit fe81d927b78c4f0557836661d32e41ebc957b024 ] + +Newer version of HSDK aka HSDK-4xD (with dual issue HS48x4 CPU) wired up +the perf interrupt, so enable that in DT. +This is OK for old HSDK where this irq is ignored because pct irq is not +wired up in hardware. + +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +--- + arch/arc/boot/dts/hsdk.dts | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts +index 57d81c6aa379d..aeacea148793c 100644 +--- a/arch/arc/boot/dts/hsdk.dts ++++ b/arch/arc/boot/dts/hsdk.dts +@@ -79,6 +79,8 @@ + + arcpct: pct { + compatible = "snps,archs-pct"; ++ interrupt-parent = <&cpu_intc>; ++ interrupts = <20>; + }; + + /* TIMER0 with interrupt for clockevent */ +-- +2.25.1 + diff --git a/queue-4.14/arc-plat-hsdk-switch-ethernet-phy-mode-to-rgmii-id.patch b/queue-4.14/arc-plat-hsdk-switch-ethernet-phy-mode-to-rgmii-id.patch new file mode 100644 index 00000000000..4bd1a963323 --- /dev/null +++ b/queue-4.14/arc-plat-hsdk-switch-ethernet-phy-mode-to-rgmii-id.patch @@ -0,0 +1,53 @@ +From 1a02767301e72184c2334d4e25d3f7c99bb32eb7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 7 Jul 2020 18:38:58 +0300 +Subject: ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id + +From: Evgeniy Didin + +[ Upstream commit 26907eb605fbc3ba9dbf888f21d9d8d04471271d ] + +HSDK board has Micrel KSZ9031, recent commit +bcf3440c6dd ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") +caused a breakdown of Ethernet. +Using 'phy-mode = "rgmii"' is not correct because accodring RGMII +specification it is necessary to have delay on RX (PHY to MAX) +which is not generated in case of "rgmii". +Using "rgmii-id" adds necessary delay and solves the issue. + +Also adding name of PHY placed on HSDK board. + +Signed-off-by: Evgeniy Didin +Cc: Eugeniy Paltsev +Cc: Alexey Brodkin +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +--- + arch/arc/boot/dts/hsdk.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts +index aeacea148793c..75aa3a8f9fdc9 100644 +--- a/arch/arc/boot/dts/hsdk.dts ++++ b/arch/arc/boot/dts/hsdk.dts +@@ -163,7 +163,7 @@ + reg = <0x8000 0x2000>; + interrupts = <10>; + interrupt-names = "macirq"; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + snps,pbl = <32>; + snps,multicast-filter-bins = <256>; + clocks = <&gmacclk>; +@@ -179,7 +179,7 @@ + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; +- phy0: ethernet-phy@0 { ++ phy0: ethernet-phy@0 { /* Micrel KSZ9031 */ + reg = <0>; + ti,rx-internal-delay = ; + ti,tx-internal-delay = ; +-- +2.25.1 + diff --git a/queue-4.14/arm-dts-bcm5301x-fixed-qspi-compatible-string.patch b/queue-4.14/arm-dts-bcm5301x-fixed-qspi-compatible-string.patch new file mode 100644 index 00000000000..6ee048c50c7 --- /dev/null +++ b/queue-4.14/arm-dts-bcm5301x-fixed-qspi-compatible-string.patch @@ -0,0 +1,35 @@ +From 23ac19f1547648e8eb9d6be148b19a143f6eca65 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 26 Aug 2020 16:45:29 -0700 +Subject: ARM: dts: BCM5301X: Fixed QSPI compatible string + +From: Florian Fainelli + +[ Upstream commit b793dab8d811e103665d6bddaaea1c25db3776eb ] + +The string was incorrectly defined before from least to most +specific, swap the compatible strings accordingly. + +Fixes: 1c8f40650723 ("ARM: dts: BCM5301X: convert to iProc QSPI") +Signed-off-by: Florian Fainelli +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/bcm5301x.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi +index 501877e87a5b8..dffa8b9bd536d 100644 +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -426,7 +426,7 @@ + }; + + spi@18029200 { +- compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"; ++ compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi"; + reg = <0x18029200 0x184>, + <0x18029000 0x124>, + <0x1811b408 0x004>, +-- +2.25.1 + diff --git a/queue-4.14/arm-dts-socfpga-fix-register-entry-for-timer3-on-arr.patch b/queue-4.14/arm-dts-socfpga-fix-register-entry-for-timer3-on-arr.patch new file mode 100644 index 00000000000..22eadc9f2e2 --- /dev/null +++ b/queue-4.14/arm-dts-socfpga-fix-register-entry-for-timer3-on-arr.patch @@ -0,0 +1,34 @@ +From 9aee55a5cb375159ae82cf7ade717c9273e5ff27 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 31 Jul 2020 10:26:40 -0500 +Subject: ARM: dts: socfpga: fix register entry for timer3 on Arria10 + +From: Dinh Nguyen + +[ Upstream commit 0ff5a4812be4ebd4782bbb555d369636eea164f7 ] + +Fixes the register address for the timer3 entry on Arria10. + +Fixes: 475dc86d08de4 ("arm: dts: socfpga: Add a base DTSI for Altera's Arria10 SOC") +Signed-off-by: Dinh Nguyen +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/socfpga_arria10.dtsi b/arch/arm/boot/dts/socfpga_arria10.dtsi +index 672e73e35228c..64f30676b285d 100644 +--- a/arch/arm/boot/dts/socfpga_arria10.dtsi ++++ b/arch/arm/boot/dts/socfpga_arria10.dtsi +@@ -779,7 +779,7 @@ + timer3: timer3@ffd00100 { + compatible = "snps,dw-apb-timer"; + interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>; +- reg = <0xffd01000 0x100>; ++ reg = <0xffd00100 0x100>; + clocks = <&l4_sys_free_clk>; + clock-names = "timer"; + }; +-- +2.25.1 + diff --git a/queue-4.14/arm64-dts-ns2-fixed-qspi-compatible-string.patch b/queue-4.14/arm64-dts-ns2-fixed-qspi-compatible-string.patch new file mode 100644 index 00000000000..d0b446ac0e4 --- /dev/null +++ b/queue-4.14/arm64-dts-ns2-fixed-qspi-compatible-string.patch @@ -0,0 +1,35 @@ +From 0f2d48609cf1af206d40d7ab0584f9717bded793 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 26 Aug 2020 16:49:19 -0700 +Subject: arm64: dts: ns2: Fixed QSPI compatible string + +From: Florian Fainelli + +[ Upstream commit 686e0a0c8c61e0e3f55321d0181fece3efd92777 ] + +The string was incorrectly defined before from least to most specific, +swap the compatible strings accordingly. + +Fixes: ff73917d38a6 ("ARM64: dts: Add QSPI Device Tree node for NS2") +Signed-off-by: Florian Fainelli +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +index 0b72094bcf5a2..05f82819ae2d1 100644 +--- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi ++++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +@@ -745,7 +745,7 @@ + }; + + qspi: spi@66470200 { +- compatible = "brcm,spi-bcm-qspi", "brcm,spi-ns2-qspi"; ++ compatible = "brcm,spi-ns2-qspi", "brcm,spi-bcm-qspi"; + reg = <0x66470200 0x184>, + <0x66470000 0x124>, + <0x67017408 0x004>, +-- +2.25.1 + diff --git a/queue-4.14/cpufreq-intel_pstate-refuse-to-turn-off-with-hwp-ena.patch b/queue-4.14/cpufreq-intel_pstate-refuse-to-turn-off-with-hwp-ena.patch new file mode 100644 index 00000000000..008d16dd538 --- /dev/null +++ b/queue-4.14/cpufreq-intel_pstate-refuse-to-turn-off-with-hwp-ena.patch @@ -0,0 +1,52 @@ +From 5a2a38e4580797ab3fd98a072552e62917ef7dc2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 20 Aug 2020 17:40:02 +0200 +Subject: cpufreq: intel_pstate: Refuse to turn off with HWP enabled + +From: Rafael J. Wysocki + +[ Upstream commit 43298db3009f06fe5c69e1ca8b6cfc2565772fa1 ] + +After commit f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive +mode with HWP enabled") it is possible to change the driver status +to "off" via sysfs with HWP enabled, which effectively causes the +driver to unregister itself, but HWP remains active and it forces the +minimum performance, so even if another cpufreq driver is loaded, +it will not be able to control the CPU frequency. + +For this reason, make the driver refuse to change the status to +"off" with HWP enabled. + +Signed-off-by: Rafael J. Wysocki +Acked-by: Srinivas Pandruvada +Signed-off-by: Sasha Levin +--- + drivers/cpufreq/intel_pstate.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c +index 5c41dc9aaa46d..be1a7bb0b4011 100644 +--- a/drivers/cpufreq/intel_pstate.c ++++ b/drivers/cpufreq/intel_pstate.c +@@ -2098,9 +2098,15 @@ static int intel_pstate_update_status(const char *buf, size_t size) + { + int ret; + +- if (size == 3 && !strncmp(buf, "off", size)) +- return intel_pstate_driver ? +- intel_pstate_unregister_driver() : -EINVAL; ++ if (size == 3 && !strncmp(buf, "off", size)) { ++ if (!intel_pstate_driver) ++ return -EINVAL; ++ ++ if (hwp_active) ++ return -EBUSY; ++ ++ return intel_pstate_unregister_driver(); ++ } + + if (size == 6 && !strncmp(buf, "active", size)) { + if (intel_pstate_driver) { +-- +2.25.1 + diff --git a/queue-4.14/dmaengine-acpi-put-the-csrt-table-after-using-it.patch b/queue-4.14/dmaengine-acpi-put-the-csrt-table-after-using-it.patch new file mode 100644 index 00000000000..dc61946599b --- /dev/null +++ b/queue-4.14/dmaengine-acpi-put-the-csrt-table-after-using-it.patch @@ -0,0 +1,43 @@ +From ef655a88d7460874bfcf70f3a5ab40d19878ba47 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 22 Jul 2020 17:54:21 +0800 +Subject: dmaengine: acpi: Put the CSRT table after using it + +From: Hanjun Guo + +[ Upstream commit 7eb48dd094de5fe0e216b550e73aa85257903973 ] + +The acpi_get_table() should be coupled with acpi_put_table() if +the mapped table is not used at runtime to release the table +mapping, put the CSRT table buf after using it. + +Signed-off-by: Hanjun Guo +Link: https://lore.kernel.org/r/1595411661-15936-1-git-send-email-guohanjun@huawei.com +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +--- + drivers/dma/acpi-dma.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c +index 4a748c3435d7d..8d99c84361cbb 100644 +--- a/drivers/dma/acpi-dma.c ++++ b/drivers/dma/acpi-dma.c +@@ -131,11 +131,13 @@ static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma) + if (ret < 0) { + dev_warn(&adev->dev, + "error in parsing resource group\n"); +- return; ++ break; + } + + grp = (struct acpi_csrt_group *)((void *)grp + grp->length); + } ++ ++ acpi_put_table((struct acpi_table_header *)csrt); + } + + /** +-- +2.25.1 + diff --git a/queue-4.14/drivers-net-wan-hdlc_cisco-add-hard_header_len.patch b/queue-4.14/drivers-net-wan-hdlc_cisco-add-hard_header_len.patch new file mode 100644 index 00000000000..64814e4ab6a --- /dev/null +++ b/queue-4.14/drivers-net-wan-hdlc_cisco-add-hard_header_len.patch @@ -0,0 +1,40 @@ +From 7f94989a4e98793677f255a9f5f89698e096255c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 28 Aug 2020 00:07:52 -0700 +Subject: drivers/net/wan/hdlc_cisco: Add hard_header_len + +From: Xie He + +[ Upstream commit 1a545ebe380bf4c1433e3c136e35a77764fda5ad ] + +This driver didn't set hard_header_len. This patch sets hard_header_len +for it according to its header_ops->create function. + +This driver's header_ops->create function (cisco_hard_header) creates +a header of (struct hdlc_header), so hard_header_len should be set to +sizeof(struct hdlc_header). + +Cc: Martin Schiller +Signed-off-by: Xie He +Acked-by: Krzysztof Halasa +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/wan/hdlc_cisco.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c +index a408abc25512a..7f99fb666f196 100644 +--- a/drivers/net/wan/hdlc_cisco.c ++++ b/drivers/net/wan/hdlc_cisco.c +@@ -377,6 +377,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) + memcpy(&state(hdlc)->settings, &new_settings, size); + spin_lock_init(&state(hdlc)->lock); + dev->header_ops = &cisco_header_ops; ++ dev->hard_header_len = sizeof(struct hdlc_header); + dev->type = ARPHRD_CISCO; + call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev); + netif_dormant_on(dev); +-- +2.25.1 + diff --git a/queue-4.14/drivers-net-wan-lapbether-added-needed_tailroom.patch b/queue-4.14/drivers-net-wan-lapbether-added-needed_tailroom.patch new file mode 100644 index 00000000000..f2ab4783341 --- /dev/null +++ b/queue-4.14/drivers-net-wan-lapbether-added-needed_tailroom.patch @@ -0,0 +1,38 @@ +From 8a306ecf43614749c871f28ea307b871aea2224f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 21 Aug 2020 14:26:59 -0700 +Subject: drivers/net/wan/lapbether: Added needed_tailroom + +From: Xie He + +[ Upstream commit 1ee39c1448c4e0d480c5b390e2db1987561fb5c2 ] + +The underlying Ethernet device may request necessary tailroom to be +allocated by setting needed_tailroom. This driver should also set +needed_tailroom to request the tailroom needed by the underlying +Ethernet device to be allocated. + +Cc: Willem de Bruijn +Cc: Martin Schiller +Signed-off-by: Xie He +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/wan/lapbether.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c +index c94dfa70f2a33..6b2553e893aca 100644 +--- a/drivers/net/wan/lapbether.c ++++ b/drivers/net/wan/lapbether.c +@@ -343,6 +343,7 @@ static int lapbeth_new_device(struct net_device *dev) + */ + ndev->needed_headroom = -1 + 3 + 2 + dev->hard_header_len + + dev->needed_headroom; ++ ndev->needed_tailroom = dev->needed_tailroom; + + lapbeth = netdev_priv(ndev); + lapbeth->axdev = ndev; +-- +2.25.1 + diff --git a/queue-4.14/drivers-net-wan-lapbether-set-network_header-before-.patch b/queue-4.14/drivers-net-wan-lapbether-set-network_header-before-.patch new file mode 100644 index 00000000000..470a49e2983 --- /dev/null +++ b/queue-4.14/drivers-net-wan-lapbether-set-network_header-before-.patch @@ -0,0 +1,53 @@ +From 8d1359115818382e8409f2354aa4fc58f97b57f1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 25 Aug 2020 20:03:53 -0700 +Subject: drivers/net/wan/lapbether: Set network_header before transmitting + +From: Xie He + +[ Upstream commit 91244d108441013b7367b3b4dcc6869998676473 ] + +Set the skb's network_header before it is passed to the underlying +Ethernet device for transmission. + +This patch fixes the following issue: + +When we use this driver with AF_PACKET sockets, there would be error +messages of: + protocol 0805 is buggy, dev (Ethernet interface name) +printed in the system "dmesg" log. + +This is because skbs passed down to the Ethernet device for transmission +don't have their network_header properly set, and the dev_queue_xmit_nit +function in net/core/dev.c complains about this. + +Reason of setting the network_header to this place (at the end of the +Ethernet header, and at the beginning of the Ethernet payload): + +Because when this driver receives an skb from the Ethernet device, the +network_header is also set at this place. + +Cc: Martin Schiller +Signed-off-by: Xie He +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/wan/lapbether.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c +index 6b2553e893aca..15177a54b17d7 100644 +--- a/drivers/net/wan/lapbether.c ++++ b/drivers/net/wan/lapbether.c +@@ -213,6 +213,8 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb) + + skb->dev = dev = lapbeth->ethdev; + ++ skb_reset_network_header(skb); ++ + dev_hard_header(skb, dev, ETH_P_DEC, bcast_addr, NULL, 0); + + dev_queue_xmit(skb); +-- +2.25.1 + diff --git a/queue-4.14/firestream-fix-memleak-in-fs_open.patch b/queue-4.14/firestream-fix-memleak-in-fs_open.patch new file mode 100644 index 00000000000..bba5d1f6af8 --- /dev/null +++ b/queue-4.14/firestream-fix-memleak-in-fs_open.patch @@ -0,0 +1,34 @@ +From 169c2c830064f3506a633682f43f9843d964db79 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 23 Aug 2020 19:29:35 +0800 +Subject: firestream: Fix memleak in fs_open + +From: Dinghao Liu + +[ Upstream commit 15ac5cdafb9202424206dc5bd376437a358963f9 ] + +When make_rate() fails, vcc should be freed just +like other error paths in fs_open(). + +Signed-off-by: Dinghao Liu +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/atm/firestream.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c +index 0e449ee11ac7f..e7cffd0cc3616 100644 +--- a/drivers/atm/firestream.c ++++ b/drivers/atm/firestream.c +@@ -1013,6 +1013,7 @@ static int fs_open(struct atm_vcc *atm_vcc) + error = make_rate (pcr, r, &tmc0, NULL); + if (error) { + kfree(tc); ++ kfree(vcc); + return error; + } + } +-- +2.25.1 + diff --git a/queue-4.14/gcov-disable-gcov-build-with-gcc-10.patch b/queue-4.14/gcov-disable-gcov-build-with-gcc-10.patch new file mode 100644 index 00000000000..5f474916af0 --- /dev/null +++ b/queue-4.14/gcov-disable-gcov-build-with-gcc-10.patch @@ -0,0 +1,41 @@ +From e668ecebc671f3a843e377738873631b66c8561a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 4 Sep 2020 18:58:08 +0300 +Subject: gcov: Disable gcov build with GCC 10 + +From: Leon Romanovsky + +[ Upstream commit cfc905f158eaa099d6258031614d11869e7ef71c ] + +GCOV built with GCC 10 doesn't initialize n_function variable. This +produces different kernel panics as was seen by Colin in Ubuntu and me +in FC 32. + +As a workaround, let's disable GCOV build for broken GCC 10 version. + +Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1891288 +Link: https://lore.kernel.org/lkml/20200827133932.3338519-1-leon@kernel.org +Link: https://lore.kernel.org/lkml/CAHk-=whbijeSdSvx-Xcr0DPMj0BiwhJ+uiNnDSVZcr_h_kg7UA@mail.gmail.com/ +Cc: Colin Ian King +Signed-off-by: Leon Romanovsky +Signed-off-by: Linus Torvalds +Signed-off-by: Sasha Levin +--- + kernel/gcov/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig +index 1276aabaab550..1d78ed19a3512 100644 +--- a/kernel/gcov/Kconfig ++++ b/kernel/gcov/Kconfig +@@ -3,6 +3,7 @@ menu "GCOV-based kernel profiling" + config GCOV_KERNEL + bool "Enable gcov-based kernel profiling" + depends on DEBUG_FS ++ depends on !CC_IS_GCC || GCC_VERSION < 100000 + select CONSTRUCTORS if !UML + default n + ---help--- +-- +2.25.1 + diff --git a/queue-4.14/iio-adc-mcp3422-fix-locking-on-error-path.patch b/queue-4.14/iio-adc-mcp3422-fix-locking-on-error-path.patch new file mode 100644 index 00000000000..143d2ed46fd --- /dev/null +++ b/queue-4.14/iio-adc-mcp3422-fix-locking-on-error-path.patch @@ -0,0 +1,42 @@ +From f35ce652ae8c36df423897342d4a2bba6d74a63a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 1 Sep 2020 11:32:18 +0200 +Subject: iio: adc: mcp3422: fix locking on error path + +From: Angelo Compagnucci + +[ Upstream commit a139ffa40f0c24b753838b8ef3dcf6ad10eb7854 ] + +Reading from the chip should be unlocked on error path else the lock +could never being released. + +Fixes: 07914c84ba30 ("iio: adc: Add driver for Microchip MCP3422/3/4 high resolution ADC") +Fixes: 3f1093d83d71 ("iio: adc: mcp3422: fix locking scope") +Acked-by: Jonathan Cameron +Signed-off-by: Angelo Compagnucci +Link: https://lore.kernel.org/r/20200901093218.1500845-1-angelo.compagnucci@gmail.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/iio/adc/mcp3422.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c +index 63de705086ed4..155db438b7ecb 100644 +--- a/drivers/iio/adc/mcp3422.c ++++ b/drivers/iio/adc/mcp3422.c +@@ -148,8 +148,10 @@ static int mcp3422_read_channel(struct mcp3422 *adc, + config &= ~MCP3422_PGA_MASK; + config |= MCP3422_PGA_VALUE(adc->pga[req_channel]); + ret = mcp3422_update_config(adc, config); +- if (ret < 0) ++ if (ret < 0) { ++ mutex_unlock(&adc->lock); + return ret; ++ } + msleep(mcp3422_read_times[MCP3422_SAMPLE_RATE(adc->config)]); + } + +-- +2.25.1 + diff --git a/queue-4.14/irqchip-eznps-fix-build-error-for-arc700-builds.patch b/queue-4.14/irqchip-eznps-fix-build-error-for-arc700-builds.patch new file mode 100644 index 00000000000..bcb7359675a --- /dev/null +++ b/queue-4.14/irqchip-eznps-fix-build-error-for-arc700-builds.patch @@ -0,0 +1,60 @@ +From 1a11150e566341b6ab68d40cdc2d85b1f8f546e0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 24 Aug 2020 12:10:33 -0700 +Subject: irqchip/eznps: Fix build error for !ARC700 builds + +From: Vineet Gupta + +[ Upstream commit 89d29997f103d08264b0685796b420d911658b96 ] + +eznps driver is supposed to be platform independent however it ends up +including stuff from inside arch/arc headers leading to rand config +build errors. + +The quick hack to fix this (proper fix is too much chrun for non active +user-base) is to add following to nps platform agnostic header. + - copy AUX_IENABLE from arch/arc header + - move CTOP_AUX_IACK from arch/arc/plat-eznps/*/** + +Reported-by: kernel test robot +Reported-by: Sebastian Andrzej Siewior +Link: https://lkml.kernel.org/r/20200824095831.5lpkmkafelnvlpi2@linutronix.de +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +--- + arch/arc/plat-eznps/include/plat/ctop.h | 1 - + include/soc/nps/common.h | 6 ++++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/arch/arc/plat-eznps/include/plat/ctop.h b/arch/arc/plat-eznps/include/plat/ctop.h +index 4f6a1673b3a6e..ddfca2c3357a0 100644 +--- a/arch/arc/plat-eznps/include/plat/ctop.h ++++ b/arch/arc/plat-eznps/include/plat/ctop.h +@@ -43,7 +43,6 @@ + #define CTOP_AUX_DPC (CTOP_AUX_BASE + 0x02C) + #define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030) + #define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080) +-#define CTOP_AUX_IACK (CTOP_AUX_BASE + 0x088) + #define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C) + #define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300) + +diff --git a/include/soc/nps/common.h b/include/soc/nps/common.h +index 9b1d43d671a3f..8c18dc6d3fde5 100644 +--- a/include/soc/nps/common.h ++++ b/include/soc/nps/common.h +@@ -45,6 +45,12 @@ + #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST 0x5B60 + #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM 0x00010422 + ++#ifndef AUX_IENABLE ++#define AUX_IENABLE 0x40c ++#endif ++ ++#define CTOP_AUX_IACK (0xFFFFF800 + 0x088) ++ + #ifndef __ASSEMBLY__ + + /* In order to increase compilation test coverage */ +-- +2.25.1 + diff --git a/queue-4.14/mmc-sdhci-msm-add-retries-when-all-tuning-phases-are.patch b/queue-4.14/mmc-sdhci-msm-add-retries-when-all-tuning-phases-are.patch new file mode 100644 index 00000000000..b0409595459 --- /dev/null +++ b/queue-4.14/mmc-sdhci-msm-add-retries-when-all-tuning-phases-are.patch @@ -0,0 +1,77 @@ +From 145df7dd5779b20b8845d61c49f6cb7b6ee5d245 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 27 Aug 2020 07:58:41 -0700 +Subject: mmc: sdhci-msm: Add retries when all tuning phases are found valid + +From: Douglas Anderson + +[ Upstream commit 9d5dcefb7b114d610aeb2371f6a6f119af316e43 ] + +As the comments in this patch say, if we tune and find all phases are +valid it's _almost_ as bad as no phases being found valid. Probably +all phases are not really reliable but we didn't detect where the +unreliable place is. That means we'll essentially be guessing and +hoping we get a good phase. + +This is not just a problem in theory. It was causing real problems on +a real board. On that board, most often phase 10 is found as the only +invalid phase, though sometimes 10 and 11 are invalid and sometimes +just 11. Some percentage of the time, however, all phases are found +to be valid. When this happens, the current logic will decide to use +phase 11. Since phase 11 is sometimes found to be invalid, this is a +bad choice. Sure enough, when phase 11 is picked we often get mmc +errors later in boot. + +I have seen cases where all phases were found to be valid 3 times in a +row, so increase the retry count to 10 just to be extra sure. + +Fixes: 415b5a75da43 ("mmc: sdhci-msm: Add platform_execute_tuning implementation") +Signed-off-by: Douglas Anderson +Reviewed-by: Veerabhadrarao Badiganti +Acked-by: Adrian Hunter +Link: https://lore.kernel.org/r/20200827075809.1.If179abf5ecb67c963494db79c3bc4247d987419b@changeid +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +--- + drivers/mmc/host/sdhci-msm.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c +index 75cf66ffc705d..ff3f9a01e443c 100644 +--- a/drivers/mmc/host/sdhci-msm.c ++++ b/drivers/mmc/host/sdhci-msm.c +@@ -837,7 +837,7 @@ static void sdhci_msm_set_cdr(struct sdhci_host *host, bool enable) + static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode) + { + struct sdhci_host *host = mmc_priv(mmc); +- int tuning_seq_cnt = 3; ++ int tuning_seq_cnt = 10; + u8 phase, tuned_phases[16], tuned_phase_cnt = 0; + int rc; + struct mmc_ios ios = host->mmc->ios; +@@ -901,6 +901,22 @@ retry: + } while (++phase < ARRAY_SIZE(tuned_phases)); + + if (tuned_phase_cnt) { ++ if (tuned_phase_cnt == ARRAY_SIZE(tuned_phases)) { ++ /* ++ * All phases valid is _almost_ as bad as no phases ++ * valid. Probably all phases are not really reliable ++ * but we didn't detect where the unreliable place is. ++ * That means we'll essentially be guessing and hoping ++ * we get a good phase. Better to try a few times. ++ */ ++ dev_dbg(mmc_dev(mmc), "%s: All phases valid; try again\n", ++ mmc_hostname(mmc)); ++ if (--tuning_seq_cnt) { ++ tuned_phase_cnt = 0; ++ goto retry; ++ } ++ } ++ + rc = msm_find_most_appropriate_phase(host, tuned_phases, + tuned_phase_cnt); + if (rc < 0) +-- +2.25.1 + diff --git a/queue-4.14/nfc-st95hf-fix-memleak-in-st95hf_in_send_cmd.patch b/queue-4.14/nfc-st95hf-fix-memleak-in-st95hf_in_send_cmd.patch new file mode 100644 index 00000000000..3fe91809ff8 --- /dev/null +++ b/queue-4.14/nfc-st95hf-fix-memleak-in-st95hf_in_send_cmd.patch @@ -0,0 +1,35 @@ +From 6bd2598a7e352dc5e0df0c358dd53435cba8a31b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 23 Aug 2020 15:23:43 +0800 +Subject: NFC: st95hf: Fix memleak in st95hf_in_send_cmd + +From: Dinghao Liu + +[ Upstream commit f97c04c316d8fea16dca449fdfbe101fbdfee6a2 ] + +When down_killable() fails, skb_resp should be freed +just like when st95hf_spi_send() fails. + +Signed-off-by: Dinghao Liu +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/nfc/st95hf/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c +index 01acb6e533655..c4b6e29c07192 100644 +--- a/drivers/nfc/st95hf/core.c ++++ b/drivers/nfc/st95hf/core.c +@@ -981,7 +981,7 @@ static int st95hf_in_send_cmd(struct nfc_digital_dev *ddev, + rc = down_killable(&stcontext->exchange_lock); + if (rc) { + WARN(1, "Semaphore is not found up in st95hf_in_send_cmd\n"); +- return rc; ++ goto free_skb_resp; + } + + rc = st95hf_spi_send(&stcontext->spicontext, skb->data, +-- +2.25.1 + diff --git a/queue-4.14/rdma-core-fix-reported-speed-and-width.patch b/queue-4.14/rdma-core-fix-reported-speed-and-width.patch new file mode 100644 index 00000000000..2ae375cf396 --- /dev/null +++ b/queue-4.14/rdma-core-fix-reported-speed-and-width.patch @@ -0,0 +1,40 @@ +From 3c578825ff97e9fe33d1d99345f3638aedfee4ec Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 2 Sep 2020 15:43:04 +0300 +Subject: RDMA/core: Fix reported speed and width + +From: Kamal Heib + +[ Upstream commit 28b0865714b315e318ac45c4fc9156f3d4649646 ] + +When the returned speed from __ethtool_get_link_ksettings() is +SPEED_UNKNOWN this will lead to reporting a wrong speed and width for +providers that uses ib_get_eth_speed(), fix that by defaulting the +netdev_speed to SPEED_1000 in case the returned value from +__ethtool_get_link_ksettings() is SPEED_UNKNOWN. + +Fixes: d41861942fc5 ("IB/core: Add generic function to extract IB speed from netdev") +Link: https://lore.kernel.org/r/20200902124304.170912-1-kamalheib1@gmail.com +Signed-off-by: Kamal Heib +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/core/verbs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c +index d21c86dd27d86..01f02b3cb835e 100644 +--- a/drivers/infiniband/core/verbs.c ++++ b/drivers/infiniband/core/verbs.c +@@ -1343,7 +1343,7 @@ int ib_get_eth_speed(struct ib_device *dev, u8 port_num, u8 *speed, u8 *width) + + dev_put(netdev); + +- if (!rc) { ++ if (!rc && lksettings.base.speed != (u32)SPEED_UNKNOWN) { + netdev_speed = lksettings.base.speed; + } else { + netdev_speed = SPEED_1000; +-- +2.25.1 + diff --git a/queue-4.14/rdma-rxe-drop-pointless-checks-in-rxe_init_ports.patch b/queue-4.14/rdma-rxe-drop-pointless-checks-in-rxe_init_ports.patch new file mode 100644 index 00000000000..3d1377d4eb9 --- /dev/null +++ b/queue-4.14/rdma-rxe-drop-pointless-checks-in-rxe_init_ports.patch @@ -0,0 +1,39 @@ +From eee8148a9586b419205c17a43b226d152634674c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 5 Jul 2020 13:43:10 +0300 +Subject: RDMA/rxe: Drop pointless checks in rxe_init_ports + +From: Kamal Heib + +[ Upstream commit 6112ef62826e91afbae5446d5d47b38e25f47e3f ] + +Both pkey_tbl_len and gid_tbl_len are set in rxe_init_port_param() - so no +need to check if they aren't set. + +Fixes: 8700e3e7c485 ("Soft RoCE driver") +Link: https://lore.kernel.org/r/20200705104313.283034-2-kamalheib1@gmail.com +Signed-off-by: Kamal Heib +Reviewed-by: Leon Romanovsky +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/sw/rxe/rxe.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c +index 8c3d30b3092d4..25267a620e0b5 100644 +--- a/drivers/infiniband/sw/rxe/rxe.c ++++ b/drivers/infiniband/sw/rxe/rxe.c +@@ -170,9 +170,6 @@ static int rxe_init_ports(struct rxe_dev *rxe) + + rxe_init_port_param(port); + +- if (!port->attr.pkey_tbl_len || !port->attr.gid_tbl_len) +- return -EINVAL; +- + port->pkey_tbl = kcalloc(port->attr.pkey_tbl_len, + sizeof(*port->pkey_tbl), GFP_KERNEL); + +-- +2.25.1 + diff --git a/queue-4.14/rdma-rxe-fix-memleak-in-rxe_mem_init_user.patch b/queue-4.14/rdma-rxe-fix-memleak-in-rxe_mem_init_user.patch new file mode 100644 index 00000000000..718c8d31c2d --- /dev/null +++ b/queue-4.14/rdma-rxe-fix-memleak-in-rxe_mem_init_user.patch @@ -0,0 +1,36 @@ +From a074b99b56bfe6947fdfc896b942c802dbc8676f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 19 Aug 2020 15:56:32 +0800 +Subject: RDMA/rxe: Fix memleak in rxe_mem_init_user + +From: Dinghao Liu + +[ Upstream commit e3ddd6067ee62f6e76ebcf61ff08b2c729ae412b ] + +When page_address() fails, umem should be freed just like when +rxe_mem_alloc() fails. + +Fixes: 8700e3e7c485 ("Soft RoCE driver") +Link: https://lore.kernel.org/r/20200819075632.22285-1-dinghao.liu@zju.edu.cn +Signed-off-by: Dinghao Liu +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/sw/rxe/rxe_mr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c +index 5c2684bf430f8..a0d2a2350c7e5 100644 +--- a/drivers/infiniband/sw/rxe/rxe_mr.c ++++ b/drivers/infiniband/sw/rxe/rxe_mr.c +@@ -203,6 +203,7 @@ int rxe_mem_init_user(struct rxe_dev *rxe, struct rxe_pd *pd, u64 start, + vaddr = page_address(sg_page(sg)); + if (!vaddr) { + pr_warn("null vaddr\n"); ++ ib_umem_release(umem); + err = -ENOMEM; + goto err1; + } +-- +2.25.1 + diff --git a/queue-4.14/scsi-libsas-set-data_dir-as-dma_none-if-libata-marks.patch b/queue-4.14/scsi-libsas-set-data_dir-as-dma_none-if-libata-marks.patch new file mode 100644 index 00000000000..33c72d6a328 --- /dev/null +++ b/queue-4.14/scsi-libsas-set-data_dir-as-dma_none-if-libata-marks.patch @@ -0,0 +1,53 @@ +From baf2b901367507c6a09c917061f3b5b7790e835f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 26 Aug 2020 15:24:26 +0800 +Subject: scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA + +From: Luo Jiaxing + +[ Upstream commit 53de092f47ff40e8d4d78d590d95819d391bf2e0 ] + +It was discovered that sdparm will fail when attempting to disable write +cache on a SATA disk connected via libsas. + +In the ATA command set the write cache state is controlled through the SET +FEATURES operation. This is roughly corresponds to MODE SELECT in SCSI and +the latter command is what is used in the SCSI-ATA translation layer. A +subtle difference is that a MODE SELECT carries data whereas SET FEATURES +is defined as a non-data command in ATA. + +Set the DMA data direction to DMA_NONE if the requested ATA command is +identified as non-data. + +[mkp: commit desc] + +Fixes: fa1c1e8f1ece ("[SCSI] Add SATA support to libsas") +Link: https://lore.kernel.org/r/1598426666-54544-1-git-send-email-luojiaxing@huawei.com +Reviewed-by: John Garry +Reviewed-by: Jason Yan +Signed-off-by: Luo Jiaxing +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + drivers/scsi/libsas/sas_ata.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c +index 70be4425ae0be..470e11b428208 100644 +--- a/drivers/scsi/libsas/sas_ata.c ++++ b/drivers/scsi/libsas/sas_ata.c +@@ -227,7 +227,10 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) + task->num_scatter = si; + } + +- task->data_dir = qc->dma_dir; ++ if (qc->tf.protocol == ATA_PROT_NODATA) ++ task->data_dir = DMA_NONE; ++ else ++ task->data_dir = qc->dma_dir; + task->scatter = qc->sg; + task->ata_task.retry_count = 1; + task->task_state_flags = SAS_TASK_STATE_PENDING; +-- +2.25.1 + diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..9ab72701d18 --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1,23 @@ +arm-dts-socfpga-fix-register-entry-for-timer3-on-arr.patch +rdma-rxe-fix-memleak-in-rxe_mem_init_user.patch +rdma-rxe-drop-pointless-checks-in-rxe_init_ports.patch +iio-adc-mcp3422-fix-locking-on-error-path.patch +scsi-libsas-set-data_dir-as-dma_none-if-libata-marks.patch +rdma-core-fix-reported-speed-and-width.patch +mmc-sdhci-msm-add-retries-when-all-tuning-phases-are.patch +arm-dts-bcm5301x-fixed-qspi-compatible-string.patch +arm64-dts-ns2-fixed-qspi-compatible-string.patch +arc-hsdk-wireup-perf-irq.patch +dmaengine-acpi-put-the-csrt-table-after-using-it.patch +drivers-net-wan-lapbether-added-needed_tailroom.patch +nfc-st95hf-fix-memleak-in-st95hf_in_send_cmd.patch +firestream-fix-memleak-in-fs_open.patch +alsa-hda-fix-2-channel-swapping-for-tegra.patch +drivers-net-wan-lapbether-set-network_header-before-.patch +xfs-initialize-the-shortform-attr-header-padding-ent.patch +irqchip-eznps-fix-build-error-for-arc700-builds.patch +drivers-net-wan-hdlc_cisco-add-hard_header_len.patch +arc-plat-hsdk-switch-ethernet-phy-mode-to-rgmii-id.patch +cpufreq-intel_pstate-refuse-to-turn-off-with-hwp-ena.patch +alsa-hda-fix-a-runtime-pm-issue-in-sof-when-integrat.patch +gcov-disable-gcov-build-with-gcc-10.patch diff --git a/queue-4.14/xfs-initialize-the-shortform-attr-header-padding-ent.patch b/queue-4.14/xfs-initialize-the-shortform-attr-header-padding-ent.patch new file mode 100644 index 00000000000..04a1c3547a2 --- /dev/null +++ b/queue-4.14/xfs-initialize-the-shortform-attr-header-padding-ent.patch @@ -0,0 +1,38 @@ +From fda750f4f94abebd49f4ae3773a9bfbb1cc65462 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 26 Aug 2020 14:12:18 -0700 +Subject: xfs: initialize the shortform attr header padding entry + +From: Darrick J. Wong + +[ Upstream commit 125eac243806e021f33a1fdea3687eccbb9f7636 ] + +Don't leak kernel memory contents into the shortform attr fork. + +Signed-off-by: Darrick J. Wong +Reviewed-by: Eric Sandeen +Reviewed-by: Dave Chinner +Reviewed-by: Christoph Hellwig +Signed-off-by: Sasha Levin +--- + fs/xfs/libxfs/xfs_attr_leaf.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c +index 73a541755d5b7..299d17b088e21 100644 +--- a/fs/xfs/libxfs/xfs_attr_leaf.c ++++ b/fs/xfs/libxfs/xfs_attr_leaf.c +@@ -520,8 +520,8 @@ xfs_attr_shortform_create(xfs_da_args_t *args) + ASSERT(ifp->if_flags & XFS_IFINLINE); + } + xfs_idata_realloc(dp, sizeof(*hdr), XFS_ATTR_FORK); +- hdr = (xfs_attr_sf_hdr_t *)ifp->if_u1.if_data; +- hdr->count = 0; ++ hdr = (struct xfs_attr_sf_hdr *)ifp->if_u1.if_data; ++ memset(hdr, 0, sizeof(*hdr)); + hdr->totsize = cpu_to_be16(sizeof(*hdr)); + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_ADATA); + } +-- +2.25.1 +