Skip to contentSkip to conversation

Problems with CF bluetooth

DISCUSSION Pavel Machek 4 participants 14 messages Sep 29, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi!

I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

[Pretty recent kernel: Linux amd 2.6.14-rc2-g5fb2493e #106 Thu Sep 29 01:35:25 CEST 2005 i686 GNU/Linux]

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

(I had to hack serial driver a bit to default to 921600 bitrate; it does not have setserial).

# hciattach -s 921600 /dev/ttyS0 bcsp
BCSP initialization timed out
								Pavel
Sep 29 15:42:34 amd kernel: EIP:    0060:[<c02d4e2c>]    Not tainted
VLI
Sep 29 15:42:34 amd kernel: EFLAGS: 00010082   (2.6.14-rc2-g5fb2493e)
Sep 29 15:42:34 amd kernel: EIP is at uart_flush_buffer+0xc/0x30
Sep 29 15:42:34 amd kernel: eax: f658a000   ebx: f6741400   ecx:
00000282   edx: 00000000
Sep 29 15:42:34 amd kernel: esi: f658a000   edi: 00000000   ebp:
00000000   esp: f4b49d80
Sep 29 15:42:34 amd kernel: ds: 007b   es: 007b   ss: 0068
Sep 29 15:42:34 amd kernel: Process hciattach (pid: 5971,
threadinfo=f4b48000 task=f7141070)
Sep 29 15:42:34 amd kernel: Stack: c03f9df6 f6741400 f5e7ca00 c03f9e27
c03f9f86 f658a000 00000001 c02a5ed7
Sep 29 15:42:34 amd kernel:        0000000f f27f0424 00001000 f7384e00
00000000 00000000 00000000 00000001
Sep 29 15:42:34 amd kernel:        00000000 00000000 00000000 f7d58000
f4b49e14 f27f03c0 f70fde3c 00000000
Sep 29 15:42:34 amd kernel: Call Trace:
Sep 29 15:42:34 amd kernel:  [<c03f9df6>] hci_uart_flush+0x66/0x80
Sep 29 15:42:34 amd kernel:  [<c03f9e27>] hci_uart_close+0x17/0x20
Sep 29 15:42:34 amd kernel:  [<c03f9f86>] hci_uart_tty_close+0x26/0x60
Sep 29 15:42:34 amd kernel:  [<c02a5ed7>] release_dev+0x587/0x670
Sep 29 15:42:34 amd kernel:  [<c016c521>] update_atime+0x51/0xa0
Sep 29 15:42:34 amd kernel:  [<c0146a14>] free_pte_range+0x34/0x40
Sep 29 15:42:34 amd kernel:  [<c0146af7>] free_pgd_range+0xd7/0x190
Sep 29 15:42:34 amd kernel:  [<c0169b7e>] dput+0x1e/0x180
Sep 29 15:42:34 amd kernel:  [<c02a63f7>] tty_release+0x7/0x10
Sep 29 15:42:34 amd kernel:  [<c0155796>] __fput+0x136/0x150
Sep 29 15:42:34 amd kernel:  [<c0153f03>] filp_close+0x43/0x70
Sep 29 15:42:34 amd kernel:  [<c011e721>] put_files_struct+0x61/0x90
Sep 29 15:42:34 amd kernel:  [<c011f24b>] do_exit+0xeb/0x350
Sep 29 15:42:34 amd kernel:  [<c011f51f>] do_group_exit+0x2f/0x70
Sep 29 15:42:34 amd kernel:  [<c012740a>]
get_signal_to_deliver+0x1ca/0x290
Sep 29 15:42:34 amd kernel:  [<c0102c57>] do_signal+0x87/0x110
Sep 29 15:42:34 amd kernel:  [<c0515c5e>] schedule+0x30e/0x590
Sep 29 15:42:34 amd kernel:  [<c05165e1>] schedule_timeout+0x61/0xb0
Sep 29 15:42:34 amd kernel:  [<c0231806>] copy_to_user+0x36/0x60
Sep 29 15:42:34 amd kernel:  [<c01251e7>] sys_nanosleep+0xf7/0x140
Sep 29 15:42:34 amd kernel:  [<c0102d17>] do_notify_resume+0x37/0x3c
Sep 29 15:42:34 amd kernel:  [<c0102eaa>] work_notifysig+0x13/0x19
Sep 29 15:42:34 amd kernel: Code: 80 7c 09 00 00 8b 50 10 8b 42 08 8b
4a 0c 29 c8 25 ff 0f 00 00 c3 89 f6 8d bc 27 00 00 00 00 8b 90 7c 09
00 00 9c 59 fa 8b 52 10 <c7> 42 0c 00 00 00 00 c7 42 08 00 00 00
00 51 9d e9 ef f9 fc ff
Sep 29 15:42:34 amd kernel:  <1>Fixing recursive fault but reboot is
needed!
Sep 29 15:43:10 amd pam_limits[5869]: wrong limit value 'unlimited'
Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#1 lore raw
Quoted 4 lines · Pavel Machek

Hi!
=20
I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

I have the same CF card, but it not works in my debian 2.6.13. Any hints?=20

Quoted 2 lines

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

I have two zaurus too :) What=B4s model and ROM you try using?=20 OpenZaurus use 2.6.11 kernel now.=20

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#2 lore raw
In reply to Pavel Machek

