From owner-freebsd-questions Fri Apr 2 12:47:16 1999 Delivered-To: freebsd-questions@freebsd.org Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (Postfix) with SMTP id 1D8AE14BDD for ; Fri, 2 Apr 1999 12:47:06 -0800 (PST) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id PAA13721; Fri, 2 Apr 1999 15:46:38 -0500 From: Bill Paul Message-Id: <199904022046.PAA13721@skynet.ctr.columbia.edu> Subject: Re: !!! pn0: watchdog timeout To: jbarbee@singular.com (John Barbee) Date: Fri, 2 Apr 1999 15:46:36 -0500 (EST) Cc: questions@freebsd.org In-Reply-To: <4.1.19990402095653.00a3ab20@server7.singular.com> from "John Barbee" at Apr 2, 99 10:35:55 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 3625 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Of all the gin joints in all the towns in all the world, John Barbee had to walk into mine and say: > At 09:17 PM 4/1/99 -0500, Bill Paul wrote: > > >First of all, you didn't tell me what version of FreeBSD you have, you > >didn't say in what kind of machine the card is installed, and you didn't > >say exactly what brand/model of ethernet card you have. It's important > >that you do so because I can't see your machine from here. The > >cause of the errors could be one of a few things: > > Sorry. Allow me go describe the situation. [chop] Okay. Let's try this. I have made some changes to the PNIC driver since FreeBSD 3.1-RELEASE. For one thing, I changed the TX queuing mechanism a little bit. (There are also some changes to make it work on FreeBSD/alpha but you shouldn't notice them when compiling on FreeBSD/i386.) You can get the new driver in one of two ways (the files at both locations should be identical): - FTP to ftp.freebsd.org:/pub/FreeBSD/FreeBSD-current/src/sys/pci and download if_pn.c and if_pnreg.h. - Use fetch(1) or a web browser to go to http://www.freebsd.org/~wpaul/PNIC/3.0 and download if_pn.c and if_pnreg.h from there instead. NOTE: if you download with Netscape or Internet Explorer, check that the files aren't littered with ^Ms. If they are, strip them out otherwise they'll confuse the compiler. The revision string in the code should say: $Id: if_pn.c,v 1.10 1999/03/30 19:33:47 wpaul Exp $ Copy the new if_pn.c and if_pnreg.h to /sys/pci on your machine and compile a new kernel. (If you already have a build directory in /sys/compile/YOURKERNEL then it should be enough to just cd to /sys/compile/YOURKERNEL and type make. If you want to recompile from scratch though, go right ahead.) You can also attempt to change the transmit threshold. In if_pn.c, there is a function called pn_init() which initializes the PNIC chip. There you'll see the following line of code: PN_CLRBIT(sc, PN_NETCFG, PN_NETCFG_STORENFWD); Changes this to: PN_SETBIT(sc, PN_NETCFG, PN_NETCFG_STORENFWD); This will turn on store and forward mode, which is the slowest operating mode but the most reliable. I don't think it will make a tremendous difference in terms of speed since you're using 10Mbps. The difference is more pronounced at 100Mbps. You can also experiment with increasing the threshold instead of turning it off entirely. In the same function, you'll see this: PN_SETBIT(sc, PN_NETCFG, PN_TXTHRESH_72BYTES); You can try changing this to PN_TXTHRESH_96BYTES, PN_TXTHRESH_128BYTES or PN_TXTHRESH_160BYTES. Just so you know, the transmit threshold is used by the NIC to decide when to begin transmitting onto the wire. If you turn on store and forward mode, the chip waits until the entire packet has been loaded into its internal SRAM before doing a transmission. When store and forward mode is turned off, it will wait until a certain number of bytes have been transfered into its memory before starting to transmit. This certain number of bytes is controller by the threshold value above. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" ============================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message