linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 60824] [PATCH][regression] Cambridge Silicon Radio, Ltd Bluetooth Dongle unusable
Date: Wed, 17 Nov 2021 03:28:44 +0000	[thread overview]
Message-ID: <bug-60824-62941-SQYy4lU1ex@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-60824-62941@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=60824

Reginaldo Coimbra Vieira (recovieira@hotmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |recovieira@hotmail.com

--- Comment #207 from Reginaldo Coimbra Vieira (recovieira@hotmail.com) ---
Hello everyone! Well, I got it and I am going to share my experience with all
of you, guys, and I do hope this is going to be fixed in the kernel soon.

The problem happens when the event HCI_OP_SET_EVENT_FLT (Clear Event Filters)
is triggered. I thought: what would come up if that event did not happen at
all? So, I tried to skip it...

In the file include/net/bluetooth/hci.h, there are a couple of quirks to be
applied against some device. Maybe, a new one could be created to address such
specific problem (e.g.: HCI_QUIRK_CLEAR_EVENT_FAILURE or something like that)
for good practices. Anyways... I have used the quirk
HCI_QUIRK_BROKEN_ERR_DATA_REPORTING that is already used to address other
problems of that same particular driver to address that another problem too.

So, in the file net/bluetooth/hci_core.c, I have changed the function
bredr_setup this way (this is the function that causes that problem that
prevents it from being recognised as a controller):

static void bredr_setup(struct hci_request *req)
{
        __le16 param;
        //__u8 flt_type;        // move this line into the "if" below

        /* Read Buffer Size (ACL mtu, max pkt, etc.) */
        hci_req_add(req, HCI_OP_READ_BUFFER_SIZE, 0, NULL);

        /* Read Class of Device */
        hci_req_add(req, HCI_OP_READ_CLASS_OF_DEV, 0, NULL);

        /* Read Local Name */
        hci_req_add(req, HCI_OP_READ_LOCAL_NAME, 0, NULL);

        /* Read Voice Setting */
        hci_req_add(req, HCI_OP_READ_VOICE_SETTING, 0, NULL);

        /* Read Number of Supported IAC */
        hci_req_add(req, HCI_OP_READ_NUM_SUPPORTED_IAC, 0, NULL);

        /* Read Current IAC LAP */
        hci_req_add(req, HCI_OP_READ_CURRENT_IAC_LAP, 0, NULL);

        // Changed lines by me are below

        //flt_type = HCI_FLT_CLEAR_ALL;         // replaced this line to the
following
        //hci_req_add(req, HCI_OP_SET_EVENT_FLT, 1, &flt_type); // replaced
this line to the following

        /* Clear Event Filters if the device is able to do so */
        if (!test_bit(HCI_QUIRK_BROKEN_ERR_DATA_REPORTING, &req->hdev->quirks))
{
                __u8 flt_type;

                flt_type = HCI_FLT_CLEAR_ALL;
                hci_req_add(req, HCI_OP_SET_EVENT_FLT, 1, &flt_type);
        }

        // Change ends here

        /* Connection accept timeout ~20 secs */
        param = cpu_to_le16(0x7d00);
        hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, &param);
}

Then, I just compile that driver from the /usr/src folder, copy the
/pathToTheChangedKernel/net/bluetooth/bluetooth.ko to
/lib/modules/kernel/extra/bluetooth.ko and run the depmod. Change the paths
below accordingly to where the source of your system kernel and your changed
kernel are.

# cd /usr/src/kernels/5.14.17.x86_64
# make M=/pathToTheChangedKernel/net/bluetooth bluetooth.ko
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/af_bluetooth.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/hci_core.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/hci_conn.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/hci_event.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/mgmt.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/hci_sock.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/hci_sysfs.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/l2cap_core.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/l2cap_sock.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/smp.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/lib.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/ecdh_helper.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/hci_request.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/mgmt_util.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/mgmt_config.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/sco.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/leds.o
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/msft.o
  LD [M]  /kernel/5.14.17.x86_64/net/bluetooth/bluetooth.o
  MODPOST /kernel/5.14.17.x86_64/net/bluetooth/Module.symvers
  CC [M]  /kernel/5.14.17.x86_64/net/bluetooth/bluetooth.mod.o
  LD [M]  /kernel/5.14.17.x86_64/net/bluetooth/bluetooth.ko
  BTF [M] /kernel/5.14.17.x86_64/net/bluetooth/bluetooth.ko

