net/bnxt: log port id in async events
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Wed, 24 Feb 2021 15:55:49 +0000 (21:25 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 12 Mar 2021 06:00:22 +0000 (07:00 +0100)
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.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_cpr.c
drivers/net/bnxt/bnxt_hwrm.c

index b7be3e8..20b4f92 100644 (file)
@@ -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)
index fc47950..37fa78e 100644 (file)
@@ -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;
 }