Message ID | 20210527151951.v2.1.I4d214bb82746fb2ed94eb1c2100dda0f63cf9a25@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] Bluetooth: hci_h5: Add RTL8822CS capabilities | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=489339 ---Test result--- Test Summary: CheckPatch PASS 1.21 seconds GitLint PASS 0.15 seconds BuildKernel PASS 659.84 seconds TestRunner: Setup PASS 439.47 seconds TestRunner: l2cap-tester PASS 3.07 seconds TestRunner: bnep-tester PASS 2.15 seconds TestRunner: mgmt-tester PASS 30.93 seconds TestRunner: rfcomm-tester PASS 2.49 seconds TestRunner: sco-tester PASS 2.35 seconds TestRunner: smp-tester PASS 2.49 seconds TestRunner: userchan-tester PASS 2.20 seconds Details ############################## Test: CheckPatch - PASS - 1.21 seconds Run checkpatch.pl script with rule in .checkpatch.conf ############################## Test: GitLint - PASS - 0.15 seconds Run gitlint with rule in .gitlint ############################## Test: BuildKernel - PASS - 659.84 seconds Build Kernel with minimal configuration supports Bluetooth ############################## Test: TestRunner: Setup - PASS - 439.47 seconds Setup environment for running Test Runner ############################## Test: TestRunner: l2cap-tester - PASS - 3.07 seconds Run test-runner with l2cap-tester Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0 ############################## Test: TestRunner: bnep-tester - PASS - 2.15 seconds Run test-runner with bnep-tester Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 ############################## Test: TestRunner: mgmt-tester - PASS - 30.93 seconds Run test-runner with mgmt-tester Total: 433, Passed: 420 (97.0%), Failed: 0, Not Run: 13 ############################## Test: TestRunner: rfcomm-tester - PASS - 2.49 seconds Run test-runner with rfcomm-tester Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0 ############################## Test: TestRunner: sco-tester - PASS - 2.35 seconds Run test-runner with sco-tester Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 ############################## Test: TestRunner: smp-tester - PASS - 2.49 seconds Run test-runner with smp-tester Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 ############################## Test: TestRunner: userchan-tester - PASS - 2.20 seconds Run test-runner with userchan-tester Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0 --- Regards, Linux Bluetooth
Hi Archie, > RTL8822 chipset supports WBS, and this information is conveyed in > btusb.c. However, the UART driver doesn't have this information just > yet. > > Signed-off-by: Archie Pusaka <apusaka@chromium.org> > Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> > > --- > > Changes in v2: > * Add declaration for the case when CONFIG_BT_RTL is not enabled > > drivers/bluetooth/btrtl.c | 26 ++++++++++++++++---------- > drivers/bluetooth/btrtl.h | 7 +++++++ > drivers/bluetooth/hci_h5.c | 5 +---- > 3 files changed, 24 insertions(+), 14 deletions(-) patch has been applied to bluetooth-next tree .. .. however I am not super happy with this. I think it is time that we clean this stuff up. The vendor support for Realtek is getting messy and I don’t like that. Regards Marcel
Hi Marcel, On Thu, 27 May 2021 at 23:22, Marcel Holtmann <marcel@holtmann.org> wrote: > > Hi Archie, > > > RTL8822 chipset supports WBS, and this information is conveyed in > > btusb.c. However, the UART driver doesn't have this information just > > yet. > > > > Signed-off-by: Archie Pusaka <apusaka@chromium.org> > > Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> > > > > --- > > > > Changes in v2: > > * Add declaration for the case when CONFIG_BT_RTL is not enabled > > > > drivers/bluetooth/btrtl.c | 26 ++++++++++++++++---------- > > drivers/bluetooth/btrtl.h | 7 +++++++ > > drivers/bluetooth/hci_h5.c | 5 +---- > > 3 files changed, 24 insertions(+), 14 deletions(-) > > patch has been applied to bluetooth-next tree .. > > .. however I am not super happy with this. I think it is time that we clean this stuff up. The vendor support for Realtek is getting messy and I don’t like that. Thanks for your concern. I will initiate internal discussion to hopefully shape things up. Cheers, Archie
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index e7fe5fb22753..988a09860c6b 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -719,17 +719,8 @@ int btrtl_download_firmware(struct hci_dev *hdev, } EXPORT_SYMBOL_GPL(btrtl_download_firmware); -int btrtl_setup_realtek(struct hci_dev *hdev) +void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev) { - struct btrtl_device_info *btrtl_dev; - int ret; - - btrtl_dev = btrtl_initialize(hdev, NULL); - if (IS_ERR(btrtl_dev)) - return PTR_ERR(btrtl_dev); - - ret = btrtl_download_firmware(hdev, btrtl_dev); - /* Enable controller to do both LE scan and BR/EDR inquiry * simultaneously. */ @@ -750,6 +741,21 @@ int btrtl_setup_realtek(struct hci_dev *hdev) rtl_dev_dbg(hdev, "WBS supported not enabled."); break; } +} +EXPORT_SYMBOL_GPL(btrtl_set_quirks); + +int btrtl_setup_realtek(struct hci_dev *hdev) +{ + struct btrtl_device_info *btrtl_dev; + int ret; + + btrtl_dev = btrtl_initialize(hdev, NULL); + if (IS_ERR(btrtl_dev)) + return PTR_ERR(btrtl_dev); + + ret = btrtl_download_firmware(hdev, btrtl_dev); + + btrtl_set_quirks(hdev, btrtl_dev); btrtl_free(btrtl_dev); return ret; diff --git a/drivers/bluetooth/btrtl.h b/drivers/bluetooth/btrtl.h index 2a582682136d..2c441bda390a 100644 --- a/drivers/bluetooth/btrtl.h +++ b/drivers/bluetooth/btrtl.h @@ -54,6 +54,8 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, void btrtl_free(struct btrtl_device_info *btrtl_dev); int btrtl_download_firmware(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev); +void btrtl_set_quirks(struct hci_dev *hdev, + struct btrtl_device_info *btrtl_dev); int btrtl_setup_realtek(struct hci_dev *hdev); int btrtl_shutdown_realtek(struct hci_dev *hdev); int btrtl_get_uart_settings(struct hci_dev *hdev, @@ -79,6 +81,11 @@ static inline int btrtl_download_firmware(struct hci_dev *hdev, return -EOPNOTSUPP; } +static inline void btrtl_set_quirks(struct hci_dev *hdev, + struct btrtl_device_info *btrtl_dev) +{ +} + static inline int btrtl_setup_realtek(struct hci_dev *hdev) { return -EOPNOTSUPP; diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index 27e96681d583..e0520639f4ba 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c @@ -906,10 +906,7 @@ static int h5_btrtl_setup(struct h5 *h5) /* Give the device some time before the hci-core sends it a reset */ usleep_range(10000, 20000); - /* Enable controller to do both LE scan and BR/EDR inquiry - * simultaneously. - */ - set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &h5->hu->hdev->quirks); + btrtl_set_quirks(h5->hu->hdev, btrtl_dev); out_free: btrtl_free(btrtl_dev);