Remove FDDI support.

This commit is contained in:
thorpej 2020-01-20 18:38:17 +00:00
parent bf954b559c
commit 4541d6828b
64 changed files with 110 additions and 6380 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.2304 2020/01/19 20:41:17 riastradh Exp $
# $NetBSD: mi,v 1.2305 2020/01/20 18:38:18 thorpej Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@ -2345,7 +2345,7 @@
./usr/include/net/if_dl.h comp-c-include
./usr/include/net/if_ether.h comp-c-include
./usr/include/net/if_etherip.h comp-obsolete obsolete
./usr/include/net/if_fddi.h comp-c-include
./usr/include/net/if_fddi.h comp-obsolete obsolete
./usr/include/net/if_gif.h comp-c-include
./usr/include/net/if_gre.h comp-c-include
./usr/include/net/if_hippi.h comp-obsolete obsolete
@ -11099,9 +11099,9 @@
./usr/share/man/cat9/fdclone.0 comp-sys-catman .cat
./usr/share/man/cat9/fdcloseexec.0 comp-sys-catman .cat
./usr/share/man/cat9/fdcopy.0 comp-sys-catman .cat
./usr/share/man/cat9/fddi_addmulti.0 comp-sys-catman .cat
./usr/share/man/cat9/fddi_delmulti.0 comp-sys-catman .cat
./usr/share/man/cat9/fddi_ifattach.0 comp-sys-catman .cat
./usr/share/man/cat9/fddi_addmulti.0 comp-obsolete obsolete
./usr/share/man/cat9/fddi_delmulti.0 comp-obsolete obsolete
./usr/share/man/cat9/fddi_ifattach.0 comp-obsolete obsolete
./usr/share/man/cat9/fdexpand.0 comp-sys-catman .cat
./usr/share/man/cat9/fdfree.0 comp-sys-catman .cat
./usr/share/man/cat9/fdinit.0 comp-sys-catman .cat
@ -19034,9 +19034,9 @@
./usr/share/man/html9/fdclone.html comp-sys-htmlman html
./usr/share/man/html9/fdcloseexec.html comp-sys-htmlman html
./usr/share/man/html9/fdcopy.html comp-sys-htmlman html
./usr/share/man/html9/fddi_addmulti.html comp-sys-htmlman html
./usr/share/man/html9/fddi_delmulti.html comp-sys-htmlman html
./usr/share/man/html9/fddi_ifattach.html comp-sys-htmlman html
./usr/share/man/html9/fddi_addmulti.html comp-obsolete obsolete
./usr/share/man/html9/fddi_delmulti.html comp-obsolete obsolete
./usr/share/man/html9/fddi_ifattach.html comp-obsolete obsolete
./usr/share/man/html9/fdexpand.html comp-sys-htmlman html
./usr/share/man/html9/fdfree.html comp-sys-htmlman html
./usr/share/man/html9/fdinit.html comp-sys-htmlman html
@ -27114,9 +27114,9 @@
./usr/share/man/man9/fdclone.9 comp-sys-man .man
./usr/share/man/man9/fdcloseexec.9 comp-sys-man .man
./usr/share/man/man9/fdcopy.9 comp-sys-man .man
./usr/share/man/man9/fddi_addmulti.9 comp-sys-man .man
./usr/share/man/man9/fddi_delmulti.9 comp-sys-man .man
./usr/share/man/man9/fddi_ifattach.9 comp-sys-man .man
./usr/share/man/man9/fddi_addmulti.9 comp-obsolete obsolete
./usr/share/man/man9/fddi_delmulti.9 comp-obsolete obsolete
./usr/share/man/man9/fddi_ifattach.9 comp-obsolete obsolete
./usr/share/man/man9/fdexpand.9 comp-sys-man .man
./usr/share/man/man9/fdfree.9 comp-sys-man .man
./usr/share/man/man9/fdinit.9 comp-sys-man .man

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1674 2020/01/19 20:41:17 riastradh Exp $
# $NetBSD: mi,v 1.1675 2020/01/20 18:38:18 thorpej Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -1104,16 +1104,16 @@
./usr/share/man/cat4/faith.0 man-sys-catman .cat
./usr/share/man/cat4/fast_ipsec.0 man-obsolete obsolete
./usr/share/man/cat4/fd.0 man-sys-catman .cat
./usr/share/man/cat4/fea.0 man-sys-catman .cat
./usr/share/man/cat4/fea.0 man-obsolete obsolete
./usr/share/man/cat4/filemon.0 man-obsolete obsolete
./usr/share/man/cat4/finsio.0 man-sys-catman .cat
./usr/share/man/cat4/flash.0 man-sys-catman .cat
./usr/share/man/cat4/fms.0 man-sys-catman .cat
./usr/share/man/cat4/fmv.0 man-sys-catman .cat
./usr/share/man/cat4/fpa.0 man-sys-catman .cat
./usr/share/man/cat4/fpa.0 man-obsolete obsolete
./usr/share/man/cat4/fss.0 man-sys-catman .cat
./usr/share/man/cat4/fssbs.0 man-obsolete obsolete
./usr/share/man/cat4/fta.0 man-sys-catman .cat
./usr/share/man/cat4/fta.0 man-obsolete obsolete
./usr/share/man/cat4/fujbp.0 man-sys-catman .cat
./usr/share/man/cat4/fujhk.0 man-sys-catman .cat
./usr/share/man/cat4/fujitsu.0 man-obsolete obsolete
@ -4288,16 +4288,16 @@
./usr/share/man/html4/faith.html man-sys-htmlman html
./usr/share/man/html4/fast_ipsec.html man-obsolete obsolete
./usr/share/man/html4/fd.html man-sys-htmlman html
./usr/share/man/html4/fea.html man-sys-htmlman html
./usr/share/man/html4/fea.html man-obsolete obsolete
./usr/share/man/html4/filemon.html man-obsolete obsolete
./usr/share/man/html4/finsio.html man-sys-htmlman html
./usr/share/man/html4/flash.html man-sys-htmlman html
./usr/share/man/html4/fms.html man-sys-htmlman html
./usr/share/man/html4/fmv.html man-sys-htmlman html
./usr/share/man/html4/fpa.html man-sys-htmlman html
./usr/share/man/html4/fpa.html man-obsolete obsolete
./usr/share/man/html4/fss.html man-sys-htmlman html
./usr/share/man/html4/fssbs.html man-obsolete obsolete
./usr/share/man/html4/fta.html man-sys-htmlman html
./usr/share/man/html4/fta.html man-obsolete obsolete
./usr/share/man/html4/fujbp.html man-sys-htmlman html
./usr/share/man/html4/fujhk.html man-sys-htmlman html
./usr/share/man/html4/fujitsu.html man-obsolete obsolete
@ -7244,16 +7244,16 @@
./usr/share/man/man4/faith.4 man-sys-man .man
./usr/share/man/man4/fast_ipsec.4 man-obsolete obsolete
./usr/share/man/man4/fd.4 man-sys-man .man
./usr/share/man/man4/fea.4 man-sys-man .man
./usr/share/man/man4/fea.4 man-obsolete obsolete
./usr/share/man/man4/filemon.4 man-obsolete obsolete
./usr/share/man/man4/finsio.4 man-sys-man .man
./usr/share/man/man4/flash.4 man-sys-man .man
./usr/share/man/man4/fms.4 man-sys-man .man
./usr/share/man/man4/fmv.4 man-sys-man .man
./usr/share/man/man4/fpa.4 man-sys-man .man
./usr/share/man/man4/fpa.4 man-obsolete obsolete
./usr/share/man/man4/fss.4 man-sys-man .man
./usr/share/man/man4/fssbs.4 man-obsolete obsolete
./usr/share/man/man4/fta.4 man-sys-man .man
./usr/share/man/man4/fta.4 man-obsolete obsolete
./usr/share/man/man4/fujbp.4 man-sys-man .man
./usr/share/man/man4/fujhk.4 man-sys-man .man
./usr/share/man/man4/fujitsu.4 man-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.698 2020/01/19 20:41:18 riastradh Exp $
# $NetBSD: Makefile,v 1.699 2020/01/20 18:38:17 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@ -23,7 +23,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
dmphy.4 dpt.4 dpti.4 drm.4 drum.4 drvctl.4 dtv.4 dtviic.4 dwctwo.4 \
eap.4 ebus.4 edc.4 elmc.4 emuxki.4 ena.4 envsys.4 ep.4 esh.4 \
esa.4 esiop.4 esm.4 eso.4 et.4 etphy.4 exphy.4 \
fd.4 finsio.4 flash.4 fpa.4 fms.4 fss.4 \
fd.4 finsio.4 flash.4 fms.4 fss.4 \
fujbp.4 full.4 fxp.4 \
gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \
glxtphy.4 gpib.4 gpio.4 gpioirq.4 gpiolock.4 gpiopps.4 gpiopwm.4 \
@ -206,7 +206,6 @@ MLINKS+=dbcool.4 adt7475.4
MLINKS+=dbcool.4 adt7476.4
MLINKS+=dk.4 wedge.4
MLINKS+=fd.4 stderr.4 fd.4 stdin.4 fd.4 stdout.4
MLINKS+=fpa.4 fea.4 fpa.4 fta.4
MLINKS+=fujbp.4 fujhk.4
MLINKS+=hdaudio.4 hdafg.4
MLINKS+=hdaudio.4 hdaudiobus.4

View File

@ -1,91 +0,0 @@
.\" $NetBSD: fpa.4,v 1.15 2008/04/30 13:10:54 martin Exp $
.\"
.\" Copyright (c) 1995 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Matt Thomas.
.\"
.\" 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``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 FOUNDATION OR CONTRIBUTORS
.\" 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.
.\"
.Dd March 13, 1995
.Dt FPA 4
.Os
.Sh NAME
.Nm fpa ,
.Nm fea ,
.Nm fta
.Nd
.Tn DEC
FDDI interface driver
.Sh SYNOPSIS
.Cd "fpa* at pci? dev ? function ?"
.Cd "fea* at eisa? slot ?"
.Ss alpha and pmax
.Cd "fta* at tc? slot ? offset ?"
.Sh DESCRIPTION
Cards supported by the
.Nm fpa ,
.Nm fea
and
.Nm fta
device driver are:
.Pp
.Bl -tag -width xxxxxx -offset indent
.It DEFPA
DEC PCI FDDI Controller
.It DEFEA
DEC EISA FDDI Controller
.It DEFTA
DEC TURBOchannel FDDI Controller
.El
.Pp
respectively.
All variants of either controller are supported including the DAS
and SAS configurations.
.Sh DIAGNOSTICS
.Bl -diag
.It "fea%d: error: desired IRQ of %d does not match device's actual IRQ (%d)"
The device probe detected that the DEFEA board is configured for a different
interrupt than the one specified in the kernel configuration file.
.It "fea%d: error: memory not enabled! ECU reconfiguration required"
The device probe found that no device memory had been configured on the DEFEA.
The DEFEA can be configured with no device memory, this driver
requires a minimum of 1K device memory be set up.
The ECU (EISA Configuration Utility) will need to be run to change the settings.
.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr netintro 4 ,
.Xr ifconfig 8
.Sh AUTHORS
The
.Nm fpa ,
.Nm fea
and
.Nm fta
device driver and manual page were written by Matt Thomas.
.Sh BUGS
Normally, the device driver will not enable the reception of SMT frames.
However if the IFF_LINK1 flag is set, the device driver will enable the
reception of SMT frames and pass them up to the Berkeley Packet Filter for
processing.

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.444 2019/11/29 22:38:28 riastradh Exp $
# $NetBSD: Makefile,v 1.445 2020/01/20 18:38:18 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@ -319,9 +319,7 @@ MLINKS+=dofileread.9 dofilewrite.9 \
MLINKS+=do_setresuid.9 do_setresgid.9
MLINKS+=ethersubr.9 ether_ifattach.9 ethersubr.9 ether_addmulti.9 \
ethersubr.9 ether_delmulti.9 ethersubr.9 ETHER_IS_MULTICAST.9 \
ethersubr.9 ETHER_FIRST_MULTI.9 ethersubr.9 ETHER_NEXT_MULTI.9 \
ethersubr.9 fddi_ifattach.9 \
ethersubr.9 fddi_addmulti.9 ethersubr.9 fddi_delmulti.9
ethersubr.9 ETHER_FIRST_MULTI.9 ethersubr.9 ETHER_NEXT_MULTI.9
MLINKS+=evcnt.9 evcnt_attach_dynamic.9 evcnt.9 evcnt_attach_static.9 \
evcnt.9 evcnt_detach.9
MLINKS+=extent.9 extent_create.9 extent.9 extent_destroy.9 \

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ethersubr.9,v 1.27 2016/12/28 11:44:58 wiz Exp $
.\" $NetBSD: ethersubr.9,v 1.28 2020/01/20 18:38:18 thorpej Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 28, 2016
.Dd January 19, 2020
.Dt ETHERSUBR 9
.Os
.Sh NAME
@ -37,11 +37,8 @@
.Nm ether_delmulti ,
.Nm ETHER_FIRST_MULTI ,
.Nm ETHER_NEXT_MULTI ,
.Nm ETHER_IS_MULTICAST ,
.Nm fddi_ifattach ,
.Nm fddi_addmulti ,
.Nm fddi_delmulti
.Nd Ethernet and FDDI driver support functions and macros
.Nm ETHER_IS_MULTICAST
.Nd Ethernet driver support functions and macros
.Sh SYNOPSIS
.In net/if_ether.h
.Ft void
@ -56,13 +53,6 @@
.Fn ETHER_NEXT_MULTI "struct ether_multistep step" "struct ether_multi *enm"
.Ft int
.Fn ETHER_IS_MULTICAST "uint8_t *addr"
.In net/if_fddi.h
.Ft void
.Fn fddi_ifattach "struct ifnet *ifp" "uint8_t *lla"
.Ft int
.Fn fddi_addmulti "const struct sockaddr *sa" "struct ethercom *ec"
.Ft int
.Fn fddi_delmulti "const struct sockaddr *sa" "struct ethercom *ec"
.Sh DESCRIPTION
The
.Nm
@ -75,11 +65,6 @@ attribute in their
.Ar files
declaration and call the appropriate functions as specified below.
.Pp
FDDI drivers must request the "fddi" attribute in their "files"
declaration and call the functions tagged with "fddi_" or "FDDI_"
instead, where different.
Some macros are shared.
.Pp
Note that you also need the
.Xr arp 9
stuff to support IPv4 on your hardware.
@ -103,8 +88,6 @@ and calling
.Fn if_set_sadl .
.Pp
This function must be called from the driver's attach function.
.It Fn fddi_ifattach "ifp" "lla"
Corresponding function for FDDI devices.
.It Fn ether_addmulti "sa" "ec"
.It Fn ether_delmulti "sa" "ec"
Add
@ -154,9 +137,6 @@ returns, in addition to the above errors,
.Er ENXIO
if the specified address
can't be found in the list of multicast addresses.
.It Fn fddi_addmulti "sa" "ec"
.It Fn fddi_delmulti "sa" "ec"
Corresponding functions for FDDI devices.
.It Fn ETHER_NEXT_MULTI "step" "enm"
A macro to step through all of the
.Em ether_multi
@ -182,11 +162,6 @@ Ethernet support functions are declared in
.In net/if_ether.h
and defined (if not implemented as macro) in
.Pa sys/net/if_ethersubr.c .
.Pp
FDDI support functions are declared in
.In net/if_fddi.h
and defined (if not implemented as macro) in
.Pa sys/net/if_fddisubr.c .
.Sh SEE ALSO
.Xr arp 9
.Sh HISTORY

View File

@ -1,4 +1,4 @@
# $NetBSD: P4032,v 1.79 2019/04/13 08:22:58 isaki Exp $
# $NetBSD: P4032,v 1.80 2020/01/20 18:38:19 thorpej Exp $
#
# Algorithmics P-4032 kernel.
#
@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "P4032-$Revision: 1.79 $"
#ident "P4032-$Revision: 1.80 $"
maxusers 32
@ -134,7 +134,6 @@ pci* at vtpbc?
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#eso* at pci? dev ? function ? # ESS Solo-1 PCI AudioDrive
#ex* at pci? dev ? function ? # 3COM 3c90x[B] Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EEPRO 10+/100B
#gsip* at pci? dev ? function ? # NS DP83820 Gigabit Ethernet
#isp* at pci? dev ? function ? # Qlogic ISP 10x0 SCSI

View File

@ -1,4 +1,4 @@
# $NetBSD: P5064,v 1.90 2019/04/13 08:22:58 isaki Exp $
# $NetBSD: P5064,v 1.91 2020/01/20 18:38:19 thorpej Exp $
#
# Algorithmics P-5064 kernel.
#
@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "P5064-$Revision: 1.90 $"
#ident "P5064-$Revision: 1.91 $"
maxusers 32
@ -130,7 +130,6 @@ pci* at vtpbc?
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#eso* at pci? dev ? function ? # ESS Solo-1 PCI AudioDrive
#ex* at pci? dev ? function ? # 3COM 3c90x[B] Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EEPRO 10+/100B
#gsip* at pci? dev ? function ? # NS DP83820 Gigabit Ethernet
#isp* at pci? dev ? function ? # Qlogic ISP 10x0 SCSI

View File

@ -1,4 +1,4 @@
# $NetBSD: P6032,v 1.81 2019/04/13 08:22:58 isaki Exp $
# $NetBSD: P6032,v 1.82 2020/01/20 18:38:19 thorpej Exp $
#
# Algorithmics P-6032 kernel.
#
@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "P6032-$Revision: 1.81 $"
#ident "P6032-$Revision: 1.82 $"
maxusers 32
@ -122,7 +122,6 @@ pci* at bonito?
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#eso* at pci? dev ? function ? # ESS Solo-1 PCI AudioDrive
#ex* at pci? dev ? function ? # 3COM 3c90x[B] Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EEPRO 10+/100B
#gsip* at pci? dev ? function ? # NS DP83820 Gigabit Ethernet
#isp* at pci? dev ? function ? # Qlogic ISP 10x0 SCSI

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.398 2020/01/19 06:55:22 thorpej Exp $
# $NetBSD: GENERIC,v 1.399 2020/01/20 18:38:19 thorpej Exp $
#
# This machine description file is used to generate the default NetBSD
# kernel.
@ -19,7 +19,7 @@ include "arch/alpha/conf/std.alpha"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
ident "GENERIC-$Revision: 1.398 $"
ident "GENERIC-$Revision: 1.399 $"
maxusers 32
@ -235,7 +235,6 @@ tcds* at tc? slot ? offset ?
asc* at tcds? chip ?
asc* at tc? slot ? offset ?
le* at tc? slot ? offset ?
fta* at tc? slot ? offset ? # DEC DEFTA FDDI cards
cfb* at tc? slot ? offset ?
mfb* at tc? slot ? offset ?
tfb* at tc? slot ? offset ?
@ -310,7 +309,6 @@ ep* at pci? dev ? function ? # 3COM 3c59x/3c90x Ethernet
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
eso* at pci? dev ? function ? # ESS Solo-1 PCI AudioDrive
ex* at pci? dev ? function ? # 3COM 3c90x[BC] Ethernet
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EEPRO 10+/100B
gsip* at pci? dev ? function ? # NS DP83820 Gigabit Ethernet
iha* at pci? dev ? function ? # Initio INIC-940/950 SCSI
@ -465,7 +463,6 @@ ahb* at eisa? slot ? # Adaptec 174[024] SCSI (unt.)
ahc* at eisa? slot ? # Adaptec 274x, aic7770 SCSI
bha* at eisa? slot ? # BusLogic 7xx SCSI
ep* at eisa? slot ? # 3COM 3c579 Ethernet (untested)
fea* at eisa? slot ? # DEC DEFEA FDDI
mlx* at eisa? slot ? # Mylex DAC960 / DEC SWXCR (untested)
tlp* at eisa? slot ? # DEC DE-425 Ethernet
depca* at eisa? slot ? # DEC DE-422 Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.111 2018/09/06 05:36:49 maxv Exp $
# $NetBSD: INSTALL,v 1.112 2020/01/20 18:38:19 thorpej Exp $
#
# Alpha INSTALL kernel.
@ -127,7 +127,6 @@ tcds* at tc? slot ? offset ?
asc* at tcds? chip ?
asc* at tc? slot ? offset ?
le* at tc? slot ? offset ?
fta* at tc? slot ? offset ? # DEC DEFTA FDDI cards
cfb* at tc? slot ? offset ?
mfb* at tc? slot ? offset ?
tfb* at tc? slot ? offset ?
@ -188,7 +187,6 @@ dpt* at pci? dev ? function ? # DPT SmartCache/SmartRAID
ep* at pci? dev ? function ? # 3COM 3c59x/3c90x Ethernet
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3COM 3c90x[BC] Ethernet
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EEPRO 10+/100B
gsip* at pci? dev ? function ? # NS DP83820 Gigabit Ethernet
iha* at pci? dev ? function ? # Initio INIC-940/950 SCSI
@ -280,7 +278,6 @@ ahb* at eisa? slot ? # Adaptec 174[024] SCSI (unt.)
ahc* at eisa? slot ? # Adaptec 274x, aic7770 SCSI
bha* at eisa? slot ? # BusLogic 7xx SCSI
ep* at eisa? slot ? # 3COM 3c579 Ethernet (untested)
fea* at eisa? slot ? # DEC DEFEA FDDI
mlx* at eisa? slot ? # Mylex DAC960 / DEC SWXCR (untested)
tlp* at eisa? slot ? # DEC DE-425 Ethernet
depca* at eisa? slot ? # DEC DE-422 Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: RAWHIDE,v 1.44 2020/01/19 06:55:22 thorpej Exp $
# $NetBSD: RAWHIDE,v 1.45 2020/01/20 18:38:19 thorpej Exp $
#
# Alpha 4100 stripped for action server kernel.
#
@ -60,7 +60,6 @@ ahc* at pci? dev ? function ? # Adaptec [23]94x, aic78x0 SCSI
bha* at pci? dev ? function ? # BusLogic 9xx SCSI (untested)
cy* at pci? dev ? function ? # Cyclades Cyclom-Y (untested)
ep* at pci? dev ? function ? # 3COM 3c59x/3c90x Ethernet
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EEPRO 10+/100B
isp* at pci? dev ? function ? # Qlogic ISP 10x0 SCSI
siop* at pci? dev ? function ? # Symbios 53c8xx SCSI

