aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r--drivers/bluetooth/btusb.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5d9cc53bd643..d22ce3cc611e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -59,6 +59,9 @@ static struct usb_device_id btusb_table[] = {
59 /* Generic Bluetooth USB device */ 59 /* Generic Bluetooth USB device */
60 { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, 60 { USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
61 61
62 /* Apple iMac11,1 */
63 { USB_DEVICE(0x05ac, 0x8215) },
64
62 /* AVM BlueFRITZ! USB v2.0 */ 65 /* AVM BlueFRITZ! USB v2.0 */
63 { USB_DEVICE(0x057c, 0x3800) }, 66 { USB_DEVICE(0x057c, 0x3800) },
64 67
@@ -146,6 +149,7 @@ static struct usb_device_id blacklist_table[] = {
146#define BTUSB_BULK_RUNNING 1 149#define BTUSB_BULK_RUNNING 1
147#define BTUSB_ISOC_RUNNING 2 150#define BTUSB_ISOC_RUNNING 2
148#define BTUSB_SUSPENDING 3 151#define BTUSB_SUSPENDING 3
152#define BTUSB_DID_ISO_RESUME 4
149 153
150struct btusb_data { 154struct btusb_data {
151 struct hci_dev *hdev; 155 struct hci_dev *hdev;
@@ -179,7 +183,6 @@ struct btusb_data {
179 unsigned int sco_num; 183 unsigned int sco_num;
180 int isoc_altsetting; 184 int isoc_altsetting;
181 int suspend_count; 185 int suspend_count;
182 int did_iso_resume:1;
183}; 186};
184 187
185static int inc_tx(struct btusb_data *data) 188static int inc_tx(struct btusb_data *data)
@@ -807,7 +810,7 @@ static void btusb_work(struct work_struct *work)
807 int err; 810 int err;
808 811
809 if (hdev->conn_hash.sco_num > 0) { 812 if (hdev->conn_hash.sco_num > 0) {
810 if (!data->did_iso_resume) { 813 if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
811 err = usb_autopm_get_interface(data->isoc); 814 err = usb_autopm_get_interface(data->isoc);
812 if (err < 0) { 815 if (err < 0) {
813 clear_bit(BTUSB_ISOC_RUNNING, &data->flags); 816 clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
@@ -815,7 +818,7 @@ static void btusb_work(struct work_struct *work)
815 return; 818 return;
816 } 819 }
817 820
818 data->did_iso_resume = 1; 821 set_bit(BTUSB_DID_ISO_RESUME, &data->flags);
819 } 822 }
820 if (data->isoc_altsetting != 2) { 823 if (data->isoc_altsetting != 2) {
821 clear_bit(BTUSB_ISOC_RUNNING, &data->flags); 824 clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
@@ -836,10 +839,8 @@ static void btusb_work(struct work_struct *work)
836 usb_kill_anchored_urbs(&data->isoc_anchor); 839 usb_kill_anchored_urbs(&data->isoc_anchor);
837 840
838 __set_isoc_interface(hdev, 0); 841 __set_isoc_interface(hdev, 0);
839 if (data->did_iso_resume) { 842 if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
840 data->did_iso_resume = 0;
841 usb_autopm_put_interface(data->isoc); 843 usb_autopm_put_interface(data->isoc);
842 }
843 } 844 }
844} 845}
845 846