]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Jul 2024 14:05:39 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Jul 2024 14:05:39 +0000 (16:05 +0200)
added patches:
bluetooth-btusb-add-realtek-rtl8852be-support-id-0x13d3-0x3591.patch
bluetooth-btusb-add-rtl8852be-device-0489-e125-to-device-tables.patch
minmax-scsi-fix-mis-use-of-clamp-in-sr.c.patch

queue-6.10/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x13d3-0x3591.patch [new file with mode: 0644]
queue-6.10/bluetooth-btusb-add-rtl8852be-device-0489-e125-to-device-tables.patch [new file with mode: 0644]
queue-6.10/minmax-scsi-fix-mis-use-of-clamp-in-sr.c.patch [new file with mode: 0644]
queue-6.10/series

diff --git a/queue-6.10/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x13d3-0x3591.patch b/queue-6.10/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x13d3-0x3591.patch
new file mode 100644 (file)
index 0000000..321a075
--- /dev/null
@@ -0,0 +1,65 @@
+From 473a89b4ed7fd52a419340f7c540d5c8fc96fc75 Mon Sep 17 00:00:00 2001
+From: WangYuli <wangyuli@uniontech.com>
+Date: Sat, 22 Jun 2024 12:09:59 +0800
+Subject: Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591
+
+From: WangYuli <wangyuli@uniontech.com>
+
+commit 473a89b4ed7fd52a419340f7c540d5c8fc96fc75 upstream.
+
+Add the support ID(0x13d3, 0x3591) to usb_device_id table for
+Realtek RTL8852BE.
+
+The device table is as follows:
+
+T:  Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#=  5 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=13d3 ProdID=3591 Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
+Signed-off-by: WangYuli <wangyuli@uniontech.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Erpeng Xu <xuerpeng@uniontech.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/btusb.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -555,6 +555,8 @@ static const struct usb_device_id quirks
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x13d3, 0x3572), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x13d3, 0x3591), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
diff --git a/queue-6.10/bluetooth-btusb-add-rtl8852be-device-0489-e125-to-device-tables.patch b/queue-6.10/bluetooth-btusb-add-rtl8852be-device-0489-e125-to-device-tables.patch
new file mode 100644 (file)
index 0000000..a777469
--- /dev/null
@@ -0,0 +1,63 @@
+From 295ef07a9dae6182ad4b689aa8c6a7dbba21474c Mon Sep 17 00:00:00 2001
+From: Hilda Wu <hildawu@realtek.com>
+Date: Mon, 17 Jun 2024 17:05:18 +0800
+Subject: Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables
+
+From: Hilda Wu <hildawu@realtek.com>
+
+commit 295ef07a9dae6182ad4b689aa8c6a7dbba21474c upstream.
+
+Add the support ID 0489:e125 to usb_device_id table for
+Realtek RTL8852B chip.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=03 Dev#=  5 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=0489 ProdID=e125 Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Signed-off-by: Hilda Wu <hildawu@realtek.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Erpeng Xu <xuerpeng@uniontech.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/btusb.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -555,6 +555,8 @@ static const struct usb_device_id quirks
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x13d3, 0x3572), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek 8852BT/8852BE-VT Bluetooth devices */
+       { USB_DEVICE(0x0bda, 0x8520), .driver_info = BTUSB_REALTEK |
diff --git a/queue-6.10/minmax-scsi-fix-mis-use-of-clamp-in-sr.c.patch b/queue-6.10/minmax-scsi-fix-mis-use-of-clamp-in-sr.c.patch
new file mode 100644 (file)
index 0000000..be59a76
--- /dev/null
@@ -0,0 +1,48 @@
+From 9f499b8c791d2983c0a31a543c51d1b2f15e8755 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Sun, 28 Jul 2024 17:06:20 -0700
+Subject: minmax: scsi: fix mis-use of 'clamp()' in sr.c
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 9f499b8c791d2983c0a31a543c51d1b2f15e8755 upstream.
+
+While working on simplifying the minmax functions, and avoiding
+excessive macro expansion, it turns out that the sr.c use of the
+'clamp()' macro has the arguments the wrong way around.
+
+The clamp logic is
+
+       val = clamp(in, low, high);
+
+and it returns the input clamped to the low/high limits. But sr.c ddid
+
+       speed = clamp(0, speed, 0xffff / 177);
+
+which clamps the value '0' to the range '[speed, 0xffff / 177]' and ends
+up being nonsensical.
+
+Happily, I don't think anybody ever cared.
+
+Fixes: 9fad9d560af5 ("scsi: sr: Fix unintentional arithmetic wraparound")
+Cc: Justin Stitt <justinstitt@google.com>
+Cc: Kees Cook <keescook@chromium.org>
+Cc: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Wentao Guan <guanwentao@uniontech.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/sr_ioctl.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/sr_ioctl.c
++++ b/drivers/scsi/sr_ioctl.c
+@@ -431,7 +431,7 @@ int sr_select_speed(struct cdrom_device_
+       struct packet_command cgc;
+       /* avoid exceeding the max speed or overflowing integer bounds */
+-      speed = clamp(0, speed, 0xffff / 177);
++      speed = clamp(speed, 0, 0xffff / 177);
+       if (speed == 0)
+               speed = 0xffff; /* set to max */
index ddd4f2fbdb783c48103cc7f29d2f540fca3a9f3a..4d590e323c3b1ff79d6e906867d179a8e69e8fca 100644 (file)
@@ -730,3 +730,6 @@ drm-etnaviv-don-t-block-scheduler-when-gpu-is-still-active.patch
 drm-panfrost-mark-simple_ondemand-governor-as-softdep.patch
 rbd-rename-rbd_lock_state_releasing-and-releasing_wait.patch
 rbd-don-t-assume-rbd_lock_state_locked-for-exclusive-mappings.patch
+bluetooth-btusb-add-rtl8852be-device-0489-e125-to-device-tables.patch
+bluetooth-btusb-add-realtek-rtl8852be-support-id-0x13d3-0x3591.patch
+minmax-scsi-fix-mis-use-of-clamp-in-sr.c.patch