View File

@ -1,4 +1,4 @@
# $NetBSD: ALL,v 1.140 2020/01/19 20:41:18 riastradh Exp $
# $NetBSD: ALL,v 1.141 2020/01/20 18:38:19 thorpej Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "ALL-$Revision: 1.140 $"
#ident "ALL-$Revision: 1.141 $"
maxusers 64 # estimated number of users
@ -976,7 +976,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
et* at pci? dev ? function ? # Agere/LSI ET1310/ET1301 Gigabit
ex* at pci? dev ? function ? # 3Com 3c90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gem* at pci? dev ? function ? # Apple GMAC and Sun ERI gigabit enet
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.557 2020/01/19 20:00:37 thorpej Exp $
# $NetBSD: GENERIC,v 1.558 2020/01/20 18:38:19 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.557 $"
#ident "GENERIC-$Revision: 1.558 $"
maxusers 64 # estimated number of users
@ -794,7 +794,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
et* at pci? dev ? function ? # Agere/LSI ET1310/ET1301 Gigabit
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gem* at pci? dev ? function ? # Apple GMAC and Sun ERI gigabit enet
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: XEN3_DOM0,v 1.171 2020/01/19 06:55:22 thorpej Exp $
# $NetBSD: XEN3_DOM0,v 1.172 2020/01/20 18:38:19 thorpej Exp $
include "arch/amd64/conf/std.xen"
@ -11,7 +11,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#options UVMHIST_PRINT
#options SYSCALL_DEBUG
#ident "XEN3_DOM0-$Revision: 1.171 $"
#ident "XEN3_DOM0-$Revision: 1.172 $"
maxusers 32 # estimated number of users
@ -342,7 +342,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
et* at pci? dev ? function ? # Agere/LSI ET1310/ET1301 Gigabit
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
hme* at pci? dev ? function ? # Sun Microelectronics STP2002-STQ

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.195 2020/01/19 06:55:22 thorpej Exp $
# $NetBSD: GENERIC,v 1.196 2020/01/20 18:38:19 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/arc/conf/std.arc"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.195 $"
#ident "GENERIC-$Revision: 1.196 $"
maxusers 32 # estimated number of users
@ -320,7 +320,6 @@ bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
#hme* at pci? dev ? function ? # Sun STP2002-STQ

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.175 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: GENERIC,v 1.176 2020/01/20 18:38:19 thorpej Exp $
#
# GENERIC machine description file
#
@ -288,7 +288,6 @@ uk* at atapibus? drive ? flags 0x0000 # ATAPI unknown
ep* at pci? dev ? function ? # 3C590 ethernet cards
ex* at pci? dev ? function ? # 3Com 90x[B]
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
ne* at pci? dev ? function ? # NE2000 compat ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.112 2020/01/19 17:26:57 thorpej Exp $
# $NetBSD: INSTALL,v 1.113 2020/01/20 18:38:19 thorpej Exp $
#
# CATSINST -- CHALTECH CATS Install kernel
#
@ -234,7 +234,6 @@ sd* at atapibus? drive ? flags 0x0000 # ATAPI disk drives
ep* at pci? dev ? function ? # 3C590 ethernet cards
ex* at pci? dev ? function ? # 3Com 90x[B]
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
ne* at pci? dev ? function ? # NE2000 compat ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.164 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: GENERIC,v 1.165 2020/01/20 18:38:19 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/cobalt/conf/std.cobalt"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.164 $"
#ident "GENERIC-$Revision: 1.165 $"
maxusers 32
@ -238,7 +238,6 @@ wd* at atabus? drive ? flags 0x0000
#ep* at pci? dev ? function ? # 3Com 3c59x
#ex* at pci? dev ? function ? # 3Com 90x[BC]
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EtherExpress PRO10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
#ne* at pci? dev ? function ? # NE2000-compatible Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.72 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: INSTALL,v 1.73 2020/01/20 18:38:19 thorpej Exp $
#
# INSTALL -- installation and rescue kernel.
#
@ -10,7 +10,7 @@ include "arch/cobalt/conf/std.cobalt"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "INSTALL-$Revision: 1.72 $"
#ident "INSTALL-$Revision: 1.73 $"
makeoptions COPTS="-Os -mmemcpy"
makeoptions CPUFLAGS="-march=vr5000 -mabi=32"
@ -228,7 +228,6 @@ wd* at atabus? drive ? flags 0x0000
#ep* at pci? dev ? function ? # 3Com 3c59x
#ex* at pci? dev ? function ? # 3Com 90x[BC]
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EtherExpress PRO10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
#ne* at pci? dev ? function ? # NE2000-compatible Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: IXDP425,v 1.57 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: IXDP425,v 1.58 2020/01/20 18:38:20 thorpej Exp $
#
# IXDP425 -- Intel IXDP425/IXCDP1100 Development Platform
#
@ -169,7 +169,6 @@ bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
le* at pci? dev ? function ? # PCnet-PCI Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: ZAO425,v 1.65 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: ZAO425,v 1.66 2020/01/20 18:38:20 thorpej Exp $
#
# ZAO425 -- Intel IXP425
#
@ -156,7 +156,6 @@ bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
le* at pci? dev ? function ? # PCnet-PCI Ethernet

View File

@ -1,10 +1,10 @@
# $NetBSD: MALTA,v 1.98 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: MALTA,v 1.99 2020/01/20 18:38:20 thorpej Exp $
include "arch/evbmips/conf/std.malta"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "MALTA-$Revision: 1.98 $"
#ident "MALTA-$Revision: 1.99 $"
maxusers 32
@ -217,7 +217,6 @@ ath* at pci? dev ? function ? # Atheros WLAN
#ep* at pci? dev ? function ? # 3Com 3c59x
#ex* at pci? dev ? function ? # 3Com 90x[B]
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EtherExpress PRO10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
pcn* at pci? dev ? function ? # AMD PCnet-PCI Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: PMPPC,v 1.51 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: PMPPC,v 1.52 2020/01/20 18:38:20 thorpej Exp $
#
# PMPPC
#
@ -230,7 +230,6 @@ an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11)
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
#hme* at pci? dev ? function ? # Sun Microelectronics STP2002-STQ

View File

@ -1,4 +1,4 @@
# $NetBSD: WALNUT,v 1.74 2018/08/01 20:04:11 maxv Exp $
# $NetBSD: WALNUT,v 1.75 2020/01/20 18:38:20 thorpej Exp $
#
# GENERIC -- everything that's currently supported
#
@ -133,7 +133,6 @@ pchb0 at plb? # PCI-Host bridges
pci* at pchb?
ppb* at pci? dev ? function ? # PCI-PCI bridges
fpa* at pci? dev ? function ? # DEC PCI FDDI (DEFPA) Controller
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[B]

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.29 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: GENERIC,v 1.30 2020/01/20 18:38:20 thorpej Exp $
#
# GENERIC machine description file
#
@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
#ident "GENERIC-$Revision: 1.29 $"
#ident "GENERIC-$Revision: 1.30 $"
maxusers 32 # estimated number of users
@ -466,7 +466,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
# fpa is broken, does funky things with bus_dma
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
le* at pci? dev ? function ? # PCnet-PCI Ethernet
@ -491,7 +490,6 @@ wm* at pci? dev ? function ? # Intel 8254x gigabit
# EISA network interfaces
ep* at eisa? slot ? # 3Com 3c579 Ethernet
#fea* at eisa? slot ? # DEC DEFEA FDDI
tlp* at eisa? slot ? # DEC DE-425 Ethernet
#sh* at eisa? slot ? # Interphase Seahawk 4811 FDDI
#ie* at eisa? slot ? # Intel Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: ALL,v 1.484 2020/01/19 20:41:18 riastradh Exp $
# $NetBSD: ALL,v 1.485 2020/01/20 18:38:20 thorpej Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "ALL-$Revision: 1.484 $"
#ident "ALL-$Revision: 1.485 $"
maxusers 64 # estimated number of users
@ -1058,7 +1058,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
et* at pci? dev ? function ? # Agere/LSI ET1310/ET1301 Gigabit
ex* at pci? dev ? function ? # 3Com 3c90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gem* at pci? dev ? function ? # Apple GMAC and Sun ERI gigabit enet
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
@ -1105,7 +1104,6 @@ xge* at pci? dev ? function ? # Neterion (S2io) Xframe-I 10GbE
# EISA network interfaces
ep* at eisa? slot ? # 3Com 3c579 Ethernet
fea* at eisa? slot ? # DEC DEFEA FDDI
tlp* at eisa? slot ? # DEC DE-425 Ethernet
# ISA Plug-and-Play network interfaces

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.1221 2020/01/19 20:00:37 thorpej Exp $
# $NetBSD: GENERIC,v 1.1222 2020/01/20 18:38:20 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.1221 $"
#ident "GENERIC-$Revision: 1.1222 $"
maxusers 64 # estimated number of users
@ -973,7 +973,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
et* at pci? dev ? function ? # Agere/LSI ET1310/ET1301 Gigabit
ex* at pci? dev ? function ? # 3Com 3c90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
hme* at pci? dev ? function ? # Sun Microelectronics STP2002-STQ
@ -1020,7 +1019,6 @@ xge* at pci? dev ? function ? # Neterion (S2io) Xframe-I 10GbE
# EISA network interfaces
ep* at eisa? slot ? # 3Com 3c579 Ethernet
fea* at eisa? slot ? # DEC DEFEA FDDI
tlp* at eisa? slot ? # DEC DE-425 Ethernet
# ISA Plug-and-Play network interfaces

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC_TINY,v 1.165 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: GENERIC_TINY,v 1.166 2020/01/20 18:38:20 thorpej Exp $
#
# GENERIC_TINY -- suitable default for 4M machines
# No EISA, PCI, or SCSI.
@ -365,7 +365,6 @@ fd* at fdc? drive ? # the drives themselves
# PCI network interfaces
#ep* at pci? dev ? function ? # 3Com 3c59x/3c90x Ethernet
#epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
#ne* at pci? dev ? function ? # NE2000-compatible Ethernet
@ -374,7 +373,6 @@ fd* at fdc? drive ? # the drives themselves
# EISA network interfaces
#ep* at eisa? slot ? # 3Com 3c579 Ethernet
#fea* at eisa? slot ? # DEC DEFEA FDDI
# ISA Plug-and-Play network interfaces
#ep* at isapnp? # 3Com 3c509 Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL_FLOPPY,v 1.52 2020/01/19 20:00:37 thorpej Exp $
# $NetBSD: INSTALL_FLOPPY,v 1.53 2020/01/20 18:38:20 thorpej Exp $
#
# INSTALL - Installation kernel.
#
@ -482,7 +482,6 @@ bge* at pci? dev ? function ? # Broadcom 570x Gigabit Ethernet
ep* at pci? dev ? function ? # 3Com 3c59x
ex* at pci? dev ? function ? # 3Com 3c90x[BC]
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
#hme* at pci? dev ? function ? # Sun Microelectronics STP2002-STQ
@ -516,7 +515,6 @@ wm* at pci? dev ? function ? # Intel 8254x gigabit
# EISA network interfaces
ep* at eisa? slot ? # 3Com 3c579 Ethernet
fea* at eisa? slot ? # DEC DEFEA FDDI
tlp* at eisa? slot ? # DEC DE-425 Ethernet
# ISA Plug-and-Play network interfaces

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL_TINY,v 1.160 2020/01/19 01:25:05 thorpej Exp $
# $NetBSD: INSTALL_TINY,v 1.161 2020/01/20 18:38:20 thorpej Exp $
#
# This kernel should be derived from INSTALL (which is derived
# from GENERIC) with some features commented out.
@ -381,7 +381,6 @@ fd* at fdc? drive ? # the drives themselves
# PCI network interfaces
#ep* at pci? dev ? function ? # 3Com 3c59x/3c90x Ethernet
#fpa* at pci? dev ? function ? # DEC DEFPA FDDI
#fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
#le* at pci? dev ? function ? # PCnet-PCI Ethernet
#ne* at pci? dev ? function ? # NE2000-compatible Ethernet
@ -390,7 +389,6 @@ fd* at fdc? drive ? # the drives themselves
# EISA network interfaces
#ep* at eisa? slot ? # 3Com 3c579 Ethernet
#fea* at eisa? slot ? # DEC DEFEA FDDI
# ISA Plug-and-Play network interfaces
#ep* at isapnp? # 3Com 3c509 Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: XEN3PAE_DOM0,v 1.17 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: XEN3PAE_DOM0,v 1.18 2020/01/20 18:38:20 thorpej Exp $
#
# XEN3_0: Xen 3.0 domain0 kernel
@ -323,7 +323,6 @@ ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
et* at pci? dev ? function ? # Agere/LSI ET1310/ET1301 Gigabit
ex* at pci? dev ? function ? # 3Com 3c90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
hme* at pci? dev ? function ? # Sun Microelectronics STP2002-STQ

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.360 2020/01/10 06:26:34 macallan Exp $
# $NetBSD: GENERIC,v 1.361 2020/01/20 18:38:20 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/macppc/conf/std.macppc"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.360 $"
#ident "GENERIC-$Revision: 1.361 $"
maxusers 32
@ -203,7 +203,6 @@ bwi* at pci? dev ? function ? # Broadcom / Apple Airport Extreme
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC PCI FDDI (DEFPA) Controller
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gem* at pci? dev ? function ? # gmac ethernet
#gm* at pci? dev ? function ? # gmac ethernet (old)

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.199 2019/04/26 21:40:31 sevan Exp $
# $NetBSD: GENERIC,v 1.200 2020/01/20 18:38:21 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.199 $"
#ident "GENERIC-$Revision: 1.200 $"
maxusers 64
@ -215,7 +215,6 @@ pxg* at tc? slot ? offset ? # PMAG-D,E,F 3D accelerator
xcfb* at tc? slot ? offset ? # PMAG-DV Color Framebuffer at MAXINE
asc* at tc? slot ? offset ? # PMAZ-A single channel SCSI
le* at tc? slot ? offset ? # PMAD-A LANCE
fta* at tc? slot ? offset ? # PMAF-F FDDI
tcds* at tc? slot ? offset ? # PMAZB/PMAZC dual channel SCSI
asc* at tcds? chip ?

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC64,v 1.32 2019/04/26 22:29:20 sevan Exp $
# $NetBSD: GENERIC64,v 1.33 2020/01/20 18:38:21 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.32 $"
#ident "GENERIC-$Revision: 1.33 $"
maxusers 64
@ -205,7 +205,6 @@ pxg* at tc? slot ? offset ? # PMAG-D,E,F 3D accelerator
xcfb* at tc? slot ? offset ? # PMAG-DV Color Framebuffer at MAXINE
asc* at tc? slot ? offset ? # PMAZ-A single channel SCSI
le* at tc? slot ? offset ? # PMAD-A LANCE
fta* at tc? slot ? offset ? # PMAF-F FDDI
tcds* at tc? slot ? offset ? # PMAZB/PMAZC dual channel SCSI
asc* at tcds? chip ?

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.74 2016/12/13 20:42:20 christos Exp $
# $NetBSD: INSTALL,v 1.75 2020/01/20 18:38:21 thorpej Exp $
#
# Distribution install kernel (any model)
# netbsd: cut-down kernel for miniroots.
@ -139,7 +139,6 @@ pxg* at tc? slot ? offset ? # PMAG-D,E,F 3D accelerator
xcfb* at tc? slot ? offset ? # PMAG-DV Color Framebuffer at MAXINE
asc* at tc? slot ? offset ? # PMAZ-A single channel SCSI
le* at tc? slot ? offset ? # PMAD-A LANCE
fta* at tc? slot ? offset ? # PMAF-F FDDI
tcds* at tc? slot ? offset ? # PMAZB/PMAZC dual channel SCSI
asc* at tcds? chip ?

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL64,v 1.11 2016/12/13 20:42:20 christos Exp $
# $NetBSD: INSTALL64,v 1.12 2020/01/20 18:38:21 thorpej Exp $
#
# Distribution install kernel (any model)
# netbsd: cut-down kernel for miniroots.
@ -122,7 +122,6 @@ pxg* at tc? slot ? offset ? # PMAG-D,E,F 3D accelerator
xcfb* at tc? slot ? offset ? # PMAG-DV Color Framebuffer at MAXINE
asc* at tc? slot ? offset ? # PMAZ-A single channel SCSI
le* at tc? slot ? offset ? # PMAD-A LANCE
fta* at tc? slot ? offset ? # PMAF-F FDDI
tcds* at tc? slot ? offset ? # PMAZB/PMAZC dual channel SCSI
asc* at tcds? chip ?

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC32_IP3x,v 1.128 2020/01/19 06:55:23 thorpej Exp $
# $NetBSD: GENERIC32_IP3x,v 1.129 2020/01/20 18:38:21 thorpej Exp $
#
# GENERIC32_IP3x machine description file
#
@ -28,7 +28,7 @@ makeoptions TEXTADDR="0x80069000" # entry point
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC32_IP3x-$Revision: 1.128 $"
#ident "GENERIC32_IP3x-$Revision: 1.129 $"
maxusers 32
@ -181,7 +181,6 @@ ubsec* at pci? dev ? function ? # Broadcom 5501/5601/580x/582x
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gsip* at pci? dev ? function ? # NS83820 Gigabit Ethernet
#hme* at pci? dev ? function ? # Sun Microelectronics STP2002-STQ

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.221 2020/01/19 20:00:37 thorpej Exp $
# $NetBSD: GENERIC,v 1.222 2020/01/20 18:38:21 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/sparc64/conf/std.sparc64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.221 $"
#ident "GENERIC-$Revision: 1.222 $"
maxusers 64
@ -491,7 +491,6 @@ cas* at pci? dev ? function ? # Sun Cassini/Cassini+ Ethernet
#ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
ex* at pci? dev ? function ? # 3Com 90x[B]
fpa* at pci? dev ? function ? # DEC DEFPA FDDI UT
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
gem* at pci? dev ? function ? # Apple GMAC and Sun ERI gigabit enet
gem* at sbus? slot ? offset ?

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.211 2019/05/24 08:30:26 msaitoh Exp $
# $NetBSD: GENERIC,v 1.212 2020/01/20 18:38:21 thorpej Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/vax/conf/std.vax"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.211 $"
#ident "GENERIC-$Revision: 1.212 $"
# Here are all different supported CPU types listed.
#options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800
@ -196,7 +196,6 @@ tc0 at vsbus0 csr 0x36800000 # VS4000/60 or 90 TC adapter
tcds* at tc0 slot ? offset ? # TC dual SCSI controller
asc* at tcds? chip ? # PMAZB/C
asc* at tc? slot ? offset ? # PMAZ
fta* at tc? slot ? offset ? # TC FDDI controller
le* at tc? slot ? offset ? # PMAD
hdc0 at vsbus0 csr 0x200c0000 # HDC9224 MFM/floppy ctlr

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.74 2018/04/25 11:12:55 ragge Exp $
# $NetBSD: INSTALL,v 1.75 2020/01/20 18:38:21 thorpej Exp $
#
# INSTALL kernel; all supported devices but nothing fancy.
#
@ -146,7 +146,6 @@ tc0 at vsbus0 csr 0x36800000 # VS4000/60 or 90 TC adapter
tcds* at tc0 slot ? offset ? # TC dual SCSI controller
asc* at tcds? chip ? # PMAZB/C
asc* at tc? slot ? offset ? # PMAZ
fta* at tc? slot ? offset ? # TC FDDI controller
le* at tc? slot ? offset ? # PMAD
hdc0 at vsbus0 csr 0x200c0000 # HDC9224 MFM/floppy ctlr

