Bug 216817
Summary: | btusb device with ID 0489:e0d0 no longer working after v6.0 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Andrew M (quantumphazor) |
Component: | Bluetooth | Assignee: | linux-bluetooth (linux-bluetooth) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | luiz.dentz, mario.limonciello, regressions |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugzilla.redhat.com/show_bug.cgi?id=2149136 | ||
Kernel Version: | 6.0, 6.0.12 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | output of lsusb -v -d 0489:e0d0 |
Description
Andrew M
2022-12-18 04:28:43 UTC
Created attachment 303421 [details]
output of lsusb -v -d 0489:e0d0
FWIW, there is a fix for that patch that might or might not be related to your problem (I'm not a bluetooth developer): https://lore.kernel.org/all/20221206012323.3684462-1-luiz.dentz@gmail.com/ You also might want to check if 6.1 works, as some fixes are not backported -- and 6.0 will likely be soon EOL anyway Unfortunately it sill fails with 6.1 from Arch testing and a latest git pull (6.1.r13139.gf9ff5644bcc0) which both include that change. Looks like the command that is failing is HCI_OP_LE_READ_BUFFER_SIZE_V2: #define HCI_OP_LE_READ_BUFFER_SIZE_V2 0x2060 Looks like the controller is marking as supported but in fact it doesn't: /* Use Read LE Buffer Size V2 if supported */ if (hdev->commands[41] & 0x20) return __hci_cmd_sync_status(hdev, HCI_OP_LE_READ_BUFFER_SIZE_V2, 0, NULL, HCI_CMD_TIMEOUT); So either we introduce a quirk that must be set by the driver or we fallback to HCI_OP_LE_READ_BUFFER_SIZE if HCI_OP_LE_READ_BUFFER_SIZE_V2 is not supported, the later perhaps save us more time detecting this broken behavior since some manufacturers don't seem to even care to qualify their controllers. (In reply to Andrew M from comment #3) > Unfortunately it sill fails with 6.1 from Arch testing and a latest git pull > (6.1.r13139.gf9ff5644bcc0) which both include that change. Can you try with the following patch: diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 5220bfd75b00..b3676b899647 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -3572,7 +3572,7 @@ static const struct hci_init_stage hci_init2[] = { static int hci_le_read_buffer_size_sync(struct hci_dev *hdev) { /* Use Read LE Buffer Size V2 if supported */ - if (hdev->commands[41] & 0x20) + if (iso_capable(hdev) && hdev->commands[41] & 0x20) return __hci_cmd_sync_status(hdev, HCI_OP_LE_READ_BUFFER_SIZE_V2, 0, NULL, HCI_CMD_TIMEOUT); (In reply to Luiz Von Dentz from comment #5) > Can you try with the following patch Thanks for the quick response. Tried the patch and it has solved the problem for me on both 6.1.0 and git. I hope it makes it into 6.1.1 (In reply to Andrew M from comment #6) > (In reply to Luiz Von Dentz from comment #5) > > Can you try with the following patch > > Thanks for the quick response. Tried the patch and it has solved the problem > for me on both 6.1.0 and git. > I hope it makes it into 6.1.1 Please test with the latest version: https://patchwork.kernel.org/project/bluetooth/patch/20221219234945.3733741-1-luiz.dentz@gmail.com/ It turns out the features are not ready if we don't change the command sequence so iso_capable would always evaluate to false. (In reply to Luiz Von Dentz from comment #7) > (In reply to Andrew M from comment #6) > > (In reply to Luiz Von Dentz from comment #5) > > > Can you try with the following patch > > > > Thanks for the quick response. Tried the patch and it has solved the > problem > > for me on both 6.1.0 and git. > > I hope it makes it into 6.1.1 > > Please test with the latest version: > > https://patchwork.kernel.org/project/bluetooth/patch/20221219234945.3733741- > 1-luiz.dentz@gmail.com/ > > It turns out the features are not ready if we don't change the command > sequence so iso_capable would always evaluate to false. Still works. Tested v6.1 and 6.1.r13872.gb6bb9676f216 As this completely broke bluetooth for a number of people, can you please consider this to be sent up to 6.2-rc in a fixes PR rather than waiting for 6.3 and Cc: stable@vger.kernel.org # 6.1 (In reply to Mario Limonciello (AMD) from comment #9) > As this completely broke bluetooth for a number of people, Did it? Ohh, interesting. > can you please > consider this to be sent up to 6.2-rc in a fixes PR rather than waiting for > 6.3 and > > Cc: stable@vger.kernel.org # 6.1 Luiz, that sounds like a reasonable request. Did you work on that front? Doesn't look like it from here, but maybe I missed something. Sorry for late reply, long weekend here, I will create a pull request for net so hopefully this get in the next rc. As this is upstreamed as of 6.2-rc5 (3a4d29b6d631b ("Bluetooth: hci_sync: Fix use HCI_OP_LE_READ_BUFFER_SIZE_V2")) closing this issue. The fix should trickle into 6.1.y as well. |