summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_ix.c
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/i386/isa/if_ix.c
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/i386/isa/if_ix.c')
-rw-r--r--sys/i386/isa/if_ix.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/i386/isa/if_ix.c b/sys/i386/isa/if_ix.c
index 7d7c9f3..765b559 100644
--- a/sys/i386/isa/if_ix.c
+++ b/sys/i386/isa/if_ix.c
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_ix.c,v 1.13 1995/10/31 18:41:11 phk Exp $
+ * $Id: if_ix.c,v 1.14 1995/11/04 17:07:31 bde Exp $
*/
#include "ix.h"
@@ -163,7 +163,7 @@ static int ixstop(struct ifnet *);
static int ixdone(struct ifnet *);
static int ixioctl(struct ifnet *, int, caddr_t);
static void ixreset(int);
-static void ixwatchdog(int);
+static void ixwatchdog(struct ifnet *);
static u_short ixeeprom_read(int, int);
static void ixeeprom_outbits(int, int, int);
static int ixeeprom_inbits(int);
@@ -591,12 +591,10 @@ ixattach(struct isa_device *dvp) {
ifp->if_unit = unit;
ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST;
- ifp->if_init = ixinit;
ifp->if_output = ether_output;
ifp->if_start = ixstart;
ifp->if_done = ixdone;
ifp->if_ioctl = ixioctl;
- ifp->if_reset = ixreset;
ifp->if_watchdog = ixwatchdog;
ifp->if_type = IFT_ETHER;
ifp->if_addrlen = ETHER_ADDRESS_LENGTH;
@@ -1599,12 +1597,10 @@ ixreset(int unit) {
* watchdog from happening.
*/
void
-ixwatchdog(int unit) {
- ix_softc_t *sc = &ix_softc[unit];
-
- log(LOG_ERR, "ix%d: device timeout\n", unit);
- sc->arpcom.ac_if.if_oerrors++;
- ixreset(unit);
+ixwatchdog(struct ifnet *ifp) {
+ log(LOG_ERR, "ix%d: device timeout\n", ifp->if_unit);
+ ifp->if_oerrors++;
+ ixreset(ifp->if_unit);
return;
}
OpenPOWER on IntegriCloud