View File

@ -1,4 +1,4 @@
# $NetBSD: VAX780,v 1.29 2019/04/26 22:46:04 sevan Exp $
# $NetBSD: VAX780,v 1.30 2020/01/20 18:38:21 thorpej Exp $
#
# 11/780,750,730 machine description file
#
@ -177,7 +177,6 @@ ubi0 at mainbus0 # 11/730 direct unibus
#tcds* at tc0 slot ? offset ? # TC dual SCSI controller
#asc* at tcds? chip ? # PMAZB/C
#asc* at tc? slot ? offset ? # PMAZ
#fta* at tc? slot ? offset ? # TC FDDI controller
#le* at tc? slot ? offset ? # PMAD
#hdc0 at vsbus0 csr 0x200c0000 # HDC9224 MFM/floppy ctlr

View File

@ -1,4 +1,4 @@
# $NetBSD: files,v 1.1252 2020/01/19 20:41:18 riastradh Exp $
# $NetBSD: files,v 1.1253 2020/01/20 18:38:21 thorpej Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20171118
@ -437,12 +437,10 @@ include "dev/splash/files.splash"
# videomode support
include "dev/videomode/files.videomode"
# net device attributes - we have generic code for arc(net), ether(net),
# and fddi
# net device attributes
#
define arcnet
define ether
define fddi
define ieee1394
define sppp
define wlan
@ -781,12 +779,6 @@ define sunscpal
file dev/ic/sunscpal.c sunscpal
device ssc: scsi, sunscpal
# DEC FDDI Chipset
#
define pdq
file dev/ic/pdq.c pdq
file dev/ic/pdq_ifsubr.c pdq
# Cyclades Cyclom-8/16/32
#
device cy: tty

View File

@ -1,4 +1,4 @@
# $NetBSD: files.eisa,v 1.27 2005/12/11 12:21:20 christos Exp $
# $NetBSD: files.eisa,v 1.28 2020/01/20 18:38:17 thorpej Exp $
#
# Config file and device description for machine-independent EISA code.
# Included by ports that need it. Requires that the SCSI files be
@ -49,11 +49,6 @@ file dev/eisa/depca_eisa.c depca_eisa
attach tlp at eisa with tlp_eisa
file dev/eisa/if_tlp_eisa.c tlp_eisa
# DEC DEFEA EISA FDDI controller
device fea: pdq, fddi, ifnet, arp
attach fea at eisa
file dev/eisa/if_fea.c fea
# Mylex RAID controllers
attach mlx at eisa with mlx_eisa
file dev/eisa/mlx_eisa.c mlx_eisa

View File

