2015-01-10 21:40:04

by Reinhard Speyerer

[permalink] [raw]
Subject: [RFC] make Belkin F8T013 devices work again by adding BTUSB_BROKEN_STORED_LINK_KEY flag

Hi,

when trying to use a Belkin F8T013 Bluetooth adapter with Knoppix 7.4.2 (which
uses BlueZ 5.21 and Linux kernel 3.16.3) I noticed that it could no longer be
initialized correctly (hciconfig state DOWN). This adapter used to work with
Knoppix 6.7.1 (which uses BlueZ 4.96 and Linux kernel 3.0.4).

When looking at the corresponding btmon log it can be seen that initialization
fails at

< HCI Command: Delete Stored Link Key (0x03|0x0012) plen 7 [hci0] 1.041907
Address: 00:00:00:00:00:00 (OUI 00-00-00)
Delete all: 0x01
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 1.045129
Delete Stored Link Key (0x03|0x0012) ncmd 1
Status: Unsupported Feature or Parameter Value (0x11)

although it claims to support Delete Stored Link Key according to the Read
Local Supported Commands output.

Adding a BTUSB_BROKEN_STORED_LINK_KEY flag for the Belkin F8T013 adapter which
sets the HCI_QUIRK_BROKEN_STORED_LINK_KEY quirk in btusb_probe made the
adapter work again for me:

# hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: <BDADDR> ACL MTU: 1017:8 SCO MTU: 64:8
UP RUNNING
RX bytes:1034 acl:0 sco:0 events:25 errors:0
TX bytes:90 acl:0 sco:0 commands:25 errors:0
Features: 0xff 0xfb 0x8d 0xfe 0x9f 0xf9 0x00 0x80
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'Belkin Bluetooth Device'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 2.0 (0x3) Revision: 0x2073
LMP Version: 2.0 (0x3) Subversion: 0x410e
Manufacturer: Broadcom Corporation (15)

# hciconfig hci0 revision
hci0: Type: BR/EDR Bus: USB
BD Address: <BDADDR> ACL MTU: 1017:8 SCO MTU: 64:8
Firmware 115.65 / 14

Please tell me whether the patch below would be acceptable to make this
Bluetooth adapter work again with Linux. If yes on which Linux kernel version
should it be based to take the current BTUSB_* flag list into account?

Regards,
Reinhard

--- drivers/bluetooth/btusb.c-std 2014-08-04 00:25:02.000000000 +0200
+++ drivers/bluetooth/btusb.c 2015-01-10 21:34:17.838942903 +0100
@@ -50,6 +50,7 @@ static struct usb_driver btusb_driver;
#define BTUSB_ATH3012 0x80
#define BTUSB_INTEL 0x100
#define BTUSB_BCM_PATCHRAM 0x200
+#define BTUSB_BROKEN_STORED_LINK_KEY 0x400

static const struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
@@ -208,7 +209,8 @@ static const struct usb_device_id blackl

/* Belkin F8T012 and F8T013 devices */
{ USB_DEVICE(0x050d, 0x0012), .driver_info = BTUSB_WRONG_SCO_MTU },
- { USB_DEVICE(0x050d, 0x0013), .driver_info = BTUSB_WRONG_SCO_MTU },
+ { USB_DEVICE(0x050d, 0x0013),
+ .driver_info = BTUSB_WRONG_SCO_MTU | BTUSB_BROKEN_STORED_LINK_KEY },

