From 2ba8fbc5d4f33ef6cf5c332667d4541471c51015 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 15 Nov 2015 17:44:11 +0100 Subject: patches: refresh on v4.3 1 3.0.101 [ OK ] 2 3.1.10 [ OK ] 3 3.2.72 [ OK ] 4 3.3.8 [ OK ] 5 3.4.110 [ OK ] 6 3.5.7 [ OK ] 7 3.6.11 [ OK ] 8 3.7.10 [ OK ] 9 3.8.13 [ OK ] 10 3.9.11 [ OK ] 11 3.10.92 [ OK ] 12 3.11.10 [ OK ] 13 3.12.49 [ OK ] 14 3.13.11 [ OK ] 15 3.14.56 [ OK ] 16 3.15.10 [ OK ] 17 3.16.7 [ OK ] 18 3.17.8 [ OK ] 19 3.18.23 [ OK ] 20 3.19.8 [ OK ] 21 4.0.9 [ OK ] 22 4.1.12 [ OK ] 23 4.2.5 [ OK ] 24 4.3-rc7 [ OK ] Signed-off-by: Hauke Mehrtens --- .../hci_intel.patch | 81 +++------------------- 1 file changed, 8 insertions(+), 73 deletions(-) (limited to 'patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch') diff --git a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch index 89e42d14..54d7bdf0 100644 --- a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch +++ b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch @@ -1,6 +1,6 @@ --- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c -@@ -122,8 +122,9 @@ static u8 intel_convert_speed(unsigned i +@@ -94,8 +94,9 @@ static u8 intel_convert_speed(unsigned i static int intel_wait_booting(struct hci_uart *hu) { struct intel_data *intel = hu->priv; @@ -11,8 +11,8 @@ err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING, TASK_INTERRUPTIBLE, msecs_to_jiffies(1000)); -@@ -137,6 +138,33 @@ static int intel_wait_booting(struct hci - bt_dev_err(hu->hdev, "Device boot timeout"); +@@ -109,6 +110,33 @@ static int intel_wait_booting(struct hci + BT_ERR("%s: Device boot timeout", hu->hdev->name); return -ETIMEDOUT; } +#else @@ -45,48 +45,7 @@ return err; } -@@ -144,8 +172,9 @@ static int intel_wait_booting(struct hci - static int intel_wait_lpm_transaction(struct hci_uart *hu) - { - struct intel_data *intel = hu->priv; -- int err; -+ int err = 0; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(1000)); -@@ -159,6 +188,29 @@ static int intel_wait_lpm_transaction(st - bt_dev_err(hu->hdev, "LPM transaction timeout"); - return -ETIMEDOUT; - } -+#else -+ if (test_bit(STATE_LPM_TRANSACTION, &intel->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hu->hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ timeout = schedule_timeout(msecs_to_jiffies(1000)); -+ -+ remove_wait_queue(&hu->hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: LPM transaction interrupted", hu->hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: LPM transaction timeout", hu->hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - return err; - } -@@ -826,6 +878,7 @@ static int intel_setup(struct hci_uart * +@@ -576,6 +604,7 @@ static int intel_setup(struct hci_uart * * and thus just timeout if that happens and fail the setup * of this device. */ @@ -94,7 +53,7 @@ err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, TASK_INTERRUPTIBLE, msecs_to_jiffies(5000)); -@@ -840,6 +893,33 @@ static int intel_setup(struct hci_uart * +@@ -590,6 +619,33 @@ static int intel_setup(struct hci_uart * err = -ETIMEDOUT; goto done; } @@ -127,8 +86,8 @@ +#endif if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) { - bt_dev_err(hdev, "Firmware loading failed"); -@@ -968,8 +1048,12 @@ static int intel_recv_event(struct hci_d + BT_ERR("%s: Firmware loading failed", hdev->name); +@@ -689,8 +745,12 @@ static int intel_recv_event(struct hci_d if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) && test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) { @@ -141,7 +100,7 @@ } /* When switching to the operational firmware the device -@@ -979,8 +1063,12 @@ static int intel_recv_event(struct hci_d +@@ -700,8 +760,12 @@ static int intel_recv_event(struct hci_d } else if (skb->len == 9 && hdr->evt == 0xff && hdr->plen == 0x07 && skb->data[2] == 0x02) { if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) { @@ -154,27 +113,3 @@ } } recv: -@@ -1019,15 +1107,23 @@ static int intel_recv_lpm(struct hci_dev - case LPM_OP_SUSPEND_ACK: - set_bit(STATE_SUSPENDED, &intel->flags); - if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - break; - case LPM_OP_RESUME_ACK: - clear_bit(STATE_SUSPENDED, &intel->flags); - if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - break; - default: -- cgit v1.2.3