qcacmn: Extend qdf_trigger_self_recovery to include psoc granularity
To undergo self recovery, the driver uses qdf_trigger_self_recovery to initiate the sequence. Currently, this framework is valid for only a single psoc driver. Extend this framework to include support for multiple psoc driver by providing the psoc on which the recovery has to be undertaken. Change-Id: I782b505c03819223a914dabe7673b369aa175b7c CRs-Fixed: 2617707
This commit is contained in:

committed by
nshrivas

parent
1b11ea9161
commit
1f21eadadf
@@ -28,13 +28,15 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_self_recovery_callback() - callback for self recovery
|
* qdf_self_recovery_callback() - callback for self recovery
|
||||||
|
* @psoc: pointer to the posc object
|
||||||
* @reason: the reason for the recovery request
|
* @reason: the reason for the recovery request
|
||||||
* @func: the caller's function name
|
* @func: the caller's function name
|
||||||
* @line: the line number of the callsite
|
* @line: the line number of the callsite
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
typedef void (*qdf_self_recovery_callback)(enum qdf_hang_reason reason,
|
typedef void (*qdf_self_recovery_callback)(void *psoc,
|
||||||
|
enum qdf_hang_reason reason,
|
||||||
const char *func,
|
const char *func,
|
||||||
const uint32_t line);
|
const uint32_t line);
|
||||||
|
|
||||||
@@ -133,6 +135,7 @@ void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_trigger_self_recovery () - trigger self recovery
|
* qdf_trigger_self_recovery () - trigger self recovery
|
||||||
|
* @psoc: the psoc at which the recovery is being triggered
|
||||||
* @reason: the reason for the recovery request
|
* @reason: the reason for the recovery request
|
||||||
*
|
*
|
||||||
* Call API only in case of fatal error,
|
* Call API only in case of fatal error,
|
||||||
@@ -141,9 +144,9 @@ void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback);
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
#define qdf_trigger_self_recovery(reason) \
|
#define qdf_trigger_self_recovery(psoc, reason) \
|
||||||
__qdf_trigger_self_recovery(reason, __func__, __LINE__)
|
__qdf_trigger_self_recovery(psoc, reason, __func__, __LINE__)
|
||||||
void __qdf_trigger_self_recovery(enum qdf_hang_reason reason,
|
void __qdf_trigger_self_recovery(void *psoc, enum qdf_hang_reason reason,
|
||||||
const char *func, const uint32_t line);
|
const char *func, const uint32_t line);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -87,11 +87,11 @@ void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback)
|
|||||||
|
|
||||||
qdf_export_symbol(qdf_register_self_recovery_callback);
|
qdf_export_symbol(qdf_register_self_recovery_callback);
|
||||||
|
|
||||||
void __qdf_trigger_self_recovery(enum qdf_hang_reason reason,
|
void __qdf_trigger_self_recovery(void *psoc, enum qdf_hang_reason reason,
|
||||||
const char *func, const uint32_t line)
|
const char *func, const uint32_t line)
|
||||||
{
|
{
|
||||||
if (self_recovery_cb)
|
if (self_recovery_cb)
|
||||||
self_recovery_cb(reason, func, line);
|
self_recovery_cb(psoc, reason, func, line);
|
||||||
else
|
else
|
||||||
QDF_DEBUG_PANIC_FL(func, line, "");
|
QDF_DEBUG_PANIC_FL(func, line, "");
|
||||||
}
|
}
|
||||||
|
@@ -36,8 +36,6 @@ void target_if_vdev_mgr_rsp_timer_cb(struct vdev_response_timer *vdev_rsp)
|
|||||||
{
|
{
|
||||||
struct wlan_objmgr_psoc *psoc;
|
struct wlan_objmgr_psoc *psoc;
|
||||||
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
|
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
|
||||||
struct crash_inject param;
|
|
||||||
struct wmi_unified *wmi_handle;
|
|
||||||
struct vdev_start_response start_rsp = {0};
|
struct vdev_start_response start_rsp = {0};
|
||||||
struct vdev_stop_response stop_rsp = {0};
|
struct vdev_stop_response stop_rsp = {0};
|
||||||
struct vdev_delete_response del_rsp = {0};
|
struct vdev_delete_response del_rsp = {0};
|
||||||
@@ -137,21 +135,12 @@ void target_if_vdev_mgr_rsp_timer_cb(struct vdev_response_timer *vdev_rsp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Trigger fw recovery to collect fw dump */
|
/* Trigger recovery */
|
||||||
wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
|
|
||||||
if (wmi_handle) {
|
|
||||||
mlme_err("PSOC_%d VDEV_%d: Self recovery, %s rsp timeout",
|
mlme_err("PSOC_%d VDEV_%d: Self recovery, %s rsp timeout",
|
||||||
wlan_psoc_get_id(psoc), vdev_id,
|
wlan_psoc_get_id(psoc), vdev_id,
|
||||||
string_from_rsp_bit(rsp_pos));
|
string_from_rsp_bit(rsp_pos));
|
||||||
qdf_mem_set(¶m, sizeof(param), 0);
|
|
||||||
/* RECOVERY_SIM_ASSERT */
|
qdf_trigger_self_recovery(psoc, QDF_REASON_UNSPECIFIED);
|
||||||
param.type = 0x01;
|
|
||||||
wmi_crash_inject(wmi_handle, ¶m);
|
|
||||||
} else if (target_if_vdev_mgr_is_panic_on_bug()) {
|
|
||||||
QDF_DEBUG_PANIC("PSOC_%d VDEV_%d: Panic, %s response timeout",
|
|
||||||
wlan_psoc_get_id(psoc),
|
|
||||||
vdev_id, string_from_rsp_bit(rsp_pos));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SERIALIZE_VDEV_RESP
|
#ifdef SERIALIZE_VDEV_RESP
|
||||||
|
@@ -1829,7 +1829,8 @@ QDF_STATUS wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf,
|
|||||||
func, line, wmi_handle->wmi_max_cmds);
|
func, line, wmi_handle->wmi_max_cmds);
|
||||||
wmi_unified_debug_dump(wmi_handle);
|
wmi_unified_debug_dump(wmi_handle);
|
||||||
htc_ce_tasklet_debug_dump(wmi_handle->htc_handle);
|
htc_ce_tasklet_debug_dump(wmi_handle->htc_handle);
|
||||||
qdf_trigger_self_recovery(QDF_WMI_EXCEED_MAX_PENDING_CMDS);
|
qdf_trigger_self_recovery(wmi_handle->soc->wmi_psoc,
|
||||||
|
QDF_WMI_EXCEED_MAX_PENDING_CMDS);
|
||||||
return QDF_STATUS_E_BUSY;
|
return QDF_STATUS_E_BUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user