Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2570360yba; Mon, 6 May 2019 08:09:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtOagcOdQqZ/jYJuYH4BUGopOIIkbViawEpkkj+gUaASJe1A8HzIM03HcGuwH7LXs/AYFf X-Received: by 2002:a65:4341:: with SMTP id k1mr26765747pgq.88.1557155351447; Mon, 06 May 2019 08:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557155351; cv=none; d=google.com; s=arc-20160816; b=CChPV0+lxZ/kevgcebMIVF84Zcbbt4XsnMJfG9GP9AJH+9cmWecGjahZ7InfqnLvCC 9BVwWStMO3NgvPRZzCUEy5vlJJamHTlK/BQlb1pj2KVgrr0RnfVBQk23kWYAseJCedUG Y7qU8K1Jy6Lcu0RiHac4YbbJNGfnlPr7+WMNxbiD4JkJPUp9MaXPRAnlC8xlH+9jbOnG i/90ROWM7y8h/l8mzyfni4UA8Ng5yilHxIj44MiBxayhoupfDSnnofsECW0KugG8SWOc mCoU+9cTsvFXuDYC9Tdkk6jsvnRV3YF/QsSWqVf7JOpmH6ddBMZ3xveDaQ6/1frPVKK6 q9ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a310JbHKYb/sm7mNrkW3E6f102WL29aMsPu3w8dvFaA=; b=yiUbpT7Z7h+oQd8O+Z+7YP9pV0kn/ERN7pLrqiGL8hitdPBbgKByZsOj5MfijBVPOR osouwYEqjptQIHbaiSVbHTwKmEfup7Ii2ApM86eR/qYAe0D+hvQ/Kkm++AFQjOYUM/HS 0UlGlGhBxl8o9YFkBgOIgwubZDybJYBEtmciHq+uaqq4OoGx9yBra12B/EKL24d4CeUz 75ipo2dKeZVz609f+GVk97vmXwhFC2qIRhI0oVBug5vNL1YoLDsKRCFUIl4adlhA+R7g 0ze1Y/umhKB3lh7xrJH+w+rjlV4s6MDD/SAI/sR4RLKSyuQvDO76xTCbR34q/BQ+TERo G8hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G3tUtwo2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14si449646pls.327.2019.05.06.08.08.53; Mon, 06 May 2019 08:09:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G3tUtwo2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727557AbfEFPGM (ORCPT + 99 others); Mon, 6 May 2019 11:06:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:59016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727507AbfEFOiC (ORCPT ); Mon, 6 May 2019 10:38:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AE5B214AE; Mon, 6 May 2019 14:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153482; bh=sL3y0IG1KUINbFHeL51POgTm3rfkjbjchIH4oxMEPRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3tUtwo2DFXrFLozGkpfu9R+vxnnrX2sOvxzkedKyyrXVZtoZDliS5tWFpiexWzLe ZUUnDsf9ibFo5fYYTfKz/oUaU1aDJB20/VnV8VABLlT/EHCaeTlZOhopOPfUQ3tJIH eI4WiwMJtNtP4t2xgr3iUPbw5Azc/mYLHkzjiOgk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brian Norris , Matthias Kaehlcke , Linus Torvalds Subject: [PATCH 5.0 084/122] Bluetooth: btusb: request wake pin with NOAUTOEN Date: Mon, 6 May 2019 16:32:22 +0200 Message-Id: <20190506143102.306608149@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brian Norris commit 771acc7e4a6e5dba779cb1a7fd851a164bc81033 upstream. 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 Reviewed-by: Matthias Kaehlcke Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/btusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2885,6 +2885,7 @@ static int btusb_config_oob_wake(struct 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) { @@ -2899,7 +2900,6 @@ static int btusb_config_oob_wake(struct } data->oob_wake_irq = irq; - disable_irq(irq); bt_dev_info(hdev, "OOB Wake-on-BT configured at IRQ %u", irq); return 0; }