summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep
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/ep
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/ep')
-rw-r--r--sys/dev/ep/if_ep.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 5cea129..54536f6 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -38,7 +38,7 @@
*/
/*
- * $Id: if_ep.c,v 1.33 1995/10/28 15:39:04 phk Exp $
+ * $Id: if_ep.c,v 1.34 1995/11/04 17:07:26 bde Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -117,7 +117,7 @@ void epread __P((struct ep_softc *));
void epreset __P((int));
void epstart __P((struct ifnet *));
void epstop __P((int));
-void epwatchdog __P((int));
+void epwatchdog __P((struct ifnet *));
static int send_ID_sequence __P((int));
static int get_eeprom_data __P((int, int));
@@ -427,12 +427,10 @@ epattach(is)
ifp->if_name = "ep";
ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
- ifp->if_init = epinit;
ifp->if_output = ether_output;
ifp->if_start = epstart;
ifp->if_ioctl = epioctl;
ifp->if_watchdog = epwatchdog;
- ifp->if_timer=1;
if_attach(ifp);
kdc_ep[is->id_unit].kdc_state = DC_BUSY;
@@ -1246,36 +1244,19 @@ epioctl(ifp, cmd, data)
}
void
-epreset(unit)
- int unit;
-{
- int s = splimp();
-
- epstop(unit);
- epinit(unit);
- splx(s);
-}
-
-void
-epwatchdog(unit)
- int unit;
+epwatchdog(ifp)
+ struct ifnet *ifp;
{
- struct ep_softc *sc = &ep_softc[unit];
- struct ifnet *ifp=&sc->arpcom.ac_if;
-
/*
printf("ep: watchdog\n");
- log(LOG_ERR, "ep%d: watchdog\n", unit);
- ++sc->arpcom.ac_if.if_oerrors;
+ log(LOG_ERR, "ep%d: watchdog\n", ifp->if_unit);
+ ifp->if_oerrors++;
*/
- /* epreset(unit); */
ifp->if_flags &= ~IFF_OACTIVE;
epstart(ifp);
- epintr(unit);
-
- ifp->if_timer=1;
+ epintr(ifp->if_unit);
}
void
OpenPOWER on IntegriCloud