Re: bluetooth-next HCI user channel issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

any chance you did git bisect this and tell us which patch broken this?

I'll give you a answer/status before the end of next week.

Regards,
Loic


The following patch introduces the regression:
commit bfbd45e9acd2ef90ccc31ea02e08f82af392dbec
Bluetooth: Add device shutdown routine for Intel Bluetooth device

This patch sends the 0xFC3F vendor command from the shutdown callback.
Author says:
"For backward compatibility of this command  with old firmware, this
command was supported before, but it behaves same as HCI_RESET
internally. So, it won't be the problem even if the system doesn't have
the latest firmware patch."

However this patch introduces a HCI user channel regression:
- When hci interface is down/up with hciconfig, no problem.
- When hci interface is re-open via HCI user channel (bluemoon), first
command hangs.

After investigating, this is due to the "first HCI command" bug.
There is the following workaround in btusb_setup_intel:
/* The controller has a bug with the first HCI command sent to it
 * returning number of completed commands as zero. This would stall the
 * command processing in the Bluetooth core.
 *
 * As a workaround, send HCI Reset command first which will reset the
 * number of completed commands and allow normal command processing
 * from now on.
 */

Seems that the 0xFC3F command puts the device in the same kind of state
(Intel init state?).

So we need to apply the same workaround by sending HCI_RESET before any
other command, either in the open callback (QUIRK) or in the shutdown
one (after 0xFC3F).

We don't see the issue with "hciconfig up" because the first command is
always HCI_RESET.

Regards,
Loic

--
Intel Open Source Technology Center
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux