Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/dev/pci Pullup rev 1.59 (requested by martin in tic...



details:   https://anonhg.NetBSD.org/src/rev/28d7ee01e173
branches:  netbsd-1-6
changeset: 531157:28d7ee01e173
user:      jmc <jmc%NetBSD.org@localhost>
date:      Mon Mar 15 05:45:09 2004 +0000

description:
Pullup rev 1.59 (requested by martin in ticket #1622)

Set BGE_JUMBO_RXRING_VALID in bge_flags when allocating jumbo ring buffers
so it can be freed later. PR#24686

diffstat:

 sys/dev/pci/if_bge.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r c90040dc9052 -r 28d7ee01e173 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Mon Mar 15 05:42:48 2004 +0000
+++ b/sys/dev/pci/if_bge.c      Mon Mar 15 05:45:09 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.29.2.6 2003/10/20 05:02:44 cyber Exp $    */
+/*     $NetBSD: if_bge.c,v 1.29.2.7 2004/03/15 05:45:09 jmc Exp $      */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -888,12 +888,16 @@
        int i;
        volatile struct bge_rcb *rcb;
 
+       if (sc->bge_flags & BGE_JUMBO_RXRING_VALID)
+               return 0;
+
        for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) {
                if (bge_newbuf_jumbo(sc, i, NULL) == ENOBUFS)
                        return(ENOBUFS);
        };
 
        sc->bge_jumbo = i - 1;
+       sc->bge_flags |= BGE_JUMBO_RXRING_VALID;
 
        rcb = &sc->bge_rdata->bge_info.bge_jumbo_rx_rcb;
        rcb->bge_maxlen_flags = 0;



Home | Main Index | Thread Index | Old Index