Module Name: src Committed By: msaitoh Date: Wed Jan 7 21:12:04 UTC 2015
Modified Files: src/sys/dev/ic [netbsd-7]: dwc_gmac.c Log Message: Pull up following revision(s) (requested by martin in ticket #383): sys/dev/ic/dwc_gmac.c: revision 1.30 Fix index vs. count confusion when syncing a range of newly queued TX descriptors. Pointed out by FUKAUMI Naoki in private chat. To generate a diff of this commit: cvs rdiff -u -r1.24.2.4 -r1.24.2.5 src/sys/dev/ic/dwc_gmac.c 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/ic/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.24.2.4 src/sys/dev/ic/dwc_gmac.c:1.24.2.5 --- src/sys/dev/ic/dwc_gmac.c:1.24.2.4 Tue Dec 9 19:17:50 2014 +++ src/sys/dev/ic/dwc_gmac.c Wed Jan 7 21:12:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.24.2.4 2014/12/09 19:17:50 martin Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.24.2.5 2015/01/07 21:12:04 msaitoh Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.24.2.4 2014/12/09 19:17:50 martin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.24.2.5 2015/01/07 21:12:04 msaitoh Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -772,6 +772,7 @@ dwc_gmac_start(struct ifnet *ifp) { struct dwc_gmac_softc *sc = ifp->if_softc; int old = sc->sc_txq.t_queued; + int start = sc->sc_txq.t_cur; struct mbuf *m0; if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) @@ -791,7 +792,7 @@ dwc_gmac_start(struct ifnet *ifp) if (sc->sc_txq.t_queued != old) { /* packets have been queued, kick it off */ - dwc_gmac_txdesc_sync(sc, old, sc->sc_txq.t_cur, + dwc_gmac_txdesc_sync(sc, start, sc->sc_txq.t_cur, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); bus_space_write_4(sc->sc_bst, sc->sc_bsh,