Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic fix a couple txq fencepost issues, from FUKAUMI N...
details: https://anonhg.NetBSD.org/src/rev/b5019b24a045
branches: trunk
changeset: 335478:b5019b24a045
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Jan 08 14:44:43 2015 +0000
description:
fix a couple txq fencepost issues, from FUKAUMI Naoki <fun%naobsd.org@localhost>
diffstat:
sys/dev/ic/dwc_gmac.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 2deb6d9f003c -r b5019b24a045 sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c Thu Jan 08 14:17:42 2015 +0000
+++ b/sys/dev/ic/dwc_gmac.c Thu Jan 08 14:44:43 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.30 2015/01/05 21:37:07 martin Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.31 2015/01/08 14:44:43 jmcneill 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.30 2015/01/05 21:37:07 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.31 2015/01/08 14:44:43 jmcneill Exp $");
/* #define DWC_GMAC_DEBUG 1 */
@@ -598,7 +598,7 @@
/* sync from 'start' to end of ring */
bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
TX_DESC_OFFSET(start),
- TX_DESC_OFFSET(AWGE_TX_RING_COUNT+1)-TX_DESC_OFFSET(start),
+ TX_DESC_OFFSET(AWGE_TX_RING_COUNT)-TX_DESC_OFFSET(start),
ops);
/* sync from start of ring to 'end' */
bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
@@ -867,7 +867,7 @@
return error;
}
- if (sc->sc_txq.t_queued + map->dm_nsegs >= AWGE_TX_RING_COUNT - 1) {
+ if (sc->sc_txq.t_queued + map->dm_nsegs >= AWGE_TX_RING_COUNT) {
bus_dmamap_unload(sc->sc_dmat, map);
return ENOBUFS;
}
Home |
Main Index |
Thread Index |
Old Index