diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-09-17 23:31:36 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-19 11:04:33 +0200 |
commit | ab3fd3b9a801a9faa2619e2e65207e736f859a6d (patch) | |
tree | f0a6425fe00ba440e966570e662e6ff9c738d230 /patches/0053-remove_wait_on_bit_timeout/hci_intel.patch | |
parent | 30a378636e473278ff65800b1fe58822e36d716c (diff) |
backports: Remove unused parts
This removes parts which were only used by subsystems which are not
included in backports any more, for example media, bluetooth and
Ethernet.
The patches which are removed in this commit are not applied to the
kernel tree anyway with the default configuration because non of the
files get copied. The freezer, media, regulator and sound parts were
only used by the already removed media drivers. The flow dissector file
is not copied any more.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches/0053-remove_wait_on_bit_timeout/hci_intel.patch')
-rw-r--r-- | patches/0053-remove_wait_on_bit_timeout/hci_intel.patch | 180 |
1 files changed, 0 insertions, 180 deletions
diff --git a/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch b/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch deleted file mode 100644 index c32df12c..00000000 --- a/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- a/drivers/bluetooth/hci_intel.c -+++ b/drivers/bluetooth/hci_intel.c -@@ -122,8 +122,9 @@ static u8 intel_convert_speed(unsigned i - static int intel_wait_booting(struct hci_uart *hu) - { - struct intel_data *intel = hu->priv; -- int err; -+ int err = 0; - -+#if LINUX_VERSION_IS_GEQ(3,17,0) - 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"); - return -ETIMEDOUT; - } -+#else -+ if (test_bit(STATE_BOOTING, &intel->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hu->hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* Booting into operational firmware should not take -+ * longer than 1 second. However if that happens, then -+ * just fail the setup since something went wrong. -+ */ -+ timeout = schedule_timeout(msecs_to_jiffies(1000)); -+ -+ remove_wait_queue(&hu->hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: Device boot interrupted", hu->hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: Device boot timeout", hu->hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - return err; - } -@@ -145,8 +173,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_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(1000)); -@@ -160,6 +189,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; - } -@@ -812,6 +864,7 @@ static int intel_setup(struct hci_uart * - * and thus just timeout if that happens and fail the setup - * of this device. - */ -+#if LINUX_VERSION_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(5000)); -@@ -826,6 +879,33 @@ static int intel_setup(struct hci_uart * - err = -ETIMEDOUT; - goto done; - } -+#else -+ if (test_bit(STATE_DOWNLOADING, &intel->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* Booting into operational firmware should not take -+ * longer than 1 second. However if that happens, then -+ * just fail the setup since something went wrong. -+ */ -+ timeout = schedule_timeout(msecs_to_jiffies(5000)); -+ -+ remove_wait_queue(&hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: Firmware loading interrupted", hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: Firmware loading timeout", hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) { - bt_dev_err(hdev, "Firmware loading failed"); -@@ -957,8 +1037,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)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_DOWNLOADING); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - - /* When switching to the operational firmware the device -@@ -968,8 +1052,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)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_BOOTING); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - } - recv: -@@ -1008,15 +1096,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_IS_GEQ(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_IS_GEQ(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: |