qcacmn: use proper HAL abtraction APIs to get WBM internal error
the current HAL API is to read the WBM internal error bit from the wbm release ring descriptor is always taking HKv1 HW structure. But the wbm_internal_error bit placement has changed from HKv2, for this reason we have to use target specific HAL API. Change-Id: I44789180754ca21ae59650b6d8620321a1f12569
This commit is contained in:

committed by
nshrivas

parent
ccf5b37f7d
commit
fa6f80fcad
@@ -3544,9 +3544,9 @@ more_data:
|
|||||||
* completion ring. These errors are not related to
|
* completion ring. These errors are not related to
|
||||||
* Tx completions, and should just be ignored
|
* Tx completions, and should just be ignored
|
||||||
*/
|
*/
|
||||||
|
wbm_internal_error = hal_get_wbm_internal_error(
|
||||||
wbm_internal_error =
|
soc->hal_soc,
|
||||||
hal_get_wbm_internal_error(tx_comp_hal_desc);
|
tx_comp_hal_desc);
|
||||||
|
|
||||||
if (wbm_internal_error) {
|
if (wbm_internal_error) {
|
||||||
dp_err_rl("Tx comp wbm_internal_error!!");
|
dp_err_rl("Tx comp wbm_internal_error!!");
|
||||||
|
@@ -1861,6 +1861,24 @@ static inline uint8_t hal_tx_comp_get_release_reason_generic(void *hal_desc)
|
|||||||
WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB;
|
WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_get_wbm_internal_error_generic() - is WBM internal error
|
||||||
|
* @hal_desc: completion ring descriptor pointer
|
||||||
|
*
|
||||||
|
* This function will return 0 or 1 - is it WBM internal error or not
|
||||||
|
*
|
||||||
|
* Return: uint8_t
|
||||||
|
*/
|
||||||
|
static inline uint8_t hal_get_wbm_internal_error_generic(void *hal_desc)
|
||||||
|
{
|
||||||
|
uint32_t comp_desc =
|
||||||
|
*(uint32_t *)(((uint8_t *)hal_desc) +
|
||||||
|
WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET);
|
||||||
|
|
||||||
|
return (comp_desc & WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK) >>
|
||||||
|
WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_rx_dump_mpdu_start_tlv_generic: dump RX mpdu_start TLV in structured
|
* hal_rx_dump_mpdu_start_tlv_generic: dump RX mpdu_start TLV in structured
|
||||||
* human readable format.
|
* human readable format.
|
||||||
|
@@ -372,6 +372,7 @@ struct hal_hw_txrx_ops {
|
|||||||
void (*hal_tx_comp_get_status)(void *desc, void *ts,
|
void (*hal_tx_comp_get_status)(void *desc, void *ts,
|
||||||
struct hal_soc *hal);
|
struct hal_soc *hal);
|
||||||
uint8_t (*hal_tx_comp_get_release_reason)(void *hal_desc);
|
uint8_t (*hal_tx_comp_get_release_reason)(void *hal_desc);
|
||||||
|
uint8_t (*hal_get_wbm_internal_error)(void *hal_desc);
|
||||||
void (*hal_tx_desc_set_mesh_en)(void *desc, uint8_t en);
|
void (*hal_tx_desc_set_mesh_en)(void *desc, uint8_t en);
|
||||||
|
|
||||||
/* rx */
|
/* rx */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -804,7 +804,6 @@ uint8_t hal_tx_comp_get_release_reason(void *hal_desc,
|
|||||||
return hal_soc->ops->hal_tx_comp_get_release_reason(hal_desc);
|
return hal_soc->ops->hal_tx_comp_get_release_reason(hal_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_tx_comp_desc_sync() - collect hardware descriptor contents
|
* hal_tx_comp_desc_sync() - collect hardware descriptor contents
|
||||||
* @hal_desc: hardware descriptor pointer
|
* @hal_desc: hardware descriptor pointer
|
||||||
@@ -1124,13 +1123,12 @@ void hal_tx_set_tidmap_prty(hal_soc_handle_t hal_soc_hdl, uint8_t val)
|
|||||||
*
|
*
|
||||||
* Return: buffer type
|
* Return: buffer type
|
||||||
*/
|
*/
|
||||||
static inline uint8_t hal_get_wbm_internal_error(void *hal_desc)
|
static inline
|
||||||
|
uint8_t hal_get_wbm_internal_error(hal_soc_handle_t hal_soc_hdl, void *hal_desc)
|
||||||
{
|
{
|
||||||
uint32_t comp_desc =
|
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||||
*(uint32_t *)(((uint8_t *)hal_desc) +
|
|
||||||
WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET);
|
|
||||||
|
|
||||||
return (comp_desc & WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK) >>
|
return hal_soc->ops->hal_get_wbm_internal_error(hal_desc);
|
||||||
WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_TX_H */
|
#endif /* HAL_TX_H */
|
||||||
|
@@ -1010,6 +1010,7 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
|||||||
hal_tx_desc_set_cache_set_num_generic,
|
hal_tx_desc_set_cache_set_num_generic,
|
||||||
hal_tx_comp_get_status_generic,
|
hal_tx_comp_get_status_generic,
|
||||||
hal_tx_comp_get_release_reason_generic,
|
hal_tx_comp_get_release_reason_generic,
|
||||||
|
hal_get_wbm_internal_error_generic,
|
||||||
hal_tx_desc_set_mesh_en_6290,
|
hal_tx_desc_set_mesh_en_6290,
|
||||||
/* rx */
|
/* rx */
|
||||||
hal_rx_msdu_start_nss_get_6290,
|
hal_rx_msdu_start_nss_get_6290,
|
||||||
|
@@ -1006,6 +1006,7 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
|||||||
hal_tx_desc_set_cache_set_num_generic,
|
hal_tx_desc_set_cache_set_num_generic,
|
||||||
hal_tx_comp_get_status_generic,
|
hal_tx_comp_get_status_generic,
|
||||||
hal_tx_comp_get_release_reason_generic,
|
hal_tx_comp_get_release_reason_generic,
|
||||||
|
hal_get_wbm_internal_error_generic,
|
||||||
hal_tx_desc_set_mesh_en_6390,
|
hal_tx_desc_set_mesh_en_6390,
|
||||||
/* rx */
|
/* rx */
|
||||||
hal_rx_msdu_start_nss_get_6390,
|
hal_rx_msdu_start_nss_get_6390,
|
||||||
|
@@ -1324,6 +1324,7 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
|
|||||||
hal_tx_desc_set_cache_set_num_generic,
|
hal_tx_desc_set_cache_set_num_generic,
|
||||||
hal_tx_comp_get_status_generic,
|
hal_tx_comp_get_status_generic,
|
||||||
hal_tx_comp_get_release_reason_generic,
|
hal_tx_comp_get_release_reason_generic,
|
||||||
|
hal_get_wbm_internal_error_generic,
|
||||||
hal_tx_desc_set_mesh_en_6490,
|
hal_tx_desc_set_mesh_en_6490,
|
||||||
|
|
||||||
/* rx */
|
/* rx */
|
||||||
|
@@ -1006,6 +1006,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
|||||||
hal_tx_desc_set_cache_set_num_generic,
|
hal_tx_desc_set_cache_set_num_generic,
|
||||||
hal_tx_comp_get_status_generic,
|
hal_tx_comp_get_status_generic,
|
||||||
hal_tx_comp_get_release_reason_generic,
|
hal_tx_comp_get_release_reason_generic,
|
||||||
|
hal_get_wbm_internal_error_generic,
|
||||||
hal_tx_desc_set_mesh_en_8074v1,
|
hal_tx_desc_set_mesh_en_8074v1,
|
||||||
/* rx */
|
/* rx */
|
||||||
hal_rx_msdu_start_nss_get_8074,
|
hal_rx_msdu_start_nss_get_8074,
|
||||||
|
@@ -1004,6 +1004,7 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
|||||||
hal_tx_desc_set_cache_set_num_generic,
|
hal_tx_desc_set_cache_set_num_generic,
|
||||||
hal_tx_comp_get_status_generic,
|
hal_tx_comp_get_status_generic,
|
||||||
hal_tx_comp_get_release_reason_generic,
|
hal_tx_comp_get_release_reason_generic,
|
||||||
|
hal_get_wbm_internal_error_generic,
|
||||||
hal_tx_desc_set_mesh_en_8074v2,
|
hal_tx_desc_set_mesh_en_8074v2,
|
||||||
|
|
||||||
/* rx */
|
/* rx */
|
||||||
|
@@ -1364,6 +1364,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
|||||||
hal_tx_desc_set_cache_set_num_generic,
|
hal_tx_desc_set_cache_set_num_generic,
|
||||||
hal_tx_comp_get_status_generic,
|
hal_tx_comp_get_status_generic,
|
||||||
hal_tx_comp_get_release_reason_generic,
|
hal_tx_comp_get_release_reason_generic,
|
||||||
|
hal_get_wbm_internal_error_generic,
|
||||||
hal_tx_desc_set_mesh_en_9000,
|
hal_tx_desc_set_mesh_en_9000,
|
||||||
|
|
||||||
/* rx */
|
/* rx */
|
||||||
|
Reference in New Issue
Block a user