qcacld-3.0: skip debug domain transition if system is rebooting
Considering the case as below: System shutdown comes when ndo_open is waiting for cnss power up complete. cnss shutdown handler completes all of the completions, and so ndo_open continues. while at the same time, cnss driver is processing firmware ready event and trying to start cld modules, which will change debug domain from INIT to ACTIVE, then it may hit debug domain mismatch assertion: It allocates some memory in ndo_open context when debug domain is INIT, but when trying to free the memory, the debug domain is ACTIVE. To fix this issue, when system reboot is in progress, skip debug domain transition, and also skip modules start to avoid state mismatch between cnss driver and CLD driver. Change-Id: Ibc411e13e48269c66ec71aba6304578c9049f798 CRs-Fixed: 3470170
Tento commit je obsažen v:
@@ -69,6 +69,7 @@
|
||||
* @CDS_DRIVER_STATE_FW_READY: Driver Firmware ready
|
||||
* @CDS_DRIVER_STATE_MODULE_STOP: Module stop in progress or done.
|
||||
* @CDS_DRIVER_STATE_ASSERTING_TARGET: Driver assert target in progress.
|
||||
* @CDS_DRIVER_STATE_SYS_REBOOTING: System reboot in progress.
|
||||
*/
|
||||
enum cds_driver_state {
|
||||
CDS_DRIVER_STATE_UNINITIALIZED = 0,
|
||||
@@ -80,6 +81,7 @@ enum cds_driver_state {
|
||||
CDS_DRIVER_STATE_FW_READY = BIT(5),
|
||||
CDS_DRIVER_STATE_MODULE_STOP = BIT(6),
|
||||
CDS_DRIVER_STATE_ASSERTING_TARGET = BIT(7),
|
||||
CDS_DRIVER_STATE_SYS_REBOOTING = BIT(8),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -326,6 +328,31 @@ static inline bool cds_is_target_asserting(void)
|
||||
return __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_ASSERTING_TARGET);
|
||||
}
|
||||
|
||||
/**
|
||||
* cds_set_sys_rebooting() - Set system reboot in progress
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void cds_set_sys_rebooting(void);
|
||||
|
||||
/**
|
||||
* cds_sys_reboot_protect() - Require the lock for system reboot and get
|
||||
* system rebooting state
|
||||
*
|
||||
* cds_sys_reboot_protect() and cds_sys_reboot_unprotect() MUST be used
|
||||
* in pair.
|
||||
*
|
||||
* Return: true if system is rebooting, false otherwise
|
||||
*/
|
||||
bool cds_sys_reboot_protect(void);
|
||||
|
||||
/**
|
||||
* cds_sys_reboot_unprotect() - Release the lock for system reboot
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void cds_sys_reboot_unprotect(void);
|
||||
|
||||
/**
|
||||
* cds_init() - Initialize CDS
|
||||
*
|
||||
|
@@ -218,6 +218,9 @@ struct cds_context {
|
||||
qdf_work_t cds_recovery_work;
|
||||
qdf_workqueue_t *cds_recovery_wq;
|
||||
enum qdf_hang_reason recovery_reason;
|
||||
|
||||
/* To protect bit(CDS_DRIVER_STATE_SYS_REBOOTING) of driver_state */
|
||||
qdf_mutex_t sys_reboot_lock;
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele