Module Name:    src
Committed By:   dyoung
Date:           Fri Sep  4 18:10:09 UTC 2009

Modified Files:
        src/sys/dev/usb: if_atu.c if_atureg.h if_aue.c if_auereg.h if_axe.c
            if_axereg.h if_cdce.c if_cdcereg.h if_cuereg.h if_kue.c
            if_udavreg.h if_urlreg.h

Log Message:
Change spaces to tabs and remove some unnecessary parentheses.  No
functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/if_atu.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_atureg.h
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/usb/if_aue.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/if_auereg.h
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_axereg.h
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/if_cdce.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_cdcereg.h \
    src/sys/dev/usb/if_udavreg.h src/sys/dev/usb/if_urlreg.h
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/if_cuereg.h
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_kue.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/if_atu.c
diff -u src/sys/dev/usb/if_atu.c:1.31 src/sys/dev/usb/if_atu.c:1.32
--- src/sys/dev/usb/if_atu.c:1.31	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_atu.c	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $ */
+/*	$NetBSD: if_atu.c,v 1.32 2009/09/04 18:10:08 dyoung Exp $ */
 /*	$OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
 /*
  * Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.32 2009/09/04 18:10:08 dyoung Exp $");
 
 #include "bpfilter.h"
 
@@ -1171,7 +1171,7 @@
 void
 atu_attach(device_t parent, device_t self, void *aux)
 {
-        struct atu_softc *sc = device_private(self);
+	struct atu_softc *sc = device_private(self);
 	struct usb_attach_arg *uaa = aux;
 	char				*devinfop;
 	usbd_status			err;
@@ -1191,13 +1191,13 @@
 	err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1);
 	if (err) {
 		aprint_error_dev(self, "setting config no failed\n");
-                return;
+		return;
 	}
 
 	err = usbd_device2interface_handle(dev, ATU_IFACE_IDX, &sc->atu_iface);
 	if (err) {
 		aprint_error_dev(self, "getting interface handle failed\n");
-                return;
+		return;
 	}
 
 	sc->atu_unit = device_unit(self);
@@ -1239,7 +1239,7 @@
 		 * so we don't want to do any more configuration after this
 		 * point.
 		 */
-                return;
+		return;
 	}
 
 	if (mode != MODE_NETCARD) {
@@ -1264,7 +1264,7 @@
 				    " been downloaded\n",
 				    USBDEVNAME(sc->atu_dev)));
 				atu_complete_attach(sc);
-                                return;
+				return;
 			}
 		}
 
@@ -1279,7 +1279,7 @@
 		atu_complete_attach(sc);
 	}
 
-        return;
+	return;
 }
 
 void
@@ -1320,7 +1320,7 @@
 	err = atu_get_card_config(sc);
 	if (err) {
 		aprint_error("\n%s: could not get card cfg!\n",
-                    device_xname(sc->atu_dev));
+		    device_xname(sc->atu_dev));
 		return;
 	}
 
@@ -1406,7 +1406,7 @@
 int
 atu_detach(device_t self, int flags)
 {
-        struct atu_softc *sc = device_private(self);
+	struct atu_softc *sc = device_private(self);
 	struct ifnet		*ifp = &sc->sc_if;
 
 	DPRINTFN(10, ("%s: atu_detach state=%d\n", USBDEVNAME(sc->atu_dev),
@@ -1929,11 +1929,11 @@
 
 	/* Init TX ring */
 	if (atu_tx_list_init(sc))
-                printf("%s: tx list init failed\n", device_xname(sc->atu_dev));
+		printf("%s: tx list init failed\n", device_xname(sc->atu_dev));
 
 	/* Init RX ring */
 	if (atu_rx_list_init(sc))
-                printf("%s: rx list init failed\n", device_xname(sc->atu_dev));
+		printf("%s: rx list init failed\n", device_xname(sc->atu_dev));
 
 	/* Load the multicast filter. */
 	/*atu_setmulti(sc); */

Index: src/sys/dev/usb/if_atureg.h
diff -u src/sys/dev/usb/if_atureg.h:1.7 src/sys/dev/usb/if_atureg.h:1.8
--- src/sys/dev/usb/if_atureg.h:1.7	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_atureg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_atureg.h,v 1.7 2009/09/04 17:53:58 dyoung Exp $ */
+/*	$NetBSD: if_atureg.h,v 1.8 2009/09/04 18:10:08 dyoung Exp $ */
 /*	$OpenBSD: if_atureg.h,v 1.21 2004/12/23 13:19:38 dlg Exp $ */
 /*
  * Copyright (c) 2003
@@ -129,7 +129,7 @@
 #define ATU_AVG_TIME		20
 
 struct atu_softc {
-        device_t atu_dev;
+	device_t atu_dev;
 	struct ethercom		sc_ec;
 	struct ieee80211com	sc_ic;
 	int			(*sc_newstate)(struct ieee80211com *,

Index: src/sys/dev/usb/if_aue.c
diff -u src/sys/dev/usb/if_aue.c:1.113 src/sys/dev/usb/if_aue.c:1.114
--- src/sys/dev/usb/if_aue.c:1.113	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_aue.c	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aue.c,v 1.113 2009/09/04 17:53:58 dyoung Exp $	*/
+/*	$NetBSD: if_aue.c,v 1.114 2009/09/04 18:10:08 dyoung Exp $	*/
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wp...@ee.columbia.edu>.  All rights reserved.
@@ -77,15 +77,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.113 2009/09/04 17:53:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.114 2009/09/04 18:10:08 dyoung Exp $");
 
-#if defined(__NetBSD__)
 #include "opt_inet.h"
 #include "bpfilter.h"
 #include "rnd.h"
-#elif defined(__OpenBSD__)
-#include "bpfilter.h"
-#endif /* defined(__OpenBSD__) */
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,9 +97,7 @@
 #endif
 
 #include <net/if.h>
-#if defined(__NetBSD__)
 #include <net/if_arp.h>
-#endif
 #include <net/if_dl.h>
 #include <net/if_media.h>
 
@@ -113,23 +107,12 @@
 #include <net/bpf.h>
 #endif
 
-#if defined(__NetBSD__)
 #include <net/if_ether.h>
 #ifdef INET
 #include <netinet/in.h>
 #include <netinet/if_inarp.h>
 #endif
-#endif /* defined(__NetBSD__) */
 
-#if defined(__OpenBSD__)
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/if_ether.h>
-#endif
-#endif /* defined(__OpenBSD__) */
 
 
 #include <dev/mii/mii.h>
@@ -140,10 +123,8 @@
 #include <dev/usb/usbdi_util.h>
 #include <dev/usb/usbdevs.h>
 
-#if defined(__NetBSD__)
 #include <sys/condvar.h>
 #include <sys/kthread.h>
-#endif
 
 #include <dev/usb/if_auereg.h>
 
@@ -240,9 +221,7 @@
 CFATTACH_DECL_NEW(aue, sizeof(struct aue_softc), aue_match, aue_attach,
     aue_detach, aue_activate);
 
-#if defined(__NetBSD__)
 Static void aue_multithread(void *);
-#endif
 
 Static void aue_reset_pegasus_II(struct aue_softc *sc);
 Static int aue_tx_list_init(struct aue_softc *);
@@ -306,7 +285,7 @@
 
 	if (err) {
 		DPRINTF(("%s: aue_csr_read_1: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+		    device_xname(sc->aue_dev), reg, usbd_errstr(err)));
 		return (0);
 	}
 
@@ -333,7 +312,7 @@
 
 	if (err) {
 		DPRINTF(("%s: aue_csr_read_2: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+		    device_xname(sc->aue_dev), reg, usbd_errstr(err)));
 		return (0);
 	}
 
@@ -361,7 +340,7 @@
 
 	if (err) {
 		DPRINTF(("%s: aue_csr_write_1: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+		    device_xname(sc->aue_dev), reg, usbd_errstr(err)));
 		return (-1);
 	}
 
@@ -389,7 +368,7 @@
 
 	if (err) {
 		DPRINTF(("%s: aue_csr_write_2: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+		    device_xname(sc->aue_dev), reg, usbd_errstr(err)));
 		return (-1);
 	}
 
@@ -414,7 +393,7 @@
 
 	if (i == AUE_TIMEOUT) {
 		printf("%s: EEPROM read timed out\n",
-                    device_xname(sc->aue_dev));
+		    device_xname(sc->aue_dev));
 	}
 
 	return (aue_csr_read_2(sc, AUE_EE_DATA));
@@ -430,7 +409,7 @@
 	int			off = 0;
 	int			word;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	for (i = 0; i < 3; i++) {
 		word = aue_eeprom_getword(sc, off + i);
@@ -452,19 +431,19 @@
 {
 	mutex_exit(&sc->aue_mii_lock);
 	if (--sc->aue_refcnt < 0)
-                usb_detach_wakeup((sc->aue_dev));
+		usb_detach_wakeup((sc->aue_dev));
 }
 
 Static int
 aue_miibus_readreg(device_t dev, int phy, int reg)
 {
-        struct aue_softc *sc = device_private(dev);
+	struct aue_softc *sc = device_private(dev);
 	int			i;
 	u_int16_t		val;
 
 	if (sc->aue_dying) {
 #ifdef DIAGNOSTIC
-                printf("%s: dying\n", device_xname(sc->aue_dev));
+		printf("%s: dying\n", device_xname(sc->aue_dev));
 #endif
 		return 0;
 	}
@@ -497,13 +476,13 @@
 	}
 
 	if (i == AUE_TIMEOUT) {
-                printf("%s: MII read timed out\n", device_xname(sc->aue_dev));
+		printf("%s: MII read timed out\n", device_xname(sc->aue_dev));
 	}
 
 	val = aue_csr_read_2(sc, AUE_PHY_DATA);
 
 	DPRINTFN(11,("%s: %s: phy=%d reg=%d => 0x%04x\n",
-                     device_xname(sc->aue_dev), __func__, phy, reg, val));
+	    device_xname(sc->aue_dev), __func__, phy, reg, val));
 
 	aue_unlock_mii(sc);
 	return (val);
@@ -512,7 +491,7 @@
 Static void
 aue_miibus_writereg(device_t dev, int phy, int reg, int data)
 {
-        struct aue_softc *sc = device_private(dev);
+	struct aue_softc *sc = device_private(dev);
 	int			i;
 
 #if 0
@@ -524,7 +503,7 @@
 #endif
 
 	DPRINTFN(11,("%s: %s: phy=%d reg=%d data=0x%04x\n",
-                     device_xname(sc->aue_dev), __func__, phy, reg, data));
+	    device_xname(sc->aue_dev), __func__, phy, reg, data));
 
 	aue_lock_mii(sc);
 	aue_csr_write_2(sc, AUE_PHY_DATA, data);
@@ -545,10 +524,10 @@
 Static void
 aue_miibus_statchg(device_t dev)
 {
-        struct aue_softc *sc = device_private(dev);
+	struct aue_softc *sc = device_private(dev);
 	struct mii_data		*mii = GET_MII(sc);
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	aue_lock_mii(sc);
 	AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB);
@@ -577,7 +556,7 @@
 		auxmode = aue_miibus_readreg(dev, 0, 0x1b);
 		aue_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04);
 	}
-        DPRINTFN(5,("%s: %s: exit\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: exit\n", device_xname(sc->aue_dev), __func__));
 }
 
 #define AUE_POLY	0xEDB88320
@@ -608,7 +587,7 @@
 	struct ether_multistep	step;
 	u_int32_t		h = 0, i;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	ifp = GET_IFP(sc);
 
@@ -626,11 +605,7 @@
 		aue_csr_write_1(sc, AUE_MAR0 + i, 0);
 
 	/* now program new ones */
-#if defined(__NetBSD__)
 	ETHER_FIRST_MULTI(step, &sc->aue_ec, enm);
-#else
-	ETHER_FIRST_MULTI(step, &sc->arpcom, enm);
-#endif
 	while (enm != NULL) {
 		if (memcmp(enm->enm_addrlo,
 		    enm->enm_addrhi, ETHER_ADDR_LEN) != 0)
@@ -663,7 +638,7 @@
 {
 	int		i;
 
-        DPRINTFN(2,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(2,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_RESETMAC);
 
@@ -673,7 +648,7 @@
 	}
 
 	if (i == AUE_TIMEOUT)
-                printf("%s: reset failed\n", device_xname(sc->aue_dev));
+		printf("%s: reset failed\n", device_xname(sc->aue_dev));
 
 #if 0
 	/* XXX what is mii_mode supposed to be */
@@ -768,7 +743,7 @@
 	sc->aue_dev = self;
 
 	devinfop = usbd_devinfo_alloc(uaa->device, 0);
-        aprint_naive("\n");
+	aprint_naive("\n");
 	aprint_normal("\n");
 	aprint_normal_dev(self, "%s\n", devinfop);
 	usbd_devinfo_free(devinfop);
@@ -776,35 +751,33 @@
 	err = usbd_set_config_no(dev, AUE_CONFIG_NO, 1);
 	if (err) {
 		aprint_error_dev(self, "setting config no failed\n");
-                return;
+		return;
 	}
 
-        usb_init_task(&sc->aue_tick_task, aue_tick_task, sc);
-        usb_init_task(&sc->aue_stop_task, (void (*)(void *))aue_stop, sc);
+	usb_init_task(&sc->aue_tick_task, aue_tick_task, sc);
+	usb_init_task(&sc->aue_stop_task, (void (*)(void *))aue_stop, sc);
 	mutex_init(&sc->aue_mii_lock, MUTEX_DEFAULT, IPL_NONE);
 
 	err = usbd_device2interface_handle(dev, AUE_IFACE_IDX, &iface);
 	if (err) {
 		aprint_error_dev(self, "getting interface handle failed\n");
-                return;
+		return;
 	}
-#if defined(__NetBSD__)
 	sc->aue_closing = 0;
 
 	mutex_init(&sc->aue_mcmtx, MUTEX_DRIVER, IPL_NET);
 	cv_init(&sc->aue_domc, "auemc");
 	cv_init(&sc->aue_closemc, "auemccl");
 
-        err = kthread_create(PRI_NONE, 0, NULL,
+	err = kthread_create(PRI_NONE, 0, NULL,
 		aue_multithread, sc, &sc->aue_thread,
-                                "%s-mc", device_xname(sc->aue_dev));
+		"%s-mc", device_xname(sc->aue_dev));
 
 	if (err) {
 		aprint_error_dev(self,
 		    "creating multicast configuration thread\n");
-                return;
+		return;
 	}
-#endif
 	sc->aue_flags = aue_lookup(uaa->vendor, uaa->product)->aue_flags;
 
 	sc->aue_udev = dev;
@@ -820,7 +793,7 @@
 		if (ed == NULL) {
 			aprint_error_dev(self,
 			    "couldn't get endpoint descriptor %d\n", i);
-                        return;
+			return;
 		}
 		if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
 		    UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
@@ -837,7 +810,7 @@
 	if (sc->aue_ed[AUE_ENDPT_RX] == 0 || sc->aue_ed[AUE_ENDPT_TX] == 0 ||
 	    sc->aue_ed[AUE_ENDPT_INTR] == 0) {
 		aprint_error_dev(self, "missing endpoint\n");
-                return;
+		return;
 	}
 
 
@@ -864,10 +837,7 @@
 	ifp->if_ioctl = aue_ioctl;
 	ifp->if_start = aue_start;
 	ifp->if_watchdog = aue_watchdog;
-#if defined(__OpenBSD__)
-	ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
-#endif
-        strncpy(ifp->if_xname, device_xname(sc->aue_dev), IFNAMSIZ);
+	strncpy(ifp->if_xname, device_xname(sc->aue_dev), IFNAMSIZ);
 
 	IFQ_SET_READY(&ifp->if_snd);
 
@@ -889,38 +859,37 @@
 
 	/* Attach the interface. */
 	if_attach(ifp);
-        ether_ifattach(ifp, eaddr);
+	ether_ifattach(ifp, eaddr);
 #if NRND > 0
-        rnd_attach_source(&sc->rnd_source, device_xname(sc->aue_dev),
+	rnd_attach_source(&sc->rnd_source, device_xname(sc->aue_dev),
 	    RND_TYPE_NET, 0);
 #endif
 
-        callout_init(&(sc->aue_stat_ch), 0);
+	callout_init(&(sc->aue_stat_ch), 0);
 
 	sc->aue_attached = 1;
 	splx(s);
 
-	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->aue_udev,
-                           (sc->aue_dev));
+	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->aue_udev, sc->aue_dev);
 
-        return;
+	return;
 }
 
 int
 aue_detach(device_t self, int flags)
 {
-        struct aue_softc *sc = device_private(self);
+	struct aue_softc *sc = device_private(self);
 	struct ifnet		*ifp = GET_IFP(sc);
 	int			s;
 
-        DPRINTFN(2,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(2,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	if (!sc->aue_attached) {
 		/* Detached before attached finished, so just bail out. */
 		return (0);
 	}
 
-        callout_stop(&(sc->aue_stat_ch));
+	callout_stop(&(sc->aue_stat_ch));
 	/*
 	 * Remove any pending tasks.  They cannot be executing because they run
 	 * in the same thread as detach.
@@ -944,14 +913,12 @@
 	if (ifp->if_flags & IFF_RUNNING)
 		aue_stop(sc);
 
-#if defined(__NetBSD__)
 #if NRND > 0
 	rnd_detach_source(&sc->rnd_source);
 #endif
 	mii_detach(&sc->aue_mii, MII_PHY_ANY, MII_OFFSET_ANY);
 	ifmedia_delete_instance(&sc->aue_mii.mii_media, IFM_INST_ANY);
 	ether_ifdetach(ifp);
-#endif /* __NetBSD__ */
 
 	if_detach(ifp);
 
@@ -966,12 +933,11 @@
 
 	if (--sc->aue_refcnt >= 0) {
 		/* Wait for processes to go away. */
-                usb_detach_wait((sc->aue_dev));
+		usb_detach_wait((sc->aue_dev));
 	}
 	splx(s);
 
-	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->aue_udev,
-                           (sc->aue_dev));
+	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->aue_udev, sc->aue_dev);
 
 	mutex_destroy(&sc->aue_mii_lock);
 #if 0
@@ -985,7 +951,7 @@
 {
 	struct aue_softc *sc = device_private(self);
 
-        DPRINTFN(2,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(2,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	switch (act) {
 	case DVACT_ACTIVATE:
@@ -1008,7 +974,7 @@
 {
 	struct mbuf		*m_new = NULL;
 
-        DPRINTFN(10,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
+	DPRINTFN(10,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
 
 	if (m == NULL) {
 		MGETHDR(m_new, M_DONTWAIT, MT_DATA);
@@ -1045,7 +1011,7 @@
 	struct aue_chain	*c;
 	int			i;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	cd = &sc->aue_cdata;
 	for (i = 0; i < AUE_RX_LIST_CNT; i++) {
@@ -1074,7 +1040,7 @@
 	struct aue_chain	*c;
 	int			i;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	cd = &sc->aue_cdata;
 	for (i = 0; i < AUE_TX_LIST_CNT; i++) {
@@ -1103,7 +1069,7 @@
 	struct ifnet		*ifp = GET_IFP(sc);
 	struct aue_intrpkt	*p = &sc->aue_cdata.aue_ibuf;
 
-        DPRINTFN(15,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
+	DPRINTFN(15,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
 
 	if (sc->aue_dying)
 		return;
@@ -1149,7 +1115,7 @@
 	struct aue_rxpkt	r;
 	int			s;
 
-        DPRINTFN(10,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
+	DPRINTFN(10,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
 
 	if (sc->aue_dying)
 		return;
@@ -1217,9 +1183,9 @@
 		BPF_MTAP(ifp, m);
 #endif
 
-        DPRINTFN(10,("%s: %s: deliver %d\n", device_xname(sc->aue_dev),
+	DPRINTFN(10,("%s: %s: deliver %d\n", device_xname(sc->aue_dev),
 		    __func__, m->m_len));
-        (*(ifp)->if_input)((ifp), (m));
+	(*(ifp)->if_input)((ifp), (m));
  done1:
 	splx(s);
 
@@ -1232,7 +1198,7 @@
 	    USBD_NO_TIMEOUT, aue_rxeof);
 	usbd_transfer(xfer);
 
-        DPRINTFN(10,("%s: %s: start rx\n", device_xname(sc->aue_dev),
+	DPRINTFN(10,("%s: %s: start rx\n", device_xname(sc->aue_dev),
 		    __func__));
 }
 
@@ -1255,7 +1221,7 @@
 
 	s = splnet();
 
-        DPRINTFN(10,("%s: %s: enter status=%d\n", device_xname(sc->aue_dev),
+	DPRINTFN(10,("%s: %s: enter status=%d\n", device_xname(sc->aue_dev),
 		    __func__, status));
 
 	ifp->if_timer = 0;
@@ -1291,7 +1257,7 @@
 {
 	struct aue_softc	*sc = xsc;
 
-        DPRINTFN(15,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
+	DPRINTFN(15,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
 
 	if (sc == NULL)
 		return;
@@ -1311,7 +1277,7 @@
 	struct mii_data		*mii;
 	int			s;
 
-        DPRINTFN(15,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
+	DPRINTFN(15,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
 
 	if (sc->aue_dying)
 		return;
@@ -1329,14 +1295,14 @@
 		if (mii->mii_media_status & IFM_ACTIVE &&
 		    IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
 			DPRINTFN(2,("%s: %s: got link\n",
-                                    device_xname(sc->aue_dev),__func__));
+			    device_xname(sc->aue_dev), __func__));
 			sc->aue_link++;
 			if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
 				aue_start(ifp);
 		}
 	}
 
-        callout_reset(&(sc->aue_stat_ch), (hz), (aue_tick), (sc));
+	callout_reset(&(sc->aue_stat_ch), (hz), (aue_tick), (sc));
 
 	splx(s);
 }
@@ -1348,7 +1314,7 @@
 	struct aue_chain	*c;
 	usbd_status		err;
 
-        DPRINTFN(10,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
+	DPRINTFN(10,("%s: %s: enter\n", device_xname(sc->aue_dev),__func__));
 
 	c = &sc->aue_cdata.aue_tx_chain[idx];
 
@@ -1383,7 +1349,7 @@
 		    USB_TASKQ_DRIVER);
 		return (EIO);
 	}
-        DPRINTFN(5,("%s: %s: send %d bytes\n", device_xname(sc->aue_dev),
+	DPRINTFN(5,("%s: %s: send %d bytes\n", device_xname(sc->aue_dev),
 		    __func__, total_len));
 
 	sc->aue_cdata.aue_tx_cnt++;
@@ -1397,7 +1363,7 @@
 	struct aue_softc	*sc = ifp->if_softc;
 	struct mbuf		*m_head = NULL;
 
-        DPRINTFN(5,("%s: %s: enter, link=%d\n", device_xname(sc->aue_dev),
+	DPRINTFN(5,("%s: %s: enter, link=%d\n", device_xname(sc->aue_dev),
 		    __func__, sc->aue_link));
 
 	if (sc->aue_dying)
@@ -1446,7 +1412,7 @@
 	int			i, s;
 	const u_char		*eaddr;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	if (sc->aue_dying)
 		return;
@@ -1461,11 +1427,7 @@
 	 */
 	aue_reset(sc);
 
-#if defined(__OpenBSD__)
-	eaddr = sc->arpcom.ac_enaddr;
-#elif defined(__NetBSD__)
 	eaddr = CLLADDR(ifp->if_sadl);
-#endif /* defined(__NetBSD__) */
 	for (i = 0; i < ETHER_ADDR_LEN; i++)
 		aue_csr_write_1(sc, AUE_PAR0 + i, eaddr[i]);
 
@@ -1511,7 +1473,7 @@
 
 	splx(s);
 
-        callout_reset(&(sc->aue_stat_ch), (hz), (aue_tick), (sc));
+	callout_reset(&(sc->aue_stat_ch), (hz), (aue_tick), (sc));
 }
 
 Static int
@@ -1554,7 +1516,7 @@
 		    USBD_SHORT_XFER_OK | USBD_NO_COPY, USBD_NO_TIMEOUT,
 		    aue_rxeof);
 		(void)usbd_transfer(c->aue_xfer); /* XXX */
-                DPRINTFN(5,("%s: %s: start read\n", device_xname(sc->aue_dev),
+		DPRINTFN(5,("%s: %s: start read\n", device_xname(sc->aue_dev),
 			    __func__));
 
 	}
@@ -1571,7 +1533,7 @@
 	struct mii_data		*mii = GET_MII(sc);
 	int rc;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	if (sc->aue_dying)
 		return (0);
@@ -1604,11 +1566,7 @@
 		switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
 		case AF_INET:
-#if defined(__NetBSD__)
 			arp_ifinit(ifp, ifa);
-#else
-			arp_ifinit(&sc->arpcom, ifa);
-#endif
 			break;
 #endif /* INET */
 		}
@@ -1648,12 +1606,7 @@
 	case SIOCSIFMEDIA:
 		if ((error = ether_ioctl(ifp, command, data)) == ENETRESET) {
 			if (ifp->if_flags & IFF_RUNNING) {
-#if defined(__NetBSD__)
 				cv_signal(&sc->aue_domc);
-#else
-				aue_init(sc);
-				aue_setmulti(sc);
-#endif
 			}
 			error = 0;
 		}
@@ -1676,7 +1629,7 @@
 	usbd_status		stat;
 	int			s;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	ifp->if_oerrors++;
 	aprint_error_dev(sc->aue_dev, "watchdog timeout\n");
@@ -1702,7 +1655,7 @@
 	struct ifnet		*ifp;
 	int			i;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
 	ifp = GET_IFP(sc);
 	ifp->if_timer = 0;
@@ -1710,19 +1663,19 @@
 	aue_csr_write_1(sc, AUE_CTL0, 0);
 	aue_csr_write_1(sc, AUE_CTL1, 0);
 	aue_reset(sc);
-        callout_stop(&(sc->aue_stat_ch));
+	callout_stop(&(sc->aue_stat_ch));
 
 	/* Stop transfers. */
 	if (sc->aue_ep[AUE_ENDPT_RX] != NULL) {
 		err = usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_RX]);
 		if (err) {
 			printf("%s: abort rx pipe failed: %s\n",
-                            device_xname(sc->aue_dev), usbd_errstr(err));
+			    device_xname(sc->aue_dev), usbd_errstr(err));
 		}
 		err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_RX]);
 		if (err) {
 			printf("%s: close rx pipe failed: %s\n",
-                            device_xname(sc->aue_dev), usbd_errstr(err));
+			    device_xname(sc->aue_dev), usbd_errstr(err));
 		}
 		sc->aue_ep[AUE_ENDPT_RX] = NULL;
 	}
@@ -1731,12 +1684,12 @@
 		err = usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_TX]);
 		if (err) {
 			printf("%s: abort tx pipe failed: %s\n",
-                            device_xname(sc->aue_dev), usbd_errstr(err));
+			    device_xname(sc->aue_dev), usbd_errstr(err));
 		}
 		err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_TX]);
 		if (err) {
 			printf("%s: close tx pipe failed: %s\n",
-                            device_xname(sc->aue_dev), usbd_errstr(err));
+			    device_xname(sc->aue_dev), usbd_errstr(err));
 		}
 		sc->aue_ep[AUE_ENDPT_TX] = NULL;
 	}
@@ -1745,12 +1698,12 @@
 		err = usbd_abort_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
 		if (err) {
 			printf("%s: abort intr pipe failed: %s\n",
-                            device_xname(sc->aue_dev), usbd_errstr(err));
+			    device_xname(sc->aue_dev), usbd_errstr(err));
 		}
 		err = usbd_close_pipe(sc->aue_ep[AUE_ENDPT_INTR]);
 		if (err) {
 			printf("%s: close intr pipe failed: %s\n",
-                            device_xname(sc->aue_dev), usbd_errstr(err));
+			    device_xname(sc->aue_dev), usbd_errstr(err));
 		}
 		sc->aue_ep[AUE_ENDPT_INTR] = NULL;
 	}
@@ -1784,31 +1737,30 @@
 	ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
 }
 
-#if defined(__NetBSD__)
 Static void
-aue_multithread(void *arg) {
-        struct aue_softc *sc;
-        int s;
+aue_multithread(void *arg)
+{
+	struct aue_softc *sc;
+	int s;
 
-        sc = (struct aue_softc *)arg;
+	sc = (struct aue_softc *)arg;
 
-        while (1) {
+	while (1) {
 		mutex_enter(&sc->aue_mcmtx);
 		cv_wait(&sc->aue_domc,&sc->aue_mcmtx);
 		mutex_exit(&sc->aue_mcmtx);
 
-                if (sc->aue_closing)
-                        break;
+		if (sc->aue_closing)
+			break;
 
-                s = splnet();
-                aue_init(sc);
-                /* XXX called by aue_init, but rc ifconfig hangs without it: */
-                aue_setmulti(sc);
-                splx(s);
-        }
+		s = splnet();
+		aue_init(sc);
+		/* XXX called by aue_init, but rc ifconfig hangs without it: */
+		aue_setmulti(sc);
+		splx(s);
+	}
 
 	cv_signal(&sc->aue_closemc);
 
-        kthread_exit(0);
+	kthread_exit(0);
 }
-#endif

Index: src/sys/dev/usb/if_auereg.h
diff -u src/sys/dev/usb/if_auereg.h:1.22 src/sys/dev/usb/if_auereg.h:1.23
--- src/sys/dev/usb/if_auereg.h:1.22	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_auereg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_auereg.h,v 1.22 2009/09/04 17:53:58 dyoung Exp $	*/
+/*	$NetBSD: if_auereg.h,v 1.23 2009/09/04 18:10:08 dyoung Exp $	*/
 /*
  * Copyright (c) 1997, 1998, 1999
  *	Bill Paul <wp...@ee.columbia.edu>.  All rights reserved.
@@ -224,7 +224,7 @@
 };
 
 struct aue_softc {
-        device_t aue_dev;
+	device_t aue_dev;
 
 	struct ethercom		aue_ec;
 	struct mii_data		aue_mii;
@@ -239,7 +239,7 @@
 #define GET_IFP(sc) (&(sc)->aue_ec.ec_if)
 #define GET_MII(sc) (&(sc)->aue_mii)
 
-        struct callout aue_stat_ch;
+	struct callout aue_stat_ch;
 
 	usbd_device_handle	aue_udev;
 	usbd_interface_handle	aue_iface;

Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.27 src/sys/dev/usb/if_axe.c:1.28
--- src/sys/dev/usb/if_axe.c:1.27	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_axe.c	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axe.c,v 1.27 2009/09/04 17:53:58 dyoung Exp $	*/
+/*	$NetBSD: if_axe.c,v 1.28 2009/09/04 18:10:08 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.27 2009/09/04 17:53:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.28 2009/09/04 18:10:08 dyoung Exp $");
 
 #if defined(__NetBSD__)
 #include "opt_inet.h"
@@ -211,7 +211,7 @@
 {
 	mutex_exit(&sc->axe_mii_lock);
 	if (--sc->axe_refcnt < 0)
-                usb_detach_wakeup((sc->axe_dev));
+		usb_detach_wakeup((sc->axe_dev));
 }
 
 Static int
@@ -245,7 +245,7 @@
 Static int
 axe_miibus_readreg(device_t dev, int phy, int reg)
 {
-        struct axe_softc *sc = device_private(dev);
+	struct axe_softc *sc = device_private(dev);
 	usbd_status		err;
 	u_int16_t		val;
 
@@ -291,7 +291,7 @@
 Static void
 axe_miibus_writereg(device_t dev, int phy, int reg, int aval)
 {
-        struct axe_softc *sc = device_private(dev);
+	struct axe_softc *sc = device_private(dev);
 	usbd_status		err;
 	u_int16_t		val;
 
@@ -314,7 +314,7 @@
 Static void
 axe_miibus_statchg(device_t dev)
 {
-        struct axe_softc *sc = device_private(dev);
+	struct axe_softc *sc = device_private(dev);
 	struct mii_data		*mii = GET_MII(sc);
 	int val, err;
 
@@ -427,14 +427,15 @@
 	int i, s;
 
 	devinfop = usbd_devinfo_alloc(dev, 0);
-        do { aprint_naive("\n"); aprint_normal("\n"); } while (0);
+	aprint_naive("\n");
+	aprint_normal("\n");
 	sc->axe_dev = self;
 
 	err = usbd_set_config_no(dev, AXE_CONFIG_NO, 1);
 	if (err) {
 		aprint_error_dev(self, "getting interface handle failed\n");
-                usbd_devinfo_free(devinfop);
-                return;
+		usbd_devinfo_free(devinfop);
+		return;
 	}
 
 	usb_init_task(&sc->axe_tick_task, axe_tick_task, sc);
@@ -444,8 +445,8 @@
 	err = usbd_device2interface_handle(dev, AXE_IFACE_IDX, &sc->axe_iface);
 	if (err) {
 		aprint_error_dev(self, "getting interface handle failed\n");
-                usbd_devinfo_free(devinfop);
-                return;
+		usbd_devinfo_free(devinfop);
+		return;
 	}
 
 	sc->axe_udev = dev;
@@ -462,7 +463,7 @@
 		ed = usbd_interface2endpoint_descriptor(sc->axe_iface, i);
 		if (!ed) {
 			aprint_error_dev(self, "couldn't get ep %d\n", i);
-                        return;
+			return;
 		}
 		if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
 		    UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
@@ -538,27 +539,26 @@
 
 	/* Attach the interface. */
 	if_attach(ifp);
-        ether_ifattach(ifp, eaddr);
+	ether_ifattach(ifp, eaddr);
 #if NRND > 0
-        rnd_attach_source(&sc->rnd_source, device_xname(sc->axe_dev),
+	rnd_attach_source(&sc->rnd_source, device_xname(sc->axe_dev),
 	    RND_TYPE_NET, 0);
 #endif
 
-        callout_init(&(sc->axe_stat_ch), 0);
+	callout_init(&(sc->axe_stat_ch), 0);
 
 	sc->axe_attached = 1;
 	splx(s);
 
-	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->axe_udev,
-                           (sc->axe_dev));
+	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->axe_udev, sc->axe_dev);
 
-        return;
+	return;
 }
 
 int
 axe_detach(device_t self, int flags)
 {
-        struct axe_softc *sc = device_private(self);
+	struct axe_softc *sc = device_private(self);
 	int			s;
 	struct ifnet		*ifp = GET_IFP(sc);
 
@@ -568,7 +568,7 @@
 	if (!sc->axe_attached)
 		return (0);
 
-        callout_stop(&(sc->axe_stat_ch));
+	callout_stop(&(sc->axe_stat_ch));
 
 	sc->axe_dying = 1;
 
@@ -592,7 +592,7 @@
 
 	if (--sc->axe_refcnt >= 0) {
 		/* Wait for processes to go away */
-                usb_detach_wait((sc->axe_dev));
+		usb_detach_wait((sc->axe_dev));
 	}
 
 	if (ifp->if_flags & IFF_RUNNING)
@@ -619,12 +619,11 @@
 
 	if (--sc->axe_refcnt >= 0) {
 		/* Wait for processes to go away. */
-                usb_detach_wait((sc->axe_dev));
+		usb_detach_wait((sc->axe_dev));
 	}
 	splx(s);
 
-        usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->axe_udev,
-                           (sc->axe_dev));
+	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->axe_udev, sc->axe_dev);
 
 	return (0);
 }
@@ -807,7 +806,7 @@
 			return;
 		if (usbd_ratecheck(&sc->axe_rx_notice)) {
 			printf("%s: usb errors on rx: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(status));
+			    device_xname(sc->axe_dev), usbd_errstr(status));
 		}
 		if (status == USBD_STALLED)
 			usbd_clear_endpoint_stall_async(sc->axe_ep[AXE_ENDPT_RX]);
@@ -848,7 +847,7 @@
 
 	DPRINTFN(10,("%s: %s: deliver %d\n", USBDEVNAME(sc->axe_dev),
 		    __func__, m->m_len));
-        (*(ifp)->if_input)((ifp), (m));
+	(*(ifp)->if_input)((ifp), (m));
  done1:
 	splx(s);
 
@@ -895,8 +894,8 @@
 			return;
 		}
 		ifp->if_oerrors++;
-                printf("%s: usb error on tx: %s\n", device_xname(sc->axe_dev),
-                    usbd_errstr(status));
+		printf("%s: usb error on tx: %s\n", device_xname(sc->axe_dev),
+		    usbd_errstr(status));
 		if (status == USBD_STALLED)
 			usbd_clear_endpoint_stall_async(sc->axe_ep[AXE_ENDPT_TX]);
 		splx(s);
@@ -961,7 +960,7 @@
 
 	mii_tick(mii);
 
-        callout_reset(&(sc->axe_stat_ch), (hz), (axe_tick), (sc));
+	callout_reset(&(sc->axe_stat_ch), (hz), (axe_tick), (sc));
 
 	splx(s);
 }
@@ -1062,14 +1061,14 @@
 
 	/* Init RX ring. */
 	if (axe_rx_list_init(sc) == ENOBUFS) {
-                printf("%s: rx list init failed\n", device_xname(sc->axe_dev));
+		printf("%s: rx list init failed\n", device_xname(sc->axe_dev));
 		splx(s);
 		return;
 	}
 
 	/* Init TX ring. */
 	if (axe_tx_list_init(sc) == ENOBUFS) {
-                printf("%s: tx list init failed\n", device_xname(sc->axe_dev));
+		printf("%s: tx list init failed\n", device_xname(sc->axe_dev));
 		splx(s);
 		return;
 	}
@@ -1101,7 +1100,7 @@
 	    USBD_EXCLUSIVE_USE, &sc->axe_ep[AXE_ENDPT_RX]);
 	if (err) {
 		printf("%s: open rx pipe failed: %s\n",
-                    device_xname(sc->axe_dev), usbd_errstr(err));
+		    device_xname(sc->axe_dev), usbd_errstr(err));
 		splx(s);
 		return;
 	}
@@ -1110,7 +1109,7 @@
 	    USBD_EXCLUSIVE_USE, &sc->axe_ep[AXE_ENDPT_TX]);
 	if (err) {
 		printf("%s: open tx pipe failed: %s\n",
-                    device_xname(sc->axe_dev), usbd_errstr(err));
+		    device_xname(sc->axe_dev), usbd_errstr(err));
 		splx(s);
 		return;
 	}
