Hi Bing, > > > The module refcount is increased by hci_dev_hold() call in hci_conn_add() in 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. > > > > can you test the attached patch for quickly. It should fix it. > > It seems that hdev is "put" twice with the patch, if the connection fails. > > # hciconfig hci0 up > # lsmod | grep btusb -> "used by" refcount = 1 > > # hcitool cc -> will get timeout > # lsmod | grep btusb -> "used by" refcount = 0 (??) > > # hcitool cc -> time out again > # lsmod | grep btusb -> "used by" refcount = 4294967295 (??) the previous patch has one tiny bug. Is this one better? Regards Marcel