Skip to contentSkip to conversation

Bluetooth: btusb: add one more device to fixed Invalid initialization bug for kernel since 3.x

PATCH Superseded Aleksey 3 participants 5 messages May 7, 2015 – May 15, 2015 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Aleksey

author
#0 lore raw

PATCH 1/1 Bluetooth: btusb: add one more device to fixed Invalid initialization bug for kernel since 3.x

In "Roper Class 1 Bluetooth Dongle" since 3.x kernel preset bug with invalid device initialization.

In earlyer version
$> hciconfig hci0 up
Can't init device hci0: Connection timed out (110)

In new kernel
$> hciconfig hci0 up
Can't init device hci0: Invalid request code (56)

with my device

[    3.359071] usb 5-1: New USB device found, idVendor=1310, idProduct=0001
[    3.359075] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.359078] usb 5-1: Product: SiW
[    3.359080] usb 5-1: Manufacturer: SiW
[    3.359083] usb 5-1: SerialNumber: E7BB050D0B00

Full diskussion about that problem present in https://bugzilla.kernel.org/show_bug.cgi?id=60901 "- [PATCH]Roper Class 1 Bluetooth Dongle / TRENDnet TBW-102UB not working with all kernel 3.x tested"

After "Introducing HCI_QUIRK_BROKEN_LOCAL_COMMANDS constant" from Marcel Holtmann that bug been proper fixed, but my "Silicon Wave based" device not been included in list with BTUSB_SWAVE.

Don't know about other device - i have only one dongle with that problem, but adding BTUSB_SWAVE to driver_info for my 0x1310, 0x0001 dongle full fixed that problem, and now my device can bee in UP state..

More over, i check http://www.linux-usb.org/usb-ids.html and not find 1300 device - i find only "1310 Name: Roper"

I think, what used 0x1300 wrong and meant actually 0x1310

If belive a bug "stopped work bluetooth" https://bugzilla.kernel.org/show_bug.cgi?id=51831 in "all worked" karnel 2.6.38 i can't fined 1300, But 1310 in this kernel works well.

---
 drivers/bluetooth/btusb.c | 1+-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btusb.c renamed from drivers/bluetooth/btusb.c.orig +1 -1
diff -up linux-4.0.0-gentoo/drivers/bluetooth/btusb.c.orig linux-4.0.0-gentoo/drivers/bluetooth/btusb.c 
@@ -254,6 +254,6 @@ static const struct usb_device_id blackl
 
 	/* Roper Class 1 Bluetooth Dongle (Silicon Wave based) */
-	{ USB_DEVICE(0x1300, 0x0001), .driver_info = BTUSB_SWAVE },
+	{ USB_DEVICE(0x1310, 0x0001), .driver_info = BTUSB_SWAVE },
 
 	/* Digianswer devices */
 	{ USB_DEVICE(0x08fd, 0x0001), .driver_info = BTUSB_DIGIANSWER },
#1 lore raw

Hi Aleksey,

Quoted 28 lines · On Friday 08 of May 2015 02:11:27 Aleksey wrote:

In "Roper Class 1 Bluetooth Dongle" since 3.x kernel preset bug with invalid device initialization.

In earlyer version
$> hciconfig hci0 up
Can't init device hci0: Connection timed out (110)

In new kernel
$> hciconfig hci0 up
Can't init device hci0: Invalid request code (56)

with my device

[    3.359071] usb 5-1: New USB device found, idVendor=1310, idProduct=0001
[    3.359075] usb 5-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3 [    3.359078] usb 5-1: Product: SiW
[    3.359080] usb 5-1: Manufacturer: SiW
[    3.359083] usb 5-1: SerialNumber: E7BB050D0B00

Full diskussion about that problem present in
https://bugzilla.kernel.org/show_bug.cgi?id=60901 "- [PATCH]Roper Class 1 Bluetooth Dongle / TRENDnet TBW-102UB not working with all kernel 3.x tested"

After "Introducing HCI_QUIRK_BROKEN_LOCAL_COMMANDS constant" from Marcel Holtmann that bug been proper fixed, but my "Silicon Wave based" device not been included in list with BTUSB_SWAVE.

Quoted 8 lines

Don't know about other device - i have only one dongle with that problem, but adding BTUSB_SWAVE to driver_info for my 0x1310, 0x0001 dongle full fixed that problem, and now my device can bee in UP state..

More over, i check http://www.linux-usb.org/usb-ids.html and not find 1300 device - i find only "1310 Name: Roper"

I think, what used 0x1300 wrong and meant actually 0x1310