Hi Pavel,

Quoted 8 lines

I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

[Pretty recent kernel: Linux amd 2.6.14-rc2-g5fb2493e #106 Thu Sep 29 01:35:25 CEST 2005 i686 GNU/Linux]

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

I am not an expert for the Zaurus, but the oops looks like a problem in the serial subsystem. Does somebody else has seen problems with the uart_flush_buffer() and other architectures?

Regards

Marcel

#3 lore raw

Hi!

Quoted 6 lines
Quoted 6 lines

I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

[Pretty recent kernel: Linux amd 2.6.14-rc2-g5fb2493e #106 Thu Sep 29 01:35:25 CEST 2005 i686 GNU/Linux]

Quoted 6 lines
Quoted 2 lines

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

I am not an expert for the Zaurus, but the oops looks like a problem in the serial subsystem. Does somebody else has seen problems with the uart_flush_buffer() and other architectures?

No, oops is from normal PC. (And I believe it is reproducible). On zaurus, hciattach just fails (and I have no idea how to debug that :-( ).

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
maintainer
#4 lore raw

Hi Pavel,

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

[Pretty recent kernel: Linux amd 2.6.14-rc2-g5fb2493e #106 Thu Sep 29 01:35:25 CEST 2005 i686 GNU/Linux]

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

Quoted 7 lines
Quoted 3 lines

I am not an expert for the Zaurus, but the oops looks like a problem in the serial subsystem. Does somebody else has seen problems with the uart_flush_buffer() and other architectures?

No, oops is from normal PC. (And I believe it is reproducible). On zaurus, hciattach just fails (and I have no idea how to debug that :-( ).

I think that I have such a card at home, but I don't know when I have time to pick it up. Anybody else out there to debug this.

Regards

Marcel

#5 lore raw

Hi!

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines

I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

[Pretty recent kernel: Linux amd 2.6.14-rc2-g5fb2493e #106 Thu Sep 29 01:35:25 CEST 2005 i686 GNU/Linux]

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

I am not an expert for the Zaurus, but the oops looks like a problem in the serial subsystem. Does somebody else has seen problems with the uart_flush_buffer() and other architectures?

Quoted 6 lines
Quoted 3 lines

No, oops is from normal PC. (And I believe it is reproducible). On zaurus, hciattach just fails (and I have no idea how to debug that :-( ).

I think that I have such a card at home, but I don't know when I have time to pick it up. Anybody else out there to debug this.

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
maintainer
#6 lore raw

Hi Pavel,

Quoted 17 lines
Quoted 17 lines
Quoted 16 lines
Quoted 6 lines
Quoted 6 lines

I have some problems with Billionton CF card: if I insert card, hciattach to it, eject it, hciattach again, I get an oops.

[Pretty recent kernel: Linux amd 2.6.14-rc2-g5fb2493e #106 Thu Sep 29 01:35:25 CEST 2005 i686 GNU/Linux]

Quoted 6 lines
Quoted 2 lines

Another problem is that... it works well on my PC. When I try to do the same hciattach on sharp zaurus handheld, I get

I am not an expert for the Zaurus, but the oops looks like a problem in the serial subsystem. Does somebody else has seen problems with the uart_flush_buffer() and other architectures?

No, oops is from normal PC. (And I believe it is reproducible). On zaurus, hciattach just fails (and I have no idea how to debug that :-( ).

Quoted 5 lines
Quoted 2 lines

I think that I have such a card at home, but I don't know when I have time to pick it up. Anybody else out there to debug this.

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Regards

Marcel

#7 lore raw

Hi!

Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Following patch seems to work around it. And yes, printk() triggers twice after

root@amd:~# ~pavel/bin/billionton_start
hciattach: no process killed
hci0:   Type: UART
        BD Address: 00:10:60:AB:25:9A ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:201 acl:0 sco:0 events:9 errors:0
        TX bytes:168 acl:0 sco:0 commands:8 errors:0
root@amd:~# ~pavel/bin/billionton_start
no state->info
no state->info
hci0:   Type: UART
        BD Address: 00:10:60:AB:25:9A ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:201 acl:0 sco:0 events:9 errors:0
        TX bytes:168 acl:0 sco:0 commands:8 errors:0

root@amd:~#

Pavel

Workaround billionton eject problem.

---
commit 81a2889a21eb2bfdf8b242f2cc2cc1d6ad424ea2 tree 35187ac07854fda50f07e9de3eb1c46db2cdd0a7 parent 5fb2493e110ff081e4463e7ab65eff487a3a14f6 author <pavel@amd.(none)> Thu, 29 Sep 2005 23:21:18 +0200 committer <pavel@amd.(none)> Thu, 29 Sep 2005 23:21:18 +0200

 drivers/serial/serial_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/serial/serial_core.c +3 -1
@@ -521,7 +521,9 @@ static void uart_flush_buffer(struct tty
 	DPRINTK("uart_flush_buffer(%d) called\n", tty->index);
 
 	spin_lock_irqsave(&port->lock, flags);
-	uart_circ_clear(&state->info->xmit);
+	if (!state->info)
+		printk(KERN_CRIT "no state->info\n");
+	else uart_circ_clear(&state->info->xmit);
 	spin_unlock_irqrestore(&port->lock, flags);
 	tty_wakeup(tty);
 }
Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address

# Take 2.6.12-rc3-mm3
#
# PCMCIA config:

# card "Cyber-blue Compact Flash Card"
#   manfid 0x0279, 0x950b
#   bind "serial_cs"
#

killall hciattach
sleep .1
setserial /dev/ttyBT baud_base 921600
hciattach -s 921600 /dev/ttyBT bcsp
hciconfig hci0 up
hciconfig

#8 lore raw
Quoted 10 lines · Pavel Machek

Hi!

Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Following patch seems to work around it. And yes, printk() triggers twice after

What's the problem this patch is trying to address?

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#9 lore raw

Hi!

Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Following patch seems to work around it. And yes, printk() triggers twice after

What's the problem this patch is trying to address?

I get oops after starting my bluetooth subsystem for second time. billionton_start, unplug CF, billionton_start will oops the system. That patch prevents it.
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#10 lore raw
Quoted 8 lines · Pavel Machek

Hi!

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Following patch seems to work around it. And yes, printk() triggers twice after

What's the problem this patch is trying to address?

I get oops after starting my bluetooth subsystem for second time. billionton_start, unplug CF, billionton_start will oops the system. That patch prevents it.

More details please. I don't have the ability to run bluetooth myself.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#11 lore raw

Hi!

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Following patch seems to work around it. And yes, printk() triggers twice after

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

What's the problem this patch is trying to address?

I get oops after starting my bluetooth subsystem for second time. billionton_start, unplug CF, billionton_start will oops the system. That patch prevents it.

More details please. I don't have the ability to run bluetooth myself.

Unfortunately I do not know much about bluetooth. The card is basically CF serial with bluetooth chip attached to that. billionton start does setserial, then attaches bluetooth subsystem to that chip, and enables bluetooth.

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#12 lore raw
Quoted 17 lines · Pavel Machek

Hi!

Quoted 15 lines
Quoted 14 lines
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Following patch seems to work around it. And yes, printk() triggers twice after

What's the problem this patch is trying to address?

I get oops after starting my bluetooth subsystem for second time. billionton_start, unplug CF, billionton_start will oops the system. That patch prevents it.

Quoted 6 lines
Quoted 1 line

More details please. I don't have the ability to run bluetooth myself.

Unfortunately I do not know much about bluetooth. The card is basically CF serial with bluetooth chip attached to that. billionton start does setserial, then attaches bluetooth subsystem to that chip, and enables bluetooth.

How about showing the oops? The patch is definitely wrong btw - there's no way state->info should be NULL here.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#13 lore raw
Quoted 20 lines · Russell King
Quoted 19 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

I believe it would happen with any other CF card, too. Can you hciattach it, unplug, hciattach again?

actually I don't have any of them with me and I don't saw a problem with my Casira of a serial port.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Following patch seems to work around it. And yes, printk() triggers twice after

What's the problem this patch is trying to address?

I get oops after starting my bluetooth subsystem for second time. billionton_start, unplug CF, billionton_start will oops the system. That patch prevents it.

More details please. I don't have the ability to run bluetooth myself.

Quoted 7 lines
Quoted 4 lines

Unfortunately I do not know much about bluetooth. The card is basically CF serial with bluetooth chip attached to that. billionton start does setserial, then attaches bluetooth subsystem to that chip, and enables bluetooth.

How about showing the oops? The patch is definitely wrong btw - there's no way state->info should be NULL here.

I realize it is probably wrong... forwarding you the original report ... with the oops :-).
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address