Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2006 08:39:18 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 91871 for review
Message-ID:  <200602160839.k1G8dIRA094425@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=91871

Change 91871 by imp@imp_harmony on 2006/02/16 08:38:32

	IFC @91870

Affected files ...

.. //depot/projects/arm/src/sys/alpha/alpha/machdep.c#4 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/identcpu.c#5 integrate
.. //depot/projects/arm/src/sys/conf/files.amd64#8 integrate
.. //depot/projects/arm/src/sys/conf/files.i386#10 integrate
.. //depot/projects/arm/src/sys/dev/asr/asr.c#7 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#12 integrate
.. //depot/projects/arm/src/sys/dev/ath/ath_rate/sample/sample.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ath/if_ath.c#6 integrate
.. //depot/projects/arm/src/sys/dev/ath/if_athvar.h#5 integrate
.. //depot/projects/arm/src/sys/dev/bfe/if_bfe.c#4 integrate
.. //depot/projects/arm/src/sys/dev/dc/if_dc.c#5 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em.c#15 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em.h#6 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em_osdep.h#4 integrate
.. //depot/projects/arm/src/sys/dev/fxp/if_fxp.c#8 integrate
.. //depot/projects/arm/src/sys/dev/ipmi/ipmi.c#2 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp.c#5 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#5 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.h#6 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_ioctl.h#4 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_library.c#2 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_library.h#2 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_pci.c#7 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_sbus.c#4 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_target.c#3 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_target.h#3 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_tpublic.h#3 integrate
.. //depot/projects/arm/src/sys/dev/isp/ispmbox.h#4 integrate
.. //depot/projects/arm/src/sys/dev/isp/ispreg.h#3 integrate
.. //depot/projects/arm/src/sys/dev/isp/ispvar.h#7 integrate
.. //depot/projects/arm/src/sys/dev/lge/if_lge.c#5 integrate
.. //depot/projects/arm/src/sys/dev/mii/mii.c#3 integrate
.. //depot/projects/arm/src/sys/dev/nge/if_nge.c#5 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/if_plip.c#4 integrate
.. //depot/projects/arm/src/sys/dev/re/if_re.c#7 integrate
.. //depot/projects/arm/src/sys/dev/sound/pci/ich.c#6 integrate
.. //depot/projects/arm/src/sys/dev/tx/if_tx.c#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_aue.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_axe.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_rue.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_udav.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/umass.c#9 integrate
.. //depot/projects/arm/src/sys/dev/usb/umct.c#2 integrate
.. //depot/projects/arm/src/sys/dev/vge/if_vge.c#5 integrate
.. //depot/projects/arm/src/sys/geom/mirror/g_mirror.c#8 integrate
.. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#9 integrate
.. //depot/projects/arm/src/sys/i386/i386/identcpu.c#10 integrate
.. //depot/projects/arm/src/sys/ia64/ia64/machdep.c#6 integrate
.. //depot/projects/arm/src/sys/kern/kern_condvar.c#3 integrate
.. //depot/projects/arm/src/sys/kern/kern_kse.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_sig.c#8 integrate
.. //depot/projects/arm/src/sys/kern/kern_synch.c#7 integrate
.. //depot/projects/arm/src/sys/kern/kern_thread.c#7 integrate
.. //depot/projects/arm/src/sys/kern/subr_sleepqueue.c#6 integrate
.. //depot/projects/arm/src/sys/kern/sys_process.c#5 integrate
.. //depot/projects/arm/src/sys/kern/uipc_socket.c#8 integrate
.. //depot/projects/arm/src/sys/modules/Makefile#12 integrate
.. //depot/projects/arm/src/sys/net/if_media.c#3 integrate
.. //depot/projects/arm/src/sys/net/if_media.h#3 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211.c#7 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_var.h#8 integrate
.. //depot/projects/arm/src/sys/netgraph/ng_ipfw.c#3 integrate
.. //depot/projects/arm/src/sys/netinet/ip_dummynet.c#6 integrate
.. //depot/projects/arm/src/sys/netinet/ip_dummynet.h#4 integrate
.. //depot/projects/arm/src/sys/netinet/ip_fw.h#5 integrate
.. //depot/projects/arm/src/sys/netinet6/nd6.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_pcn.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_rl.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_sf.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_sis.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_sk.c#5 integrate
.. //depot/projects/arm/src/sys/pci/if_ste.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_vr.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_wb.c#4 integrate
.. //depot/projects/arm/src/sys/pci/if_xl.c#5 integrate
.. //depot/projects/arm/src/sys/security/audit/audit.c#5 integrate
.. //depot/projects/arm/src/sys/security/audit/audit_bsm.c#2 integrate
.. //depot/projects/arm/src/sys/sparc64/sparc64/eeprom.c#4 integrate
.. //depot/projects/arm/src/sys/sparc64/sparc64/machdep.c#4 integrate
.. //depot/projects/arm/src/sys/sys/proc.h#9 integrate
.. //depot/projects/arm/src/sys/sys/sleepqueue.h#2 integrate
.. //depot/projects/arm/src/sys/ufs/ufs/ufs_quota.c#6 integrate
.. //depot/projects/arm/src/sys/vm/vm_page.c#8 integrate
.. //depot/projects/arm/src/usr.sbin/config/config.5#2 integrate

