summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-12-05 02:01:59 +0000
committerdg <dg@FreeBSD.org>1995-12-05 02:01:59 +0000
commit8156a5707a8830d1ce5658e103e6780f22cfc8dd (patch)
tree85cbbd7c1e0b938f939f958fcf5fd93d4c5c5406 /sys/dev/fe
parentfd5819ba7c85b8236d4b1f4cc3340e673229a93a (diff)
downloadFreeBSD-src-8156a5707a8830d1ce5658e103e6780f22cfc8dd.zip
FreeBSD-src-8156a5707a8830d1ce5658e103e6780f22cfc8dd.tar.gz
all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused. Change the parameter passed to if_watchdog to be a ifnet * rather than a unit number. All of this is an attempt to move toward not needing an array of softc pointers (which is usually static in size) to point to the driver softc. if_ed.c: Changed some of the argument passing to some functions to make a little more sense. if_ep.c, if_vx.c: Killed completely bogus use of if_timer. It was being set in such a way that the interface was being reset once per second (blech!).
Diffstat (limited to 'sys/dev/fe')
-rw-r--r--sys/dev/fe/if_fe.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index 01ec89a..a366f05 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -252,7 +252,7 @@ void fe_init ( int );
int fe_ioctl ( struct ifnet *, int, caddr_t );
void fe_start ( struct ifnet * );
void fe_reset ( int );
-void fe_watchdog ( int );
+void fe_watchdog ( struct ifnet * );
/* Local functions. Order of declaration is confused. FIXME. */
static int fe_probe_fmv ( struct isa_device *, struct fe_softc * );
@@ -1062,11 +1062,9 @@ fe_attach ( struct isa_device *isa_dev )
*/
sc->sc_if.if_unit = sc->sc_unit;
sc->sc_if.if_name = "fe";
- sc->sc_if.if_init = fe_init;
sc->sc_if.if_output = ether_output;
sc->sc_if.if_start = fe_start;
sc->sc_if.if_ioctl = fe_ioctl;
- sc->sc_if.if_reset = fe_reset;
sc->sc_if.if_watchdog = fe_watchdog;
/*
@@ -1246,27 +1244,27 @@ fe_stop ( int unit )
* generate an interrupt after a transmit has been started on it.
*/
void
-fe_watchdog ( int unit )
+fe_watchdog ( struct ifnet *ifp )
{
- struct fe_softc *sc = &fe_softc[unit];
+ struct fe_softc *sc = (struct fe_softc *)ifp;
#if FE_DEBUG >= 1
log( LOG_ERR, "fe%d: transmission timeout (%d+%d)%s\n",
- unit, sc->txb_sched, sc->txb_count,
- ( sc->sc_if.if_flags & IFF_UP ) ? "" : " when down" );
+ ifp->if_unit, sc->txb_sched, sc->txb_count,
+ ( ifp->if_flags & IFF_UP ) ? "" : " when down" );
#endif
#if FE_DEBUG >= 3
fe_dump( LOG_INFO, sc, NULL );
#endif
/* Record how many packets are lost by this accident. */
- sc->sc_if.if_oerrors += sc->txb_sched + sc->txb_count;
+ ifp->if_oerrors += sc->txb_sched + sc->txb_count;
/* Put the interface into known initial state. */
- if ( sc->sc_if.if_flags & IFF_UP ) {
- fe_reset( unit );
+ if ( ifp->if_flags & IFF_UP ) {
+ fe_reset( ifp->if_unit );
} else {
- fe_stop( unit );
+ fe_stop( ifp->if_unit );
}
}
OpenPOWER on IntegriCloud