]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Aug 2022 13:57:10 +0000 (15:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Aug 2022 13:57:10 +0000 (15:57 +0200)
added patches:
bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04c5-0x1675.patch
bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04ca-0x4007.patch
bluetooth-btusb-add-realtek-rtl8852c-support-id-0x0cb8-0xc558.patch
bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3586.patch
bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3587.patch
bluetooth-btusb-add-support-of-imc-networks-pid-0x3568.patch
bluetooth-hci_bcm-add-bcm4349b1-variant.patch
bluetooth-hci_bcm-add-dt-compatible-for-cyw55572.patch
bluetooth-hci_qca-return-wakeup-for-qca_wakeup.patch
btrfs-zoned-drop-optimization-of-zone-finish.patch
btrfs-zoned-fix-critical-section-of-relocation-inode-writeback.patch
btrfs-zoned-prevent-allocation-from-previous-data-relocation-bg.patch
dt-bindings-bluetooth-broadcom-add-bcm4349b1-dt-binding.patch
macintosh-adb-fix-oob-read-in-do_adb_query-function.patch

15 files changed:
queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04c5-0x1675.patch [new file with mode: 0644]
queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04ca-0x4007.patch [new file with mode: 0644]
queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x0cb8-0xc558.patch [new file with mode: 0644]
queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3586.patch [new file with mode: 0644]
queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3587.patch [new file with mode: 0644]
queue-5.18/bluetooth-btusb-add-support-of-imc-networks-pid-0x3568.patch [new file with mode: 0644]
queue-5.18/bluetooth-hci_bcm-add-bcm4349b1-variant.patch [new file with mode: 0644]
queue-5.18/bluetooth-hci_bcm-add-dt-compatible-for-cyw55572.patch [new file with mode: 0644]
queue-5.18/bluetooth-hci_qca-return-wakeup-for-qca_wakeup.patch [new file with mode: 0644]
queue-5.18/btrfs-zoned-drop-optimization-of-zone-finish.patch [new file with mode: 0644]
queue-5.18/btrfs-zoned-fix-critical-section-of-relocation-inode-writeback.patch [new file with mode: 0644]
queue-5.18/btrfs-zoned-prevent-allocation-from-previous-data-relocation-bg.patch [new file with mode: 0644]
queue-5.18/dt-bindings-bluetooth-broadcom-add-bcm4349b1-dt-binding.patch [new file with mode: 0644]
queue-5.18/macintosh-adb-fix-oob-read-in-do_adb_query-function.patch [new file with mode: 0644]
queue-5.18/series

diff --git a/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04c5-0x1675.patch b/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04c5-0x1675.patch
new file mode 100644 (file)
index 0000000..046486c
--- /dev/null
@@ -0,0 +1,62 @@
+From 893fa8bc9952a36fb682ee12f0a994b5817a36d2 Mon Sep 17 00:00:00 2001
+From: Hilda Wu <hildawu@realtek.com>
+Date: Thu, 14 Jul 2022 19:25:20 +0800
+Subject: Bluetooth: btusb: Add Realtek RTL8852C support ID 0x04C5:0x1675
+
+From: Hilda Wu <hildawu@realtek.com>
+
+commit 893fa8bc9952a36fb682ee12f0a994b5817a36d2 upstream.
+
+Add the support ID(0x04c5, 0x1675) to usb_device_id table for
+Realtek RTL8852C.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=04c5 ProdID=1675 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: 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
+@@ -425,6 +425,8 @@ static const struct usb_device_id blackl
+       /* Realtek 8852CE Bluetooth devices */
+       { USB_DEVICE(0x04ca, 0x4007), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x04c5, 0x1675), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
diff --git a/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04ca-0x4007.patch b/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04ca-0x4007.patch
new file mode 100644 (file)
index 0000000..8d053ac
--- /dev/null
@@ -0,0 +1,64 @@
+From c379c96cc221767af9688a5d4758a78eea30883a Mon Sep 17 00:00:00 2001
+From: Hilda Wu <hildawu@realtek.com>
+Date: Thu, 14 Jul 2022 19:25:19 +0800
+Subject: Bluetooth: btusb: Add Realtek RTL8852C support ID 0x04CA:0x4007
+
+From: Hilda Wu <hildawu@realtek.com>
+
+commit c379c96cc221767af9688a5d4758a78eea30883a upstream.
+
+Add the support ID(0x04CA, 0x4007) to usb_device_id table for
+Realtek RTL8852C.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=04ca ProdID=4007 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/btusb.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -422,6 +422,10 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x04ca, 0x4006), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      /* Realtek 8852CE Bluetooth devices */
++      { USB_DEVICE(0x04ca, 0x4007), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
++
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
+         .driver_info = BTUSB_REALTEK },
diff --git a/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x0cb8-0xc558.patch b/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x0cb8-0xc558.patch
new file mode 100644 (file)
index 0000000..bb3b9b7
--- /dev/null
@@ -0,0 +1,62 @@
+From 5b75ee37ebb73f58468d4cca172434324af203f1 Mon Sep 17 00:00:00 2001
+From: Hilda Wu <hildawu@realtek.com>
+Date: Thu, 14 Jul 2022 19:25:21 +0800
+Subject: Bluetooth: btusb: Add Realtek RTL8852C support ID 0x0CB8:0xC558
+
+From: Hilda Wu <hildawu@realtek.com>
+
+commit 5b75ee37ebb73f58468d4cca172434324af203f1 upstream.
+
+Add the support ID(0x0CB8, 0xC558) to usb_device_id table for
+Realtek RTL8852C.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=0cb8 ProdID=c558 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: 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
+@@ -427,6 +427,8 @@ static const struct usb_device_id blackl
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x04c5, 0x1675), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x0cb8, 0xc558), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
diff --git a/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3586.patch b/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3586.patch
new file mode 100644 (file)
index 0000000..aa46c66
--- /dev/null
@@ -0,0 +1,62 @@
+From 6ad353dfc8ee3230a5e123c21da50f1b64cc4b39 Mon Sep 17 00:00:00 2001
+From: Hilda Wu <hildawu@realtek.com>
+Date: Thu, 14 Jul 2022 19:25:23 +0800
+Subject: Bluetooth: btusb: Add Realtek RTL8852C support ID 0x13D3:0x3586
+
+From: Hilda Wu <hildawu@realtek.com>
+
+commit 6ad353dfc8ee3230a5e123c21da50f1b64cc4b39 upstream.
+
+Add the support ID(0x13D3, 0x3586) to usb_device_id table for
+Realtek RTL8852C.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=13d3 ProdID=3586 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: 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
+@@ -431,6 +431,8 @@ static const struct usb_device_id blackl
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x13d3, 0x3587), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x13d3, 0x3586), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
diff --git a/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3587.patch b/queue-5.18/bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3587.patch
new file mode 100644 (file)
index 0000000..dcc396a
--- /dev/null
@@ -0,0 +1,62 @@
+From 8f0054dd29373cd877db87751c143610561d549d Mon Sep 17 00:00:00 2001
+From: Hilda Wu <hildawu@realtek.com>
+Date: Thu, 14 Jul 2022 19:25:22 +0800
+Subject: Bluetooth: btusb: Add Realtek RTL8852C support ID 0x13D3:0x3587
+
+From: Hilda Wu <hildawu@realtek.com>
+
+commit 8f0054dd29373cd877db87751c143610561d549d upstream.
+
+Add the support ID(0x13D3, 0x3587) to usb_device_id table for
+Realtek RTL8852C.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=13d3 ProdID=3587 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: 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
+@@ -429,6 +429,8 @@ static const struct usb_device_id blackl
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x0cb8, 0xc558), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x13d3, 0x3587), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
diff --git a/queue-5.18/bluetooth-btusb-add-support-of-imc-networks-pid-0x3568.patch b/queue-5.18/bluetooth-btusb-add-support-of-imc-networks-pid-0x3568.patch
new file mode 100644 (file)
index 0000000..d666cc6
--- /dev/null
@@ -0,0 +1,48 @@
+From c69ecb0ea4c96b8b191cbaa0b420222a37867655 Mon Sep 17 00:00:00 2001
+From: Aaron Ma <aaron.ma@canonical.com>
+Date: Thu, 2 Jun 2022 17:28:22 +0800
+Subject: Bluetooth: btusb: Add support of IMC Networks PID 0x3568
+
+From: Aaron Ma <aaron.ma@canonical.com>
+
+commit c69ecb0ea4c96b8b191cbaa0b420222a37867655 upstream.
+
+It is 13d3:3568 for MediaTek MT7922 USB Bluetooth chip.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
+D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=13d3 ProdID=3568 Rev=01.00
+S:  Manufacturer=MediaTek Inc.
+S:  Product=Wireless_Device
+S:  SerialNumber=...
+C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
+I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
+E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 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#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
+E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
+
+Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/btusb.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -469,6 +469,9 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x0489, 0xe0d9), .driver_info = BTUSB_MEDIATEK |
+                                                    BTUSB_WIDEBAND_SPEECH |
+                                                    BTUSB_VALID_LE_STATES },
++      { USB_DEVICE(0x13d3, 0x3568), .driver_info = BTUSB_MEDIATEK |
++                                                   BTUSB_WIDEBAND_SPEECH |
++                                                   BTUSB_VALID_LE_STATES },
+       /* Additional Realtek 8723AE Bluetooth devices */
+       { USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
diff --git a/queue-5.18/bluetooth-hci_bcm-add-bcm4349b1-variant.patch b/queue-5.18/bluetooth-hci_bcm-add-bcm4349b1-variant.patch
new file mode 100644 (file)
index 0000000..90e7a93
--- /dev/null
@@ -0,0 +1,47 @@
+From 4f17c2b6694d0c4098f33b07ee3a696976940aa5 Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Tue, 24 May 2022 07:56:41 +0200
+Subject: Bluetooth: hci_bcm: Add BCM4349B1 variant
+
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+
+commit 4f17c2b6694d0c4098f33b07ee3a696976940aa5 upstream.
+
+The BCM4349B1, aka CYW/BCM89359, is a WiFi+BT chip and its Bluetooth
+portion can be controlled over serial.
+
+Two subversions are added for the chip, because ROM firmware reports
+002.002.013 (at least for the chips I have here), while depending on
+patchram firmware revision, either 002.002.013 or 002.002.014 is
+reported.
+
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/btbcm.c   |    2 ++
+ drivers/bluetooth/hci_bcm.c |    1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/btbcm.c
++++ b/drivers/bluetooth/btbcm.c
+@@ -453,6 +453,8 @@ static const struct bcm_subver_table bcm
+       { 0x6606, "BCM4345C5"   },      /* 003.006.006 */
+       { 0x230f, "BCM4356A2"   },      /* 001.003.015 */
+       { 0x220e, "BCM20702A1"  },      /* 001.002.014 */
++      { 0x420d, "BCM4349B1"   },      /* 002.002.013 */
++      { 0x420e, "BCM4349B1"   },      /* 002.002.014 */
+       { 0x4217, "BCM4329B1"   },      /* 002.002.023 */
+       { 0x6106, "BCM4359C0"   },      /* 003.001.006 */
+       { 0x4106, "BCM4335A0"   },      /* 002.001.006 */
+--- a/drivers/bluetooth/hci_bcm.c
++++ b/drivers/bluetooth/hci_bcm.c
+@@ -1544,6 +1544,7 @@ static const struct of_device_id bcm_blu
+       { .compatible = "brcm,bcm43430a0-bt" },
+       { .compatible = "brcm,bcm43430a1-bt" },
+       { .compatible = "brcm,bcm43438-bt", .data = &bcm43438_device_data },
++      { .compatible = "brcm,bcm4349-bt", .data = &bcm43438_device_data },
+       { .compatible = "brcm,bcm43540-bt", .data = &bcm4354_device_data },
+       { .compatible = "brcm,bcm4335a0" },
+       { },
diff --git a/queue-5.18/bluetooth-hci_bcm-add-dt-compatible-for-cyw55572.patch b/queue-5.18/bluetooth-hci_bcm-add-dt-compatible-for-cyw55572.patch
new file mode 100644 (file)
index 0000000..4ae8117
--- /dev/null
@@ -0,0 +1,29 @@
+From f8cad62002a7699fd05a23b558b980b5a77defe0 Mon Sep 17 00:00:00 2001
+From: Hakan Jansson <hakan.jansson@infineon.com>
+Date: Thu, 30 Jun 2022 14:45:22 +0200
+Subject: Bluetooth: hci_bcm: Add DT compatible for CYW55572
+
+From: Hakan Jansson <hakan.jansson@infineon.com>
+
+commit f8cad62002a7699fd05a23b558b980b5a77defe0 upstream.
+
+CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon.
+
+Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/hci_bcm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/bluetooth/hci_bcm.c
++++ b/drivers/bluetooth/hci_bcm.c
+@@ -1547,6 +1547,7 @@ static const struct of_device_id bcm_blu
+       { .compatible = "brcm,bcm4349-bt", .data = &bcm43438_device_data },
+       { .compatible = "brcm,bcm43540-bt", .data = &bcm4354_device_data },
+       { .compatible = "brcm,bcm4335a0" },
++      { .compatible = "infineon,cyw55572-bt" },
+       { },
+ };
+ MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);
diff --git a/queue-5.18/bluetooth-hci_qca-return-wakeup-for-qca_wakeup.patch b/queue-5.18/bluetooth-hci_qca-return-wakeup-for-qca_wakeup.patch
new file mode 100644 (file)
index 0000000..8cb50ac
--- /dev/null
@@ -0,0 +1,36 @@
+From bde63e9effd3a6ba384707c62abe46c32d22f665 Mon Sep 17 00:00:00 2001
+From: Sai Teja Aluvala <quic_saluvala@quicinc.com>
+Date: Fri, 27 May 2022 15:45:43 +0530
+Subject: Bluetooth: hci_qca: Return wakeup for qca_wakeup
+
+From: Sai Teja Aluvala <quic_saluvala@quicinc.com>
+
+commit bde63e9effd3a6ba384707c62abe46c32d22f665 upstream.
+
+This fixes the return value of qca_wakeup(), since
+.wakeup work inversely with original .prevent_wake.
+
+Fixes: 4539ca67fe8ed (Bluetooth: Rename driver .prevent_wake to .wakeup)
+Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/hci_qca.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
+index eab34e24d944..8df11016fd51 100644
+--- a/drivers/bluetooth/hci_qca.c
++++ b/drivers/bluetooth/hci_qca.c
+@@ -1588,7 +1588,7 @@ static bool qca_wakeup(struct hci_dev *hdev)
+       wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent);
+       bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup);
+-      return !wakeup;
++      return wakeup;
+ }
+ static int qca_regulator_init(struct hci_uart *hu)
+-- 
+2.37.1
+
diff --git a/queue-5.18/btrfs-zoned-drop-optimization-of-zone-finish.patch b/queue-5.18/btrfs-zoned-drop-optimization-of-zone-finish.patch
new file mode 100644 (file)
index 0000000..8df640b
--- /dev/null
@@ -0,0 +1,80 @@
+From b3a3b0255797e1d395253366ba24a4cc6c8bdf9c Mon Sep 17 00:00:00 2001
+From: Naohiro Aota <naohiro.aota@wdc.com>
+Date: Wed, 29 Jun 2022 11:00:38 +0900
+Subject: btrfs: zoned: drop optimization of zone finish
+
+From: Naohiro Aota <naohiro.aota@wdc.com>
+
+commit b3a3b0255797e1d395253366ba24a4cc6c8bdf9c upstream.
+
+We have an optimization in do_zone_finish() to send REQ_OP_ZONE_FINISH only
+when necessary, i.e. we don't send REQ_OP_ZONE_FINISH when we assume we
+wrote fully into the zone.
+
+The assumption is determined by "alloc_offset == capacity". This condition
+won't work if the last ordered extent is canceled due to some errors. In
+that case, we consider the zone is deactivated without sending the finish
+command while it's still active.
+
+This inconstancy results in activating another block group while we cannot
+really activate the underlying zone, which causes the active zone exceeds
+errors like below.
+
+    BTRFS error (device nvme3n2): allocation failed flags 1, wanted 520192 tree-log 0, relocation: 0
+    nvme3n2: I/O Cmd(0x7d) @ LBA 160432128, 127 blocks, I/O Error (sct 0x1 / sc 0xbd) MORE DNR
+    active zones exceeded error, dev nvme3n2, sector 0 op 0xd:(ZONE_APPEND) flags 0x4800 phys_seg 1 prio class 0
+    nvme3n2: I/O Cmd(0x7d) @ LBA 160432128, 127 blocks, I/O Error (sct 0x1 / sc 0xbd) MORE DNR
+    active zones exceeded error, dev nvme3n2, sector 0 op 0xd:(ZONE_APPEND) flags 0x4800 phys_seg 1 prio class 0
+
+Fix the issue by removing the optimization for now.
+
+Fixes: 8376d9e1ed8f ("btrfs: zoned: finish superblock zone once no space left for new SB")
+Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
+Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/zoned.c |   23 ++++++++++++++++++-----
+ 1 file changed, 18 insertions(+), 5 deletions(-)
+
+--- a/fs/btrfs/zoned.c
++++ b/fs/btrfs/zoned.c
+@@ -2005,6 +2005,7 @@ void btrfs_zone_finish_endio(struct btrf
+       struct btrfs_device *device;
+       u64 min_alloc_bytes;
+       u64 physical;
++      int i;
+       if (!btrfs_is_zoned(fs_info))
+               return;
+@@ -2039,13 +2040,25 @@ void btrfs_zone_finish_endio(struct btrf
+       spin_unlock(&block_group->lock);
+       map = block_group->physical_map;
+-      device = map->stripes[0].dev;
+-      physical = map->stripes[0].physical;
++      for (i = 0; i < map->num_stripes; i++) {
++              int ret;
+-      if (!device->zone_info->max_active_zones)
+-              goto out;
++              device = map->stripes[i].dev;
++              physical = map->stripes[i].physical;
++
++              if (device->zone_info->max_active_zones == 0)
++                      continue;
++
++              ret = blkdev_zone_mgmt(device->bdev, REQ_OP_ZONE_FINISH,
++                                     physical >> SECTOR_SHIFT,
++                                     device->zone_info->zone_size >> SECTOR_SHIFT,
++                                     GFP_NOFS);
+-      btrfs_dev_clear_active_zone(device, physical);
++              if (ret)
++                      return;
++
++              btrfs_dev_clear_active_zone(device, physical);
++      }
+       spin_lock(&fs_info->zone_active_bgs_lock);
+       ASSERT(!list_empty(&block_group->active_bg_list));
diff --git a/queue-5.18/btrfs-zoned-fix-critical-section-of-relocation-inode-writeback.patch b/queue-5.18/btrfs-zoned-fix-critical-section-of-relocation-inode-writeback.patch
new file mode 100644 (file)
index 0000000..d815bbc
--- /dev/null
@@ -0,0 +1,46 @@
+From 19ab78ca86981e0e1e73036fb73a508731a7c078 Mon Sep 17 00:00:00 2001
+From: Naohiro Aota <naohiro.aota@wdc.com>
+Date: Tue, 7 Jun 2022 16:08:30 +0900
+Subject: btrfs: zoned: fix critical section of relocation inode writeback
+
+From: Naohiro Aota <naohiro.aota@wdc.com>
+
+commit 19ab78ca86981e0e1e73036fb73a508731a7c078 upstream.
+
+We use btrfs_zoned_data_reloc_{lock,unlock} to allow only one process to
+write out to the relocation inode. That critical section must include all
+the IO submission for the inode. However, flush_write_bio() in
+extent_writepages() is out of the critical section, causing an IO
+submission outside of the lock. This leads to an out of the order IO
+submission and fail the relocation process.
+
+Fix it by extending the critical section.
+
+Fixes: 35156d852762 ("btrfs: zoned: only allow one process to add pages to a relocation inode")
+CC: stable@vger.kernel.org # 5.16+
+Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
+Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/extent_io.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/btrfs/extent_io.c
++++ b/fs/btrfs/extent_io.c
+@@ -5214,13 +5214,14 @@ int extent_writepages(struct address_spa
+        */
+       btrfs_zoned_data_reloc_lock(BTRFS_I(inode));
+       ret = extent_write_cache_pages(mapping, wbc, &epd);
+-      btrfs_zoned_data_reloc_unlock(BTRFS_I(inode));
+       ASSERT(ret <= 0);
+       if (ret < 0) {
++              btrfs_zoned_data_reloc_unlock(BTRFS_I(inode));
+               end_write_bio(&epd, ret);
+               return ret;
+       }
+       ret = flush_write_bio(&epd);
++      btrfs_zoned_data_reloc_unlock(BTRFS_I(inode));
+       return ret;
+ }
diff --git a/queue-5.18/btrfs-zoned-prevent-allocation-from-previous-data-relocation-bg.patch b/queue-5.18/btrfs-zoned-prevent-allocation-from-previous-data-relocation-bg.patch
new file mode 100644 (file)
index 0000000..b5d0bf5
--- /dev/null
@@ -0,0 +1,187 @@
+From 343d8a30851c48a4ef0f5ef61d5e9fbd847a6883 Mon Sep 17 00:00:00 2001
+From: Naohiro Aota <naohiro.aota@wdc.com>
+Date: Tue, 7 Jun 2022 16:08:29 +0900
+Subject: btrfs: zoned: prevent allocation from previous data relocation BG
+
+From: Naohiro Aota <naohiro.aota@wdc.com>
+
+commit 343d8a30851c48a4ef0f5ef61d5e9fbd847a6883 upstream.
+
+After commit 5f0addf7b890 ("btrfs: zoned: use dedicated lock for data
+relocation"), we observe IO errors on e.g, btrfs/232 like below.
+
+  [09.0][T4038707] WARNING: CPU: 3 PID: 4038707 at fs/btrfs/extent-tree.c:2381 btrfs_cross_ref_exist+0xfc/0x120 [btrfs]
+  <snip>
+  [09.9][T4038707] Call Trace:
+  [09.5][T4038707]  <TASK>
+  [09.3][T4038707]  run_delalloc_nocow+0x7f1/0x11a0 [btrfs]
+  [09.6][T4038707]  ? test_range_bit+0x174/0x320 [btrfs]
+  [09.2][T4038707]  ? fallback_to_cow+0x980/0x980 [btrfs]
+  [09.3][T4038707]  ? find_lock_delalloc_range+0x33e/0x3e0 [btrfs]
+  [09.5][T4038707]  btrfs_run_delalloc_range+0x445/0x1320 [btrfs]
+  [09.2][T4038707]  ? test_range_bit+0x320/0x320 [btrfs]
+  [09.4][T4038707]  ? lock_downgrade+0x6a0/0x6a0
+  [09.2][T4038707]  ? orc_find.part.0+0x1ed/0x300
+  [09.5][T4038707]  ? __module_address.part.0+0x25/0x300
+  [09.0][T4038707]  writepage_delalloc+0x159/0x310 [btrfs]
+  <snip>
+  [09.4][    C3] sd 10:0:1:0: [sde] tag#2620 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
+  [09.5][    C3] sd 10:0:1:0: [sde] tag#2620 Sense Key : Illegal Request [current]
+  [09.9][    C3] sd 10:0:1:0: [sde] tag#2620 Add. Sense: Unaligned write command
+  [09.5][    C3] sd 10:0:1:0: [sde] tag#2620 CDB: Write(16) 8a 00 00 00 00 00 02 f3 63 87 00 00 00 2c 00 00
+  [09.4][    C3] critical target error, dev sde, sector 396041272 op 0x1:(WRITE) flags 0x800 phys_seg 3 prio class 0
+  [09.9][    C3] BTRFS error (device dm-1): bdev /dev/mapper/dml_102_2 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0
+
+The IO errors occur when we allocate a regular extent in previous data
+relocation block group.
+
+On zoned btrfs, we use a dedicated block group to relocate a data
+extent. Thus, we allocate relocating data extents (pre-alloc) only from
+the dedicated block group and vice versa. Once the free space in the
+dedicated block group gets tight, a relocating extent may not fit into
+the block group. In that case, we need to switch the dedicated block
+group to the next one. Then, the previous one is now freed up for
+allocating a regular extent. The BG is already not enough to allocate
+the relocating extent, but there is still room to allocate a smaller
+extent. Now the problem happens. By allocating a regular extent while
+nocow IOs for the relocation is still on-going, we will issue WRITE IOs
+(for relocation) and ZONE APPEND IOs (for the regular writes) at the
+same time. That mixed IOs confuses the write pointer and arises the
+unaligned write errors.
+
+This commit introduces a new bit 'zoned_data_reloc_ongoing' to the
+btrfs_block_group. We set this bit before releasing the dedicated block
+group, and no extent are allocated from a block group having this bit
+set. This bit is similar to setting block_group->ro, but is different from
+it by allowing nocow writes to start.
+
+Once all the nocow IO for relocation is done (hooked from
+btrfs_finish_ordered_io), we reset the bit to release the block group for
+further allocation.
+
+Fixes: c2707a255623 ("btrfs: zoned: add a dedicated data relocation block group")
+CC: stable@vger.kernel.org # 5.16+
+Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
+Reviewed-by: David Sterba <dsterba@suse.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/block-group.h |    1 +
+ fs/btrfs/extent-tree.c |   20 ++++++++++++++++++--
+ fs/btrfs/inode.c       |    2 ++
+ fs/btrfs/zoned.c       |   27 +++++++++++++++++++++++++++
+ fs/btrfs/zoned.h       |    5 +++++
+ 5 files changed, 53 insertions(+), 2 deletions(-)
+
+--- a/fs/btrfs/block-group.h
++++ b/fs/btrfs/block-group.h
+@@ -104,6 +104,7 @@ struct btrfs_block_group {
+       unsigned int relocating_repair:1;
+       unsigned int chunk_item_inserted:1;
+       unsigned int zone_is_active:1;
++      unsigned int zoned_data_reloc_ongoing:1;
+       int disk_cache_state;
+--- a/fs/btrfs/extent-tree.c
++++ b/fs/btrfs/extent-tree.c
+@@ -3836,7 +3836,7 @@ static int do_allocation_zoned(struct bt
+              block_group->start == fs_info->data_reloc_bg ||
+              fs_info->data_reloc_bg == 0);
+-      if (block_group->ro) {
++      if (block_group->ro || block_group->zoned_data_reloc_ongoing) {
+               ret = 1;
+               goto out;
+       }
+@@ -3898,8 +3898,24 @@ static int do_allocation_zoned(struct bt
+ out:
+       if (ret && ffe_ctl->for_treelog)
+               fs_info->treelog_bg = 0;
+-      if (ret && ffe_ctl->for_data_reloc)
++      if (ret && ffe_ctl->for_data_reloc &&
++          fs_info->data_reloc_bg == block_group->start) {
++              /*
++               * Do not allow further allocations from this block group.
++               * Compared to increasing the ->ro, setting the
++               * ->zoned_data_reloc_ongoing flag still allows nocow
++               *  writers to come in. See btrfs_inc_nocow_writers().
++               *
++               * We need to disable an allocation to avoid an allocation of
++               * regular (non-relocation data) extent. With mix of relocation
++               * extents and regular extents, we can dispatch WRITE commands
++               * (for relocation extents) and ZONE APPEND commands (for
++               * regular extents) at the same time to the same zone, which
++               * easily break the write pointer.
++               */
++              block_group->zoned_data_reloc_ongoing = 1;
+               fs_info->data_reloc_bg = 0;
++      }
+       spin_unlock(&fs_info->relocation_bg_lock);
+       spin_unlock(&fs_info->treelog_bg_lock);
+       spin_unlock(&block_group->lock);
+--- a/fs/btrfs/inode.c
++++ b/fs/btrfs/inode.c
+@@ -3102,6 +3102,8 @@ static int btrfs_finish_ordered_io(struc
+                                               ordered_extent->file_offset,
+                                               ordered_extent->file_offset +
+                                               logical_len);
++              btrfs_zoned_release_data_reloc_bg(fs_info, ordered_extent->disk_bytenr,
++                                                ordered_extent->disk_num_bytes);
+       } else {
+               BUG_ON(root == fs_info->tree_root);
+               ret = insert_ordered_extent_file_extent(trans, ordered_extent);
+--- a/fs/btrfs/zoned.c
++++ b/fs/btrfs/zoned.c
+@@ -2116,3 +2116,30 @@ void btrfs_free_zone_cache(struct btrfs_
+       }
+       mutex_unlock(&fs_devices->device_list_mutex);
+ }
++
++void btrfs_zoned_release_data_reloc_bg(struct btrfs_fs_info *fs_info, u64 logical,
++                                     u64 length)
++{
++      struct btrfs_block_group *block_group;
++
++      if (!btrfs_is_zoned(fs_info))
++              return;
++
++      block_group = btrfs_lookup_block_group(fs_info, logical);
++      /* It should be called on a previous data relocation block group. */
++      ASSERT(block_group && (block_group->flags & BTRFS_BLOCK_GROUP_DATA));
++
++      spin_lock(&block_group->lock);
++      if (!block_group->zoned_data_reloc_ongoing)
++              goto out;
++
++      /* All relocation extents are written. */
++      if (block_group->start + block_group->alloc_offset == logical + length) {
++              /* Now, release this block group for further allocations. */
++              block_group->zoned_data_reloc_ongoing = 0;
++      }
++
++out:
++      spin_unlock(&block_group->lock);
++      btrfs_put_block_group(block_group);
++}
+--- a/fs/btrfs/zoned.h
++++ b/fs/btrfs/zoned.h
+@@ -80,6 +80,8 @@ void btrfs_schedule_zone_finish_bg(struc
+                                  struct extent_buffer *eb);
+ void btrfs_clear_data_reloc_bg(struct btrfs_block_group *bg);
+ void btrfs_free_zone_cache(struct btrfs_fs_info *fs_info);
++void btrfs_zoned_release_data_reloc_bg(struct btrfs_fs_info *fs_info, u64 logical,
++                                     u64 length);
+ #else /* CONFIG_BLK_DEV_ZONED */
+ static inline int btrfs_get_dev_zone(struct btrfs_device *device, u64 pos,
+                                    struct blk_zone *zone)
+@@ -241,6 +243,9 @@ static inline void btrfs_schedule_zone_f
+ static inline void btrfs_clear_data_reloc_bg(struct btrfs_block_group *bg) { }
+ static inline void btrfs_free_zone_cache(struct btrfs_fs_info *fs_info) { }
++
++static inline void btrfs_zoned_release_data_reloc_bg(struct btrfs_fs_info *fs_info,
++                                                   u64 logical, u64 length) { }
+ #endif
+ static inline bool btrfs_dev_is_sequential(struct btrfs_device *device, u64 pos)
diff --git a/queue-5.18/dt-bindings-bluetooth-broadcom-add-bcm4349b1-dt-binding.patch b/queue-5.18/dt-bindings-bluetooth-broadcom-add-bcm4349b1-dt-binding.patch
new file mode 100644 (file)
index 0000000..be60227
--- /dev/null
@@ -0,0 +1,32 @@
+From 88b65887aa1b76cd8649a97824fb9904c1d79254 Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Tue, 24 May 2022 07:56:40 +0200
+Subject: dt-bindings: bluetooth: broadcom: Add BCM4349B1 DT binding
+
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+
+commit 88b65887aa1b76cd8649a97824fb9904c1d79254 upstream.
+
+The BCM4349B1, aka CYW/BCM89359, is a WiFi+BT chip and its Bluetooth
+portion can be controlled over serial.
+Extend the binding with its DT compatible.
+
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
++++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
+@@ -23,6 +23,7 @@ properties:
+       - brcm,bcm4345c5
+       - brcm,bcm43540-bt
+       - brcm,bcm4335a0
++      - brcm,bcm4349-bt
+   shutdown-gpios:
+     maxItems: 1
diff --git a/queue-5.18/macintosh-adb-fix-oob-read-in-do_adb_query-function.patch b/queue-5.18/macintosh-adb-fix-oob-read-in-do_adb_query-function.patch
new file mode 100644 (file)
index 0000000..8870d24
--- /dev/null
@@ -0,0 +1,37 @@
+From fd97e4ad6d3b0c9fce3bca8ea8e6969d9ce7423b Mon Sep 17 00:00:00 2001
+From: Ning Qiang <sohu0106@126.com>
+Date: Wed, 13 Jul 2022 23:37:34 +0800
+Subject: macintosh/adb: fix oob read in do_adb_query() function
+
+From: Ning Qiang <sohu0106@126.com>
+
+commit fd97e4ad6d3b0c9fce3bca8ea8e6969d9ce7423b upstream.
+
+In do_adb_query() function of drivers/macintosh/adb.c, req->data is copied
+form userland. The parameter "req->data[2]" is missing check, the array
+size of adb_handler[] is 16, so adb_handler[req->data[2]].original_address and
+adb_handler[req->data[2]].handler_id will lead to oob read.
+
+Cc: stable <stable@kernel.org>
+Signed-off-by: Ning Qiang <sohu0106@126.com>
+Reviewed-by: Kees Cook <keescook@chromium.org>
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20220713153734.2248-1-sohu0106@126.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/macintosh/adb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/macintosh/adb.c
++++ b/drivers/macintosh/adb.c
+@@ -647,7 +647,7 @@ do_adb_query(struct adb_request *req)
+       switch(req->data[1]) {
+       case ADB_QUERY_GETDEVINFO:
+-              if (req->nbytes < 3)
++              if (req->nbytes < 3 || req->data[2] >= 16)
+                       break;
+               mutex_lock(&adb_handler_mutex);
+               req->reply[0] = adb_handler[req->data[2]].original_address;
index f3babbf6724f92c36fd90f8334a630e2c75c8f88..8b9bd0421358ee18d81d10d3d6d592cd24827b4d 100644 (file)
@@ -17,3 +17,17 @@ tools-kvm_stat-fix-display-of-error-when-multiple-pr.patch
 selftests-kvm-handle-compiler-optimizations-in-ucall.patch
 kvm-x86-svm-add-__gfp_account-to-__sev_dbg_-en-de-cr.patch
 arm64-set-uxn-on-swapper-page-tables.patch
+btrfs-zoned-prevent-allocation-from-previous-data-relocation-bg.patch
+btrfs-zoned-fix-critical-section-of-relocation-inode-writeback.patch
+btrfs-zoned-drop-optimization-of-zone-finish.patch
+bluetooth-hci_qca-return-wakeup-for-qca_wakeup.patch
+bluetooth-hci_bcm-add-bcm4349b1-variant.patch
+bluetooth-hci_bcm-add-dt-compatible-for-cyw55572.patch
+dt-bindings-bluetooth-broadcom-add-bcm4349b1-dt-binding.patch
+bluetooth-btusb-add-support-of-imc-networks-pid-0x3568.patch
+bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04ca-0x4007.patch
+bluetooth-btusb-add-realtek-rtl8852c-support-id-0x04c5-0x1675.patch
+bluetooth-btusb-add-realtek-rtl8852c-support-id-0x0cb8-0xc558.patch
+bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3587.patch
+bluetooth-btusb-add-realtek-rtl8852c-support-id-0x13d3-0x3586.patch
+macintosh-adb-fix-oob-read-in-do_adb_query-function.patch