From: Greg Kroah-Hartman Date: Tue, 30 Jul 2024 14:05:39 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.1.103~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46afae8afcd84d2af838144f143891f0fb2cb211;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches 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 --- 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 index 00000000000..321a0751e66 --- /dev/null +++ b/queue-6.10/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x13d3-0x3591.patch @@ -0,0 +1,65 @@ +From 473a89b4ed7fd52a419340f7c540d5c8fc96fc75 Mon Sep 17 00:00:00 2001 +From: WangYuli +Date: Sat, 22 Jun 2024 12:09:59 +0800 +Subject: Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591 + +From: WangYuli + +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 +Signed-off-by: WangYuli +Signed-off-by: Luiz Augusto von Dentz +Signed-off-by: Erpeng Xu +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..a7774695480 --- /dev/null +++ b/queue-6.10/bluetooth-btusb-add-rtl8852be-device-0489-e125-to-device-tables.patch @@ -0,0 +1,63 @@ +From 295ef07a9dae6182ad4b689aa8c6a7dbba21474c Mon Sep 17 00:00:00 2001 +From: Hilda Wu +Date: Mon, 17 Jun 2024 17:05:18 +0800 +Subject: Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables + +From: Hilda Wu + +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 +Signed-off-by: Luiz Augusto von Dentz +Signed-off-by: Erpeng Xu +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..be59a768cdd --- /dev/null +++ b/queue-6.10/minmax-scsi-fix-mis-use-of-clamp-in-sr.c.patch @@ -0,0 +1,48 @@ +From 9f499b8c791d2983c0a31a543c51d1b2f15e8755 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 28 Jul 2024 17:06:20 -0700 +Subject: minmax: scsi: fix mis-use of 'clamp()' in sr.c + +From: Linus Torvalds + +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 +Cc: Kees Cook +Cc: Martin K. Petersen +Signed-off-by: Linus Torvalds +Cc: Wentao Guan +Signed-off-by: Greg Kroah-Hartman +--- + 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 */ diff --git a/queue-6.10/series b/queue-6.10/series index ddd4f2fbdb7..4d590e323c3 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -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