2003-06-19 07:08:22

by Marius Gedminas

[permalink] [raw]
Subject: 2.4.21: Bluetooth oopses with Acer USB dongle

Hi,

When I insert an Acer USB Bluetooth dongle, 2.4.21 (vanilla + CPUfreq
patch found on Con Kolivas patch page, 1100_CFS_0306161356_2.4.21-ck1.patch)
immediately oopses:

Jun 19 02:38:56 perlas kernel: hub.c: new USB device 00:1d.1-1, assigned address 2
Jun 19 02:38:56 perlas hcid[834]: HCI dev 0 registered
Jun 19 02:38:56 perlas kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000004
Jun 19 02:38:56 perlas kernel: printing eip:
Jun 19 02:38:56 perlas kernel: d0a2f431
Jun 19 02:38:56 perlas kernel: *pde = 00000000
Jun 19 02:38:56 perlas kernel: Oops: 0000
Jun 19 02:38:56 perlas kernel: CPU: 0
Jun 19 02:38:56 perlas kernel: EIP: 0010:[<d0a2f431>] Not tainted
Jun 19 02:38:56 perlas kernel: EFLAGS: 00010096
Jun 19 02:38:56 perlas kernel: eax: 00000000 ebx: ce04cc00 ecx: cdcf5ab4 edx: ce04cc00
Jun 19 02:38:56 perlas kernel: esi: ce04cc00 edi: 00000000 ebp: 00000206 esp: c92a1f28
Jun 19 02:38:56 perlas kernel: ds: 0018 es: 0018 ss: 0018
Jun 19 02:38:56 perlas kernel: Process hcid (pid: 989, stackpage=c92a1000)
Jun 19 02:38:56 perlas kernel: Stack: d0a2f38f cdcf5ab4 00000020 206c6165 68746977 00000008 ce04cc00 ce04cc00
Jun 19 02:38:56 perlas kernel: 00000000 00000206 d0a2f63a ce04cc00 c9434240 ce04cc00 ce04ccbc 00000000
Jun 19 02:38:56 perlas kernel: d0a263a9 ce04cc00 00000001 00000002 00000000 c9434240 400448c9 ffffffe7
Jun 19 02:38:56 perlas kernel: Call Trace: [<d0a2f38f>] [<d0a2f63a>] [<d0a263a9>] [sock_ioctl+38/48] [sys_ioctl+185/448]
Jun 19 02:38:56 perlas kernel: [system_call+51/56]
Jun 19 02:38:56 perlas kernel:
Jun 19 02:38:56 perlas kernel: Code: 0f b7 78 04 c7 44 24 04 20 00 00 00 8d 04 bf 8d 2c 00 89 2c
Jun 19 02:38:56 perlas /sbin/hotplug: no runnable /etc/hotplug/bluetooth.agent is installed
Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: Setup hci_usb for USB product b7a/7d0/134
Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: Setup hci_usb for USB product b7a/7d0/134
Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: missing kernel or user mode driver hci_usb
Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: missing kernel or user mode driver hci_usb

Ksymoops output follows

>>EIP; d0a2f431 <[hci_usb]hci_usb_isoc_rx_submit+11/190> <=====

>>ebx; ce04cc00 <_end+dd55578/105c59d8>
>>ecx; cdcf5ab4 <_end+d9fe42c/105c59d8>
>>edx; ce04cc00 <_end+dd55578/105c59d8>
>>esi; ce04cc00 <_end+dd55578/105c59d8>
>>esp; c92a1f28 <_end+8faa8a0/105c59d8>

Trace; d0a2f38f <[hci_usb]hci_usb_bulk_rx_submit+cf/160>
Trace; d0a2f63a <[hci_usb]hci_usb_open+8a/90>
Trace; d0a263a9 <[bluez]hci_dev_open+79/220>

