hci_intel.c (16217dc79dbc599b110dda26d0421df47904bba4) | hci_intel.c (f0a70a04ca10d07a383a89edea142e3cbab1f2ca) |
---|---|
1/* 2 * 3 * Bluetooth HCI UART driver for Intel devices 4 * 5 * Copyright (C) 2015 Intel Corporation 6 * 7 * 8 * This program is free software; you can redistribute it and/or modify --- 114 unchanged lines hidden (view full) --- 123{ 124 struct intel_data *intel = hu->priv; 125 int err; 126 127 err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING, 128 TASK_INTERRUPTIBLE, 129 msecs_to_jiffies(1000)); 130 | 1/* 2 * 3 * Bluetooth HCI UART driver for Intel devices 4 * 5 * Copyright (C) 2015 Intel Corporation 6 * 7 * 8 * This program is free software; you can redistribute it and/or modify --- 114 unchanged lines hidden (view full) --- 123{ 124 struct intel_data *intel = hu->priv; 125 int err; 126 127 err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING, 128 TASK_INTERRUPTIBLE, 129 msecs_to_jiffies(1000)); 130 |
131 if (err == 1) { | 131 if (err == -EINTR) { |
132 bt_dev_err(hu->hdev, "Device boot interrupted"); 133 return -EINTR; 134 } 135 136 if (err) { 137 bt_dev_err(hu->hdev, "Device boot timeout"); 138 return -ETIMEDOUT; 139 } --- 6 unchanged lines hidden (view full) --- 146{ 147 struct intel_data *intel = hu->priv; 148 int err; 149 150 err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, 151 TASK_INTERRUPTIBLE, 152 msecs_to_jiffies(1000)); 153 | 132 bt_dev_err(hu->hdev, "Device boot interrupted"); 133 return -EINTR; 134 } 135 136 if (err) { 137 bt_dev_err(hu->hdev, "Device boot timeout"); 138 return -ETIMEDOUT; 139 } --- 6 unchanged lines hidden (view full) --- 146{ 147 struct intel_data *intel = hu->priv; 148 int err; 149 150 err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, 151 TASK_INTERRUPTIBLE, 152 msecs_to_jiffies(1000)); 153 |
154 if (err == 1) { | 154 if (err == -EINTR) { |
155 bt_dev_err(hu->hdev, "LPM transaction interrupted"); 156 return -EINTR; 157 } 158 159 if (err) { 160 bt_dev_err(hu->hdev, "LPM transaction timeout"); 161 return -ETIMEDOUT; 162 } --- 645 unchanged lines hidden (view full) --- 808 * 809 * The firmware loading should not take longer than 5 seconds 810 * and thus just timeout if that happens and fail the setup 811 * of this device. 812 */ 813 err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, 814 TASK_INTERRUPTIBLE, 815 msecs_to_jiffies(5000)); | 155 bt_dev_err(hu->hdev, "LPM transaction interrupted"); 156 return -EINTR; 157 } 158 159 if (err) { 160 bt_dev_err(hu->hdev, "LPM transaction timeout"); 161 return -ETIMEDOUT; 162 } --- 645 unchanged lines hidden (view full) --- 808 * 809 * The firmware loading should not take longer than 5 seconds 810 * and thus just timeout if that happens and fail the setup 811 * of this device. 812 */ 813 err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, 814 TASK_INTERRUPTIBLE, 815 msecs_to_jiffies(5000)); |
816 if (err == 1) { | 816 if (err == -EINTR) { |
817 bt_dev_err(hdev, "Firmware loading interrupted"); 818 err = -EINTR; 819 goto done; 820 } 821 822 if (err) { 823 bt_dev_err(hdev, "Firmware loading timeout"); 824 err = -ETIMEDOUT; --- 455 unchanged lines hidden --- | 817 bt_dev_err(hdev, "Firmware loading interrupted"); 818 err = -EINTR; 819 goto done; 820 } 821 822 if (err) { 823 bt_dev_err(hdev, "Firmware loading timeout"); 824 err = -ETIMEDOUT; --- 455 unchanged lines hidden --- |