linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: johannes.berg@intel.com, emmanuel.grumbach@intel.com,
	luciano.coelho@intel.com, marcel@holtmann.org,
	johan.hedberg@gmail.com
Cc: linuxwifi@intel.com, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: [PATCH v2 2/3] Bluetooth: btusb: Load firmware exclusively for Intel BT
Date: Wed, 17 Jul 2019 15:49:19 +0800	[thread overview]
Message-ID: <20190717074920.21624-2-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20190717074920.21624-1-kai.heng.feng@canonical.com>

To avoid the firmware loading race between Bluetooth and WiFi on Intel
8260, load firmware exclusively when IWLWIFI is enabled.

BugLink: https://bugs.launchpad.net/bugs/1832988

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v2:
 - Add bug report link.
 - Rebase on latest wireless-next.

 drivers/bluetooth/btusb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 50aed5259c2b..ca7a5757a2ba 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2272,8 +2272,16 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
 
 	set_bit(BTUSB_DOWNLOADING, &data->flags);
 
+#if IS_ENABLED(CONFIG_IWLWIFI)
+	btintel_firmware_lock();
+#endif
+
 	/* Start firmware downloading and get boot parameter */
 	err = btintel_download_firmware(hdev, fw, &boot_param);
+
+#if IS_ENABLED(CONFIG_IWLWIFI)
+	btintel_firmware_unlock();
+#endif
 	if (err < 0)
 		goto done;
 
-- 
2.17.1


  reply	other threads:[~2019-07-17  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  7:49 [PATCH v2 1/3] Bluetooth: btintel: Add firmware lock function Kai-Heng Feng
2019-07-17  7:49 ` Kai-Heng Feng [this message]
2019-07-17  7:49 ` [PATCH v2 3/3] iwlwifi: Load firmware exclusively for Intel WiFi Kai-Heng Feng
2019-07-17 13:36 ` [PATCH v2 1/3] Bluetooth: btintel: Add firmware lock function Marcel Holtmann
2019-07-17 14:08   ` Kai-Heng Feng
2019-07-26  7:01     ` Johannes Berg

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=20190717074920.21624-2-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxwifi@intel.com \
    --cc=luciano.coelho@intel.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).