@ -1,529 +0,0 @@
/* $NetBSD: if_fea.c,v 1.48 2019/08/30 00:36:53 riastradh Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* Id: if_fea.c,v 1.8 1997/03/21 13:45:45 thomas Exp
*/
/*
* DEC PDQ FDDI Controller
*
* This module support the DEFEA EISA FDDI Controller.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.48 2019/08/30 00:36:53 riastradh Exp $");
#include "opt_inet.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/malloc.h>
#if defined(__FreeBSD__)
#include <sys/devconf.h>
#elif defined(__bsdi__) || defined(__NetBSD__)
#include <sys/device.h>
#endif
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_dl.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#endif
#if defined(__FreeBSD__)
#include <netinet/if_fddi.h>
#else
#include <net/if_fddi.h>
#endif
#if defined(__FreeBSD__)
#include <netinet/if_ether.h>
#include <i386/eisa/eisaconf.h>
#include <i386/isa/icu.h>
#include <dev/pdq/pdqvar.h>
#include <dev/pdq/pdqreg.h>
#elif defined(__bsdi__)
#include <netinet/if_ether.h>
#include <i386/isa/isa.h>
#include <i386/isa/icu.h>
#include <i386/isa/dma.h>
#include <i386/isa/isavar.h>
#include <i386/eisa/eisa.h>
#include <dev/pdq/pdqvar.h>
#include <dev/pdq/pdqreg.h>
#elif defined(__NetBSD__)
#include <sys/cpu.h>
#include <sys/bus.h>
#include <dev/ic/pdqvar.h>
#include <dev/ic/pdqreg.h>
#include <dev/eisa/eisareg.h>
#include <dev/eisa/eisavar.h>
#include <dev/eisa/eisadevs.h>
#endif
/*
*
*/
#define DEFEA_IRQS 0x0000FBA9U
#if defined(__FreeBSD__)
static pdq_softc_t *pdqs_eisa[16];
#define PDQ_EISA_UNIT_TO_SOFTC(unit) (pdqs_eisa[unit])
#define DEFEA_INTRENABLE 0x8 /* level interrupt */
#define pdq_eisa_ifwatchdog NULL
#define DEFEA_DECODE_IRQ(n) ((DEFEA_IRQS >> ((n) << 2)) & 0x0f)
#elif defined(__bsdi__)
extern struct cfdriver feacd;
#define PDQ_EISA_UNIT_TO_SOFTC(unit) ((pdq_softc_t *)device_lookup_private(&feacd, unit))
#define DEFEA_INTRENABLE 0x28 /* edge interrupt */
static const int pdq_eisa_irqs[4] = { IRQ9, IRQ10, IRQ11, IRQ15 };
#define DEFEA_DECODE_IRQ(n) (pdq_eisa_irqs[(n)])
#elif defined(__NetBSD__)
#define DEFEA_INTRENABLE 0x8 /* level interrupt */
#define pdq_eisa_ifwatchdog NULL
#define DEFEA_DECODE_IRQ(n) ((DEFEA_IRQS >> ((n) << 2)) & 0x0f)
#else
#error unknown system
#endif
#ifndef pdq_eisa_ifwatchdog
static ifnet_ret_t
pdq_eisa_ifwatchdog(
int unit)
{
pdq_ifwatchdog(&PDQ_EISA_UNIT_TO_SOFTC(unit)->sc_if);
}
#endif
static void
pdq_eisa_subprobe(
pdq_bus_t bc,
pdq_bus_ioport_t iobase,
pdq_uint32_t *maddr,
pdq_uint32_t *msiz,
pdq_uint32_t *irq)
{
if (irq != NULL)
*irq = DEFEA_DECODE_IRQ(PDQ_OS_IORD_8(bc, iobase, PDQ_EISA_IO_CONFIG_STAT_0) & 3);
*maddr = (PDQ_OS_IORD_8(bc, iobase, PDQ_EISA_MEM_ADD_CMP_0) << 8)
| (PDQ_OS_IORD_8(bc, iobase, PDQ_EISA_MEM_ADD_CMP_1) << 16);
*msiz = (PDQ_OS_IORD_8(bc, iobase, PDQ_EISA_MEM_ADD_MASK_0) + 4) << 8;
}
static void
pdq_eisa_devinit(
pdq_softc_t *sc)
{
pdq_uint8_t data;
/*
* Do the standard initialization for the DEFEA registers.
*/
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_FUNCTION_CTRL, 0x23);
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_IO_CMP_1_1, (sc->sc_iobase >> 8) & 0xF0);
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_IO_CMP_0_1, (sc->sc_iobase >> 8) & 0xF0);
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_SLOT_CTRL, 0x01);
data = PDQ_OS_IORD_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF);
#if defined(__NetBSD__)
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF,
!sc->sc_csr_memmapped ? data & ~1 : data | 1);
#elif defined(PDQ_IOMAPPED)
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF, data & ~1);
#else
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF, data | 1);
#endif
data = PDQ_OS_IORD_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_IO_CONFIG_STAT_0);
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_IO_CONFIG_STAT_0, data | DEFEA_INTRENABLE);
}
#if defined(__FreeBSD__)
static int pdq_eisa_shutdown(struct kern_devconf *kdc, int force);
static int pdq_eisa_probe(void);
static int pdq_eisa_attach(struct eisa_device *ed);
static unsigned long pdq_eisa_unit;
static struct eisa_driver pdq_eisa_driver = {
"fea", pdq_eisa_probe, pdq_eisa_attach, NULL, &pdq_eisa_unit
};
DATA_SET(eisadriver_set, pdq_eisa_driver);
static struct kern_devconf kdc_pdq_eisa = {
0, 0, 0, /* filled in by dev_attach */
"fea", 0, { MDDT_EISA, 0, "net" },
eisa_generic_externalize, 0, pdq_eisa_shutdown, EISA_EXTERNALLEN,
&kdc_eisa0, /* parent */
0, /* parentdata */
DC_BUSY, /* host adapters are always ``in use'' */
"DEC DEFEA EISA FDDI Controller",
DC_CLS_NETIF
};
static const char *
pdq_eisa_match(
eisa_id_t type)
{
if ((type >> 8) == 0x10a330)
return kdc_pdq_eisa.kdc_description;
return NULL;
}
static int
pdq_eisa_probe(
void)
{
struct eisa_device *ed = NULL;
int count;
for (count = 0; (ed = eisa_match_dev(ed, pdq_eisa_match)) != NULL; count++) {
pdq_bus_ioport_t iobase = ed->ioconf.slot * EISA_SLOT_SIZE;
pdq_uint32_t irq, maddr, msiz;
eisa_add_iospace(ed, iobase, 0x200, RESVADDR_NONE);
pdq_eisa_subprobe(PDQ_BUS_EISA, iobase, &maddr, &msiz, &irq);
eisa_add_mspace(ed, maddr, msiz, RESVADDR_NONE);
eisa_add_intr(ed, irq);
eisa_registerdev(ed, &pdq_eisa_driver, &kdc_pdq_eisa);
}
return count;
}
static void
pdq_eisa_interrupt(
void *arg)
{
pdq_softc_t * const sc = (pdq_softc_t *) arg;
(void) pdq_interrupt(sc->sc_pdq);
}
static int
pdq_eisa_attach(
struct eisa_device *ed)
{
pdq_softc_t *sc;
resvaddr_t *iospace;
resvaddr_t *mspace;
int irq = ffs(ed->ioconf.irq) - 1;
sc = (pdq_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
pdqs_eisa[ed->unit] = sc;
sc->sc_if.if_name = "fea";
sc->sc_if.if_unit = ed->unit;
if ((iospace = ed->ioconf.ioaddrs.lh_first) == NULL) {
printf("fea%d: no iospace??\n", sc->sc_if.if_unit);
return -1;
}
if ((mspace = ed->ioconf.maddrs.lh_first) == NULL) {
printf("fea%d: no memory space??\n", sc->sc_if.if_unit);
return -1;
}
sc->sc_iobase = (pdq_bus_ioport_t) iospace->addr;
sc->sc_membase = (pdq_bus_memaddr_t) pmap_mapdev(mspace->addr, mspace->size);
if (sc->sc_membase == NULL) {
printf("fea%d: failed to map memory 0x%x-0x%x!\n",
sc->sc_if.if_unit, mspace->addr, mspace->addr + mspace->size - 1);
return -1;
}
eisa_reg_start(ed);
if (eisa_reg_iospace(ed, iospace)) {
printf("fea%d: failed to register iospace 0x%x-0x%x!\n",
sc->sc_if.if_unit, iospace->addr, iospace->addr + iospace->size - 1);
return -1;
}
if (eisa_reg_mspace(ed, mspace)) {
printf("fea%d: failed to register memory 0x%x-0x%x!\n",
sc->sc_if.if_unit, mspace->addr, mspace->addr + mspace->size - 1);
return -1;
}
if (eisa_reg_intr(ed, irq, pdq_eisa_interrupt, sc, &net_imask, 1)) {
printf("fea%d: interrupt registration failed\n", sc->sc_if.if_unit);
return -1;
}
eisa_reg_end(ed);
pdq_eisa_devinit(sc);
sc->sc_pdq = pdq_initialize(PDQ_BUS_EISA, sc->sc_membase,
sc->sc_if.if_name, sc->sc_if.if_unit,
(void *) sc, PDQ_DEFEA);
if (sc->sc_pdq == NULL) {
printf("fea%d: initialization failed\n", sc->sc_if.if_unit);
return -1;
}
if (eisa_enable_intr(ed, irq)) {
printf("fea%d: failed to enable interrupt\n", sc->sc_if.if_unit);
return -1;
}
memcpy(sc->sc_ac.ac_enaddr, (void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, 6);
pdq_ifattach(sc, pdq_eisa_ifwatchdog);
ed->kdc->kdc_state = DC_BUSY; /* host adapters always busy */
return 0;
}
static int
pdq_eisa_shutdown(
struct kern_devconf *kdc,
int force)
{
pdq_hwreset(PDQ_EISA_UNIT_TO_SOFTC(kdc->kdc_unit)->sc_pdq);
(void) dev_detach(kdc);
return 0;
}
#endif /* __FreeBSD__ */
#if defined(__bsdi__)
static int
pdq_eisa_probe(
device_t parent,
cfdata_t cf,
void *aux)
{
struct isa_attach_args *ia = (struct isa_attach_args *) aux;
int slot;
pdq_uint32_t irq, maddr, msiz;
if (isa_bustype != BUS_EISA)
return 0;
if ((slot = eisa_match(cf, ia)) == 0)
return 0;
ia->ia_iobase = slot << 12;
ia->ia_iosize = EISA_NPORT;
eisa_slotalloc(slot);
pdq_eisa_subprobe(PDQ_BUS_EISA, ia->ia_iobase, &maddr, &msiz, &irq);
if (ia->ia_irq != IRQUNK && irq != ia->ia_irq) {
printf("fea%d: error: desired IRQ of %d does not match device's actual IRQ (%d),\n",
cf->cf_unit,
ffs(ia->ia_irq) - 1, ffs(irq) - 1);
return 0;
}
if (ia->ia_irq == IRQUNK) {
if ((ia->ia_irq = isa_irqalloc(irq)) == 0) {
if ((ia->ia_irq = isa_irqalloc(IRQ9|IRQ10|IRQ11|IRQ15)) == 0) {
printf("fea%d: error: IRQ %d is already in use\n", cf->cf_unit,
ffs(irq) - 1);
return 0;
}
irq = PDQ_OS_IORD_8(PDQ_BUS_EISA, ia->ia_iobase, PDQ_EISA_IO_CONFIG_STAT_0) & ~3;
switch (ia->ia_irq) {
case IRQ9: irq |= 0;
case IRQ10: irq |= 1;
case IRQ11: irq |= 2;
case IRQ15: irq |= 3;
}
PDQ_OS_IOWR_8(PDQ_BUS_EISA, ia->ia_iobase, PDQ_EISA_IO_CONFIG_STAT_0, irq);
}
}
if (maddr == 0) {
printf("fea%d: error: memory not enabled! ECU reconfiguration required\n",
cf->cf_unit);
return 0;
}
/* EISA bus masters don't use host DMA channels */
ia->ia_drq = DRQNONE;
ia->ia_maddr = (void *) maddr;
ia->ia_msize = msiz;
return 1;
}
static void
pdq_eisa_attach(
device_t parent,
device_t self,
void *aux)
{
pdq_softc_t *sc = device_private(self);
struct isa_attach_args *ia = (struct isa_attach_args *) aux;
struct ifnet *ifp = &sc->sc_if;
sc->sc_dev = self;
sc->sc_if.if_unit = sc->sc_dev.dv_unit;
sc->sc_if.if_name = "fea";
sc->sc_if.if_flags = 0;
sc->sc_iobase = ia->ia_iobase;
pdq_eisa_devinit(sc);
sc->sc_pdq = pdq_initialize(PDQ_BUS_EISA,
(pdq_bus_memaddr_t) ISA_HOLE_VADDR(ia->ia_maddr),
sc->sc_if.if_name, sc->sc_if.if_unit,
(void *) sc, PDQ_DEFEA);
if (sc->sc_pdq == NULL) {
printf("fea%d: initialization failed\n", sc->sc_if.if_unit);
return;
}
memcpy(sc->sc_ac.ac_enaddr, (void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, 6);
pdq_ifattach(sc, pdq_eisa_ifwatchdog);
isa_establish(&sc->sc_id, &sc->sc_dev);
sc->sc_ih.ih_fun = pdq_interrupt;
sc->sc_ih.ih_arg = (void *) sc->sc_pdq;
intr_establish(ia->ia_irq, &sc->sc_ih, DV_NET);
sc->sc_ats.func = (void (*)(void *)) pdq_hwreset;
sc->sc_ats.arg = (void *) sc->sc_pdq;
atshutdown(&sc->sc_ats, ATSH_ADD);
}
static char *pdq_eisa_ids[] = {
"DEC3001", /* 0x0130A310 */
"DEC3002", /* 0x0230A310 */
"DEC3003", /* 0x0330A310 */
"DEC3004", /* 0x0430A310 */
};
struct cfdriver feacd = {
0, "fea", pdq_eisa_probe, pdq_eisa_attach, DV_IFNET, sizeof(pdq_softc_t),
pdq_eisa_ids
};
#endif /* __bsdi__ */
#if defined(__NetBSD__)
static int
pdq_eisa_match(
device_t parent,
cfdata_t match,
void *aux)
{
const struct eisa_attach_args * const ea = (struct eisa_attach_args *) aux;
if (strncmp(ea->ea_idstring, "DEC300", 6) == 0)
return 1;
return 0;
}
static void
pdq_eisa_attach(
device_t parent,
device_t self,
void *aux)
{
pdq_softc_t * const sc = device_private(self);
struct eisa_attach_args * const ea = (struct eisa_attach_args *) aux;
pdq_uint32_t irq, maddr, msiz;
eisa_intr_handle_t ih;
const char *intrstr;
char intrbuf[EISA_INTRSTR_LEN];
sc->sc_iotag = ea->ea_iot;
sc->sc_dmatag = ea->ea_dmat;
memcpy(sc->sc_if.if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
sc->sc_if.if_flags = 0;
sc->sc_if.if_softc = sc;
if (bus_space_map(sc->sc_iotag, EISA_SLOT_ADDR(ea->ea_slot), EISA_SLOT_SIZE, 0, &sc->sc_iobase)) {
aprint_normal("\n");
aprint_error_dev(sc->sc_dev, "failed to map I/O!\n");
return;
}
pdq_eisa_subprobe(sc->sc_iotag, sc->sc_iobase, &maddr, &msiz, &irq);
if (maddr != 0 && msiz != 0) {
sc->sc_csr_memmapped = true;
sc->sc_csrtag = ea->ea_memt;
if (bus_space_map(sc->sc_csrtag, maddr, msiz, 0, &sc->sc_membase)) {
bus_space_unmap(sc->sc_iotag, sc->sc_iobase, EISA_SLOT_SIZE);
aprint_normal("\n");
aprint_error_dev(sc->sc_dev, "failed to map memory (0x%x-0x%x)!\n",
maddr, maddr + msiz - 1);
return;
}
} else {
sc->sc_csr_memmapped = false;
sc->sc_csrtag = sc->sc_iotag;
sc->sc_membase = sc->sc_iobase;
}
pdq_eisa_devinit(sc);
sc->sc_pdq = pdq_initialize(sc->sc_csrtag, sc->sc_membase,
sc->sc_if.if_xname, 0,
(void *) sc, PDQ_DEFEA);
if (sc->sc_pdq == NULL) {
aprint_error_dev(sc->sc_dev, "initialization failed\n");
return;
}
pdq_ifattach(sc, pdq_eisa_ifwatchdog);
if (eisa_intr_map(ea->ea_ec, irq, &ih)) {
aprint_error_dev(sc->sc_dev, "couldn't map interrupt (%d)\n", irq);
return;
}
intrstr = eisa_intr_string(ea->ea_ec, ih, intrbuf, sizeof(intrbuf));
sc->sc_ih = eisa_intr_establish(ea->ea_ec, ih, IST_LEVEL, IPL_NET,
(int (*)(void *)) pdq_interrupt, sc->sc_pdq);
if (sc->sc_ih == NULL) {
aprint_error_dev(sc->sc_dev, "couldn't establish interrupt");
if (intrstr != NULL)
aprint_error(" at %s", intrstr);
aprint_error("\n");
return;
}
sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset, sc->sc_pdq);
if (sc->sc_ats == NULL)
aprint_error_dev(self, "warning: couldn't establish shutdown hook\n");
if (sc->sc_csr_memmapped)
aprint_normal_dev(self, "using iomem 0x%x-0x%x\n", maddr, maddr + msiz - 1);
if (intrstr != NULL)
aprint_normal_dev(self, "interrupting at %s\n", intrstr);
}
CFATTACH_DECL_NEW(fea, sizeof(pdq_softc_t),
pdq_eisa_match, pdq_eisa_attach, NULL, NULL);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,712 +0,0 @@
/* $NetBSD: pdq_ifsubr.c,v 1.67 2019/05/29 10:07:29 msaitoh Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* Id: pdq_ifsubr.c,v 1.12 1997/06/05 01:56:35 thomas Exp
*
*/
/*
* DEC PDQ FDDI Controller; code for BSD derived operating systems
*
* This module provide bus independent BSD specific O/S functions.
* (ie. it provides an ifnet interface to the rest of the system)
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pdq_ifsubr.c,v 1.67 2019/05/29 10:07:29 msaitoh Exp $");
#ifdef __NetBSD__
#include "opt_inet.h"
#endif
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/malloc.h>
#if defined(__FreeBSD__) && BSD < 199401
#include <sys/devconf.h>
#elif defined(__bsdi__) || defined(__NetBSD__)
#include <sys/device.h>
#endif
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_dl.h>
#include <net/bpf.h>
#if !defined(__NetBSD__)
#include <net/route.h>
#endif
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#if defined(__NetBSD__)
#include <netinet/if_inarp.h>
#endif
#endif
#if defined(__FreeBSD__)
#include <netinet/if_ether.h>
#include <netinet/if_fddi.h>
#else
#include <net/if_fddi.h>
#endif
#if defined(__bsdi__)
#include <netinet/if_ether.h>
#include <i386/isa/isavar.h>
#endif
#ifndef __NetBSD__
#include <vm/vm.h>
#endif
#if defined(__FreeBSD__)
/*
* Yet another specific ifdef for FreeBSD as it diverges...
*/
#include <dev/pdq/pdqvar.h>
#include <dev/pdq/pdqreg.h>
#else
#include "pdqvar.h"
#include "pdqreg.h"
#endif
void
pdq_ifinit(pdq_softc_t *sc)
{
if (sc->sc_if.if_flags & IFF_UP) {
sc->sc_if.if_flags |= IFF_RUNNING;
if (sc->sc_if.if_flags & IFF_PROMISC)
sc->sc_pdq->pdq_flags |= PDQ_PROMISC;
else
sc->sc_pdq->pdq_flags &= ~PDQ_PROMISC;
if (sc->sc_if.if_flags & IFF_LINK1)
sc->sc_pdq->pdq_flags |= PDQ_PASS_SMT;
else
sc->sc_pdq->pdq_flags &= ~PDQ_PASS_SMT;
sc->sc_pdq->pdq_flags |= PDQ_RUNNING;
pdq_run(sc->sc_pdq);
} else {
sc->sc_if.if_flags &= ~IFF_RUNNING;
sc->sc_pdq->pdq_flags &= ~PDQ_RUNNING;
pdq_stop(sc->sc_pdq);
}
}
void
pdq_ifwatchdog(struct ifnet *ifp)
{
/*
* No progress was made on the transmit queue for PDQ_OS_TX_TRANSMIT
* seconds. Remove all queued packets.
*/
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_timer = 0;
for (;;) {
struct mbuf *m;
IFQ_DEQUEUE(&ifp->if_snd, m);
if (m == NULL)
return;
PDQ_OS_DATABUF_FREE(PDQ_OS_IFP_TO_SOFTC(ifp)->sc_pdq, m);
}
}
ifnet_ret_t
pdq_ifstart(struct ifnet *ifp)
{
pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp);
struct mbuf *m;
int tx = 0;
if ((ifp->if_flags & IFF_RUNNING) == 0)
return;
if (sc->sc_if.if_timer == 0)
sc->sc_if.if_timer = PDQ_OS_TX_TIMEOUT;
if ((sc->sc_pdq->pdq_flags & PDQ_TXOK) == 0) {
sc->sc_if.if_flags |= IFF_OACTIVE;
return;
}
sc->sc_flags |= PDQIF_DOWNCALL;
for (;; tx = 1) {
IFQ_POLL(&ifp->if_snd, m);
if (m == NULL)
break;
#if defined(PDQ_BUS_DMA) && !defined(PDQ_BUS_DMA_NOTX)
if ((m->m_flags & M_HASTXDMAMAP) == 0) {
bus_dmamap_t map;
if (PDQ_OS_HDR_OFFSET != PDQ_RX_FC_OFFSET) {
m->m_data[0] = PDQ_FDDI_PH0;
m->m_data[1] = PDQ_FDDI_PH1;
m->m_data[2] = PDQ_FDDI_PH2;
}
if (!bus_dmamap_create(sc->sc_dmatag, m->m_pkthdr.len,
255, m->m_pkthdr.len, 0, BUS_DMA_NOWAIT, &map)) {
if (!bus_dmamap_load_mbuf(sc->sc_dmatag, map,
m, BUS_DMA_WRITE | BUS_DMA_NOWAIT)) {
bus_dmamap_sync(sc->sc_dmatag, map, 0,
m->m_pkthdr.len,
BUS_DMASYNC_PREWRITE);
M_SETCTX(m, map);
m->m_flags |= M_HASTXDMAMAP;
}
}
if ((m->m_flags & M_HASTXDMAMAP) == 0)
break;
}
#else
if (PDQ_OS_HDR_OFFSET != PDQ_RX_FC_OFFSET) {
m->m_data[0] = PDQ_FDDI_PH0;
m->m_data[1] = PDQ_FDDI_PH1;
m->m_data[2] = PDQ_FDDI_PH2;
}
#endif
if (pdq_queue_transmit_data(sc->sc_pdq, m) == PDQ_FALSE)
break;
IFQ_DEQUEUE(&ifp->if_snd, m);
}
if (m != NULL)
ifp->if_flags |= IFF_OACTIVE;
if (tx)
PDQ_DO_TYPE2_PRODUCER(sc->sc_pdq);
sc->sc_flags &= ~PDQIF_DOWNCALL;
}
void
pdq_os_receive_pdu(pdq_t *pdq, struct mbuf *m, size_t pktlen, int drop)
{
pdq_softc_t *sc = pdq->pdq_os_ctx;
struct fddi_header *fh;
#if defined(PDQ_BUS_DMA)
{
/*
* Even though the first mbuf start at the first fddi header octet,
* the dmamap starts PDQ_OS_HDR_OFFSET octets earlier. Any additional
* mbufs will start normally.
*/
int offset = PDQ_OS_HDR_OFFSET;
struct mbuf *m0;
for (m0 = m; m0 != NULL; m0 = m0->m_next, offset = 0) {
pdq_os_databuf_sync(sc, m0, offset, m0->m_len,
BUS_DMASYNC_POSTREAD);
bus_dmamap_unload(sc->sc_dmatag, M_GETCTX(m0, bus_dmamap_t));
bus_dmamap_destroy(sc->sc_dmatag, M_GETCTX(m0, bus_dmamap_t));
m0->m_flags &= ~M_HASRXDMAMAP;
M_SETCTX(m0, NULL);
}
}
#endif
m->m_pkthdr.len = pktlen;
fh = mtod(m, struct fddi_header *);
if (drop || (fh->fddi_fc & (FDDIFC_L | FDDIFC_F))
!= FDDIFC_LLC_ASYNC) {
PDQ_OS_DATABUF_FREE(pdq, m);
return;
}
m_set_rcvif(m, &sc->sc_if);
if_percpuq_enqueue((&sc->sc_if)->if_percpuq, m);
}
void
pdq_os_restart_transmitter(pdq_t *pdq)
{
pdq_softc_t *sc = pdq->pdq_os_ctx;
sc->sc_if.if_flags &= ~IFF_OACTIVE;
if (IFQ_IS_EMPTY(&sc->sc_if.if_snd) == 0) {
sc->sc_if.if_timer = PDQ_OS_TX_TIMEOUT;
if ((sc->sc_flags & PDQIF_DOWNCALL) == 0)
pdq_ifstart(&sc->sc_if);
} else
sc->sc_if.if_timer = 0;
}
void
pdq_os_transmit_done(pdq_t *pdq, struct mbuf *m)
{
pdq_softc_t *sc = pdq->pdq_os_ctx;
if (sc->sc_bpf != NULL)
PDQ_BPF_MTAP(sc, m, BPF_D_OUT);
PDQ_OS_DATABUF_FREE(pdq, m);
sc->sc_if.if_opackets++;
}
void
pdq_os_addr_fill(pdq_t *pdq, pdq_lanaddr_t *addr, size_t num_addrs)
{
pdq_softc_t *sc = pdq->pdq_os_ctx;
struct ethercom *ec = PDQ_FDDICOM(sc);
struct ether_multistep step;
struct ether_multi *enm;
/*
* ADDR_FILTER_SET is always issued before FILTER_SET so
* we can play with PDQ_ALLMULTI and not worry about
* queueing a FILTER_SET ourselves.
*/
pdq->pdq_flags &= ~PDQ_ALLMULTI;
#if defined(IFF_ALLMULTI)
sc->sc_if.if_flags &= ~IFF_ALLMULTI;
#endif
ETHER_LOCK(ec);
ETHER_FIRST_MULTI(step, ec, enm);
while (enm != NULL && num_addrs > 0) {
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
((u_short *)addr->lanaddr_bytes)[0] = ((u_short *)enm->enm_addrlo)[0];
((u_short *)addr->lanaddr_bytes)[1] = ((u_short *)enm->enm_addrlo)[1];
((u_short *)addr->lanaddr_bytes)[2] = ((u_short *)enm->enm_addrlo)[2];
addr++;
num_addrs--;
} else {
pdq->pdq_flags |= PDQ_ALLMULTI;
#if defined(IFF_ALLMULTI)
sc->sc_if.if_flags |= IFF_ALLMULTI;
#endif
}
ETHER_NEXT_MULTI(step, enm);
}
ETHER_UNLOCK(ec);
/*
* If not all the address fit into the CAM, turn on all-multicast mode.
*/
if (enm != NULL) {
pdq->pdq_flags |= PDQ_ALLMULTI;
#if defined(IFF_ALLMULTI)
sc->sc_if.if_flags |= IFF_ALLMULTI;
#endif
}
}
#if defined(IFM_FDDI)
static int
pdq_ifmedia_change(
struct ifnet *ifp)
{
pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp);
if (sc->sc_ifmedia.ifm_media & IFM_FDX) {
if ((sc->sc_pdq->pdq_flags & PDQ_WANT_FDX) == 0) {
sc->sc_pdq->pdq_flags |= PDQ_WANT_FDX;
if (sc->sc_pdq->pdq_flags & PDQ_RUNNING)
pdq_run(sc->sc_pdq);
}
} else if (sc->sc_pdq->pdq_flags & PDQ_WANT_FDX) {
sc->sc_pdq->pdq_flags &= ~PDQ_WANT_FDX;
if (sc->sc_pdq->pdq_flags & PDQ_RUNNING)
pdq_run(sc->sc_pdq);
}
return 0;
}
static void
pdq_ifmedia_status(struct ifnet *ifp, struct ifmediareq *ifmr)
{
pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp);
ifmr->ifm_status = IFM_AVALID;
if (sc->sc_pdq->pdq_flags & PDQ_IS_ONRING)
ifmr->ifm_status |= IFM_ACTIVE;
ifmr->ifm_active = (ifmr->ifm_current & ~IFM_FDX);
if (sc->sc_pdq->pdq_flags & PDQ_IS_FDX)
ifmr->ifm_active |= IFM_FDX;
}
void
pdq_os_update_status(pdq_t *pdq, const void *arg)
{
pdq_softc_t * const sc = pdq->pdq_os_ctx;
const pdq_response_status_chars_get_t *rsp = arg;
int media = 0;
switch (rsp->status_chars_get.pmd_type[0]) {
case PDQ_PMD_TYPE_ANSI_MUTLI_MODE: media = IFM_FDDI_MMF; break;
case PDQ_PMD_TYPE_ANSI_SINGLE_MODE_TYPE_1: media = IFM_FDDI_SMF; break;
case PDQ_PMD_TYPE_ANSI_SIGNLE_MODE_TYPE_2: media = IFM_FDDI_SMF; break;
case PDQ_PMD_TYPE_UNSHIELDED_TWISTED_PAIR: media = IFM_FDDI_UTP; break;
default: media |= IFM_MANUAL;
}
if (rsp->status_chars_get.station_type == PDQ_STATION_TYPE_DAS)
media |= IFM_FDDI_DA;
sc->sc_ifmedia.ifm_media = media | IFM_FDDI;
}
#endif /* defined(IFM_FDDI) */
int
pdq_ifioctl(struct ifnet *ifp, ioctl_cmd_t cmd, void *data)
{
pdq_softc_t *sc = PDQ_OS_IFP_TO_SOFTC(ifp);
int s, error = 0;
s = PDQ_OS_SPL_RAISE();
switch (cmd) {
case SIOCINITIFADDR: {
struct ifaddr *ifa = (struct ifaddr *)data;
ifp->if_flags |= IFF_UP;
pdq_ifinit(sc);
switch (ifa->ifa_addr->sa_family) {
#if defined(INET)
case AF_INET:
PDQ_ARP_IFINIT(sc, ifa);
break;
#endif /* INET */
default:
break;
}
break;
}
case SIOCSIFFLAGS: {
if ((error = ifioctl_common(ifp, cmd, data)) != 0)
break;
pdq_ifinit(sc);
break;
}
case SIOCADDMULTI:
case SIOCDELMULTI: {
/*
* Update multicast listeners
*/
if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
if (sc->sc_if.if_flags & IFF_RUNNING)
pdq_run(sc->sc_pdq);
error = 0;
}
break;
}
#if defined(SIOCSIFMTU)
#if !defined(ifr_mtu)
#define ifr_mtu ifr_metric
#endif
case SIOCSIFMTU: {
struct ifreq *ifr = (struct ifreq *)data;
/*
* Set the interface MTU.
*/
if (ifr->ifr_mtu > FDDIMTU) {
error = EINVAL;
break;
}
if ((error = ifioctl_common(ifp, cmd, data)) == ENETRESET)
error = 0;
break;
}
#endif /* SIOCSIFMTU */
default: {
error = ether_ioctl(ifp, cmd, data);
break;
}
}
PDQ_OS_SPL_LOWER(s);
return error;
}
void
pdq_ifattach(pdq_softc_t *sc, ifnet_ret_t (*ifwatchdog)(int unit))
{
struct ifnet *ifp = &sc->sc_if;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
#if (defined(__FreeBSD__) && BSD >= 199506) || defined(__NetBSD__)
ifp->if_watchdog = pdq_ifwatchdog;
#else
ifp->if_watchdog = ifwatchdog;
#endif
ifp->if_ioctl = pdq_ifioctl;
#if !defined(__NetBSD__)
ifp->if_output = fddi_output;
#endif
ifp->if_start = pdq_ifstart;
IFQ_SET_READY(&ifp->if_snd);
#if defined(IFM_FDDI)
{
const int media = sc->sc_ifmedia.ifm_media;
/* Initialize ifmedia structures. */
PDQ_FDDICOM(sc)->ec_ifmedia = &sc->sc_ifmedia;
ifmedia_init(&sc->sc_ifmedia, IFM_FDX,
pdq_ifmedia_change, pdq_ifmedia_status);
ifmedia_add(&sc->sc_ifmedia, media, 0, 0);
ifmedia_set(&sc->sc_ifmedia, media);
}
#endif
if_attach(ifp);
#if defined(__NetBSD__)
fddi_ifattach(ifp, (void *)&sc->sc_pdq->pdq_hwaddr);
#else
fddi_ifattach(ifp);
#endif
}
#if defined(PDQ_BUS_DMA)
int
pdq_os_memalloc_contig(
pdq_t *pdq)
{
pdq_softc_t * const sc = pdq->pdq_os_ctx;
bus_dma_segment_t db_segs[1], ui_segs[1], cb_segs[1];
int db_nsegs = 0, ui_nsegs = 0;
int steps = 0;
int not_ok;
not_ok = bus_dmamem_alloc(sc->sc_dmatag,
sizeof(*pdq->pdq_dbp), sizeof(*pdq->pdq_dbp),
sizeof(*pdq->pdq_dbp), db_segs, 1, &db_nsegs,
#if defined(__sparc__) || defined(__sparc64__)
BUS_DMA_NOWAIT | BUS_DMA_COHERENT);
#else
BUS_DMA_NOWAIT);
#endif
if (!not_ok) {
steps = 1;
not_ok = bus_dmamem_map(sc->sc_dmatag, db_segs, db_nsegs,
sizeof(*pdq->pdq_dbp), (void **) &pdq->pdq_dbp,
BUS_DMA_NOWAIT);
}
if (!not_ok) {
steps = 2;
not_ok = bus_dmamap_create(sc->sc_dmatag, db_segs[0].ds_len, 1,
0x2000, 0, BUS_DMA_NOWAIT, &sc->sc_dbmap);
}
if (!not_ok) {
steps = 3;
not_ok = bus_dmamap_load(sc->sc_dmatag, sc->sc_dbmap,
pdq->pdq_dbp, sizeof(*pdq->pdq_dbp),
NULL, BUS_DMA_NOWAIT);
}
if (!not_ok) {
steps = 4;
pdq->pdq_pa_descriptor_block = sc->sc_dbmap->dm_segs[0].ds_addr;
not_ok = bus_dmamem_alloc(sc->sc_dmatag,
PDQ_OS_PAGESIZE, PDQ_OS_PAGESIZE, PDQ_OS_PAGESIZE,
ui_segs, 1, &ui_nsegs, BUS_DMA_NOWAIT);
}
if (!not_ok) {
steps = 5;
not_ok = bus_dmamem_map(sc->sc_dmatag, ui_segs, ui_nsegs,
PDQ_OS_PAGESIZE,
(void **) &pdq->pdq_unsolicited_info.ui_events,
BUS_DMA_NOWAIT);
}
if (!not_ok) {
steps = 6;
not_ok = bus_dmamap_create(sc->sc_dmatag, ui_segs[0].ds_len, 1,
PDQ_OS_PAGESIZE, 0, BUS_DMA_NOWAIT, &sc->sc_uimap);
}
if (!not_ok) {
steps = 7;
not_ok = bus_dmamap_load(sc->sc_dmatag, sc->sc_uimap,
pdq->pdq_unsolicited_info.ui_events,
PDQ_OS_PAGESIZE, NULL, BUS_DMA_NOWAIT);
}
if (!not_ok) {
steps = 8;
pdq->pdq_unsolicited_info.ui_pa_bufstart
= sc->sc_uimap->dm_segs[0].ds_addr;
cb_segs[0] = db_segs[0];
cb_segs[0].ds_addr
+= offsetof(pdq_descriptor_block_t, pdqdb_consumer);
cb_segs[0].ds_len = sizeof(pdq_consumer_block_t);
#if defined(__sparc__) || defined(__sparc64__)
pdq->pdq_cbp
= (pdq_consumer_block_t*)((unsigned long int)pdq->pdq_dbp +
(unsigned long int)offsetof(pdq_descriptor_block_t,
pdqdb_consumer));
#else
not_ok = bus_dmamem_map(sc->sc_dmatag, cb_segs, 1,
sizeof(*pdq->pdq_cbp), (void **)&pdq->pdq_cbp,
BUS_DMA_NOWAIT | BUS_DMA_COHERENT);
#endif
}
if (!not_ok) {
steps = 9;
not_ok = bus_dmamap_create(sc->sc_dmatag, cb_segs[0].ds_len, 1,
0x2000, 0, BUS_DMA_NOWAIT, &sc->sc_cbmap);
}
if (!not_ok) {
steps = 10;
not_ok = bus_dmamap_load(sc->sc_dmatag, sc->sc_cbmap,
pdq->pdq_cbp, sizeof(*pdq->pdq_cbp),
NULL, BUS_DMA_NOWAIT);
}
if (!not_ok) {
pdq->pdq_pa_consumer_block = sc->sc_cbmap->dm_segs[0].ds_addr;
return not_ok;
}
switch (steps) {
case 11:
bus_dmamap_unload(sc->sc_dmatag, sc->sc_cbmap);
/* FALLTHROUGH */
case 10:
bus_dmamap_destroy(sc->sc_dmatag, sc->sc_cbmap);
/* FALLTHROUGH */
case 9:
bus_dmamem_unmap(sc->sc_dmatag,
(void *)pdq->pdq_cbp, sizeof(*pdq->pdq_cbp));
/* FALLTHROUGH */
case 8:
bus_dmamap_unload(sc->sc_dmatag, sc->sc_uimap);
/* FALLTHROUGH */
case 7:
bus_dmamap_destroy(sc->sc_dmatag, sc->sc_uimap);
/* FALLTHROUGH */
case 6:
bus_dmamem_unmap(sc->sc_dmatag,
(void *) pdq->pdq_unsolicited_info.ui_events,
PDQ_OS_PAGESIZE);
/* FALLTHROUGH */
case 5:
bus_dmamem_free(sc->sc_dmatag, ui_segs, ui_nsegs);
/* FALLTHROUGH */
case 4:
bus_dmamap_unload(sc->sc_dmatag, sc->sc_dbmap);
/* FALLTHROUGH */
case 3:
bus_dmamap_destroy(sc->sc_dmatag, sc->sc_dbmap);
/* FALLTHROUGH */
case 2:
bus_dmamem_unmap(sc->sc_dmatag,
(void *) pdq->pdq_dbp,
sizeof(*pdq->pdq_dbp));
/* FALLTHROUGH */
case 1:
bus_dmamem_free(sc->sc_dmatag, db_segs, db_nsegs);
}
return not_ok;
}
extern void
pdq_os_descriptor_block_sync(pdq_os_ctx_t *sc, size_t offset, size_t length,
int ops)
{
bus_dmamap_sync(sc->sc_dmatag, sc->sc_dbmap, offset, length, ops);
}
extern void
pdq_os_consumer_block_sync(pdq_os_ctx_t *sc, int ops)
{
bus_dmamap_sync(sc->sc_dmatag, sc->sc_cbmap, 0,
sizeof(pdq_consumer_block_t), ops);
}
extern void
pdq_os_unsolicited_event_sync(pdq_os_ctx_t *sc, size_t offset, size_t length,
int ops)
{
bus_dmamap_sync(sc->sc_dmatag, sc->sc_uimap, offset, length, ops);
}
extern void
pdq_os_databuf_sync(pdq_os_ctx_t *sc, struct mbuf *m, size_t offset,
size_t length, int ops)
{
bus_dmamap_sync(sc->sc_dmatag, M_GETCTX(m, bus_dmamap_t), offset,
length, ops);
}
extern void
pdq_os_databuf_free(pdq_os_ctx_t *sc, struct mbuf *m)
{
if (m->m_flags & (M_HASRXDMAMAP | M_HASTXDMAMAP)) {
bus_dmamap_t map = M_GETCTX(m, bus_dmamap_t);
bus_dmamap_unload(sc->sc_dmatag, map);
bus_dmamap_destroy(sc->sc_dmatag, map);
m->m_flags &= ~(M_HASRXDMAMAP | M_HASTXDMAMAP);
}
m_freem(m);
}
extern struct mbuf *
pdq_os_databuf_alloc(pdq_os_ctx_t *sc)
{
struct mbuf *m;
bus_dmamap_t map;
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
aprint_error_dev(sc->sc_dev, "can't alloc small buf\n");
return NULL;
}
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
aprint_error_dev(sc->sc_dev, "can't alloc cluster\n");
m_free(m);
return NULL;
}
MCLAIM(m, &PDQ_FDDICOM(sc)->ec_rx_mowner);
m->m_pkthdr.len = m->m_len = PDQ_OS_DATABUF_SIZE;
if (bus_dmamap_create(sc->sc_dmatag, PDQ_OS_DATABUF_SIZE,
1, PDQ_OS_DATABUF_SIZE, 0, BUS_DMA_NOWAIT, &map)) {
aprint_error_dev(sc->sc_dev, "can't create dmamap\n");
m_free(m);
return NULL;
}
if (bus_dmamap_load_mbuf(sc->sc_dmatag, map, m,
BUS_DMA_READ | BUS_DMA_NOWAIT)) {
aprint_error_dev(sc->sc_dev, "can't load dmamap\n");
bus_dmamap_destroy(sc->sc_dmatag, map);
m_free(m);
return NULL;
}
m->m_flags |= M_HASRXDMAMAP;
M_SETCTX(m, map);
return m;
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,519 +0,0 @@
/* $NetBSD: pdqvar.h,v 1.50 2019/11/10 21:16:35 chs Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* Id: pdqvar.h,v 1.21 1997/03/21 21:16:04 thomas Exp
*
*/
/*
* DEC PDQ FDDI Controller; PDQ O/S dependent definitions
*
* Written by Matt Thomas
*
*/
#ifndef _PDQ_OS_H
#define _PDQ_OS_H
#define PDQ_OS_TX_TIMEOUT 5 /* seconds */
enum _pdq_boolean_t {
PDQ_FALSE=0,
PDQ_TRUE=1
};
enum _pdq_type_t {
PDQ_DEFPA, /* PCI-bus */
PDQ_DEFEA, /* EISA-bus */
PDQ_DEFTA, /* TURBOchannel */
PDQ_DEFAA, /* FutureBus+ */
PDQ_DEFQA /* Q-bus */
};
enum _pdq_state_t {
PDQS_RESET=0,
PDQS_UPGRADE=1,
PDQS_DMA_UNAVAILABLE=2,
PDQS_DMA_AVAILABLE=3,
PDQS_LINK_AVAILABLE=4,
PDQS_LINK_UNAVAILABLE=5,
PDQS_HALTED=6,
PDQS_RING_MEMBER=7
};
typedef struct _pdq_t pdq_t;
typedef struct _pdq_csrs_t pdq_csrs_t;
typedef struct _pdq_pci_csrs_t pdq_pci_csrs_t;
typedef struct _pdq_lanaddr_t pdq_lanaddr_t;
typedef unsigned int pdq_uint32_t;
typedef unsigned short pdq_uint16_t;
typedef unsigned char pdq_uint8_t;
typedef enum _pdq_boolean_t pdq_boolean_t;
typedef enum _pdq_type_t pdq_type_t;
typedef enum _pdq_state_t pdq_state_t;
#if defined(PDQTEST)
#include <pdq_os_test.h>
#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(__NetBSD__)
#include <sys/param.h>
#include <sys/systm.h>
#ifndef M_MCAST
#include <sys/mbuf.h>
#endif /* M_CAST */
#include <sys/malloc.h>
#define PDQ_USE_MBUFS
#if defined(__NetBSD__)
#define PDQ_OS_PREFIX "%s: "
#define PDQ_OS_PREFIX_ARGS pdq->pdq_os_name
#else
#define PDQ_OS_PREFIX "%s%d: "
#define PDQ_OS_PREFIX_ARGS pdq->pdq_os_name, pdq->pdq_unit
#endif
#if (defined(__FreeBSD__) && BSD >= 199506) || defined(__NetBSD__)
#define PDQ_OS_PAGESIZE PAGE_SIZE
#else
#define PDQ_OS_PAGESIZE NBPG
#endif
#define PDQ_OS_USEC_DELAY(n) DELAY(n)
#define PDQ_OS_MEMZERO(p, n) memset((void *)(p), 0, (n))
#if defined(__NetBSD__) && !defined(PDQ_NO_BUS_DMA)
#define PDQ_BUS_DMA
#endif
#if !defined(PDQ_BUS_DMA)
#define PDQ_OS_VA_TO_BUSPA(pdq, p) vtophys(p)
#endif
#define PDQ_OS_MEMALLOC(n) malloc(n, M_DEVBUF, M_WAITOK)
#define PDQ_OS_MEMFREE(p, n) free((void *) p, M_DEVBUF)
#ifdef __FreeBSD__
#define PDQ_OS_MEMALLOC_CONTIG(n) vm_page_alloc_contig(n, 0, 0xffffffff, PAGE_SIZE)
#define PDQ_OS_MEMFREE_CONTIG(p, n) kmem_free(kernel_map, (vaddr_t) p, n)
#else
#if !defined(PDQ_BUS_DMA)
#define PDQ_OS_MEMALLOC_CONTIG(n) uvm_km_alloc(kernel_map, round_page(n))
#define PDQ_OS_MEMFREE_CONTIG(p, n) uvm_km_free(kernel_map, (vaddr_t) p, n)
#endif
#endif /* __FreeBSD__ */
#if defined(__FreeBSD__)
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#include <machine/cpufunc.h>
#include <machine/clock.h>
#define ifnet_ret_t void
typedef int ioctl_cmd_t;
typedef enum { PDQ_BUS_EISA, PDQ_BUS_PCI } pdq_bus_t;
typedef u_int16_t pdq_bus_ioport_t;
typedef volatile pdq_uint32_t *pdq_bus_memaddr_t;
typedef pdq_bus_memaddr_t pdq_bus_memoffset_t;
#if BSD >= 199506 /* __FreeBSD__ */
#define PDQ_BPF_MTAP(sc, m, d) bpf_mtap(&(sc)->sc_if, m, d)
#define PDQ_BPFATTACH(sc, t, s) bpfattach(&(sc)->sc_if, t, s)
#endif
#define pdq_os_update_status(a, b) ((void) 0)
#elif defined(__bsdi__)
#if !defined(PDQ_HWSUPPORT) && (_BSDI_VERSION >= 199701)
#include <net/if_media.h>
#endif
#include <machine/inline.h>
#define ifnet_ret_t int
typedef int ioctl_cmd_t;
typedef enum { PDQ_BUS_EISA, PDQ_BUS_PCI } pdq_bus_t;
typedef u_int16_t pdq_bus_ioport_t;
typedef volatile pdq_uint32_t *pdq_bus_memaddr_t;
typedef pdq_bus_memaddr_t pdq_bus_memoffset_t;
#elif defined(__NetBSD__)
#if !defined(PDQ_HWSUPPORT)
#include <net/if_media.h>
#endif
#include <sys/bus.h>
#include <sys/intr.h>
#define PDQ_OS_HDR_OFFSET (PDQ_RX_FC_OFFSET-3)
#define PDQ_OS_PTR_FMT "%p"
#define PDQ_OS_CSR_FMT "0x%lx"
#define ifnet_ret_t void
typedef u_long ioctl_cmd_t;
typedef bus_space_tag_t pdq_bus_t;
typedef bus_space_handle_t pdq_bus_ioport_t;
typedef bus_space_handle_t pdq_bus_memaddr_t;
typedef bus_addr_t pdq_bus_memoffset_t;
#define PDQ_OS_SPL_RAISE() splnet()
#define PDQ_OS_IOMEM
#define PDQ_OS_IORD_32(t, base, offset) bus_space_read_4 (t, base, offset)
#define PDQ_OS_IOWR_32(t, base, offset, data) bus_space_write_4 (t, base, offset, data)
#define PDQ_OS_IORD_8(t, base, offset) bus_space_read_1 (t, base, offset)
#define PDQ_OS_IOWR_8(t, base, offset, data) bus_space_write_1 (t, base, offset, data)
#define PDQ_CSR_OFFSET(base, offset) (0 + (offset)*sizeof(pdq_uint32_t))
#ifdef PDQ_BUS_DMA
#define PDQ_OS_UNSOL_EVENT_PRESYNC(pdq, event) \
pdq_os_unsolicited_event_sync((pdq)->pdq_os_ctx, \
(const u_int8_t *) (event) - \
(const u_int8_t *) (pdq)->pdq_unsolicited_info.ui_events, \
sizeof(*event), BUS_DMASYNC_PREREAD)
#define PDQ_OS_UNSOL_EVENT_POSTSYNC(pdq, event) \
pdq_os_unsolicited_event_sync((pdq)->pdq_os_ctx, \
(const u_int8_t *) (event) - \
(const u_int8_t *) (pdq)->pdq_unsolicited_info.ui_events, \
sizeof(*event), BUS_DMASYNC_POSTREAD)
#define PDQ_OS_DESCBLOCK_SYNC(pdq, what, length, why) \
pdq_os_descriptor_block_sync((pdq)->pdq_os_ctx, \
(u_int8_t *) (what) - (u_int8_t *) (pdq)->pdq_dbp, \
(length), (why))
#define PDQ_OS_CONSUMER_PRESYNC(pdq) \
pdq_os_consumer_block_sync((pdq)->pdq_os_ctx, \
BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)
#define PDQ_OS_CONSUMER_POSTSYNC(pdq) \
pdq_os_consumer_block_sync((pdq)->pdq_os_ctx, \
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)
#define PDQ_OS_DESC_PRESYNC(pdq, d, s) \
PDQ_OS_DESCBLOCK_SYNC((pdq), (d), (s), BUS_DMASYNC_PREWRITE)
#define PDQ_OS_DESC_POSTSYNC(pdq, d, s) \
PDQ_OS_DESCBLOCK_SYNC((pdq), (d), (s), BUS_DMASYNC_POSTWRITE)
#define PDQ_OS_CMDRQST_PRESYNC(pdq, s) \
PDQ_OS_DESCBLOCK_SYNC((pdq), \
(pdq)->pdq_command_info.ci_request_bufstart, \
(s), BUS_DMASYNC_PREWRITE)
#define PDQ_OS_CMDRSP_PRESYNC(pdq, s) \
PDQ_OS_DESCBLOCK_SYNC((pdq), \
(pdq)->pdq_command_info.ci_response_bufstart, \
(s), BUS_DMASYNC_PREREAD)
#define PDQ_OS_CMDRQST_POSTSYNC(pdq, s) \
PDQ_OS_DESCBLOCK_SYNC((pdq), \
(pdq)->pdq_command_info.ci_request_bufstart, \
(s), BUS_DMASYNC_POSTWRITE)
#define PDQ_OS_CMDRSP_POSTSYNC(pdq, s) \
PDQ_OS_DESCBLOCK_SYNC((pdq), \
(pdq)->pdq_command_info.ci_response_bufstart, \
(s), BUS_DMASYNC_POSTREAD)
#define PDQ_OS_RXPDU_PRESYNC(pdq, b, o, l) \
pdq_os_databuf_sync((pdq)->pdq_os_ctx, (b), (o), (l), \
BUS_DMASYNC_PREREAD)
#define PDQ_OS_RXPDU_POSTSYNC(pdq, b, o, l) \
pdq_os_databuf_sync((pdq)->pdq_os_ctx, (b), (o), (l), \
BUS_DMASYNC_POSTREAD)
#define PDQ_OS_DATABUF_ALLOC(pdq, b) ((void)((b) = pdq_os_databuf_alloc((pdq)->pdq_os_ctx)))
#define PDQ_OS_DATABUF_FREE(pdq, b) pdq_os_databuf_free((pdq)->pdq_os_ctx, (b))
#define PDQ_OS_DATABUF_BUSPA(pdq, b) (M_GETCTX((b), bus_dmamap_t)->dm_segs[0].ds_addr + 0)
struct _pdq_os_ctx_t;
extern void pdq_os_descriptor_block_sync(struct _pdq_os_ctx_t *, size_t,
size_t, int);
extern void pdq_os_consumer_block_sync(struct _pdq_os_ctx_t *, int);
extern void pdq_os_unsolicited_event_sync(struct _pdq_os_ctx_t *, size_t,
size_t, int);
extern struct mbuf *pdq_os_databuf_alloc(struct _pdq_os_ctx_t *);
extern void pdq_os_databuf_sync(struct _pdq_os_ctx_t *, struct mbuf *,
size_t, size_t, int);
extern void pdq_os_databuf_free(struct _pdq_os_ctx_t *, struct mbuf *);
#define M_HASTXDMAMAP M_LINK1
#define M_HASRXDMAMAP M_LINK2
#endif
#define PDQ_CSR_WRITE(csr, name, data) PDQ_OS_IOWR_32((csr)->csr_bus, (csr)->csr_base, (csr)->name, data)
#define PDQ_CSR_READ(csr, name) PDQ_OS_IORD_32((csr)->csr_bus, (csr)->csr_base, (csr)->name)
#define PDQ_OS_IFP_TO_SOFTC(ifp) ((pdq_softc_t *) (ifp)->if_softc)
#define PDQ_ARP_IFINIT(sc, ifa) arp_ifinit(&(sc)->sc_if, (ifa))
#define PDQ_FDDICOM(sc) (&(sc)->sc_ec)
#define PDQ_LANADDR(sc) CLLADDR((sc)->sc_if.if_sadl)
#define PDQ_LANADDR_SIZE(sc) ((sc)->sc_if.if_sadl->sdl_alen)
#endif
#if !defined(PDQ_BPF_MTAP)
#define PDQ_BPF_MTAP(sc, m, d) bpf_mtap3((sc)->sc_bpf, m, d)
#endif
#if !defined(PDQ_BPFATTACH)
#define PDQ_BPFATTACH(sc, t, s) bpf_attach(&(sc)->sc_bpf, &(sc)->sc_if, t, s)
#endif
#if !defined(PDQ_OS_SPL_RAISE)
#define PDQ_OS_SPL_RAISE() splimp()
#endif
#if !defined(PDQ_OS_SPL_LOWER)
#define PDQ_OS_SPL_LOWER(s) splx(s)
#endif
#if !defined(PDQ_FDDICOM)
#define PDQ_FDDICOM(sc) (&(sc)->sc_ac)
#endif
#if !defined(PDQ_ARP_IFINIT)
#define PDQ_ARP_IFINIT(sc, ifa) arp_ifinit(&(sc)->sc_ac, (ifa))
#endif
#if !defined(PDQ_OS_PTR_FMT)
#define PDQ_OS_PTR_FMT "0x%x"
#endif
#if !defined(PDQ_OS_CSR_FMT)
#define PDQ_OS_CSR_FMT "0x%x"
#endif
#if !defined(PDQ_LANADDR)
#define PDQ_LANADDR(sc) ((sc)->sc_ac.ac_enaddr)
#define PDQ_LANADDR_SIZE(sc) (sizeof((sc)->sc_ac.ac_enaddr))
#endif
#if !defined(PDQ_OS_IOMEM)
#define PDQ_OS_IORD_32(t, base, offset) inl((base) + (offset))
#define PDQ_OS_IOWR_32(t, base, offset, data) outl((base) + (offset), data)
#define PDQ_OS_IORD_8(t, base, offset) inb((base) + (offset))
#define PDQ_OS_IOWR_8(t, base, offset, data) outb((base) + (offset), data)
#define PDQ_OS_MEMRD_32(t, base, offset) (0 + *((base) + (offset)))
#define PDQ_OS_MEMWR_32(t, base, offset, data) do *((base) + (offset)) = (data); while (0)
#endif
#ifndef PDQ_CSR_OFFSET
#define PDQ_CSR_OFFSET(base, offset) (0 + (base) + (offset))
#endif
#ifndef PDQ_CSR_WRITE
#define PDQ_CSR_WRITE(csr, name, data) PDQ_OS_MEMWR_32((csr)->csr_bus, (csr)->name, 0, data)
#define PDQ_CSR_READ(csr, name) PDQ_OS_MEMRD_32((csr)->csr_bus, (csr)->name, 0)
#endif
#ifndef PDQ_OS_IFP_TO_SOFTC
#define PDQ_OS_IFP_TO_SOFTC(ifp) ((pdq_softc_t *) ((void *) ifp - offsetof(pdq_softc_t, sc_ac.ac_if)))
#endif
#if !defined(PDQ_HWSUPPORT)
typedef struct _pdq_os_ctx_t {
#if defined(__bsdi__)
struct device sc_dev; /* base device */
struct isadev sc_id; /* ISA device */
struct intrhand sc_ih; /* interrupt vectoring */
struct atshutdown sc_ats; /* shutdown routine */
struct arpcom sc_ac;
#define sc_if sc_ac.ac_if
#elif defined(__NetBSD__)
device_t sc_dev; /* base device */
void *sc_ih; /* interrupt vectoring */
void *sc_ats; /* shutdown hook */
struct ethercom sc_ec;
bus_dma_tag_t sc_dmatag;
bool sc_csr_memmapped;
#define sc_if sc_ec.ec_if
#elif defined(__FreeBSD__)
struct kern_devconf *sc_kdc; /* freebsd cruft */
struct arpcom sc_ac;
#define sc_if sc_ac.ac_if
#endif
#if defined(IFM_FDDI)
struct ifmedia sc_ifmedia;
#endif
int sc_flags;
#define PDQIF_DOWNCALL 0x0001 /* active calling from if to pdq */
pdq_t *sc_pdq;
#if defined(__alpha__) || defined(__i386__)
pdq_bus_ioport_t sc_iobase;
#endif
#if defined(PDQ_IOMAPPED) && !defined(__NetBSD__)
#define sc_membase sc_iobase
#else
pdq_bus_memaddr_t sc_membase;
#endif
pdq_bus_t sc_iotag;
pdq_bus_t sc_csrtag;
#if !defined(__bsdi__) || _BSDI_VERSION >= 199401
#define sc_bpf sc_if.if_bpf
#else
struct bpf_if *sc_bpf;
#endif
#if defined(PDQ_BUS_DMA)
#if !defined(__NetBSD__)
bus_dma_tag_t sc_dmatag;
#endif
bus_dmamap_t sc_dbmap; /* DMA map for descriptor block */
bus_dmamap_t sc_uimap; /* DMA map for unsolicited events */
bus_dmamap_t sc_cbmap; /* DMA map for consumer block */
#endif
} pdq_softc_t;
extern void pdq_ifreset(pdq_softc_t *);
extern void pdq_ifinit(pdq_softc_t *);
extern void pdq_ifwatchdog(struct ifnet *);
extern ifnet_ret_t pdq_ifstart(struct ifnet *);
extern int pdq_ifioctl(struct ifnet *, ioctl_cmd_t, void *);
extern void pdq_ifattach(pdq_softc_t *, ifnet_ret_t (*ifwatchdog)(int));
#endif /* !PDQ_HWSUPPORT */
#elif defined(DLPI_PDQ)
#include <sys/param.h>
#include <sys/kmem.h>
#include <sys/ddi.h>
#include <sys/stream.h>
#define PDQ_USE_STREAMS
#define PDQ_OS_PREFIX "%s board %d "
#define PDQ_OS_PREFIX_ARGS pdq->pdq_os_name, pdq->pdq_unit
#define PDQ_OS_PAGESIZE PAGESIZE
#define PDQ_OS_USEC_DELAY(n) drv_usecwait(n)
#define PDQ_OS_MEMZERO(p, n) memset((void *)(p), 0, (n))
#define PDQ_OS_VA_TO_BUSPA(pdq, p) vtop((void *)p, NULL)
#define PDQ_OS_MEMALLOC(n) kmem_zalloc(n, KM_NOSLEEP)
#define PDQ_OS_MEMFREE(p, n) kmem_free((void *) p, n)
#define PDQ_OS_MEMALLOC_CONTIG(n) kmem_zalloc_physreq(n, decfddiphysreq_db, KM_NOSLEEP)
#define PDQ_OS_MEMFREE_CONTIG(p, n) PDQ_OS_MEMFREE(p, n)
extern physreq_t *decfddiphysreq_db;
extern physreq_t *decfddiphysreq_mblk;
#define PDQ_OS_DATABUF_ALLOC(pdq, b) ((void) (((b) = allocb_physreq(PDQ_OS_DATABUF_SIZE, BPRI_MED, decfddiphysreq_mblk)) && ((b)->b_wptr = (b)->b_rptr + PDQ_OS_DATABUF_SIZE)))
#define PDQ_OS_IORD_8(port) inb(port)
#define PDQ_OS_IOWR_8(port, data) outb(port, data)
#endif
#ifdef PDQ_USE_MBUFS
#define PDQ_OS_DATABUF_SIZE (MCLBYTES)
#ifndef PDQ_OS_DATABUF_FREE
#define PDQ_OS_DATABUF_FREE(pdq, b) (m_freem(b))
#endif
#define PDQ_OS_DATABUF_NEXT(b) ((b)->m_next)
#define PDQ_OS_DATABUF_NEXT_SET(b, b1) ((b)->m_next = (b1))
#define PDQ_OS_DATABUF_NEXTPKT(b) ((b)->m_nextpkt)
#define PDQ_OS_DATABUF_NEXTPKT_SET(b, b1) ((b)->m_nextpkt = (b1))
#define PDQ_OS_DATABUF_LEN(b) ((b)->m_len)
#define PDQ_OS_DATABUF_LEN_SET(b, n) ((b)->m_len = (n))
/* #define PDQ_OS_DATABUF_LEN_ADJ(b, n) ((b)->m_len += (n)) */
#define PDQ_OS_DATABUF_PTR(b) (mtod((b), pdq_uint8_t *))
#define PDQ_OS_DATABUF_ADJ(b, n) ((b)->m_data += (n), (b)->m_len -= (n))
typedef struct mbuf PDQ_OS_DATABUF_T;
#ifndef PDQ_OS_DATABUF_ALLOC
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
if (x_m0 != NULL) { \
MCLGET(x_m0, M_DONTWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
} else { \
(b) = x_m0; \
x_m0->m_len = PDQ_OS_DATABUF_SIZE; \
} \
} else { \
(b) = NULL; \
} \
} while (0)
#endif
#define PDQ_OS_DATABUF_RESET(b) ((b)->m_data = (b)->m_ext.ext_buf, (b)->m_len = MCLBYTES)
#endif /* PDQ_USE_MBUFS */
#ifdef PDQ_USE_STREAMS
#define PDQ_OS_DATABUF_SIZE (2048)
#define PDQ_OS_DATABUF_FREE(pdq, b) (freemsg(b))
#define PDQ_OS_DATABUF_NEXT(b) ((b)->b_cont)
#define PDQ_OS_DATABUF_NEXT_SET(b, b1) ((b)->b_cont = (b1))
#define PDQ_OS_DATABUF_NEXTPKT(b) ((b)->b_next)
#define PDQ_OS_DATABUF_NEXTPKT_SET(b, b1) ((b)->b_next = (b1))
#define PDQ_OS_DATABUF_LEN(b) ((b)->b_wptr - (b)->b_rptr)
#define PDQ_OS_DATABUF_LEN_SET(b, n) ((b)->b_wptr = (b)->b_rptr + (n))
/*#define PDQ_OS_DATABUF_LEN_ADJ(b, n) ((b)->b_wptr += (n))*/
#define PDQ_OS_DATABUF_PTR(b) ((pdq_uint8_t *) (b)->b_rptr)
#define PDQ_OS_DATABUF_ADJ(b, n) ((b)->b_rptr += (n))
typedef mblk_t PDQ_OS_DATABUF_T;
#ifndef PDQ_OS_DATABUF_ALLOC
#define PDQ_OS_DATABUF_ALLOC(pdq, b) ((void) (((b) = allocb(PDQ_OS_DATABUF_SIZE, BPRI_MED)) && ((b)->b_wptr = (b)->b_rptr + PDQ_OS_DATABUF_SIZE)))
#endif /* PDQ_OS_DATABUF_ALLOC */
#endif /* PDQ_USE_STREAMS */
#define PDQ_OS_TX_TRANSMIT 5
#define PDQ_OS_DATABUF_ENQUEUE(q, b) do { \
PDQ_OS_DATABUF_NEXTPKT_SET(b, NULL); \
if ((q)->q_tail == NULL) \
(q)->q_head = (b); \
else \
PDQ_OS_DATABUF_NEXTPKT_SET(((PDQ_OS_DATABUF_T *)(q)->q_tail), b); \
(q)->q_tail = (b); \
} while (0)
#define PDQ_OS_DATABUF_DEQUEUE(q, b) do { \
if (((b) = (PDQ_OS_DATABUF_T *) (q)->q_head) != NULL) { \
if (((q)->q_head = PDQ_OS_DATABUF_NEXTPKT(b)) == NULL) \
(q)->q_tail = NULL; \
PDQ_OS_DATABUF_NEXTPKT_SET(b, NULL); \
} \
} while (0)
#if !defined(PDQ_OS_CONSUMER_PRESYNC)
#define PDQ_OS_CONSUMER_PRESYNC(pdq) do { } while(0)
#define PDQ_OS_CONSUMER_POSTSYNC(pdq) do { } while(0)
#define PDQ_OS_DESC_PRESYNC(pdq, d, s) do { } while(0)
#define PDQ_OS_DESC_POSTSYNC(pdq, d, s) do { } while(0)
#define PDQ_OS_CMDRQST_PRESYNC(pdq, s) do { } while(0)
#define PDQ_OS_CMDRQST_POSTSYNC(pdq, s) do { } while(0)
#define PDQ_OS_CMDRSP_PRESYNC(pdq, s) do { } while(0)
#define PDQ_OS_CMDRSP_POSTSYNC(pdq, s) do { } while(0)
#define PDQ_OS_RXPDU_PRESYNC(pdq, b, o, l) do { } while(0)
#define PDQ_OS_RXPDU_POSTSYNC(pdq, b, o, l) do { } while(0)
#define PDQ_OS_UNSOL_EVENT_PRESYNC(pdq, e) do { } while(0)
#define PDQ_OS_UNSOL_EVENT_POSTSYNC(pdq, e) do { } while(0)
#endif
#ifndef PDQ_OS_DATABUF_BUSPA
#define PDQ_OS_DATABUF_BUSPA(pdq, b) PDQ_OS_VA_TO_BUSPA(pdq, PDQ_OS_DATABUF_PTR(b))
#endif
#ifndef PDQ_OS_HDR_OFFSET
#define PDQ_OS_HDR_OFFSET PDQ_RX_FC_OFFSET
#endif
extern void pdq_os_addr_fill(pdq_t *, pdq_lanaddr_t *, size_t);
extern void pdq_os_receive_pdu(pdq_t *, PDQ_OS_DATABUF_T *, size_t, int);
extern void pdq_os_restart_transmitter(pdq_t *);
extern void pdq_os_transmit_done(pdq_t *, PDQ_OS_DATABUF_T *);
#if !defined(pdq_os_update_status)
extern void pdq_os_update_status(pdq_t *, const void *);
#endif
#if !defined(PDQ_OS_MEMALLOC_CONTIG)
extern int pdq_os_memalloc_contig(pdq_t *);
#endif
extern pdq_boolean_t pdq_queue_transmit_data(pdq_t *, PDQ_OS_DATABUF_T *);
extern void pdq_flush_transmitter(pdq_t *);
extern void pdq_run(pdq_t *);
extern pdq_state_t pdq_stop(pdq_t *);
extern void pdq_hwreset(pdq_t *);
extern int pdq_interrupt(pdq_t *);
extern pdq_t *pdq_initialize(pdq_bus_t, pdq_bus_memaddr_t, const char *, int,
void *, pdq_type_t);
#endif /* _PDQ_OS_H */

