Return-Path: MIME-Version: 1.0 In-Reply-To: <6D8CE567-F4C5-42BE-8E0E-5D558E9C439D@holtmann.org> References: <6D8CE567-F4C5-42BE-8E0E-5D558E9C439D@holtmann.org> From: Alex Deymo Date: Wed, 19 Jun 2013 20:18:09 -0700 Message-ID: Subject: Re: [BUG] HCI_RESET and Num_HCI_Command_Packets limit To: Marcel Holtmann Cc: linux-bluetooth , keybuk Content-Type: text/plain; charset=ISO-8859-1 List-ID: Hi Marcel, On Wed, Jun 19, 2013 at 6:04 PM, Marcel Holtmann wrote: > Hi Alex, > >> I'm experiencing a problem that wedges the bluetooth adapter from time >> to time. The repro case can be hit with this scenario: >> >> run bluetoothd >> while hciconfig hci0 up && hciconfig hci0 down; do echo -n .; done >> >> In few iterations you will have a timeout while trying to bring up the >> interface. This is just a repro case, the real scenario just happens >> from time to time if you for instance restart bluetoothd at the right >> (or wrong!) moment. > > can you give us at least a few details on the kernel you are running and what hardware this is? I'm running kernel 3.8.11 on a x86_64 and BlueZ 5.4. The hardware is a chromebook (I saw it with different hardware and I can also repro it on my ubuntu) that uses the ath9k and ath3k drivers for the wifi/bt chip (MD222) > If you do not use hciconfig and instead use btmgmt or bluetoothctl, do you see the same issue? Using btmgmt I see the same issue with a very similar hcidump (just the timing is different). while btmgmt power on && btmgmt power off; do echo -n; done btmgmt power on after about 4 iterations is blocked and never returns. Using the dbus interface to the running bluetoothd apparently doesn't hit the problem (ran fine for a few hundred times) while dbus-send --system --print-reply --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:true && dbus-send --system --print-reply --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:false; do echo -n; done Regards, Alex.