Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 00/14] Bluetooth: Add HCI transaction framework
@ 2013-02-22 13:12 Johan Hedberg
  2013-02-22 13:12 ` [PATCH 01/14] Bluetooth: Fix __hci_request() handling of empty requests Johan Hedberg
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Johan Hedberg @ 2013-02-22 13:12 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

This is in practice the 4th iteration of the transaction patch set but
since almost no patch matches what was in the earlier iterations I
decided to just leave out the v4 identifier.

The main change compared to the previous patch sets is that the
transaction state is tracked as part of the actual skbs (using the skb
control buffer) instead of some higher-level struct. This means that
hdev->build_transaction, hdev->current_transaction and even the
transaction lock can go away.

There is still a struct hci_transaction, but its purpose is the same as
the old hdev->build_transaction and it's expected to be a stack variable
instead of something dynamically allocated.

The main issue by moving the transaction flow completely into
hdev->cmd_q is that we can no longer easily modify a transaction while
it is already executing. The only transaction that was needing this this
was the init request, and the solution taken was to rewrite the init
request without these on-the-fly conditionals and do it in three
separate stages instead, each with its own __hci_request call. The first
two patches of this set deal with this rework.

While I was fixing the mgmt code for the set_powered HCI command
synchronization bug I also discovered another similar issue with
add_uuid, remove_uuid and set_dev_class. By taking advantage of a
transaction this issue is fixed by patch 12/14.

Johan

----------------------------------------------------------------
Johan Hedberg (14):
      Bluetooth: Fix __hci_request() handling of empty requests
      Bluetooth: Split HCI init sequence into three stages
      Bluetooth: Add initial skeleton for HCI transaction framework
      Bluetooth: Refactor HCI command skb creation
      Bluetooth: Introduce new hci_transaction_cmd function
      Bluetooth: Introduce a hci_transaction_from_skb function
      Bluetooth: Add transaction cmd_complete and cmd_status functions
      Bluetooth: Convert hci_request to use HCI transaction framework
      Bluetooth: Update mgmt powered HCI commands to use transactions
      Bluetooth: Wait for HCI command completion with mgmt_set_powered
      Bluetooth: Fix busy condition testing for EIR and class updates
      Bluetooth: Fix UUID/class mgmt command response synchronization
      Bluetooth: Remove useless HCI_PENDING_CLASS flag
      Bluetooth: Remove empty HCI event handlers

 include/net/bluetooth/bluetooth.h |   11 +
 include/net/bluetooth/hci_core.h  |   20 +-
 net/bluetooth/hci_core.c          |  647 ++++++++++++++++++++++++++++++++-----
 net/bluetooth/hci_event.c         |  507 +----------------------------
 net/bluetooth/hci_sock.c          |    3 +-
 net/bluetooth/mgmt.c              |  326 ++++++++++++-------
 6 files changed, 830 insertions(+), 684 deletions(-)


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-02-22 14:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 13:12 [PATCH 00/14] Bluetooth: Add HCI transaction framework Johan Hedberg
2013-02-22 13:12 ` [PATCH 01/14] Bluetooth: Fix __hci_request() handling of empty requests Johan Hedberg
2013-02-22 13:12 ` [PATCH 02/14] Bluetooth: Split HCI init sequence into three stages Johan Hedberg
2013-02-22 13:12 ` [PATCH 03/14] Bluetooth: Add initial skeleton for HCI transaction framework Johan Hedberg
2013-02-22 13:34   ` [PATCH 03/14 v2] " Johan Hedberg
2013-02-22 13:12 ` [PATCH 04/14] Bluetooth: Refactor HCI command skb creation Johan Hedberg
2013-02-22 13:12 ` [PATCH 05/14] Bluetooth: Introduce new hci_transaction_cmd function Johan Hedberg
2013-02-22 13:12 ` [PATCH 06/14] Bluetooth: Introduce a hci_transaction_from_skb function Johan Hedberg
2013-02-22 13:12 ` [PATCH 07/14] Bluetooth: Add transaction cmd_complete and cmd_status functions Johan Hedberg
2013-02-22 14:17   ` Vinicius Costa Gomes
2013-02-22 14:31     ` Johan Hedberg
2013-02-22 13:12 ` [PATCH 08/14] Bluetooth: Convert hci_request to use HCI transaction framework Johan Hedberg
2013-02-22 13:12 ` [PATCH 09/14] Bluetooth: Update mgmt powered HCI commands to use transactions Johan Hedberg
2013-02-22 13:12 ` [PATCH 10/14] Bluetooth: Wait for HCI command completion with mgmt_set_powered Johan Hedberg
2013-02-22 13:12 ` [PATCH 11/14] Bluetooth: Fix busy condition testing for EIR and class updates Johan Hedberg
2013-02-22 13:12 ` [PATCH 12/14] Bluetooth: Fix UUID/class mgmt command response synchronization Johan Hedberg
2013-02-22 13:12 ` [PATCH 13/14] Bluetooth: Remove useless HCI_PENDING_CLASS flag Johan Hedberg
2013-02-22 13:12 ` [PATCH 14/14] Bluetooth: Remove empty HCI event handlers Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox