summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d27b065)
SCCS-vsn: sys/vax/if/if_acc.c 4.18
SCCS-vsn: sys/deprecated/netimp/if_imp.c 4.35
-/* if_imp.c 4.34 82/06/14 */
+/* if_imp.c 4.35 82/06/15 */
#include "imp.h"
#if NIMP > 0
#include "imp.h"
#if NIMP > 0
#include "../net/in.h"
#include "../net/in_systm.h"
#include "../net/if.h"
#include "../net/in.h"
#include "../net/in_systm.h"
#include "../net/if.h"
+/* define IMPLEADERS here to get leader printing code */
#include "../net/if_imp.h"
#include "../net/if_imphost.h"
#include "../net/ip.h"
#include "../net/if_imp.h"
#include "../net/if_imphost.h"
#include "../net/ip.h"
struct sockproto impproto = { PF_IMPLINK };
struct sockaddr_in impdst = { AF_IMPLINK };
struct sockaddr_in impsrc = { AF_IMPLINK };
struct sockproto impproto = { PF_IMPLINK };
struct sockaddr_in impdst = { AF_IMPLINK };
struct sockaddr_in impsrc = { AF_IMPLINK };
/*
* ARPAnet 1822 input routine.
/*
* ARPAnet 1822 input routine.
(m = m_pullup(m, sizeof(struct imp_leader))) == 0)
return;
ip = mtod(m, struct imp_leader *);
(m = m_pullup(m, sizeof(struct imp_leader))) == 0)
return;
ip = mtod(m, struct imp_leader *);
if (impprintfs)
printleader("impinput", ip);
if (impprintfs)
printleader("impinput", ip);
/* check leader type */
if (ip->il_format != IMP_NFF) {
/* check leader type */
if (ip->il_format != IMP_NFF) {
}
sc->imp_state = IMPS_UP;
sc->imp_if.if_flags |= IFF_UP;
}
sc->imp_state = IMPS_UP;
sc->imp_if.if_flags |= IFF_UP;
-#ifdef notdef
- /* restart output in case something was q'd */
- if (sc->imp_cb.ic_oactive == 0)
- (*sc->imp_cb.ic_start)(sc->imp_if.if_unit);
-#endif
-/* if_acc.c 4.17 82/06/14 */
+/* if_acc.c 4.18 82/06/15 */
#include "acc.h"
#ifdef NACC > 0
#include "acc.h"
#ifdef NACC > 0
char acc_flush; /* flush remainder of message */
} acc_softc[NACC];
char acc_flush; /* flush remainder of message */
} acc_softc[NACC];
-#define NACCDEBUG 10000
-char accdebug[NACCDEBUG];
-int accdebugx;
-
/*
* Reset the IMP and cause a transmitter interrupt by
* performing a null DMA.
/*
* Reset the IMP and cause a transmitter interrupt by
* performing a null DMA.
* the NOOPs it throws at us).
* Note: IMPMTU includes the leader.
*/
* the NOOPs it throws at us).
* Note: IMPMTU includes the leader.
*/
- acctrace("init", addr->icsr);
info = sc->acc_ifuba.ifu_r.ifrw_info;
addr->iba = (u_short)info;
addr->iwc = -(IMPMTU >> 1);
info = sc->acc_ifuba.ifu_r.ifrw_info;
addr->iba = (u_short)info;
addr->iwc = -(IMPMTU >> 1);
u_short cmd;
COUNT(ACCSTART);
u_short cmd;
COUNT(ACCSTART);
- acctrace("start", sc->acc_ic->ic_oactive);
if (sc->acc_ic->ic_oactive)
goto restart;
if (sc->acc_ic->ic_oactive)
goto restart;
*/
IF_DEQUEUE(&sc->acc_if->if_snd, m);
if (m == 0) {
*/
IF_DEQUEUE(&sc->acc_if->if_snd, m);
if (m == 0) {
- acctrace("q empty", 0);
sc->acc_ic->ic_oactive = 0;
return;
}
sc->acc_ic->ic_oactive = 0;
return;
}
register struct accdevice *addr;
COUNT(ACCXINT);
register struct accdevice *addr;
COUNT(ACCXINT);
- acctrace("xint", sc->acc_ic->ic_oactive);
addr = (struct accdevice *)accinfo[unit]->ui_addr;
if (sc->acc_ic->ic_oactive == 0) {
printf("acc%d: stray xmit interrupt, csr=%b\n", unit,
addr->ocsr, ACC_OUTBITS);
return;
}
addr = (struct accdevice *)accinfo[unit]->ui_addr;
if (sc->acc_ic->ic_oactive == 0) {
printf("acc%d: stray xmit interrupt, csr=%b\n", unit,
addr->ocsr, ACC_OUTBITS);
return;
}
- acctrace("ocsr", addr->ocsr);
sc->acc_if->if_opackets++;
sc->acc_ic->ic_oactive = 0;
if (addr->ocsr & ACC_ERR) {
sc->acc_if->if_opackets++;
sc->acc_ic->ic_oactive = 0;
if (addr->ocsr & ACC_ERR) {
m_freem(sc->acc_ifuba.ifu_xtofree);
sc->acc_ifuba.ifu_xtofree = 0;
}
m_freem(sc->acc_ifuba.ifu_xtofree);
sc->acc_ifuba.ifu_xtofree = 0;
}
- if (sc->acc_if->if_snd.ifq_head == 0) {
- addr->ocsr &= ~ACC_IE; /* hardware funky? */
- return;
- }
- accstart(unit);
+ if (sc->acc_if->if_snd.ifq_head)
+ accstart(unit);
*/
if (sc->acc_ifuba.ifu_flags & UBA_NEEDBDP)
UBAPURGE(sc->acc_ifuba.ifu_uba, sc->acc_ifuba.ifu_r.ifrw_bdp);
*/
if (sc->acc_ifuba.ifu_flags & UBA_NEEDBDP)
UBAPURGE(sc->acc_ifuba.ifu_uba, sc->acc_ifuba.ifu_r.ifrw_bdp);
- acctrace("rint", addr->icsr);
if (addr->icsr & ACC_ERR) {
if (addr->icsr & ACC_ERR) {
- printf("acc%d: input error, icsr=%b, ocsr=%b\n", unit,
- addr->icsr, ACC_INBITS, addr->ocsr, ACC_OUTBITS);
+ printf("acc%d: input error, csr=%b\n", unit,
+ addr->icsr, ACC_INBITS);
sc->acc_if->if_ierrors++;
sc->acc_flush = 1;
}
sc->acc_if->if_ierrors++;
sc->acc_flush = 1;
}
- acctrace("flush", sc->acc_flush);
if (sc->acc_flush) {
if (addr->icsr & IN_EOM)
sc->acc_flush = 0;
goto setup;
}
len = IMPMTU + (addr->iwc << 1);
if (sc->acc_flush) {
if (addr->icsr & IN_EOM)
sc->acc_flush = 0;
goto setup;
}
len = IMPMTU + (addr->iwc << 1);
- acctrace("length", len);
if (len < 0 || len > IMPMTU) {
printf("acc%d: bad length=%d\n", len);
sc->acc_if->if_ierrors++;
if (len < 0 || len > IMPMTU) {
printf("acc%d: bad length=%d\n", len);
sc->acc_if->if_ierrors++;
m = sc->acc_iq;
sc->acc_iq = 0;
}
m = sc->acc_iq;
sc->acc_iq = 0;
}
- acctrace("impinput", 0);
impinput(unit, m);
setup:
impinput(unit, m);
setup:
addr->icsr =
IN_MRDY | ACC_IE | IN_WEN | ((info & 0x30000) >> 12) | ACC_GO;
}
addr->icsr =
IN_MRDY | ACC_IE | IN_WEN | ((info & 0x30000) >> 12) | ACC_GO;
}
-
-int accprintf = 0;
-
-acctrace(cmd, value)
- char *cmd;
- int value;
-{
- register int i;
- register char *p = (char *)&value;
-
- if (accprintf)
- printf("%s: %x", cmd, value);
- do {
- if (accdebugx >= NACCDEBUG)
- accdebugx = 0;
- accdebug[accdebugx++] = *cmd;
- } while (*cmd++);
- for (i = 0; i < sizeof (int); i++) {
- if (accdebugx >= NACCDEBUG)
- accdebugx = 0;
- accdebug[accdebugx++] = *p++;
- }
-}