@@ -1129,8 +1128,8 @@
 
 	splx(s);
 
-        callout_init(&(sc->axe_stat_ch), 0);
-        callout_reset(&(sc->axe_stat_ch), (hz), (axe_tick), (sc));
+	callout_init(&(sc->axe_stat_ch), 0);
+	callout_reset(&(sc->axe_stat_ch), (hz), (axe_tick), (sc));
 	return;
 }
 
@@ -1244,7 +1243,7 @@
 	sc = ifp->if_softc;
 
 	ifp->if_oerrors++;
-        printf("%s: watchdog timeout\n", device_xname(sc->axe_dev));
+	printf("%s: watchdog timeout\n", device_xname(sc->axe_dev));
 
 	s = splusb();
 	c = &sc->axe_cdata.axe_tx_chain[0];
@@ -1272,19 +1271,19 @@
 	ifp = GET_IFP(sc);
 	ifp->if_timer = 0;
 
-        callout_stop(&(sc->axe_stat_ch));
+	callout_stop(&(sc->axe_stat_ch));
 
 	/* Stop transfers. */
 	if (sc->axe_ep[AXE_ENDPT_RX] != NULL) {
 		err = usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_RX]);
 		if (err) {
 			printf("%s: abort rx pipe failed: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(err));
+			    device_xname(sc->axe_dev), usbd_errstr(err));
 		}
 		err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_RX]);
 		if (err) {
 			printf("%s: close rx pipe failed: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(err));
+			    device_xname(sc->axe_dev), usbd_errstr(err));
 		}
 		sc->axe_ep[AXE_ENDPT_RX] = NULL;
 	}
