]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 11:03:57 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 11:03:57 +0000 (13:03 +0200)
added patches:
leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch
wifi-mwifiex-fix-interface-type-change.patch

queue-5.4/leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/wifi-mwifiex-fix-interface-type-change.patch [new file with mode: 0644]

diff --git a/queue-5.4/leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch b/queue-5.4/leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch
new file mode 100644 (file)
index 0000000..bb7ce7e
--- /dev/null
@@ -0,0 +1,55 @@
+From ce068e83976140badb19c7f1307926b4b562fac4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
+Date: Mon, 27 May 2024 16:27:00 +0300
+Subject: leds: ss4200: Convert PCIBIOS_* return codes to errnos
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+
+commit ce068e83976140badb19c7f1307926b4b562fac4 upstream.
+
+ich7_lpc_probe() uses pci_read_config_dword() that returns PCIBIOS_*
+codes. The error handling code assumes incorrectly it's a normal errno
+and checks for < 0. The return code is returned from the probe function
+as is but probe functions should return normal errnos.
+
+Remove < 0 from the check and convert PCIBIOS_* returns code using
+pcibios_err_to_errno() into normal errno before returning it.
+
+Fixes: a328e95b82c1 ("leds: LED driver for Intel NAS SS4200 series (v5)")
+Cc:  <stable@vger.kernel.org>
+Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Link: https://lore.kernel.org/r/20240527132700.14260-1-ilpo.jarvinen@linux.intel.com
+Signed-off-by: Lee Jones <lee@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/leds/leds-ss4200.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/leds/leds-ss4200.c
++++ b/drivers/leds/leds-ss4200.c
+@@ -356,8 +356,10 @@ static int ich7_lpc_probe(struct pci_dev
+       nas_gpio_pci_dev = dev;
+       status = pci_read_config_dword(dev, PMBASE, &g_pm_io_base);
+-      if (status)
++      if (status) {
++              status = pcibios_err_to_errno(status);
+               goto out;
++      }
+       g_pm_io_base &= 0x00000ff80;
+       status = pci_read_config_dword(dev, GPIO_CTRL, &gc);
+@@ -369,8 +371,9 @@ static int ich7_lpc_probe(struct pci_dev
+       }
+       status = pci_read_config_dword(dev, GPIO_BASE, &nas_gpio_io_base);
+-      if (0 > status) {
++      if (status) {
+               dev_info(&dev->dev, "Unable to read GPIOBASE.\n");
++              status = pcibios_err_to_errno(status);
+               goto out;
+       }
+       dev_dbg(&dev->dev, ": GPIOBASE = 0x%08x\n", nas_gpio_io_base);
index 85f283c4e50696000482400afff47e04314e0889..3ca99c7d3cdef43e6c7b52b8677c956879acbe65 100644 (file)
@@ -101,3 +101,5 @@ udf-avoid-using-corrupted-block-bitmap-buffer.patch
 m68k-amiga-turn-off-warp1260-interrupts-during-boot.patch
 ext4-check-dot-and-dotdot-of-dx_root-before-making-dir-indexed.patch
 ext4-make-sure-the-first-directory-block-is-not-a-hole.patch
+wifi-mwifiex-fix-interface-type-change.patch
+leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch
diff --git a/queue-5.4/wifi-mwifiex-fix-interface-type-change.patch b/queue-5.4/wifi-mwifiex-fix-interface-type-change.patch
new file mode 100644 (file)
index 0000000..9206d27
--- /dev/null
@@ -0,0 +1,40 @@
+From a17b9f590f6ec2b9f1b12b1db3bf1d181de6b272 Mon Sep 17 00:00:00 2001
+From: Rafael Beims <rafael.beims@toradex.com>
+Date: Fri, 10 May 2024 13:04:58 +0200
+Subject: wifi: mwifiex: Fix interface type change
+
+From: Rafael Beims <rafael.beims@toradex.com>
+
+commit a17b9f590f6ec2b9f1b12b1db3bf1d181de6b272 upstream.
+
+When changing the interface type we also need to update the bss_num, the
+driver private data is searched based on a unique (bss_type, bss_num)
+tuple, therefore every time bss_type changes, bss_num must also change.
+
+This fixes for example an issue in which, after the mode changed, a
+wireless scan on the changed interface would not finish, leading to
+repeated -EBUSY messages to userspace when other scan requests were
+sent.
+
+Fixes: c606008b7062 ("mwifiex: Properly initialize private structure on interface type changes")
+Cc: stable@vger.kernel.org
+Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
+Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://msgid.link/20240510110458.15475-1-francesco@dolcini.it
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/marvell/mwifiex/cfg80211.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -934,6 +934,8 @@ mwifiex_init_new_priv_params(struct mwif
+               return -EOPNOTSUPP;
+       }
++      priv->bss_num = mwifiex_get_unused_bss_num(adapter, priv->bss_type);
++
+       spin_lock_irqsave(&adapter->main_proc_lock, flags);
+       adapter->main_locked = false;
+       spin_unlock_irqrestore(&adapter->main_proc_lock, flags);