/* Asus WL-BTD202 device */
{ USB_DEVICE(0x0b05, 0x1715), .driver_info = BTUSB_WRONG_SCO_MTU },
@@ -1655,6 +1657,10 @@ static int btusb_probe(struct usb_interf
if (id->driver_info & BTUSB_BROKEN_ISOC)
data->isoc = NULL;

+ if (id->driver_info & BTUSB_BROKEN_STORED_LINK_KEY) {
+ set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
+ }
+
if (id->driver_info & BTUSB_DIGIANSWER) {
data->cmdreq_type = USB_TYPE_VENDOR;
set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);


2015-01-12 21:32:47

by Reinhard Speyerer

[permalink] [raw]
Subject: Re: [RFC] make Belkin F8T013 devices work again by adding BTUSB_BROKEN_STORED_LINK_KEY flag

Marcel Holtmann <[email protected]> wrote:

>
> I wonder if we should issue Read Stored Link Key command and only try to clear all link keys if there are actual link key stored in the first place. Maybe this is what the command is complaining about.
>
> Read all stored link keys:
>
> hcitool cmd 0x03 0x000d 0x00 0x00 0x00 0x00 0x00 0x00 0x01
>
> What does this actually return.

Hi Marcel,

although not listed in "hciconfig hci0 commands" output Read Stored Link Key
returns Status: 0x11 instead of Invalid HCI command according to btmon:

# hcitool cmd 0x03 0x000d 0x00 0x00 0x00 0x00 0x00 0x00 0x01
< HCI Command: ogf 0x03, ocf 0x000d, plen 7
00 00 00 00 00 00 01
> HCI Event: 0x0e plen 4
01 0D 0C 11

> It seems it does not even support the Read Stored Link Key command. Can you include /sys/kernel/debug/usb/devices from this dongle.

T: Bus=05 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=050d ProdID=0013 Rev= 0.00
S: Manufacturer=Broadcom Corp
S: Product=Belkin Bluetooth Device
C:* #Ifs= 4 Cfg#= 1 Atr=a0 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
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)

Regards,
Reinhard

2015-01-11 20:56:18

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [RFC] make Belkin F8T013 devices work again by adding BTUSB_BROKEN_STORED_LINK_KEY flag

Hi Reinhard,

>> can you run "hciconfig hci0 commands" and see if the Delete Stored Link Key command is actually listed. If this is a real Broadcom dongle (and not a fake one), then it used to have this listed correctly.
>>
>> What concerns me a bit is that it uses error 0x11 and not just responds with Invalid HCI command.
>>
>
> according to the "hciconfig hci0 commands" output attached below it seems to
> be a real Broadcom dongle as the Delete Stored Link Key command is listed.

actually this makes me even more suspicious. The fake dongles pretend to be Broadcom or CSR, but if you crack open the chip, they are not.

