qcacld-3.0: Fix spin_lock deadlock issue for resume/wakeup

If resume and fw wakeup happens at the same time.
psoc_ctx->lock maybe doing bottom half operation for resume,
then wakeup interrupt comes on same cpu, the interrupt
handler will also acquire psoc_ctx->lock in
pmo_core_update_wow_initial_wake_up, which cause dead lock.

Using atomic for wow_initial_wake_up, so the interrupt handler
can avoid using spin_lock.

Change-Id: Id0e963a0924415e9660c57a1c1b776d3e609213d
CRs-Fixed: 2624899
This commit is contained in:
Jingxiang Ge
2020-02-19 16:15:55 +08:00
committed by nshrivas
parent 9465ea0c01
commit ad6337f2b0
4 changed files with 16 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -235,7 +235,7 @@ struct pmo_wow {
qdf_event_t target_suspend;
qdf_event_t target_resume;
int wow_nack;
bool wow_initial_wake_up;
atomic_t wow_initial_wake_up;
qdf_wake_lock_t wow_wake_lock;
/*
* currently supports only vdev 0.