Checking http://www.linux-usb.org/usb.ids confirm that 0x1300 instead of 0x1310 is a typo.

Quoted 25 lines

If belive a bug "stopped work bluetooth"
https://bugzilla.kernel.org/show_bug.cgi?id=51831 in "all worked" karnel 2.6.38 i can't fined 1300, But 1310 in this kernel works well.

---
 drivers/bluetooth/btusb.c | 1+-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -up linux-4.0.0-gentoo/drivers/bluetooth/btusb.c.orig linux-4.0.0-gentoo/drivers/bluetooth/btusb.c ---
linux-4.0.0/drivers/bluetooth/btusb.c.orig 2015-05-01 12:06:59.000000000
+0300 +++ linux-4.0.0/drivers/bluetooth/btusb.c 2015-05-07
22:22:13.000000000 +0300 @@ -254,6 +254,6 @@ static const struct usb_device_id blackl

drivers/bluetooth/btusb.c renamed from drivers/bluetooth/btusb.c.orig +1 -1
 	/* Roper Class 1 Bluetooth Dongle (Silicon Wave based) */
-	{ USB_DEVICE(0x1300, 0x0001), .driver_info = BTUSB_SWAVE },
+	{ USB_DEVICE(0x1310, 0x0001), .driver_info = BTUSB_SWAVE },
 
 	/* Digianswer devices */
 	{ USB_DEVICE(0x08fd, 0x0001), .driver_info = BTUSB_DIGIANSWER },
Signature · 2 lines
BR
Szymon Janc
maintainer
#2 lore raw

Hi Szymon,

Quoted 32 lines
Quoted 32 lines

In "Roper Class 1 Bluetooth Dongle" since 3.x kernel preset bug with invalid device initialization.

In earlyer version
$> hciconfig hci0 up
Can't init device hci0: Connection timed out (110)

In new kernel
$> hciconfig hci0 up
Can't init device hci0: Invalid request code (56)

with my device

[    3.359071] usb 5-1: New USB device found, idVendor=1310, idProduct=0001
[    3.359075] usb 5-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3 [    3.359078] usb 5-1: Product: SiW
[    3.359080] usb 5-1: Manufacturer: SiW
[    3.359083] usb 5-1: SerialNumber: E7BB050D0B00

Full diskussion about that problem present in
https://bugzilla.kernel.org/show_bug.cgi?id=60901 "- [PATCH]Roper Class 1 Bluetooth Dongle / TRENDnet TBW-102UB not working with all kernel 3.x tested"

After "Introducing HCI_QUIRK_BROKEN_LOCAL_COMMANDS constant" from Marcel Holtmann that bug been proper fixed, but my "Silicon Wave based" device not been included in list with BTUSB_SWAVE.

Don't know about other device - i have only one dongle with that problem, but adding BTUSB_SWAVE to driver_info for my 0x1310, 0x0001 dongle full fixed that problem, and now my device can bee in UP state..

Quoted 7 lines
Quoted 4 lines

More over, i check http://www.linux-usb.org/usb-ids.html and not find 1300 device - i find only "1310 Name: Roper"

I think, what used 0x1300 wrong and meant actually 0x1310

Checking http://www.linux-usb.org/usb.ids confirm that 0x1300 instead of 0x1310 is a typo.

so I made a typo, then we just need a patch correcting this typo that also includes /sys/kernel/debug/usb/devices for this dongle to make sure this does not happen again.

Regards

Marcel

#3 lore raw

Hi Marcel,

Quoted 3 lines

so I made a typo, then we just need a patch correcting this typo that also includes /sys/kernel/debug/usb/devices for this dongle to make sure this does not happen again.

Patch correcting this typo exist in first mail.

Content /sys/kernel/debug/usb/devices for these dongle:

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1310 ProdID=0001 Rev=15.00
S:  Manufacturer=SiW
S:  Product=SiW
S:  SerialNumber=E7BB050D0B00
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 50mA
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
maintainer
#4 lore raw

Hi Aleksey,

Quoted 28 lines
Quoted 2 lines

so I made a typo, then we just need a patch correcting this typo that also includes /sys/kernel/debug/usb/devices for this dongle to make sure this does not happen again.

Patch correcting this typo exist in first mail.

Content /sys/kernel/debug/usb/devices for these dongle:

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1310 ProdID=0001 Rev=15.00
S:  Manufacturer=SiW
S:  Product=SiW
S:  SerialNumber=E7BB050D0B00
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 50mA
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
Quoted 9 lines
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

please include this in the original patch you sent and send a v2 of that patch.

Regards

Marcel