# cp /pathToTheChangedKernel/net/bluetooth/bluetooth.ko
/lib/modules/5.14.17.x86_64/extra/bluetooth.ko
# depmod -aeF /boot/System.map 5.14.17.x86_64

The warning below still appears in the log, but it has not represented any
negative impact at all for me:

Bluetooth: hci0: CSR: Failed to suspend the device for our Barrot 8041a02
receive-issue workaround

For me, it is working perfectly from that change on. Woohoo!!! I do hope some
snippet code like that one would be inserted into the kernel soon.

I do hope that it works perfectly for you too and let's get some pint of beer
to celebrate. It did not beat us. We all beat it instead! Please, give me
feedback :)

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2021-11-17  3:28 UTC|newest]

Thread overview: 197+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-60824-62941@https.bugzilla.kernel.org/>
2019-06-24 14:43 ` [Bug 60824] [PATCH][regression] Cambridge Silicon Radio, Ltd Bluetooth Dongle unusable bugzilla-daemon
2019-06-24 17:12 ` bugzilla-daemon
2019-06-25 16:15 ` bugzilla-daemon
2019-08-01  1:56 ` bugzilla-daemon
2019-08-15  5:54 ` bugzilla-daemon
2019-08-17  4:52 ` bugzilla-daemon
2019-08-17 22:42 ` bugzilla-daemon
2019-08-18  1:45 ` bugzilla-daemon
2019-08-20  4:49 ` bugzilla-daemon
2019-09-11 18:20 ` bugzilla-daemon
2019-09-16  7:30 ` bugzilla-daemon
2019-09-16 11:12 ` bugzilla-daemon
2019-10-13 17:25 ` bugzilla-daemon
2019-10-15 21:00 ` bugzilla-daemon
2019-11-03  9:12 ` bugzilla-daemon
2019-12-06 19:36 ` bugzilla-daemon
2019-12-10  4:54 ` bugzilla-daemon
2020-01-17  6:29 ` bugzilla-daemon
2020-01-17  6:50 ` bugzilla-daemon
2020-01-25 14:52 ` bugzilla-daemon
2020-02-07 15:31 ` bugzilla-daemon
2020-02-07 16:50 ` bugzilla-daemon
2020-02-07 17:00 ` bugzilla-daemon
2020-02-07 17:24 ` bugzilla-daemon
2020-02-13 19:59 ` bugzilla-daemon
2020-02-15 20:59 ` bugzilla-daemon
2020-02-15 21:01 ` bugzilla-daemon
2020-04-06 19:43 ` bugzilla-daemon
2020-04-23 17:17 ` bugzilla-daemon
2020-04-24 13:14 ` bugzilla-daemon
2020-05-02 21:54 ` bugzilla-daemon
2020-05-03  0:52 ` bugzilla-daemon
2020-05-09  6:15 ` bugzilla-daemon
2020-05-10 14:50 ` bugzilla-daemon
2020-05-10 15:15 ` bugzilla-daemon
2020-05-10 16:14 ` bugzilla-daemon
2020-05-10 18:53 ` bugzilla-daemon
2020-06-21 20:30 ` bugzilla-daemon
2020-06-24  2:44 ` bugzilla-daemon
2020-06-24 14:03 ` bugzilla-daemon
2020-06-24 16:48 ` bugzilla-daemon
2020-06-24 17:23 ` bugzilla-daemon
2020-06-24 18:42 ` bugzilla-daemon
2020-06-24 21:37 ` bugzilla-daemon
2020-06-24 21:44 ` bugzilla-daemon
2020-06-25  0:04 ` bugzilla-daemon
2020-06-25  7:34 ` bugzilla-daemon
2020-06-25 11:16 ` bugzilla-daemon
2020-07-18 19:16 ` bugzilla-daemon
2020-07-18 21:39 ` bugzilla-daemon
2020-07-19  1:50 ` bugzilla-daemon
2020-07-20 21:13 ` bugzilla-daemon
2020-07-24 15:43 ` bugzilla-daemon
2020-07-24 15:46 ` bugzilla-daemon
2020-07-26 21:26 ` bugzilla-daemon
2020-07-27  4:16 ` bugzilla-daemon
2020-07-27  5:53 ` bugzilla-daemon
2020-08-03  8:05 ` bugzilla-daemon
2020-08-03  8:18 ` bugzilla-daemon
2020-08-03  8:27 ` bugzilla-daemon
2020-08-03  8:28 ` bugzilla-daemon
2020-08-03  8:29 ` bugzilla-daemon
2020-08-03  8:47 ` bugzilla-daemon
2020-08-03  9:03 ` bugzilla-daemon
2020-08-03  9:08 ` bugzilla-daemon
2020-08-03  9:08 ` bugzilla-daemon
2020-08-03 14:54 ` bugzilla-daemon
2020-08-10 22:35 ` bugzilla-daemon
2020-08-13 19:32 ` bugzilla-daemon
2020-08-15  0:16 ` bugzilla-daemon
2020-08-18 22:53 ` bugzilla-daemon
2020-08-20  5:43 ` bugzilla-daemon
2020-08-22 14:39 ` bugzilla-daemon
2020-08-23  6:58 ` bugzilla-daemon
2020-08-25 15:17 ` bugzilla-daemon
2020-08-26 17:08 ` bugzilla-daemon
2020-09-01 19:39 ` bugzilla-daemon
2020-09-02  2:28 ` bugzilla-daemon
2020-09-09 14:12 ` bugzilla-daemon
2020-09-12 15:54 ` bugzilla-daemon
2020-09-23 14:06 ` bugzilla-daemon
2020-09-27 12:45 ` bugzilla-daemon
2020-10-16 21:46 ` bugzilla-daemon
2020-10-29  0:26 ` bugzilla-daemon
2020-11-10 14:06 ` bugzilla-daemon
2020-11-18  2:21 ` bugzilla-daemon
2020-11-26 20:03 ` bugzilla-daemon
2020-12-12 14:43 ` bugzilla-daemon
2020-12-21  4:35 ` bugzilla-daemon
2021-01-20  8:52 ` bugzilla-daemon
2021-01-22 13:25 ` bugzilla-daemon
2021-01-22 13:45 ` bugzilla-daemon
2021-01-22 15:50 ` bugzilla-daemon
2021-01-22 16:19 ` bugzilla-daemon
2021-01-31 15:47 ` bugzilla-daemon
2021-05-06  3:33 ` bugzilla-daemon
2021-05-06  8:38 ` bugzilla-daemon
2021-05-06 13:40 ` bugzilla-daemon
2021-05-17  9:59 ` bugzilla-daemon
2021-05-17 11:36 ` bugzilla-daemon
2021-05-17 13:55 ` bugzilla-daemon
2021-05-17 22:39 ` bugzilla-daemon
2021-05-17 22:46 ` bugzilla-daemon
2021-05-17 23:11 ` bugzilla-daemon
2021-05-30  1:09 ` bugzilla-daemon
2021-06-24 11:43 ` bugzilla-daemon
2021-07-29 22:12 ` bugzilla-daemon
2021-08-02 18:12 ` bugzilla-daemon
2021-08-07 21:16 ` bugzilla-daemon
2021-08-12 14:27 ` bugzilla-daemon
2021-08-12 14:51 ` bugzilla-daemon
2021-08-12 18:16 ` bugzilla-daemon
2021-08-13  3:39 ` bugzilla-daemon
2021-08-13 11:09 ` bugzilla-daemon
2021-08-14 23:30 ` bugzilla-daemon
2021-08-15  5:28 ` bugzilla-daemon
2021-08-16  6:39 ` bugzilla-daemon
2021-09-08 22:40 ` bugzilla-daemon
2021-09-08 23:36 ` bugzilla-daemon
2021-09-09  0:02 ` bugzilla-daemon
2021-09-10  7:37 ` bugzilla-daemon
2021-09-24  3:11 ` bugzilla-daemon
2021-11-03  1:20 ` bugzilla-daemon
2021-11-03  1:25 ` bugzilla-daemon
2021-11-03 17:56 ` bugzilla-daemon
2021-11-07 19:22 ` bugzilla-daemon
2021-11-17  3:28 ` bugzilla-daemon [this message]
2022-01-01 15:32 ` bugzilla-daemon
2022-01-01 16:10 ` bugzilla-daemon
2022-01-01 18:12 ` bugzilla-daemon
2022-01-01 18:55 ` bugzilla-daemon
2022-01-01 21:00 ` bugzilla-daemon
2022-01-01 21:01 ` bugzilla-daemon
2022-01-02  2:54 ` bugzilla-daemon
2022-01-02  9:33 ` bugzilla-daemon
2022-01-06 16:55 ` bugzilla-daemon
2022-01-18 12:19 ` bugzilla-daemon
2022-01-22  5:05 ` bugzilla-daemon
2022-01-24  3:44 ` bugzilla-daemon
2022-01-27 20:16 ` bugzilla-daemon
2022-02-03 21:18 ` bugzilla-daemon
2022-03-05  7:07 ` bugzilla-daemon
2022-03-10 18:25 ` bugzilla-daemon
2022-03-12 21:53 ` bugzilla-daemon
2022-03-30 14:57 ` bugzilla-daemon
2022-03-30 16:49 ` bugzilla-daemon
2022-03-30 16:49 ` bugzilla-daemon
2022-04-19  3:01 ` bugzilla-daemon
2022-10-08 23:44 ` bugzilla-daemon
2022-10-11  6:53 ` bugzilla-daemon
2022-10-11 13:21 ` bugzilla-daemon
2022-10-15 17:59 ` bugzilla-daemon
2022-10-15 18:02 ` bugzilla-daemon
2022-10-15 19:12 ` bugzilla-daemon
2022-10-15 19:43 ` bugzilla-daemon
2022-10-27  9:59 ` bugzilla-daemon
2022-10-28  2:59 ` bugzilla-daemon
2022-10-28  8:44 ` bugzilla-daemon
2022-10-29 14:43 ` bugzilla-daemon
2022-10-29 20:39 ` bugzilla-daemon
2022-10-30 10:45 ` bugzilla-daemon
2022-10-30 10:49 ` bugzilla-daemon
2022-10-30 11:43 ` bugzilla-daemon
2022-10-30 12:52 ` bugzilla-daemon
2022-10-31  3:03 ` bugzilla-daemon
2022-10-31 11:00 ` bugzilla-daemon
2022-10-31 11:09 ` bugzilla-daemon
2022-10-31 12:47 ` bugzilla-daemon
2022-10-31 12:56 ` bugzilla-daemon
2022-10-31 13:11 ` bugzilla-daemon
2022-10-31 13:21 ` bugzilla-daemon
2022-10-31 14:12 ` bugzilla-daemon
2022-11-01  3:14 ` bugzilla-daemon
2022-11-13 17:22 ` bugzilla-daemon
2022-11-22  2:56 ` bugzilla-daemon
2022-11-22  8:00 ` bugzilla-daemon
2022-11-25  2:45 ` bugzilla-daemon
2022-12-11 15:37 ` bugzilla-daemon
2022-12-12 15:55 ` bugzilla-daemon
2022-12-23 18:36 ` bugzilla-daemon
2022-12-23 18:42 ` bugzilla-daemon
2022-12-23 22:33 ` bugzilla-daemon
2023-02-08 15:30 ` bugzilla-daemon
2023-02-24 22:05 ` bugzilla-daemon
2023-02-26  0:15 ` bugzilla-daemon
2023-03-08 20:43 ` bugzilla-daemon
2023-04-20 17:35 ` bugzilla-daemon
2023-04-20 18:15   ` [Bug,60824,regression] " bluez.test.bot
2023-06-25 15:31 ` [Bug 60824] [PATCH][regression] " bugzilla-daemon
2023-07-14 14:58 ` bugzilla-daemon
2023-07-14 15:07 ` bugzilla-daemon
2023-07-27 19:23 ` bugzilla-daemon
2023-10-17 12:18 ` bugzilla-daemon
2023-12-27 14:54 ` bugzilla-daemon
2024-02-11 13:59 ` bugzilla-daemon
2024-02-22 19:59 ` bugzilla-daemon
2024-02-23 16:45 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-60824-62941-SQYy4lU1ex@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).