Received: by 10.192.165.148 with SMTP id m20csp2426084imm; Sun, 22 Apr 2018 06:56:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+0/86bKWAtVr1b/rQ5gShSon4wZvTNIOtfY0LRXgq7jv9FDPA0tX2OqcXqqz+6/VKyMMNh X-Received: by 2002:a17:902:ba88:: with SMTP id k8-v6mr17080097pls.305.1524405369873; Sun, 22 Apr 2018 06:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524405369; cv=none; d=google.com; s=arc-20160816; b=LeezaITd+Xcavfd+ImW5VutqFDqwgyHXv1m43DhBkNt8itY9bEd8QHfFiDxKyt7Rhz jkEql4tMamR+THaBaQnGA7ZAFruxTuTZh1DsPorqrxHvNuWSXLur341wcVrALQVPUPSo kcN4O7z+Tc/Sx0/P/yaWr8/83E413aFmj2AAaoFp84Uo1dU/o5S4R1uf8MIgyUbXz5Y/ fPPpVrSCV7vtCKpdTHyMQUtedPDeksRVPTJNxOuCI9rxJmHLr7MaMnwLiI7tv4+f+vfe V/dkTqTg7zuusDJQkYyugGbt95Dl8i8BnR3zHKrOnf90jdy9dqeA1FkWnltXRbrObY19 7j7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=amQNpahzL82gdyos1EzkB0Cmr2YDWwqEL6hlYV/rEcc=; b=pCspUzj4kFBU7/qWnacvpdSEPJcsTD6zDk9oL+4rBrEBxnt5tPoT4aBnjyBD2xn0RI F0GUzqhOd/9kYX3fA/QGcgz3bOuLa1fkQnjNXMS1yzumoTeED1AYEaUPild61Cswrkzb VpOVk6c7ObMOEBjE4kzIdEu7ivBFmTbcj+nbbdDBwfGb0/ew+nFIz3OLTAlslhXCJlrK swOvSeXHsM/uiZ0lg/tjoxL0Vz4PIwKznwtphGZYsU/H0JGyJDUqdh+6a+tZmdgcs+Df ttGcVN0BfHKkrpM2U8R0Iz5Dip5k5u4VFBc0t8ojSdV6oHHqFDpT/Xspr2mDyWcb2JIX pwKg== ARC-Authentication-Results: i=1; mx.google.com; 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 g14si8269927pgn.227.2018.04.22.06.55.54; Sun, 22 Apr 2018 06:56:09 -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; 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 S1751710AbeDVNym (ORCPT + 99 others); Sun, 22 Apr 2018 09:54:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44246 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbeDVNyk (ORCPT ); Sun, 22 Apr 2018 09:54:40 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5A91C710; Sun, 22 Apr 2018 13:54:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Marcel Holtmann Subject: [PATCH 4.16 001/196] Bluetooth: hci_bcm: Add irq_polarity module option Date: Sun, 22 Apr 2018 15:50:21 +0200 Message-Id: <20180422135104.335923713@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede commit e09070c51b280567695022237e57c428e548b355 upstream. Add irq_polarity module option for easier troubleshooting of irq-polarity issues. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/hci_bcm.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -126,6 +126,10 @@ struct bcm_data { static DEFINE_MUTEX(bcm_device_lock); static LIST_HEAD(bcm_device_list); +static int irq_polarity = -1; +module_param(irq_polarity, int, 0444); +MODULE_PARM_DESC(irq_polarity, "IRQ polarity 0: active-high 1: active-low"); + static inline void host_set_baudrate(struct hci_uart *hu, unsigned int speed) { if (hu->serdev) @@ -975,11 +979,17 @@ static int bcm_acpi_probe(struct bcm_dev } acpi_dev_free_resource_list(&resources); - dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table); - if (dmi_id) { - dev_warn(dev->dev, "%s: Overwriting IRQ polarity to active low", - dmi_id->ident); - dev->irq_active_low = true; + if (irq_polarity != -1) { + dev->irq_active_low = irq_polarity; + dev_warn(dev->dev, "Overwriting IRQ polarity to active %s by module-param\n", + dev->irq_active_low ? "low" : "high"); + } else { + dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table); + if (dmi_id) { + dev_warn(dev->dev, "%s: Overwriting IRQ polarity to active low", + dmi_id->ident); + dev->irq_active_low = true; + } } return 0;