Hi,
The module refcount is increased by hci_dev_hold() call in hci_conn_add() i=
n hci_conn.c, and it is decreased by hci_dev_put() call in "del_conn" (hci_=
sysfs.c).
In case connection timeout happens, hci_dev_put() is never called.
Procedure to reproduce the issue:
# hciconfig hci0 up
# lsmod | grep btusb -> "used by" refcount =3D 1
# hcitool cc <non-exisiting bdaddr> -> will get timeout
# lsmod | grep btusb -> "used by" refcount =3D 2
# hciconfig hci0 down
# lsmod | grep btusb -> "used by" refcount =3D 1
# rmmod btusb -> ERROR: Module btusb is in use
Regards,
Bing