Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha if_ade doesn't build, suggesting nobody has t...



details:   https://anonhg.NetBSD.org/src/rev/bec5263f3ad8
branches:  trunk
changeset: 750906:bec5263f3ad8
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Jan 18 17:53:35 2010 +0000

description:
if_ade doesn't build, suggesting nobody has tried to do anything
else than rototill it for the past n+1 years.  The comments at the
top note a number of clauses after which it can be removed.  I'm
sure that in the past 10+ years those have either been met or become
irrelevant, so remove this.

diffstat:

 sys/arch/alpha/a12/if_ade.c     |  5350 ---------------------------------------
 sys/arch/alpha/a12/if_adevar.h  |  1016 -------
 sys/arch/alpha/conf/files.alpha |     9 +-
 3 files changed, 1 insertions(+), 6374 deletions(-)

diffs (truncated from 6397 to 300 lines):

diff -r 42510e16a70d -r bec5263f3ad8 sys/arch/alpha/a12/if_ade.c
--- a/sys/arch/alpha/a12/if_ade.c       Mon Jan 18 17:34:37 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,5350 +0,0 @@
-/*     $NetBSD: if_ade.c,v 1.36 2009/03/18 16:00:09 cegger Exp $       */
-
-/*
- * NOTE: this version of if_de was modified for bounce buffers prior
- * to the introduction of bus_dma to netbsd. When a busified if_de
- * is available and the a12 platform bus_dma is complete, then this
- * module will be taken for a long walk on a short pier.
- */
-
-/* [Notice revision 2.0]
- * Copyright (c) 1997 Avalon Computer Systems, Inc.
- * All rights reserved.
- *
- * Author: Ross Harvey
- *
- * 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 and
- *    author 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 Avalon Computer Systems, Inc. nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- * 4. This copyright will be assigned to The NetBSD Foundation on
- *    1/1/2000 unless these terms (including possibly the assignment
- *    date) are updated in writing by Avalon prior to the latest specified
- *    assignment date.
- *
- * THIS SOFTWARE IS PROVIDED BY AVALON COMPUTER SYSTEMS, 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.
- */
-/*-
- * Copyright (c) 1994-1997 Matt Thomas (matt%3am-software.com@localhost)
- * 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_de.c,v 1.83 1997/03/25 21:12:17 thomas Exp
- *
- */
-
-/*
- * DEC 21040 PCI Ethernet Controller
- *
- * Written by Matt Thomas
- * BPF support code stolen directly from if_ec.c
- *
- *   This driver supports the DEC DE435 or any other PCI
- *   board which support 21040, 21041, or 21140 (mostly).
- */
-#define        TULIP_HDR_DATA
-#define        LCLDMA 1
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ade.c,v 1.36 2009/03/18 16:00:09 cegger Exp $");
-
-#include "opt_inet.h"
-#include "opt_ns.h"
-
-#include <sys/param.h>
-#include <sys/systm.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/kernel.h>
-#include <sys/proc.h>  /* only for declaration of wakeup() used by vm.h */
-#if defined(__FreeBSD__)
-#include <machine/clock.h>
-#elif defined(__bsdi__) || defined(__NetBSD__)
-#include <sys/device.h>
-#endif
-
-#include <net/if.h>
-#include <net/if_media.h>
-#include <net/if_types.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <net/netisr.h>
-
-#if defined(__bsdi__) && _BSDI_VERSION >= 199701
-#include <dev/mii/mii.h>
-#include <dev/mii/miivar.h>
-#endif
-
-#include "bpfilter.h"
-#if NBPFILTER > 0
-#include <net/bpf.h>
-#include <net/bpfdesc.h>
-#endif
-
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#endif
-
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#include <uvm/uvm_extern.h>
-
-#if defined(__FreeBSD__)
-#include <vm/pmap.h>
-#include <pci.h>
-#include <netinet/if_ether.h>
-#if NPCI > 0
-#include <pci/pcivar.h>
-#include <pci/dc21040.h>
-#define        DEVAR_INCLUDE   "pci/if_devar.h"
-#endif
-#endif /* __FreeBSD__ */
-
-#if defined(__bsdi__)
-#include <netinet/if_ether.h>
-#include <i386/pci/ic/dc21040.h>
-#include <i386/isa/isa.h>
-#include <i386/isa/icu.h>
-#include <i386/isa/dma.h>
-#include <i386/isa/isavar.h>
-#include <i386/pci/pci.h>
-#if _BSDI_VERSION < 199510
-#include <eisa.h>
-#else
-#define        NEISA 0
-#endif
-#if NEISA > 0 && _BSDI_VERSION >= 199401
-#include <i386/eisa/eisa.h>
-#define        TULIP_EISA
-#endif
-#define        DEVAR_INCLUDE   "i386/pci/if_devar.h"
-#endif /* __bsdi__ */
-
-#if defined(__NetBSD__)
-#include <net/if_ether.h>
-#if defined(INET)
-#include <netinet/if_inarp.h>
-#endif
-#include <machine/bus.h>
-#if defined(__alpha__)
-#include <machine/intr.h>
-#endif
-#include <dev/pci/pcireg.h>
-#include <dev/pci/pcivar.h>
-#include <dev/ic/dc21040reg.h>
-#endif /* __NetBSD__ */
-
-/*
- * Intel CPUs should use I/O mapped access.
- */
-#if defined(__i386__) || defined(TULIP_EISA)
-#define        TULIP_IOMAPPED
-#endif
-
-#if 0
-/*
- * This turns on all sort of debugging stuff and make the
- * driver much larger.
- */
-#define TULIP_DEBUG
-#endif
-
-#if 0
-#define        TULIP_USE_SOFTINTR
-#endif
-
-#define        TULIP_HZ        10
-
-#include <alpha/a12/if_adevar.h>
-tulip_softc_t * debug_sc;      /* XXX */
-/*
- * This module supports
- *     the DEC 21040 PCI Ethernet Controller.
- *     the DEC 21041 PCI Ethernet Controller.
- *     the DEC 21140 PCI Fast Ethernet Controller.
- */
-
-static void tulip_mii_autonegotiate(tulip_softc_t * const sc, const unsigned phyaddr);
-static tulip_intrfunc_t tulip_intr_shared(void *arg);
-static tulip_intrfunc_t tulip_intr_normal(void *arg);
-static void tulip_init(tulip_softc_t * const sc);
-static void tulip_reset(tulip_softc_t * const sc);
-static ifnet_ret_t tulip_ifstart(struct ifnet *ifp);
-static void tulip_rx_intr(tulip_softc_t * const sc);
-static void tulip_addr_filter(tulip_softc_t * const sc);
-static unsigned tulip_mii_readreg(tulip_softc_t * const sc, unsigned devaddr, unsigned regno);
-static void tulip_mii_writereg(tulip_softc_t * const sc, unsigned devaddr, unsigned regno, unsigned data);
-static int tulip_mii_map_abilities(tulip_softc_t * const sc, unsigned abilities);
-static tulip_media_t tulip_mii_phy_readspecific(tulip_softc_t * const sc);
-static int tulip_srom_decode(tulip_softc_t * const sc);
-static int tulip_ifmedia_change(struct ifnet * const ifp);
-static void tulip_ifmedia_status(struct ifnet * const ifp, struct ifmediareq *req);
-/* static void tulip_21140_map_media(tulip_softc_t *sc); */
-#ifdef LCLDMA
-static void reset_lcl_dma(tulip_softc_t * const sc);
-static void a12_m_copydata(struct mbuf *m, int off, int len, void *cp);
-static void dumpring(void **);
-/* 
- * Note for LCLDMA mods. These are for systems such as the Avalon
- * A12 that can't DMA to main memory, but instead have an essentially
- * dual-ported local buffer memory.  Other systems with this kind
- * of bus architecture include many of the VAXstation models. Of
- * course, they won't be needing de(4) drivers.
- */
-static void
-donothing(struct mbuf *m, void *buf, size_t size, void *arg)
-{
-
-       if (__predict_true(m != NULL)) {
-               pool_cache_put(mb_cache, m);
-       }
-
-}
-static void a12r2pb(void *vsrc, void *vdst, int len) {
-       long    bounce[9];
-       int     i,
-               offset, /* destination misalignment */
-               t,      /* segment count */
-               llw;    /* last longword index */
-
-       char    *src = vsrc;
-       long    *dst = vdst;
-
-       offset = (long)dst & 7;
-       dst = (long *)((long)dst & ~7L);
-       alpha_wmb();
-       while(len) {
-               t = 64;
-               if(t > len)
-                       t = len;
-               llw = (t+offset) >> 3;
-               if(((t|offset) & 7) == 0 && llw)
-                       --llw;
-               else    bounce[llw] = dst[llw];
-               /*
-                * The whole idea is that llw indexes the first long
-                * that contains at least 1 byte NOT to be overwritten.
-                * If we are an even, aligned transfer, then bump down
-                * llw to avoid an extra load/store to the slow buffer
-                * mem.
-                */
-               if(offset)
-                       bounce[0] = dst[0];
-               memcpy((int8_t *)bounce+offset,src,t);
-               for(i=llw; i>=0; --i) { /* reverse so d_status is last */
-                       alpha_mb();
-                       dst[i] = bounce[i];
-                       alpha_mb();
-               }
-#if 0
-{ static int printcount;
-               if(++printcount<=4) {
-                       for(i=llw; i>=0; --i) {
-                               alpha_mb();
-                               printf("dst[%d]=%16lx@%16lx bounce[%d]=%16lx\n",
-                                       i, dst[i], &dst[i], i, bounce[i]);
-                               alpha_mb();
-                       }
-               }
-}
-#endif
-               dst += 8;



Home | Main Index | Thread Index | Old Index