View File

@ -1,4 +1,4 @@
# $NetBSD: files.pci,v 1.423 2020/01/19 17:53:15 thorpej Exp $
# $NetBSD: files.pci,v 1.424 2020/01/20 18:38:17 thorpej Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@ -183,11 +183,6 @@ file dev/pci/if_ep_pci.c ep_pci
attach ex at pci with ex_pci
file dev/pci/if_ex_pci.c ex_pci
# Digital DEFPA PCI FDDI Controller
device fpa: pdq, fddi, ifnet, arp
attach fpa at pci
file dev/pci/if_fpa.c fpa
# AMD am7990 (LANCE) -based Ethernet controllers
# device declaration in sys/conf/files
attach le at pci with le_pci: le32

View File

@ -1,493 +0,0 @@
/* $NetBSD: if_fpa.c,v 1.63 2019/11/10 21:16:36 chs Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* Id: if_fpa.c,v 1.11 1997/06/05 01:56:35 thomas Exp
*
*/
/*
* DEC PDQ FDDI Controller; code for BSD derived operating systems
*
* This module supports the DEC DEFPA PCI FDDI Controller
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fpa.c,v 1.63 2019/11/10 21:16:36 chs Exp $");
#ifdef __NetBSD__
#include "opt_inet.h"
#endif
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/malloc.h>
#if defined(__FreeBSD__) && BSD < 199401
#include <sys/devconf.h>
#elif defined(__bsdi__) || defined(__NetBSD__)
#include <sys/device.h>
#endif
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_dl.h>
#include <net/route.h>
#include <net/bpf.h>
#if defined(__FreeBSD__)
#include <netinet/if_fddi.h>
#else
#include <net/if_fddi.h>
#endif
#if defined(__FreeBSD__)
#include <vm/vm.h>
#include "fpa.h"
#include <netinet/if_ether.h>
#include <pci/pcivar.h>
#include <i386/isa/icu.h>
#include <dev/pdq/pdqvar.h>
#include <dev/pdq/pdqreg.h>
#elif defined(__bsdi__)
#include <netinet/if_ether.h>
#include <i386/isa/isavar.h>
#include <i386/isa/icu.h>
#ifndef DRQNONE
#define DRQNONE 0
#endif
#if _BSDI_VERSION < 199401
#define IRQSHARE 0
#endif
#include <i386/pci/pci.h>
#include <dev/pdq/pdqvar.h>
#include <dev/pdq/pdqreg.h>
#elif defined(__NetBSD__)
#include <dev/pci/pcidevs.h>
#include <dev/pci/pcivar.h>
#include <dev/ic/pdqvar.h>
#include <dev/ic/pdqreg.h>
#endif /* __NetBSD__ */
#define DEC_VENDORID 0x1011
#define DEFPA_CHIPID 0x000F
#define PCI_VENDORID(x) ((x) & 0xFFFF)
#define PCI_CHIPID(x) (((x) >> 16) & 0xFFFF)
#define DEFPA_LATENCY 0x88
#define PCI_CFLT 0x0C /* Configuration Latency */
#define PCI_CBMA 0x10 /* Configuration Base Memory Address */
#define PCI_CBIO 0x14 /* Configuration Base I/O Address */
#if defined(__FreeBSD__)
#if NFPA < 4
#undef NFPA
#define NFPA 4
#endif
static pdq_softc_t *pdqs_pci[NFPA];
#define PDQ_PCI_UNIT_TO_SOFTC(unit) (pdqs_pci[unit])
#if BSD >= 199506
#define pdq_pci_ifwatchdog NULL
static void pdq_pci_shutdown(int howto, void *sc);
#endif
#elif defined(__bsdi__)
extern struct cfdriver fpacd;
#define PDQ_PCI_UNIT_TO_SOFTC(unit) ((pdq_softc_t *)device_lookup_private(&fpa_cd, unit))
#elif defined(__NetBSD__)
extern struct cfdriver fpa_cd;
#define PDQ_PCI_UNIT_TO_SOFTC(unit) ((pdq_softc_t *)device_lookup_private(&fpa_cd, unit))
#define pdq_pci_ifwatchdog NULL
#endif
#ifndef pdq_pci_ifwatchdog
static ifnet_ret_t
pdq_pci_ifwatchdog(
int unit)
{
pdq_ifwatchdog(&PDQ_PCI_UNIT_TO_SOFTC(unit)->sc_if);
}
#endif
#if defined(__FreeBSD__) && BSD >= 199506
static void
pdq_pci_ifintr(
void *arg)
{
(void) pdq_interrupt(((pdq_softc_t *) arg)->sc_pdq);
}
#else
static int
pdq_pci_ifintr(
void *arg)
{
pdq_softc_t * const sc = (pdq_softc_t *) arg;
#ifdef __FreeBSD__
return pdq_interrupt(sc->sc_pdq);
#elif defined(__bsdi__) || defined(__NetBSD__)
(void) pdq_interrupt(sc->sc_pdq);
return 1;
#endif
}
#endif /* __FreeBSD && BSD */
#if defined(__FreeBSD__)
/*
* This is the PCI configuration support. Since the PDQ is available
* on both EISA and PCI boards, one must be careful in how defines the
* PDQ in the config file.
*/
static char *
pdq_pci_probe(
pcici_t config_id,
pcidi_t device_id)
{
if (PCI_VENDORID(device_id) == DEC_VENDORID &&
PCI_CHIPID(device_id) == DEFPA_CHIPID)
return "Digital DEFPA PCI FDDI Controller";
return NULL;
}
static void
pdq_pci_attach(
pcici_t config_id,
int unit)
{
pdq_softc_t *sc;
vaddr_t va_csrs;
paddr_t pa_csrs;
pdq_uint32_t data;
if (unit == NFPA) {
printf("fpa%d: not configured; kernel is built for only %d device%s.\n",
unit, NFPA, NFPA == 1 ? "" : "s");
return;
}
data = pci_conf_read(config_id, PCI_CFLT);
if ((data & 0xFF00) < (DEFPA_LATENCY << 8)) {
data &= ~0xFF00;
data |= DEFPA_LATENCY << 8;
pci_conf_write(config_id, PCI_CFLT, data);
}
sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
if (!pci_map_mem(config_id, PCI_CBMA, &va_csrs, &pa_csrs)) {
free((void *) sc, M_DEVBUF);
return;
}
sc->sc_if.if_name = "fpa";
sc->sc_if.if_unit = unit;
sc->sc_membase = (pdq_bus_memaddr_t) va_csrs;
sc->sc_pdq = pdq_initialize(PDQ_BUS_PCI, sc->sc_membase,
sc->sc_if.if_name, sc->sc_if.if_unit,
(void *) sc, PDQ_DEFPA);
if (sc->sc_pdq == NULL) {
free((void *) sc, M_DEVBUF);
return;
}
memcpy(sc->sc_ac.ac_enaddr, (void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, 6);
pdqs_pci[unit] = sc;
pdq_ifattach(sc, pdq_pci_ifwatchdog);
pci_map_int(config_id, pdq_pci_ifintr, (void*) sc, &net_imask);
#if BSD >= 199506
at_shutdown(pdq_pci_shutdown, (void *) sc, SHUTDOWN_POST_SYNC);
#endif
}
#if BSD < 199401
static int
pdq_pci_shutdown(
struct kern_devconf *kdc,
int force)
{
if (kdc->kdc_unit < NFPA)
pdq_hwreset(PDQ_PCI_UNIT_TO_SOFTC(kdc->kdc_unit)->sc_pdq);
(void) dev_detach(kdc);
return 0;
}
#else
static void
pdq_pci_shutdown(
int howto,
void *sc)
{
pdq_hwreset(((pdq_softc_t *)sc)->sc_pdq);
}
#endif
static u_long pdq_pci_count;
struct pci_device fpadevice = {
"fpa",
pdq_pci_probe,
pdq_pci_attach,
&pdq_pci_count,
#if BSD < 199401
pdq_pci_shutdown,
#endif
};
#ifdef DATA_SET
DATA_SET (pcidevice_set, fpadevice);
#endif
#elif defined(__bsdi__)
static int
pdq_pci_match(
pci_devaddr_t *pa)
{
int irq;
int id;
id = pci_inl(pa, PCI_VENDOR_ID);
if (PCI_VENDORID(id) != DEC_VENDORID || PCI_CHIPID(id) != DEFPA_CHIPID)
return 0;
irq = pci_inl(pa, PCI_I_LINE) & 0xFF;
if (irq == 0 || irq >= 16)
return 0;
return 1;
}
int
pdq_pci_probe(device_t parent, cfdata_t cf, void *aux)
{
struct isa_attach_args *ia = (struct isa_attach_args *) aux;
pdq_uint32_t irq, data;
pci_devaddr_t *pa;
pa = pci_scan(pdq_pci_match);
if (pa == NULL)
return 0;
irq = (1 << (pci_inl(pa, PCI_I_LINE) & 0xFF));
if (ia->ia_irq != IRQUNK && irq != ia->ia_irq) {
printf("fpa%d: error: desired IRQ of %d does not match device's actual IRQ of %d\n",
cf->cf_unit,
ffs(ia->ia_irq) - 1, ffs(irq) - 1);
return 0;
}
if (ia->ia_irq == IRQUNK) {
(void) isa_irqalloc(irq);
ia->ia_irq = irq;
}
/* PCI bus masters don't use host DMA channels */
ia->ia_drq = DRQNONE;
/* Get the memory base address; assume the BIOS set it up correctly */
ia->ia_maddr = (void *) (pci_inl(pa, PCI_CBMA) & ~7);
pci_outl(pa, PCI_CBMA, 0xFFFFFFFF);
ia->ia_msize = ((~pci_inl(pa, PCI_CBMA)) | 7) + 1;
pci_outl(pa, PCI_CBMA, (int) ia->ia_maddr);
/* Disable I/O space access */
pci_outl(pa, PCI_COMMAND, pci_inl(pa, PCI_COMMAND) & ~1);
ia->ia_iobase = 0;
ia->ia_iosize = 0;
/* Make sure the latency timer is what the DEFPA likes */
data = pci_inl(pa, PCI_CFLT);
if ((data & 0xFF00) < (DEFPA_LATENCY << 8)) {
data &= ~0xFF00;
data |= DEFPA_LATENCY << 8;
pci_outl(pa, PCI_CFLT, data);
}
ia->ia_irq |= IRQSHARE;
return 1;
}
void
pdq_pci_attach(device_t parent, device_t self, void *aux)
{
pdq_softc_t *sc = device_private(self);
struct isa_attach_args *ia = (struct isa_attach_args *) aux;
struct ifnet *ifp = &sc->sc_if;
int i;
sc->sc_dev = self;
sc->sc_if.if_unit = sc->sc_dev.dv_unit;
sc->sc_if.if_name = "fpa";
sc->sc_if.if_flags = 0;
sc->sc_membase = (pdq_bus_memaddr_t) mapphys((vaddr_t)ia->ia_maddr, ia->ia_msize);
sc->sc_pdq = pdq_initialize(PDQ_BUS_PCI, sc->sc_membase,
sc->sc_if.if_name, sc->sc_if.if_unit,
(void *) sc, PDQ_DEFPA);
if (sc->sc_pdq == NULL) {
printf("fpa%d: initialization failed\n", sc->sc_if.if_unit);
return;
}
memcpy(sc->sc_ac.ac_enaddr, (void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, 6);
pdq_ifattach(sc, pdq_pci_ifwatchdog);
isa_establish(&sc->sc_id, &sc->sc_dev);
sc->sc_ih.ih_fun = pdq_pci_ifintr;
sc->sc_ih.ih_arg = (void *)sc;
intr_establish(ia->ia_irq, &sc->sc_ih, DV_NET);
sc->sc_ats.func = (void (*)(void *)) pdq_hwreset;
sc->sc_ats.arg = (void *) sc->sc_pdq;
atshutdown(&sc->sc_ats, ATSH_ADD);
}
struct cfdriver fpacd = {
0, "fpa", pdq_pci_probe, pdq_pci_attach,
#if _BSDI_VERSION >= 199401
DV_IFNET,
#endif
sizeof(pdq_softc_t)
};
#elif defined(__NetBSD__)
static int
pdq_pci_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_DEC)
return 0;
if (PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_DEC_DEFPA)
return 0;
return 1;
}
static void
pdq_pci_attach(device_t const parent, device_t const self, void *const aux)
{
pdq_softc_t * const sc = device_private(self);
struct pci_attach_args * const pa = (struct pci_attach_args *) aux;
pdq_uint32_t data;
pci_intr_handle_t intrhandle;
const char *intrstr;
bus_space_tag_t iot, memt;
bus_space_handle_t ioh, memh;
int ioh_valid, memh_valid;
char intrbuf[PCI_INTRSTR_LEN];
aprint_naive(": FDDI controller\n");
sc->sc_dev = self;
data = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_CFLT);
if ((data & 0xFF00) < (DEFPA_LATENCY << 8)) {
data &= ~0xFF00;
data |= DEFPA_LATENCY << 8;
pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_CFLT, data);
}
strlcpy(sc->sc_if.if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
sc->sc_if.if_flags = 0;
sc->sc_if.if_softc = sc;
ioh_valid = (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
&iot, &ioh, NULL, NULL) == 0);
memh_valid = (pci_mapreg_map(pa, PCI_CBMA,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
&memt, &memh, NULL, NULL) == 0);
#if defined(DEFPA_IOMAPED)
if (ioh_valid) {
sc->sc_csrtag = iot;
sc->sc_membase = ioh;
} else if (memh_valid) {
sc->sc_csrtag = memt;
sc->sc_membase = memh;
}
#else /* defined(DEFPA_IOMAPPED) */
if (memh_valid) {
sc->sc_csrtag = memt;
sc->sc_membase = memh;
} else if (ioh_valid) {
sc->sc_csrtag = iot;
sc->sc_membase = ioh;
}
#endif /* DEFPA_IOMAPPED */
else {
aprint_error(": unable to map device registers\n");
return;
}
sc->sc_dmatag = pa->pa_dmat;
/* Make sure bus mastering is enabled. */
pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
pci_conf_read(pa->pa_pc, pa->pa_tag,
PCI_COMMAND_STATUS_REG) |
PCI_COMMAND_MASTER_ENABLE);
sc->sc_pdq = pdq_initialize(sc->sc_csrtag, sc->sc_membase,
sc->sc_if.if_xname, 0,
(void *) sc, PDQ_DEFPA);
if (sc->sc_pdq == NULL) {
aprint_error_dev(sc->sc_dev, "initialization failed\n");
return;
}
pdq_ifattach(sc, pdq_pci_ifwatchdog);
if (pci_intr_map(pa, &intrhandle)) {
aprint_error_dev(self, "couldn't map interrupt\n");
return;
}
intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, sizeof(intrbuf));
sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, intrhandle, IPL_NET,
pdq_pci_ifintr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt");
if (intrstr != NULL)
aprint_error(" at %s", intrstr);
aprint_error("\n");
return;
}
sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset, sc->sc_pdq);
if (sc->sc_ats == NULL)
aprint_error_dev(self, "warning: couldn't establish shutdown hook\n");
if (intrstr != NULL)
aprint_normal_dev(self, "interrupting at %s\n", intrstr);
}
CFATTACH_DECL_NEW(fpa, sizeof(pdq_softc_t),
pdq_pci_match, pdq_pci_attach, NULL, NULL);
#endif /* __NetBSD__ */