@@ -1293,12 +1292,12 @@
 		err = usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_TX]);
 		if (err) {
 			printf("%s: abort tx pipe failed: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(err));
+			    device_xname(sc->axe_dev), usbd_errstr(err));
 		}
 		err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_TX]);
 		if (err) {
 			printf("%s: close tx pipe failed: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(err));
+			    device_xname(sc->axe_dev), usbd_errstr(err));
 		}
 		sc->axe_ep[AXE_ENDPT_TX] = NULL;
 	}
@@ -1307,12 +1306,12 @@
 		err = usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
 		if (err) {
 			printf("%s: abort intr pipe failed: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(err));
+			    device_xname(sc->axe_dev), usbd_errstr(err));
 		}
 		err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_INTR]);
 		if (err) {
 			printf("%s: close intr pipe failed: %s\n",
-                            device_xname(sc->axe_dev), usbd_errstr(err));
+			    device_xname(sc->axe_dev), usbd_errstr(err));
 		}
 		sc->axe_ep[AXE_ENDPT_INTR] = NULL;
 	}

Index: src/sys/dev/usb/if_axereg.h
diff -u src/sys/dev/usb/if_axereg.h:1.6 src/sys/dev/usb/if_axereg.h:1.7
--- src/sys/dev/usb/if_axereg.h:1.6	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_axereg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axereg.h,v 1.6 2009/09/04 17:53:58 dyoung Exp $	*/
+/*	$NetBSD: if_axereg.h,v 1.7 2009/09/04 18:10:08 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003
@@ -151,7 +151,7 @@
 #define AXE_INC(x, y)		(x) = (x + 1) % y
 
 struct axe_softc {
-        device_t axe_dev;
+	device_t axe_dev;
 	struct ethercom		axe_ec;
 	struct mii_data		axe_mii;
 #if NRND > 0
@@ -169,7 +169,7 @@
 	usbd_pipe_handle	axe_ep[AXE_ENDPT_MAX];
 	int			axe_if_flags;
 	struct axe_cdata	axe_cdata;
-        struct callout axe_stat_ch;
+	struct callout axe_stat_ch;
 
 	int			axe_refcnt;
 	char			axe_dying;

Index: src/sys/dev/usb/if_cdce.c
diff -u src/sys/dev/usb/if_cdce.c:1.23 src/sys/dev/usb/if_cdce.c:1.24
--- src/sys/dev/usb/if_cdce.c:1.23	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_cdce.c	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cdce.c,v 1.23 2009/09/04 17:53:58 dyoung Exp $ */
+/*	$NetBSD: if_cdce.c,v 1.24 2009/09/04 18:10:08 dyoung Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wp...@windriver.com>
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.23 2009/09/04 17:53:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.24 2009/09/04 18:10:08 dyoung Exp $");
 #include "bpfilter.h"
 #ifdef	__NetBSD__
 #include "opt_inet.h"
@@ -55,18 +55,13 @@
 #include <sys/kernel.h>
 #include <sys/socket.h>
 #include <sys/device.h>
-#if defined(__OpenBSD__)
-#include <sys/proc.h>
-#endif
 
 #if NRND > 0
 #include <sys/rnd.h>
 #endif
 
 #include <net/if.h>
-#if defined(__NetBSD__)
 #include <net/if_arp.h>
-#endif
 #include <net/if_dl.h>
 #include <net/if_media.h>
 
@@ -76,23 +71,12 @@
 #include <net/bpf.h>
 #endif
 
-#if defined(__NetBSD__)
 #include <net/if_ether.h>
 #ifdef INET
 #include <netinet/in.h>
 #include <netinet/if_inarp.h>
 #endif
-#endif /* defined(__NetBSD__) */
 
