Date: Sat, 20 Jan 2007 04:27:11 GMT From: Matt Jacob <mjacob@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 113193 for review Message-ID: <200701200427.l0K4RBSK087103@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113193 Change 113193 by mjacob@mjexp_6 on 2007/01/20 04:26:58 Integrate from RELENG_6. Affected files ... .. //depot/projects/mjexp_6/sys/boot/forth/loader.conf#2 integrate .. //depot/projects/mjexp_6/sys/conf/newvers.sh#2 integrate .. //depot/projects/mjexp_6/sys/contrib/pf/net/if_pfsync.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/arl/if_arl.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/ath/if_ath.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/awi/awi.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/bce/if_bce.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/bce/if_bcereg.h#2 integrate .. //depot/projects/mjexp_6/sys/dev/ce/if_ce.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/cp/if_cp.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/ctau/if_ct.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/cx/if_cx.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/en/midway.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/firewire/if_fwip.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/gem/if_gem.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/hptmv/entry.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/hwpmc/hwpmc_x86.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/ipw/if_ipw.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/isp/isp_target.c#4 integrate .. //depot/projects/mjexp_6/sys/dev/iwi/if_iwi.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/my/if_my.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/ppbus/if_plip.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/ral/rt2560.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/ral/rt2661.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/usb/if_ural.c#2 integrate .. //depot/projects/mjexp_6/sys/dev/wi/if_wi.c#2 integrate .. //depot/projects/mjexp_6/sys/fs/msdosfs/msdosfs_vfsops.c#2 integrate .. //depot/projects/mjexp_6/sys/fs/pseudofs/pseudofs_vncache.c#2 integrate .. //depot/projects/mjexp_6/sys/fs/udf/udf_vfsops.c#2 integrate .. //depot/projects/mjexp_6/sys/i4b/driver/i4b_ipr.c#2 integrate .. //depot/projects/mjexp_6/sys/kern/kern_descrip.c#2 integrate .. //depot/projects/mjexp_6/sys/kern/uipc_usrreq.c#2 integrate .. //depot/projects/mjexp_6/sys/net/bpf.c#2 integrate .. //depot/projects/mjexp_6/sys/net/bpf.h#2 integrate .. //depot/projects/mjexp_6/sys/net/bpfdesc.h#2 integrate .. //depot/projects/mjexp_6/sys/net/if_bridge.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_bridgevar.h#2 integrate .. //depot/projects/mjexp_6/sys/net/if_disc.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_enc.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_faith.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_fwsubr.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_gif.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_gre.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_loop.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_sl.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_stf.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_tap.c#2 integrate .. //depot/projects/mjexp_6/sys/net/if_tun.c#2 integrate .. //depot/projects/mjexp_6/sys/net80211/ieee80211_input.c#2 integrate .. //depot/projects/mjexp_6/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/mjexp_6/sys/netgraph/ng_sppp.c#2 integrate .. //depot/projects/mjexp_6/sys/netinet/ip_carp.c#2 integrate .. //depot/projects/mjexp_6/sys/netinet/ip_gre.c#2 integrate .. //depot/projects/mjexp_6/sys/netinet/tcp_usrreq.c#3 integrate .. //depot/projects/mjexp_6/sys/nfsserver/nfs_srvsubs.c#2 integrate .. //depot/projects/mjexp_6/sys/nfsserver/nfsm_subs.h#2 integrate .. //depot/projects/mjexp_6/sys/powerpc/psim/ata_iobus.c#2 integrate .. //depot/projects/mjexp_6/sys/security/audit/audit_arg.c#2 integrate .. //depot/projects/mjexp_6/sys/security/audit/audit_private.h#2 integrate .. //depot/projects/mjexp_6/sys/sparc64/pci/ofw_pcibus.c#3 integrate .. //depot/projects/mjexp_6/sys/sys/copyright.h#3 integrate .. //depot/projects/mjexp_6/sys/sys/file.h#2 integrate .. //depot/projects/mjexp_6/sys/sys/param.h#3 integrate .. //depot/projects/mjexp_6/sys/vm/swap_pager.c#2 integrate .. //depot/projects/mjexp_6/sys/vm/uma.h#2 integrate .. //depot/projects/mjexp_6/sys/vm/uma_core.c#2 integrate Differences ... ==== //depot/projects/mjexp_6/sys/boot/forth/loader.conf#2 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.95.2.10 2006/11/05 08:50:38 hrs Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.95.2.11 2007/01/17 02:45:35 maxim Exp $ ############################################################## ### Basic configuration options ############################ @@ -146,13 +146,13 @@ # ggatec(8), ggated(8), ggatel(8)) geom_label_load="NO" # File system labels (see glabel(8)) geom_md_load="NO" # Memory disk driver (vnode/swap/malloc) (see + # md(4), mdconfig(8)) geom_mirror_load="NO" # RAID1 disk driver (see gmirror(8)) geom_nop_load="NO" # Transparent disk driver (see gnop(8)) geom_raid3_load="NO" # RAID3 disk driver (see graid3(8)) geom_shsec_load="NO" # Shared secret disk driver (see gshsec(8)) geom_stripe_load="NO" # RAID0 disk driver (see gstripe(8)) geom_uzip_load="NO" # Compressed disk images driver (see mkuzip(8)) - # md(4), mdconfig(8)) geom_vinum_load="NO" # Concatenated/mirror/raid driver (see vinum(4)) @@ -182,7 +182,8 @@ ############################################################## if_disc_load="NO" # Discard device -if_ef_load="NO" # pseudo-device providing support for multiple ethernet frame types +if_ef_load="NO" # pseudo-device providing support for multiple + # ethernet frame types if_faith_load="NO" # IPv6-to-IPv4 TCP relay capturing interface if_gif_load="NO" # generic tunnel interface if_gre_load="NO" # encapsulating network device @@ -216,22 +217,26 @@ if_cue_load="NO" # CATC USB-EL1210A USB Ethernet if_dc_load="NO" # DEC/Intel 21143 and various workalikes if_de_load="NO" # DEC DC21x4x Ethernet -if_ed_load="NO" # National Semiconductor DS8390/WD83C690 Ethernet +if_ed_load="NO" # National Semiconductor DS8390/WD83C690 + # Ethernet if_el_load="NO" # 3Com Etherlink 3C501 if_em_load="NO" # Intel(R) PRO/1000 Gigabit Ethernet if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) if_ex_load="NO" # Intel EtherExpress Pro/10 Ethernet -if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet adapters +if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet + # adapters if_fxp_load="NO" # Intel EtherExpress PRO/100B (82557, 82558) if_gem_load="NO" # Sun GEM/Sun ERI/Apple GMAC if_hme_load="NO" # Sun Microelectronics STP2002-STQ Ethernet if_ie_load="NO" # Intel 82586 if_ipw_load="NO" # Intel PRO/Wireless 2100 wireless -if_iwi_load="NO" # Intel PRO/Wireless 2200BG/2225BG/2915ABG wireless +if_iwi_load="NO" # Intel PRO/Wireless 2200BG/2225BG/2915ABG + # wireless if_ixgb_load="NO" # Intel PRO/10Gb Ethernet if_le_load="NO" # AMD Am7900 LANCE and Am79C9xx PCnet -if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI Gigabit Ethernet +if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI Gigabit + # Ethernet if_lnc_load="NO" # AMD Lance/PCnet Ethernet if_my_load="NO" # Myson PCI Fast Ethernet if_nge_load="NO" # National Semiconductor PCI Gigabit Ethernet @@ -287,18 +292,21 @@ ng_ksocket_load="NO" # kernel socket netgraph node type ng_l2tp_load="NO" # L2TP protocol netgraph node type ng_lmi_load="NO" # frame relay LMI protocol netgraph node type -ng_mppc_load="NO" # Microsoft MPPC/MPPE compression and encryption netgraph node type -ng_netflow_load="NO" # Cisco's NetFlow netgraph note type +ng_mppc_load="NO" # Microsoft MPPC/MPPE compression and + # encryption netgraph node type +ng_netflow_load="NO" # Cisco's NetFlow netgraph node type ng_one2many_load="NO" # packet multiplexing netgraph node type ng_ppp_load="NO" # PPP protocol netgraph node type ng_pppoe_load="NO" # RFC 2516 PPPOE protocol netgraph node type ng_pptpgre_load="NO" # PPTP GRE protocol netgraph node type ng_rfc1490_load="NO" # RFC 1490 netgraph node type ng_socket_load="NO" # Netgraph socket node type -ng_split_load="NO" # netgraph node to separate incoming and outgoing flows +ng_split_load="NO" # netgraph node to separate incoming and + # outgoing flows ng_sppp_load="NO" # sppp netgraph node type ng_tee_load="NO" # Netgraph ``tee'' node type -ng_tty_load="NO" # Netgraph node type that is also a line discipline +ng_tty_load="NO" # Netgraph node type that is also a line + # discipline ng_vjc_load="NO" # Van Jacobsen compression netgraph node type ng_vlan_load="NO" # IEEE 802.1Q VLAN tagging netgraph node type ==== //depot/projects/mjexp_6/sys/conf/newvers.sh#2 (text+ko) ==== @@ -28,11 +28,11 @@ # SUCH DAMAGE. # # @(#)newvers.sh 8.1 (Berkeley) 4/20/94 -# $FreeBSD: src/sys/conf/newvers.sh,v 1.69.2.13 2006/09/10 03:06:53 kensmith Exp $ +# $FreeBSD: src/sys/conf/newvers.sh,v 1.69.2.14 2007/01/15 06:16:29 kensmith Exp $ TYPE="FreeBSD" REVISION="6.2" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi ==== //depot/projects/mjexp_6/sys/contrib/pf/net/if_pfsync.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.19.2.4 2006/08/10 13:45:59 glebius Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.19.2.5 2007/01/19 23:01:26 jhb Exp $ */ /* $OpenBSD: if_pfsync.c,v 1.46 2005/02/20 15:58:38 mcbride Exp $ */ /* @@ -1761,9 +1761,13 @@ KASSERT(m != NULL, ("pfsync_sendout: null mbuf")); #endif #if NBPFILTER > 0 +#ifdef __FreeBSD__ + BPF_MTAP(ifp, m); +#else if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif +#endif if (sc->sc_mbuf_net) { m_freem(m); ==== //depot/projects/mjexp_6/sys/dev/arl/if_arl.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/arl/if_arl.c,v 1.10.2.1 2005/08/25 05:01:04 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/arl/if_arl.c,v 1.10.2.2 2007/01/19 23:01:27 jhb Exp $"); #include "opt_inet.h" @@ -980,7 +980,7 @@ * Check if there's a bpf filter listening on this interface. * If so, hand off the raw packet to bpf. */ - if (ifp->if_bpf) { + if (bpf_peers_present(ifp->if_bpf)) { /* * Note that the interface cannot be in promiscuous mode if * there are no bpf listeners. And if el are in promiscuous ==== //depot/projects/mjexp_6/sys/dev/ath/if_ath.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.94.2.28 2006/10/16 01:01:41 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.94.2.29 2007/01/19 23:01:27 jhb Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -3019,7 +3019,7 @@ * pass decrypt+mic errors but others may be * interesting (e.g. crc). */ - if (sc->sc_drvbpf != NULL && + if (bpf_peers_present(sc->sc_drvbpf) && (ds->ds_rxstat.rs_status & sc->sc_monpass)) { bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); @@ -3050,7 +3050,8 @@ sc->sc_stats.ast_ant_rx[ds->ds_rxstat.rs_antenna]++; - if (sc->sc_drvbpf != NULL && !ath_rx_tap(sc, m, ds, tsf, nf)) { + if (bpf_peers_present(sc->sc_drvbpf) && + !ath_rx_tap(sc, m, ds, tsf, nf)) { m_freem(m); /* XXX reclaim */ goto rx_next; } @@ -3752,9 +3753,9 @@ ieee80211_dump_pkt(mtod(m0, caddr_t), m0->m_len, sc->sc_hwmap[txrate].ieeerate, -1); - if (ic->ic_rawbpf) + if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m0); - if (sc->sc_drvbpf) { + if (bpf_peers_present(sc->sc_drvbpf)) { u_int64_t tsf = ath_hal_gettsf64(ah); sc->sc_tx_th.wt_tsf = htole64(tsf); ==== //depot/projects/mjexp_6/sys/dev/awi/awi.c#2 (text+ko) ==== @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.62 2004/01/16 14:13:15 onoe Exp $"); #endif #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.37.2.4 2005/09/03 22:46:42 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.37.2.5 2007/01/19 23:01:27 jhb Exp $"); #endif #include "opt_inet.h" @@ -796,7 +796,7 @@ } IFQ_DEQUEUE(&ifp->if_snd, m0); #if NBPFILTER > 0 - if (ifp->if_bpf) + if (bpf_peers_present(ifp->if_bpf)) bpf_mtap(ifp->if_bpf, m0); #endif if ((ifp->if_flags & IFF_LINK0) || sc->sc_adhoc_ap) @@ -839,7 +839,7 @@ ifp->if_opackets++; } #if NBPFILTER > 0 - if (ic->ic_rawbpf) + if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m0); #endif if (dowep) { ==== //depot/projects/mjexp_6/sys/dev/bce/if_bce.c#2 (text) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.2.2.7 2006/11/28 17:05:36 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.2.2.8 2007/01/18 16:14:19 delphij Exp $"); /* * The following controllers are supported by this driver: @@ -303,7 +303,7 @@ static void bce_start_locked (struct ifnet *); static void bce_start (struct ifnet *); static int bce_ioctl (struct ifnet *, u_long, caddr_t); -static void bce_watchdog (struct ifnet *); +static void bce_watchdog (struct bce_softc *); static int bce_ifmedia_upd (struct ifnet *); static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); static void bce_init_locked (struct bce_softc *); @@ -326,7 +326,6 @@ static void bce_intr (void *); static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); -static void bce_tick_locked (struct bce_softc *); static void bce_tick (void *); static void bce_add_sysctls (struct bce_softc *); @@ -716,8 +715,6 @@ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = bce_ioctl; ifp->if_start = bce_start; - ifp->if_timer = 0; - ifp->if_watchdog = bce_watchdog; ifp->if_init = bce_init; ifp->if_mtu = ETHERMTU; ifp->if_hwassist = BCE_IF_HWASSIST; @@ -761,7 +758,7 @@ #if __FreeBSD_version < 500000 callout_init(&sc->bce_stat_ch); #else - callout_init(&sc->bce_stat_ch, CALLOUT_MPSAFE); + callout_init_mtx(&sc->bce_stat_ch, &sc->bce_mtx, 0); #endif /* Hookup IRQ last. */ @@ -3115,7 +3112,7 @@ } ifp->if_flags = itmp; - ifp->if_timer = 0; + sc->watchdog_timer = 0; sc->bce_link = 0; @@ -3881,7 +3878,7 @@ sc->bce_link = 0; callout_stop(&sc->bce_stat_ch); - bce_tick_locked(sc); + bce_tick(sc); /* Update the status_attn_bits_ack field in the status block. */ if (new_link_state) { @@ -4289,7 +4286,7 @@ } /* Clear the TX timeout timer. */ - ifp->if_timer = 0; + sc->watchdog_timer = 0; /* Clear the tx hardware queue full flag. */ if ((sc->used_tx_bd + BCE_TX_SLACK_SPACE) < USABLE_TX_BD) { @@ -4757,7 +4754,7 @@ REG_WR(sc, MB_TX_CID_ADDR + BCE_L2CTX_TX_HOST_BSEQ, sc->tx_prod_bseq); /* Set the tx timeout. */ - ifp->if_timer = BCE_TX_TIMEOUT; + sc->watchdog_timer = BCE_TX_TIMEOUT; bce_start_locked_exit: return; @@ -4990,25 +4987,34 @@ /* Nothing. */ /****************************************************************************/ static void -bce_watchdog(struct ifnet *ifp) +bce_watchdog(struct bce_softc *sc) { - struct bce_softc *sc = ifp->if_softc; DBRUN(BCE_WARN_SEND, bce_dump_driver_state(sc); bce_dump_status_block(sc)); + BCE_LOCK_ASSERT(sc); + + if (sc->watchdog_timer == 0 || --sc->watchdog_timer) + return; + + /* + * If we are in this routine because of pause frames, then + * don't reset the hardware. + */ + if (REG_RD(sc, BCE_EMAC_TX_STATUS) & BCE_EMAC_TX_STATUS_XOFFED) + return; + BCE_PRINTF(sc, "%s(%d): Watchdog timeout occurred, resetting!\n", __FILE__, __LINE__); /* DBRUN(BCE_FATAL, bce_breakpoint(sc)); */ - BCE_LOCK(sc); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + sc->bce_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; bce_init_locked(sc); - ifp->if_oerrors++; - BCE_UNLOCK(sc); + sc->bce_ifp->if_oerrors++; } @@ -5509,8 +5515,9 @@ static void -bce_tick_locked(struct bce_softc *sc) +bce_tick(void *xsc) { + struct bce_softc *sc = xsc; struct mii_data *mii = NULL; struct ifnet *ifp; u32 msg; @@ -5530,9 +5537,12 @@ /* Update the statistics from the hardware statistics block. */ bce_stats_update(sc); + /* Check that chip hasn't hang. */ + bce_watchdog(sc); + /* Schedule the next tick. */ callout_reset( - &sc->bce_stat_ch, /* callout */ + &sc->bce_stat_ch, /* callout */ hz, /* ticks */ bce_tick, /* function */ sc); /* function argument */ @@ -5564,19 +5574,6 @@ } -static void -bce_tick(void *xsc) -{ - struct bce_softc *sc; - - sc = xsc; - - BCE_LOCK(sc); - bce_tick_locked(sc); - BCE_UNLOCK(sc); -} - - #ifdef BCE_DEBUG /****************************************************************************/ /* Allows the driver state to be dumped through the sysctl interface. */ ==== //depot/projects/mjexp_6/sys/dev/bce/if_bcereg.h#2 (text) ==== @@ -26,7 +26,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/bce/if_bcereg.h,v 1.1.2.4 2006/11/28 17:05:36 scottl Exp $ + * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.1.2.5 2007/01/18 16:14:19 delphij Exp $ */ #ifndef _BCE_H_DEFINED @@ -4755,6 +4755,8 @@ int bce_link; struct callout bce_stat_ch; + int watchdog_timer; /* ticks until chip reset */ + /* Frame size and mbuf allocation size for RX frames. */ u32 max_frame_size; int mbuf_alloc_size; ==== //depot/projects/mjexp_6/sys/dev/ce/if_ce.c#2 (text) ==== @@ -16,7 +16,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ce/if_ce.c,v 1.3.6.1 2006/03/10 22:57:36 rik Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ce/if_ce.c,v 1.3.6.2 2007/01/19 23:01:28 jhb Exp $"); #include <sys/param.h> @@ -1069,10 +1069,10 @@ if (! m) return; #ifndef NETGRAPH - if (d->ifp->if_bpf) #if __FreeBSD_version >= 500000 - BPF_MTAP (d->ifp, m); + BPF_MTAP (d->ifp, m); #else + if (d->ifp->if_bpf) bpf_mtap (d->ifp, m); #endif #endif @@ -1191,10 +1191,10 @@ m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - if (d->ifp->if_bpf) #if __FreeBSD_version >= 500000 - BPF_TAP (d->ifp, data, len); + BPF_TAP (d->ifp, data, len); #else + if (d->ifp->if_bpf) bpf_tap (d->ifp, data, len); #endif IF_ENQUEUE(&d->rqueue, m); ==== //depot/projects/mjexp_6/sys/dev/cp/if_cp.c#2 (text+ko) ==== @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/cp/if_cp.c,v 1.24.2.1 2005/08/25 05:01:06 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cp/if_cp.c,v 1.24.2.2 2007/01/19 23:01:28 jhb Exp $"); #include <sys/param.h> #include <sys/ucred.h> @@ -821,8 +821,7 @@ if (! m) return; #ifndef NETGRAPH - if (d->ifp->if_bpf) - BPF_MTAP (d->ifp, m); + BPF_MTAP (d->ifp, m); #endif len = m_length (m, NULL); if (len >= BUFSZ) @@ -931,8 +930,7 @@ m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - if (d->ifp->if_bpf) - BPF_TAP (d->ifp, data, len); + BPF_TAP (d->ifp, data, len); IF_ENQUEUE (&d->queue, m); #endif } ==== //depot/projects/mjexp_6/sys/dev/ctau/if_ct.c#2 (text+ko) ==== @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ctau/if_ct.c,v 1.25.2.1 2005/08/25 05:01:06 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ctau/if_ct.c,v 1.25.2.2 2007/01/19 23:01:28 jhb Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -1030,8 +1030,7 @@ if (! m) return; #ifndef NETGRAPH - if (d->ifp->if_bpf) - BPF_MTAP (d->ifp, m); + BPF_MTAP (d->ifp, m); #endif len = m_length (m, NULL); if (! m->m_next) @@ -1151,8 +1150,7 @@ m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - if (d->ifp->if_bpf) - BPF_TAP (d->ifp, data, len); + BPF_TAP (d->ifp, data, len); IF_ENQUEUE (&d->queue, m); #endif } ==== //depot/projects/mjexp_6/sys/dev/cx/if_cx.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.45.2.2 2006/03/10 19:37:31 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.45.2.3 2007/01/19 23:01:28 jhb Exp $"); #include <sys/param.h> @@ -1185,8 +1185,7 @@ if (! m) return; #ifndef NETGRAPH - if (d->ifp->if_bpf) - BPF_MTAP (d->ifp, m); + BPF_MTAP (d->ifp, m); #endif len = m_length (m, NULL); if (! m->m_next) @@ -1342,8 +1341,7 @@ m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - if (d->ifp->if_bpf) - BPF_TAP (d->ifp, data, len); + BPF_TAP (d->ifp, data, len); IF_ENQUEUE (&d->queue, m); #endif } ==== //depot/projects/mjexp_6/sys/dev/en/midway.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/en/midway.c,v 1.65.2.1 2005/08/25 05:01:07 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/en/midway.c,v 1.65.2.2 2007/01/19 23:01:28 jhb Exp $"); /* * @@ -776,7 +776,7 @@ sc->vccs[tx.vci]->obytes += tx.datalen; #ifdef ENABLE_BPF - if (sc->ifp->if_bpf != NULL) { + if (bpf_peers_present(sc->ifp->if_bpf)) { /* * adjust the top of the mbuf to skip the TBD if present * before passing the packet to bpf. @@ -794,7 +794,7 @@ tx.m->m_pkthdr.len = tx.datalen; } - BPF_MTAP(sc->ifp, tx.m); + bpf_mtap(sc->ifp->if_bpf, tx.m); } #endif ==== //depot/projects/mjexp_6/sys/dev/firewire/if_fwip.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/if_fwip.c,v 1.7.2.3 2005/10/07 14:00:03 glebius Exp $ + * $FreeBSD: src/sys/dev/firewire/if_fwip.c,v 1.7.2.4 2007/01/19 23:01:29 jhb Exp $ */ #ifdef HAVE_KERNEL_OPTION_HEADERS @@ -838,7 +838,7 @@ * Record the sender ID for possible BPF usage. */ src = ntohl(p[1]) >> 16; - if (ifp->if_bpf) { + if (bpf_peers_present(ifp->if_bpf)) { mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 2*sizeof(uint32_t), M_NOWAIT); @@ -939,7 +939,7 @@ return; } - if (ifp->if_bpf) { + if (bpf_peers_present(ifp->if_bpf)) { /* * Record the sender ID for possible BPF usage. */ ==== //depot/projects/mjexp_6/sys/dev/gem/if_gem.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.29.2.5 2005/10/05 22:08:17 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.29.2.6 2007/01/19 23:01:29 jhb Exp $"); /* * Driver for Sun GEM ethernet controllers. @@ -1205,8 +1205,7 @@ bus_space_write_4(sc->sc_bustag, sc->sc_h, GEM_TX_KICK, sc->sc_txnext); - if (ifp->if_bpf != NULL) - bpf_mtap(ifp->if_bpf, m0); + BPF_MTAP(ifp, m0); } while (1); if (txmfail == -1 || sc->sc_txfree == 0) { ==== //depot/projects/mjexp_6/sys/dev/hptmv/entry.c#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/dev/hptmv/entry.c,v 1.8.2.1 2005/10/06 18:47:57 delphij Exp $ + * $FreeBSD: src/sys/dev/hptmv/entry.c,v 1.8.2.2 2007/01/11 16:31:47 jhb Exp $ */ #include <sys/param.h> @@ -167,12 +167,12 @@ { intrmask_t spl = 0; - mtx_lock_spin(&driver_lock); + mtx_lock(&driver_lock); return spl; } void unlock_driver(intrmask_t spl) { - mtx_unlock_spin(&driver_lock); + mtx_unlock(&driver_lock); } #else static int driver_locked = 0; @@ -1169,7 +1169,7 @@ #if __FreeBSD_version >= 500000 static void hpt_init(void *dummy) { - mtx_init(&driver_lock, "hptlock", NULL, MTX_SPIN); + mtx_init(&driver_lock, "hptlock", NULL, MTX_DEF); } SYSINIT(hptinit, SI_SUB_CONFIGURE, SI_ORDER_FIRST, hpt_init, NULL); #endif @@ -1184,8 +1184,6 @@ PVDevice pVDev; - intrmask_t oldspl = lock_driver(); - pAdapter->next = 0; if(gIal_Adapter == 0){ @@ -1226,7 +1224,6 @@ if (hptmv_allocate_edma_queues(pAdapter)) { MV_ERROR("RR182x: Failed to allocate memory for EDMA queues\n"); - unlock_driver(oldspl); return ENOMEM; } @@ -1239,7 +1236,6 @@ { MV_ERROR("RR182x: Failed to remap memory space\n"); hptmv_free_edma_queues(pAdapter); - unlock_driver(oldspl); return ENXIO; } else @@ -1269,7 +1265,6 @@ unregister: bus_release_resource(pAdapter->hpt_dev, SYS_RES_MEMORY, rid, pAdapter->mem_res); hptmv_free_edma_queues(pAdapter); - unlock_driver(oldspl); return ENXIO; } pAdapter->ver_601 = pMvSataAdapter->pcbVersion; @@ -1412,7 +1407,6 @@ #endif mvSataUnmaskAdapterInterrupt(pMvSataAdapter); - unlock_driver(oldspl); return 0; } ==== //depot/projects/mjexp_6/sys/dev/hwpmc/hwpmc_x86.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_x86.c,v 1.2.2.1 2005/08/26 19:49:32 jkoshy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_x86.c,v 1.2.2.2 2007/01/15 04:58:49 emaste Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -82,7 +82,7 @@ case 0x7: case 0x8: case 0xA: case 0xB: cputype = PMC_CPU_INTEL_PIII; break; - case 0x9: case 0xD: + case 0x9: case 0xD: case 0xE: cputype = PMC_CPU_INTEL_PM; break; } @@ -91,7 +91,7 @@ #if defined(__i386__) || defined(__amd64__) case 0xF00: /* P4 */ model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); - if (model >= 0 && model <= 4) /* known models */ + if (model >= 0 && model <= 6) /* known models */ cputype = PMC_CPU_INTEL_PIV; break; } ==== //depot/projects/mjexp_6/sys/dev/ipw/if_ipw.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.7.2.5 2006/04/10 18:27:00 mlaier Exp $ */ +/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.7.2.6 2007/01/19 23:01:29 jhb Exp $ */ /*- * Copyright (c) 2004-2006 @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.7.2.5 2006/04/10 18:27:00 mlaier Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.7.2.6 2007/01/19 23:01:29 jhb Exp $"); /*- * Intel(R) PRO/Wireless 2100 MiniPCI driver @@ -1071,7 +1071,7 @@ m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = le32toh(status->len); - if (sc->sc_drvbpf != NULL) { + if (bpf_peers_present(sc->sc_drvbpf)) { struct ipw_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; @@ -1348,7 +1348,7 @@ wh = mtod(m0, struct ieee80211_frame *); } - if (sc->sc_drvbpf != NULL) { + if (bpf_peers_present(sc->sc_drvbpf)) { struct ipw_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; @@ -1516,7 +1516,7 @@ continue; } - if (ic->ic_rawbpf != NULL) + if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m0); if (ipw_tx_start(ifp, m0, ni) != 0) { ==== //depot/projects/mjexp_6/sys/dev/isp/isp_target.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ #endif #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_target.c,v 1.32.2.3 2006/09/01 05:55:14 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_target.c,v 1.32.2.4 2007/01/06 04:20:29 mjacob Exp $"); #include <dev/isp/isp_freebsd.h> #endif #ifdef __OpenBSD__ ==== //depot/projects/mjexp_6/sys/dev/iwi/if_iwi.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.8.2.10 2006/10/29 08:29:31 mlaier Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.8.2.11 2007/01/19 23:01:29 jhb Exp $"); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -1302,7 +1302,7 @@ m_adj(m, sizeof (struct iwi_hdr) + sizeof (struct iwi_frame)); - if (sc->sc_drvbpf != NULL) { + if (bpf_peers_present(sc->sc_drvbpf)) { struct iwi_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; @@ -1831,7 +1831,7 @@ wh = mtod(m0, struct ieee80211_frame *); } - if (sc->sc_drvbpf != NULL) { + if (bpf_peers_present(sc->sc_drvbpf)) { struct iwi_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; @@ -1986,7 +1986,7 @@ continue; } - if (ic->ic_rawbpf != NULL) + if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m0); if (iwi_tx_start(ifp, m0, ni, ac) != 0) { ==== //depot/projects/mjexp_6/sys/dev/mfi/mfi.c#2 (text) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.3.2.4 2006/10/21 05:28:50 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.3.2.5 2007/01/07 06:44:37 scottl Exp $"); #include "opt_mfi.h" @@ -91,7 +91,7 @@ SYSCTL_INT(_hw_mfi, OID_AUTO, event_locale, CTLFLAG_RW, &mfi_event_locale, 0, "event message locale"); -static int mfi_event_class = MFI_EVT_CLASS_DEBUG; +static int mfi_event_class = MFI_EVT_CLASS_INFO; TUNABLE_INT("hw.mfi.event_class", &mfi_event_class); SYSCTL_INT(_hw_mfi, OID_AUTO, event_class, CTLFLAG_RW, &mfi_event_class, 0, "event message class"); ==== //depot/projects/mjexp_6/sys/dev/my/if_my.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/my/if_my.c,v 1.29.2.4 2006/06/19 19:40:59 brueffer Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/my/if_my.c,v 1.29.2.5 2007/01/19 23:01:29 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1153,8 +1153,8 @@ * broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (ifp->if_bpf) { - BPF_MTAP(ifp, m); + if (bpf_peers_present(ifp->if_bpf)) { + bpf_mtap(ifp->if_bpf, m); if (ifp->if_flags & IFF_PROMISC && (bcmp(eh->ether_dhost, IFP2ENADDR(sc->my_ifp), ETHER_ADDR_LEN) && ==== //depot/projects/mjexp_6/sys/dev/ppbus/if_plip.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ppbus/if_plip.c,v 1.37.2.2 2006/07/19 16:31:12 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ppbus/if_plip.c,v 1.37.2.3 2007/01/19 23:01:30 jhb Exp $"); /* * Parallel port TCP/IP interfaces added. I looked at the driver from @@ -455,7 +455,7 @@ lptap(struct ifnet *ifp, struct mbuf *m) { u_int32_t af = AF_INET; - BPF_MTAP2(ifp, &af, sizeof(af), m); + bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m); } static void @@ -514,7 +514,7 @@ sc->sc_ifp->if_ibytes += len; top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, sc->sc_ifp, 0); if (top) { - if (sc->sc_ifp->if_bpf) + if (bpf_peers_present(sc->sc_ifp->if_bpf)) lptap(sc->sc_ifp, top); netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */ } @@ -559,7 +559,7 @@ sc->sc_ifp->if_ibytes += len; top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, sc->sc_ifp, 0); if (top) { - if (sc->sc_ifp->if_bpf) + if (bpf_peers_present(sc->sc_ifp->if_bpf)) lptap(sc->sc_ifp, top); netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */ } @@ -694,7 +694,7 @@ } else { ifp->if_opackets++; ifp->if_obytes += m->m_pkthdr.len; - if (ifp->if_bpf) >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701200427.l0K4RBSK087103>