aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/isa/if_el.c
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-12-05 02:01:59 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-12-05 02:01:59 +0000
commit4a5f1499b032a31083614e86b0f7f64f4069e70b (patch)
tree85cbbd7c1e0b938f939f958fcf5fd93d4c5c5406 /sys/i386/isa/if_el.c
parent0134c7fd68307d18a0be383e8cd04cb412a8d1dc (diff)
downloadsrc-4a5f1499b032a31083614e86b0f7f64f4069e70b.tar.gz
src-4a5f1499b032a31083614e86b0f7f64f4069e70b.zip
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!).
Notes
Notes: svn path=/head/; revision=12628
Diffstat (limited to 'sys/i386/isa/if_el.c')
-rw-r--r--sys/i386/isa/if_el.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index 72fcc6554153..12f71d20c884 100644
--- a/sys/i386/isa/if_el.c
+++ b/sys/i386/isa/if_el.c
@@ -6,7 +6,7 @@
*
* Questions, comments, bug reports and fixes to kimmel@cs.umass.edu.
*
- * $Id: if_el.c,v 1.17 1995/10/28 15:39:02 phk Exp $
+ * $Id: if_el.c,v 1.18 1995/11/04 17:07:24 bde Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@@ -91,7 +91,7 @@ int el_ioctl(struct ifnet *,int,caddr_t);
int el_probe(struct isa_device *);
void el_start(struct ifnet *);
void el_reset(int);
-void el_watchdog(int);
+void el_watchdog(struct ifnet *);
static void el_stop(int);
static int el_xmit(struct el_softc *,int);
@@ -209,11 +209,9 @@ int el_attach(struct isa_device *idev)
ifp->if_unit = idev->id_unit;
ifp->if_name = "el";
ifp->if_mtu = ETHERMTU;
- ifp->if_init = el_init;
ifp->if_output = ether_output;
ifp->if_start = el_start;
ifp->if_ioctl = el_ioctl;
- ifp->if_reset = el_reset;
ifp->if_watchdog = el_watchdog;
ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX);
@@ -819,14 +817,10 @@ el_ioctl(ifp, command, data)
}
/* Device timeout routine */
-void el_watchdog(int unit)
+void el_watchdog(struct ifnet *ifp)
{
- struct el_softc *sc;
-
- sc = &el_softc[unit];
-
- log(LOG_ERR,"el%d: device timeout\n",unit);
- sc->arpcom.ac_if.if_oerrors++;
- el_reset(unit);
+ log(LOG_ERR,"el%d: device timeout\n",ifp->if_unit);
+ ifp->if_oerrors++;
+ el_reset(ifp->if_unit);
}
#endif