diff options
Diffstat (limited to 'patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch')
-rw-r--r-- | patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch index 35297c72..22e8c2dd 100644 --- a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch +++ b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch @@ -1,32 +1,32 @@ --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -1841,8 +1841,12 @@ static int btusb_recv_event_intel(struct - if (test_and_clear_bit(BTUSB_DOWNLOADING, - &data->flags) && - test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) { +@@ -2151,8 +2151,12 @@ static void btusb_intel_bootup(struct bt + return; + + if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&data->flags, BTUSB_DOWNLOADING); + smp_mb__after_atomic(); + wake_up_bit(&data->flags, BTUSB_BOOTING); +#else -+ wake_up_interruptible(&hdev->req_wait_q); ++ wake_up_interruptible(&data->hdev->req_wait_q); +#endif - } - } + } + } -@@ -1853,8 +1857,12 @@ static int btusb_recv_event_intel(struct - if (skb->len == 9 && hdr->evt == 0xff && hdr->plen == 0x07 && - skb->data[2] == 0x02) { - if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) { +@@ -2169,8 +2173,12 @@ static void btusb_intel_secure_send_resu + + if (test_and_clear_bit(BTUSB_DOWNLOADING, &data->flags) && + test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&data->flags, BTUSB_BOOTING); + smp_mb__after_atomic(); + wake_up_bit(&data->flags, BTUSB_DOWNLOADING); +#else -+ wake_up_interruptible(&hdev->req_wait_q); ++ wake_up_interruptible(&data->hdev->req_wait_q); +#endif - } - } } -@@ -2222,6 +2230,7 @@ static int btusb_setup_intel_new(struct + } + +@@ -2569,6 +2577,7 @@ static int btusb_setup_intel_new(struct * and thus just timeout if that happens and fail the setup * of this device. */ @@ -34,7 +34,7 @@ err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING, TASK_INTERRUPTIBLE, msecs_to_jiffies(5000)); -@@ -2236,6 +2245,31 @@ static int btusb_setup_intel_new(struct +@@ -2583,6 +2592,31 @@ static int btusb_setup_intel_new(struct err = -ETIMEDOUT; goto done; } @@ -66,7 +66,7 @@ if (test_bit(BTUSB_FIRMWARE_FAILED, &data->flags)) { BT_ERR("%s: Firmware loading failed", hdev->name); -@@ -2275,6 +2309,7 @@ done: +@@ -2622,6 +2656,7 @@ done: */ BT_INFO("%s: Waiting for device to boot", hdev->name); @@ -74,7 +74,7 @@ err = wait_on_bit_timeout(&data->flags, BTUSB_BOOTING, TASK_INTERRUPTIBLE, msecs_to_jiffies(1000)); -@@ -2288,6 +2323,33 @@ done: +@@ -2635,6 +2670,33 @@ done: BT_ERR("%s: Device boot timeout", hdev->name); return -ETIMEDOUT; } |