From owner-p4-projects@FreeBSD.ORG Sun May 27 22:29:45 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 38A7E16A4DD; Sun, 27 May 2007 22:29:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F21E16A4CD for ; Sun, 27 May 2007 22:29:45 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id DD31D13C46E for ; Sun, 27 May 2007 22:29:44 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4RMTixl025283 for ; Sun, 27 May 2007 22:29:44 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4RMTgID025244 for perforce@freebsd.org; Sun, 27 May 2007 22:29:42 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 27 May 2007 22:29:42 GMT Message-Id: <200705272229.l4RMTgID025244@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 120481 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 May 2007 22:29:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=120481 Change 120481 by kmacy@kmacy_vt-x:opentoe_init on 2007/05/27 22:29:31 IFC latest cvs update of cxgb Affected files ... .. //depot/projects/opentoe/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/opentoe/sys/boot/ia64/common/exec.c#2 integrate .. //depot/projects/opentoe/sys/compat/opensolaris/sys/mutex.h#2 integrate .. //depot/projects/opentoe/sys/compat/opensolaris/sys/rwlock.h#2 integrate .. //depot/projects/opentoe/sys/conf/files#7 integrate .. //depot/projects/opentoe/sys/dev/acpica/acpi.c#6 integrate .. //depot/projects/opentoe/sys/dev/ath/if_ath.c#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_common.h#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_mc5.c#3 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_cpl.h#3 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_hw.c#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_version.h#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_xgmac.c#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_adapter.h#17 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_config.h#3 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_ioctl.h#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_lro.c#5 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_main.c#9 edit .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_osdep.h#10 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#20 integrate .. //depot/projects/opentoe/sys/dev/cxgb/sys/mvec.h#3 integrate .. //depot/projects/opentoe/sys/dev/cxgb/sys/uipc_mvec.c#4 integrate .. //depot/projects/opentoe/sys/dev/dcons/dcons.c#2 integrate .. //depot/projects/opentoe/sys/dev/dcons/dcons_crom.c#2 integrate .. //depot/projects/opentoe/sys/dev/dcons/dcons_os.c#2 integrate .. //depot/projects/opentoe/sys/dev/en/midway.c#2 integrate .. //depot/projects/opentoe/sys/dev/lmc/if_lmc.c#2 integrate .. //depot/projects/opentoe/sys/dev/mmc/bridge.h#2 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmc.c#3 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmcbr_if.m#2 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmcbrvar.h#2 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmcbus_if.m#2 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmcreg.h#2 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmcsd.c#3 integrate .. //depot/projects/opentoe/sys/dev/mmc/mmcvar.h#3 integrate .. //depot/projects/opentoe/sys/dev/mxge/if_mxge.c#5 integrate .. //depot/projects/opentoe/sys/dev/random/yarrow.c#2 integrate .. //depot/projects/opentoe/sys/dev/sk/if_sk.c#4 integrate .. //depot/projects/opentoe/sys/dev/sound/isa/ess.c#3 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/emu10k1.c#3 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/envy24.c#4 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/envy24.h#2 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/envy24ht.c#4 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/envy24ht.h#2 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/solo.c#3 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/spicds.c#2 integrate .. //depot/projects/opentoe/sys/dev/sound/pci/spicds.h#2 integrate .. //depot/projects/opentoe/sys/dev/sound/pcm/ac97.c#3 integrate .. //depot/projects/opentoe/sys/dev/syscons/scmouse.c#2 integrate .. //depot/projects/opentoe/sys/fs/nullfs/null_vfsops.c#2 integrate .. //depot/projects/opentoe/sys/fs/smbfs/smbfs_node.c#2 integrate .. //depot/projects/opentoe/sys/i386/i386/trap.c#4 integrate .. //depot/projects/opentoe/sys/i386/include/vmparam.h#5 integrate .. //depot/projects/opentoe/sys/ia64/ia64/exception.S#3 integrate .. //depot/projects/opentoe/sys/ia64/ia64/locore.S#2 integrate .. //depot/projects/opentoe/sys/ia64/ia64/pmap.c#3 integrate .. //depot/projects/opentoe/sys/ia64/include/ia64_cpu.h#2 integrate .. //depot/projects/opentoe/sys/ia64/include/vmparam.h#4 integrate .. //depot/projects/opentoe/sys/kern/kern_event.c#3 integrate .. //depot/projects/opentoe/sys/kern/kern_malloc.c#4 integrate .. //depot/projects/opentoe/sys/kern/kern_mtxpool.c#2 integrate .. //depot/projects/opentoe/sys/kern/kern_resource.c#3 integrate .. //depot/projects/opentoe/sys/kern/subr_mbpool.c#2 integrate .. //depot/projects/opentoe/sys/kern/sys_pipe.c#2 integrate .. //depot/projects/opentoe/sys/kern/vfs_cache.c#4 integrate .. //depot/projects/opentoe/sys/kern/vfs_lookup.c#4 integrate .. //depot/projects/opentoe/sys/kern/vfs_subr.c#6 integrate .. //depot/projects/opentoe/sys/modules/cxgb/Makefile#8 integrate .. //depot/projects/opentoe/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#3 integrate .. //depot/projects/opentoe/sys/netgraph/ng_base.c#4 integrate .. //depot/projects/opentoe/sys/netinet/tcp.h#5 integrate .. //depot/projects/opentoe/sys/netinet/tcp_hostcache.c#3 integrate .. //depot/projects/opentoe/sys/netinet/tcp_subr.c#6 integrate .. //depot/projects/opentoe/sys/netinet/tcp_timer.c#6 integrate .. //depot/projects/opentoe/sys/netinet6/in6.c#2 integrate .. //depot/projects/opentoe/sys/netncp/ncp_conn.c#2 integrate .. //depot/projects/opentoe/sys/pci/ncr.c#3 integrate .. //depot/projects/opentoe/sys/powerpc/include/vmparam.h#3 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/clock.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/machdep.c#3 integrate .. //depot/projects/opentoe/sys/sun4v/sun4v/machdep.c#3 integrate .. //depot/projects/opentoe/sys/sys/vnode.h#4 integrate Differences ... ==== //depot/projects/opentoe/sys/amd64/amd64/trap.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.315 2007/03/26 21:45:44 kris Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.316 2007/05/27 19:16:45 rwatson Exp $"); /* * AMD64 Trap and System call handling @@ -468,7 +468,6 @@ * Otherwise, debugger traps "can't happen". */ #ifdef KDB - /* XXX Giant */ if (kdb_trap(type, 0, frame)) goto out; #endif ==== //depot/projects/opentoe/sys/boot/ia64/common/exec.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/ia64/common/exec.c,v 1.16 2006/11/05 22:03:03 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/ia64/common/exec.c,v 1.17 2007/05/27 19:02:46 marcel Exp $"); #include #include @@ -105,7 +105,7 @@ ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (28 << 2)); pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY | - PTE_PL_KERN | PTE_AR_RWX; + PTE_PL_KERN | PTE_AR_RWX | PTE_ED; __asm __volatile("mov cr.ifa=%0" :: "r"(IA64_RR_BASE(7))); __asm __volatile("mov cr.itir=%0" :: "r"(28 << 2)); ==== //depot/projects/opentoe/sys/compat/opensolaris/sys/mutex.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/opensolaris/sys/mutex.h,v 1.2 2007/04/09 01:05:31 pjd Exp $ + * $FreeBSD: src/sys/compat/opensolaris/sys/mutex.h,v 1.3 2007/05/26 21:37:14 pjd Exp $ */ #ifndef _OPENSOLARIS_SYS_MUTEX_H_ @@ -46,12 +46,18 @@ typedef struct sx kmutex_t; +#ifndef DEBUG +#define MUTEX_FLAGS (SX_DUPOK | SX_NOWITNESS) +#else +#define MUTEX_FLAGS (SX_DUPOK) +#endif + #define mutex_init(lock, desc, type, arg) do { \ ASSERT((type) == MUTEX_DEFAULT); \ KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \ LO_EXPECTED, ("lock %s already initialized", #lock)); \ bzero((lock), sizeof(struct sx)); \ - sx_init_flags((lock), "zfs:" #lock, SX_DUPOK); \ + sx_init_flags((lock), "zfs:" #lock, MUTEX_FLAGS); \ } while (0) #define mutex_destroy(lock) sx_destroy(lock) #define mutex_enter(lock) sx_xlock(lock) ==== //depot/projects/opentoe/sys/compat/opensolaris/sys/rwlock.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/opensolaris/sys/rwlock.h,v 1.2 2007/04/09 01:05:31 pjd Exp $ + * $FreeBSD: src/sys/compat/opensolaris/sys/rwlock.h,v 1.3 2007/05/26 21:37:14 pjd Exp $ */ #ifndef _OPENSOLARIS_SYS_RWLOCK_H_ @@ -48,6 +48,12 @@ typedef struct sx krwlock_t; +#ifndef DEBUG +#define RW_FLAGS (SX_DUPOK | SX_NOWITNESS) +#else +#define RW_FLAGS (SX_DUPOK) +#endif + #define RW_READ_HELD(x) (rw_read_held((x))) #define RW_WRITE_HELD(x) (rw_write_held((x))) #define RW_LOCK_HELD(x) (rw_lock_held((x))) @@ -57,7 +63,7 @@ KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \ LO_EXPECTED, ("lock %s already initialized", #lock)); \ bzero((lock), sizeof(struct sx)); \ - sx_init_flags((lock), "zfs:" #lock, SX_DUPOK); \ + sx_init_flags((lock), "zfs:" #lock, RW_FLAGS); \ } while (0) #define rw_destroy(lock) sx_destroy(lock) #define rw_enter(lock, how) do { \ ==== //depot/projects/opentoe/sys/conf/files#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1210 2007/05/22 12:00:31 mav Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1211 2007/05/25 09:48:18 kmacy Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -514,6 +514,8 @@ dev/cs/if_cs_isa.c optional cs isa dev/cs/if_cs_pccard.c optional cs pccard dev/cxgb/cxgb_main.c optional cxgb pci +dev/cxgb/cxgb_offload.c optional cxgb pci +dev/cxgb/cxgb_l2t.c optional cxgb pci dev/cxgb/cxgb_lro.c optional cxgb pci dev/cxgb/cxgb_sge.c optional cxgb pci dev/cxgb/common/cxgb_mc5.c optional cxgb pci ==== //depot/projects/opentoe/sys/dev/acpica/acpi.c#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.237 2007/05/15 08:41:05 takawata Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.238 2007/05/25 05:26:21 njl Exp $"); #include "opt_acpi.h" #include @@ -242,6 +242,10 @@ /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); +static int acpi_susp_bounce; +SYSCTL_INT(_debug_acpi, OID_AUTO, suspend_bounce, CTLFLAG_RW, + &acpi_susp_bounce, 0, "Don't actually suspend, just test devices."); + /* * ACPI can only be loaded as a module by the loader; activating it after * system bootstrap time is not useful, and can be fatal to the system. @@ -2198,6 +2202,10 @@ } slp_state = ACPI_SS_DEV_SUSPEND; + /* If testing device suspend only, back out of everything here. */ + if (acpi_susp_bounce) + break; + status = AcpiEnterSleepStatePrep(state); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepStatePrep failed - %s\n", ==== //depot/projects/opentoe/sys/dev/ath/if_ath.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.166 2007/04/23 05:57:06 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.167 2007/05/27 05:38:44 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -4806,7 +4806,7 @@ } if (!ath_hal_init_channels(ah, chans, IEEE80211_CHAN_MAX, &nchan, NULL, 0, NULL, cc, HAL_MODE_ALL, outdoor, xchanmode)) { - ath_hal_getregdomain(ah, ®domain); + (void) ath_hal_getregdomain(ah, ®domain); if_printf(ifp, "unable to collect channel list from hal; " "regdomain likely %u country code %u\n", regdomain, cc); free(chans, M_TEMP); @@ -4871,7 +4871,7 @@ } } free(chans, M_TEMP); - ath_hal_getregdomain(ah, &sc->sc_regdomain); + (void) ath_hal_getregdomain(ah, &sc->sc_regdomain); ath_hal_getcountrycode(ah, &sc->sc_countrycode); sc->sc_xchanmode = xchanmode; sc->sc_outdoor = outdoor; @@ -4947,14 +4947,14 @@ if (sc->sc_curtxpow != ic->ic_txpowlimit) { ath_hal_settxpowlimit(ah, ic->ic_txpowlimit); /* read back in case value is clamped */ - ath_hal_gettxpowlimit(ah, &txpow); - ic->ic_txpowlimit = sc->sc_curtxpow = txpow; + if (ath_hal_gettxpowlimit(ah, &txpow)) + ic->ic_txpowlimit = sc->sc_curtxpow = txpow; } /* * Fetch max tx power level for status requests. */ - ath_hal_getmaxtxpow(sc->sc_ah, &txpow); - ic->ic_bss->ni_txpower = txpow; + if (ath_hal_getmaxtxpow(sc->sc_ah, &txpow)) + ic->ic_bss->ni_txpower = txpow; } static int @@ -5444,7 +5444,7 @@ u_int32_t scale; int error; - ath_hal_gettpscale(sc->sc_ah, &scale); + (void) ath_hal_gettpscale(sc->sc_ah, &scale); error = sysctl_handle_int(oidp, &scale, 0, req); if (error || !req->newptr) return error; @@ -5491,7 +5491,7 @@ u_int rfsilent; int error; - ath_hal_getrfsilent(sc->sc_ah, &rfsilent); + (void) ath_hal_getrfsilent(sc->sc_ah, &rfsilent); error = sysctl_handle_int(oidp, &rfsilent, 0, req); if (error || !req->newptr) return error; @@ -5551,7 +5551,7 @@ u_int32_t tpack; int error; - ath_hal_gettpack(sc->sc_ah, &tpack); + (void) ath_hal_gettpack(sc->sc_ah, &tpack); error = sysctl_handle_int(oidp, &tpack, 0, req); if (error || !req->newptr) return error; @@ -5565,7 +5565,7 @@ u_int32_t tpcts; int error; - ath_hal_gettpcts(sc->sc_ah, &tpcts); + (void) ath_hal_gettpcts(sc->sc_ah, &tpcts); error = sysctl_handle_int(oidp, &tpcts, 0, req); if (error || !req->newptr) return error; ==== //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_common.h#4 (text+ko) ==== @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.2 2007/03/20 21:43:32 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.3 2007/05/25 09:48:19 kmacy Exp $ ***************************************************************************/ #ifndef __CHELSIO_COMMON_H ==== //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_mc5.c#3 (text+ko) ==== @@ -32,7 +32,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_mc5.c,v 1.1 2007/03/14 02:37:44 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_mc5.c,v 1.2 2007/05/25 09:48:19 kmacy Exp $"); #include #include ==== //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_cpl.h#3 (text+ko) ==== @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_cpl.h,v 1.1 2007/03/14 02:37:44 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_cpl.h,v 1.2 2007/05/25 09:48:19 kmacy Exp $ ***************************************************************************/ #ifndef T3_CPL_H ==== //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_hw.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_hw.c,v 1.2 2007/03/20 21:43:32 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_hw.c,v 1.3 2007/05/25 09:48:19 kmacy Exp $"); #include #include ==== //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_version.h#4 (text+ko) ==== @@ -29,7 +29,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/common/cxgb_version.h,v 1.2 2007/03/20 21:43:32 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/common/cxgb_version.h,v 1.3 2007/05/25 09:48:19 kmacy Exp $ ***************************************************************************/ /* ==== //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_xgmac.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_xgmac.c,v 1.2 2007/03/20 21:43:32 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_xgmac.c,v 1.3 2007/05/25 09:48:19 kmacy Exp $"); #include #include ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_adapter.h#17 (text+ko) ==== @@ -9,11 +9,7 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its + 2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -30,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.8 2007/04/08 15:04:19 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.9 2007/05/25 09:48:19 kmacy Exp $ ***************************************************************************/ @@ -40,7 +36,7 @@ #define _CXGB_ADAPTER_H_ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.8 2007/04/08 15:04:19 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.9 2007/05/25 09:48:19 kmacy Exp $"); #include #include ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_config.h#3 (text+ko) ==== @@ -9,11 +9,7 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its + 2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -30,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_config.h,v 1.2 2007/03/20 21:43:31 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_config.h,v 1.3 2007/05/25 09:48:19 kmacy Exp $ ***************************************************************************/ #ifndef _CXGB_CONFIG_H_ ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_ioctl.h#4 (text+ko) ==== @@ -9,11 +9,7 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its + 2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -29,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_ioctl.h,v 1.2 2007/03/20 21:43:31 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_ioctl.h,v 1.3 2007/05/25 09:48:19 kmacy Exp $ ***************************************************************************/ #ifndef __CHIOCTL_H__ ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_lro.c#5 (text+ko) ==== @@ -9,11 +9,7 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its +2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -32,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_lro.c,v 1.4 2007/04/08 22:56:18 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_lro.c,v 1.5 2007/05/25 09:48:19 kmacy Exp $"); #include ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_main.c#9 (text+ko) ==== @@ -9,11 +9,7 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its +2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -32,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.15 2007/04/26 08:38:00 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.18 2007/05/27 22:04:30 kmacy Exp $"); #include #include @@ -1089,7 +1085,9 @@ req->iff = idx; memset(req->src_mac1, 0, sizeof(req->src_mac1)); memcpy(req->src_mac0, pi->hw_addr, ETHER_ADDR_LEN); - m->m_priority = 1; + + m_set_priority(m, 1); + offload_tx(&adapter->tdev, m); return (0); @@ -1142,6 +1140,9 @@ { int i, j; + if (singleq) + return; + for (i = 0; i < (sc)->params.nports; ++i) { const struct port_info *pi = adap2pinfo(sc, i); @@ -1545,7 +1546,6 @@ struct port_info *p = ifp->if_softc; struct mbuf *m0, *m = NULL; int err, in_use_init; - if (!p->link_config.link_ok) return (ENXIO); @@ -1609,6 +1609,11 @@ if (err == 0 && m == NULL) err = ENOBUFS; + if ((err == 0) && (txq->size <= txq->in_use + TX_MAX_DESC) && + (ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + err = ENOSPC; + } return (err); } ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_osdep.h#10 (text+ko) ==== @@ -9,11 +9,7 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its + 2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -30,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_osdep.h,v 1.8 2007/04/08 15:04:19 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_osdep.h,v 1.10 2007/05/27 22:07:47 kmacy Exp $ ***************************************************************************/ @@ -56,6 +52,10 @@ panic("BUG: %s", exp); \ } while (0) + +#define m_get_priority(m) ((uintptr_t)(m)->m_pkthdr.rcvif) +#define m_set_priority(m, pri) ((m)->m_pkthdr.rcvif = (struct ifnet *)((uintptr_t)pri)) + #if __FreeBSD_version > 700030 #define INTR_FILTERS #define FIRMWARE_LATEST @@ -95,9 +95,9 @@ #define TX_MAX_SIZE (1 << 16) /* 64KB */ #define TX_MAX_SEGS 36 /* maximum supported by card */ #define TX_MAX_DESC 4 /* max descriptors per packet */ -#define TX_START_MAX_DESC (TX_MAX_DESC << 1) /* maximum number of descriptors +#define TX_START_MAX_DESC (TX_MAX_DESC << 2) /* maximum number of descriptors * call to start used per */ -#define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 2) /* maximum tx descriptors +#define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 4) /* maximum tx descriptors * to clean per iteration */ ==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#20 (text+ko) ==== @@ -9,14 +9,10 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Chelsio Corporation nor the names of its + 2. Neither the name of the Chelsio Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -32,7 +28,8 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.14 2007/04/26 08:36:59 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.17 2007/05/27 22:07:47 kmacy Exp $"); + #include #include @@ -92,7 +89,7 @@ * Period of the Tx buffer reclaim timer. This timer does not need to run * frequently as Tx buffers are usually reclaimed by new Tx packets. */ -#define TX_RECLAIM_PERIOD (hz >> 2) +#define TX_RECLAIM_PERIOD (hz >> 1) /* * work request size in bytes @@ -366,10 +363,7 @@ q->polling = adap->params.rev > 0; - if (adap->flags & USING_MSIX) - q->coalesce_nsecs = 6000; - else - q->coalesce_nsecs = 3500; + q->coalesce_nsecs = 5000; q->rspq_size = RSPQ_Q_SIZE; q->fl_size = FL_Q_SIZE; @@ -770,6 +764,11 @@ for (i = 0; i < n; i++) { m_freem_vec(m_vec[i]); } + if (qs->port->ifp->if_drv_flags & IFF_DRV_OACTIVE && + txq->size - txq->in_use >= TX_START_MAX_DESC) { + qs->port->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + taskqueue_enqueue(qs->port->tq, &qs->port->start_task); + } } txq = &qs->txq[TXQ_OFLD]; @@ -1179,8 +1178,8 @@ if (mlen <= WR_LEN - sizeof(*cpl)) { txq_prod(txq, 1, &txqs); txq->sdesc[txqs.pidx].m = m0; - m0->m_priority = txqs.pidx; - + + m_set_priority(m0, txqs.pidx); if (m0->m_len == m0->m_pkthdr.len) memcpy(&txd->flit[2], m0->m_data, mlen); else @@ -1220,7 +1219,8 @@ wr_hi = htonl(V_WR_OP(FW_WROPCODE_TUNNEL_TX_PKT) | txqs.compl); wr_lo = htonl(V_WR_TID(txq->token)); txsd->m = m0; - m0->m_priority = txqs.pidx; + m_set_priority(m0, txqs.pidx); + m_set_priority(m0, txqs.pidx); write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, sgl_flits, wr_hi, wr_lo); check_ring_tx_db(p->adapter, txq); @@ -1590,12 +1590,20 @@ bus_dmamap_destroy(q->entry_tag, d->map); d->flags &= ~TX_SW_DESC_MAPPED; } - if (d->m->m_priority == cidx) { + + if (m_get_priority(d->m) == cidx) { + m_vec[nbufs] = d->m; + d->m = NULL; + nbufs++; + } else { + printf("pri=%d cidx=%d\n", (int)m_get_priority(d->m), cidx); + } + if (m_get_priority(d->m) == cidx) { m_vec[nbufs] = d->m; d->m = NULL; nbufs++; } else { - printf("pri=%d cidx=%d\n", d->m->m_priority, cidx); + printf("pri=%d cidx=%d\n", m_get_priority(d->m), cidx); } } ++d; @@ -1736,7 +1744,7 @@ ret = check_desc_avail(adap, q, m, ndesc, TXQ_OFLD); if (__predict_false(ret)) { if (ret == 1) { - m->m_priority = ndesc; /* save for restart */ + m_set_priority(m, ndesc); /* save for restart */ mtx_unlock(&q->lock); return NET_XMIT_CN; } @@ -1792,7 +1800,7 @@ while ((m = mbufq_peek(&q->sendq)) != NULL) { unsigned int gen, pidx; - unsigned int ndesc = m->m_priority; + unsigned int ndesc = m_get_priority(m); if (__predict_false(q->size - q->in_use < ndesc)) { setbit(&qs->txq_stopped, TXQ_OFLD); @@ -1844,7 +1852,7 @@ static __inline int queue_set(const struct mbuf *m) { - return m->m_priority >> 1; + return m_get_priority(m) >> 1; } /** @@ -1857,7 +1865,7 @@ static __inline int is_ctrl_pkt(const struct mbuf *m) { - return m->m_priority & 1; + return m_get_priority(m) & 1; } /** @@ -2378,7 +2386,7 @@ /* * XXX size mismatch */ - rspq->m->m_priority = rss_hash; + m_set_priority(rspq->m, rss_hash); ngathered = rx_offload(&adap->tdev, rspq, rspq->m, offload_mbufs, ngathered); ==== //depot/projects/opentoe/sys/dev/cxgb/sys/mvec.h#3 (text+ko) ==== @@ -9,9 +9,9 @@ * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. The name of Kip Macy nor the names of other + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,7 +25,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/cxgb/sys/mvec.h,v 1.4 2007/04/14 20:38:38 kmacy Exp $ + * $FreeBSD: src/sys/dev/cxgb/sys/mvec.h,v 1.5 2007/05/25 16:42:25 kmacy Exp $ * ***************************************************************************/ ==== //depot/projects/opentoe/sys/dev/cxgb/sys/uipc_mvec.c#4 (text+ko) ==== @@ -9,9 +9,9 @@ * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. The name of Kip Macy nor the names of other + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -29,7 +29,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/sys/uipc_mvec.c,v 1.12 2007/04/20 05:12:54 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/sys/uipc_mvec.c,v 1.13 2007/05/25 16:42:25 kmacy Exp $"); #include #include ==== //depot/projects/opentoe/sys/dev/dcons/dcons.c#2 (text+ko) ==== @@ -32,13 +32,16 @@ * SUCH DAMAGE. * * $Id: dcons.c,v 1.65 2003/10/24 03:24:55 simokawa Exp $ - * $FreeBSD: src/sys/dev/dcons/dcons.c,v 1.20 2005/01/06 01:42:34 imp Exp $ + * $FreeBSD: src/sys/dev/dcons/dcons.c,v 1.21 2007/05/25 05:00:39 simokawa Exp $ */ #include #if defined(__DragonFly__) || defined(_BOOT) #include "dcons.h" +#if defined(_BOOT) +#include "stand.h" +#endif #else #include #endif ==== //depot/projects/opentoe/sys/dev/dcons/dcons_crom.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * $Id: dcons_crom.c,v 1.8 2003/10/23 15:47:21 simokawa Exp $ - * $FreeBSD: src/sys/dev/dcons/dcons_crom.c,v 1.6 2005/01/06 01:42:34 imp Exp $ + * $FreeBSD: src/sys/dev/dcons/dcons_crom.c,v 1.7 2007/05/27 14:00:34 simokawa Exp $ */ #include @@ -65,7 +65,7 @@ static bus_addr_t dcons_paddr; #if __FreeBSD_version >= 500000 -static int force_console = 1; +static int force_console = 0; TUNABLE_INT("hw.firewire.dcons_crom.force_console", &force_console); #endif ==== //depot/projects/opentoe/sys/dev/dcons/dcons_os.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.12 2006/11/06 13:41:53 rwatson Exp $ + * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.13 2007/05/27 13:58:43 simokawa Exp $ */ #include @@ -71,9 +71,12 @@ #include #include -#include "opt_ddb.h" #include "opt_comconsole.h" #include "opt_dcons.h" +#include "opt_kdb.h" +#include "opt_gdb.h" +#include "opt_ddb.h" + #ifndef DCONS_POLL_HZ #define DCONS_POLL_HZ 100 @@ -178,7 +181,7 @@ CONSOLE_DRIVER(dcons); -#if __FreeBSD_version >= 502122 +#if defined(GDB) && (__FreeBSD_version >= 502122) static gdb_probe_f dcons_dbg_probe; static gdb_init_f dcons_dbg_init; static gdb_term_f dcons_dbg_term; @@ -191,7 +194,7 @@ extern struct gdb_dbgport *gdb_cur; #endif -#if (defined(KDB) || defined(DDB)) && defined(ALT_BREAK_TO_DEBUGGER) +#if (defined(GDB) || defined(DDB)) && defined(ALT_BREAK_TO_DEBUGGER) static int dcons_check_break(struct dcons_softc *dc, int c) { @@ -200,12 +203,14 @@ #if __FreeBSD_version >= 502122 if (kdb_alt_break(c, &dc->brk_state)) { +#ifdef GDB if ((dc->flags & DC_GDB) != 0) { if (gdb_cur == &dcons_gdb_dbgport) { kdb_dbbe_select("gdb"); breakpoint(); } } else +#endif breakpoint(); } #else @@ -251,6 +256,7 @@ return (c); } +#if defined(GDB) || !defined(CONS_NODEV) static int dcons_os_getc(struct dcons_softc *dc) { @@ -260,6 +266,7 @@ return (c & 0xff); } +#endif static void dcons_os_putc(struct dcons_softc *dc, int c) @@ -705,7 +712,7 @@ return(err); } -#if __FreeBSD_version >= 502122 +#if defined(GDB) && (__FreeBSD_version >= 502122) /* Debugger interface */ static int ==== //depot/projects/opentoe/sys/dev/en/midway.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/dev/en/midway.c,v 1.71 2006/12/29 16:38:21 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/en/midway.c,v 1.72 2007/05/27 12:45:05 rwatson Exp $"); /* * @@ -2435,8 +2435,7 @@ device_printf(sc->dev, "unexpected interrupt=0x%b, " "resetting\n", reg, MID_INTBITS); #ifdef EN_DEBUG - kdb_enter("en: unexpected error"); - sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; /* FREEZE! */ + panic("en: unexpected error"); #else en_reset_ul(sc); en_init(sc); ==== //depot/projects/opentoe/sys/dev/lmc/if_lmc.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: src/sys/dev/lmc/if_lmc.c,v 1.31 2007/02/23 12:18:46 piso Exp $ + * $FreeBSD: src/sys/dev/lmc/if_lmc.c,v 1.32 2007/05/27 20:50:23 rwatson Exp $ * * Copyright (c) 2002-2004 David Boggs. * All rights reserved. @@ -58,7 +58,7 @@ * interface and add an Ethernet-to-HDLC gate array to make a WAN card. * David Boggs designed the Ethernet-to-HDLC gate arrays and PC cards. * We did this at our company, LAN Media Corporation (LMC). - * SBE Corp aquired LMC and continues to make the cards. + * SBE Corp acquired LMC and continues to make the cards. * * Since the cards use Tulip Ethernet chips, we started with Matt Thomas' * ubiquitous "de" driver. Michael Graff stripped out the Ethernet stuff ==== //depot/projects/opentoe/sys/dev/mmc/bridge.h#2 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<<