Code; d0a2f431 <[hci_usb]hci_usb_isoc_rx_submit+11/190>
00000000 <_EIP>:
Code; d0a2f431 <[hci_usb]hci_usb_isoc_rx_submit+11/190> <=====
0: 0f b7 78 04 movzwl 0x4(%eax),%edi <=====
Code; d0a2f435 <[hci_usb]hci_usb_isoc_rx_submit+15/190>
4: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp,1)
Code; d0a2f43c <[hci_usb]hci_usb_isoc_rx_submit+1c/190>
b: 00
Code; d0a2f43d <[hci_usb]hci_usb_isoc_rx_submit+1d/190>
c: 8d 04 bf lea (%edi,%edi,4),%eax
Code; d0a2f440 <[hci_usb]hci_usb_isoc_rx_submit+20/190>
f: 8d 2c 00 lea (%eax,%eax,1),%ebp
Code; d0a2f443 <[hci_usb]hci_usb_isoc_rx_submit+23/190>
12: 89 2c 00 mov %ebp,(%eax,%eax,1)

I did not have this problem with 2.4.20 (with Debian patches). (But
2.4.20 did not have rfcomm support.)

The kernel is built with gcc 3.2.3. Should I try 2.95? I thought 3.2
was OK. Should I try a vanilla kernel? CPUfreq does not touch USB in
any obvious way.

Is this the right list to ask, or is there a more specific one for
bluez?

Marius Gedminas
--
There are 10 kinds of people in the world: Those who understand binary
mathematics and those who don't.


2003-06-19 09:05:28

by Marcel Holtmann

[permalink] [raw]
Subject: Re: 2.4.21: Bluetooth oopses with Acer USB dongle

Hi Marius,

> When I insert an Acer USB Bluetooth dongle, 2.4.21 (vanilla + CPUfreq
> patch found on Con Kolivas patch page, 1100_CFS_0306161356_2.4.21-ck1.patch)
> immediately oopses:
>
> Jun 19 02:38:56 perlas kernel: hub.c: new USB device 00:1d.1-1, assigned address 2
> Jun 19 02:38:56 perlas hcid[834]: HCI dev 0 registered
> Jun 19 02:38:56 perlas kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000004
> Jun 19 02:38:56 perlas kernel: printing eip:
> Jun 19 02:38:56 perlas kernel: d0a2f431
> Jun 19 02:38:56 perlas kernel: *pde = 00000000
> Jun 19 02:38:56 perlas kernel: Oops: 0000
> Jun 19 02:38:56 perlas kernel: CPU: 0
> Jun 19 02:38:56 perlas kernel: EIP: 0010:[<d0a2f431>] Not tainted
> Jun 19 02:38:56 perlas kernel: EFLAGS: 00010096
> Jun 19 02:38:56 perlas kernel: eax: 00000000 ebx: ce04cc00 ecx: cdcf5ab4 edx: ce04cc00
> Jun 19 02:38:56 perlas kernel: esi: ce04cc00 edi: 00000000 ebp: 00000206 esp: c92a1f28
> Jun 19 02:38:56 perlas kernel: ds: 0018 es: 0018 ss: 0018
> Jun 19 02:38:56 perlas kernel: Process hcid (pid: 989, stackpage=c92a1000)
> Jun 19 02:38:56 perlas kernel: Stack: d0a2f38f cdcf5ab4 00000020 206c6165 68746977 00000008 ce04cc00 ce04cc00
> Jun 19 02:38:56 perlas kernel: 00000000 00000206 d0a2f63a ce04cc00 c9434240 ce04cc00 ce04ccbc 00000000
> Jun 19 02:38:56 perlas kernel: d0a263a9 ce04cc00 00000001 00000002 00000000 c9434240 400448c9 ffffffe7
> Jun 19 02:38:56 perlas kernel: Call Trace: [<d0a2f38f>] [<d0a2f63a>] [<d0a263a9>] [sock_ioctl+38/48] [sys_ioctl+185/448]
> Jun 19 02:38:56 perlas kernel: [system_call+51/56]
> Jun 19 02:38:56 perlas kernel:
> Jun 19 02:38:56 perlas kernel: Code: 0f b7 78 04 c7 44 24 04 20 00 00 00 8d 04 bf 8d 2c 00 89 2c
> Jun 19 02:38:56 perlas /sbin/hotplug: no runnable /etc/hotplug/bluetooth.agent is installed
> Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: Setup hci_usb for USB product b7a/7d0/134
> Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: Setup hci_usb for USB product b7a/7d0/134
> Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: missing kernel or user mode driver hci_usb
> Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: missing kernel or user mode driver hci_usb