Differences ...

==== //depot/projects/arm/src/sys/alpha/alpha/machdep.c#4 (text+ko) ====

@@ -88,7 +88,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.236 2005/10/14 12:43:42 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.237 2006/02/14 14:50:10 jhb Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -250,7 +250,7 @@
 #endif
 	printf("real memory  = %ld (%ld MB)\n", alpha_ptob(Maxmem),
 	    alpha_ptob(Maxmem) / 1048576);
-	realmem = alpha_ptob(Maxmem);
+	realmem = Maxmem;
 
 	/*
 	 * Display any holes after the first chunk of extended memory.

==== //depot/projects/arm/src/sys/amd64/amd64/identcpu.c#5 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.143 2006/01/01 05:35:57 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.144 2006/02/15 14:48:59 dwmalone Exp $");
 
 #include "opt_cpu.h"
 
@@ -224,8 +224,8 @@
 				"\003RSVD2"	/* "Reserved" bit 2 */
 				"\004MON"	/* MONITOR/MWAIT Instructions */
 				"\005DS_CPL"	/* CPL Qualified Debug Store */
-				"\006<b5>"	/* Machine specific registers */
-				"\007<b6>"	/* Physical address extension */
+				"\006VMX"	/* Virtual Machine Extensions */
+				"\007<b6>"
 				"\010EST"	/* Enhanced SpeedStep */
 				"\011TM2"	/* Thermal Monitor 2 */
 				"\012<b9>"

==== //depot/projects/arm/src/sys/conf/files.amd64#8 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.81 2006/01/24 21:13:50 ambrisko Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.82 2006/02/13 17:56:24 ambrisko Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -155,6 +155,9 @@
 dev/if_ndis/if_ndis_pci.c	optional	ndis cardbus | ndis pci
 dev/if_ndis/if_ndis_usb.c	optional	ndis usb
 dev/io/iodev.c			optional	io
+dev/ipmi/ipmi.c			optional	ipmi
+dev/ipmi/ipmi_smbios.c		optional	ipmi isa
+dev/ipmi/ipmi_pci.c		optional	ipmi pci
 dev/fdc/fdc.c			optional	fdc
 dev/fdc/fdc_acpi.c		optional	fdc
 dev/fdc/fdc_isa.c		optional	fdc isa

==== //depot/projects/arm/src/sys/conf/files.i386#10 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.551 2006/01/31 23:11:34 rik Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.552 2006/02/13 17:56:24 ambrisko Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -183,6 +183,9 @@
 dev/if_ndis/if_ndis_pci.c	optional ndis cardbus | ndis pci
 dev/if_ndis/if_ndis_usb.c	optional ndis usb
 dev/io/iodev.c			optional io
+dev/ipmi/ipmi.c			optional ipmi
+dev/ipmi/ipmi_smbios.c		optional ipmi isa
+dev/ipmi/ipmi_pci.c		optional ipmi pci
 dev/kbd/kbd.c			optional atkbd | sc | ukbd | vt
 dev/lnc/if_lnc_isa.c		optional lnc isa
 dev/mem/memutil.c		optional mem

==== //depot/projects/arm/src/sys/dev/asr/asr.c#7 (text+ko) ====

@@ -165,7 +165,7 @@
 
 #include	<dev/asr/sys_info.h>
 
-__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.76 2006/02/05 05:05:27 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.77 2006/02/12 06:57:41 scottl Exp $");
 
 #define	ASR_VERSION	1
 #define	ASR_REVISION	'1'
@@ -387,7 +387,7 @@
 	struct cdev *ha_devt;
 } Asr_softc_t;
 
-static Asr_softc_t * Asr_softc;
+static Asr_softc_t *Asr_softc_list;
 
 /*
  *	Prototypes of the routines we have in this object.
@@ -1970,7 +1970,7 @@
 	  sizeof(I2O_SET_SYSTAB_HEADER), M_TEMP, M_WAITOK | M_ZERO)) == NULL) {
 		return (ENOMEM);
 	}
-	for (ha = Asr_softc; ha; ha = ha->ha_next) {
+	for (ha = Asr_softc_list; ha; ha = ha->ha_next) {
 		++SystemTable->NumberEntries;
 	}
 	if ((Message_Ptr = (PI2O_EXEC_SYS_TAB_SET_MESSAGE)malloc (
@@ -2001,7 +2001,7 @@
 	      &(Message_Ptr->StdMessageFrame)) & 0xF0) >> 2));
 	SG(sg, 0, I2O_SGL_FLAGS_DIR, SystemTable, sizeof(I2O_SET_SYSTAB_HEADER));
 	++sg;
-	for (ha = Asr_softc; ha; ha = ha->ha_next) {
+	for (ha = Asr_softc_list; ha; ha = ha->ha_next) {
 		SG(sg, 0,
 		  ((ha->ha_next)
 		    ? (I2O_SGL_FLAGS_DIR)
@@ -2408,7 +2408,7 @@
 	unit = device_get_unit(dev);
 	sc->ha_dev = dev;
 
-	if (Asr_softc == NULL) {
+	if (Asr_softc_list == NULL) {
 		/*
 		 *	Fixup the OS revision as saved in the dptsig for the
 		 *	engine (dptioctl.h) to pick up.
@@ -2420,7 +2420,7 @@
 	 */
 	LIST_INIT(&(sc->ha_ccb));
 	/* Link us into the HA list */