-#if defined(__OpenBSD__)
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/if_ether.h>
-#endif
-#endif /* defined(__OpenBSD__) */
 
 
 #include <dev/usb/usb.h>
@@ -191,7 +175,7 @@
 		    UDESC_CS_INTERFACE, UDESCSUB_CDC_UNION);
 		if (ud == NULL) {
 			aprint_error_dev(self, "no union descriptor\n");
-                        return;
+			return;
 		}
 		data_ifcno = ud->bSlaveInterface[0];
 
@@ -210,7 +194,7 @@
 
 	if (sc->cdce_data_iface == NULL) {
 		aprint_error_dev(self, "no data interface\n");
-                return;
+		return;
 	}
 
 	/*
@@ -239,7 +223,7 @@
 		if (usbd_set_interface(sc->cdce_data_iface, j)) {
 			aprint_error_dev(sc->cdce_dev,
 					"setting alternate interface failed\n");
-                        return;
+			return;
 		}
 		/* Find endpoints. */
 		id = usbd_get_interface_descriptor(sc->cdce_data_iface);
@@ -249,7 +233,7 @@
 			if (!ed) {
 				aprint_error_dev(self,
 						"could not read endpoint descriptor\n");
-                                return;
+				return;
 			}
 			if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
 					UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
@@ -272,15 +256,15 @@
 
 	if (sc->cdce_bulkin_no == -1) {
 		aprint_error_dev(self, "could not find data bulk in\n");
-                return;
+		return;
 	}
 	if (sc->cdce_bulkout_no == -1 ) {
 		aprint_error_dev(self, "could not find data bulk out\n");
-                return;
+		return;
 	}
 
 	ue = (const usb_cdc_ethernet_descriptor_t *)usb_find_desc(dev,
-            UDESC_INTERFACE, UDESCSUB_CDC_ENF);
+	    UDESC_INTERFACE, UDESCSUB_CDC_ENF);
 	if (!ue || usbd_get_string(dev, ue->iMacAddress, eaddr_str)) {
 		aprint_normal_dev(self, "faking address\n");
 		eaddr[0]= 0x2a;
@@ -300,26 +284,26 @@
 	ifp->if_ioctl = cdce_ioctl;
 	ifp->if_start = cdce_start;
 	ifp->if_watchdog = cdce_watchdog;
-        strncpy(ifp->if_xname, device_xname(sc->cdce_dev), IFNAMSIZ);
+	strncpy(ifp->if_xname, device_xname(sc->cdce_dev), IFNAMSIZ);
 
 	IFQ_SET_READY(&ifp->if_snd);
 
 	if_attach(ifp);
-        ether_ifattach(ifp, eaddr);
+	ether_ifattach(ifp, eaddr);
 
 	sc->cdce_attached = 1;
 	splx(s);
 
 	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->cdce_udev,
-            (sc->cdce_dev));
+	    sc->cdce_dev);
 
-        return;
+	return;
 }
 
 int
 cdce_detach(device_t self, int flags)
 {
-        struct cdce_softc *sc = device_private(self);
+	struct cdce_softc *sc = device_private(self);
 	struct ifnet	*ifp = GET_IFP(sc);
 	int		 s;
 
@@ -419,11 +403,11 @@
 		err = usbd_abort_pipe(sc->cdce_bulkin_pipe);
 		if (err)
 			printf("%s: abort rx pipe failed: %s\n",
-                            device_xname(sc->cdce_dev), usbd_errstr(err));
+			    device_xname(sc->cdce_dev), usbd_errstr(err));
 		err = usbd_close_pipe(sc->cdce_bulkin_pipe);
 		if (err)
 			printf("%s: close rx pipe failed: %s\n",
-                            device_xname(sc->cdce_dev), usbd_errstr(err));
+			    device_xname(sc->cdce_dev), usbd_errstr(err));
 		sc->cdce_bulkin_pipe = NULL;
 	}
 
@@ -431,11 +415,11 @@
 		err = usbd_abort_pipe(sc->cdce_bulkout_pipe);
 		if (err)
 			printf("%s: abort tx pipe failed: %s\n",
-                            device_xname(sc->cdce_dev), usbd_errstr(err));
+			    device_xname(sc->cdce_dev), usbd_errstr(err));
 		err = usbd_close_pipe(sc->cdce_bulkout_pipe);
 		if (err)
 			printf("%s: close tx pipe failed: %s\n",
-                            device_xname(sc->cdce_dev), usbd_errstr(err));
+			    device_xname(sc->cdce_dev), usbd_errstr(err));
 		sc->cdce_bulkout_pipe = NULL;
 	}
 
