mirror of https://gitee.com/openkylin/linux.git
ath6kl: add a timeout to ath6kl_hif_intr_bh_handler()
It's possible to busyloop forever in ath6kl_hif_intr_bh_handler(). Add a check that it lasts only one second. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
0c30295e4f
commit
d60e8ab6b9
|
@ -485,6 +485,7 @@ static int proc_pending_irqs(struct ath6kl_device *dev, bool *done)
|
||||||
int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)
|
int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)
|
||||||
{
|
{
|
||||||
struct ath6kl_device *dev = ar->htc_target->dev;
|
struct ath6kl_device *dev = ar->htc_target->dev;
|
||||||
|
unsigned long timeout;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
|
||||||
|
@ -498,7 +499,8 @@ int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)
|
||||||
* IRQ processing is synchronous, interrupt status registers can be
|
* IRQ processing is synchronous, interrupt status registers can be
|
||||||
* re-read.
|
* re-read.
|
||||||
*/
|
*/
|
||||||
while (!done) {
|
timeout = jiffies + msecs_to_jiffies(ATH6KL_HIF_COMMUNICATION_TIMEOUT);
|
||||||
|
while (time_before(jiffies, timeout) && !done) {
|
||||||
status = proc_pending_irqs(dev, &done);
|
status = proc_pending_irqs(dev, &done);
|
||||||
if (status)
|
if (status)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -69,6 +69,8 @@
|
||||||
#define ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER (16 * 1024)
|
#define ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER (16 * 1024)
|
||||||
#define ATH6KL_SCATTER_REQS 4
|
#define ATH6KL_SCATTER_REQS 4
|
||||||
|
|
||||||
|
#define ATH6KL_HIF_COMMUNICATION_TIMEOUT 1000
|
||||||
|
|
||||||
struct bus_request {
|
struct bus_request {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue