Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/ic Pullup 1.14 [mjl]:



details:   https://anonhg.NetBSD.org/src/rev/a2e353909b05
branches:  netbsd-1-5
changeset: 490090:a2e353909b05
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 01 23:24:45 2000 +0000

description:
Pullup 1.14 [mjl]:
Fix hanging token ring when data size is multiple of 514, using
patch in PR/11316 by YAMAMOTO Takashi.
This fixes random hangs I experienced, and probably also
remedies PR/11300 and PR/9321.

diffstat:

 sys/dev/ic/tropic.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 3ad78ccecc7b -r a2e353909b05 sys/dev/ic/tropic.c
--- a/sys/dev/ic/tropic.c       Wed Nov 01 23:19:00 2000 +0000
+++ b/sys/dev/ic/tropic.c       Wed Nov 01 23:24:45 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tropic.c,v 1.12 2000/06/15 19:55:27 soren Exp $        */
+/*     $NetBSD: tropic.c,v 1.12.2.1 2000/11/01 23:24:45 tv Exp $       */
 
 /* 
  * Ported to NetBSD by Onno van der Linden
@@ -755,7 +755,6 @@
        framedata = txbuf + XMIT_FP_DATA;
        size = 0;
        bufspace = FP_BUF_LEN - XMIT_FP_DATA;
-       --sc->sc_xmit_buffers;
        for (m = m0; m; m = m->m_next) {
                int len = m->m_len;
                char *ptr = mtod(m, char *);
@@ -781,7 +780,12 @@
                        framedata += len;
                }
        }
-       TXB_OUTW(sc, txbuf, XMIT_BUFLEN, (FP_BUF_LEN - XMIT_FP_DATA - bufspace));
+       if (size % (FP_BUF_LEN - XMIT_FP_DATA)) {
+               --sc->sc_xmit_buffers;
+               TXB_OUTW(sc, txbuf, XMIT_BUFLEN,
+                                  (FP_BUF_LEN - XMIT_FP_DATA - bufspace));
+       }
+
        m_freem(m0);            /* free mbuf chain */
 
        TXB_OUTB(sc, first_txbuf, XMIT_RETCODE, 0xfe);



Home | Main Index | Thread Index | Old Index