View File

@ -1,4 +1,4 @@
# $NetBSD: files.tc,v 1.35 2019/05/08 13:40:19 isaki Exp $
# $NetBSD: files.tc,v 1.36 2020/01/20 18:38:17 thorpej Exp $
#
# Config file and device description for machine-independent
# TURBOchannel code. Included by ports that need it.
@ -29,11 +29,6 @@ device bba: audiobus, am7930
attach bba at ioasic
file dev/tc/bba.c bba
# DEFTA FDDI controller
device fta: pdq, fddi, ifnet, arp
attach fta at tc
file dev/tc/if_fta.c fta
# TCDS dual channel SCSI
device tcds { chip = -1 }
attach tcds at tc

View File

@ -1,120 +0,0 @@
/* $NetBSD: if_fta.c,v 1.29 2017/06/22 16:46:53 flxd Exp $ */
/*-
* Copyright (c) 1996 Matt Thomas <matt@3am-software.com>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* Id: if_fta.c,v 1.4 1997/03/21 13:45:45 thomas Exp
*
*/
/*
* DEC TURBOchannel FDDI Controller; code for BSD derived operating systems
*
* Written by Matt Thomas
*
* This module supports the DEC DEFTA TURBOchannel FDDI Controller
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fta.c,v 1.29 2017/06/22 16:46:53 flxd Exp $");
#include "opt_inet.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/device.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_fddi.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/if_inarp.h>
#endif
#include <dev/tc/tcvar.h>
#include <dev/ic/pdqvar.h>
#include <dev/ic/pdqreg.h>
static int
pdq_tc_match(device_t parent, cfdata_t match, void *aux)
{
struct tc_attach_args *ta = aux;
if (strncmp("PMAF-F", ta->ta_modname, 6) == 0)
return 1;
return 0;
}
static void
pdq_tc_attach(device_t parent, device_t self, void *aux)
{
pdq_softc_t * const sc = device_private(self);
struct tc_attach_args * const ta = aux;
/*
* NOTE: sc_bc is an alias for sc_csrtag and sc_membase is an
* alias for sc_csrhandle. sc_iobase is not used in this front-end.
*/
sc->sc_dev = self;
sc->sc_dmatag = ta->ta_dmat;
sc->sc_csrtag = ta->ta_memt;
memcpy(sc->sc_if.if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
sc->sc_if.if_flags = 0;
sc->sc_if.if_softc = sc;
if (bus_space_map(sc->sc_csrtag, ta->ta_addr + PDQ_TC_CSR_OFFSET,
PDQ_TC_CSR_SPACE, 0, &sc->sc_membase)) {
aprint_normal("\n");
aprint_error_dev(sc->sc_dev, "can't map card memory!\n");
return;
}
sc->sc_pdq = pdq_initialize(sc->sc_csrtag, sc->sc_membase,
sc->sc_if.if_xname, 0,
(void *) sc, PDQ_DEFTA);
if (sc->sc_pdq == NULL) {
aprint_error_dev(sc->sc_dev, "initialization failed\n");
return;
}
pdq_ifattach(sc, NULL);
tc_intr_establish(parent, ta->ta_cookie, TC_IPL_NET,
(int (*)(void *)) pdq_interrupt, sc->sc_pdq);
sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset, sc->sc_pdq);
if (sc->sc_ats == NULL)
aprint_error_dev(self, "warning: couldn't establish shutdown hook\n");
}
CFATTACH_DECL_NEW(fta, sizeof(pdq_softc_t),
pdq_tc_match, pdq_tc_attach, NULL, NULL);

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.40 2020/01/19 20:00:36 thorpej Exp $
# $NetBSD: Makefile,v 1.41 2020/01/20 18:38:18 thorpej Exp $
INCSDIR= /usr/include/net
INCS= bpf.h bpfjit.h bpfdesc.h dlt.h ethertypes.h if.h if_arc.h if_arp.h \
if_bridgevar.h if_dl.h if_ether.h if_fddi.h if_gif.h \
if_bridgevar.h if_dl.h if_ether.h if_gif.h \
if_gre.h if_ieee1394.h if_ipsec.h if_llc.h if_media.h if_mpls.h \
if_pflog.h if_ppp.h if_pppoe.h if_l2tp.h if_sppp.h if_srt.h if_stf.h \
if_tap.h if_tun.h if_types.h if_vlanvar.h net_stats.h \

