From owner-p4-projects@FreeBSD.ORG Mon Dec 15 07:41:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 59E771065673; Mon, 15 Dec 2008 07:41:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04A0C1065672 for ; Mon, 15 Dec 2008 07:41:12 +0000 (UTC) (envelope-from zec@icir.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E3AAC8FC1B for ; Mon, 15 Dec 2008 07:41:11 +0000 (UTC) (envelope-from zec@icir.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF7f1hc008745 for ; Mon, 15 Dec 2008 07:41:01 GMT (envelope-from zec@icir.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mBF7ex5v008735 for perforce@freebsd.org; Mon, 15 Dec 2008 07:40:59 GMT (envelope-from zec@icir.org) Date: Mon, 15 Dec 2008 07:40:59 GMT Message-Id: <200812150740.mBF7ex5v008735@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@icir.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 154691 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: Mon, 15 Dec 2008 07:41:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=154691 Change 154691 by zec@zec_tca51 on 2008/12/15 07:40:15 IFC @ 154690 (arpv2 & ng multithread) Affected files ... .. //depot/projects/vimage/src/sys/conf/NOTES#38 integrate .. //depot/projects/vimage/src/sys/conf/files#50 integrate .. //depot/projects/vimage/src/sys/contrib/pf/net/pf.c#20 integrate .. //depot/projects/vimage/src/sys/contrib/rdma/rdma_addr.c#2 integrate .. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c#3 integrate .. //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_l2t.c#4 integrate .. //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_l2t.h#3 integrate .. //depot/projects/vimage/src/sys/dev/usb/ucom.c#10 integrate .. //depot/projects/vimage/src/sys/dev/usb/ucomvar.h#7 integrate .. //depot/projects/vimage/src/sys/dev/usb/uftdi.c#7 integrate .. //depot/projects/vimage/src/sys/modules/Makefile#35 integrate .. //depot/projects/vimage/src/sys/modules/ath/Makefile#4 integrate .. //depot/projects/vimage/src/sys/modules/ath_rate_amrr/Makefile#7 delete .. //depot/projects/vimage/src/sys/modules/ath_rate_onoe/Makefile#7 delete .. //depot/projects/vimage/src/sys/modules/ath_rate_sample/Makefile#7 delete .. //depot/projects/vimage/src/sys/modules/cxgb/Makefile#10 integrate .. //depot/projects/vimage/src/sys/net/if.c#58 integrate .. //depot/projects/vimage/src/sys/net/if_arcsubr.c#4 integrate .. //depot/projects/vimage/src/sys/net/if_atmsubr.c#6 integrate .. //depot/projects/vimage/src/sys/net/if_ethersubr.c#35 integrate .. //depot/projects/vimage/src/sys/net/if_fddisubr.c#7 integrate .. //depot/projects/vimage/src/sys/net/if_fwsubr.c#9 integrate .. //depot/projects/vimage/src/sys/net/if_iso88025subr.c#7 integrate .. //depot/projects/vimage/src/sys/net/if_llatbl.c#1 branch .. //depot/projects/vimage/src/sys/net/if_llatbl.h#1 branch .. //depot/projects/vimage/src/sys/net/if_var.h#26 integrate .. //depot/projects/vimage/src/sys/net/radix_mpath.c#5 integrate .. //depot/projects/vimage/src/sys/net/route.c#38 integrate .. //depot/projects/vimage/src/sys/net/route.h#7 integrate .. //depot/projects/vimage/src/sys/net/rtsock.c#25 integrate .. //depot/projects/vimage/src/sys/net80211/_ieee80211.h#11 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211.c#25 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_ddb.c#15 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_dfs.h#2 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_hostap.c#7 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_input.c#13 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_ioctl.c#16 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_node.c#15 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_node.h#10 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_output.c#16 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_regdomain.c#6 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_scan_sta.c#9 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_var.h#18 integrate .. //depot/projects/vimage/src/sys/netgraph/netflow/netflow.c#7 integrate .. //depot/projects/vimage/src/sys/netgraph/ng_base.c#50 integrate .. //depot/projects/vimage/src/sys/netinet/if_atm.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/if_ether.c#32 integrate .. //depot/projects/vimage/src/sys/netinet/if_ether.h#3 integrate .. //depot/projects/vimage/src/sys/netinet/in.c#25 integrate .. //depot/projects/vimage/src/sys/netinet/in_mcast.c#17 integrate .. //depot/projects/vimage/src/sys/netinet/in_pcb.c#47 integrate .. //depot/projects/vimage/src/sys/netinet/in_proto.c#18 integrate .. //depot/projects/vimage/src/sys/netinet/in_rmx.c#28 integrate .. //depot/projects/vimage/src/sys/netinet/in_var.h#16 integrate .. //depot/projects/vimage/src/sys/netinet/ip_carp.c#19 integrate .. //depot/projects/vimage/src/sys/netinet/ip_fastfwd.c#17 integrate .. //depot/projects/vimage/src/sys/netinet/ip_fw2.c#62 integrate .. //depot/projects/vimage/src/sys/netinet/ip_input.c#45 integrate .. //depot/projects/vimage/src/sys/netinet/ip_output.c#27 integrate .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#70 integrate .. //depot/projects/vimage/src/sys/netinet6/icmp6.c#38 integrate .. //depot/projects/vimage/src/sys/netinet6/in6.c#26 integrate .. //depot/projects/vimage/src/sys/netinet6/in6_rmx.c#28 integrate .. //depot/projects/vimage/src/sys/netinet6/in6_src.c#33 integrate .. //depot/projects/vimage/src/sys/netinet6/in6_var.h#9 integrate .. //depot/projects/vimage/src/sys/netinet6/ip6_input.c#44 integrate .. //depot/projects/vimage/src/sys/netinet6/ip6_output.c#24 integrate .. //depot/projects/vimage/src/sys/netinet6/ip6_var.h#18 integrate .. //depot/projects/vimage/src/sys/netinet6/nd6.c#41 integrate .. //depot/projects/vimage/src/sys/netinet6/nd6.h#14 integrate .. //depot/projects/vimage/src/sys/netinet6/nd6_nbr.c#30 integrate .. //depot/projects/vimage/src/sys/netinet6/nd6_rtr.c#27 integrate .. //depot/projects/vimage/src/sys/netinet6/vinet6.h#32 integrate .. //depot/projects/vimage/src/sys/sys/param.h#38 integrate .. //depot/projects/vimage/src/sys/sys/vtoc.h#2 integrate Differences ... ==== //depot/projects/vimage/src/sys/conf/NOTES#38 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1516 2008/11/12 09:52:06 yongari Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1517 2008/12/15 06:10:57 qingli Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1958,7 +1958,7 @@ device hatm #Fore/Marconi HE155/622 device patm #IDT77252 cards (ProATM and IDT) device utopia #ATM PHY driver -options NATM #native ATM +#options NATM #native ATM options LIBMBPOOL #needed by patm, iatm ==== //depot/projects/vimage/src/sys/conf/files#50 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1355 2008/12/10 23:12:39 zec Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1356 2008/12/15 06:10:57 qingli Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -2172,6 +2172,7 @@ net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop +net/if_llatbl.c standard net/if_media.c standard net/if_mib.c standard net/if_ppp.c optional ppp ==== //depot/projects/vimage/src/sys/contrib/pf/net/pf.c#20 (text+ko) ==== @@ -41,7 +41,7 @@ #include "opt_inet6.h" #include -__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.59 2008/12/02 21:37:28 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.60 2008/12/15 06:10:57 qingli Exp $"); #endif #ifdef __FreeBSD__ @@ -3162,7 +3162,7 @@ #ifdef RTF_PRCLONING rtalloc_ign(&ro, (RTF_CLONING | RTF_PRCLONING)); #else /* !RTF_PRCLONING */ - in_rtalloc_ign(&ro, RTF_CLONING, 0); + in_rtalloc_ign(&ro, 0, 0); #endif #else /* ! __FreeBSD__ */ rtalloc_noclone(&ro, NO_CLONING); @@ -3183,7 +3183,7 @@ rtalloc_ign((struct route *)&ro6, (RTF_CLONING | RTF_PRCLONING)); #else /* !RTF_PRCLONING */ - rtalloc_ign((struct route *)&ro6, RTF_CLONING); + rtalloc_ign((struct route *)&ro6, 0); #endif #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro6, NO_CLONING); @@ -5986,9 +5986,9 @@ #ifdef __FreeBSD__ /* XXX MRT not always INET */ /* stick with table 0 though */ if (af == AF_INET) - in_rtalloc_ign((struct route *)&ro, RTF_CLONING, 0); + in_rtalloc_ign((struct route *)&ro, 0, 0); else - rtalloc_ign((struct route *)&ro, RTF_CLONING); + rtalloc_ign((struct route *)&ro, 0); #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro, NO_CLONING); #endif @@ -6068,9 +6068,9 @@ rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING)); # else /* !RTF_PRCLONING */ if (af == AF_INET) - in_rtalloc_ign((struct route *)&ro, RTF_CLONING, 0); + in_rtalloc_ign((struct route *)&ro, 0, 0); else - rtalloc_ign((struct route *)&ro, RTF_CLONING); + rtalloc_ign((struct route *)&ro, 0); # endif #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro, NO_CLONING); ==== //depot/projects/vimage/src/sys/contrib/rdma/rdma_addr.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/contrib/rdma/rdma_addr.c,v 1.1 2008/05/05 18:35:54 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/contrib/rdma/rdma_addr.c,v 1.2 2008/12/15 06:10:57 qingli Exp $"); #include #include @@ -163,6 +163,7 @@ struct route iproute; struct sockaddr_in *dst = (struct sockaddr_in *)&iproute.ro_dst; char dmac[ETHER_ADDR_LEN]; + struct llentry *lle; bzero(&iproute, sizeof iproute); *dst = *dst_in; @@ -172,7 +173,7 @@ return; arpresolve(iproute.ro_rt->rt_ifp, iproute.ro_rt, NULL, - rt_key(iproute.ro_rt), dmac); + rt_key(iproute.ro_rt), dmac, &lle); RTFREE(iproute.ro_rt); } @@ -186,6 +187,7 @@ struct route iproute; struct sockaddr_in *dst = (struct sockaddr_in *)&iproute.ro_dst; char dmac[ETHER_ADDR_LEN]; + struct llentry *lle; bzero(&iproute, sizeof iproute); *dst = *dst_in; @@ -202,7 +204,7 @@ goto put; } ret = arpresolve(iproute.ro_rt->rt_ifp, iproute.ro_rt, NULL, - rt_key(iproute.ro_rt), dmac); + rt_key(iproute.ro_rt), dmac, &lle); if (ret) { goto put; } ==== //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD: src/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c,v 1.2 2008/12/13 03:45:00 sam Exp $ + * $FreeBSD: src/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c,v 1.3 2008/12/15 00:29:26 sam Exp $ */ #include "opt_ah.h" @@ -122,7 +122,7 @@ /* setup common ini data; rf backends handle remainder */ HAL_INI_INIT(&ahp->ah_ini_modes, ar5212Modes, 6); - HAL_INI_INIT(&ahp->ah_ini_common, ar5212Common, 6); + HAL_INI_INIT(&ahp->ah_ini_common, ar5212Common, 2); if (!ar5312ChipReset(ah, AH_NULL)) { /* reset chip */ HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__); ==== //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_l2t.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_l2t.c,v 1.4 2008/09/24 01:19:08 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_l2t.c,v 1.5 2008/12/15 06:10:57 qingli Exp $"); #include #include @@ -93,15 +93,15 @@ } static inline void -neigh_replace(struct l2t_entry *e, struct rtentry *rt) +neigh_replace(struct l2t_entry *e, struct llentry *neigh) { - RT_LOCK(rt); - RT_ADDREF(rt); - RT_UNLOCK(rt); + LLE_WLOCK(neigh); + LLE_ADDREF(neigh); + LLE_WUNLOCK(neigh); if (e->neigh) - RTFREE(e->neigh); - e->neigh = rt; + LLE_FREE(e->neigh); + e->neigh = neigh; } /* @@ -164,7 +164,7 @@ int t3_l2t_send_slow(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e) { - struct rtentry *rt = e->neigh; + struct llentry *lle = e->neigh; struct sockaddr_in sin; bzero(&sin, sizeof(struct sockaddr_in)); @@ -177,7 +177,7 @@ switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ arpresolve(rt->rt_ifp, rt, NULL, - (struct sockaddr *)&sin, e->dmac); + (struct sockaddr *)&sin, e->dmac, &lle); mtx_lock(&e->lock); if (e->state == L2T_STATE_STALE) e->state = L2T_STATE_VALID; @@ -201,7 +201,7 @@ * entries when there's no memory. */ if (arpresolve(rt->rt_ifp, rt, NULL, - (struct sockaddr *)&sin, e->dmac) == 0) { + (struct sockaddr *)&sin, e->dmac, &lle) == 0) { CTR6(KTR_CXGB, "mac=%x:%x:%x:%x:%x:%x\n", e->dmac[0], e->dmac[1], e->dmac[2], e->dmac[3], e->dmac[4], e->dmac[5]); @@ -222,12 +222,12 @@ void t3_l2t_send_event(struct t3cdev *dev, struct l2t_entry *e) { - struct rtentry *rt; struct mbuf *m0; struct sockaddr_in sin; sin.sin_family = AF_INET; sin.sin_len = sizeof(struct sockaddr_in); sin.sin_addr.s_addr = e->addr; + struct llentry *lle; if ((m0 = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) return; @@ -237,7 +237,7 @@ switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ arpresolve(rt->rt_ifp, rt, NULL, - (struct sockaddr *)&sin, e->dmac); + (struct sockaddr *)&sin, e->dmac, &lle); mtx_lock(&e->lock); if (e->state == L2T_STATE_STALE) { e->state = L2T_STATE_VALID; @@ -263,7 +263,7 @@ * entries when there's no memory. */ arpresolve(rt->rt_ifp, rt, NULL, - (struct sockaddr *)&sin, e->dmac); + (struct sockaddr *)&sin, e->dmac, &lle); } return; @@ -321,18 +321,18 @@ void t3_l2e_free(struct l2t_data *d, struct l2t_entry *e) { - struct rtentry *rt = NULL; - + struct llentry *lle; + mtx_lock(&e->lock); if (atomic_load_acq_int(&e->refcnt) == 0) { /* hasn't been recycled */ - rt = e->neigh; + lle = e->neigh; e->neigh = NULL; } mtx_unlock(&e->lock); atomic_add_int(&d->nfree, 1); - if (rt) - RTFREE(rt); + if (lle) + LLE_FREE(lle); } @@ -341,11 +341,8 @@ * Must be called with softirqs disabled. */ static inline void -reuse_entry(struct l2t_entry *e, struct rtentry *neigh) +reuse_entry(struct l2t_entry *e, struct llentry *neigh) { - struct llinfo_arp *la; - - la = (struct llinfo_arp *)neigh->rt_llinfo; mtx_lock(&e->lock); /* avoid race with t3_l2t_free */ if (neigh != e->neigh) @@ -362,13 +359,13 @@ } struct l2t_entry * -t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, struct ifnet *ifp, +t3_l2t_get(struct t3cdev *dev, struct llentry *neigh, struct ifnet *ifp, struct sockaddr *sa) { struct l2t_entry *e; struct l2t_data *d = L2DATA(dev); u32 addr = ((struct sockaddr_in *)sa)->sin_addr.s_addr; - int ifidx = neigh->rt_ifp->if_index; + int ifidx = ifp->if_index; int hash = arp_hash(addr, ifidx, d); unsigned int smt_idx = ((struct port_info *)ifp->if_softc)->port_id; @@ -448,20 +445,19 @@ } void -t3_l2t_update(struct t3cdev *dev, struct rtentry *neigh, +t3_l2t_update(struct t3cdev *dev, struct llentry *neigh, uint8_t *enaddr, struct sockaddr *sa) { struct l2t_entry *e; struct mbuf *arpq = NULL; struct l2t_data *d = L2DATA(dev); u32 addr = *(u32 *) &((struct sockaddr_in *)sa)->sin_addr; - int ifidx = neigh->rt_ifp->if_index; int hash = arp_hash(addr, ifidx, d); struct llinfo_arp *la; rw_rlock(&d->lock); for (e = d->l2tab[hash].first; e; e = e->next) - if (e->addr == addr && e->ifindex == ifidx) { + if (e->addr == addr) { mtx_lock(&e->lock); goto found; } ==== //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_l2t.h#3 (text+ko) ==== @@ -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/ulp/tom/cxgb_l2t.h,v 1.2 2008/09/23 03:16:54 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_l2t.h,v 1.3 2008/12/15 06:10:57 qingli Exp $ ***************************************************************************/ #ifndef _CHELSIO_L2T_H @@ -68,7 +68,7 @@ int ifindex; /* neighbor's net_device's ifindex */ uint16_t smt_idx; /* SMT index */ uint16_t vlan; /* VLAN TCI (id: bits 0-11, prio: 13-15 */ - struct rtentry *neigh; /* associated neighbour */ + struct llentry *neigh; /* associated neighbour */ struct l2t_entry *first; /* start of hash chain */ struct l2t_entry *next; /* next l2t_entry on chain */ struct mbuf *arpq_head; /* queue of packets awaiting resolution */ ==== //depot/projects/vimage/src/sys/dev/usb/ucom.c#10 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ucom.c,v 1.70 2008/10/23 19:16:57 ed Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ucom.c,v 1.72 2008/12/14 23:24:00 phk Exp $"); /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -700,6 +700,26 @@ return (USBD_NORMAL_COMPLETION); } +void +ucomrxchars(struct ucom_softc *sc, u_char *cp, u_int32_t cc) +{ + struct tty *tp = sc->sc_tty; + + /* Give characters to tty layer. */ + while (cc > 0) { + DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); + if (ttydisc_rint(tp, *cp, 0) == -1) { + /* XXX what should we do? */ + printf("%s: lost %d chars\n", + device_get_nameunit(sc->sc_dev), cc); + break; + } + cc--; + cp++; + } + ttydisc_rint_done(tp); +} + static void ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) { @@ -709,6 +729,7 @@ u_int32_t cc; u_char *cp; + (void)tp; /* Used for debugging */ DPRINTF(("ucomreadcb: status = %d\n", status)); if (status != USBD_NORMAL_COMPLETION) { @@ -737,22 +758,8 @@ device_get_nameunit(sc->sc_dev), cc); goto resubmit; } - if (cc < 1) - goto resubmit; - - /* Give characters to tty layer. */ - while (cc > 0) { - DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); - if (ttydisc_rint(tp, *cp, 0) == -1) { - /* XXX what should we do? */ - printf("%s: lost %d chars\n", - device_get_nameunit(sc->sc_dev), cc); - break; - } - cc--; - cp++; - } - ttydisc_rint_done(tp); + if (cc > 0) + ucomrxchars(sc, cp, cc); resubmit: err = ucomstartread(sc); ==== //depot/projects/vimage/src/sys/dev/usb/ucomvar.h#7 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ucomvar.h,v 1.9 2001/01/23 21:56:17 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ucomvar.h,v 1.13 2008/09/27 08:51:18 ed Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ucomvar.h,v 1.14 2008/12/14 20:03:46 phk Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -166,3 +166,4 @@ int ucom_attach(struct ucom_softc *); int ucom_detach(struct ucom_softc *); void ucom_status_change(struct ucom_softc *); +void ucomrxchars(struct ucom_softc *sc, u_char *cp, u_int32_t cc); ==== //depot/projects/vimage/src/sys/dev/usb/uftdi.c#7 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uftdi.c,v 1.39 2008/08/20 08:31:58 ed Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uftdi.c,v 1.40 2008/12/14 20:05:03 phk Exp $"); /* * FTDI FT8U100AX serial adapter driver @@ -100,7 +100,7 @@ * These are the maximum number of bytes transferred per frame. * The output buffer size cannot be increased due to the size encoding. */ -#define UFTDIIBUFSIZE 64 +#define UFTDIIBUFSIZE 256 #define UFTDIOBUFSIZE 64 struct uftdi_softc { @@ -458,32 +458,33 @@ { struct uftdi_softc *sc = vsc; u_char msr, lsr; + unsigned l; - DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", sc, portno, - *count)); + DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", + sc, portno, *count)); + while (*count > 0) { + l = *count; + if (l > 64) + l = 64; - msr = FTDI_GET_MSR(*ptr); - lsr = FTDI_GET_LSR(*ptr); + msr = FTDI_GET_MSR(*ptr); + lsr = FTDI_GET_LSR(*ptr); -#ifdef USB_DEBUG - if (*count != 2) - DPRINTFN(10,("uftdi_read: sc=%p, port=%d count=%d data[0]=" - "0x%02x\n", sc, portno, *count, (*ptr)[2])); -#endif + if (sc->sc_msr != msr || + (sc->sc_lsr & FTDI_LSR_MASK) != (lsr & FTDI_LSR_MASK)) { + DPRINTF(("uftdi_read: status change msr=0x%02x(0x%02x) " + "lsr=0x%02x(0x%02x)\n", msr, sc->sc_msr, + lsr, sc->sc_lsr)); + sc->sc_msr = msr; + sc->sc_lsr = lsr; + ucom_status_change(&sc->sc_ucom); + } - if (sc->sc_msr != msr || - (sc->sc_lsr & FTDI_LSR_MASK) != (lsr & FTDI_LSR_MASK)) { - DPRINTF(("uftdi_read: status change msr=0x%02x(0x%02x) " - "lsr=0x%02x(0x%02x)\n", msr, sc->sc_msr, - lsr, sc->sc_lsr)); - sc->sc_msr = msr; - sc->sc_lsr = lsr; - ucom_status_change(&sc->sc_ucom); + if (l > 2) + ucomrxchars(&sc->sc_ucom, (*ptr) + 2, l - 2); + *ptr += l; + *count -= l; } - - /* Pick up status and adjust data part. */ - *ptr += 2; - *count -= 2; } static size_t ==== //depot/projects/vimage/src/sys/modules/Makefile#35 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.597 2008/12/01 16:53:01 sam Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.598 2008/12/14 22:26:57 sam Exp $ .include @@ -30,9 +30,6 @@ ${_asr} \ ata \ ath \ - ath_rate_amrr \ - ath_rate_onoe \ - ath_rate_sample \ aue \ ${_auxio} \ axe \ ==== //depot/projects/vimage/src/sys/modules/ath/Makefile#4 (text+ko) ==== @@ -26,47 +26,83 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF # THE POSSIBILITY OF SUCH DAMAGES. # -# $FreeBSD: src/sys/modules/ath/Makefile,v 1.7 2008/12/02 21:37:28 bz Exp $ +# $FreeBSD: src/sys/modules/ath/Makefile,v 1.8 2008/12/14 22:26:57 sam Exp $ # -.PATH: ${.CURDIR}/../../dev/ath \ - ${.CURDIR}/../../dev/ath/ath_hal \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5210 \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5211 \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5212 \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +ATH_RATE?= sample # tx rate control algorithm + +.PATH: ${.CURDIR}/../../dev/ath +.PATH: ${.CURDIR}/../../dev/ath/ath_hal + +KMOD= if_ath +SRCS= if_ath.c if_ath_pci.c +# NB: v3 eeprom support used by both AR5211 and AR5212; just include it +SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c +SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h -AR5210_SRCS=ah_eeprom_v1.c \ +# +# AR5210 support; these are first generation 11a-only devices. +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5210 +SRCS+= ah_eeprom_v1.c \ ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \ ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \ ar5210_recv.c ar5210_reset.c ar5210_xmit.c -AR5211_SRCS=ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ + +# +# AR5211 support; these are second generation 11b/g/a devices +# (but 11g was OFDM only and is not supported). +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5211 +SRCS+= ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ ar5211_keycache.c ar5211_misc.c ar5211_phy.c ar5211_power.c \ ar5211_recv.c ar5211_reset.c ar5211_xmit.c -AR5212_SRCS=ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ + +# +# AR5212 support; this covers all other pci/cardbus legacy parts. +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5212 +SRCS+= ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \ ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \ - ar5212_rfgain.c ar5212_xmit.c \ - ar2413.c ar2425.c ar5111.c ar5112.c ar5413.c -AR5416_SRCS=ah_eeprom_v14.c \ + ar5212_rfgain.c ar5212_xmit.c +# RF backends +SRCS+= ar5111.c +SRCS+= ar5112.c +SRCS+= ar2413.c +SRCS+= ar2425.c +SRCS+= ar5413.c + +# +# AR5416, AR9160 support; these are 11n parts but only really +# supported (right now) operating in legacy mode. Note enabling +# this support requires defining AH_SUPPORT_AR5416 in opt_ah.h +# so the 11n tx/rx descriptor format is handled. +# +# NB: 9160 depends on 5416 but 5416 does not require 9160 +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +SRCS+= ah_eeprom_v14.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \ ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \ ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_recv.c \ - ar5416_reset.c ar5416_xmit.c \ - ar2133.c -AR9160_SRCS=ar9160_attach.c + ar5416_reset.c ar5416_xmit.c +SRCS+= ar9160_attach.c +# RF backend for 5416 and 9160 +SRCS+= ar2133.c -KMOD= if_ath -SRCS= if_ath.c if_ath_pci.c -# NB: v3 eeprom support used by both AR5211 and AR5212; just include it -SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c -SRCS+= ${AR5210_SRCS} -SRCS+= ${AR5211_SRCS} -SRCS+= ${AR5212_SRCS} -SRCS+= ${AR5416_SRCS} -SRCS+= ${AR9160_SRCS} -SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h +# NB: rate control is bound to the driver by symbol names so only pick one +.if ${ATH_RATE} == "sample" +.PATH: ${.CURDIR}/../../dev/ath/ath_rate/sample +SRCS+= sample.c opt_wlan.h +.elif ${ATH_RATE} == "onoe" +.PATH: ${.CURDIR}/../../dev/ath/ath_rate/onoe +SRCS+= onoe.c +.elif ${ATH_RATE} == "amrr" +.PATH: ${.CURDIR}/../../dev/ath/ath_rate/amrr +SRCS+= amrr.c +.endif CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal ==== //depot/projects/vimage/src/sys/modules/cxgb/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/cxgb/Makefile,v 1.16 2008/09/24 01:19:08 kmacy Exp $ +# $FreeBSD: src/sys/modules/cxgb/Makefile,v 1.17 2008/12/15 06:10:57 qingli Exp $ SUBDIR= cxgb SUBDIR+= ${_toecore} SUBDIR+= ${_tom} @@ -25,7 +25,7 @@ .if exists(${_toe_header}) _toecore = toecore -_tom = tom +#_tom = tom .endif .if ${MACHINE_ARCH} == "i386" && exists(${_toe_header}) ==== //depot/projects/vimage/src/sys/net/if.c#58 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.5 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/net/if.c,v 1.300 2008/12/11 15:42:59 bz Exp $ + * $FreeBSD: src/sys/net/if.c,v 1.301 2008/12/15 06:10:57 qingli Exp $ */ #include "opt_compat.h" @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -1445,6 +1446,9 @@ return (ifa); } +#include +#include + /* * Default action when installing a route with a Link Level gateway. * Lookup an appropriate real ifa to point to. ==== //depot/projects/vimage/src/sys/net/if_arcsubr.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: if_arcsubr.c,v 1.36 2001/06/14 05:44:23 itojun Exp $ */ -/* $FreeBSD: src/sys/net/if_arcsubr.c,v 1.32 2008/11/05 11:43:01 bz Exp $ */ +/* $FreeBSD: src/sys/net/if_arcsubr.c,v 1.33 2008/12/15 06:10:57 qingli Exp $ */ /*- * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -64,6 +64,7 @@ #include #include #include +#include #if defined(INET) || defined(INET6) #include @@ -108,6 +109,7 @@ u_int8_t atype, adst; int loop_copy = 0; int isphds; + struct llentry *lle; if (!((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING))) @@ -127,7 +129,7 @@ else if (ifp->if_flags & IFF_NOARP) adst = ntohl(SIN(dst)->sin_addr.s_addr) & 0xFF; else { - error = arpresolve(ifp, rt0, m, dst, &adst); + error = arpresolve(ifp, rt0, m, dst, &adst, &lle); if (error) return (error == EWOULDBLOCK ? 0 : error); } @@ -165,7 +167,7 @@ #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst); + error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst, &lle); if (error) return (error); atype = ARCTYPE_INET6; ==== //depot/projects/vimage/src/sys/net/if_atmsubr.c#6 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/if_atmsubr.c,v 1.48 2008/09/14 08:19:48 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/net/if_atmsubr.c,v 1.49 2008/12/15 06:10:57 qingli Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -153,22 +153,11 @@ case AF_INET: case AF_INET6: { - struct rtentry *rt = NULL; - /* - * check route - */ - if (rt0 != NULL) { - error = rt_check(&rt, &rt0, dst); - if (error) - goto bad; - RT_UNLOCK(rt); - } - if (dst->sa_family == AF_INET6) etype = ETHERTYPE_IPV6; else etype = ETHERTYPE_IP; - if (!atmresolve(rt, m, dst, &atmdst)) { + if (!atmresolve(rt0, m, dst, &atmdst)) { m = NULL; /* XXX: atmresolve already free'd it */ senderr(EHOSTUNREACH); ==== //depot/projects/vimage/src/sys/net/if_ethersubr.c#35 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.254 2008/12/10 23:12:39 zec Exp $ + * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.255 2008/12/15 06:10:57 qingli Exp $ */ #include "opt_atalk.h" @@ -64,6 +64,7 @@ #include #include #include +#include #include #include @@ -87,6 +88,7 @@ #include #include #endif + int (*ef_inputp)(struct ifnet*, struct ether_header *eh, struct mbuf *m); int (*ef_outputp)(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp, int *hlen); @@ -151,6 +153,7 @@ #endif #endif + /* * Ethernet output routine. * Encapsulate a packet of type family for the local net. @@ -164,6 +167,7 @@ short type; int error, hdrcmplt = 0; u_char esrc[ETHER_ADDR_LEN], edst[ETHER_ADDR_LEN]; + struct llentry *lle = NULL; struct ether_header *eh; struct pf_mtag *t; int loop_copy = 1; @@ -186,7 +190,7 @@ switch (dst->sa_family) { #ifdef INET case AF_INET: - error = arpresolve(ifp, rt0, m, dst, edst); + error = arpresolve(ifp, rt0, m, dst, edst, &lle); if (error) return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IP); @@ -221,7 +225,7 @@ #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst); + error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle); if (error) return error; type = htons(ETHERTYPE_IPV6); @@ -289,6 +293,17 @@ senderr(EAFNOSUPPORT); } + if (lle != NULL && (lle->la_flags & LLE_IFADDR)) { + int csum_flags = 0; + if (m->m_pkthdr.csum_flags & CSUM_IP) + csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID); + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) + csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_flags |= csum_flags; + m->m_pkthdr.csum_data = 0xffff; + return (if_simloop(ifp, m, dst->sa_family, 0)); + } + /* * Add local net header. If no space in first mbuf, * allocate another. ==== //depot/projects/vimage/src/sys/net/if_fddisubr.c#7 (text+ko) ==== @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp - * $FreeBSD: src/sys/net/if_fddisubr.c,v 1.109 2008/11/22 07:35:45 kmacy Exp $ + * $FreeBSD: src/sys/net/if_fddisubr.c,v 1.110 2008/12/15 06:10:57 qingli Exp $ */ #include "opt_atalk.h" @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -120,6 +121,7 @@ int loop_copy = 0, error = 0, hdrcmplt = 0; u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN]; struct fddi_header *fh; + struct llentry *lle; #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); @@ -137,7 +139,7 @@ switch (dst->sa_family) { #ifdef INET case AF_INET: { - error = arpresolve(ifp, rt0, m, dst, edst); + error = arpresolve(ifp, rt0, m, dst, edst, &lle); if (error) return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IP); @@ -173,7 +175,7 @@ #endif /* INET */ #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst); + error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle); if (error) return (error); /* Something bad happened */ type = htons(ETHERTYPE_IPV6); ==== //depot/projects/vimage/src/sys/net/if_fwsubr.c#9 (text+ko) ==== @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/net/if_fwsubr.c,v 1.29 2008/11/22 07:35:45 kmacy Exp $ + * $FreeBSD: src/sys/net/if_fwsubr.c,v 1.30 2008/12/15 06:10:57 qingli Exp $ */ #include "opt_inet.h" @@ -51,6 +51,7 @@ #include #include #include +#include #if defined(INET) || defined(INET6) #include >>> TRUNCATED FOR MAIL (1000 lines) <<<