@@ -484,11 +468,7 @@
 		switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
 		case AF_INET:
-#if defined(__NetBSD__)
 			arp_ifinit(ifp, ifa);
-#else
-			arp_ifinit(&sc->arpcom, ifa);
-#endif
 			break;
 #endif /* INET */
 		}
@@ -536,7 +516,7 @@
 		return;
 
 	ifp->if_oerrors++;
-        printf("%s: watchdog timeout\n", device_xname(sc->cdce_dev));
+	printf("%s: watchdog timeout\n", device_xname(sc->cdce_dev));
 }
 
 Static void
@@ -554,13 +534,13 @@
 	s = splnet();
 
 	if (cdce_tx_list_init(sc) == ENOBUFS) {
-                printf("%s: tx list init failed\n", device_xname(sc->cdce_dev));
+		printf("%s: tx list init failed\n", device_xname(sc->cdce_dev));
 		splx(s);
 		return;
 	}
 
 	if (cdce_rx_list_init(sc) == ENOBUFS) {
-                printf("%s: rx list init failed\n", device_xname(sc->cdce_dev));
+		printf("%s: rx list init failed\n", device_xname(sc->cdce_dev));
 		splx(s);
 		return;
 	}
@@ -570,7 +550,7 @@
 	err = usbd_open_pipe(sc->cdce_data_iface, sc->cdce_bulkin_no,
 	    USBD_EXCLUSIVE_USE, &sc->cdce_bulkin_pipe);
 	if (err) {
-                printf("%s: open rx pipe failed: %s\n", device_xname(sc->cdce_dev),
+		printf("%s: open rx pipe failed: %s\n", device_xname(sc->cdce_dev),
 		    usbd_errstr(err));
 		splx(s);
 		return;
@@ -579,8 +559,8 @@
 	err = usbd_open_pipe(sc->cdce_data_iface, sc->cdce_bulkout_no,
 	    USBD_EXCLUSIVE_USE, &sc->cdce_bulkout_pipe);
 	if (err) {
-                printf("%s: open tx pipe failed: %s\n", device_xname(sc->cdce_dev),
-		    usbd_errstr(err));
+		printf("%s: open tx pipe failed: %s\n",
+		    device_xname(sc->cdce_dev), usbd_errstr(err));
 		splx(s);
 		return;
 	}
@@ -608,13 +588,13 @@
 		MGETHDR(m_new, M_DONTWAIT, MT_DATA);
 		if (m_new == NULL) {
 			printf("%s: no memory for rx list "
-                            "-- packet dropped!\n", device_xname(sc->cdce_dev));
+			    "-- packet dropped!\n", device_xname(sc->cdce_dev));
 			return (ENOBUFS);
 		}
 		MCLGET(m_new, M_DONTWAIT);
 		if (!(m_new->m_flags & M_EXT)) {
 			printf("%s: no memory for rx list "
-                            "-- packet dropped!\n", device_xname(sc->cdce_dev));
+			    "-- packet dropped!\n", device_xname(sc->cdce_dev));
 			m_freem(m_new);
 			return (ENOBUFS);
 		}
