fix up some changes

This commit is contained in:
chopps 1995-04-11 18:51:55 +00:00
parent 32a6db8a76
commit a04aa1397a
3 changed files with 31 additions and 26 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bah.c,v 1.4 1995/04/11 05:46:53 mycroft Exp $ */
/* $NetBSD: if_bah.c,v 1.5 1995/04/11 18:52:00 chopps Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -524,13 +524,13 @@ bah_start(ifp)
#endif
if ((ifp->if_flags & IFF_RUNNING) == 0)
return (0);
return;
s = splimp();
if (sc->sc_tx_fillcount >= 2) {
splx(s);
return (0);
return;
}
IF_DEQUEUE(&ifp->if_snd, m);
@ -539,7 +539,7 @@ bah_start(ifp)
splx(s);
if (m == 0)
return (0);
return;
#if NBPFILTER > 0
/*
@ -666,7 +666,6 @@ bah_start(ifp)
* the hardware retries till shutdown.
* TODO: Insert some reasonable transmit timeout timer.
*/
return (1);
}
void
@ -752,8 +751,10 @@ bah_srint(sc,dummy)
u_char volatile *bah_ram_ptr;
struct mbuf *m, *dst, *head;
struct arc_header *ah;
struct ifnet *ifp;
head = 0;
ifp = &sc->sc_arccom.ac_if;
#ifdef BAHTIMINGS
int copystart,lencopy,perbyte;
@ -792,11 +793,11 @@ bah_srint(sc,dummy)
* count it as input error (we dont have any other
* detectable)
*/
sc->sc_arccom.ac_if.if_ierrors++;
ifp->if_ierrors++;
goto cleanup;
}
m->m_pkthdr.rcvif = &sc->sc_arccom.ac_if;
m->m_pkthdr.rcvif = ifp;
m->m_len = 0;
/*
@ -837,7 +838,7 @@ bah_srint(sc,dummy)
MGET(m, M_DONTWAIT, MT_DATA);
if (m == 0) {
sc->sc_arccom.ac_if.if_ierrors++;
ifp->if_ierrors++;
goto cleanup;
}
@ -876,12 +877,12 @@ bah_srint(sc,dummy)
#endif
m_adj(head, 3); /* gcc does structure padding */
arc_input(&sc->sc_arccom.ac_if, ah, head);
arc_input(ifp, ah, head);
/* arc_input has freed it, we dont need to... */
head = NULL;
sc->sc_arccom.ac_if.if_ipackets++;
ifp->if_ipackets++;
cleanup:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.10 1995/02/12 19:19:13 chopps Exp $ */
/* $NetBSD: if_le.c,v 1.11 1995/04/11 18:51:55 chopps Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -131,8 +131,10 @@ int lestd[] = { 0, 0x4000, 0x8000 };
/* console error messages */
int ledebug = 0;
int leintr(), lestart(), leioctl(), ether_output();
void leinit();
int leioctl __P((struct ifnet *, u_long, caddr_t));
int leintr __P((struct le_softc *));
void lestart __P((struct ifnet *));
void leinit __P((int));
struct mbuf *leget();
extern struct ifnet loif;
@ -384,6 +386,7 @@ leinit(unit)
* off of the interface queue, and copy it to the interface
* before starting the output.
*/
void
lestart(ifp)
struct ifnet *ifp;
{
@ -394,7 +397,7 @@ lestart(ifp)
int len;
if ((le->sc_if.if_flags & IFF_RUNNING) == 0)
return (0);
return;
bix = le->sc_tmd;
tmd = &le->sc_r2->ler2_tmd[bix];
@ -430,10 +433,9 @@ lestart(ifp)
}
le->sc_tmd = bix;
return (0);
}
int
leintr(le)
struct le_softc *le;
{
@ -809,6 +811,7 @@ leget(lebuf, totlen, off0, ifp)
/*
* Process an ioctl request.
*/
int
leioctl(ifp, cmd, data)
register struct ifnet *ifp;
u_long cmd;

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc90cx6.c,v 1.4 1995/04/11 05:46:53 mycroft Exp $ */
/* $NetBSD: smc90cx6.c,v 1.5 1995/04/11 18:52:00 chopps Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -524,13 +524,13 @@ bah_start(ifp)
#endif
if ((ifp->if_flags & IFF_RUNNING) == 0)
return (0);
return;
s = splimp();
if (sc->sc_tx_fillcount >= 2) {
splx(s);
return (0);
return;
}
IF_DEQUEUE(&ifp->if_snd, m);
@ -539,7 +539,7 @@ bah_start(ifp)
splx(s);
if (m == 0)
return (0);
return;
#if NBPFILTER > 0
/*
@ -666,7 +666,6 @@ bah_start(ifp)
* the hardware retries till shutdown.
* TODO: Insert some reasonable transmit timeout timer.
*/
return (1);
}
void
@ -752,8 +751,10 @@ bah_srint(sc,dummy)
u_char volatile *bah_ram_ptr;
struct mbuf *m, *dst, *head;
struct arc_header *ah;
struct ifnet *ifp;
head = 0;
ifp = &sc->sc_arccom.ac_if;
#ifdef BAHTIMINGS
int copystart,lencopy,perbyte;
@ -792,11 +793,11 @@ bah_srint(sc,dummy)
* count it as input error (we dont have any other
* detectable)
*/
sc->sc_arccom.ac_if.if_ierrors++;
ifp->if_ierrors++;
goto cleanup;
}
m->m_pkthdr.rcvif = &sc->sc_arccom.ac_if;
m->m_pkthdr.rcvif = ifp;
m->m_len = 0;
/*
@ -837,7 +838,7 @@ bah_srint(sc,dummy)
MGET(m, M_DONTWAIT, MT_DATA);
if (m == 0) {
sc->sc_arccom.ac_if.if_ierrors++;
ifp->if_ierrors++;
goto cleanup;
}
@ -876,12 +877,12 @@ bah_srint(sc,dummy)
#endif
m_adj(head, 3); /* gcc does structure padding */
arc_input(&sc->sc_arccom.ac_if, ah, head);
arc_input(ifp, ah, head);
/* arc_input has freed it, we dont need to... */
head = NULL;
sc->sc_arccom.ac_if.if_ipackets++;
ifp->if_ipackets++;
cleanup: