qcacmn: Add timeout for BMI message exchange
qcacld-2.0 to qcacmn propagation Currently there is no timeout for BMI message exchange. If HW interface is stuck, kernel thread for driver loading will be blocked. Change-Id: Ia7039f2939cf39af605a8ebec3278c5e1685bfbe CRs-Fixed: 2228298
This commit is contained in:

committad av
nshrivas

förälder
a6ba9eefb4
incheckning
eb5dc5bd68
@@ -115,6 +115,9 @@ void hif_bmi_recv_data(struct CE_handle *copyeng, void *ce_context,
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Timeout for BMI message exchange */
|
||||
#define HIF_EXCHANGE_BMI_MSG_TIMEOUT 6000
|
||||
|
||||
QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx,
|
||||
qdf_dma_addr_t bmi_cmd_da,
|
||||
qdf_dma_addr_t bmi_rsp_da,
|
||||
@@ -216,9 +219,13 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx,
|
||||
/* Always just wait for BMI request here if
|
||||
* BMI_RSP_POLLING is defined
|
||||
*/
|
||||
while (qdf_semaphore_acquire
|
||||
(&transaction->bmi_transaction_sem)) {
|
||||
/*need some break out condition(time out?) */
|
||||
if (qdf_semaphore_acquire_timeout
|
||||
(&transaction->bmi_transaction_sem,
|
||||
HIF_EXCHANGE_BMI_MSG_TIMEOUT)) {
|
||||
HIF_ERROR("%s: Fatal error, BMI transaction timeout. Please check the HW interface!!",
|
||||
__func__);
|
||||
qdf_mem_free(transaction);
|
||||
return QDF_STATUS_E_TIMEOUT;
|
||||
}
|
||||
|
||||
if (bmi_response) {
|
||||
|
Referens i nytt ärende
Block a user