Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Take the modulus of the AEN queue tail number ra...



details:   https://anonhg.NetBSD.org/src/rev/4e14164875b0
branches:  trunk
changeset: 570088:4e14164875b0
user:      heas <heas%NetBSD.org@localhost>
date:      Thu Sep 23 01:16:34 2004 +0000

description:
Take the modulus of the AEN queue tail number rather than the mask of.  Now
the tail pointer advances properly.

diffstat:

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

diffs (27 lines):

diff -r f6602c04acf6 -r 4e14164875b0 sys/dev/pci/twe.c
--- a/sys/dev/pci/twe.c Thu Sep 23 01:14:50 2004 +0000
+++ b/sys/dev/pci/twe.c Thu Sep 23 01:16:34 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: twe.c,v 1.59 2004/09/13 12:55:48 drochner Exp $        */
+/*     $NetBSD: twe.c,v 1.60 2004/09/23 01:16:34 heas Exp $    */
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.59 2004/09/13 12:55:48 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.60 2004/09/23 01:16:34 heas Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1039,7 +1039,7 @@
                aen = TWE_AEN_QUEUE_EMPTY;
        else {
                aen = sc->sc_aen_queue[sc->sc_aen_tail];
-               sc->sc_aen_tail = (sc->sc_aen_tail + 1) & TWE_AEN_Q_LENGTH;
+               sc->sc_aen_tail = (sc->sc_aen_tail + 1) % TWE_AEN_Q_LENGTH;
        }
 
        return (aen);



Home | Main Index | Thread Index | Old Index