From: | Peter Avalos <pavalos@xxxxxxxxxxxx> |
Date: | Mon, 23 Feb 2004 02:41:17 -0800 |
I did some work on getting the if_bfe driver from FreeBSD to work in DragonFly, and here's the results. It's working great for me. bfe.tar.bz2 is the bfe directory under src/sys/dev/netif/ bfe.diff is a diff against the rest of the tree. bfe.4 is the manpage. --Pete
Attachment:
bfe.tar.bz2
Description: Binary data
Index: share/man/man4/Makefile =================================================================== RCS file: /home/dcvs/src/share/man/man4/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- share/man/man4/Makefile 15 Jan 2004 15:53:19 -0000 1.4 +++ share/man/man4/Makefile 23 Feb 2004 09:50:30 -0000 @@ -19,6 +19,7 @@ atkbdc.4 \ aue.4 \ awi.4 \ + bfe.4 \ bge.4 \ bktr.4 \ blackhole.4 \ Index: share/man/man4/miibus.4 =================================================================== RCS file: /home/dcvs/src/share/man/man4/miibus.4,v retrieving revision 1.3 diff -u -r1.3 miibus.4 --- share/man/man4/miibus.4 13 Jan 2004 01:48:59 -0000 1.3 +++ share/man/man4/miibus.4 23 Feb 2004 10:14:39 -0000 @@ -48,6 +48,8 @@ .Bl -tag -compact -width ".Xr fxp 4" .It Xr aue 4 ADMtek USB Ethernet +.It Xr bfe 4 +Broadcom BCM440x 10/100 Ethernet .It Xr bge 4 Broadcom BCM570xx Gigabit Ethernet .It Xr cue 4 Index: sys/conf/files =================================================================== RCS file: /home/dcvs/src/sys/conf/files,v retrieving revision 1.52 diff -u -r1.52 files --- sys/conf/files 21 Feb 2004 06:37:06 -0000 1.52 +++ sys/conf/files 23 Feb 2004 09:59:59 -0000 @@ -309,6 +309,7 @@ dev/disk/aic7xxx/aic79xx.c optional ahd pci dev/disk/aic7xxx/aic79xx_osm.c optional ahd pci dev/disk/aic7xxx/aic79xx_pci.c optional ahd pci +dev/netif/bfe/if_bfe.c optional bfe dev/netif/bge/if_bge.c optional bge dev/disk/buslogic/bt.c optional bt dev/disk/buslogic/bt_isa.c optional bt isa Index: sys/i386/conf/GENERIC =================================================================== RCS file: /home/dcvs/src/sys/i386/conf/GENERIC,v retrieving revision 1.9 diff -u -r1.9 GENERIC --- sys/i386/conf/GENERIC 10 Feb 2004 07:55:47 -0000 1.9 +++ sys/i386/conf/GENERIC 23 Feb 2004 10:15:35 -0000 @@ -199,6 +199,7 @@ # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support +device bfe # Broadcom BCM440x 10/100 Ethernet device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) device pcn # AMD Am79C97x PCI 10/100 NICs Index: sys/i386/conf/LINT =================================================================== RCS file: /home/dcvs/src/sys/i386/conf/LINT,v retrieving revision 1.21 diff -u -r1.21 LINT --- sys/i386/conf/LINT 10 Feb 2004 07:55:47 -0000 1.21 +++ sys/i386/conf/LINT 23 Feb 2004 10:15:25 -0000 @@ -1998,6 +1998,7 @@ device miibus # PCI Ethernet NICs that use the common MII bus controller code. +device bfe # Broadcom BCM440x 10/100 Ethernet device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) device my # Myson Fast Ethernet (MTD80X, MTD89X) Index: sys/dev/netif/Makefile =================================================================== RCS file: /home/dcvs/src/sys/dev/netif/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- sys/dev/netif/Makefile 13 Feb 2004 21:15:12 -0000 1.3 +++ sys/dev/netif/Makefile 23 Feb 2004 10:07:12 -0000 @@ -1,7 +1,7 @@ # $DragonFly: src/sys/dev/netif/Makefile,v 1.3 2004/02/13 21:15:12 joerg Exp $ # -SUBDIR= an ar aue bge cue dc ed em fwe fxp gx kue lge lnc mii_layer my \ +SUBDIR= an ar aue bfe bge cue dc ed em fwe fxp gx kue lge lnc mii_layer my \ nge pcn ray rl sbni sbsh sf sis sk snc sr ste ti tl tx \ txp vr vx wb wi wx xe xl
. \" . \" Copyright (c) 2003 Stuart Walsh . \" . \" All rights reserved. . \" . \" Redistribution and use in source and binary forms, with or without . \" modification, are permitted provided that the following conditions . \" are met: . \" 1. Redistributions of source code must retain the above copyright . \" notice, this list of conditions and the following disclaimer. . \" 2. Redistributions in binary form must reproduce the above copyright . \" notice, this list of conditions and the following disclaimer in the . \" documentation and/or other materials provided with the distribution. . \" . \" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR . \" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES . \" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. . \" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, . \" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT . \" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, . \" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY . \" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT . \" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF . \" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . \" . \" $FreeBSD: src/share/man/man4/bfe.4,v 1.1.4.1 2004/02/17 20:56:50 julian Exp $ . \" $DragonFly$ . \" . Dd September 4, 2003 . Dt BFE 4 . Os . Sh NAME . Nm bfe . Nd Broadcom BCM4401 Ethernet Device Driver . Sh SYNOPSIS . Cd "device miibus" . Cd "device bfe" . Sh DESCRIPTION The . Nm driver provides support for the Broadcom BCM4401 based Fast Ethernet adapters. . Pp The . Nm driver supports the following media types: . Pp . Bl -tag -width xxxxxxxxxxxxxxxxxxxx . It autoselect Enable autoselection of the media type and options . It 10baseT/UTP Set 10Mbps operation . It 100baseTX Set 100Mbps (fast ethernet) operation . El . Pp The . Nm driver supports the following media options: . Pp . Bl -tag -width xxxxxxxxxxxxxxxxxxxx . It full-duplex Set full duplex operation . El . Pp For further information on configuring this device, see . Xr ifconfig 8 . . Pp . Sh DIAGNOSTICS . Bl -diag . It "bfe%d: couldn't map memory" A fatal initialization error has occurred. . It "bfe%d: couldn't map interrupt" A fatal initialization error has occurred. . It "bfe%d: failed to allocate DMA resources" There are not enough mbuf's available for allocation. . It "bfe%d: watchdog timeout -- resetting" The device has stopped responding to the network, or there is a problem with the network connection (cable). . El . Sh SEE ALSO . Xr arp 4 , . Xr miibus 4 , . Xr netintro 4 , . Xr ng_ether 4 , . Xr ifconfig 8 . Sh HISTORY The . Nm device driver first appeared in . Fx 5.1 . . Sh AUTHORS . An -nosplit The . Nm device driver was written by . An Stuart Walsh and . An Duncan Barclay . This manual page was written by . An Stuart Walsh .