From: Kalesh AP <kalesh-anakkur.pura...@broadcom.com> 1. Used port id in async event logs. 2. Added a debug log in bnxt_hwrm_func_driver_unregister().
Signed-off-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com> Reviewed-by: Somnath Kotur <somnath.ko...@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khapa...@broadcom.com> --- drivers/net/bnxt/bnxt_cpr.c | 14 +++++++++----- drivers/net/bnxt/bnxt_hwrm.c | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index b7be3e8e05..20b4f929ba 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -100,6 +100,7 @@ void bnxt_handle_async_event(struct bnxt *bp, struct hwrm_async_event_cmpl *async_cmp = (struct hwrm_async_event_cmpl *)cmp; uint16_t event_id = rte_le_to_cpu_16(async_cmp->event_id); + uint16_t port_id = bp->eth_dev->data->port_id; struct bnxt_error_recovery_info *info; uint32_t event_data; @@ -145,11 +146,13 @@ void bnxt_handle_async_event(struct bnxt *bp, if ((event_data & EVENT_DATA1_REASON_CODE_MASK) == EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL) { PMD_DRV_LOG(INFO, - "Firmware fatal reset event received\n"); + "Port %u: Firmware fatal reset event received\n", + port_id); bp->flags |= BNXT_FLAG_FATAL_ERROR; } else { PMD_DRV_LOG(INFO, - "Firmware non-fatal reset event received\n"); + "Port %u: Firmware non-fatal reset event received\n", + port_id); } bp->flags |= BNXT_FLAG_FW_RESET; @@ -163,7 +166,8 @@ void bnxt_handle_async_event(struct bnxt *bp, if (!info) return; - PMD_DRV_LOG(INFO, "Error recovery async event received\n"); + PMD_DRV_LOG(INFO, "Port %u: Error recovery async event received\n", + port_id); event_data = rte_le_to_cpu_32(async_cmp->event_data1) & EVENT_DATA1_FLAGS_MASK; @@ -178,8 +182,8 @@ void bnxt_handle_async_event(struct bnxt *bp, else info->flags &= ~BNXT_FLAG_RECOVERY_ENABLED; - PMD_DRV_LOG(INFO, "recovery enabled(%d), master function(%d)\n", - bnxt_is_recovery_enabled(bp), + PMD_DRV_LOG(INFO, "Port %u: recovery enabled(%d), master function(%d)\n", + port_id, bnxt_is_recovery_enabled(bp), bnxt_is_master_func(bp)); if (bp->flags & BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index fc47950fbd..37fa78e79f 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1336,6 +1336,8 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf) HWRM_CHECK_RESULT(); HWRM_UNLOCK(); + PMD_DRV_LOG(DEBUG, "Port %u: Unregistered with fw\n", + bp->eth_dev->data->port_id); return rc; } -- 2.21.1 (Apple Git-122.3)