]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.14
authorSasha Levin <sashal@kernel.org>
Mon, 30 May 2022 04:25:52 +0000 (00:25 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 30 May 2022 04:25:52 +0000 (00:25 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch [new file with mode: 0644]
queue-4.14/net-af_key-check-encryption-module-availability-cons.patch [new file with mode: 0644]
queue-4.14/net-ftgmac100-disable-hardware-checksum-on-ast2600.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch b/queue-4.14/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch
new file mode 100644 (file)
index 0000000..657a3cc
--- /dev/null
@@ -0,0 +1,36 @@
+From 5c17429251b1250b6c042154ef9586b50006ff6a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 11 May 2022 06:36:59 -0700
+Subject: drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI
+ controllers
+
+From: Piyush Malgujar <pmalgujar@marvell.com>
+
+[ Upstream commit 03a35bc856ddc09f2cc1f4701adecfbf3b464cb3 ]
+
+Due to i2c->adap.dev.fwnode not being set, ACPI_COMPANION() wasn't properly
+found for TWSI controllers.
+
+Signed-off-by: Szymon Balcerak <sbalcerak@marvell.com>
+Signed-off-by: Piyush Malgujar <pmalgujar@marvell.com>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-thunderx-pcidrv.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+index df0976f4432a..4f0456fe8691 100644
+--- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c
++++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+@@ -215,6 +215,7 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev,
+       i2c->adap.bus_recovery_info = &octeon_i2c_recovery_info;
+       i2c->adap.dev.parent = dev;
+       i2c->adap.dev.of_node = pdev->dev.of_node;
++      i2c->adap.dev.fwnode = dev->fwnode;
+       snprintf(i2c->adap.name, sizeof(i2c->adap.name),
+                "Cavium ThunderX i2c adapter at %s", dev_name(dev));
+       i2c_set_adapdata(&i2c->adap, i2c);
+-- 
+2.35.1
+
diff --git a/queue-4.14/net-af_key-check-encryption-module-availability-cons.patch b/queue-4.14/net-af_key-check-encryption-module-availability-cons.patch
new file mode 100644 (file)
index 0000000..18aa873
--- /dev/null
@@ -0,0 +1,55 @@
+From 644cf6733d3085738ac27079c0252fd86a2d1894 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 18 May 2022 08:32:18 +0200
+Subject: net: af_key: check encryption module availability consistency
+
+From: Thomas Bartschies <thomas.bartschies@cvk.de>
+
+[ Upstream commit 015c44d7bff3f44d569716117becd570c179ca32 ]
+
+Since the recent introduction supporting the SM3 and SM4 hash algos for IPsec, the kernel
+produces invalid pfkey acquire messages, when these encryption modules are disabled. This
+happens because the availability of the algos wasn't checked in all necessary functions.
+This patch adds these checks.
+
+Signed-off-by: Thomas Bartschies <thomas.bartschies@cvk.de>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/key/af_key.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/net/key/af_key.c b/net/key/af_key.c
+index 3d5a46080169..990de0702b79 100644
+--- a/net/key/af_key.c
++++ b/net/key/af_key.c
+@@ -2908,7 +2908,7 @@ static int count_ah_combs(const struct xfrm_tmpl *t)
+                       break;
+               if (!aalg->pfkey_supported)
+                       continue;
+-              if (aalg_tmpl_set(t, aalg))
++              if (aalg_tmpl_set(t, aalg) && aalg->available)
+                       sz += sizeof(struct sadb_comb);
+       }
+       return sz + sizeof(struct sadb_prop);
+@@ -2926,7 +2926,7 @@ static int count_esp_combs(const struct xfrm_tmpl *t)
+               if (!ealg->pfkey_supported)
+                       continue;
+-              if (!(ealg_tmpl_set(t, ealg)))
++              if (!(ealg_tmpl_set(t, ealg) && ealg->available))
+                       continue;
+               for (k = 1; ; k++) {
+@@ -2937,7 +2937,7 @@ static int count_esp_combs(const struct xfrm_tmpl *t)
+                       if (!aalg->pfkey_supported)
+                               continue;
+-                      if (aalg_tmpl_set(t, aalg))
++                      if (aalg_tmpl_set(t, aalg) && aalg->available)
+                               sz += sizeof(struct sadb_comb);
+               }
+       }
+-- 
+2.35.1
+
diff --git a/queue-4.14/net-ftgmac100-disable-hardware-checksum-on-ast2600.patch b/queue-4.14/net-ftgmac100-disable-hardware-checksum-on-ast2600.patch
new file mode 100644 (file)
index 0000000..4192ea0
--- /dev/null
@@ -0,0 +1,92 @@
+From 5384d2266fba7752064f0b8ac17c8214fccdbc9d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 17 May 2022 18:52:17 +0930
+Subject: net: ftgmac100: Disable hardware checksum on AST2600
+
+From: Joel Stanley <joel@jms.id.au>
+
+[ Upstream commit 6fd45e79e8b93b8d22fb8fe22c32fbad7e9190bd ]
+
+The AST2600 when using the i210 NIC over NC-SI has been observed to
+produce incorrect checksum results with specific MTU values. This was
+first observed when sending data across a long distance set of networks.
+
+On a local network, the following test was performed using a 1MB file of
+random data.
+
+On the receiver run this script:
+
+ #!/bin/bash
+ while [ 1 ]; do
+        # Zero the stats
+        nstat -r  > /dev/null
+        nc -l 9899 > test-file
+        # Check for checksum errors
+        TcpInCsumErrors=$(nstat | grep TcpInCsumErrors)
+        if [ -z "$TcpInCsumErrors" ]; then
+                echo No TcpInCsumErrors
+        else
+                echo TcpInCsumErrors = $TcpInCsumErrors
+        fi
+ done
+
+On an AST2600 system:
+
+ # nc <IP of  receiver host> 9899 < test-file
+
+The test was repeated with various MTU values:
+
+ # ip link set mtu 1410 dev eth0
+
+The observed results:
+
+ 1500 - good
+ 1434 - bad
+ 1400 - good
+ 1410 - bad
+ 1420 - good
+
+The test was repeated after disabling tx checksumming:
+
+ # ethtool -K eth0 tx-checksumming off
+
+And all MTU values tested resulted in transfers without error.
+
+An issue with the driver cannot be ruled out, however there has been no
+bug discovered so far.
+
+David has done the work to take the original bug report of slow data
+transfer between long distance connections and triaged it down to this
+test case.
+
+The vendor suspects this this is a hardware issue when using NC-SI. The
+fixes line refers to the patch that introduced AST2600 support.
+
+Reported-by: David Wilder <wilder@us.ibm.com>
+Reviewed-by: Dylan Hung <dylan_hung@aspeedtech.com>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/faraday/ftgmac100.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
+index f35c5dbe54ee..a1caca6accf3 100644
+--- a/drivers/net/ethernet/faraday/ftgmac100.c
++++ b/drivers/net/ethernet/faraday/ftgmac100.c
+@@ -1845,6 +1845,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
+       /* AST2400  doesn't have working HW checksum generation */
+       if (np && (of_device_is_compatible(np, "aspeed,ast2400-mac")))
+               netdev->hw_features &= ~NETIF_F_HW_CSUM;
++
++      /* AST2600 tx checksum with NCSI is broken */
++      if (priv->use_ncsi && of_device_is_compatible(np, "aspeed,ast2600-mac"))
++              netdev->hw_features &= ~NETIF_F_HW_CSUM;
++
+       if (np && of_get_property(np, "no-hw-checksum", NULL))
+               netdev->hw_features &= ~(NETIF_F_HW_CSUM | NETIF_F_RXCSUM);
+       netdev->features |= netdev->hw_features;
+-- 
+2.35.1
+
index 9b582ddbf50ce75d59c71bc1d6cb00cf255833ce..47705761bbd0c6fcfd96ac2bcd24f639180f6a9c 100644 (file)
@@ -4,3 +4,6 @@ tcp-change-source-port-randomizarion-at-connect-time.patch
 secure_seq-use-the-64-bits-of-the-siphash-for-port-offset-calculation.patch
 acpi-sysfs-make-sparse-happy-about-address-space-in-use.patch
 acpi-sysfs-fix-bert-error-region-memory-mapping.patch
+net-af_key-check-encryption-module-availability-cons.patch
+net-ftgmac100-disable-hardware-checksum-on-ast2600.patch
+drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch