From: Pavan Chebbi <pavan.chebbi@broadcom.com>
To: jgg@ziepe.ca, michael.chan@broadcom.com
Cc: dave.jiang@intel.com, saeedm@nvidia.com,
Jonathan.Cameron@huawei.com, davem@davemloft.net, corbet@lwn.net,
edumazet@google.com, gospo@broadcom.com, kuba@kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch,
selvin.xavier@broadcom.com, leon@kernel.org,
kalesh-anakkur.purayil@broadcom.com,
Pavan Chebbi <pavan.chebbi@broadcom.com>
Subject: [PATCH net-next v2 1/6] bnxt_en: Move common definitions to include/linux/bnxt/
Date: Tue, 23 Sep 2025 02:58:20 -0700 [thread overview]
Message-ID: <20250923095825.901529-2-pavan.chebbi@broadcom.com> (raw)
In-Reply-To: <20250923095825.901529-1-pavan.chebbi@broadcom.com>
We have common definitions that are now going to be used
by more than one component outside of bnxt (bnxt_re and
fwctl)
Move bnxt_ulp.h to include/linux/bnxt/ as ulp.h.
Have a new common.h, also at the same place that will
have some non-ulp but shared bnxt declarations.
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
---
drivers/infiniband/hw/bnxt_re/debugfs.c | 2 +-
drivers/infiniband/hw/bnxt_re/main.c | 2 +-
drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
drivers/infiniband/hw/bnxt_re/qplib_res.h | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 7 +------
.../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 +-
.../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +-
.../net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 +-
include/linux/bnxt/common.h | 20 +++++++++++++++++++
.../bnxt_ulp.h => include/linux/bnxt/ulp.h | 0
12 files changed, 30 insertions(+), 15 deletions(-)
create mode 100644 include/linux/bnxt/common.h
rename drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h => include/linux/bnxt/ulp.h (100%)
diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c
index e632f1661b92..a9dd3597cfbc 100644
--- a/drivers/infiniband/hw/bnxt_re/debugfs.c
+++ b/drivers/infiniband/hw/bnxt_re/debugfs.c
@@ -9,8 +9,8 @@
#include <linux/debugfs.h>
#include <linux/pci.h>
#include <rdma/ib_addr.h>
+#include <linux/bnxt/ulp.h>
-#include "bnxt_ulp.h"
#include "roce_hsi.h"
#include "qplib_res.h"
#include "qplib_sp.h"
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index df7cf8d68e27..b773556fc5e9 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -55,8 +55,8 @@
#include <rdma/ib_umem.h>
#include <rdma/ib_addr.h>
#include <linux/hashtable.h>
+#include <linux/bnxt/ulp.h>
-#include "bnxt_ulp.h"
#include "roce_hsi.h"
#include "qplib_res.h"
#include "qplib_sp.h"
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index ee36b3d82cc0..bb252cd8509b 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -46,6 +46,7 @@
#include <linux/delay.h>
#include <linux/prefetch.h>
#include <linux/if_ether.h>
+#include <linux/bnxt/ulp.h>
#include <rdma/ib_mad.h>
#include "roce_hsi.h"
@@ -55,7 +56,6 @@
#include "qplib_sp.h"
#include "qplib_fp.h"
#include <rdma/ib_addr.h>
-#include "bnxt_ulp.h"
#include "bnxt_re.h"
#include "ib_verbs.h"
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h
index 6a13927674b4..7cdddf921b48 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h
@@ -39,7 +39,7 @@
#ifndef __BNXT_QPLIB_RES_H__
#define __BNXT_QPLIB_RES_H__
-#include "bnxt_ulp.h"
+#include <linux/bnxt/ulp.h>
extern const struct bnxt_qplib_gid bnxt_qplib_gid_zero;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d59612d1e176..917a39f8865c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -59,10 +59,10 @@
#include <net/netdev_rx_queue.h>
#include <linux/pci-tph.h>
#include <linux/bnxt/hsi.h>
+#include <linux/bnxt/ulp.h>
#include "bnxt.h"
#include "bnxt_hwrm.h"
-#include "bnxt_ulp.h"
#include "bnxt_sriov.h"
#include "bnxt_ethtool.h"
#include "bnxt_dcb.h"
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 06a4c2afdf8a..2578bac16f6c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -33,6 +33,7 @@
#ifdef CONFIG_TEE_BNXT_FW
#include <linux/firmware/broadcom/tee_bnxt_fw.h>
#endif
+#include <linux/bnxt/common.h>
#define BNXT_DEFAULT_RX_COPYBREAK 256
#define BNXT_MAX_RX_COPYBREAK 1024
@@ -2075,12 +2076,6 @@ struct bnxt_fw_health {
#define BNXT_FW_IF_RETRY 10
#define BNXT_FW_SLOT_RESET_RETRY 4
-struct bnxt_aux_priv {
- struct auxiliary_device aux_dev;
- struct bnxt_en_dev *edev;
- int id;
-};
-
enum board_idx {
BCM57301,
BCM57302,
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 02961d93ed35..cfcd3335a2d3 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -13,12 +13,12 @@
#include <net/devlink.h>
#include <net/netdev_lock.h>
#include <linux/bnxt/hsi.h>
+#include <linux/bnxt/ulp.h>
#include "bnxt.h"
#include "bnxt_hwrm.h"
#include "bnxt_vfr.h"
#include "bnxt_devlink.h"
#include "bnxt_ethtool.h"
-#include "bnxt_ulp.h"
#include "bnxt_ptp.h"
#include "bnxt_coredump.h"
#include "bnxt_nvm_defs.h"
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index be32ef8f5c96..3231d3c022dc 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -27,9 +27,9 @@
#include <net/netdev_queues.h>
#include <net/netlink.h>
#include <linux/bnxt/hsi.h>
+#include <linux/bnxt/ulp.h>
#include "bnxt.h"
#include "bnxt_hwrm.h"
-#include "bnxt_ulp.h"
#include "bnxt_xdp.h"
#include "bnxt_ptp.h"
#include "bnxt_ethtool.h"
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
index 80fed2c07b9e..84c43f83193a 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
@@ -17,9 +17,9 @@
#include <linux/etherdevice.h>
#include <net/dcbnl.h>
#include <linux/bnxt/hsi.h>
+#include <linux/bnxt/ulp.h>
#include "bnxt.h"
#include "bnxt_hwrm.h"
-#include "bnxt_ulp.h"
#include "bnxt_sriov.h"
#include "bnxt_vfr.h"
#include "bnxt_ethtool.h"
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
index 61cf201bb0dc..992eec874345 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
@@ -22,10 +22,10 @@
#include <linux/auxiliary_bus.h>
#include <net/netdev_lock.h>
#include <linux/bnxt/hsi.h>
+#include <linux/bnxt/ulp.h>
#include "bnxt.h"
#include "bnxt_hwrm.h"
-#include "bnxt_ulp.h"
static DEFINE_IDA(bnxt_aux_dev_ids);
diff --git a/include/linux/bnxt/common.h b/include/linux/bnxt/common.h
new file mode 100644
index 000000000000..2ee75a0a1feb
--- /dev/null
+++ b/include/linux/bnxt/common.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Copyright (c) 2025, Broadcom Corporation
+ *
+ */
+
+#ifndef BNXT_COMN_H
+#define BNXT_COMN_H
+
+#include <linux/bnxt/hsi.h>
+#include <linux/bnxt/ulp.h>
+#include <linux/auxiliary_bus.h>
+
+struct bnxt_aux_priv {
+ struct auxiliary_device aux_dev;
+ struct bnxt_en_dev *edev;
+ int id;
+};
+
+#endif /* BNXT_COMN_H */
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h b/include/linux/bnxt/ulp.h
similarity index 100%
rename from drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h
rename to include/linux/bnxt/ulp.h
--
2.39.1
next prev parent reply other threads:[~2025-09-23 9:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 9:58 [PATCH net-next v2 0/6] bnxt_fwctl: fwctl for Broadcom Netxtreme devices Pavan Chebbi
2025-09-23 9:58 ` Pavan Chebbi [this message]
2025-09-23 10:35 ` [PATCH net-next v2 1/6] bnxt_en: Move common definitions to include/linux/bnxt/ Jonathan Cameron
2025-09-23 16:33 ` Saeed Mahameed
2025-09-23 17:16 ` Pavan Chebbi
2025-09-23 18:00 ` Pavan Chebbi
2025-09-23 9:58 ` [PATCH net-next v2 2/6] bnxt_en: Refactor aux bus functions to be generic Pavan Chebbi
2025-09-23 10:46 ` Jonathan Cameron
2025-09-23 9:58 ` [PATCH net-next v2 3/6] bnxt_en: Make a lookup table for supported aux bus devices Pavan Chebbi
2025-09-23 10:49 ` Jonathan Cameron
2025-09-23 12:21 ` Pavan Chebbi
2025-09-23 9:58 ` [PATCH net-next v2 4/6] bnxt_en: Create an aux device for fwctl Pavan Chebbi
2025-09-23 10:56 ` Jonathan Cameron
2025-09-23 9:58 ` [PATCH net-next v2 5/6] bnxt_fwctl: Add bnxt fwctl device Pavan Chebbi
2025-09-23 11:17 ` Jonathan Cameron
2025-09-23 12:19 ` Pavan Chebbi
2025-09-23 20:00 ` [External] : " ALOK TIWARI
2025-09-24 22:31 ` Dave Jiang
2025-09-25 4:31 ` Pavan Chebbi
2025-09-25 15:46 ` Dave Jiang
2025-09-25 18:17 ` Dave Jiang
2025-09-26 4:00 ` Pavan Chebbi
2025-09-23 9:58 ` [PATCH net-next v2 6/6] bnxt_fwctl: Add documentation entries Pavan Chebbi
2025-09-23 10:31 ` Jonathan Cameron
2025-09-24 22:40 ` Dave Jiang
2025-09-23 16:25 ` [PATCH net-next v2 0/6] bnxt_fwctl: fwctl for Broadcom Netxtreme devices Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250923095825.901529-2-pavan.chebbi@broadcom.com \
--to=pavan.chebbi@broadcom.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=dave.jiang@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gospo@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=selvin.xavier@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).