-	for (ha = &Asr_softc; *ha; ha = &((*ha)->ha_next));
+	for (ha = &Asr_softc_list; *ha; ha = &((*ha)->ha_next));
 		*(ha) = sc;
 
 	/*

==== //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#12 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.157 2006/02/09 20:54:42 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.158 2006/02/13 13:47:58 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -1658,6 +1658,18 @@
 						       RF_ACTIVE))) {
 		/* is AHCI or RAID mode enabled in BIOS ? */
 		if (pci_read_config(dev, 0x90, 1) & 0xc0) {
+
+		    /* reset AHCI controller */
+		    ATA_OUTL(ctlr->r_res2, ATA_AHCI_GHC,
+		    ATA_INL(ctlr->r_res2, ATA_AHCI_GHC) | ATA_AHCI_GHC_HR);
+		    DELAY(1000000);
+		    if (ATA_INL(ctlr->r_res2, ATA_AHCI_GHC) & ATA_AHCI_GHC_HR) {
+			bus_release_resource(dev, ctlr->r_type2, 
+					     ctlr->r_rid2, ctlr->r_res2);
+			device_printf(dev, "AHCI controller reset failure\n");
+			return ENXIO;
+    		    }
+
 		    /* enable AHCI mode */
 		    ATA_OUTL(ctlr->r_res2, ATA_AHCI_GHC, ATA_AHCI_GHC_AE);
 

==== //depot/projects/arm/src/sys/dev/ath/ath_rate/sample/sample.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.12 2006/02/09 20:49:55 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.13 2006/02/13 18:40:53 sam Exp $");
 
 /*
  * John Bicket's SampleRate control algorithm.
@@ -654,8 +654,7 @@
 		 * A fixed rate is to be used; ic_fixed_rate is an
 		 * index into the supported rate set.  Convert this
 		 * to the index into the negotiated rate set for
-		 * the node.  We know the rate is there because the
-		 * rate set is checked when the station associates.
+		 * the node.
 		 */
 		const struct ieee80211_rateset *rs =
 			&ic->ic_sup_rates[ic->ic_curmode];
@@ -666,7 +665,7 @@
 			;
 		KASSERT(srate >= 0,
 			("fixed rate %d not in rate set", ic->ic_fixed_rate));
-                sn->static_rate_ndx = srate;
+		sn->static_rate_ndx = srate;
 	}
 
         DPRINTF(sc, "%s: %s size 1600 rate/tt", __func__, ether_sprintf(ni->ni_macaddr));

==== //depot/projects/arm/src/sys/dev/ath/if_ath.c#6 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.126 2006/02/10 19:07:08 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.135 2006/02/15 18:36:52 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -256,13 +256,17 @@
 	if (sc->sc_debug & ATH_DEBUG_KEYCACHE)			\
 		ath_keyprint(__func__, ix, hk, mac);		\
 } while (0)
-static	void ath_printrxbuf(struct ath_buf *bf, int);
-static	void ath_printtxbuf(struct ath_buf *bf, int);
+static	void ath_printrxbuf(struct ath_buf *bf, u_int ix, int);
+static	void ath_printtxbuf(struct ath_buf *bf, u_int qnum, u_int ix, int done);
 #else
 #define	IFF_DUMPPKTS(sc, m) \
 	((sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2))
-#define	DPRINTF(m, fmt, ...)
-#define	KEYPRINTF(sc, k, ix, mac)
+#define	DPRINTF(sc, m, fmt, ...) do {				\
+	(void) sc;						\
+} while (0)
+#define	KEYPRINTF(sc, k, ix, mac) do {				\
+	(void) sc;						\
+} while (0)
 #endif
 
 MALLOC_DEFINE(M_ATHDEV, "athdev", "ath driver dma buffers");
@@ -394,7 +398,6 @@
 
 	TASK_INIT(&sc->sc_rxtask, 0, ath_rx_proc, sc);
 	TASK_INIT(&sc->sc_rxorntask, 0, ath_rxorn_proc, sc);
-	TASK_INIT(&sc->sc_fataltask, 0, ath_fatal_proc, sc);
 	TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc);
 	TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc);
 	TASK_INIT(&sc->sc_radartask, 0, ath_radar_proc, sc);
