Subject: admin/11316: tr driver hang up with 514*n bytes length frame transmitted
To: None <gnats-bugs@gnats.netbsd.org>
From: None <takashi.yamamoto@bigfoot.com>
List: netbsd-bugs
Date: 10/26/2000 01:45:34
>Number: 11316
>Category: admin
>Synopsis: tr driver hang up with 514*n bytes length frame transmitted
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: netbsd-admin
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 26 01:45:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: YAMAMOTO Takashi
>Release: 1.5_ALPHA2
>Organization:
>Environment:
NetBSD ta 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (nc5201) #36: Thu Oct 26 17:15:35 JST 2000 takashi@ta:/usr/src/sys/arch/i386/compile/nc5201 i386
>Description:
tr driver hang up with 514*n bytes length frame transmitted
>How-To-Repeat:
send 514*n bytes length packet through tr?
>Fix:
below is patch to fix this problem.
--- bak/tropic.c Sat Jun 17 23:22:15 2000
+++ tropic.c Thu Oct 26 17:13:11 2000
@@ -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,10 @@
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);
>Release-Note:
>Audit-Trail:
>Unformatted: