Commit 222e7535 authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge branch 'eth-fbnic-update-fbnic-driver'

Mohsin Bashir says:

====================
eth: fbnic: Update fbnic driver

This patchset makes following trivial changes to the fbnic driver:
1) Add coverage for PCIe CSRs in the ethtool register dump.

2) Consolidate the PUL_USER CSR section, update the end boundary,
and remove redundant definition of the end boundary.

3) Update the return value in kdoc for fbnic_netdev_alloc().
====================

Link: https://patch.msgid.link/20250221201813.2688052-1-mohsin.bashr@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents a3e51d47 26aa7992
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ static const struct fbnic_csr_bounds fbnic_csr_sects[] = {
	FBNIC_BOUNDS(RSFEC),
	FBNIC_BOUNDS(MAC_MAC),
	FBNIC_BOUNDS(SIG),
	FBNIC_BOUNDS(PCIE_SS_COMPHY),
	FBNIC_BOUNDS(PUL_USER),
	FBNIC_BOUNDS(QUEUE),
	FBNIC_BOUNDS(RPC_RAM),
+40 −38
Original line number Diff line number Diff line
@@ -788,13 +788,52 @@ enum {
#define FBNIC_MAC_STAT_TX_MULTICAST_H	0x11a4b		/* 0x4692c */
#define FBNIC_MAC_STAT_TX_BROADCAST_L	0x11a4c		/* 0x46930 */
#define FBNIC_MAC_STAT_TX_BROADCAST_H	0x11a4d		/* 0x46934 */

/* PCIE Comphy Registers */
#define FBNIC_CSR_START_PCIE_SS_COMPHY	0x2442e /* CSR section delimiter */
#define FBNIC_CSR_END_PCIE_SS_COMPHY	0x279d7	/* CSR section delimiter */

/* PUL User Registers */
#define FBNIC_CSR_START_PUL_USER	0x31000	/* CSR section delimiter */
#define FBNIC_PUL_OB_TLP_HDR_AW_CFG	0x3103d		/* 0xc40f4 */
#define FBNIC_PUL_OB_TLP_HDR_AW_CFG_BME		CSR_BIT(18)
#define FBNIC_PUL_OB_TLP_HDR_AR_CFG	0x3103e		/* 0xc40f8 */
#define FBNIC_PUL_OB_TLP_HDR_AR_CFG_BME		CSR_BIT(18)
#define FBNIC_CSR_END_PUL_USER	0x31080	/* CSR section delimiter */
#define FBNIC_PUL_USER_OB_RD_TLP_CNT_31_0 \
					0x3106e		/* 0xc41b8 */
#define FBNIC_PUL_USER_OB_RD_DWORD_CNT_31_0 \
					0x31070		/* 0xc41c0 */
#define FBNIC_PUL_USER_OB_RD_DWORD_CNT_63_32 \
					0x31071		/* 0xc41c4 */
#define FBNIC_PUL_USER_OB_WR_TLP_CNT_31_0 \
					0x31072		/* 0xc41c8 */
#define FBNIC_PUL_USER_OB_WR_TLP_CNT_63_32 \
					0x31073		/* 0xc41cc */
#define FBNIC_PUL_USER_OB_WR_DWORD_CNT_31_0 \
					0x31074		/* 0xc41d0 */
#define FBNIC_PUL_USER_OB_WR_DWORD_CNT_63_32 \
					0x31075		/* 0xc41d4 */
#define FBNIC_PUL_USER_OB_CPL_TLP_CNT_31_0 \
					0x31076		/* 0xc41d8 */
#define FBNIC_PUL_USER_OB_CPL_TLP_CNT_63_32 \
					0x31077		/* 0xc41dc */
#define FBNIC_PUL_USER_OB_CPL_DWORD_CNT_31_0 \
					0x31078		/* 0xc41e0 */
#define FBNIC_PUL_USER_OB_CPL_DWORD_CNT_63_32 \
					0x31079		/* 0xc41e4 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_CPL_CRED_31_0 \
					0x3107a		/* 0xc41e8 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_CPL_CRED_63_32 \
					0x3107b		/* 0xc41ec */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_TAG_31_0 \
					0x3107c		/* 0xc41f0 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_TAG_63_32 \
					0x3107d		/* 0xc41f4 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_NP_CRED_31_0 \
					0x3107e		/* 0xc41f8 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_NP_CRED_63_32 \
					0x3107f		/* 0xc41fc */
#define FBNIC_CSR_END_PUL_USER	0x310ea	/* CSR section delimiter */

/* Queue Registers
 *
@@ -934,43 +973,6 @@ enum {
#define FBNIC_MAX_QUEUES		128
#define FBNIC_CSR_END_QUEUE	(0x40000 + 0x400 * FBNIC_MAX_QUEUES - 1)

/* PUL User Registers*/
#define FBNIC_PUL_USER_OB_RD_TLP_CNT_31_0 \
					0x3106e		/* 0xc41b8 */
#define FBNIC_PUL_USER_OB_RD_DWORD_CNT_31_0 \
					0x31070		/* 0xc41c0 */
#define FBNIC_PUL_USER_OB_RD_DWORD_CNT_63_32 \
					0x31071		/* 0xc41c4 */
#define FBNIC_PUL_USER_OB_WR_TLP_CNT_31_0 \
					0x31072		/* 0xc41c8 */
#define FBNIC_PUL_USER_OB_WR_TLP_CNT_63_32 \
					0x31073		/* 0xc41cc */
#define FBNIC_PUL_USER_OB_WR_DWORD_CNT_31_0 \
					0x31074		/* 0xc41d0 */
#define FBNIC_PUL_USER_OB_WR_DWORD_CNT_63_32 \
					0x31075		/* 0xc41d4 */
#define FBNIC_PUL_USER_OB_CPL_TLP_CNT_31_0 \
					0x31076		/* 0xc41d8 */
#define FBNIC_PUL_USER_OB_CPL_TLP_CNT_63_32 \
					0x31077		/* 0xc41dc */
#define FBNIC_PUL_USER_OB_CPL_DWORD_CNT_31_0 \
					0x31078		/* 0xc41e0 */
#define FBNIC_PUL_USER_OB_CPL_DWORD_CNT_63_32 \
					0x31079		/* 0xc41e4 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_CPL_CRED_31_0 \
					0x3107a		/* 0xc41e8 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_CPL_CRED_63_32 \
					0x3107b		/* 0xc41ec */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_TAG_31_0 \
					0x3107c		/* 0xc41f0 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_TAG_63_32 \
					0x3107d		/* 0xc41f4 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_NP_CRED_31_0 \
					0x3107e		/* 0xc41f8 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_NP_CRED_63_32 \
					0x3107f		/* 0xc41fc */
#define FBNIC_CSR_END_PUL_USER	0x31080	/* CSR section delimiter */

/* BAR 4 CSRs */

/* The IPC mailbox consists of 32 mailboxes, with each mailbox consisting
+1 −1
Original line number Diff line number Diff line
@@ -611,7 +611,7 @@ void fbnic_netdev_free(struct fbnic_dev *fbd)
 * Allocate and initialize the netdev and netdev private structure. Bind
 * together the hardware, netdev, and pci data structures.
 *
 *  Return: 0 on success, negative on failure
 *  Return: Pointer to net_device on success, NULL on failure
 **/
struct net_device *fbnic_netdev_alloc(struct fbnic_dev *fbd)
{