bnxt_en: log firmware debug notifications
authorEdwin Peer <edwin.peer@broadcom.com>
Mon, 25 Jan 2021 07:08:13 +0000 (02:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:28:06 +0000 (12:28 +0200)
[ Upstream commit a44daa8fcbcf572545c4c1a7908b3fbb38388048 ]

Firmware is capable of generating asynchronous debug notifications.
The event data is opaque to the driver and is simply logged. Debug
notifications can be enabled by turning on hardware status messages
using the ethtool msglvl interface.

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 1def6caba349575c5b5846bf68d1dba5bb1f78b1..621634d4096619473a4cf0f83744f417d425d969 100644 (file)
@@ -272,6 +272,7 @@ static const u16 bnxt_async_events_arr[] = {
        ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE,
        ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY,
        ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY,
+       ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION,
        ASYNC_EVENT_CMPL_EVENT_ID_RING_MONITOR_MSG,
 };
 
@@ -2132,6 +2133,13 @@ static int bnxt_async_event_process(struct bnxt *bp,
                        bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
                goto async_event_process_exit;
        }
+       case ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION:
+               if (netif_msg_hw(bp)) {
+                       netdev_notice(bp->dev,
+                                     "Received firmware debug notification, data1: 0x%x, data2: 0x%x\n",
+                                     data1, data2);
+               }
+               goto async_event_process_exit;
        case ASYNC_EVENT_CMPL_EVENT_ID_RING_MONITOR_MSG: {
                struct bnxt_rx_ring_info *rxr;
                u16 grp_idx;