public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Brian Norris <briannorris@chromium.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-bluetooth@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 24/32] Bluetooth: btusb: request wake pin with NOAUTOEN
Date: Fri, 26 Apr 2019 21:42:15 -0400	[thread overview]
Message-ID: <20190427014224.8274-24-sashal@kernel.org> (raw)
In-Reply-To: <20190427014224.8274-1-sashal@kernel.org>

From: Brian Norris <briannorris@chromium.org>

[ Upstream commit 771acc7e4a6e5dba779cb1a7fd851a164bc81033 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/bluetooth/btusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index b8dffe937f4f..dae8723dde8c 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2893,6 +2893,7 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
 		return 0;
 	}
 
+	irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&hdev->dev, irq, btusb_oob_wake_handler,
 			       0, "OOB Wake-on-BT", data);
 	if (ret) {
@@ -2907,7 +2908,6 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
 	}
 
 	data->oob_wake_irq = irq;
-	disable_irq(irq);
 	bt_dev_info(hdev, "OOB Wake-on-BT configured at IRQ %u", irq);
 	return 0;
 }
-- 
2.19.1


  parent reply	other threads:[~2019-04-27  1:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27  1:41 [PATCH AUTOSEL 4.14 01/32] ASoC: hdmi-codec: fix S/PDIF DAI Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 02/32] ASoC: ab8500: Mark expected switch fall-through Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 03/32] ASoC:soc-pcm:fix a codec fixup issue in TDM case Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 04/32] ASoC: nau8824: fix the issue of the widget with prefix name Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 05/32] ASoC: nau8810: fix the issue of widget with prefixed name Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 06/32] ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 07/32] ASoC: wm_adsp: Add locking to wm_adsp2_bus_error Sasha Levin
2019-04-27  1:41 ` [PATCH AUTOSEL 4.14 08/32] ASoC: cs4270: Set auto-increment bit for register writes Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 09/32] IB/hfi1: Eliminate opcode tests on mr deref Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 10/32] MIPS: KGDB: fix kgdb support for SMP platforms Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 11/32] ASoC: tlv320aic32x4: Fix Common Pins Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 12/32] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata() Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 13/32] perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 14/32] perf/x86/intel: Initialize TFA MSR Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 15/32] linux/kernel.h: Use parentheses around argument in u64_to_user_ptr() Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 16/32] xtensa: fix initialization of pt_regs::syscall in start_thread Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 17/32] ASoC: rockchip: pdm: fix regmap_ops hang issue Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 18/32] slab: fix a crash by reading /proc/slab_allocators Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 19/32] ASoC: stm32: fix sai driver name initialisation Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 20/32] virtio_pci: fix a NULL pointer reference in vp_del_vqs Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 21/32] RDMA/vmw_pvrdma: Fix memory leak on pvrdma_pci_remove Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 22/32] scsi: csiostor: fix missing data copy in csio_scsi_err_handler() Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 23/32] drm/mediatek: fix possible object reference leak Sasha Levin
2019-04-27  1:42 ` Sasha Levin [this message]
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 25/32] ASoC: Intel: kbl: fix wrong number of channels Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 26/32] virtio-blk: limit number of hw queues by nr_cpu_ids Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 27/32] clk: x86: Add system specific quirk to mark clocks as critical Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 28/32] platform/x86: pmc_atom: Drop __initconst on dmi table Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 29/32] NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 30/32] iommu/amd: Set exclusion range correctly Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 31/32] mm: make page ref count overflow check tighter and more explicit Sasha Levin
2019-04-27  1:42 ` [PATCH AUTOSEL 4.14 32/32] mm: add 'try_get_page()' helper function Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190427014224.8274-24-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=briannorris@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox