Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203881
b: refs/heads/master
c: 08b8b6c
h: refs/heads/master
i:
  203879: 103dd90
v: v3
  • Loading branch information
Gustavo F. Padovan authored and Marcel Holtmann committed Jul 21, 2010
1 parent bffdbfe commit 74f28fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 5d8868ff3d11e3fc5a5c07477f281a16c71714a3
refs/heads/master: 08b8b6c454092ae19cea82787b86ee9596ae1951
10 changes: 4 additions & 6 deletions trunk/drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static struct usb_device_id blacklist_table[] = {
#define BTUSB_BULK_RUNNING 1
#define BTUSB_ISOC_RUNNING 2
#define BTUSB_SUSPENDING 3
#define BTUSB_DID_ISO_RESUME 4

struct btusb_data {
struct hci_dev *hdev;
Expand Down Expand Up @@ -182,7 +183,6 @@ struct btusb_data {
unsigned int sco_num;
int isoc_altsetting;
int suspend_count;
int did_iso_resume:1;
};

static int inc_tx(struct btusb_data *data)
Expand Down Expand Up @@ -810,15 +810,15 @@ static void btusb_work(struct work_struct *work)
int err;

if (hdev->conn_hash.sco_num > 0) {
if (!data->did_iso_resume) {
if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
err = usb_autopm_get_interface(data->isoc);
if (err < 0) {
clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
usb_kill_anchored_urbs(&data->isoc_anchor);
return;
}

data->did_iso_resume = 1;
set_bit(BTUSB_DID_ISO_RESUME, &data->flags);
}
if (data->isoc_altsetting != 2) {
clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
Expand All @@ -839,10 +839,8 @@ static void btusb_work(struct work_struct *work)
usb_kill_anchored_urbs(&data->isoc_anchor);

__set_isoc_interface(hdev, 0);
if (data->did_iso_resume) {
data->did_iso_resume = 0;
if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
usb_autopm_put_interface(data->isoc);
}
}
}

Expand Down

0 comments on commit 74f28fd

Please sign in to comment.