>> However I am not a big fan of manually marking each core quirk as .driver_info. That would easily get out of hand at some point.
>>
>
> Since so far only one type of Broadcom-based dongles seems to be affected by
> this an alternative (at the price of having the USB VID/PID repeated) would
> be to enable the quirk directly in btusb_probe().
>
> --- drivers/bluetooth/btusb.c-std 2014-08-04 00:25:02.000000000 +0200
> +++ drivers/bluetooth/btusb.c 2015-01-11 18:41:21.502229549 +0100
> @@ -1683,6 +1683,11 @@ static int btusb_probe(struct usb_interf
> data->isoc = NULL;
> }
>
> + /* Belkin F8T013 responds to Delete Stored Link Key with Status 0x11 */
> + if (data->udev->descriptor.idVendor == cpu_to_le16(0x050d) &&
> + data->udev->descriptor.idProduct == cpu_to_le16(0x0013))
> + set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
> +
> if (data->isoc) {
> err = usb_driver_claim_interface(&btusb_driver,
> data->isoc, data);

This is even worse. We are not doing this. We are limiting the vendor and product id expose to the matching and blacklist tables.

I wonder if we should issue Read Stored Link Key command and only try to clear all link keys if there are actual link key stored in the first place. Maybe this is what the command is complaining about.

Read all stored link keys:

hcitool cmd 0x03 0x000d 0x00 0x00 0x00 0x00 0x00 0x00 0x01

What does this actually return.

>
>> Maybe it would be better to see if Belkin Windows driver comes with a firmware in either .hex or .hcd format and we can just patch this broken device (if it is actually broken).
>>
>
> Unfortunately the CD that came with it does not contain a firmware in the
> above formats.
>
> Regards,
> Reinhard
>
> # hciconfig hci0 commands
> hci0: Type: BR/EDR Bus: USB
> BD Address: <BDADDR> ACL MTU: 1017:8 SCO MTU: 64:8
> Commands: Octet 0 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 1 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 2 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 3 = 0x03 (Bit 0 1)
> Octet 4 = 0xfe (Bit 1 2 3 4 5 6 7)
> Octet 5 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 6 = 0xcf (Bit 0 1 2 3 6 7)
> Octet 7 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 8 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 9 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 10 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 11 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 12 = 0x03 (Bit 0 1)
> Octet 14 = 0xf8 (Bit 3 4 5 6 7)
> Octet 15 = 0xff (Bit 0 1 2 3 4 5 6 7)
> Octet 16 = 0x07 (Bit 0 1 2)
> 'Inquiry' 'Inquiry Cancel' 'Periodic Inquiry Mode'
> 'Exit Periodic Inquiry Mode' 'Create Connection' 'Disconnect'
> 'Add SCO Connection' 'Cancel Create Connection'
> 'Accept Connection Request' 'Reject Connection Request'
> 'Link Key Request Reply' 'Link Key Request Negative Reply'
> 'PIN Code Request Reply' 'PIN Code Request Negative Reply'
> 'Change Connection Packet Type' 'Authentication Requested'
> 'Set Connection Encryption' 'Change Connection Link Key'
> 'Master Link Key' 'Remote Name Request' 'Cancel Remote Name Request'
> 'Read Remote Supported Features' 'Read Remote Extended Features'
> 'Read Remote Version Information' 'Read Clock Offset'
> 'Read LMP Handle' 'Hold Mode' 'Sniff Mode' 'Exit Sniff Mode'
> 'Park State' 'Exit Park State' 'QoS Setup' 'Role Discovery'
> 'Switch Role' 'Read Link Policy Settings' 'Write Link Policy Settings'
> 'Read Default Link Policy Settings'
> 'Write Default Link Policy Settings' 'Flow Specification'
> 'Set Event Mask' 'Reset' 'Set Event Filter' 'Flush' 'Read PIN Type'
> 'Write PIN Type' 'Write Stored Link Key' 'Delete Stored Link Key'
> 'Write Local Name' 'Read Local Name' 'Read Connection Accept Timeout'
> 'Write Connection Accept Timeout' 'Read Page Timeout'
> 'Write Page Timeout' 'Read Scan Enable' 'Write Scan Enable'
> 'Read Page Scan Activity' 'Write Page Scan Activity'
> 'Read Inquiry Scan Activity' 'Write Inquiry Scan Activity'
> 'Read Authentication Enable' 'Write Authentication Enable'
> 'Read Encryption Mode' 'Write Encryption Mode' 'Read Class Of Device'
> 'Write Class Of Device' 'Read Voice Setting' 'Write Voice Setting'
> 'Read Automatic Flush Timeout' 'Write Automatic Flush Timeout'
> 'Read Num Broadcast Retransmissions'
> 'Write Num Broadcast Retransmissions' 'Read Hold Mode Activity'
> 'Write Hold Mode Activity' 'Read Transmit Power Level'
> 'Read Synchronous Flow Control Enable'
> 'Write Synchronous Flow Control Enable'
> 'Set Host Controller To Host Flow Control' 'Host Buffer Size'
> 'Host Number Of Completed Packets' 'Read Link Supervision Timeout'
> 'Write Link Supervision Timeout' 'Read Number of Supported IAC'
> 'Read Current IAC LAP' 'Write Current IAC LAP'
> 'Read Page Scan Period Mode' 'Write Page Scan Period Mode'
> 'Read Page Scan Mode' 'Write Page Scan Mode'
> 'Set AFH Channel Classification' 'Read Local Version Information'
> 'Read Local Supported Commands' 'Read Local Supported Features'
> 'Read Local Extended Features' 'Read Buffer Size' 'Read Country Code'
> 'Read BD ADDR' 'Read Failed Contact Counter'
> 'Reset Failed Contact Counter' 'Get Link Quality' 'Read RSSI'
> 'Read AFH Channel Map' 'Read BD Clock' 'Read Loopback Mode'
> 'Write Loopback Mode' 'Enable Device Under Test Mode'

It seems it does not even support the Read Stored Link Key command. Can you include /sys/kernel/debug/usb/devices from this dongle.

Regards

Marcel


2015-01-11 18:45:13

by Reinhard Speyerer

[permalink] [raw]
Subject: Re: [RFC] make Belkin F8T013 devices work again by adding BTUSB_BROKEN_STORED_LINK_KEY flag

Marcel Holtmann <[email protected]> wrote:

>
> can you run "hciconfig hci0 commands" and see if the Delete Stored Link Key command is actually listed. If this is a real Broadcom dongle (and not a fake one), then it used to have this listed correctly.
>
> What concerns me a bit is that it uses error 0x11 and not just responds with Invalid HCI command.
>

Hi Marcel,

according to the "hciconfig hci0 commands" output attached below it seems to
be a real Broadcom dongle as the Delete Stored Link Key command is listed.

>
> However I am not a big fan of manually marking each core quirk as .driver_info. That would easily get out of hand at some point.
>

Since so far only one type of Broadcom-based dongles seems to be affected by
this an alternative (at the price of having the USB VID/PID repeated) would
be to enable the quirk directly in btusb_probe().

--- drivers/bluetooth/btusb.c-std 2014-08-04 00:25:02.000000000 +0200
+++ drivers/bluetooth/btusb.c 2015-01-11 18:41:21.502229549 +0100
@@ -1683,6 +1683,11 @@ static int btusb_probe(struct usb_interf
data->isoc = NULL;
}

+ /* Belkin F8T013 responds to Delete Stored Link Key with Status 0x11 */
+ if (data->udev->descriptor.idVendor == cpu_to_le16(0x050d) &&
+ data->udev->descriptor.idProduct == cpu_to_le16(0x0013))
+ set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
+
if (data->isoc) {
err = usb_driver_claim_interface(&btusb_driver,
data->isoc, data);

> Maybe it would be better to see if Belkin Windows driver comes with a firmware in either .hex or .hcd format and we can just patch this broken device (if it is actually broken).
>

Unfortunately the CD that came with it does not contain a firmware in the
above formats.

Regards,
Reinhard

# hciconfig hci0 commands
hci0: Type: BR/EDR Bus: USB
BD Address: <BDADDR> ACL MTU: 1017:8 SCO MTU: 64:8
Commands: Octet 0 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 1 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 2 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 3 = 0x03 (Bit 0 1)
Octet 4 = 0xfe (Bit 1 2 3 4 5 6 7)
Octet 5 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 6 = 0xcf (Bit 0 1 2 3 6 7)
Octet 7 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 8 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 9 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 10 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 11 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 12 = 0x03 (Bit 0 1)
Octet 14 = 0xf8 (Bit 3 4 5 6 7)
Octet 15 = 0xff (Bit 0 1 2 3 4 5 6 7)
Octet 16 = 0x07 (Bit 0 1 2)
'Inquiry' 'Inquiry Cancel' 'Periodic Inquiry Mode'
'Exit Periodic Inquiry Mode' 'Create Connection' 'Disconnect'
'Add SCO Connection' 'Cancel Create Connection'
'Accept Connection Request' 'Reject Connection Request'
'Link Key Request Reply' 'Link Key Request Negative Reply'
'PIN Code Request Reply' 'PIN Code Request Negative Reply'
'Change Connection Packet Type' 'Authentication Requested'
'Set Connection Encryption' 'Change Connection Link Key'
'Master Link Key' 'Remote Name Request' 'Cancel Remote Name Request'
'Read Remote Supported Features' 'Read Remote Extended Features'
'Read Remote Version Information' 'Read Clock Offset'
'Read LMP Handle' 'Hold Mode' 'Sniff Mode' 'Exit Sniff Mode'
'Park State' 'Exit Park State' 'QoS Setup' 'Role Discovery'
'Switch Role' 'Read Link Policy Settings' 'Write Link Policy Settings'
'Read Default Link Policy Settings'
'Write Default Link Policy Settings' 'Flow Specification'
'Set Event Mask' 'Reset' 'Set Event Filter' 'Flush' 'Read PIN Type'
'Write PIN Type' 'Write Stored Link Key' 'Delete Stored Link Key'
'Write Local Name' 'Read Local Name' 'Read Connection Accept Timeout'
'Write Connection Accept Timeout' 'Read Page Timeout'
'Write Page Timeout' 'Read Scan Enable' 'Write Scan Enable'
'Read Page Scan Activity' 'Write Page Scan Activity'
'Read Inquiry Scan Activity' 'Write Inquiry Scan Activity'
'Read Authentication Enable' 'Write Authentication Enable'
'Read Encryption Mode' 'Write Encryption Mode' 'Read Class Of Device'
'Write Class Of Device' 'Read Voice Setting' 'Write Voice Setting'
'Read Automatic Flush Timeout' 'Write Automatic Flush Timeout'
'Read Num Broadcast Retransmissions'
'Write Num Broadcast Retransmissions' 'Read Hold Mode Activity'
'Write Hold Mode Activity' 'Read Transmit Power Level'
'Read Synchronous Flow Control Enable'
'Write Synchronous Flow Control Enable'
'Set Host Controller To Host Flow Control' 'Host Buffer Size'
'Host Number Of Completed Packets' 'Read Link Supervision Timeout'
'Write Link Supervision Timeout' 'Read Number of Supported IAC'
'Read Current IAC LAP' 'Write Current IAC LAP'
'Read Page Scan Period Mode' 'Write Page Scan Period Mode'
'Read Page Scan Mode' 'Write Page Scan Mode'
'Set AFH Channel Classification' 'Read Local Version Information'
'Read Local Supported Commands' 'Read Local Supported Features'
'Read Local Extended Features' 'Read Buffer Size' 'Read Country Code'
'Read BD ADDR' 'Read Failed Contact Counter'
'Reset Failed Contact Counter' 'Get Link Quality' 'Read RSSI'
'Read AFH Channel Map' 'Read BD Clock' 'Read Loopback Mode'
'Write Loopback Mode' 'Enable Device Under Test Mode'

2015-01-10 21:55:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [RFC] make Belkin F8T013 devices work again by adding BTUSB_BROKEN_STORED_LINK_KEY flag

Hi Reinhard,

> when trying to use a Belkin F8T013 Bluetooth adapter with Knoppix 7.4.2 (which
> uses BlueZ 5.21 and Linux kernel 3.16.3) I noticed that it could no longer be
> initialized correctly (hciconfig state DOWN). This adapter used to work with
> Knoppix 6.7.1 (which uses BlueZ 4.96 and Linux kernel 3.0.4).
>
> When looking at the corresponding btmon log it can be seen that initialization
> fails at
>
> < HCI Command: Delete Stored Link Key (0x03|0x0012) plen 7 [hci0] 1.041907
> Address: 00:00:00:00:00:00 (OUI 00-00-00)
> Delete all: 0x01
>> HCI Event: Command Complete (0x0e) plen 4 [hci0] 1.045129
> Delete Stored Link Key (0x03|0x0012) ncmd 1
> Status: Unsupported Feature or Parameter Value (0x11)
>
> although it claims to support Delete Stored Link Key according to the Read
> Local Supported Commands output.
>
> Adding a BTUSB_BROKEN_STORED_LINK_KEY flag for the Belkin F8T013 adapter which
> sets the HCI_QUIRK_BROKEN_STORED_LINK_KEY quirk in btusb_probe made the
> adapter work again for me:
>
> # hciconfig -a
> hci0: Type: BR/EDR Bus: USB
> BD Address: <BDADDR> ACL MTU: 1017:8 SCO MTU: 64:8
> UP RUNNING
> RX bytes:1034 acl:0 sco:0 events:25 errors:0
> TX bytes:90 acl:0 sco:0 commands:25 errors:0
> Features: 0xff 0xfb 0x8d 0xfe 0x9f 0xf9 0x00 0x80
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: RSWITCH HOLD SNIFF PARK
> Link mode: SLAVE ACCEPT
> Name: 'Belkin Bluetooth Device'
> Class: 0x000000
> Service Classes: Unspecified
> Device Class: Miscellaneous,
> HCI Version: 2.0 (0x3) Revision: 0x2073
> LMP Version: 2.0 (0x3) Subversion: 0x410e
> Manufacturer: Broadcom Corporation (15)
>
> # hciconfig hci0 revision
> hci0: Type: BR/EDR Bus: USB
> BD Address: <BDADDR> ACL MTU: 1017:8 SCO MTU: 64:8
> Firmware 115.65 / 14

can you run "hciconfig hci0 commands" and see if the Delete Stored Link Key command is actually listed. If this is a real Broadcom dongle (and not a fake one), then it used to have this listed correctly.

What concerns me a bit is that it uses error 0x11 and not just responds with Invalid HCI command.

> Please tell me whether the patch below would be acceptable to make this
> Bluetooth adapter work again with Linux. If yes on which Linux kernel version
> should it be based to take the current BTUSB_* flag list into account?
>
> Regards,
> Reinhard
>
> --- drivers/bluetooth/btusb.c-std 2014-08-04 00:25:02.000000000 +0200
> +++ drivers/bluetooth/btusb.c 2015-01-10 21:34:17.838942903 +0100
> @@ -50,6 +50,7 @@ static struct usb_driver btusb_driver;
> #define BTUSB_ATH3012 0x80
> #define BTUSB_INTEL 0x100
> #define BTUSB_BCM_PATCHRAM 0x200
> +#define BTUSB_BROKEN_STORED_LINK_KEY 0x400
>
> static const struct usb_device_id btusb_table[] = {
> /* Generic Bluetooth USB device */
> @@ -208,7 +209,8 @@ static const struct usb_device_id blackl
>
> /* Belkin F8T012 and F8T013 devices */
> { USB_DEVICE(0x050d, 0x0012), .driver_info = BTUSB_WRONG_SCO_MTU },
> - { USB_DEVICE(0x050d, 0x0013), .driver_info = BTUSB_WRONG_SCO_MTU },
> + { USB_DEVICE(0x050d, 0x0013),
> + .driver_info = BTUSB_WRONG_SCO_MTU | BTUSB_BROKEN_STORED_LINK_KEY },
>
> /* Asus WL-BTD202 device */
> { USB_DEVICE(0x0b05, 0x1715), .driver_info = BTUSB_WRONG_SCO_MTU },
> @@ -1655,6 +1657,10 @@ static int btusb_probe(struct usb_interf
> if (id->driver_info & BTUSB_BROKEN_ISOC)
> data->isoc = NULL;
>
> + if (id->driver_info & BTUSB_BROKEN_STORED_LINK_KEY) {
> + set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
> + }
> +

No { } for single line blocks.

However I am not a big fan of manually marking each core quirk as .driver_info. That would easily get out of hand at some point.

Maybe it would be better to see if Belkin Windows driver comes with a firmware in either .hex or .hcd format and we can just patch this broken device (if it is actually broken).

Regards

Marcel