Date: Fri, 6 Nov 2009 14:55:01 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198988 - in head/sys: dev/ath dev/cxgb dev/hatm dev/ixgbe dev/nfe dev/patm dev/sk dev/stge net net80211 netgraph Message-ID: <200911061455.nA6Et1Pu020171@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Nov 6 14:55:01 2009 New Revision: 198988 URL: http://svn.freebsd.org/changeset/base/198988 Log: Take a step towards removing if_watchdog/if_timer. Don't explicitly set if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/hatm/if_hatm.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/nfe/if_nfe.c head/sys/dev/patm/if_patm_attach.c head/sys/dev/sk/if_sk.c head/sys/dev/stge/if_stge.c head/sys/net/if_ef.c head/sys/net80211/ieee80211.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_fec.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_sppp.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/ath/if_ath.c Fri Nov 6 14:55:01 2009 (r198988) @@ -560,7 +560,6 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_softc = sc; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; ifp->if_start = ath_start; - ifp->if_watchdog = NULL; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/cxgb/cxgb_main.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1054,10 +1054,6 @@ cxgb_port_attach(device_t dev) ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; - - ifp->if_timer = 0; /* Disable ifnet watchdog */ - ifp->if_watchdog = NULL; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); Modified: head/sys/dev/hatm/if_hatm.c ============================================================================== --- head/sys/dev/hatm/if_hatm.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/hatm/if_hatm.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1928,7 +1928,6 @@ hatm_attach(device_t dev) ifp->if_flags = IFF_SIMPLEX; ifp->if_ioctl = hatm_ioctl; ifp->if_start = hatm_start; - ifp->if_watchdog = NULL; ifp->if_init = hatm_init; utopia_attach(&sc->utopia, IFP2IFATM(sc->ifp), &sc->media, &sc->mtx, Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 6 14:55:01 2009 (r198988) @@ -2508,8 +2508,6 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; #endif - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 2; ether_ifattach(ifp, adapter->hw.mac.addr); Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/nfe/if_nfe.c Fri Nov 6 14:55:01 2009 (r198988) @@ -567,7 +567,6 @@ nfe_attach(device_t dev) ifp->if_start = nfe_start; ifp->if_hwassist = 0; ifp->if_capabilities = 0; - ifp->if_watchdog = NULL; ifp->if_init = nfe_init; IFQ_SET_MAXLEN(&ifp->if_snd, NFE_TX_RING_COUNT - 1); ifp->if_snd.ifq_drv_maxlen = NFE_TX_RING_COUNT - 1; Modified: head/sys/dev/patm/if_patm_attach.c ============================================================================== --- head/sys/dev/patm/if_patm_attach.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/patm/if_patm_attach.c Fri Nov 6 14:55:01 2009 (r198988) @@ -197,11 +197,9 @@ patm_attach(device_t dev) ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = IFF_SIMPLEX; - ifp->if_watchdog = NULL; ifp->if_init = patm_init; ifp->if_ioctl = patm_ioctl; ifp->if_start = patm_start; - ifp->if_watchdog = NULL; /* do this early so we can destroy unconditionally */ mtx_init(&sc->mtx, device_get_nameunit(dev), Modified: head/sys/dev/sk/if_sk.c ============================================================================== --- head/sys/dev/sk/if_sk.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/sk/if_sk.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1372,8 +1372,6 @@ sk_attach(dev) ifp->if_capenable = ifp->if_capabilities; ifp->if_ioctl = sk_ioctl; ifp->if_start = sk_start; - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_init = sk_init; IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1); ifp->if_snd.ifq_drv_maxlen = SK_TX_RING_CNT - 1; Modified: head/sys/dev/stge/if_stge.c ============================================================================== --- head/sys/dev/stge/if_stge.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/stge/if_stge.c Fri Nov 6 14:55:01 2009 (r198988) @@ -722,8 +722,6 @@ stge_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = stge_ioctl; ifp->if_start = stge_start; - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_init = stge_init; ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_drv_maxlen = STGE_TX_RING_CNT - 1; Modified: head/sys/net/if_ef.c ============================================================================== --- head/sys/net/if_ef.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/net/if_ef.c Fri Nov 6 14:55:01 2009 (r198988) @@ -128,7 +128,6 @@ ef_attach(struct efnet *sc) struct ifnet *ifp = sc->ef_ifp; ifp->if_start = ef_start; - ifp->if_watchdog = NULL; ifp->if_init = ef_init; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/net80211/ieee80211.c Fri Nov 6 14:55:01 2009 (r198988) @@ -391,7 +391,6 @@ ieee80211_vap_setup(struct ieee80211com ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; ifp->if_start = ieee80211_start; ifp->if_ioctl = ieee80211_ioctl; - ifp->if_watchdog = NULL; /* NB: no watchdog routine */ ifp->if_init = ieee80211_init; /* NB: input+output filled in by ether_ifattach */ IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_eiface.c Fri Nov 6 14:55:01 2009 (r198988) @@ -369,7 +369,6 @@ ng_eiface_constructor(node_p node) ifp->if_output = ether_output; ifp->if_start = ng_eiface_start; ifp->if_ioctl = ng_eiface_ioctl; - ifp->if_watchdog = NULL; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_fec.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1226,7 +1226,6 @@ ng_fec_constructor(node_p node) ifp->if_start = ng_fec_start; ifp->if_ioctl = ng_fec_ioctl; ifp->if_init = ng_fec_init; - ifp->if_watchdog = NULL; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_mtu = NG_FEC_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST); Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_iface.c Fri Nov 6 14:55:01 2009 (r198988) @@ -558,7 +558,6 @@ ng_iface_constructor(node_p node) ifp->if_output = ng_iface_output; ifp->if_start = ng_iface_start; ifp->if_ioctl = ng_iface_ioctl; - ifp->if_watchdog = NULL; ifp->if_mtu = NG_IFACE_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_POINTOPOINT|IFF_NOARP|IFF_MULTICAST); ifp->if_type = IFT_PROPVIRTUAL; /* XXX */ Modified: head/sys/netgraph/ng_sppp.c ============================================================================== --- head/sys/netgraph/ng_sppp.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_sppp.c Fri Nov 6 14:55:01 2009 (r198988) @@ -279,7 +279,6 @@ ng_sppp_constructor (node_p node) if_initname (SP2IFP(pp), NG_SPPP_IFACE_NAME, priv->unit); ifp->if_start = ng_sppp_start; ifp->if_ioctl = ng_sppp_ioctl; - ifp->if_watchdog = NULL; ifp->if_flags = (IFF_POINTOPOINT|IFF_MULTICAST); /* Give this node the same name as the interface (if possible) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911061455.nA6Et1Pu020171>