Commit 8ca12bc3 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'for-upstream' of...

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next



Johan Hedberg says:

====================
pull request: bluetooth-next 2019-10-23

Here's the main bluetooth-next pull request for the 5.5 kernel:

 - Multiple fixes to hci_qca driver
 - Fix for HCI_USER_CHANNEL initialization
 - btwlink: drop superseded driver
 - Add support for Intel FW download error recovery
 - Various other smaller fixes & improvements

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 48027478 3347a809
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -380,17 +380,6 @@ config BT_ATH3K
	  Say Y here to compile support for "Atheros firmware download driver"
	  into the kernel or say M to compile it as module (ath3k).

config BT_WILINK
	tristate "Texas Instruments WiLink7 driver"
	depends on TI_ST
	help
	  This enables the Bluetooth driver for Texas Instrument's BT/FM/GPS
	  combo devices. This makes use of shared transport line discipline
	  core driver to communicate with the BT core of the combo chip.

	  Say Y here to compile support for Texas Instrument's WiLink7 driver
	  into the kernel or say M to compile it as module (btwilink).

config BT_MTKSDIO
	tristate "MediaTek HCI SDIO driver"
	depends on MMC
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ obj-$(CONFIG_BT_INTEL) += btintel.o
obj-$(CONFIG_BT_ATH3K)		+= ath3k.o
obj-$(CONFIG_BT_MRVL)		+= btmrvl.o
obj-$(CONFIG_BT_MRVL_SDIO)	+= btmrvl_sdio.o
obj-$(CONFIG_BT_WILINK)		+= btwilink.o
obj-$(CONFIG_BT_MTKSDIO)	+= btmtksdio.o
obj-$(CONFIG_BT_MTKUART)	+= btmtkuart.o
obj-$(CONFIG_BT_QCOMSMD)	+= btqcomsmd.o
+45 −0
Original line number Diff line number Diff line
@@ -709,6 +709,51 @@ done:
}
EXPORT_SYMBOL_GPL(btintel_download_firmware);

void btintel_reset_to_bootloader(struct hci_dev *hdev)
{
	struct intel_reset params;
	struct sk_buff *skb;

	/* Send Intel Reset command. This will result in
	 * re-enumeration of BT controller.
	 *
	 * Intel Reset parameter description:
	 * reset_type :   0x00 (Soft reset),
	 *		  0x01 (Hard reset)
	 * patch_enable : 0x00 (Do not enable),
	 *		  0x01 (Enable)
	 * ddc_reload :   0x00 (Do not reload),
	 *		  0x01 (Reload)
	 * boot_option:   0x00 (Current image),
	 *                0x01 (Specified boot address)
	 * boot_param:    Boot address
	 *
	 */
	params.reset_type = 0x01;
	params.patch_enable = 0x01;
	params.ddc_reload = 0x01;
	params.boot_option = 0x00;
	params.boot_param = cpu_to_le32(0x00000000);

	skb = __hci_cmd_sync(hdev, 0xfc01, sizeof(params),
			     &params, HCI_INIT_TIMEOUT);
	if (IS_ERR(skb)) {
		bt_dev_err(hdev, "FW download error recovery failed (%ld)",
			   PTR_ERR(skb));
		return;
	}
	bt_dev_info(hdev, "Intel reset sent to retry FW download");
	kfree_skb(skb);

	/* Current Intel BT controllers(ThP/JfP) hold the USB reset
	 * lines for 2ms when it receives Intel Reset in bootloader mode.
	 * Whereas, the upcoming Intel BT controllers will hold USB reset
	 * for 150ms. To keep the delay generic, 150ms is chosen here.
	 */
	msleep(150);
}
EXPORT_SYMBOL_GPL(btintel_reset_to_bootloader);

MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth support for Intel devices ver " VERSION);
MODULE_VERSION(VERSION);
+5 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ int btintel_read_boot_params(struct hci_dev *hdev,
			     struct intel_boot_params *params);
int btintel_download_firmware(struct hci_dev *dev, const struct firmware *fw,
			      u32 *boot_param);
void btintel_reset_to_bootloader(struct hci_dev *hdev);
#else

static inline int btintel_check_bdaddr(struct hci_dev *hdev)
@@ -181,4 +182,8 @@ static inline int btintel_download_firmware(struct hci_dev *dev,
{
	return -EOPNOTSUPP;
}

static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)
{
}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -418,7 +418,7 @@ static int rtl_download_firmware(struct hci_dev *hdev,
		if (IS_ERR(skb)) {
			rtl_dev_err(hdev, "download fw command failed (%ld)",
				    PTR_ERR(skb));
			ret = -PTR_ERR(skb);
			ret = PTR_ERR(skb);
			goto out;
		}

Loading