Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/imx fix the tx stall problem. ("watchdog timeout")



details:   https://anonhg.NetBSD.org/src/rev/5e54cca7d26b
branches:  trunk
changeset: 345911:5e54cca7d26b
user:      ryo <ryo%NetBSD.org@localhost>
date:      Wed Jun 15 07:26:11 2016 +0000

description:
fix the tx stall problem. ("watchdog timeout")
TX descriptor should be written out once before writing READY flag.

diffstat:

 sys/arch/arm/imx/if_enet.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r bab1dae1a970 -r 5e54cca7d26b sys/arch/arm/imx/if_enet.c
--- a/sys/arch/arm/imx/if_enet.c        Wed Jun 15 06:01:21 2016 +0000
+++ b/sys/arch/arm/imx/if_enet.c        Wed Jun 15 07:26:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_enet.c,v 1.7 2016/06/10 13:27:11 ozaki-r Exp $      */
+/*     $NetBSD: if_enet.c,v 1.8 2016/06/15 07:26:11 ryo Exp $  */
 
 /*
  * Copyright (c) 2014 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.7 2016/06/10 13:27:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.8 2016/06/15 07:26:11 ryo Exp $");
 
 #include "vlan.h"
 
@@ -1744,9 +1744,10 @@
                sc->sc_txdesc_ring[idx].tx_databuf = map->dm_segs[i].ds_addr;
                sc->sc_txdesc_ring[idx].tx_flags2 = flags2;
                sc->sc_txdesc_ring[idx].tx_flags3 = 0;
+               TXDESC_WRITEOUT(idx);
+
                sc->sc_txdesc_ring[idx].tx_flags1_len =
                    flags1 | TXFLAGS1_LEN(map->dm_segs[i].ds_len);
-
                TXDESC_WRITEOUT(idx);
 
                idx = ENET_TX_NEXTIDX(idx);



Home | Main Index | Thread Index | Old Index