osi: core: use u16 type for reporter ID

reporter IDs are u16 type for error reporting API

Bug 3590939

Change-Id: Iae56610dce407fbf8d4b3a1ea67d3f568c22a681
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2781194
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Om Prakash Singh
2022-09-23 08:57:49 +05:30
committed by Bhadram Varka
parent 410d3692a1
commit 17db868838
4 changed files with 19 additions and 10 deletions

View File

@@ -369,7 +369,8 @@ typedef my_lint_64 nvel64_t;
#define MACSEC_REG_VIOL_ERR_IDX 3U
/** @} */
extern nveu32_t hsi_err_code[][3];
extern nveu32_t hsi_err_code[][2];
extern nveu16_t hsi_reporter_id[];
/**
* @addtogroup HSI_TIME_THRESHOLD
@@ -1217,7 +1218,7 @@ struct osi_hsi_data {
/** error count threshold to report error */
nveu32_t err_count_threshold;
/** HSI reporter ID */
nveu32_t reporter_id;
nveu16_t reporter_id;
/** HSI error codes */
nveu32_t err_code[HSI_MAX_MAC_ERROR_CODE];
/** HSI MAC report count threshold based error */

View File

@@ -999,7 +999,7 @@ static nve32_t eqos_hsi_configure(struct osi_core_priv_data *const osi_core,
if (enable == OSI_ENABLE) {
osi_core->hsi.enabled = OSI_ENABLE;
osi_core->hsi.reporter_id = hsi_err_code[osi_core->instance_id][REPORTER_IDX];
osi_core->hsi.reporter_id = hsi_reporter_id[osi_core->instance_id];
/* T23X-EQOS_HSIv2-19: Enabling of Consistency Monitor for TX Frame Errors */
value = osi_readla(osi_core,

View File

@@ -2152,7 +2152,7 @@ static nve32_t mgbe_hsi_configure(struct osi_core_priv_data *const osi_core,
if (enable == OSI_ENABLE) {
osi_core->hsi.enabled = OSI_ENABLE;
osi_core->hsi.reporter_id = hsi_err_code[osi_core->instance_id][REPORTER_IDX];
osi_core->hsi.reporter_id = hsi_reporter_id[osi_core->instance_id];
/* T23X-MGBE_HSIv2-12:Initialization of Transaction Timeout in PCS */
/* T23X-MGBE_HSIv2-11:Initialization of Watchdog Timer */

View File

@@ -35,12 +35,20 @@
* hsi_err_code[0] to hsi_err_code[3] for MGBE instance
* hsi_err_code[4] is for EQOS
*/
nveu32_t hsi_err_code[][3] = {
{0x2A00, 0x2E08, 0x8019},
{0x2A01, 0x2E09, 0x801A},
{0x2A02, 0x2E0A, 0x801B},
{0x2A03, 0x2E0B, 0x801C},
{0x28AD, 0x2DE6, 0x8009},
nveu32_t hsi_err_code[][2] = {
{0x2A00, 0x2E08},
{0x2A01, 0x2E09},
{0x2A02, 0x2E0A},
{0x2A03, 0x2E0B},
{0x28AD, 0x2DE6},
};
nveu16_t hsi_reporter_id[] = {
0x8019,
0x801A,
0x801B,
0x801C,
0x8009,
};
#endif