[02/10] net/bnxt: add dual rate module detection log
Checks
Commit Message
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Firmware sends an async notification to the driver when it detects
a Dual rate module.
Display below warning message:
"Speed change not supported with dual rate transceivers on this board"
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 4 ++++
drivers/net/bnxt/hsi_struct_def_dpdk.h | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
@@ -100,6 +100,10 @@ static void bnxt_handle_event_error_report(struct bnxt *bp,
PMD_DRV_LOG(WARNING, "Port:%d Pause Storm detected!\n",
bp->eth_dev->data->port_id);
break;
+ case HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED:
+ PMD_DRV_LOG(WARNING, "Port:%d Speed change not supported with dual rate transceivers on this board",
+ bp->eth_dev->data->port_id);
+ break;
default:
PMD_DRV_LOG(INFO, "FW reported unknown error type data1 %d"
" data2: %d\n", data1, data2);
@@ -12494,8 +12494,14 @@ struct hwrm_async_event_cmpl_error_report_base {
*/
#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_THERMAL_THRESHOLD \
UINT32_C(0x5)
+ /*
+ * Speed change not supported with dual rate transceivers
+ * on this board.
+ */
+ #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED \
+ UINT32_C(0x6)
#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_LAST \
- HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_THERMAL_THRESHOLD
+ HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED
} __rte_packed;
/* hwrm_async_event_cmpl_error_report_pause_storm (size:128b/16B) */