From owner-freebsd-hackers Sat Oct 10 08:20:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA16175 for freebsd-hackers-outgoing; Sat, 10 Oct 1998 08:20:24 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id IAA16146; Sat, 10 Oct 1998 08:20:17 -0700 (PDT) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id LAA05659; Sat, 10 Oct 1998 11:25:26 -0400 From: Bill Paul Message-Id: <199810101525.LAA05659@skynet.ctr.columbia.edu> Subject: Call for testers for PNIC ethernet driver To: hackers@FreeBSD.ORG, hardware@FreeBSD.ORG Date: Sat, 10 Oct 1998 11:25:25 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I know I'm going to regret this, but: this is a call for testers for a preliminary driver for PNIC-based ethernet adapters. This includes the latest LinkSys LNE100TX 10/100 adapters, certain newer NetGear cards, and others. The LinkSys cards have the chip marked with the part number 82c168 or 82c169. I know I said I was going to do a driver for the Winbond fast ethernet chip next, but I haven't found a vendor for a board yet. Incidentally, if anyone knows where to order a board with a Winbond W89C840F chip, please let me know. (That's 840, not 940; the 940 is 10Mbps only and is an NE2000 clone.) Note: my two usual test machines were shipped to Berlin for a demo at a conference by some of the lab crew. This left me with just the one SMP box and no neigboring machine with which to do decent speed tests. (I usually hook the card up to another working system with a crossover cable and stuff it full of traffic to see what happens.) All I can say for now is that the driver is stable enough that I left it in the test box overnight as the primary interface and it hasn't fallen over. I have not been able to pound on it to really evaluate performance, nor have I tested it at all speeds and modes, however it should autonegotiate all modes correctly (right now it's linked to a switch at 100Mbps/full-duplex). Yes, this is a separate driver, not a patch to the de driver. The de driver scares me. Also, the de driver uses a fixed size ring buffer descriptor layout, whereas I'm partial to using linked lists. This actually proved to be a bit of a problem as I encountered some unusual behavior with the PNIC. With my linked list strategy, it's necessary to reload the chip's transmit list base pointer register (if the chip hits the end of a list, you want to give it a new one). However after several hours of hammering on it, I could not find a way to properly update the chip's pointer after it had been loaded the first time. Even after shutting the transmitter off, updating the register, and observing that its contents had changed, the chip would refuse to transmit from the newly loaded list. (Instead, it would yield 'no tx buffer available' errors). The only way to really clear the pointer is to do a soft reset of the chip, but that trashes the rest of the chip state. My solution to this was to allocate one extra descriptor (called the kludge descriptor) and tack it on the end of each list with the 'own' bit cleared. This would cause the chip to go idle when it hit the end of the current list with its pointer set to the address of the kludge descriptor, which I could then update to point to anther arbitrarily located list. It means loading an extra descriptor into the chip for each frame, which sucks, but which hopefully won't impact performace that much. Also, the PNIC chip apparently has an internal transceiver which can be used instead of an external PHY, however the LinkSys card that I have uses an external PHY chip so that's what the driver supports. I get the feeling that most of the PNIC-based cards use an external PHY anyway. The driver source code can be obtained from the following locations: http://www.freebsd.org/~wpaul/PNIC/3.0 source for FreeBSD 3.0 http://www.freebsd.org/~wpaul/PNIC/2.2 source for FreeBSD 2.2.x To add the driver to an existing system, do the following: - Download if_pn.c and if_pnreg.h for your system and copy them to /sys/pci. - Edit /sys/conf/files and add a line that says: pci/if_pn.c optional pn device-driver - Edit your kernel config file (e.g. /sys/i386/conf/GENERIC) and add a line that says: device pn0 - Config and compile a new kernel and boot it. Please report successes or failures to wpaul@skynet.ctr.columbia.edu. Bear in mind that I can't really do proper tests at 100Mbps until my two test machines get back from Berlin; if you do have problems, give detailed descriptions. -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-hackers" in the body of the message