Bug 126403

Summary: CF (and PCMCIA) Bluetooth cards using serial_cs time out with 2.6 kernel
Product: [Fedora] Fedora Reporter: Kevin R. Page <redhat-bugzilla>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: pfrields
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: NeedsRetesting
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-21 23:46:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin R. Page 2004-06-21 09:37:41 UTC
Description of problem:
I have a Socket Compact Flash Bluetooth card (version 2.5, rev. G),
which contains a CSR chipset, and should use the hci_uart kernel
module via serial_cs. I'm using a x86 laptop (Thinkpad x31), but the
problem has been reported on other architectures (see bluez mailing
list archives).

Normally I would attach the serial device to the bluez stack using:
  hciattach ttyS1 socket

This works under kernel 2.4. However, under 2.6, it times out:
  BCSP initialization timed out

serial_cs appears to load and bind to the device ok:
  Jun 21 09:36:54 localhost cardmgr[1736]: socket 1: Serial or Modem
  Jun 21 09:36:54 localhost kernel: ttyS1 at I/O 0x2f8 (irq = 3) is a
16C950/954

There are no other messages in the log, showing failure or anything
else useful.

This appears to affect other users of various CF and PCMCIA serial
bluetooth cards under 2.6. Threads on the bluez lists (though these
seem to be inconclusive - "some cards work and some don't":
http://sourceforge.net/mailarchive/message.php?msg_id=7076305
http://sourceforge.net/mailarchive/message.php?msg_id=7076270

There doesn't seem to be a solution, or decent debug info for this
problem - I can gather more information/logs if given a few pointers?

Version-Release number of selected component (if applicable):
kernel-2.6.6-1.435, bluez-utils-2.4-3

How reproducible:
Always

Steps to Reproduce:
1. Plug CF bluetooth card into laptop
2. hciattach ttyS1 socket
3.
    

Actual Results:  BSCP initialization timed out

Expected Results:  The serial device should be bound into the bluez stack

Additional info:

Comment 1 Kevin R. Page 2004-11-03 11:49:14 UTC
There have been some recent changes to the kernel serial / UART code.

I've just tried kernel 2.6.10-rc1-mm2, and the problem seems to have
been resolved (i.e. hciattach successfully binds to the serial socket,
I can then use the bluez tools ok).

Comment 2 Kevin R. Page 2005-11-25 16:16:34 UTC
Well, if there was a fix in -mm it didn't make it into the mainline or Fedora
kernels :(
I believe this affects a good number of CF bluetooth cards, not just the Socket
version.

I'm currently patching with:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112687270832687&w=2

The patch author seems to have had trouble getting it included (thread:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112622973504905&w=2 ). I've
already informed him of my success, perhaps others could too.

If anyone can test this patch at the 460800 baud rate, please report back to the
author, and perhaps we can get this included upstream.


Comment 3 Dave Jones 2006-02-03 06:27:52 UTC
This is a mass-update to all currently open kernel bugs.

A new kernel update has been released (Version: 2.6.15-1.1830_FC4)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

Thank you.


Comment 4 Kevin R. Page 2006-02-03 22:01:44 UTC
Bug still present with 2.6.15-1.1830_FC4; the patch referenced above still works
as a fix.

As mentioned before, if anyone else is successfully using the patch (especially
at  460800 baud), please inform the author - then maybe this can be pushed upstream.

Comment 5 Dave Jones 2006-02-04 00:09:52 UTC
Ok, I've re-pinged upstream re this patch, so hopefully it'll get included soon
unless there's something horribly wrong with it. (To my non-8250 savvy eyes, it
looks ok).


Comment 6 Kevin R. Page 2006-04-06 16:35:19 UTC
The patch was pleasingly added to 2.6.15-1.1833_FC4, but seems to have been
dropped from 2.6.16-1.2069_FC4. Has it thrown up problems?

It still applies (with offsets) and works when I build from SRPM.

Is it worth duplicating this bug in bugzilla.kernel.org?

Comment 7 Kevin R. Page 2006-04-26 18:28:22 UTC
Oh dear. The patch still applies to 2.6.16-1.2096_FC4, but binding to my PCMCIA
bluetooth module with hciattach fails even with the patch applied (with the same
symtoms as without the patch).

(I'll check and confirm whether this was the case with 2069)

Comment 8 Kevin R. Page 2006-04-26 23:12:01 UTC
Confirmed: kernel-2.6.16-1.2069_FC4 works fine with the patch applied; but
2.6.16-1.2096_FC4 doesn't. Perhaps a conflict with:

* Tue Apr 04 2006 Dave Jones <davej>
- Reenable non-standard serial ports. (#187466)

(from rpm -q --changelog kernel-2.6.16-1.2096_FC4)

Comment 9 Dave Jones 2006-05-09 21:03:49 UTC
inadvertantly got dropped. I'll add it back for the next update.


Comment 10 Kevin R. Page 2006-08-01 16:17:16 UTC
I think this got dropped again? The patch applies to and works with
2.6.17-1.2142_FC4.

I also tried an FC5 machine, and the patch seems to be missing there too.

(the problems with later 2.6.16 kernels were in serial_cs and have now been
resolved; it wasn't even reaching the code the patch touches)

Comment 11 Dave Jones 2006-10-16 20:06:54 UTC
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.

Comment 12 Kevin R. Page 2006-10-30 17:31:05 UTC
As far as I'm aware, this patch is still in the Fedora kernel build and working.
It was working on an FC5 laptop, with current (at the time) updates applied, a
month ago - before that laptop was stolen :(

I still have the bluetooth card, but I'm using it on an FC4 laptop with a
manually patched 2.6.17-1.2142 - I'm afraid I won't get the chance to take this
laptop to FC6 and test for at least a few weeks.