View File

@ -1,4 +1,4 @@
# $NetBSD: files.net,v 1.23 2020/01/19 20:00:36 thorpej Exp $
# $NetBSD: files.net,v 1.24 2020/01/20 18:38:18 thorpej Exp $
# XXX CLEANUP
define net
@ -12,10 +12,8 @@ file net/if.c net
file net/if_arcsubr.c arcnet needs-flag
file net/if_bridge.c bridge needs-flag
file net/bridgestp.c bridge
file net/if_ethersubr.c ether | fddi | netatalk |
wlan needs-flag
file net/if_ethersubr.c ether | netatalk | wlan needs-flag
file net/if_faith.c faith & (inet | inet6) needs-flag
file net/if_fddisubr.c fddi needs-flag
file net/if_gif.c gif needs-flag
file net/if_gre.c gre needs-flag
file net/if_ieee1394subr.c ieee1394

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.c,v 1.467 2020/01/19 20:00:36 thorpej Exp $ */
/* $NetBSD: if.c,v 1.468 2020/01/20 18:38:18 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.467 2020/01/19 20:00:36 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.468 2020/01/20 18:38:18 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@ -149,7 +149,6 @@ __KERNEL_RCSID(0, "$NetBSD: if.c,v 1.467 2020/01/19 20:00:36 thorpej Exp $");
#endif
#include "ether.h"
#include "fddi.h"
#include "bridge.h"
#if NBRIDGE > 0
@ -318,7 +317,7 @@ ifinit1(void)
if_pfil = pfil_head_create(PFIL_TYPE_IFNET, NULL);
KASSERT(if_pfil != NULL);
#if NETHER > 0 || NFDDI > 0 || defined(NETATALK) || defined(WLAN)
#if NETHER > 0 || defined(NETATALK) || defined(WLAN)
etherinit();
#endif
}

View File

@ -1,95 +0,0 @@
/* $NetBSD: if_fddi.h,v 1.14 2007/12/25 18:33:45 perry Exp $ */
/*
* Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com)
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* Id: if_fddi.h,v 1.5 1997/03/21 13:46:50 thomas Exp
*/
#ifndef _NET_IF_FDDI_H_
#define _NET_IF_FDDI_H_
/*
* Structure of an 100Mb/s FDDI header.
*/
struct fddi_header {
u_char fddi_ph[3]; /* makes the FDDI header 16 bytes */
u_char fddi_fc;
u_char fddi_dhost[6];
u_char fddi_shost[6];
} __packed;
#define FDDIIPMTU 4352
#define FDDIMTU 4470
#define FDDIMIN 3
#define FDDIFC_C 0x80 /* 0b10000000 */
#define FDDIFC_L 0x40 /* 0b01000000 */
#define FDDIFC_F 0x30 /* 0b00110000 */
#define FDDIFC_Z 0x0F /* 0b00001111 */
/*
* FDDI Frame Control values. (48-bit addressing only).
*/
#define FDDIFC_VOID 0x40 /* Void frame */
#define FDDIFC_NRT 0x80 /* Nonrestricted token */
#define FDDIFC_RT 0xc0 /* Restricted token */
#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */
#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */
#define FDDIFC_LLC_ASYNC 0x50
#define FDDIFC_LLC_PRIO0 0
#define FDDIFC_LLC_PRIO1 1
#define FDDIFC_LLC_PRIO2 2
#define FDDIFC_LLC_PRIO3 3
#define FDDIFC_LLC_PRIO4 4
#define FDDIFC_LLC_PRIO5 5
#define FDDIFC_LLC_PRIO6 6
#define FDDIFC_LLC_PRIO7 7
#define FDDIFC_LLC_SYNC 0xd0
#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */
#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */
#define FDDIFC_SMT 0x40
#define FDDIFC_SMT_INFO 0x41 /* SMT Info */
#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */
#define FDDIFC_MAC 0xc0 /* MAC frame */
#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */
#define FDDIFC_ZZZZ 0x0F /* Control bits */
#if defined(KERNEL) || defined(_KERNEL)
#if defined(__NetBSD__)
#include <net/if_ether.h>
#endif
#define fddibroadcastaddr etherbroadcastaddr
#define fddi_ipmulticast_min ether_ipmulticast_min
#define fddi_ipmulticast_max ether_ipmulticast_max
#define fddi_sprintf ether_sprintf
#if defined(__NetBSD__)
void fddi_ifattach(struct ifnet *, void *);
#else
void fddi_ifattach(struct ifnet *);
#endif
#endif
#endif /* !_NET_IF_FDDI_H_ */

View File

