Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 2024 04:01:55 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 73f5d59061ab - stable/13 - qlxge: replace device_printf with QL_DPRINT2
Message-ID:  <202409290401.48T41t5r080388@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=73f5d59061ab5f4d8a7e0bc0fb6483a21c2d99cb

commit 73f5d59061ab5f4d8a7e0bc0fb6483a21c2d99cb
Author:     Fuqian Huang <huangfq.daxian@gmail.com>
AuthorDate: 2024-05-28 05:40:12 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-09-29 03:59:23 +0000

    qlxge: replace device_printf with QL_DPRINT2
    
    QL_DPRINT2 checks the debug level first before printing.
    Replace device_printf with QL_DPRINT2 to check debug level
    first before printing out the kernel pointers.
    
    PR:             238656
    
    (cherry picked from commit ae389777583dca0e354fdd43aca3413e209160f4)
---
 sys/dev/qlxge/qls_os.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys/dev/qlxge/qls_os.c b/sys/dev/qlxge/qls_os.c
index b4d4c20350ac..0da1c3153caf 100644
--- a/sys/dev/qlxge/qls_os.c
+++ b/sys/dev/qlxge/qls_os.c
@@ -162,20 +162,20 @@ qls_sysctl_get_drvr_stats(SYSCTL_HANDLER_ARGS)
                 ha = (qla_host_t *)arg1;
 
                 for (i = 0; i < ha->num_tx_rings; i++) {
-                        device_printf(ha->pci_dev,
+                        QL_DPRINT2((ha->pci_dev,
                                 "%s: tx_ring[%d].tx_frames= %p\n",
 				__func__, i,
-                                (void *)ha->tx_ring[i].tx_frames);
+                                (void *)ha->tx_ring[i].tx_frames));
 
-                        device_printf(ha->pci_dev,
+                        QL_DPRINT2((ha->pci_dev,
                                 "%s: tx_ring[%d].tx_tso_frames= %p\n",
 				__func__, i,
-                                (void *)ha->tx_ring[i].tx_tso_frames);
+                                (void *)ha->tx_ring[i].tx_tso_frames));
 
-                        device_printf(ha->pci_dev,
+                        QL_DPRINT2((ha->pci_dev,
                                 "%s: tx_ring[%d].tx_vlan_frames= %p\n",
 				__func__, i,
-                                (void *)ha->tx_ring[i].tx_vlan_frames);
+                                (void *)ha->tx_ring[i].tx_vlan_frames));
 
                         device_printf(ha->pci_dev,
                                 "%s: tx_ring[%d].txr_free= 0x%08x\n",
@@ -199,15 +199,15 @@ qls_sysctl_get_drvr_stats(SYSCTL_HANDLER_ARGS)
 		}
 
                 for (i = 0; i < ha->num_rx_rings; i++) {
-                        device_printf(ha->pci_dev,
+                        QL_DPRINT2((ha->pci_dev,
                                 "%s: rx_ring[%d].rx_int= %p\n",
 				__func__, i,
-                                (void *)ha->rx_ring[i].rx_int);
+                                (void *)ha->rx_ring[i].rx_int));
 
-                        device_printf(ha->pci_dev,
+                        QL_DPRINT2((ha->pci_dev,
                                 "%s: rx_ring[%d].rss_int= %p\n",
 				__func__, i,
-                                (void *)ha->rx_ring[i].rss_int);
+                                (void *)ha->rx_ring[i].rss_int));
 
                         device_printf(ha->pci_dev,
                                 "%s: rx_ring[%d].lbq_next= 0x%08x\n",
@@ -385,9 +385,9 @@ qls_pci_attach(device_t dev)
 
 	ha->msix_count = qls_get_msix_count(ha);
 
-	device_printf(dev, "\n%s: ha %p pci_func 0x%x  msix_count 0x%x"
+	QL_DPRINT2((dev, "\n%s: ha %p pci_func 0x%x  msix_count 0x%x"
 		" pci_reg %p pci_reg1 %p\n", __func__, ha,
-		ha->pci_func, ha->msix_count, ha->pci_reg, ha->pci_reg1);
+		ha->pci_func, ha->msix_count, ha->pci_reg, ha->pci_reg1));
 
 	if (pci_alloc_msix(dev, &ha->msix_count)) {
 		device_printf(dev, "%s: pci_alloc_msi[%d] failed\n", __func__,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409290401.48T41t5r080388>