From: David Thompson <davthompson@nvidia.com>
To: <bryan.whitehead@microchip.com>, <UNGLinuxDriver@microchip.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
David Thompson <davthompson@nvidia.com>
Subject: [PATCH net-next v2 1/2] net: lan743x: add "message level" module parameter
Date: Wed, 27 May 2026 18:18:57 +0000 [thread overview]
Message-ID: <4c240063db57c93541e3de61900a5d7adffdfd27.1779903597.git.davthompson@nvidia.com> (raw)
In-Reply-To: <cover.1779903597.git.davthompson@nvidia.com>
The lan743x driver currently hardcodes the initial value of the msg_enable
parameter during probe(), and uses this value for netdev message logging.
Instead, the driver should provide a "message level" module parameter to
allow users to configure the logging level at load time.
Signed-off-by: David Thompson <davthompson@nvidia.com>
---
v2:
- new patch added in v2
---
drivers/net/ethernet/microchip/lan743x_main.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index f3332417162e..793633cced19 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -28,6 +28,17 @@
#define RFE_RD_FIFO_TH_3_DWORDS 0x3
+#define LAN743X_DEF_MSG_ENABLE \
+ (NETIF_MSG_DRV | \
+ NETIF_MSG_PROBE | \
+ NETIF_MSG_LINK | \
+ NETIF_MSG_IFUP | \
+ NETIF_MSG_IFDOWN | \
+ NETIF_MSG_TX_QUEUED)
+static int lan743x_msg_enable = -1;
+module_param(lan743x_msg_enable, int, 0);
+MODULE_PARM_DESC(lan743x_msg_enable, "Debug message level");
+
static bool pci11x1x_is_a0(struct lan743x_adapter *adapter)
{
u32 dev_rev = adapter->csr.id_rev & ID_REV_CHIP_REV_MASK_;
@@ -3661,9 +3672,7 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,
pci_set_drvdata(pdev, netdev);
adapter = netdev_priv(netdev);
adapter->netdev = netdev;
- adapter->msg_enable = NETIF_MSG_DRV | NETIF_MSG_PROBE |
- NETIF_MSG_LINK | NETIF_MSG_IFUP |
- NETIF_MSG_IFDOWN | NETIF_MSG_TX_QUEUED;
+ adapter->msg_enable = netif_msg_init(lan743x_msg_enable, LAN743X_DEF_MSG_ENABLE);
netdev->max_mtu = LAN743X_MAX_FRAME_SIZE;
of_get_mac_address(pdev->dev.of_node, adapter->mac_address);
--
2.43.0
next prev parent reply other threads:[~2026-05-27 18:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 18:18 [PATCH net-next v2 0/2] net: lan743x: cleanup netdev-based logging David Thompson
2026-05-27 18:18 ` David Thompson [this message]
2026-05-27 20:35 ` [PATCH net-next v2 1/2] net: lan743x: add "message level" module parameter Jacob Keller
2026-05-28 14:32 ` David Thompson
2026-05-27 18:18 ` [PATCH net-next v2 2/2] net: lan743x: avoid netdev-based logging before netdev registration David Thompson
2026-05-27 20:32 ` Jacob Keller
2026-05-28 15:48 ` David Thompson
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=4c240063db57c93541e3de61900a5d7adffdfd27.1779903597.git.davthompson@nvidia.com \
--to=davthompson@nvidia.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®