qcacmn: Fix interrupt handling after pdev deinit
The interrupt polling timer needs to be disabled when the host device driver decides to unload. Not handling this would cause in processing of pending interrupts and access data structures that are being deinitialized causing system instability. Change-Id: I505281f36f90bef6e1fbf21a5461260272f7c7cb CRs-Fixed: 2013609
This commit is contained in:
@@ -234,10 +234,13 @@ static void dp_interrupt_timer(void *arg)
|
|||||||
struct dp_soc *soc = (struct dp_soc *) arg;
|
struct dp_soc *soc = (struct dp_soc *) arg;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0 ; i < wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx); i++)
|
if (qdf_atomic_read(&soc->cmn_init_done)) {
|
||||||
dp_service_srngs(&soc->intr_ctx[i], 0xffff);
|
for (i = 0;
|
||||||
|
i < wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx); i++)
|
||||||
|
dp_service_srngs(&soc->intr_ctx[i], 0xffff);
|
||||||
|
|
||||||
qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS);
|
qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -716,7 +719,7 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (soc->cmn_init_done)
|
if (qdf_atomic_read(&soc->cmn_init_done))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (dp_peer_find_attach(soc))
|
if (dp_peer_find_attach(soc))
|
||||||
@@ -857,7 +860,7 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
|
|||||||
/* Setup HW REO */
|
/* Setup HW REO */
|
||||||
hal_reo_setup(soc->hal_soc);
|
hal_reo_setup(soc->hal_soc);
|
||||||
|
|
||||||
soc->cmn_init_done = 1;
|
qdf_atomic_set(&soc->cmn_init_done, 1);
|
||||||
return 0;
|
return 0;
|
||||||
fail1:
|
fail1:
|
||||||
/*
|
/*
|
||||||
@@ -1152,7 +1155,7 @@ static void dp_soc_detach_wifi3(void *txrx_soc)
|
|||||||
struct dp_soc *soc = (struct dp_soc *)txrx_soc;
|
struct dp_soc *soc = (struct dp_soc *)txrx_soc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
soc->cmn_init_done = 0;
|
qdf_atomic_set(&soc->cmn_init_done, 0);
|
||||||
|
|
||||||
dp_soc_interrupt_detach(soc);
|
dp_soc_interrupt_detach(soc);
|
||||||
|
|
||||||
|
@@ -281,7 +281,7 @@ struct dp_soc {
|
|||||||
void *htt_handle;
|
void *htt_handle;
|
||||||
|
|
||||||
/* Commint init done */
|
/* Commint init done */
|
||||||
bool cmn_init_done;
|
qdf_atomic_t cmn_init_done;
|
||||||
|
|
||||||
/* Opaque hif handle */
|
/* Opaque hif handle */
|
||||||
struct hif_opaque_softc *hif_handle;
|
struct hif_opaque_softc *hif_handle;
|
||||||
|
Reference in New Issue
Block a user