diff options
| -rw-r--r-- | sys/dev/ic/pdq.c | 70 | ||||
| -rw-r--r-- | sys/dev/ic/pdqreg.h | 31 | ||||
| -rw-r--r-- | sys/dev/ic/pdqvar.h | 44 | ||||
| -rw-r--r-- | sys/dev/pci/if_fpa.c | 60 | ||||
| -rw-r--r-- | sys/net/if_fddi.h | 5 | ||||
| -rw-r--r-- | sys/net/if_fddisubr.c | 43 |
6 files changed, 32 insertions, 221 deletions
diff --git a/sys/dev/ic/pdq.c b/sys/dev/ic/pdq.c index a1f5a3e1ee0..27001b0890a 100644 --- a/sys/dev/ic/pdq.c +++ b/sys/dev/ic/pdq.c @@ -1,3 +1,5 @@ +/* $NetBSD: pdq.c,v 1.2 1995/08/19 04:35:18 cgd Exp $ */ + /*- * Copyright (c) 1995 Matt Thomas (matt@lkg.dec.com) * All rights reserved. @@ -20,70 +22,6 @@ * 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.c,v 1.1.1.1 1995/08/19 00:59:47 cgd Exp $ - * - * $Log: pdq.c,v $ - * Revision 1.1.1.1 1995/08/19 00:59:47 cgd - * Generic FDDI support by Matt Thomas. Support for DEC "PDQ" FDDI chipset - * and for the PCI attachment of said chipset ("if_fpa"), also from Matt Thomas. - * Arguably, pdq* doesn't belong in sys/dev/ic, but it's going to be shared by - * various bus attachment devices at some point in the future, and there's no - * other place that seems to fit as well. - * - * Revision 1.17 1995/08/16 22:57:28 thomas - * Add support for NetBSD - * - * Revision 1.16 1995/08/04 21:54:56 thomas - * Clean IRQ processing under BSD/OS. - * A receive tweaks. (print source of MAC CRC errors, etc.) - * - * Revision 1.15 1995/06/30 23:36:21 thomas - * Optimize fix. - * - * Revision 1.14 1995/06/30 23:35:39 thomas - * Fix severe bug in transmit path (corruption of ring). - * - * Revision 1.13 1995/06/21 18:29:27 thomas - * SVR4.2 changes - * - * Revision 1.12 1995/06/05 23:49:36 thomas - * Fix bonehead error. Don't try to queue a command if there - * is a command. - * - * Revision 1.11 1995/06/03 15:43:26 thomas - * Fix the command submission logic to only submit one - * command at a time no matter what. This simplies the - * code significantly thereby allowing us to do some up - * front optimizations. - * - * Revision 1.10 1995/06/02 22:18:34 thomas - * Don't know why but on some motherboards, the PDQ just can't - * multiple outstanding commands. - * - * Revision 1.9 1995/04/20 20:17:33 thomas - * Add PCI support for BSD/OS. - * Fix BSD/OS EISA support. - * Set latency timer for DEFPA to recommended value if 0. - * - * Revision 1.8 1995/03/14 01:52:52 thomas - * Update for new FreeBSD PCI Interrupt interface - * - * Revision 1.7 1995/03/07 23:03:16 thomas - * Fix SMT queue processing - * - * Revision 1.6 1995/03/06 18:03:47 thomas - * restart trasmitter once link is available - * - * Revision 1.5 1995/03/06 17:07:56 thomas - * Add copyright/disclaimer - * Add error recovery code. - * Add BPF SMT support - * - * Revision 1.3 1995/03/03 13:48:35 thomas - * more fixes - * - * */ /* @@ -100,7 +38,11 @@ #define PDQ_HWSUPPORT /* for pdq.h */ #include "pdqreg.h" +#ifndef __NetBSD__ #include "pdq_os.h" +#else +#include "pdqvar.h" +#endif #define PDQ_ROUNDUP(n, x) (((n) + ((x) - 1)) & ~((x) - 1)) #define PDQ_CMD_RX_ALIGNMENT 16 diff --git a/sys/dev/ic/pdqreg.h b/sys/dev/ic/pdqreg.h index 5d8eaa31dfa..71ce819e348 100644 --- a/sys/dev/ic/pdqreg.h +++ b/sys/dev/ic/pdqreg.h @@ -1,3 +1,5 @@ +/* $NetBSD: pdqreg.h,v 1.2 1995/08/19 04:35:21 cgd Exp $ */ + /*- * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com) * All rights reserved. @@ -20,41 +22,12 @@ * 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: pdqreg.h,v 1.1.1.1 1995/08/19 00:59:47 cgd Exp $ - * - * $Log: pdqreg.h,v $ - * Revision 1.1.1.1 1995/08/19 00:59:47 cgd - * Generic FDDI support by Matt Thomas. Support for DEC "PDQ" FDDI chipset - * and for the PCI attachment of said chipset ("if_fpa"), also from Matt Thomas. - * Arguably, pdq* doesn't belong in sys/dev/ic, but it's going to be shared by - * various bus attachment devices at some point in the future, and there's no - * other place that seems to fit as well. - * - * Revision 1.6 1995/06/03 15:43:26 thomas - * Fix the command submission logic to only submit one - * command at a time no matter what. This simplies the - * code significantly thereby allowing us to do some up - * front optimizations. - * - * Revision 1.5 1995/03/10 17:41:55 thomas - * Add DEFTA, DEFQA, and DEFAA - * - * Revision 1.4 1995/03/06 17:07:05 thomas - * Add copyright/disclaimer - * Add EISA register definitions - * - * Revision 1.3 1995/03/03 13:48:35 thomas - * more fixes - * - * */ /* * DEC PDQ FDDI Controller; PDQ port driver definitions * * Written by Matt Thomas - * */ #ifndef _PDQREG_H diff --git a/sys/dev/ic/pdqvar.h b/sys/dev/ic/pdqvar.h index 1d77366191e..4f4c85901dc 100644 --- a/sys/dev/ic/pdqvar.h +++ b/sys/dev/ic/pdqvar.h @@ -1,3 +1,5 @@ +/* $NetBSD: pdqvar.h,v 1.2 1995/08/19 04:35:22 cgd Exp $ */ + /*- * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com) * All rights reserved. @@ -20,53 +22,12 @@ * 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.1.1.1 1995/08/19 00:59:48 cgd Exp $ - * - * $Log: pdqvar.h,v $ - * Revision 1.1.1.1 1995/08/19 00:59:48 cgd - * Generic FDDI support by Matt Thomas. Support for DEC "PDQ" FDDI chipset - * and for the PCI attachment of said chipset ("if_fpa"), also from Matt Thomas. - * Arguably, pdq* doesn't belong in sys/dev/ic, but it's going to be shared by - * various bus attachment devices at some point in the future, and there's no - * other place that seems to fit as well. - * - * Revision 1.10 1995/08/16 22:57:28 thomas - * Add support for NetBSD - * - * Revision 1.9 1995/06/21 18:29:27 thomas - * SVR4.2 changes - * - * Revision 1.8 1995/06/12 17:49:37 thomas - * Add SVR4.2 support - * - * Revision 1.7 1995/04/20 20:17:33 thomas - * Add PCI support for BSD/OS. - * Fix BSD/OS EISA support. - * Set latency timer for DEFPA to recommended value if 0. - * - * Revision 1.6 1995/03/14 01:52:52 thomas - * Update for new FreeBSD PCI Interrupt interface - * Use inl/inb/... inline macros provided by FreeBSD and BSDI - * - * Revision 1.5 1995/03/10 17:42:24 thomas - * More changes for BSDI - * - * Revision 1.4 1995/03/06 17:08:56 thomas - * Add copyright/disclaimer - * Add inx/outx macros - * - * Revision 1.3 1995/03/03 13:48:35 thomas - * more fixes - * - * */ /* * DEC PDQ FDDI Controller; PDQ O/S dependent definitions * * Written by Matt Thomas - * */ #ifndef _PDQ_OS_H @@ -288,5 +249,4 @@ extern void pdq_run(pdq_t *pdq); extern int pdq_interrupt(pdq_t *pdq); extern pdq_t *pdq_initialize(void *csr_va, const char *name, int unit, void *ctx, pdq_type_t type); - #endif /* _PDQ_OS_H */ diff --git a/sys/dev/pci/if_fpa.c b/sys/dev/pci/if_fpa.c index 4f05b2db277..ed19d4ee39b 100644 --- a/sys/dev/pci/if_fpa.c +++ b/sys/dev/pci/if_fpa.c @@ -1,3 +1,5 @@ +/* $NetBSD: if_fpa.c,v 1.2 1995/08/19 04:35:25 cgd Exp $ */ + /*- * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com) * All rights reserved. @@ -20,62 +22,6 @@ * 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.1.1.1 1995/08/19 00:59:48 cgd Exp $ - * - * $Log: if_fpa.c,v $ - * Revision 1.1.1.1 1995/08/19 00:59:48 cgd - * Generic FDDI support by Matt Thomas. Support for DEC "PDQ" FDDI chipset - * and for the PCI attachment of said chipset ("if_fpa"), also from Matt Thomas. - * Arguably, pdq* doesn't belong in sys/dev/ic, but it's going to be shared by - * various bus attachment devices at some point in the future, and there's no - * other place that seems to fit as well. - * - * Revision 1.1 1995/08/16 22:57:28 thomas - * Initial revision - * - * Revision 1.13 1995/08/04 21:54:56 thomas - * Clean IRQ processing under BSD/OS. - * A receive tweaks. (print source of MAC CRC errors, etc.) - * - * Revision 1.12 1995/06/02 16:04:22 thomas - * Use correct PCI defs for BSDI now that they have fixed them. - * Increment the slot number 0x1000, not one! (*duh*) - * - * Revision 1.11 1995/04/21 13:23:55 thomas - * Fix a few pub in the DEFPA BSDI support - * - * Revision 1.10 1995/04/20 21:46:42 thomas - * Why??? - * , - * - * Revision 1.9 1995/04/20 20:17:33 thomas - * Add PCI support for BSD/OS. - * Fix BSD/OS EISA support. - * Set latency timer for DEFPA to recommended value if 0. - * - * Revision 1.8 1995/04/04 22:54:29 thomas - * Fix DEFEA support - * - * Revision 1.7 1995/03/14 01:52:52 thomas - * Update for new FreeBSD PCI Interrupt interface - * - * Revision 1.6 1995/03/10 17:06:59 thomas - * Update for latest version of FreeBSD. - * Compensate for the fast that the ifp will not be first thing - * in softc on BSDI. - * - * Revision 1.5 1995/03/07 19:59:42 thomas - * First pass at BSDI EISA support - * - * Revision 1.4 1995/03/06 17:06:03 thomas - * Add transmit timeout support. - * Add support DEFEA (untested). - * - * Revision 1.3 1995/03/03 13:48:35 thomas - * more fixes - * - * */ /* @@ -140,7 +86,7 @@ #elif defined(__NetBSD__) #include <dev/pci/pcivar.h> #include <dev/ic/pdqreg.h> -#include <dev/ic/pdq_os.h> +#include <dev/ic/pdqvar.h> #endif /* __NetBSD__ */ diff --git a/sys/net/if_fddi.h b/sys/net/if_fddi.h index c398fa73cf6..a61e4fc466c 100644 --- a/sys/net/if_fddi.h +++ b/sys/net/if_fddi.h @@ -1,3 +1,5 @@ +/* $NetBSD: if_fddi.h,v 1.2 1995/08/19 04:35:28 cgd Exp $ */ + /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -31,7 +33,6 @@ * SUCH DAMAGE. * * @(#)if_fddi.h 8.1 (Berkeley) 6/10/93 - * $Id: if_fddi.h,v 1.1.1.1 1995/08/19 00:59:47 cgd Exp $ */ #ifndef _NETINET_IF_FDDI_H_ @@ -66,7 +67,7 @@ struct fddi_header { #define FDDIFC_LLC_SYNC 0xd0 #define FDDIFC_SMT 0x40 -#if defined(KERNEL) || defined(_KERNEL) +#if defined(_KERNEL) #define fddibroadcastaddr etherbroadcastaddr #define fddi_ipmulticast_min ether_ipmulticast_min #define fddi_ipmulticast_max ether_ipmulticast_max diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index cbc187fcfa2..4da82a76661 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -1,3 +1,5 @@ +/* $NetBSD: if_fddisubr.c,v 1.2 1995/08/19 04:35:29 cgd Exp $ */ + /* * Copyright (c) 1995 * Matt Thomas. All rights reserved. @@ -33,25 +35,6 @@ * SUCH DAMAGE. * * @(#)if_fddisubr.c 8.1 (Berkeley) 6/10/93 - * - * $Id: if_fddisubr.c,v 1.1.1.1 1995/08/19 00:59:47 cgd Exp $ - * $Log: if_fddisubr.c,v $ - * Revision 1.1.1.1 1995/08/19 00:59:47 cgd - * Generic FDDI support by Matt Thomas. Support for DEC "PDQ" FDDI chipset - * and for the PCI attachment of said chipset ("if_fpa"), also from Matt Thomas. - * Arguably, pdq* doesn't belong in sys/dev/ic, but it's going to be shared by - * various bus attachment devices at some point in the future, and there's no - * other place that seems to fit as well. - * - * Revision 1.8 1995/08/16 22:57:28 thomas - * Add support for NetBSD - * - * Revision 1.7 1995/04/20 20:17:33 thomas - * fix typo - * - * Revision 1.6 1995/04/20 19:21:58 thomas - * *** empty log message *** - * */ #include <sys/param.h> @@ -404,6 +387,7 @@ fddi_input(ifp, fh, m) { register struct ifqueue *inq; register struct llc *l; + struct arpcom *ac = (struct arpcom *)ifp; int s; if ((ifp->if_flags & IFF_UP) == 0) { @@ -501,7 +485,7 @@ fddi_input(ifp, fh, m) case LLC_TEST_P: { struct sockaddr sa; - register struct ether_header *eh2; + register struct ether_header *eh; int i; u_char c = l->llc_dsap; @@ -509,17 +493,17 @@ fddi_input(ifp, fh, m) l->llc_ssap = c; if (m->m_flags & (M_BCAST | M_MCAST)) bcopy((caddr_t)ac->ac_enaddr, - (caddr_t)eh->ether_dhost, 6); + (caddr_t)fh->fddi_dhost, 6); sa.sa_family = AF_UNSPEC; sa.sa_len = sizeof(sa); - eh2 = (struct ether_header *)sa.sa_data; + eh = (struct ether_header *)sa.sa_data; for (i = 0; i < 6; i++) { - eh2->ether_shost[i] = c = eh->fddi_dhost[i]; - eh2->ether_dhost[i] = - eh->ether_dhost[i] = eh->fddi_shost[i]; - eh2->ether_shost[i] = c; + eh->ether_shost[i] = c = fh->fddi_dhost[i]; + eh->ether_dhost[i] = + eh->ether_dhost[i] = fh->fddi_shost[i]; + eh->ether_shost[i] = c; } - eh2->ether_type = 0; + eh->ether_type = 0; ifp->if_output(ifp, m, &sa, NULL); return; } @@ -579,7 +563,12 @@ fddi_ifattach(ifp) ifp->if_addrlen = 6; ifp->if_hdrlen = 21; ifp->if_mtu = FDDIMTU; +#ifdef __NetBSD__ + for (ifa = ifp->if_addrlist.tqh_first; ifa != 0; + ifa = ifa->ifa_list.tqe_next) +#else for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) +#endif if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) && sdl->sdl_family == AF_LINK) { sdl->sdl_type = IFT_FDDI; |
