Message ID | 20230424124852.12625-3-johan+linaro@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2720467vqo; Mon, 24 Apr 2023 05:53:32 -0700 (PDT) X-Google-Smtp-Source: AKy350b7qbZhtwMTs9WrxGqCKVZPpfDWGjRk0FKh8m6oZa9jhln9C3uPoTymIZyfc17AkZKE2TRd X-Received: by 2002:a05:6a00:188d:b0:635:1770:beb7 with SMTP id x13-20020a056a00188d00b006351770beb7mr16794223pfh.14.1682340812559; Mon, 24 Apr 2023 05:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682340812; cv=none; d=google.com; s=arc-20160816; b=DRHzEsP4/6RDz9dC3rCgzEz6X9w/npY0gpDyHRoHQUY5VbaD0JQ6F0ttnF6C5TztcQ jhC5z0w/0v01vc9267JqP8yDXOU9ai9iN6X6K9Z9ioRkz5Cl/OlezkrioD7mupuYeyMj 3oBeX9RdUF51l/tJVWELsRtrZ296V34nFCD0XmcJQ12lfPrfoROhyQiHr9V+PEKE/6HA TDWujzaHgPOofMEFRNTfco74qGwhm8PXqHBsZelh2Km89m9OKbE+tFg2xtTOWN9gm+TB X7O/BLFssIO4sXGROZXYbQsyh/fF7QIZ1MFXWuNK5f0JogaAER6p5L3l/5HP2J9il8gG 9l+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fzspn5LDVKmkJ/6cPd59oEXm8UF9Im2JNvOw9hzcOFI=; b=ZAvl77ru0d32swP8Rmn0j78WJjY3+4GCLH7b4barD+2hzFynRKnJH34UiEThdUkHjZ 1hkYOMKt5MoOvk/5OVFjBd4I+wEPpwZ4AunfZLgNRjkmnUpi4FwMvDFvqe/ostUE4Jo8 YJp8u4L71K05mbAUusNCsEkqkp2BQWzfNfhRBtNaWWYbQEhSoOdlGK7rXJnlTzTvhL/b 7KjR/gNeMZ3kg+/lhfmhWLjyhEfBC7Kc3iKh2ZHtSvgSlxtSEWw95EgQXZCCcW10jI5y o+9h4D1w7pKQH6usHg8pCEnF42WnS0buIN40v9rpNAXbMZJVU48mCSrfoRo5bpgyp2Pz EU9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QGTbaFPp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k71-20020a63844a000000b0051b6613dddesi10975310pgd.281.2023.04.24.05.53.19; Mon, 24 Apr 2023 05:53:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QGTbaFPp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231860AbjDXMua (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Mon, 24 Apr 2023 08:50:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231823AbjDXMuY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Apr 2023 08:50:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21BBA4C10; Mon, 24 Apr 2023 05:50:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 71FE161F32; Mon, 24 Apr 2023 12:50:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8882C4339B; Mon, 24 Apr 2023 12:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682340602; bh=Kp6sLYqmpkY6hExl+WRL9PGf/2mCUC4b+03Evy/ZlDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QGTbaFPpS88HlIx4V3SL3glUuDcDtTMpORjUTvqreo9LpPCMxst6lPABFFUCRBc+F gXHv5YzeJyUCd2bS8mFX6UMJ3d/kRxYGPpIOkXvzFL9tgXdSNyl9/K5HSqB+k51MgS hSJ+Lu+QZQysC+fX2BDwVv1VS/0xSHD7G8/ECgL3NU3pP2nUaoB1H9mHa6YK29BVbq z8kEzq2Ft85mnNR2GtanDzesV27goQHXkhBNl2XgT5drBK0hsh12951vfd9ePl4KEf zGbWgRJ6COPmrM6C7qoPeZw0ArUOMEt6pRLu8g7TxHQDcz4r7yyiutO/nNoHIDtU/i tm540grJRDTeg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1pqve7-0003IZ-9n; Mon, 24 Apr 2023 14:50:19 +0200 From: Johan Hovold <johan+linaro@kernel.org> To: Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Luiz Augusto von Dentz <luiz.dentz@gmail.com> Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org>, stable@vger.kernel.org Subject: [PATCH 2/2] Bluetooth: hci_qca: fix debugfs registration Date: Mon, 24 Apr 2023 14:48:52 +0200 Message-Id: <20230424124852.12625-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424124852.12625-1-johan+linaro@kernel.org> References: <20230424124852.12625-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764062199758872838?= X-GMAIL-MSGID: =?utf-8?q?1764062199758872838?= |
Series |
Bluetooth: fix debugfs registration
|
|
Commit Message
Johan Hovold
April 24, 2023, 12:48 p.m. UTC
Since commit 3e4be65eb82c ("Bluetooth: hci_qca: Add poweroff support
during hci down for wcn3990"), the setup callback which registers the
debugfs interface can be called multiple times.
This specifically leads to the following error when powering on the
controller:
debugfs: Directory 'ibs' with parent 'hci0' already present!
Add a driver flag to avoid trying to register the debugfs interface more
than once.
Fixes: 3e4be65eb82c ("Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990")
Cc: stable@vger.kernel.org # 4.20
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/bluetooth/hci_qca.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 38ff962662ff..db020c04b3e8 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -78,7 +78,8 @@ enum qca_flags { QCA_HW_ERROR_EVENT, QCA_SSR_TRIGGERED, QCA_BT_OFF, - QCA_ROM_FW + QCA_ROM_FW, + QCA_DEBUGFS_CREATED, }; enum qca_capabilities { @@ -635,6 +636,9 @@ static void qca_debugfs_init(struct hci_dev *hdev) if (!hdev->debugfs) return; + if (test_and_set_bit(QCA_DEBUGFS_CREATED, &qca->flags)) + return; + ibs_dir = debugfs_create_dir("ibs", hdev->debugfs); /* read only */