Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/dev/ic Pull up following revision(s) (requested by jd...



details:   https://anonhg.NetBSD.org/src/rev/62bff49c1dc6
branches:  netbsd-6
changeset: 777087:62bff49c1dc6
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Aug 27 14:04:25 2016 +0000

description:
Pull up following revision(s) (requested by jdc in ticket #1384):
        sys/dev/ic/gem.c: revision 1.105
PR kern/46083
Track the start of each packet, so that we set the "Start of Frame" bit in
all the relevant transmit descriptors when enqueing multiple packets.
Patch from Valery Ushakov, slightly modified by me to handle debug output.
Tested on macppc/6.x and sparc64/7.99.x.

diffstat:

 sys/dev/ic/gem.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (62 lines):

diff -r 9c2edb5a6a78 -r 62bff49c1dc6 sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c  Sat Aug 27 13:57:01 2016 +0000
+++ b/sys/dev/ic/gem.c  Sat Aug 27 14:04:25 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gem.c,v 1.98.2.1 2012/07/05 17:59:12 riz Exp $ */
+/*     $NetBSD: gem.c,v 1.98.2.2 2016/08/27 14:04:25 bouyer Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.98.2.1 2012/07/05 17:59:12 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.98.2.2 2016/08/27 14:04:25 bouyer Exp $");
 
 #include "opt_inet.h"
 
@@ -1359,6 +1359,9 @@
        struct gem_txsoft *txs;
        bus_dmamap_t dmamap;
        int error, firsttx, nexttx = -1, lasttx = -1, ofree, seg;
+#ifdef GEM_DEBUG
+       int otxnext;
+#endif
        uint64_t flags = 0;
 
        if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
@@ -1369,10 +1372,12 @@
         * the first descriptor we'll use.
         */
        ofree = sc->sc_txfree;
-       firsttx = sc->sc_txnext;
+#ifdef GEM_DEBUG
+       otxnext = sc->sc_txnext;
+#endif
 
        DPRINTF(sc, ("%s: gem_start: txfree %d, txnext %d\n",
-           device_xname(sc->sc_dev), ofree, firsttx));
+           device_xname(sc->sc_dev), ofree, otxnext));
 
        /*
         * Loop through the send queue, setting up transmit descriptors
@@ -1477,7 +1482,8 @@
                /*
                 * Initialize the transmit descriptors.
                 */
-               for (nexttx = sc->sc_txnext, seg = 0;
+               firsttx = sc->sc_txnext;
+               for (nexttx = firsttx, seg = 0;
                     seg < dmamap->dm_nsegs;
                     seg++, nexttx = GEM_NEXTTX(nexttx)) {
 
@@ -1599,7 +1605,7 @@
 
        if (sc->sc_txfree != ofree) {
                DPRINTF(sc, ("%s: packets enqueued, IC on %d, OWN on %d\n",
-                   device_xname(sc->sc_dev), lasttx, firsttx));
+                   device_xname(sc->sc_dev), lasttx, otxnext));
                /*
                 * The entire packet chain is set up.
                 * Kick the transmitter.



Home | Main Index | Thread Index | Old Index