Home | History | Annotate | Line # | Download | only in nubus
if_ae_nubus.c revision 1.4
      1  1.4  scottr /*	$NetBSD: if_ae_nubus.c,v 1.4 1997/02/28 07:52:45 scottr Exp $	*/
      2  1.1  scottr 
      3  1.1  scottr /*
      4  1.1  scottr  * Copyright (C) 1997 Scott Reynolds
      5  1.1  scottr  * All rights reserved.
      6  1.1  scottr  *
      7  1.1  scottr  * Redistribution and use in source and binary forms, with or without
      8  1.1  scottr  * modification, are permitted provided that the following conditions
      9  1.1  scottr  * are met:
     10  1.1  scottr  * 1. Redistributions of source code must retain the above copyright
     11  1.1  scottr  *    notice, this list of conditions and the following disclaimer.
     12  1.1  scottr  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  scottr  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  scottr  *    documentation and/or other materials provided with the distribution.
     15  1.1  scottr  * 3. All advertising materials mentioning features or use of this software
     16  1.1  scottr  *    must display the following acknowledgement:
     17  1.1  scottr  *      This product includes software developed by Scott Reynolds for
     18  1.1  scottr  *      the NetBSD Project.
     19  1.1  scottr  * 4. The name of the author may not be used to endorse or promote products
     20  1.1  scottr  *    derived from this software without specific prior written permission.
     21  1.1  scottr  *
     22  1.1  scottr  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     23  1.1  scottr  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24  1.1  scottr  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25  1.1  scottr  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     26  1.1  scottr  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     27  1.1  scottr  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  1.1  scottr  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  1.1  scottr  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  1.1  scottr  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     31  1.1  scottr  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  scottr  */
     33  1.1  scottr 
     34  1.1  scottr #include <sys/param.h>
     35  1.1  scottr #include <sys/device.h>
     36  1.1  scottr #include <sys/errno.h>
     37  1.1  scottr #include <sys/ioctl.h>
     38  1.1  scottr #include <sys/socket.h>
     39  1.4  scottr #include <sys/syslog.h>
     40  1.1  scottr #include <sys/systm.h>
     41  1.1  scottr 
     42  1.1  scottr #include <net/if.h>
     43  1.1  scottr 
     44  1.1  scottr #ifdef INET
     45  1.1  scottr #include <netinet/in.h>
     46  1.1  scottr #include <netinet/if_ether.h>
     47  1.1  scottr #endif
     48  1.1  scottr 
     49  1.1  scottr #include <machine/bus.h>
     50  1.1  scottr #include <machine/viareg.h>
     51  1.1  scottr 
     52  1.1  scottr #include "nubus.h"
     53  1.1  scottr #include <dev/ic/dp8390reg.h>
     54  1.1  scottr #include "if_aereg.h"
     55  1.1  scottr #include "if_aevar.h"
     56  1.1  scottr 
     57  1.1  scottr static int	ae_nubus_match __P((struct device *, struct cfdata *, void *));
     58  1.1  scottr static void	ae_nubus_attach __P((struct device *, struct device *, void *));
     59  1.4  scottr static int	ae_nb_card_vendor __P((struct nubus_attach_args *));
     60  1.4  scottr static int	ae_nb_get_enaddr __P((struct nubus_attach_args *, u_int8_t *));
     61  1.4  scottr static void	ae_nb_watchdog __P((struct ifnet *));
     62  1.1  scottr 
     63  1.1  scottr struct cfattach ae_nubus_ca = {
     64  1.1  scottr 	sizeof(struct ae_softc), ae_nubus_match, ae_nubus_attach
     65  1.1  scottr };
     66  1.1  scottr 
     67  1.1  scottr static int
     68  1.1  scottr ae_nubus_match(parent, cf, aux)
     69  1.1  scottr 	struct device *parent;
     70  1.1  scottr 	struct cfdata *cf;
     71  1.1  scottr 	void *aux;
     72  1.1  scottr {
     73  1.1  scottr 	struct nubus_attach_args *na = (struct nubus_attach_args *) aux;
     74  1.1  scottr 	bus_space_handle_t bsh;
     75  1.1  scottr 	int rv;
     76  1.1  scottr 
     77  1.1  scottr 	if (bus_space_map(na->na_tag, NUBUS_SLOT2PA(na->slot), NBMEMSIZE,
     78  1.1  scottr 	    0, &bsh))
     79  1.1  scottr 		return (0);
     80  1.1  scottr 
     81  1.1  scottr 	rv = 0;
     82  1.1  scottr 
     83  1.1  scottr 	if (na->category == NUBUS_CATEGORY_NETWORK &&
     84  1.1  scottr 	    na->type == NUBUS_TYPE_ETHERNET) {
     85  1.4  scottr 		switch (ae_nb_card_vendor(na)) {
     86  1.1  scottr 		case AE_VENDOR_APPLE:
     87  1.1  scottr 		case AE_VENDOR_ASANTE:
     88  1.1  scottr 		case AE_VENDOR_FARALLON:
     89  1.1  scottr 		case AE_VENDOR_INTERLAN:
     90  1.2  scottr 		case AE_VENDOR_KINETICS:
     91  1.1  scottr 			rv = 1;
     92  1.1  scottr 			break;
     93  1.1  scottr 		case AE_VENDOR_DAYNA:
     94  1.1  scottr 		case AE_VENDOR_FOCUS:
     95  1.1  scottr 			rv = UNSUPP;
     96  1.1  scottr 			break;
     97  1.1  scottr 		default:
     98  1.1  scottr 			break;
     99  1.1  scottr 		}
    100  1.1  scottr 	}
    101  1.1  scottr 
    102  1.1  scottr 	bus_space_unmap(na->na_tag, bsh, NBMEMSIZE);
    103  1.1  scottr 
    104  1.1  scottr 	return rv;
    105  1.1  scottr }
    106  1.1  scottr 
    107  1.1  scottr /*
    108  1.1  scottr  * Install interface into kernel networking data structures
    109  1.1  scottr  */
    110  1.1  scottr static void
    111  1.1  scottr ae_nubus_attach(parent, self, aux)
    112  1.1  scottr 	struct device *parent, *self;
    113  1.1  scottr 	void   *aux;
    114  1.1  scottr {
    115  1.1  scottr 	struct ae_softc *sc = (struct ae_softc *) self;
    116  1.1  scottr 	struct nubus_attach_args *na = (struct nubus_attach_args *) aux;
    117  1.4  scottr 	struct ifnet *ifp = &sc->sc_arpcom.ac_if;
    118  1.1  scottr 	bus_space_tag_t bst;
    119  1.1  scottr 	bus_space_handle_t bsh;
    120  1.3  scottr 	int success;
    121  1.3  scottr #ifdef AE_OLD_GET_ENADDR
    122  1.3  scottr 	int i;
    123  1.3  scottr #endif
    124  1.1  scottr 
    125  1.1  scottr 	bst = na->na_tag;
    126  1.1  scottr 	if (bus_space_map(bst, NUBUS_SLOT2PA(na->slot), NBMEMSIZE,
    127  1.1  scottr 	    0, &bsh)) {
    128  1.1  scottr 		printf(": can't map memory space\n");
    129  1.1  scottr 		return;
    130  1.1  scottr 	}
    131  1.1  scottr 
    132  1.4  scottr 	sc->sc_regt = sc->sc_buft = bst;
    133  1.3  scottr 	sc->sc_flags = self->dv_cfdata->cf_flags;
    134  1.1  scottr 	sc->regs_rev = 0;
    135  1.2  scottr 	sc->use16bit = 1;
    136  1.4  scottr 	sc->vendor = ae_nb_card_vendor(na);
    137  1.1  scottr 	strncpy(sc->type_str, nubus_get_card_name(na->fmt),
    138  1.1  scottr 	    INTERFACE_NAME_LEN);
    139  1.1  scottr 	sc->type_str[INTERFACE_NAME_LEN-1] = '\0';
    140  1.1  scottr 	sc->mem_size = 0;
    141  1.1  scottr 
    142  1.1  scottr 	success = 0;
    143  1.1  scottr 
    144  1.1  scottr 	switch (sc->vendor) {
    145  1.3  scottr 	case AE_VENDOR_APPLE:	/* Apple-compatible cards */
    146  1.1  scottr 	case AE_VENDOR_ASANTE:
    147  1.1  scottr 		sc->regs_rev = 1;
    148  1.1  scottr 		if (bus_space_subregion(bst, bsh,
    149  1.4  scottr 		    AE_REG_OFFSET, AE_REG_SIZE, &sc->sc_regh)) {
    150  1.1  scottr 			printf(": failed to map register space\n");
    151  1.1  scottr 			break;
    152  1.1  scottr 		}
    153  1.1  scottr 		if ((sc->mem_size = ae_size_card_memory(bst, bsh,
    154  1.1  scottr 		    AE_DATA_OFFSET)) == 0) {
    155  1.1  scottr 			printf(": failed to determine size of RAM.\n");
    156  1.1  scottr 			break;
    157  1.1  scottr 		}
    158  1.1  scottr 		if (bus_space_subregion(bst, bsh,
    159  1.4  scottr 		    AE_DATA_OFFSET, sc->mem_size, &sc->sc_bufh)) {
    160  1.1  scottr 			printf(": failed to map register space\n");
    161  1.1  scottr 			break;
    162  1.1  scottr 		}
    163  1.3  scottr #ifdef AE_OLD_GET_ENADDR
    164  1.1  scottr 		/* Get station address from on-board ROM */
    165  1.1  scottr 		for (i = 0; i < ETHER_ADDR_LEN; ++i)
    166  1.1  scottr 			sc->sc_arpcom.ac_enaddr[i] =
    167  1.1  scottr 			    bus_space_read_1(bst, bsh, (AE_ROM_OFFSET + i * 2));
    168  1.3  scottr #else
    169  1.4  scottr 		if (ae_nb_get_enaddr(na, sc->sc_arpcom.ac_enaddr)) {
    170  1.3  scottr 			printf(": can't find MAC address\n");
    171  1.3  scottr 			break;
    172  1.3  scottr 		}
    173  1.3  scottr #endif
    174  1.1  scottr 
    175  1.1  scottr 		success = 1;
    176  1.1  scottr 		break;
    177  1.1  scottr 
    178  1.1  scottr 	case AE_VENDOR_DAYNA:
    179  1.1  scottr 		if (bus_space_subregion(bst, bsh,
    180  1.4  scottr 		    DP_REG_OFFSET, AE_REG_SIZE, &sc->sc_regh)) {
    181  1.1  scottr 			printf(": failed to map register space\n");
    182  1.1  scottr 			break;
    183  1.1  scottr 		}
    184  1.1  scottr 		sc->mem_size = 8192;
    185  1.1  scottr 		if (bus_space_subregion(bst, bsh,
    186  1.4  scottr 		    DP_DATA_OFFSET, sc->mem_size, &sc->sc_bufh)) {
    187  1.1  scottr 			printf(": failed to map register space\n");
    188  1.1  scottr 			break;
    189  1.1  scottr 		}
    190  1.3  scottr #ifdef AE_OLD_GET_ENADDR
    191  1.1  scottr 		/* Get station address from on-board ROM */
    192  1.1  scottr 		for (i = 0; i < ETHER_ADDR_LEN; ++i)
    193  1.1  scottr 			sc->sc_arpcom.ac_enaddr[i] =
    194  1.1  scottr 			    bus_space_read_1(bst, bsh, (DP_ROM_OFFSET + i * 2));
    195  1.3  scottr #else
    196  1.4  scottr 		if (ae_nb_get_enaddr(na, sc->sc_arpcom.ac_enaddr)) {
    197  1.3  scottr 			printf(": can't find MAC address\n");
    198  1.3  scottr 			break;
    199  1.3  scottr 		}
    200  1.3  scottr #endif
    201  1.1  scottr 
    202  1.1  scottr 		printf(": unsupported Dayna hardware\n");
    203  1.1  scottr 		break;
    204  1.1  scottr 
    205  1.1  scottr 	case AE_VENDOR_FARALLON:
    206  1.1  scottr 		sc->regs_rev = 1;
    207  1.1  scottr 		if (bus_space_subregion(bst, bsh,
    208  1.4  scottr 		    AE_REG_OFFSET, AE_REG_SIZE, &sc->sc_regh)) {
    209  1.1  scottr 			printf(": failed to map register space\n");
    210  1.1  scottr 			break;
    211  1.1  scottr 		}
    212  1.1  scottr 		if ((sc->mem_size = ae_size_card_memory(bst, bsh,
    213  1.1  scottr 		    AE_DATA_OFFSET)) == 0) {
    214  1.1  scottr 			printf(": failed to determine size of RAM.\n");
    215  1.1  scottr 			break;
    216  1.1  scottr 		}
    217  1.1  scottr 		if (bus_space_subregion(bst, bsh,
    218  1.4  scottr 		    AE_DATA_OFFSET, sc->mem_size, &sc->sc_bufh)) {
    219  1.1  scottr 			printf(": failed to map register space\n");
    220  1.1  scottr 			break;
    221  1.1  scottr 		}
    222  1.3  scottr #ifdef AE_OLD_GET_ENADDR
    223  1.1  scottr 		/* Get station address from on-board ROM */
    224  1.1  scottr 		for (i = 0; i < ETHER_ADDR_LEN; ++i)
    225  1.1  scottr 			sc->sc_arpcom.ac_enaddr[i] =
    226  1.1  scottr 			    bus_space_read_1(bst, bsh, (FE_ROM_OFFSET + i));
    227  1.3  scottr #endif
    228  1.1  scottr 
    229  1.1  scottr 		success = 1;
    230  1.1  scottr 		break;
    231  1.1  scottr 
    232  1.1  scottr 	case AE_VENDOR_FOCUS:
    233  1.1  scottr 		printf(": unsupported Focus hardware\n");
    234  1.1  scottr 		break;
    235  1.1  scottr 
    236  1.3  scottr 	case AE_VENDOR_INTERLAN:
    237  1.2  scottr 		if (bus_space_subregion(bst, bsh,
    238  1.4  scottr 		    GC_REG_OFFSET, AE_REG_SIZE, &sc->sc_regh)) {
    239  1.2  scottr 			printf(": failed to map register space\n");
    240  1.2  scottr 			break;
    241  1.2  scottr 		}
    242  1.2  scottr 		if ((sc->mem_size = ae_size_card_memory(bst, bsh,
    243  1.3  scottr 		    GC_DATA_OFFSET)) == 0) {
    244  1.2  scottr 			printf(": failed to determine size of RAM.\n");
    245  1.2  scottr 			break;
    246  1.2  scottr 		}
    247  1.2  scottr 		if (bus_space_subregion(bst, bsh,
    248  1.4  scottr 		    GC_DATA_OFFSET, sc->mem_size, &sc->sc_bufh)) {
    249  1.2  scottr 			printf(": failed to map register space\n");
    250  1.2  scottr 			break;
    251  1.2  scottr 		}
    252  1.2  scottr 
    253  1.3  scottr 		/* reset the NIC chip */
    254  1.3  scottr 		bus_space_write_1(bst, bsh, GC_RESET_OFFSET, 0);
    255  1.3  scottr 
    256  1.3  scottr #ifdef AE_OLD_GET_ENADDR
    257  1.2  scottr 		/* Get station address from on-board ROM */
    258  1.2  scottr 		for (i = 0; i < ETHER_ADDR_LEN; ++i)
    259  1.2  scottr 			sc->sc_arpcom.ac_enaddr[i] =
    260  1.3  scottr 			    bus_space_read_1(bst, bsh, (GC_ROM_OFFSET + i * 4));
    261  1.2  scottr #else
    262  1.4  scottr 		if (ae_nb_get_enaddr(na, sc->sc_arpcom.ac_enaddr)) {
    263  1.3  scottr 			printf(": can't find MAC address\n");
    264  1.3  scottr 			break;
    265  1.2  scottr 		}
    266  1.2  scottr #endif
    267  1.2  scottr 
    268  1.2  scottr 		success = 1;
    269  1.2  scottr 		break;
    270  1.2  scottr 
    271  1.3  scottr 	case AE_VENDOR_KINETICS:
    272  1.3  scottr 		sc->use16bit = 0;
    273  1.3  scottr 		if (bus_space_subregion(bst, bsh,
    274  1.4  scottr 		    KE_REG_OFFSET, AE_REG_SIZE, &sc->sc_regh)) {
    275  1.3  scottr 			printf(": failed to map register space\n");
    276  1.3  scottr 			break;
    277  1.3  scottr 		}
    278  1.3  scottr 		if ((sc->mem_size = ae_size_card_memory(bst, bsh,
    279  1.3  scottr 		    KE_DATA_OFFSET)) == 0) {
    280  1.3  scottr 			printf(": failed to determine size of RAM.\n");
    281  1.3  scottr 			break;
    282  1.3  scottr 		}
    283  1.3  scottr 		if (bus_space_subregion(bst, bsh,
    284  1.4  scottr 		    KE_DATA_OFFSET, sc->mem_size, &sc->sc_bufh)) {
    285  1.3  scottr 			printf(": failed to map register space\n");
    286  1.3  scottr 			break;
    287  1.3  scottr 		}
    288  1.4  scottr 		if (ae_nb_get_enaddr(na, sc->sc_arpcom.ac_enaddr)) {
    289  1.3  scottr 			printf(": can't find MAC address\n");
    290  1.3  scottr 			break;
    291  1.3  scottr 		}
    292  1.3  scottr 
    293  1.3  scottr 		success = 1;
    294  1.3  scottr 		break;
    295  1.3  scottr 
    296  1.1  scottr 	default:
    297  1.1  scottr 		break;
    298  1.1  scottr 	}
    299  1.1  scottr 
    300  1.1  scottr 	if (!success) {
    301  1.1  scottr 		bus_space_unmap(bst, bsh, NBMEMSIZE);
    302  1.1  scottr 		return;
    303  1.1  scottr 	}
    304  1.1  scottr 
    305  1.4  scottr 	ifp->if_watchdog = ae_nb_watchdog;	/* Override watchdog */
    306  1.3  scottr 	aesetup(sc);
    307  1.1  scottr 
    308  1.1  scottr 	/* make sure interrupts are vectored to us */
    309  1.1  scottr 	add_nubus_intr(na->slot, aeintr, sc);
    310  1.1  scottr 
    311  1.4  scottr #ifdef MAC68K_BROKEN_VIDEO
    312  1.1  scottr 	/*
    313  1.1  scottr 	 * XXX -- enable nubus interrupts here.  Should be done elsewhere,
    314  1.1  scottr 	 *        but that currently breaks with some nubus video cards'
    315  1.1  scottr 	 *	  interrupts.  So we only enable nubus interrupts if we
    316  1.1  scottr 	 *	  have an ethernet card...  i.e., we do it here.
    317  1.1  scottr 	 */
    318  1.1  scottr 	enable_nubus_intr();
    319  1.4  scottr #endif
    320  1.1  scottr }
    321  1.1  scottr 
    322  1.1  scottr static int
    323  1.4  scottr ae_nb_card_vendor(na)
    324  1.1  scottr 	struct nubus_attach_args *na;
    325  1.1  scottr {
    326  1.1  scottr 	int vendor;
    327  1.1  scottr 
    328  1.1  scottr 	switch (na->drsw) {
    329  1.1  scottr 	case NUBUS_DRSW_3COM:
    330  1.1  scottr 	case NUBUS_DRSW_APPLE:
    331  1.1  scottr 	case NUBUS_DRSW_TECHWORKS:
    332  1.1  scottr 		vendor = AE_VENDOR_APPLE;
    333  1.1  scottr 		break;
    334  1.1  scottr 	case NUBUS_DRSW_ASANTE:
    335  1.1  scottr 		vendor = AE_VENDOR_ASANTE;
    336  1.1  scottr 		break;
    337  1.1  scottr 	case NUBUS_DRSW_FARALLON:
    338  1.1  scottr 		vendor = AE_VENDOR_FARALLON;
    339  1.1  scottr 		break;
    340  1.1  scottr 	case NUBUS_DRSW_FOCUS:
    341  1.1  scottr 		vendor = AE_VENDOR_FOCUS;
    342  1.1  scottr 		break;
    343  1.1  scottr 	case NUBUS_DRSW_GATOR:
    344  1.1  scottr 		switch (na->drhw) {
    345  1.1  scottr 		default:
    346  1.1  scottr 		case NUBUS_DRHW_INTERLAN:
    347  1.1  scottr 			vendor = AE_VENDOR_INTERLAN;
    348  1.1  scottr 			break;
    349  1.1  scottr 		case NUBUS_DRHW_KINETICS:
    350  1.2  scottr 			if (strncmp(
    351  1.2  scottr 			    nubus_get_card_name(na->fmt), "EtherPort", 9) == 0)
    352  1.2  scottr 				vendor = AE_VENDOR_KINETICS;
    353  1.2  scottr 			else
    354  1.2  scottr 				vendor = AE_VENDOR_DAYNA;
    355  1.1  scottr 			break;
    356  1.1  scottr 		}
    357  1.1  scottr 		break;
    358  1.1  scottr 	default:
    359  1.1  scottr #ifdef AE_DEBUG
    360  1.1  scottr 		printf("Unknown ethernet drsw: %x\n", na->drsw);
    361  1.1  scottr #endif
    362  1.1  scottr 		vendor = AE_VENDOR_UNKNOWN;
    363  1.1  scottr 	}
    364  1.1  scottr 	return vendor;
    365  1.3  scottr }
    366  1.3  scottr 
    367  1.3  scottr static int
    368  1.4  scottr ae_nb_get_enaddr(na, ep)
    369  1.3  scottr 	struct nubus_attach_args *na;
    370  1.3  scottr 	u_int8_t *ep;
    371  1.3  scottr {
    372  1.3  scottr 	nubus_dir dir;
    373  1.3  scottr 	nubus_dirent dirent;
    374  1.3  scottr 
    375  1.3  scottr 	/*
    376  1.3  scottr 	 * XXX - note hardwired resource IDs here (0x80); these are
    377  1.3  scottr 	 * assumed to be used by all cards, but should be fixed when
    378  1.3  scottr 	 * we find out more about Ethernet card resources.
    379  1.3  scottr 	 */
    380  1.3  scottr 	nubus_get_main_dir(na->fmt, &dir);
    381  1.3  scottr 	if (nubus_find_rsrc(na->fmt, &dir, 0x80, &dirent) <= 0)
    382  1.3  scottr 		return 1;
    383  1.3  scottr 	nubus_get_dir_from_rsrc(na->fmt, &dirent, &dir);
    384  1.3  scottr 	if (nubus_find_rsrc(na->fmt, &dir, 0x80, &dirent) <= 0)
    385  1.3  scottr 		return 1;
    386  1.3  scottr 	if (nubus_get_ind_data(na->fmt, &dirent, ep, ETHER_ADDR_LEN) <= 0)
    387  1.3  scottr 		return 1;
    388  1.3  scottr 
    389  1.3  scottr 	return 0;
    390  1.4  scottr }
    391  1.4  scottr 
    392  1.4  scottr static void
    393  1.4  scottr ae_nb_watchdog(ifp)
    394  1.4  scottr 	struct ifnet *ifp;
    395  1.4  scottr {
    396  1.4  scottr 	struct ae_softc *sc = ifp->if_softc;
    397  1.4  scottr 
    398  1.4  scottr #if 1
    399  1.4  scottr /*
    400  1.4  scottr  * This is a kludge!  The via code seems to miss slot interrupts
    401  1.4  scottr  * sometimes.  This kludges around that by calling the handler
    402  1.4  scottr  * by hand if the watchdog is activated. -- XXX (akb)
    403  1.4  scottr  */
    404  1.4  scottr 	(*via2itab[1])((void *) 1);
    405  1.4  scottr #endif
    406  1.4  scottr 
    407  1.4  scottr 	log(LOG_ERR, "%s: device timeout\n", sc->sc_dev.dv_xname);
    408  1.4  scottr 	++sc->sc_arpcom.ac_if.if_oerrors;
    409  1.4  scottr 
    410  1.4  scottr 	aereset(sc);
    411  1.1  scottr }
    412