From owner-freebsd-tokenring Wed Sep 1 8:29:45 1999 Delivered-To: freebsd-tokenring@freebsd.org Received: from heathers.stdio.com (heathers.stdio.com [199.89.192.5]) by hub.freebsd.org (Postfix) with ESMTP id B950714E83 for ; Wed, 1 Sep 1999 08:29:31 -0700 (PDT) (envelope-from lile@stdio.com) Received: from heathers.stdio.com (lile@heathers.stdio.com [199.89.192.5]) by heathers.stdio.com (8.8.8/8.8.8) with ESMTP id LAA06452; Wed, 1 Sep 1999 11:28:17 -0400 (EDT) (envelope-from lile@stdio.com) Date: Wed, 1 Sep 1999 11:28:17 -0400 (EDT) From: Larry Lile To: serces@mud.dk Cc: FreeBSD Tokenring Mailinglist Subject: Re: Strange Lockup Occurring In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-tokenring@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 1 Sep 1999 serces@mud.dk wrote: > Hi all > > Sorry if this has been asked before or answered somewhere else, but I > seemed unable to find anything about it in the Archives :). > > System is running 3.2-STABLE on a NetFinity 5000, with an Olicom 3117 ISA > card. I have had the same NIC running in another machine, though only at > 4Mbit, whereas in production it has to run 16Mbit not that I could see > that being any problem. I never managed to get ifmedia working correctly before I ran into other bigger problems. I can show you where in the code to force 16Mbit. > Though something goes haywire somewhere, and to me it's veryveryvery > strange.. :) Here's what's going down: > > Machine boots, I login on the console no problem, then I start a > connection to another machine, woohoo, no problem, happy I am :), then I > try to connect from a remote station to the server, still no problem, > everything should be happy in tokenland (or so I thought). > > I then decide to start configuring the machine, installing the things I > need, so I switch to the apachedir in the ports-collection, and exclaim > make install on command line, it fires up, and then stops responding, > nothing happens, no transfer, nothing, and at the same time I start losing > my connection to the machine (Connection closed by remote host). > > First time around, I go to the machine, login on the console, and reboot > the machine. Everything starts working again, so I think, ah, I must have > made a blunder somewhere. While still at the console I do the exact same > manouver as before to install apache (or anything really :), same thing > happens, NIC stops responding, and nothing happens. Okay, this might fix you - no promises though. Try this patch to if_ether.c. It was written for 4.x-current but it will probably work for 3.2. [appended] > For some obscure reason I try to do an "ifconfig oltr0 down", that one > gives: > Aug 31 13:39:30 urd /kernel: oltr0: otlr_stop > Aug 31 13:39:31 urd /kernel: oltr0: DriverTransmitFrameCompleted (frame 12 > status 1) > Aug 31 13:39:31 urd /kernel: oltr0: DriverTransmitFrameCompleted (frame 13 > status 1) > Aug 31 13:39:31 urd /kernel: oltr0: DriverTransmitFrameCompleted (frame 14 > status 1) > Aug 31 13:39:31 urd /kernel: oltr0: DriverTransmitFrameCompleted (frame 15 > status 1) > Aug 31 13:39:31 urd /kernel: oltr0: DriverTransmitFrameCompleted (frame 0 > status 1) > ... etc .. a ton of these followed by > Aug 31 13:39:36 urd /kernel: oltr0: DriverCloseCompleted > > And then an "ifconfig oltr0 up", everything works perfectly again. You can safely ignore those messages - they are only debug for my sanity. The adapter returns incompleted buffers on close 16 buffers, status 1 - not transmitted. > Someone suggested setting the MAX_USERS to 256, which was tried, and even > though I couldn't see any immediate result, it might have helped since I > think it performed a bit better (But that again might simply be because of > the increased buffer sizes :). > > Currently the machine is not in production, so every 15 minutes I reset > the NIC by a small shellscript that takes it down and then up again, it > works, At least if I then try to do something that will lockup the NIC I > only have to wait max 15 mins to get it running again, and is thereby > saved the trouble of running back and forth.. :) > > Any ideas of what might be wrong? I mean, connectivity to/from the machine > seems to be no problem using ssh or telnet, but scp/rcp/ftp/http anything > really that fetches more data, will stop the NIC from responding. > > hope someone can help.. :) If the arp patch doesn't help then you are likely being hit by the "dma" bug that we have never been able to pin down or even prove it is a "dma" bug. I have a new version of the driver but it is for PCI cards only so you will have to wait until I get the ISA code written. Larry Lile lile@stdio.com *** if_ether.c.orig Thu Aug 26 20:48:21 1999 --- if_ether.c Fri Aug 27 14:05:17 1999 *************** *** 566,588 **** * a token-ring nic then try to save the source * routing info. */ if (ac->ac_if.if_type == IFT_ISO88025) { th = (struct iso88025_header *)m->m_pkthdr.header; if ((th->iso88025_shost[0] & 0x80) && ! (((ntohs(th->rcf) & 0x1f00) >> 8) > 2)) { ! sdl->sdl_rcf = ntohs(th->rcf) & 0x0080 ? ! htons(ntohs(th->rcf) & 0xff7f) : ! htons(ntohs(th->rcf) | 0x0080); ! memcpy(sdl->sdl_route, th->rseg, ((ntohs(th->rcf) & 0x1f00) >> 8) - 2); ! sdl->sdl_rcf = htons(ntohs(sdl->sdl_rcf) & 0x1fff); /* Set up source routing information for reply packet (XXX)*/ ! m->m_data -= (((ntohs(th->rcf) & 0x1f00) >> 8) + 8); ! m->m_len += (((ntohs(th->rcf) & 0x1f00) >> 8) + 8); } else { th->iso88025_shost[0] &= 0x7f; - m->m_data -= 8; - m->m_len += 8; } th->rcf = sdl->sdl_rcf; } else { --- 566,593 ---- * a token-ring nic then try to save the source * routing info. */ + printf("arp: m_len %d\n", m->m_len); if (ac->ac_if.if_type == IFT_ISO88025) { th = (struct iso88025_header *)m->m_pkthdr.header; if ((th->iso88025_shost[0] & 0x80) && ! ((th->rcf & 0x001f) > 2)) { ! sdl->sdl_rcf = (th->rcf & 0x8000) ? (th->rcf & 0x7fff) : ! (th->rcf | 0x8000); ! memcpy(sdl->sdl_route, th->rseg, (th->rcf & 0x001f) - 2); ! sdl->sdl_rcf = sdl->sdl_rcf & 0xff1f; /* Set up source routing information for reply packet (XXX)*/ ! m->m_data -= (th->rcf & 0x001f); ! m->m_len += (th->rcf & 0x001f); ! m->m_pkthdr.len += (th->rcf & 0x001f); ! printf("arp: m_len %d\n", m->m_len); ! printf("arp: sr len %d\n", th->rcf & 0x001f); } else { th->iso88025_shost[0] &= 0x7f; } + m->m_data -= 8; + m->m_len += 8; + m->m_pkthdr.len += 8; + printf("arp: m_len %d\n", m->m_len); th->rcf = sdl->sdl_rcf; } else { *************** *** 664,670 **** /* Set the source routing bit if neccesary */ if (th->iso88025_dhost[0] & 0x80) { th->iso88025_dhost[0] &= 0x7f; ! if (((ntohs(th->rcf) & 0x1f00) >> 8) - 2) th->iso88025_shost[0] |= 0x80; } /* Copy the addresses, ac and fc into sa_data */ --- 669,675 ---- /* Set the source routing bit if neccesary */ if (th->iso88025_dhost[0] & 0x80) { th->iso88025_dhost[0] &= 0x7f; ! if ((th->rcf & 0x001f) - 2) th->iso88025_shost[0] |= 0x80; } /* Copy the addresses, ac and fc into sa_data */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-tokenring" in the body of the message