@@ -745,15 +748,9 @@
 	DPRINTF(sc, ATH_DEBUG_INTR, "%s: status 0x%x\n", __func__, status);
 	status &= sc->sc_imask;			/* discard unasked for bits */
 	if (status & HAL_INT_FATAL) {
-		/*
-		 * Fatal errors are unrecoverable.  Typically
-		 * these are caused by DMA errors.  Unfortunately
-		 * the exact reason is not (presently) returned
-		 * by the hal.
-		 */
 		sc->sc_stats.ast_hardware++;
 		ath_hal_intrset(ah, 0);		/* disable intr's until reset */
-		taskqueue_enqueue(sc->sc_tq, &sc->sc_fataltask);
+		ath_fatal_proc(sc, 0);
 	} else if (status & HAL_INT_RXORN) {
 		sc->sc_stats.ast_rxorn++;
 		ath_hal_intrset(ah, 0);		/* disable intr's until reset */
@@ -812,8 +809,21 @@
 {
 	struct ath_softc *sc = arg;
 	struct ifnet *ifp = sc->sc_ifp;
+	u_int32_t *state;
+	u_int32_t len;
 
 	if_printf(ifp, "hardware error; resetting\n");
+	/*
+	 * Fatal errors are unrecoverable.  Typically these
+	 * are caused by DMA errors.  Collect h/w state from
+	 * the hal so we can diagnose what's going on.
+	 */
+	if (ath_hal_getfatalstate(sc->sc_ah, &state, &len)) {
+		KASSERT(len >= 6*sizeof(u_int32_t), ("len %u bytes", len));
+		if_printf(ifp, "0x%08x 0x%08x 0x%08x, 0x%08x 0x%08x 0x%08x\n",
+		    state[0], state[1] , state[2], state[3],
+		    state[4], state[5]);
+	}
 	ath_reset(ifp);
 }
 
@@ -2004,10 +2014,10 @@
 	}
 	/*
 	 * Check if the previous beacon has gone out.  If
-	 * not don't don't try to post another, skip this
-	 * period and wait for the next.  Missed beacons
-	 * indicate a problem and should not occur.  If we
-	 * miss too many consecutive beacons reset the device.
+	 * not don't try to post another, skip this period
+	 * and wait for the next.  Missed beacons indicate
+	 * a problem and should not occur.  If we miss too
+	 * many consecutive beacons reset the device.
 	 */
 	if (ath_hal_numtxpending(ah, sc->sc_bhalq) != 0) {
 		sc->sc_bmisscount++;
@@ -2562,7 +2572,6 @@
 		rssi = HAL_EP_RND(avgrssi, HAL_RSSI_EP_MULTIPLIER);
 	else
 		rssi = ni->ni_rssi;
-	/* NB: theoretically we shouldn't need this, but be paranoid */
 	return rssi < 0 ? 0 : rssi > 127 ? 127 : rssi;
 #undef HAL_EP_RND
 }
@@ -2824,7 +2833,7 @@
 				bf->bf_daddr, PA2DESC(sc, ds->ds_link));
 #ifdef AR_DEBUG
 		if (sc->sc_debug & ATH_DEBUG_RECV_DESC)
-			ath_printrxbuf(bf, status == HAL_OK); 
+			ath_printrxbuf(bf, 0, status == HAL_OK); 
 #endif
 		if (status == HAL_EINPROGRESS)
 			break;
@@ -2910,7 +2919,7 @@
 		/*
 		 * Sync and unmap the frame.  At this point we're
 		 * committed to passing the mbuf somewhere so clear
-		 * bf_m; this means a new sk_buff must be allocated
+		 * bf_m; this means a new mbuf must be allocated
 		 * when the rx descriptor is setup again to receive
 		 * another frame.
 		 */
@@ -3766,7 +3775,6 @@
 		txq->axq_intrcnt = 0;	/* reset periodic desc intr count */
 		bf = STAILQ_FIRST(&txq->axq_q);
 		if (bf == NULL) {
-			txq->axq_link = NULL;
 			ATH_TXQ_UNLOCK(txq);
 			break;
 		}
@@ -3775,13 +3783,15 @@
 		status = ath_hal_txprocdesc(ah, ds);
 #ifdef AR_DEBUG
 		if (sc->sc_debug & ATH_DEBUG_XMIT_DESC)
-			ath_printtxbuf(bf, status == HAL_OK);
+			ath_printtxbuf(bf, txq->axq_qnum, 0, status == HAL_OK);
 #endif
 		if (status == HAL_EINPROGRESS) {
 			ATH_TXQ_UNLOCK(txq);
 			break;
 		}
 		ATH_TXQ_REMOVE_HEAD(txq, bf_list);
+		if (txq->axq_depth == 0)
+			txq->axq_link = NULL;
 		ATH_TXQ_UNLOCK(txq);
 
 		ni = bf->bf_node;
@@ -3852,8 +3862,9 @@
 static __inline int
 txqactive(struct ath_hal *ah, int qnum)
 {
-	/* XXX not yet */
-	return 1;
+	u_int32_t txqs = 1<<qnum;
+	ath_hal_gettxintrtxqs(ah, &txqs);
+	return (txqs & (1<<qnum));
 }
 
 /*
@@ -3870,7 +3881,6 @@
 		sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);
 	if (txqactive(sc->sc_ah, sc->sc_cabq->axq_qnum))
 		ath_tx_processq(sc, sc->sc_cabq);
-	ath_tx_processq(sc, sc->sc_cabq);
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	sc->sc_tx_timer = 0;
 
@@ -3949,15 +3959,18 @@
 static void
 ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
 {
+#ifdef AR_DEBUG
 	struct ath_hal *ah = sc->sc_ah;
+#endif
 	struct ieee80211_node *ni;
 	struct ath_buf *bf;
+	u_int ix;
 
 	/*
 	 * NB: this assumes output has been stopped and
 	 *     we do not need to block ath_tx_tasklet
 	 */
