Fix so that these files compile again after recent ARP changes.
This commit is contained in:
parent
12c25bea6a
commit
400a0d512e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_de.c,v 1.26 1997/03/15 18:11:10 is Exp $ */
|
||||
/* $NetBSD: if_de.c,v 1.27 1997/04/19 15:02:29 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989 Regents of the University of California.
|
||||
|
@ -61,6 +61,7 @@
|
|||
|
||||
#include <net/if.h>
|
||||
#include <net/if_ether.h>
|
||||
#include <net/if_dl.h>
|
||||
|
||||
#ifdef INET
|
||||
#include <netinet/in.h>
|
||||
|
@ -89,8 +90,8 @@ extern char all_es_snpa[], all_is_snpa[];
|
|||
#include <vax/uba/ubareg.h>
|
||||
#include <vax/uba/ubavar.h>
|
||||
|
||||
#define NXMT 3 /* number of transmit buffers */
|
||||
#define NRCV 7 /* number of receive buffers (must be > 1) */
|
||||
#define NXMT 3 /* number of transmit buffers */
|
||||
#define NRCV 7 /* number of receive buffers (must be > 1) */
|
||||
|
||||
int dedebug = 0;
|
||||
|
||||
|
@ -110,28 +111,28 @@ struct de_softc {
|
|||
struct device ds_dev; /* Configuration common part */
|
||||
struct ethercom ds_ec; /* Ethernet common part */
|
||||
struct dedevice *ds_vaddr; /* Virtual address of this interface */
|
||||
#define ds_if ds_ec.ec_if /* network-visible interface */
|
||||
#define ds_if ds_ec.ec_if /* network-visible interface */
|
||||
int ds_flags;
|
||||
#define DSF_RUNNING 2 /* board is enabled */
|
||||
#define DSF_SETADDR 4 /* physical address is changed */
|
||||
#define DSF_RUNNING 2 /* board is enabled */
|
||||
#define DSF_SETADDR 4 /* physical address is changed */
|
||||
int ds_ubaddr; /* map info for incore structs */
|
||||
struct ifubinfo ds_deuba; /* unibus resource structure */
|
||||
struct ifrw ds_ifr[NRCV]; /* unibus receive maps */
|
||||
struct ifxmt ds_ifw[NXMT]; /* unibus xmt maps */
|
||||
/* the following structures are always mapped in */
|
||||
struct de_pcbb ds_pcbb; /* port control block */
|
||||
struct de_ring ds_xrent[NXMT]; /* transmit ring entrys */
|
||||
struct de_ring ds_rrent[NRCV]; /* receive ring entrys */
|
||||
struct de_ring ds_xrent[NXMT]; /* transmit ring entrys */
|
||||
struct de_ring ds_rrent[NRCV]; /* receive ring entrys */
|
||||
struct de_udbbuf ds_udbbuf; /* UNIBUS data buffer */
|
||||
/* end mapped area */
|
||||
#define INCORE_BASE(p) ((char *)&(p)->ds_pcbb)
|
||||
#define RVAL_OFF(s,n) ((char *)&(s)->n - INCORE_BASE(s))
|
||||
#define LVAL_OFF(s,n) ((char *)(s)->n - INCORE_BASE(s))
|
||||
#define PCBB_OFFSET(s) RVAL_OFF(s,ds_pcbb)
|
||||
#define XRENT_OFFSET(s) LVAL_OFF(s,ds_xrent)
|
||||
#define RRENT_OFFSET(s) LVAL_OFF(s,ds_rrent)
|
||||
#define UDBBUF_OFFSET(s) RVAL_OFF(s,ds_udbbuf)
|
||||
#define INCORE_SIZE(s) RVAL_OFF(s, ds_xindex)
|
||||
#define INCORE_BASE(p) ((char *)&(p)->ds_pcbb)
|
||||
#define RVAL_OFF(s,n) ((char *)&(s)->n - INCORE_BASE(s))
|
||||
#define LVAL_OFF(s,n) ((char *)(s)->n - INCORE_BASE(s))
|
||||
#define PCBB_OFFSET(s) RVAL_OFF(s,ds_pcbb)
|
||||
#define XRENT_OFFSET(s) LVAL_OFF(s,ds_xrent)
|
||||
#define RRENT_OFFSET(s) LVAL_OFF(s,ds_rrent)
|
||||
#define UDBBUF_OFFSET(s) RVAL_OFF(s,ds_udbbuf)
|
||||
#define INCORE_SIZE(s) RVAL_OFF(s, ds_xindex)
|
||||
int ds_xindex; /* UNA index into transmit chain */
|
||||
int ds_rindex; /* UNA index into receive chain */
|
||||
int ds_xfree; /* index for next transmit buffer */
|
||||
|
@ -142,16 +143,16 @@ int dematch __P((struct device *, void *, void *));
|
|||
void deattach __P((struct device *, struct device *, void *));
|
||||
int dewait __P((struct de_softc *, char *));
|
||||
void deinit __P((struct de_softc *));
|
||||
int deioctl __P((struct ifnet *, u_long, caddr_t));
|
||||
int deioctl __P((struct ifnet *, u_long, caddr_t));
|
||||
void dereset __P((int));
|
||||
void destart __P((struct ifnet *));
|
||||
void destart __P((struct ifnet *));
|
||||
void deread __P((struct de_softc *, struct ifrw *, int));
|
||||
void derecv __P((int));
|
||||
void derecv __P((int));
|
||||
void de_setaddr __P((u_char *, struct de_softc *));
|
||||
void deintr __P((int));
|
||||
|
||||
|
||||
struct cfdriver de_cd = {
|
||||
struct cfdriver de_cd = {
|
||||
NULL, "de", DV_IFNET
|
||||
};
|
||||
|
||||
|
@ -217,7 +218,7 @@ deattach(parent, self, aux)
|
|||
(void)dewait(ds, "read addr ");
|
||||
|
||||
ubarelse((void *)ds->ds_dev.dv_parent, &ds->ds_ubaddr);
|
||||
bcopy((caddr_t)&ds->ds_pcbb.pcbb2, myaddr, sizeof (myaddr));
|
||||
bcopy((caddr_t)&ds->ds_pcbb.pcbb2, myaddr, sizeof (myaddr));
|
||||
printf("%s: hardware address %s\n", ds->ds_dev.dv_xname,
|
||||
ether_sprintf(myaddr));
|
||||
ifp->if_ioctl = deioctl;
|
||||
|
@ -344,7 +345,7 @@ deinit(ds)
|
|||
destart(&ds->ds_if); /* queue output packets */
|
||||
ds->ds_flags |= DSF_RUNNING; /* need before de_setaddr */
|
||||
if (ds->ds_flags & DSF_SETADDR)
|
||||
de_setaddr(ds->ds_addr, ds);
|
||||
de_setaddr(LLADDR(ds->ds_if.if_sadl), ds);
|
||||
addr->pclow = CMD_START | PCSR0_INTE;
|
||||
splx(s);
|
||||
}
|
||||
|
@ -359,7 +360,7 @@ void
|
|||
destart(ifp)
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
int len;
|
||||
int len;
|
||||
register struct de_softc *ds = ifp->if_softc;
|
||||
volatile struct dedevice *addr = ds->ds_vaddr;
|
||||
register struct de_ring *rp;
|
||||
|
@ -495,7 +496,7 @@ deintr(unit)
|
|||
* If input error just drop packet.
|
||||
* Otherwise purge input buffered data path and examine
|
||||
* packet to determine type. If can't determine length
|
||||
* from type, then have to drop packet. Othewise decapsulate
|
||||
* from type, then have to drop packet. Othewise decapsulate
|
||||
* packet based on type and pass to type specific higher-level
|
||||
* input routine.
|
||||
*/
|
||||
|
@ -561,7 +562,7 @@ deread(ds, ifrw, len)
|
|||
int len;
|
||||
{
|
||||
struct ether_header *eh;
|
||||
struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
|
||||
/*
|
||||
* Deal with trailer protocol: if type is trailer type
|
||||
|
@ -696,7 +697,7 @@ dematch(parent, match, aux)
|
|||
void *match, *aux;
|
||||
{
|
||||
struct uba_attach_args *ua = aux;
|
||||
volatile struct dedevice *addr = (struct dedevice *)ua->ua_addr;
|
||||
volatile struct dedevice *addr = (struct dedevice *)ua->ua_addr;
|
||||
int i;
|
||||
|
||||
/*
|
||||
|
@ -727,7 +728,7 @@ dematch(parent, match, aux)
|
|||
DELAY(50000);
|
||||
|
||||
ua->ua_ivec = deintr;
|
||||
ua->ua_reset = dereset; /* Wish to be called after ubareset */
|
||||
ua->ua_reset = dereset; /* Wish to be called after ubareset */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_qe.c,v 1.20 1997/03/15 18:11:12 is Exp $ */
|
||||
/* $NetBSD: if_qe.c,v 1.21 1997/04/19 15:02:27 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
|
@ -38,29 +38,29 @@
|
|||
* @(#)if_qe.c 7.20 (Berkeley) 3/28/91
|
||||
*/
|
||||
|
||||
/* from @(#)if_qe.c 1.15 (ULTRIX) 4/16/86 */
|
||||
/* from @(#)if_qe.c 1.15 (ULTRIX) 4/16/86 */
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* Licensed from Digital Equipment Corporation *
|
||||
* Copyright (c) *
|
||||
* Digital Equipment Corporation *
|
||||
* Maynard, Massachusetts *
|
||||
* 1985, 1986 *
|
||||
* All rights reserved. *
|
||||
* Licensed from Digital Equipment Corporation *
|
||||
* Copyright (c) *
|
||||
* Digital Equipment Corporation *
|
||||
* Maynard, Massachusetts *
|
||||
* 1985, 1986 *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* The Information in this software is subject to change *
|
||||
* The Information in this software is subject to change *
|
||||
* without notice and should not be construed as a commitment *
|
||||
* by Digital Equipment Corporation. Digital makes no *
|
||||
* by Digital Equipment Corporation. Digital makes no *
|
||||
* representations about the suitability of this software for *
|
||||
* any purpose. It is supplied "As Is" without expressed or *
|
||||
* implied warranty. *
|
||||
* implied warranty. *
|
||||
* *
|
||||
* If the Regents of the University of California or its *
|
||||
* licensees modify the software in a manner creating *
|
||||
* derivative copyright rights, appropriate copyright *
|
||||
* legends may be placed on the derivative work in addition *
|
||||
* to that set forth above. *
|
||||
* If the Regents of the University of California or its *
|
||||
* licensees modify the software in a manner creating *
|
||||
* derivative copyright rights, appropriate copyright *
|
||||
* legends may be placed on the derivative work in addition *
|
||||
* to that set forth above. *
|
||||
* *
|
||||
****************************************************************/
|
||||
/* ---------------------------------------------------------------------
|
||||
|
@ -70,7 +70,7 @@
|
|||
* Rename "unused_multi" to "qunused_multi" for extending Generic
|
||||
* kernel to MicroVAXen.
|
||||
*
|
||||
* 18-mar-86 -- jaw br/cvec changed to NOT use registers.
|
||||
* 18-mar-86 -- jaw br/cvec changed to NOT use registers.
|
||||
*
|
||||
* 12 March 86 -- Jeff Chase
|
||||
* Modified to handle the new MCLGET macro
|
||||
|
@ -79,11 +79,11 @@
|
|||
*
|
||||
* 19 Oct 85 -- rjl
|
||||
* Changed the watch dog timer from 30 seconds to 3. VMS is using
|
||||
* less than 1 second in their's. Also turned the printf into an
|
||||
* less than 1 second in their's. Also turned the printf into an
|
||||
* mprintf.
|
||||
*
|
||||
* 09/16/85 -- Larry Cohen
|
||||
* Add 43bsd alpha tape changes for subnet routing
|
||||
* Add 43bsd alpha tape changes for subnet routing
|
||||
*
|
||||
* 1 Aug 85 -- rjl
|
||||
* Panic on a non-existent memory interrupt and the case where a packet
|
||||
|
@ -92,8 +92,8 @@
|
|||
* because we hang 2k input buffers on the device.
|
||||
*
|
||||
* 1 Aug 85 -- rich
|
||||
* Fixed the broadcast loopback code to handle Clusters without
|
||||
* wedging the system.
|
||||
* Fixed the broadcast loopback code to handle Clusters without
|
||||
* wedging the system.
|
||||
*
|
||||
* 27 Feb. 85 -- ejf
|
||||
* Return default hardware address on ioctl request.
|
||||
|
@ -109,7 +109,7 @@
|
|||
* Added watchdog timer to mask hardware bug that causes device lockup.
|
||||
*
|
||||
* 18 Dec. 84 -- rjl
|
||||
* Reworked driver to use q-bus mapping routines. MicroVAX-I now does
|
||||
* Reworked driver to use q-bus mapping routines. MicroVAX-I now does
|
||||
* copying instead of m-buf shuffleing.
|
||||
* A number of deficencies in the hardware/firmware were compensated
|
||||
* for. See comments in qestart and qerint.
|
||||
|
@ -152,6 +152,7 @@
|
|||
|
||||
#include <net/if.h>
|
||||
#include <net/if_ether.h>
|
||||
#include <net/if_dl.h>
|
||||
|
||||
#ifdef INET
|
||||
#include <netinet/in.h>
|
||||
|
@ -181,11 +182,11 @@ extern char all_es_snpa[], all_is_snpa[], all_l1is_snpa[], all_l2is_snpa[];
|
|||
#include <vax/uba/ubareg.h>
|
||||
#include <vax/uba/ubavar.h>
|
||||
|
||||
#define NRCV 15 /* Receive descriptors */
|
||||
#define NXMT 5 /* Transmit descriptors */
|
||||
#define NRCV 15 /* Receive descriptors */
|
||||
#define NXMT 5 /* Transmit descriptors */
|
||||
#define NTOT (NXMT + NRCV)
|
||||
|
||||
#define QETIMEOUT 2 /* transmit timeout, must be > 1 */
|
||||
#define QETIMEOUT 2 /* transmit timeout, must be > 1 */
|
||||
#define QESLOWTIMEOUT 40 /* timeout when no xmits in progress */
|
||||
|
||||
#define MINDATA 60
|
||||
|
@ -199,29 +200,29 @@ extern char all_es_snpa[], all_is_snpa[], all_l1is_snpa[], all_l2is_snpa[];
|
|||
*/
|
||||
struct qe_softc {
|
||||
struct device qe_dev; /* Configuration common part */
|
||||
struct ethercom qe_ec; /* Ethernet common part */
|
||||
#define qe_if qe_ec.ec_if /* network-visible interface */
|
||||
struct ifubinfo qe_uba; /* Q-bus resources */
|
||||
struct ethercom qe_ec; /* Ethernet common part */
|
||||
#define qe_if qe_ec.ec_if /* network-visible interface */
|
||||
struct ifubinfo qe_uba; /* Q-bus resources */
|
||||
struct ifrw qe_ifr[NRCV]; /* for receive buffers; */
|
||||
struct ifxmt qe_ifw[NXMT]; /* for xmit buffers; */
|
||||
struct qedevice *qe_vaddr;
|
||||
int qe_flags; /* software state */
|
||||
#define QEF_RUNNING 0x01
|
||||
#define QEF_SETADDR 0x02
|
||||
#define QEF_RUNNING 0x01
|
||||
#define QEF_SETADDR 0x02
|
||||
#define QEF_FASTTIMEO 0x04
|
||||
int setupaddr; /* mapping info for setup pkts */
|
||||
int setupaddr; /* mapping info for setup pkts */
|
||||
int ipl; /* interrupt priority */
|
||||
struct qe_ring *rringaddr; /* mapping info for rings */
|
||||
struct qe_ring *tringaddr; /* "" */
|
||||
struct qe_ring *tringaddr; /* "" */
|
||||
struct qe_ring rring[NRCV+1]; /* Receive ring descriptors */
|
||||
struct qe_ring tring[NXMT+1]; /* Xmit ring descriptors */
|
||||
u_char setup_pkt[16][8]; /* Setup packet */
|
||||
int rindex; /* Receive index */
|
||||
int tindex; /* Transmit index */
|
||||
int otindex; /* Old transmit index */
|
||||
int qe_intvec; /* Interrupt vector */
|
||||
int qe_intvec; /* Interrupt vector */
|
||||
struct qedevice *addr; /* device addr */
|
||||
int setupqueued; /* setup packet queued */
|
||||
int setupqueued; /* setup packet queued */
|
||||
int nxmit; /* Transmits in progress */
|
||||
int qe_restarts; /* timeouts */
|
||||
};
|
||||
|
@ -250,7 +251,7 @@ struct cfattach qe_ca = {
|
|||
sizeof(struct qe_softc), qematch, qeattach
|
||||
};
|
||||
|
||||
#define QEUNIT(x) minor(x)
|
||||
#define QEUNIT(x) minor(x)
|
||||
/*
|
||||
* The deqna shouldn't receive more than ETHERMTU + sizeof(struct ether_header)
|
||||
* but will actually take in up to 2048 bytes. To guard against the receiver
|
||||
|
@ -270,8 +271,8 @@ qematch(parent, match, aux)
|
|||
struct qe_softc *sc = match;
|
||||
struct uba_attach_args *ua = aux;
|
||||
struct uba_softc *ubasc = (struct uba_softc *)parent;
|
||||
struct qe_ring *rp;
|
||||
struct qe_ring *prp; /* physical rp */
|
||||
struct qe_ring *rp;
|
||||
struct qe_ring *prp; /* physical rp */
|
||||
volatile struct qedevice *addr = (struct qedevice *)ua->ua_addr;
|
||||
int i;
|
||||
|
||||
|
@ -442,7 +443,7 @@ qeinit(sc)
|
|||
sizeof(sc->setup_pkt), 0);
|
||||
if (i == 0)
|
||||
goto fail;
|
||||
sc->setupaddr = UBAI_ADDR(i);
|
||||
sc->setupaddr = UBAI_ADDR(i);
|
||||
/*
|
||||
* init buffers and maps
|
||||
*/
|
||||
|
@ -843,7 +844,7 @@ qe_setaddr(physaddr, sc)
|
|||
void
|
||||
qeinitdesc(rp, addr, len)
|
||||
register struct qe_ring *rp;
|
||||
caddr_t addr; /* mapped address */
|
||||
caddr_t addr; /* mapped address */
|
||||
int len;
|
||||
{
|
||||
/*
|
||||
|
@ -903,7 +904,7 @@ qeread(sc, ifrw, len)
|
|||
int len;
|
||||
{
|
||||
struct ether_header *eh;
|
||||
struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
|
||||
/*
|
||||
* Deal with trailer protocol: if type is INET trailer
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.40 1997/04/03 17:35:56 christos Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.41 1997/04/19 15:02:31 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
|
@ -82,7 +82,6 @@
|
|||
|
||||
#ifdef INET
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <netinet/ip_var.h>
|
||||
#endif
|
||||
#ifdef NETATALK
|
||||
|
|
Loading…
Reference in New Issue