summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-03-06 00:53:44 -0500
committerDavid S. Miller <davem@davemloft.net>2018-03-06 01:20:46 -0500
commit0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70 (patch)
tree439c89ea3c87496c23e167148f2cdbefb6e82b30 /drivers/bluetooth/btusb.c
parentef3f6c256f0b4711a3ef1489797b95820be5ab01 (diff)
parentce380619fab99036f5e745c7a865b21c59f005f6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
All of the conflicts were cases of overlapping changes. In net/core/devlink.c, we have to make care that the resouce size_params have become a struct member rather than a pointer to such an object. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r--drivers/bluetooth/btusb.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index c8e9ae6b99e1..fa4ce83893bb 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -21,6 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/dmi.h>
24#include <linux/module.h> 25#include <linux/module.h>
25#include <linux/usb.h> 26#include <linux/usb.h>
26#include <linux/usb/quirks.h> 27#include <linux/usb/quirks.h>
@@ -383,6 +384,21 @@ static const struct usb_device_id blacklist_table[] = {
383 { } /* Terminating entry */ 384 { } /* Terminating entry */
384}; 385};
385 386
387/* The Bluetooth USB module build into some devices needs to be reset on resume,
388 * this is a problem with the platform (likely shutting off all power) not with
389 * the module itself. So we use a DMI list to match known broken platforms.
390 */
391static const struct dmi_system_id btusb_needs_reset_resume_table[] = {
392 {
393 /* Lenovo Yoga 920 (QCA Rome device 0cf3:e300) */
394 .matches = {
395 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
396 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920"),
397 },
398 },
399 {}
400};
401
386#define BTUSB_MAX_ISOC_FRAMES 10 402#define BTUSB_MAX_ISOC_FRAMES 10
387 403
388#define BTUSB_INTR_RUNNING 0 404#define BTUSB_INTR_RUNNING 0
@@ -2955,6 +2971,9 @@ static int btusb_probe(struct usb_interface *intf,
2955 hdev->send = btusb_send_frame; 2971 hdev->send = btusb_send_frame;
2956 hdev->notify = btusb_notify; 2972 hdev->notify = btusb_notify;
2957 2973
2974 if (dmi_check_system(btusb_needs_reset_resume_table))
2975 interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
2976
2958#ifdef CONFIG_PM 2977#ifdef CONFIG_PM
2959 err = btusb_config_oob_wake(hdev); 2978 err = btusb_config_oob_wake(hdev);
2960 if (err) 2979 if (err)
@@ -3041,12 +3060,6 @@ static int btusb_probe(struct usb_interface *intf,
3041 if (id->driver_info & BTUSB_QCA_ROME) { 3060 if (id->driver_info & BTUSB_QCA_ROME) {
3042 data->setup_on_usb = btusb_setup_qca; 3061 data->setup_on_usb = btusb_setup_qca;
3043 hdev->set_bdaddr = btusb_set_bdaddr_ath3012; 3062 hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
3044
3045 /* QCA Rome devices lose their updated firmware over suspend,
3046 * but the USB hub doesn't notice any status change.
3047 * explicitly request a device reset on resume.
3048 */
3049 interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
3050 } 3063 }
3051 3064
3052#ifdef CONFIG_BT_HCIBTUSB_RTL 3065#ifdef CONFIG_BT_HCIBTUSB_RTL