-	for (;;) {
+	for (ix = 0;; ix++) {
 		ATH_TXQ_LOCK(txq);
 		bf = STAILQ_FIRST(&txq->axq_q);
 		if (bf == NULL) {
@@ -3969,7 +3982,7 @@
 		ATH_TXQ_UNLOCK(txq);
 #ifdef AR_DEBUG
 		if (sc->sc_debug & ATH_DEBUG_RESET)
-			ath_printtxbuf(bf,
+			ath_printtxbuf(bf, txq->axq_qnum, ix,
 				ath_hal_txprocdesc(ah, bf->bf_desc) == HAL_OK);
 #endif /* AR_DEBUG */
 		bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
@@ -4047,15 +4060,18 @@
 #ifdef AR_DEBUG
 	if (sc->sc_debug & (ATH_DEBUG_RESET | ATH_DEBUG_FATAL)) {
 		struct ath_buf *bf;
+		u_int ix;
 
 		printf("%s: rx queue %p, link %p\n", __func__,
 			(caddr_t)(uintptr_t) ath_hal_getrxbuf(ah), sc->sc_rxlink);
+		ix = 0;
 		STAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) {
 			struct ath_desc *ds = bf->bf_desc;
 			HAL_STATUS status = ath_hal_rxprocdesc(ah, ds,
 				bf->bf_daddr, PA2DESC(sc, ds->ds_link));
 			if (status == HAL_OK || (sc->sc_debug & ATH_DEBUG_FATAL))
-				ath_printrxbuf(bf, status == HAL_OK);
+				ath_printrxbuf(bf, ix, status == HAL_OK);
+			ix++;
 		}
 	}
 #endif
@@ -4837,34 +4853,37 @@
 
 #ifdef AR_DEBUG
 static void
-ath_printrxbuf(struct ath_buf *bf, int done)
+ath_printrxbuf(struct ath_buf *bf, u_int ix, int done)
 {
 	struct ath_desc *ds;
 	int i;
 
 	for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) {
-		printf("R%d (%p %p) L:%08x D:%08x %08x %08x %08x %08x %c\n",
-		    i, ds, (struct ath_desc *)bf->bf_daddr + i,
+		printf("R[%2u] (DS.V:%p DS.P:%p) L:%08x D:%08x%s\n"
+		       "      %08x %08x %08x %08x\n",
+		    ix, ds, (struct ath_desc *)bf->bf_daddr + i,
 		    ds->ds_link, ds->ds_data,
+		    !done ? "" : (ds->ds_rxstat.rs_status == 0) ? " *" : " !",
 		    ds->ds_ctl0, ds->ds_ctl1,
-		    ds->ds_hw[0], ds->ds_hw[1],
-		    !done ? ' ' : (ds->ds_rxstat.rs_status == 0) ? '*' : '!');
+		    ds->ds_hw[0], ds->ds_hw[1]);
 	}
 }
 
 static void
-ath_printtxbuf(struct ath_buf *bf, int done)
+ath_printtxbuf(struct ath_buf *bf, u_int qnum, u_int ix, int done)
 {
 	struct ath_desc *ds;
 	int i;
 
+	printf("Q%u[%3u]", qnum, ix);
 	for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) {
-		printf("T%d (%p %p) L:%08x D:%08x %08x %08x %08x %08x %08x %08x %c\n",
-		    i, ds, (struct ath_desc *)bf->bf_daddr + i,
-		    ds->ds_link, ds->ds_data,
+		printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:04%x%s\n"
+		       "        %08x %08x %08x %08x %08x %08x\n",
+		    ds, (struct ath_desc *)bf->bf_daddr + i,
+		    ds->ds_link, ds->ds_data, bf->bf_flags,
+		    !done ? "" : (ds->ds_txstat.ts_status == 0) ? " *" : " !",
 		    ds->ds_ctl0, ds->ds_ctl1,
-		    ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3],
-		    !done ? ' ' : (ds->ds_txstat.ts_status == 0) ? '*' : '!');
+		    ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]);
 	}
 }
 #endif /* AR_DEBUG */
@@ -5011,7 +5030,9 @@
 		return copyout(&sc->sc_stats,
 				ifr->ifr_data, sizeof (sc->sc_stats));
 	case SIOCGATHDIAG:
+		ATH_UNLOCK(sc);
 		error = ath_ioctl_diag(sc, (struct ath_diag *) ifr);
+		ATH_LOCK(sc);
 		break;
 	default:
 		error = ieee80211_ioctl(ic, cmd, data);
@@ -5258,11 +5279,12 @@
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"regdomain", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
 		ath_sysctl_regdomain, "I", "EEPROM regdomain code");
+#ifdef	AR_DEBUG
 	sc->sc_debug = ath_debug;
 	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"debug", CTLFLAG_RW, &sc->sc_debug, 0,
 		"control debugging printfs");
-
+#endif
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"slottime", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
 		ath_sysctl_slottime, "I", "802.11 slot time (us)");

==== //depot/projects/arm/src/sys/dev/ath/if_athvar.h#5 (text+ko) ====

