qcacmn: Record data if pci write during suspended state
When FW was enabling WOW, a ring HP update interrupt is seen which led to fw crash. This change records any PCI writes that went through during runtime suspend from host. Change-Id: I3c44760ebaf49a131b483813522fe3e451957215 CRs-Fixed: 3280166
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c0e0b4f1e1
commit
61b836202a
@@ -978,6 +978,38 @@ static inline void hal_delayed_reg_write_deinit(struct hal_soc *hal)
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_HAL_DELAYED_REG_WRITE
|
||||
#ifdef HAL_RECORD_SUSPEND_WRITE
|
||||
static struct hal_suspend_write_history
|
||||
g_hal_suspend_write_history[HAL_SUSPEND_WRITE_HISTORY_MAX];
|
||||
|
||||
static
|
||||
void hal_event_suspend_record(uint8_t ring_id, uint32_t value, uint32_t count)
|
||||
{
|
||||
uint32_t index = qdf_atomic_read(g_hal_suspend_write_history.index) &
|
||||
(HAL_SUSPEND_WRITE_HISTORY_MAX - 1);
|
||||
struct hal_suspend_write_record *cur_event =
|
||||
&hal_suspend_write_event.record[index];
|
||||
|
||||
cur_event->ts = qdf_get_log_timestamp();
|
||||
cur_event->ring_id = ring_id;
|
||||
cur_event->value = value;
|
||||
cur_event->direct_wcount = count;
|
||||
qdf_atomic_inc(g_hal_suspend_write_history.index);
|
||||
}
|
||||
|
||||
static inline
|
||||
void hal_record_suspend_write(uint8_t ring_id, uint32_t value, uint32_t count)
|
||||
{
|
||||
if (hif_rtpm_get_state() >= HIF_RTPM_STATE_SUSPENDING)
|
||||
hal_event_suspend_record(ring_id, value, count);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
void hal_record_suspend_write(uint8_t ring_id, uint32_t value, uint32_t count)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QCA_WIFI_QCA6750
|
||||
void hal_delayed_reg_write(struct hal_soc *hal_soc,
|
||||
struct hal_srng *srng,
|
||||
@@ -1034,6 +1066,8 @@ void hal_delayed_reg_write(struct hal_soc *hal_soc,
|
||||
} else {
|
||||
hal_reg_write_enqueue(hal_soc, srng, addr, value);
|
||||
}
|
||||
|
||||
hal_record_suspend_write(srng->ring_id, value, srng->wstats.direct);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user