diff options
author | David S. Miller <davem@davemloft.net> | 2019-12-09 10:49:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-09 10:49:25 -0800 |
commit | 4a63ef710cc3e79ce58b46b122118e415a44b3db (patch) | |
tree | 9f0bd62ee0d4f412c4085d5edd60bdde884a1218 /drivers/bluetooth/btusb.c | |
parent | net: WireGuard secure network tunnel (diff) | |
parent | Bluetooth: btusb: Disable runtime suspend on Realtek devices (diff) | |
download | linux-dev-4a63ef710cc3e79ce58b46b122118e415a44b3db.tar.xz linux-dev-4a63ef710cc3e79ce58b46b122118e415a44b3db.zip |
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-12-09
Here's the first bluetooth-next pull request for 5.6:
- Devicetree bindings updates for Broadcom controllers
- Add support for PCM configuration for Broadcom controllers
- btusb: Fixes for Realtek devices
- butsb: A few other smaller fixes (mem leak & non-atomic allocation issue)
Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r-- | drivers/bluetooth/btusb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 70e385987d41..0eaeca0a64fb 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -552,9 +552,9 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev) } bt_dev_err(hdev, "Reset Realtek device via gpio"); - gpiod_set_value_cansleep(reset_gpio, 0); - msleep(200); gpiod_set_value_cansleep(reset_gpio, 1); + msleep(200); + gpiod_set_value_cansleep(reset_gpio, 0); } static inline void btusb_free_frags(struct btusb_data *data) @@ -2602,7 +2602,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb) * and being processed the events from there then. */ if (test_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags)) { - data->evt_skb = skb_clone(skb, GFP_KERNEL); + data->evt_skb = skb_clone(skb, GFP_ATOMIC); if (!data->evt_skb) goto err_out; } @@ -2867,7 +2867,7 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname) err = btusb_mtk_hci_wmt_sync(hdev, &wmt_params); if (err < 0) { bt_dev_err(hdev, "Failed to send wmt rst (%d)", err); - return err; + goto err_release_fw; } /* Wait a few moments for firmware activation done */ @@ -3832,6 +3832,10 @@ static int btusb_probe(struct usb_interface *intf, * (DEVICE_REMOTE_WAKEUP) */ set_bit(BTUSB_WAKEUP_DISABLE, &data->flags); + + err = usb_autopm_get_interface(intf); + if (err < 0) + goto out_free_dev; } if (id->driver_info & BTUSB_AMP) { |