@@ -33,7 +33,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.44 2006/02/10 19:07:08 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.45 2006/02/15 18:23:03 sam Exp $
  */
 
 /*
@@ -251,8 +251,6 @@
 	int			sc_rx_th_len;
 	u_int			sc_monpass;	/* frames to pass in mon.mode */
 
-	struct task		sc_fataltask;	/* fatal int processing */
-
 	struct ath_descdma	sc_rxdma;	/* RX descriptos */
 	ath_bufhead		sc_rxbuf;	/* receive buffer */
 	u_int32_t		*sc_rxlink;	/* link ptr in last RX desc */
@@ -419,6 +417,8 @@
 #define	ath_hal_getdiagstate(_ah, _id, _indata, _insize, _outdata, _outsize) \
 	((*(_ah)->ah_getDiagState)((_ah), (_id), \
 		(_indata), (_insize), (_outdata), (_outsize)))
+#define	ath_hal_getfatalstate(_ah, _outdata, _outsize) \
+	ath_hal_getdiagstate(_ah, 27, NULL, 0, (void **)(_outdata), _outsize)
 #define	ath_hal_setuptxqueue(_ah, _type, _irq) \
 	((*(_ah)->ah_setupTxQueue)((_ah), (_type), (_irq)))
 #define	ath_hal_resettxqueue(_ah, _q) \

==== //depot/projects/arm/src/sys/dev/bfe/if_bfe.c#4 (text+ko) ====

@@ -26,7 +26,7 @@
 
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bfe/if_bfe.c,v 1.30 2005/11/11 16:04:50 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bfe/if_bfe.c,v 1.31 2006/02/14 12:44:54 glebius Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -386,7 +386,6 @@
 	ifp->if_watchdog = bfe_watchdog;
 	ifp->if_init = bfe_init;
 	ifp->if_mtu = ETHERMTU;
-	ifp->if_baudrate = 100000000;
 	IFQ_SET_MAXLEN(&ifp->if_snd, BFE_TX_QLEN);
 	ifp->if_snd.ifq_drv_maxlen = BFE_TX_QLEN;
 	IFQ_SET_READY(&ifp->if_snd);

==== //depot/projects/arm/src/sys/dev/dc/if_dc.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.178 2005/12/28 18:00:37 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.179 2006/02/14 12:44:54 glebius Exp $");
 
 /*
  * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
@@ -2201,7 +2201,6 @@
 	ifp->if_start = dc_start;
 	ifp->if_watchdog = dc_watchdog;
 	ifp->if_init = dc_init;
-	ifp->if_baudrate = 10000000;
 	IFQ_SET_MAXLEN(&ifp->if_snd, DC_TX_LIST_CNT - 1);
 	ifp->if_snd.ifq_drv_maxlen = DC_TX_LIST_CNT - 1;
 	IFQ_SET_READY(&ifp->if_snd);

==== //depot/projects/arm/src/sys/dev/em/if_em.c#15 (text+ko) ====

@@ -31,18 +31,55 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.107 2006/02/09 12:57:17 glebius Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.113 2006/02/15 14:27:38 glebius Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
 #endif
 
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/endian.h>
+#include <sys/kernel.h>
+#include <sys/kthread.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/module.h>
+#include <sys/rman.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
+#include <sys/sysctl.h>
+#include <sys/taskqueue.h>
+
+#include <machine/bus.h>
+#include <machine/resource.h>
+
+#include <net/bpf.h>
+#include <net/ethernet.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+
+#include <net/if_types.h>
+#include <net/if_vlan_var.h>
+
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/tcp.h>
+#include <netinet/udp.h>
+
+#include <dev/pci/pcivar.h>
+#include <dev/pci/pcireg.h>
+#include <dev/em/if_em_hw.h>
 #include <dev/em/if_em.h>
 
 /*********************************************************************
  *  Set this to one to display debug statistics
  *********************************************************************/
-int             em_display_debug_stats = 0;
+int	em_display_debug_stats = 0;
 
 /*********************************************************************
  *  Driver version
@@ -63,64 +100,64 @@
 
 static em_vendor_info_t em_vendor_info_array[] =
 {
-        /* Intel(R) PRO/1000 Network Connection */
-        { 0x8086, E1000_DEV_ID_82540EM,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82540EM_LOM,         PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82540EP,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82540EP_LOM,         PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82540EP_LP,          PCI_ANY_ID, PCI_ANY_ID, 0},
+	/* Intel(R) PRO/1000 Network Connection */
+	{ 0x8086, E1000_DEV_ID_82540EM,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82540EM_LOM,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82540EP,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82540EP_LOM,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82540EP_LP,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82541EI,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82541ER,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82541ER_LOM,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82541EI_MOBILE,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82541GI,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82541GI_LF,          PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82541GI_MOBILE,      PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541EI,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541ER,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541ER_LOM,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541EI_MOBILE,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541GI,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541GI_LF,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82541GI_MOBILE,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82542,               PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82542,		PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82543GC_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82543GC_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82543GC_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82543GC_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82544EI_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82544EI_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82544GC_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82544GC_LOM,         PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82544EI_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82544EI_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82544GC_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82544GC_LOM,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82545EM_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82545EM_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82545GM_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82545GM_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82545GM_SERDES,      PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82545EM_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82545EM_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82545GM_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82545GM_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82545GM_SERDES,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82546EB_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546EB_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546GB_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546GB_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546GB_SERDES,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546GB_PCIE,        PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546EB_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546EB_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546GB_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546GB_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546GB_SERDES,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546GB_PCIE,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82547EI,             PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82547EI_MOBILE,      PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82547GI,             PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82547EI,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82547EI_MOBILE,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82547GI,		PCI_ANY_ID, PCI_ANY_ID, 0},
 
