]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Oct 2023 05:37:35 +0000 (07:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Oct 2023 05:37:35 +0000 (07:37 +0200)
added patches:
gpio-aspeed-fix-the-gpio-number-passed-to-pinctrl_gpio_set_config.patch
gpio-pxa-disable-pinctrl-calls-for-mmp_gpio.patch
ib-mlx4-fix-the-size-of-a-buffer-in-add_port_entries.patch
rdma-cma-fix-truncation-compilation-warning-in-make_cma_ports.patch
rdma-mlx5-fix-null-string-error.patch

queue-4.19/gpio-aspeed-fix-the-gpio-number-passed-to-pinctrl_gpio_set_config.patch [new file with mode: 0644]
queue-4.19/gpio-pxa-disable-pinctrl-calls-for-mmp_gpio.patch [new file with mode: 0644]
queue-4.19/ib-mlx4-fix-the-size-of-a-buffer-in-add_port_entries.patch [new file with mode: 0644]
queue-4.19/rdma-cma-fix-truncation-compilation-warning-in-make_cma_ports.patch [new file with mode: 0644]
queue-4.19/rdma-mlx5-fix-null-string-error.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/gpio-aspeed-fix-the-gpio-number-passed-to-pinctrl_gpio_set_config.patch b/queue-4.19/gpio-aspeed-fix-the-gpio-number-passed-to-pinctrl_gpio_set_config.patch
new file mode 100644 (file)
index 0000000..b8b7864
--- /dev/null
@@ -0,0 +1,33 @@
+From f9315f17bf778cb8079a29639419fcc8a41a3c84 Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Date: Tue, 3 Oct 2023 09:39:26 +0200
+Subject: gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()
+
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+commit f9315f17bf778cb8079a29639419fcc8a41a3c84 upstream.
+
+pinctrl_gpio_set_config() expects the GPIO number from the global GPIO
+numberspace, not the controller-relative offset, which needs to be added
+to the chip base.
+
+Fixes: 5ae4cb94b313 ("gpio: aspeed: Add debounce support")
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Reviewed-by: Andy Shevchenko <andy@kernel.org>
+Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-aspeed.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-aspeed.c
++++ b/drivers/gpio/gpio-aspeed.c
+@@ -999,7 +999,7 @@ static int aspeed_gpio_set_config(struct
+       else if (param == PIN_CONFIG_BIAS_DISABLE ||
+                       param == PIN_CONFIG_BIAS_PULL_DOWN ||
+                       param == PIN_CONFIG_DRIVE_STRENGTH)
+-              return pinctrl_gpio_set_config(offset, config);
++              return pinctrl_gpio_set_config(chip->base + offset, config);
+       else if (param == PIN_CONFIG_DRIVE_OPEN_DRAIN ||
+                       param == PIN_CONFIG_DRIVE_OPEN_SOURCE)
+               /* Return -ENOTSUPP to trigger emulation, as per datasheet */
diff --git a/queue-4.19/gpio-pxa-disable-pinctrl-calls-for-mmp_gpio.patch b/queue-4.19/gpio-pxa-disable-pinctrl-calls-for-mmp_gpio.patch
new file mode 100644 (file)
index 0000000..577ff58
--- /dev/null
@@ -0,0 +1,34 @@
+From f0575116507b981e6a810e78ce3c9040395b958b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Duje=20Mihanovi=C4=87?= <duje.mihanovic@skole.hr>
+Date: Fri, 29 Sep 2023 17:41:57 +0200
+Subject: gpio: pxa: disable pinctrl calls for MMP_GPIO
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Duje Mihanović <duje.mihanovic@skole.hr>
+
+commit f0575116507b981e6a810e78ce3c9040395b958b upstream.
+
+Similarly to PXA3xx and MMP2, pinctrl-single isn't capable of setting
+pin direction on MMP either.
+
+Fixes: a770d946371e ("gpio: pxa: add pin control gpio direction and request")
+Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
+Reviewed-by: Andy Shevchenko <andy@kernel.org>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-pxa.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpio/gpio-pxa.c
++++ b/drivers/gpio/gpio-pxa.c
+@@ -246,6 +246,7 @@ static bool pxa_gpio_has_pinctrl(void)
+       switch (gpio_type) {
+       case PXA3XX_GPIO:
+       case MMP2_GPIO:
++      case MMP_GPIO:
+               return false;
+       default:
diff --git a/queue-4.19/ib-mlx4-fix-the-size-of-a-buffer-in-add_port_entries.patch b/queue-4.19/ib-mlx4-fix-the-size-of-a-buffer-in-add_port_entries.patch
new file mode 100644 (file)
index 0000000..a75fd0f
--- /dev/null
@@ -0,0 +1,51 @@
+From d7f393430a17c2bfcdf805462a5aa80be4285b27 Mon Sep 17 00:00:00 2001
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Sat, 23 Sep 2023 07:55:56 +0200
+Subject: IB/mlx4: Fix the size of a buffer in add_port_entries()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+commit d7f393430a17c2bfcdf805462a5aa80be4285b27 upstream.
+
+In order to be sure that 'buff' is never truncated, its size should be
+12, not 11.
+
+When building with W=1, this fixes the following warnings:
+
+  drivers/infiniband/hw/mlx4/sysfs.c: In function ‘add_port_entries’:
+  drivers/infiniband/hw/mlx4/sysfs.c:268:34: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
+    268 |                 sprintf(buff, "%d", i);
+        |                                  ^
+  drivers/infiniband/hw/mlx4/sysfs.c:268:17: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 11
+    268 |                 sprintf(buff, "%d", i);
+        |                 ^~~~~~~~~~~~~~~~~~~~~~
+  drivers/infiniband/hw/mlx4/sysfs.c:286:34: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
+    286 |                 sprintf(buff, "%d", i);
+        |                                  ^
+  drivers/infiniband/hw/mlx4/sysfs.c:286:17: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 11
+    286 |                 sprintf(buff, "%d", i);
+        |                 ^~~~~~~~~~~~~~~~~~~~~~
+
+Fixes: c1e7e466120b ("IB/mlx4: Add iov directory in sysfs under the ib device")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Link: https://lore.kernel.org/r/0bb1443eb47308bc9be30232cc23004c4d4cf43e.1695448530.git.christophe.jaillet@wanadoo.fr
+Signed-off-by: Leon Romanovsky <leon@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/mlx4/sysfs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/mlx4/sysfs.c
++++ b/drivers/infiniband/hw/mlx4/sysfs.c
+@@ -221,7 +221,7 @@ void del_sysfs_port_mcg_attr(struct mlx4
+ static int add_port_entries(struct mlx4_ib_dev *device, int port_num)
+ {
+       int i;
+-      char buff[11];
++      char buff[12];
+       struct mlx4_ib_iov_port *port = NULL;
+       int ret = 0 ;
+       struct ib_port_attr attr;
diff --git a/queue-4.19/rdma-cma-fix-truncation-compilation-warning-in-make_cma_ports.patch b/queue-4.19/rdma-cma-fix-truncation-compilation-warning-in-make_cma_ports.patch
new file mode 100644 (file)
index 0000000..e77d19f
--- /dev/null
@@ -0,0 +1,44 @@
+From 18126c767658ae8a831257c6cb7776c5ba5e7249 Mon Sep 17 00:00:00 2001
+From: Leon Romanovsky <leonro@nvidia.com>
+Date: Mon, 11 Sep 2023 15:18:06 +0300
+Subject: RDMA/cma: Fix truncation compilation warning in make_cma_ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Leon Romanovsky <leonro@nvidia.com>
+
+commit 18126c767658ae8a831257c6cb7776c5ba5e7249 upstream.
+
+The following compilation error is false alarm as RDMA devices don't
+have such large amount of ports to actually cause to format truncation.
+
+drivers/infiniband/core/cma_configfs.c: In function ‘make_cma_ports’:
+drivers/infiniband/core/cma_configfs.c:223:57: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
+  223 |                 snprintf(port_str, sizeof(port_str), "%u", i + 1);
+      |                                                         ^
+drivers/infiniband/core/cma_configfs.c:223:17: note: ‘snprintf’ output between 2 and 11 bytes into a destination of size 10
+  223 |                 snprintf(port_str, sizeof(port_str), "%u", i + 1);
+      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+cc1: all warnings being treated as errors
+make[5]: *** [scripts/Makefile.build:243: drivers/infiniband/core/cma_configfs.o] Error 1
+
+Fixes: 045959db65c6 ("IB/cma: Add configfs for rdma_cm")
+Link: https://lore.kernel.org/r/a7e3b347ee134167fa6a3787c56ef231a04bc8c2.1694434639.git.leonro@nvidia.com
+Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/core/cma_configfs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/core/cma_configfs.c
++++ b/drivers/infiniband/core/cma_configfs.c
+@@ -215,7 +215,7 @@ static int make_cma_ports(struct cma_dev
+       }
+       for (i = 0; i < ports_num; i++) {
+-              char port_str[10];
++              char port_str[11];
+               ports[i].port_num = i + 1;
+               snprintf(port_str, sizeof(port_str), "%u", i + 1);
diff --git a/queue-4.19/rdma-mlx5-fix-null-string-error.patch b/queue-4.19/rdma-mlx5-fix-null-string-error.patch
new file mode 100644 (file)
index 0000000..358f664
--- /dev/null
@@ -0,0 +1,31 @@
+From dab994bcc609a172bfdab15a0d4cb7e50e8b5458 Mon Sep 17 00:00:00 2001
+From: Shay Drory <shayd@nvidia.com>
+Date: Wed, 20 Sep 2023 13:01:56 +0300
+Subject: RDMA/mlx5: Fix NULL string error
+
+From: Shay Drory <shayd@nvidia.com>
+
+commit dab994bcc609a172bfdab15a0d4cb7e50e8b5458 upstream.
+
+checkpath is complaining about NULL string, change it to 'Unknown'.
+
+Fixes: 37aa5c36aa70 ("IB/mlx5: Add UARs write-combining and non-cached mapping")
+Signed-off-by: Shay Drory <shayd@nvidia.com>
+Link: https://lore.kernel.org/r/8638e5c14fadbde5fa9961874feae917073af920.1695203958.git.leonro@nvidia.com
+Signed-off-by: Leon Romanovsky <leon@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/mlx5/main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/mlx5/main.c
++++ b/drivers/infiniband/hw/mlx5/main.c
+@@ -2005,7 +2005,7 @@ static inline char *mmap_cmd2str(enum ml
+       case MLX5_IB_MMAP_DEVICE_MEM:
+               return "Device Memory";
+       default:
+-              return NULL;
++              return "Unknown";
+       }
+ }
index 620b1cb2b0d7c3c22db9f4ccaa7078caa2aa61e5..3ad46119f394624e2a10b0890b4cfd6d001b22e9 100644 (file)
@@ -88,3 +88,8 @@ tcp-fix-delayed-acks-for-mss-boundary-condition.patch
 sctp-update-transport-state-when-processing-a-dupcoo.patch
 sctp-update-hb-timer-immediately-after-users-change-.patch
 cpupower-add-makefile-dependencies-for-install-targets.patch
+ib-mlx4-fix-the-size-of-a-buffer-in-add_port_entries.patch
+gpio-aspeed-fix-the-gpio-number-passed-to-pinctrl_gpio_set_config.patch
+gpio-pxa-disable-pinctrl-calls-for-mmp_gpio.patch
+rdma-cma-fix-truncation-compilation-warning-in-make_cma_ports.patch
+rdma-mlx5-fix-null-string-error.patch