From owner-cvs-all Sat Jun 19 13:17:45 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 1B62914C9E; Sat, 19 Jun 1999 13:17:42 -0700 (PDT) (envelope-from wpaul@FreeBSD.org) Received: (from wpaul@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA15694; Sat, 19 Jun 1999 13:17:42 -0700 (PDT) (envelope-from wpaul@FreeBSD.org) Message-Id: <199906192017.NAA15694@freefall.freebsd.org> From: Bill Paul Date: Sat, 19 Jun 1999 13:17:41 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/pci if_rl.c if_rlreg.h Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk wpaul 1999/06/19 13:17:41 PDT Modified files: sys/pci if_rl.c if_rlreg.h Log: Fix up the RealTek 8139 driver to work on FreeBSD/alpha. This involves a few changes: - there was a bug in rl_list_tx_init(): it was calculating the registers to initialize incorrectly. Not a problem on the x86 where unaligned access are allowed, but a problem on the alpha. - set rl_btag accordingly depending on the machine type - rl_rxeof() needs to be sure to longword-align the packet data. This is a little tricky since we copy the data out of the receive buffer using m_devget(), however there's no way to tell m_devget() to fill in the mbufs starting at a particular offset. To get around this, we tell m_devget to copy bytes+2 bytes starting at offset offset-2. This results in the proper alignment, and we can trim off the two leading bytes afterwards with m_adj(). We also allocate some extra space before the start of the receive buffer so that we don't get into trouble in the case where offset == 0. - redefine vtophys() in if_rlreg.h for the alpha. Making this chipset work on the alpha is sort of the inverse of putting a jet engine on a rowboat (putting a propeller on a 747?) but when you can get these things for $5 a pop, it's hard to stop people from buying them. Revision Changes Path 1.17 +38 -8 src/sys/pci/if_rl.c 1.8 +9 -1 src/sys/pci/if_rlreg.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message