-	{ 0x8086, E1000_DEV_ID_82571EB_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-	{ 0x8086, E1000_DEV_ID_82571EB_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-	{ 0x8086, E1000_DEV_ID_82571EB_SERDES,      PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82571EB_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82571EB_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82571EB_SERDES,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-	{ 0x8086, E1000_DEV_ID_82572EI_COPPER,      PCI_ANY_ID, PCI_ANY_ID, 0},
-	{ 0x8086, E1000_DEV_ID_82572EI_FIBER,       PCI_ANY_ID, PCI_ANY_ID, 0},
-	{ 0x8086, E1000_DEV_ID_82572EI_SERDES,      PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82572EI_COPPER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82572EI_FIBER,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82572EI_SERDES,	PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        { 0x8086, E1000_DEV_ID_82573E,              PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82573E_IAMT,         PCI_ANY_ID, PCI_ANY_ID, 0},
-        { 0x8086, E1000_DEV_ID_82573L,              PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82573E,		PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82573E_IAMT,	PCI_ANY_ID, PCI_ANY_ID, 0},
+	{ 0x8086, E1000_DEV_ID_82573L,		PCI_ANY_ID, PCI_ANY_ID, 0},
 
-        /* required last entry */
-        { 0, 0, 0, 0, 0}
+	/* required last entry */
+	{ 0, 0, 0, 0, 0}
 };
 
 /*********************************************************************
@@ -134,91 +171,85 @@
 /*********************************************************************
  *  Function prototypes
  *********************************************************************/
-static int  em_probe(device_t);
-static int  em_attach(device_t);
-static int  em_detach(device_t);
-static int  em_shutdown(device_t);
-static int  em_suspend(device_t);
-static int  em_resume(device_t);
-static void em_intr(void *);
+static int	em_probe(device_t);
+static int	em_attach(device_t);
+static int	em_detach(device_t);
+static int	em_shutdown(device_t);
+static int	em_suspend(device_t);
+static int	em_resume(device_t);
+static void	em_intr(void *);
 #ifndef NO_EM_FASTINTR
-static void em_intr_fast(void *);
+static void	em_intr_fast(void *);
 #endif
-static void em_start(struct ifnet *);
-static void em_start_locked(struct ifnet *ifp);
-static int  em_ioctl(struct ifnet *, u_long, caddr_t);
-static void em_watchdog(struct ifnet *);
-static void em_init(void *);
-static void em_init_locked(struct adapter *);
-static void em_stop(void *);
-static void em_media_status(struct ifnet *, struct ifmediareq *);
-static int  em_media_change(struct ifnet *);
-static void em_identify_hardware(struct adapter *);
-static int  em_allocate_pci_resources(struct adapter *);
-static int  em_allocate_intr(struct adapter *);
-static void em_free_intr(struct adapter *);
-static void em_free_pci_resources(struct adapter *);
-static void em_local_timer(void *);
-static int  em_hardware_init(struct adapter *);
-static void em_setup_interface(device_t, struct adapter *);
-static int  em_setup_transmit_structures(struct adapter *);
-static void em_initialize_transmit_unit(struct adapter *);
-static int  em_setup_receive_structures(struct adapter *);
-static void em_initialize_receive_unit(struct adapter *);
-static void em_enable_intr(struct adapter *);
-static void em_disable_intr(struct adapter *);
-static void em_free_transmit_structures(struct adapter *);
-static void em_free_receive_structures(struct adapter *);
-static void em_update_stats_counters(struct adapter *);
-static void em_clean_transmit_interrupts(struct adapter *);
-static int  em_allocate_receive_structures(struct adapter *);
-static int  em_allocate_transmit_structures(struct adapter *);
-static int em_process_receive_interrupts(struct adapter *, int);
+static void	em_start(struct ifnet *);
+static void	em_start_locked(struct ifnet *ifp);
+static int	em_ioctl(struct ifnet *, u_long, caddr_t);
+static void	em_watchdog(struct ifnet *);
+static void	em_init(void *);
+static void	em_init_locked(struct em_softc *);
+static void	em_stop(void *);
+static void	em_media_status(struct ifnet *, struct ifmediareq *);
+static int	em_media_change(struct ifnet *);
+static void	em_identify_hardware(struct em_softc *);
+static int	em_allocate_pci_resources(struct em_softc *);
+static int	em_allocate_intr(struct em_softc *);
+static void	em_free_intr(struct em_softc *);
+static void	em_free_pci_resources(struct em_softc *);
+static void	em_local_timer(void *);
+static int	em_hardware_init(struct em_softc *);
+static void	em_setup_interface(device_t, struct em_softc *);
+static int	em_setup_transmit_structures(struct em_softc *);
+static void	em_initialize_transmit_unit(struct em_softc *);
+static int	em_setup_receive_structures(struct em_softc *);
+static void	em_initialize_receive_unit(struct em_softc *);
+static void	em_enable_intr(struct em_softc *);
+static void	em_disable_intr(struct em_softc *);
+static void	em_free_transmit_structures(struct em_softc *);
+static void	em_free_receive_structures(struct em_softc *);
+static void	em_update_stats_counters(struct em_softc *);
+static void	em_txeof(struct em_softc *);
+static int	em_allocate_receive_structures(struct em_softc *);
+static int	em_allocate_transmit_structures(struct em_softc *);
+static int	em_rxeof(struct em_softc *, int);
 #ifndef __NO_STRICT_ALIGNMENT
-static int  em_fixup_rx(struct adapter *);
+static int	em_fixup_rx(struct em_softc *);
 #endif
-static void em_receive_checksum(struct adapter *,
-				struct em_rx_desc *,
-				struct mbuf *);
-static void em_transmit_checksum_setup(struct adapter *,
-				       struct mbuf *,
-				       u_int32_t *,
-				       u_int32_t *);
-static void em_set_promisc(struct adapter *);
-static void em_disable_promisc(struct adapter *);
-static void em_set_multi(struct adapter *);
-static void em_print_hw_stats(struct adapter *);
-static void em_print_link_status(struct adapter *);
-static int  em_get_buf(int i, struct adapter *,
-		       struct mbuf *);
-static void em_enable_vlans(struct adapter *);
-static void em_disable_vlans(struct adapter *);
-static int  em_encap(struct adapter *, struct mbuf **);
-static void em_smartspeed(struct adapter *);
-static int  em_82547_fifo_workaround(struct adapter *, int);
-static void em_82547_update_fifo_head(struct adapter *, int);
-static int  em_82547_tx_fifo_reset(struct adapter *);
-static void em_82547_move_tail(void *arg);
-static void em_82547_move_tail_locked(struct adapter *);
-static int  em_dma_malloc(struct adapter *, bus_size_t,
-			  struct em_dma_alloc *, int);
-static void em_dma_free(struct adapter *, struct em_dma_alloc *);
-static void em_print_debug_info(struct adapter *);
-static int  em_is_valid_ether_addr(u_int8_t *);
-static int  em_sysctl_stats(SYSCTL_HANDLER_ARGS);
-static int  em_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
-static u_int32_t em_fill_descriptors (bus_addr_t address,
-				      u_int32_t length,
-				      PDESC_ARRAY desc_array);
-static int  em_sysctl_int_delay(SYSCTL_HANDLER_ARGS);
-static void em_add_int_delay_sysctl(struct adapter *, const char *,
-				    const char *, struct em_int_delay_info *,
-				    int, int);
+static void	em_receive_checksum(struct em_softc *, struct em_rx_desc *,
+		    struct mbuf *);
+static void	em_transmit_checksum_setup(struct em_softc *, struct mbuf *,
+		    uint32_t *, uint32_t *);
+static void	em_set_promisc(struct em_softc *);
+static void	em_disable_promisc(struct em_softc *);
+static void	em_set_multi(struct em_softc *);
+static void	em_print_hw_stats(struct em_softc *);
+static void	em_update_link_status(struct em_softc *);
+static int	em_get_buf(int i, struct em_softc *, struct mbuf *);
+static void	em_enable_vlans(struct em_softc *);
+static void	em_disable_vlans(struct em_softc *);
+static int	em_encap(struct em_softc *, struct mbuf **);
+static void	em_smartspeed(struct em_softc *);
+static int	em_82547_fifo_workaround(struct em_softc *, int);
+static void	em_82547_update_fifo_head(struct em_softc *, int);
+static int	em_82547_tx_fifo_reset(struct em_softc *);
+static void	em_82547_move_tail(void *arg);
+static void	em_82547_move_tail_locked(struct em_softc *);
+static int	em_dma_malloc(struct em_softc *, bus_size_t,
+		struct em_dma_alloc *, int);
+static void	em_dma_free(struct em_softc *, struct em_dma_alloc *);
+static void	em_print_debug_info(struct em_softc *);
+static int 	em_is_valid_ether_addr(uint8_t *);
+static int	em_sysctl_stats(SYSCTL_HANDLER_ARGS);
+static int	em_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
+static uint32_t	em_fill_descriptors (bus_addr_t address, uint32_t length,
+		    PDESC_ARRAY desc_array);
+static int	em_sysctl_int_delay(SYSCTL_HANDLER_ARGS);
+static void	em_add_int_delay_sysctl(struct em_softc *, const char *,
+		const char *, struct em_int_delay_info *, int, int);
 #ifndef NO_EM_FASTINTR
-static void em_add_int_process_limit(struct adapter *, const char *,
-				     const char *, int *, int);
-static void em_handle_rxtx(void *context, int pending);
-static void em_handle_link(void *context, int pending);
+static void	em_add_int_process_limit(struct em_softc *, const char *,
+		const char *, int *, int);
+static void	em_handle_rxtx(void *context, int pending);
+static void	em_handle_link(void *context, int pending);
 #endif
 #ifdef DEVICE_POLLING
 static poll_handler_t em_poll;
@@ -240,7 +271,7 @@
 };
 

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602160839.k1G8dIRA094425>