svn commit: r280058 - head/sys/dev/wpi

Adrian Chadd adrian at FreeBSD.org
Sun Mar 15 20:19:02 UTC 2015


Author: adrian
Date: Sun Mar 15 20:19:01 2015
New Revision: 280058
URL: https://svnweb.freebsd.org/changeset/base/280058

Log:
  Check some variables only on active TX rings
  
  PR:		kern/197143
  Submitted by:	Andriy Voskoboinyk <s3erios at gmail.com>

Modified:
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wpi/if_wpireg.h

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sun Mar 15 20:18:09 2015	(r280057)
+++ head/sys/dev/wpi/if_wpi.c	Sun Mar 15 20:19:01 2015	(r280058)
@@ -2096,7 +2096,7 @@ wpi_wakeup_intr(struct wpi_softc *sc)
 		sc->rxq.update = 0;
 		wpi_update_rx_ring(sc);
 	}
-	for (qid = 0; qid < WPI_NTXQUEUES; qid++) {
+	for (qid = 0; qid < WPI_DRV_NTXQUEUES; qid++) {
 		struct wpi_tx_ring *ring = &sc->txq[qid];
 
 		if (ring->update) {
@@ -2165,7 +2165,7 @@ wpi_fatal_intr(struct wpi_softc *sc)
 	wpi_nic_unlock(sc);
 	/* Dump driver status (TX and RX rings) while we're here. */
 	printf("driver status:\n");
-	for (i = 0; i < WPI_NTXQUEUES; i++) {
+	for (i = 0; i < WPI_DRV_NTXQUEUES; i++) {
 		struct wpi_tx_ring *ring = &sc->txq[i];
 		printf("  tx ring %2d: qid=%-2d cur=%-3d queued=%-3d\n",
 		    i, ring->qid, ring->cur, ring->queued);

Modified: head/sys/dev/wpi/if_wpireg.h
==============================================================================
--- head/sys/dev/wpi/if_wpireg.h	Sun Mar 15 20:18:09 2015	(r280057)
+++ head/sys/dev/wpi/if_wpireg.h	Sun Mar 15 20:19:01 2015	(r280058)
@@ -24,6 +24,7 @@
 #define WPI_RX_RING_COUNT	(1 << WPI_RX_RING_COUNT_LOG)
 
 #define WPI_NTXQUEUES		8
+#define WPI_DRV_NTXQUEUES	5
 #define WPI_NDMACHNLS		6
 
 /* Maximum scatter/gather. */


More information about the svn-src-head mailing list