android_kernel_motorola_sm6225/net/bluetooth
Szymon Janc e1b6eb3ccb Bluetooth: Increase HCI reset timeout in hci_dev_do_close
I've noticed that my CSR usb dongle was not working if it was plugged in when
PC was booting. It looks like I get two HCI reset command complete events (see
hcidump logs below).
The root cause is reset called from off_timer. Timeout for this reset to
complete is set to 250ms and my bt dongle requires more time for replying with
command complete event. After that, chip seems to reply with reset command
complete event for next non-reset command.

Attached patch increase mentioned timeout to HCI_INIT_TIMEOUT, this value is
already used for timeouting hci_reset_req in hci_dev_reset().

This might also be related to BT not working after suspend that was reported
here some time ago.

Hcidump log:

2011-09-12 23:13:27.379465 < HCI Command: Reset (0x03|0x0003) plen 0
2011-09-12 23:13:27.380797 > HCI Event: Command Complete (0x0e) plen 4
    Reset (0x03|0x0003) ncmd 1
    status 0x00
2011-09-12 23:13:27.380859 < HCI Command: Read Local Supported Features (0x04|0x000
3) plen 0
2011-09-12 23:13:27.760789 > HCI Event: Command Complete (0x0e) plen 4
    Reset (0x03|0x0003) ncmd 1
    status 0x00
2011-09-12 23:13:27.760831 < HCI Command: Read Local Version Information (0x04|0x00
01) plen 0
2011-09-12 23:13:27.764780 > HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 1.1 (0x1) HCI Revision: 0x36f
    LMP Version: 1.1 (0x1) LMP Subversion: 0x36f
    Manufacturer: Cambridge Silicon Radio (10)

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-10-31 17:10:18 -02:00
..
bnep Bluetooth: bnep: Fix deadlock in session deletion 2011-08-11 19:50:27 -03:00
cmtp Bluetooth: cmtp: Fix session cleanup on failed conn add 2011-08-11 19:50:28 -03:00
hidp Bluetooth: hidp: Don't release device ref if never held 2011-08-11 19:50:28 -03:00
rfcomm Bluetooth: rfcomm: Fix sleep in invalid context in rfcomm_security_cfm 2011-10-14 15:04:54 -03:00
af_bluetooth.c Bluetooth: Fix lost wakeups waiting for sock state change 2011-08-11 19:50:26 -03:00
hci_conn.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-07-14 07:56:40 -07:00
hci_core.c Bluetooth: Increase HCI reset timeout in hci_dev_do_close 2011-10-31 17:10:18 -02:00
hci_event.c Bluetooth: Fix timeout on scanning for the second time 2011-09-15 11:54:05 -03:00
hci_sock.c Bluetooth: Move blacklisting functions to hci_core 2011-06-16 15:19:41 -03:00
hci_sysfs.c Bluetooth: Add variable SSP auto-accept delay support 2011-04-28 16:02:30 -03:00
Kconfig bluetooth: uses crypto interfaces, select CRYPTO 2011-06-27 15:09:39 -04:00
l2cap_core.c Bluetooth: l2cap: Fix lost wakeup waiting for ERTM acks 2011-08-11 19:50:27 -03:00
l2cap_sock.c Bluetooth: Fixed wrong L2CAP Sock timer value 2011-08-11 19:50:27 -03:00
lib.c Bluetooth: Add bt_printk 2011-06-30 19:17:12 -03:00
Makefile Bluetooth: Implement the first SMP commands 2011-06-13 15:11:55 -03:00
mgmt.c Bluetooth: Add support for storing the key size 2011-07-08 18:39:19 -03:00
sco.c Bluetooth: sco: Fix lost wakeups waiting to accept socket 2011-08-11 19:50:26 -03:00
smp.c Bluetooth: Add support for storing the key size 2011-07-08 18:39:19 -03:00