From: Greg Kroah-Hartman Date: Fri, 6 Apr 2018 08:37:01 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v3.18.103~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e817e50776a983ece02ec744622e16fa3d673c00;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: net-cavium-liquidio-fix-up-avoid-dma_unmap_single-on-uninitialized-ndata.patch revert-arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch revert-arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch revert-cpufreq-fix-governor-module-removal-race.patch revert-ip6_vti-adjust-vti-mtu-according-to-mtu-of-lower-device.patch revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch revert-pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch spi-davinci-fix-up-dma_mapping_error-incorrect-patch.patch --- diff --git a/queue-4.4/net-cavium-liquidio-fix-up-avoid-dma_unmap_single-on-uninitialized-ndata.patch b/queue-4.4/net-cavium-liquidio-fix-up-avoid-dma_unmap_single-on-uninitialized-ndata.patch new file mode 100644 index 00000000000..b4fbad3e1eb --- /dev/null +++ b/queue-4.4/net-cavium-liquidio-fix-up-avoid-dma_unmap_single-on-uninitialized-ndata.patch @@ -0,0 +1,41 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 10:24:54 +0200 +Subject: net: cavium: liquidio: fix up "Avoid dma_unmap_single on uninitialized ndata" + +From: Greg Kroah-Hartman + +This fixes up commit 1d1cb762524f05cfb37994e0d36b7b4b5e957134 which was +commit 8e6ce7ebeb34f0992f56de078c3744fb383657fa upstream. + +Ben writes: + This goto should not have been changed, as no DMA mapping has been + attempted at this point in the function. + + This seems to have been fixed upstream by commit 6a885b60dad2 "liquidio: + Introduce new octeon2/3 header". I leave it to you to work out how it + should be fixed in 4.4-stable. + +Fix this up by hand, as the referenced patch isn't worthy of being +backported. + +Reported-by: Ben Hutchings +Cc: Florian Fainelli +Cc: David S. Miller +Cc: Julia Lawall +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c ++++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c +@@ -2823,7 +2823,7 @@ static int liquidio_xmit(struct sk_buff + if (!g) { + netif_info(lio, tx_err, lio->netdev, + "Transmit scatter gather: glist null!\n"); +- goto lio_xmit_dma_failed; ++ goto lio_xmit_failed; + } + + cmdsetup.s.gather = 1; diff --git a/queue-4.4/revert-arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch b/queue-4.4/revert-arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch new file mode 100644 index 00000000000..156d37eab83 --- /dev/null +++ b/queue-4.4/revert-arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch @@ -0,0 +1,33 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 08:46:40 +0200 +Subject: Revert "ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin" + +From: Greg Kroah-Hartman + +This reverts commit 59df934af72fe74a64be6a0d8dba21375a5482bc which was +comit e153db03c6b7a035c797bcdf35262586f003ee93 upstream. + +It requires a driver that was not merged until 4.16, so remove it from +this stable tree as it is pointless. + +Reported-by: Ben Hutchings +Cc: Andrew F. Davis +Cc: Tony Lindgren +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/dts/am335x-pepper.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/am335x-pepper.dts ++++ b/arch/arm/boot/dts/am335x-pepper.dts +@@ -139,7 +139,7 @@ + &audio_codec { + status = "okay"; + +- reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; ++ gpio-reset = <&gpio1 16 GPIO_ACTIVE_LOW>; + AVDD-supply = <&ldo3_reg>; + IOVDD-supply = <&ldo3_reg>; + DRVDD-supply = <&ldo3_reg>; diff --git a/queue-4.4/revert-arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch b/queue-4.4/revert-arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch new file mode 100644 index 00000000000..729a6debb58 --- /dev/null +++ b/queue-4.4/revert-arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch @@ -0,0 +1,42 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 08:57:11 +0200 +Subject: Revert "ARM: dts: omap3-n900: Fix the audio CODEC's reset pin" + +From: Greg Kroah-Hartman + +This reverts commit ffa0a8252863189f0bc92d46c34588df3699f8f8 which was +commit 7be4b5dc7ffa9499ac6ef33a5ffa9ff43f9b7057 upstream. + +It requires a driver that was not merged until 4.16, so remove it from +this stable tree as it is pointless. + +Reported-by: Ben Hutchings +Cc: Andrew F. Davis +Cc: Tony Lindgren +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/dts/omap3-n900.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/omap3-n900.dts ++++ b/arch/arm/boot/dts/omap3-n900.dts +@@ -488,7 +488,7 @@ + tlv320aic3x: tlv320aic3x@18 { + compatible = "ti,tlv320aic3x"; + reg = <0x18>; +- reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; /* 60 */ ++ gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */ + ai3x-gpio-func = < + 0 /* AIC3X_GPIO1_FUNC_DISABLED */ + 5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */ +@@ -505,7 +505,7 @@ + tlv320aic3x_aux: tlv320aic3x@19 { + compatible = "ti,tlv320aic3x"; + reg = <0x19>; +- reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; /* 60 */ ++ gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */ + + AVDD-supply = <&vmmc2>; + DRVDD-supply = <&vmmc2>; diff --git a/queue-4.4/revert-cpufreq-fix-governor-module-removal-race.patch b/queue-4.4/revert-cpufreq-fix-governor-module-removal-race.patch new file mode 100644 index 00000000000..0d4fe309417 --- /dev/null +++ b/queue-4.4/revert-cpufreq-fix-governor-module-removal-race.patch @@ -0,0 +1,43 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 09:04:23 +0200 +Subject: Revert "cpufreq: Fix governor module removal race" + +From: Greg Kroah-Hartman + +This reverts commit 3f7dfb7fcf98a7e73dee018c4a68537ce7fec646 which was +commit a8b149d32b663c1a4105273295184b78f53d33cf upstream. + +The backport was not correct, so just drop it entirely. + +Reported-by: Ben Hutchings +Cc: Rafael J. Wysocki +Cc: Viresh Kumar +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/cpufreq/cpufreq.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/cpufreq/cpufreq.c ++++ b/drivers/cpufreq/cpufreq.c +@@ -551,8 +551,6 @@ static int cpufreq_parse_governor(char * + *governor = t; + err = 0; + } +- if (t && !try_module_get(t->owner)) +- t = NULL; + + mutex_unlock(&cpufreq_governor_mutex); + } +@@ -671,10 +669,6 @@ static ssize_t store_scaling_governor(st + return -EINVAL; + + ret = cpufreq_set_policy(policy, &new_policy); +- +- if (new_policy.governor) +- module_put(new_policy.governor->owner); +- + return ret ? ret : count; + } + diff --git a/queue-4.4/revert-ip6_vti-adjust-vti-mtu-according-to-mtu-of-lower-device.patch b/queue-4.4/revert-ip6_vti-adjust-vti-mtu-according-to-mtu-of-lower-device.patch new file mode 100644 index 00000000000..7f2a15520e7 --- /dev/null +++ b/queue-4.4/revert-ip6_vti-adjust-vti-mtu-according-to-mtu-of-lower-device.patch @@ -0,0 +1,66 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 09:42:53 +0200 +Subject: Revert "ip6_vti: adjust vti mtu according to mtu of lower device" + +From: Greg Kroah-Hartman + +This reverts commit 2fe832c678189d6b19b5ff282e7e70df79c1406b which is +commit 53c81e95df1793933f87748d36070a721f6cb287 upstream. + +Ben writes that there are a number of follow-on patches needed to fix +this up, but they get complex to backport, and some custom fixes are +needed, so let's just revert this and wait for a "real" set of patches +to resolve this to be submitted if it is really needed. + +Reported-by: Ben Hutchings +Cc: Petr Vorel +Cc: Alexey Kodanev +Cc: David S. Miller +Cc: Stefano Brivio +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv6/ip6_vti.c | 20 -------------------- + 1 file changed, 20 deletions(-) + +diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c +index e4b0fb2f06a3..d7105422bc63 100644 +--- a/net/ipv6/ip6_vti.c ++++ b/net/ipv6/ip6_vti.c +@@ -614,7 +614,6 @@ static void vti6_link_config(struct ip6_tnl *t) + { + struct net_device *dev = t->dev; + struct __ip6_tnl_parm *p = &t->parms; +- struct net_device *tdev = NULL; + + memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr)); + memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr)); +@@ -627,25 +626,6 @@ static void vti6_link_config(struct ip6_tnl *t) + dev->flags |= IFF_POINTOPOINT; + else + dev->flags &= ~IFF_POINTOPOINT; +- +- if (p->flags & IP6_TNL_F_CAP_XMIT) { +- int strict = (ipv6_addr_type(&p->raddr) & +- (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL)); +- struct rt6_info *rt = rt6_lookup(t->net, +- &p->raddr, &p->laddr, +- p->link, strict); +- +- if (rt) +- tdev = rt->dst.dev; +- ip6_rt_put(rt); +- } +- +- if (!tdev && p->link) +- tdev = __dev_get_by_index(t->net, p->link); +- +- if (tdev) +- dev->mtu = max_t(int, tdev->mtu - dev->hard_header_len, +- IPV6_MIN_MTU); + } + + /** +-- +2.17.0 + diff --git a/queue-4.4/revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch b/queue-4.4/revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch new file mode 100644 index 00000000000..62b62d186bf --- /dev/null +++ b/queue-4.4/revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch @@ -0,0 +1,100 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 09:27:10 +0200 +Subject: Revert "mtip32xx: use runtime tag to initialize command header" + +From: Greg Kroah-Hartman + +This reverts commit 9bf9e352ed51d4cdee107675609ba12b42d00c5b which was +commit a4e84aae8139aca9fbfbced1f45c51ca81b57488 upstream. + +Ben writes: + MQ IO schedulers were introduced in 4.11, so this shouldn't be + needed in older branches. It also causes a performance + regression (fixed upstream). Please revert this for 4.4 and + 4.9. + +So let's revert it! + +Reported-by: Ben Hutchings +Cc: Ming Lei +Cc: Jens Axboe +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/block/mtip32xx/mtip32xx.c | 36 ++++++++++++------------------------ + 1 file changed, 12 insertions(+), 24 deletions(-) + +--- a/drivers/block/mtip32xx/mtip32xx.c ++++ b/drivers/block/mtip32xx/mtip32xx.c +@@ -169,25 +169,6 @@ static bool mtip_check_surprise_removal( + return false; /* device present */ + } + +-/* we have to use runtime tag to setup command header */ +-static void mtip_init_cmd_header(struct request *rq) +-{ +- struct driver_data *dd = rq->q->queuedata; +- struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); +- u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64; +- +- /* Point the command headers at the command tables. */ +- cmd->command_header = dd->port->command_list + +- (sizeof(struct mtip_cmd_hdr) * rq->tag); +- cmd->command_header_dma = dd->port->command_list_dma + +- (sizeof(struct mtip_cmd_hdr) * rq->tag); +- +- if (host_cap_64) +- cmd->command_header->ctbau = __force_bit2int cpu_to_le32((cmd->command_dma >> 16) >> 16); +- +- cmd->command_header->ctba = __force_bit2int cpu_to_le32(cmd->command_dma & 0xFFFFFFFF); +-} +- + static struct mtip_cmd *mtip_get_int_command(struct driver_data *dd) + { + struct request *rq; +@@ -199,9 +180,6 @@ static struct mtip_cmd *mtip_get_int_com + if (IS_ERR(rq)) + return NULL; + +- /* Internal cmd isn't submitted via .queue_rq */ +- mtip_init_cmd_header(rq); +- + return blk_mq_rq_to_pdu(rq); + } + +@@ -3840,8 +3818,6 @@ static int mtip_queue_rq(struct blk_mq_h + struct request *rq = bd->rq; + int ret; + +- mtip_init_cmd_header(rq); +- + if (unlikely(mtip_check_unal_depth(hctx, rq))) + return BLK_MQ_RQ_QUEUE_BUSY; + +@@ -3873,6 +3849,7 @@ static int mtip_init_cmd(void *data, str + { + struct driver_data *dd = data; + struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); ++ u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64; + + /* + * For flush requests, request_idx starts at the end of the +@@ -3889,6 +3866,17 @@ static int mtip_init_cmd(void *data, str + + memset(cmd->command, 0, CMD_DMA_ALLOC_SZ); + ++ /* Point the command headers at the command tables. */ ++ cmd->command_header = dd->port->command_list + ++ (sizeof(struct mtip_cmd_hdr) * request_idx); ++ cmd->command_header_dma = dd->port->command_list_dma + ++ (sizeof(struct mtip_cmd_hdr) * request_idx); ++ ++ if (host_cap_64) ++ cmd->command_header->ctbau = __force_bit2int cpu_to_le32((cmd->command_dma >> 16) >> 16); ++ ++ cmd->command_header->ctba = __force_bit2int cpu_to_le32(cmd->command_dma & 0xFFFFFFFF); ++ + sg_init_table(cmd->sg, MTIP_MAX_SG); + return 0; + } diff --git a/queue-4.4/revert-pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch b/queue-4.4/revert-pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch new file mode 100644 index 00000000000..3cadb4fa02f --- /dev/null +++ b/queue-4.4/revert-pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch @@ -0,0 +1,39 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Wed, 4 Apr 2018 17:24:44 +0200 +Subject: Revert "PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()" + +From: Greg Kroah-Hartman + +This reverts commit 4fbe422076d36615ec6fe8648d1aecfa460bc67d which was +commit fda78d7a0ead144f4b2cdb582dcba47911f4952c upstream. + +The dependancy tree is just too messy here, just drop it from this +kernel as it's not really needed here. + +Reported-by: Ben Hutchings +Cc: Prarit Bhargava +Cc: Bjorn Helgaas +Cc: Alex Williamson +Cc: David Arcari +Cc: Myron Stowe +Cc: Lukas Wunner +Cc: Keith Busch +Cc: Mika Westerberg +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/pci-driver.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/pci/pci-driver.c ++++ b/drivers/pci/pci-driver.c +@@ -463,6 +463,8 @@ static void pci_device_shutdown(struct d + + if (drv && drv->shutdown) + drv->shutdown(pci_dev); ++ pci_msi_shutdown(pci_dev); ++ pci_msix_shutdown(pci_dev); + + #ifdef CONFIG_KEXEC_CORE + /* diff --git a/queue-4.4/series b/queue-4.4/series index 56e00ca8fdf..1fa6c2de446 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -62,3 +62,11 @@ md-raid10-reset-the-first-at-the-end-of-loop.patch net-hns-fix-ethtool-private-flags.patch nospec-move-array_index_nospec-parameter-checking-into-separate-macro.patch nospec-kill-array_index_nospec_mask_check.patch +revert-pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch +revert-arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch +revert-arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch +revert-cpufreq-fix-governor-module-removal-race.patch +revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch +spi-davinci-fix-up-dma_mapping_error-incorrect-patch.patch +net-cavium-liquidio-fix-up-avoid-dma_unmap_single-on-uninitialized-ndata.patch +revert-ip6_vti-adjust-vti-mtu-according-to-mtu-of-lower-device.patch diff --git a/queue-4.4/spi-davinci-fix-up-dma_mapping_error-incorrect-patch.patch b/queue-4.4/spi-davinci-fix-up-dma_mapping_error-incorrect-patch.patch new file mode 100644 index 00000000000..eaf109c607a --- /dev/null +++ b/queue-4.4/spi-davinci-fix-up-dma_mapping_error-incorrect-patch.patch @@ -0,0 +1,44 @@ +From foo@baz Fri Apr 6 10:31:28 CEST 2018 +From: Greg Kroah-Hartman +Date: Fri, 6 Apr 2018 10:21:12 +0200 +Subject: spi: davinci: fix up dma_mapping_error() incorrect patch + +From: Greg Kroah-Hartman + +commit 11dd9e2c480324b46118ff708ea2ca8d7022539b, which is commit +c5a2a394835f473ae23931eda5066d3771d7b2f8 upstream had an error in it. + +Ben writes: + The '!' needs to be deleted. This appears to have been fixed upstream + by: + + commit 8aedbf580d21121d2a032e4c8ea12d8d2d85e275 + Author: Fabien Parent + Date: Thu Feb 23 19:01:56 2017 +0100 + + spi: davinci: Use SPI framework to handle DMA mapping + + which is not suitable for stable. + +So I'm just fixing this up directly. + +Reported-by: Ben Hutchings +Cc: Kevin Hilman +Cc: Mark Brown +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/spi/spi-davinci.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/spi/spi-davinci.c ++++ b/drivers/spi/spi-davinci.c +@@ -651,7 +651,7 @@ static int davinci_spi_bufs(struct spi_d + buf = t->rx_buf; + t->rx_dma = dma_map_single(&spi->dev, buf, + t->len, DMA_FROM_DEVICE); +- if (dma_mapping_error(&spi->dev, !t->rx_dma)) { ++ if (dma_mapping_error(&spi->dev, t->rx_dma)) { + ret = -EFAULT; + goto err_rx_map; + }