@@ -699,7 +679,7 @@
 			return;
 		if (sc->cdce_rxeof_errors == 0)
 			printf("%s: usb error on rx: %s\n",
-                            device_xname(sc->cdce_dev), usbd_errstr(status));
+			    device_xname(sc->cdce_dev), usbd_errstr(status));
 		if (status == USBD_STALLED)
 			usbd_clear_endpoint_stall_async(sc->cdce_bulkin_pipe);
 		DELAY(sc->cdce_rxeof_errors * 10000);
@@ -739,7 +719,7 @@
 		BPF_MTAP(ifp, m);
 #endif
 
-        (*(ifp)->if_input)((ifp), (m));
+	(*(ifp)->if_input)((ifp), (m));
 
 done1:
 	splx(s);
@@ -776,8 +756,8 @@
 			return;
 		}
 		ifp->if_oerrors++;
-                printf("%s: usb error on tx: %s\n", device_xname(sc->cdce_dev),
-                    usbd_errstr(status));
+		printf("%s: usb error on tx: %s\n", device_xname(sc->cdce_dev),
+		    usbd_errstr(status));
 		if (status == USBD_STALLED)
 			usbd_clear_endpoint_stall_async(sc->cdce_bulkout_pipe);
 		splx(s);

Index: src/sys/dev/usb/if_cdcereg.h
diff -u src/sys/dev/usb/if_cdcereg.h:1.4 src/sys/dev/usb/if_cdcereg.h:1.5
--- src/sys/dev/usb/if_cdcereg.h:1.4	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_cdcereg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cdcereg.h,v 1.4 2009/09/04 17:53:58 dyoung Exp $ */
+/*	$NetBSD: if_cdcereg.h,v 1.5 2009/09/04 18:10:08 dyoung Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wp...@windriver.com>
@@ -66,7 +66,7 @@
 };
 
 struct cdce_softc {
-        device_t cdce_dev;
+	device_t cdce_dev;
 	struct ethercom		 cdce_ec;
 #if NRND > 0
 	rndsource_element_t	 rnd_source;
Index: src/sys/dev/usb/if_udavreg.h
diff -u src/sys/dev/usb/if_udavreg.h:1.4 src/sys/dev/usb/if_udavreg.h:1.5
--- src/sys/dev/usb/if_udavreg.h:1.4	Wed Dec  5 07:15:54 2007
+++ src/sys/dev/usb/if_udavreg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_udavreg.h,v 1.4 2007/12/05 07:15:54 ad Exp $	*/
+/*	$NetBSD: if_udavreg.h,v 1.5 2009/09/04 18:10:08 dyoung Exp $	*/
 /*	$nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $	*/
 /*
  * Copyright (c) 2003
@@ -196,7 +196,7 @@
 
 	int                     sc_attached;
 	int			sc_dying;
-        int                     sc_refcnt;
+	int                     sc_refcnt;
 
 	struct usb_task		sc_tick_task;
 	struct usb_task		sc_stop_task;
Index: src/sys/dev/usb/if_urlreg.h
diff -u src/sys/dev/usb/if_urlreg.h:1.4 src/sys/dev/usb/if_urlreg.h:1.5
--- src/sys/dev/usb/if_urlreg.h:1.4	Mon Aug 27 16:08:42 2007
+++ src/sys/dev/usb/if_urlreg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urlreg.h,v 1.4 2007/08/27 16:08:42 xtraeme Exp $	*/
+/*	$NetBSD: if_urlreg.h,v 1.5 2009/09/04 18:10:08 dyoung Exp $	*/
 /*
  * Copyright (c) 2001, 2002
  *     Shingo WATANABE <n...@nabechan.org>.  All rights reserved.
@@ -182,7 +182,7 @@
 
 	int                     sc_attached;
 	int			sc_dying;
-        int                     sc_refcnt;
+	int                     sc_refcnt;
 
 	struct usb_task		sc_tick_task;
 	struct usb_task		sc_stop_task;

Index: src/sys/dev/usb/if_cuereg.h
diff -u src/sys/dev/usb/if_cuereg.h:1.15 src/sys/dev/usb/if_cuereg.h:1.16
--- src/sys/dev/usb/if_cuereg.h:1.15	Fri Sep  4 17:53:58 2009
+++ src/sys/dev/usb/if_cuereg.h	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cuereg.h,v 1.15 2009/09/04 17:53:58 dyoung Exp $	*/
+/*	$NetBSD: if_cuereg.h,v 1.16 2009/09/04 18:10:08 dyoung Exp $	*/
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wp...@ee.columbia.edu>.  All rights reserved.
@@ -165,7 +165,7 @@
 };
 
 struct cue_softc {
-        device_t cue_dev;
+	device_t cue_dev;
 
 	struct ethercom		cue_ec;
 #if NRND > 0
@@ -173,7 +173,7 @@
 #endif
 #define GET_IFP(sc) (&(sc)->cue_ec.ec_if)
 
-        struct callout cue_stat_ch;
+	struct callout cue_stat_ch;
 
 	usbd_device_handle	cue_udev;
 	usbd_interface_handle	cue_iface;

Index: src/sys/dev/usb/if_kue.c
diff -u src/sys/dev/usb/if_kue.c:1.64 src/sys/dev/usb/if_kue.c:1.65
--- src/sys/dev/usb/if_kue.c:1.64	Fri Nov  7 00:20:12 2008
+++ src/sys/dev/usb/if_kue.c	Fri Sep  4 18:10:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_kue.c,v 1.64 2008/11/07 00:20:12 dyoung Exp $	*/
+/*	$NetBSD: if_kue.c,v 1.65 2009/09/04 18:10:08 dyoung Exp $	*/
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wp...@ee.columbia.edu>.  All rights reserved.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.64 2008/11/07 00:20:12 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.65 2009/09/04 18:10:08 dyoung Exp $");
 
 #if defined(__NetBSD__)
 #include "opt_inet.h"
@@ -257,14 +257,14 @@
 	 * so we have to avoid this condition if we don't want
 	 * to look stupid.
 	 *
-         * We can test this quickly by checking the bcdRevision
-         * code. The NIC will return a different revision code if
-         * it's probed while the firmware is still loaded and
-         * running.
-         */
+	 * We can test this quickly by checking the bcdRevision
+	 * code. The NIC will return a different revision code if
+	 * it's probed while the firmware is still loaded and
+	 * running.
+	 */
 	if (usbd_get_device_desc(sc->kue_udev, &dd))
 		return (EIO);
-        if (UGETW(dd.bcdDevice) == KUE_WARM_REV) {
+	if (UGETW(dd.bcdDevice) == KUE_WARM_REV) {
 		printf("%s: warm boot, no firmware download\n",
 		       USBDEVNAME(sc->kue_dev));
 		return (0);

Reply via email to