what kind of Acer dongle is this? Please show us your data from
/proc/bus/usb/devices for this device.

The following small patch should help.

Regards

Marcel


diff -urN linux-2.4.21/drivers/bluetooth/hci_usb.c linux-2.4.21-mh/drivers/bluetooth/hci_usb.c
--- linux-2.4.21/drivers/bluetooth/hci_usb.c Fri Jun 13 16:51:32 2003
+++ linux-2.4.21-mh/drivers/bluetooth/hci_usb.c Thu Jun 19 11:11:15 2003
@@ -301,7 +301,8 @@
hci_usb_bulk_rx_submit(husb);

#ifdef CONFIG_BLUEZ_USB_SCO
- hci_usb_isoc_rx_submit(husb);
+ if (husb->isoc_iface)
+ hci_usb_isoc_rx_submit(husb);
#endif
} else {
clear_bit(HCI_RUNNING, &hdev->flags);


2003-06-19 10:05:08

by Marius Gedminas

[permalink] [raw]
Subject: Re: 2.4.21: Bluetooth oopses with Acer USB dongle

On Thu, Jun 19, 2003 at 11:18:18AM +0200, Marcel Holtmann wrote:
> Hi Marius,

Hi, and thanks for the quick reply

> > When I insert an Acer USB Bluetooth dongle, 2.4.21 (vanilla + CPUfreq
> > patch found on Con Kolivas patch page, 1100_CFS_0306161356_2.4.21-ck1.patch)
> > immediately oopses:
> >
> > Jun 19 02:38:56 perlas /etc/hotplug/usb.agent: Setup hci_usb for USB product b7a/7d0/134
>
> what kind of Acer dongle is this?

Small and black ;)

I've a couple of photos that I was going to put on the web somewhere,
but at the moment usb-storage.o is stuck in the initialization phase.
Strange... Perhaps 2.4.20 has other problems with this dongle confusing
the USB subsystem? I haven't tried using it with another USB device at
the same time before.

> Please show us your data from
> /proc/bus/usb/devices for this device.

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS= 8 #Cfgs= 1
P: Vendor=0b7a ProdID=07d0 Rev= 1.34
S: SerialNumber=3EC0B415
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=hci_usb
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=1ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)

> The following small patch should help.

Thank's, I'll try it.

Marius Gedminas
--
Power corrupts, but we need electricity.

2003-06-19 11:06:56

by Marcel Holtmann

[permalink] [raw]
Subject: Re: 2.4.21: Bluetooth oopses with Acer USB dongle

Hi Marius,

> Small and black ;)

all of the Acer dongles are small and black, but not all of them use the
same Bluetooth chip :)

> I've a couple of photos that I was going to put on the web somewhere,
> but at the moment usb-storage.o is stuck in the initialization phase.
> Strange... Perhaps 2.4.20 has other problems with this dongle confusing
> the USB subsystem? I haven't tried using it with another USB device at
> the same time before.
>
> > Please show us your data from
> > /proc/bus/usb/devices for this device.
>
> T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
> D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS= 8 #Cfgs= 1
> P: Vendor=0b7a ProdID=07d0 Rev= 1.34
> S: SerialNumber=3EC0B415
> C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA
> I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=hci_usb
> E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=1ms
> E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> I: If#= 1 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)

The problem is not the USB subsystem. It is the manufacturer of the
Bluetooth chip, because some of them didn't read the Bluetooth HCI spec.
part H2 carefully. At least every H2 USB Bluetooth device must have two
ISOC endpoints. Even if they don't support SCO voice transfer.

Regards

Marcel