diff mbox series

[net-next,07/15] bnxt_en: log firmware debug notifications

Message ID 1611558501-11022-8-git-send-email-michael.chan@broadcom.com (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show
Series bnxt_en: Error recovery improvements. | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 20 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Michael Chan Jan. 25, 2021, 7:08 a.m. UTC
From: Edwin Peer <edwin.peer@broadcom.com>

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>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Joe Perches Jan. 25, 2021, 9:24 a.m. UTC | #1
On Mon, 2021-01-25 at 02:08 -0500, Michael Chan wrote:
> From: Edwin Peer <edwin.peer@broadcom.com>
> 
> 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.
[]
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
[]
> @@ -2072,6 +2073,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);
> +		}

		netif_notice(bp, hw, 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;
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index c06c5f81f087..c8c25f7644ae 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -255,6 +255,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,
 };
 
@@ -2072,6 +2073,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;