Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Consistently set the RX descriptors controll word...



details:   https://anonhg.NetBSD.org/src/rev/d082e91ba145
branches:  trunk
changeset: 333150:d082e91ba145
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Oct 20 19:51:40 2014 +0000

description:
Consistently set the RX descriptors controll word - do not disable RX
interrupt and set chain mode. Now it does not run off the end of the
ring after 512 packets any more.

diffstat:

 sys/dev/ic/dwc_gmac.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 4f0aa7fd93bb -r d082e91ba145 sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c     Mon Oct 20 19:49:34 2014 +0000
+++ b/sys/dev/ic/dwc_gmac.c     Mon Oct 20 19:51:40 2014 +0000
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.15 2014/10/20 19:36:03 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.16 2014/10/20 19:51:40 martin Exp $");
 
 /* #define     DWC_GMAC_DEBUG  1 */
 
@@ -398,7 +398,7 @@
                    + next * sizeof(*desc));
                desc->ddesc_cntl = htole32(
                    __SHIFTIN(AWGE_MAX_PACKET,DDESC_CNTL_SIZE1MASK) |
-                   DDESC_CNTL_RXCHAIN | DDESC_CNTL_RXINT);
+                   DDESC_CNTL_RXCHAIN);
                desc->ddesc_status = htole32(DDESC_STATUS_OWNEDBYDEV);
        }
 
@@ -425,7 +425,8 @@
        for (i = 0; i < AWGE_RX_RING_COUNT; i++) {
                desc = &sc->sc_rxq.r_desc[i];
                desc->ddesc_cntl = htole32(
-                   __SHIFTIN(AWGE_MAX_PACKET,DDESC_CNTL_SIZE1MASK));
+                   __SHIFTIN(AWGE_MAX_PACKET,DDESC_CNTL_SIZE1MASK) |
+                   DDESC_CNTL_RXCHAIN);
                desc->ddesc_status = htole32(DDESC_STATUS_OWNEDBYDEV);
        }
 
@@ -1101,7 +1102,8 @@
 
 skip:
                desc->ddesc_cntl = htole32(
-                   __SHIFTIN(AWGE_MAX_PACKET,DDESC_CNTL_SIZE1MASK));
+                   __SHIFTIN(AWGE_MAX_PACKET,DDESC_CNTL_SIZE1MASK) |
+                   DDESC_CNTL_RXCHAIN);
                desc->ddesc_status = htole32(DDESC_STATUS_OWNEDBYDEV);
                bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
                    RX_DESC_OFFSET(i), sizeof(*desc),



Home | Main Index | Thread Index | Old Index