Module Name:    src
Committed By:   msaitoh
Date:           Fri May 24 02:29:36 UTC 2013

Modified Files:
        src/sys/dev/pci: if_bge.c if_bgevar.h

Log Message:
 bge_init_tx_ring() uses BGE_RSLOTS (==256) but bge_free_tx_ring() uses
BGE_TX_RING_CNT (== 512). Delete BGE_RSLOTS and use BGE_TX_RING_CNT. Same as
OpenBSD's if_bge.c rev. 1.86.


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/if_bgevar.h

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/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.245 src/sys/dev/pci/if_bge.c:1.246
--- src/sys/dev/pci/if_bge.c:1.245	Tue May 21 06:59:28 2013
+++ src/sys/dev/pci/if_bge.c	Fri May 24 02:29:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.245 2013/05/21 06:59:28 martin Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.246 2013/05/24 02:29:36 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.245 2013/05/21 06:59:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.246 2013/05/24 02:29:36 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1965,7 +1965,7 @@ bge_init_tx_ring(struct bge_softc *sc)
 		bge_writembx(sc, BGE_MBX_TX_NIC_PROD0_LO, 0);
 
 	SLIST_INIT(&sc->txdma_list);
-	for (i = 0; i < BGE_RSLOTS; i++) {
+	for (i = 0; i < BGE_TX_RING_CNT; i++) {
 		if (bus_dmamap_create(sc->bge_dmatag, BGE_TXDMA_MAX,
 		    BGE_NTXSEG, ETHER_MAX_LEN_JUMBO, 0, BUS_DMA_NOWAIT,
 		    &dmamap))

Index: src/sys/dev/pci/if_bgevar.h
diff -u src/sys/dev/pci/if_bgevar.h:1.14 src/sys/dev/pci/if_bgevar.h:1.15
--- src/sys/dev/pci/if_bgevar.h:1.14	Sun Mar 24 22:33:59 2013
+++ src/sys/dev/pci/if_bgevar.h	Fri May 24 02:29:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bgevar.h,v 1.14 2013/03/24 22:33:59 msaitoh Exp $	*/
+/*	$NetBSD: if_bgevar.h,v 1.15 2013/05/24 02:29:36 msaitoh Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -152,7 +152,6 @@
 #define BGE_SSLOTS	256
 #define BGE_MSLOTS	256
 #define BGE_JSLOTS	384
-#define BGE_RSLOTS	256
 
 #define BGE_JRAWLEN (BGE_JUMBO_FRAMELEN + ETHER_ALIGN)
 #define BGE_JLEN (BGE_JRAWLEN + (sizeof(uint64_t) - \

Reply via email to