[SRU] [Artful/linux-oem] [PATCH 0/2] Fix QCA Rome bluetooth failed to work after applying reset-resume quirk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU] [Artful/linux-oem] [PATCH 0/2] Fix QCA Rome bluetooth failed to work after applying reset-resume quirk

Kai-Heng Feng
BugLink: http://bugs.launchpad.net/bugs/1741206

== SRU Justification ==
[Impact]
Some QCA ROME bluetooth devices does not work after runtime
suspend/resume after SRU LP: #1734020.

[Fix]
The commit let btusb reset at second time it resume, i.e. btusb_open().
The btusb stops working because the reset happens *after* btusb_open().
The reset should be done at hub port initialization, before
btusb_probe().

Revert the bad commit and use the reset-resume quirk in USB core stack.

[Test]
Cherry-picked the commit into Artful/OEM kernel and the issue is fixed.

[Regression Potential]
Low. This is limited to QCA Rome, also verified by the original quirk
author.

Kai-Heng Feng (2):
  Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"
  usb: quirks: Add reset-resume quirk for Dell DW1820 QCA Rome Bluetooth

 drivers/bluetooth/btusb.c | 6 ------
 drivers/usb/core/quirks.c | 3 +++
 2 files changed, 3 insertions(+), 6 deletions(-)

--
2.14.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU] [Artful/linux-oem] [PATCH 1/2] Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"

Kai-Heng Feng
BugLink: http://bugs.launchpad.net/bugs/1741206

This reverts commit fd865802c66bc451dc515ed89360f84376ce1a56.

This commit causes a regression on some QCA ROME chips. The USB device
reset happens in btusb_open(), hence firmware loading gets interrupted.

Furthermore, this commit stops working after commit
("a0085f2510e8976614ad8f766b209448b385492f Bluetooth: btusb: driver to
enable the usb-wakeup feature"). Reset-resume quirk only gets enabled in
btusb_suspend() when it's not a wakeup source.

If we really want to reset the USB device, we need to do it before
btusb_open(). Let's handle it in drivers/usb/core/quirks.c.

Cc: [hidden email]
Cc: Leif Liddy <[hidden email]>
Cc: Matthias Kaehlcke <[hidden email]>
Cc: Brian Norris <[hidden email]>
Cc: Daniel Drake <[hidden email]>
Signed-off-by: Kai-Heng Feng <[hidden email]>
Reviewed-by: Brian Norris <[hidden email]>
Tested-by: Brian Norris <[hidden email]>
Signed-off-by: Marcel Holtmann <[hidden email]>
(cherry picked from commit 7d06d5895c159f64c46560dc258e553ad8670fe0 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/bluetooth/btusb.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d563ec8c008b..e93f32e38130 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3073,12 +3073,6 @@ static int btusb_probe(struct usb_interface *intf,
  if (id->driver_info & BTUSB_QCA_ROME) {
  data->setup_on_usb = btusb_setup_qca;
  hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
-
- /* QCA Rome devices lose their updated firmware over suspend,
- * but the USB hub doesn't notice any status change.
- * Explicitly request a device reset on resume.
- */
- set_bit(BTUSB_RESET_RESUME, &data->flags);
  }
 
 #ifdef CONFIG_BT_HCIBTUSB_RTL
--
2.14.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU] [Artful/linux-oem] [PATCH 2/2] usb: quirks: Add reset-resume quirk for Dell DW1820 QCA Rome Bluetooth

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: http://bugs.launchpad.net/bugs/1741206

Commit ("fd865802c66bc451dc515ed89360f84376ce1a56 Bluetooth: btusb: fix
QCA Rome suspend/resume") enables reset_resume in btusb_probe(). This
makes the device resets during btusb_open(), firmware loading gets
interrupted as a result.

We still want to reset the device to solve the original issue, but we
should do it before btusb_open().

Hence, add reset-resume quirk in usb core intead of btusb.

Cc: [hidden email]
Cc: Leif Liddy <[hidden email]>
Cc: Matthias Kaehlcke <[hidden email]>
Cc: Brian Norris <[hidden email]>
Cc: Daniel Drake <[hidden email]>
Signed-off-by: Kai-Heng Feng <[hidden email]>
Acked-by: Greg Kroah-Hartman <[hidden email]>
Signed-off-by: Marcel Holtmann <[hidden email]>
(cherry picked from commit ea568f968ffe76d0fff426a5e77e023f23fcd564 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/usb/core/quirks.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index a6aaf2f193a4..cfc7cf77dffe 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -199,6 +199,9 @@ static const struct usb_device_id usb_quirk_list[] = {
  { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
  USB_QUIRK_IGNORE_REMOTE_WAKEUP },
 
+ /* QCA Rome Bluetooth in Dell DW1820 wireless module */
+ { USB_DEVICE(0x0cf3, 0xe007), .driver_info = USB_QUIRK_RESET_RESUME },
+
  /* Action Semiconductor flash disk */
  { USB_DEVICE(0x10d6, 0x2200), .driver_info =
  USB_QUIRK_STRING_FETCH_255 },
--
2.14.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU] [Artful/linux-oem] [PATCH 0/2] Fix QCA Rome bluetooth failed to work after applying reset-resume quirk

Hui Wang
In reply to this post by Kai-Heng Feng
On 2018年01月04日 16:16, Kai-Heng Feng wrote:
BugLink: http://bugs.launchpad.net/bugs/1741206

== SRU Justification ==
[Impact]
Some QCA ROME bluetooth devices does not work after runtime
suspend/resume after SRU LP: #1734020.

[Fix]
The commit let btusb reset at second time it resume, i.e. btusb_open().
The btusb stops working because the reset happens *after* btusb_open().
The reset should be done at hub port initialization, before
btusb_probe().

Revert the bad commit and use the reset-resume quirk in USB core stack.

[Test]
Cherry-picked the commit into Artful/OEM kernel and the issue is fixed.

[Regression Potential]
Low. This is limited to QCA Rome, also verified by the original quirk
author.

Kai-Heng Feng (2):
  Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"
  usb: quirks: Add reset-resume quirk for Dell DW1820 QCA Rome Bluetooth

 drivers/bluetooth/btusb.c | 6 ------
 drivers/usb/core/quirks.c | 3 +++
 2 files changed, 3 insertions(+), 6 deletions(-)

Acked-by: Hui Wang [hidden email]

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team