@ -1,654 +0,0 @@
/* $NetBSD: if_fddisubr.c,v 1.111 2019/02/05 06:17:03 msaitoh Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* 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.
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``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 PROJECT OR CONTRIBUTORS 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.
*/
/*
* Copyright (c) 1982, 1989, 1993
* The Regents of the University of California. 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.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
*
* @(#)if_fddisubr.c 8.1 (Berkeley) 6/10/93
*
* Id: if_fddisubr.c,v 1.15 1997/03/21 22:35:50 thomas Exp
*/
/*
* Copyright (c) 1995, 1996
* Matt Thomas <matt@3am-software.com>. 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.
* 3. The name of its contributor may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
*
* @(#)if_fddisubr.c 8.1 (Berkeley) 6/10/93
*
* Id: if_fddisubr.c,v 1.15 1997/03/21 22:35:50 thomas Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.111 2019/02/05 06:17:03 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_gateway.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_mbuftrace.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/syslog.h>
#include <sys/cpu.h>
#include <net/if.h>
#include <net/netisr.h>
#include <net/route.h>
#include <net/if_llc.h>
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/bpf.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet/if_inarp.h>
#endif
#include <net/if_fddi.h>
#ifdef INET6
#ifndef INET
#include <netinet/in.h>
#include <netinet/in_var.h>
#endif
#include <netinet6/nd6.h>
#endif
#include "carp.h"
#if NCARP > 0
#include <netinet/ip_carp.h>
#endif
#ifdef NETATALK
#include <netatalk/at.h>
#include <netatalk/at_var.h>
#include <netatalk/at_extern.h>
#define llc_snap_org_code llc_un.type_snap.org_code
#define llc_snap_ether_type llc_un.type_snap.ether_type
extern u_char at_org_code[ 3 ];
extern u_char aarp_org_code[ 3 ];
#endif /* NETATALK */
#define senderr(e) { error = (e); goto bad;}
/*
* This really should be defined in if_llc.h but in case it isn't.
*/
#ifndef llc_snap
#define llc_snap llc_un.type_snap
#endif
#define FDDIADDR(ifp) LLADDR((ifp)->if_sadl)
#define CFDDIADDR(ifp) CLLADDR((ifp)->if_sadl)
static int fddi_output(struct ifnet *, struct mbuf *,
const struct sockaddr *, const struct rtentry *);
static void fddi_input(struct ifnet *, struct mbuf *);
/*
* FDDI output routine.
* Encapsulate a packet of type family for the local net.
* Assumes that ifp is actually pointer to ethercom structure.
*/
static int
fddi_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
const struct rtentry *rt)
{
uint16_t etype;
int error = 0, hdrcmplt = 0;
uint8_t esrc[6], edst[6];
struct mbuf *m = m0;
struct fddi_header *fh;
struct mbuf *mcopy = NULL;
struct ifnet *ifp = ifp0;
MCLAIM(m, ifp->if_mowner);
#if NCARP > 0
if (ifp->if_type == IFT_CARP) {
struct ifaddr *ifa;
/* loop back if this is going to the carp interface */
if (dst != NULL && ifp0->if_link_state == LINK_STATE_UP) {
int s = pserialize_read_enter();
ifa = ifa_ifwithaddr(dst);
if (ifa != NULL &&
ifa->ifa_ifp == ifp0) {
pserialize_read_exit(s);
return (looutput(ifp0, m, dst, rt));
}
pserialize_read_exit(s);
}
ifp = ifp->if_carpdev;
/* ac = (struct arpcom *)ifp; */
if ((ifp0->if_flags & (IFF_UP|IFF_RUNNING)) !=
(IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
}
#endif /* NCARP > 0 */
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
/*
* If the queueing discipline needs packet classification,
* do it before prepending link headers.
*/
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
switch (dst->sa_family) {
#ifdef INET
case AF_INET: {
if (m->m_flags & M_BCAST)
memcpy(edst, fddibroadcastaddr, sizeof(edst));
else if (m->m_flags & M_MCAST) {
ETHER_MAP_IP_MULTICAST(&satocsin(dst)->sin_addr,
(char *)edst);
} else if ((error = arpresolve(ifp, rt, m, dst, edst,
sizeof(edst))) != 0)
return error == EWOULDBLOCK ? 0 : error;
/* If broadcasting on a simplex interface, loopback a copy */
if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
mcopy = m_copypacket(m, M_DONTWAIT);
etype = htons(ETHERTYPE_IP);
break;
}
#endif
#ifdef INET6
case AF_INET6:
if (m->m_flags & M_BCAST)
(void)memcpy(edst, fddibroadcastaddr, sizeof(edst));
else if (m->m_flags & M_MCAST) {
ETHER_MAP_IPV6_MULTICAST(&satocsin6(dst)->sin6_addr,
edst);
} else {
error = nd6_resolve(ifp, rt, m, dst, edst,
sizeof(edst));
if (error != 0) {
error = error == EWOULDBLOCK ? 0 : error;
return error;
}
}
etype = htons(ETHERTYPE_IPV6);
break;
#endif
#ifdef AF_ARP
case AF_ARP: {
struct arphdr *ah = mtod(m, struct arphdr *);
if (m->m_flags & M_BCAST)
memcpy(edst, etherbroadcastaddr, sizeof(edst));
else {
void *tha = ar_tha(ah);
if (tha == NULL) {
m_freem(m);
return 0;
}
memcpy(edst, tha, sizeof(edst));
}
ah->ar_hrd = htons(ARPHRD_ETHER);
switch (ntohs(ah->ar_op)) {
case ARPOP_REVREQUEST:
case ARPOP_REVREPLY:
etype = htons(ETHERTYPE_REVARP);
break;
case ARPOP_REQUEST:
case ARPOP_REPLY:
default:
etype = htons(ETHERTYPE_ARP);
}
break;
}
#endif /* AF_ARP */
#ifdef NETATALK
case AF_APPLETALK: {
struct at_ifaddr *aa;
struct ifaddr *ifa;
int s;
if (!aarpresolve(ifp, m, (const struct sockaddr_at *)dst, edst)) {
#ifdef NETATALKDEBUG
printf("aarpresolv: failed\n");
#endif
return (0);
}
/*
* ifaddr is the first thing in at_ifaddr
*/
s = pserialize_read_enter();
ifa = at_ifawithnet((const struct sockaddr_at *)dst, ifp);
if (ifa == NULL) {
pserialize_read_exit(s);
goto bad;
}
aa = (struct at_ifaddr *)ifa;
/*
* In the phase 2 case, we need to prepend an mbuf for the llc
* header.
*
* XXX XXX: Do we need to preserve the value of m?
*/
if (aa->aa_flags & AFA_PHASE2) {
struct llc llc;
M_PREPEND(m, sizeof(struct llc), M_NOWAIT);
if (m == NULL) {
pserialize_read_exit(s);
senderr(ENOBUFS);
}
llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
llc.llc_control = LLC_UI;
memcpy(llc.llc_snap_org_code, at_org_code,
sizeof(at_org_code));
llc.llc_snap_ether_type = htons(ETHERTYPE_ATALK);
memcpy(mtod(m, void *), &llc, sizeof(struct llc));
etype = 0;
} else {
etype = htons(ETHERTYPE_ATALK);
}
pserialize_read_exit(s);
break;
}
#endif /* NETATALK */
case pseudo_AF_HDRCMPLT:
{
const struct fddi_header *fh1 =
(const struct fddi_header *)dst->sa_data;
hdrcmplt = 1;
memcpy(esrc, fh1->fddi_shost, sizeof (esrc));
/*FALLTHROUGH*/
}
/*FALLTHROUGH*/
case AF_LINK:
{
const struct fddi_header *fh1 =
(const struct fddi_header *)dst->sa_data;
memcpy(edst, fh1->fddi_dhost, sizeof (edst));
if (*edst & 1)
m->m_flags |= (M_BCAST|M_MCAST);
etype = 0;
break;
}
case AF_UNSPEC:
{
const struct ether_header *eh;
eh = (const struct ether_header *)dst->sa_data;
memcpy(edst, eh->ether_dhost, sizeof(edst));
if (*edst & 1)
m->m_flags |= (M_BCAST|M_MCAST);
etype = eh->ether_type;
break;
}
default:
printf("%s: can't handle af%d\n", ifp->if_xname,
dst->sa_family);
senderr(EAFNOSUPPORT);
}
if (mcopy)
(void) looutput(ifp, mcopy, dst, rt);
if (etype != 0) {
struct llc *l;
M_PREPEND(m, sizeof (struct llc), M_DONTWAIT);
if (m == 0)
senderr(ENOBUFS);
l = mtod(m, struct llc *);
l->llc_control = LLC_UI;
l->llc_dsap = l->llc_ssap = LLC_SNAP_LSAP;
l->llc_snap.org_code[0] = l->llc_snap.org_code[1] = l->llc_snap.org_code[2] = 0;
memcpy(&l->llc_snap.ether_type, &etype, sizeof(uint16_t));
}
/*
* Add local net header. If no space in first mbuf,
* allocate another.
*/
M_PREPEND(m, sizeof (struct fddi_header), M_DONTWAIT);
if (m == 0)
senderr(ENOBUFS);
fh = mtod(m, struct fddi_header *);
fh->fddi_fc = FDDIFC_LLC_ASYNC|FDDIFC_LLC_PRIO4;
memcpy(fh->fddi_dhost, edst, sizeof (edst));
if (hdrcmplt)
memcpy(fh->fddi_shost, esrc, sizeof(fh->fddi_shost));
else
memcpy(fh->fddi_shost, CFDDIADDR(ifp), sizeof(fh->fddi_shost));
#if NCARP > 0
if (ifp0 != ifp && ifp0->if_type == IFT_CARP) {
if_set_sadl(ifp0, fh->fddi_shost, sizeof(fh->fddi_shost),
false);
}
if (ifp != ifp0)
ifp0->if_obytes += m->m_pkthdr.len;
#endif /* NCARP > 0 */
return ifq_enqueue(ifp, m);
bad:
if (m)
m_freem(m);
return (error);
}
/*
* Process a received FDDI packet;
* the packet is in the mbuf chain m with
* the fddi header.
*/
static void
fddi_input(struct ifnet *ifp, struct mbuf *m)
{
#if defined(INET) || defined(INET6)
pktqueue_t *pktq = NULL;
#endif
#if defined(NETATALK)
struct ifqueue *inq = NULL;
int isr = 0;
#endif
struct llc *l;
struct fddi_header *fh;
MCLAIM(m, &((struct ethercom *)ifp)->ec_rx_mowner);
if ((ifp->if_flags & IFF_UP) == 0) {
m_freem(m);
return;
}
fh = mtod(m, struct fddi_header *);
ifp->if_ibytes += m->m_pkthdr.len;
if (fh->fddi_dhost[0] & 1) {
if (memcmp(fddibroadcastaddr, fh->fddi_dhost,
sizeof(fddibroadcastaddr)) == 0)
m->m_flags |= M_BCAST;
else
m->m_flags |= M_MCAST;
ifp->if_imcasts++;
} else if ((ifp->if_flags & IFF_PROMISC)
&& memcmp(CFDDIADDR(ifp), (void *)fh->fddi_dhost,
sizeof(fh->fddi_dhost)) != 0) {
m_freem(m);
return;
}
#ifdef M_LINK0
/*
* If this has a LLC priority of 0, then mark it so upper
* layers have a hint that it really came via a FDDI/Ethernet
* bridge.
*/
if ((fh->fddi_fc & FDDIFC_LLC_PRIO7) == FDDIFC_LLC_PRIO0)
m->m_flags |= M_LINK0;
#endif
l = (struct llc *)(fh+1);
switch (l->llc_dsap) {
#if defined(INET) || defined(INET6) || defined(NETATALK)
case LLC_SNAP_LSAP:
{
uint16_t etype;
if (l->llc_control != LLC_UI || l->llc_ssap != LLC_SNAP_LSAP)
goto dropanyway;
/* Strip off the FDDI header. */
m_adj(m, sizeof(struct fddi_header));
#ifdef NETATALK
if (memcmp(&(l->llc_snap_org_code)[0], at_org_code,
sizeof(at_org_code)) == 0 &&
ntohs(l->llc_snap_ether_type) == ETHERTYPE_ATALK) {
inq = &atintrq2;
m_adj( m, sizeof( struct llc ));
isr = NETISR_ATALK;
break;
}
if (memcmp(&(l->llc_snap_org_code)[0], aarp_org_code,
sizeof(aarp_org_code)) == 0 &&
ntohs(l->llc_snap_ether_type) == ETHERTYPE_AARP) {
m_adj( m, sizeof( struct llc ));
aarpinput(ifp, m); /* XXX */
return;
}
#endif /* NETATALK */
if (l->llc_snap.org_code[0] != 0 || l->llc_snap.org_code[1] != 0|| l->llc_snap.org_code[2] != 0)
goto dropanyway;
etype = ntohs(l->llc_snap.ether_type);
m_adj(m, 8);
#if NCARP > 0
if (ifp->if_carp && ifp->if_type != IFT_CARP &&
(carp_input(m, (uint8_t *)&fh->fddi_shost,
(uint8_t *)&fh->fddi_dhost, l->llc_snap.ether_type) == 0))
return;
#endif
switch (etype) {
#ifdef INET
case ETHERTYPE_IP:
#ifdef GATEWAY
if (ipflow_fastforward(m))
return;
#endif
pktq = ip_pktq;
break;
case ETHERTYPE_ARP:
#if !defined(__bsdi__) || _BSDI_VERSION >= 199401
#if defined(NETATALK)
isr = NETISR_ARP;
inq = &arpintrq;
#endif
break;
#else
arpinput(ifp, m);
return;
#endif
#endif
#ifdef INET6
case ETHERTYPE_IPV6:
#ifdef GATEWAY
if (ip6flow_fastforward(&m))
return;
#endif
pktq = ip6_pktq;
break;
#endif
#ifdef NETATALK
case ETHERTYPE_ATALK:
isr = NETISR_ATALK;
inq = &atintrq1;
break;
case ETHERTYPE_AARP:
/* probably this should be done with a NETISR as well */
aarpinput(ifp, m); /* XXX */
return;
#endif /* NETATALK */
default:
ifp->if_noproto++;
goto dropanyway;
}
break;
}
#endif /* INET || NS */
default:
ifp->if_noproto++;
#if defined(INET) || defined(INET6) || defined(NETATALK)
dropanyway:
#endif
m_freem(m);
return;
}
#if defined(INET) || defined(INET6)
if (__predict_true(pktq)) {
if (__predict_false(!pktq_enqueue(pktq, m, 0))) {
m_freem(m);
}
return;
}
#endif
#if defined(NETATALK)
if (inq == NULL) {
m_freem(m);
return;
}
IFQ_LOCK(inq);
if (IF_QFULL(inq)) {
IF_DROP(inq);
IFQ_UNLOCK(inq);
m_freem(m);
} else {
IF_ENQUEUE(inq, m);
IFQ_UNLOCK(inq);
schednetisr(isr);
}
#endif
}
/*
* Perform common duties while attaching to interface list
*/
void
fddi_ifattach(struct ifnet *ifp, void *lla)
{
struct ethercom *ec = (struct ethercom *)ifp;
ifp->if_type = IFT_FDDI;
ifp->if_hdrlen = 21;
ifp->if_dlt = DLT_FDDI;
ifp->if_mtu = FDDIMTU;
ifp->if_output = fddi_output;
ifp->_if_input = fddi_input;
ifp->if_baudrate = IF_Mbps(100);
/*
* Update the max_linkhdr
*/
if (ALIGN(ifp->if_hdrlen) > max_linkhdr)
max_linkhdr = ALIGN(ifp->if_hdrlen);
LIST_INIT(&ec->ec_multiaddrs);
if_set_sadl(ifp, lla, 6, true);
ifp->if_broadcastaddr = fddibroadcastaddr;
bpf_attach(ifp, DLT_FDDI, sizeof(struct fddi_header));
#ifdef MBUFTRACE
strlcpy(ec->ec_tx_mowner.mo_name, ifp->if_xname,
sizeof(ec->ec_tx_mowner.mo_name));
strlcpy(ec->ec_tx_mowner.mo_descr, "tx",
sizeof(ec->ec_tx_mowner.mo_descr));
strlcpy(ec->ec_rx_mowner.mo_name, ifp->if_xname,
sizeof(ec->ec_rx_mowner.mo_name));
strlcpy(ec->ec_rx_mowner.mo_descr, "rx",
sizeof(ec->ec_rx_mowner.mo_descr));
MOWNER_ATTACH(&ec->ec_tx_mowner);
MOWNER_ATTACH(&ec->ec_rx_mowner);
ifp->if_mowner = &ec->ec_tx_mowner;
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arp.c,v 1.290 2020/01/19 20:00:37 thorpej Exp $ */
/* $NetBSD: if_arp.c,v 1.291 2020/01/20 18:38:22 thorpej Exp $ */
/*
* Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.290 2020/01/19 20:00:37 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.291 2020/01/20 18:38:22 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@ -121,10 +121,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.290 2020/01/19 20:00:37 thorpej Exp $")
#if NARCNET > 0
#include <net/if_arc.h>
#endif
#include "fddi.h"
#if NFDDI > 0
#include <net/if_fddi.h>
#endif
#include "carp.h"
#if NCARP > 0
#include <netinet/ip_carp.h>
@ -436,12 +432,6 @@ arp_rtrequest(int req, struct rtentry *rt, const struct rt_addrinfo *info)
* linklayers with particular link MTU limitation.
*/
switch(ifp->if_type) {
#if NFDDI > 0
case IFT_FDDI:
if (ifp->if_mtu > FDDIIPMTU)
rt->rt_rmx.rmx_mtu = FDDIIPMTU;
break;
#endif
#if NARCNET > 0
case IFT_ARCNET:
{
@ -483,15 +473,6 @@ arp_rtrequest(int req, struct rtentry *rt, const struct rt_addrinfo *info)
* linklayers with particular link MTU limitation.
*/
switch (ifp->if_type) {
#if NFDDI > 0
case IFT_FDDI:
if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0 &&
(rt->rt_rmx.rmx_mtu > FDDIIPMTU ||
(rt->rt_rmx.rmx_mtu == 0 &&
ifp->if_mtu > FDDIIPMTU)))
rt->rt_rmx.rmx_mtu = FDDIIPMTU;
break;
#endif
#if NARCNET > 0
case IFT_ARCNET:
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_carp.c,v 1.106 2020/01/19 20:00:37 thorpej Exp $ */
/* $NetBSD: ip_carp.c,v 1.107 2020/01/20 18:38:22 thorpej Exp $ */
/* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */
/*
@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.106 2020/01/19 20:00:37 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.107 2020/01/20 18:38:22 thorpej Exp $");
/*
* TODO:
@ -74,10 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.106 2020/01/19 20:00:37 thorpej Exp $"
#include <netinet/if_inarp.h>
#include <netinet/wqinput.h>
#if NFDDI > 0
#include <net/if_fddi.h>
#endif
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6.c,v 1.276 2019/09/25 09:53:38 ozaki-r Exp $ */
/* $NetBSD: in6.c,v 1.277 2020/01/20 18:38:22 thorpej Exp $ */
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
/*
@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.276 2019/09/25 09:53:38 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.277 2020/01/20 18:38:22 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -2395,8 +2395,6 @@ in6_if2idlen(struct ifnet *ifp)
case IFT_PROPVIRTUAL: /* XXX: no RFC. treat it as ether */
case IFT_L2VLAN: /* ditto */
case IFT_IEEE80211: /* ditto */
case IFT_FDDI: /* RFC2467 */
case IFT_ISO88025: /* RFC2470 (IPv6 over Token Ring) */
case IFT_PPP: /* RFC2472 */
case IFT_ARCNET: /* RFC2497 */
case IFT_FRELAY: /* RFC2590 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6_ifattach.c,v 1.117 2019/10/18 04:33:53 ozaki-r Exp $ */
/* $NetBSD: in6_ifattach.c,v 1.118 2020/01/20 18:38:22 thorpej Exp $ */
/* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.117 2019/10/18 04:33:53 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.118 2020/01/20 18:38:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -364,7 +364,6 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6)
switch (ifp->if_type) {
/* IEEE802/EUI64 cases - what others? */
case IFT_ETHER:
case IFT_FDDI:
case IFT_ATM:
case IFT_IEEE1394:
case IFT_IEEE80211:

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6.c,v 1.265 2019/09/25 09:53:38 ozaki-r Exp $ */
/* $NetBSD: nd6.c,v 1.266 2020/01/20 18:38:22 thorpej Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.265 2019/09/25 09:53:38 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.266 2020/01/20 18:38:22 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@ -63,7 +63,6 @@ __KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.265 2019/09/25 09:53:38 ozaki-r Exp $");
#include <net/if_types.h>
#include <net/route.h>
#include <net/if_ether.h>
#include <net/if_fddi.h>
#include <net/if_arc.h>
#include <netinet/in.h>
@ -222,9 +221,6 @@ nd6_setmtu0(struct ifnet *ifp, struct nd_ifinfo *ndi)
case IFT_ARCNET:
ndi->maxmtu = MIN(ARC_PHDS_MAXMTU, ifp->if_mtu); /* RFC2497 */
break;
case IFT_FDDI:
ndi->maxmtu = MIN(FDDIIPMTU, ifp->if_mtu);
break;
default:
ndi->maxmtu = ifp->if_mtu;
break;
@ -2482,7 +2478,7 @@ nd6_need_cache(struct ifnet *ifp)
{
/*
* XXX: we currently do not make neighbor cache on any interface
* other than ARCnet, Ethernet, FDDI and GIF.
* other than ARCnet, Ethernet, and GIF.
*
* RFC2893 says:
* - unidirectional tunnels needs no ND
@ -2490,7 +2486,6 @@ nd6_need_cache(struct ifnet *ifp)
switch (ifp->if_type) {
case IFT_ARCNET:
case IFT_ETHER:
case IFT_FDDI:
case IFT_IEEE1394:
case IFT_CARP:
case IFT_GIF: /* XXX need more cases? */

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6_nbr.c,v 1.175 2019/11/13 02:51:22 ozaki-r Exp $ */
/* $NetBSD: nd6_nbr.c,v 1.176 2020/01/20 18:38:22 thorpej Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.175 2019/11/13 02:51:22 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.176 2020/01/20 18:38:22 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -1089,7 +1089,6 @@ nd6_ifptomac(const struct ifnet *ifp)
switch (ifp->if_type) {
case IFT_ARCNET:
case IFT_ETHER:
case IFT_FDDI:
case IFT_IEEE1394:
case IFT_PROPVIRTUAL:
case IFT_CARP:
@ -1461,7 +1460,6 @@ nd6_dad_duplicated(struct ifaddr *ifa, struct dadq *dp,
*/
switch (ifp->if_type) {
case IFT_ETHER:
case IFT_FDDI:
case IFT_ATM:
case IFT_IEEE1394:
case IFT_IEEE80211: