aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2019-04-09 14:49:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-09 23:38:24 -0400
commit771acc7e4a6e5dba779cb1a7fd851a164bc81033 (patch)
treea0574841f90b59fa08855d7eec95fd132063d645
parent0ee7fb36f988539f52f83ce6048d696bd540066f (diff)
Bluetooth: btusb: request wake pin with NOAUTOEN
Badly-designed systems might have (for example) active-high wake pins that default to high (e.g., because of external pull ups) until they have an active firmware which starts driving it low. This can cause an interrupt storm in the time between request_irq() and disable_irq(). We don't support shared interrupts here, so let's just pre-configure the interrupt to avoid auto-enabling it. Fixes: fd913ef7ce61 ("Bluetooth: btusb: Add out-of-band wakeup support") Fixes: 5364a0b4f4be ("arm64: dts: rockchip: move QCA6174A wakeup pin into its USB node") Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/bluetooth/btusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ded198328f21..7db48ae65cd2 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2942,6 +2942,7 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
2942 return 0; 2942 return 0;
2943 } 2943 }
2944 2944
2945 irq_set_status_flags(irq, IRQ_NOAUTOEN);
2945 ret = devm_request_irq(&hdev->dev, irq, btusb_oob_wake_handler, 2946 ret = devm_request_irq(&hdev->dev, irq, btusb_oob_wake_handler,
2946 0, "OOB Wake-on-BT", data); 2947 0, "OOB Wake-on-BT", data);
2947 if (ret) { 2948 if (ret) {
@@ -2956,7 +2957,6 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
2956 } 2957 }
2957 2958
2958 data->oob_wake_irq = irq; 2959 data->oob_wake_irq = irq;
2959 disable_irq(irq);
2960 bt_dev_info(hdev, "OOB Wake-on-BT configured at IRQ %u", irq); 2960 bt_dev_info(hdev, "OOB Wake-on-BT configured at IRQ %u", irq);
2961 return 0; 2961 return 0;
2962} 2962}