linux-stable/drivers/bluetooth
Hans de Goede 971039cc4d Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking
commit 1fdb926974 upstream.

Commit 61f5acea87 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix
with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA
USB Bluetooth modules. But it turns out that the resume problems are not
caused by the QCA Rome chipset, on most platforms it resumes fine. The
resume problems are actually a platform problem (likely the platform
cutting all power when suspended).

The USB_QUIRK_RESET_RESUME quirk also disables runtime suspend, so by
matching on usb-ids, we're causing all boards with these chips to use extra
power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead
of on usb-ids, so that we match the platform and not the chipset.

Here is the /sys/kernel/debug/usb/devices for the Bluetooth module:

T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#=  5 Spd=12   MxCh= 0
D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0cf3 ProdID=e300 Rev= 0.01
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836
Fixes: 61f5acea87 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc: stable@vger.kernel.org
Cc: Brian Norris <briannorris@chromium.org>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reported-and-tested-by: Kevin Fenzi <kevin@scrye.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08 22:40:59 -08:00
..
ath3k.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
bcm203x.c bluetooth: bcm203x: don't print error when allocating urb fails 2016-09-27 12:20:17 +02:00
bfusb.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
bluecard_cs.c Bluetooth: bluecard: blink LED during continuous activity 2017-08-07 19:42:07 +02:00
bpa10x.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
bt3c_cs.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
btbcm.c Bluetooth: btbcm: Consolidate the controller information commands 2017-08-17 12:11:24 +03:00
btbcm.h Bluetooth: btbcm: Support the BCM4354 Bluetooth UART device 2015-06-17 18:56:53 +02:00
btintel.c Bluetooth: btintel: Add MODULE_FIRMWARE entries for iBT 3.5 controllers 2017-05-23 19:54:55 +02:00
btintel.h Bluetooth: btintel: Create common Intel Version Read function 2015-12-10 00:51:51 +01:00
btmrvl_debugfs.c Bluetooth: btmrvl add firmware dump support 2014-12-03 17:35:51 +01:00
btmrvl_drv.h Bluetooth: btmrvl: drop duplicate header slab.h 2016-12-08 07:44:56 +01:00
btmrvl_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
btmrvl_sdio.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
btmrvl_sdio.h btmrvl: add platform specific wakeup interrupt support 2016-05-02 19:26:15 +02:00
btqca.c Bluetooth: btqca: Fixed a coding style error 2017-07-20 11:18:35 +02:00
btqca.h Bluetooth: btqca: Introduce generic QCA ROME support 2015-08-10 23:52:20 +02:00
btqcomsmd.c Bluetooth: btqcomsmd: Add support for BD address setup 2017-11-30 08:40:47 +00:00
btrtl.c Bluetooth: btrtl: Fix a error code in rtl_load_config() 2017-07-28 19:29:08 +03:00
btrtl.h Bluetooth: btrtl: Create separate module for Realtek BT driver 2015-05-14 12:04:12 +02:00
btsdio.c Bluetooth: btsdio: Do not bind to non-removable BCM43341 2018-02-16 20:23:06 +01:00
btuart_cs.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
btusb.c Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking 2018-03-08 22:40:59 -08:00
btwilink.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
dtl1_cs.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
hci_ag6xx.c Bluetooth: hci_uart: Add diag and address support for Intel/AG6xx 2016-02-29 19:25:22 +02:00
hci_ath.c Bluetooth: Use new hci_skb_pkt_* wrappers for drivers 2015-11-19 17:50:27 +01:00
hci_bcm.c Bluetooth: hci_bcm: Fix setting of irq trigger type 2017-12-25 14:26:27 +01:00
hci_bcsp.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hci_h4.c Bluetooth: hci_uart: Fix uninitialized alignment value 2017-07-31 13:27:37 +03:00
hci_h5.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hci_intel.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
hci_ldisc.c Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev 2017-12-25 14:26:27 +01:00
hci_ll.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
hci_mrvl.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hci_nokia.c Bluetooth: hci_nokia: Use new hci_uart_unregister_device() function 2017-07-20 11:18:36 +02:00
hci_qca.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
hci_serdev.c Bluetooth: hci_serdev: Introduce hci_uart_unregister_device() 2017-07-20 11:18:36 +02:00
hci_uart.h Bluetooth: hci_serdev: Introduce hci_uart_unregister_device() 2017-07-20 11:18:36 +02:00
hci_vhci.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
Kconfig Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS 2018-02-22 15:42:32 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00