Bug 28562

Summary: [BUG] usb problems in .38-rc3+
Product: Drivers Reporter: Maciej Rutecki (maciej.rutecki)
Component: BluetoothAssignee: drivers_bluetooth (drivers_bluetooth)
Severity: normal CC: edt, farbing, justinmattock, maciej.rutecki, markhobley, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.38-rc3+ Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 27352    
Attachments: bluetoothd log

Description Maciej Rutecki 2011-02-07 20:30:24 UTC
Subject    : [BUG] usb problems in .38-rc3+
Submitter  : Ed Tomlinson <edt@aei.ca>
Date       : 2011-02-05 19:17
Message-ID : 201102051417.58953.edt@aei.ca
References : http://marc.info/?l=linux-kernel&m=129693391417607&w=2

This entry is being used for tracking a regression from 2.6.37. Please don't
close it until the problem is fixed in the mainline.
Comment 1 Ed Tomlinson 2011-02-20 20:55:45 UTC
I've found a workaround for this.

Once the adaptor is initialized, run 'hciconfig -a'.   After this attempts to connect devices work.

From the manpage hciconfig -a should be a query.  It does seem like its doing a bit
more though.

Ideas anyone?
Comment 2 Rafael J. Wysocki 2011-02-22 19:56:09 UTC
On Tuesday, February 22, 2011, Ed Tomlinson wrote:
> On Monday 21 February 2011 17:03:00 Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a summary report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.37.  Please verify if it still should be listed and let the
> tracking team
> > know (either way).
> > 
> > 
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=28562
> > Subject             : [BUG] usb problems in .38-rc3+
> > Submitter   : Ed Tomlinson <edt@aei.ca>
> > Date                : 2011-02-05 19:17 (17 days old)
> I figured out a work around for this.  Once the bluetooth adaptor has been
> detected and udev
> had done its stuff run: 
> hciconfig -a
> With this user space change it works.  I have no idea why the 'hciconfig -a'
> query fixes things.
> I run gentoo and bluez-4.87 is installed.
Comment 3 farbing 2011-02-28 16:06:00 UTC
Created attachment 49612 [details]
bluetoothd log

I think I have the same issue. I have a Bt USB dongle (ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)).

After a cold boot the dongle is powered off (it has a small blue LED which shows the power state). When I restart bluetoothd the dongle turns on and Bluetooth works. The above mentioned hciconfig -a also turns the dongle on.

When I unplug the dongle and plug it in again it also is turned off.

I'm attaching a log from bluetoothd where I've gone through the following steps:

1. stopped the bluetoothd daemon
2. started it manually with bluetoothd -n -d
   -> dongle turns on
3. unplugged the dongle
4. plugged it in again
   -> dongle is turned off
5. executed hciconfig -a
   -> dongle turns on
6. killall -TERM bluetoothd
   -> dongle turns off

I've marked the points where I executed each step in the log with "<< $action >>".

These are the only messages from the kernel in the same timeframe:

06:32:47 usb 2-2: USB disconnect, address 4
06:32:47 btusb_bulk_complete: hci0 urb ffff88005003bf00 failed to resubmit (19)
06:32:47 btusb_intr_complete: hci0 urb ffff88005003bd80 failed to resubmit (19)
06:32:47 btusb_bulk_complete: hci0 urb ffff88007d022d80 failed to resubmit (19)
06:32:47 btusb_send_frame: hci0 urb ffff88005238d3c0 submission failed
06:33:02 usb 2-2: new full speed USB device using ohci_hcd and address 5

I'm running Debian unstable and bluez 4.89
Comment 4 Mark Hobley 2011-02-28 23:08:31 UTC
This may be related to bug #10126
Comment 5 Justin P. Mattock 2011-03-28 17:15:34 UTC
I think this is fixed now in the current Mainline.. but am seeing a new problem with S2R seems the icon(bluetooth) has gone away after suspend..
I can try at a bisect and see.
Comment 6 Ed Tomlinson 2011-04-11 02:06:36 UTC
with 39-rc2+ I am still having problems - worst than .38 in that I've not found a work around.

hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:0A:3A:55:07:5A  ACL MTU: 192:8  SCO MTU: 64:8
        RX bytes:718 acl:0 sco:0 events:25 errors:0
        TX bytes:108 acl:0 sco:0 commands:24 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: 
        Link mode: SLAVE ACCEPT

The device is seen but is 'DOWN'

hciconfig hci0 up
Can't init device hci0: Invalid argument (22)

And I cannot bring it up.  There is nothing in demsg.

If I unplug it physically I find this in dmemsg

[  325.031136] usb 2-4.4: USB disconnect, device number 5
[  328.741203] usb 2-4.4: new full speed USB device number 6 using ehci_hcd
[  328.890392] usb 2-4.4: New USB device found, idVendor=0a12, idProduct=0001
[  328.897532] usb 2-4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

bluez is 4.91

Comment 7 Ed Tomlinson 2011-04-11 02:10:45 UTC
The workaround that fixed things for farbing@web.de does _not_ work on my box.

The kernel here is from git at commit 94c8a984ae2adbd9a9626fb42e0f2faf3e36e86f
Comment 8 Justin P. Mattock 2011-04-11 02:19:36 UTC
I've been noticing with my usb stick and firewire that udisks will mount them automatically, but then on other occasions wont(system is fedora 15 with the latest Mainline with their .config) 

will look into this and will bisect if need be.(maybe make localmodconfig left something out or something)

as for bluetooth was working perfectly(S2R etc..)but now is broken with whatever their update did.
Comment 9 farbing 2011-04-25 09:59:02 UTC fixes this for me.
Comment 10 Justin P. Mattock 2011-04-25 15:39:29 UTC
On 04/25/2011 03:11 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=28562
> Rafael J. Wysocki<rjw@sisk.pl>  changed:
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|RESOLVED                    |CLOSED


Justin P. Mattock