Module Name:    src
Committed By:   msaitoh
Date:           Wed Feb  5 07:45:46 UTC 2020

Modified Files:
        src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_common.c

Log Message:
No functional change:

 - Add debug printf()s.
 - Remove unused macros.
 - Remove extra newline.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.224 -r1.225 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ixgbe_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.61 src/sys/dev/pci/ixgbe/ix_txrx.c:1.62
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.61	Thu Jan 30 14:02:14 2020
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Wed Feb  5 07:45:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.61 2020/01/30 14:02:14 thorpej Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.62 2020/02/05 07:45:46 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -1556,7 +1556,6 @@ ixgbe_setup_receive_ring(struct rx_ring 
 		rxbuf->addr = htole64(rxbuf->pmap->dm_segs[0].ds_addr);
 	}
 
-
 	/* Setup our descriptor indices */
 	rxr->next_to_check = 0;
 	rxr->next_to_refresh = 0;
@@ -1612,6 +1611,7 @@ ixgbe_setup_receive_structures(struct ad
 	struct rx_ring *rxr = adapter->rx_rings;
 	int            j;
 
+	INIT_DEBUGOUT("ixgbe_setup_receive_structures");
 	for (j = 0; j < adapter->num_queues; j++, rxr++)
 		if (ixgbe_setup_receive_ring(rxr))
 			goto fail;

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.224 src/sys/dev/pci/ixgbe/ixgbe.c:1.225
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.224	Wed Feb  5 01:44:53 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Feb  5 07:45:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.224 2020/02/05 01:44:53 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.225 2020/02/05 07:45:46 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -677,6 +677,8 @@ ixgbe_initialize_transmit_units(struct a
 	struct ixgbe_hw	*hw = &adapter->hw;
 	int i;
 
+	INIT_DEBUGOUT("ixgbe_initialize_transmit_units");
+
 	/* Setup the Base and Length of the Tx Descriptor Ring */
 	for (i = 0; i < adapter->num_queues; i++, txr++) {
 		u64 tdba = txr->txdma.dma_paddr;

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.63 src/sys/dev/pci/ixgbe/ixgbe.h:1.64
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.63	Tue Feb  4 19:42:55 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Wed Feb  5 07:45:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.63 2020/02/04 19:42:55 thorpej Exp $ */
+/* $NetBSD: ixgbe.h,v 1.64 2020/02/05 07:45:46 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -646,29 +646,6 @@ struct adapter {
 #define IXGBE_CORE_LOCK_ASSERT(_sc)       KASSERT(mutex_owned(&(_sc)->core_mtx))
 #define IXGBE_TX_LOCK_ASSERT(_sc)         KASSERT(mutex_owned(&(_sc)->tx_mtx))
 
-/* Stats macros */
-#if __FreeBSD_version >= 1100036
-#define IXGBE_SET_IERRORS(sc, count)     (sc)->ierrors = (count)
-#define IXGBE_SET_OPACKETS(sc, count)    (sc)->opackets = (count)
-#define IXGBE_SET_OERRORS(sc, count)     (sc)->oerrors = (count)
-#define IXGBE_SET_COLLISIONS(sc, count)
-#define IXGBE_SET_IBYTES(sc, count)      (sc)->ibytes = (count)
-#define IXGBE_SET_OBYTES(sc, count)      (sc)->obytes = (count)
-#define IXGBE_SET_IMCASTS(sc, count)     (sc)->imcasts = (count)
-#define IXGBE_SET_OMCASTS(sc, count)     (sc)->omcasts = (count)
-#define IXGBE_SET_IQDROPS(sc, count)     (sc)->iqdrops = (count)
-#else
-#define IXGBE_SET_IERRORS(sc, count)     (sc)->ifp->if_ierrors = (count)
-#define IXGBE_SET_OPACKETS(sc, count)    (sc)->ifp->if_opackets = (count)
-#define IXGBE_SET_OERRORS(sc, count)     (sc)->ifp->if_oerrors = (count)
-#define IXGBE_SET_COLLISIONS(sc, count)  (sc)->ifp->if_collisions = (count)
-#define IXGBE_SET_IBYTES(sc, count)      (sc)->ifp->if_ibytes = (count)
-#define IXGBE_SET_OBYTES(sc, count)      (sc)->ifp->if_obytes = (count)
-#define IXGBE_SET_IMCASTS(sc, count)     (sc)->ifp->if_imcasts = (count)
-#define IXGBE_SET_OMCASTS(sc, count)     (sc)->ifp->if_omcasts = (count)
-#define IXGBE_SET_IQDROPS(sc, count)     (sc)->ifp->if_iqdrops = (count)
-#endif
-
 /* External PHY register addresses */
 #define IXGBE_PHY_CURRENT_TEMP		0xC820
 #define IXGBE_PHY_OVERTEMP_STATUS	0xC830

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.26 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.27
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.26	Mon Dec 16 02:50:54 2019
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Wed Feb  5 07:45:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.26 2019/12/16 02:50:54 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.27 2020/02/05 07:45:46 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -464,6 +464,8 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw 
 	u32 i;
 	u32 regval;
 
+	DEBUGFUNC("ixgbe_start_hw_gen2");
+
 	/* Clear the rate limiters */
 	for (i = 0; i < hw->mac.max_tx_queues; i++) {
 		IXGBE_WRITE_REG(hw, IXGBE_RTTDQSEL, i);

Reply via email to