Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369011
b: refs/heads/master
c: bc4445c
h: refs/heads/master
i:
  369009: b16e3cb
  369007: 378f9b7
v: v3
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed Mar 9, 2013
1 parent c8ce3e7 commit 40ff33b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d865b0070485dfbb0611c5dc07fff21c440858a5
refs/heads/master: bc4445c72cb5d1ed5af80c73e60214ab5ebd8e55
7 changes: 3 additions & 4 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,11 @@ static int __hci_req_sync(struct hci_dev *hdev,

hdev->req_status = HCI_REQ_PEND;

add_wait_queue(&hdev->req_wait_q, &wait);
set_current_state(TASK_INTERRUPTIBLE);

func(&req, opt);

err = hci_req_run(&req, hci_req_sync_complete);
if (err < 0) {
hdev->req_status = 0;
remove_wait_queue(&hdev->req_wait_q, &wait);
/* req_run will fail if the request did not add any
* commands to the queue, something that can happen when
* a request with conditionals doesn't trigger any
Expand All @@ -113,6 +109,9 @@ static int __hci_req_sync(struct hci_dev *hdev,
return 0;
}

add_wait_queue(&hdev->req_wait_q, &wait);
set_current_state(TASK_INTERRUPTIBLE);

schedule_timeout(timeout);

remove_wait_queue(&hdev->req_wait_q, &wait);
Expand Down

0 comments on commit 40ff33b

Please sign in to comment.