mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH] sfc: log active datapath firmware variant on ef10/x4
@ 2026-09-03  2:14 Aaron Tomlin
  0 siblings, 0 replies; only message in thread
From: Aaron Tomlin @ 2026-09-03  2:14 UTC (permalink / raw)
  To: ecree.xilinx, andrew+netdev, davem, edumazet, kuba, pabeni
  Cc: sean, netdev, linux-net-drivers, linux-kernel

EF10 and X4 architecture controllers support multiple datapath microcode
variants (e.g., low-latency, full-feature, packed-stream, and dpdk)
within the same firmware bundle.

During adapter probe in efx_ef10_init_datapath_caps(), the running RX
and TX DPCPU firmware IDs are queried via MC_CMD_GET_CAPABILITIES.
Log the active datapath variant name and numerical ID at probe time
using pci_info() so that the selected variant is immediately visible
in dmesg for verification and diagnostics.

Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
---
 drivers/net/ethernet/sfc/ef10.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 73bc064929f6..3b92e95532c5 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -105,6 +105,26 @@ static int efx_ef10_get_vf_index(struct efx_nic *efx)
 }
 #endif
 
+static const char *efx_ef10_dpcpu_fw_variant_name(u16 dpcpu_id)
+{
+	switch (dpcpu_id) {
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP:
+		return "full-feature";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_LOW_LATENCY:
+		return "low-latency";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_PACKED_STREAM:
+		return "packed-stream";
+	case MC_CMD_GET_CAPABILITIES_OUT_TXDP_HIGH_PACKET_RATE:
+		return "high-tx-rate";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_RULES_ENGINE:
+		return "rules-engine";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_DPDK:
+		return "dpdk";
+	default:
+		return "unknown";
+	}
+}
+
 static int efx_ef10_init_datapath_caps(struct efx_nic *efx)
 {
 	MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_CAPABILITIES_V7_OUT_LEN);
@@ -144,6 +164,13 @@ static int efx_ef10_init_datapath_caps(struct efx_nic *efx)
 	nic_data->tx_dpcpu_fw_id =
 		MCDI_WORD(outbuf, GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID);
 
+	pci_info(efx->pci_dev,
+		 "Datapath firmware variant: rx=%s (0x%x) tx=%s (0x%x)\n",
+		 efx_ef10_dpcpu_fw_variant_name(nic_data->rx_dpcpu_fw_id),
+		 nic_data->rx_dpcpu_fw_id,
+		 efx_ef10_dpcpu_fw_variant_name(nic_data->tx_dpcpu_fw_id),
+		 nic_data->tx_dpcpu_fw_id);
+
 	if (!(nic_data->datapath_caps &
 	      (1 << MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_LBN))) {
 		netif_err(efx, probe, efx->net_dev,
-- 
2.55.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-03  2:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03  2:14 [RFC PATCH] sfc: log active datapath firmware variant on ef10/x4 Aaron Tomlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®