Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 14:13:15 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 14:13:28 +0200
commit1558300f5574c81f521571bbf2f33a02aa9f3c60 (patch)
treec66f12070ecdf033cab46939a5d2cfba764e61c0
parent71f31814611c1284e35ba1f085cdbccef1e446e1 (diff)
Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning
(bsc#1051510).
-rw-r--r--patches.drivers/Bluetooth-hci_qca-Fix-Sleep-inside-atomic-section-wa44
-rw-r--r--series.conf1
2 files changed, 45 insertions, 0 deletions
diff --git a/patches.drivers/Bluetooth-hci_qca-Fix-Sleep-inside-atomic-section-wa b/patches.drivers/Bluetooth-hci_qca-Fix-Sleep-inside-atomic-section-wa
new file mode 100644
index 0000000000..cef2c630bb
--- /dev/null
+++ b/patches.drivers/Bluetooth-hci_qca-Fix-Sleep-inside-atomic-section-wa
@@ -0,0 +1,44 @@
+From 9960521c44a5d828f29636ceac0600603ecbddbf Mon Sep 17 00:00:00 2001
+From: Thierry Escande <thierry.escande@linaro.org>
+Date: Tue, 29 May 2018 18:37:16 +0200
+Subject: [PATCH] Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning
+Git-commit: 9960521c44a5d828f29636ceac0600603ecbddbf
+Patch-mainline: v4.18-rc1
+References: bsc#1051510
+
+This patch fixes the following warning during boot:
+
+ do not call blocking ops when !TASK_RUNNING; state=1 set at
+ [<(ptrval)>] qca_setup+0x194/0x750 [hci_uart]
+ WARNING: CPU: 2 PID: 1878 at kernel/sched/core.c:6135
+ __might_sleep+0x7c/0x88
+
+In qca_set_baudrate(), the current task state is set to
+TASK_UNINTERRUPTIBLE before going to sleep for 300ms. It was then
+restored to TASK_INTERRUPTIBLE. This patch sets the current task state
+back to TASK_RUNNING instead.
+
+Signed-off-by: Thierry Escande <thierry.escande@linaro.org>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ 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 f05382b5a65d..51790dd02afb 100644
+--- a/drivers/bluetooth/hci_qca.c
++++ b/drivers/bluetooth/hci_qca.c
+@@ -910,7 +910,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)
+ */
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS));
+- set_current_state(TASK_INTERRUPTIBLE);
++ set_current_state(TASK_RUNNING);
+
+ return 0;
+ }
+--
+2.18.0
+
diff --git a/series.conf b/series.conf
index 8d9bbb81c0..77d51590b0 100644
--- a/series.conf
+++ b/series.conf
@@ -14852,6 +14852,7 @@
patches.fixes/ipv6-omit-traffic-class-when-calculating-flow-hash.patch
patches.drivers/Bluetooth-btusb-Add-a-new-Realtek-8723DE-ID-2ff8-b01
patches.drivers/Bluetooth-btusb-Apply-QCA-Rome-patches-for-some-ATH3
+ patches.drivers/Bluetooth-hci_qca-Fix-Sleep-inside-atomic-section-wa
patches.suse/team-use-netdev_features_t-instead-of-u32.patch
patches.fixes/e1000e-Ignore-TSYNCRXCTL-when-getting-I219-clock-att.patch
patches.drivers/ixgbevf-fix-possible-race-in-the-reset-subtask.patch