From owner-svn-src-user@FreeBSD.ORG Sun Apr 12 16:53:57 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C001065680; Sun, 12 Apr 2009 16:53:56 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0C568FC20; Sun, 12 Apr 2009 16:53:56 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3CGru6Y031280; Sun, 12 Apr 2009 16:53:56 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3CGrus2031276; Sun, 12 Apr 2009 16:53:56 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904121653.n3CGrus2031276@svn.freebsd.org> From: Paolo Pisati Date: Sun, 12 Apr 2009 16:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190969 - in user/piso/ipfw/sys: netgraph netinet netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 16:53:58 -0000 Author: piso Date: Sun Apr 12 16:53:56 2009 New Revision: 190969 URL: http://svn.freebsd.org/changeset/base/190969 Log: Import my libalias mbuf work. todo: o create a legacy/compatibility mechanism for modules. o convert alias_sctp to use mbuf. Modified: user/piso/ipfw/sys/netgraph/ng_nat.c user/piso/ipfw/sys/netinet/ip_fw_nat.c user/piso/ipfw/sys/netinet/libalias/alias.c user/piso/ipfw/sys/netinet/libalias/alias.h Modified: user/piso/ipfw/sys/netgraph/ng_nat.c ============================================================================== --- user/piso/ipfw/sys/netgraph/ng_nat.c Sun Apr 12 14:19:37 2009 (r190968) +++ user/piso/ipfw/sys/netgraph/ng_nat.c Sun Apr 12 16:53:56 2009 (r190969) @@ -675,7 +675,6 @@ ng_nat_rcvdata(hook_p hook, item_p item struct mbuf *m; struct ip *ip; int rval, error = 0; - char *c; /* We have no required hooks. */ if (!(priv->flags & NGNAT_CONNECTED)) { @@ -689,7 +688,8 @@ ng_nat_rcvdata(hook_p hook, item_p item m = NGI_M(item); - if ((m = m_megapullup(m, m->m_pkthdr.len)) == NULL) { + m = m_pullup(m, sizeof(struct ip)); + if (m == NULL) { NGI_M(item) = NULL; /* avoid double free */ NG_FREE_ITEM(item); return (ENOBUFS); @@ -697,21 +697,19 @@ ng_nat_rcvdata(hook_p hook, item_p item NGI_M(item) = m; - c = mtod(m, char *); ip = mtod(m, struct ip *); KASSERT(m->m_pkthdr.len == ntohs(ip->ip_len), ("ng_nat: ip_len != m_pkthdr.len")); if (hook == priv->in) { - rval = LibAliasIn(priv->lib, c, m->m_len + M_TRAILINGSPACE(m)); - if (rval != PKT_ALIAS_OK && - rval != PKT_ALIAS_FOUND_HEADER_FRAGMENT) { + rval = LibAliasIn(priv->lib, &m, IP_MAXPACKET); + if (rval != PKT_ALIAS_OK) { NG_FREE_ITEM(item); return (EINVAL); } } else if (hook == priv->out) { - rval = LibAliasOut(priv->lib, c, m->m_len + M_TRAILINGSPACE(m)); + rval = LibAliasOut(priv->lib, &m, IP_MAXPACKET); if (rval != PKT_ALIAS_OK) { NG_FREE_ITEM(item); return (EINVAL); @@ -719,7 +717,16 @@ ng_nat_rcvdata(hook_p hook, item_p item } else panic("ng_nat: unknown hook!\n"); - m->m_pkthdr.len = m->m_len = ntohs(ip->ip_len); + if ((m = m_pullup(m, sizeof(struct ip))) == NULL) { + NGI_M(item) = NULL; /* avoid double free */ + NG_FREE_ITEM(item); + return (ENOBUFS); + } + + NGI_M(item) = m; + + ip = mtod(m, struct ip *); + m->m_pkthdr.len = ntohs(ip->ip_len); if ((ip->ip_off & htons(IP_OFFMASK)) == 0 && ip->ip_p == IPPROTO_TCP) { Modified: user/piso/ipfw/sys/netinet/ip_fw_nat.c ============================================================================== --- user/piso/ipfw/sys/netinet/ip_fw_nat.c Sun Apr 12 14:19:37 2009 (r190968) +++ user/piso/ipfw/sys/netinet/ip_fw_nat.c Sun Apr 12 16:53:56 2009 (r190969) @@ -249,18 +249,16 @@ bad: static int ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) { - struct mbuf *mcl; struct ip *ip; /* XXX - libalias duct tape */ int ldt, retval; - char *c; ldt = 0; retval = 0; - if ((mcl = m_megapullup(m, m->m_pkthdr.len)) == + if ((m = m_pullup(m, sizeof(struct ip))) == NULL) goto badnat; - ip = mtod(mcl, struct ip *); + ip = mtod(m, struct ip *); if (args->eh == NULL) { ip->ip_len = htons(ip->ip_len); ip->ip_off = htons(ip->ip_off); @@ -314,32 +312,28 @@ ipfw_nat(struct ip_fw_args *args, struct * it can handle delayed checksum and tso) */ - if (mcl->m_pkthdr.rcvif == NULL && - mcl->m_pkthdr.csum_flags & + if (m->m_pkthdr.rcvif == NULL && + m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) ldt = 1; - c = mtod(mcl, char *); if (args->oif == NULL) - retval = LibAliasIn(t->lib, c, - mcl->m_len + M_TRAILINGSPACE(mcl)); + retval = LibAliasIn(t->lib, &m, IP_MAXPACKET); else - retval = LibAliasOut(t->lib, c, - mcl->m_len + M_TRAILINGSPACE(mcl)); + retval = LibAliasOut(t->lib, &m, IP_MAXPACKET); if (retval == PKT_ALIAS_RESPOND) { m->m_flags |= M_SKIP_FIREWALL; retval = PKT_ALIAS_OK; } - if (retval != PKT_ALIAS_OK && - retval != PKT_ALIAS_FOUND_HEADER_FRAGMENT) { - /* XXX - should i add some logging? */ - m_free(mcl); + if (retval != PKT_ALIAS_OK) { + m_free(m); badnat: args->m = NULL; return (IP_FW_DENY); } - mcl->m_pkthdr.len = mcl->m_len = - ntohs(ip->ip_len); + m = m_pullup(m, sizeof(struct ip)); + ip = mtod(m, struct ip *); + m->m_pkthdr.len = ntohs(ip->ip_len); /* * XXX - libalias checksum offload @@ -350,6 +344,10 @@ ipfw_nat(struct ip_fw_args *args, struct ip->ip_p == IPPROTO_TCP) { struct tcphdr *th; + if ((m = m_pullup(m, (ip->ip_hl << 2) + + sizeof(struct tcphdr))) == NULL) + goto badnat; + ip = mtod(m, struct ip *); th = (struct tcphdr *)(ip + 1); if (th->th_x2) ldt = 1; @@ -369,6 +367,9 @@ ipfw_nat(struct ip_fw_args *args, struct switch (ip->ip_p) { case IPPROTO_TCP: + if ((m = m_pullup(m, (ip->ip_hl << 2) + sizeof(struct tcphdr))) == NULL) + goto badnat; + ip = mtod(m, struct ip *); th = (struct tcphdr *)(ip + 1); /* * Maybe it was set in @@ -376,13 +377,16 @@ ipfw_nat(struct ip_fw_args *args, struct */ th->th_x2 = 0; th->th_sum = cksum; - mcl->m_pkthdr.csum_data = + m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); break; case IPPROTO_UDP: + if ((m = m_pullup(m, (ip->ip_hl << 2) + sizeof(struct udphdr))) == NULL) + goto badnat; + ip = mtod(m, struct ip *); uh = (struct udphdr *)(ip + 1); uh->uh_sum = cksum; - mcl->m_pkthdr.csum_data = + m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); break; } @@ -390,10 +394,10 @@ ipfw_nat(struct ip_fw_args *args, struct * No hw checksum offloading: do it * by ourself. */ - if ((mcl->m_pkthdr.csum_flags & + if ((m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) == 0) { - in_delayed_cksum(mcl); - mcl->m_pkthdr.csum_flags &= + in_delayed_cksum(m); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } ip->ip_len = htons(ip->ip_len); @@ -404,7 +408,7 @@ ipfw_nat(struct ip_fw_args *args, struct ip->ip_off = ntohs(ip->ip_off); } - args->m = mcl; + args->m = m; return (IP_FW_NAT); } Modified: user/piso/ipfw/sys/netinet/libalias/alias.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.c Sun Apr 12 14:19:37 2009 (r190968) +++ user/piso/ipfw/sys/netinet/libalias/alias.c Sun Apr 12 16:53:56 2009 (r190969) @@ -268,13 +268,14 @@ the gateway machine or other machines on /* Local prototypes */ -static int IcmpAliasIn1(struct libalias *, struct ip *); -static int IcmpAliasIn2(struct libalias *, struct ip *); -static int IcmpAliasIn(struct libalias *, struct ip *); - -static int IcmpAliasOut1(struct libalias *, struct ip *, int create); -static int IcmpAliasOut2(struct libalias *, struct ip *); -static int IcmpAliasOut(struct libalias *, struct ip *, int create); +static int IcmpAliasIn1(struct libalias *, struct ip *, struct icmp *); +static int IcmpAliasIn2(struct libalias *, pkt_t); +static int IcmpAliasIn(struct libalias *, pkt_t); + +static int IcmpAliasOut1(struct libalias *, struct ip *, struct icmp *, + int create); +static int IcmpAliasOut2(struct libalias *, pkt_t); +static int IcmpAliasOut(struct libalias *, pkt_t, int create); static int ProtoAliasIn(struct libalias *la, struct in_addr ip_src, struct in_addr *ip_dst, u_char ip_p, u_short *ip_sum); @@ -282,15 +283,15 @@ static int ProtoAliasOut(struct libalias struct in_addr ip_dst, u_char ip_p, u_short *ip_sum, int create); -static int UdpAliasIn(struct libalias *, struct ip *); -static int UdpAliasOut(struct libalias *, struct ip *, int, int create); +static int UdpAliasIn(struct libalias *, pkt_t); +static int UdpAliasOut(struct libalias *, pkt_t, int, int create); -static int TcpAliasIn(struct libalias *, struct ip *); -static int TcpAliasOut(struct libalias *, struct ip *, int, int create); +static int TcpAliasIn(struct libalias *, pkt_t); +static int TcpAliasOut(struct libalias *, pkt_t, int, int create); static int -IcmpAliasIn1(struct libalias *la, struct ip *pip) +IcmpAliasIn1(struct libalias *la, struct ip *pip, struct icmp *ic) { LIBALIAS_LOCK_ASSERT(la); @@ -299,9 +300,6 @@ IcmpAliasIn1(struct libalias *la, struct Alias incoming echo and timestamp requests. */ struct alias_link *lnk; - struct icmp *ic; - - ic = (struct icmp *)ip_next(pip); /* Get source address from ICMP data field and restore original data */ lnk = FindIcmpIn(la, pip->ip_src, pip->ip_dst, ic->icmp_id, 1); @@ -335,7 +333,7 @@ IcmpAliasIn1(struct libalias *la, struct } static int -IcmpAliasIn2(struct libalias *la, struct ip *pip) +IcmpAliasIn2(struct libalias *la, pkt_t ptr) { LIBALIAS_LOCK_ASSERT(la); @@ -343,18 +341,20 @@ IcmpAliasIn2(struct libalias *la, struct Alias incoming ICMP error messages containing IP header and first 64 bits of datagram. */ - struct ip *ip; + struct ip *ip, *pip; struct icmp *ic, *ic2; struct udphdr *ud; struct tcphdr *tc; struct alias_link *lnk; + PULLUP_ICMPIP64HDR(pip, ptr); ic = (struct icmp *)ip_next(pip); ip = &ic->icmp_ip; ud = (struct udphdr *)ip_next(ip); tc = (struct tcphdr *)ip_next(ip); ic2 = (struct icmp *)ip_next(ip); + lnk = NULL; if (ip->ip_p == IPPROTO_UDP) lnk = FindUdpTcpIn(la, ip->ip_dst, ip->ip_src, @@ -367,10 +367,7 @@ IcmpAliasIn2(struct libalias *la, struct else if (ip->ip_p == IPPROTO_ICMP) { if (ic2->icmp_type == ICMP_ECHO || ic2->icmp_type == ICMP_TSTAMP) lnk = FindIcmpIn(la, ip->ip_dst, ip->ip_src, ic2->icmp_id, 0); - else - lnk = NULL; - } else - lnk = NULL; + } if (lnk != NULL) { if (ip->ip_p == IPPROTO_UDP || ip->ip_p == IPPROTO_TCP) { @@ -437,9 +434,10 @@ fragment contained in ICMP data section static int -IcmpAliasIn(struct libalias *la, struct ip *pip) +IcmpAliasIn(struct libalias *la, pkt_t ptr) { int iresult; + struct ip *pip; struct icmp *ic; LIBALIAS_LOCK_ASSERT(la); @@ -447,6 +445,7 @@ IcmpAliasIn(struct libalias *la, struct if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + PULLUP_ICMPHDR(pip, ptr); ic = (struct icmp *)ip_next(pip); iresult = PKT_ALIAS_IGNORED; @@ -454,18 +453,18 @@ IcmpAliasIn(struct libalias *la, struct case ICMP_ECHOREPLY: case ICMP_TSTAMPREPLY: if (ic->icmp_code == 0) { - iresult = IcmpAliasIn1(la, pip); + iresult = IcmpAliasIn1(la, pip, ic); } break; case ICMP_UNREACH: case ICMP_SOURCEQUENCH: case ICMP_TIMXCEED: case ICMP_PARAMPROB: - iresult = IcmpAliasIn2(la, pip); + iresult = IcmpAliasIn2(la, ptr); break; case ICMP_ECHO: case ICMP_TSTAMP: - iresult = IcmpAliasIn1(la, pip); + iresult = IcmpAliasIn1(la, pip, ic); break; } return (iresult); @@ -473,17 +472,15 @@ IcmpAliasIn(struct libalias *la, struct static int -IcmpAliasOut1(struct libalias *la, struct ip *pip, int create) +IcmpAliasOut1(struct libalias *la, struct ip *pip, struct icmp *ic, int create) { /* Alias outgoing echo and timestamp requests. De-alias outgoing echo and timestamp replies. */ struct alias_link *lnk; - struct icmp *ic; LIBALIAS_LOCK_ASSERT(la); - ic = (struct icmp *)ip_next(pip); /* Save overwritten data for when echo packet returns */ lnk = FindIcmpOut(la, pip->ip_src, pip->ip_dst, ic->icmp_id, create); @@ -518,25 +515,27 @@ IcmpAliasOut1(struct libalias *la, struc static int -IcmpAliasOut2(struct libalias *la, struct ip *pip) +IcmpAliasOut2(struct libalias *la, pkt_t ptr) { /* Alias outgoing ICMP error messages containing IP header and first 64 bits of datagram. */ - struct ip *ip; + struct ip *ip, *pip; struct icmp *ic, *ic2; struct udphdr *ud; struct tcphdr *tc; struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); + PULLUP_ICMPIP64HDR(pip, ptr); ic = (struct icmp *)ip_next(pip); ip = &ic->icmp_ip; ud = (struct udphdr *)ip_next(ip); tc = (struct tcphdr *)ip_next(ip); ic2 = (struct icmp *)ip_next(ip); + lnk = NULL; if (ip->ip_p == IPPROTO_UDP) lnk = FindUdpTcpOut(la, ip->ip_dst, ip->ip_src, @@ -549,10 +548,7 @@ IcmpAliasOut2(struct libalias *la, struc else if (ip->ip_p == IPPROTO_ICMP) { if (ic2->icmp_type == ICMP_ECHO || ic2->icmp_type == ICMP_TSTAMP) lnk = FindIcmpOut(la, ip->ip_dst, ip->ip_src, ic2->icmp_id, 0); - else - lnk = NULL; - } else - lnk = NULL; + } if (lnk != NULL) { if (ip->ip_p == IPPROTO_UDP || ip->ip_p == IPPROTO_TCP) { @@ -619,9 +615,10 @@ fragment contained in ICMP data section static int -IcmpAliasOut(struct libalias *la, struct ip *pip, int create) +IcmpAliasOut(struct libalias *la, pkt_t ptr, int create) { int iresult; + struct ip *pip; struct icmp *ic; LIBALIAS_LOCK_ASSERT(la); @@ -631,6 +628,7 @@ IcmpAliasOut(struct libalias *la, struct if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + PULLUP_ICMPHDR(pip, ptr); ic = (struct icmp *)ip_next(pip); iresult = PKT_ALIAS_IGNORED; @@ -638,18 +636,18 @@ IcmpAliasOut(struct libalias *la, struct case ICMP_ECHO: case ICMP_TSTAMP: if (ic->icmp_code == 0) { - iresult = IcmpAliasOut1(la, pip, create); + iresult = IcmpAliasOut1(la, pip, ic, create); } break; case ICMP_UNREACH: case ICMP_SOURCEQUENCH: case ICMP_TIMXCEED: case ICMP_PARAMPROB: - iresult = IcmpAliasOut2(la, pip); + iresult = IcmpAliasOut2(la, ptr); break; case ICMP_ECHOREPLY: case ICMP_TSTAMPREPLY: - iresult = IcmpAliasOut1(la, pip, create); + iresult = IcmpAliasOut1(la, pip, ic, create); } return (iresult); } @@ -723,13 +721,15 @@ ProtoAliasOut(struct libalias *la, struc static int -UdpAliasIn(struct libalias *la, struct ip *pip) +UdpAliasIn(struct libalias *la, pkt_t ptr) { + struct ip *pip; struct udphdr *ud; struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); + PULLUP_UDPHDR(pip, ptr); ud = (struct udphdr *)ip_next(pip); lnk = FindUdpTcpIn(la, pip->ip_src, pip->ip_dst, @@ -810,8 +810,9 @@ UdpAliasIn(struct libalias *la, struct i } static int -UdpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) +UdpAliasOut(struct libalias *la, pkt_t ptr, int maxpacketsize, int create) { + struct ip *pip; struct udphdr *ud; struct alias_link *lnk; struct in_addr dest_address; @@ -824,6 +825,7 @@ UdpAliasOut(struct libalias *la, struct LIBALIAS_LOCK_ASSERT(la); /* Return if proxy-only mode is enabled and not proxyrule found.*/ + PULLUP_UDPHDR(pip, ptr); ud = (struct udphdr *)ip_next(pip); proxy_type = ProxyCheck(la, &proxy_server_address, &proxy_server_port, pip->ip_src, pip->ip_dst, @@ -913,12 +915,14 @@ UdpAliasOut(struct libalias *la, struct static int -TcpAliasIn(struct libalias *la, struct ip *pip) +TcpAliasIn(struct libalias *la, pkt_t ptr) { + struct ip *pip; struct tcphdr *tc; struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); + PULLUP_TCPHDR(pip, ptr); tc = (struct tcphdr *)ip_next(pip); lnk = FindUdpTcpIn(la, pip->ip_src, pip->ip_dst, @@ -1035,17 +1039,19 @@ TcpAliasIn(struct libalias *la, struct i } static int -TcpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) +TcpAliasOut(struct libalias *la, pkt_t ptr, int maxpacketsize, int create) { int proxy_type, error; u_short dest_port; u_short proxy_server_port; struct in_addr dest_address; struct in_addr proxy_server_address; + struct ip *pip; struct tcphdr *tc; struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); + PULLUP_TCPHDR(pip, ptr); tc = (struct tcphdr *)ip_next(pip); if (create) @@ -1080,8 +1086,6 @@ TcpAliasOut(struct libalias *la, struct lnk = FindUdpTcpOut(la, pip->ip_src, pip->ip_dst, tc->th_sport, tc->th_dport, IPPROTO_TCP, create); - if (lnk == NULL) - return (PKT_ALIAS_IGNORED); if (lnk != NULL) { u_short alias_port; struct in_addr alias_address; @@ -1167,13 +1171,13 @@ saved and recalled when a header fragmen /* Local prototypes */ static int FragmentIn(struct libalias *la, struct in_addr ip_src, - struct in_addr *ip_dst, u_short ip_id, u_short *ip_sum); + struct in_addr *ip_dst, u_char ip_p, u_short *ip_sum); static int FragmentOut(struct libalias *, struct in_addr *ip_src, u_short *ip_sum); static int FragmentIn(struct libalias *la, struct in_addr ip_src, struct in_addr *ip_dst, - u_short ip_id, u_short *ip_sum) + u_char ip_id, u_short *ip_sum) { struct alias_link *lnk; @@ -1278,7 +1282,6 @@ LibAliasFragmentIn(struct libalias *la, (void)la; pip = (struct ip *)ptr; fpip = (struct ip *)ptr_fragment; - DifferentialChecksum(&fpip->ip_sum, &pip->ip_dst, &fpip->ip_dst, 2); fpip->ip_dst = pip->ip_dst; @@ -1287,14 +1290,14 @@ LibAliasFragmentIn(struct libalias *la, /* Local prototypes */ static int -LibAliasOutLocked(struct libalias *la, char *ptr, - int maxpacketsize, int create); +LibAliasOutLocked(struct libalias *la, pkt_t ptr, + int maxpacketsize, int create); static int -LibAliasInLocked(struct libalias *la, char *ptr, - int maxpacketsize); +LibAliasInLocked(struct libalias *la, pkt_t ptr, + int maxpacketsize); int -LibAliasIn(struct libalias *la, char *ptr, int maxpacketsize) +LibAliasIn(struct libalias *la, pkt_t ptr, int maxpacketsize) { int res; @@ -1305,7 +1308,7 @@ LibAliasIn(struct libalias *la, char *pt } static int -LibAliasInLocked(struct libalias *la, char *ptr, int maxpacketsize) +LibAliasInLocked(struct libalias *la, pkt_t ptr, int maxpacketsize) { struct in_addr alias_addr; struct ip *pip; @@ -1319,7 +1322,7 @@ LibAliasInLocked(struct libalias *la, ch } HouseKeeping(la); ClearCheckNewLink(la); - pip = (struct ip *)ptr; + PULLUP_IPHDR(pip, ptr); alias_addr = pip->ip_dst; /* Defense against mangled packets */ @@ -1333,13 +1336,13 @@ LibAliasInLocked(struct libalias *la, ch if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0) { switch (pip->ip_p) { case IPPROTO_ICMP: - iresult = IcmpAliasIn(la, pip); + iresult = IcmpAliasIn(la, ptr); break; case IPPROTO_UDP: - iresult = UdpAliasIn(la, pip); + iresult = UdpAliasIn(la, ptr); break; case IPPROTO_TCP: - iresult = TcpAliasIn(la, pip); + iresult = TcpAliasIn(la, ptr); break; #ifdef _KERNEL case IPPROTO_SCTP: @@ -1373,6 +1376,7 @@ LibAliasInLocked(struct libalias *la, ch break; } + PULLUP_IPHDR(pip, ptr); if (ntohs(pip->ip_off) & IP_MF) { struct alias_link *lnk; @@ -1410,7 +1414,7 @@ getout: #define UNREG_ADDR_C_UPPER 0xc0a8ffff int -LibAliasOut(struct libalias *la, char *ptr, int maxpacketsize) +LibAliasOut(struct libalias *la, pkt_t ptr, int maxpacketsize) { int res; @@ -1421,7 +1425,7 @@ LibAliasOut(struct libalias *la, char *p } int -LibAliasOutTry(struct libalias *la, char *ptr, int maxpacketsize, int create) +LibAliasOutTry(struct libalias *la, pkt_t ptr, int maxpacketsize, int create) { int res; @@ -1432,7 +1436,7 @@ LibAliasOutTry(struct libalias *la, char } static int -LibAliasOutLocked(struct libalias *la, char *ptr, /* valid IP packet */ +LibAliasOutLocked(struct libalias *la, pkt_t ptr, /* valid IP packet */ int maxpacketsize, /* How much the packet data may grow (FTP * and IRC inline changes) */ int create /* Create new entries ? */ @@ -1450,7 +1454,7 @@ LibAliasOutLocked(struct libalias *la, c } HouseKeeping(la); ClearCheckNewLink(la); - pip = (struct ip *)ptr; + PULLUP_IPHDR(pip, ptr); /* Defense against mangled packets */ if (ntohs(pip->ip_len) > maxpacketsize @@ -1483,13 +1487,13 @@ LibAliasOutLocked(struct libalias *la, c if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0) { switch (pip->ip_p) { case IPPROTO_ICMP: - iresult = IcmpAliasOut(la, pip, create); + iresult = IcmpAliasOut(la, ptr, create); break; case IPPROTO_UDP: - iresult = UdpAliasOut(la, pip, maxpacketsize, create); + iresult = UdpAliasOut(la, ptr, maxpacketsize, create); break; case IPPROTO_TCP: - iresult = TcpAliasOut(la, pip, maxpacketsize, create); + iresult = TcpAliasOut(la, ptr, maxpacketsize, create); break; #ifdef _KERNEL case IPPROTO_SCTP: @@ -1531,7 +1535,7 @@ getout: } int -LibAliasUnaliasOut(struct libalias *la, char *ptr, /* valid IP packet */ +LibAliasUnaliasOut(struct libalias *la, pkt_t ptr, /* valid IP packet */ int maxpacketsize /* for error checking */ ) { @@ -1540,32 +1544,38 @@ LibAliasUnaliasOut(struct libalias *la, struct udphdr *ud; struct tcphdr *tc; struct alias_link *lnk; - int iresult = PKT_ALIAS_IGNORED; + int iresult; LIBALIAS_LOCK(la); - pip = (struct ip *)ptr; + iresult = PKT_ALIAS_IGNORED; + ic = NULL; + ud = NULL; + tc = NULL; + PULLUP_IPHDR(pip, ptr); /* Defense against mangled packets */ if (ntohs(pip->ip_len) > maxpacketsize || (pip->ip_hl << 2) > maxpacketsize) goto getout; - ud = (struct udphdr *)ip_next(pip); - tc = (struct tcphdr *)ip_next(pip); - ic = (struct icmp *)ip_next(pip); - /* Find a link */ - if (pip->ip_p == IPPROTO_UDP) + if (pip->ip_p == IPPROTO_UDP) { + PULLUP_UDPHDR(pip, ptr); + ud = (struct udphdr *)ip_next(pip); lnk = FindUdpTcpIn(la, pip->ip_dst, pip->ip_src, ud->uh_dport, ud->uh_sport, IPPROTO_UDP, 0); - else if (pip->ip_p == IPPROTO_TCP) + } else if (pip->ip_p == IPPROTO_TCP) { + PULLUP_TCPHDR(pip, ptr); + tc = (struct tcphdr *)ip_next(pip); lnk = FindUdpTcpIn(la, pip->ip_dst, pip->ip_src, tc->th_dport, tc->th_sport, IPPROTO_TCP, 0); - else if (pip->ip_p == IPPROTO_ICMP) + } else if (pip->ip_p == IPPROTO_ICMP) { + PULLUP_ICMPHDR(pip, ptr); + ic = (struct icmp *)ip_next(pip); lnk = FindIcmpIn(la, pip->ip_dst, pip->ip_src, ic->icmp_id, 0); - else + } else lnk = NULL; /* Change it from an aliased packet to an unaliased packet */ @@ -1738,49 +1748,29 @@ LibAliasUnLoadAllModule(void) * m_megapullup() - this function is a big hack. * Thankfully, it's only used in ng_nat and ipfw+nat. * - * It allocates an mbuf with cluster and copies the specified part of the chain - * into cluster, so that it is all contiguous and can be accessed via a plain - * (char *) pointer. This is required, because libalias doesn't know how to - * handle mbuf chains. + * It allocates an mbuf with cluster and copies the whole chain into cluster, + * so that it is all contiguous and the whole packet can be accessed via a + * plain (char *) pointer. This is required, because libalias doesn't know + * how to handle mbuf chains. * - * On success, m_megapullup returns an mbuf (possibly with cluster) containing - * the input packet, on failure NULL. The input packet is always consumed. + * On success, m_megapullup returns an mbuf with cluster containing the input + * packet, on failure NULL. In both cases, the input packet is consumed. */ struct mbuf * m_megapullup(struct mbuf *m, int len) { struct mbuf *mcl; + caddr_t cp; - if (len > m->m_pkthdr.len) + if (len > MCLBYTES) goto bad; - /* Do not reallocate packet if it is sequentional, - * writable and has some extra space for expansion. - * XXX: Constant 100bytes is completely empirical. */ -#define RESERVE 100 - if (m->m_next == NULL && M_WRITABLE(m) && M_TRAILINGSPACE(m) >= RESERVE) - return (m); - - if (len <= MCLBYTES - RESERVE) { - mcl = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - } else if (len < MJUM16BYTES) { - int size; - if (len <= MJUMPAGESIZE - RESERVE) { - size = MJUMPAGESIZE; - } else if (len <= MJUM9BYTES - RESERVE) { - size = MJUM9BYTES; - } else { - size = MJUM16BYTES; - }; - mcl = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size); - } else { - goto bad; - } - if (mcl == NULL) + if ((mcl = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL) goto bad; + cp = mtod(mcl, caddr_t); + m_copydata(m, 0, len, cp); m_move_pkthdr(mcl, m); - m_copydata(m, 0, len, mtod(mcl, caddr_t)); - mcl->m_len = mcl->m_pkthdr.len = len; + mcl->m_len = mcl->m_pkthdr.len; m_freem(m); return (mcl); Modified: user/piso/ipfw/sys/netinet/libalias/alias.h ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.h Sun Apr 12 14:19:37 2009 (r190968) +++ user/piso/ipfw/sys/netinet/libalias/alias.h Sun Apr 12 16:53:56 2009 (r190969) @@ -81,6 +81,63 @@ struct libalias; */ struct alias_link; +#ifdef _KERNEL +typedef struct mbuf ** pkt_t; + +#define _MTOD(p, foo) (p != NULL) ? mtod(p, foo) : NULL + +#define PULLUP_SIZE(pip, ptr, s) do { \ + *ptr = m_pullup((*ptr), s); \ + (pip) = _MTOD(*ptr, struct ip *); \ +} while (0) + +#define PULLUP_IPHDR(pip, ptr) do { \ + PULLUP_SIZE(pip, ptr, sizeof(struct ip)); \ + if (pip != NULL && ((pip->ip_hl << 2) > sizeof(struct ip))) \ + PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2)); \ +} while (0) + +#define PULLUP_UDPHDR(pip, ptr) do { \ + pip = mtod(*ptr, struct ip *); \ + PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2) + sizeof(struct udphdr)); \ + } while (0) + +#define PULLUP_TCPHDR(pip, ptr) do { \ + struct tcphdr *th; \ + pip = mtod(*ptr, struct ip *); \ + PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2) + sizeof(struct tcphdr)); \ + if (pip != NULL) { \ + th = (struct tcphdr *)&(((char *)pip)[pip->ip_hl << 2]); \ + if ((th->th_off << 2) > sizeof(struct tcphdr)) \ + PULLUP_SIZE(pip, ptr, ((pip->ip_hl + th->th_off) << \ + 2)); \ + } \ +} while (0) + +#define PULLUP_ICMPHDR(pip, ptr) do { \ + pip = mtod(*ptr, struct ip *); \ + PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2) + sizeof(struct icmp)); \ +} while (0) + +#define PULLUP_ICMPIP64HDR(pip, ptr) do { \ + int s; \ + struct icmp *ic; \ + pip = mtod(*ptr, struct ip *); \ + ic = (struct icmp *)&(((char *)pip)[pip->ip_hl << 2]); \ + s = (pip->ip_hl << 2) + sizeof(struct icmp) + \ + (ic->icmp_ip.ip_hl << 2) - sizeof(struct ip) + 8; \ + PULLUP_SIZE(pip, ptr, s); \ +} while (0) +#else +typedef char * pkt_t; + +#define PULLUP_IPHDR(pip, ptr) pip = (struct ip *)ptr +#define PULLUP_UDPHDR(pip, ptr) pip = (struct ip *)ptr +#define PULLUP_TCPHDR(pip, ptr) pip = (struct ip *)ptr +#define PULLUP_ICMPHDR(pip, ptr) pip = (struct ip *)ptr +#define PULLUP_ICMPIP64HDR(pip, ptr) pip = (struct ip *)ptr +#endif + /* Initialization and control functions. */ struct libalias *LibAliasInit(struct libalias *); void LibAliasSetAddress(struct libalias *, struct in_addr _addr); @@ -91,10 +148,19 @@ unsigned int void LibAliasUninit(struct libalias *); /* Packet Handling functions. */ +#ifdef _KERNEL +int LibAliasIn (struct libalias *, struct mbuf **_ptr, int _maxpacketsize); +int LibAliasOut(struct libalias *, struct mbuf **_ptr, int _maxpacketsize); +int LibAliasOutTry(struct libalias *, struct mbuf **_ptr, + int _maxpacketsize, int _create); +int LibAliasUnaliasOut(struct libalias *, struct mbuf **_ptr, + int _maxpacketsize); +#else int LibAliasIn (struct libalias *, char *_ptr, int _maxpacketsize); int LibAliasOut(struct libalias *, char *_ptr, int _maxpacketsize); int LibAliasOutTry(struct libalias *, char *_ptr, int _maxpacketsize, int _create); int LibAliasUnaliasOut(struct libalias *, char *_ptr, int _maxpacketsize); +#endif /* Port and address redirection functions. */ From owner-svn-src-user@FreeBSD.ORG Sun Apr 12 20:24:28 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C51F1065779; Sun, 12 Apr 2009 20:24:28 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 752578FC24; Sun, 12 Apr 2009 20:24:28 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3CKOSpF038449; Sun, 12 Apr 2009 20:24:28 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3CKOSpI038445; Sun, 12 Apr 2009 20:24:28 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904122024.n3CKOSpI038445@svn.freebsd.org> From: Paolo Pisati Date: Sun, 12 Apr 2009 20:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190976 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 20:24:34 -0000 Author: piso Date: Sun Apr 12 20:24:28 2009 New Revision: 190976 URL: http://svn.freebsd.org/changeset/base/190976 Log: Teach alias_sctp about mbuf. Modified: user/piso/ipfw/sys/netinet/libalias/alias.c user/piso/ipfw/sys/netinet/libalias/alias.h user/piso/ipfw/sys/netinet/libalias/alias_local.h user/piso/ipfw/sys/netinet/libalias/alias_sctp.c Modified: user/piso/ipfw/sys/netinet/libalias/alias.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.c Sun Apr 12 19:50:46 2009 (r190975) +++ user/piso/ipfw/sys/netinet/libalias/alias.c Sun Apr 12 20:24:28 2009 (r190976) @@ -1346,7 +1346,7 @@ LibAliasInLocked(struct libalias *la, pk break; #ifdef _KERNEL case IPPROTO_SCTP: - iresult = SctpAlias(la, pip, SN_TO_LOCAL); + iresult = SctpAlias(la, ptr, SN_TO_LOCAL); break; #endif case IPPROTO_GRE: { @@ -1497,7 +1497,7 @@ LibAliasOutLocked(struct libalias *la, p break; #ifdef _KERNEL case IPPROTO_SCTP: - iresult = SctpAlias(la, pip, SN_TO_GLOBAL); + iresult = SctpAlias(la, ptr, SN_TO_GLOBAL); break; #endif case IPPROTO_GRE: { Modified: user/piso/ipfw/sys/netinet/libalias/alias.h ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.h Sun Apr 12 19:50:46 2009 (r190975) +++ user/piso/ipfw/sys/netinet/libalias/alias.h Sun Apr 12 20:24:28 2009 (r190976) @@ -128,6 +128,11 @@ typedef struct mbuf ** pkt_t; (ic->icmp_ip.ip_hl << 2) - sizeof(struct ip) + 8; \ PULLUP_SIZE(pip, ptr, s); \ } while (0) + +#define PULLUP_SCTPHDR(pip, ptr) do { \ + pip = mtod(*ptr, struct ip *); \ + PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2) + sizeof(struct sctphdr)); \ +} while (0) #else typedef char * pkt_t; @@ -136,6 +141,7 @@ typedef char * pkt_t; #define PULLUP_TCPHDR(pip, ptr) pip = (struct ip *)ptr #define PULLUP_ICMPHDR(pip, ptr) pip = (struct ip *)ptr #define PULLUP_ICMPIP64HDR(pip, ptr) pip = (struct ip *)ptr +#define PULLUP_SCTPHDR(pip, ptr) pip = (struct ip *)ptr #endif /* Initialization and control functions. */ Modified: user/piso/ipfw/sys/netinet/libalias/alias_local.h ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_local.h Sun Apr 12 19:50:46 2009 (r190975) +++ user/piso/ipfw/sys/netinet/libalias/alias_local.h Sun Apr 12 20:24:28 2009 (r190976) @@ -230,7 +230,9 @@ struct libalias { */ void AliasSctpInit(struct libalias *la); void AliasSctpTerm(struct libalias *la); -int SctpAlias(struct libalias *la, struct ip *ip, int direction); +#ifdef _KERNEL +int SctpAlias(struct libalias *la, struct mbuf **ptr, int direction); +#endif /* * We do not calculate TCP checksums when libalias is a kernel Modified: user/piso/ipfw/sys/netinet/libalias/alias_sctp.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_sctp.c Sun Apr 12 19:50:46 2009 (r190975) +++ user/piso/ipfw/sys/netinet/libalias/alias_sctp.c Sun Apr 12 20:24:28 2009 (r190976) @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include @@ -100,7 +101,7 @@ * ---------------------------------------------------------------------- */ /* Packet Parsing Functions */ -static int sctp_PktParser(struct libalias *la, int direction, struct ip *pip, +static int sctp_PktParser(struct libalias *la, int direction, pkt_t ptr, struct sctp_nat_msg *sm, struct sctp_nat_assoc **passoc); static int GetAsconfVtags(struct libalias *la, struct sctp_nat_msg *sm, uint32_t *l_vtag, uint32_t *g_vtag, int direction); @@ -705,15 +706,16 @@ void AliasSctpTerm(struct libalias *la) * - Return the appropriate result to libalias * * @param la Pointer to the relevant libalias instance - * @param pip Pointer to IP packet to process + * @param ptr Pointer to IP packet to process * @param direction SN_TO_LOCAL | SN_TO_GLOBAL * * @return PKT_ALIAS_OK | PKT_ALIAS_IGNORE | PKT_ALIAS_ERROR */ int -SctpAlias(struct libalias *la, struct ip *pip, int direction) +SctpAlias(struct libalias *la, pkt_t ptr, int direction) { int rtnval; + struct ip *pip; struct sctp_nat_msg msg; struct sctp_nat_assoc *assoc = NULL; @@ -725,7 +727,8 @@ SctpAlias(struct libalias *la, struct ip sctp_CheckTimers(la); /* Check timers */ /* Parse the packet */ - rtnval = sctp_PktParser(la, direction, pip, &msg, &assoc); //using *char (change to mbuf when get code from paolo) + rtnval = sctp_PktParser(la, direction, ptr, &msg, &assoc); + PULLUP_IPHDR(pip, ptr); switch (rtnval) { case SN_PARSE_OK: break; @@ -1011,17 +1014,17 @@ TxAbortErrorM(struct libalias *la, struc * * @param la Pointer to the relevant libalias instance * @param direction SN_TO_LOCAL | SN_TO_GLOBAL - * @param pip + * @param ptr * @param sm Pointer to sctp message information * @param passoc Pointer to the association this SCTP Message belongs to * * @return SN_PARSE_OK | SN_PARSE_ERROR_* */ static int -sctp_PktParser(struct libalias *la, int direction, struct ip *pip, +sctp_PktParser(struct libalias *la, int direction, pkt_t ptr, struct sctp_nat_msg *sm, struct sctp_nat_assoc **passoc) -//sctp_PktParser(int direction, struct mbuf *ipak, int ip_hdr_len,struct sctp_nat_msg *sm, struct sctp_nat_assoc *assoc) { + struct ip *pip; struct sctphdr *sctp_hdr; struct sctp_chunkhdr *chunk_hdr; struct sctp_paramhdr *param_hdr; @@ -1041,7 +1044,7 @@ sctp_PktParser(struct libalias *la, int * Also, I am only interested in the content of INIT and ADDIP chunks */ - // no mbuf stuff from Paolo yet so ... + PULLUP_SCTPHDR(pip, ptr); sm->ip_hdr = pip; /* remove ip header length from the bytes_left */ bytes_left = ntohs(pip->ip_len) - (pip->ip_hl << 2); From owner-svn-src-user@FreeBSD.ORG Sun Apr 12 22:16:17 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF5A1065672; Sun, 12 Apr 2009 22:16:17 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBB3F8FC12; Sun, 12 Apr 2009 22:16:16 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3CMGG8H042252; Sun, 12 Apr 2009 22:16:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3CMGGaB042234; Sun, 12 Apr 2009 22:16:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904122216.n3CMGGaB042234@svn.freebsd.org> From: Andrew Thompson Date: Sun, 12 Apr 2009 22:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190979 - in user/thompsa/vaptq: . bin/sh contrib/bind9 contrib/bind9/lib/dns contrib/cpio contrib/csup contrib/file contrib/gcc contrib/gdb contrib/gdtoa contrib/libpcap contrib/libpca... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 22:16:17 -0000 Author: thompsa Date: Sun Apr 12 22:16:14 2009 New Revision: 190979 URL: http://svn.freebsd.org/changeset/base/190979 Log: MFH r189986-190975 Added: user/thompsa/vaptq/contrib/libpcap/FREEBSD-Xlist - copied unchanged from r190975, head/contrib/libpcap/FREEBSD-Xlist user/thompsa/vaptq/contrib/libpcap/chmod_bpf - copied unchanged from r190975, head/contrib/libpcap/chmod_bpf user/thompsa/vaptq/contrib/libpcap/dlpisubs.c - copied unchanged from r190975, head/contrib/libpcap/dlpisubs.c user/thompsa/vaptq/contrib/libpcap/dlpisubs.h - copied unchanged from r190975, head/contrib/libpcap/dlpisubs.h user/thompsa/vaptq/contrib/libpcap/fad-sita.c - copied unchanged from r190975, head/contrib/libpcap/fad-sita.c user/thompsa/vaptq/contrib/libpcap/filtertest.c - copied unchanged from r190975, head/contrib/libpcap/filtertest.c user/thompsa/vaptq/contrib/libpcap/findalldevstest.c - copied unchanged from r190975, head/contrib/libpcap/findalldevstest.c user/thompsa/vaptq/contrib/libpcap/ieee80211.h - copied unchanged from r190975, head/contrib/libpcap/ieee80211.h user/thompsa/vaptq/contrib/libpcap/missing/ - copied from r190975, head/contrib/libpcap/missing/ user/thompsa/vaptq/contrib/libpcap/net/ - copied from r190975, head/contrib/libpcap/net/ user/thompsa/vaptq/contrib/libpcap/pcap/ - copied from r190975, head/contrib/libpcap/pcap/ user/thompsa/vaptq/contrib/libpcap/pcap-bt-linux.c - copied unchanged from r190975, head/contrib/libpcap/pcap-bt-linux.c user/thompsa/vaptq/contrib/libpcap/pcap-bt-linux.h - copied unchanged from r190975, head/contrib/libpcap/pcap-bt-linux.h user/thompsa/vaptq/contrib/libpcap/pcap-config.1 - copied unchanged from r190975, head/contrib/libpcap/pcap-config.1 user/thompsa/vaptq/contrib/libpcap/pcap-config.in - copied unchanged from r190975, head/contrib/libpcap/pcap-config.in user/thompsa/vaptq/contrib/libpcap/pcap-filter.manmisc - copied unchanged from r190975, head/contrib/libpcap/pcap-filter.manmisc user/thompsa/vaptq/contrib/libpcap/pcap-filter.manmisc.in - copied unchanged from r190975, head/contrib/libpcap/pcap-filter.manmisc.in user/thompsa/vaptq/contrib/libpcap/pcap-libdlpi.c - copied unchanged from r190975, head/contrib/libpcap/pcap-libdlpi.c user/thompsa/vaptq/contrib/libpcap/pcap-linktype.manmisc - copied unchanged from r190975, head/contrib/libpcap/pcap-linktype.manmisc user/thompsa/vaptq/contrib/libpcap/pcap-linktype.manmisc.in - copied unchanged from r190975, head/contrib/libpcap/pcap-linktype.manmisc.in user/thompsa/vaptq/contrib/libpcap/pcap-savefile.manfile - copied unchanged from r190975, head/contrib/libpcap/pcap-savefile.manfile user/thompsa/vaptq/contrib/libpcap/pcap-savefile.manfile.in - copied unchanged from r190975, head/contrib/libpcap/pcap-savefile.manfile.in user/thompsa/vaptq/contrib/libpcap/pcap-sita.c - copied unchanged from r190975, head/contrib/libpcap/pcap-sita.c user/thompsa/vaptq/contrib/libpcap/pcap-sita.h - copied unchanged from r190975, head/contrib/libpcap/pcap-sita.h user/thompsa/vaptq/contrib/libpcap/pcap-sita.html - copied unchanged from r190975, head/contrib/libpcap/pcap-sita.html user/thompsa/vaptq/contrib/libpcap/pcap-usb-linux.c - copied unchanged from r190975, head/contrib/libpcap/pcap-usb-linux.c user/thompsa/vaptq/contrib/libpcap/pcap-usb-linux.h - copied unchanged from r190975, head/contrib/libpcap/pcap-usb-linux.h user/thompsa/vaptq/contrib/libpcap/pcap.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap.3pcap user/thompsa/vaptq/contrib/libpcap/pcap.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_activate.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_activate.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_breakloop.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_breakloop.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_can_set_rfmon.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_can_set_rfmon.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_close.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_close.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_compile.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_compile.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_compile.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap_compile.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_create.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_create.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_datalink.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_datalink.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_datalink.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap_datalink.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_datalink_name_to_val.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_datalink_name_to_val.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_datalink_val_to_name.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_datalink_val_to_name.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_dump.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump_close.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_dump_close.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump_file.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_dump_file.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump_flush.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_dump_flush.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump_ftell.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_dump_ftell.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump_open.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_dump_open.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_dump_open.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap_dump_open.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_file.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_file.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_fileno.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_fileno.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_findalldevs.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_findalldevs.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_free_datalinks.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_free_datalinks.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_freealldevs.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_freealldevs.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_freecode.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_freecode.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_get_selectable_fd.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_get_selectable_fd.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_geterr.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_geterr.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_inject.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_inject.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_is_swapped.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_is_swapped.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_lib_version.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_lib_version.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_list_datalinks.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_list_datalinks.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_list_datalinks.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap_list_datalinks.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_lookupdev.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_lookupdev.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_lookupnet.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_lookupnet.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_loop.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_loop.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_major_version.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_major_version.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_next_ex.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_next_ex.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_offline_filter.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_offline_filter.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_open_dead.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_open_dead.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_open_dead.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap_open_dead.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_open_live.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_open_live.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_open_offline.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_open_offline.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_open_offline.3pcap.in - copied unchanged from r190975, head/contrib/libpcap/pcap_open_offline.3pcap.in user/thompsa/vaptq/contrib/libpcap/pcap_set_buffer_size.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_set_buffer_size.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_set_datalink.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_set_datalink.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_set_promisc.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_set_promisc.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_set_rfmon.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_set_rfmon.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_set_snaplen.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_set_snaplen.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_set_timeout.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_set_timeout.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_setdirection.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_setdirection.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_setfilter.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_setfilter.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_setnonblock.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_setnonblock.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_snapshot.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_snapshot.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_stats.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_stats.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_statustostr.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_statustostr.3pcap user/thompsa/vaptq/contrib/libpcap/pcap_strerror.3pcap - copied unchanged from r190975, head/contrib/libpcap/pcap_strerror.3pcap user/thompsa/vaptq/contrib/libpcap/runlex.sh - copied unchanged from r190975, head/contrib/libpcap/runlex.sh user/thompsa/vaptq/contrib/tcpdump/FREEBSD-Xlist - copied unchanged from r190975, head/contrib/tcpdump/FREEBSD-Xlist user/thompsa/vaptq/contrib/tcpdump/INSTALL.txt - copied unchanged from r190975, head/contrib/tcpdump/INSTALL.txt user/thompsa/vaptq/contrib/tcpdump/checksum.c - copied unchanged from r190975, head/contrib/tcpdump/checksum.c user/thompsa/vaptq/contrib/tcpdump/print-bt.c - copied unchanged from r190975, head/contrib/tcpdump/print-bt.c user/thompsa/vaptq/contrib/tcpdump/print-cfm.c - copied unchanged from r190975, head/contrib/tcpdump/print-cfm.c user/thompsa/vaptq/contrib/tcpdump/print-dtp.c - copied unchanged from r190975, head/contrib/tcpdump/print-dtp.c user/thompsa/vaptq/contrib/tcpdump/print-lldp.c - copied unchanged from r190975, head/contrib/tcpdump/print-lldp.c user/thompsa/vaptq/contrib/tcpdump/print-lwapp.c - copied unchanged from r190975, head/contrib/tcpdump/print-lwapp.c user/thompsa/vaptq/contrib/tcpdump/print-mpcp.c - copied unchanged from r190975, head/contrib/tcpdump/print-mpcp.c user/thompsa/vaptq/contrib/tcpdump/print-rrcp.c - copied unchanged from r190975, head/contrib/tcpdump/print-rrcp.c user/thompsa/vaptq/contrib/tcpdump/print-sflow.c - copied unchanged from r190975, head/contrib/tcpdump/print-sflow.c user/thompsa/vaptq/contrib/tcpdump/print-udld.c - copied unchanged from r190975, head/contrib/tcpdump/print-udld.c user/thompsa/vaptq/contrib/tcpdump/print-vqp.c - copied unchanged from r190975, head/contrib/tcpdump/print-vqp.c user/thompsa/vaptq/contrib/tcpdump/print-vtp.c - copied unchanged from r190975, head/contrib/tcpdump/print-vtp.c user/thompsa/vaptq/lib/libarchive/archive_read_disk.3 - copied unchanged from r190975, head/lib/libarchive/archive_read_disk.3 user/thompsa/vaptq/lib/libc/db/mpool/mpool-compat.c - copied unchanged from r190975, head/lib/libc/db/mpool/mpool-compat.c user/thompsa/vaptq/lib/libc/nls/be_BY.UTF-8.msg - copied unchanged from r190975, head/lib/libc/nls/be_BY.UTF-8.msg user/thompsa/vaptq/lib/libc/nls/uk_UA.UTF-8.msg - copied unchanged from r190975, head/lib/libc/nls/uk_UA.UTF-8.msg user/thompsa/vaptq/share/man/man4/uath.4 - copied unchanged from r190975, head/share/man/man4/uath.4 user/thompsa/vaptq/share/man/man9/refcount.9 - copied unchanged from r190975, head/share/man/man9/refcount.9 user/thompsa/vaptq/sys/amd64/ia32/ia32_misc.c - copied unchanged from r190975, head/sys/amd64/ia32/ia32_misc.c user/thompsa/vaptq/sys/cddl/dev/dtnfsclient/ (props changed) - copied from r190975, head/sys/cddl/dev/dtnfsclient/ user/thompsa/vaptq/sys/contrib/dev/uath/ - copied from r190975, head/sys/contrib/dev/uath/ user/thompsa/vaptq/sys/dev/ipmi/ipmi_linux.c - copied unchanged from r190975, head/sys/dev/ipmi/ipmi_linux.c user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_82599.c - copied unchanged from r190975, head/sys/dev/ixgbe/ixgbe_82599.c user/thompsa/vaptq/sys/dev/mii/axphy.c - copied unchanged from r190975, head/sys/dev/mii/axphy.c user/thompsa/vaptq/sys/dev/mii/axphyreg.h - copied unchanged from r190975, head/sys/dev/mii/axphyreg.h user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c - copied unchanged from r190975, head/sys/dev/usb/wlan/if_uath.c user/thompsa/vaptq/sys/dev/usb/wlan/if_uathreg.h - copied unchanged from r190975, head/sys/dev/usb/wlan/if_uathreg.h user/thompsa/vaptq/sys/dev/usb/wlan/if_uathvar.h - copied unchanged from r190975, head/sys/dev/usb/wlan/if_uathvar.h user/thompsa/vaptq/sys/geom/vinum/geom_vinum_create.c - copied unchanged from r190975, head/sys/geom/vinum/geom_vinum_create.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_events.c - copied unchanged from r190975, head/sys/geom/vinum/geom_vinum_events.c user/thompsa/vaptq/sys/i386/cpufreq/hwpstate.c - copied unchanged from r190975, head/sys/i386/cpufreq/hwpstate.c user/thompsa/vaptq/sys/ia64/ia32/ia32_misc.c - copied unchanged from r190975, head/sys/ia64/ia32/ia32_misc.c user/thompsa/vaptq/sys/modules/dtrace/dtnfsclient/ (props changed) - copied from r190975, head/sys/modules/dtrace/dtnfsclient/ user/thompsa/vaptq/sys/modules/ip6_mroute_mod/ (props changed) - copied from r190975, head/sys/modules/ip6_mroute_mod/ user/thompsa/vaptq/sys/modules/ipmi/ipmi_linux/ (props changed) - copied from r190975, head/sys/modules/ipmi/ipmi_linux/ user/thompsa/vaptq/sys/modules/nfssvc/ - copied from r190975, head/sys/modules/nfssvc/ user/thompsa/vaptq/sys/modules/usb/uath/ - copied from r190975, head/sys/modules/usb/uath/ user/thompsa/vaptq/sys/net80211/ieee80211_superg.c - copied unchanged from r190975, head/sys/net80211/ieee80211_superg.c user/thompsa/vaptq/sys/net80211/ieee80211_superg.h - copied unchanged from r190975, head/sys/net80211/ieee80211_superg.h user/thompsa/vaptq/sys/nfs/nfs_nfssvc.c - copied unchanged from r190975, head/sys/nfs/nfs_nfssvc.c user/thompsa/vaptq/sys/nfs/nfssvc.h - copied unchanged from r190975, head/sys/nfs/nfssvc.h user/thompsa/vaptq/sys/nfsclient/nfs_kdtrace.c - copied unchanged from r190975, head/sys/nfsclient/nfs_kdtrace.c user/thompsa/vaptq/sys/nfsclient/nfs_kdtrace.h - copied unchanged from r190975, head/sys/nfsclient/nfs_kdtrace.h user/thompsa/vaptq/sys/powerpc/aim/mmu_oea64.c - copied unchanged from r190975, head/sys/powerpc/aim/mmu_oea64.c user/thompsa/vaptq/sys/powerpc/include/sysarch.h - copied unchanged from r190975, head/sys/powerpc/include/sysarch.h user/thompsa/vaptq/sys/powerpc/ofw/ofw_real.c - copied unchanged from r190975, head/sys/powerpc/ofw/ofw_real.c user/thompsa/vaptq/sys/powerpc/powermac/cpcht.c - copied unchanged from r190975, head/sys/powerpc/powermac/cpcht.c user/thompsa/vaptq/sys/powerpc/powermac/cpchtvar.h - copied unchanged from r190975, head/sys/powerpc/powermac/cpchtvar.h user/thompsa/vaptq/sys/powerpc/powerpc/dump_machdep.c - copied unchanged from r190975, head/sys/powerpc/powerpc/dump_machdep.c user/thompsa/vaptq/sys/powerpc/powerpc/uio_machdep.c - copied unchanged from r190975, head/sys/powerpc/powerpc/uio_machdep.c user/thompsa/vaptq/tools/regression/bin/sh/builtins/read1.0 - copied unchanged from r190975, head/tools/regression/bin/sh/builtins/read1.0 user/thompsa/vaptq/tools/regression/bin/sh/builtins/read1.0.stdout - copied unchanged from r190975, head/tools/regression/bin/sh/builtins/read1.0.stdout user/thompsa/vaptq/usr.sbin/uathload/ - copied from r190975, head/usr.sbin/uathload/ Deleted: user/thompsa/vaptq/contrib/libpcap/FILES user/thompsa/vaptq/contrib/libpcap/README.Win32 user/thompsa/vaptq/contrib/libpcap/README.aix user/thompsa/vaptq/contrib/libpcap/README.dag user/thompsa/vaptq/contrib/libpcap/README.hpux user/thompsa/vaptq/contrib/libpcap/README.linux user/thompsa/vaptq/contrib/libpcap/README.macosx user/thompsa/vaptq/contrib/libpcap/README.septel user/thompsa/vaptq/contrib/libpcap/README.tru64 user/thompsa/vaptq/contrib/libpcap/acsite.m4 user/thompsa/vaptq/contrib/libpcap/doc/pcap.html user/thompsa/vaptq/contrib/libpcap/doc/pcap.txt user/thompsa/vaptq/contrib/libpcap/doc/pcap.xml user/thompsa/vaptq/contrib/libpcap/pcap-nit.h user/thompsa/vaptq/contrib/libpcap/pcap-pf.h user/thompsa/vaptq/contrib/libpcap/pcap.3 user/thompsa/vaptq/contrib/libpcap/pcap1.h user/thompsa/vaptq/contrib/libpcap/sll.h user/thompsa/vaptq/contrib/tcpdump/FILES user/thompsa/vaptq/contrib/tcpdump/INSTALL user/thompsa/vaptq/contrib/tcpdump/Makefile-devel-adds user/thompsa/vaptq/contrib/tcpdump/PLATFORMS user/thompsa/vaptq/contrib/tcpdump/Readme.Win32 user/thompsa/vaptq/contrib/tcpdump/TODO user/thompsa/vaptq/contrib/tcpdump/tests/ user/thompsa/vaptq/lib/libc/gen/dlfunc.c user/thompsa/vaptq/sbin/slattach/ user/thompsa/vaptq/sbin/startslip/ user/thompsa/vaptq/share/man/man4/fla.4 user/thompsa/vaptq/share/man/man4/ppp.4 user/thompsa/vaptq/share/man/man4/sl.4 user/thompsa/vaptq/share/man/man4/uscanner.4 user/thompsa/vaptq/share/man/man9/VOP_LEASE.9 user/thompsa/vaptq/sys/dev/usb/image/ user/thompsa/vaptq/sys/dev/usb/usb_sw_transfer.c user/thompsa/vaptq/sys/dev/usb/usb_sw_transfer.h user/thompsa/vaptq/sys/modules/usb/uscanner/ user/thompsa/vaptq/sys/net/bsd_comp.c user/thompsa/vaptq/sys/net/if_ppp.c user/thompsa/vaptq/sys/net/if_ppp.h user/thompsa/vaptq/sys/net/if_pppvar.h user/thompsa/vaptq/sys/net/if_sl.c user/thompsa/vaptq/sys/net/if_slvar.h user/thompsa/vaptq/sys/net/ppp_comp.h user/thompsa/vaptq/sys/net/ppp_deflate.c user/thompsa/vaptq/sys/net/ppp_tty.c user/thompsa/vaptq/sys/net/slip.h user/thompsa/vaptq/sys/powerpc/aim/uio_machdep.c user/thompsa/vaptq/sys/powerpc/booke/uio_machdep.c user/thompsa/vaptq/tools/build/options/WITHOUT_SLIP user/thompsa/vaptq/usr.sbin/pppd/ user/thompsa/vaptq/usr.sbin/pppstats/ user/thompsa/vaptq/usr.sbin/sliplogin/ user/thompsa/vaptq/usr.sbin/slstat/ Modified: user/thompsa/vaptq/ (props changed) user/thompsa/vaptq/MAINTAINERS user/thompsa/vaptq/Makefile user/thompsa/vaptq/ObsoleteFiles.inc user/thompsa/vaptq/UPDATING user/thompsa/vaptq/bin/sh/alias.c user/thompsa/vaptq/bin/sh/eval.c user/thompsa/vaptq/bin/sh/miscbltin.c user/thompsa/vaptq/contrib/bind9/ (props changed) user/thompsa/vaptq/contrib/bind9/CHANGES user/thompsa/vaptq/contrib/bind9/lib/dns/validator.c user/thompsa/vaptq/contrib/bind9/version user/thompsa/vaptq/contrib/cpio/ (props changed) user/thompsa/vaptq/contrib/csup/ (props changed) user/thompsa/vaptq/contrib/csup/updater.c user/thompsa/vaptq/contrib/file/ (props changed) user/thompsa/vaptq/contrib/gcc/c-decl.c user/thompsa/vaptq/contrib/gdb/ (props changed) user/thompsa/vaptq/contrib/gdb/FREEBSD-Xlist user/thompsa/vaptq/contrib/gdtoa/ (props changed) user/thompsa/vaptq/contrib/libpcap/ (props changed) user/thompsa/vaptq/contrib/libpcap/CHANGES user/thompsa/vaptq/contrib/libpcap/CREDITS user/thompsa/vaptq/contrib/libpcap/INSTALL.txt user/thompsa/vaptq/contrib/libpcap/Makefile.in user/thompsa/vaptq/contrib/libpcap/README user/thompsa/vaptq/contrib/libpcap/VERSION user/thompsa/vaptq/contrib/libpcap/atmuni31.h user/thompsa/vaptq/contrib/libpcap/bpf/net/bpf_filter.c user/thompsa/vaptq/contrib/libpcap/bpf_dump.c user/thompsa/vaptq/contrib/libpcap/bpf_image.c user/thompsa/vaptq/contrib/libpcap/config.h.in user/thompsa/vaptq/contrib/libpcap/configure user/thompsa/vaptq/contrib/libpcap/configure.in user/thompsa/vaptq/contrib/libpcap/etherent.c user/thompsa/vaptq/contrib/libpcap/ethertype.h user/thompsa/vaptq/contrib/libpcap/fad-getad.c user/thompsa/vaptq/contrib/libpcap/fad-gifc.c user/thompsa/vaptq/contrib/libpcap/fad-glifc.c user/thompsa/vaptq/contrib/libpcap/fad-win32.c user/thompsa/vaptq/contrib/libpcap/gencode.c user/thompsa/vaptq/contrib/libpcap/gencode.h user/thompsa/vaptq/contrib/libpcap/grammar.y user/thompsa/vaptq/contrib/libpcap/inet.c user/thompsa/vaptq/contrib/libpcap/mkdep user/thompsa/vaptq/contrib/libpcap/nametoaddr.c user/thompsa/vaptq/contrib/libpcap/optimize.c user/thompsa/vaptq/contrib/libpcap/packaging/pcap.spec.in user/thompsa/vaptq/contrib/libpcap/pcap-bpf.c user/thompsa/vaptq/contrib/libpcap/pcap-bpf.h user/thompsa/vaptq/contrib/libpcap/pcap-dag.c user/thompsa/vaptq/contrib/libpcap/pcap-dag.h user/thompsa/vaptq/contrib/libpcap/pcap-dlpi.c user/thompsa/vaptq/contrib/libpcap/pcap-dos.c user/thompsa/vaptq/contrib/libpcap/pcap-enet.c user/thompsa/vaptq/contrib/libpcap/pcap-int.h user/thompsa/vaptq/contrib/libpcap/pcap-linux.c user/thompsa/vaptq/contrib/libpcap/pcap-namedb.h user/thompsa/vaptq/contrib/libpcap/pcap-nit.c user/thompsa/vaptq/contrib/libpcap/pcap-null.c user/thompsa/vaptq/contrib/libpcap/pcap-pf.c user/thompsa/vaptq/contrib/libpcap/pcap-septel.c user/thompsa/vaptq/contrib/libpcap/pcap-septel.h user/thompsa/vaptq/contrib/libpcap/pcap-snit.c user/thompsa/vaptq/contrib/libpcap/pcap-snoop.c user/thompsa/vaptq/contrib/libpcap/pcap-stdinc.h user/thompsa/vaptq/contrib/libpcap/pcap-win32.c user/thompsa/vaptq/contrib/libpcap/pcap.c user/thompsa/vaptq/contrib/libpcap/pcap.h user/thompsa/vaptq/contrib/libpcap/savefile.c user/thompsa/vaptq/contrib/libpcap/scanner.l user/thompsa/vaptq/contrib/ncurses/ (props changed) user/thompsa/vaptq/contrib/netcat/ (props changed) user/thompsa/vaptq/contrib/ntp/ (props changed) user/thompsa/vaptq/contrib/openbsm/ (props changed) user/thompsa/vaptq/contrib/openpam/ (props changed) user/thompsa/vaptq/contrib/pf/ (props changed) user/thompsa/vaptq/contrib/sendmail/ (props changed) user/thompsa/vaptq/contrib/tcpdump/ (props changed) user/thompsa/vaptq/contrib/tcpdump/CHANGES user/thompsa/vaptq/contrib/tcpdump/CREDITS user/thompsa/vaptq/contrib/tcpdump/Makefile.in user/thompsa/vaptq/contrib/tcpdump/README user/thompsa/vaptq/contrib/tcpdump/VERSION user/thompsa/vaptq/contrib/tcpdump/addrtoname.c user/thompsa/vaptq/contrib/tcpdump/addrtoname.h user/thompsa/vaptq/contrib/tcpdump/af.c user/thompsa/vaptq/contrib/tcpdump/af.h user/thompsa/vaptq/contrib/tcpdump/aodv.h user/thompsa/vaptq/contrib/tcpdump/appletalk.h user/thompsa/vaptq/contrib/tcpdump/arcnet.h user/thompsa/vaptq/contrib/tcpdump/atm.h user/thompsa/vaptq/contrib/tcpdump/atmuni31.h user/thompsa/vaptq/contrib/tcpdump/bgp.h user/thompsa/vaptq/contrib/tcpdump/bootp.h user/thompsa/vaptq/contrib/tcpdump/bpf_dump.c user/thompsa/vaptq/contrib/tcpdump/chdlc.h user/thompsa/vaptq/contrib/tcpdump/config.h.in user/thompsa/vaptq/contrib/tcpdump/configure user/thompsa/vaptq/contrib/tcpdump/configure.in user/thompsa/vaptq/contrib/tcpdump/dccp.h user/thompsa/vaptq/contrib/tcpdump/decnet.h user/thompsa/vaptq/contrib/tcpdump/enc.h user/thompsa/vaptq/contrib/tcpdump/ether.h user/thompsa/vaptq/contrib/tcpdump/ethertype.h user/thompsa/vaptq/contrib/tcpdump/extract.h user/thompsa/vaptq/contrib/tcpdump/fddi.h user/thompsa/vaptq/contrib/tcpdump/gmpls.c user/thompsa/vaptq/contrib/tcpdump/gmpls.h user/thompsa/vaptq/contrib/tcpdump/gmt2local.c user/thompsa/vaptq/contrib/tcpdump/gmt2local.h user/thompsa/vaptq/contrib/tcpdump/icmp6.h user/thompsa/vaptq/contrib/tcpdump/ieee802_11.h user/thompsa/vaptq/contrib/tcpdump/ieee802_11_radio.h user/thompsa/vaptq/contrib/tcpdump/igrp.h user/thompsa/vaptq/contrib/tcpdump/interface.h user/thompsa/vaptq/contrib/tcpdump/ip.h user/thompsa/vaptq/contrib/tcpdump/ip6.h user/thompsa/vaptq/contrib/tcpdump/ipfc.h user/thompsa/vaptq/contrib/tcpdump/ipproto.c user/thompsa/vaptq/contrib/tcpdump/ipproto.h user/thompsa/vaptq/contrib/tcpdump/ipsec_doi.h user/thompsa/vaptq/contrib/tcpdump/ipx.h user/thompsa/vaptq/contrib/tcpdump/isakmp.h user/thompsa/vaptq/contrib/tcpdump/l2tp.h user/thompsa/vaptq/contrib/tcpdump/l2vpn.c user/thompsa/vaptq/contrib/tcpdump/l2vpn.h user/thompsa/vaptq/contrib/tcpdump/lane.h user/thompsa/vaptq/contrib/tcpdump/lbl/os-osf4.h user/thompsa/vaptq/contrib/tcpdump/lbl/os-solaris2.h user/thompsa/vaptq/contrib/tcpdump/lbl/os-sunos4.h user/thompsa/vaptq/contrib/tcpdump/lbl/os-ultrix4.h user/thompsa/vaptq/contrib/tcpdump/llc.h user/thompsa/vaptq/contrib/tcpdump/machdep.c user/thompsa/vaptq/contrib/tcpdump/machdep.h user/thompsa/vaptq/contrib/tcpdump/makemib user/thompsa/vaptq/contrib/tcpdump/missing/addrinfo.h user/thompsa/vaptq/contrib/tcpdump/missing/datalinks.c user/thompsa/vaptq/contrib/tcpdump/missing/dlnames.c user/thompsa/vaptq/contrib/tcpdump/missing/getaddrinfo.c user/thompsa/vaptq/contrib/tcpdump/missing/getnameinfo.c user/thompsa/vaptq/contrib/tcpdump/missing/inet_aton.c user/thompsa/vaptq/contrib/tcpdump/missing/inet_ntop.c user/thompsa/vaptq/contrib/tcpdump/missing/inet_pton.c user/thompsa/vaptq/contrib/tcpdump/missing/snprintf.c user/thompsa/vaptq/contrib/tcpdump/missing/strdup.c user/thompsa/vaptq/contrib/tcpdump/missing/strlcat.c user/thompsa/vaptq/contrib/tcpdump/missing/strlcpy.c user/thompsa/vaptq/contrib/tcpdump/missing/strsep.c user/thompsa/vaptq/contrib/tcpdump/mpls.h user/thompsa/vaptq/contrib/tcpdump/nameser.h user/thompsa/vaptq/contrib/tcpdump/netbios.h user/thompsa/vaptq/contrib/tcpdump/netdissect.h user/thompsa/vaptq/contrib/tcpdump/nfs.h user/thompsa/vaptq/contrib/tcpdump/nfsfh.h user/thompsa/vaptq/contrib/tcpdump/nlpid.c user/thompsa/vaptq/contrib/tcpdump/nlpid.h user/thompsa/vaptq/contrib/tcpdump/ntp.h user/thompsa/vaptq/contrib/tcpdump/oakley.h user/thompsa/vaptq/contrib/tcpdump/ospf.h user/thompsa/vaptq/contrib/tcpdump/ospf6.h user/thompsa/vaptq/contrib/tcpdump/oui.c user/thompsa/vaptq/contrib/tcpdump/oui.h user/thompsa/vaptq/contrib/tcpdump/parsenfsfh.c user/thompsa/vaptq/contrib/tcpdump/pcap-missing.h user/thompsa/vaptq/contrib/tcpdump/pcap_dump_ftell.c user/thompsa/vaptq/contrib/tcpdump/pmap_prot.h user/thompsa/vaptq/contrib/tcpdump/ppp.h user/thompsa/vaptq/contrib/tcpdump/print-802_11.c user/thompsa/vaptq/contrib/tcpdump/print-ah.c user/thompsa/vaptq/contrib/tcpdump/print-aodv.c user/thompsa/vaptq/contrib/tcpdump/print-ap1394.c user/thompsa/vaptq/contrib/tcpdump/print-arcnet.c user/thompsa/vaptq/contrib/tcpdump/print-arp.c user/thompsa/vaptq/contrib/tcpdump/print-ascii.c user/thompsa/vaptq/contrib/tcpdump/print-atalk.c user/thompsa/vaptq/contrib/tcpdump/print-atm.c user/thompsa/vaptq/contrib/tcpdump/print-beep.c user/thompsa/vaptq/contrib/tcpdump/print-bfd.c user/thompsa/vaptq/contrib/tcpdump/print-bgp.c user/thompsa/vaptq/contrib/tcpdump/print-bootp.c user/thompsa/vaptq/contrib/tcpdump/print-cdp.c user/thompsa/vaptq/contrib/tcpdump/print-chdlc.c user/thompsa/vaptq/contrib/tcpdump/print-cip.c user/thompsa/vaptq/contrib/tcpdump/print-cnfp.c user/thompsa/vaptq/contrib/tcpdump/print-dccp.c user/thompsa/vaptq/contrib/tcpdump/print-decnet.c user/thompsa/vaptq/contrib/tcpdump/print-dhcp6.c user/thompsa/vaptq/contrib/tcpdump/print-domain.c user/thompsa/vaptq/contrib/tcpdump/print-dvmrp.c user/thompsa/vaptq/contrib/tcpdump/print-eap.c user/thompsa/vaptq/contrib/tcpdump/print-egp.c user/thompsa/vaptq/contrib/tcpdump/print-eigrp.c user/thompsa/vaptq/contrib/tcpdump/print-enc.c user/thompsa/vaptq/contrib/tcpdump/print-esp.c user/thompsa/vaptq/contrib/tcpdump/print-ether.c user/thompsa/vaptq/contrib/tcpdump/print-fddi.c user/thompsa/vaptq/contrib/tcpdump/print-fr.c user/thompsa/vaptq/contrib/tcpdump/print-frag6.c user/thompsa/vaptq/contrib/tcpdump/print-gre.c user/thompsa/vaptq/contrib/tcpdump/print-hsrp.c user/thompsa/vaptq/contrib/tcpdump/print-icmp.c user/thompsa/vaptq/contrib/tcpdump/print-icmp6.c user/thompsa/vaptq/contrib/tcpdump/print-igmp.c user/thompsa/vaptq/contrib/tcpdump/print-igrp.c user/thompsa/vaptq/contrib/tcpdump/print-ip.c user/thompsa/vaptq/contrib/tcpdump/print-ip6.c user/thompsa/vaptq/contrib/tcpdump/print-ip6opts.c user/thompsa/vaptq/contrib/tcpdump/print-ipcomp.c user/thompsa/vaptq/contrib/tcpdump/print-ipfc.c user/thompsa/vaptq/contrib/tcpdump/print-ipx.c user/thompsa/vaptq/contrib/tcpdump/print-isakmp.c user/thompsa/vaptq/contrib/tcpdump/print-isoclns.c user/thompsa/vaptq/contrib/tcpdump/print-juniper.c user/thompsa/vaptq/contrib/tcpdump/print-krb.c user/thompsa/vaptq/contrib/tcpdump/print-l2tp.c user/thompsa/vaptq/contrib/tcpdump/print-lane.c user/thompsa/vaptq/contrib/tcpdump/print-ldp.c user/thompsa/vaptq/contrib/tcpdump/print-llc.c user/thompsa/vaptq/contrib/tcpdump/print-lmp.c user/thompsa/vaptq/contrib/tcpdump/print-lspping.c user/thompsa/vaptq/contrib/tcpdump/print-lwres.c user/thompsa/vaptq/contrib/tcpdump/print-mobile.c user/thompsa/vaptq/contrib/tcpdump/print-mobility.c user/thompsa/vaptq/contrib/tcpdump/print-mpls.c user/thompsa/vaptq/contrib/tcpdump/print-msdp.c user/thompsa/vaptq/contrib/tcpdump/print-netbios.c user/thompsa/vaptq/contrib/tcpdump/print-nfs.c user/thompsa/vaptq/contrib/tcpdump/print-ntp.c user/thompsa/vaptq/contrib/tcpdump/print-null.c user/thompsa/vaptq/contrib/tcpdump/print-ospf.c user/thompsa/vaptq/contrib/tcpdump/print-ospf6.c user/thompsa/vaptq/contrib/tcpdump/print-pflog.c user/thompsa/vaptq/contrib/tcpdump/print-pgm.c user/thompsa/vaptq/contrib/tcpdump/print-pim.c user/thompsa/vaptq/contrib/tcpdump/print-ppp.c user/thompsa/vaptq/contrib/tcpdump/print-pppoe.c user/thompsa/vaptq/contrib/tcpdump/print-pptp.c user/thompsa/vaptq/contrib/tcpdump/print-radius.c user/thompsa/vaptq/contrib/tcpdump/print-raw.c user/thompsa/vaptq/contrib/tcpdump/print-rip.c user/thompsa/vaptq/contrib/tcpdump/print-ripng.c user/thompsa/vaptq/contrib/tcpdump/print-rsvp.c user/thompsa/vaptq/contrib/tcpdump/print-rt6.c user/thompsa/vaptq/contrib/tcpdump/print-rx.c user/thompsa/vaptq/contrib/tcpdump/print-sctp.c user/thompsa/vaptq/contrib/tcpdump/print-sip.c user/thompsa/vaptq/contrib/tcpdump/print-sl.c user/thompsa/vaptq/contrib/tcpdump/print-sll.c user/thompsa/vaptq/contrib/tcpdump/print-slow.c user/thompsa/vaptq/contrib/tcpdump/print-smb.c user/thompsa/vaptq/contrib/tcpdump/print-snmp.c user/thompsa/vaptq/contrib/tcpdump/print-stp.c user/thompsa/vaptq/contrib/tcpdump/print-sunatm.c user/thompsa/vaptq/contrib/tcpdump/print-sunrpc.c user/thompsa/vaptq/contrib/tcpdump/print-symantec.c user/thompsa/vaptq/contrib/tcpdump/print-syslog.c user/thompsa/vaptq/contrib/tcpdump/print-tcp.c user/thompsa/vaptq/contrib/tcpdump/print-telnet.c user/thompsa/vaptq/contrib/tcpdump/print-tftp.c user/thompsa/vaptq/contrib/tcpdump/print-timed.c user/thompsa/vaptq/contrib/tcpdump/print-token.c user/thompsa/vaptq/contrib/tcpdump/print-udp.c user/thompsa/vaptq/contrib/tcpdump/print-vjc.c user/thompsa/vaptq/contrib/tcpdump/print-vrrp.c user/thompsa/vaptq/contrib/tcpdump/print-wb.c user/thompsa/vaptq/contrib/tcpdump/print-zephyr.c user/thompsa/vaptq/contrib/tcpdump/route6d.h user/thompsa/vaptq/contrib/tcpdump/rpc_auth.h user/thompsa/vaptq/contrib/tcpdump/rpc_msg.h user/thompsa/vaptq/contrib/tcpdump/rx.h user/thompsa/vaptq/contrib/tcpdump/sctpConstants.h user/thompsa/vaptq/contrib/tcpdump/sctpHeader.h user/thompsa/vaptq/contrib/tcpdump/setsignal.c user/thompsa/vaptq/contrib/tcpdump/setsignal.h user/thompsa/vaptq/contrib/tcpdump/slcompress.h user/thompsa/vaptq/contrib/tcpdump/slip.h user/thompsa/vaptq/contrib/tcpdump/sll.h user/thompsa/vaptq/contrib/tcpdump/smb.h user/thompsa/vaptq/contrib/tcpdump/smbutil.c user/thompsa/vaptq/contrib/tcpdump/strcasecmp.c user/thompsa/vaptq/contrib/tcpdump/tcp.h user/thompsa/vaptq/contrib/tcpdump/tcpdump-stdinc.h user/thompsa/vaptq/contrib/tcpdump/tcpdump.1 user/thompsa/vaptq/contrib/tcpdump/tcpdump.c user/thompsa/vaptq/contrib/tcpdump/telnet.h user/thompsa/vaptq/contrib/tcpdump/tftp.h user/thompsa/vaptq/contrib/tcpdump/timed.h user/thompsa/vaptq/contrib/tcpdump/token.h user/thompsa/vaptq/contrib/tcpdump/udp.h user/thompsa/vaptq/contrib/tcpdump/util.c user/thompsa/vaptq/contrib/tcpdump/vfprintf.c user/thompsa/vaptq/contrib/top/ (props changed) user/thompsa/vaptq/contrib/wpa/ (props changed) user/thompsa/vaptq/crypto/openssh/ (props changed) user/thompsa/vaptq/crypto/openssl/ (props changed) user/thompsa/vaptq/etc/defaults/rc.conf user/thompsa/vaptq/etc/mail/aliases user/thompsa/vaptq/etc/mtree/BSD.include.dist user/thompsa/vaptq/etc/netstart user/thompsa/vaptq/etc/rc.d/ipfw user/thompsa/vaptq/include/dlfcn.h user/thompsa/vaptq/include/mpool.h user/thompsa/vaptq/include/signal.h user/thompsa/vaptq/include/stdio.h user/thompsa/vaptq/lib/libarchive/Makefile user/thompsa/vaptq/lib/libarchive/archive.h user/thompsa/vaptq/lib/libarchive/archive_check_magic.c user/thompsa/vaptq/lib/libarchive/archive_entry.c user/thompsa/vaptq/lib/libarchive/archive_entry.h user/thompsa/vaptq/lib/libarchive/archive_read_support_compression_program.c user/thompsa/vaptq/lib/libarchive/archive_read_support_format_empty.c user/thompsa/vaptq/lib/libarchive/archive_string.c user/thompsa/vaptq/lib/libarchive/archive_string.h user/thompsa/vaptq/lib/libarchive/archive_write_disk.c user/thompsa/vaptq/lib/libarchive/archive_write_disk_set_standard_lookup.c user/thompsa/vaptq/lib/libarchive/archive_write_set_compression_program.c user/thompsa/vaptq/lib/libarchive/archive_write_set_format_mtree.c user/thompsa/vaptq/lib/libarchive/test/main.c user/thompsa/vaptq/lib/libarchive/test/test.h user/thompsa/vaptq/lib/libarchive/test/test_read_compress_program.c user/thompsa/vaptq/lib/libarchive/test/test_read_extract.c user/thompsa/vaptq/lib/libarchive/test/test_tar_large.c user/thompsa/vaptq/lib/libarchive/test/test_write_disk.c user/thompsa/vaptq/lib/libarchive/test/test_write_disk_hardlink.c user/thompsa/vaptq/lib/libarchive/test/test_write_disk_perms.c user/thompsa/vaptq/lib/libarchive/test/test_write_disk_secure.c user/thompsa/vaptq/lib/libc/ (props changed) user/thompsa/vaptq/lib/libc/db/README user/thompsa/vaptq/lib/libc/db/Symbol.map user/thompsa/vaptq/lib/libc/db/btree/bt_debug.c user/thompsa/vaptq/lib/libc/db/btree/bt_open.c user/thompsa/vaptq/lib/libc/db/btree/bt_page.c user/thompsa/vaptq/lib/libc/db/btree/bt_put.c user/thompsa/vaptq/lib/libc/db/btree/bt_split.c user/thompsa/vaptq/lib/libc/db/db/db.c user/thompsa/vaptq/lib/libc/db/hash/README user/thompsa/vaptq/lib/libc/db/hash/hash.c user/thompsa/vaptq/lib/libc/db/hash/hash.h user/thompsa/vaptq/lib/libc/db/hash/hash_bigkey.c user/thompsa/vaptq/lib/libc/db/hash/hash_buf.c user/thompsa/vaptq/lib/libc/db/hash/hash_func.c user/thompsa/vaptq/lib/libc/db/hash/hash_log2.c user/thompsa/vaptq/lib/libc/db/hash/hash_page.c user/thompsa/vaptq/lib/libc/db/man/mpool.3 user/thompsa/vaptq/lib/libc/db/mpool/Makefile.inc user/thompsa/vaptq/lib/libc/db/mpool/mpool.c user/thompsa/vaptq/lib/libc/db/recno/rec_close.c user/thompsa/vaptq/lib/libc/db/recno/rec_put.c user/thompsa/vaptq/lib/libc/gen/Makefile.inc user/thompsa/vaptq/lib/libc/gen/Symbol.map user/thompsa/vaptq/lib/libc/gen/dlfcn.c user/thompsa/vaptq/lib/libc/gen/dlopen.3 user/thompsa/vaptq/lib/libc/gen/getcap.c user/thompsa/vaptq/lib/libc/i386/sys/Makefile.inc user/thompsa/vaptq/lib/libc/net/getaddrinfo.c user/thompsa/vaptq/lib/libc/nls/Makefile.inc user/thompsa/vaptq/lib/libc/nls/ru_RU.KOI8-R.msg (contents, props changed) user/thompsa/vaptq/lib/libc/rpc/clnt_bcast.c user/thompsa/vaptq/lib/libc/rpc/getnetconfig.c user/thompsa/vaptq/lib/libc/stdtime/ (props changed) user/thompsa/vaptq/lib/libc/string/ffsll.c (props changed) user/thompsa/vaptq/lib/libc/string/flsll.c (props changed) user/thompsa/vaptq/lib/libc/string/memchr.3 user/thompsa/vaptq/lib/libc/string/memcmp.3 user/thompsa/vaptq/lib/libc/string/memcpy.3 user/thompsa/vaptq/lib/libc/string/memmove.3 user/thompsa/vaptq/lib/libc/string/memset.3 user/thompsa/vaptq/lib/libc/string/strcasecmp.3 user/thompsa/vaptq/lib/libc/string/strcat.3 user/thompsa/vaptq/lib/libc/string/strchr.3 user/thompsa/vaptq/lib/libc/string/strcmp.3 user/thompsa/vaptq/lib/libc/string/strcpy.3 user/thompsa/vaptq/lib/libc/string/strdup.3 user/thompsa/vaptq/lib/libc/string/strlcpy.3 user/thompsa/vaptq/lib/libc/string/strlen.3 user/thompsa/vaptq/lib/libc/string/strpbrk.3 user/thompsa/vaptq/lib/libc/string/strspn.3 user/thompsa/vaptq/lib/libc/string/strstr.3 user/thompsa/vaptq/lib/libc/sys/Symbol.map user/thompsa/vaptq/lib/libc/sys/ptrace.2 user/thompsa/vaptq/lib/libkvm/kvm_powerpc.c user/thompsa/vaptq/lib/libpcap/Makefile user/thompsa/vaptq/lib/libpcap/config.h user/thompsa/vaptq/lib/libpmc/pmc.h user/thompsa/vaptq/lib/libpmc/pmclog.h user/thompsa/vaptq/lib/libstand/gets.c user/thompsa/vaptq/lib/libthr/Makefile user/thompsa/vaptq/lib/libthr/thread/thr_fork.c user/thompsa/vaptq/lib/libufs/block.c user/thompsa/vaptq/lib/libusb/ (props changed) user/thompsa/vaptq/lib/libutil/ (props changed) user/thompsa/vaptq/libexec/bootpd/rtmsg.c user/thompsa/vaptq/libexec/ftpd/extern.h user/thompsa/vaptq/libexec/ftpd/ftpcmd.y user/thompsa/vaptq/libexec/ftpd/ftpd.c user/thompsa/vaptq/libexec/rtld-elf/Symbol.map user/thompsa/vaptq/libexec/rtld-elf/map_object.c user/thompsa/vaptq/libexec/rtld-elf/rtld.1 user/thompsa/vaptq/libexec/rtld-elf/rtld.c user/thompsa/vaptq/libexec/rtld-elf/rtld.h user/thompsa/vaptq/release/doc/en_US.ISO8859-1/hardware/article.sgml user/thompsa/vaptq/release/doc/ja_JP.eucJP/hardware/common/dev.sgml user/thompsa/vaptq/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml user/thompsa/vaptq/release/doc/share/misc/dev.archlist.txt user/thompsa/vaptq/release/doc/zh_CN.GB2312/hardware/article.sgml user/thompsa/vaptq/release/picobsd/bridge/PICOBSD user/thompsa/vaptq/release/picobsd/bridge/config user/thompsa/vaptq/release/picobsd/bridge/crunch.conf user/thompsa/vaptq/release/picobsd/build/picobsd user/thompsa/vaptq/release/picobsd/floppy.tree/etc/rc1 user/thompsa/vaptq/release/picobsd/mfs_tree/etc/rc user/thompsa/vaptq/release/sparc64/mkisoimages.sh user/thompsa/vaptq/rescue/rescue/Makefile user/thompsa/vaptq/sbin/ (props changed) user/thompsa/vaptq/sbin/Makefile user/thompsa/vaptq/sbin/fdisk_pc98/fdisk.c user/thompsa/vaptq/sbin/geom/class/label/glabel.8 user/thompsa/vaptq/sbin/gvinum/gvinum.8 user/thompsa/vaptq/sbin/gvinum/gvinum.c user/thompsa/vaptq/sbin/ifconfig/ifieee80211.c user/thompsa/vaptq/sbin/ipfw/ (props changed) user/thompsa/vaptq/sbin/ipfw/dummynet.c user/thompsa/vaptq/sbin/ipfw/ipfw.8 user/thompsa/vaptq/sbin/ipfw/ipfw2.c user/thompsa/vaptq/sbin/ipfw/ipfw2.h user/thompsa/vaptq/sbin/ipfw/main.c user/thompsa/vaptq/sbin/newfs_msdos/newfs_msdos.8 user/thompsa/vaptq/sbin/newfs_msdos/newfs_msdos.c user/thompsa/vaptq/sbin/recoverdisk/recoverdisk.c user/thompsa/vaptq/sbin/route/route.c user/thompsa/vaptq/sbin/routed/Makefile user/thompsa/vaptq/sbin/routed/defs.h user/thompsa/vaptq/sbin/routed/if.c user/thompsa/vaptq/sbin/routed/input.c user/thompsa/vaptq/sbin/routed/main.c user/thompsa/vaptq/sbin/routed/output.c user/thompsa/vaptq/sbin/routed/parms.c user/thompsa/vaptq/sbin/routed/radix.c user/thompsa/vaptq/sbin/routed/radix.h user/thompsa/vaptq/sbin/routed/rdisc.c user/thompsa/vaptq/sbin/routed/table.c user/thompsa/vaptq/sbin/routed/trace.c user/thompsa/vaptq/share/man/man3/pthread.3 user/thompsa/vaptq/share/man/man4/Makefile user/thompsa/vaptq/share/man/man4/ath.4 user/thompsa/vaptq/share/man/man4/ath_hal.4 user/thompsa/vaptq/share/man/man4/bce.4 user/thompsa/vaptq/share/man/man4/ed.4 user/thompsa/vaptq/share/man/man4/lagg.4 user/thompsa/vaptq/share/man/man4/malo.4 user/thompsa/vaptq/share/man/man4/man4.i386/fe.4 user/thompsa/vaptq/share/man/man4/man4.powerpc/pmu.4 user/thompsa/vaptq/share/man/man4/textdump.4 user/thompsa/vaptq/share/man/man4/usb.4 user/thompsa/vaptq/share/man/man4/wlan.4 user/thompsa/vaptq/share/man/man4/wpi.4 user/thompsa/vaptq/share/man/man5/devfs.rules.5 user/thompsa/vaptq/share/man/man5/src.conf.5 user/thompsa/vaptq/share/man/man7/operator.7 user/thompsa/vaptq/share/man/man9/Makefile user/thompsa/vaptq/share/man/man9/VOP_ACCESS.9 user/thompsa/vaptq/share/man/man9/VOP_ATTRIB.9 user/thompsa/vaptq/share/man/man9/VOP_CREATE.9 user/thompsa/vaptq/share/man/man9/VOP_FSYNC.9 user/thompsa/vaptq/share/man/man9/VOP_INACTIVE.9 user/thompsa/vaptq/share/man/man9/VOP_IOCTL.9 user/thompsa/vaptq/share/man/man9/VOP_LINK.9 user/thompsa/vaptq/share/man/man9/VOP_LOCK.9 user/thompsa/vaptq/share/man/man9/VOP_LOOKUP.9 user/thompsa/vaptq/share/man/man9/VOP_OPENCLOSE.9 user/thompsa/vaptq/share/man/man9/VOP_RDWR.9 user/thompsa/vaptq/share/man/man9/VOP_READDIR.9 user/thompsa/vaptq/share/man/man9/VOP_READLINK.9 user/thompsa/vaptq/share/man/man9/VOP_REMOVE.9 user/thompsa/vaptq/share/man/man9/VOP_RENAME.9 user/thompsa/vaptq/share/man/man9/VOP_VPTOCNP.9 user/thompsa/vaptq/share/man/man9/acl.9 user/thompsa/vaptq/share/man/man9/bus_dma.9 user/thompsa/vaptq/share/man/man9/vm_map_lock.9 user/thompsa/vaptq/share/misc/operator user/thompsa/vaptq/share/mk/bsd.cpu.mk user/thompsa/vaptq/share/mk/bsd.own.mk user/thompsa/vaptq/share/skel/dot.login user/thompsa/vaptq/share/skel/dot.profile user/thompsa/vaptq/share/timedef/Makefile user/thompsa/vaptq/share/zoneinfo/ (props changed) user/thompsa/vaptq/share/zoneinfo/africa user/thompsa/vaptq/share/zoneinfo/asia user/thompsa/vaptq/share/zoneinfo/southamerica user/thompsa/vaptq/sys/ (props changed) user/thompsa/vaptq/sys/amd64/acpica/acpi_machdep.c user/thompsa/vaptq/sys/amd64/acpica/acpi_wakeup.c user/thompsa/vaptq/sys/amd64/amd64/apic_vector.S user/thompsa/vaptq/sys/amd64/amd64/cpu_switch.S user/thompsa/vaptq/sys/amd64/amd64/db_interface.c user/thompsa/vaptq/sys/amd64/amd64/db_trace.c user/thompsa/vaptq/sys/amd64/amd64/elf_machdep.c user/thompsa/vaptq/sys/amd64/amd64/exception.S user/thompsa/vaptq/sys/amd64/amd64/fpu.c user/thompsa/vaptq/sys/amd64/amd64/genassym.c user/thompsa/vaptq/sys/amd64/amd64/machdep.c user/thompsa/vaptq/sys/amd64/amd64/mp_machdep.c user/thompsa/vaptq/sys/amd64/amd64/pmap.c user/thompsa/vaptq/sys/amd64/amd64/sys_machdep.c user/thompsa/vaptq/sys/amd64/amd64/trap.c user/thompsa/vaptq/sys/amd64/amd64/vm_machdep.c user/thompsa/vaptq/sys/amd64/conf/GENERIC user/thompsa/vaptq/sys/amd64/ia32/ia32_exception.S user/thompsa/vaptq/sys/amd64/ia32/ia32_reg.c user/thompsa/vaptq/sys/amd64/ia32/ia32_signal.c user/thompsa/vaptq/sys/amd64/ia32/ia32_sigtramp.S user/thompsa/vaptq/sys/amd64/include/asmacros.h user/thompsa/vaptq/sys/amd64/include/cpufunc.h user/thompsa/vaptq/sys/amd64/include/endian.h user/thompsa/vaptq/sys/amd64/include/frame.h user/thompsa/vaptq/sys/amd64/include/md_var.h user/thompsa/vaptq/sys/amd64/include/pcb.h user/thompsa/vaptq/sys/amd64/include/pcpu.h user/thompsa/vaptq/sys/amd64/include/pmap.h user/thompsa/vaptq/sys/amd64/include/proc.h user/thompsa/vaptq/sys/amd64/include/reg.h user/thompsa/vaptq/sys/amd64/include/segments.h user/thompsa/vaptq/sys/amd64/include/signal.h user/thompsa/vaptq/sys/amd64/include/sysarch.h user/thompsa/vaptq/sys/amd64/include/ucontext.h user/thompsa/vaptq/sys/amd64/include/xen/ (props changed) user/thompsa/vaptq/sys/amd64/linux32/linux.h user/thompsa/vaptq/sys/amd64/linux32/linux32_locore.s user/thompsa/vaptq/sys/amd64/linux32/linux32_machdep.c user/thompsa/vaptq/sys/amd64/linux32/linux32_sysvec.c user/thompsa/vaptq/sys/amd64/pci/pci_cfgreg.c user/thompsa/vaptq/sys/arm/arm/elf_machdep.c user/thompsa/vaptq/sys/arm/arm/locore.S user/thompsa/vaptq/sys/arm/arm/trap.c user/thompsa/vaptq/sys/arm/at91/files.at91 user/thompsa/vaptq/sys/arm/conf/AVILA user/thompsa/vaptq/sys/arm/conf/CAMBRIA user/thompsa/vaptq/sys/arm/conf/HL200 user/thompsa/vaptq/sys/arm/conf/KB920X user/thompsa/vaptq/sys/arm/include/atomic.h user/thompsa/vaptq/sys/arm/include/vmparam.h user/thompsa/vaptq/sys/boot/forth/loader.conf user/thompsa/vaptq/sys/boot/i386/libi386/Makefile user/thompsa/vaptq/sys/boot/i386/libi386/smbios.c user/thompsa/vaptq/sys/boot/pc98/libpc98/Makefile user/thompsa/vaptq/sys/boot/pc98/libpc98/bioscd.c user/thompsa/vaptq/sys/boot/pc98/libpc98/biosdisk.c user/thompsa/vaptq/sys/boot/pc98/libpc98/time.c user/thompsa/vaptq/sys/boot/pc98/loader/Makefile user/thompsa/vaptq/sys/boot/pc98/loader/main.c user/thompsa/vaptq/sys/cddl/compat/opensolaris/sys/vnode.h user/thompsa/vaptq/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/thompsa/vaptq/sys/compat/freebsd32/freebsd32.h user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_ioctl.c user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_ioctl.h user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_misc.c user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_proto.h user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_syscall.h user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_syscalls.c user/thompsa/vaptq/sys/compat/freebsd32/freebsd32_sysent.c user/thompsa/vaptq/sys/compat/freebsd32/syscalls.master user/thompsa/vaptq/sys/compat/ia32/ia32_signal.h user/thompsa/vaptq/sys/compat/ia32/ia32_sysvec.c user/thompsa/vaptq/sys/compat/linprocfs/linprocfs.c user/thompsa/vaptq/sys/compat/linux/linux_file.c user/thompsa/vaptq/sys/compat/ndis/subr_usbd.c user/thompsa/vaptq/sys/conf/NOTES user/thompsa/vaptq/sys/conf/files user/thompsa/vaptq/sys/conf/files.amd64 user/thompsa/vaptq/sys/conf/files.i386 user/thompsa/vaptq/sys/conf/files.ia64 user/thompsa/vaptq/sys/conf/files.powerpc user/thompsa/vaptq/sys/conf/newvers.sh user/thompsa/vaptq/sys/conf/options user/thompsa/vaptq/sys/contrib/pf/ (props changed) user/thompsa/vaptq/sys/contrib/pf/net/pf.c user/thompsa/vaptq/sys/dev/acpi_support/acpi_asus.c user/thompsa/vaptq/sys/dev/acpica/acpi.c user/thompsa/vaptq/sys/dev/acpica/acpi_cpu.c user/thompsa/vaptq/sys/dev/acpica/acpivar.h user/thompsa/vaptq/sys/dev/age/if_age.c user/thompsa/vaptq/sys/dev/age/if_agereg.h user/thompsa/vaptq/sys/dev/agp/agp.c user/thompsa/vaptq/sys/dev/agp/agp_amd64.c user/thompsa/vaptq/sys/dev/agp/agp_i810.c user/thompsa/vaptq/sys/dev/agp/agp_intel.c user/thompsa/vaptq/sys/dev/agp/agp_via.c user/thompsa/vaptq/sys/dev/ata/ata-pci.c user/thompsa/vaptq/sys/dev/ata/ata-pci.h user/thompsa/vaptq/sys/dev/ata/ata-queue.c user/thompsa/vaptq/sys/dev/ata/ata-sata.c user/thompsa/vaptq/sys/dev/ata/ata-usb.c (props changed) user/thompsa/vaptq/sys/dev/ata/chipsets/ata-ahci.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-intel.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-jmicron.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-marvell.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-nvidia.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-promise.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-serverworks.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-siliconimage.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-sis.c user/thompsa/vaptq/sys/dev/ata/chipsets/ata-via.c user/thompsa/vaptq/sys/dev/ath/ah_osdep.c user/thompsa/vaptq/sys/dev/ath/ath_hal/ah.h user/thompsa/vaptq/sys/dev/ath/ath_hal/ah_internal.h user/thompsa/vaptq/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c user/thompsa/vaptq/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c user/thompsa/vaptq/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/thompsa/vaptq/sys/dev/ath/if_ath.c user/thompsa/vaptq/sys/dev/ath/if_athvar.h user/thompsa/vaptq/sys/dev/bge/if_bge.c user/thompsa/vaptq/sys/dev/bge/if_bgereg.h user/thompsa/vaptq/sys/dev/cxgb/ (props changed) user/thompsa/vaptq/sys/dev/cxgb/cxgb_main.c user/thompsa/vaptq/sys/dev/cxgb/cxgb_offload.c user/thompsa/vaptq/sys/dev/cxgb/cxgb_sge.c user/thompsa/vaptq/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c user/thompsa/vaptq/sys/dev/dc/dcphy.c user/thompsa/vaptq/sys/dev/dc/pnphy.c user/thompsa/vaptq/sys/dev/dcons/dcons_os.c user/thompsa/vaptq/sys/dev/drm/ati_pcigart.c user/thompsa/vaptq/sys/dev/drm/drmP.h user/thompsa/vaptq/sys/dev/drm/drm_irq.c user/thompsa/vaptq/sys/dev/drm/drm_lock.c user/thompsa/vaptq/sys/dev/drm/drm_pci.c user/thompsa/vaptq/sys/dev/drm/drm_pciids.h user/thompsa/vaptq/sys/dev/drm/drm_scatter.c user/thompsa/vaptq/sys/dev/drm/drm_vm.c user/thompsa/vaptq/sys/dev/drm/i915_dma.c user/thompsa/vaptq/sys/dev/drm/i915_drv.c user/thompsa/vaptq/sys/dev/drm/i915_drv.h user/thompsa/vaptq/sys/dev/drm/i915_irq.c user/thompsa/vaptq/sys/dev/drm/i915_reg.h user/thompsa/vaptq/sys/dev/drm/i915_suspend.c user/thompsa/vaptq/sys/dev/drm/mga_irq.c user/thompsa/vaptq/sys/dev/drm/r300_cmdbuf.c user/thompsa/vaptq/sys/dev/drm/r300_reg.h user/thompsa/vaptq/sys/dev/drm/radeon_cp.c user/thompsa/vaptq/sys/dev/drm/radeon_drv.h user/thompsa/vaptq/sys/dev/drm/radeon_irq.c user/thompsa/vaptq/sys/dev/e1000/e1000_80003es2lan.c user/thompsa/vaptq/sys/dev/e1000/e1000_82540.c user/thompsa/vaptq/sys/dev/e1000/e1000_82541.c user/thompsa/vaptq/sys/dev/e1000/e1000_82571.c user/thompsa/vaptq/sys/dev/e1000/e1000_82575.c user/thompsa/vaptq/sys/dev/e1000/e1000_82575.h user/thompsa/vaptq/sys/dev/e1000/e1000_api.c user/thompsa/vaptq/sys/dev/e1000/e1000_api.h user/thompsa/vaptq/sys/dev/e1000/e1000_defines.h user/thompsa/vaptq/sys/dev/e1000/e1000_hw.h user/thompsa/vaptq/sys/dev/e1000/e1000_ich8lan.c user/thompsa/vaptq/sys/dev/e1000/e1000_ich8lan.h user/thompsa/vaptq/sys/dev/e1000/e1000_mac.c user/thompsa/vaptq/sys/dev/e1000/e1000_mac.h user/thompsa/vaptq/sys/dev/e1000/e1000_nvm.c user/thompsa/vaptq/sys/dev/e1000/e1000_nvm.h user/thompsa/vaptq/sys/dev/e1000/e1000_phy.c user/thompsa/vaptq/sys/dev/e1000/e1000_phy.h user/thompsa/vaptq/sys/dev/e1000/e1000_regs.h user/thompsa/vaptq/sys/dev/e1000/if_em.c user/thompsa/vaptq/sys/dev/e1000/if_igb.c user/thompsa/vaptq/sys/dev/e1000/if_igb.h user/thompsa/vaptq/sys/dev/ed/ax88x90reg.h user/thompsa/vaptq/sys/dev/ed/dl100xxreg.h user/thompsa/vaptq/sys/dev/ed/if_ed.c user/thompsa/vaptq/sys/dev/ed/if_ed_cbus.c user/thompsa/vaptq/sys/dev/ed/if_ed_isa.c user/thompsa/vaptq/sys/dev/ed/if_ed_pccard.c user/thompsa/vaptq/sys/dev/ed/if_ed_pci.c user/thompsa/vaptq/sys/dev/ed/if_ed_wd80x3.c user/thompsa/vaptq/sys/dev/ed/if_edreg.h user/thompsa/vaptq/sys/dev/ed/if_edvar.h user/thompsa/vaptq/sys/dev/ep/if_ep.c user/thompsa/vaptq/sys/dev/ep/if_ep_pccard.c user/thompsa/vaptq/sys/dev/ep/if_epreg.h user/thompsa/vaptq/sys/dev/ep/if_epvar.h user/thompsa/vaptq/sys/dev/fe/if_fe_pccard.c user/thompsa/vaptq/sys/dev/firewire/firewire.c user/thompsa/vaptq/sys/dev/firewire/sbp.h user/thompsa/vaptq/sys/dev/hptiop/hptiop.h user/thompsa/vaptq/sys/dev/hptmv/access601.h user/thompsa/vaptq/sys/dev/hptmv/amd64-elf.raid.o.uu user/thompsa/vaptq/sys/dev/hptmv/array.h user/thompsa/vaptq/sys/dev/hptmv/command.h user/thompsa/vaptq/sys/dev/hptmv/entry.c user/thompsa/vaptq/sys/dev/hptmv/global.h user/thompsa/vaptq/sys/dev/hptmv/gui_lib.c user/thompsa/vaptq/sys/dev/hptmv/hptintf.h user/thompsa/vaptq/sys/dev/hptmv/hptproc.c user/thompsa/vaptq/sys/dev/hptmv/i386-elf.raid.o.uu user/thompsa/vaptq/sys/dev/hptmv/ioctl.c user/thompsa/vaptq/sys/dev/hptmv/mvOs.h user/thompsa/vaptq/sys/dev/hptmv/mvSata.h user/thompsa/vaptq/sys/dev/hptmv/mvStorageDev.h user/thompsa/vaptq/sys/dev/hptmv/osbsd.h user/thompsa/vaptq/sys/dev/hptmv/raid5n.h user/thompsa/vaptq/sys/dev/hptmv/readme.txt user/thompsa/vaptq/sys/dev/hptmv/vdevice.h user/thompsa/vaptq/sys/dev/ichwd/ichwd.c user/thompsa/vaptq/sys/dev/if_ndis/if_ndis.c user/thompsa/vaptq/sys/dev/ipw/if_ipw.c user/thompsa/vaptq/sys/dev/iwi/if_iwi.c user/thompsa/vaptq/sys/dev/iwn/if_iwn.c user/thompsa/vaptq/sys/dev/ixgbe/LICENSE user/thompsa/vaptq/sys/dev/ixgbe/README user/thompsa/vaptq/sys/dev/ixgbe/ixgbe.c user/thompsa/vaptq/sys/dev/ixgbe/ixgbe.h user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_82598.c user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_api.c user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_api.h user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_common.c user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_common.h user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_osdep.h user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_phy.c user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_phy.h user/thompsa/vaptq/sys/dev/ixgbe/ixgbe_type.h user/thompsa/vaptq/sys/dev/kbd/kbdreg.h user/thompsa/vaptq/sys/dev/kbdmux/kbdmux.c user/thompsa/vaptq/sys/dev/malo/if_malo.c user/thompsa/vaptq/sys/dev/malo/if_malo_pci.c user/thompsa/vaptq/sys/dev/malo/if_malohal.c user/thompsa/vaptq/sys/dev/mii/miidevs user/thompsa/vaptq/sys/dev/msk/if_msk.c user/thompsa/vaptq/sys/dev/my/if_my.c user/thompsa/vaptq/sys/dev/ofw/ofw_standard.c user/thompsa/vaptq/sys/dev/ofw/openfirm.c user/thompsa/vaptq/sys/dev/pccard/pccarddevs user/thompsa/vaptq/sys/dev/pci/pci.c user/thompsa/vaptq/sys/dev/powermac_nvram/powermac_nvram.c user/thompsa/vaptq/sys/dev/ral/rt2560.c user/thompsa/vaptq/sys/dev/ral/rt2560var.h user/thompsa/vaptq/sys/dev/ral/rt2661.c user/thompsa/vaptq/sys/dev/ral/rt2661var.h user/thompsa/vaptq/sys/dev/re/if_re.c user/thompsa/vaptq/sys/dev/sound/pci/hda/hdac.c user/thompsa/vaptq/sys/dev/sound/usb/uaudio.c (contents, props changed) user/thompsa/vaptq/sys/dev/sound/usb/uaudio.h (props changed) user/thompsa/vaptq/sys/dev/sound/usb/uaudio_pcm.c (props changed) user/thompsa/vaptq/sys/dev/sound/usb/uaudioreg.h (props changed) user/thompsa/vaptq/sys/dev/syscons/syscons.c user/thompsa/vaptq/sys/dev/twa/tw_cl_init.c user/thompsa/vaptq/sys/dev/twa/tw_osl.h user/thompsa/vaptq/sys/dev/twa/tw_osl_freebsd.c user/thompsa/vaptq/sys/dev/uart/uart_cpu_powerpc.c user/thompsa/vaptq/sys/dev/uart/uart_dev_ns8250.c user/thompsa/vaptq/sys/dev/usb/README.TXT (props changed) user/thompsa/vaptq/sys/dev/usb/bluetooth/TODO.TXT (props changed) user/thompsa/vaptq/sys/dev/usb/bluetooth/ng_ubt.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/bluetooth/ng_ubt_var.h (props changed) user/thompsa/vaptq/sys/dev/usb/bluetooth/ubtbcmfw.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/at91dci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/at91dci.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/at91dci_atmelarm.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/atmegadci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/atmegadci.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/atmegadci_atmelarm.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ehci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ehci.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ehci_ixp4xx.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ehci_mbus.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ehci_pci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/musb_otg.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/musb_otg.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/musb_otg_atmelarm.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ohci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ohci.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ohci_atmelarm.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/ohci_pci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/uhci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/uhci.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/uhci_pci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/usb_controller.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/uss820dci.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/uss820dci.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/controller/uss820dci_atmelarm.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/input/uhid.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/input/ukbd.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/input/ums.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/input/usb_rdesc.h (props changed) user/thompsa/vaptq/sys/dev/usb/misc/udbp.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/misc/udbp.h (props changed) user/thompsa/vaptq/sys/dev/usb/misc/ufm.c (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_aue.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_auereg.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_axe.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_axereg.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_cdce.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_cdcereg.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_cue.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_cuereg.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_kue.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_kuefw.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_kuereg.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_rue.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_ruereg.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/if_udav.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/net/if_udavreg.h (props changed) user/thompsa/vaptq/sys/dev/usb/net/usb_ethernet.c (props changed) user/thompsa/vaptq/sys/dev/usb/net/usb_ethernet.h (props changed) user/thompsa/vaptq/sys/dev/usb/quirk/usb_quirk.c (props changed) user/thompsa/vaptq/sys/dev/usb/quirk/usb_quirk.h (props changed) user/thompsa/vaptq/sys/dev/usb/serial/u3g.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uark.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/ubsa.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/ubser.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uchcom.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/ucycom.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/ufoma.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uftdi.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uftdi_reg.h (props changed) user/thompsa/vaptq/sys/dev/usb/serial/ugensa.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uipaq.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/ulpt.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/umct.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/umodem.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/umoscom.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uplcom.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/usb_serial.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/usb_serial.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uslcom.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uvisor.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/serial/uvscom.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/storage/rio500_usb.h (props changed) user/thompsa/vaptq/sys/dev/usb/storage/umass.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/storage/urio.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/storage/ustorage_fs.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/template/usb_template.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/template/usb_template.h (props changed) user/thompsa/vaptq/sys/dev/usb/template/usb_template_cdce.c (props changed) user/thompsa/vaptq/sys/dev/usb/template/usb_template_msc.c (props changed) user/thompsa/vaptq/sys/dev/usb/template/usb_template_mtp.c (props changed) user/thompsa/vaptq/sys/dev/usb/ufm_ioctl.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_bus.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_busdma.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_busdma.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_cdc.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_compat_linux.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_compat_linux.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_controller.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_core.c (props changed) user/thompsa/vaptq/sys/dev/usb/usb_core.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_debug.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_debug.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_defs.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_dev.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_dev.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_device.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_device.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_dynamic.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_dynamic.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_endian.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_error.c (props changed) user/thompsa/vaptq/sys/dev/usb/usb_error.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_generic.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_generic.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_handle_request.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_handle_request.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_hid.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_hid.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_hub.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_hub.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_if.m (props changed) user/thompsa/vaptq/sys/dev/usb/usb_ioctl.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_lookup.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_lookup.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_mbuf.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_mbuf.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_mfunc.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_msctest.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_msctest.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_parse.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_parse.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_pci.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_process.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_process.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_request.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_request.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_revision.h (props changed) user/thompsa/vaptq/sys/dev/usb/usb_transfer.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_transfer.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_util.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usb_util.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usbdevs (contents, props changed) user/thompsa/vaptq/sys/dev/usb/usbhid.h (props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_rumfw.h (props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_rumreg.h (props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_rumvar.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_uralreg.h (props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_uralvar.h (contents, props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_zyd.c (contents, props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_zydfw.h (props changed) user/thompsa/vaptq/sys/dev/usb/wlan/if_zydreg.h (props changed) user/thompsa/vaptq/sys/dev/usb/wlan/usb_wlan.h (contents, props changed) user/thompsa/vaptq/sys/dev/wi/if_wi.c user/thompsa/vaptq/sys/dev/wpi/if_wpi.c user/thompsa/vaptq/sys/dev/wpi/if_wpireg.h user/thompsa/vaptq/sys/dev/xen/balloon/balloon.c user/thompsa/vaptq/sys/dev/xen/console/console.c user/thompsa/vaptq/sys/dev/xen/netfront/ (props changed) user/thompsa/vaptq/sys/dev/xen/xenpci/ (props changed) user/thompsa/vaptq/sys/fs/devfs/devfs_vnops.c user/thompsa/vaptq/sys/fs/fifofs/fifo_vnops.c user/thompsa/vaptq/sys/fs/pseudofs/pseudofs_vnops.c user/thompsa/vaptq/sys/fs/unionfs/union_subr.c user/thompsa/vaptq/sys/fs/unionfs/union_vnops.c user/thompsa/vaptq/sys/geom/label/g_label.c user/thompsa/vaptq/sys/geom/label/g_label.h user/thompsa/vaptq/sys/geom/label/g_label_ufs.c user/thompsa/vaptq/sys/geom/part/g_part.c user/thompsa/vaptq/sys/geom/part/g_part_apm.c user/thompsa/vaptq/sys/geom/part/g_part_bsd.c user/thompsa/vaptq/sys/geom/part/g_part_ebr.c user/thompsa/vaptq/sys/geom/part/g_part_gpt.c user/thompsa/vaptq/sys/geom/part/g_part_mbr.c user/thompsa/vaptq/sys/geom/part/g_part_pc98.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum.h user/thompsa/vaptq/sys/geom/vinum/geom_vinum_drive.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_init.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_list.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_move.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_plex.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_raid5.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_raid5.h user/thompsa/vaptq/sys/geom/vinum/geom_vinum_rename.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_rm.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_share.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_share.h user/thompsa/vaptq/sys/geom/vinum/geom_vinum_state.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_subr.c user/thompsa/vaptq/sys/geom/vinum/geom_vinum_var.h user/thompsa/vaptq/sys/geom/vinum/geom_vinum_volume.c user/thompsa/vaptq/sys/i386/conf/GENERIC user/thompsa/vaptq/sys/i386/conf/XBOX user/thompsa/vaptq/sys/i386/i386/elf_machdep.c user/thompsa/vaptq/sys/i386/i386/machdep.c user/thompsa/vaptq/sys/i386/i386/vm_machdep.c user/thompsa/vaptq/sys/i386/include/cpufunc.h user/thompsa/vaptq/sys/i386/include/endian.h user/thompsa/vaptq/sys/i386/include/pmap.h user/thompsa/vaptq/sys/i386/include/signal.h user/thompsa/vaptq/sys/i386/include/ucontext.h user/thompsa/vaptq/sys/i386/include/vmparam.h user/thompsa/vaptq/sys/i386/include/xen/xenpmap.h user/thompsa/vaptq/sys/i386/include/xen/xenvar.h user/thompsa/vaptq/sys/i386/isa/npx.c user/thompsa/vaptq/sys/i386/linux/linux_sysvec.c user/thompsa/vaptq/sys/i386/pci/pci_cfgreg.c user/thompsa/vaptq/sys/i386/xen/pmap.c user/thompsa/vaptq/sys/i386/xen/xen_machdep.c user/thompsa/vaptq/sys/ia64/ia64/elf_machdep.c user/thompsa/vaptq/sys/kern/imgact_elf.c user/thompsa/vaptq/sys/kern/kern_acct.c user/thompsa/vaptq/sys/kern/kern_alq.c user/thompsa/vaptq/sys/kern/kern_environment.c user/thompsa/vaptq/sys/kern/kern_jail.c user/thompsa/vaptq/sys/kern/kern_ktrace.c user/thompsa/vaptq/sys/kern/kern_shutdown.c user/thompsa/vaptq/sys/kern/kern_sig.c user/thompsa/vaptq/sys/kern/kern_tc.c user/thompsa/vaptq/sys/kern/kern_time.c user/thompsa/vaptq/sys/kern/kern_vimage.c user/thompsa/vaptq/sys/kern/subr_bus.c user/thompsa/vaptq/sys/kern/subr_param.c user/thompsa/vaptq/sys/kern/subr_rtc.c user/thompsa/vaptq/sys/kern/sysv_sem.c user/thompsa/vaptq/sys/kern/tty.c user/thompsa/vaptq/sys/kern/uipc_domain.c user/thompsa/vaptq/sys/kern/uipc_syscalls.c user/thompsa/vaptq/sys/kern/uipc_usrreq.c user/thompsa/vaptq/sys/kern/vfs_acl.c user/thompsa/vaptq/sys/kern/vfs_bio.c user/thompsa/vaptq/sys/kern/vfs_cache.c user/thompsa/vaptq/sys/kern/vfs_default.c user/thompsa/vaptq/sys/kern/vfs_extattr.c user/thompsa/vaptq/sys/kern/vfs_lookup.c user/thompsa/vaptq/sys/kern/vfs_mount.c user/thompsa/vaptq/sys/kern/vfs_subr.c user/thompsa/vaptq/sys/kern/vfs_syscalls.c user/thompsa/vaptq/sys/kern/vfs_vnops.c user/thompsa/vaptq/sys/kern/vnode_if.src user/thompsa/vaptq/sys/legacy/dev/ata/ata-usb.c (props changed) user/thompsa/vaptq/sys/legacy/dev/sound/usb/uaudio.c (props changed) user/thompsa/vaptq/sys/legacy/dev/sound/usb/uaudio.h (props changed) user/thompsa/vaptq/sys/legacy/dev/sound/usb/uaudio_pcm.c (props changed) user/thompsa/vaptq/sys/legacy/dev/sound/usb/uaudioreg.h (props changed) user/thompsa/vaptq/sys/legacy/dev/usb/ (props changed) user/thompsa/vaptq/sys/legacy/dev/usb/ehci_ixp4xx.c (props changed) user/thompsa/vaptq/sys/mips/include/bus.h user/thompsa/vaptq/sys/mips/mips/elf_machdep.c user/thompsa/vaptq/sys/modules/Makefile user/thompsa/vaptq/sys/modules/ath/Makefile user/thompsa/vaptq/sys/modules/cpufreq/Makefile user/thompsa/vaptq/sys/modules/dtrace/Makefile user/thompsa/vaptq/sys/modules/dtrace/dtraceall/dtraceall.c user/thompsa/vaptq/sys/modules/geom/geom_vinum/Makefile user/thompsa/vaptq/sys/modules/ip_mroute_mod/Makefile user/thompsa/vaptq/sys/modules/ipmi/Makefile user/thompsa/vaptq/sys/modules/ixgbe/Makefile user/thompsa/vaptq/sys/modules/linprocfs/Makefile user/thompsa/vaptq/sys/modules/mii/Makefile user/thompsa/vaptq/sys/modules/nfsclient/Makefile user/thompsa/vaptq/sys/modules/opensolaris/Makefile user/thompsa/vaptq/sys/modules/usb/Makefile user/thompsa/vaptq/sys/modules/usb/usb/Makefile user/thompsa/vaptq/sys/net/bpf.h user/thompsa/vaptq/sys/net/if.c user/thompsa/vaptq/sys/net/if_bridge.c user/thompsa/vaptq/sys/net/if_gif.c user/thompsa/vaptq/sys/net/if_loop.c user/thompsa/vaptq/sys/net/if_spppsubr.c user/thompsa/vaptq/sys/net/route.c user/thompsa/vaptq/sys/net/vnet.h user/thompsa/vaptq/sys/net80211/ieee80211.c user/thompsa/vaptq/sys/net80211/ieee80211.h user/thompsa/vaptq/sys/net80211/ieee80211_adhoc.c user/thompsa/vaptq/sys/net80211/ieee80211_ddb.c user/thompsa/vaptq/sys/net80211/ieee80211_freebsd.c user/thompsa/vaptq/sys/net80211/ieee80211_freebsd.h user/thompsa/vaptq/sys/net80211/ieee80211_hostap.c user/thompsa/vaptq/sys/net80211/ieee80211_input.c user/thompsa/vaptq/sys/net80211/ieee80211_input.h user/thompsa/vaptq/sys/net80211/ieee80211_ioctl.c user/thompsa/vaptq/sys/net80211/ieee80211_ioctl.h user/thompsa/vaptq/sys/net80211/ieee80211_node.c user/thompsa/vaptq/sys/net80211/ieee80211_node.h user/thompsa/vaptq/sys/net80211/ieee80211_output.c user/thompsa/vaptq/sys/net80211/ieee80211_proto.c user/thompsa/vaptq/sys/net80211/ieee80211_proto.h user/thompsa/vaptq/sys/net80211/ieee80211_scan.c user/thompsa/vaptq/sys/net80211/ieee80211_scan.h user/thompsa/vaptq/sys/net80211/ieee80211_sta.c user/thompsa/vaptq/sys/net80211/ieee80211_var.h user/thompsa/vaptq/sys/net80211/ieee80211_wds.c user/thompsa/vaptq/sys/netinet/icmp6.h user/thompsa/vaptq/sys/netinet/icmp_var.h user/thompsa/vaptq/sys/netinet/if_ether.c user/thompsa/vaptq/sys/netinet/igmp.c user/thompsa/vaptq/sys/netinet/igmp.h user/thompsa/vaptq/sys/netinet/igmp_var.h user/thompsa/vaptq/sys/netinet/in_gif.c user/thompsa/vaptq/sys/netinet/in_mcast.c user/thompsa/vaptq/sys/netinet/in_pcb.h user/thompsa/vaptq/sys/netinet/ip_carp.c user/thompsa/vaptq/sys/netinet/ip_carp.h user/thompsa/vaptq/sys/netinet/ip_divert.c user/thompsa/vaptq/sys/netinet/ip_dummynet.c user/thompsa/vaptq/sys/netinet/ip_dummynet.h user/thompsa/vaptq/sys/netinet/ip_fastfwd.c user/thompsa/vaptq/sys/netinet/ip_fw.h user/thompsa/vaptq/sys/netinet/ip_fw2.c user/thompsa/vaptq/sys/netinet/ip_fw_pfil.c user/thompsa/vaptq/sys/netinet/ip_icmp.c user/thompsa/vaptq/sys/netinet/ip_input.c user/thompsa/vaptq/sys/netinet/ip_ipsec.c user/thompsa/vaptq/sys/netinet/ip_mroute.c user/thompsa/vaptq/sys/netinet/ip_mroute.h user/thompsa/vaptq/sys/netinet/ip_options.c user/thompsa/vaptq/sys/netinet/ip_output.c user/thompsa/vaptq/sys/netinet/ip_var.h user/thompsa/vaptq/sys/netinet/libalias/alias.c user/thompsa/vaptq/sys/netinet/libalias/alias_cuseeme.c user/thompsa/vaptq/sys/netinet/libalias/alias_dummy.c user/thompsa/vaptq/sys/netinet/libalias/alias_ftp.c user/thompsa/vaptq/sys/netinet/libalias/alias_irc.c user/thompsa/vaptq/sys/netinet/libalias/alias_mod.c user/thompsa/vaptq/sys/netinet/libalias/alias_mod.h user/thompsa/vaptq/sys/netinet/libalias/alias_nbt.c user/thompsa/vaptq/sys/netinet/libalias/alias_pptp.c user/thompsa/vaptq/sys/netinet/libalias/alias_skinny.c user/thompsa/vaptq/sys/netinet/libalias/alias_smedia.c user/thompsa/vaptq/sys/netinet/pim_var.h user/thompsa/vaptq/sys/netinet/raw_ip.c user/thompsa/vaptq/sys/netinet/sctp_indata.c user/thompsa/vaptq/sys/netinet/sctp_input.c user/thompsa/vaptq/sys/netinet/sctp_output.c user/thompsa/vaptq/sys/netinet/sctp_pcb.c user/thompsa/vaptq/sys/netinet/sctp_structs.h user/thompsa/vaptq/sys/netinet/sctp_sysctl.c user/thompsa/vaptq/sys/netinet/sctp_sysctl.h user/thompsa/vaptq/sys/netinet/sctp_uio.h user/thompsa/vaptq/sys/netinet/sctp_usrreq.c user/thompsa/vaptq/sys/netinet/sctputil.c user/thompsa/vaptq/sys/netinet/tcp_hostcache.c user/thompsa/vaptq/sys/netinet/tcp_input.c user/thompsa/vaptq/sys/netinet/tcp_output.c user/thompsa/vaptq/sys/netinet/tcp_reass.c user/thompsa/vaptq/sys/netinet/tcp_sack.c user/thompsa/vaptq/sys/netinet/tcp_subr.c user/thompsa/vaptq/sys/netinet/tcp_syncache.c user/thompsa/vaptq/sys/netinet/tcp_timer.c user/thompsa/vaptq/sys/netinet/tcp_timewait.c user/thompsa/vaptq/sys/netinet/tcp_usrreq.c user/thompsa/vaptq/sys/netinet/tcp_var.h user/thompsa/vaptq/sys/netinet/udp_usrreq.c user/thompsa/vaptq/sys/netinet/udp_var.h user/thompsa/vaptq/sys/netinet/vinet.h user/thompsa/vaptq/sys/netinet6/frag6.c user/thompsa/vaptq/sys/netinet6/icmp6.c user/thompsa/vaptq/sys/netinet6/in6_src.c user/thompsa/vaptq/sys/netinet6/ip6_input.c user/thompsa/vaptq/sys/netinet6/ip6_mroute.c user/thompsa/vaptq/sys/netinet6/ip6_mroute.h user/thompsa/vaptq/sys/netinet6/mld6.c user/thompsa/vaptq/sys/netinet6/nd6.c user/thompsa/vaptq/sys/netinet6/nd6_nbr.c user/thompsa/vaptq/sys/netinet6/nd6_rtr.c user/thompsa/vaptq/sys/netinet6/raw_ip6.c user/thompsa/vaptq/sys/netinet6/scope6.c user/thompsa/vaptq/sys/netinet6/udp6_usrreq.c user/thompsa/vaptq/sys/netipsec/ipsec.c user/thompsa/vaptq/sys/netipsec/key.c user/thompsa/vaptq/sys/netipsec/xform_ah.c user/thompsa/vaptq/sys/netipsec/xform_esp.c user/thompsa/vaptq/sys/netipsec/xform_ipcomp.c user/thompsa/vaptq/sys/netipsec/xform_ipip.c user/thompsa/vaptq/sys/nfs4client/nfs4_socket.c user/thompsa/vaptq/sys/nfs4client/nfs4_vnops.c user/thompsa/vaptq/sys/nfsclient/nfs.h user/thompsa/vaptq/sys/nfsclient/nfs_bio.c user/thompsa/vaptq/sys/nfsclient/nfs_krpc.c user/thompsa/vaptq/sys/nfsclient/nfs_socket.c user/thompsa/vaptq/sys/nfsclient/nfs_subs.c user/thompsa/vaptq/sys/nfsclient/nfs_vnops.c user/thompsa/vaptq/sys/nfsclient/nfsnode.h user/thompsa/vaptq/sys/nfsserver/nfs.h user/thompsa/vaptq/sys/nfsserver/nfs_srvkrpc.c user/thompsa/vaptq/sys/nfsserver/nfs_srvsubs.c user/thompsa/vaptq/sys/nfsserver/nfs_syscalls.c user/thompsa/vaptq/sys/pc98/conf/GENERIC user/thompsa/vaptq/sys/pc98/pc98/machdep.c user/thompsa/vaptq/sys/powerpc/aim/machdep.c user/thompsa/vaptq/sys/powerpc/aim/mmu_oea.c user/thompsa/vaptq/sys/powerpc/aim/mp_cpudep.c user/thompsa/vaptq/sys/powerpc/aim/ofw_machdep.c user/thompsa/vaptq/sys/powerpc/aim/swtch.S user/thompsa/vaptq/sys/powerpc/aim/trap_subr.S user/thompsa/vaptq/sys/powerpc/aim/uma_machdep.c user/thompsa/vaptq/sys/powerpc/aim/vm_machdep.c user/thompsa/vaptq/sys/powerpc/booke/machdep.c user/thompsa/vaptq/sys/powerpc/booke/pmap.c user/thompsa/vaptq/sys/powerpc/conf/GENERIC user/thompsa/vaptq/sys/powerpc/include/hid.h user/thompsa/vaptq/sys/powerpc/include/intr.h user/thompsa/vaptq/sys/powerpc/include/md_var.h user/thompsa/vaptq/sys/powerpc/include/pmap.h user/thompsa/vaptq/sys/powerpc/include/sf_buf.h user/thompsa/vaptq/sys/powerpc/include/spr.h user/thompsa/vaptq/sys/powerpc/include/vmparam.h user/thompsa/vaptq/sys/powerpc/ofw/ofw_syscons.c user/thompsa/vaptq/sys/powerpc/powermac/ata_macio.c user/thompsa/vaptq/sys/powerpc/powerpc/bus_machdep.c user/thompsa/vaptq/sys/powerpc/powerpc/cpu.c user/thompsa/vaptq/sys/powerpc/powerpc/elf_machdep.c user/thompsa/vaptq/sys/powerpc/powerpc/mem.c user/thompsa/vaptq/sys/powerpc/powerpc/mmu_if.m user/thompsa/vaptq/sys/powerpc/powerpc/pmap_dispatch.c user/thompsa/vaptq/sys/security/mac_biba/mac_biba.c user/thompsa/vaptq/sys/security/mac_bsdextended/mac_bsdextended.c user/thompsa/vaptq/sys/security/mac_mls/mac_mls.c user/thompsa/vaptq/sys/sparc64/central/central.c user/thompsa/vaptq/sys/sparc64/conf/GENERIC user/thompsa/vaptq/sys/sparc64/ebus/ebus.c user/thompsa/vaptq/sys/sparc64/fhc/fhc.c user/thompsa/vaptq/sys/sparc64/include/trap.h user/thompsa/vaptq/sys/sparc64/isa/isa.c user/thompsa/vaptq/sys/sparc64/isa/ofw_isa.c user/thompsa/vaptq/sys/sparc64/pci/apb.c user/thompsa/vaptq/sys/sparc64/pci/ofw_pcib.c user/thompsa/vaptq/sys/sparc64/pci/ofw_pcibus.c user/thompsa/vaptq/sys/sparc64/pci/psycho.c user/thompsa/vaptq/sys/sparc64/pci/psychovar.h user/thompsa/vaptq/sys/sparc64/pci/schizo.c user/thompsa/vaptq/sys/sparc64/sbus/dma_sbus.c user/thompsa/vaptq/sys/sparc64/sbus/sbus.c user/thompsa/vaptq/sys/sparc64/sbus/sbusvar.h user/thompsa/vaptq/sys/sparc64/sparc64/db_disasm.c user/thompsa/vaptq/sys/sparc64/sparc64/eeprom.c user/thompsa/vaptq/sys/sparc64/sparc64/elf_machdep.c user/thompsa/vaptq/sys/sparc64/sparc64/jbusppm.c user/thompsa/vaptq/sys/sparc64/sparc64/mp_machdep.c user/thompsa/vaptq/sys/sparc64/sparc64/nexus.c user/thompsa/vaptq/sys/sparc64/sparc64/rtc.c user/thompsa/vaptq/sys/sparc64/sparc64/sc_machdep.c user/thompsa/vaptq/sys/sparc64/sparc64/schppm.c user/thompsa/vaptq/sys/sparc64/sparc64/trap.c user/thompsa/vaptq/sys/sparc64/sparc64/upa.c user/thompsa/vaptq/sys/sun4v/conf/GENERIC user/thompsa/vaptq/sys/sun4v/include/trap.h user/thompsa/vaptq/sys/sun4v/sun4v/trap.c user/thompsa/vaptq/sys/sys/dtrace_bsd.h user/thompsa/vaptq/sys/sys/elf_common.h user/thompsa/vaptq/sys/sys/imgact_elf.h user/thompsa/vaptq/sys/sys/jail.h user/thompsa/vaptq/sys/sys/kernel.h user/thompsa/vaptq/sys/sys/kerneldump.h user/thompsa/vaptq/sys/sys/mbuf.h user/thompsa/vaptq/sys/sys/param.h user/thompsa/vaptq/sys/sys/vimage.h user/thompsa/vaptq/sys/sys/vnode.h user/thompsa/vaptq/sys/tools/vnode_if.awk user/thompsa/vaptq/sys/ufs/ffs/ffs_snapshot.c user/thompsa/vaptq/sys/ufs/ffs/ffs_softdep.c user/thompsa/vaptq/sys/ufs/ffs/ffs_vnops.c user/thompsa/vaptq/sys/vm/vm_extern.h user/thompsa/vaptq/sys/vm/vm_map.c user/thompsa/vaptq/sys/vm/vm_map.h user/thompsa/vaptq/sys/vm/vm_mmap.c user/thompsa/vaptq/sys/vm/vm_reserv.c user/thompsa/vaptq/sys/vm/vm_unix.c user/thompsa/vaptq/sys/xen/evtchn/evtchn.c user/thompsa/vaptq/tools/regression/bin/sh/builtins/alias.0 user/thompsa/vaptq/tools/regression/bin/sh/builtins/alias.0.stdout user/thompsa/vaptq/tools/regression/bin/sh/builtins/type1.0.stderr (props changed) user/thompsa/vaptq/tools/regression/lib/msun/test-conj.t (props changed) user/thompsa/vaptq/tools/tools/nanobsd/rescue/AMD64 user/thompsa/vaptq/tools/tools/nanobsd/rescue/I386 user/thompsa/vaptq/usr.bin/ar/ar.c user/thompsa/vaptq/usr.bin/csup/ (props changed) user/thompsa/vaptq/usr.bin/cut/cut.1 user/thompsa/vaptq/usr.bin/kdump/kdump.c user/thompsa/vaptq/usr.bin/locate/locate/fastfind.c user/thompsa/vaptq/usr.bin/locate/locate/util.c user/thompsa/vaptq/usr.bin/login/login.c user/thompsa/vaptq/usr.bin/make/globals.h user/thompsa/vaptq/usr.bin/make/main.c user/thompsa/vaptq/usr.bin/make/make.1 user/thompsa/vaptq/usr.bin/make/make.c user/thompsa/vaptq/usr.bin/netstat/main.c user/thompsa/vaptq/usr.bin/netstat/mroute.c user/thompsa/vaptq/usr.bin/netstat/netstat.h user/thompsa/vaptq/usr.bin/procstat/ (props changed) user/thompsa/vaptq/usr.bin/su/su.c user/thompsa/vaptq/usr.sbin/Makefile user/thompsa/vaptq/usr.sbin/chown/chgrp.1 user/thompsa/vaptq/usr.sbin/eeprom/ofw_options.c user/thompsa/vaptq/usr.sbin/fifolog/fifolog_create/fifolog.1 user/thompsa/vaptq/usr.sbin/jexec/jexec.c user/thompsa/vaptq/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) user/thompsa/vaptq/usr.sbin/makefs/ffs/ffs_subr.c (props changed) user/thompsa/vaptq/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) user/thompsa/vaptq/usr.sbin/makefs/getid.c (props changed) user/thompsa/vaptq/usr.sbin/mergemaster/mergemaster.8 user/thompsa/vaptq/usr.sbin/mergemaster/mergemaster.sh user/thompsa/vaptq/usr.sbin/portsnap/phttpget/phttpget.c user/thompsa/vaptq/usr.sbin/sysinstall/devices.c user/thompsa/vaptq/usr.sbin/tcpdump/tcpdump/Makefile user/thompsa/vaptq/usr.sbin/zic/ (props changed) Modified: user/thompsa/vaptq/MAINTAINERS ============================================================================== --- user/thompsa/vaptq/MAINTAINERS Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/MAINTAINERS Sun Apr 12 22:16:14 2009 (r190979) @@ -76,7 +76,7 @@ groff ru Recommends pre-commit review. share/mk ru This is a vital component of the build system, so I offer a pre-commit review for anything non-trivial. ipfw ipfw Pre-commit review preferred. send to ipfw@freebsd.org -drm anholt Just keep me informed of changes, try not to break it. +drm rnoland Just keep me informed of changes, try not to break it. libufs jmallett Willing to handle problems, help with work. fdc(4) joerg Just keep me informed of changes, try not to break it. sppp(4) joerg Just keep me informed of changes, try not to break it. Modified: user/thompsa/vaptq/Makefile ============================================================================== --- user/thompsa/vaptq/Makefile Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/Makefile Sun Apr 12 22:16:14 2009 (r190979) @@ -279,7 +279,7 @@ tinderbox: # existing system is. # .if make(universe) || make(tinderbox) -TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v +TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v .if defined(DOING_TINDERBOX) FAILFILE=tinderbox.failed Modified: user/thompsa/vaptq/ObsoleteFiles.inc ============================================================================== --- user/thompsa/vaptq/ObsoleteFiles.inc Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/ObsoleteFiles.inc Sun Apr 12 22:16:14 2009 (r190979) @@ -14,6 +14,38 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090410: VOP_LEASE.9 removed +OLD_FILES+=usr/share/man/man9/VOP_LEASE.9.gz +# 20090405: removal of if_ppp(4) and if_sl(4) +OLD_FILES+=sbin/slattach rescue/slattach +OLD_FILES+=sbin/startslip rescue/startslip +OLD_FILES+=usr/include/net/if_ppp.h +OLD_FILES+=usr/include/net/if_pppvar.h +OLD_FILES+=usr/include/net/if_slvar.h +OLD_FILES+=usr/include/net/ppp_comp.h +OLD_FILES+=usr/include/net/slip.h +OLD_FILES+=usr/sbin/sliplogin +OLD_FILES+=usr/sbin/slstat +OLD_FILES+=usr/sbin/pppd +OLD_FILES+=usr/sbin/pppstats +OLD_FILES+=usr/share/man/man1/startslip.1.gz +OLD_FILES+=usr/share/man/man4/if_ppp.4.gz +OLD_FILES+=usr/share/man/man4/if_sl.4.gz +OLD_FILES+=usr/share/man/man4/ppp.4.gz +OLD_FILES+=usr/share/man/man4/sl.4.gz +OLD_FILES+=usr/share/man/man8/pppd.8.gz +OLD_FILES+=usr/share/man/man8/pppstats.8.gz +OLD_FILES+=usr/share/man/man8/slattach.8.gz +OLD_FILES+=usr/share/man/man8/slip.8.gz +OLD_FILES+=usr/share/man/man8/sliplogin.8.gz +OLD_FILES+=usr/share/man/man8/slstat.8.gz +# 20090321: libpcap upgraded to 1.0.0 +OLD_LIBS+=lib/libpcap.so.5 +.if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libpcap.so.5 +.endif +# 20090319: uscanner(4) has been removed +OLD_FILES+=usr/share/man/man4/uscanner.4.gz # 20090313: k8temp(4) renamed to amdtemp(4) OLD_FILES+=usr/share/man/man4/k8temp.4.gz # 20090308: libusb.so.1 renamed @@ -22,8 +54,17 @@ OLD_FILES+=usr/lib/libusb20.a OLD_FILES+=usr/lib/libusb20.so OLD_FILES+=usr/lib/libusb20_p.a OLD_FILES+=usr/include/libusb20_compat01.h +.if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libusb20.so.1 +OLD_FILES+=usr/lib32/libusb20.a +OLD_FILES+=usr/lib32/libusb20.so +OLD_FILES+=usr/lib32/libusb20_p.a +.endif # 20090226: libmp(3) functions renamed OLD_LIBS+=usr/lib/libmp.so.6 +.if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libmp.so.6 +.endif # 20090223: changeover of USB stacks OLD_FILES+=usr/include/dev/usb2/include/ufm2_ioctl.h OLD_FILES+=usr/include/dev/usb2/include/urio2_ioctl.h @@ -1438,6 +1479,8 @@ OLD_FILES+=lib/geom/geom_concat.so.1 OLD_FILES+=lib/geom/geom_label.so.1 OLD_FILES+=lib/geom/geom_nop.so.1 OLD_FILES+=lib/geom/geom_stripe.so.1 +# 20040713: fla(4) removed. +OLD_FILES+=usr/share/man/man4/fla.4.gz # 200407XX OLD_FILES+=usr/sbin/kernbb OLD_FILES+=usr/sbin/ntp-genkeys Modified: user/thompsa/vaptq/UPDATING ============================================================================== --- user/thompsa/vaptq/UPDATING Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/UPDATING Sun Apr 12 22:16:14 2009 (r190979) @@ -22,6 +22,54 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090408: + Do not use Giant for kbdmux(4) locking. This is wrong and + apparently causing more problems than it solves. This will + re-open the issue where interrupt handlers may race with + kbdmux(4) in polling mode. Typical symptoms include (but + not limited to) duplicated and/or missing characters when + low level console functions (such as gets) are used while + interrupts are enabled (for example geli password prompt, + mountroot prompt etc.). Disabling kbdmux(4) may help. + +20090407: + The size of structs vnet_net, vnet_inet and vnet_ipfw has changed; + kernel modules referencing any of the above need to be recompiled. + Bump __FreeBSD_version to 800075. + +20090320: + GEOM_PART has become the default partition slicer for storage devices, + replacing GEOM_MBR, GEOM_BSD, GEOM_PC98 and GEOM_GPT slicers. It + introduces some changes: + + MSDOS/EBR: the devices created from MSDOS extended partition entries + (EBR) can be named differently than with GEOM_MBR and are now symlinks + to devices with offset-based names. fstabs may need to be modified. + + BSD: the "geometry does not match label" warning is harmless in most + cases but it points to problems in file system misalignment with + disk geometry. The "c" partition is now implicit, covers the whole + top-level drive and cannot be (mis)used by users. + + General: Kernel dumps are now not allowed to be written to devices + whose partition types indicate they are meant to be used for file + systems (or, in case of MSDOS partitions, as something else than + the "386BSD" type). + + Most of these changes date approximately from 200812. + +20090319: + The uscanner(4) driver has been removed from the kernel. This follows + Linux removing theirs in 2.6 and making libusb the default interface + (supported by sane). + +20090319: + The multicast forwarding code has been cleaned up. netstat(1) + only relies on KVM now for printing bandwidth upcall meters. + The IPv4 and IPv6 modules are split into ip_mroute_mod and + ip6_mroute_mod respectively. The config(5) options for statically + compiling this code remain the same, i.e. 'options MROUTING'. + 20090315: Support for the IFF_NEEDSGIANT network interface flag has been removed, which means that non-MPSAFE network device drivers are no Modified: user/thompsa/vaptq/bin/sh/alias.c ============================================================================== --- user/thompsa/vaptq/bin/sh/alias.c Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/bin/sh/alias.c Sun Apr 12 22:16:14 2009 (r190979) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #define ATABSIZE 39 STATIC struct alias *atab[ATABSIZE]; +STATIC int aliases; STATIC void setalias(char *, char *); STATIC int unalias(const char *); @@ -106,6 +107,7 @@ setalias(char *name, char *val) ap->flag = 0; ap->next = *app; *app = ap; + aliases++; INTON; } @@ -135,6 +137,7 @@ unalias(const char *name) ckfree(ap); INTON; } + aliases--; return (0); } } @@ -168,6 +171,7 @@ rmaliases(void) ckfree(tmp); } } + aliases = 0; INTON; } @@ -187,9 +191,47 @@ lookupalias(char *name, int check) return (NULL); } -/* - * TODO - sort output - */ +static int +comparealiases(const void *p1, const void *p2) +{ + const struct alias *const *a1 = p1; + const struct alias *const *a2 = p2; + + return strcmp((*a1)->name, (*a2)->name); +} + +static void +printalias(const struct alias *a) +{ + char *p; + + out1fmt("%s=", a->name); + /* Don't print the space added above. */ + p = a->val + strlen(a->val) - 1; + *p = '\0'; + out1qstr(a->val); + *p = ' '; + out1c('\n'); +} + +static void +printaliases(void) +{ + int i, j; + struct alias **sorted, *ap; + + sorted = ckmalloc(aliases * sizeof(*sorted)); + j = 0; + for (i = 0; i < ATABSIZE; i++) + for (ap = atab[i]; ap; ap = ap->next) + if (*ap->name != '\0') + sorted[j++] = ap; + qsort(sorted, aliases, sizeof(*sorted), comparealiases); + for (i = 0; i < aliases; i++) + printalias(sorted[i]); + ckfree(sorted); +} + int aliascmd(int argc, char **argv) { @@ -198,16 +240,7 @@ aliascmd(int argc, char **argv) struct alias *ap; if (argc == 1) { - int i; - - for (i = 0; i < ATABSIZE; i++) - for (ap = atab[i]; ap; ap = ap->next) { - if (*ap->name != '\0') { - out1fmt("alias %s=", ap->name); - out1qstr(ap->val); - out1c('\n'); - } - } + printaliases(); return (0); } while ((n = *++argv) != NULL) { @@ -215,11 +248,8 @@ aliascmd(int argc, char **argv) if ((ap = lookupalias(n, 0)) == NULL) { outfmt(out2, "alias: %s not found\n", n); ret = 1; - } else { - out1fmt("alias %s=", n); - out1qstr(ap->val); - out1c('\n'); - } + } else + printalias(ap); else { *v++ = '\0'; setalias(n, v); Modified: user/thompsa/vaptq/bin/sh/eval.c ============================================================================== --- user/thompsa/vaptq/bin/sh/eval.c Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/bin/sh/eval.c Sun Apr 12 22:16:14 2009 (r190979) @@ -166,7 +166,8 @@ evalstring(char *s) setstackmark(&smark); setinputstring(s, 1); while ((n = parsecmd(0)) != NEOF) { - evaltree(n, 0); + if (n != NULL) + evaltree(n, 0); popstackmark(&smark); } popfile(); Modified: user/thompsa/vaptq/bin/sh/miscbltin.c ============================================================================== --- user/thompsa/vaptq/bin/sh/miscbltin.c Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/bin/sh/miscbltin.c Sun Apr 12 22:16:14 2009 (r190979) @@ -73,6 +73,16 @@ int ulimitcmd(int, char **); * ordinary characters. * * This uses unbuffered input, which may be avoidable in some cases. + * + * Note that if IFS=' :' then read x y should work so that: + * 'a b' x='a', y='b' + * ' a b ' x='a', y='b' + * ':b' x='', y='b' + * ':' x='', y='' + * '::' x='', y='' + * ': :' x='', y='' + * ':::' x='', y='::' + * ':b c:' x='', y='b c:' */ int @@ -88,6 +98,8 @@ readcmd(int argc __unused, char **argv _ int startword; int status; int i; + int is_ifs; + int saveall = 0; struct timeval tv; char *tvptr; fd_set ifds; @@ -135,7 +147,7 @@ readcmd(int argc __unused, char **argv _ if (*(ap = argptr) == NULL) error("arg count"); if ((ifs = bltinlookup("IFS", 1)) == NULL) - ifs = nullstr; + ifs = " \t\n"; if (tv.tv_sec >= 0) { /* @@ -167,7 +179,7 @@ readcmd(int argc __unused, char **argv _ } status = 0; - startword = 1; + startword = 2; backslash = 0; STARTSTACKSTR(p); for (;;) { @@ -189,22 +201,68 @@ readcmd(int argc __unused, char **argv _ } if (c == '\n') break; - if (startword && *ifs == ' ' && strchr(ifs, c)) { + if (strchr(ifs, c)) + is_ifs = strchr(" \t\n", c) ? 1 : 2; + else + is_ifs = 0; + + if (startword != 0) { + if (is_ifs == 1) { + /* Ignore leading IFS whitespace */ + if (saveall) + STPUTC(c, p); + continue; + } + if (is_ifs == 2 && startword == 1) { + /* Only one non-whitespace IFS per word */ + startword = 2; + if (saveall) + STPUTC(c, p); + continue; + } + } + + if (is_ifs == 0) { + /* append this character to the current variable */ + startword = 0; + if (saveall) + /* Not just a spare terminator */ + saveall++; + STPUTC(c, p); continue; } - startword = 0; - if (ap[1] != NULL && strchr(ifs, c) != NULL) { - STACKSTRNUL(p); - setvar(*ap, stackblock(), 0); - ap++; - startword = 1; - STARTSTACKSTR(p); - } else { + + /* end of variable... */ + startword = is_ifs; + + if (ap[1] == NULL) { + /* Last variable needs all IFS chars */ + saveall++; STPUTC(c, p); + continue; } + + STACKSTRNUL(p); + setvar(*ap, stackblock(), 0); + ap++; + STARTSTACKSTR(p); } STACKSTRNUL(p); + + /* Remove trailing IFS chars */ + for (; stackblock() <= --p; *p = 0) { + if (!strchr(ifs, *p)) + break; + if (strchr(" \t\n", *p)) + /* Always remove whitespace */ + continue; + if (saveall > 1) + /* Don't remove non-whitespace unless it was naked */ + break; + } setvar(*ap, stackblock(), 0); + + /* Set any remaining args to "" */ while (*++ap != NULL) setvar(*ap, nullstr, 0); return status; Modified: user/thompsa/vaptq/contrib/bind9/CHANGES ============================================================================== --- user/thompsa/vaptq/contrib/bind9/CHANGES Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/bind9/CHANGES Sun Apr 12 22:16:14 2009 (r190979) @@ -1,3 +1,8 @@ + --- 9.4.3-P2 released --- + +2579. [bug] DNSSEC lookaside validation failed to handle unknown + algorithms. [RT #19479] + --- 9.4.3-P1 released --- 2522. [security] Handle -1 from DSA_do_verify(). Modified: user/thompsa/vaptq/contrib/bind9/lib/dns/validator.c ============================================================================== --- user/thompsa/vaptq/contrib/bind9/lib/dns/validator.c Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/bind9/lib/dns/validator.c Sun Apr 12 22:16:14 2009 (r190979) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: validator.c,v 1.119.18.41 2008/08/21 04:59:42 marka Exp $ */ +/* $Id: validator.c,v 1.119.18.41.2.1 2009/03/17 02:23:49 marka Exp $ */ /*! \file */ @@ -211,6 +211,37 @@ exit_check(dns_validator_t *val) { return (ISC_TRUE); } +/* + * Check that we have atleast one supported algorithm in the DLV RRset. + */ +static inline isc_boolean_t +dlv_algorithm_supported(dns_validator_t *val) { + dns_rdata_t rdata = DNS_RDATA_INIT; + dns_rdata_dlv_t dlv; + isc_result_t result; + + for (result = dns_rdataset_first(&val->dlv); + result == ISC_R_SUCCESS; + result = dns_rdataset_next(&val->dlv)) { + dns_rdata_reset(&rdata); + dns_rdataset_current(&val->dlv, &rdata); + result = dns_rdata_tostruct(&rdata, &dlv, NULL); + RUNTIME_CHECK(result == ISC_R_SUCCESS); + + if (!dns_resolver_algorithm_supported(val->view->resolver, + val->event->name, + dlv.algorithm)) + continue; + + if (dlv.digest_type != DNS_DSDIGEST_SHA256 && + dlv.digest_type != DNS_DSDIGEST_SHA1) + continue; + + return (ISC_TRUE); + } + return (ISC_FALSE); +} + /*% * Look in the NSEC record returned from a DS query to see if there is * a NS RRset at this name. If it is found we are at a delegation point. @@ -2297,19 +2328,36 @@ dlvfetched(isc_task_t *task, isc_event_t sizeof(namebuf)); dns_rdataset_clone(&val->frdataset, &val->dlv); val->havedlvsep = ISC_TRUE; - validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf); - dlv_validator_start(val); + if (dlv_algorithm_supported(val)) { + validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", + namebuf); + dlv_validator_start(val); + } else { + validator_log(val, ISC_LOG_DEBUG(3), + "DLV %s found with no supported algorithms", + namebuf); + markanswer(val); + validator_done(val, ISC_R_SUCCESS); + } } else if (eresult == DNS_R_NXRRSET || eresult == DNS_R_NXDOMAIN || eresult == DNS_R_NCACHENXRRSET || eresult == DNS_R_NCACHENXDOMAIN) { - result = finddlvsep(val, ISC_TRUE); + result = finddlvsep(val, ISC_TRUE); if (result == ISC_R_SUCCESS) { - dns_name_format(dns_fixedname_name(&val->dlvsep), - namebuf, sizeof(namebuf)); - validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", - namebuf); - dlv_validator_start(val); + if (dlv_algorithm_supported(val)) { + dns_name_format(dns_fixedname_name(&val->dlvsep), + namebuf, sizeof(namebuf)); + validator_log(val, ISC_LOG_DEBUG(3), + "DLV %s found", namebuf); + dlv_validator_start(val); + } else { + validator_log(val, ISC_LOG_DEBUG(3), + "DLV %s found with no supported " + "algorithms", namebuf); + markanswer(val); + validator_done(val, ISC_R_SUCCESS); + } } else if (result == ISC_R_NOTFOUND) { validator_log(val, ISC_LOG_DEBUG(3), "DLV not found"); markanswer(val); @@ -2372,9 +2420,16 @@ startfinddlvsep(dns_validator_t *val, dn } dns_name_format(dns_fixedname_name(&val->dlvsep), namebuf, sizeof(namebuf)); - validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf); - dlv_validator_start(val); - return (DNS_R_WAIT); + if (dlv_algorithm_supported(val)) { + validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf); + dlv_validator_start(val); + return (DNS_R_WAIT); + } + validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found with no supported " + "algorithms", namebuf); + markanswer(val); + validator_done(val, ISC_R_SUCCESS); + return (ISC_R_SUCCESS); } /*% Modified: user/thompsa/vaptq/contrib/bind9/version ============================================================================== --- user/thompsa/vaptq/contrib/bind9/version Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/bind9/version Sun Apr 12 22:16:14 2009 (r190979) @@ -1,4 +1,4 @@ -# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $ +# $Id: version,v 1.29.134.23.2.2 2009/03/17 02:23:49 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=4 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=1 +RELEASEVER=2 Modified: user/thompsa/vaptq/contrib/csup/updater.c ============================================================================== --- user/thompsa/vaptq/contrib/csup/updater.c Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/csup/updater.c Sun Apr 12 22:16:14 2009 (r190979) @@ -1385,8 +1385,11 @@ updater_addfile(struct updater *up, stru do { nread = stream_read(up->rd, buf, (BUFSIZE > remains ? remains : BUFSIZE)); + if (nread == -1) + return (UPDATER_ERR_PROTO); remains -= nread; - stream_write(to, buf, nread); + if (stream_write(to, buf, nread) == -1) + goto bad; } while (remains > 0); stream_close(to); line = stream_getln(up->rd, NULL); @@ -1411,9 +1414,11 @@ updater_addfile(struct updater *up, stru FA_MODTIME | FA_MASK); error = updater_updatefile(up, fup, md5, isfixup); fup->wantmd5 = NULL; /* So that it doesn't get freed. */ - if (error) - return (error); - return (0); + return (error); +bad: + xasprintf(&up->errmsg, "%s: Cannot write: %s", fup->temppath, + strerror(errno)); + return (UPDATER_ERR_MSG); } static int @@ -1469,7 +1474,9 @@ updater_checkout(struct updater *up, str if (nbytes == -1) goto bad; } - stream_write(to, line, size); + nbytes = stream_write(to, line, size); + if (nbytes == -1) + goto bad; line = stream_getln(up->rd, &size); first = 0; } @@ -1661,6 +1668,7 @@ updater_rcsedit(struct updater *up, stru else lprintf(1, " Touch %s", fup->coname); /* Install new attributes. */ + fattr_umask(sr->sr_serverattr, coll->co_umask); fattr_install(sr->sr_serverattr, fup->destpath, NULL); if (fup->attic) lprintf(1, " -> Attic"); @@ -1681,8 +1689,11 @@ updater_rcsedit(struct updater *up, stru error = rcsfile_write(rf, dest); stream_close(dest); rcsfile_free(rf); - if (error) - lprintf(-1, "Error writing %s\n", name); + if (error) { + xasprintf(&up->errmsg, "%s: Cannot write: %s", fup->temppath, + strerror(errno)); + return (UPDATER_ERR_MSG); + } finish: sr->sr_clientattr = fattr_frompath(path, FATTR_NOFOLLOW); @@ -1767,7 +1778,9 @@ updater_addelta(struct rcsfile *rf, stru size--; logline++; } - rcsdelta_appendlog(d, logline, size); + if (rcsdelta_appendlog(d, logline, size) + < 0) + return (-1); logline = stream_getln(rd, &size); } break; @@ -1798,7 +1811,9 @@ updater_addelta(struct rcsfile *rf, stru size--; textline++; } - rcsdelta_appendtext(d, textline, size); + if (rcsdelta_appendtext(d, textline, + size) < 0) + return (-1); textline = stream_getln(rd, &size); } break; @@ -1838,8 +1853,15 @@ updater_append_file(struct updater *up, stream_filter_start(to, STREAM_FILTER_MD5, md5); /* First write the existing content. */ - while ((nread = read(fd, buf, BUFSIZE)) > 0) - stream_write(to, buf, nread); + while ((nread = read(fd, buf, BUFSIZE)) > 0) { + if (stream_write(to, buf, nread) == -1) + goto bad; + } + if (nread == -1) { + xasprintf(&up->errmsg, "%s: Error reading: %s", + strerror(errno)); + return (UPDATER_ERR_MSG); + } close(fd); bytes = fattr_filesize(fa) - pos; @@ -1847,8 +1869,11 @@ updater_append_file(struct updater *up, do { nread = stream_read(up->rd, buf, (BUFSIZE > bytes) ? bytes : BUFSIZE); + if (nread == -1) + return (UPDATER_ERR_PROTO); bytes -= nread; - stream_write(to, buf, nread); + if (stream_write(to, buf, nread) == -1) + goto bad; } while (bytes > 0); stream_close(to); @@ -1874,9 +1899,11 @@ updater_append_file(struct updater *up, FA_MODTIME | FA_MASK); error = updater_updatefile(up, fup, md5, 0); fup->wantmd5 = NULL; /* So that it doesn't get freed. */ - if (error) - return (error); - return (0); + return (error); +bad: + xasprintf(&up->errmsg, "%s: Cannot write: %s", fup->temppath, + strerror(errno)); + return (UPDATER_ERR_MSG); } /* Modified: user/thompsa/vaptq/contrib/gcc/c-decl.c ============================================================================== --- user/thompsa/vaptq/contrib/gcc/c-decl.c Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/gcc/c-decl.c Sun Apr 12 22:16:14 2009 (r190979) @@ -798,7 +798,9 @@ pop_scope (void) && DECL_ABSTRACT_ORIGIN (p) != p) TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (p)) = 1; if (!DECL_EXTERNAL (p) - && DECL_INITIAL (p) == 0) + && DECL_INITIAL (p) == 0 + && scope != file_scope + && scope != external_scope) { error ("nested function %q+D declared but never defined", p); undef_nested_function = true; Modified: user/thompsa/vaptq/contrib/gdb/FREEBSD-Xlist ============================================================================== --- user/thompsa/vaptq/contrib/gdb/FREEBSD-Xlist Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/gdb/FREEBSD-Xlist Sun Apr 12 22:16:14 2009 (r190979) @@ -1,60 +1,69 @@ $FreeBSD$ -gdb-6.1.1/bfd/* -gdb-6.1.1/config/* -gdb-6.1.1/etc/* -gdb-6.1.1/gdb/avr* -gdb-6.1.1/gdb/config/avr/* -gdb-6.1.1/gdb/config/cris/* -gdb-6.1.1/gdb/config/d10v/* -gdb-6.1.1/gdb/config/djgpp/* -gdb-6.1.1/gdb/config/frv/* -gdb-6.1.1/gdb/config/h8300/* -gdb-6.1.1/gdb/config/m32r/* -gdb-6.1.1/gdb/config/m68hc11/* -gdb-6.1.1/gdb/config/m68k/* -gdb-6.1.1/gdb/config/mcore/* -gdb-6.1.1/gdb/config/mn10300/* -gdb-6.1.1/gdb/config/ns32k/* -gdb-6.1.1/gdb/config/pa/* -gdb-6.1.1/gdb/config/sh/* -gdb-6.1.1/gdb/config/v850/* -gdb-6.1.1/gdb/config/vax/* -gdb-6.1.1/gdb/config/xstormy16/* -gdb-6.1.1/gdb/cris* -gdb-6.1.1/gdb/d10v* -gdb-6.1.1/gdb/frv* -gdb-6.1.1/gdb/h8300* -gdb-6.1.1/gdb/*m32r* -gdb-6.1.1/gdb/m68* -gdb-6.1.1/gdb/mcore* -gdb-6.1.1/gdb/mn10300* -gdb-6.1.1/gdb/nlm/* -gdb-6.1.1/gdb/ns32k* -gdb-6.1.1/gdb/osf-share/* -gdb-6.1.1/gdb/hppa* -gdb-6.1.1/gdb/rdi-share/* -gdb-6.1.1/gdb/sh* -gdb-6.1.1/gdb/testsuite/* -gdb-6.1.1/gdb/v850* -gdb-6.1.1/gdb/vax* -gdb-6.1.1/gdb/vx-share/* -gdb-6.1.1/gdb/xstormy16* -gdb-6.1.1/include/aout/* -gdb-6.1.1/include/coff/* -gdb-6.1.1/include/elf/* -gdb-6.1.1/include/mpw/* -gdb-6.1.1/include/nlm/* -gdb-6.1.1/include/opcode/* -gdb-6.1.1/intl/* -gdb-6.1.1/libiberty/* -gdb-6.1.1/mmalloc/* -gdb-6.1.1/opcodes/* -gdb-6.1.1/readline/* -gdb-6.1.1/sim/* -gdb-6.1.1/texinfo/* -gdb-6.1.1/utils/* +gdb-*/bfd/* +gdb-*/config/* +gdb-*/etc/* +gdb-*/gdb/avr* +gdb-*/gdb/config/avr/* +gdb-*/gdb/config/cris/* +gdb-*/gdb/config/d10v/* +gdb-*/gdb/config/djgpp/* +gdb-*/gdb/config/frv/* +gdb-*/gdb/config/h8300/* +gdb-*/gdb/config/m32r/* +gdb-*/gdb/config/m68hc11/* +gdb-*/gdb/config/m68k/* +gdb-*/gdb/config/mcore/* +gdb-*/gdb/config/mn10300/* +gdb-*/gdb/config/ns32k/* +gdb-*/gdb/config/pa/* +gdb-*/gdb/config/sh/* +gdb-*/gdb/config/v850/* +gdb-*/gdb/config/vax/* +gdb-*/gdb/config/xstormy16/* +gdb-*/gdb/cris* +gdb-*/gdb/d10v* +gdb-*/gdb/frv* +gdb-*/gdb/h8300* +gdb-*/gdb/iq2000* +gdb-*/gdb/i386nbsd* +gdb-*/gdb/m32c* +gdb-*/gdb/*m32r* +gdb-*/gdb/m68* +gdb-*/gdb/m88* +gdb-*/gdb/mcore* +gdb-*/gdb/mn10300* +gdb-*/gdb/mt-* +gdb-*/gdb/nlm/* +gdb-*/gdb/ns32k* +gdb-*/gdb/osf-share/* +gdb-*/gdb/ppcobsd* +gdb-*/gdb/hppa* +gdb-*/gdb/rdi-share/* +gdb-*/gdb/sh* +gdb-*/gdb/testsuite/* +gdb-*/gdb/v850* +gdb-*/gdb/vax* +gdb-*/gdb/vx-share/* +gdb-*/gdb/xstormy16* +gdb-*/gdb/xtensa* +gdb-*/include/aout/* +gdb-*/include/coff/* +gdb-*/include/elf/* +gdb-*/include/mpw/* +gdb-*/include/nlm/* +gdb-*/include/opcode/* +gdb-*/intl/* +gdb-*/libiberty/* +gdb-*/mmalloc/* +gdb-*/opcodes/* +gdb-*/readline/* +gdb-*/regformats/reg-cris* +gdb-*/sim/* +gdb-*/texinfo/* +gdb-*/utils/* *ChangeLog* *Makefile* +*TODO* *aix* *config.* *configure* @@ -63,4 +72,6 @@ gdb-6.1.1/utils/* *interix* *irix* *linux* +*mingw* *osf1* +*win32* Modified: user/thompsa/vaptq/contrib/libpcap/CHANGES ============================================================================== --- user/thompsa/vaptq/contrib/libpcap/CHANGES Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/libpcap/CHANGES Sun Apr 12 22:16:14 2009 (r190979) @@ -1,28 +1,41 @@ -@(#) $Header: /tcpdump/master/libpcap/CHANGES,v 1.59.2.13 2007/09/12 22:40:04 ken Exp $ (LBL) +@(#) $Header: /tcpdump/master/libpcap/CHANGES,v 1.67.2.4 2008-10-28 00:27:42 ken Exp $ (LBL) -Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 libpcap release - Change build process to put public libpcap headers into pcap subir - DLT: Add value for IPMI IPMB packets - DLT: Add value for u10 Networks boards - Require for pf definitions - allows reading of pflog formatted - libpcap files on an OS other than where the file was generated - -Wed. July 23, 2007. mcr@xelerance.com. Summary for 0.9.7 libpcap release - - FIXED version file to be 0.9.7 instead of 0.9.5. - added flags/configuration for cloning bpf device. - added DLT_MTP2_WITH_PHDR support (PPI) - "fix" the "memory leak" in icode_to_fcode() -- documentation bug - Various link-layer types, with a pseudo-header, for SITA http://www.sita.aero/ - introduces support for the DAG ERF type TYPE_COLOR_MC_HDLC_POS. - Basic BPF filtering support for DLT_MTP2_WITH_PHDR is also added. - check for IPv4 and IPv6, even for DLT_RAW - add support for DLT_JUNIPER_ISM - Pick up changes from NetBSD: many from tron, christos, drochner - Allocate DLT_ for 802.15.4 without any header munging, for Mikko Saarnivala. - Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header +Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap release + Compile with IPv6 support by default + Compile with large file support on by default + Add pcap-config script, which deals with -I/-L flags for compiling + DLT: Add IPMB + DLT: Add LAPD + DLT: Add AX25 (AX.25 w/KISS header) + DLT: Add JUNIPER_ST + 802.15.4 support + Variable length 802.11 header support + X2E data type support + SITA ACN Interface support - see README.sita + Support for zerocopy BPF on platforms that support it + Better support for dealing with VLAN tagging/stripping on Linux + Fix dynamic library support on OSX + Return PCAP_ERROR_IFACE_NOT_UP if the interface isn't 'UP', so applications + can print better diagnostic information + Return PCAP_ERROR_PERM_DENIED if we don't have permission to open a device, so + applications can tell the user they need to go play with permissions + On Linux, ignore ENETDOWN so we can continue to capture packets if the + interface goes down and comes back up again. + On Linux, support new tpacket frame headers (2.6.27+) + On Mac OS X, add scripts for changing permissions on /dev/pbf* and launchd plist + On Solaris, support 'passive mode' on systems that support it + Fixes to autoconf and general build environment + Man page reorganization + cleanup + Autogenerate VERSION numbers better + +Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 libpcap release + Change build process to put public libpcap headers into pcap subir + DLT: Add value for IPMI IPMB packets + DLT: Add value for u10 Networks boards + Require for pf definitions - allows reading of pflog formatted + libpcap files on an OS other than where the file was generated -Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release +Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release Put the public libpcap headers into a pcap subdirectory in both the source directory and the target include directory, and have include Modified: user/thompsa/vaptq/contrib/libpcap/CREDITS ============================================================================== --- user/thompsa/vaptq/contrib/libpcap/CREDITS Sun Apr 12 21:28:35 2009 (r190978) +++ user/thompsa/vaptq/contrib/libpcap/CREDITS Sun Apr 12 22:16:14 2009 (r190979) @@ -1,108 +1,126 @@ This file lists people who have contributed to libpcap: The current maintainers: - Bill Fenner - Fulvio Risso - Guy Harris - Hannes Gredler - Jun-ichiro itojun Hagino - Michael Richardson + Bill Fenner + Fulvio Risso + Guy Harris + Hannes Gredler + Michael Richardson Additional people who have contributed patches: - Alan Bawden - Alexey Kuznetsov - Albert Chin - Andrew Brown - Antti Kantee - Arkadiusz Miskiewicz - Armando L. Caro Jr. - Assar Westerlund - Brian Ginsbach - Charles M. Hannum - Chris G. Demetriou - Chris Lightfoot - Chris Pepper - Daniele Orlandi - Darren Reed - David Kaelbling - David Young - Dean Gaudet - Don Ebright - Dug Song - Eric Anderson - Erik de Castro Lopo - Florent Drouin - Franz Schaefer - Gianluca Varenni - Gilbert Hoyek - Gisle Vanem - Graeme Hewson - Greg Stark - Greg Troxel - Guillaume Pelat - Hyung Sik Yoon - Igor Khristophorov - Jan-Philip Velders - Jason R. Thorpe - Javier Achirica - Jean Tourrilhes - Jefferson Ogata - Jesper Peterson - John Bankier - Jon Lindgren - Juergen Schoenwaelder - Jung-uk Kim - Kazushi Sugyo - Klaus Klein - Koryn Grant - Krzysztof Halasa - Lorenzo Cavallaro - Loris Degioanni - Love Hörnquist-Åstrand - Maciej W. Rozycki - Marcus Felipe Pereira - Mark C. Brown - Mark Pizzolato - Martin Husemann - Matthew Luckie - Max Laier - Mike Kershaw - Mike Wiacek - Monroe Williams - Nicolas Dade - Octavian Cerna - Olaf Kirch - Ollie Wild - Onno van der Linden - Patrick Marie - Paul Mundt - Pavel Kankovsky - Pawel Pokrywka - Peter Fales - Peter Jeremy - Phil Wood - Rafal Maszkowski - - Rick Jones - Scott Barron - Scott Gifford - Sebastian Krahmer - Shaun Clowes - Solomon Peachy - Stefan Hudson - Stephen Donnelly - Takashi Yamamoto - Tanaka Shin-ya - Tony Li - Torsten Landschoff - Uns Lider - Uwe Girlich - Xianjie Zhang + Alan Bawden + Alexander 'Leo' Bergolth + Alexey Kuznetsov + Albert Chin + Andrew Brown + Antti Kantee + Arien Vijn + Arkadiusz Miskiewicz *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Apr 13 09:16:26 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95081106566C; Mon, 13 Apr 2009 09:16:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EF6C8FC14; Mon, 13 Apr 2009 09:16:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3D9GQdB064203; Mon, 13 Apr 2009 09:16:26 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3D9GPZx064185; Mon, 13 Apr 2009 09:16:25 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200904130916.n3D9GPZx064185@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 13 Apr 2009 09:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190990 - in user/lstewart/alq_varlen_8.x: . bin/sh contrib/bind9 contrib/cpio contrib/csup contrib/file contrib/gdb contrib/gdtoa contrib/libpcap contrib/libpcap/bpf/net contrib/libpca... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 09:16:26 -0000 Author: lstewart Date: Mon Apr 13 09:16:24 2009 New Revision: 190990 URL: http://svn.freebsd.org/changeset/base/190990 Log: Merge r190682:190987 from head. Added: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk.3 - copied unchanged from r190987, head/lib/libarchive/archive_read_disk.3 user/lstewart/alq_varlen_8.x/share/man/man4/uath.4 - copied unchanged from r190987, head/share/man/man4/uath.4 user/lstewart/alq_varlen_8.x/sys/contrib/dev/uath/ - copied from r190987, head/sys/contrib/dev/uath/ user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_82599.c - copied unchanged from r190987, head/sys/dev/ixgbe/ixgbe_82599.c user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_uath.c - copied unchanged from r190987, head/sys/dev/usb/wlan/if_uath.c user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_uathreg.h - copied unchanged from r190987, head/sys/dev/usb/wlan/if_uathreg.h user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_uathvar.h - copied unchanged from r190987, head/sys/dev/usb/wlan/if_uathvar.h user/lstewart/alq_varlen_8.x/sys/modules/nfssvc/ - copied from r190987, head/sys/modules/nfssvc/ user/lstewart/alq_varlen_8.x/sys/modules/usb/uath/ - copied from r190987, head/sys/modules/usb/uath/ user/lstewart/alq_varlen_8.x/sys/nfs/nfs_nfssvc.c - copied unchanged from r190987, head/sys/nfs/nfs_nfssvc.c user/lstewart/alq_varlen_8.x/sys/nfs/nfssvc.h - copied unchanged from r190987, head/sys/nfs/nfssvc.h user/lstewart/alq_varlen_8.x/sys/powerpc/include/sysarch.h - copied unchanged from r190987, head/sys/powerpc/include/sysarch.h user/lstewart/alq_varlen_8.x/sys/powerpc/ofw/ofw_real.c - copied unchanged from r190987, head/sys/powerpc/ofw/ofw_real.c user/lstewart/alq_varlen_8.x/sys/powerpc/powerpc/dump_machdep.c - copied unchanged from r190987, head/sys/powerpc/powerpc/dump_machdep.c user/lstewart/alq_varlen_8.x/usr.sbin/uathload/ - copied from r190987, head/usr.sbin/uathload/ Deleted: user/lstewart/alq_varlen_8.x/sbin/slattach/ user/lstewart/alq_varlen_8.x/sbin/startslip/ user/lstewart/alq_varlen_8.x/share/man/man4/ppp.4 user/lstewart/alq_varlen_8.x/share/man/man4/sl.4 user/lstewart/alq_varlen_8.x/share/man/man9/VOP_LEASE.9 user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_sw_transfer.c user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_sw_transfer.h user/lstewart/alq_varlen_8.x/sys/net/bsd_comp.c user/lstewart/alq_varlen_8.x/sys/net/if_ppp.c user/lstewart/alq_varlen_8.x/sys/net/if_ppp.h user/lstewart/alq_varlen_8.x/sys/net/if_pppvar.h user/lstewart/alq_varlen_8.x/sys/net/if_sl.c user/lstewart/alq_varlen_8.x/sys/net/if_slvar.h user/lstewart/alq_varlen_8.x/sys/net/ppp_comp.h user/lstewart/alq_varlen_8.x/sys/net/ppp_deflate.c user/lstewart/alq_varlen_8.x/sys/net/ppp_tty.c user/lstewart/alq_varlen_8.x/sys/net/slip.h user/lstewart/alq_varlen_8.x/tools/build/options/WITHOUT_SLIP user/lstewart/alq_varlen_8.x/usr.sbin/pppd/ user/lstewart/alq_varlen_8.x/usr.sbin/pppstats/ user/lstewart/alq_varlen_8.x/usr.sbin/sliplogin/ user/lstewart/alq_varlen_8.x/usr.sbin/slstat/ Modified: user/lstewart/alq_varlen_8.x/ (props changed) user/lstewart/alq_varlen_8.x/Makefile.inc1 user/lstewart/alq_varlen_8.x/ObsoleteFiles.inc user/lstewart/alq_varlen_8.x/UPDATING user/lstewart/alq_varlen_8.x/bin/sh/eval.c user/lstewart/alq_varlen_8.x/contrib/bind9/ (props changed) user/lstewart/alq_varlen_8.x/contrib/cpio/ (props changed) user/lstewart/alq_varlen_8.x/contrib/csup/ (props changed) user/lstewart/alq_varlen_8.x/contrib/file/ (props changed) user/lstewart/alq_varlen_8.x/contrib/gdb/ (props changed) user/lstewart/alq_varlen_8.x/contrib/gdb/FREEBSD-Xlist user/lstewart/alq_varlen_8.x/contrib/gdtoa/ (props changed) user/lstewart/alq_varlen_8.x/contrib/libpcap/ (props changed) user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf/net/bpf_filter.c user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_dump.c user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_image.c user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/bpf.h user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/pcap.h user/lstewart/alq_varlen_8.x/contrib/ncurses/ (props changed) user/lstewart/alq_varlen_8.x/contrib/netcat/ (props changed) user/lstewart/alq_varlen_8.x/contrib/ntp/ (props changed) user/lstewart/alq_varlen_8.x/contrib/openbsm/ (props changed) user/lstewart/alq_varlen_8.x/contrib/openpam/ (props changed) user/lstewart/alq_varlen_8.x/contrib/pf/ (props changed) user/lstewart/alq_varlen_8.x/contrib/sendmail/ (props changed) user/lstewart/alq_varlen_8.x/contrib/tcpdump/ (props changed) user/lstewart/alq_varlen_8.x/contrib/top/ (props changed) user/lstewart/alq_varlen_8.x/contrib/top/install-sh (props changed) user/lstewart/alq_varlen_8.x/contrib/wpa/ (props changed) user/lstewart/alq_varlen_8.x/crypto/openssh/ (props changed) user/lstewart/alq_varlen_8.x/crypto/openssl/ (props changed) user/lstewart/alq_varlen_8.x/include/signal.h user/lstewart/alq_varlen_8.x/lib/libarchive/Makefile user/lstewart/alq_varlen_8.x/lib/libarchive/archive.h user/lstewart/alq_varlen_8.x/lib/libarchive/archive_check_magic.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.h user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk_set_standard_lookup.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_compression_program.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_format_empty.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_string.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_string.h user/lstewart/alq_varlen_8.x/lib/libarchive/archive_write_disk.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_write_disk_set_standard_lookup.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_write_set_compression_program.c user/lstewart/alq_varlen_8.x/lib/libarchive/archive_write_set_format_mtree.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/main.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test.h user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_read_compress_program.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_read_disk.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_read_extract.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_tar_large.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_write_disk.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_write_disk_failures.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_write_disk_hardlink.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_write_disk_perms.c user/lstewart/alq_varlen_8.x/lib/libarchive/test/test_write_disk_secure.c user/lstewart/alq_varlen_8.x/lib/libc/ (props changed) user/lstewart/alq_varlen_8.x/lib/libc/rpc/clnt_bcast.c user/lstewart/alq_varlen_8.x/lib/libc/stdio/asprintf.c (props changed) user/lstewart/alq_varlen_8.x/lib/libc/stdio/getdelim.c user/lstewart/alq_varlen_8.x/lib/libc/stdio/getline.3 user/lstewart/alq_varlen_8.x/lib/libc/stdtime/ (props changed) user/lstewart/alq_varlen_8.x/lib/libc/string/ffsll.c (props changed) user/lstewart/alq_varlen_8.x/lib/libc/string/flsll.c (props changed) user/lstewart/alq_varlen_8.x/lib/libc/string/memchr.3 user/lstewart/alq_varlen_8.x/lib/libc/string/memcmp.3 user/lstewart/alq_varlen_8.x/lib/libc/string/memcpy.3 user/lstewart/alq_varlen_8.x/lib/libc/string/memmove.3 user/lstewart/alq_varlen_8.x/lib/libc/string/memset.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strcasecmp.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strcat.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strchr.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strcmp.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strcpy.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strdup.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strlcpy.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strlen.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strpbrk.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strspn.3 user/lstewart/alq_varlen_8.x/lib/libc/string/strstr.3 user/lstewart/alq_varlen_8.x/lib/libc/string/wcpcpy.c (props changed) user/lstewart/alq_varlen_8.x/lib/libc/string/wcpncpy.c (props changed) user/lstewart/alq_varlen_8.x/lib/libkvm/kvm_powerpc.c user/lstewart/alq_varlen_8.x/lib/libusb/ (props changed) user/lstewart/alq_varlen_8.x/lib/libusb/libusb.3 (contents, props changed) user/lstewart/alq_varlen_8.x/lib/libusb/usb.h (props changed) user/lstewart/alq_varlen_8.x/lib/libutil/ (props changed) user/lstewart/alq_varlen_8.x/libexec/ftpd/extern.h user/lstewart/alq_varlen_8.x/libexec/ftpd/ftpcmd.y user/lstewart/alq_varlen_8.x/libexec/ftpd/ftpd.c user/lstewart/alq_varlen_8.x/libexec/rtld-elf/map_object.c user/lstewart/alq_varlen_8.x/release/doc/en_US.ISO8859-1/hardware/article.sgml user/lstewart/alq_varlen_8.x/release/picobsd/bridge/PICOBSD user/lstewart/alq_varlen_8.x/release/picobsd/mfs_tree/etc/rc user/lstewart/alq_varlen_8.x/rescue/rescue/Makefile user/lstewart/alq_varlen_8.x/sbin/ (props changed) user/lstewart/alq_varlen_8.x/sbin/Makefile user/lstewart/alq_varlen_8.x/sbin/gvinum/gvinum.8 user/lstewart/alq_varlen_8.x/sbin/gvinum/gvinum.c user/lstewart/alq_varlen_8.x/sbin/ipfw/ (props changed) user/lstewart/alq_varlen_8.x/sbin/ipfw/dummynet.c user/lstewart/alq_varlen_8.x/sbin/ipfw/ipfw.8 user/lstewart/alq_varlen_8.x/sbin/ipfw/ipfw2.h user/lstewart/alq_varlen_8.x/sbin/newfs_msdos/newfs_msdos.8 user/lstewart/alq_varlen_8.x/sbin/newfs_msdos/newfs_msdos.c user/lstewart/alq_varlen_8.x/sbin/route/route.c user/lstewart/alq_varlen_8.x/sbin/routed/Makefile user/lstewart/alq_varlen_8.x/sbin/routed/defs.h user/lstewart/alq_varlen_8.x/sbin/routed/if.c user/lstewart/alq_varlen_8.x/sbin/routed/input.c user/lstewart/alq_varlen_8.x/sbin/routed/main.c user/lstewart/alq_varlen_8.x/sbin/routed/output.c user/lstewart/alq_varlen_8.x/sbin/routed/parms.c user/lstewart/alq_varlen_8.x/sbin/routed/radix.c user/lstewart/alq_varlen_8.x/sbin/routed/radix.h user/lstewart/alq_varlen_8.x/sbin/routed/rdisc.c user/lstewart/alq_varlen_8.x/sbin/routed/table.c user/lstewart/alq_varlen_8.x/sbin/routed/trace.c user/lstewart/alq_varlen_8.x/share/man/man4/Makefile user/lstewart/alq_varlen_8.x/share/man/man4/bce.4 user/lstewart/alq_varlen_8.x/share/man/man4/ed.4 user/lstewart/alq_varlen_8.x/share/man/man4/man4.powerpc/pmu.4 user/lstewart/alq_varlen_8.x/share/man/man4/textdump.4 user/lstewart/alq_varlen_8.x/share/man/man4/wpi.4 user/lstewart/alq_varlen_8.x/share/man/man5/src.conf.5 user/lstewart/alq_varlen_8.x/share/man/man7/operator.7 user/lstewart/alq_varlen_8.x/share/man/man9/Makefile user/lstewart/alq_varlen_8.x/share/man/man9/acl.9 user/lstewart/alq_varlen_8.x/share/misc/committers-ports.dot user/lstewart/alq_varlen_8.x/share/misc/operator user/lstewart/alq_varlen_8.x/share/mk/bsd.own.mk user/lstewart/alq_varlen_8.x/share/timedef/Makefile user/lstewart/alq_varlen_8.x/share/zoneinfo/ (props changed) user/lstewart/alq_varlen_8.x/sys/ (props changed) user/lstewart/alq_varlen_8.x/sys/amd64/amd64/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/amd64/amd64/machdep.c user/lstewart/alq_varlen_8.x/sys/amd64/conf/GENERIC user/lstewart/alq_varlen_8.x/sys/amd64/include/cpufunc.h user/lstewart/alq_varlen_8.x/sys/amd64/include/endian.h user/lstewart/alq_varlen_8.x/sys/amd64/include/xen/ (props changed) user/lstewart/alq_varlen_8.x/sys/amd64/linux32/linux32_sysvec.c user/lstewart/alq_varlen_8.x/sys/arm/arm/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/arm/arm/trap.c user/lstewart/alq_varlen_8.x/sys/arm/at91/files.at91 user/lstewart/alq_varlen_8.x/sys/arm/include/vmparam.h user/lstewart/alq_varlen_8.x/sys/boot/forth/loader.conf user/lstewart/alq_varlen_8.x/sys/boot/i386/libi386/Makefile user/lstewart/alq_varlen_8.x/sys/boot/i386/libi386/smbios.c user/lstewart/alq_varlen_8.x/sys/cam/cam_xpt.c user/lstewart/alq_varlen_8.x/sys/cddl/compat/opensolaris/sys/vnode.h user/lstewart/alq_varlen_8.x/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/lstewart/alq_varlen_8.x/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/lstewart/alq_varlen_8.x/sys/cddl/dev/dtnfsclient/ (props changed) user/lstewart/alq_varlen_8.x/sys/compat/ia32/ia32_sysvec.c user/lstewart/alq_varlen_8.x/sys/compat/ndis/subr_usbd.c user/lstewart/alq_varlen_8.x/sys/conf/NOTES user/lstewart/alq_varlen_8.x/sys/conf/files user/lstewart/alq_varlen_8.x/sys/conf/files.powerpc user/lstewart/alq_varlen_8.x/sys/contrib/pf/ (props changed) user/lstewart/alq_varlen_8.x/sys/contrib/pf/net/pf.c user/lstewart/alq_varlen_8.x/sys/dev/acpi_support/acpi_asus.c user/lstewart/alq_varlen_8.x/sys/dev/ata/ata-queue.c user/lstewart/alq_varlen_8.x/sys/dev/ata/ata-usb.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/ath/ath_hal/ah_internal.h user/lstewart/alq_varlen_8.x/sys/dev/ath/if_ath.c user/lstewart/alq_varlen_8.x/sys/dev/ath/if_athvar.h user/lstewart/alq_varlen_8.x/sys/dev/cxgb/ (props changed) user/lstewart/alq_varlen_8.x/sys/dev/cxgb/cxgb_sge.c user/lstewart/alq_varlen_8.x/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c user/lstewart/alq_varlen_8.x/sys/dev/dcons/dcons_os.c user/lstewart/alq_varlen_8.x/sys/dev/drm/r300_cmdbuf.c user/lstewart/alq_varlen_8.x/sys/dev/drm/r300_reg.h user/lstewart/alq_varlen_8.x/sys/dev/drm/radeon_cp.c user/lstewart/alq_varlen_8.x/sys/dev/drm/radeon_drv.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_80003es2lan.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_82540.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_82541.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_82571.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_82575.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_82575.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_api.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_api.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_defines.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_hw.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_ich8lan.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_ich8lan.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_mac.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_mac.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_nvm.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_nvm.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_phy.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_phy.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/e1000_regs.h user/lstewart/alq_varlen_8.x/sys/dev/e1000/if_em.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/if_igb.c user/lstewart/alq_varlen_8.x/sys/dev/e1000/if_igb.h user/lstewart/alq_varlen_8.x/sys/dev/ed/if_ed.c user/lstewart/alq_varlen_8.x/sys/dev/ed/if_ed_cbus.c user/lstewart/alq_varlen_8.x/sys/dev/ed/if_ed_isa.c user/lstewart/alq_varlen_8.x/sys/dev/ed/if_ed_pccard.c user/lstewart/alq_varlen_8.x/sys/dev/ed/if_ed_pci.c user/lstewart/alq_varlen_8.x/sys/dev/ed/if_edreg.h user/lstewart/alq_varlen_8.x/sys/dev/ed/if_edvar.h user/lstewart/alq_varlen_8.x/sys/dev/ep/if_ep.c user/lstewart/alq_varlen_8.x/sys/dev/ep/if_ep_pccard.c user/lstewart/alq_varlen_8.x/sys/dev/ep/if_epreg.h user/lstewart/alq_varlen_8.x/sys/dev/ep/if_epvar.h user/lstewart/alq_varlen_8.x/sys/dev/firewire/firewire.c user/lstewart/alq_varlen_8.x/sys/dev/firewire/sbp.h user/lstewart/alq_varlen_8.x/sys/dev/fxp/if_fxp.c user/lstewart/alq_varlen_8.x/sys/dev/hptmv/access601.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/amd64-elf.raid.o.uu user/lstewart/alq_varlen_8.x/sys/dev/hptmv/array.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/command.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/entry.c user/lstewart/alq_varlen_8.x/sys/dev/hptmv/global.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/gui_lib.c user/lstewart/alq_varlen_8.x/sys/dev/hptmv/hptintf.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/hptproc.c user/lstewart/alq_varlen_8.x/sys/dev/hptmv/i386-elf.raid.o.uu user/lstewart/alq_varlen_8.x/sys/dev/hptmv/ioctl.c user/lstewart/alq_varlen_8.x/sys/dev/hptmv/mvOs.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/mvSata.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/mvStorageDev.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/osbsd.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/raid5n.h user/lstewart/alq_varlen_8.x/sys/dev/hptmv/readme.txt user/lstewart/alq_varlen_8.x/sys/dev/hptmv/vdevice.h user/lstewart/alq_varlen_8.x/sys/dev/if_ndis/if_ndis.c user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/LICENSE user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/README user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe.c user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe.h user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_82598.c user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_api.c user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_api.h user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_common.c user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_common.h user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_osdep.h user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_phy.c user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_phy.h user/lstewart/alq_varlen_8.x/sys/dev/ixgbe/ixgbe_type.h user/lstewart/alq_varlen_8.x/sys/dev/kbd/kbdreg.h user/lstewart/alq_varlen_8.x/sys/dev/kbdmux/kbdmux.c user/lstewart/alq_varlen_8.x/sys/dev/pccard/pccarddevs user/lstewart/alq_varlen_8.x/sys/dev/pccbb/pccbb_pci.c user/lstewart/alq_varlen_8.x/sys/dev/sound/usb/uaudio.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/sound/usb/uaudio.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/sound/usb/uaudio_pcm.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/sound/usb/uaudioreg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/syscons/syscons.c user/lstewart/alq_varlen_8.x/sys/dev/uart/uart_cpu_powerpc.c user/lstewart/alq_varlen_8.x/sys/dev/uart/uart_dev_ns8250.c user/lstewart/alq_varlen_8.x/sys/dev/usb/README.TXT (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/bluetooth/TODO.TXT (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/bluetooth/ng_ubt.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/bluetooth/ng_ubt_var.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/bluetooth/ubtbcmfw.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/at91dci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/at91dci.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/at91dci_atmelarm.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/atmegadci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/atmegadci.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/atmegadci_atmelarm.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ehci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ehci.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ehci_ixp4xx.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ehci_mbus.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ehci_pci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/musb_otg.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/musb_otg.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/musb_otg_atmelarm.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ohci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ohci.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ohci_atmelarm.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/ohci_pci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/uhci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/uhci.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/uhci_pci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/usb_controller.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/uss820dci.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/uss820dci.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/controller/uss820dci_atmelarm.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/input/uhid.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/input/ukbd.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/input/ums.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/input/usb_rdesc.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/misc/udbp.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/misc/udbp.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/misc/ufm.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_aue.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_auereg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_axe.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_axereg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_cdce.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_cdcereg.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_cue.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_cuereg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_kue.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_kuefw.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_kuereg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_rue.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_ruereg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_udav.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/if_udavreg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/usb_ethernet.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/net/usb_ethernet.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/quirk/usb_quirk.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/quirk/usb_quirk.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/u3g.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uark.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/ubsa.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/ubser.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uchcom.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/ucycom.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/ufoma.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uftdi.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uftdi_reg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/ugensa.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uipaq.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/ulpt.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/umct.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/umodem.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/umoscom.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uplcom.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/usb_serial.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/usb_serial.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uslcom.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uvisor.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/serial/uvscom.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/storage/rio500_usb.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/storage/umass.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/storage/urio.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/storage/ustorage_fs.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/template/usb_template.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/template/usb_template.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/template/usb_template_cdce.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/template/usb_template_msc.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/template/usb_template_mtp.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/ufm_ioctl.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_bus.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_busdma.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_busdma.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_cdc.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_compat_linux.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_compat_linux.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_controller.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_core.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_core.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_debug.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_debug.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_defs.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_dev.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_dev.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_device.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_device.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_dynamic.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_dynamic.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_endian.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_error.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_error.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_generic.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_generic.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_handle_request.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_handle_request.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_hid.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_hid.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_hub.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_hub.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_if.m (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_ioctl.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_lookup.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_lookup.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_mbuf.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_mbuf.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_mfunc.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_msctest.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_msctest.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_parse.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_parse.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_pci.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_process.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_process.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_request.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_request.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_revision.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_transfer.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_transfer.h (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_util.c (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usb_util.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usbdevs (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/usbhid.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_rum.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_rumfw.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_rumreg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_rumvar.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_ural.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_uralreg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_uralvar.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_zyd.c (contents, props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_zydfw.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/if_zydreg.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/usb/wlan/usb_wlan.h (props changed) user/lstewart/alq_varlen_8.x/sys/dev/xen/netfront/ (props changed) user/lstewart/alq_varlen_8.x/sys/dev/xen/xenpci/ (props changed) user/lstewart/alq_varlen_8.x/sys/fs/devfs/devfs_vnops.c user/lstewart/alq_varlen_8.x/sys/fs/fifofs/fifo_vnops.c user/lstewart/alq_varlen_8.x/sys/fs/pseudofs/pseudofs_vnops.c user/lstewart/alq_varlen_8.x/sys/fs/unionfs/union_subr.c user/lstewart/alq_varlen_8.x/sys/fs/unionfs/union_vnops.c user/lstewart/alq_varlen_8.x/sys/geom/geom.h user/lstewart/alq_varlen_8.x/sys/geom/geom_disk.c user/lstewart/alq_varlen_8.x/sys/geom/geom_disk.h user/lstewart/alq_varlen_8.x/sys/geom/geom_subr.c user/lstewart/alq_varlen_8.x/sys/geom/journal/g_journal.c user/lstewart/alq_varlen_8.x/sys/geom/mirror/g_mirror.c user/lstewart/alq_varlen_8.x/sys/geom/part/g_part.c user/lstewart/alq_varlen_8.x/sys/geom/part/g_part_ebr.c user/lstewart/alq_varlen_8.x/sys/geom/raid3/g_raid3.c user/lstewart/alq_varlen_8.x/sys/geom/vinum/geom_vinum_share.c user/lstewart/alq_varlen_8.x/sys/geom/vinum/geom_vinum_share.h user/lstewart/alq_varlen_8.x/sys/i386/i386/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/i386/i386/machdep.c user/lstewart/alq_varlen_8.x/sys/i386/include/cpufunc.h user/lstewart/alq_varlen_8.x/sys/i386/include/endian.h user/lstewart/alq_varlen_8.x/sys/i386/include/vmparam.h user/lstewart/alq_varlen_8.x/sys/i386/linux/linux_sysvec.c user/lstewart/alq_varlen_8.x/sys/ia64/ia64/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/kern/imgact_elf.c user/lstewart/alq_varlen_8.x/sys/kern/kern_acct.c user/lstewart/alq_varlen_8.x/sys/kern/kern_alq.c user/lstewart/alq_varlen_8.x/sys/kern/kern_ktrace.c user/lstewart/alq_varlen_8.x/sys/kern/kern_shutdown.c user/lstewart/alq_varlen_8.x/sys/kern/kern_sig.c user/lstewart/alq_varlen_8.x/sys/kern/kern_tc.c user/lstewart/alq_varlen_8.x/sys/kern/kern_time.c user/lstewart/alq_varlen_8.x/sys/kern/kern_umtx.c user/lstewart/alq_varlen_8.x/sys/kern/kern_vimage.c user/lstewart/alq_varlen_8.x/sys/kern/tty.c user/lstewart/alq_varlen_8.x/sys/kern/uipc_domain.c user/lstewart/alq_varlen_8.x/sys/kern/uipc_syscalls.c user/lstewart/alq_varlen_8.x/sys/kern/uipc_usrreq.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_acl.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_cache.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_default.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_extattr.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_lookup.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_mount.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_syscalls.c user/lstewart/alq_varlen_8.x/sys/kern/vfs_vnops.c user/lstewart/alq_varlen_8.x/sys/kern/vnode_if.src user/lstewart/alq_varlen_8.x/sys/legacy/dev/ata/ata-usb.c (props changed) user/lstewart/alq_varlen_8.x/sys/legacy/dev/sound/usb/uaudio.c (props changed) user/lstewart/alq_varlen_8.x/sys/legacy/dev/sound/usb/uaudio.h (props changed) user/lstewart/alq_varlen_8.x/sys/legacy/dev/sound/usb/uaudio_pcm.c (props changed) user/lstewart/alq_varlen_8.x/sys/legacy/dev/sound/usb/uaudioreg.h (props changed) user/lstewart/alq_varlen_8.x/sys/legacy/dev/usb/ (props changed) user/lstewart/alq_varlen_8.x/sys/legacy/dev/usb/ehci_ixp4xx.c (props changed) user/lstewart/alq_varlen_8.x/sys/mips/mips/elf64_machdep.c user/lstewart/alq_varlen_8.x/sys/mips/mips/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/modules/Makefile user/lstewart/alq_varlen_8.x/sys/modules/dtrace/dtnfsclient/ (props changed) user/lstewart/alq_varlen_8.x/sys/modules/ip6_mroute_mod/ (props changed) user/lstewart/alq_varlen_8.x/sys/modules/ipmi/ipmi_linux/ (props changed) user/lstewart/alq_varlen_8.x/sys/modules/ixgbe/Makefile user/lstewart/alq_varlen_8.x/sys/modules/nfsclient/Makefile user/lstewart/alq_varlen_8.x/sys/modules/usb/Makefile user/lstewart/alq_varlen_8.x/sys/modules/usb/usb/Makefile user/lstewart/alq_varlen_8.x/sys/net/if.c user/lstewart/alq_varlen_8.x/sys/net/if_bridge.c user/lstewart/alq_varlen_8.x/sys/net/if_gif.c user/lstewart/alq_varlen_8.x/sys/net/if_loop.c user/lstewart/alq_varlen_8.x/sys/net/if_spppsubr.c user/lstewart/alq_varlen_8.x/sys/net/route.c user/lstewart/alq_varlen_8.x/sys/net/vnet.h user/lstewart/alq_varlen_8.x/sys/net80211/ieee80211_output.c user/lstewart/alq_varlen_8.x/sys/net80211/ieee80211_var.h user/lstewart/alq_varlen_8.x/sys/netinet/icmp6.h user/lstewart/alq_varlen_8.x/sys/netinet/icmp_var.h user/lstewart/alq_varlen_8.x/sys/netinet/if_ether.c user/lstewart/alq_varlen_8.x/sys/netinet/igmp.c user/lstewart/alq_varlen_8.x/sys/netinet/igmp_var.h user/lstewart/alq_varlen_8.x/sys/netinet/in_gif.c user/lstewart/alq_varlen_8.x/sys/netinet/in_mcast.c user/lstewart/alq_varlen_8.x/sys/netinet/in_pcb.h user/lstewart/alq_varlen_8.x/sys/netinet/ip_carp.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_carp.h user/lstewart/alq_varlen_8.x/sys/netinet/ip_divert.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_dummynet.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_dummynet.h user/lstewart/alq_varlen_8.x/sys/netinet/ip_fastfwd.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_fw.h user/lstewart/alq_varlen_8.x/sys/netinet/ip_icmp.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_input.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_ipsec.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_mroute.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_mroute.h user/lstewart/alq_varlen_8.x/sys/netinet/ip_options.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_output.c user/lstewart/alq_varlen_8.x/sys/netinet/ip_var.h user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_cuseeme.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_dummy.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_ftp.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_irc.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_mod.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_mod.h user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_nbt.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_pptp.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_skinny.c user/lstewart/alq_varlen_8.x/sys/netinet/libalias/alias_smedia.c user/lstewart/alq_varlen_8.x/sys/netinet/pim_var.h user/lstewart/alq_varlen_8.x/sys/netinet/raw_ip.c user/lstewart/alq_varlen_8.x/sys/netinet/sctp_indata.c user/lstewart/alq_varlen_8.x/sys/netinet/sctp_input.c user/lstewart/alq_varlen_8.x/sys/netinet/sctp_output.c user/lstewart/alq_varlen_8.x/sys/netinet/sctp_pcb.c user/lstewart/alq_varlen_8.x/sys/netinet/sctp_structs.h user/lstewart/alq_varlen_8.x/sys/netinet/sctp_sysctl.c user/lstewart/alq_varlen_8.x/sys/netinet/sctp_sysctl.h user/lstewart/alq_varlen_8.x/sys/netinet/sctp_uio.h user/lstewart/alq_varlen_8.x/sys/netinet/sctp_usrreq.c user/lstewart/alq_varlen_8.x/sys/netinet/sctputil.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_hostcache.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_input.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_output.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_reass.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_sack.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_subr.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_syncache.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_timer.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_timewait.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_usrreq.c user/lstewart/alq_varlen_8.x/sys/netinet/tcp_var.h user/lstewart/alq_varlen_8.x/sys/netinet/udp_usrreq.c user/lstewart/alq_varlen_8.x/sys/netinet/udp_var.h user/lstewart/alq_varlen_8.x/sys/netinet/vinet.h user/lstewart/alq_varlen_8.x/sys/netinet6/frag6.c user/lstewart/alq_varlen_8.x/sys/netinet6/icmp6.c user/lstewart/alq_varlen_8.x/sys/netinet6/in6_src.c user/lstewart/alq_varlen_8.x/sys/netinet6/ip6_input.c user/lstewart/alq_varlen_8.x/sys/netinet6/mld6.c user/lstewart/alq_varlen_8.x/sys/netinet6/nd6.c user/lstewart/alq_varlen_8.x/sys/netinet6/nd6_nbr.c user/lstewart/alq_varlen_8.x/sys/netinet6/nd6_rtr.c user/lstewart/alq_varlen_8.x/sys/netinet6/raw_ip6.c user/lstewart/alq_varlen_8.x/sys/netinet6/scope6.c user/lstewart/alq_varlen_8.x/sys/netinet6/udp6_usrreq.c user/lstewart/alq_varlen_8.x/sys/netipsec/ipsec.c user/lstewart/alq_varlen_8.x/sys/netipsec/key.c user/lstewart/alq_varlen_8.x/sys/netipsec/xform_ah.c user/lstewart/alq_varlen_8.x/sys/netipsec/xform_esp.c user/lstewart/alq_varlen_8.x/sys/netipsec/xform_ipcomp.c user/lstewart/alq_varlen_8.x/sys/netipsec/xform_ipip.c user/lstewart/alq_varlen_8.x/sys/nfs4client/nfs4_socket.c user/lstewart/alq_varlen_8.x/sys/nfs4client/nfs4_vnops.c user/lstewart/alq_varlen_8.x/sys/nfsclient/nfs.h user/lstewart/alq_varlen_8.x/sys/nfsclient/nfs_krpc.c user/lstewart/alq_varlen_8.x/sys/nfsclient/nfs_socket.c user/lstewart/alq_varlen_8.x/sys/nfsclient/nfs_subs.c user/lstewart/alq_varlen_8.x/sys/nfsclient/nfs_vnops.c user/lstewart/alq_varlen_8.x/sys/nfsserver/nfs.h user/lstewart/alq_varlen_8.x/sys/nfsserver/nfs_srvkrpc.c user/lstewart/alq_varlen_8.x/sys/nfsserver/nfs_srvsubs.c user/lstewart/alq_varlen_8.x/sys/nfsserver/nfs_syscalls.c user/lstewart/alq_varlen_8.x/sys/pc98/pc98/machdep.c user/lstewart/alq_varlen_8.x/sys/powerpc/aim/machdep.c user/lstewart/alq_varlen_8.x/sys/powerpc/aim/swtch.S user/lstewart/alq_varlen_8.x/sys/powerpc/aim/trap_subr.S user/lstewart/alq_varlen_8.x/sys/powerpc/booke/pmap.c user/lstewart/alq_varlen_8.x/sys/powerpc/include/hid.h user/lstewart/alq_varlen_8.x/sys/powerpc/include/intr.h user/lstewart/alq_varlen_8.x/sys/powerpc/include/pmap.h user/lstewart/alq_varlen_8.x/sys/powerpc/include/spr.h user/lstewart/alq_varlen_8.x/sys/powerpc/powerpc/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/powerpc/powerpc/mmu_if.m user/lstewart/alq_varlen_8.x/sys/powerpc/powerpc/pmap_dispatch.c user/lstewart/alq_varlen_8.x/sys/sparc64/sparc64/elf_machdep.c user/lstewart/alq_varlen_8.x/sys/sys/elf_common.h user/lstewart/alq_varlen_8.x/sys/sys/imgact_elf.h user/lstewart/alq_varlen_8.x/sys/sys/kernel.h user/lstewart/alq_varlen_8.x/sys/sys/kerneldump.h user/lstewart/alq_varlen_8.x/sys/sys/mbuf.h user/lstewart/alq_varlen_8.x/sys/sys/param.h user/lstewart/alq_varlen_8.x/sys/sys/systm.h user/lstewart/alq_varlen_8.x/sys/sys/vimage.h user/lstewart/alq_varlen_8.x/sys/sys/vnode.h user/lstewart/alq_varlen_8.x/sys/ufs/ffs/ffs_snapshot.c user/lstewart/alq_varlen_8.x/sys/ufs/ffs/ffs_softdep.c user/lstewart/alq_varlen_8.x/sys/vm/vm_map.c user/lstewart/alq_varlen_8.x/sys/vm/vm_map.h user/lstewart/alq_varlen_8.x/sys/vm/vm_mmap.c user/lstewart/alq_varlen_8.x/sys/vm/vm_reserv.c user/lstewart/alq_varlen_8.x/sys/vm/vm_unix.c user/lstewart/alq_varlen_8.x/sys/xen/evtchn.h (props changed) user/lstewart/alq_varlen_8.x/sys/xen/hypervisor.h (props changed) user/lstewart/alq_varlen_8.x/sys/xen/xen_intr.h (props changed) user/lstewart/alq_varlen_8.x/tools/regression/lib/libc/stdio/test-getdelim.c user/lstewart/alq_varlen_8.x/tools/regression/lib/msun/test-conj.t (props changed) user/lstewart/alq_varlen_8.x/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) user/lstewart/alq_varlen_8.x/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) user/lstewart/alq_varlen_8.x/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) user/lstewart/alq_varlen_8.x/tools/tools/ath/common/dumpregs.h (props changed) user/lstewart/alq_varlen_8.x/tools/tools/ath/common/dumpregs_5210.c (props changed) user/lstewart/alq_varlen_8.x/tools/tools/ath/common/dumpregs_5211.c (props changed) user/lstewart/alq_varlen_8.x/tools/tools/ath/common/dumpregs_5212.c (props changed) user/lstewart/alq_varlen_8.x/tools/tools/ath/common/dumpregs_5416.c (props changed) user/lstewart/alq_varlen_8.x/tools/tools/sysbuild/sysbuild.sh user/lstewart/alq_varlen_8.x/usr.bin/csup/ (props changed) user/lstewart/alq_varlen_8.x/usr.bin/make/globals.h user/lstewart/alq_varlen_8.x/usr.bin/make/main.c user/lstewart/alq_varlen_8.x/usr.bin/make/make.1 user/lstewart/alq_varlen_8.x/usr.bin/make/make.c user/lstewart/alq_varlen_8.x/usr.bin/procstat/ (props changed) user/lstewart/alq_varlen_8.x/usr.bin/su/su.c user/lstewart/alq_varlen_8.x/usr.sbin/Makefile user/lstewart/alq_varlen_8.x/usr.sbin/dumpcis/cardinfo.h (props changed) user/lstewart/alq_varlen_8.x/usr.sbin/dumpcis/cis.h (props changed) user/lstewart/alq_varlen_8.x/usr.sbin/fifolog/fifolog_create/fifolog.1 user/lstewart/alq_varlen_8.x/usr.sbin/jexec/jexec.c user/lstewart/alq_varlen_8.x/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) user/lstewart/alq_varlen_8.x/usr.sbin/makefs/ffs/ffs_subr.c (props changed) user/lstewart/alq_varlen_8.x/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) user/lstewart/alq_varlen_8.x/usr.sbin/makefs/getid.c (props changed) user/lstewart/alq_varlen_8.x/usr.sbin/sysinstall/devices.c user/lstewart/alq_varlen_8.x/usr.sbin/zic/ (props changed) Modified: user/lstewart/alq_varlen_8.x/Makefile.inc1 ============================================================================== --- user/lstewart/alq_varlen_8.x/Makefile.inc1 Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/Makefile.inc1 Mon Apr 13 09:16:24 2009 (r190990) @@ -1017,7 +1017,6 @@ cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ - usr.bin/ar \ usr.bin/sed \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ Modified: user/lstewart/alq_varlen_8.x/ObsoleteFiles.inc ============================================================================== --- user/lstewart/alq_varlen_8.x/ObsoleteFiles.inc Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/ObsoleteFiles.inc Mon Apr 13 09:16:24 2009 (r190990) @@ -14,6 +14,36 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090410: VOP_LEASE.9 removed +OLD_FILES+=usr/share/man/man9/VOP_LEASE.9.gz +# 20090405: removal of if_ppp(4) and if_sl(4) +OLD_FILES+=sbin/slattach rescue/slattach +OLD_FILES+=sbin/startslip rescue/startslip +OLD_FILES+=usr/include/net/if_ppp.h +OLD_FILES+=usr/include/net/if_pppvar.h +OLD_FILES+=usr/include/net/if_slvar.h +OLD_FILES+=usr/include/net/ppp_comp.h +OLD_FILES+=usr/include/net/slip.h +OLD_FILES+=usr/sbin/sliplogin +OLD_FILES+=usr/sbin/slstat +OLD_FILES+=usr/sbin/pppd +OLD_FILES+=usr/sbin/pppstats +OLD_FILES+=usr/share/man/man1/startslip.1.gz +OLD_FILES+=usr/share/man/man4/if_ppp.4.gz +OLD_FILES+=usr/share/man/man4/if_sl.4.gz +OLD_FILES+=usr/share/man/man4/ppp.4.gz +OLD_FILES+=usr/share/man/man4/sl.4.gz +OLD_FILES+=usr/share/man/man8/pppd.8.gz +OLD_FILES+=usr/share/man/man8/pppstats.8.gz +OLD_FILES+=usr/share/man/man8/slattach.8.gz +OLD_FILES+=usr/share/man/man8/slip.8.gz +OLD_FILES+=usr/share/man/man8/sliplogin.8.gz +OLD_FILES+=usr/share/man/man8/slstat.8.gz +# 20090321: libpcap upgraded to 1.0.0 +OLD_LIBS+=lib/libpcap.so.5 +.if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libpcap.so.5 +.endif # 20090319: uscanner(4) has been removed OLD_FILES+=usr/share/man/man4/uscanner.4.gz # 20090313: k8temp(4) renamed to amdtemp(4) @@ -24,8 +54,17 @@ OLD_FILES+=usr/lib/libusb20.a OLD_FILES+=usr/lib/libusb20.so OLD_FILES+=usr/lib/libusb20_p.a OLD_FILES+=usr/include/libusb20_compat01.h +.if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libusb20.so.1 +OLD_FILES+=usr/lib32/libusb20.a +OLD_FILES+=usr/lib32/libusb20.so +OLD_FILES+=usr/lib32/libusb20_p.a +.endif # 20090226: libmp(3) functions renamed OLD_LIBS+=usr/lib/libmp.so.6 +.if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libmp.so.6 +.endif # 20090223: changeover of USB stacks OLD_FILES+=usr/include/dev/usb2/include/ufm2_ioctl.h OLD_FILES+=usr/include/dev/usb2/include/urio2_ioctl.h Modified: user/lstewart/alq_varlen_8.x/UPDATING ============================================================================== --- user/lstewart/alq_varlen_8.x/UPDATING Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/UPDATING Mon Apr 13 09:16:24 2009 (r190990) @@ -22,6 +22,21 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090408: + Do not use Giant for kbdmux(4) locking. This is wrong and + apparently causing more problems than it solves. This will + re-open the issue where interrupt handlers may race with + kbdmux(4) in polling mode. Typical symptoms include (but + not limited to) duplicated and/or missing characters when + low level console functions (such as gets) are used while + interrupts are enabled (for example geli password prompt, + mountroot prompt etc.). Disabling kbdmux(4) may help. + +20090407: + The size of structs vnet_net, vnet_inet and vnet_ipfw has changed; + kernel modules referencing any of the above need to be recompiled. + Bump __FreeBSD_version to 800075. + 20090320: GEOM_PART has become the default partition slicer for storage devices, replacing GEOM_MBR, GEOM_BSD, GEOM_PC98 and GEOM_GPT slicers. It Modified: user/lstewart/alq_varlen_8.x/bin/sh/eval.c ============================================================================== --- user/lstewart/alq_varlen_8.x/bin/sh/eval.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/bin/sh/eval.c Mon Apr 13 09:16:24 2009 (r190990) @@ -166,7 +166,8 @@ evalstring(char *s) setstackmark(&smark); setinputstring(s, 1); while ((n = parsecmd(0)) != NEOF) { - evaltree(n, 0); + if (n != NULL) + evaltree(n, 0); popstackmark(&smark); } popfile(); Modified: user/lstewart/alq_varlen_8.x/contrib/gdb/FREEBSD-Xlist ============================================================================== --- user/lstewart/alq_varlen_8.x/contrib/gdb/FREEBSD-Xlist Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/contrib/gdb/FREEBSD-Xlist Mon Apr 13 09:16:24 2009 (r190990) @@ -1,60 +1,69 @@ $FreeBSD$ -gdb-6.1.1/bfd/* -gdb-6.1.1/config/* -gdb-6.1.1/etc/* -gdb-6.1.1/gdb/avr* -gdb-6.1.1/gdb/config/avr/* -gdb-6.1.1/gdb/config/cris/* -gdb-6.1.1/gdb/config/d10v/* -gdb-6.1.1/gdb/config/djgpp/* -gdb-6.1.1/gdb/config/frv/* -gdb-6.1.1/gdb/config/h8300/* -gdb-6.1.1/gdb/config/m32r/* -gdb-6.1.1/gdb/config/m68hc11/* -gdb-6.1.1/gdb/config/m68k/* -gdb-6.1.1/gdb/config/mcore/* -gdb-6.1.1/gdb/config/mn10300/* -gdb-6.1.1/gdb/config/ns32k/* -gdb-6.1.1/gdb/config/pa/* -gdb-6.1.1/gdb/config/sh/* -gdb-6.1.1/gdb/config/v850/* -gdb-6.1.1/gdb/config/vax/* -gdb-6.1.1/gdb/config/xstormy16/* -gdb-6.1.1/gdb/cris* -gdb-6.1.1/gdb/d10v* -gdb-6.1.1/gdb/frv* -gdb-6.1.1/gdb/h8300* -gdb-6.1.1/gdb/*m32r* -gdb-6.1.1/gdb/m68* -gdb-6.1.1/gdb/mcore* -gdb-6.1.1/gdb/mn10300* -gdb-6.1.1/gdb/nlm/* -gdb-6.1.1/gdb/ns32k* -gdb-6.1.1/gdb/osf-share/* -gdb-6.1.1/gdb/hppa* -gdb-6.1.1/gdb/rdi-share/* -gdb-6.1.1/gdb/sh* -gdb-6.1.1/gdb/testsuite/* -gdb-6.1.1/gdb/v850* -gdb-6.1.1/gdb/vax* -gdb-6.1.1/gdb/vx-share/* -gdb-6.1.1/gdb/xstormy16* -gdb-6.1.1/include/aout/* -gdb-6.1.1/include/coff/* -gdb-6.1.1/include/elf/* -gdb-6.1.1/include/mpw/* -gdb-6.1.1/include/nlm/* -gdb-6.1.1/include/opcode/* -gdb-6.1.1/intl/* -gdb-6.1.1/libiberty/* -gdb-6.1.1/mmalloc/* -gdb-6.1.1/opcodes/* -gdb-6.1.1/readline/* -gdb-6.1.1/sim/* -gdb-6.1.1/texinfo/* -gdb-6.1.1/utils/* +gdb-*/bfd/* +gdb-*/config/* +gdb-*/etc/* +gdb-*/gdb/avr* +gdb-*/gdb/config/avr/* +gdb-*/gdb/config/cris/* +gdb-*/gdb/config/d10v/* +gdb-*/gdb/config/djgpp/* +gdb-*/gdb/config/frv/* +gdb-*/gdb/config/h8300/* +gdb-*/gdb/config/m32r/* +gdb-*/gdb/config/m68hc11/* +gdb-*/gdb/config/m68k/* +gdb-*/gdb/config/mcore/* +gdb-*/gdb/config/mn10300/* +gdb-*/gdb/config/ns32k/* +gdb-*/gdb/config/pa/* +gdb-*/gdb/config/sh/* +gdb-*/gdb/config/v850/* +gdb-*/gdb/config/vax/* +gdb-*/gdb/config/xstormy16/* +gdb-*/gdb/cris* +gdb-*/gdb/d10v* +gdb-*/gdb/frv* +gdb-*/gdb/h8300* +gdb-*/gdb/iq2000* +gdb-*/gdb/i386nbsd* +gdb-*/gdb/m32c* +gdb-*/gdb/*m32r* +gdb-*/gdb/m68* +gdb-*/gdb/m88* +gdb-*/gdb/mcore* +gdb-*/gdb/mn10300* +gdb-*/gdb/mt-* +gdb-*/gdb/nlm/* +gdb-*/gdb/ns32k* +gdb-*/gdb/osf-share/* +gdb-*/gdb/ppcobsd* +gdb-*/gdb/hppa* +gdb-*/gdb/rdi-share/* +gdb-*/gdb/sh* +gdb-*/gdb/testsuite/* +gdb-*/gdb/v850* +gdb-*/gdb/vax* +gdb-*/gdb/vx-share/* +gdb-*/gdb/xstormy16* +gdb-*/gdb/xtensa* +gdb-*/include/aout/* +gdb-*/include/coff/* +gdb-*/include/elf/* +gdb-*/include/mpw/* +gdb-*/include/nlm/* +gdb-*/include/opcode/* +gdb-*/intl/* +gdb-*/libiberty/* +gdb-*/mmalloc/* +gdb-*/opcodes/* +gdb-*/readline/* +gdb-*/regformats/reg-cris* +gdb-*/sim/* +gdb-*/texinfo/* +gdb-*/utils/* *ChangeLog* *Makefile* +*TODO* *aix* *config.* *configure* @@ -63,4 +72,6 @@ gdb-6.1.1/utils/* *interix* *irix* *linux* +*mingw* *osf1* +*win32* Modified: user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf/net/bpf_filter.c ============================================================================== --- user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf/net/bpf_filter.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf/net/bpf_filter.c Mon Apr 13 09:16:24 2009 (r190990) @@ -200,8 +200,8 @@ m_xhalf(m, k, err) */ u_int bpf_filter(pc, p, wirelen, buflen) - register const struct bpf_insn *pc; - register const u_char *p; + register struct bpf_insn *pc; + register u_char *p; u_int wirelen; register u_int buflen; { Modified: user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_dump.c ============================================================================== --- user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_dump.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_dump.c Mon Apr 13 09:16:24 2009 (r190990) @@ -31,7 +31,7 @@ static const char rcsid[] _U_ = #include void -bpf_dump(const struct bpf_program *p, int option) +bpf_dump(struct bpf_program *p, int option) { const struct bpf_insn *insn; int i; Modified: user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_image.c ============================================================================== --- user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_image.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/contrib/libpcap/bpf_image.c Mon Apr 13 09:16:24 2009 (r190990) @@ -39,7 +39,7 @@ static const char rcsid[] _U_ = char * bpf_image(p, n) - const struct bpf_insn *p; + struct bpf_insn *p; int n; { int v; Modified: user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/bpf.h ============================================================================== --- user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/bpf.h Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/bpf.h Mon Apr 13 09:16:24 2009 (r190990) @@ -916,7 +916,7 @@ struct bpf_insn { #if __STDC__ || defined(__cplusplus) extern int bpf_validate(const struct bpf_insn *, int); -extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); +extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); #else extern int bpf_validate(); extern u_int bpf_filter(); Modified: user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/pcap.h ============================================================================== --- user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/pcap.h Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/contrib/libpcap/pcap/pcap.h Mon Apr 13 09:16:24 2009 (r190990) @@ -334,10 +334,10 @@ void pcap_freealldevs(pcap_if_t *); const char *pcap_lib_version(void); /* XXX this guy lives in the bpf tree */ -/* u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -int bpf_validate(const struct bpf_insn *f, int len); */ -char *bpf_image(const struct bpf_insn *, int); -void bpf_dump(const struct bpf_program *, int); +u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); +int bpf_validate(struct bpf_insn *f, int len); +char *bpf_image(struct bpf_insn *, int); +void bpf_dump(struct bpf_program *, int); #if defined(WIN32) Modified: user/lstewart/alq_varlen_8.x/include/signal.h ============================================================================== --- user/lstewart/alq_varlen_8.x/include/signal.h Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/include/signal.h Mon Apr 13 09:16:24 2009 (r190990) @@ -72,8 +72,10 @@ int raise(int); #if __POSIX_VISIBLE || __XSI_VISIBLE int kill(__pid_t, int); +#ifndef _PTH_PTHREAD_H_ /* XXX kludge to work around GNU Pth brokenness */ int pthread_kill(__pthread_t, int); int pthread_sigmask(int, const __sigset_t *, __sigset_t *); +#endif int sigaction(int, const struct sigaction * __restrict, struct sigaction * __restrict); int sigaddset(sigset_t *, int); Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/Makefile ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/Makefile Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/Makefile Mon Apr 13 09:16:24 2009 (r190990) @@ -77,6 +77,7 @@ SRCS= archive_check_magic.c \ # Man pages to be installed. MAN= archive_entry.3 \ archive_read.3 \ + archive_read_disk.3 \ archive_util.3 \ archive_write.3 \ archive_write_disk.3 \ @@ -186,6 +187,16 @@ MLINKS+= archive_read.3 archive_read_sup MLINKS+= archive_read.3 archive_read_support_format_iso9660.3 MLINKS+= archive_read.3 archive_read_support_format_tar.3 MLINKS+= archive_read.3 archive_read_support_format_zip.3 +MLINKS+= archive_read_disk.3 archive_read_disk_entry_from_file.3 +MLINKS+= archive_read_disk.3 archive_read_disk_gname.3 +MLINKS+= archive_read_disk.3 archive_read_disk_new.3 +MLINKS+= archive_read_disk.3 archive_read_disk_set_gname_lookup.3 +MLINKS+= archive_read_disk.3 archive_read_disk_set_standard_lookup.3 +MLINKS+= archive_read_disk.3 archive_read_disk_set_symlink_hybrid.3 +MLINKS+= archive_read_disk.3 archive_read_disk_set_symlink_logical.3 +MLINKS+= archive_read_disk.3 archive_read_disk_set_symlink_physical.3 +MLINKS+= archive_read_disk.3 archive_read_disk_set_uname_lookup.3 +MLINKS+= archive_read_disk.3 archive_read_disk_uname.3 MLINKS+= archive_util.3 archive_clear_error.3 MLINKS+= archive_util.3 archive_compression.3 MLINKS+= archive_util.3 archive_compression_name.3 Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive.h ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive.h Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive.h Mon Apr 13 09:16:24 2009 (r190990) @@ -46,7 +46,7 @@ /* Get appropriate definitions of standard POSIX-style types. */ /* These should match the types used in 'struct stat' */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #define __LA_INT64_T __int64 # if defined(_WIN64) # define __LA_SSIZE_T __int64 @@ -68,7 +68,7 @@ * .lib. The default here assumes you're building a DLL. Only * libarchive source should ever define __LIBARCHIVE_BUILD. */ -#if ((defined __WIN32__) || (defined _WIN32)) && (!defined LIBARCHIVE_STATIC) +#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC) # ifdef __LIBARCHIVE_BUILD # ifdef __GNUC__ # define __LA_DECL __attribute__((dllexport)) extern Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_check_magic.c ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_check_magic.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_check_magic.c Mon Apr 13 09:16:24 2009 (r190990) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_UNISTD_H #include #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #include #include #endif @@ -56,7 +56,7 @@ errmsg(const char *m) static void diediedie(void) { -#if defined(_WIN32) && defined(_DEBUG) +#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) /* Cause a breakpoint exception */ DebugBreak(); #endif Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.c ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.c Mon Apr 13 09:16:24 2009 (r190990) @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); #elif defined makedev /* There's a "makedev" macro. */ #define ae_makedev(maj, min) makedev((maj), (min)) -#elif defined mkdev || defined _WIN32 || defined __WIN32__ +#elif defined mkdev || ((defined _WIN32 || defined __WIN32__) && !defined(__CYGWIN__)) /* Windows. */ #define ae_makedev(maj, min) mkdev((maj), (min)) #else Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.h ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.h Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_entry.h Mon Apr 13 09:16:24 2009 (r190990) @@ -42,7 +42,7 @@ /* Get appropriate definitions of standard POSIX-style types. */ /* These should match the types used in 'struct stat' */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #define __LA_INT64_T __int64 #define __LA_UID_T unsigned int #define __LA_GID_T unsigned int @@ -71,7 +71,7 @@ * .lib. The default here assumes you're building a DLL. Only * libarchive source should ever define __LIBARCHIVE_BUILD. */ -#if ((defined __WIN32__) || (defined _WIN32)) && (!defined LIBARCHIVE_STATIC) +#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC) # ifdef __LIBARCHIVE_BUILD # ifdef __GNUC__ # define __LA_DECL __attribute__((dllexport)) extern Copied: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk.3 (from r190987, head/lib/libarchive/archive_read_disk.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk.3 Mon Apr 13 09:16:24 2009 (r190990, copy of r190987, head/lib/libarchive/archive_read_disk.3) @@ -0,0 +1,308 @@ +.\" Copyright (c) 2003-2009 Tim Kientzle +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 10, 2009 +.Dt archive_read_disk 3 +.Os +.Sh NAME +.Nm archive_read_disk_new , +.Nm archive_read_disk_set_symlink_logical , +.Nm archive_read_disk_set_symlink_physical , +.Nm archive_read_disk_set_symlink_hybrid , +.Nm archive_read_disk_entry_from_file , +.Nm archive_read_disk_gname , +.Nm archive_read_disk_uname , +.Nm archive_read_disk_set_uname_lookup , +.Nm archive_read_disk_set_gname_lookup , +.Nm archive_read_disk_set_standard_lookup , +.Nm archive_read_close , +.Nm archive_read_finish +.Nd functions for reading objects from disk +.Sh SYNOPSIS +.In archive.h +.Ft struct archive * +.Fn archive_read_disk_new "void" +.Ft int +.Fn archive_read_disk_set_symlink_logical "struct archive *" +.Ft int +.Fn archive_read_disk_set_symlink_physical "struct archive *" +.Ft int +.Fn archive_read_disk_set_symlink_hybrid "struct archive *" +.Ft int +.Fn archive_read_disk_gname "struct archive *" "gid_t" +.Ft int +.Fn archive_read_disk_uname "struct archive *" "uid_t" +.Ft int +.Fo archive_read_disk_set_gname_lookup +.Fa "struct archive *" +.Fa "void *" +.Fa "const char *(*lookup)(void *, gid_t)" +.Fa "void (*cleanup)(void *)" +.Fc +.Ft int +.Fo archive_read_disk_set_uname_lookup +.Fa "struct archive *" +.Fa "void *" +.Fa "const char *(*lookup)(void *, uid_t)" +.Fa "void (*cleanup)(void *)" +.Fc +.Ft int +.Fn archive_read_disk_set_standard_lookup "struct archive *" +.Ft int +.Fo archive_read_disk_entry_from_file +.Fa "struct archive *" +.Fa "struct archive_entry *" +.Fa "int fd" +.Fa "const struct stat *" +.Fc +.Ft int +.Fn archive_read_close "struct archive *" +.Ft int +.Fn archive_read_finish "struct archive *" +.Sh DESCRIPTION +These functions provide an API for reading information about +objects on disk. +In particular, they provide an interface for populating +.Tn struct archive_entry +objects. +.Bl -tag -width indent +.It Fn archive_read_disk_new +Allocates and initializes a +.Tn struct archive +object suitable for reading object information from disk. +.It Xo +.Fn archive_read_disk_set_symlink_logical , +.Fn archive_read_disk_set_symlink_physical , +.Fn archive_read_disk_set_symlink_hybrid +.Xc +This sets the mode used for handling symbolic links. +The +.Dq logical +mode follows all symbolic links. +The +.Dq physical +mode does not follow any symbolic links. +The +.Dq hybrid +mode currently behaves identically to the +.Dq logical +mode. +.It Xo +.Fn archive_read_disk_gname , +.Fn archive_read_disk_uname +.Xc +Returns a user or group name given a gid or uid value. +By default, these always return a NULL string. +.It Xo +.Fn archive_read_disk_set_gname_lookup , +.Fn archive_read_disk_set_uname_lookup +.Xc +These allow you to override the functions used for +user and group name lookups. +You may also provide a +.Tn void * +pointer to a private data structure and a cleanup function for +that data. +The cleanup function will be invoked when the +.Tn struct archive +object is destroyed or when new lookup functions are registered. +.It Fn archive_read_disk_set_standard_lookup +This convenience function installs a standard set of user +and group name lookup functions. +These functions use +.Xr getpwid 3 +and +.Xr getgrid 3 +to convert ids to names, defaulting to NULL if the names cannot +be looked up. +These functions also implement a simple memory cache to reduce +the number of calls to +.Xr getpwid 3 +and +.Xr getgrid 3 . +.It Fn archive_read_disk_entry_from_file +Populates a +.Tn struct archive_entry +object with information about a particular file. +The +.Tn archive_entry +object must have already been created with +.Xr archive_entry_new 3 +and at least one of the source path or path fields must already be set. +(If both are set, the source path will be used.) +.Pp +Information is read from disk using the path name from the +.Tn struct archive_entry +object. +If a file descriptor is provided, some information will be obtained using +that file descriptor, on platforms that support the appropriate +system calls. +.Pp +If a pointer to a +.Tn struct stat +is provided, information from that structure will be used instead +of reading from the disk where appropriate. +This can provide performance benefits in scenarios where +.Tn struct stat +information has already been read from the disk as a side effect +of some other operation. +(For example, directory traversal libraries often provide this information.) +.Pp +Where necessary, user and group ids are converted to user and group names +using the currently registered lookup functions above. +This affects the file ownership fields and ACL values in the +.Tn struct archive_entry +object. +.It Fn archive_read_close +This currently does nothing. +.It Fn archive_write_finish +Invokes +.Fn archive_write_close +if it was not invoked manually, then releases all resources. +.El +More information about the +.Va struct archive +object and the overall design of the library can be found in the +.Xr libarchive 3 +overview. +.Sh EXAMPLE +The following illustrates basic usage of the library by +showing how to use it to copy an item on disk into an archive. +.Bd -literal -offset indent +void +file_to_archive(struct archive *a, const char *name) +{ + char buff[8192]; + size_t bytes_read; + struct archive *ard; + struct archive_entry *entry; + int fd; + + ard = archive_read_disk_new(); + archive_read_disk_set_standard_lookup(ard); + entry = archive_entry_new(); + fd = open(name, O_RDONLY); + if (fd < 0) + return; + archive_entry_copy_sourcepath(entry, name); + archive_read_disk_entry_from_file(ard, entry, fd, NULL); + archive_write_header(a, entry); + while ((bytes_read = read(fd, buff, sizeof(buff))) > 0) + archive_write_data(a, buff, bytes_read); + archive_write_finish_entry(a); + archive_read_finish(ard); + archive_entry_free(entry); +} +.Ed +.Sh RETURN VALUES +Most functions return +.Cm ARCHIVE_OK +(zero) on success, or one of several negative +error codes for errors. +Specific error codes include: +.Cm ARCHIVE_RETRY +for operations that might succeed if retried, +.Cm ARCHIVE_WARN +for unusual conditions that do not prevent further operations, and +.Cm ARCHIVE_FATAL +for serious errors that make remaining operations impossible. +The +.Xr archive_errno 3 +and +.Xr archive_error_string 3 +functions can be used to retrieve an appropriate error code and a +textual error message. +(See +.Xr archive_util 3 +for details.) +.Pp +.Fn archive_read_disk_new +returns a pointer to a newly-allocated +.Tn struct archive +object or NULL if the allocation failed for any reason. +.Pp +.Fn archive_read_disk_gname +and +.Fn archive_read_disk_uname +return +.Tn const char * +pointers to the textual name or NULL if the lookup failed for any reason. +The returned pointer points to internal storage that +may be reused on the next call to either of these functions; +callers should copy the string if they need to continue accessing it. +.Pp +.Sh SEE ALSO +.Xr archive_read 3 , +.Xr archive_write 3 , +.Xr archive_write_disk 3 , +.Xr tar 1 , +.Xr libarchive 3 +.Sh HISTORY +The +.Nm libarchive +library first appeared in +.Fx 5.3 . +The +.Nm archive_read_disk +interface was added to +.Nm libarchive 2.6 +and first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm libarchive +library was written by +.An Tim Kientzle Aq kientzle@freebsd.org . +.Sh BUGS +The +.Dq standard +user name and group name lookup functions are not the defaults because +.Xr getgrid 3 +and +.Xr getpwid 3 +are sometimes too large for particular applications. +The current design allows the application author to use a more +compact implementation when appropriate. +.Pp +The full list of metadata read from disk by +.Fn archive_read_disk_entry_from_file +is necessarily system-dependent. +.Pp +The +.Fn archive_read_disk_entry_from_file +function reads as much information as it can from disk. +Some method should be provided to limit this so that clients who +do not need ACLs, for instance, can avoid the extra work needed +to look up such information. +.Pp +This API should provide a set of methods for walking a directory tree. +That would make it a direct parallel of the +.Xr archive_read 3 +API. +When such methods are implemented, the +.Dq hybrid +symbolic link mode will make sense. Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk_set_standard_lookup.c ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk_set_standard_lookup.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_disk_set_standard_lookup.c Mon Apr 13 09:16:24 2009 (r190990) @@ -47,14 +47,14 @@ __FBSDID("$FreeBSD$"); #include "archive.h" -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) int archive_read_disk_set_standard_lookup(struct archive *a) { archive_set_error(a, -1, "Standard lookups not available on Windows"); return (ARCHIVE_FATAL); } -#else +#else /* ! (_WIN32 && !__CYGWIN__) */ #define name_cache_size 127 static const char * const NO_NAME = "(noname)"; @@ -182,7 +182,7 @@ lookup_uname(void *data, uid_t uid) static const char * lookup_uname_helper(struct archive *a, id_t id) { - char buffer[64]; + char buffer[512]; struct passwd pwent, *result; int r; @@ -210,7 +210,7 @@ lookup_gname(void *data, gid_t gid) static const char * lookup_gname_helper(struct archive *a, id_t id) { - char buffer[64]; + char buffer[512]; struct group grent, *result; int r; @@ -226,4 +226,4 @@ lookup_gname_helper(struct archive *a, i return strdup(grent.gr_name); } -#endif /* _WIN32 */ +#endif /* ! (_WIN32 && !__CYGWIN__) */ Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_compression_program.c ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_compression_program.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_compression_program.c Mon Apr 13 09:16:24 2009 (r190990) @@ -38,6 +38,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_LIMITS_H # include #endif +#ifdef HAVE_SIGNAL_H +# include +#endif #ifdef HAVE_STDLIB_H # include #endif @@ -61,7 +64,7 @@ archive_read_support_compression_program /* This capability is only available on POSIX systems. */ #if (!defined(HAVE_PIPE) || !defined(HAVE_FCNTL) || \ - !(defined(HAVE_FORK) || defined(HAVE_VFORK))) && !defined(_WIN32) + !(defined(HAVE_FORK) || defined(HAVE_VFORK))) && (!defined(_WIN32) || defined(__CYGWIN__)) /* * On non-Posix systems, allow the program to build, but choke if @@ -119,6 +122,8 @@ static int program_bidder_free(struct ar struct program_filter { char *description; pid_t child; + int exit_status; + int waitpid_return; int child_stdin, child_stdout; char *out_buf; @@ -211,6 +216,73 @@ program_bidder_bid(struct archive_read_f } /* + * Shut down the child, return ARCHIVE_OK if it exited normally. + * + * Note that the return value is sticky; if we're called again, + * we won't reap the child again, but we will return the same status + * (including error message if the child came to a bad end). + */ +static int +child_stop(struct archive_read_filter *self, struct program_filter *state) +{ + /* Close our side of the I/O with the child. */ + if (state->child_stdin != -1) { + close(state->child_stdin); + state->child_stdin = -1; + } + if (state->child_stdout != -1) { + close(state->child_stdout); + state->child_stdout = -1; + } + + if (state->child != 0) { + /* Reap the child. */ + do { + state->waitpid_return + = waitpid(state->child, &state->exit_status, 0); + } while (state->waitpid_return == -1 && errno == EINTR); + state->child = 0; + } + + if (state->waitpid_return < 0) { + /* waitpid() failed? This is ugly. */ + archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC, + "Child process exited badly"); + return (ARCHIVE_WARN); + } + + if (WIFSIGNALED(state->exit_status)) { +#ifdef SIGPIPE + /* If the child died because we stopped reading before + * it was done, that's okay. Some archive formats + * have padding at the end that we routinely ignore. */ + /* The alternative to this would be to add a step + * before close(child_stdout) above to read from the + * child until the child has no more to write. */ + if (WTERMSIG(state->exit_status) == SIGPIPE) + return (ARCHIVE_OK); +#endif + archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC, + "Child process exited with signal %d", + WTERMSIG(state->exit_status)); + return (ARCHIVE_WARN); + } + + if (WIFEXITED(state->exit_status)) { + if (WEXITSTATUS(state->exit_status) == 0) + return (ARCHIVE_OK); + + archive_set_error(&self->archive->archive, + ARCHIVE_ERRNO_MISC, + "Child process exited with status %d", + WEXITSTATUS(state->exit_status)); + return (ARCHIVE_WARN); + } + + return (ARCHIVE_WARN); +} + +/* * Use select() to decide whether the child is ready for read or write. */ static ssize_t @@ -229,11 +301,10 @@ child_read(struct archive_read_filter *s if (ret > 0) return (ret); - if (ret == 0 || (ret == -1 && errno == EPIPE)) { - close(state->child_stdout); - state->child_stdout = -1; - return (0); - } + if (ret == 0 || (ret == -1 && errno == EPIPE)) + /* Child has closed its output; reap the child + * and return the status. */ + return (child_stop(self, state)); if (ret == -1 && errno != EAGAIN) return (-1); @@ -352,8 +423,11 @@ program_filter_read(struct archive_read_ while (state->child_stdout != -1 && total < state->out_buf_len) { bytes = child_read(self, p, state->out_buf_len - total); if (bytes < 0) - return (bytes); + /* No recovery is possible if we can no longer + * read from the child. */ + return (ARCHIVE_FATAL); if (bytes == 0) + /* We got EOF from the child. */ break; total += bytes; p += bytes; @@ -367,24 +441,17 @@ static int program_filter_close(struct archive_read_filter *self) { struct program_filter *state; - int status; + int e; state = (struct program_filter *)self->data; - - /* Shut down the child. */ - if (state->child_stdin != -1) - close(state->child_stdin); - if (state->child_stdout != -1) - close(state->child_stdout); - while (waitpid(state->child, &status, 0) == -1 && errno == EINTR) - continue; + e = child_stop(self, state); /* Release our private data. */ free(state->out_buf); free(state->description); free(state); - return (ARCHIVE_OK); + return (e); } #endif /* !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) */ Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_format_empty.c ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_format_empty.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_read_support_format_empty.c Mon Apr 13 09:16:24 2009 (r190990) @@ -59,12 +59,14 @@ archive_read_support_format_empty(struct static int archive_read_format_empty_bid(struct archive_read *a) { - const void *h; + ssize_t avail; - h = __archive_read_ahead(a, 1, NULL); - if (h != NULL) - return (-1); - return (1); + (void)__archive_read_ahead(a, 1, &avail); + /* Bid 1 if we successfully read exactly zero bytes. */ + if (avail == 0) + return (1); + /* Otherwise, we don't bid on this. */ + return (-1); } static int Modified: user/lstewart/alq_varlen_8.x/lib/libarchive/archive_string.c ============================================================================== --- user/lstewart/alq_varlen_8.x/lib/libarchive/archive_string.c Mon Apr 13 09:10:13 2009 (r190989) +++ user/lstewart/alq_varlen_8.x/lib/libarchive/archive_string.c Mon Apr 13 09:16:24 2009 (r190990) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_WCHAR_H #include #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #include #endif @@ -115,11 +115,11 @@ __archive_string_ensure(struct archive_s as->buffer_length = 32; else if (as->buffer_length < 8192) /* Buffers under 8k are doubled for speed. */ - as->buffer_length *= 2; + as->buffer_length += as->buffer_length; else { /* Buffers 8k and over grow by at least 25% each time. */ size_t old_length = as->buffer_length; - as->buffer_length = (as->buffer_length * 5) / 4; + as->buffer_length += as->buffer_length / 4; /* Be safe: If size wraps, release buffer and return NULL. */ if (as->buffer_length < old_length) { free(as->s); @@ -142,10 +142,12 @@ __archive_string_ensure(struct archive_s } struct archive_string * -__archive_strncat(struct archive_string *as, const char *p, size_t n) +__archive_strncat(struct archive_string *as, const void *_p, size_t n) { size_t s; - const char *pp; + const char *p, *pp; + + p = (const char *)_p; /* Like strlen(p), except won't examine positions beyond p[n]. */ s = 0; @@ -163,56 +165,18 @@ __archive_strappend_char(struct archive_ return (__archive_string_append(as, &c, 1)); } -#ifndef _WIN32 /* - * Home-grown wctomb for UTF-8. + * Translates a wide character string into UTF-8 and appends + * to the archive_string. Note: returns NULL if conversion fails, + * but still leaves a best-effort conversion in the argument as. */ -static int -my_wctomb_utf8(char *p, wchar_t wc) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Apr 13 09:45:04 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 351D01065670; Mon, 13 Apr 2009 09:45:04 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0BF8FC0A; Mon, 13 Apr 2009 09:45:04 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3D9j33G064994; Mon, 13 Apr 2009 09:45:03 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3D9j3Y1064992; Mon, 13 Apr 2009 09:45:03 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904130945.n3D9j3Y1064992@svn.freebsd.org> From: Paolo Pisati Date: Mon, 13 Apr 2009 09:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190994 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 09:45:04 -0000 Author: piso Date: Mon Apr 13 09:45:03 2009 New Revision: 190994 URL: http://svn.freebsd.org/changeset/base/190994 Log: Remove megapullup() from main libalias since it is not used anymore. Modified: user/piso/ipfw/sys/netinet/libalias/alias.c user/piso/ipfw/sys/netinet/libalias/alias.h Modified: user/piso/ipfw/sys/netinet/libalias/alias.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.c Mon Apr 13 09:23:20 2009 (r190993) +++ user/piso/ipfw/sys/netinet/libalias/alias.c Mon Apr 13 09:45:03 2009 (r190994) @@ -1742,40 +1742,3 @@ LibAliasUnLoadAllModule(void) } #endif - -#ifdef _KERNEL -/* - * m_megapullup() - this function is a big hack. - * Thankfully, it's only used in ng_nat and ipfw+nat. - * - * It allocates an mbuf with cluster and copies the whole chain into cluster, - * so that it is all contiguous and the whole packet can be accessed via a - * plain (char *) pointer. This is required, because libalias doesn't know - * how to handle mbuf chains. - * - * On success, m_megapullup returns an mbuf with cluster containing the input - * packet, on failure NULL. In both cases, the input packet is consumed. - */ -struct mbuf * -m_megapullup(struct mbuf *m, int len) { - struct mbuf *mcl; - caddr_t cp; - - if (len > MCLBYTES) - goto bad; - - if ((mcl = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL) - goto bad; - - cp = mtod(mcl, caddr_t); - m_copydata(m, 0, len, cp); - m_move_pkthdr(mcl, m); - mcl->m_len = mcl->m_pkthdr.len; - m_freem(m); - - return (mcl); -bad: - m_freem(m); - return (NULL); -} -#endif Modified: user/piso/ipfw/sys/netinet/libalias/alias.h ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.h Mon Apr 13 09:23:20 2009 (r190993) +++ user/piso/ipfw/sys/netinet/libalias/alias.h Mon Apr 13 09:45:03 2009 (r190994) @@ -207,9 +207,6 @@ int LibAliasLoadModule(char int LibAliasUnLoadAllModule(void); int LibAliasRefreshModules(void); -/* Mbuf helper function. */ -struct mbuf *m_megapullup(struct mbuf *, int); - /* * Mode flags and other constants. */ From owner-svn-src-user@FreeBSD.ORG Mon Apr 13 13:07:52 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 448F31065670; Mon, 13 Apr 2009 13:07:52 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 311458FC18; Mon, 13 Apr 2009 13:07:52 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DD7qtj072538; Mon, 13 Apr 2009 13:07:52 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3DD7pMw072525; Mon, 13 Apr 2009 13:07:51 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904131307.n3DD7pMw072525@svn.freebsd.org> From: Paolo Pisati Date: Mon, 13 Apr 2009 13:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190998 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 13:07:53 -0000 Author: piso Date: Mon Apr 13 13:07:51 2009 New Revision: 190998 URL: http://svn.freebsd.org/changeset/base/190998 Log: o pass mbufs down to modules too. o deploy a compatibility mechanism for legacy modules unable to grok mbufs. Modified: user/piso/ipfw/sys/netinet/libalias/alias.c user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c user/piso/ipfw/sys/netinet/libalias/alias_db.c user/piso/ipfw/sys/netinet/libalias/alias_dummy.c user/piso/ipfw/sys/netinet/libalias/alias_ftp.c user/piso/ipfw/sys/netinet/libalias/alias_irc.c user/piso/ipfw/sys/netinet/libalias/alias_local.h user/piso/ipfw/sys/netinet/libalias/alias_mod.c user/piso/ipfw/sys/netinet/libalias/alias_mod.h user/piso/ipfw/sys/netinet/libalias/alias_nbt.c user/piso/ipfw/sys/netinet/libalias/alias_pptp.c user/piso/ipfw/sys/netinet/libalias/alias_skinny.c user/piso/ipfw/sys/netinet/libalias/alias_smedia.c Modified: user/piso/ipfw/sys/netinet/libalias/alias.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias.c Mon Apr 13 13:07:51 2009 (r190998) @@ -761,7 +761,9 @@ UdpAliasIn(struct libalias *la, pkt_t pt proxy_port = GetProxyPort(lnk); /* Walk out chain. */ - error = find_handler(IN, UDP, la, pip, &ad); + error = find_handler(IN, UDP, la, ptr, &ad); + PULLUP_UDPHDR(pip, ptr); + ud = (struct udphdr *)ip_next(pip); /* If we cannot figure out the packet, ignore it. */ if (error < 0) return (PKT_ALIAS_IGNORED); @@ -886,7 +888,9 @@ UdpAliasOut(struct libalias *la, pkt_t p alias_port = GetAliasPort(lnk); /* Walk out chain. */ - error = find_handler(OUT, UDP, la, pip, &ad); + error = find_handler(OUT, UDP, la, ptr, &ad); + PULLUP_UDPHDR(pip, ptr); + ud = (struct udphdr *)ip_next(pip); /* If UDP checksum is not zero, adjust since source port is */ /* being aliased and source address is being altered */ @@ -954,7 +958,9 @@ TcpAliasIn(struct libalias *la, pkt_t pt }; /* Walk out chain. */ - error = find_handler(IN, TCP, la, pip, &ad); + error = find_handler(IN, TCP, la, ptr, &ad); + PULLUP_TCPHDR(pip, ptr); + tc = (struct tcphdr *)ip_next(pip); alias_address = GetAliasAddress(lnk); original_address = GetOriginalAddress(lnk); @@ -1118,7 +1124,9 @@ TcpAliasOut(struct libalias *la, pkt_t p TcpMonitorOut(tc->th_flags, lnk); /* Walk out chain. */ - error = find_handler(OUT, TCP, la, pip, &ad); + error = find_handler(OUT, TCP, la, ptr, &ad); + PULLUP_TCPHDR(pip, ptr); + tc = (struct tcphdr *)ip_next(pip); /* Adjust TCP checksum since source port is being aliased */ /* and source address is being altered */ @@ -1362,7 +1370,8 @@ LibAliasInLocked(struct libalias *la, pk }; /* Walk out chain. */ - error = find_handler(IN, IP, la, pip, &ad); + error = find_handler(IN, IP, la, ptr, &ad); + PULLUP_IPHDR(pip, ptr); if (error == 0) iresult = PKT_ALIAS_OK; else @@ -1512,7 +1521,8 @@ LibAliasOutLocked(struct libalias *la, p .maxpktsize = 0 }; /* Walk out chain. */ - error = find_handler(OUT, IP, la, pip, &ad); + error = find_handler(OUT, IP, la, ptr, &ad); + PULLUP_IPHDR(pip, ptr); if (error == 0) iresult = PKT_ALIAS_OK; else Modified: user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c Mon Apr 13 13:07:51 2009 (r190998) @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include +#include +#include #include #include #else @@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -75,17 +78,31 @@ fingerprint(struct libalias *la, struct } static int -protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandlerin(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandleCUSeeMeIn(la, pip, *ah->oaddr); return (0); } static int -protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandlerout(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandleCUSeeMeOut(la, pip, ah->lnk); return (0); } @@ -96,6 +113,7 @@ struct proto_handler handlers[] = { .pri = 120, .dir = OUT, .proto = UDP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, @@ -103,6 +121,7 @@ struct proto_handler handlers[] = { .pri = 120, .dir = IN, .proto = UDP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandlerin }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_db.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_db.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_db.c Mon Apr 13 13:07:51 2009 (r190998) @@ -2495,6 +2495,14 @@ LibAliasInit(struct libalias *la) la = calloc(sizeof *la, 1); if (la == NULL) return (la); +#ifdef _KERNEL + la->buf = malloc(IP_MAXPACKET+1); + if (la->buf == NULL) { + free (la); + return (NULL); + } +#endif + #ifndef _KERNEL /* kernel cleans up on module unload */ if (LIST_EMPTY(&instancehead)) @@ -2568,6 +2576,7 @@ LibAliasUninit(struct libalias *la) LIBALIAS_LOCK(la); #ifdef _KERNEL AliasSctpTerm(la); + free (la->buf); #endif la->deleteAllLinks = 1; CleanupAliasData(la); Modified: user/piso/ipfw/sys/netinet/libalias/alias_dummy.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Mon Apr 13 13:07:51 2009 (r190998) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include +#include +#include #include #include #else @@ -49,9 +51,11 @@ __FBSDID("$FreeBSD$"); #include #ifdef _KERNEL +#include #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -86,9 +90,16 @@ fingerprint(struct libalias *la, struct */ static int -protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandleDummy(la, pip, ah); return (0); } @@ -106,6 +117,7 @@ struct proto_handler handlers [] = { .pri = 666, .dir = IN|OUT, .proto = UDP|TCP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandler }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_ftp.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_ftp.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_ftp.c Mon Apr 13 13:07:51 2009 (r190998) @@ -71,6 +71,8 @@ __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL #include +#include +#include #include #include #include @@ -93,6 +95,7 @@ __FBSDID("$FreeBSD$"); #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -117,9 +120,16 @@ fingerprint(struct libalias *la, struct } static int -protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandleFtpOut(la, pip, ah->lnk, ah->maxpktsize); return (0); } @@ -129,6 +139,7 @@ struct proto_handler handlers[] = { .pri = 80, .dir = OUT, .proto = TCP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandler }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_irc.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_irc.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_irc.c Mon Apr 13 13:07:51 2009 (r190998) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL #include +#include +#include #include #include #include @@ -75,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -106,9 +109,16 @@ fingerprint(struct libalias *la, struct } static int -protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { + struct ip *pip; +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); newpacket = malloc(PKTSIZE); if (newpacket) { AliasHandleIrcOut(la, pip, ah->lnk, ah->maxpktsize); @@ -122,6 +132,7 @@ struct proto_handler handlers[] = { .pri = 90, .dir = OUT, .proto = TCP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandler }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_local.h ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_local.h Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_local.h Mon Apr 13 13:07:51 2009 (r190998) @@ -178,6 +178,9 @@ struct libalias { * avoid races in libalias: every public function has to use it. */ struct mtx mutex; + + /* for legacy modules that can't handle mbufs yet */ + caddr_t buf; #endif }; Modified: user/piso/ipfw/sys/netinet/libalias/alias_mod.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_mod.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_mod.c Mon Apr 13 13:07:51 2009 (r190998) @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include #include +#include +#include #include #include #else @@ -44,9 +46,11 @@ __FBSDID("$FreeBSD$"); #include #ifdef _KERNEL +#include #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -219,7 +223,7 @@ detach_handler(struct proto_handler *_p) } int -find_handler(int8_t dir, int8_t proto, struct libalias *la, __unused struct ip *pip, +find_handler(int8_t dir, int8_t proto, struct libalias *la, pkt_t ptr, struct alias_data *ad) { struct proto_handler *p; @@ -230,7 +234,16 @@ find_handler(int8_t dir, int8_t proto, s LIST_FOREACH(p, &handler_chain, entries) { if ((p->dir & dir) && (p->proto & proto)) if (p->fingerprint(la, ad) == 0) { - error = p->protohandler(la, pip, ad); +#ifdef _KERNEL + if (p->legacy) { + m_copydata(*ptr, 0, m_length(*ptr, NULL), la->buf); + error = p->protohandler(la, NULL, ad); + m_copyback(*ptr, 0, ((struct ip *)la->buf)->ip_len, + la->buf); + break; + } +#endif + error = p->protohandler(la, ptr, ad); break; } } Modified: user/piso/ipfw/sys/netinet/libalias/alias_mod.h ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_mod.h Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_mod.h Mon Apr 13 13:07:51 2009 (r190998) @@ -80,10 +80,11 @@ struct proto_handler { u_int pri; /* Handler priority. */ int16_t dir; /* Flow direction. */ uint8_t proto; /* Working protocol. */ + uint8_t legacy; /* Does it handle mbuf or not? */ int (*fingerprint)(struct libalias *, /* Fingerprint * function. */ struct alias_data *); int (*protohandler)(struct libalias *, /* Aliasing * function. */ - struct ip *, struct alias_data *); + pkt_t, struct alias_data *); LIST_ENTRY(proto_handler) entries; }; @@ -114,7 +115,7 @@ int LibAliasAttachHandlers(s int LibAliasDetachHandlers(struct proto_handler *); int detach_handler(struct proto_handler *); int find_handler(int8_t, int8_t, struct libalias *, - struct ip *, struct alias_data *); + pkt_t, struct alias_data *); struct proto_handler *first_handler(void); /* Functions used with dll module. */ Modified: user/piso/ipfw/sys/netinet/libalias/alias_nbt.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_nbt.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_nbt.c Mon Apr 13 13:07:51 2009 (r190998) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include #include +#include +#include #include #include #else @@ -59,9 +61,11 @@ __FBSDID("$FreeBSD$"); #include #ifdef _KERNEL +#include #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -71,11 +75,12 @@ __FBSDID("$FreeBSD$"); static int AliasHandleUdpNbt(struct libalias *, struct ip *, struct alias_link *, - struct in_addr *, u_short); + struct in_addr *, u_short); static int AliasHandleUdpNbtNS(struct libalias *, struct ip *, struct alias_link *, - struct in_addr *, u_short *, struct in_addr *, u_short *); + struct in_addr *, u_short *, struct in_addr *, u_short *); + static int fingerprint1(struct libalias *la, struct alias_data *ah) { @@ -90,9 +95,16 @@ fingerprint1(struct libalias *la, struct } static int -protohandler1(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler1(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); return (AliasHandleUdpNbt(la, pip, ah->lnk, ah->aaddr, *ah->aport)); } @@ -110,18 +122,32 @@ fingerprint2(struct libalias *la, struct } static int -protohandler2in(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler2in(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandleUdpNbtNS(la, pip, ah->lnk, ah->aaddr, ah->aport, - ah->oaddr, ah->dport); + ah->oaddr, ah->dport); return (0); } static int -protohandler2out(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler2out(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); return (AliasHandleUdpNbtNS(la, pip, ah->lnk, &pip->ip_src, ah->sport, ah->aaddr, ah->aport)); } @@ -132,6 +158,7 @@ struct proto_handler handlers[] = { .pri = 130, .dir = IN|OUT, .proto = UDP, + .legacy = 1, .fingerprint = &fingerprint1, .protohandler = &protohandler1 }, @@ -139,6 +166,7 @@ struct proto_handler handlers[] = { .pri = 140, .dir = IN, .proto = UDP, + .legacy = 1, .fingerprint = &fingerprint2, .protohandler = &protohandler2in }, @@ -146,6 +174,7 @@ struct proto_handler handlers[] = { .pri = 140, .dir = OUT, .proto = UDP, + .legacy = 1, .fingerprint = &fingerprint2, .protohandler = &protohandler2out }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_pptp.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_pptp.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_pptp.c Mon Apr 13 13:07:51 2009 (r190998) @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL #include +#include +#include #include #include #include @@ -98,25 +100,46 @@ fingerprintgre(struct libalias *la, stru } static int -protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandlerin(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandlePptpIn(la, pip, ah->lnk); return (0); } static int -protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandlerout(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandlePptpOut(la, pip, ah->lnk); return (0); } static int -protohandlergrein(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandlergrein(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY || AliasHandlePptpGreIn(la, pip) == 0) return (0); @@ -124,9 +147,16 @@ protohandlergrein(struct libalias *la, s } static int -protohandlergreout(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandlergreout(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); if (AliasHandlePptpGreOut(la, pip) == 0) return (0); return (-1); @@ -138,6 +168,7 @@ struct proto_handler handlers[] = { .pri = 200, .dir = IN, .proto = TCP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandlerin }, @@ -145,6 +176,7 @@ struct proto_handler handlers[] = { .pri = 210, .dir = OUT, .proto = TCP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, @@ -157,6 +189,7 @@ struct proto_handler handlers[] = { .pri = INT_MAX, .dir = IN, .proto = IP, + .legacy = 1, .fingerprint = &fingerprintgre, .protohandler = &protohandlergrein }, @@ -164,6 +197,7 @@ struct proto_handler handlers[] = { .pri = INT_MAX, .dir = OUT, .proto = IP, + .legacy = 1, .fingerprint = &fingerprintgre, .protohandler = &protohandlergreout }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_skinny.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_skinny.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_skinny.c Mon Apr 13 13:07:51 2009 (r190998) @@ -32,6 +32,8 @@ #ifdef _KERNEL #include +#include +#include #include #include #else @@ -46,9 +48,11 @@ #include #ifdef _KERNEL +#include #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -69,9 +73,16 @@ fingerprint(struct libalias *la, struct } static int -protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); AliasHandleSkinny(la, pip, ah->lnk); return (0); } @@ -81,6 +92,7 @@ struct proto_handler handlers[] = { .pri = 110, .dir = IN|OUT, .proto = TCP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandler }, Modified: user/piso/ipfw/sys/netinet/libalias/alias_smedia.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_smedia.c Mon Apr 13 11:54:22 2009 (r190997) +++ user/piso/ipfw/sys/netinet/libalias/alias_smedia.c Mon Apr 13 13:07:51 2009 (r190998) @@ -101,6 +101,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include #include +#include +#include #include #include #else @@ -120,6 +122,7 @@ __FBSDID("$FreeBSD$"); #include #include #else +#include "alias.h" #include "alias_local.h" #include "alias_mod.h" #endif @@ -150,9 +153,16 @@ fingerprint(struct libalias *la, struct } static int -protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) +protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - + struct ip *pip; + +#ifdef _KERNEL + if (ptr == NULL) + pip = (struct ip *)la->buf; + else +#endif + PULLUP_IPHDR(pip, ptr); if (ntohs(*ah->dport) == TFTP_PORT_NUMBER) FindRtspOut(la, pip->ip_src, pip->ip_dst, *ah->sport, *ah->aport, IPPROTO_UDP); @@ -165,6 +175,7 @@ struct proto_handler handlers[] = { .pri = 100, .dir = OUT, .proto = TCP|UDP, + .legacy = 1, .fingerprint = &fingerprint, .protohandler = &protohandler }, From owner-svn-src-user@FreeBSD.ORG Mon Apr 13 23:08:11 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12B7D106566B; Mon, 13 Apr 2009 23:08:11 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F25358FC1E; Mon, 13 Apr 2009 23:08:10 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DN8Apu086295; Mon, 13 Apr 2009 23:08:10 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3DN8APa086287; Mon, 13 Apr 2009 23:08:10 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904132308.n3DN8APa086287@svn.freebsd.org> From: Kip Macy Date: Mon, 13 Apr 2009 23:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191026 - in user/kmacy/releng_7_net_backport/sys: amd64/conf dev/cxgb dev/cxgb/common dev/cxgb/sys dev/fxp dev/nfe modules/cxgb modules/cxgb/cxgb modules/cxgb/cxgb_t3fw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 23:08:11 -0000 Author: kmacy Date: Mon Apr 13 23:08:10 2009 New Revision: 191026 URL: http://svn.freebsd.org/changeset/base/191026 Log: - update cxgb - add if_var.h to nfe & fxp Modified: user/kmacy/releng_7_net_backport/sys/amd64/conf/GENERIC user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_ael1002.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_common.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mc5.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mv88e1xxx.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_cpl.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_hw.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_tn1010.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_vsc7323.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_vsc8211.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_xgmac.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_adapter.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_config.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_include.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_ioctl.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_main.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_multiq.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_offload.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_offload.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_osdep.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_sge.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_t3fw.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_t3fw.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/sys/cxgb_support.c user/kmacy/releng_7_net_backport/sys/dev/cxgb/sys/uipc_mvec.c user/kmacy/releng_7_net_backport/sys/dev/fxp/if_fxp.c user/kmacy/releng_7_net_backport/sys/dev/nfe/if_nfe.c user/kmacy/releng_7_net_backport/sys/modules/cxgb/Makefile user/kmacy/releng_7_net_backport/sys/modules/cxgb/cxgb/Makefile user/kmacy/releng_7_net_backport/sys/modules/cxgb/cxgb_t3fw/Makefile Modified: user/kmacy/releng_7_net_backport/sys/amd64/conf/GENERIC ============================================================================== --- user/kmacy/releng_7_net_backport/sys/amd64/conf/GENERIC Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/amd64/conf/GENERIC Mon Apr 13 23:08:10 2009 (r191026) @@ -25,7 +25,7 @@ ident GENERIC #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="mxge zlib geom" +makeoptions MODULES_OVERRIDE="mxge zlib geom opensolaris zfs cxgb fxp nfe" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption @@ -66,6 +66,11 @@ options STOP_NMI # Stop CPUS using NMI options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in #options KDTRACE_HOOKS # Kernel DTrace hooks +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed + # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_ael1002.c Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_ael1002.c Mon Apr 13 23:08:10 2009 (r191026) @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2007-2008, Chelsio Inc. +Copyright (c) 2007-2009, Chelsio Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30,11 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); -#ifdef CONFIG_DEFINED #include -#else -#include -#endif #undef msleep #define msleep t3_os_sleep @@ -64,7 +60,17 @@ enum { enum { edc_none, edc_sr, edc_twinax }; /* PHY module I2C device address */ -#define MODULE_DEV_ADDR 0xa0 +enum { + MODULE_DEV_ADDR = 0xa0, + SFF_DEV_ADDR = 0xa2, +}; + +/* PHY transceiver type */ +enum { + phy_transtype_unknown = 0, + phy_transtype_sfp = 3, + phy_transtype_xfp = 6, +}; #define AEL2005_MODDET_IRQ 4 @@ -75,6 +81,8 @@ struct reg_val { unsigned short set_bits; }; +static int get_module_type(struct cphy *phy); + static int set_phy_regs(struct cphy *phy, const struct reg_val *rv) { int err; @@ -100,6 +108,110 @@ static void ael100x_txon(struct cphy *ph msleep(30); } +static int ael_i2c_rd(struct cphy *phy, int dev_addr, int word_addr) +{ + int i, err; + unsigned int stat, data; + + err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL_I2C_CTRL, + (dev_addr << 8) | (1 << 8) | word_addr); + if (err) + return err; + + for (i = 0; i < 200; i++) { + msleep(1); + err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL_I2C_STAT, &stat); + if (err) + return err; + if ((stat & 3) == 1) { + err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL_I2C_DATA, + &data); + if (err) + return err; + return data >> 8; + } + } + CH_WARN(phy->adapter, "PHY %u I2C read of addr %u timed out\n", + phy->addr, word_addr); + return -ETIMEDOUT; +} + +static int ael_i2c_wr(struct cphy *phy, int dev_addr, int word_addr, int data) +{ + int i, err; + unsigned int stat; + + err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL_I2C_DATA, data); + if (err) + return err; + + err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL_I2C_CTRL, + (dev_addr << 8) | word_addr); + if (err) + return err; + + for (i = 0; i < 200; i++) { + msleep(1); + err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL_I2C_STAT, &stat); + if (err) + return err; + if ((stat & 3) == 1) + return 0; + } + CH_WARN(phy->adapter, "PHY %u I2C Write of addr %u timed out\n", + phy->addr, word_addr); + return -ETIMEDOUT; +} + +static int get_phytrans_type(struct cphy *phy) +{ + int v; + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0); + if (v < 0) + return phy_transtype_unknown; + + return v; +} + +static int ael_laser_down(struct cphy *phy, int enable) +{ + int v, dev_addr; + + v = get_phytrans_type(phy); + if (v < 0) + return v; + + if (v == phy_transtype_sfp) { + /* Check SFF Soft TX disable is supported */ + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 93); + if (v < 0) + return v; + + v &= 0x40; + if (!v) + return v; + + dev_addr = SFF_DEV_ADDR; + } else if (v == phy_transtype_xfp) + dev_addr = MODULE_DEV_ADDR; + else + return v; + + v = ael_i2c_rd(phy, dev_addr, 110); + if (v < 0) + return v; + + if (enable) + v |= 0x40; + else + v &= ~0x40; + + v = ael_i2c_wr(phy, dev_addr, 110, v); + + return v; +} + static int ael1002_power_down(struct cphy *phy, int enable) { int err; @@ -111,6 +223,18 @@ static int ael1002_power_down(struct cph return err; } +static int ael1002_get_module_type(struct cphy *phy, int delay_ms) +{ + int v; + + if (delay_ms) + msleep(delay_ms); + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0); + + return v == -ETIMEDOUT ? phy_modtype_none : get_module_type(phy); +} + static int ael1002_reset(struct cphy *phy, int wait) { int err; @@ -123,6 +247,11 @@ static int ael1002_reset(struct cphy *ph (err = t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, AEL1002_LB_EN, 0, 1 << 5))) return err; + + err = ael1002_get_module_type(phy, 300); + if (err >= 0) + phy->modtype = err; + return 0; } @@ -186,40 +315,55 @@ static struct cphy_ops ael1002_ops = { int t3_ael1002_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, const struct mdio_ops *mdio_ops) { + int err; + cphy_init(phy, adapter, phy_addr, &ael1002_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE, "10GBASE-R"); ael100x_txon(phy); + ael_laser_down(phy, 0); + + err = ael1002_get_module_type(phy, 0); + if (err >= 0) + phy->modtype = err; + return 0; } static int ael1006_reset(struct cphy *phy, int wait) { - u32 gpio_out; - t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); - /* Hack to reset the phy correctly */ - /* Read out the current value */ - gpio_out = t3_read_reg(phy->adapter, A_T3DBG_GPIO_EN); - /* Reset the phy */ - gpio_out &= ~F_GPIO6_OUT_VAL; - t3_write_reg(phy->adapter, A_T3DBG_GPIO_EN, gpio_out); + int err; + + err = t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); + if (err) + return err; + + t3_set_reg_field(phy->adapter, A_T3DBG_GPIO_EN, + F_GPIO6_OUT_VAL, 0); + msleep(125); - /* Take the phy out of reset */ - gpio_out |= F_GPIO6_OUT_VAL; - t3_write_reg(phy->adapter, A_T3DBG_GPIO_EN, gpio_out); + + t3_set_reg_field(phy->adapter, A_T3DBG_GPIO_EN, + F_GPIO6_OUT_VAL, F_GPIO6_OUT_VAL); + msleep(125); - t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); - /* Phy loopback work around for ael1006 */ - /* Soft reset phy by toggling loopback */ - msleep(125); - /* Put phy into local loopback */ - t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 0, 1); - msleep(125); - /* Take phy out of local loopback */ - t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 1, 0); + err = t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); + if (err) + return err; - return 0; + msleep(125); + + err = t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 1, 1); + if (err) + return err; + + msleep(125); + + err = t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 1, 0); + + return err; + } static int ael1006_power_down(struct cphy *phy, int enable) @@ -959,81 +1103,71 @@ static int ael2005_setup_twinax_edc(stru return err; } -static int ael2005_i2c_rd(struct cphy *phy, int dev_addr, int word_addr) -{ - int i, err; - unsigned int stat, data; - - err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL_I2C_CTRL, - (dev_addr << 8) | (1 << 8) | word_addr); - if (err) - return err; - - for (i = 0; i < 5; i++) { - msleep(1); - err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL_I2C_STAT, &stat); - if (err) - return err; - if ((stat & 3) == 1) { - err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL_I2C_DATA, - &data); - if (err) - return err; - return data >> 8; - } - } - CH_WARN(phy->adapter, "PHY %u I2C read of addr %u timed out\n", - phy->addr, word_addr); - return -ETIMEDOUT; -} - -static int get_module_type(struct cphy *phy, int delay_ms) +static int get_module_type(struct cphy *phy) { int v; - unsigned int stat; - v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, &stat); - if (v) - return v; + v = get_phytrans_type(phy); + if (v == phy_transtype_sfp) { + /* SFP: see SFF-8472 for below */ - if (stat & (1 << 8)) /* module absent */ - return phy_modtype_none; + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 3); + if (v < 0) + return v; - if (delay_ms) - msleep(delay_ms); + if (v == 0x1) + return phy_modtype_twinax; + if (v == 0x10) + return phy_modtype_sr; + if (v == 0x20) + return phy_modtype_lr; + if (v == 0x40) + return phy_modtype_lrm; - /* see SFF-8472 for below */ - v = ael2005_i2c_rd(phy, MODULE_DEV_ADDR, 3); - if (v < 0) - return v; + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6); + if (v < 0) + return v; + if (v != 4) + return phy_modtype_unknown; - if (v == 0x10) - return phy_modtype_sr; - if (v == 0x20) - return phy_modtype_lr; - if (v == 0x40) - return phy_modtype_lrm; + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 10); + if (v < 0) + return v; - v = ael2005_i2c_rd(phy, MODULE_DEV_ADDR, 6); - if (v < 0) - return v; - if (v != 4) - goto unknown; + if (v & 0x80) { + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12); + if (v < 0) + return v; + return v > 10 ? phy_modtype_twinax_long : + phy_modtype_twinax; + } + } else if (v == phy_transtype_xfp) { + /* XFP: See INF-8077i for details. */ - v = ael2005_i2c_rd(phy, MODULE_DEV_ADDR, 10); - if (v < 0) - return v; + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 127); + if (v < 0) + return v; - if (v & 0x80) { - v = ael2005_i2c_rd(phy, MODULE_DEV_ADDR, 0x12); + if (v != 1) { + /* XXX: set page select to table 1 yourself */ + return phy_modtype_unknown; + } + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); if (v < 0) return v; - return v > 10 ? phy_modtype_twinax_long : phy_modtype_twinax; + if (v == 0x10) + return phy_modtype_lrm; + if (v == 0x40) + return phy_modtype_lr; + if (v == 0x80) + return phy_modtype_sr; } -unknown: + return phy_modtype_unknown; } + static int ael2005_intr_enable(struct cphy *phy) { int err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, 0x200); @@ -1052,6 +1186,24 @@ static int ael2005_intr_clear(struct cph return err ? err : t3_phy_lasi_intr_clear(phy); } +static int ael2005_get_module_type(struct cphy *phy, int delay_ms) +{ + int v; + unsigned int stat; + + v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, &stat); + if (v) + return v; + + if (stat & (1 << 8)) /* module absent */ + return phy_modtype_none; + + if (delay_ms) + msleep(delay_ms); + + return get_module_type(phy); +} + static int ael2005_reset(struct cphy *phy, int wait) { static struct reg_val regs0[] = { @@ -1088,7 +1240,7 @@ static int ael2005_reset(struct cphy *ph msleep(50); - err = get_module_type(phy, 0); + err = ael2005_get_module_type(phy, 0); if (err < 0) return err; phy->modtype = (u8)err; @@ -1126,7 +1278,7 @@ static int ael2005_intr_handler(struct c return ret; /* modules have max 300 ms init time after hot plug */ - ret = get_module_type(phy, 300); + ret = ael2005_get_module_type(phy, 300); if (ret < 0) return ret; @@ -1147,7 +1299,13 @@ static int ael2005_intr_handler(struct c } ret = t3_phy_lasi_intr_handler(phy); - return ret < 0 ? ret : ret + cause; + if (ret < 0) + return ret; + + ret |= cause; + if (!ret) + ret |= cphy_cause_link_change; + return ret; } #ifdef C99_NOT_SUPPORTED @@ -1180,10 +1338,17 @@ static struct cphy_ops ael2005_ops = { int t3_ael2005_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, const struct mdio_ops *mdio_ops) { + int err; cphy_init(phy, adapter, phy_addr, &ael2005_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE | SUPPORTED_IRQ, "10GBASE-R"); msleep(125); + ael_laser_down(phy, 0); + + err = ael2005_get_module_type(phy, 0); + if (err >= 0) + phy->modtype = err; + return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, AEL_OPT_SETTINGS, 0, 1 << 5); } @@ -1269,7 +1434,7 @@ static int xaui_direct_get_link_status(s { if (link_ok) { unsigned int status; - + status = t3_read_reg(phy->adapter, XGM_REG(A_XGM_SERDES_STAT0, phy->addr)) | t3_read_reg(phy->adapter, Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_common.h Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_common.h Mon Apr 13 23:08:10 2009 (r191026) @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2007-2008, Chelsio Inc. +Copyright (c) 2007-2009, Chelsio Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -31,11 +31,7 @@ $FreeBSD$ #ifndef __CHELSIO_COMMON_H #define __CHELSIO_COMMON_H -#ifdef CONFIG_DEFINED #include -#else -#include -#endif enum { MAX_FRAME_SIZE = 10240, /* max MAC frame size, includes header + FCS */ @@ -96,12 +92,22 @@ enum { (((x) >> S_TP_VERSION_MICRO) & M_TP_VERSION_MICRO) enum { - FW_VERSION_MAJOR = 5, - FW_VERSION_MINOR = 0, + FW_VERSION_MAJOR = 7, + FW_VERSION_MINOR = 1, FW_VERSION_MICRO = 0 }; enum { + LA_CTRL = 0x80, + LA_DATA = 0x84, + LA_ENTRIES = 512 +}; + +enum { + IOQ_ENTRIES = 7 +}; + +enum { SGE_QSETS = 8, /* # of SGE Tx/Rx/RspQ sets */ SGE_RXQ_PER_SET = 2, /* # of Rx queues per set */ SGE_TXQ_PER_SET = 3 /* # of Tx queues per set */ @@ -147,8 +153,6 @@ struct adapter_info { unsigned char nports0; /* # of ports on channel 0 */ unsigned char nports1; /* # of ports on channel 1 */ unsigned char phy_base_addr; /* MDIO PHY base address */ - unsigned char mdien:1; - unsigned char mdiinv:1; unsigned int gpio_out; /* GPIO output settings */ unsigned char gpio_intr[MAX_PHYINTRS]; /* GPIO PHY IRQ pins */ unsigned long caps; /* adapter capabilities */ @@ -235,6 +239,8 @@ struct mac_stats { unsigned long num_toggled; /* # times toggled TxEn due to stuck TX */ unsigned long num_resets; /* # times reset due to stuck TX */ + + unsigned long link_faults; /* # detected link faults */ }; struct tp_mib_stats { @@ -349,6 +355,14 @@ struct vpd_params { unsigned short xauicfg[2]; }; +struct generic_vpd { + u32 offset; + u32 len; + u8 *data; +}; + +enum { MAX_VPD_BYTES = 32000 }; + struct pci_params { unsigned int vpd_cap_addr; unsigned int pcie_cap_addr; @@ -605,11 +619,7 @@ struct addr_val_pair { unsigned int val; }; -#ifdef CONFIG_DEFINED #include -#else -#include -#endif #ifndef PCI_VENDOR_ID_CHELSIO # define PCI_VENDOR_ID_CHELSIO 0x1425 @@ -682,6 +692,8 @@ int t3_phy_lasi_intr_handler(struct cphy void t3_intr_enable(adapter_t *adapter); void t3_intr_disable(adapter_t *adapter); void t3_intr_clear(adapter_t *adapter); +void t3_xgm_intr_enable(adapter_t *adapter, int idx); +void t3_xgm_intr_disable(adapter_t *adapter, int idx); void t3_port_intr_enable(adapter_t *adapter, int idx); void t3_port_intr_disable(adapter_t *adapter, int idx); void t3_port_intr_clear(adapter_t *adapter, int idx); @@ -689,29 +701,34 @@ int t3_slow_intr_handler(adapter_t *adap int t3_phy_intr_handler(adapter_t *adapter); void t3_link_changed(adapter_t *adapter, int port_id); +void t3_link_fault(adapter_t *adapter, int port_id); int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc); const struct adapter_info *t3_get_adapter_info(unsigned int board_id); int t3_seeprom_read(adapter_t *adapter, u32 addr, u32 *data); int t3_seeprom_write(adapter_t *adapter, u32 addr, u32 data); int t3_seeprom_wp(adapter_t *adapter, int enable); +int t3_get_vpd_len(adapter_t *adapter, struct generic_vpd *vpd); +int t3_read_vpd(adapter_t *adapter, struct generic_vpd *vpd); int t3_read_flash(adapter_t *adapter, unsigned int addr, unsigned int nwords, u32 *data, int byte_oriented); int t3_get_tp_version(adapter_t *adapter, u32 *vers); -int t3_check_tpsram_version(adapter_t *adapter, int *must_load); +int t3_check_tpsram_version(adapter_t *adapter); int t3_check_tpsram(adapter_t *adapter, const u8 *tp_ram, unsigned int size); int t3_load_fw(adapter_t *adapter, const u8 *fw_data, unsigned int size); int t3_get_fw_version(adapter_t *adapter, u32 *vers); -int t3_check_fw_version(adapter_t *adapter, int *must_load); +int t3_check_fw_version(adapter_t *adapter); int t3_load_boot(adapter_t *adapter, u8 *fw_data, unsigned int size); int t3_init_hw(adapter_t *adapter, u32 fw_params); void mac_prep(struct cmac *mac, adapter_t *adapter, int index); void early_hw_init(adapter_t *adapter, const struct adapter_info *ai); +int t3_reset_adapter(adapter_t *adapter); int t3_prep_adapter(adapter_t *adapter, const struct adapter_info *ai, int reset); int t3_reinit_adapter(adapter_t *adap); void t3_led_ready(adapter_t *adapter); void t3_fatal_err(adapter_t *adapter); void t3_set_vlan_accel(adapter_t *adapter, unsigned int ports, int on); void t3_enable_filters(adapter_t *adap); +void t3_disable_filters(adapter_t *adap); void t3_tp_set_offload_mode(adapter_t *adap, int enable); void t3_config_rss(adapter_t *adapter, unsigned int rss_config, const u8 *cpus, const u16 *rspq); @@ -728,6 +745,8 @@ int t3_mc7_bd_read(struct mc7 *mc7, unsi int t3_mac_reset(struct cmac *mac); void t3b_pcs_reset(struct cmac *mac); +void t3_mac_disable_exact_filters(struct cmac *mac); +void t3_mac_enable_exact_filters(struct cmac *mac); int t3_mac_enable(struct cmac *mac, int which); int t3_mac_disable(struct cmac *mac, int which); int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu); @@ -758,6 +777,8 @@ void t3_get_cong_cntl_tab(adapter_t *ada unsigned short incr[NMTUS][NCCTRL_WIN]); void t3_config_trace_filter(adapter_t *adapter, const struct trace_params *tp, int filter_index, int invert, int enable); +void t3_query_trace_filter(adapter_t *adapter, struct trace_params *tp, + int filter_index, int *inverted, int *enabled); int t3_config_sched(adapter_t *adap, unsigned int kbps, int sched); int t3_set_sched_ipg(adapter_t *adap, int sched, unsigned int ipg); void t3_get_tx_sched(adapter_t *adap, unsigned int sched, unsigned int *kbps, @@ -767,6 +788,10 @@ void t3_set_pace_tbl(adapter_t *adap, un unsigned int start, unsigned int n); #endif +int t3_get_up_la(adapter_t *adapter, u32 *stopped, u32 *index, + u32 *size, void *data); +int t3_get_up_ioqs(adapter_t *adapter, u32 *size, void *data); + void t3_sge_prep(adapter_t *adap, struct sge_params *p); void t3_sge_init(adapter_t *adap, struct sge_params *p); int t3_sge_init_ecntxt(adapter_t *adapter, unsigned int id, int gts_enable, @@ -803,6 +828,11 @@ int t3_vsc7323_enable(adapter_t *adap, i int t3_vsc7323_disable(adapter_t *adap, int port, int which); const struct mac_stats *t3_vsc7323_update_stats(struct cmac *mac); +int t3_mi1_read(adapter_t *adapter, int phy_addr, int mmd_addr, int reg_addr, + unsigned int *valp); +int t3_mi1_write(adapter_t *adapter, int phy_addr, int mmd_addr, int reg_addr, + unsigned int val); + int t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, const struct mdio_ops *mdio_ops); int t3_vsc8211_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mc5.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mc5.c Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mc5.c Mon Apr 13 23:08:10 2009 (r191026) @@ -30,13 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); -#ifdef CONFIG_DEFINED #include #include -#else -#include -#include -#endif enum { IDT75P52100 = 4, Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mv88e1xxx.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Mon Apr 13 23:08:10 2009 (r191026) @@ -30,11 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); -#ifdef CONFIG_DEFINED #include -#else -#include -#endif /* Marvell PHY interrupt status bits. */ #define MV_INTR_JABBER 0x0001 Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_cpl.h ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_cpl.h Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_cpl.h Mon Apr 13 23:08:10 2009 (r191026) @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2007, Chelsio Inc. +Copyright (c) 2007-2009 Chelsio Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -273,6 +273,14 @@ struct work_request_hdr { #define V_WR_FLUSH(x) ((x) << S_WR_FLUSH) #define F_WR_FLUSH V_WR_FLUSH(1U) +#define S_WR_CHN 18 +#define V_WR_CHN(x) ((x) << S_WR_CHN) +#define F_WR_CHN V_WR_CHN(1U) + +#define S_WR_CHN_VLD 19 +#define V_WR_CHN_VLD(x) ((x) << S_WR_CHN_VLD) +#define F_WR_CHN_VLD V_WR_CHN_VLD(1U) + #define S_WR_DATATYPE 20 #define V_WR_DATATYPE(x) ((x) << S_WR_DATATYPE) #define F_WR_DATATYPE V_WR_DATATYPE(1U) Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_hw.c Mon Apr 13 22:17:03 2009 (r191025) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/common/cxgb_t3_hw.c Mon Apr 13 23:08:10 2009 (r191026) @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2007, Chelsio Inc. +Copyright (c) 2007-2009, Chelsio Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -197,21 +197,18 @@ int t3_mc7_bd_read(struct mc7 *mc7, unsi static void mi1_init(adapter_t *adap, const struct adapter_info *ai) { u32 clkdiv = adap->params.vpd.cclk / (2 * adap->params.vpd.mdc) - 1; - u32 val = F_PREEN | V_MDIINV(ai->mdiinv) | V_MDIEN(ai->mdien) | - V_CLKDIV(clkdiv); + u32 val = F_PREEN | V_CLKDIV(clkdiv); - if (!(ai->caps & SUPPORTED_10000baseT_Full)) - val |= V_ST(1); t3_write_reg(adap, A_MI1_CFG, val); } #define MDIO_ATTEMPTS 20 /* - * MI1 read/write operations for direct-addressed PHYs. + * MI1 read/write operations for clause 22 PHYs. */ -static int mi1_read(adapter_t *adapter, int phy_addr, int mmd_addr, - int reg_addr, unsigned int *valp) +int t3_mi1_read(adapter_t *adapter, int phy_addr, int mmd_addr, + int reg_addr, unsigned int *valp) { int ret; u32 addr = V_REGADDR(reg_addr) | V_PHYADDR(phy_addr); @@ -220,6 +217,7 @@ static int mi1_read(adapter_t *adapter, return -EINVAL; MDIO_LOCK(adapter); + t3_set_reg_field(adapter, A_MI1_CFG, V_ST(M_ST), V_ST(1)); t3_write_reg(adapter, A_MI1_ADDR, addr); t3_write_reg(adapter, A_MI1_OP, V_MDI_OP(2)); ret = t3_wait_op_done(adapter, A_MI1_OP, F_BUSY, 0, MDIO_ATTEMPTS, 10); @@ -229,8 +227,8 @@ static int mi1_read(adapter_t *adapter, return ret; } -static int mi1_write(adapter_t *adapter, int phy_addr, int mmd_addr, - int reg_addr, unsigned int val) +int t3_mi1_write(adapter_t *adapter, int phy_addr, int mmd_addr, + int reg_addr, unsigned int val) { int ret; u32 addr = V_REGADDR(reg_addr) | V_PHYADDR(phy_addr); @@ -239,6 +237,7 @@ static int mi1_write(adapter_t *adapter, return -EINVAL; MDIO_LOCK(adapter); + t3_set_reg_field(adapter, A_MI1_CFG, V_ST(M_ST), V_ST(1)); t3_write_reg(adapter, A_MI1_ADDR, addr); t3_write_reg(adapter, A_MI1_DATA, val); t3_write_reg(adapter, A_MI1_OP, V_MDI_OP(1)); @@ -248,12 +247,12 @@ static int mi1_write(adapter_t *adapter, } static struct mdio_ops mi1_mdio_ops = { - mi1_read, - mi1_write + t3_mi1_read, + t3_mi1_write }; /* - * MI1 read/write operations for indirect-addressed PHYs. + * MI1 read/write operations for clause 45 PHYs. */ static int mi1_ext_read(adapter_t *adapter, int phy_addr, int mmd_addr, int reg_addr, unsigned int *valp) @@ -262,6 +261,7 @@ static int mi1_ext_read(adapter_t *adapt u32 addr = V_REGADDR(mmd_addr) | V_PHYADDR(phy_addr); MDIO_LOCK(adapter); + t3_set_reg_field(adapter, A_MI1_CFG, V_ST(M_ST), 0); t3_write_reg(adapter, A_MI1_ADDR, addr); t3_write_reg(adapter, A_MI1_DATA, reg_addr); t3_write_reg(adapter, A_MI1_OP, V_MDI_OP(0)); @@ -284,6 +284,7 @@ static int mi1_ext_write(adapter_t *adap u32 addr = V_REGADDR(mmd_addr) | V_PHYADDR(phy_addr); MDIO_LOCK(adapter); + t3_set_reg_field(adapter, A_MI1_CFG, V_ST(M_ST), 0); t3_write_reg(adapter, A_MI1_ADDR, addr); t3_write_reg(adapter, A_MI1_DATA, reg_addr); t3_write_reg(adapter, A_MI1_OP, V_MDI_OP(0)); @@ -488,32 +489,32 @@ int t3_phy_lasi_intr_handler(struct cphy } static struct adapter_info t3_adap_info[] = { - { 1, 1, 0, 0, 0, + { 1, 1, 0, F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO2_OUT_VAL | F_GPIO4_OUT_VAL, { S_GPIO3, S_GPIO5 }, 0, &mi1_mdio_ops, "Chelsio PE9000" }, - { 1, 1, 0, 0, 0, + { 1, 1, 0, F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO2_OUT_VAL | F_GPIO4_OUT_VAL, { S_GPIO3, S_GPIO5 }, 0, &mi1_mdio_ops, "Chelsio T302" }, - { 1, 0, 0, 0, 0, + { 1, 0, 0, F_GPIO1_OEN | F_GPIO6_OEN | F_GPIO7_OEN | F_GPIO10_OEN | F_GPIO11_OEN | F_GPIO1_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, { 0 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI, &mi1_mdio_ext_ops, "Chelsio T310" }, - { 1, 1, 0, 0, 0, + { 1, 1, 0, F_GPIO1_OEN | F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO5_OEN | F_GPIO6_OEN | F_GPIO7_OEN | F_GPIO10_OEN | F_GPIO11_OEN | F_GPIO1_OUT_VAL | F_GPIO5_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, { S_GPIO9, S_GPIO3 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI, &mi1_mdio_ext_ops, "Chelsio T320" }, - { 4, 0, 0, 0, 0, + { 4, 0, 0, F_GPIO5_OEN | F_GPIO6_OEN | F_GPIO7_OEN | F_GPIO5_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO7_OUT_VAL, { S_GPIO1, S_GPIO2, S_GPIO3, S_GPIO4 }, SUPPORTED_AUI, &mi1_mdio_ops, "Chelsio T304" }, { 0 }, - { 1, 0, 0, 0, 0, + { 1, 0, 0, F_GPIO1_OEN | F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO6_OEN | F_GPIO7_OEN | F_GPIO10_OEN | F_GPIO1_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, { S_GPIO9 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI, @@ -750,16 +751,17 @@ enum { SF_ERASE_SECTOR = 0xd8, /* erase sector */ FW_FLASH_BOOT_ADDR = 0x70000, /* start address of FW in flash */ - OLD_FW_VERS_ADDR = 0x77ffc, /* flash address holding FW version */ FW_VERS_ADDR = 0x7fffc, /* flash address holding FW version */ + FW_VERS_ADDR_PRE8 = 0x77ffc,/* flash address holding FW version pre8 */ FW_MIN_SIZE = 8, /* at least version and csum */ FW_MAX_SIZE = FW_VERS_ADDR - FW_FLASH_BOOT_ADDR, + FW_MAX_SIZE_PRE8 = FW_VERS_ADDR_PRE8 - FW_FLASH_BOOT_ADDR, BOOT_FLASH_BOOT_ADDR = 0x0,/* start address of boot image in flash */ BOOT_SIGNATURE = 0xaa55, /* signature of BIOS boot ROM */ BOOT_SIZE_INC = 512, /* image size measured in 512B chunks */ BOOT_MIN_SIZE = sizeof(boot_header_t), /* at least basic header */ - BOOT_MAX_SIZE = 0xff*BOOT_SIZE_INC /* 1 byte * length increment */ + BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC /* 1 byte * length increment */ }; /** @@ -888,7 +890,7 @@ int t3_read_flash(adapter_t *adapter, un * at the given address. * If @byte_oriented is set the write data is stored as a 32-bit * big-endian array, otherwise in the processor's native endianess. - * + * */ static int t3_write_flash(adapter_t *adapter, unsigned int addr, unsigned int n, const u8 *data, @@ -949,7 +951,7 @@ int t3_get_tp_version(adapter_t *adapter 1, 1, 5, 1); if (ret) return ret; - + *vers = t3_read_reg(adapter, A_TP_EMBED_OP_FIELD1); return 0; @@ -960,7 +962,7 @@ int t3_get_tp_version(adapter_t *adapter * @adapter: the adapter * */ -int t3_check_tpsram_version(adapter_t *adapter, int *must_load) +int t3_check_tpsram_version(adapter_t *adapter) { int ret; u32 vers; @@ -969,26 +971,19 @@ int t3_check_tpsram_version(adapter_t *a if (adapter->params.rev == T3_REV_A) return 0; - *must_load = 1; ret = t3_get_tp_version(adapter, &vers); if (ret) return ret; - + vers = t3_read_reg(adapter, A_TP_EMBED_OP_FIELD1); major = G_TP_VERSION_MAJOR(vers); minor = G_TP_VERSION_MINOR(vers); - if (major == TP_VERSION_MAJOR && minor == TP_VERSION_MINOR) + if (major == TP_VERSION_MAJOR && minor == TP_VERSION_MINOR) return 0; - - if (major != TP_VERSION_MAJOR) - CH_ERR(adapter, "found wrong TP version (%u.%u), " - "driver needs version %d.%d\n", major, minor, - TP_VERSION_MAJOR, TP_VERSION_MINOR); else { - *must_load = 0; CH_ERR(adapter, "found wrong TP version (%u.%u), " "driver compiled for version %d.%d\n", major, minor, TP_VERSION_MAJOR, TP_VERSION_MINOR); @@ -997,7 +992,7 @@ int t3_check_tpsram_version(adapter_t *a } /** - * t3_check_tpsram - check if provided protocol SRAM + * t3_check_tpsram - check if provided protocol SRAM * is compatible with this driver * @adapter: the adapter * @tp_sram: the firmware image to write @@ -1034,16 +1029,17 @@ enum fw_version_type { * @adapter: the adapter * @vers: where to place the version * - * Reads the FW version from flash. + * Reads the FW version from flash. Note that we had to move the version + * due to FW size. If we don't find a valid FW version in the new location + * we fall back and read the old location. */ int t3_get_fw_version(adapter_t *adapter, u32 *vers) { int ret = t3_read_flash(adapter, FW_VERS_ADDR, 1, vers, 0); - if (!ret && *vers != 0xffffffff) return 0; else - return t3_read_flash(adapter, OLD_FW_VERS_ADDR, 1, vers, 0); + return t3_read_flash(adapter, FW_VERS_ADDR_PRE8, 1, vers, 0); } /** @@ -1053,13 +1049,12 @@ int t3_get_fw_version(adapter_t *adapter * Checks if an adapter's FW is compatible with the driver. Returns 0 * if the versions are compatible, a negative error otherwise. */ -int t3_check_fw_version(adapter_t *adapter, int *must_load) +int t3_check_fw_version(adapter_t *adapter) { int ret; u32 vers; unsigned int type, major, minor; - *must_load = 1; ret = t3_get_fw_version(adapter, &vers); if (ret) return ret; @@ -1072,16 +1067,11 @@ int t3_check_fw_version(adapter_t *adapt minor == FW_VERSION_MINOR) return 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Apr 13 23:08:38 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11C9C106564A; Mon, 13 Apr 2009 23:08:38 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F21558FC14; Mon, 13 Apr 2009 23:08:37 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DN8bPb086339; Mon, 13 Apr 2009 23:08:37 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3DN8b2W086337; Mon, 13 Apr 2009 23:08:37 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904132308.n3DN8b2W086337@svn.freebsd.org> From: Kip Macy Date: Mon, 13 Apr 2009 23:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191027 - user/kmacy/releng_7_net_backport/sys/dev/cxgb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 23:08:38 -0000 Author: kmacy Date: Mon Apr 13 23:08:37 2009 New Revision: 191027 URL: http://svn.freebsd.org/changeset/base/191027 Log: add t3c firmware Added: user/kmacy/releng_7_net_backport/sys/dev/cxgb/t3c_protocol_sram.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/t3c_tp_eeprom.h Added: user/kmacy/releng_7_net_backport/sys/dev/cxgb/t3c_protocol_sram.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/t3c_protocol_sram.h Mon Apr 13 23:08:37 2009 (r191027) @@ -0,0 +1,678 @@ +/************************************************************************** + +Copyright (c) 2007-2009, Chelsio Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 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 +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN22 +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +$FreeBSD: head/sys/dev/cxgb/t3c_protocol_sram.h 189643 2009-03-10 19:22:45Z gnn $ + +***************************************************************************/ + +#define U (unsigned char) + +static unsigned int t3c_protocol_sram_length = 2564; +static unsigned char t3c_protocol_sram[2564] = { + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x01, U 0x01, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF3, + U 0xD0, U 0x34, U 0x03, U 0xE2, + U 0x80, U 0x26, U 0x2A, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x00, U 0x70, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x80, + U 0xC6, U 0x04, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xFB, + U 0xD0, U 0x34, U 0x03, U 0xE2, + U 0x80, U 0x28, U 0x29, U 0x21, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x06, U 0x00, U 0x02, U 0x37, + U 0x01, U 0xC5, U 0xC0, U 0x02, + U 0x13, U 0x94, U 0x04, U 0x80, + U 0xC6, U 0x05, U 0x70, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x82, U 0x00, U 0x02, U 0x06, + U 0x37, U 0x03, U 0x08, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x20, U 0x80, U 0x00, U 0x80, + U 0x8D, U 0xF4, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF9, + U 0xC4, U 0x31, U 0x00, U 0x00, + U 0x00, U 0x28, U 0x2C, U 0x81, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x4E, U 0x70, U 0x02, U 0x1D, + U 0x00, U 0xC5, U 0xC0, U 0x02, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xC1, U 0x18, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF1, + U 0xC0, U 0x00, U 0x03, U 0xE6, + U 0x80, U 0x28, U 0x28, U 0x21, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x02, + U 0x13, U 0x94, U 0x04, U 0x00, + U 0x00, U 0x01, U 0x70, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xFA, + U 0x10, U 0x34, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x01, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x60, U 0x00, U 0x00, U 0x06, + U 0x20, U 0x03, U 0x08, U 0x02, + U 0x70, U 0x00, U 0x00, U 0xF0, + U 0x80, U 0x25, U 0x9A, U 0x90, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF9, + U 0xC8, U 0x31, U 0x02, U 0x02, + U 0x0A, U 0x00, U 0x02, U 0x42, + U 0x00, U 0x00, U 0x00, U 0x81, + U 0x80, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF1, + U 0xC8, U 0x31, U 0x03, U 0xC2, + U 0x0A, U 0x96, U 0x2A, U 0x42, + U 0x00, U 0x00, U 0x00, U 0x81, + U 0x80, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x04, U 0x31, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x04, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x20, U 0xB0, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x13, U 0x94, U 0x04, U 0x00, + U 0xC1, U 0x19, U 0x70, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x02, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x68, U 0x0C, U 0x20, U 0x01, + U 0x00, U 0x00, U 0x10, U 0x90, + U 0xFF, U 0xFF, U 0xFF, U 0xF9, + U 0xC0, U 0x31, U 0xC3, U 0xE6, + U 0x00, U 0x26, U 0x6A, U 0x42, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF2, + U 0x10, U 0xF4, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x02, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x60, U 0x50, U 0x08, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x02, + U 0x70, U 0x0C, U 0x20, U 0xF1, + U 0x80, U 0x25, U 0x9A, U 0x90, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x06, U 0x00, U 0x00, U 0x04, + U 0x01, U 0x00, U 0x40, U 0x02, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x02, + U 0x28, U 0x8C, U 0x10, U 0x80, + U 0x85, U 0xC0, U 0x10, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x4E, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF9, + U 0xC0, U 0x00, U 0x02, U 0xDA, + U 0x00, U 0x06, U 0x1A, U 0x42, + U 0x00, U 0x00, U 0x00, U 0x83, + U 0x90, U 0x35, U 0xC0, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF9, + U 0xCA, U 0x31, U 0xC3, U 0xC6, + U 0x0A, U 0x96, U 0x6A, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x4E, U 0x50, U 0x14, U 0x39, + U 0x1C, U 0xC5, U 0xC0, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x02, + U 0x28, U 0x8C, U 0x10, U 0x80, + U 0x85, U 0xC0, U 0x10, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF3, + U 0xCA, U 0x33, U 0x23, U 0xD6, + U 0x0E, U 0x96, U 0x6A, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x00, U 0x00, U 0x04, U 0x06, + U 0x20, U 0xD0, U 0x02, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x00, U 0xD0, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x83, + U 0x90, U 0x31, U 0xC0, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xFB, + U 0xCA, U 0x33, U 0xE3, U 0xD2, + U 0x0E, U 0x96, U 0x6A, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x00, U 0x50, U 0x1A, U 0x10, + U 0x00, U 0x30, U 0x02, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x00, U 0x00, U 0x02, U 0x02, + U 0x20, U 0x03, U 0x08, U 0x00, + U 0x70, U 0x00, U 0x00, U 0xF9, + U 0x90, U 0x11, U 0x8A, U 0x90, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF1, + U 0xC0, U 0x50, U 0x1B, U 0xA2, + U 0x00, U 0xD2, U 0x02, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF8, + U 0x40, U 0x00, U 0x02, U 0x03, + U 0x00, U 0x10, U 0x00, U 0x02, + U 0x70, U 0x00, U 0x00, U 0xE8, + U 0x90, U 0x34, U 0x4A, U 0x90, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xFA, + U 0x10, U 0xF4, U 0x02, U 0x08, + U 0x00, U 0xC0, U 0x02, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x02, + U 0x72, U 0x8C, U 0xC8, U 0xD9, + U 0x93, U 0x89, U 0x10, U 0x90, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x82, U 0x90, U 0x00, U 0x00, + U 0x03, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF2, + U 0x00, U 0x00, U 0x03, U 0x20, + U 0x00, U 0x26, U 0x12, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF0, + U 0x40, U 0x00, U 0x02, U 0x03, + U 0x10, U 0x10, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF4, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF9, + U 0xD0, U 0x34, U 0x03, U 0xE2, + U 0x80, U 0x26, U 0x2A, U 0x41, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0xFF, U 0xFF, U 0xFF, U 0xF2, + U 0x08, U 0x34, U 0x02, U 0x30, + U 0x00, U 0xC0, U 0x05, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x70, U 0xEA, U 0xA7, U 0x41, +}; Added: user/kmacy/releng_7_net_backport/sys/dev/cxgb/t3c_tp_eeprom.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/t3c_tp_eeprom.h Mon Apr 13 23:08:37 2009 (r191027) @@ -0,0 +1,566 @@ +/************************************************************************** + +Copyright (c) 2007-2009, Chelsio Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 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 +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN22 +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +$FreeBSD: head/sys/dev/cxgb/t3c_tp_eeprom.h 189643 2009-03-10 19:22:45Z gnn $ + +***************************************************************************/ + +#define U (unsigned char) + +static unsigned int t3c_tp_eeprom_length = 2116; +static unsigned char t3c_tp_eeprom[2116] = { + U 0x00, U 0x01, U 0x01, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x10, + U 0x00, U 0x00, U 0x00, U 0x10, + U 0x00, U 0x00, U 0x00, U 0x40, + U 0x00, U 0x00, U 0x00, U 0x40, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x41, + U 0x2A, U 0x26, U 0x80, U 0xE2, + U 0x03, U 0x34, U 0xD0, U 0x03, + U 0x00, U 0x40, U 0x60, U 0x0C, + U 0x08, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x07, U 0x80, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x21, + U 0x29, U 0x28, U 0x80, U 0xE2, + U 0x03, U 0x34, U 0xD0, U 0x0B, + U 0x00, U 0x57, U 0x60, U 0x0C, + U 0x48, U 0x40, U 0x39, U 0x21, + U 0x00, U 0x5C, U 0x1C, U 0x70, + U 0x23, U 0x00, U 0x60, U 0x80, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x08, U 0x03, U 0x37, + U 0x06, U 0x02, U 0x00, U 0x82, + U 0x08, U 0x00, U 0x40, U 0xDF, + U 0x08, U 0x08, U 0x00, U 0x08, + U 0x02, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x81, + U 0x2C, U 0x28, U 0x00, U 0x00, + U 0x00, U 0x31, U 0xC4, U 0x09, + U 0x00, U 0x80, U 0x11, U 0x0C, + U 0x00, U 0x00, U 0x00, U 0x20, + U 0x00, U 0x5C, U 0x0C, U 0xD0, + U 0x21, U 0x00, U 0xE7, U 0x04, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x21, + U 0x28, U 0x28, U 0x80, U 0xE6, + U 0x03, U 0x00, U 0xC0, U 0x01, + U 0x00, U 0x17, U 0x00, U 0x00, + U 0x40, U 0x40, U 0x39, U 0x21, + U 0x00, U 0x00, U 0x00, U 0x40, + U 0x00, U 0x00, U 0x00, U 0x40, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x01, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x04, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x10, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x40, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x01, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x34, U 0x10, U 0x0A, + U 0xA9, U 0x59, U 0x02, U 0x08, + U 0x0F, U 0x00, U 0x00, U 0x27, + U 0x80, U 0x30, U 0x00, U 0x62, + U 0x00, U 0x00, U 0x00, U 0x06, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x80, U 0x81, U 0x00, + U 0x00, U 0x00, U 0x42, U 0x02, + U 0x00, U 0x0A, U 0x02, U 0x02, + U 0x31, U 0xC8, U 0x09, U 0x00, + U 0x00, U 0x00, U 0x18, U 0x08, + U 0x00, U 0x00, U 0x20, U 0xA4, + U 0x62, U 0xA9, U 0x20, U 0x3C, + U 0x10, U 0x83, U 0x1C, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x04, U 0x00, U 0x00, U 0x04, + U 0x00, U 0x31, U 0x04, U 0x00, + U 0x00, U 0x97, U 0x11, U 0x0C, + U 0x40, U 0x40, U 0x39, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x40, + U 0x00, U 0x00, U 0x0B, U 0x82, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x02, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x04, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x10, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x90, U 0x10, + U 0x00, U 0x00, U 0x01, U 0x20, + U 0x0C, U 0x68, U 0x00, U 0x40, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x08, U 0x00, + U 0x01, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x20, U 0xA4, + U 0x66, U 0x02, U 0x60, U 0x3E, + U 0x1C, U 0x03, U 0x9C, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x01, + U 0x00, U 0x00, U 0x00, U 0x41, + U 0x02, U 0x00, U 0x00, U 0x04, + U 0x00, U 0xF4, U 0x10, U 0x02, + U 0xA9, U 0x59, U 0x02, U 0x18, + U 0x0F, U 0xC2, U 0x00, U 0x27, + U 0x00, U 0x00, U 0x00, U 0x40, + U 0x80, U 0x00, U 0x05, U 0x06, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x02, U 0x40, U 0x00, U 0x01, + U 0x04, U 0x00, U 0x00, U 0x06, + U 0x08, U 0x00, U 0x01, U 0x5C, + U 0x08, U 0x08, U 0xC1, U 0x88, + U 0x22, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x40, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x01, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x04, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x10, U 0x00, U 0x00, + U 0x00, U 0x40, U 0x00, U 0x00, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Apr 13 23:50:46 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0CE8106566B; Mon, 13 Apr 2009 23:50:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D28E8FC14; Mon, 13 Apr 2009 23:50:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DNoklf087391; Mon, 13 Apr 2009 23:50:46 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3DNoj1x087354; Mon, 13 Apr 2009 23:50:45 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904132350.n3DNoj1x087354@svn.freebsd.org> From: Kip Macy Date: Mon, 13 Apr 2009 23:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191029 - in user/kmacy/releng_7_net_backport/sys: conf dev/cxgb dev/mii dev/usb kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 23:50:47 -0000 Author: kmacy Date: Mon Apr 13 23:50:44 2009 New Revision: 191029 URL: http://svn.freebsd.org/changeset/base/191029 Log: fix miibus and static compile for cxgb Modified: user/kmacy/releng_7_net_backport/sys/conf/files user/kmacy/releng_7_net_backport/sys/conf/kern.pre.mk user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_include.h user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_sge.c user/kmacy/releng_7_net_backport/sys/dev/mii/acphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/amphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/atphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/bmtphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/brgphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/ciphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/e1000phy.c user/kmacy/releng_7_net_backport/sys/dev/mii/exphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/gentbi.c user/kmacy/releng_7_net_backport/sys/dev/mii/icsphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/inphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/ip1000phy.c user/kmacy/releng_7_net_backport/sys/dev/mii/jmphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/lxtphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/mii.c user/kmacy/releng_7_net_backport/sys/dev/mii/mii_physubr.c user/kmacy/releng_7_net_backport/sys/dev/mii/mlphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/nsgphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/nsphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/nsphyter.c user/kmacy/releng_7_net_backport/sys/dev/mii/pnaphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/qsphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/rgephy.c user/kmacy/releng_7_net_backport/sys/dev/mii/rlphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/ruephy.c user/kmacy/releng_7_net_backport/sys/dev/mii/tdkphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/tlphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/truephy.c user/kmacy/releng_7_net_backport/sys/dev/mii/ukphy.c user/kmacy/releng_7_net_backport/sys/dev/mii/xmphy.c user/kmacy/releng_7_net_backport/sys/dev/usb/udbp.c user/kmacy/releng_7_net_backport/sys/dev/usb/usb_ethersubr.c user/kmacy/releng_7_net_backport/sys/kern/kern_jail.c Modified: user/kmacy/releng_7_net_backport/sys/conf/files ============================================================================== --- user/kmacy/releng_7_net_backport/sys/conf/files Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/conf/files Mon Apr 13 23:50:44 2009 (r191029) @@ -517,21 +517,36 @@ dev/cpufreq/ichss.c optional cpufreq dev/cs/if_cs.c optional cs 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_sge.c optional cxgb pci -dev/cxgb/cxgb_multiq.c optional cxgb pci -dev/cxgb/common/cxgb_mc5.c optional cxgb pci -dev/cxgb/common/cxgb_vsc7323.c optional cxgb pci -dev/cxgb/common/cxgb_vsc8211.c optional cxgb pci -dev/cxgb/common/cxgb_ael1002.c optional cxgb pci -dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci -dev/cxgb/common/cxgb_xgmac.c optional cxgb pci -dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci -dev/cxgb/common/cxgb_tn1010.c optional cxgb pci -dev/cxgb/sys/uipc_mvec.c optional cxgb pci -dev/cxgb/sys/cxgb_support.c optional cxgb pci -dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw +dev/cxgb/cxgb_main.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/cxgb_offload.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/cxgb_sge.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/cxgb_multiq.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_mc5.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_vsc7323.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_vsc8211.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_ael1002.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_xgmac.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_tn1010.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/sys/uipc_mvec.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/sys/cxgb_support.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci Modified: user/kmacy/releng_7_net_backport/sys/conf/kern.pre.mk ============================================================================== --- user/kmacy/releng_7_net_backport/sys/conf/kern.pre.mk Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/conf/kern.pre.mk Mon Apr 13 23:50:44 2009 (r191029) @@ -74,6 +74,9 @@ INCLUDES+= -I$S/contrib/ngatm # .. and the same for twa INCLUDES+= -I$S/dev/twa +# .. and the same for cxgb +INCLUDES+= -I$S/dev/cxgb + # ... and XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_include.h ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_include.h Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_include.h Mon Apr 13 23:50:44 2009 (r191029) @@ -6,7 +6,6 @@ #include #include #include -#ifdef CONFIG_DEFINED #include #include #include @@ -17,4 +16,3 @@ #include #include #include -#endif Modified: user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_sge.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/cxgb/cxgb_sge.c Mon Apr 13 23:50:44 2009 (r191029) @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/acphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/acphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/acphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/amphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/amphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/amphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/atphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/atphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/atphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/bmtphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/bmtphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/bmtphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/brgphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/brgphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/brgphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/ciphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/ciphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/ciphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/e1000phy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/e1000phy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/e1000phy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/exphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/exphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/exphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/gentbi.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/gentbi.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/gentbi.c Mon Apr 13 23:50:44 2009 (r191029) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/icsphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/icsphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/icsphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/inphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/inphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/inphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/ip1000phy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/ip1000phy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/ip1000phy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/jmphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/jmphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/jmphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/lxtphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/lxtphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/lxtphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/mii.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/mii.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/mii.c Mon Apr 13 23:50:44 2009 (r191029) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/mii_physubr.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/mii_physubr.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/mii_physubr.c Mon Apr 13 23:50:44 2009 (r191029) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/mlphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/mlphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/mlphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -177,6 +178,25 @@ mlphy_attach(dev) return (0); } +static struct mii_softc * +mlphy_find_other(device_t mii) +{ + device_t *devlist; + struct mii_softc *retval; + int i, devs; + + retval = NULL; + if (device_get_children(mii, &devlist, &devs)) + return (NULL); + for (i = 0; i < devs; i++) + if (strcmp(device_get_name(devlist[i]), "mlphy")) { + retval = device_get_softc(devlist[i]); + break; + } + free(devlist, M_TEMP); + return (retval); +} + static int mlphy_service(xsc, mii, cmd) struct mii_softc *xsc; @@ -187,21 +207,13 @@ mlphy_service(xsc, mii, cmd) struct mii_softc *other = NULL; struct mlphy_softc *msc = (struct mlphy_softc *)xsc; struct mii_softc *sc = (struct mii_softc *)&msc->ml_mii; - device_t *devlist; - int devs, i, other_inst, reg; + int other_inst, reg; /* * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ - device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); - for (i = 0; i < devs; i++) { - if (strcmp(device_get_name(devlist[i]), "mlphy")) { - other = device_get_softc(devlist[i]); - break; - } - } - free(devlist, M_TEMP); + other = mlphy_find_other(msc->ml_mii.mii_dev); switch (cmd) { case MII_POLLSTAT: @@ -396,19 +408,9 @@ mlphy_status(sc) struct mlphy_softc *msc = (struct mlphy_softc *)sc; struct mii_data *mii = msc->ml_mii.mii_pdata; struct mii_softc *other = NULL; - device_t *devlist; - int devs, i; /* See if there's another PHY on the bus with us. */ - device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); - for (i = 0; i < devs; i++) { - if (strcmp(device_get_name(devlist[i]), "mlphy")) { - other = device_get_softc(devlist[i]); - break; - } - } - free(devlist, M_TEMP); - + other = mlphy_find_other(msc->ml_mii.mii_dev); if (other == NULL) return; Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/nsgphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/nsgphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/nsgphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/nsphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/nsphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/nsphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/nsphyter.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/nsphyter.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/nsphyter.c Mon Apr 13 23:50:44 2009 (r191029) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/pnaphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/pnaphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/pnaphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/qsphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/qsphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/qsphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/rgephy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/rgephy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/rgephy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/rlphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/rlphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/rlphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/ruephy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/ruephy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/ruephy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/tdkphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/tdkphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/tdkphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/tlphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/tlphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/tlphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/truephy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/truephy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/truephy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -44,6 +44,7 @@ #include #include +#include #include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/ukphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/ukphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/ukphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/mii/xmphy.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/mii/xmphy.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/mii/xmphy.c Mon Apr 13 23:50:44 2009 (r191029) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/usb/udbp.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/usb/udbp.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/usb/udbp.c Mon Apr 13 23:50:44 2009 (r191029) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: user/kmacy/releng_7_net_backport/sys/dev/usb/usb_ethersubr.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/dev/usb/usb_ethersubr.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/dev/usb/usb_ethersubr.c Mon Apr 13 23:50:44 2009 (r191029) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: user/kmacy/releng_7_net_backport/sys/kern/kern_jail.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/kern/kern_jail.c Mon Apr 13 23:09:44 2009 (r191028) +++ user/kmacy/releng_7_net_backport/sys/kern/kern_jail.c Mon Apr 13 23:50:44 2009 (r191029) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef DDB #include From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 04:43:26 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A611065670; Tue, 14 Apr 2009 04:43:26 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC5A28FC0C; Tue, 14 Apr 2009 04:43:25 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E4hPxq094361; Tue, 14 Apr 2009 04:43:25 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E4hPxw094359; Tue, 14 Apr 2009 04:43:25 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904140443.n3E4hPxw094359@svn.freebsd.org> From: Kip Macy Date: Tue, 14 Apr 2009 04:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191040 - in user/kmacy/releng_7_net_backport/sys: netinet sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 04:43:26 -0000 Author: kmacy Date: Tue Apr 14 04:43:25 2009 New Revision: 191040 URL: http://svn.freebsd.org/changeset/base/191040 Log: update netinet with igmp changes Modified: user/kmacy/releng_7_net_backport/sys/netinet/igmp.c user/kmacy/releng_7_net_backport/sys/netinet/igmp.h user/kmacy/releng_7_net_backport/sys/netinet/igmp_var.h user/kmacy/releng_7_net_backport/sys/netinet/in.c user/kmacy/releng_7_net_backport/sys/netinet/in_mcast.c user/kmacy/releng_7_net_backport/sys/netinet/in_proto.c user/kmacy/releng_7_net_backport/sys/netinet/in_var.h user/kmacy/releng_7_net_backport/sys/netinet/ip_input.c user/kmacy/releng_7_net_backport/sys/netinet/ip_var.h user/kmacy/releng_7_net_backport/sys/netinet/udp_usrreq.c user/kmacy/releng_7_net_backport/sys/netinet/udp_var.h user/kmacy/releng_7_net_backport/sys/netinet/vinet.h user/kmacy/releng_7_net_backport/sys/sys/mbuf.h user/kmacy/releng_7_net_backport/sys/sys/tree.h Modified: user/kmacy/releng_7_net_backport/sys/netinet/igmp.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/netinet/igmp.c Tue Apr 14 04:15:56 2009 (r191039) +++ user/kmacy/releng_7_net_backport/sys/netinet/igmp.c Tue Apr 14 04:43:25 2009 (r191040) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2007-2009 Bruce Simpson. * Copyright (c) 1988 Stephen Deering. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -35,11 +36,13 @@ /* * Internet Group Management Protocol (IGMP) routines. + * [RFC1112, RFC2236, RFC3376] * * Written by Steve Deering, Stanford, May 1988. * Modified by Rosen Sharma, Stanford, Aug 1994. * Modified by Bill Fenner, Xerox PARC, Feb 1995. * Modified to fully comply to IGMPv2 by Bill Fenner, Oct 1995. + * Significantly rewritten for IGMPv3, VIMAGE, and SMP by Bruce Simpson. * * MULTICAST Revision: 3.5.1.4 */ @@ -52,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -59,8 +63,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include +#include #include #include @@ -78,464 +85,3626 @@ __FBSDID("$FreeBSD$"); #include -static MALLOC_DEFINE(M_IGMP, "igmp", "igmp state"); +#ifndef KTR_IGMPV3 +#define KTR_IGMPV3 KTR_SUBSYS +#endif + +static struct igmp_ifinfo * + igi_alloc_locked(struct ifnet *); +static void igi_delete_locked(const struct ifnet *); +static void igmp_dispatch_queue(struct ifqueue *, int, const int); +static void igmp_fasttimo_vnet(void); +static void igmp_final_leave(struct in_multi *, struct igmp_ifinfo *); +static int igmp_handle_state_change(struct in_multi *, + struct igmp_ifinfo *); +static int igmp_initial_join(struct in_multi *, struct igmp_ifinfo *); +static int igmp_input_v1_query(struct ifnet *, const struct ip *); +static int igmp_input_v2_query(struct ifnet *, const struct ip *, + const struct igmp *); +static int igmp_input_v3_query(struct ifnet *, const struct ip *, + /*const*/ struct igmpv3 *); +static int igmp_input_v3_group_query(struct in_multi *, + struct igmp_ifinfo *, int, /*const*/ struct igmpv3 *); +static int igmp_input_v1_report(struct ifnet *, /*const*/ struct ip *, + /*const*/ struct igmp *); +static int igmp_input_v2_report(struct ifnet *, /*const*/ struct ip *, + /*const*/ struct igmp *); +static void igmp_intr(struct mbuf *); +static int igmp_isgroupreported(const struct in_addr); +static struct mbuf * + igmp_ra_alloc(void); +#ifdef KTR +static char * igmp_rec_type_to_str(const int); +#endif +static void igmp_set_version(struct igmp_ifinfo *, const int); +static void igmp_slowtimo_vnet(void); +static void igmp_sysinit(void); +static int igmp_v1v2_queue_report(struct in_multi *, const int); +static void igmp_v1v2_process_group_timer(struct in_multi *, const int); +static void igmp_v1v2_process_querier_timers(struct igmp_ifinfo *); +static void igmp_v2_update_group(struct in_multi *, const int); +static void igmp_v3_cancel_link_timers(struct igmp_ifinfo *); +static void igmp_v3_dispatch_general_query(struct igmp_ifinfo *); +static struct mbuf * + igmp_v3_encap_report(struct ifnet *, struct mbuf *); +static int igmp_v3_enqueue_group_record(struct ifqueue *, + struct in_multi *, const int, const int, const int); +static int igmp_v3_enqueue_filter_change(struct ifqueue *, + struct in_multi *); +static void igmp_v3_process_group_timers(struct igmp_ifinfo *, + struct ifqueue *, struct ifqueue *, struct in_multi *, + const int); +static int igmp_v3_merge_state_changes(struct in_multi *, + struct ifqueue *); +static void igmp_v3_suppress_group_record(struct in_multi *); +static int sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS); +static int sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS); +static int sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS); + +#ifdef VIMAGE +static vnet_attach_fn vnet_igmp_iattach; +static vnet_detach_fn vnet_igmp_idetach; +#else +static int vnet_igmp_iattach(const void *); +static int vnet_igmp_idetach(const void *); +#endif /* VIMAGE */ + +/* + * System-wide globals. + * + * Unlocked access to these is OK, except for the global IGMP output + * queue. The IGMP subsystem lock ends up being system-wide for the moment, + * because all VIMAGEs have to share a global output queue, as netisrs + * themselves are not virtualized. + * + * Locking: + * * The permitted lock order is: IN_MULTI_LOCK, IGMP_LOCK, IF_ADDR_LOCK. + * Any may be taken independently; if any are held at the same + * time, the above lock order must be followed. + * * All output is delegated to the netisr to handle IFF_NEEDSGIANT. + * Most of the time, direct dispatch will be fine. + * * IN_MULTI_LOCK covers in_multi. + * * IGMP_LOCK covers igmp_ifinfo and any global variables in this file, + * including the output queue. + * * IF_ADDR_LOCK covers if_multiaddrs, which is used for a variety of + * per-link state iterators. + * * igmp_ifinfo is valid as long as PF_INET is attached to the interface, + * therefore it is not refcounted. + * We allow unlocked reads of igmp_ifinfo when accessed via in_multi. + * + * Reference counting + * * IGMP acquires its own reference every time an in_multi is passed to + * it and the group is being joined for the first time. + * * IGMP releases its reference(s) on in_multi in a deferred way, + * because the operations which process the release run as part of + * a loop whose control variables are directly affected by the release + * (that, and not recursing on the IF_ADDR_LOCK). + * + * VIMAGE: Each in_multi corresponds to an ifp, and each ifp corresponds + * to a vnet in ifp->if_vnet. + * + * SMPng: XXX We may potentially race operations on ifma_protospec. + * The problem is that we currently lack a clean way of taking the + * IF_ADDR_LOCK() between the ifnet and in layers w/o recursing, + * as anything which modifies ifma needs to be covered by that lock. + * So check for ifma_protospec being NULL before proceeding. + */ +struct mtx igmp_mtx; +int mpsafe_igmp = 0; +SYSCTL_INT(_debug, OID_AUTO, mpsafe_igmp, CTLFLAG_RDTUN, &mpsafe_igmp, 0, + "Enable SMP-safe IGMPv3"); + +struct mbuf *m_raopt; /* Router Alert option */ +MALLOC_DEFINE(M_IGMP, "igmp", "igmp state"); + +/* + * Global netisr output queue. + * This is only used as a last resort if we cannot directly dispatch. + * As IN_MULTI_LOCK is no longer in the bottom half of IP, we can do + * this, providing mpsafe_igmp is set. If it is not, we take Giant, + * and queueing is forced. + */ +struct ifqueue igmpoq; + +/* + * VIMAGE-wide globals. + * + * The IGMPv3 timers themselves need to run per-image, however, + * protosw timers run globally (see tcp). + * An ifnet can only be in one vimage at a time, and the loopback + * ifnet, loif, is itself virtualized. + * It would otherwise be possible to seriously hose IGMP state, + * and create inconsistencies in upstream multicast routing, if you have + * multiple VIMAGEs running on the same link joining different multicast + * groups, UNLESS the "primary IP address" is different. This is because + * IGMP for IPv4 does not force link-local addresses to be used for each + * node, unlike MLD for IPv6. + * Obviously the IGMPv3 per-interface state has per-vimage granularity + * also as a result. + * + * FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address selection + * policy to control the address used by IGMP on the link. + */ +#ifdef VIMAGE_GLOBALS +int interface_timers_running; /* IGMPv3 general query response */ +int state_change_timers_running; /* IGMPv3 state-change retransmit */ +int current_state_timers_running; /* IGMPv1/v2 host report; + * IGMPv3 g/sg query response */ + +LIST_HEAD(, igmp_ifinfo) igi_head; +struct igmpstat igmpstat; +struct timeval igmp_gsrdelay; + +int igmp_recvifkludge; +int igmp_sendra; +int igmp_sendlocal; +int igmp_v1enable; +int igmp_v2enable; +int igmp_legacysupp; +int igmp_default_version; +#endif /* VIMAGE_GLOBALS */ + +/* + * Virtualized sysctls. + */ +SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_igmp, IGMPCTL_STATS, stats, + CTLFLAG_RW, igmpstat, igmpstat, ""); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, recvifkludge, + CTLFLAG_RW, igmp_recvifkludge, 0, + "Rewrite IGMPv1/v2 reports from 0.0.0.0 to contain subnet address"); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, sendra, + CTLFLAG_RW, igmp_sendra, 0, + "Send IP Router Alert option in IGMPv2/v3 messages"); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, sendlocal, + CTLFLAG_RW, igmp_sendlocal, 0, + "Send IGMP membership reports for 224.0.0.0/24 groups"); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, v1enable, + CTLFLAG_RW, igmp_v1enable, 0, + "Enable backwards compatibility with IGMPv1"); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, v2enable, + CTLFLAG_RW, igmp_v2enable, 0, + "Enable backwards compatibility with IGMPv2"); +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, legacysupp, + CTLFLAG_RW, igmp_legacysupp, 0, + "Allow v1/v2 reports to suppress v3 group responses"); +SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, default_version, + CTLTYPE_INT | CTLFLAG_RW , igmp_default_version, 0, + sysctl_igmp_default_version, "I", + "Default version of IGMP to run on each interface"); +SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, gsrdelay, + CTLTYPE_INT | CTLFLAG_RW , igmp_gsrdelay.tv_sec, 0, + sysctl_igmp_gsr, "I", + "Rate limit for IGMPv3 Group-and-Source queries in seconds"); + +/* + * Non-virtualized sysctls. + */ +SYSCTL_NODE(_net_inet_igmp, OID_AUTO, ifinfo, CTLFLAG_RD, + sysctl_igmp_ifinfo, "Per-interface IGMPv3 state"); + +static __inline void +igmp_save_context(struct mbuf *m, struct ifnet *ifp) +{ + +#ifdef VIMAGE + m->m_pkthdr.header = ifp->if_vnet; +#endif /* VIMAGE */ + m->m_pkthdr.flowid = ifp->if_index; +} + +static __inline void +igmp_scrub_context(struct mbuf *m) +{ + + m->m_pkthdr.header = NULL; + m->m_pkthdr.flowid = 0; +} + +#ifdef KTR +static __inline char * +inet_ntoa_haddr(in_addr_t haddr) +{ + struct in_addr ia; + + ia.s_addr = htonl(haddr); + return (inet_ntoa(ia)); +} +#endif + +/* + * Restore context from a queued IGMP output chain. + * Return saved ifindex. + * + * VIMAGE: The assertion is there to make sure that we + * actually called CURVNET_SET() with what's in the mbuf chain. + */ +static __inline uint32_t +igmp_restore_context(struct mbuf *m) +{ + +#ifdef notyet +#if defined(VIMAGE) && defined(INVARIANTS) + KASSERT(curvnet == (m->m_pkthdr.header), + ("%s: called when curvnet was not restored", __func__)); +#endif +#endif + return (m->m_pkthdr.flowid); +} + +/* + * Retrieve or set default IGMP version. + * + * VIMAGE: Assume curvnet set by caller. + * SMPng: NOTE: Serialized by IGMP lock. + */ +static int +sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS) +{ + int error; + int new; + + error = sysctl_wire_old_buffer(req, sizeof(int)); + if (error) + return (error); + + IGMP_LOCK(); + + new = V_igmp_default_version; + + error = sysctl_handle_int(oidp, &new, 0, req); + if (error || !req->newptr) + goto out_locked; + + if (new < IGMP_VERSION_1 || new > IGMP_VERSION_3) { + error = EINVAL; + goto out_locked; + } + + CTR2(KTR_IGMPV3, "change igmp_default_version from %d to %d", + V_igmp_default_version, new); + + V_igmp_default_version = new; + +out_locked: + IGMP_UNLOCK(); + return (error); +} + +/* + * Retrieve or set threshold between group-source queries in seconds. + * + * VIMAGE: Assume curvnet set by caller. + * SMPng: NOTE: Serialized by IGMP lock. + */ +static int +sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS) +{ + int error; + int i; + + error = sysctl_wire_old_buffer(req, sizeof(int)); + if (error) + return (error); + + IGMP_LOCK(); + + i = V_igmp_gsrdelay.tv_sec; + + error = sysctl_handle_int(oidp, &i, 0, req); + if (error || !req->newptr) + goto out_locked; + + if (i < -1 || i >= 60) { + error = EINVAL; + goto out_locked; + } + + CTR2(KTR_IGMPV3, "change igmp_gsrdelay from %d to %d", + V_igmp_gsrdelay.tv_sec, i); + V_igmp_gsrdelay.tv_sec = i; + +out_locked: + IGMP_UNLOCK(); + return (error); +} + +/* + * Expose struct igmp_ifinfo to userland, keyed by ifindex. + * For use by ifmcstat(8). + * + * SMPng: NOTE: Does an unlocked ifindex space read. + * VIMAGE: Assume curvnet set by caller. The node handler itself + * is not directly virtualized. + */ +static int +sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS) +{ + INIT_VNET_NET(curvnet); + int *name; + int error; + u_int namelen; + struct ifnet *ifp; + struct igmp_ifinfo *igi; + + name = (int *)arg1; + namelen = arg2; + + if (req->newptr != NULL) + return (EPERM); + + if (namelen != 1) + return (EINVAL); + + error = sysctl_wire_old_buffer(req, sizeof(struct igmp_ifinfo)); + if (error) + return (error); + + IN_MULTI_LOCK(); + IGMP_LOCK(); + + if (name[0] <= 0 || name[0] > V_if_index) { + error = ENOENT; + goto out_locked; + } + + error = ENOENT; + + ifp = ifnet_byindex(name[0]); + if (ifp == NULL) + goto out_locked; + + LIST_FOREACH(igi, &V_igi_head, igi_link) { + if (ifp == igi->igi_ifp) { + error = SYSCTL_OUT(req, igi, + sizeof(struct igmp_ifinfo)); + break; + } + } + +out_locked: + IGMP_UNLOCK(); + IN_MULTI_UNLOCK(); + return (error); +} + +/* + * Dispatch an entire queue of pending packet chains + * using the netisr. + * VIMAGE: Assumes the vnet pointer has been set. + */ +static void +igmp_dispatch_queue(struct ifqueue *ifq, int limit, const int loop) +{ + struct mbuf *m; + + for (;;) { + _IF_DEQUEUE(ifq, m); + if (m == NULL) + break; + CTR3(KTR_IGMPV3, "%s: dispatch %p from %p", __func__, ifq, m); + if (loop) + m->m_flags |= M_IGMP_LOOP; + netisr_dispatch(NETISR_IGMP, m); + if (--limit == 0) + break; + } +} + +/* + * Filter outgoing IGMP report state by group. + * + * Reports are ALWAYS suppressed for ALL-HOSTS (224.0.0.1). + * If the net.inet.igmp.sendlocal sysctl is 0, then IGMP reports are + * disabled for all groups in the 224.0.0.0/24 link-local scope. However, + * this may break certain IGMP snooping switches which rely on the old + * report behaviour. + * + * Return zero if the given group is one for which IGMP reports + * should be suppressed, or non-zero if reports should be issued. + */ +static __inline int +igmp_isgroupreported(const struct in_addr addr) +{ + + if (in_allhosts(addr) || + ((!V_igmp_sendlocal && IN_LOCAL_GROUP(ntohl(addr.s_addr))))) + return (0); + + return (1); +} + +/* + * Construct a Router Alert option to use in outgoing packets. + */ +static struct mbuf * +igmp_ra_alloc(void) +{ + struct mbuf *m; + struct ipoption *p; + + MGET(m, M_DONTWAIT, MT_DATA); + p = mtod(m, struct ipoption *); + p->ipopt_dst.s_addr = INADDR_ANY; + p->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */ + p->ipopt_list[1] = 0x04; /* 4 bytes long */ + p->ipopt_list[2] = IPOPT_EOL; /* End of IP option list */ + p->ipopt_list[3] = 0x00; /* pad byte */ + m->m_len = sizeof(p->ipopt_dst) + p->ipopt_list[1]; + + return (m); +} + +/* + * Attach IGMP when PF_INET is attached to an interface. + * + * VIMAGE: Currently we set the vnet pointer, although it is + * likely that it was already set by our caller. + */ +struct igmp_ifinfo * +igmp_domifattach(struct ifnet *ifp) +{ + struct igmp_ifinfo *igi; + + CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", + __func__, ifp, ifp->if_xname); + + CURVNET_SET(ifp->if_vnet); + IGMP_LOCK(); + + igi = igi_alloc_locked(ifp); + if (!(ifp->if_flags & IFF_MULTICAST)) + igi->igi_flags |= IGIF_SILENT; + + IGMP_UNLOCK(); + CURVNET_RESTORE(); + + return (igi); +} + +/* + * VIMAGE: assume curvnet set by caller. + */ +static struct igmp_ifinfo * +igi_alloc_locked(/*const*/ struct ifnet *ifp) +{ + struct igmp_ifinfo *igi; + + IGMP_LOCK_ASSERT(); + + igi = malloc(sizeof(struct igmp_ifinfo), M_IGMP, M_NOWAIT|M_ZERO); + if (igi == NULL) + goto out; + + igi->igi_ifp = ifp; + igi->igi_version = V_igmp_default_version; + igi->igi_flags = 0; + igi->igi_rv = IGMP_RV_INIT; + igi->igi_qi = IGMP_QI_INIT; + igi->igi_qri = IGMP_QRI_INIT; + igi->igi_uri = IGMP_URI_INIT; + + SLIST_INIT(&igi->igi_relinmhead); + + /* + * Responses to general queries are subject to bounds. + */ + IFQ_SET_MAXLEN(&igi->igi_gq, IGMP_MAX_RESPONSE_PACKETS); + + LIST_INSERT_HEAD(&V_igi_head, igi, igi_link); + + CTR2(KTR_IGMPV3, "allocate igmp_ifinfo for ifp %p(%s)", + ifp, ifp->if_xname); + +out: + return (igi); +} + +/* + * Hook for ifdetach. + * + * NOTE: Some finalization tasks need to run before the protocol domain + * is detached, but also before the link layer does its cleanup. + * + * SMPNG: igmp_ifdetach() needs to take IF_ADDR_LOCK(). + * XXX This is also bitten by unlocked ifma_protospec access. + * + * VIMAGE: curvnet should have been set by caller, but let's not assume + * that for now. + */ +void +igmp_ifdetach(struct ifnet *ifp) +{ + struct igmp_ifinfo *igi; + struct ifmultiaddr *ifma; + struct in_multi *inm, *tinm; + + CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", __func__, ifp, + ifp->if_xname); + + CURVNET_SET(ifp->if_vnet); + + IGMP_LOCK(); + + igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + if (igi->igi_version == IGMP_VERSION_3) { + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_INET || + ifma->ifma_protospec == NULL) + continue; +#if 0 + KASSERT(ifma->ifma_protospec != NULL, + ("%s: ifma_protospec is NULL", __func__)); +#endif + inm = (struct in_multi *)ifma->ifma_protospec; + if (inm->inm_state == IGMP_LEAVING_MEMBER) { + SLIST_INSERT_HEAD(&igi->igi_relinmhead, + inm, inm_nrele); + } + inm_clear_recorded(inm); + } + IF_ADDR_UNLOCK(ifp); + /* + * Free the in_multi reference(s) for this IGMP lifecycle. + */ + SLIST_FOREACH_SAFE(inm, &igi->igi_relinmhead, inm_nrele, + tinm) { + SLIST_REMOVE_HEAD(&igi->igi_relinmhead, inm_nrele); + inm_release_locked(inm); + } + } + + IGMP_UNLOCK(); + +#ifdef VIMAGE + /* + * Plug the potential race which may occur when a VIMAGE + * is detached and we are forced to queue pending IGMP output for + * output netisr processing due to !mpsafe_igmp. In this case it + * is possible that igmp_intr() is about to see mbuf chains with + * invalid cached curvnet pointers. + * This is a rare condition, so just blow them all away. + * FUTURE: This may in fact not be needed, because IFF_NEEDSGIANT + * is being removed in 8.x and the netisr may then be eliminated; + * it is needed only if VIMAGE and IFF_NEEDSGIANT need to co-exist + */ + if (!mpsafe_igmp) { + int drops; + + IF_LOCK(&igmpoq); + drops = igmpoq.ifq_len; + _IF_DRAIN(&igmpoq); + IF_UNLOCK(&igmpoq); + if (bootverbose && drops) { + printf("%s: dropped %d pending IGMP output packets\n", + __func__, drops); + } + } +#endif /* VIMAGE */ + + CURVNET_RESTORE(); +} + +/* + * Hook for domifdetach. + * + * VIMAGE: curvnet should have been set by caller, but let's not assume + * that for now. + */ +void +igmp_domifdetach(struct ifnet *ifp) +{ + struct igmp_ifinfo *igi; + + CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", + __func__, ifp, ifp->if_xname); + + CURVNET_SET(ifp->if_vnet); + IGMP_LOCK(); + + igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + igi_delete_locked(ifp); + + IGMP_UNLOCK(); + CURVNET_RESTORE(); +} + +static void +igi_delete_locked(const struct ifnet *ifp) +{ + struct igmp_ifinfo *igi, *tigi; + + CTR3(KTR_IGMPV3, "%s: freeing igmp_ifinfo for ifp %p(%s)", + __func__, ifp, ifp->if_xname); + + IGMP_LOCK_ASSERT(); + + LIST_FOREACH_SAFE(igi, &V_igi_head, igi_link, tigi) { + if (igi->igi_ifp == ifp) { + /* + * Free deferred General Query responses. + */ + _IF_DRAIN(&igi->igi_gq); + + LIST_REMOVE(igi, igi_link); + + KASSERT(SLIST_EMPTY(&igi->igi_relinmhead), + ("%s: there are dangling in_multi references", + __func__)); + + free(igi, M_IGMP); + return; + } + } + +#ifdef INVARIANTS + panic("%s: igmp_ifinfo not found for ifp %p\n", __func__, ifp); +#endif +} + +/* + * Process a received IGMPv1 query. + * Return non-zero if the message should be dropped. + * + * VIMAGE: The curvnet pointer is derived from the input ifp. + */ +static int +igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip) +{ + INIT_VNET_INET(ifp->if_vnet); + struct ifmultiaddr *ifma; + struct igmp_ifinfo *igi; + struct in_multi *inm; + + /* + * IGMPv1 General Queries SHOULD always addressed to 224.0.0.1. + * igmp_group is always ignored. Do not drop it as a userland + * daemon may wish to see it. + */ + if (!in_allhosts(ip->ip_dst)) { + IGMPSTAT_INC(igps_rcv_badqueries); + return (0); + } + + IGMPSTAT_INC(igps_rcv_gen_queries); + + /* + * Switch to IGMPv1 host compatibility mode. + */ + IN_MULTI_LOCK(); + IGMP_LOCK(); + + igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + KASSERT(igi != NULL, ("%s: no igmp_ifinfo for ifp %p", __func__, ifp)); + + if (igi->igi_flags & IGIF_LOOPBACK) { + CTR2(KTR_IGMPV3, "ignore v1 query on IGIF_LOOPBACK ifp %p(%s)", + ifp, ifp->if_xname); + goto out_locked; + } + + igmp_set_version(igi, IGMP_VERSION_1); + + CTR2(KTR_IGMPV3, "process v1 query on ifp %p(%s)", ifp, ifp->if_xname); + + /* + * Start the timers in all of our group records + * for the interface on which the query arrived, + * except those which are already running. + */ + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_INET || + ifma->ifma_protospec == NULL) + continue; + inm = (struct in_multi *)ifma->ifma_protospec; + if (inm->inm_timer != 0) + continue; + switch (inm->inm_state) { + case IGMP_NOT_MEMBER: + case IGMP_SILENT_MEMBER: + break; + case IGMP_G_QUERY_PENDING_MEMBER: + case IGMP_SG_QUERY_PENDING_MEMBER: + case IGMP_REPORTING_MEMBER: + case IGMP_IDLE_MEMBER: + case IGMP_LAZY_MEMBER: + case IGMP_SLEEPING_MEMBER: + case IGMP_AWAKENING_MEMBER: + inm->inm_state = IGMP_REPORTING_MEMBER; + inm->inm_timer = IGMP_RANDOM_DELAY( + IGMP_V1V2_MAX_RI * PR_FASTHZ); + V_current_state_timers_running = 1; + break; + case IGMP_LEAVING_MEMBER: + break; + } + } + IF_ADDR_UNLOCK(ifp); + +out_locked: + IGMP_UNLOCK(); + IN_MULTI_UNLOCK(); + + return (0); +} + +/* + * Process a received IGMPv2 general or group-specific query. + */ +static int +igmp_input_v2_query(struct ifnet *ifp, const struct ip *ip, + const struct igmp *igmp) +{ + struct ifmultiaddr *ifma; + struct igmp_ifinfo *igi; + struct in_multi *inm; + uint16_t timer; + + /* + * Perform lazy allocation of IGMP link info if required, + * and switch to IGMPv2 host compatibility mode. + */ + IN_MULTI_LOCK(); + IGMP_LOCK(); + + igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + KASSERT(igi != NULL, ("%s: no igmp_ifinfo for ifp %p", __func__, ifp)); + + if (igi->igi_flags & IGIF_LOOPBACK) { + CTR2(KTR_IGMPV3, "ignore v2 query on IGIF_LOOPBACK ifp %p(%s)", + ifp, ifp->if_xname); + goto out_locked; + } + + igmp_set_version(igi, IGMP_VERSION_2); + + timer = igmp->igmp_code * PR_FASTHZ / IGMP_TIMER_SCALE; + if (timer == 0) + timer = 1; + + if (!in_nullhost(igmp->igmp_group)) { + /* + * IGMPv2 Group-Specific Query. + * If this is a group-specific IGMPv2 query, we need only + * look up the single group to process it. + */ + inm = inm_lookup(ifp, igmp->igmp_group); + if (inm != NULL) { + CTR3(KTR_IGMPV3, "process v2 query %s on ifp %p(%s)", + inet_ntoa(igmp->igmp_group), ifp, ifp->if_xname); + igmp_v2_update_group(inm, timer); + } + IGMPSTAT_INC(igps_rcv_group_queries); + } else { + /* + * IGMPv2 General Query. + * If this was not sent to the all-hosts group, ignore it. + */ + if (in_allhosts(ip->ip_dst)) { + /* + * For each reporting group joined on this + * interface, kick the report timer. + */ + CTR2(KTR_IGMPV3, + "process v2 general query on ifp %p(%s)", + ifp, ifp->if_xname); + + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_INET || + ifma->ifma_protospec == NULL) + continue; + inm = (struct in_multi *)ifma->ifma_protospec; + igmp_v2_update_group(inm, timer); + } + IF_ADDR_UNLOCK(ifp); + } + IGMPSTAT_INC(igps_rcv_gen_queries); + } + +out_locked: + IGMP_UNLOCK(); + IN_MULTI_UNLOCK(); + + return (0); +} + +/* + * Update the report timer on a group in response to an IGMPv2 query. + * + * If we are becoming the reporting member for this group, start the timer. + * If we already are the reporting member for this group, and timer is + * below the threshold, reset it. + * + * We may be updating the group for the first time since we switched + * to IGMPv3. If we are, then we must clear any recorded source lists, + * and transition to REPORTING state; the group timer is overloaded + * for group and group-source query responses. + * + * Unlike IGMPv3, the delay per group should be jittered + * to avoid bursts of IGMPv2 reports. + */ +static void +igmp_v2_update_group(struct in_multi *inm, const int timer) +{ + + CTR4(KTR_IGMPV3, "%s: %s/%s timer=%d", __func__, + inet_ntoa(inm->inm_addr), inm->inm_ifp->if_xname, timer); + + IN_MULTI_LOCK_ASSERT(); + + switch (inm->inm_state) { + case IGMP_NOT_MEMBER: + case IGMP_SILENT_MEMBER: + break; + case IGMP_REPORTING_MEMBER: + if (inm->inm_timer != 0 && + inm->inm_timer <= timer) { + CTR1(KTR_IGMPV3, "%s: REPORTING and timer running, " + "skipping.", __func__); + break; + } + /* FALLTHROUGH */ + case IGMP_SG_QUERY_PENDING_MEMBER: + case IGMP_G_QUERY_PENDING_MEMBER: + case IGMP_IDLE_MEMBER: + case IGMP_LAZY_MEMBER: + case IGMP_AWAKENING_MEMBER: + CTR1(KTR_IGMPV3, "%s: ->REPORTING", __func__); + inm->inm_state = IGMP_REPORTING_MEMBER; + inm->inm_timer = IGMP_RANDOM_DELAY(timer); + V_current_state_timers_running = 1; + break; + case IGMP_SLEEPING_MEMBER: + CTR1(KTR_IGMPV3, "%s: ->AWAKENING", __func__); + inm->inm_state = IGMP_AWAKENING_MEMBER; + break; + case IGMP_LEAVING_MEMBER: + break; + } +} + +/* + * Process a received IGMPv3 general, group-specific or + * group-and-source-specific query. + * Assumes m has already been pulled up to the full IGMP message length. + * Return 0 if successful, otherwise an appropriate error code is returned. + */ +static int +igmp_input_v3_query(struct ifnet *ifp, const struct ip *ip, + /*const*/ struct igmpv3 *igmpv3) +{ + struct igmp_ifinfo *igi; + struct in_multi *inm; + uint32_t maxresp, nsrc, qqi; + uint16_t timer; + uint8_t qrv; + + CTR2(KTR_IGMPV3, "process v3 query on ifp %p(%s)", ifp, ifp->if_xname); + + maxresp = igmpv3->igmp_code; /* in 1/10ths of a second */ + if (maxresp >= 128) { + maxresp = IGMP_MANT(igmpv3->igmp_code) << + (IGMP_EXP(igmpv3->igmp_code) + 3); + } + + /* + * Robustness must never be less than 2 for on-wire IGMPv3. + * FIXME: Check if ifp has IGIF_LOOPBACK set, as we make + * an exception for interfaces whose IGMPv3 state changes + * are redirected to loopback (e.g. MANET). + */ + qrv = IGMP_QRV(igmpv3->igmp_misc); + if (qrv < 2) { + CTR3(KTR_IGMPV3, "%s: clamping qrv %d to %d", __func__, + qrv, IGMP_RV_INIT); + qrv = IGMP_RV_INIT; + } + + qqi = igmpv3->igmp_qqi; + if (qqi >= 128) { + qqi = IGMP_MANT(igmpv3->igmp_qqi) << + (IGMP_EXP(igmpv3->igmp_qqi) + 3); + } + + timer = maxresp * PR_FASTHZ / IGMP_TIMER_SCALE; + if (timer == 0) + timer = 1; + + nsrc = ntohs(igmpv3->igmp_numsrc); + + IN_MULTI_LOCK(); + IGMP_LOCK(); + + igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + KASSERT(igi != NULL, ("%s: no igmp_ifinfo for ifp %p", __func__, ifp)); + + if (igi->igi_flags & IGIF_LOOPBACK) { + CTR2(KTR_IGMPV3, "ignore v3 query on IGIF_LOOPBACK ifp %p(%s)", + ifp, ifp->if_xname); + goto out_locked; + } + + igmp_set_version(igi, IGMP_VERSION_3); + + igi->igi_rv = qrv; + igi->igi_qi = qqi; + igi->igi_qri = maxresp; + + CTR4(KTR_IGMPV3, "%s: qrv %d qi %d qri %d", __func__, qrv, qqi, + maxresp); + + if (in_nullhost(igmpv3->igmp_group)) { + /* + * IGMPv3 General Query. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 04:49:43 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FF171065670; Tue, 14 Apr 2009 04:49:43 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E93C28FC0A; Tue, 14 Apr 2009 04:49:42 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E4ngvI094578; Tue, 14 Apr 2009 04:49:42 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E4ngwR094577; Tue, 14 Apr 2009 04:49:42 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904140449.n3E4ngwR094577@svn.freebsd.org> From: Kip Macy Date: Tue, 14 Apr 2009 04:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191041 - user/kmacy/releng_7_net_backport/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 04:49:43 -0000 Author: kmacy Date: Tue Apr 14 04:49:42 2009 New Revision: 191041 URL: http://svn.freebsd.org/changeset/base/191041 Log: update multicast interface Modified: user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h Modified: user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h ============================================================================== --- user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h Tue Apr 14 04:43:25 2009 (r191040) +++ user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h Tue Apr 14 04:49:42 2009 (r191041) @@ -70,9 +70,6 @@ #define MRT_ADD_BW_UPCALL 111 /* create bandwidth monitor */ #define MRT_DEL_BW_UPCALL 112 /* delete bandwidth monitor */ - -#define GET_TIME(t) microtime(&t) - /* * Types and macros for handling bitmaps with one bit per virtual interface. */ @@ -224,6 +221,11 @@ struct mrtstat { u_long mrts_upq_sockfull; /* upcalls dropped - socket full */ }; +#ifdef _KERNEL +#define MRTSTAT_ADD(name, val) mrtstat.name += (val) +#define MRTSTAT_INC(name) MRTSTAT_ADD(name, 1) +#endif + /* * Argument structure used by mrouted to get src-grp pkt counts */ @@ -253,8 +255,6 @@ struct sioc_vif_req { struct vif { u_char v_flags; /* VIFF_ flags defined above */ u_char v_threshold; /* min ttl required to forward on vif*/ - u_int v_rate_limit; /* ignored; kept for compatibility */ - struct tbf *v_tbf; /* ignored; kept for compatibility */ struct in_addr v_lcl_addr; /* local interface address */ struct in_addr v_rmt_addr; /* remote address (tunnels only) */ struct ifnet *v_ifp; /* pointer to interface */ @@ -263,16 +263,13 @@ struct vif { u_long v_bytes_in; /* # bytes in on interface */ u_long v_bytes_out; /* # bytes out on interface */ struct route v_route; /* cached route */ - u_int v_rsvp_on; /* RSVP listening on this vif */ - struct socket *v_rsvpd; /* RSVP daemon socket */ }; /* * The kernel's multicast forwarding cache entry structure - * (A field for the type of service (mfc_tos) is to be added - * at a future point) */ struct mfc { + LIST_ENTRY(mfc) mfc_hash; struct in_addr mfc_origin; /* IP origin of mcasts */ struct in_addr mfc_mcastgrp; /* multicast group associated*/ vifi_t mfc_parent; /* incoming vif */ @@ -282,11 +279,11 @@ struct mfc { u_long mfc_wrong_if; /* wrong if for src-grp */ int mfc_expire; /* time to clean entry up */ struct timeval mfc_last_assert; /* last time I sent an assert*/ - struct rtdetq *mfc_stall; /* q of packets awaiting mfc */ - struct mfc *mfc_next; /* next mfc entry */ uint8_t mfc_flags[MAXVIFS]; /* the MRT_MFC_FLAGS_* flags */ struct in_addr mfc_rp; /* the RP address */ struct bw_meter *mfc_bw_meter; /* list of bandwidth meters */ + u_long mfc_nstall; /* # of packets awaiting mfc */ + TAILQ_HEAD(, rtdetq) mfc_stall; /* q of packets awaiting mfc */ }; /* @@ -311,19 +308,11 @@ struct igmpmsg { * Argument structure used for pkt info. while upcall is made */ struct rtdetq { + TAILQ_ENTRY(rtdetq) rte_link; struct mbuf *m; /* A copy of the packet */ struct ifnet *ifp; /* Interface pkt came in on */ vifi_t xmt_vif; /* Saved copy of imo_multicast_vif */ - struct rtdetq *next; /* Next in list of packets */ }; - -#define MFCTBLSIZ 256 -#if (MFCTBLSIZ & (MFCTBLSIZ - 1)) == 0 /* from sys:route.h */ -#define MFCHASHMOD(h) ((h) & (MFCTBLSIZ - 1)) -#else -#define MFCHASHMOD(h) ((h) % MFCTBLSIZ) -#endif - #define MAX_UPQ 4 /* max. no of pkts in upcall Q */ /* From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 04:53:21 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27096106566B; Tue, 14 Apr 2009 04:53:21 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 162E48FC0C; Tue, 14 Apr 2009 04:53:21 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E4rLCG094686; Tue, 14 Apr 2009 04:53:21 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E4rLDY094685; Tue, 14 Apr 2009 04:53:21 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904140453.n3E4rLDY094685@svn.freebsd.org> From: Kip Macy Date: Tue, 14 Apr 2009 04:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191042 - user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 04:53:21 -0000 Author: kmacy Date: Tue Apr 14 04:53:20 2009 New Revision: 191042 URL: http://svn.freebsd.org/changeset/base/191042 Log: update multicast interface Modified: user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/ifmcstat.c Modified: user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/ifmcstat.c ============================================================================== --- user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/ifmcstat.c Tue Apr 14 04:49:42 2009 (r191041) +++ user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/ifmcstat.c Tue Apr 14 04:53:20 2009 (r191042) @@ -1,7 +1,7 @@ /* $KAME: ifmcstat.c,v 1.48 2006/11/15 05:13:59 itojun Exp $ */ /* - * Copyright (c) 2007 Bruce M. Simpson + * Copyright (c) 2007-2009 Bruce Simpson. * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * @@ -35,8 +35,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include @@ -49,21 +51,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef HAVE_IGMPV3 -# include -#endif #define KERNEL # include #undef KERNEL #define _KERNEL -# include +#define SYSCTL_DECL(x) # include +#undef SYSCTL_DECL #undef _KERNEL #ifdef INET6 -# ifdef HAVE_MLDV2 -# include -# endif #include #define _KERNEL # include @@ -83,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -96,6 +94,8 @@ __FBSDID("$FreeBSD$"); #define INET #endif +extern void printb(const char *, unsigned int, const char *); + union sockunion { struct sockaddr_storage ss; struct sockaddr sa; @@ -111,6 +111,10 @@ typedef union sockunion sockunion_t; uint32_t ifindex = 0; int af = AF_UNSPEC; +#ifdef WITH_KVM +int Kflag = 0; +#endif +int vflag = 0; #define sa_equal(a1, a2) \ (bcmp((a1), (a2), ((a1))->sa_len) == 0) @@ -132,22 +136,17 @@ int af = AF_UNSPEC; static void if_addrlist(struct ifaddr *); static struct in_multi * in_multientry(struct in_multi *); -#ifdef HAVE_IGMPV3 -static void in_addr_slistentry(struct in_addr_slist *, char *); -#endif #endif /* INET */ #ifdef INET6 static void if6_addrlist(struct ifaddr *); static struct in6_multi * in6_multientry(struct in6_multi *); -#ifdef HAVE_MLDV2 -static void in6_addr_slistentry(struct in6_addr_slist *, char *); -#endif -static const char * inet6_n2a(struct in6_addr *); #endif /* INET6 */ static void kread(u_long, void *, int); +static void ll_addrlist(struct ifaddr *); + static int ifmcstat_kvm(const char *kernel, const char *core); #define KREAD(addr, buf, type) \ @@ -163,8 +162,35 @@ struct nlist nl[] = { #endif /* WITH_KVM */ static int ifmcstat_getifmaddrs(void); +#ifdef INET +static void in_ifinfo(struct igmp_ifinfo *); +static const char * inm_mode(u_int mode); +#endif +#ifdef INET6 +static const char * inet6_n2a(struct in6_addr *); +#endif int main(int, char **); +static void +usage() +{ + + fprintf(stderr, + "usage: ifmcstat [-i interface] [-f address family]" + " [-v]" +#ifdef WITH_KVM + " [-K] [-M core] [-N system]" +#endif + "\n"); + exit(EX_USAGE); +} + +static const char *options = "i:f:vM:N:" +#ifdef WITH_KVM + "K" +#endif + ; + int main(int argc, char **argv) { @@ -172,19 +198,15 @@ main(int argc, char **argv) #ifdef WITH_KVM const char *kernel = NULL; const char *core = NULL; - - /* "ifmcstat [kernel]" format is supported for backward compatiblity */ - if (argc == 2) - kernel = argv[1]; #endif - while ((c = getopt(argc, argv, "i:f:M:N:")) != -1) { + while ((c = getopt(argc, argv, options)) != -1) { switch (c) { case 'i': if ((ifindex = if_nametoindex(optarg)) == 0) { fprintf(stderr, "%s: unknown interface\n", optarg); - exit(1); + exit(EX_NOHOST); } break; @@ -201,12 +223,26 @@ main(int argc, char **argv) break; } #endif + if (strcmp(optarg, "link") == 0) { + af = AF_LINK; + break; + } fprintf(stderr, "%s: unknown address family\n", optarg); - exit(1); + exit(EX_USAGE); /*NOTREACHED*/ break; #ifdef WITH_KVM + case 'K': + ++Kflag; + break; +#endif + + case 'v': + ++vflag; + break; + +#ifdef WITH_KVM case 'M': core = strdup(optarg); break; @@ -217,34 +253,78 @@ main(int argc, char **argv) #endif default: - fprintf(stderr, - "usage: ifmcstat [-i interface] [-f address family]" -#ifdef WITH_KVM - " [-M core] [-N system]" -#endif - "\n"); - exit(1); + usage(); break; /*NOTREACHED*/ } } + if (af == AF_LINK && vflag) + usage(); + #ifdef WITH_KVM - error = ifmcstat_kvm(kernel, core); + if (!Kflag) + error = ifmcstat_kvm(kernel, core); /* * If KVM failed, and user did not explicitly specify a core file, - * try the sysctl backend. + * or force KVM backend to be disabled, try the sysctl backend. */ - if (error != 0 && (core == NULL && kernel == NULL)) + if (Kflag || (error != 0 && (core == NULL && kernel == NULL))) #endif error = ifmcstat_getifmaddrs(); if (error != 0) - exit(1); + exit(EX_OSERR); - exit(0); + exit(EX_OK); /*NOTREACHED*/ } +#ifdef INET + +static void +in_ifinfo(struct igmp_ifinfo *igi) +{ + + printf("\t"); + switch (igi->igi_version) { + case IGMP_VERSION_1: + case IGMP_VERSION_2: + case IGMP_VERSION_3: + printf("igmpv%d", igi->igi_version); + break; + default: + printf("igmpv?(%d)", igi->igi_version); + break; + } + printb(" flags", igi->igi_flags, "\020\1SILENT\2LOOPBACK"); + if (igi->igi_version == IGMP_VERSION_3) { + printf(" rv %u qi %u qri %u uri %u", + igi->igi_rv, igi->igi_qi, igi->igi_qri, igi->igi_uri); + } + if (vflag >= 2) { + printf(" v1timer %u v2timer %u v3timer %u", + igi->igi_v1_timer, igi->igi_v2_timer, igi->igi_v3_timer); + } + printf("\n"); +} + +static const char *inm_modes[] = { + "undefined", + "include", + "exclude", +}; + +static const char * +inm_mode(u_int mode) +{ + + if (mode >= MCAST_UNDEFINED && mode <= MCAST_EXCLUDE) + return (inm_modes[mode]); + return (NULL); +} + +#endif /* INET */ + #ifdef WITH_KVM static int @@ -280,7 +360,9 @@ ifmcstat_kvm(const char *kernel, const c #ifdef INET6 if6_addrlist(TAILQ_FIRST(&ifnet.if_addrhead)); #endif -next: + if (vflag) + ll_addrlist(TAILQ_FIRST(&ifnet.if_addrhead)); + next: ifp = nifp; } @@ -293,40 +375,71 @@ kread(u_long addr, void *buf, int len) if (kvm_read(kvmd, addr, buf, len) != len) { perror("kvm_read"); - exit(1); + exit(EX_OSERR); } } -#ifdef INET6 - -static const char * -inet6_n2a(struct in6_addr *p) +static void +ll_addrlist(struct ifaddr *ifap) { - static char buf[NI_MAXHOST]; - struct sockaddr_in6 sin6; - u_int32_t scopeid; - const int niflags = NI_NUMERICHOST; + char addrbuf[NI_MAXHOST]; + struct ifaddr ifa; + struct sockaddr sa; + struct sockaddr_dl sdl; + struct ifaddr *ifap0; + int error; - memset(&sin6, 0, sizeof(sin6)); - sin6.sin6_family = AF_INET6; - sin6.sin6_len = sizeof(struct sockaddr_in6); - sin6.sin6_addr = *p; - if (IN6_IS_ADDR_LINKLOCAL(p) || IN6_IS_ADDR_MC_LINKLOCAL(p) || - IN6_IS_ADDR_MC_NODELOCAL(p)) { - scopeid = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); - if (scopeid) { - sin6.sin6_scope_id = scopeid; - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; + if (af && af != AF_LINK) + return; + + ifap0 = ifap; + while (ifap) { + KREAD(ifap, &ifa, struct ifaddr); + if (ifa.ifa_addr == NULL) + goto nextifap; + KREAD(ifa.ifa_addr, &sa, struct sockaddr); + if (sa.sa_family != PF_LINK) + goto nextifap; + KREAD(ifa.ifa_addr, &sdl, struct sockaddr_dl); + if (sdl.sdl_alen == 0) + goto nextifap; + addrbuf[0] = '\0'; + error = getnameinfo((struct sockaddr *)&sdl, sdl.sdl_len, + addrbuf, sizeof(addrbuf), NULL, 0, NI_NUMERICHOST); + printf("\tlink %s\n", addrbuf); + nextifap: + ifap = ifa.ifa_link.tqe_next; + } + if (ifap0) { + struct ifnet ifnet; + struct ifmultiaddr ifm, *ifmp = 0; + + KREAD(ifap0, &ifa, struct ifaddr); + KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); + if (TAILQ_FIRST(&ifnet.if_multiaddrs)) + ifmp = TAILQ_FIRST(&ifnet.if_multiaddrs); + while (ifmp) { + KREAD(ifmp, &ifm, struct ifmultiaddr); + if (ifm.ifma_addr == NULL) + goto nextmulti; + KREAD(ifm.ifma_addr, &sa, struct sockaddr); + if (sa.sa_family != AF_LINK) + goto nextmulti; + KREAD(ifm.ifma_addr, &sdl, struct sockaddr_dl); + addrbuf[0] = '\0'; + error = getnameinfo((struct sockaddr *)&sdl, + sdl.sdl_len, addrbuf, sizeof(addrbuf), + NULL, 0, NI_NUMERICHOST); + printf("\t\tgroup %s refcnt %d\n", + addrbuf, ifm.ifma_refcount); + nextmulti: + ifmp = TAILQ_NEXT(&ifm, ifma_link); } } - if (getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len, - buf, sizeof(buf), NULL, 0, niflags) == 0) - return buf; - else - return "(invalid)"; } +#ifdef INET6 + static void if6_addrlist(struct ifaddr *ifap) { @@ -384,87 +497,13 @@ static struct in6_multi * in6_multientry(struct in6_multi *mc) { struct in6_multi multi; -#ifdef HAVE_MLDV2 - struct in6_multi_source src; - struct router6_info rt6i; -#endif KREAD(mc, &multi, struct in6_multi); printf("\t\tgroup %s", inet6_n2a(&multi.in6m_addr)); printf(" refcnt %u\n", multi.in6m_refcount); -#ifdef HAVE_MLDV2 - if (multi.in6m_rti != NULL) { - KREAD(multi.in6m_rti, &rt6i, struct router_info); - printf("\t\t\t"); - switch (rt6i.rt6i_type) { - case MLD_V1_ROUTER: - printf("mldv1"); - break; - case MLD_V2_ROUTER: - printf("mldv2"); - break; - default: - printf("mldv?(%d)", rt6i.rt6i_type); - break; - } - - if (multi.in6m_source == NULL) { - printf("\n"); - return(multi.in6m_entry.le_next); - } - - KREAD(multi.in6m_source, &src, struct in6_multi_source); - printf(" mode=%s grpjoin=%d\n", - src.i6ms_mode == MCAST_INCLUDE ? "include" : - src.i6ms_mode == MCAST_EXCLUDE ? "exclude" : - "???", - src.i6ms_grpjoin); - in6_addr_slistentry(src.i6ms_cur, "current"); - in6_addr_slistentry(src.i6ms_rec, "recorded"); - in6_addr_slistentry(src.i6ms_in, "included"); - in6_addr_slistentry(src.i6ms_ex, "excluded"); - in6_addr_slistentry(src.i6ms_alw, "allowed"); - in6_addr_slistentry(src.i6ms_blk, "blocked"); - in6_addr_slistentry(src.i6ms_toin, "to-include"); - in6_addr_slistentry(src.i6ms_ex, "to-exclude"); - } -#endif - return(multi.in6m_entry.le_next); -} - -#ifdef HAVE_MLDV2 -static void -in6_addr_slistentry(struct in6_addr_slist *ias, char *heading) -{ - struct in6_addr_slist slist; - struct i6as_head head; - struct in6_addr_source src; - - if (ias == NULL) { - printf("\t\t\t\t%s (none)\n", heading); - return; - } - memset(&slist, 0, sizeof(slist)); - KREAD(ias, &slist, struct in6_addr_source); - printf("\t\t\t\t%s (entry num=%d)\n", heading, slist.numsrc); - if (slist.numsrc == 0) { - return; - } - KREAD(slist.head, &head, struct i6as_head); - - KREAD(head.lh_first, &src, struct in6_addr_source); - while (1) { - printf("\t\t\t\t\tsource %s (ref=%d)\n", - inet6_n2a(&src.i6as_addr.sin6_addr), - src.i6as_refcount); - if (src.i6as_list.le_next == NULL) - break; - KREAD(src.i6as_list.le_next, &src, struct in6_addr_source); - } - return; + return (multi.in6m_entry.le_next); } -#endif /* HAVE_MLDV2 */ #endif /* INET6 */ @@ -474,6 +513,7 @@ static void if_addrlist(struct ifaddr *ifap) { struct ifaddr ifa; + struct ifnet ifnet; struct sockaddr sa; struct in_ifaddr ia; struct ifaddr *ifap0; @@ -490,11 +530,24 @@ if_addrlist(struct ifaddr *ifap) goto nextifap; KREAD(ifap, &ia, struct in_ifaddr); printf("\tinet %s\n", inet_ntoa(ia.ia_addr.sin_addr)); + /* + * Print per-link IGMP information, if available. + */ + if (ifa.ifa_ifp != NULL) { + struct in_ifinfo ii; + struct igmp_ifinfo igi; + + KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); + KREAD(ifnet.if_afdata[AF_INET], &ii, struct in_ifinfo); + if (ii.ii_igmp != NULL) { + KREAD(ii.ii_igmp, &igi, struct igmp_ifinfo); + in_ifinfo(&igi); + } + } nextifap: ifap = ifa.ifa_link.tqe_next; } if (ifap0) { - struct ifnet ifnet; struct ifmultiaddr ifm, *ifmp = 0; struct sockaddr_dl sdl; @@ -523,107 +576,277 @@ if_addrlist(struct ifaddr *ifap) } } -static struct in_multi * -in_multientry(struct in_multi *mc) +static const char *inm_states[] = { + "not-member", + "silent", + "idle", + "lazy", + "sleeping", + "awakening", + "query-pending", + "sg-query-pending", + "leaving" +}; + +static const char * +inm_state(u_int state) { - struct in_multi multi; - struct router_info rti; -#ifdef HAVE_IGMPV3 - struct in_multi_source src; -#endif - - KREAD(mc, &multi, struct in_multi); - printf("\t\tgroup %s\n", inet_ntoa(multi.inm_addr)); - - if (multi.inm_rti != NULL) { - KREAD(multi.inm_rti, &rti, struct router_info); - printf("\t\t\t"); - switch (rti.rti_type) { - case IGMP_V1_ROUTER: - printf("igmpv1"); - break; - case IGMP_V2_ROUTER: - printf("igmpv2"); - break; -#ifdef HAVE_IGMPV3 - case IGMP_V3_ROUTER: - printf("igmpv3"); - break; -#endif - default: - printf("igmpv?(%d)", rti.rti_type); - break; + + if (state >= IGMP_NOT_MEMBER && state <= IGMP_LEAVING_MEMBER) + return (inm_states[state]); + return (NULL); +} + +#if 0 +static struct ip_msource * +ims_min_kvm(struct in_multi *pinm) +{ + struct ip_msource ims0; + struct ip_msource *tmp, *parent; + + parent = NULL; + tmp = RB_ROOT(&pinm->inm_srcs); + while (tmp) { + parent = tmp; + KREAD(tmp, &ims0, struct ip_msource); + tmp = RB_LEFT(&ims0, ims_link); + } + return (parent); /* kva */ +} + +/* XXX This routine is buggy. See RB_NEXT in sys/tree.h. */ +static struct ip_msource * +ims_next_kvm(struct ip_msource *ims) +{ + struct ip_msource ims0, ims1; + struct ip_msource *tmp; + + KREAD(ims, &ims0, struct ip_msource); + if (RB_RIGHT(&ims0, ims_link)) { + ims = RB_RIGHT(&ims0, ims_link); + KREAD(ims, &ims1, struct ip_msource); + while ((tmp = RB_LEFT(&ims1, ims_link))) { + KREAD(tmp, &ims0, struct ip_msource); + ims = RB_LEFT(&ims0, ims_link); } + } else { + tmp = RB_PARENT(&ims0, ims_link); + if (tmp) { + KREAD(tmp, &ims1, struct ip_msource); + if (ims == RB_LEFT(&ims1, ims_link)) + ims = tmp; + } else { + while ((tmp = RB_PARENT(&ims0, ims_link))) { + KREAD(tmp, &ims1, struct ip_msource); + if (ims == RB_RIGHT(&ims1, ims_link)) { + ims = tmp; + KREAD(ims, &ims0, struct ip_msource); + } else + break; + } + ims = RB_PARENT(&ims0, ims_link); + } + } + return (ims); /* kva */ +} -#ifdef HAVE_IGMPV3 - if (multi.inm_source == NULL) { - printf("\n"); - return (multi.inm_list.le_next); - } - - KREAD(multi.inm_source, &src, struct in_multi_source); - printf(" mode=%s grpjoin=%d\n", - src.ims_mode == MCAST_INCLUDE ? "include" : - src.ims_mode == MCAST_EXCLUDE ? "exclude" : - "???", - src.ims_grpjoin); - in_addr_slistentry(src.ims_cur, "current"); - in_addr_slistentry(src.ims_rec, "recorded"); - in_addr_slistentry(src.ims_in, "included"); - in_addr_slistentry(src.ims_ex, "excluded"); - in_addr_slistentry(src.ims_alw, "allowed"); - in_addr_slistentry(src.ims_blk, "blocked"); - in_addr_slistentry(src.ims_toin, "to-include"); - in_addr_slistentry(src.ims_ex, "to-exclude"); -#else - printf("\n"); +static void +inm_print_sources_kvm(struct in_multi *pinm) +{ + struct ip_msource ims0; + struct ip_msource *ims; + struct in_addr src; + int cnt; + uint8_t fmode; + + cnt = 0; + fmode = pinm->inm_st[1].iss_fmode; + if (fmode == MCAST_UNDEFINED) + return; + for (ims = ims_min_kvm(pinm); ims != NULL; ims = ims_next_kvm(ims)) { + if (cnt == 0) + printf(" srcs "); + KREAD(ims, &ims0, struct ip_msource); + /* Only print sources in-mode at t1. */ + if (fmode != ims_get_mode(pinm, ims, 1)) + continue; + src.s_addr = htonl(ims0.ims_haddr); + printf("%s%s", (cnt++ == 0 ? "" : ","), inet_ntoa(src)); + } +} #endif + +static struct in_multi * +in_multientry(struct in_multi *pinm) +{ + struct in_multi inm; + const char *state, *mode; + + KREAD(pinm, &inm, struct in_multi); + printf("\t\tgroup %s", inet_ntoa(inm.inm_addr)); + printf(" refcnt %u", inm.inm_refcount); + + state = inm_state(inm.inm_state); + if (state) + printf(" state %s", state); + else + printf(" state (%d)", inm.inm_state); + + mode = inm_mode(inm.inm_st[1].iss_fmode); + if (mode) + printf(" mode %s", mode); + else + printf(" mode (%d)", inm.inm_st[1].iss_fmode); + + if (vflag >= 2) { + printf(" asm %u ex %u in %u rec %u", + (u_int)inm.inm_st[1].iss_asm, + (u_int)inm.inm_st[1].iss_ex, + (u_int)inm.inm_st[1].iss_in, + (u_int)inm.inm_st[1].iss_rec); } +#if 0 + /* Buggy. */ + if (vflag) + inm_print_sources_kvm(&inm); +#endif + + printf("\n"); return (NULL); } -#ifdef HAVE_IGMPV3 -static void -in_addr_slistentry(struct in_addr_slist *ias, char *heading) +#endif /* INET */ + +#endif /* WITH_KVM */ + +#ifdef INET6 +static const char * +inet6_n2a(struct in6_addr *p) { - struct in_addr_slist slist; - struct ias_head head; - struct in_addr_source src; + static char buf[NI_MAXHOST]; + struct sockaddr_in6 sin6; + u_int32_t scopeid; + const int niflags = NI_NUMERICHOST; - if (ias == NULL) { - printf("\t\t\t\t%s (none)\n", heading); - return; + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_INET6; + sin6.sin6_len = sizeof(struct sockaddr_in6); + sin6.sin6_addr = *p; + if (IN6_IS_ADDR_LINKLOCAL(p) || IN6_IS_ADDR_MC_LINKLOCAL(p) || + IN6_IS_ADDR_MC_NODELOCAL(p)) { + scopeid = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); + if (scopeid) { + sin6.sin6_scope_id = scopeid; + sin6.sin6_addr.s6_addr[2] = 0; + sin6.sin6_addr.s6_addr[3] = 0; + } + } + if (getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len, + buf, sizeof(buf), NULL, 0, niflags) == 0) { + return (buf); + } else { + return ("(invalid)"); } - memset(&slist, 0, sizeof(slist)); - KREAD(ias, &slist, struct in_addr_source); - printf("\t\t\t\t%s (entry num=%d)\n", heading, slist.numsrc); - if (slist.numsrc == 0) { +} +#endif /* INET6 */ + +#ifdef INET +/* + * Retrieve per-group source filter mode and lists via sysctl. + */ +static void +inm_print_sources_sysctl(uint32_t ifindex, struct in_addr gina) +{ +#define MAX_SYSCTL_TRY 5 + int mib[7]; + int ntry = 0; + size_t mibsize; + size_t len; + size_t needed; + size_t cnt; + int i; + char *buf; + struct in_addr *pina; + uint32_t *p; + uint32_t fmode; + const char *modestr; + + mibsize = sizeof(mib) / sizeof(mib[0]); + if (sysctlnametomib("net.inet.ip.mcast.filters", mib, &mibsize) == -1) { + perror("sysctlnametomib"); return; } - KREAD(slist.head, &head, struct ias_head); - KREAD(head.lh_first, &src, struct in_addr_source); - while (1) { - printf("\t\t\t\t\tsource %s (ref=%d)\n", - inet_ntoa(src.ias_addr.sin_addr), src.ias_refcount); - if (src.ias_list.le_next == NULL) - break; - KREAD(src.ias_list.le_next, &src, struct in_addr_source); + needed = 0; + mib[5] = ifindex; + mib[6] = gina.s_addr; /* 32 bits wide */ + mibsize = sizeof(mib) / sizeof(mib[0]); + do { + if (sysctl(mib, mibsize, NULL, &needed, NULL, 0) == -1) { + perror("sysctl net.inet.ip.mcast.filters"); + return; + } + if ((buf = malloc(needed)) == NULL) { + perror("malloc"); + return; + } + if (sysctl(mib, mibsize, buf, &needed, NULL, 0) == -1) { + if (errno != ENOMEM || ++ntry >= MAX_SYSCTL_TRY) { + perror("sysctl"); + goto out_free; + } + free(buf); + buf = NULL; + } + } while (buf == NULL); + + len = needed; + if (len < sizeof(uint32_t)) { + perror("sysctl"); + goto out_free; + } + + p = (uint32_t *)buf; + fmode = *p++; + len -= sizeof(uint32_t); + + modestr = inm_mode(fmode); + if (modestr) + printf(" mode %s", modestr); + else + printf(" mode (%u)", fmode); + + if (vflag == 0) + goto out_free; + + cnt = len / sizeof(struct in_addr); + pina = (struct in_addr *)p; + + for (i = 0; i < cnt; i++) { + if (i == 0) + printf(" srcs "); + fprintf(stdout, "%s%s", (i == 0 ? "" : ","), + inet_ntoa(*pina++)); + len -= sizeof(struct in_addr); + } + if (len > 0) { + fprintf(stderr, "warning: %u trailing bytes from %s\n", + (unsigned int)len, "net.inet.ip.mcast.filters"); } - return; + +out_free: + free(buf); +#undef MAX_SYSCTL_TRY } -#endif /* HAVE_IGMPV3 */ #endif /* INET */ -#endif /* WITH_KVM */ - static int ifmcstat_getifmaddrs(void) { char thisifname[IFNAMSIZ]; - char addrbuf[INET6_ADDRSTRLEN]; + char addrbuf[NI_MAXHOST]; struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; sockunion_t lastifasa; @@ -698,25 +921,28 @@ ifmcstat_getifmaddrs(void) (ifa->ifa_addr == NULL) || (ifa->ifa_addr->sa_family != pgsa->sa.sa_family)) continue; -#ifdef INET6 /* * For AF_INET6 only the link-local address should - * be returned. - * XXX: ifmcstat actually prints all of the inet6 - * addresses, but never mind... + * be returned. If built without IPv6 support, + * skip this address entirely. */ pifasa = (sockunion_t *)ifa->ifa_addr; - if (pifasa->sa.sa_family == AF_INET6 && - !IN6_IS_ADDR_LINKLOCAL(&pifasa->sin6.sin6_addr)) { + if (pifasa->sa.sa_family == AF_INET6 +#ifdef INET6 + && !IN6_IS_ADDR_LINKLOCAL(&pifasa->sin6.sin6_addr) +#endif + ) { pifasa = NULL; continue; } -#endif break; } if (pifasa == NULL) continue; /* primary address not found */ + if (!vflag && pifasa->sa.sa_family == AF_LINK) + continue; + /* Parse and print primary address, if not already printed. */ if (lastifasa.ss.ss_family == AF_UNSPEC || ((lastifasa.ss.ss_family == AF_LINK && @@ -739,8 +965,18 @@ ifmcstat_getifmaddrs(void) } switch (pifasa->sa.sa_family) { - case AF_INET: case AF_INET6: +#ifdef INET6 + { + const char *p = + inet6_n2a(&pifasa->sin6.sin6_addr); + strlcpy(addrbuf, p, sizeof(addrbuf)); + break; + } +#else + /* FALLTHROUGH */ +#endif + case AF_INET: case AF_LINK: error = getnameinfo(&pifasa->sa, pifasa->sa.sa_len, @@ -755,15 +991,57 @@ ifmcstat_getifmaddrs(void) } fprintf(stdout, "\t%s %s\n", pafname, addrbuf); +#ifdef INET + /* + * Print per-link IGMP information, if available. + */ + if (pifasa->sa.sa_family == AF_INET) { + struct igmp_ifinfo igi; + size_t mibsize, len; + int mib[5]; + + mibsize = sizeof(mib) / sizeof(mib[0]); + if (sysctlnametomib("net.inet.igmp.ifinfo", + mib, &mibsize) == -1) { + perror("sysctlnametomib"); + goto next_ifnet; + } + mib[mibsize] = thisifindex; + len = sizeof(struct igmp_ifinfo); + if (sysctl(mib, mibsize + 1, &igi, &len, NULL, + 0) == -1) { + perror("sysctl net.inet.igmp.ifinfo"); + goto next_ifnet; + } + in_ifinfo(&igi); + } +next_ifnet: +#endif lastifasa = *pifasa; } /* Print this group address. */ - error = getnameinfo(&pgsa->sa, pgsa->sa.sa_len, addrbuf, - sizeof(addrbuf), NULL, 0, NI_NUMERICHOST); - if (error) - perror("getnameinfo"); - fprintf(stdout, "\t\tgroup %s\n", addrbuf); +#ifdef INET6 + if (pgsa->sa.sa_family == AF_INET6) { + const char *p = inet6_n2a(&pgsa->sin6.sin6_addr); + strlcpy(addrbuf, p, sizeof(addrbuf)); + } else +#endif + { + error = getnameinfo(&pgsa->sa, pgsa->sa.sa_len, + addrbuf, sizeof(addrbuf), NULL, 0, NI_NUMERICHOST); + if (error) + perror("getnameinfo"); + } + + fprintf(stdout, "\t\tgroup %s", addrbuf); +#ifdef INET + if (pgsa->sa.sa_family == AF_INET) { + inm_print_sources_sysctl(thisifindex, + pgsa->sin.sin_addr); + } +#endif + fprintf(stdout, "\n"); /* Link-layer mapping, if present. */ pllsa = (sockunion_t *)ifma->ifma_lladdr; From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 04:59:57 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E91B8106566C; Tue, 14 Apr 2009 04:59:57 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE5B78FC0A; Tue, 14 Apr 2009 04:59:57 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E4xv2g094849; Tue, 14 Apr 2009 04:59:57 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E4xv9I094847; Tue, 14 Apr 2009 04:59:57 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904140459.n3E4xv9I094847@svn.freebsd.org> From: Kip Macy Date: Tue, 14 Apr 2009 04:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191043 - user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 04:59:58 -0000 Author: kmacy Date: Tue Apr 14 04:59:57 2009 New Revision: 191043 URL: http://svn.freebsd.org/changeset/base/191043 Log: missing bits for build Added: user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/printb.c Modified: user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/Makefile Modified: user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/Makefile ============================================================================== --- user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/Makefile Tue Apr 14 04:53:20 2009 (r191042) +++ user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/Makefile Tue Apr 14 04:59:57 2009 (r191043) @@ -4,8 +4,10 @@ .include PROG= ifmcstat +SRCS= ifmcstat.c printb.c + MAN= ifmcstat.8 -BINMODE= 550 +BINMODE= 555 WARNS?= 2 Added: user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/printb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/printb.c Tue Apr 14 04:59:57 2009 (r191043) @@ -0,0 +1,64 @@ +/* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 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. + * 4. Neither the name of the University 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 REGENTS 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD: head/usr.sbin/ifmcstat/printb.c 189341 2009-03-04 02:12:29Z bms $"); + +#include + +/* + * Print a value a la the %b format of the kernel's printf + */ +void +printb(const char *s, unsigned int v, const char *bits) +{ + int i, any = 0; + char c; + + if (bits && *bits == 8) + printf("%s=%o", s, v); + else + printf("%s=%x", s, v); + bits++; + if (bits) { + putchar('<'); + while ((i = *bits++) != '\0') { + if (v & (1 << (i-1))) { + if (any) + putchar(','); + any = 1; + for (; (c = *bits) > 32; bits++) + putchar(c); + } else + for (; *bits > 32; bits++) + ; + } + putchar('>'); + } +} From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 05:07:20 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 112931065678; Tue, 14 Apr 2009 05:07:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43F518FC08; Tue, 14 Apr 2009 05:07:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E57Il4095062; Tue, 14 Apr 2009 05:07:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E57IZ9095061; Tue, 14 Apr 2009 05:07:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904140507.n3E57IZ9095061@svn.freebsd.org> From: Andrew Thompson Date: Tue, 14 Apr 2009 05:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191044 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 05:07:20 -0000 Author: thompsa Date: Tue Apr 14 05:07:17 2009 New Revision: 191044 URL: http://svn.freebsd.org/changeset/base/191044 Log: Drain the state task before removing the vap from the tailq, this should make driver teardown safe. Modified: user/thompsa/vaptq/sys/net80211/ieee80211.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211.c Tue Apr 14 04:59:57 2009 (r191043) +++ user/thompsa/vaptq/sys/net80211/ieee80211.c Tue Apr 14 05:07:17 2009 (r191044) @@ -562,7 +562,16 @@ ieee80211_vap_detach(struct ieee80211vap * while we cleanup internal state but that is hard. */ ieee80211_stop_locked(vap); + IEEE80211_UNLOCK(ic); + + /* + * Flush any deferred vap tasks. + * NB: must be before ether_ifdetach() and removal from ic_vaps list + */ + taskqueue_drain(ic->ic_tq, &vap->iv_nstate_task); + IEEE80211_LOCK(ic); + KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); ieee80211_syncflag_locked(ic, IEEE80211_F_WME); #ifdef IEEE80211_SUPPORT_SUPERG @@ -576,12 +585,6 @@ ieee80211_vap_detach(struct ieee80211vap ieee80211_syncifflag_locked(ic, IFF_ALLMULTI); IEEE80211_UNLOCK(ic); - /* - * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach(); - */ - taskqueue_drain(ic->ic_tq, &vap->iv_nstate_task); - /* XXX can't hold com lock */ /* NB: bpfattach is called by ether_ifdetach and claims all taps */ ether_ifdetach(ifp); From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 05:09:11 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F30171065670; Tue, 14 Apr 2009 05:09:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2DD18FC1A; Tue, 14 Apr 2009 05:09:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E599VL095136; Tue, 14 Apr 2009 05:09:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E599lm095135; Tue, 14 Apr 2009 05:09:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904140509.n3E599lm095135@svn.freebsd.org> From: Andrew Thompson Date: Tue, 14 Apr 2009 05:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191045 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 05:09:11 -0000 Author: thompsa Date: Tue Apr 14 05:09:09 2009 New Revision: 191045 URL: http://svn.freebsd.org/changeset/base/191045 Log: Call markwaiting() from the taskqueue thread to ensure other vaps are silenced, this allows us to remove the forcesync on INIT transitions. Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Tue Apr 14 05:07:17 2009 (r191044) +++ user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Tue Apr 14 05:09:09 2009 (r191045) @@ -1491,7 +1491,7 @@ ieee80211_cac_completeswitch(struct ieee * and mark them as waiting for a scan to complete. These vaps * will be brought up when the scan completes and the scanning vap * reaches RUN state by wakeupwaiting. - * XXX if we do this in threads we can use sleep/wakeup. + * This is called from the state taskqueue. */ static void markwaiting(struct ieee80211vap *vap0) @@ -1515,6 +1515,7 @@ markwaiting(struct ieee80211vap *vap0) * Wakeup all vap's waiting for a scan to complete. This is the * companion to markwaiting (above) and is used to coordinate * multiple vaps scanning. + * This is called from the state taskqueue. */ static void wakeupwaiting(struct ieee80211vap *vap0) @@ -1566,6 +1567,19 @@ ieee80211_newstate_cb_locked(struct ieee IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s arg %d\n", __func__, ieee80211_state_name[nstate], arg); + if (nstate == IEEE80211_S_SCAN && ostate != IEEE80211_S_INIT) { + /* + * SCAN was forced; e.g. on beacon miss. Force other running + * vap's to INIT state and mark them as waiting for the scan to + * complete. This insures they don't interfere with our + * scanning. Since we are single threaded the vaps can not + * transition again while we are executing. + * + * XXX not always right, assumes ap follows sta + */ + markwaiting(vap); + } + rc = vap->iv_newstate(vap, nstate, arg); if (rc != 0 || vap->iv_state != nstate) { if (rc == EINPROGRESS) @@ -1642,10 +1656,17 @@ ieee80211_new_state_locked(struct ieee80 struct ieee80211com *ic = vap->iv_ic; struct ieee80211vap *vp; enum ieee80211_state ostate; - int forcesync, nrunning, nscanning, rc; + int nrunning, nscanning, rc; IEEE80211_LOCK_ASSERT(ic); + /* Warn if the previous state hasn't completed. XXX Queue? */ + if (vap->iv_state != vap->iv_nstate) + IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, + "%s: pending %s -> %s transition lost\n", __func__, + ieee80211_state_name[vap->iv_state], + ieee80211_state_name[vap->iv_nstate]); + nrunning = nscanning = 0; /* XXX can track this state instead of calculating */ TAILQ_FOREACH(vp, &ic->ic_vaps, iv_next) { @@ -1659,7 +1680,6 @@ ieee80211_new_state_locked(struct ieee80 } } ostate = vap->iv_state; - forcesync = 0; IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s (nrunning %d nscanning %d)\n", __func__, ieee80211_state_name[ostate], ieee80211_state_name[nstate], @@ -1707,16 +1727,6 @@ ieee80211_new_state_locked(struct ieee80 } #endif } - } else { - /* - * SCAN was forced; e.g. on beacon miss. Force - * other running vap's to INIT state and mark - * them as waiting for the scan to complete. This - * insures they don't interfere with our scanning. - * - * XXX not always right, assumes ap follows sta - */ - markwaiting(vap); } break; case IEEE80211_S_RUN: @@ -1759,26 +1769,15 @@ ieee80211_new_state_locked(struct ieee80 /* INIT -> INIT. nothing to do */ vap->iv_flags_ext &= ~IEEE80211_FEXT_SCANWAIT; } - forcesync = 1; /* fall thru... */ default: break; } - if (forcesync) { - /* - * Complete the state transition synchronously, asserting that - * the lock is not dropped. - */ - WITNESS_NORELEASE(IEEE80211_LOCK_OBJ(ic)); - rc = ieee80211_newstate_cb_locked(vap, nstate, arg); - WITNESS_RELEASEOK(IEEE80211_LOCK_OBJ(ic)); - } else { - /* defer the state change to a thread */ - vap->iv_nstate = nstate; - vap->iv_nstate_arg = arg; - taskqueue_enqueue(ic->ic_tq, &vap->iv_nstate_task); - return (EINPROGRESS); - } + /* defer the state change to a thread */ + vap->iv_nstate = nstate; + vap->iv_nstate_arg = arg; + taskqueue_enqueue(ic->ic_tq, &vap->iv_nstate_task); + return (EINPROGRESS); done: return rc; } From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 05:12:03 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 244EE1065670; Tue, 14 Apr 2009 05:12:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 134A78FC15; Tue, 14 Apr 2009 05:12:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E5C1w8095254; Tue, 14 Apr 2009 05:12:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E5C1Vs095253; Tue, 14 Apr 2009 05:12:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904140512.n3E5C1Vs095253@svn.freebsd.org> From: Andrew Thompson Date: Tue, 14 Apr 2009 05:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191046 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 05:12:03 -0000 Author: thompsa Date: Tue Apr 14 05:12:01 2009 New Revision: 191046 URL: http://svn.freebsd.org/changeset/base/191046 Log: Move scanning to a taskqueue thread. This now does the full scan within the one execution rather than rearming timers, the thread will be signalled to move on to the next channel. This may block the ic taskqueue for too long since a state change does not cancel the scan first. Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Tue Apr 14 05:09:09 2009 (r191045) +++ user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Tue Apr 14 05:12:01 2009 (r191046) @@ -33,7 +33,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include +#include #include @@ -52,10 +55,12 @@ struct scan_state { #define ISCAN_MINDWELL 0x0001 /* min dwell time reached */ #define ISCAN_DISCARD 0x0002 /* discard rx'd frames */ #define ISCAN_CANCEL 0x0004 /* cancel current scan */ -#define ISCAN_START 0x0008 /* 1st time through next_scan */ +#define ISCAN_ABORT 0x0008 /* end the scan immediately */ unsigned long ss_chanmindwell; /* min dwell on curchan */ unsigned long ss_scanend; /* time scan must stop */ u_int ss_duration; /* duration for next scan */ + struct task ss_scan_task; /* scan execution */ + struct cv ss_scan_cv; /* scan signal */ struct callout ss_scan_timer; /* scan timer */ }; #define SCAN_PRIVATE(ss) ((struct scan_state *) ss) @@ -88,10 +93,10 @@ struct scan_state { #define ROAM_RATE_QUARTER_DEFAULT 2*3 /* quarter-width 11a/g bss */ #define ROAM_MCS_11N_DEFAULT (1 | IEEE80211_RATE_MCS) /* 11n bss */ -static void scan_restart_pwrsav(void *); static void scan_curchan(struct ieee80211_scan_state *, unsigned long); static void scan_mindwell(struct ieee80211_scan_state *); -static void scan_next(void *); +static void scan_signal(void *); +static void scan_task(void *, int); MALLOC_DEFINE(M_80211_SCAN, "80211scan", "802.11 scan state"); @@ -107,6 +112,8 @@ ieee80211_scan_attach(struct ieee80211co return; } callout_init_mtx(&ss->ss_scan_timer, IEEE80211_LOCK_OBJ(ic), 0); + cv_init(&ss->ss_scan_cv, "scan"); + TASK_INIT(&ss->ss_scan_task, 0, scan_task, ss); ic->ic_scan = &ss->base; ic->ic_scan_curchan = scan_curchan; @@ -119,12 +126,15 @@ ieee80211_scan_detach(struct ieee80211co struct ieee80211_scan_state *ss = ic->ic_scan; if (ss != NULL) { - callout_drain(&SCAN_PRIVATE(ss)->ss_scan_timer); + IEEE80211_LOCK(ic); + SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_ABORT; + scan_signal(ss); + IEEE80211_UNLOCK(ic); + taskqueue_drain(ic->ic_tq, &SCAN_PRIVATE(ss)->ss_scan_task); if (ss->ss_ops != NULL) { ss->ss_ops->scan_detach(ss); ss->ss_ops = NULL; } - ic->ic_flags &= ~IEEE80211_F_SCAN; ic->ic_scan = NULL; free(SCAN_PRIVATE(ss), M_80211_SCAN); } @@ -174,9 +184,8 @@ ieee80211_scan_vdetach(struct ieee80211v ss = ic->ic_scan; if (ss != NULL && ss->ss_vap == vap) { if (ic->ic_flags & IEEE80211_F_SCAN) { - /* XXX callout_drain */ - callout_stop(&SCAN_PRIVATE(ss)->ss_scan_timer); - ic->ic_flags &= ~IEEE80211_F_SCAN; + SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_ABORT; + scan_signal(ss); } if (ss->ss_ops != NULL) { ss->ss_ops->scan_detach(ss); @@ -352,76 +361,6 @@ scan_dump(struct ieee80211_scan_state *s } #endif /* IEEE80211_DEBUG */ -/* - * Enable station power save mode and start/restart the scanning thread. - */ -static void -scan_restart_pwrsav(void *arg) -{ - struct scan_state *ss = (struct scan_state *) arg; - struct ieee80211vap *vap = ss->base.ss_vap; - struct ieee80211com *ic = vap->iv_ic; - int ticksdelay; - - ieee80211_sta_pwrsave(vap, 1); - /* - * Use an initial 1ms delay so the null - * data frame has a chance to go out. - * XXX 1ms is a lot, better to trigger scan - * on tx complete. - */ - ticksdelay = msecs_to_ticks(1); - if (ticksdelay < 1) - ticksdelay = 1; - ic->ic_scan_start(ic); /* notify driver */ - ss->ss_scanend = ticks + ticksdelay + ss->ss_duration; - ss->ss_iflags |= ISCAN_START; - callout_reset(&ss->ss_scan_timer, ticksdelay, scan_next, ss); -} - -/* - * Start/restart scanning. If we're operating in station mode - * and associated notify the ap we're going into power save mode - * and schedule a callback to initiate the work (where there's a - * better context for doing the work). Otherwise, start the scan - * directly. - */ -static int -scan_restart(struct scan_state *ss, u_int duration) -{ - struct ieee80211vap *vap = ss->base.ss_vap; - struct ieee80211com *ic = vap->iv_ic; - int defer = 0; - - if (ss->base.ss_next == ss->base.ss_last) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: no channels to scan\n", __func__); - return 0; - } - if (vap->iv_opmode == IEEE80211_M_STA && - vap->iv_state == IEEE80211_S_RUN) { - if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { - /* - * Initiate power save before going off-channel. - * Note that we cannot do this directly because - * of locking issues; instead we defer it to a - * tasklet. - */ - ss->ss_duration = duration; - defer = 1; - } - } - - if (!defer) { - ic->ic_scan_start(ic); /* notify driver */ - ss->ss_scanend = ticks + duration; - ss->ss_iflags |= ISCAN_START; - callout_reset(&ss->ss_scan_timer, 0, scan_next, ss); - } else - scan_restart_pwrsav(ss); - return 1; -} - static void copy_ssid(struct ieee80211vap *vap, struct ieee80211_scan_state *ss, int nssid, const struct ieee80211_scan_ssid ssids[]) @@ -485,6 +424,7 @@ start_scan_locked(const struct ieee80211 /* NB: flush frames rx'd before 1st channel change */ SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; + SCAN_PRIVATE(ss)->ss_duration = duration; ss->ss_next = 0; ss->ss_mindwell = mindwell; ss->ss_maxdwell = maxdwell; @@ -493,8 +433,9 @@ start_scan_locked(const struct ieee80211 if (ieee80211_msg_scan(vap)) scan_dump(ss); #endif /* IEEE80211_DEBUG */ - if (scan_restart(SCAN_PRIVATE(ss), duration)) - ic->ic_flags |= IEEE80211_F_SCAN; + ic->ic_flags |= IEEE80211_F_SCAN; + taskqueue_enqueue(ic->ic_tq, + &SCAN_PRIVATE(ss)->ss_scan_task); } } else { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, @@ -716,11 +657,12 @@ ieee80211_bg_scan(struct ieee80211vap *v } /* NB: flush frames rx'd before 1st channel change */ SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; + SCAN_PRIVATE(ss)->ss_duration = duration; ss->ss_maxdwell = duration; - if (scan_restart(SCAN_PRIVATE(ss), duration)) { - ic->ic_flags |= IEEE80211_F_SCAN; - ic->ic_flags_ext |= IEEE80211_FEXT_BGSCAN; - } + ic->ic_flags |= IEEE80211_F_SCAN; + ic->ic_flags_ext |= IEEE80211_FEXT_BGSCAN; + taskqueue_enqueue(ic->ic_tq, + &SCAN_PRIVATE(ss)->ss_scan_task); } else { /* XXX msg+stat */ } @@ -756,9 +698,8 @@ ieee80211_cancel_scan(struct ieee80211va /* clear bg scan NOPICK and mark cancel request */ ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_CANCEL; - /* force it to fire asap */ - callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, - 0, scan_next, ss); + /* wake up the scan task */ + scan_signal(ss); } IEEE80211_UNLOCK(ic); } @@ -783,9 +724,8 @@ ieee80211_cancel_anyscan(struct ieee8021 /* clear bg scan NOPICK and mark cancel request */ ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_CANCEL; - /* force it to fire asap */ - callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, - 0, scan_next, ss); + /* wake up the scan task */ + scan_signal(ss); } IEEE80211_UNLOCK(ic); } @@ -800,7 +740,10 @@ ieee80211_scan_next(struct ieee80211vap struct ieee80211com *ic = vap->iv_ic; struct ieee80211_scan_state *ss = ic->ic_scan; - callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, 0, scan_next, ss); + /* wake up the scan task */ + IEEE80211_LOCK(ic); + scan_signal(ss); + IEEE80211_UNLOCK(ic); } /* @@ -816,7 +759,7 @@ ieee80211_scan_done(struct ieee80211vap IEEE80211_LOCK(ic); ss = ic->ic_scan; ss->ss_next = ss->ss_last; /* all channels are complete */ - scan_next(ss); + ieee80211_scan_next(vap); IEEE80211_UNLOCK(ic); } @@ -871,7 +814,17 @@ scan_curchan(struct ieee80211_scan_state if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) ieee80211_probe_curchan(vap, 0); callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, - maxdwell, scan_next, ss); + maxdwell, scan_signal, ss); +} + +static void +scan_signal(void *arg) +{ + struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg; + + IEEE80211_LOCK_ASSERT(ss->ss_vap->iv_ic); + + cv_signal(&SCAN_PRIVATE(ss)->ss_scan_cv); } /* @@ -881,35 +834,66 @@ scan_curchan(struct ieee80211_scan_state static void scan_mindwell(struct ieee80211_scan_state *ss) { - callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, 0, scan_next, ss); + struct ieee80211vap *vap = ss->ss_vap; + struct ieee80211com *ic = vap->iv_ic; + + IEEE80211_LOCK(ic); + scan_signal(ss); + IEEE80211_UNLOCK(ic); } -/* - * Switch to the next channel marked for scanning. - */ static void -scan_next(void *arg) +scan_task(void *arg, int pending) { -#define ISCAN_REP (ISCAN_MINDWELL | ISCAN_START | ISCAN_DISCARD) +#define ISCAN_REP (ISCAN_MINDWELL | ISCAN_DISCARD) struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg; struct ieee80211vap *vap = ss->ss_vap; struct ieee80211com *ic = vap->iv_ic; struct ieee80211_channel *chan; unsigned long maxdwell, scanend; - int scandone; + int scandone = 0; - IEEE80211_LOCK_ASSERT(ic); + IEEE80211_LOCK(ic); + if ((ic->ic_flags & IEEE80211_F_SCAN) == 0 || + (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT)) { + /* Cancelled before we started */ + goto done; + } + + if (ss->ss_next == ss->ss_last) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: no channels to scan\n", __func__); + goto done; + } + + if (vap->iv_opmode == IEEE80211_M_STA && + vap->iv_state == IEEE80211_S_RUN) { + if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { + /* Enable station power save mode */ + printf("ieee80211_sta_pwrsave(vap, 1)\n"); + ieee80211_sta_pwrsave(vap, 1); + /* + * Use an 1ms delay so the null data frame has a chance + * to go out. + */ + cv_timedwait(&SCAN_PRIVATE(ss)->ss_scan_cv, + IEEE80211_LOCK_OBJ(ic), hz / 1000); + if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) + goto done; + } + } + + printf("%s: starting scan loop\n", __func__); + scanend = ticks + SCAN_PRIVATE(ss)->ss_duration; + ic->ic_scan_start(ic); /* notify driver */ + + for (;;) { + scandone = (ss->ss_next >= ss->ss_last) || + (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0; + if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) || + time_after(ticks + ss->ss_mindwell, scanend)) + break; - if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) - return; -again: - scandone = (ss->ss_next >= ss->ss_last) || - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0; - scanend = SCAN_PRIVATE(ss)->ss_scanend; - if (!scandone && - (ss->ss_flags & IEEE80211_SCAN_GOTPICK) == 0 && - ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_START) || - time_before(ticks + ss->ss_mindwell, scanend))) { chan = ss->ss_chans[ss->ss_next++]; /* @@ -948,87 +932,96 @@ again: SCAN_PRIVATE(ss)->ss_chanmindwell = ticks + ss->ss_mindwell; /* clear mindwell lock and initial channel change flush */ SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; - } else { - ic->ic_scan_end(ic); /* notify driver */ - /* - * Record scan complete time. Note that we also do - * this when canceled so any background scan will - * not be restarted for a while. - */ - if (scandone) - ic->ic_lastscan = ticks; - /* return to the bss channel */ - if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && - ic->ic_curchan != ic->ic_bsschan) - ieee80211_setcurchan(ic, ic->ic_bsschan); - /* clear internal flags and any indication of a pick */ - SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; - ss->ss_flags &= ~IEEE80211_SCAN_GOTPICK; - /* - * If not canceled and scan completed, do post-processing. - * If the callback function returns 0, then it wants to - * continue/restart scanning. Unfortunately we needed to - * notify the driver to end the scan above to avoid having - * rx frames alter the scan candidate list. - */ - if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0 && - !ss->ss_ops->scan_end(ss, vap) && - (ss->ss_flags & IEEE80211_SCAN_ONCE) == 0 && - time_before(ticks + ss->ss_mindwell, scanend)) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: done, restart " - "[ticks %u, dwell min %lu scanend %lu]\n", - __func__, - ticks, ss->ss_mindwell, scanend); - ss->ss_next = 0; /* reset to begining */ - if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) - vap->iv_stats.is_scan_active++; - else - vap->iv_stats.is_scan_passive++; + /* Wait to be signalled to scan the next channel */ + cv_wait(&SCAN_PRIVATE(ss)->ss_scan_cv, IEEE80211_LOCK_OBJ(ic)); + if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) + goto done; + } + ic->ic_scan_end(ic); /* notify driver */ - ss->ss_ops->scan_restart(ss, vap); /* XXX? */ - ic->ic_scan_start(ic); /* notify driver */ - goto again; - } else { - /* past here, scandone is ``true'' if not in bg mode */ - if ((ss->ss_flags & IEEE80211_SCAN_BGSCAN) == 0) - scandone = 1; + /* + * Record scan complete time. Note that we also do + * this when canceled so any background scan will + * not be restarted for a while. + */ + if (scandone) + ic->ic_lastscan = ticks; + /* return to the bss channel */ + if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && + ic->ic_curchan != ic->ic_bsschan) + ieee80211_setcurchan(ic, ic->ic_bsschan); + /* clear internal flags and any indication of a pick */ + SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; + ss->ss_flags &= ~IEEE80211_SCAN_GOTPICK; - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: %s, " - "[ticks %u, dwell min %lu scanend %lu]\n", - __func__, scandone ? "done" : "stopped", - ticks, ss->ss_mindwell, scanend); + /* + * If not canceled and scan completed, do post-processing. + * If the callback function returns 0, then it wants to + * continue/restart scanning. Unfortunately we needed to + * notify the driver to end the scan above to avoid having + * rx frames alter the scan candidate list. + */ + if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0 && + !ss->ss_ops->scan_end(ss, vap) && + (ss->ss_flags & IEEE80211_SCAN_ONCE) == 0 && + time_before(ticks + ss->ss_mindwell, scanend)) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: done, restart " + "[ticks %u, dwell min %lu scanend %lu]\n", + __func__, + ticks, ss->ss_mindwell, scanend); + ss->ss_next = 0; /* reset to begining */ + if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) + vap->iv_stats.is_scan_active++; + else + vap->iv_stats.is_scan_passive++; - /* - * Clear the SCAN bit first in case frames are - * pending on the station power save queue. If - * we defer this then the dispatch of the frames - * may generate a request to cancel scanning. - */ - ic->ic_flags &= ~IEEE80211_F_SCAN; - /* - * Drop out of power save mode when a scan has - * completed. If this scan was prematurely terminated - * because it is a background scan then don't notify - * the ap; we'll either return to scanning after we - * receive the beacon frame or we'll drop out of power - * save mode because the beacon indicates we have frames - * waiting for us. - */ - if (scandone) { - ieee80211_sta_pwrsave(vap, 0); - if (ss->ss_next >= ss->ss_last) { - ieee80211_notify_scan_done(vap); - ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; - } - } - SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_CANCEL; - ss->ss_flags &= - ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); + ss->ss_ops->scan_restart(ss, vap); /* XXX? */ + taskqueue_enqueue(ic->ic_tq, &SCAN_PRIVATE(ss)->ss_scan_task); + IEEE80211_UNLOCK(ic); + return; + } + + /* past here, scandone is ``true'' if not in bg mode */ + if ((ss->ss_flags & IEEE80211_SCAN_BGSCAN) == 0) + scandone = 1; + + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: %s, [ticks %u, dwell min %lu scanend %lu]\n", + __func__, scandone ? "done" : "stopped", + ticks, ss->ss_mindwell, scanend); + + /* + * Clear the SCAN bit first in case frames are + * pending on the station power save queue. If + * we defer this then the dispatch of the frames + * may generate a request to cancel scanning. + */ +done: + printf("%s: finished, cancel=%d abort=%d\n", __func__, + (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0, + (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) != 0); + ic->ic_flags &= ~IEEE80211_F_SCAN; + /* + * Drop out of power save mode when a scan has + * completed. If this scan was prematurely terminated + * because it is a background scan then don't notify + * the ap; we'll either return to scanning after we + * receive the beacon frame or we'll drop out of power + * save mode because the beacon indicates we have frames + * waiting for us. + */ + if (scandone) { + ieee80211_sta_pwrsave(vap, 0); + if (ss->ss_next >= ss->ss_last) { + ieee80211_notify_scan_done(vap); + ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; } } + SCAN_PRIVATE(ss)->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT); + ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); + IEEE80211_UNLOCK(ic); #undef ISCAN_REP } From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 06:19:20 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04601106564A; Tue, 14 Apr 2009 06:19:20 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E60008FC18; Tue, 14 Apr 2009 06:19:19 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E6JJWe096721; Tue, 14 Apr 2009 06:19:19 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E6JJTb096718; Tue, 14 Apr 2009 06:19:19 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904140619.n3E6JJTb096718@svn.freebsd.org> From: Kip Macy Date: Tue, 14 Apr 2009 06:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191047 - in user/kmacy/releng_7_net_backport: sbin/ifconfig sys/netinet sys/sys usr.sbin/ifmcstat X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 06:19:20 -0000 Author: kmacy Date: Tue Apr 14 06:19:19 2009 New Revision: 191047 URL: http://svn.freebsd.org/changeset/base/191047 Log: backout recent ill-conceived changes Modified: user/kmacy/releng_7_net_backport/sbin/ifconfig/ifconfig.c user/kmacy/releng_7_net_backport/sys/netinet/igmp.c user/kmacy/releng_7_net_backport/sys/netinet/igmp.h user/kmacy/releng_7_net_backport/sys/netinet/igmp_var.h user/kmacy/releng_7_net_backport/sys/netinet/in.c user/kmacy/releng_7_net_backport/sys/netinet/in_mcast.c user/kmacy/releng_7_net_backport/sys/netinet/in_proto.c user/kmacy/releng_7_net_backport/sys/netinet/in_var.h user/kmacy/releng_7_net_backport/sys/netinet/ip_input.c user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h user/kmacy/releng_7_net_backport/sys/netinet/ip_var.h user/kmacy/releng_7_net_backport/sys/netinet/udp_usrreq.c user/kmacy/releng_7_net_backport/sys/netinet/udp_var.h user/kmacy/releng_7_net_backport/sys/netinet/vinet.h user/kmacy/releng_7_net_backport/sys/sys/mbuf.h user/kmacy/releng_7_net_backport/sys/sys/tree.h user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/Makefile user/kmacy/releng_7_net_backport/usr.sbin/ifmcstat/ifmcstat.c Modified: user/kmacy/releng_7_net_backport/sbin/ifconfig/ifconfig.c ============================================================================== --- user/kmacy/releng_7_net_backport/sbin/ifconfig/ifconfig.c Tue Apr 14 05:12:01 2009 (r191046) +++ user/kmacy/releng_7_net_backport/sbin/ifconfig/ifconfig.c Tue Apr 14 06:19:19 2009 (r191047) @@ -392,14 +392,21 @@ cmd_register(struct cmd *p) } static const struct cmd * -cmd_lookup(const char *name) +cmd_lookup(const char *name, int iscreate) { #define N(a) (sizeof(a)/sizeof(a[0])) const struct cmd *p; for (p = cmds; p != NULL; p = p->c_next) - if (strcmp(name, p->c_name) == 0) - return p; + if (strcmp(name, p->c_name) == 0) { + if (iscreate) { + if (p->c_iscloneop) + return p; + } else { + if (!p->c_iscloneop) + return p; + } + } return NULL; #undef N } @@ -434,27 +441,58 @@ static const struct cmd setifdstaddr_cmd DEF_CMD("ifdstaddr", 0, setifdstaddr); static int -ifconfig(int argc, char *const *argv, int iscreate, const struct afswtch *afp) +ifconfig(int argc, char *const *argv, int iscreate, const struct afswtch *uafp) { - const struct afswtch *nafp; + const struct afswtch *afp, *nafp; + const struct cmd *p; struct callback *cb; int s; strncpy(ifr.ifr_name, name, sizeof ifr.ifr_name); + afp = uafp != NULL ? uafp : af_getbyname("inet"); top: - if (afp == NULL) - afp = af_getbyname("inet"); ifr.ifr_addr.sa_family = afp->af_af == AF_LINK || afp->af_af == AF_UNSPEC ? - AF_INET : afp->af_af; + AF_LOCAL : afp->af_af; - if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0) + if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0 && + (uafp != NULL || errno != EPROTONOSUPPORT || + (s = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0)) err(1, "socket(family %u,SOCK_DGRAM", ifr.ifr_addr.sa_family); while (argc > 0) { - const struct cmd *p; - - p = cmd_lookup(*argv); + p = cmd_lookup(*argv, iscreate); + if (iscreate && p == NULL) { + /* + * Push the clone create callback so the new + * device is created and can be used for any + * remaining arguments. + */ + cb = callbacks; + if (cb == NULL) + errx(1, "internal error, no callback"); + callbacks = cb->cb_next; + cb->cb_func(s, cb->cb_arg); + iscreate = 0; + /* + * Handle any address family spec that + * immediately follows and potentially + * recreate the socket. + */ + nafp = af_getbyname(*argv); + if (nafp != NULL) { + argc--, argv++; + if (nafp != afp) { + close(s); + afp = nafp; + goto top; + } + } + /* + * Look for a normal parameter. + */ + continue; + } if (p == NULL) { /* * Not a recognized command, choose between setting @@ -463,33 +501,6 @@ top: p = (setaddr ? &setifdstaddr_cmd : &setifaddr_cmd); } if (p->c_u.c_func || p->c_u.c_func2) { - if (iscreate && !p->c_iscloneop) { - /* - * Push the clone create callback so the new - * device is created and can be used for any - * remaining arguments. - */ - cb = callbacks; - if (cb == NULL) - errx(1, "internal error, no callback"); - callbacks = cb->cb_next; - cb->cb_func(s, cb->cb_arg); - iscreate = 0; - /* - * Handle any address family spec that - * immediately follows and potentially - * recreate the socket. - */ - nafp = af_getbyname(*argv); - if (nafp != NULL) { - argc--, argv++; - if (nafp != afp) { - close(s); - afp = nafp; - goto top; - } - } - } if (p->c_parameter == NEXTARG) { if (argv[1] == NULL) errx(1, "'%s' requires argument", @@ -687,13 +698,13 @@ setifflags(const char *vname, int value, struct ifreq my_ifr; int flags; - bcopy((char *)&ifr, (char *)&my_ifr, sizeof(struct ifreq)); + memset(&my_ifr, 0, sizeof(my_ifr)); + (void) strlcpy(my_ifr.ifr_name, name, sizeof(my_ifr.ifr_name)); if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&my_ifr) < 0) { Perror("ioctl (SIOCGIFFLAGS)"); exit(1); } - strncpy(my_ifr.ifr_name, name, sizeof (my_ifr.ifr_name)); flags = (my_ifr.ifr_flags & 0xffff) | (my_ifr.ifr_flagshigh << 16); if (value < 0) { @@ -776,7 +787,8 @@ setifname(const char *val, int dummy __u #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ -"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" +"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ +"\21VLAN_HWFILTER" /* * Print the status of the interface. If an address family was @@ -792,11 +804,12 @@ status(const struct afswtch *afp, const if (afp == NULL) { allfamilies = 1; - afp = af_getbyname("inet"); - } else + ifr.ifr_addr.sa_family = AF_LOCAL; + } else { allfamilies = 0; - - ifr.ifr_addr.sa_family = afp->af_af == AF_LINK ? AF_INET : afp->af_af; + ifr.ifr_addr.sa_family = + afp->af_af == AF_LINK ? AF_LOCAL : afp->af_af; + } strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0); Modified: user/kmacy/releng_7_net_backport/sys/netinet/igmp.c ============================================================================== --- user/kmacy/releng_7_net_backport/sys/netinet/igmp.c Tue Apr 14 05:12:01 2009 (r191046) +++ user/kmacy/releng_7_net_backport/sys/netinet/igmp.c Tue Apr 14 06:19:19 2009 (r191047) @@ -1,5 +1,4 @@ /*- - * Copyright (c) 2007-2009 Bruce Simpson. * Copyright (c) 1988 Stephen Deering. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -36,13 +35,11 @@ /* * Internet Group Management Protocol (IGMP) routines. - * [RFC1112, RFC2236, RFC3376] * * Written by Steve Deering, Stanford, May 1988. * Modified by Rosen Sharma, Stanford, Aug 1994. * Modified by Bill Fenner, Xerox PARC, Feb 1995. * Modified to fully comply to IGMPv2 by Bill Fenner, Oct 1995. - * Significantly rewritten for IGMPv3, VIMAGE, and SMP by Bruce Simpson. * * MULTICAST Revision: 3.5.1.4 */ @@ -55,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -63,11 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include -#include #include #include @@ -85,3626 +78,464 @@ __FBSDID("$FreeBSD$"); #include -#ifndef KTR_IGMPV3 -#define KTR_IGMPV3 KTR_SUBSYS -#endif - -static struct igmp_ifinfo * - igi_alloc_locked(struct ifnet *); -static void igi_delete_locked(const struct ifnet *); -static void igmp_dispatch_queue(struct ifqueue *, int, const int); -static void igmp_fasttimo_vnet(void); -static void igmp_final_leave(struct in_multi *, struct igmp_ifinfo *); -static int igmp_handle_state_change(struct in_multi *, - struct igmp_ifinfo *); -static int igmp_initial_join(struct in_multi *, struct igmp_ifinfo *); -static int igmp_input_v1_query(struct ifnet *, const struct ip *); -static int igmp_input_v2_query(struct ifnet *, const struct ip *, - const struct igmp *); -static int igmp_input_v3_query(struct ifnet *, const struct ip *, - /*const*/ struct igmpv3 *); -static int igmp_input_v3_group_query(struct in_multi *, - struct igmp_ifinfo *, int, /*const*/ struct igmpv3 *); -static int igmp_input_v1_report(struct ifnet *, /*const*/ struct ip *, - /*const*/ struct igmp *); -static int igmp_input_v2_report(struct ifnet *, /*const*/ struct ip *, - /*const*/ struct igmp *); -static void igmp_intr(struct mbuf *); -static int igmp_isgroupreported(const struct in_addr); -static struct mbuf * - igmp_ra_alloc(void); -#ifdef KTR -static char * igmp_rec_type_to_str(const int); -#endif -static void igmp_set_version(struct igmp_ifinfo *, const int); -static void igmp_slowtimo_vnet(void); -static void igmp_sysinit(void); -static int igmp_v1v2_queue_report(struct in_multi *, const int); -static void igmp_v1v2_process_group_timer(struct in_multi *, const int); -static void igmp_v1v2_process_querier_timers(struct igmp_ifinfo *); -static void igmp_v2_update_group(struct in_multi *, const int); -static void igmp_v3_cancel_link_timers(struct igmp_ifinfo *); -static void igmp_v3_dispatch_general_query(struct igmp_ifinfo *); -static struct mbuf * - igmp_v3_encap_report(struct ifnet *, struct mbuf *); -static int igmp_v3_enqueue_group_record(struct ifqueue *, - struct in_multi *, const int, const int, const int); -static int igmp_v3_enqueue_filter_change(struct ifqueue *, - struct in_multi *); -static void igmp_v3_process_group_timers(struct igmp_ifinfo *, - struct ifqueue *, struct ifqueue *, struct in_multi *, - const int); -static int igmp_v3_merge_state_changes(struct in_multi *, - struct ifqueue *); -static void igmp_v3_suppress_group_record(struct in_multi *); -static int sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS); -static int sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS); -static int sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS); - -#ifdef VIMAGE -static vnet_attach_fn vnet_igmp_iattach; -static vnet_detach_fn vnet_igmp_idetach; -#else -static int vnet_igmp_iattach(const void *); -static int vnet_igmp_idetach(const void *); -#endif /* VIMAGE */ - -/* - * System-wide globals. - * - * Unlocked access to these is OK, except for the global IGMP output - * queue. The IGMP subsystem lock ends up being system-wide for the moment, - * because all VIMAGEs have to share a global output queue, as netisrs - * themselves are not virtualized. - * - * Locking: - * * The permitted lock order is: IN_MULTI_LOCK, IGMP_LOCK, IF_ADDR_LOCK. - * Any may be taken independently; if any are held at the same - * time, the above lock order must be followed. - * * All output is delegated to the netisr to handle IFF_NEEDSGIANT. - * Most of the time, direct dispatch will be fine. - * * IN_MULTI_LOCK covers in_multi. - * * IGMP_LOCK covers igmp_ifinfo and any global variables in this file, - * including the output queue. - * * IF_ADDR_LOCK covers if_multiaddrs, which is used for a variety of - * per-link state iterators. - * * igmp_ifinfo is valid as long as PF_INET is attached to the interface, - * therefore it is not refcounted. - * We allow unlocked reads of igmp_ifinfo when accessed via in_multi. - * - * Reference counting - * * IGMP acquires its own reference every time an in_multi is passed to - * it and the group is being joined for the first time. - * * IGMP releases its reference(s) on in_multi in a deferred way, - * because the operations which process the release run as part of - * a loop whose control variables are directly affected by the release - * (that, and not recursing on the IF_ADDR_LOCK). - * - * VIMAGE: Each in_multi corresponds to an ifp, and each ifp corresponds - * to a vnet in ifp->if_vnet. - * - * SMPng: XXX We may potentially race operations on ifma_protospec. - * The problem is that we currently lack a clean way of taking the - * IF_ADDR_LOCK() between the ifnet and in layers w/o recursing, - * as anything which modifies ifma needs to be covered by that lock. - * So check for ifma_protospec being NULL before proceeding. - */ -struct mtx igmp_mtx; -int mpsafe_igmp = 0; -SYSCTL_INT(_debug, OID_AUTO, mpsafe_igmp, CTLFLAG_RDTUN, &mpsafe_igmp, 0, - "Enable SMP-safe IGMPv3"); - -struct mbuf *m_raopt; /* Router Alert option */ -MALLOC_DEFINE(M_IGMP, "igmp", "igmp state"); - -/* - * Global netisr output queue. - * This is only used as a last resort if we cannot directly dispatch. - * As IN_MULTI_LOCK is no longer in the bottom half of IP, we can do - * this, providing mpsafe_igmp is set. If it is not, we take Giant, - * and queueing is forced. - */ -struct ifqueue igmpoq; - -/* - * VIMAGE-wide globals. - * - * The IGMPv3 timers themselves need to run per-image, however, - * protosw timers run globally (see tcp). - * An ifnet can only be in one vimage at a time, and the loopback - * ifnet, loif, is itself virtualized. - * It would otherwise be possible to seriously hose IGMP state, - * and create inconsistencies in upstream multicast routing, if you have - * multiple VIMAGEs running on the same link joining different multicast - * groups, UNLESS the "primary IP address" is different. This is because - * IGMP for IPv4 does not force link-local addresses to be used for each - * node, unlike MLD for IPv6. - * Obviously the IGMPv3 per-interface state has per-vimage granularity - * also as a result. - * - * FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address selection - * policy to control the address used by IGMP on the link. - */ -#ifdef VIMAGE_GLOBALS -int interface_timers_running; /* IGMPv3 general query response */ -int state_change_timers_running; /* IGMPv3 state-change retransmit */ -int current_state_timers_running; /* IGMPv1/v2 host report; - * IGMPv3 g/sg query response */ - -LIST_HEAD(, igmp_ifinfo) igi_head; -struct igmpstat igmpstat; -struct timeval igmp_gsrdelay; - -int igmp_recvifkludge; -int igmp_sendra; -int igmp_sendlocal; -int igmp_v1enable; -int igmp_v2enable; -int igmp_legacysupp; -int igmp_default_version; -#endif /* VIMAGE_GLOBALS */ - -/* - * Virtualized sysctls. - */ -SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_igmp, IGMPCTL_STATS, stats, - CTLFLAG_RW, igmpstat, igmpstat, ""); -SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, recvifkludge, - CTLFLAG_RW, igmp_recvifkludge, 0, - "Rewrite IGMPv1/v2 reports from 0.0.0.0 to contain subnet address"); -SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, sendra, - CTLFLAG_RW, igmp_sendra, 0, - "Send IP Router Alert option in IGMPv2/v3 messages"); -SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, sendlocal, - CTLFLAG_RW, igmp_sendlocal, 0, - "Send IGMP membership reports for 224.0.0.0/24 groups"); -SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, v1enable, - CTLFLAG_RW, igmp_v1enable, 0, - "Enable backwards compatibility with IGMPv1"); -SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, v2enable, - CTLFLAG_RW, igmp_v2enable, 0, - "Enable backwards compatibility with IGMPv2"); -SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, legacysupp, - CTLFLAG_RW, igmp_legacysupp, 0, - "Allow v1/v2 reports to suppress v3 group responses"); -SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, default_version, - CTLTYPE_INT | CTLFLAG_RW , igmp_default_version, 0, - sysctl_igmp_default_version, "I", - "Default version of IGMP to run on each interface"); -SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, gsrdelay, - CTLTYPE_INT | CTLFLAG_RW , igmp_gsrdelay.tv_sec, 0, - sysctl_igmp_gsr, "I", - "Rate limit for IGMPv3 Group-and-Source queries in seconds"); - -/* - * Non-virtualized sysctls. - */ -SYSCTL_NODE(_net_inet_igmp, OID_AUTO, ifinfo, CTLFLAG_RD, - sysctl_igmp_ifinfo, "Per-interface IGMPv3 state"); - -static __inline void -igmp_save_context(struct mbuf *m, struct ifnet *ifp) -{ - -#ifdef VIMAGE - m->m_pkthdr.header = ifp->if_vnet; -#endif /* VIMAGE */ - m->m_pkthdr.flowid = ifp->if_index; -} - -static __inline void -igmp_scrub_context(struct mbuf *m) -{ - - m->m_pkthdr.header = NULL; - m->m_pkthdr.flowid = 0; -} - -#ifdef KTR -static __inline char * -inet_ntoa_haddr(in_addr_t haddr) -{ - struct in_addr ia; - - ia.s_addr = htonl(haddr); - return (inet_ntoa(ia)); -} -#endif - -/* - * Restore context from a queued IGMP output chain. - * Return saved ifindex. - * - * VIMAGE: The assertion is there to make sure that we - * actually called CURVNET_SET() with what's in the mbuf chain. - */ -static __inline uint32_t -igmp_restore_context(struct mbuf *m) -{ - -#ifdef notyet -#if defined(VIMAGE) && defined(INVARIANTS) - KASSERT(curvnet == (m->m_pkthdr.header), - ("%s: called when curvnet was not restored", __func__)); -#endif -#endif - return (m->m_pkthdr.flowid); -} - -/* - * Retrieve or set default IGMP version. - * - * VIMAGE: Assume curvnet set by caller. - * SMPng: NOTE: Serialized by IGMP lock. - */ -static int -sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS) -{ - int error; - int new; - - error = sysctl_wire_old_buffer(req, sizeof(int)); - if (error) - return (error); - - IGMP_LOCK(); - - new = V_igmp_default_version; - - error = sysctl_handle_int(oidp, &new, 0, req); - if (error || !req->newptr) - goto out_locked; - - if (new < IGMP_VERSION_1 || new > IGMP_VERSION_3) { - error = EINVAL; - goto out_locked; - } - - CTR2(KTR_IGMPV3, "change igmp_default_version from %d to %d", - V_igmp_default_version, new); - - V_igmp_default_version = new; - -out_locked: - IGMP_UNLOCK(); - return (error); -} - -/* - * Retrieve or set threshold between group-source queries in seconds. - * - * VIMAGE: Assume curvnet set by caller. - * SMPng: NOTE: Serialized by IGMP lock. - */ -static int -sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS) -{ - int error; - int i; - - error = sysctl_wire_old_buffer(req, sizeof(int)); - if (error) - return (error); - - IGMP_LOCK(); - - i = V_igmp_gsrdelay.tv_sec; - - error = sysctl_handle_int(oidp, &i, 0, req); - if (error || !req->newptr) - goto out_locked; - - if (i < -1 || i >= 60) { - error = EINVAL; - goto out_locked; - } - - CTR2(KTR_IGMPV3, "change igmp_gsrdelay from %d to %d", - V_igmp_gsrdelay.tv_sec, i); - V_igmp_gsrdelay.tv_sec = i; - -out_locked: - IGMP_UNLOCK(); - return (error); -} - -/* - * Expose struct igmp_ifinfo to userland, keyed by ifindex. - * For use by ifmcstat(8). - * - * SMPng: NOTE: Does an unlocked ifindex space read. - * VIMAGE: Assume curvnet set by caller. The node handler itself - * is not directly virtualized. - */ -static int -sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS) -{ - INIT_VNET_NET(curvnet); - int *name; - int error; - u_int namelen; - struct ifnet *ifp; - struct igmp_ifinfo *igi; - - name = (int *)arg1; - namelen = arg2; - - if (req->newptr != NULL) - return (EPERM); - - if (namelen != 1) - return (EINVAL); - - error = sysctl_wire_old_buffer(req, sizeof(struct igmp_ifinfo)); - if (error) - return (error); - - IN_MULTI_LOCK(); - IGMP_LOCK(); - - if (name[0] <= 0 || name[0] > V_if_index) { - error = ENOENT; - goto out_locked; - } - - error = ENOENT; - - ifp = ifnet_byindex(name[0]); - if (ifp == NULL) - goto out_locked; - - LIST_FOREACH(igi, &V_igi_head, igi_link) { - if (ifp == igi->igi_ifp) { - error = SYSCTL_OUT(req, igi, - sizeof(struct igmp_ifinfo)); - break; - } - } - -out_locked: - IGMP_UNLOCK(); - IN_MULTI_UNLOCK(); - return (error); -} - -/* - * Dispatch an entire queue of pending packet chains - * using the netisr. - * VIMAGE: Assumes the vnet pointer has been set. - */ -static void -igmp_dispatch_queue(struct ifqueue *ifq, int limit, const int loop) -{ - struct mbuf *m; - - for (;;) { - _IF_DEQUEUE(ifq, m); - if (m == NULL) - break; - CTR3(KTR_IGMPV3, "%s: dispatch %p from %p", __func__, ifq, m); - if (loop) - m->m_flags |= M_IGMP_LOOP; - netisr_dispatch(NETISR_IGMP, m); - if (--limit == 0) - break; - } -} - -/* - * Filter outgoing IGMP report state by group. - * - * Reports are ALWAYS suppressed for ALL-HOSTS (224.0.0.1). - * If the net.inet.igmp.sendlocal sysctl is 0, then IGMP reports are - * disabled for all groups in the 224.0.0.0/24 link-local scope. However, - * this may break certain IGMP snooping switches which rely on the old - * report behaviour. - * - * Return zero if the given group is one for which IGMP reports - * should be suppressed, or non-zero if reports should be issued. - */ -static __inline int -igmp_isgroupreported(const struct in_addr addr) -{ - - if (in_allhosts(addr) || - ((!V_igmp_sendlocal && IN_LOCAL_GROUP(ntohl(addr.s_addr))))) - return (0); - - return (1); -} - -/* - * Construct a Router Alert option to use in outgoing packets. - */ -static struct mbuf * -igmp_ra_alloc(void) -{ - struct mbuf *m; - struct ipoption *p; - - MGET(m, M_DONTWAIT, MT_DATA); - p = mtod(m, struct ipoption *); - p->ipopt_dst.s_addr = INADDR_ANY; - p->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */ - p->ipopt_list[1] = 0x04; /* 4 bytes long */ - p->ipopt_list[2] = IPOPT_EOL; /* End of IP option list */ - p->ipopt_list[3] = 0x00; /* pad byte */ - m->m_len = sizeof(p->ipopt_dst) + p->ipopt_list[1]; - - return (m); -} - -/* - * Attach IGMP when PF_INET is attached to an interface. - * - * VIMAGE: Currently we set the vnet pointer, although it is - * likely that it was already set by our caller. - */ -struct igmp_ifinfo * -igmp_domifattach(struct ifnet *ifp) -{ - struct igmp_ifinfo *igi; - - CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", - __func__, ifp, ifp->if_xname); - - CURVNET_SET(ifp->if_vnet); - IGMP_LOCK(); - - igi = igi_alloc_locked(ifp); - if (!(ifp->if_flags & IFF_MULTICAST)) - igi->igi_flags |= IGIF_SILENT; - - IGMP_UNLOCK(); - CURVNET_RESTORE(); - - return (igi); -} - -/* - * VIMAGE: assume curvnet set by caller. - */ -static struct igmp_ifinfo * -igi_alloc_locked(/*const*/ struct ifnet *ifp) -{ - struct igmp_ifinfo *igi; - - IGMP_LOCK_ASSERT(); - - igi = malloc(sizeof(struct igmp_ifinfo), M_IGMP, M_NOWAIT|M_ZERO); - if (igi == NULL) - goto out; - - igi->igi_ifp = ifp; - igi->igi_version = V_igmp_default_version; - igi->igi_flags = 0; - igi->igi_rv = IGMP_RV_INIT; - igi->igi_qi = IGMP_QI_INIT; - igi->igi_qri = IGMP_QRI_INIT; - igi->igi_uri = IGMP_URI_INIT; - - SLIST_INIT(&igi->igi_relinmhead); - - /* - * Responses to general queries are subject to bounds. - */ - IFQ_SET_MAXLEN(&igi->igi_gq, IGMP_MAX_RESPONSE_PACKETS); - - LIST_INSERT_HEAD(&V_igi_head, igi, igi_link); - - CTR2(KTR_IGMPV3, "allocate igmp_ifinfo for ifp %p(%s)", - ifp, ifp->if_xname); - -out: - return (igi); -} - -/* - * Hook for ifdetach. - * - * NOTE: Some finalization tasks need to run before the protocol domain - * is detached, but also before the link layer does its cleanup. - * - * SMPNG: igmp_ifdetach() needs to take IF_ADDR_LOCK(). - * XXX This is also bitten by unlocked ifma_protospec access. - * - * VIMAGE: curvnet should have been set by caller, but let's not assume - * that for now. - */ -void -igmp_ifdetach(struct ifnet *ifp) -{ - struct igmp_ifinfo *igi; - struct ifmultiaddr *ifma; - struct in_multi *inm, *tinm; - - CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", __func__, ifp, - ifp->if_xname); - - CURVNET_SET(ifp->if_vnet); - - IGMP_LOCK(); - - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; - if (igi->igi_version == IGMP_VERSION_3) { - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_INET || - ifma->ifma_protospec == NULL) - continue; -#if 0 - KASSERT(ifma->ifma_protospec != NULL, - ("%s: ifma_protospec is NULL", __func__)); -#endif - inm = (struct in_multi *)ifma->ifma_protospec; - if (inm->inm_state == IGMP_LEAVING_MEMBER) { - SLIST_INSERT_HEAD(&igi->igi_relinmhead, - inm, inm_nrele); - } - inm_clear_recorded(inm); - } - IF_ADDR_UNLOCK(ifp); - /* - * Free the in_multi reference(s) for this IGMP lifecycle. - */ - SLIST_FOREACH_SAFE(inm, &igi->igi_relinmhead, inm_nrele, - tinm) { - SLIST_REMOVE_HEAD(&igi->igi_relinmhead, inm_nrele); - inm_release_locked(inm); - } - } - - IGMP_UNLOCK(); - -#ifdef VIMAGE - /* - * Plug the potential race which may occur when a VIMAGE - * is detached and we are forced to queue pending IGMP output for - * output netisr processing due to !mpsafe_igmp. In this case it - * is possible that igmp_intr() is about to see mbuf chains with - * invalid cached curvnet pointers. - * This is a rare condition, so just blow them all away. - * FUTURE: This may in fact not be needed, because IFF_NEEDSGIANT - * is being removed in 8.x and the netisr may then be eliminated; - * it is needed only if VIMAGE and IFF_NEEDSGIANT need to co-exist - */ - if (!mpsafe_igmp) { - int drops; - - IF_LOCK(&igmpoq); - drops = igmpoq.ifq_len; - _IF_DRAIN(&igmpoq); - IF_UNLOCK(&igmpoq); - if (bootverbose && drops) { - printf("%s: dropped %d pending IGMP output packets\n", - __func__, drops); - } - } -#endif /* VIMAGE */ - - CURVNET_RESTORE(); -} - -/* - * Hook for domifdetach. - * - * VIMAGE: curvnet should have been set by caller, but let's not assume - * that for now. - */ -void -igmp_domifdetach(struct ifnet *ifp) -{ - struct igmp_ifinfo *igi; - - CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", - __func__, ifp, ifp->if_xname); - - CURVNET_SET(ifp->if_vnet); - IGMP_LOCK(); - - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; - igi_delete_locked(ifp); - - IGMP_UNLOCK(); - CURVNET_RESTORE(); -} - -static void -igi_delete_locked(const struct ifnet *ifp) -{ - struct igmp_ifinfo *igi, *tigi; - - CTR3(KTR_IGMPV3, "%s: freeing igmp_ifinfo for ifp %p(%s)", - __func__, ifp, ifp->if_xname); - - IGMP_LOCK_ASSERT(); - - LIST_FOREACH_SAFE(igi, &V_igi_head, igi_link, tigi) { - if (igi->igi_ifp == ifp) { - /* - * Free deferred General Query responses. - */ - _IF_DRAIN(&igi->igi_gq); - - LIST_REMOVE(igi, igi_link); - - KASSERT(SLIST_EMPTY(&igi->igi_relinmhead), - ("%s: there are dangling in_multi references", - __func__)); - - free(igi, M_IGMP); - return; - } - } - -#ifdef INVARIANTS - panic("%s: igmp_ifinfo not found for ifp %p\n", __func__, ifp); -#endif -} - -/* - * Process a received IGMPv1 query. - * Return non-zero if the message should be dropped. - * - * VIMAGE: The curvnet pointer is derived from the input ifp. - */ -static int -igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip) -{ - INIT_VNET_INET(ifp->if_vnet); - struct ifmultiaddr *ifma; - struct igmp_ifinfo *igi; - struct in_multi *inm; - - /* - * IGMPv1 General Queries SHOULD always addressed to 224.0.0.1. - * igmp_group is always ignored. Do not drop it as a userland - * daemon may wish to see it. - */ - if (!in_allhosts(ip->ip_dst)) { - IGMPSTAT_INC(igps_rcv_badqueries); - return (0); - } - - IGMPSTAT_INC(igps_rcv_gen_queries); - - /* - * Switch to IGMPv1 host compatibility mode. - */ - IN_MULTI_LOCK(); - IGMP_LOCK(); - - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; - KASSERT(igi != NULL, ("%s: no igmp_ifinfo for ifp %p", __func__, ifp)); - - if (igi->igi_flags & IGIF_LOOPBACK) { - CTR2(KTR_IGMPV3, "ignore v1 query on IGIF_LOOPBACK ifp %p(%s)", - ifp, ifp->if_xname); - goto out_locked; - } - - igmp_set_version(igi, IGMP_VERSION_1); - - CTR2(KTR_IGMPV3, "process v1 query on ifp %p(%s)", ifp, ifp->if_xname); - - /* - * Start the timers in all of our group records - * for the interface on which the query arrived, - * except those which are already running. - */ - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_INET || - ifma->ifma_protospec == NULL) - continue; - inm = (struct in_multi *)ifma->ifma_protospec; - if (inm->inm_timer != 0) - continue; - switch (inm->inm_state) { - case IGMP_NOT_MEMBER: - case IGMP_SILENT_MEMBER: - break; - case IGMP_G_QUERY_PENDING_MEMBER: - case IGMP_SG_QUERY_PENDING_MEMBER: - case IGMP_REPORTING_MEMBER: - case IGMP_IDLE_MEMBER: - case IGMP_LAZY_MEMBER: - case IGMP_SLEEPING_MEMBER: - case IGMP_AWAKENING_MEMBER: - inm->inm_state = IGMP_REPORTING_MEMBER; - inm->inm_timer = IGMP_RANDOM_DELAY( - IGMP_V1V2_MAX_RI * PR_FASTHZ); - V_current_state_timers_running = 1; - break; - case IGMP_LEAVING_MEMBER: - break; - } - } - IF_ADDR_UNLOCK(ifp); - -out_locked: - IGMP_UNLOCK(); - IN_MULTI_UNLOCK(); - - return (0); -} - -/* - * Process a received IGMPv2 general or group-specific query. - */ -static int -igmp_input_v2_query(struct ifnet *ifp, const struct ip *ip, - const struct igmp *igmp) -{ - struct ifmultiaddr *ifma; - struct igmp_ifinfo *igi; - struct in_multi *inm; - uint16_t timer; - - /* - * Perform lazy allocation of IGMP link info if required, - * and switch to IGMPv2 host compatibility mode. - */ - IN_MULTI_LOCK(); - IGMP_LOCK(); - - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; - KASSERT(igi != NULL, ("%s: no igmp_ifinfo for ifp %p", __func__, ifp)); - - if (igi->igi_flags & IGIF_LOOPBACK) { - CTR2(KTR_IGMPV3, "ignore v2 query on IGIF_LOOPBACK ifp %p(%s)", - ifp, ifp->if_xname); - goto out_locked; - } - - igmp_set_version(igi, IGMP_VERSION_2); - - timer = igmp->igmp_code * PR_FASTHZ / IGMP_TIMER_SCALE; - if (timer == 0) - timer = 1; - - if (!in_nullhost(igmp->igmp_group)) { - /* - * IGMPv2 Group-Specific Query. - * If this is a group-specific IGMPv2 query, we need only *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 06:35:37 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69A67106564A; Tue, 14 Apr 2009 06:35:37 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58E218FC17; Tue, 14 Apr 2009 06:35:37 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E6Zbpo097100; Tue, 14 Apr 2009 06:35:37 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3E6ZbiE097098; Tue, 14 Apr 2009 06:35:37 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200904140635.n3E6ZbiE097098@svn.freebsd.org> From: Kip Macy Date: Tue, 14 Apr 2009 06:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191048 - in user/kmacy/releng_7_net_backport/sys: amd64/conf i386/conf X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 06:35:37 -0000 Author: kmacy Date: Tue Apr 14 06:35:37 2009 New Revision: 191048 URL: http://svn.freebsd.org/changeset/base/191048 Log: NOP vimage macros Modified: user/kmacy/releng_7_net_backport/sys/amd64/conf/DEFAULTS user/kmacy/releng_7_net_backport/sys/i386/conf/DEFAULTS Modified: user/kmacy/releng_7_net_backport/sys/amd64/conf/DEFAULTS ============================================================================== --- user/kmacy/releng_7_net_backport/sys/amd64/conf/DEFAULTS Tue Apr 14 06:19:19 2009 (r191047) +++ user/kmacy/releng_7_net_backport/sys/amd64/conf/DEFAULTS Tue Apr 14 06:35:37 2009 (r191048) @@ -21,3 +21,4 @@ options GEOM_MBR # KSE support went from being default to a kernel option options KSE +options VIMAGE_GLOBALS Modified: user/kmacy/releng_7_net_backport/sys/i386/conf/DEFAULTS ============================================================================== --- user/kmacy/releng_7_net_backport/sys/i386/conf/DEFAULTS Tue Apr 14 06:19:19 2009 (r191047) +++ user/kmacy/releng_7_net_backport/sys/i386/conf/DEFAULTS Tue Apr 14 06:35:37 2009 (r191048) @@ -25,3 +25,4 @@ options GEOM_MBR # KSE support went from being default to a kernel option options KSE +options VIMAGE_GLOBALS From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 17:41:49 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1178A106564A; Tue, 14 Apr 2009 17:41:49 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D963E8FC13; Tue, 14 Apr 2009 17:41:48 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3EHfm1a014986; Tue, 14 Apr 2009 17:41:48 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3EHfmg5014985; Tue, 14 Apr 2009 17:41:48 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904141741.n3EHfmg5014985@svn.freebsd.org> From: Andrew Thompson Date: Tue, 14 Apr 2009 17:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191066 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 17:41:49 -0000 Author: thompsa Date: Tue Apr 14 17:41:48 2009 New Revision: 191066 URL: http://svn.freebsd.org/changeset/base/191066 Log: - Dont hold the lock over the driver scan calls - Reshuffle the exit flag checks to avoid the cv sleep on abort Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Tue Apr 14 17:14:35 2009 (r191065) +++ user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Tue Apr 14 17:41:48 2009 (r191066) @@ -885,12 +885,15 @@ scan_task(void *arg, int pending) printf("%s: starting scan loop\n", __func__); scanend = ticks + SCAN_PRIVATE(ss)->ss_duration; + IEEE80211_UNLOCK(ic); ic->ic_scan_start(ic); /* notify driver */ + IEEE80211_LOCK(ic); for (;;) { scandone = (ss->ss_next >= ss->ss_last) || (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0; if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) || + (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) || time_after(ticks + ss->ss_mindwell, scanend)) break; @@ -927,18 +930,26 @@ scan_task(void *arg, int pending) * sending a probe request (as needed), and arming the * timeout to switch channels after maxdwell ticks. */ + IEEE80211_UNLOCK(ic); ic->ic_scan_curchan(ss, maxdwell); + IEEE80211_LOCK(ic); SCAN_PRIVATE(ss)->ss_chanmindwell = ticks + ss->ss_mindwell; /* clear mindwell lock and initial channel change flush */ SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; + if ((SCAN_PRIVATE(ss)->ss_iflags & (ISCAN_CANCEL|ISCAN_ABORT))) + continue; + /* Wait to be signalled to scan the next channel */ cv_wait(&SCAN_PRIVATE(ss)->ss_scan_cv, IEEE80211_LOCK_OBJ(ic)); - if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) - goto done; } + if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) + goto done; + + IEEE80211_UNLOCK(ic); ic->ic_scan_end(ic); /* notify driver */ + IEEE80211_LOCK(ic); /* * Record scan complete time. Note that we also do From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 18:18:14 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13FFF1065774; Tue, 14 Apr 2009 18:18:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F39B68FC08; Tue, 14 Apr 2009 18:18:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3EIID7D015781; Tue, 14 Apr 2009 18:18:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3EIID9p015780; Tue, 14 Apr 2009 18:18:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904141818.n3EIID9p015780@svn.freebsd.org> From: Andrew Thompson Date: Tue, 14 Apr 2009 18:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191067 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 18:18:16 -0000 Author: thompsa Date: Tue Apr 14 18:18:13 2009 New Revision: 191067 URL: http://svn.freebsd.org/changeset/base/191067 Log: Fix locking assertion. Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Tue Apr 14 17:41:48 2009 (r191066) +++ user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Tue Apr 14 18:18:13 2009 (r191067) @@ -809,12 +809,12 @@ scan_curchan(struct ieee80211_scan_state { struct ieee80211vap *vap = ss->ss_vap; - IEEE80211_LOCK_ASSERT(vap->iv_ic); - + IEEE80211_LOCK(vap->iv_ic); if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) ieee80211_probe_curchan(vap, 0); callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, maxdwell, scan_signal, ss); + IEEE80211_UNLOCK(vap->iv_ic); } static void From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 18:28:07 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED8B106566C; Tue, 14 Apr 2009 18:28:07 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BE978FC0C; Tue, 14 Apr 2009 18:28:07 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3EIS7LO016021; Tue, 14 Apr 2009 18:28:07 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3EIS7h3016020; Tue, 14 Apr 2009 18:28:07 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904141828.n3EIS7h3016020@svn.freebsd.org> From: Andrew Thompson Date: Tue, 14 Apr 2009 18:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191068 - user/thompsa/vaptq/sys/dev/usb/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 18:28:08 -0000 Author: thompsa Date: Tue Apr 14 18:28:07 2009 New Revision: 191068 URL: http://svn.freebsd.org/changeset/base/191068 Log: Switch ural over to use direct firmware calls now that state+scan can sleep. Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Tue Apr 14 18:18:13 2009 (r191067) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Tue Apr 14 18:28:07 2009 (r191068) @@ -97,8 +97,6 @@ static usb2_callback_t ural_bulk_write_c static usb2_proc_callback_t ural_command_wrapper; static usb2_proc_callback_t ural_attach_post; -static usb2_proc_callback_t ural_task; -static usb2_proc_callback_t ural_scantask; static usb2_proc_callback_t ural_promisctask; static usb2_proc_callback_t ural_amrr_task; static usb2_proc_callback_t ural_init_task; @@ -714,25 +712,27 @@ ural_unsetup_tx_list(struct ural_softc * } } -static void -ural_task(struct usb2_proc_msg *pm) +static int +ural_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ural_vap *uvp = URAL_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct ural_softc *sc = ic->ic_ifp->if_softc; const struct ieee80211_txparam *tp; - enum ieee80211_state ostate; struct ieee80211_node *ni; struct mbuf *m; - ostate = vap->iv_state; + DPRINTF("%s -> %s\n", + ieee80211_state_name[vap->iv_state], + ieee80211_state_name[nstate]); + + IEEE80211_UNLOCK(ic); + RAL_LOCK(sc); + usb2_callout_stop(&uvp->amrr_ch); - switch (sc->sc_state) { + switch (nstate) { case IEEE80211_S_INIT: - if (ostate == IEEE80211_S_RUN) { + if (vap->iv_state == IEEE80211_S_RUN) { /* abort TSF synchronization */ ural_write(sc, RAL_TXRX_CSR19, 0); @@ -758,13 +758,17 @@ ural_task(struct usb2_proc_msg *pm) if (m == NULL) { device_printf(sc->sc_dev, "could not allocate beacon\n"); - return; + RAL_UNLOCK(sc); + IEEE80211_LOCK(ic); + return (-1); } if (ural_tx_bcn(sc, m, ni) != 0) { device_printf(sc->sc_dev, "could not send beacon\n"); - return; + RAL_UNLOCK(sc); + IEEE80211_LOCK(ic); + return (-1); } } @@ -784,75 +788,9 @@ ural_task(struct usb2_proc_msg *pm) default: break; } - RAL_UNLOCK(sc); IEEE80211_LOCK(ic); - uvp->newstate(vap, sc->sc_state, sc->sc_arg); - if (vap->iv_newstate_cb != NULL) - vap->iv_newstate_cb(vap, sc->sc_state, sc->sc_arg); - IEEE80211_UNLOCK(ic); - RAL_LOCK(sc); -} - -static void -ural_scantask(struct usb2_proc_msg *pm) -{ - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - - RAL_LOCK_ASSERT(sc, MA_OWNED); - - switch (sc->sc_scan_action) { - case URAL_SCAN_START: - /* abort TSF synchronization */ - DPRINTF("starting scan\n"); - ural_write(sc, RAL_TXRX_CSR19, 0); - ural_set_bssid(sc, ifp->if_broadcastaddr); - break; - - case URAL_SET_CHANNEL: - ural_set_chan(sc, ic->ic_curchan); - break; - - default: /* URAL_SCAN_END */ - DPRINTF("stopping scan\n"); - ural_enable_tsf_sync(sc); - ural_set_bssid(sc, sc->sc_bssid); - break; - } -} - -static int -ural_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - struct ural_vap *uvp = URAL_VAP(vap); - struct ieee80211com *ic = vap->iv_ic; - struct ural_softc *sc = ic->ic_ifp->if_softc; - - DPRINTF("%s -> %s\n", - ieee80211_state_name[vap->iv_state], - ieee80211_state_name[nstate]); - - RAL_LOCK(sc); - usb2_callout_stop(&uvp->amrr_ch); - - /* do it in a process context */ - sc->sc_state = nstate; - sc->sc_arg = arg; - RAL_UNLOCK(sc); - - if (nstate == IEEE80211_S_INIT) { - uvp->newstate(vap, nstate, arg); - return 0; - } else { - RAL_LOCK(sc); - ural_queue_command(sc, ural_task, &sc->sc_task[0].hdr, - &sc->sc_task[1].hdr); - RAL_UNLOCK(sc); - return EINPROGRESS; - } + return (uvp->newstate(vap, nstate, arg)); } @@ -1700,14 +1638,12 @@ static void ural_scan_start(struct ieee80211com *ic) { struct ural_softc *sc = ic->ic_ifp->if_softc; + struct ifnet *ifp = ic->ic_ifp; RAL_LOCK(sc); - /* do it in a process context */ - sc->sc_scan_action = URAL_SCAN_START; - ural_queue_command(sc, ural_scantask, - &sc->sc_scantask[0].hdr, &sc->sc_scantask[1].hdr); + ural_write(sc, RAL_TXRX_CSR19, 0); + ural_set_bssid(sc, ifp->if_broadcastaddr); RAL_UNLOCK(sc); - } static void @@ -1716,10 +1652,8 @@ ural_scan_end(struct ieee80211com *ic) struct ural_softc *sc = ic->ic_ifp->if_softc; RAL_LOCK(sc); - /* do it in a process context */ - sc->sc_scan_action = URAL_SCAN_END; - ural_queue_command(sc, ural_scantask, - &sc->sc_scantask[0].hdr, &sc->sc_scantask[1].hdr); + ural_enable_tsf_sync(sc); + ural_set_bssid(sc, sc->sc_bssid); RAL_UNLOCK(sc); } @@ -1729,12 +1663,11 @@ ural_set_channel(struct ieee80211com *ic { struct ural_softc *sc = ic->ic_ifp->if_softc; + IEEE80211_UNLOCK(ic); RAL_LOCK(sc); - /* do it in a process context */ - sc->sc_scan_action = URAL_SET_CHANNEL; - ural_queue_command(sc, ural_scantask, - &sc->sc_scantask[0].hdr, &sc->sc_scantask[1].hdr); + ural_set_chan(sc, ic->ic_curchan); RAL_UNLOCK(sc); + IEEE80211_LOCK(ic); } static void From owner-svn-src-user@FreeBSD.ORG Tue Apr 14 21:07:47 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7793106566B; Tue, 14 Apr 2009 21:07:47 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D74378FC13; Tue, 14 Apr 2009 21:07:47 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3EL7lb9019995; Tue, 14 Apr 2009 21:07:47 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3EL7ltl019994; Tue, 14 Apr 2009 21:07:47 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904142107.n3EL7ltl019994@svn.freebsd.org> From: Paolo Pisati Date: Tue, 14 Apr 2009 21:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191078 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 21:07:48 -0000 Author: piso Date: Tue Apr 14 21:07:47 2009 New Revision: 191078 URL: http://svn.freebsd.org/changeset/base/191078 Log: Correctly calculate packet size. Modified: user/piso/ipfw/sys/netinet/libalias/alias_mod.c Modified: user/piso/ipfw/sys/netinet/libalias/alias_mod.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_mod.c Tue Apr 14 20:51:58 2009 (r191077) +++ user/piso/ipfw/sys/netinet/libalias/alias_mod.c Tue Apr 14 21:07:47 2009 (r191078) @@ -238,7 +238,7 @@ find_handler(int8_t dir, int8_t proto, s if (p->legacy) { m_copydata(*ptr, 0, m_length(*ptr, NULL), la->buf); error = p->protohandler(la, NULL, ad); - m_copyback(*ptr, 0, ((struct ip *)la->buf)->ip_len, + m_copyback(*ptr, 0, ntohs(((struct ip *)la->buf)->ip_len), la->buf); break; } From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 14:51:41 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAB57106566C; Wed, 15 Apr 2009 14:51:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D94A88FC19; Wed, 15 Apr 2009 14:51:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FEpfXd045754; Wed, 15 Apr 2009 14:51:41 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FEpf4G045751; Wed, 15 Apr 2009 14:51:41 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904151451.n3FEpf4G045751@svn.freebsd.org> From: Andrew Thompson Date: Wed, 15 Apr 2009 14:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191102 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 14:51:42 -0000 Author: thompsa Date: Wed Apr 15 14:51:41 2009 New Revision: 191102 URL: http://svn.freebsd.org/changeset/base/191102 Log: Perform the channel change in ieee80211_setcurchan() on the taskqueue. This is safe as the channel is set before the new state is switched in ieee80211_sta_join(), the taskqueue is serialised so the channel change is guaranteed to have completed before the state transition happens. Modified: user/thompsa/vaptq/sys/net80211/ieee80211_node.c user/thompsa/vaptq/sys/net80211/ieee80211_proto.c user/thompsa/vaptq/sys/net80211/ieee80211_var.h Modified: user/thompsa/vaptq/sys/net80211/ieee80211_node.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_node.c Wed Apr 15 05:37:17 2009 (r191101) +++ user/thompsa/vaptq/sys/net80211/ieee80211_node.c Wed Apr 15 14:51:41 2009 (r191102) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -653,7 +654,11 @@ ieee80211_setcurchan(struct ieee80211com ic->ic_bsschan = ic->ic_curchan = c; ic->ic_curmode = ieee80211_chan2mode(ic->ic_curchan); ic->ic_rt = ieee80211_get_ratetable(ic->ic_curchan); - ic->ic_set_channel(ic); + /* + * The channel change is guaranteed to have happened before the next + * state change + */ + taskqueue_enqueue(ic->ic_tq, &ic->ic_chan_task); } /* Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Wed Apr 15 05:37:17 2009 (r191101) +++ user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Wed Apr 15 14:51:41 2009 (r191102) @@ -99,6 +99,7 @@ const char *ieee80211_wme_acnames[] = { static void parent_updown(void *, int); static void update_mcast(void *, int); static void update_promisc(void *, int); +static void update_channel(void *, int); static void ieee80211_newstate_cb(void *, int); static int ieee80211_newstate_cb_locked(struct ieee80211vap *, enum ieee80211_state, int); @@ -138,6 +139,7 @@ ieee80211_proto_attach(struct ieee80211c TASK_INIT(&ic->ic_parent_task, 0, parent_updown, ifp); TASK_INIT(&ic->ic_mcast_task, 0, update_mcast, ic); TASK_INIT(&ic->ic_promisc_task, 0, update_promisc, ic); + TASK_INIT(&ic->ic_chan_task, 0, update_channel, ic); ic->ic_wme.wme_hipri_switch_hysteresis = AGGRESSIVE_MODE_SWITCH_HYSTERESIS; @@ -1098,6 +1100,14 @@ update_promisc(void *arg, int npending) ic->ic_update_promisc(parent); } +static void +update_channel(void *arg, int npending) +{ + struct ieee80211com *ic = arg; + + ic->ic_set_channel(ic); +} + /* * Block until the parent is in a known state. This is * used after any operations that dispatch a task (e.g. @@ -1109,6 +1119,7 @@ ieee80211_waitfor_parent(struct ieee8021 taskqueue_drain(ic->ic_tq, &ic->ic_parent_task); taskqueue_drain(ic->ic_tq, &ic->ic_mcast_task); taskqueue_drain(ic->ic_tq, &ic->ic_promisc_task); + taskqueue_drain(ic->ic_tq, &ic->ic_chan_task); } /* Modified: user/thompsa/vaptq/sys/net80211/ieee80211_var.h ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_var.h Wed Apr 15 05:37:17 2009 (r191101) +++ user/thompsa/vaptq/sys/net80211/ieee80211_var.h Wed Apr 15 14:51:41 2009 (r191102) @@ -128,6 +128,7 @@ struct ieee80211com { struct task ic_parent_task; /* deferred parent processing */ struct task ic_promisc_task;/* deferred promisc update */ struct task ic_mcast_task; /* deferred mcast update */ + struct task ic_chan_task; /* deferred channel change */ uint32_t ic_flags; /* state flags */ uint32_t ic_flags_ext; /* extended state flags */ From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 14:55:18 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E881E1065673; Wed, 15 Apr 2009 14:55:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D77E18FC2B; Wed, 15 Apr 2009 14:55:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FEtI3T045884; Wed, 15 Apr 2009 14:55:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FEtILS045883; Wed, 15 Apr 2009 14:55:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904151455.n3FEtILS045883@svn.freebsd.org> From: Andrew Thompson Date: Wed, 15 Apr 2009 14:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191103 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 14:55:19 -0000 Author: thompsa Date: Wed Apr 15 14:55:18 2009 New Revision: 191103 URL: http://svn.freebsd.org/changeset/base/191103 Log: - Dont hold the lock over ic_set_channel - Mark ieee80211_setcurchan() with XXX as its now async Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Wed Apr 15 14:51:41 2009 (r191102) +++ user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Wed Apr 15 14:55:18 2009 (r191103) @@ -308,7 +308,9 @@ change_channel(struct ieee80211com *ic, { ic->ic_curchan = chan; ic->ic_rt = ieee80211_get_ratetable(chan); + IEEE80211_UNLOCK(ic); ic->ic_set_channel(ic); + IEEE80211_LOCK(ic); } static char @@ -961,7 +963,7 @@ scan_task(void *arg, int pending) /* return to the bss channel */ if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && ic->ic_curchan != ic->ic_bsschan) - ieee80211_setcurchan(ic, ic->ic_bsschan); + ieee80211_setcurchan(ic, ic->ic_bsschan); /* XXX */ /* clear internal flags and any indication of a pick */ SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; ss->ss_flags &= ~IEEE80211_SCAN_GOTPICK; From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 14:57:45 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA453106566B; Wed, 15 Apr 2009 14:57:45 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8DC48FC08; Wed, 15 Apr 2009 14:57:45 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FEvj4j045965; Wed, 15 Apr 2009 14:57:45 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FEvj6D045964; Wed, 15 Apr 2009 14:57:45 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904151457.n3FEvj6D045964@svn.freebsd.org> From: Andrew Thompson Date: Wed, 15 Apr 2009 14:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191104 - user/thompsa/vaptq/sys/dev/usb/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 14:57:46 -0000 Author: thompsa Date: Wed Apr 15 14:57:45 2009 New Revision: 191104 URL: http://svn.freebsd.org/changeset/base/191104 Log: Remove the deferred init and stop tasks, they are not needed. Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Wed Apr 15 14:55:18 2009 (r191103) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Wed Apr 15 14:57:45 2009 (r191104) @@ -97,11 +97,7 @@ static usb2_callback_t ural_bulk_write_c static usb2_proc_callback_t ural_command_wrapper; static usb2_proc_callback_t ural_attach_post; -static usb2_proc_callback_t ural_promisctask; static usb2_proc_callback_t ural_amrr_task; -static usb2_proc_callback_t ural_init_task; -static usb2_proc_callback_t ural_stop_task; -static usb2_proc_callback_t ural_flush_task; static usb2_error_t ural_do_request(struct ural_softc *sc, struct usb2_device_request *req, void *data); @@ -154,12 +150,15 @@ static void ural_set_basicrates(struct static void ural_set_bssid(struct ural_softc *, const uint8_t *); static void ural_set_macaddr(struct ural_softc *, uint8_t *); static void ural_update_promisc(struct ifnet *); +static void ural_setpromisc(struct ural_softc *); static const char *ural_get_rf(int); static void ural_read_eeprom(struct ural_softc *); static int ural_bbp_init(struct ural_softc *); static void ural_set_txantenna(struct ural_softc *, int); static void ural_set_rxantenna(struct ural_softc *, int); +static void ural_init_locked(struct ural_softc *); static void ural_init(void *); +static void ural_stop(void *); static int ural_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static void ural_amrr_start(struct ural_softc *, @@ -624,23 +623,9 @@ ural_vap_create(struct ieee80211com *ic, } static void -ural_flush_task(struct usb2_proc_msg *pm) -{ - /* nothing to do */ -} - -static void ural_vap_delete(struct ieee80211vap *vap) { struct ural_vap *uvp = URAL_VAP(vap); - struct ural_softc *sc = uvp->sc; - - RAL_LOCK(sc); - /* wait for any pending tasks to complete */ - ural_queue_command(sc, ural_flush_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); - RAL_UNLOCK(sc); usb2_callout_drain(&uvp->amrr_ch); ieee80211_amrr_cleanup(&uvp->amrr); @@ -1396,20 +1381,13 @@ ural_ioctl(struct ifnet *ifp, u_long cmd RAL_LOCK(sc); if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - ural_queue_command(sc, ural_init_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); + ural_init_locked(sc); startall = 1; } else - ural_queue_command(sc, ural_promisctask, - &sc->sc_promisctask[0].hdr, - &sc->sc_promisctask[1].hdr); + ural_setpromisc(sc); } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - ural_queue_command(sc, ural_stop_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); - } + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ural_stop(sc); } RAL_UNLOCK(sc); if (startall) @@ -1663,11 +1641,9 @@ ural_set_channel(struct ieee80211com *ic { struct ural_softc *sc = ic->ic_ifp->if_softc; - IEEE80211_UNLOCK(ic); RAL_LOCK(sc); ural_set_chan(sc, ic->ic_curchan); RAL_UNLOCK(sc); - IEEE80211_LOCK(ic); } static void @@ -1927,10 +1903,8 @@ ural_set_macaddr(struct ural_softc *sc, } static void -ural_promisctask(struct usb2_proc_msg *pm) +ural_setpromisc(struct ural_softc *sc) { - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; struct ifnet *ifp = sc->sc_ifp; uint32_t tmp; @@ -1955,9 +1929,7 @@ ural_update_promisc(struct ifnet *ifp) return; RAL_LOCK(sc); - ural_queue_command(sc, ural_promisctask, - &sc->sc_promisctask[0].hdr, - &sc->sc_promisctask[1].hdr); + ural_setpromisc(sc); RAL_UNLOCK(sc); } @@ -2085,11 +2057,9 @@ ural_set_rxantenna(struct ural_softc *sc } static void -ural_init_task(struct usb2_proc_msg *pm) +ural_init_locked(struct ural_softc *sc) { #define N(a) (sizeof (a) / sizeof ((a)[0])) - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; uint16_t tmp; @@ -2100,7 +2070,7 @@ ural_init_task(struct usb2_proc_msg *pm) ural_set_testmode(sc); ural_write(sc, 0x308, 0x00f0); /* XXX magic */ - ural_stop_task(pm); + ural_stop(sc); /* initialize MAC registers to default values */ for (i = 0; i < N(ural_def_mac); i++) @@ -2162,7 +2132,7 @@ ural_init_task(struct usb2_proc_msg *pm) usb2_transfer_start(sc->sc_xfer[URAL_BULK_RD]); return; -fail: ural_stop_task(pm); +fail: ural_stop(sc); #undef N } @@ -2174,9 +2144,7 @@ ural_init(void *priv) struct ieee80211com *ic = ifp->if_l2com; RAL_LOCK(sc); - ural_queue_command(sc, ural_init_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); + ural_init_locked(sc); RAL_UNLOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -2184,10 +2152,9 @@ ural_init(void *priv) } static void -ural_stop_task(struct usb2_proc_msg *pm) +ural_stop(void *priv) { - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; + struct ural_softc *sc = priv; struct ifnet *ifp = sc->sc_ifp; RAL_LOCK_ASSERT(sc, MA_OWNED); @@ -2377,11 +2344,4 @@ ural_queue_command(struct ural_softc *sc /* Make sure that any TX operation will stop */ sc->sc_last_task = task; - - /* - * Init, stop and flush must be synchronous! - */ - if ((fn == ural_init_task) || (fn == ural_stop_task) || - (fn == ural_stop_task)) - usb2_proc_mwait(&sc->sc_tq, t0, t1); } From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 15:02:38 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2526B1065674; Wed, 15 Apr 2009 15:02:38 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 140968FC0C; Wed, 15 Apr 2009 15:02:38 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FF2bho046117; Wed, 15 Apr 2009 15:02:37 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FF2bMn046116; Wed, 15 Apr 2009 15:02:37 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904151502.n3FF2bMn046116@svn.freebsd.org> From: Andrew Thompson Date: Wed, 15 Apr 2009 15:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191105 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 15:02:38 -0000 Author: thompsa Date: Wed Apr 15 15:02:37 2009 New Revision: 191105 URL: http://svn.freebsd.org/changeset/base/191105 Log: Remove debug printfs. Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Wed Apr 15 14:57:45 2009 (r191104) +++ user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Wed Apr 15 15:02:37 2009 (r191105) @@ -872,7 +872,6 @@ scan_task(void *arg, int pending) vap->iv_state == IEEE80211_S_RUN) { if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { /* Enable station power save mode */ - printf("ieee80211_sta_pwrsave(vap, 1)\n"); ieee80211_sta_pwrsave(vap, 1); /* * Use an 1ms delay so the null data frame has a chance @@ -885,7 +884,6 @@ scan_task(void *arg, int pending) } } - printf("%s: starting scan loop\n", __func__); scanend = ticks + SCAN_PRIVATE(ss)->ss_duration; IEEE80211_UNLOCK(ic); ic->ic_scan_start(ic); /* notify driver */ @@ -1012,9 +1010,6 @@ scan_task(void *arg, int pending) * may generate a request to cancel scanning. */ done: - printf("%s: finished, cancel=%d abort=%d\n", __func__, - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0, - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) != 0); ic->ic_flags &= ~IEEE80211_F_SCAN; /* * Drop out of power save mode when a scan has From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 17:05:20 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E131F1065675; Wed, 15 Apr 2009 17:05:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEACB8FC0A; Wed, 15 Apr 2009 17:05:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FH5KnN048751; Wed, 15 Apr 2009 17:05:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FH5Klp048743; Wed, 15 Apr 2009 17:05:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904151705.n3FH5Klp048743@svn.freebsd.org> From: Andrew Thompson Date: Wed, 15 Apr 2009 17:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191108 - in user/thompsa/vaptq/sys/dev: if_ndis ipw iwi iwn X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 17:05:21 -0000 Author: thompsa Date: Wed Apr 15 17:05:20 2009 New Revision: 191108 URL: http://svn.freebsd.org/changeset/base/191108 Log: Remove the deferral of scanning calls now that it can sleep. Modified: user/thompsa/vaptq/sys/dev/if_ndis/if_ndis.c user/thompsa/vaptq/sys/dev/if_ndis/if_ndisvar.h user/thompsa/vaptq/sys/dev/ipw/if_ipw.c user/thompsa/vaptq/sys/dev/ipw/if_ipwvar.h user/thompsa/vaptq/sys/dev/iwi/if_iwi.c user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h user/thompsa/vaptq/sys/dev/iwn/if_iwn.c user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h Modified: user/thompsa/vaptq/sys/dev/if_ndis/if_ndis.c ============================================================================== --- user/thompsa/vaptq/sys/dev/if_ndis/if_ndis.c Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/if_ndis/if_ndis.c Wed Apr 15 17:05:20 2009 (r191108) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -173,7 +172,7 @@ static int ndis_newstate (struct ieee802 int); static int ndis_nettype_chan (uint32_t); static int ndis_nettype_mode (uint32_t); -static void ndis_scan (void *, int); +static void ndis_scan (void *); static void ndis_scan_results (struct ndis_softc *); static void ndis_scan_start (struct ieee80211com *); static void ndis_scan_end (struct ieee80211com *); @@ -739,11 +738,7 @@ ndis_attach(dev) uint32_t arg; int r; - sc->ndis_tq = taskqueue_create("nids_taskq", M_NOWAIT | M_ZERO, - taskqueue_thread_enqueue, &sc->ndis_tq); - taskqueue_start_threads(&sc->ndis_tq, 1, PI_NET, "%s taskq", - device_get_nameunit(dev)); - TASK_INIT(&sc->ndis_scantask, 0, ndis_scan, sc); + callout_init(&sc->ndis_scan_callout, CALLOUT_MPSAFE); ifp->if_ioctl = ndis_ioctl_80211; ic->ic_ifp = ifp; @@ -1050,10 +1045,6 @@ ndis_detach(dev) } else NDIS_UNLOCK(sc); - if (sc->ndis_80211) { - taskqueue_drain(sc->ndis_tq, &sc->ndis_scantask); - } - if (sc->ndis_tickitem != NULL) IoFreeWorkItem(sc->ndis_tickitem); if (sc->ndis_startitem != NULL) @@ -1115,8 +1106,6 @@ ndis_detach(dev) if (sc->ndis_iftype == PCIBus) bus_dma_tag_destroy(sc->ndis_parent_tag); - if (sc->ndis_80211) - taskqueue_free(sc->ndis_tq); return(0); } @@ -3289,54 +3278,18 @@ ndis_newstate(struct ieee80211vap *vap, } static void -ndis_scan(void *arg, int npending) +ndis_scan(void *arg) { struct ndis_softc *sc = arg; struct ieee80211com *ic; struct ieee80211vap *vap; - struct ieee80211_scan_state *ss; - ndis_80211_ssid ssid; - int error, len; ic = sc->ifp->if_l2com; - ss = ic->ic_scan; vap = TAILQ_FIRST(&ic->ic_vaps); - if (!NDIS_INITIALIZED(sc)) { - DPRINTF(("%s: scan aborted\n", __func__)); - ieee80211_cancel_scan(vap); - return; - } - - len = sizeof(ssid); - bzero((char *)&ssid, len); - if (ss->ss_nssid == 0) - ssid.ns_ssidlen = 1; - else { - /* Perform a directed scan */ - ssid.ns_ssidlen = ss->ss_ssid[0].len; - bcopy(ss->ss_ssid[0].ssid, ssid.ns_ssid, ssid.ns_ssidlen); - } - - error = ndis_set_info(sc, OID_802_11_SSID, &ssid, &len); - if (error) - DPRINTF(("%s: set ESSID failed\n", __func__)); - - len = 0; - error = ndis_set_info(sc, OID_802_11_BSSID_LIST_SCAN, - NULL, &len); - if (error) { - DPRINTF(("%s: scan command failed\n", __func__)); - ieee80211_cancel_scan(vap); - return; - } - - pause("ssidscan", hz * 3); - if (!NDIS_INITIALIZED(sc)) - /* The interface was downed while we were sleeping */ - return; - + NDIS_LOCK(sc); ndis_scan_results(sc); + NDIS_UNLOCK(sc); ieee80211_scan_done(vap); } @@ -3467,8 +3420,48 @@ ndis_scan_start(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct ndis_softc *sc = ifp->if_softc; + struct ieee80211vap *vap; + struct ieee80211_scan_state *ss; + ndis_80211_ssid ssid; + int error, len; + + ss = ic->ic_scan; + vap = TAILQ_FIRST(&ic->ic_vaps); + + NDIS_LOCK(sc); + if (!NDIS_INITIALIZED(sc)) { + DPRINTF(("%s: scan aborted\n", __func__)); + NDIS_UNLOCK(sc); + ieee80211_cancel_scan(vap); + return; + } + + len = sizeof(ssid); + bzero((char *)&ssid, len); + if (ss->ss_nssid == 0) + ssid.ns_ssidlen = 1; + else { + /* Perform a directed scan */ + ssid.ns_ssidlen = ss->ss_ssid[0].len; + bcopy(ss->ss_ssid[0].ssid, ssid.ns_ssid, ssid.ns_ssidlen); + } + + error = ndis_set_info(sc, OID_802_11_SSID, &ssid, &len); + if (error) + DPRINTF(("%s: set ESSID failed\n", __func__)); - taskqueue_enqueue(sc->ndis_tq, &sc->ndis_scantask); + len = 0; + error = ndis_set_info(sc, OID_802_11_BSSID_LIST_SCAN, + NULL, &len); + if (error) { + DPRINTF(("%s: scan command failed\n", __func__)); + NDIS_UNLOCK(sc); + ieee80211_cancel_scan(vap); + return; + } + NDIS_UNLOCK(sc); + /* Set a timer to collect the results */ + callout_reset(&sc->ndis_scan_callout, hz * 3, ndis_scan, sc); } static void Modified: user/thompsa/vaptq/sys/dev/if_ndis/if_ndisvar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/if_ndis/if_ndisvar.h Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/if_ndis/if_ndisvar.h Wed Apr 15 17:05:20 2009 (r191108) @@ -180,6 +180,7 @@ struct ndis_softc { ndis_miniport_block *ndis_block; ndis_miniport_characteristics *ndis_chars; interface_type ndis_type; + struct callout ndis_scan_callout; struct callout ndis_stat_callout; int ndis_maxpkts; ndis_oid *ndis_oids; @@ -219,8 +220,6 @@ struct ndis_softc { struct ifqueue ndis_rxqueue; kspin_lock ndis_rxlock; - struct taskqueue *ndis_tq; /* private task queue */ - struct task ndis_scantask; int (*ndis_newstate)(struct ieee80211com *, enum ieee80211_state, int); int ndis_tx_timer; Modified: user/thompsa/vaptq/sys/dev/ipw/if_ipw.c ============================================================================== --- user/thompsa/vaptq/sys/dev/ipw/if_ipw.c Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/ipw/if_ipw.c Wed Apr 15 17:05:20 2009 (r191108) @@ -120,7 +120,6 @@ static uint16_t ipw_read_prom_word(struc static void ipw_rx_cmd_intr(struct ipw_softc *, struct ipw_soft_buf *); static void ipw_assocsuccess(void *, int); static void ipw_assocfailed(void *, int); -static void ipw_scandone(void *, int); static void ipw_bmiss(void *, int); static void ipw_rx_newstate_intr(struct ipw_softc *, struct ipw_soft_buf *); static void ipw_rx_data_intr(struct ipw_softc *, struct ipw_status *, @@ -166,7 +165,6 @@ static void ipw_read_mem_1(struct ipw_so #endif static void ipw_write_mem_1(struct ipw_softc *, bus_size_t, const uint8_t *, bus_size_t); -static void ipw_scan_task(void *, int); static int ipw_scan(struct ipw_softc *); static void ipw_scan_start(struct ieee80211com *); static void ipw_scan_end(struct ieee80211com *); @@ -239,7 +237,6 @@ ipw_attach(device_t dev) MTX_DEF | MTX_RECURSE); TASK_INIT(&sc->sc_init_task, 0, ipw_init_task, sc); - TASK_INIT(&sc->sc_scan_task, 0, ipw_scan_task, sc); TASK_INIT(&sc->sc_bmiss_task, 0, ipw_bmiss, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); @@ -418,7 +415,6 @@ ipw_detach(device_t dev) callout_drain(&sc->sc_wdtimer); taskqueue_drain(taskqueue_fast, &sc->sc_init_task); - taskqueue_drain(taskqueue_fast, &sc->sc_scan_task); taskqueue_drain(taskqueue_fast, &sc->sc_bmiss_task); ipw_release(sc); @@ -513,7 +509,6 @@ ipw_vap_create(struct ieee80211com *ic, TASK_INIT(&ivp->assoc_success_task, 0, ipw_assocsuccess, vap); TASK_INIT(&ivp->assoc_failed_task, 0, ipw_assocfailed, vap); - TASK_INIT(&ivp->scandone_task, 0, ipw_scandone, vap); ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); /* override with driver methods */ @@ -1032,14 +1027,6 @@ ipw_assocfailed(void *arg, int npending) } static void -ipw_scandone(void *arg, int npending) -{ - struct ieee80211vap *vap = arg; - - ieee80211_scan_done(vap); -} - -static void ipw_bmiss(void *arg, int npending) { struct ieee80211com *ic = arg; @@ -1106,8 +1093,7 @@ ipw_rx_newstate_intr(struct ipw_softc *s break; } if (sc->flags & IPW_FLAG_SCANNING) { - taskqueue_enqueue(taskqueue_swi, - &IPW_VAP(vap)->scandone_task); + ieee80211_scan_done(vap); sc->flags &= ~IPW_FLAG_SCANNING; sc->sc_scan_timer = 0; } @@ -2177,20 +2163,6 @@ ipw_setscanopts(struct ipw_softc *sc, ui return ipw_cmd(sc, IPW_CMD_SET_SCAN_OPTIONS, &opts, sizeof(opts)); } -/* - * Handler for sc_scan_task. This is a simple wrapper around ipw_scan(). - */ -static void -ipw_scan_task(void *context, int pending) -{ - struct ipw_softc *sc = context; - IPW_LOCK_DECL; - - IPW_LOCK(sc); - ipw_scan(sc); - IPW_UNLOCK(sc); -} - static int ipw_scan(struct ipw_softc *sc) { @@ -2722,8 +2694,7 @@ ipw_scan_start(struct ieee80211com *ic) IPW_LOCK_DECL; IPW_LOCK(sc); - if (!(sc->flags & IPW_FLAG_SCANNING)) - taskqueue_enqueue(taskqueue_swi, &sc->sc_scan_task); + ipw_scan(sc); IPW_UNLOCK(sc); } Modified: user/thompsa/vaptq/sys/dev/ipw/if_ipwvar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/ipw/if_ipwvar.h Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/ipw/if_ipwvar.h Wed Apr 15 17:05:20 2009 (r191108) @@ -80,7 +80,6 @@ struct ipw_vap { struct ieee80211vap vap; struct task assoc_success_task; struct task assoc_failed_task; - struct task scandone_task; int (*newstate)(struct ieee80211vap *, enum ieee80211_state, int); @@ -93,8 +92,6 @@ struct ipw_softc { struct mtx sc_mtx; struct task sc_init_task; - struct task sc_scan_task; - struct task sc_chan_task; struct task sc_bmiss_task; struct callout sc_wdtimer; /* watchdog timer */ Modified: user/thompsa/vaptq/sys/dev/iwi/if_iwi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/iwi/if_iwi.c Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/iwi/if_iwi.c Wed Apr 15 17:05:20 2009 (r191108) @@ -186,12 +186,8 @@ static void iwi_put_firmware(struct iwi_ static int iwi_scanchan(struct iwi_softc *, unsigned long, int); static void iwi_scan_start(struct ieee80211com *); static void iwi_scan_end(struct ieee80211com *); -static void iwi_scanabort(void *, int); static void iwi_set_channel(struct ieee80211com *); static void iwi_scan_curchan(struct ieee80211_scan_state *, unsigned long maxdwell); -#if 0 -static void iwi_scan_allchan(struct ieee80211com *, unsigned long maxdwell); -#endif static void iwi_scan_mindwell(struct ieee80211_scan_state *); static void iwi_ops(void *, int); static int iwi_queue_cmd(struct iwi_softc *, int, unsigned long); @@ -309,7 +305,6 @@ iwi_attach(device_t dev) TASK_INIT(&sc->sc_radiofftask, 0, iwi_radio_off, sc); TASK_INIT(&sc->sc_restarttask, 0, iwi_restart, sc); TASK_INIT(&sc->sc_opstask, 0, iwi_ops, sc); - TASK_INIT(&sc->sc_scanaborttask, 0, iwi_scanabort, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0); @@ -2666,7 +2661,7 @@ scan_band(const struct ieee80211_channel * Start a scan on the current channel or all channels. */ static int -iwi_scanchan(struct iwi_softc *sc, unsigned long maxdwell, int mode) +iwi_scanchan(struct iwi_softc *sc, unsigned long maxdwell, int allchan) { struct ieee80211com *ic; struct ieee80211_channel *chan; @@ -2713,7 +2708,7 @@ iwi_scanchan(struct iwi_softc *sc, unsig return (error); } - if (mode == IWI_SCAN_ALLCHAN) { + if (allchan) { int i, next, band, b, bstart; /* * Convert scan list to run-length encoded channel list @@ -2782,20 +2777,6 @@ iwi_scanchan(struct iwi_softc *sc, unsig return (iwi_cmd(sc, IWI_CMD_SCAN_EXT, &scan, sizeof scan)); } -static void -iwi_scanabort(void *arg, int npending) -{ - struct iwi_softc *sc = arg; - IWI_LOCK_DECL; - - IWI_LOCK(sc); - sc->flags &= ~IWI_FLAG_CHANNEL_SCAN; - /* NB: make sure we're still scanning */ - if (sc->fw_state == IWI_FW_SCANNING) - iwi_cmd(sc, IWI_CMD_ABORT_SCAN, NULL, 0); - IWI_UNLOCK(sc); -} - static int iwi_set_sensitivity(struct iwi_softc *sc, int8_t rssi_dbm) { @@ -3538,11 +3519,7 @@ iwi_ops(void *arg0, int npending) { static const char *opnames[] = { [IWI_CMD_FREE] = "FREE", - [IWI_SCAN_START] = "SCAN_START", - [IWI_SET_CHANNEL] = "SET_CHANNEL", [IWI_DISASSOC] = "DISASSOC", - [IWI_SCAN_CURCHAN] = "SCAN_CURCHAN", - [IWI_SCAN_ALLCHAN] = "SCAN_ALLCHAN", [IWI_SET_WME] = "SET_WME", }; struct iwi_softc *sc = arg0; @@ -3585,21 +3562,7 @@ again: if (vap->iv_state == IEEE80211_S_RUN) (void) iwi_wme_setparams(sc, ic); break; - case IWI_SCAN_START: - sc->flags |= IWI_FLAG_CHANNEL_SCAN; - break; - case IWI_SCAN_CURCHAN: - case IWI_SCAN_ALLCHAN: - if (!(sc->flags & IWI_FLAG_CHANNEL_SCAN)) { - DPRINTF(("%s: ic_scan_curchan while not scanning\n", - __func__)); - goto done; - } - if (iwi_scanchan(sc, arg, cmd)) - ieee80211_cancel_scan(vap); - break; } -done: IWI_UNLOCK(sc); /* Take another pass */ @@ -3627,10 +3590,7 @@ iwi_queue_cmd(struct iwi_softc *sc, int static void iwi_scan_start(struct ieee80211com *ic) { - struct ifnet *ifp = ic->ic_ifp; - struct iwi_softc *sc = ifp->if_softc; - - iwi_queue_cmd(sc, IWI_SCAN_START, 0); + /* ignore */ } static void @@ -3648,20 +3608,13 @@ iwi_scan_curchan(struct ieee80211_scan_s struct ieee80211vap *vap = ss->ss_vap; struct ifnet *ifp = vap->iv_ic->ic_ifp; struct iwi_softc *sc = ifp->if_softc; + IWI_LOCK_DECL; - iwi_queue_cmd(sc, IWI_SCAN_CURCHAN, maxdwell); -} - -#if 0 -static void -iwi_scan_allchan(struct ieee80211com *ic, unsigned long maxdwell) -{ - struct ifnet *ifp = ic->ic_ifp; - struct iwi_softc *sc = ifp->if_softc; - - iwi_queue_cmd(sc, IWI_SCAN_ALLCHAN, maxdwell); + IWI_LOCK(sc); + if (iwi_scanchan(sc, maxdwell, 0)) + ieee80211_cancel_scan(vap); + IWI_UNLOCK(sc); } -#endif static void iwi_scan_mindwell(struct ieee80211_scan_state *ss) @@ -3674,6 +3627,12 @@ iwi_scan_end(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct iwi_softc *sc = ifp->if_softc; + IWI_LOCK_DECL; - taskqueue_enqueue(sc->sc_tq2, &sc->sc_scanaborttask); + IWI_LOCK(sc); + sc->flags &= ~IWI_FLAG_CHANNEL_SCAN; + /* NB: make sure we're still scanning */ + if (sc->fw_state == IWI_FW_SCANNING) + iwi_cmd(sc, IWI_CMD_ABORT_SCAN, NULL, 0); + IWI_UNLOCK(sc); } Modified: user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h Wed Apr 15 17:05:20 2009 (r191108) @@ -195,7 +195,6 @@ struct iwi_softc { struct task sc_radiontask; /* radio on processing */ struct task sc_radiofftask; /* radio off processing */ - struct task sc_scanaborttask; /* cancel active scan */ struct task sc_restarttask; /* restart adapter processing */ struct task sc_opstask; /* scan / auth processing */ @@ -225,12 +224,8 @@ struct iwi_softc { int sc_cmd_cur; /* current queued scan task */ int sc_cmd_next; /* last queued scan task */ #define IWI_CMD_FREE 0 /* for marking slots unused */ -#define IWI_SCAN_START 1 -#define IWI_SET_CHANNEL 2 -#define IWI_DISASSOC 3 -#define IWI_SCAN_CURCHAN 4 -#define IWI_SCAN_ALLCHAN 5 -#define IWI_SET_WME 6 +#define IWI_DISASSOC 1 +#define IWI_SET_WME 2 struct iwi_rx_radiotap_header sc_rxtap; int sc_rxtap_len; Modified: user/thompsa/vaptq/sys/dev/iwn/if_iwn.c ============================================================================== --- user/thompsa/vaptq/sys/dev/iwn/if_iwn.c Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/iwn/if_iwn.c Wed Apr 15 17:05:20 2009 (r191108) @@ -1774,7 +1774,7 @@ iwn_notif_intr(struct iwn_softc *sc) "scan finished nchan=%d status=%d chan=%d\n", scan->nchan, scan->status, scan->chan); - iwn_queue_cmd(sc, IWN_SCAN_NEXT, 0, IWN_QUEUE_NORMAL); + ieee80211_scan_next(vap); break; } } @@ -4300,7 +4300,10 @@ iwn_scan_start(struct ieee80211com *ic) struct ifnet *ifp = ic->ic_ifp; struct iwn_softc *sc = ifp->if_softc; - iwn_queue_cmd(sc, IWN_SCAN_START, 0, IWN_QUEUE_NORMAL); + IWN_LOCK(sc); + /* make the link LED blink while we're scanning */ + iwn_set_led(sc, IWN_LED_LINK, 20, 2); + IWN_UNLOCK(sc); } /* @@ -4309,10 +4312,7 @@ iwn_scan_start(struct ieee80211com *ic) static void iwn_scan_end(struct ieee80211com *ic) { - struct ifnet *ifp = ic->ic_ifp; - struct iwn_softc *sc = ifp->if_softc; - - iwn_queue_cmd(sc, IWN_SCAN_STOP, 0, IWN_QUEUE_NORMAL); + /* ignore */ } /* @@ -4323,15 +4323,29 @@ iwn_set_channel(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct iwn_softc *sc = ifp->if_softc; + struct ieee80211vap *vap; const struct ieee80211_channel *c = ic->ic_curchan; + int error; + + vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ + IWN_LOCK(sc); if (c != sc->sc_curchan) { sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); - iwn_queue_cmd(sc, IWN_SET_CHAN, 0, IWN_QUEUE_NORMAL); + + error = iwn_config(sc); + if (error != 0) { + DPRINTF(sc, IWN_DEBUG_STATE, + "%s: set chan failed, cancel scan\n", + __func__); + //XXX Handle failed scan correctly + ieee80211_cancel_scan(vap); + } } + IWN_UNLOCK(sc); } /* @@ -4342,8 +4356,13 @@ iwn_scan_curchan(struct ieee80211_scan_s { struct ieee80211vap *vap = ss->ss_vap; struct iwn_softc *sc = vap->iv_ic->ic_ifp->if_softc; + int error; - iwn_queue_cmd(sc, IWN_SCAN_CURCHAN, 0, IWN_QUEUE_NORMAL); + IWN_LOCK(sc); + error = iwn_scan(sc); + IWN_UNLOCK(sc); + if (error != 0) + ieee80211_cancel_scan(vap); } /* @@ -4367,7 +4386,7 @@ iwn_ops(void *arg0, int pending) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap; - int cmd, arg, error; + int cmd, arg; for (;;) { IWN_CMD_LOCK(sc); @@ -4393,36 +4412,6 @@ iwn_ops(void *arg0, int pending) vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ switch (cmd) { - case IWN_SCAN_START: - /* make the link LED blink while we're scanning */ - iwn_set_led(sc, IWN_LED_LINK, 20, 2); - break; - case IWN_SCAN_STOP: - break; - case IWN_SCAN_NEXT: - ieee80211_scan_next(vap); - break; - case IWN_SCAN_CURCHAN: - error = iwn_scan(sc); - if (error != 0) { - IWN_UNLOCK(sc); - ieee80211_cancel_scan(vap); - IWN_LOCK(sc); - return; - } - break; - case IWN_SET_CHAN: - error = iwn_config(sc); - if (error != 0) { - DPRINTF(sc, IWN_DEBUG_STATE, - "%s: set chan failed, cancel scan\n", - __func__); - IWN_UNLOCK(sc); - //XXX Handle failed scan correctly - ieee80211_cancel_scan(vap); - return; - } - break; case IWN_REINIT: IWN_UNLOCK(sc); iwn_init(sc); @@ -4512,11 +4501,6 @@ static const char * iwn_ops_str(int cmd) { switch (cmd) { - case IWN_SCAN_START: return "SCAN_START"; - case IWN_SCAN_CURCHAN: return "SCAN_CURCHAN"; - case IWN_SCAN_STOP: return "SCAN_STOP"; - case IWN_SET_CHAN: return "SET_CHAN"; - case IWN_SCAN_NEXT: return "SCAN_NEXT"; case IWN_RADIO_ENABLE: return "RADIO_ENABLE"; case IWN_RADIO_DISABLE: return "RADIO_DISABLE"; case IWN_REINIT: return "REINIT"; Modified: user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h Wed Apr 15 16:36:13 2009 (r191107) +++ user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h Wed Apr 15 17:05:20 2009 (r191108) @@ -181,22 +181,17 @@ struct iwn_softc { bus_size_t sc_sz; /* command queue related variables */ -#define IWN_SCAN_START (1<<0) -#define IWN_SCAN_CURCHAN (1<<1) -#define IWN_SCAN_STOP (1<<2) -#define IWN_SET_CHAN (1<<3) -#define IWN_SCAN_NEXT (1<<4) -#define IWN_RADIO_ENABLE (1<<5) -#define IWN_RADIO_DISABLE (1<<6) -#define IWN_REINIT (1<<7) +#define IWN_RADIO_ENABLE (1<<0) +#define IWN_RADIO_DISABLE (1<<1) +#define IWN_REINIT (1<<2) #define IWN_CMD_MAXOPS 10 /* command queuing request type */ #define IWN_QUEUE_NORMAL 0 #define IWN_QUEUE_CLEAR 1 int sc_cmd[IWN_CMD_MAXOPS]; int sc_cmd_arg[IWN_CMD_MAXOPS]; - int sc_cmd_cur; /* current queued scan task */ - int sc_cmd_next; /* last queued scan task */ + int sc_cmd_cur; /* current queued task */ + int sc_cmd_next; /* last queued task */ struct mtx sc_cmdlock; /* Task queues used to control the driver */ From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 17:06:47 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E95E106566B; Wed, 15 Apr 2009 17:06:47 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F20EC8FC22; Wed, 15 Apr 2009 17:06:46 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FH6kkb048831; Wed, 15 Apr 2009 17:06:46 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FH6kQr048830; Wed, 15 Apr 2009 17:06:46 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904151706.n3FH6kQr048830@svn.freebsd.org> From: Andrew Thompson Date: Wed, 15 Apr 2009 17:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191109 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 17:06:47 -0000 Author: thompsa Date: Wed Apr 15 17:06:46 2009 New Revision: 191109 URL: http://svn.freebsd.org/changeset/base/191109 Log: Signal the scan thread directly in ieee80211_scan_done(). Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_scan.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Wed Apr 15 17:05:20 2009 (r191108) +++ user/thompsa/vaptq/sys/net80211/ieee80211_scan.c Wed Apr 15 17:06:46 2009 (r191109) @@ -761,7 +761,7 @@ ieee80211_scan_done(struct ieee80211vap IEEE80211_LOCK(ic); ss = ic->ic_scan; ss->ss_next = ss->ss_last; /* all channels are complete */ - ieee80211_scan_next(vap); + scan_signal(ss); IEEE80211_UNLOCK(ic); } From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 20:43:01 2009 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 95E741065676 for ; Wed, 15 Apr 2009 20:43:01 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 8ADB614FD02 for ; Wed, 15 Apr 2009 20:43:00 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 10896 invoked from network); 15 Apr 2009 20:41:19 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 15 Apr 2009 20:41:19 -0000 Message-ID: <49E6466F.9070800@freebsd.org> Date: Wed, 15 Apr 2009 13:41:19 -0700 From: Colin Percival User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: Andrew Thompson References: <200904151451.n3FEpf4G045751@svn.freebsd.org> In-Reply-To: <200904151451.n3FEpf4G045751@svn.freebsd.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org Subject: Re: svn commit: r191102 - user/thompsa/vaptq/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 20:43:02 -0000 Andrew Thompson wrote: > Author: thompsa > Date: Wed Apr 15 14:51:41 2009 > New Revision: 191102 > URL: http://svn.freebsd.org/changeset/base/191102 > > Log: > Perform the channel change in ieee80211_setcurchan() on the taskqueue. This is > safe as the channel is set before the new state is switched in > ieee80211_sta_join(), the taskqueue is serialised so the channel change is > guaranteed to have completed before the state transition happens. Does this fix the cannot-auth-when-channel-is-not-set panic? -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 20:46:48 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B45106568C; Wed, 15 Apr 2009 20:46:48 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B41C8FC2A; Wed, 15 Apr 2009 20:46:48 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FKkmc5054256; Wed, 15 Apr 2009 20:46:48 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FKkmwr054255; Wed, 15 Apr 2009 20:46:48 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904152046.n3FKkmwr054255@svn.freebsd.org> From: Paolo Pisati Date: Wed, 15 Apr 2009 20:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191119 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 20:46:48 -0000 Author: piso Date: Wed Apr 15 20:46:47 2009 New Revision: 191119 URL: http://svn.freebsd.org/changeset/base/191119 Log: Make AliasHandleCUSeeMeOut() mbuf safe. Modified: user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c Modified: user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c Wed Apr 15 20:43:12 2009 (r191118) +++ user/piso/ipfw/sys/netinet/libalias/alias_cuseeme.c Wed Apr 15 20:46:47 2009 (r191119) @@ -59,12 +59,12 @@ __FBSDID("$FreeBSD$"); #define CUSEEME_PORT_NUMBER 7648 static void -AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, - struct alias_link *lnk); +AliasHandleCUSeeMeOut(struct libalias *la, pkt_t ptr, + struct alias_link *lnk); static void AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, - struct in_addr original_addr); + struct in_addr original_addr); static int fingerprint(struct libalias *la, struct alias_data *ah) @@ -95,15 +95,8 @@ protohandlerin(struct libalias *la, pkt_ static int protohandlerout(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - struct ip *pip; -#ifdef _KERNEL - if (ptr == NULL) - pip = (struct ip *)la->buf; - else -#endif - PULLUP_IPHDR(pip, ptr); - AliasHandleCUSeeMeOut(la, pip, ah->lnk); + AliasHandleCUSeeMeOut(la, ptr, ah->lnk); return (0); } @@ -113,7 +106,7 @@ struct proto_handler handlers[] = { .pri = 120, .dir = OUT, .proto = UDP, - .legacy = 1, + .legacy = 0, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, @@ -192,14 +185,20 @@ struct client_info { }; static void -AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, struct alias_link *lnk) +AliasHandleCUSeeMeOut(struct libalias *la, pkt_t ptr, struct alias_link *lnk) { - struct udphdr *ud = ip_next(pip); + struct ip *pip; + struct udphdr *ud; + PULLUP_UDPHDR(pip, ptr); + ud = ip_next(pip); if (ntohs(ud->uh_ulen) - sizeof(struct udphdr) >= sizeof(struct cu_header)) { struct cu_header *cu; struct alias_link *cu_lnk; + PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2) + sizeof(struct udphdr) + + sizeof(struct cu_header)); + ud = ip_next(pip); cu = udp_next(ud); if (cu->addr) cu->addr = (u_int32_t) GetAliasAddress(lnk).s_addr; From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 20:55:20 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 631441065741; Wed, 15 Apr 2009 20:55:20 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC7D8FC1B; Wed, 15 Apr 2009 20:55:20 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FKtKd1054540; Wed, 15 Apr 2009 20:55:20 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FKtKhh054539; Wed, 15 Apr 2009 20:55:20 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904152055.n3FKtKhh054539@svn.freebsd.org> From: Paolo Pisati Date: Wed, 15 Apr 2009 20:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191122 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 20:55:21 -0000 Author: piso Date: Wed Apr 15 20:55:20 2009 New Revision: 191122 URL: http://svn.freebsd.org/changeset/base/191122 Log: Make alias_dummy mbuf safe. Modified: user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Modified: user/piso/ipfw/sys/netinet/libalias/alias_dummy.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Wed Apr 15 20:53:34 2009 (r191121) +++ user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Wed Apr 15 20:55:20 2009 (r191122) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #endif static void -AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah); +AliasHandleDummy(struct libalias *la, pkt_t ptr, struct alias_data *ah); static int fingerprint(struct libalias *la, struct alias_data *ah) @@ -92,15 +92,8 @@ fingerprint(struct libalias *la, struct static int protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - struct ip *pip; -#ifdef _KERNEL - if (ptr == NULL) - pip = (struct ip *)la->buf; - else -#endif - PULLUP_IPHDR(pip, ptr); - AliasHandleDummy(la, pip, ah); + AliasHandleDummy(la, ptr, ah); return (0); } @@ -117,7 +110,7 @@ struct proto_handler handlers [] = { .pri = 666, .dir = IN|OUT, .proto = UDP|TCP, - .legacy = 1, + .legacy = 0, .fingerprint = &fingerprint, .protohandler = &protohandler }, @@ -158,8 +151,7 @@ MODULE_DEPEND(alias_dummy, libalias, 1, #endif static void -AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah) +AliasHandleDummy(struct libalias *la, pkt_t ptr, struct alias_data *ah) { ; /* Dummy. */ } - From owner-svn-src-user@FreeBSD.ORG Wed Apr 15 21:22:29 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D81BD106567D; Wed, 15 Apr 2009 21:22:29 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C46458FC0A; Wed, 15 Apr 2009 21:22:29 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FLMTYp055164; Wed, 15 Apr 2009 21:22:29 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FLMTFE055163; Wed, 15 Apr 2009 21:22:29 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200904152122.n3FLMTFE055163@svn.freebsd.org> From: Paolo Pisati Date: Wed, 15 Apr 2009 21:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191123 - user/piso/ipfw/sys/netinet/libalias X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 21:22:31 -0000 Author: piso Date: Wed Apr 15 21:22:29 2009 New Revision: 191123 URL: http://svn.freebsd.org/changeset/base/191123 Log: Make AliasHandlePptpGreOut & AliasHandlePptpGreIn mbuf safe. Modified: user/piso/ipfw/sys/netinet/libalias/alias_pptp.c Modified: user/piso/ipfw/sys/netinet/libalias/alias_pptp.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_pptp.c Wed Apr 15 20:55:20 2009 (r191122) +++ user/piso/ipfw/sys/netinet/libalias/alias_pptp.c Wed Apr 15 21:22:29 2009 (r191123) @@ -75,10 +75,10 @@ static void AliasHandlePptpIn(struct libalias *, struct ip *, struct alias_link *); static int -AliasHandlePptpGreOut(struct libalias *, struct ip *); +AliasHandlePptpGreOut(struct libalias *, pkt_t); static int -AliasHandlePptpGreIn(struct libalias *, struct ip *); +AliasHandlePptpGreIn(struct libalias *, pkt_t); static int fingerprint(struct libalias *la, struct alias_data *ah) @@ -132,16 +132,9 @@ protohandlerout(struct libalias *la, pkt static int protohandlergrein(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - struct ip *pip; -#ifdef _KERNEL - if (ptr == NULL) - pip = (struct ip *)la->buf; - else -#endif - PULLUP_IPHDR(pip, ptr); if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY || - AliasHandlePptpGreIn(la, pip) == 0) + AliasHandlePptpGreIn(la, ptr) == 0) return (0); return (-1); } @@ -149,15 +142,8 @@ protohandlergrein(struct libalias *la, p static int protohandlergreout(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - struct ip *pip; -#ifdef _KERNEL - if (ptr == NULL) - pip = (struct ip *)la->buf; - else -#endif - PULLUP_IPHDR(pip, ptr); - if (AliasHandlePptpGreOut(la, pip) == 0) + if (AliasHandlePptpGreOut(la, ptr) == 0) return (0); return (-1); } @@ -189,7 +175,7 @@ struct proto_handler handlers[] = { .pri = INT_MAX, .dir = IN, .proto = IP, - .legacy = 1, + .legacy = 0, .fingerprint = &fingerprintgre, .protohandler = &protohandlergrein }, @@ -197,7 +183,7 @@ struct proto_handler handlers[] = { .pri = INT_MAX, .dir = OUT, .proto = IP, - .legacy = 1, + .legacy = 0, .fingerprint = &fingerprintgre, .protohandler = &protohandlergreout }, @@ -506,11 +492,14 @@ AliasVerifyPptp(struct ip *pip, u_int16_ } static int -AliasHandlePptpGreOut(struct libalias *la, struct ip *pip) +AliasHandlePptpGreOut(struct libalias *la, pkt_t ptr) { + struct ip *pip; GreHdr *gr; struct alias_link *lnk; + PULLUP_IPHDR(pip, ptr); + PULLUP_SIZE(pip, ptr, (pip->ip_len << 2) + sizeof(GreHdr)); gr = (GreHdr *) ip_next(pip); /* Check GRE header bits. */ @@ -530,11 +519,14 @@ AliasHandlePptpGreOut(struct libalias *l } static int -AliasHandlePptpGreIn(struct libalias *la, struct ip *pip) +AliasHandlePptpGreIn(struct libalias *la, pkt_t ptr) { + struct ip *pip; GreHdr *gr; struct alias_link *lnk; + PULLUP_IPHDR(pip, ptr); + PULLUP_SIZE(pip, ptr, (pip->ip_len << 2) + sizeof(GreHdr)); gr = (GreHdr *) ip_next(pip); /* Check GRE header bits. */ From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 03:49:27 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54941106566C; Fri, 17 Apr 2009 03:49:27 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1938FC15; Fri, 17 Apr 2009 03:49:27 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3H3nRMM006820; Fri, 17 Apr 2009 03:49:27 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3H3nRbp006818; Fri, 17 Apr 2009 03:49:27 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904170349.n3H3nRbp006818@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 03:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191191 - user/thompsa/vaptq/sys/dev/usb/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 03:49:27 -0000 Author: thompsa Date: Fri Apr 17 03:49:26 2009 New Revision: 191191 URL: http://svn.freebsd.org/changeset/base/191191 Log: Eliminate sc->sc_state. Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c user/thompsa/vaptq/sys/dev/usb/wlan/if_uathvar.h Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c Fri Apr 17 03:45:15 2009 (r191190) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c Fri Apr 17 03:49:26 2009 (r191191) @@ -1602,6 +1602,7 @@ uath_tx_start(struct uath_softc *sc, str { struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = ni->ni_vap; struct uath_chunk *chunk; struct uath_tx_desc *desc; const struct ieee80211_frame *wh; @@ -1677,9 +1678,9 @@ uath_tx_start(struct uath_softc *sc, str m_freem(m0); return (EIO); } - if (sc->sc_state == IEEE80211_S_AUTH || - sc->sc_state == IEEE80211_S_ASSOC || - sc->sc_state == IEEE80211_S_RUN) + if (vap->iv_state == IEEE80211_S_AUTH || + vap->iv_state == IEEE80211_S_ASSOC || + vap->iv_state == IEEE80211_S_RUN) desc->connid = htobe32(UATH_ID_BSS); else desc->connid = htobe32(UATH_ID_INVALID); @@ -2065,7 +2066,6 @@ uath_newstate(struct ieee80211vap *vap, callout_stop(&sc->stat_ch); callout_stop(&sc->watchdog_ch); - sc->sc_state = nstate; switch (nstate) { case IEEE80211_S_INIT: Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_uathvar.h Fri Apr 17 03:45:15 2009 (r191190) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_uathvar.h Fri Apr 17 03:49:26 2009 (r191191) @@ -183,7 +183,6 @@ struct uath_softc { struct uath_stat sc_stat; int (*sc_newstate)(struct ieee80211com *, enum ieee80211_state, int); - enum ieee80211_state sc_state; struct usb2_xfer *sc_xfer[UATH_N_XFERS]; struct uath_cmd sc_cmd[UATH_CMD_LIST_COUNT]; From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 04:07:57 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9628B1065670; Fri, 17 Apr 2009 04:07:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5C58FC08; Fri, 17 Apr 2009 04:07:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3H47vDt007722; Fri, 17 Apr 2009 04:07:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3H47vH7007719; Fri, 17 Apr 2009 04:07:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904170407.n3H47vH7007719@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 04:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191193 - user/thompsa/vaptq/sys/dev/usb/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 04:07:57 -0000 Author: thompsa Date: Fri Apr 17 04:07:56 2009 New Revision: 191193 URL: http://svn.freebsd.org/changeset/base/191193 Log: Expand and remove usb_wlan.h, it has no real content. Deleted: user/thompsa/vaptq/sys/dev/usb/wlan/usb_wlan.h Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c user/thompsa/vaptq/sys/dev/usb/wlan/if_zyd.c Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c Fri Apr 17 04:04:57 2009 (r191192) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c Fri Apr 17 04:07:56 2009 (r191193) @@ -26,13 +26,50 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com.tw/ */ -#include "usbdevs.h" -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef INET +#include +#include +#include +#include +#include +#endif + +#include +#include +#include +#include #define USB_DEBUG_VAR rum_debug +#include +#include #include #include #include @@ -40,8 +77,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include "usbdevs.h" -#include #include #include #include Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Fri Apr 17 04:04:57 2009 (r191192) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Fri Apr 17 04:07:56 2009 (r191193) @@ -28,13 +28,50 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com/ */ -#include "usbdevs.h" -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef INET +#include +#include +#include +#include +#include +#endif + +#include +#include +#include +#include #define USB_DEBUG_VAR ural_debug +#include +#include #include #include #include @@ -42,8 +79,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include "usbdevs.h" + -#include #include #include Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_zyd.c Fri Apr 17 04:04:57 2009 (r191192) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_zyd.c Fri Apr 17 04:07:56 2009 (r191193) @@ -26,11 +26,48 @@ __FBSDID("$FreeBSD$"); * ZyDAS ZD1211/ZD1211B USB WLAN driver. */ -#include "usbdevs.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef INET +#include +#include +#include +#include +#include +#endif + +#include +#include +#include +#include + #include -#include #include - #include #include #include @@ -38,8 +75,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include "usbdevs.h" -#include #include #include From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 04:23:12 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FAF7106564A; Fri, 17 Apr 2009 04:23:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F25EE8FC1F; Fri, 17 Apr 2009 04:23:11 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3H4NBq7008381; Fri, 17 Apr 2009 04:23:11 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3H4NBZt008376; Fri, 17 Apr 2009 04:23:11 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904170423.n3H4NBZt008376@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 04:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191194 - user/thompsa/vaptq/sys/dev/usb/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 04:23:12 -0000 Author: thompsa Date: Fri Apr 17 04:23:11 2009 New Revision: 191194 URL: http://svn.freebsd.org/changeset/base/191194 Log: Convert the usb drivers over to the vap taskqueue system - remove usb2_proc_* - remove the deferral of scanning/state callbacks - remove deferred attach/init/stop The switch off async operation of the drivers is a huge win in complexity, race conditions and reduced code size. Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c user/thompsa/vaptq/sys/dev/usb/wlan/if_rumvar.h user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c user/thompsa/vaptq/sys/dev/usb/wlan/if_uralvar.h user/thompsa/vaptq/sys/dev/usb/wlan/if_zyd.c user/thompsa/vaptq/sys/dev/usb/wlan/if_zydreg.h Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c Fri Apr 17 04:07:56 2009 (r191193) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c Fri Apr 17 04:23:11 2009 (r191194) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -72,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -153,16 +153,6 @@ static device_detach_t rum_detach; static usb2_callback_t rum_bulk_read_callback; static usb2_callback_t rum_bulk_write_callback; -static usb2_proc_callback_t rum_command_wrapper; -static usb2_proc_callback_t rum_attach_post; -static usb2_proc_callback_t rum_task; -static usb2_proc_callback_t rum_scantask; -static usb2_proc_callback_t rum_promisctask; -static usb2_proc_callback_t rum_amrr_task; -static usb2_proc_callback_t rum_init_task; -static usb2_proc_callback_t rum_stop_task; -static usb2_proc_callback_t rum_flush_task; - static usb2_error_t rum_do_request(struct rum_softc *sc, struct usb2_device_request *req, void *data); static struct ieee80211vap *rum_vap_create(struct ieee80211com *, @@ -211,10 +201,13 @@ static void rum_update_slot(struct ifne static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); static void rum_update_promisc(struct ifnet *); +static void rum_setpromisc(struct rum_softc *); static const char *rum_get_rf(int); static void rum_read_eeprom(struct rum_softc *); static int rum_bbp_init(struct rum_softc *); +static void rum_init_locked(struct rum_softc *); static void rum_init(void *); +static void rum_stop(struct rum_softc *); static void rum_load_microcode(struct rum_softc *, const uint8_t *, size_t); static int rum_prepare_beacon(struct rum_softc *, @@ -231,10 +224,8 @@ static int rum_get_rssi(struct rum_soft static void rum_amrr_start(struct rum_softc *, struct ieee80211_node *); static void rum_amrr_timeout(void *); +static void rum_amrr_task(void *, int); static int rum_pause(struct rum_softc *, int); -static void rum_queue_command(struct rum_softc *, - usb2_proc_callback_t *, struct usb2_proc_msg *, - struct usb2_proc_msg *); static const struct { uint32_t reg; @@ -435,8 +426,11 @@ rum_attach(device_t self) { struct usb2_attach_arg *uaa = device_get_ivars(self); struct rum_softc *sc = device_get_softc(self); - uint8_t iface_index; - int error; + struct ieee80211com *ic; + struct ifnet *ifp; + uint8_t iface_index, bands; + uint32_t tmp; + int error, ntries; device_set_usb2_desc(self); sc->sc_udev = uaa->device; @@ -445,8 +439,6 @@ rum_attach(device_t self) mtx_init(&sc->sc_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, MTX_DEF); - cv_init(&sc->sc_cmd_cv, "wtxdone"); - iface_index = RT2573_IFACE_INDEX; error = usb2_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, rum_config, RUM_N_TRANSFER, sc, &sc->sc_mtx); @@ -455,37 +447,8 @@ rum_attach(device_t self) "err=%s\n", usb2_errstr(error)); goto detach; } - error = usb2_proc_create(&sc->sc_tq, &sc->sc_mtx, - device_get_nameunit(self), USB_PRI_MED); - if (error) { - device_printf(self, "could not setup config thread!\n"); - goto detach; - } - /* fork rest of the attach code */ RUM_LOCK(sc); - rum_queue_command(sc, rum_attach_post, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); - RUM_UNLOCK(sc); - return (0); - -detach: - rum_detach(self); - return (ENXIO); /* failure */ -} - -static void -rum_attach_post(struct usb2_proc_msg *pm) -{ - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; - struct ifnet *ifp; - struct ieee80211com *ic; - unsigned int ntries; - uint32_t tmp; - uint8_t bands; - /* retrieve RT2573 rev. no */ for (ntries = 0; ntries < 100; ntries++) { if ((tmp = rum_read(sc, RT2573_MAC_CSR0)) != 0) @@ -495,7 +458,8 @@ rum_attach_post(struct usb2_proc_msg *pm } if (ntries == 100) { device_printf(sc->sc_dev, "timeout waiting for chip to settle\n"); - return; + RUM_UNLOCK(sc); + goto detach; } /* retrieve MAC address and various other things from EEPROM */ @@ -505,18 +469,12 @@ rum_attach_post(struct usb2_proc_msg *pm tmp, rum_get_rf(sc->rf_rev)); rum_load_microcode(sc, rt2573_ucode, sizeof(rt2573_ucode)); - - /* XXX Async attach race */ - if (usb2_proc_is_gone(&sc->sc_tq)) - return; - RUM_UNLOCK(sc); ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { device_printf(sc->sc_dev, "can not if_alloc()\n"); - RUM_LOCK(sc); - return; + goto detach; } ic = ifp->if_l2com; @@ -579,7 +537,11 @@ rum_attach_post(struct usb2_proc_msg *pm if (bootverbose) ieee80211_announce(ic); - RUM_LOCK(sc); + return (0); + +detach: + rum_detach(self); + return (ENXIO); /* failure */ } static int @@ -589,12 +551,8 @@ rum_detach(device_t self) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic; - /* wait for any post attach or other command to complete */ - usb2_proc_drain(&sc->sc_tq); - /* stop all USB transfers */ usb2_transfer_unsetup(sc->sc_xfer, RUM_N_TRANSFER); - usb2_proc_free(&sc->sc_tq); /* free TX list, if any */ RUM_LOCK(sc); @@ -607,7 +565,6 @@ rum_detach(device_t self) ieee80211_ifdetach(ic); if_free(ifp); } - cv_destroy(&sc->sc_cmd_cv); mtx_destroy(&sc->sc_mtx); return (0); @@ -621,7 +578,7 @@ rum_do_request(struct rum_softc *sc, int ntries = 10; while (ntries--) { - err = usb2_do_request_proc(sc->sc_udev, &sc->sc_tq, + err = usb2_do_request_flags(sc->sc_udev, &sc->sc_mtx, req, data, 0, NULL, 250 /* ms */); if (err == 0) break; @@ -659,8 +616,8 @@ rum_vap_create(struct ieee80211com *ic, rvp->newstate = vap->iv_newstate; vap->iv_newstate = rum_newstate; - rvp->sc = sc; usb2_callout_init_mtx(&rvp->amrr_ch, &sc->sc_mtx, 0); + TASK_INIT(&rvp->amrr_task, 0, rum_amrr_task, rvp); ieee80211_amrr_init(&rvp->amrr, vap, IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, @@ -673,25 +630,13 @@ rum_vap_create(struct ieee80211com *ic, } static void -rum_flush_task(struct usb2_proc_msg *pm) -{ - /* Nothing to do */ -} - -static void rum_vap_delete(struct ieee80211vap *vap) { struct rum_vap *rvp = RUM_VAP(vap); - struct rum_softc *sc = rvp->sc; - - RUM_LOCK(sc); - /* wait for any pending tasks to complete */ - rum_queue_command(sc, rum_flush_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); - RUM_UNLOCK(sc); + struct ieee80211com *ic = vap->iv_ic; usb2_callout_drain(&rvp->amrr_ch); + taskqueue_drain(ic->ic_tq, &rvp->amrr_task); ieee80211_amrr_cleanup(&rvp->amrr); ieee80211_vap_detach(vap); free(rvp, M_80211_VAP); @@ -761,23 +706,27 @@ rum_unsetup_tx_list(struct rum_softc *sc } } -static void -rum_task(struct usb2_proc_msg *pm) +static int +rum_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct rum_vap *rvp = RUM_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct rum_softc *sc = ic->ic_ifp->if_softc; const struct ieee80211_txparam *tp; enum ieee80211_state ostate; struct ieee80211_node *ni; uint32_t tmp; ostate = vap->iv_state; + DPRINTF("%s -> %s\n", + ieee80211_state_name[ostate], + ieee80211_state_name[nstate]); - switch (sc->sc_state) { + IEEE80211_UNLOCK(ic); + RUM_LOCK(sc); + usb2_callout_stop(&rvp->amrr_ch); + + switch (nstate) { case IEEE80211_S_INIT: if (ostate == IEEE80211_S_RUN) { /* abort TSF synchronization */ @@ -813,45 +762,9 @@ rum_task(struct usb2_proc_msg *pm) default: break; } - RUM_UNLOCK(sc); IEEE80211_LOCK(ic); - rvp->newstate(vap, sc->sc_state, sc->sc_arg); - if (vap->iv_newstate_cb != NULL) - vap->iv_newstate_cb(vap, sc->sc_state, sc->sc_arg); - IEEE80211_UNLOCK(ic); - RUM_LOCK(sc); -} - -static int -rum_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - struct rum_vap *rvp = RUM_VAP(vap); - struct ieee80211com *ic = vap->iv_ic; - struct rum_softc *sc = ic->ic_ifp->if_softc; - - DPRINTF("%s -> %s\n", - ieee80211_state_name[vap->iv_state], - ieee80211_state_name[nstate]); - - RUM_LOCK(sc); - usb2_callout_stop(&rvp->amrr_ch); - - /* do it in a process context */ - sc->sc_state = nstate; - sc->sc_arg = arg; - RUM_UNLOCK(sc); - - if (nstate == IEEE80211_S_INIT) { - rvp->newstate(vap, nstate, arg); - return 0; - } else { - RUM_LOCK(sc); - rum_queue_command(sc, rum_task, &sc->sc_task[0].hdr, - &sc->sc_task[1].hdr); - RUM_UNLOCK(sc); - return EINPROGRESS; - } + return (rvp->newstate(vap, nstate, arg)); } static void @@ -865,10 +778,6 @@ rum_bulk_write_callback(struct usb2_xfer struct mbuf *m; unsigned int len; - /* wakeup waiting command, if any */ - if (sc->sc_last_task != NULL) - cv_signal(&sc->sc_cmd_cv); - switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete, %d bytes\n", xfer->actlen); @@ -884,10 +793,6 @@ rum_bulk_write_callback(struct usb2_xfer /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - /* wait for command to complete, if any */ - if (sc->sc_last_task != NULL) - break; - data = STAILQ_FIRST(&sc->tx_q); if (data) { STAILQ_REMOVE_HEAD(&sc->tx_q, next); @@ -1414,20 +1319,13 @@ rum_ioctl(struct ifnet *ifp, u_long cmd, RUM_LOCK(sc); if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - rum_queue_command(sc, rum_init_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); + rum_init_locked(sc); startall = 1; } else - rum_queue_command(sc, rum_promisctask, - &sc->sc_promisctask[0].hdr, - &sc->sc_promisctask[1].hdr); + rum_setpromisc(sc); } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - rum_queue_command(sc, rum_stop_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); - } + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + rum_stop(sc); } RUM_UNLOCK(sc); if (startall) @@ -1881,10 +1779,8 @@ rum_set_macaddr(struct rum_softc *sc, co } static void -rum_promisctask(struct usb2_proc_msg *pm) +rum_setpromisc(struct rum_softc *sc) { - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; struct ifnet *ifp = sc->sc_ifp; uint32_t tmp; @@ -1909,9 +1805,7 @@ rum_update_promisc(struct ifnet *ifp) return; RUM_LOCK(sc); - rum_queue_command(sc, rum_promisctask, - &sc->sc_promisctask[0].hdr, - &sc->sc_promisctask[1].hdr); + rum_setpromisc(sc); RUM_UNLOCK(sc); } @@ -2045,11 +1939,9 @@ rum_bbp_init(struct rum_softc *sc) } static void -rum_init_task(struct usb2_proc_msg *pm) +rum_init_locked(struct rum_softc *sc) { #define N(a) (sizeof (a) / sizeof ((a)[0])) - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; uint32_t tmp; @@ -2058,7 +1950,7 @@ rum_init_task(struct usb2_proc_msg *pm) RUM_LOCK_ASSERT(sc, MA_OWNED); - rum_stop_task(pm); + rum_stop(sc); /* initialize MAC registers to default values */ for (i = 0; i < N(rum_def_mac); i++) @@ -2123,7 +2015,7 @@ rum_init_task(struct usb2_proc_msg *pm) usb2_transfer_start(sc->sc_xfer[RUM_BULK_RD]); return; -fail: rum_stop_task(pm); +fail: rum_stop(sc); #undef N } @@ -2135,9 +2027,7 @@ rum_init(void *priv) struct ieee80211com *ic = ifp->if_l2com; RUM_LOCK(sc); - rum_queue_command(sc, rum_init_task, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); + rum_init_locked(sc); RUM_UNLOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -2145,10 +2035,8 @@ rum_init(void *priv) } static void -rum_stop_task(struct usb2_proc_msg *pm) +rum_stop(struct rum_softc *sc) { - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; struct ifnet *ifp = sc->sc_ifp; uint32_t tmp; @@ -2308,21 +2196,20 @@ static void rum_amrr_timeout(void *arg) { struct rum_vap *rvp = arg; - struct rum_softc *sc = rvp->sc; + struct ieee80211vap *vap = &rvp->vap; + struct ieee80211com *ic = vap->iv_ic; - rum_queue_command(sc, rum_amrr_task, - &rvp->amrr_task[0].hdr, &rvp->amrr_task[1].hdr); + taskqueue_enqueue(ic->ic_tq, &rvp->amrr_task); } static void -rum_amrr_task(struct usb2_proc_msg *pm) +rum_amrr_task(void *arg, int pending) { - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct rum_vap *rvp = RUM_VAP(vap); + struct rum_vap *rvp = arg; + struct ieee80211vap *vap = &rvp->vap; + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct rum_softc *sc = ifp->if_softc; struct ieee80211_node *ni = vap->iv_bss; int ok, fail; @@ -2364,13 +2251,15 @@ rum_newassoc(struct ieee80211_node *ni, static void rum_scan_start(struct ieee80211com *ic) { - struct rum_softc *sc = ic->ic_ifp->if_softc; + struct ifnet *ifp = ic->ic_ifp; + struct rum_softc *sc = ifp->if_softc; + uint32_t tmp; RUM_LOCK(sc); - /* do it in a process context */ - sc->sc_scan_action = RUM_SCAN_START; - rum_queue_command(sc, rum_scantask, - &sc->sc_scantask[0].hdr, &sc->sc_scantask[1].hdr); + /* abort TSF synchronization */ + tmp = rum_read(sc, RT2573_TXRX_CSR9); + rum_write(sc, RT2573_TXRX_CSR9, tmp & ~0x00ffffff); + rum_set_bssid(sc, ifp->if_broadcastaddr); RUM_UNLOCK(sc); } @@ -2381,10 +2270,8 @@ rum_scan_end(struct ieee80211com *ic) struct rum_softc *sc = ic->ic_ifp->if_softc; RUM_LOCK(sc); - /* do it in a process context */ - sc->sc_scan_action = RUM_SCAN_END; - rum_queue_command(sc, rum_scantask, - &sc->sc_scantask[0].hdr, &sc->sc_scantask[1].hdr); + rum_enable_tsf_sync(sc); + rum_set_bssid(sc, sc->sc_bssid); RUM_UNLOCK(sc); } @@ -2395,43 +2282,10 @@ rum_set_channel(struct ieee80211com *ic) struct rum_softc *sc = ic->ic_ifp->if_softc; RUM_LOCK(sc); - /* do it in a process context */ - sc->sc_scan_action = RUM_SET_CHANNEL; - rum_queue_command(sc, rum_scantask, - &sc->sc_scantask[0].hdr, &sc->sc_scantask[1].hdr); + rum_set_chan(sc, ic->ic_curchan); RUM_UNLOCK(sc); } -static void -rum_scantask(struct usb2_proc_msg *pm) -{ - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - uint32_t tmp; - - RUM_LOCK_ASSERT(sc, MA_OWNED); - - switch (sc->sc_scan_action) { - case RUM_SCAN_START: - /* abort TSF synchronization */ - tmp = rum_read(sc, RT2573_TXRX_CSR9); - rum_write(sc, RT2573_TXRX_CSR9, tmp & ~0x00ffffff); - rum_set_bssid(sc, ifp->if_broadcastaddr); - break; - - case RUM_SET_CHANNEL: - rum_set_chan(sc, ic->ic_curchan); - break; - - default: /* RUM_SCAN_END */ - rum_enable_tsf_sync(sc); - rum_set_bssid(sc, sc->sc_bssid); - break; - } -} - static int rum_get_rssi(struct rum_softc *sc, uint8_t raw) { @@ -2482,72 +2336,11 @@ rum_get_rssi(struct rum_softc *sc, uint8 static int rum_pause(struct rum_softc *sc, int timeout) { - if (usb2_proc_is_gone(&sc->sc_tq)) - return (1); usb2_pause_mtx(&sc->sc_mtx, timeout); return (0); } -static void -rum_command_wrapper(struct usb2_proc_msg *pm) -{ - struct rum_task *task = (struct rum_task *)pm; - struct rum_softc *sc = task->sc; - struct ifnet *ifp; - - /* wait for pending transfer, if any */ - while (usb2_transfer_pending(sc->sc_xfer[RUM_BULK_WR])) - cv_wait(&sc->sc_cmd_cv, &sc->sc_mtx); - - /* make sure any hardware buffers are emptied */ - rum_pause(sc, hz / 1000); - - /* execute task */ - task->func(pm); - - /* check if this is the last task executed */ - if (sc->sc_last_task == task) { - sc->sc_last_task = NULL; - ifp = sc->sc_ifp; - /* re-start TX, if any */ - if ((ifp != NULL) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) - usb2_transfer_start(sc->sc_xfer[RUM_BULK_WR]); - } -} - -static void -rum_queue_command(struct rum_softc *sc, usb2_proc_callback_t *fn, - struct usb2_proc_msg *t0, struct usb2_proc_msg *t1) -{ - struct rum_task *task; - - RUM_LOCK_ASSERT(sc, MA_OWNED); - - /* - * NOTE: The task cannot get executed before we drop the - * "sc_mtx" mutex. It is safe to update fields in the message - * structure after that the message got queued. - */ - task = (struct rum_task *) - usb2_proc_msignal(&sc->sc_tq, t0, t1); - - /* Setup callback and softc pointers */ - task->hdr.pm_callback = rum_command_wrapper; - task->func = fn; - task->sc = sc; - - /* Make sure that any TX operation will stop */ - sc->sc_last_task = task; - - /* - * Init, stop and flush must be synchronous! - */ - if ((fn == rum_init_task) || (fn == rum_stop_task) || - (fn == rum_flush_task)) - usb2_proc_mwait(&sc->sc_tq, t0, t1); -} - static device_method_t rum_methods[] = { /* Device interface */ DEVMETHOD(device_probe, rum_match), Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_rumvar.h Fri Apr 17 04:07:56 2009 (r191193) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_rumvar.h Fri Apr 17 04:23:11 2009 (r191194) @@ -54,12 +54,6 @@ struct rum_tx_radiotap_header { struct rum_softc; -struct rum_task { - struct usb2_proc_msg hdr; - usb2_proc_callback_t *func; - struct rum_softc *sc; -}; - struct rum_tx_data { STAILQ_ENTRY(rum_tx_data) next; struct rum_softc *sc; @@ -78,11 +72,10 @@ struct rum_node { struct rum_vap { struct ieee80211vap vap; - struct rum_softc *sc; struct ieee80211_beacon_offsets bo; struct ieee80211_amrr amrr; struct usb2_callout amrr_ch; - struct rum_task amrr_task[2]; + struct task amrr_task; int (*newstate)(struct ieee80211vap *, enum ieee80211_state, int); @@ -99,32 +92,18 @@ struct rum_softc { struct ifnet *sc_ifp; device_t sc_dev; struct usb2_device *sc_udev; - struct usb2_process sc_tq; struct usb2_xfer *sc_xfer[RUM_N_TRANSFER]; - struct rum_task *sc_last_task; uint8_t rf_rev; uint8_t rffreq; - enum ieee80211_state sc_state; - int sc_arg; - struct rum_task sc_synctask[2]; - struct rum_task sc_task[2]; - struct rum_task sc_promisctask[2]; - struct rum_task sc_scantask[2]; - int sc_scan_action; -#define RUM_SCAN_START 0 -#define RUM_SCAN_END 1 -#define RUM_SET_CHANNEL 2 - struct rum_tx_data tx_data[RUM_TX_LIST_COUNT]; rum_txdhead tx_q; rum_txdhead tx_free; int tx_nfree; struct rum_rx_desc sc_rx_desc; - struct cv sc_cmd_cv; struct mtx sc_mtx; uint32_t sta[6]; Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c Fri Apr 17 04:07:56 2009 (r191193) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_uath.c Fri Apr 17 04:23:11 2009 (r191194) @@ -2062,8 +2062,8 @@ uath_newstate(struct ieee80211vap *vap, "%s: %s -> %s\n", __func__, ieee80211_state_name[vap->iv_state], ieee80211_state_name[nstate]); + IEEE80211_UNLOCK(ic); UATH_LOCK(sc); - callout_stop(&sc->stat_ch); callout_stop(&sc->watchdog_ch); @@ -2139,14 +2139,8 @@ uath_newstate(struct ieee80211vap *vap, break; } UATH_UNLOCK(sc); - IEEE80211_LOCK(ic); - uvp->newstate(vap, nstate, arg); - if (vap->iv_newstate_cb != NULL) - vap->iv_newstate_cb(vap, nstate, arg); - IEEE80211_UNLOCK(ic); - - return (0); + return (uvp->newstate(vap, nstate, arg)); } static int Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Fri Apr 17 04:07:56 2009 (r191193) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Fri Apr 17 04:23:11 2009 (r191194) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -74,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -133,10 +133,6 @@ static const struct usb2_device_id ural_ static usb2_callback_t ural_bulk_read_callback; static usb2_callback_t ural_bulk_write_callback; -static usb2_proc_callback_t ural_command_wrapper; -static usb2_proc_callback_t ural_attach_post; -static usb2_proc_callback_t ural_amrr_task; - static usb2_error_t ural_do_request(struct ural_softc *sc, struct usb2_device_request *req, void *data); static struct ieee80211vap *ural_vap_create(struct ieee80211com *, @@ -196,16 +192,14 @@ static void ural_set_txantenna(struct u static void ural_set_rxantenna(struct ural_softc *, int); static void ural_init_locked(struct ural_softc *); static void ural_init(void *); -static void ural_stop(void *); +static void ural_stop(struct ural_softc *); static int ural_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static void ural_amrr_start(struct ural_softc *, struct ieee80211_node *); static void ural_amrr_timeout(void *); +static void ural_amrr_task(void *, int); static int ural_pause(struct ural_softc *sc, int timeout); -static void ural_queue_command(struct ural_softc *, - usb2_proc_callback_t *, struct usb2_proc_msg *, - struct usb2_proc_msg *); /* * Default values for MAC registers; values taken from the reference driver. @@ -435,8 +429,10 @@ ural_attach(device_t self) { struct usb2_attach_arg *uaa = device_get_ivars(self); struct ural_softc *sc = device_get_softc(self); + struct ifnet *ifp; + struct ieee80211com *ic; + uint8_t iface_index, bands; int error; - uint8_t iface_index; device_set_usb2_desc(self); sc->sc_udev = uaa->device; @@ -445,8 +441,6 @@ ural_attach(device_t self) mtx_init(&sc->sc_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, MTX_DEF); - cv_init(&sc->sc_cmd_cv, "wtxdone"); - iface_index = RAL_IFACE_INDEX; error = usb2_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, ural_config, @@ -456,55 +450,22 @@ ural_attach(device_t self) "err=%s\n", usb2_errstr(error)); goto detach; } - error = usb2_proc_create(&sc->sc_tq, &sc->sc_mtx, - device_get_nameunit(self), USB_PRI_MED); - if (error) { - device_printf(self, "could not setup config thread!\n"); - goto detach; - } - /* fork rest of the attach code */ RAL_LOCK(sc); - ural_queue_command(sc, ural_attach_post, - &sc->sc_synctask[0].hdr, - &sc->sc_synctask[1].hdr); - RAL_UNLOCK(sc); - return (0); - -detach: - ural_detach(self); - return (ENXIO); /* failure */ -} - -static void -ural_attach_post(struct usb2_proc_msg *pm) -{ - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; - struct ifnet *ifp; - struct ieee80211com *ic; - uint8_t bands; - /* retrieve RT2570 rev. no */ sc->asic_rev = ural_read(sc, RAL_MAC_CSR0); /* retrieve MAC address and various other things from EEPROM */ ural_read_eeprom(sc); - - /* XXX Async attach race */ - if (usb2_proc_is_gone(&sc->sc_tq)) - return; - RAL_UNLOCK(sc); - device_printf(sc->sc_dev, "MAC/BBP RT2570 (rev 0x%02x), RF %s\n", + device_printf(self, "MAC/BBP RT2570 (rev 0x%02x), RF %s\n", sc->asic_rev, ural_get_rf(sc->rf_rev)); ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { device_printf(sc->sc_dev, "can not if_alloc()\n"); - RAL_LOCK(sc); - return; + goto detach; } ic = ifp->if_l2com; @@ -567,7 +528,11 @@ ural_attach_post(struct usb2_proc_msg *p if (bootverbose) ieee80211_announce(ic); - RAL_LOCK(sc); + return (0); + +detach: + ural_detach(self); + return (ENXIO); /* failure */ } static int @@ -577,12 +542,8 @@ ural_detach(device_t self) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic; - /* wait for any post attach or other command to complete */ - usb2_proc_drain(&sc->sc_tq); - /* stop all USB transfers */ usb2_transfer_unsetup(sc->sc_xfer, URAL_N_TRANSFER); - usb2_proc_free(&sc->sc_tq); /* free TX list, if any */ RAL_LOCK(sc); @@ -595,7 +556,6 @@ ural_detach(device_t self) ieee80211_ifdetach(ic); if_free(ifp); } - cv_destroy(&sc->sc_cmd_cv); mtx_destroy(&sc->sc_mtx); return (0); @@ -609,7 +569,7 @@ ural_do_request(struct ural_softc *sc, int ntries = 10; while (ntries--) { - err = usb2_do_request_proc(sc->sc_udev, &sc->sc_tq, + err = usb2_do_request_flags(sc->sc_udev, &sc->sc_mtx, req, data, 0, NULL, 250 /* ms */); if (err == 0) break; @@ -647,8 +607,8 @@ ural_vap_create(struct ieee80211com *ic, uvp->newstate = vap->iv_newstate; vap->iv_newstate = ural_newstate; - uvp->sc = sc; usb2_callout_init_mtx(&uvp->amrr_ch, &sc->sc_mtx, 0); + TASK_INIT(&uvp->amrr_task, 0, ural_amrr_task, uvp); ieee80211_amrr_init(&uvp->amrr, vap, IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, @@ -664,8 +624,10 @@ static void ural_vap_delete(struct ieee80211vap *vap) { struct ural_vap *uvp = URAL_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; usb2_callout_drain(&uvp->amrr_ch); + taskqueue_drain(ic->ic_tq, &uvp->amrr_task); ieee80211_amrr_cleanup(&uvp->amrr); ieee80211_vap_detach(vap); free(uvp, M_80211_VAP); @@ -828,10 +790,6 @@ ural_bulk_write_callback(struct usb2_xfe struct mbuf *m; unsigned int len; - /* wakeup waiting command, if any */ - if (sc->sc_last_task != NULL) - cv_signal(&sc->sc_cmd_cv); - switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete, %d bytes\n", xfer->actlen); @@ -847,10 +805,6 @@ ural_bulk_write_callback(struct usb2_xfe /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - /* wait for command to complete, if any */ - if (sc->sc_last_task != NULL) - break; - data = STAILQ_FIRST(&sc->tx_q); if (data) { STAILQ_REMOVE_HEAD(&sc->tx_q, next); @@ -1653,8 +1607,8 @@ ural_newassoc(struct ieee80211_node *ni, static void ural_scan_start(struct ieee80211com *ic) { - struct ural_softc *sc = ic->ic_ifp->if_softc; struct ifnet *ifp = ic->ic_ifp; + struct ural_softc *sc = ifp->if_softc; RAL_LOCK(sc); ural_write(sc, RAL_TXRX_CSR19, 0); @@ -2190,9 +2144,8 @@ ural_init(void *priv) } static void -ural_stop(void *priv) +ural_stop(struct ural_softc *sc) { - struct ural_softc *sc = priv; struct ifnet *ifp = sc->sc_ifp; RAL_LOCK_ASSERT(sc, MA_OWNED); @@ -2288,21 +2241,20 @@ static void ural_amrr_timeout(void *arg) { struct ural_vap *uvp = arg; - struct ural_softc *sc = uvp->sc; + struct ieee80211vap *vap = &uvp->vap; + struct ieee80211com *ic = vap->iv_ic; - ural_queue_command(sc, ural_amrr_task, - &uvp->amrr_task[0].hdr, &uvp->amrr_task[1].hdr); + taskqueue_enqueue(ic->ic_tq, &uvp->amrr_task); } static void -ural_amrr_task(struct usb2_proc_msg *pm) +ural_amrr_task(void *arg, int pending) { - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ural_vap *uvp = URAL_VAP(vap); + struct ural_vap *uvp = arg; + struct ieee80211vap *vap = &uvp->vap; + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct ural_softc *sc = ifp->if_softc; struct ieee80211_node *ni = vap->iv_bss; int ok, fail; @@ -2325,61 +2277,7 @@ ural_amrr_task(struct usb2_proc_msg *pm) static int ural_pause(struct ural_softc *sc, int timeout) { - if (usb2_proc_is_gone(&sc->sc_tq)) - return (1); usb2_pause_mtx(&sc->sc_mtx, timeout); return (0); } - -static void -ural_command_wrapper(struct usb2_proc_msg *pm) -{ - struct ural_task *task = (struct ural_task *)pm; - struct ural_softc *sc = task->sc; - struct ifnet *ifp; - - /* wait for pending transfer, if any */ - while (usb2_transfer_pending(sc->sc_xfer[URAL_BULK_WR])) - cv_wait(&sc->sc_cmd_cv, &sc->sc_mtx); - - /* make sure any hardware FIFOs are emptied */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 05:37:31 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92CAE10656CC; Fri, 17 Apr 2009 05:37:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8043B8FC13; Fri, 17 Apr 2009 05:37:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3H5bVwF012345; Fri, 17 Apr 2009 05:37:31 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3H5bVcI012340; Fri, 17 Apr 2009 05:37:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904170537.n3H5bVcI012340@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 05:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191195 - in user/thompsa/vaptq/sys: dev/ipw dev/iwn dev/wi dev/wpi net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 05:37:32 -0000 Author: thompsa Date: Fri Apr 17 05:37:31 2009 New Revision: 191195 URL: http://svn.freebsd.org/changeset/base/191195 Log: Move beacon miss handling into the vap taskq so that it is safe to call from any context. Modified: user/thompsa/vaptq/sys/dev/ipw/if_ipw.c user/thompsa/vaptq/sys/dev/iwn/if_iwn.c user/thompsa/vaptq/sys/dev/wi/if_wi.c user/thompsa/vaptq/sys/dev/wpi/if_wpi.c user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Modified: user/thompsa/vaptq/sys/dev/ipw/if_ipw.c ============================================================================== --- user/thompsa/vaptq/sys/dev/ipw/if_ipw.c Fri Apr 17 04:23:11 2009 (r191194) +++ user/thompsa/vaptq/sys/dev/ipw/if_ipw.c Fri Apr 17 05:37:31 2009 (r191195) @@ -120,7 +120,6 @@ static uint16_t ipw_read_prom_word(struc static void ipw_rx_cmd_intr(struct ipw_softc *, struct ipw_soft_buf *); static void ipw_assocsuccess(void *, int); static void ipw_assocfailed(void *, int); -static void ipw_bmiss(void *, int); static void ipw_rx_newstate_intr(struct ipw_softc *, struct ipw_soft_buf *); static void ipw_rx_data_intr(struct ipw_softc *, struct ipw_status *, struct ipw_soft_bd *, struct ipw_soft_buf *); @@ -237,7 +236,6 @@ ipw_attach(device_t dev) MTX_DEF | MTX_RECURSE); TASK_INIT(&sc->sc_init_task, 0, ipw_init_task, sc); - TASK_INIT(&sc->sc_bmiss_task, 0, ipw_bmiss, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { @@ -415,7 +413,6 @@ ipw_detach(device_t dev) callout_drain(&sc->sc_wdtimer); taskqueue_drain(taskqueue_fast, &sc->sc_init_task); - taskqueue_drain(taskqueue_fast, &sc->sc_bmiss_task); ipw_release(sc); @@ -1027,14 +1024,6 @@ ipw_assocfailed(void *arg, int npending) } static void -ipw_bmiss(void *arg, int npending) -{ - struct ieee80211com *ic = arg; - - ieee80211_beacon_miss(ic); -} - -static void ipw_rx_newstate_intr(struct ipw_softc *sc, struct ipw_soft_buf *sbuf) { #define IEEESTATE(vap) ieee80211_state_name[vap->iv_state] @@ -1074,7 +1063,7 @@ ipw_rx_newstate_intr(struct ipw_softc *s */ if (sc->flags & IPW_FLAG_ASSOCIATED) { /* XXX probably need to issue disassoc to fw */ - taskqueue_enqueue(taskqueue_swi, &sc->sc_bmiss_task); + ieee80211_beacon_miss(ic); } break; Modified: user/thompsa/vaptq/sys/dev/iwn/if_iwn.c ============================================================================== --- user/thompsa/vaptq/sys/dev/iwn/if_iwn.c Fri Apr 17 04:23:11 2009 (r191194) +++ user/thompsa/vaptq/sys/dev/iwn/if_iwn.c Fri Apr 17 05:37:31 2009 (r191195) @@ -129,7 +129,6 @@ void iwn_rx_intr(struct iwn_softc *, st void iwn_rx_statistics(struct iwn_softc *, struct iwn_rx_desc *); void iwn_tx_intr(struct iwn_softc *, struct iwn_rx_desc *); void iwn_cmd_intr(struct iwn_softc *, struct iwn_rx_desc *); -static void iwn_bmiss(void *, int); void iwn_notif_intr(struct iwn_softc *); void iwn_intr(void *); void iwn_read_eeprom(struct iwn_softc *, @@ -309,7 +308,6 @@ iwn_attach(device_t dev) device_get_nameunit(dev)); TASK_INIT(&sc->sc_ops_task, 0, iwn_ops, sc ); - TASK_INIT(&sc->sc_bmiss_task, 0, iwn_bmiss, sc); /* * Put adapter into a known state. @@ -1651,15 +1649,6 @@ iwn_cmd_intr(struct iwn_softc *sc, struc wakeup(&ring->cmd[desc->idx]); } -static void -iwn_bmiss(void *arg, int npending) -{ - struct iwn_softc *sc = arg; - struct ieee80211com *ic = sc->sc_ifp->if_l2com; - - ieee80211_beacon_miss(ic); -} - void iwn_notif_intr(struct iwn_softc *sc) { @@ -1720,8 +1709,7 @@ iwn_notif_intr(struct iwn_softc *sc) if (vap->iv_state == IEEE80211_S_RUN && misses > 5) (void) iwn_init_sensitivity(sc); if (misses >= vap->iv_bmissthreshold) - taskqueue_enqueue(taskqueue_swi, - &sc->sc_bmiss_task); + ieee80211_beacon_miss(ic); break; } case IWN_UC_READY: { Modified: user/thompsa/vaptq/sys/dev/wi/if_wi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/wi/if_wi.c Fri Apr 17 04:23:11 2009 (r191194) +++ user/thompsa/vaptq/sys/dev/wi/if_wi.c Fri Apr 17 05:37:31 2009 (r191195) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -134,7 +133,6 @@ static void wi_rx_intr(struct wi_softc * static void wi_tx_intr(struct wi_softc *); static void wi_tx_ex_intr(struct wi_softc *); -static void wi_status_oor(void *, int); static void wi_info_intr(struct wi_softc *); static int wi_write_txrate(struct wi_softc *, struct ieee80211vap *); @@ -448,7 +446,6 @@ wi_attach(device_t dev) } sc->sc_portnum = WI_DEFAULT_PORT; - TASK_INIT(&sc->sc_oor_task, 0, wi_status_oor, ic); ieee80211_ifattach(ic, macaddr); ic->ic_raw_xmit = wi_raw_xmit; @@ -1505,14 +1502,6 @@ wi_tx_intr(struct wi_softc *sc) } } -static void -wi_status_oor(void *arg, int pending) -{ - struct ieee80211com *ic = arg; - - ieee80211_beacon_miss(ic); -} - static __noinline void wi_info_intr(struct wi_softc *sc) { @@ -1555,7 +1544,7 @@ wi_info_intr(struct wi_softc *sc) break; case WI_INFO_LINK_STAT_AP_OOR: /* XXX does this need to be per-vap? */ - taskqueue_enqueue(taskqueue_swi, &sc->sc_oor_task); + ieee80211_beacon_miss(ic); break; case WI_INFO_LINK_STAT_ASSOC_FAILED: if (vap->iv_opmode == IEEE80211_M_STA) Modified: user/thompsa/vaptq/sys/dev/wpi/if_wpi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/wpi/if_wpi.c Fri Apr 17 04:23:11 2009 (r191194) +++ user/thompsa/vaptq/sys/dev/wpi/if_wpi.c Fri Apr 17 05:37:31 2009 (r191195) @@ -192,7 +192,6 @@ static void wpi_rx_intr(struct wpi_softc struct wpi_rx_data *); static void wpi_tx_intr(struct wpi_softc *, struct wpi_rx_desc *); static void wpi_cmd_intr(struct wpi_softc *, struct wpi_rx_desc *); -static void wpi_bmiss(void *, int); static void wpi_notif_intr(struct wpi_softc *); static void wpi_intr(void *); static void wpi_ops(void *, int); @@ -525,7 +524,6 @@ wpi_attach(device_t dev) /* Create the tasks that can be queued */ TASK_INIT(&sc->sc_opstask, 0, wpi_ops, sc); - TASK_INIT(&sc->sc_bmiss_task, 0, wpi_bmiss, sc); WPI_LOCK_INIT(sc); WPI_CMD_LOCK_INIT(sc); @@ -1653,15 +1651,6 @@ wpi_cmd_intr(struct wpi_softc *sc, struc } static void -wpi_bmiss(void *arg, int npending) -{ - struct wpi_softc *sc = arg; - struct ieee80211com *ic = sc->sc_ifp->if_l2com; - - ieee80211_beacon_miss(ic); -} - -static void wpi_notif_intr(struct wpi_softc *sc) { struct ifnet *ifp = sc->sc_ifp; @@ -1770,8 +1759,7 @@ wpi_notif_intr(struct wpi_softc *sc) DPRINTF(("Beacon miss: %u >= %u\n", le32toh(beacon->consecutive), vap->iv_bmissthreshold)); - taskqueue_enqueue(taskqueue_swi, - &sc->sc_bmiss_task); + ieee80211_beacon_miss(ic); } break; } @@ -3041,8 +3029,7 @@ wpi_rfkill_resume(struct wpi_softc *sc) if (vap != NULL) { if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { if (vap->iv_opmode != IEEE80211_M_MONITOR) { - taskqueue_enqueue(taskqueue_swi, - &sc->sc_bmiss_task); + ieee80211_beacon_miss(ic); wpi_set_led(sc, WPI_LED_LINK, 0, 1); } else wpi_set_led(sc, WPI_LED_LINK, 5, 5); Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Fri Apr 17 04:23:11 2009 (r191194) +++ user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Fri Apr 17 05:37:31 2009 (r191195) @@ -96,6 +96,7 @@ const char *ieee80211_wme_acnames[] = { "WME_UPSD", }; +static void beacon_miss(void *, int); static void parent_updown(void *, int); static void update_mcast(void *, int); static void update_promisc(void *, int); @@ -140,6 +141,7 @@ ieee80211_proto_attach(struct ieee80211c TASK_INIT(&ic->ic_mcast_task, 0, update_mcast, ic); TASK_INIT(&ic->ic_promisc_task, 0, update_promisc, ic); TASK_INIT(&ic->ic_chan_task, 0, update_channel, ic); + TASK_INIT(&ic->ic_bmiss_task, 0, beacon_miss, ic); ic->ic_wme.wme_hipri_switch_hysteresis = AGGRESSIVE_MODE_SWITCH_HYSTERESIS; @@ -1120,6 +1122,7 @@ ieee80211_waitfor_parent(struct ieee8021 taskqueue_drain(ic->ic_tq, &ic->ic_mcast_task); taskqueue_drain(ic->ic_tq, &ic->ic_promisc_task); taskqueue_drain(ic->ic_tq, &ic->ic_chan_task); + taskqueue_drain(ic->ic_tq, &ic->ic_bmiss_task); } /* @@ -1358,6 +1361,14 @@ ieee80211_resume_all(struct ieee80211com void ieee80211_beacon_miss(struct ieee80211com *ic) { + /* Process in a taskq, the bmiss handler may reenter the driver */ + taskqueue_enqueue(ic->ic_tq, &ic->ic_bmiss_task); +} + +static void +beacon_miss(void *arg, int npending) +{ + struct ieee80211com *ic = arg; struct ieee80211vap *vap; if (ic->ic_flags & IEEE80211_F_SCAN) From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 14:58:03 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66508106567B; Fri, 17 Apr 2009 14:58:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47E608FC0C; Fri, 17 Apr 2009 14:58:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HEw3m1025561; Fri, 17 Apr 2009 14:58:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3HEw3ti025559; Fri, 17 Apr 2009 14:58:03 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904171458.n3HEw3ti025559@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 14:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191203 - user/thompsa/vaptq/sys/dev/wpi X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 14:58:04 -0000 Author: thompsa Date: Fri Apr 17 14:58:02 2009 New Revision: 191203 URL: http://svn.freebsd.org/changeset/base/191203 Log: Convert wpi(4) to use sync scanning calls, missed in the previous round. Modified: user/thompsa/vaptq/sys/dev/wpi/if_wpi.c user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h Modified: user/thompsa/vaptq/sys/dev/wpi/if_wpi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/wpi/if_wpi.c Fri Apr 17 14:19:18 2009 (r191202) +++ user/thompsa/vaptq/sys/dev/wpi/if_wpi.c Fri Apr 17 14:58:02 2009 (r191203) @@ -3536,7 +3536,9 @@ wpi_scan_start(struct ieee80211com *ic) struct ifnet *ifp = ic->ic_ifp; struct wpi_softc *sc = ifp->if_softc; - wpi_queue_cmd(sc, WPI_SCAN_START, 0, WPI_QUEUE_NORMAL); + WPI_LOCK(sc); + wpi_set_led(sc, WPI_LED_LINK, 20, 2); + WPI_UNLOCK(sc); } /** @@ -3547,10 +3549,7 @@ wpi_scan_start(struct ieee80211com *ic) static void wpi_scan_end(struct ieee80211com *ic) { - struct ifnet *ifp = ic->ic_ifp; - struct wpi_softc *sc = ifp->if_softc; - - wpi_queue_cmd(sc, WPI_SCAN_STOP, 0, WPI_QUEUE_NORMAL); + /* XXX ignore */ } /** @@ -3567,8 +3566,12 @@ wpi_set_channel(struct ieee80211com *ic) * Only need to set the channel in Monitor mode. AP scanning and auth * are already taken care of by their respective firmware commands. */ - if (ic->ic_opmode == IEEE80211_M_MONITOR) - wpi_queue_cmd(sc, WPI_SET_CHAN, 0, WPI_QUEUE_NORMAL); + if (ic->ic_opmode == IEEE80211_M_MONITOR) { + error = wpi_config(sc); + if (error != 0) + device_printf(sc->sc_dev, + "error %d settting channel\n", error); + } } /** @@ -3583,7 +3586,10 @@ wpi_scan_curchan(struct ieee80211_scan_s struct ifnet *ifp = vap->iv_ic->ic_ifp; struct wpi_softc *sc = ifp->if_softc; - wpi_queue_cmd(sc, WPI_SCAN_CURCHAN, 0, WPI_QUEUE_NORMAL); + WPI_LOCK(sc); + if (wpi_scan(sc)) + ieee80211_cancel_scan(vap); + WPI_UNLOCK(sc); } /** @@ -3634,47 +3640,11 @@ again: switch (cmd) { case WPI_RESTART: wpi_init_locked(sc, 0); - WPI_UNLOCK(sc); - return; case WPI_RF_RESTART: wpi_rfkill_resume(sc); - WPI_UNLOCK(sc); - return; - } - - if (!(sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING)) { - WPI_UNLOCK(sc); - return; - } - - switch (cmd) { - case WPI_SCAN_START: - /* make the link LED blink while we're scanning */ - wpi_set_led(sc, WPI_LED_LINK, 20, 2); - sc->flags |= WPI_FLAG_SCANNING; - break; - - case WPI_SCAN_STOP: - sc->flags &= ~WPI_FLAG_SCANNING; - break; - - case WPI_SCAN_CURCHAN: - if (wpi_scan(sc)) - ieee80211_cancel_scan(vap); - break; - - case WPI_SET_CHAN: - error = wpi_config(sc); - if (error != 0) - device_printf(sc->sc_dev, - "error %d settting channel\n", error); - break; } WPI_UNLOCK(sc); - - /* Take another pass */ - goto again; } /** Modified: user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h Fri Apr 17 14:19:18 2009 (r191202) +++ user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h Fri Apr 17 14:58:02 2009 (r191203) @@ -194,12 +194,8 @@ struct wpi_softc { struct wpi_dma_info fw_dma; /* command queue related variables */ -#define WPI_SCAN_START (1<<0) -#define WPI_SCAN_CURCHAN (1<<1) -#define WPI_SCAN_STOP (1<<2) -#define WPI_SET_CHAN (1<<3) -#define WPI_RESTART (1<<4) -#define WPI_RF_RESTART (1<<5) +#define WPI_RESTART (1<<0) +#define WPI_RF_RESTART (1<<1) #define WPI_CMD_MAXOPS 10 /* command queuing request type */ #define WPI_QUEUE_NORMAL 0 From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 16:15:56 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3EA5106566B; Fri, 17 Apr 2009 16:15:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C16E98FC1B; Fri, 17 Apr 2009 16:15:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HGFum9027532; Fri, 17 Apr 2009 16:15:56 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3HGFuji027525; Fri, 17 Apr 2009 16:15:56 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904171615.n3HGFuji027525@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 16:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191208 - in user/thompsa/vaptq/sys/dev: ipw iwi iwn wpi X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 16:15:57 -0000 Author: thompsa Date: Fri Apr 17 16:15:56 2009 New Revision: 191208 URL: http://svn.freebsd.org/changeset/base/191208 Log: Remove the command op queues now that they are not used during normal operation, infrequent tasks such as kicking dead firmware can go on taskqueue_swi. Modified: user/thompsa/vaptq/sys/dev/ipw/if_ipw.c user/thompsa/vaptq/sys/dev/iwi/if_iwi.c user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h user/thompsa/vaptq/sys/dev/iwn/if_iwn.c user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h user/thompsa/vaptq/sys/dev/wpi/if_wpi.c user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h Modified: user/thompsa/vaptq/sys/dev/ipw/if_ipw.c ============================================================================== --- user/thompsa/vaptq/sys/dev/ipw/if_ipw.c Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/ipw/if_ipw.c Fri Apr 17 16:15:56 2009 (r191208) @@ -412,7 +412,7 @@ ipw_detach(device_t dev) ieee80211_ifdetach(ic); callout_drain(&sc->sc_wdtimer); - taskqueue_drain(taskqueue_fast, &sc->sc_init_task); + taskqueue_drain(taskqueue_swi, &sc->sc_init_task); ipw_release(sc); Modified: user/thompsa/vaptq/sys/dev/iwi/if_iwi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/iwi/if_iwi.c Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/iwi/if_iwi.c Fri Apr 17 16:15:56 2009 (r191208) @@ -189,8 +189,6 @@ static void iwi_scan_end(struct ieee8021 static void iwi_set_channel(struct ieee80211com *); static void iwi_scan_curchan(struct ieee80211_scan_state *, unsigned long maxdwell); static void iwi_scan_mindwell(struct ieee80211_scan_state *); -static void iwi_ops(void *, int); -static int iwi_queue_cmd(struct iwi_softc *, int, unsigned long); static int iwi_auth_and_assoc(struct iwi_softc *, struct ieee80211vap *); static int iwi_disassociate(struct iwi_softc *, int quiet); static void iwi_init_locked(struct iwi_softc *); @@ -288,23 +286,12 @@ iwi_attach(device_t dev) ic = ifp->if_l2com; IWI_LOCK_INIT(sc); - IWI_CMD_LOCK_INIT(sc); sc->sc_unr = new_unrhdr(1, IWI_MAX_IBSSNODE-1, &sc->sc_mtx); - sc->sc_tq = taskqueue_create("iwi_taskq", M_NOWAIT | M_ZERO, - taskqueue_thread_enqueue, &sc->sc_tq); - taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", - device_get_nameunit(dev)); - sc->sc_tq2 = taskqueue_create("iwi_taskq2", M_NOWAIT | M_ZERO, - taskqueue_thread_enqueue, &sc->sc_tq2); - taskqueue_start_threads(&sc->sc_tq2, 1, PI_NET, "%s taskq2", - device_get_nameunit(dev)); - TASK_INIT(&sc->sc_radiontask, 0, iwi_radio_on, sc); TASK_INIT(&sc->sc_radiofftask, 0, iwi_radio_off, sc); TASK_INIT(&sc->sc_restarttask, 0, iwi_restart, sc); - TASK_INIT(&sc->sc_opstask, 0, iwi_ops, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0); @@ -478,8 +465,9 @@ iwi_detach(device_t dev) ieee80211_ifdetach(ic); /* NB: do early to drain any pending tasks */ - taskqueue_free(sc->sc_tq); - taskqueue_free(sc->sc_tq2); + taskqueue_drain(taskqueue_swi, &sc->sc_radiontask); + taskqueue_drain(taskqueue_swi, &sc->sc_radiofftask); + taskqueue_drain(taskqueue_swi, &sc->sc_restarttask); iwi_put_firmware(sc); iwi_release_fw_dma(sc); @@ -1102,6 +1090,7 @@ static int iwi_wme_update(struct ieee80211com *ic) { struct iwi_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); /* * We may be called to update the WME parameters in @@ -1111,7 +1100,9 @@ iwi_wme_update(struct ieee80211com *ic) * will get sent down to the adapter as part of the * work iwi_auth_and_assoc does. */ - return iwi_queue_cmd(sc, IWI_SET_WME, 0); + if (vap->iv_state == IEEE80211_S_RUN) + (void) iwi_wme_setparams(sc, ic); + return (0); } static int @@ -1559,7 +1550,7 @@ iwi_notification_intr(struct iwi_softc * * to disassociate and then on completion we'll * kick the state machine to scan. */ - iwi_queue_cmd(sc, IWI_DISASSOC, 1); + //iwi_disassociate(sc, 0); } } break; @@ -1678,7 +1669,7 @@ iwi_intr(void *arg) if (r & IWI_INTR_FATAL_ERROR) { device_printf(sc->sc_dev, "firmware error\n"); - taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); sc->flags &= ~IWI_FLAG_BUSY; sc->sc_busy_timer = 0; @@ -1691,7 +1682,7 @@ iwi_intr(void *arg) } if (r & IWI_INTR_RADIO_OFF) - taskqueue_enqueue(sc->sc_tq, &sc->sc_radiofftask); + taskqueue_enqueue(taskqueue_swi, &sc->sc_radiofftask); if (r & IWI_INTR_CMD_DONE) { sc->flags &= ~IWI_FLAG_BUSY; @@ -2011,14 +2002,14 @@ iwi_watchdog(void *arg) if (--sc->sc_tx_timer == 0) { if_printf(ifp, "device timeout\n"); ifp->if_oerrors++; - taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); } } if (sc->sc_state_timer > 0) { if (--sc->sc_state_timer == 0) { if_printf(ifp, "firmware stuck in state %d, resetting\n", sc->fw_state); - taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); if (sc->fw_state == IWI_FW_SCANNING) { struct ieee80211com *ic = ifp->if_l2com; ieee80211_cancel_scan(TAILQ_FIRST(&ic->ic_vaps)); @@ -2029,7 +2020,7 @@ iwi_watchdog(void *arg) if (sc->sc_busy_timer > 0) { if (--sc->sc_busy_timer == 0) { if_printf(ifp, "firmware command timeout, resetting\n"); - taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); } } callout_reset(&sc->sc_wdtimer, hz, iwi_watchdog, sc); @@ -3068,9 +3059,6 @@ iwi_init_locked(struct iwi_softc *sc) IWI_STATE_BEGIN(sc, IWI_FW_LOADING); - taskqueue_unblock(sc->sc_tq); - taskqueue_unblock(sc->sc_tq2); - if (iwi_reset(sc) != 0) { device_printf(sc->sc_dev, "could not reset adapter\n"); goto fail; @@ -3165,8 +3153,6 @@ iwi_stop_locked(void *priv) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - taskqueue_block(sc->sc_tq); - taskqueue_block(sc->sc_tq2); if (sc->sc_softled) { callout_stop(&sc->sc_ledtimer); sc->sc_blinking = 0; @@ -3249,7 +3235,7 @@ iwi_rfkill_poll(void *arg) */ if (!iwi_getrfkill(sc)) { taskqueue_unblock(sc->sc_tq); - taskqueue_enqueue(sc->sc_tq, &sc->sc_radiontask); + taskqueue_enqueue(taskqueue_swi, &sc->sc_radiontask); return; } callout_reset(&sc->sc_rftimer, 2*hz, iwi_rfkill_poll, sc); @@ -3515,79 +3501,6 @@ iwi_ledattach(struct iwi_softc *sc) } static void -iwi_ops(void *arg0, int npending) -{ - static const char *opnames[] = { - [IWI_CMD_FREE] = "FREE", - [IWI_DISASSOC] = "DISASSOC", - [IWI_SET_WME] = "SET_WME", - }; - struct iwi_softc *sc = arg0; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - IWI_LOCK_DECL; - int cmd; - unsigned long arg; - -again: - IWI_CMD_LOCK(sc); - cmd = sc->sc_cmd[sc->sc_cmd_cur]; - if (cmd == IWI_CMD_FREE) { - /* No more commands to process */ - IWI_CMD_UNLOCK(sc); - return; - } - arg = sc->sc_arg[sc->sc_cmd_cur]; - sc->sc_cmd[sc->sc_cmd_cur] = IWI_CMD_FREE; /* free the slot */ - sc->sc_cmd_cur = (sc->sc_cmd_cur + 1) % IWI_CMD_MAXOPS; - IWI_CMD_UNLOCK(sc); - - IWI_LOCK(sc); - while (sc->fw_state != IWI_FW_IDLE || (sc->flags & IWI_FLAG_BUSY)) { - msleep(sc, &sc->sc_mtx, 0, "iwicmd", hz/10); - } - - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - IWI_UNLOCK(sc); - return; - } - - DPRINTF(("%s: %s arg %lu\n", __func__, opnames[cmd], arg)); - switch (cmd) { - case IWI_DISASSOC: - iwi_disassociate(sc, 0); - break; - case IWI_SET_WME: - if (vap->iv_state == IEEE80211_S_RUN) - (void) iwi_wme_setparams(sc, ic); - break; - } - IWI_UNLOCK(sc); - - /* Take another pass */ - goto again; -} - -static int -iwi_queue_cmd(struct iwi_softc *sc, int cmd, unsigned long arg) -{ - IWI_CMD_LOCK(sc); - if (sc->sc_cmd[sc->sc_cmd_next] != 0) { - IWI_CMD_UNLOCK(sc); - DPRINTF(("%s: command %d dropped\n", __func__, cmd)); - return (EBUSY); - } - - sc->sc_cmd[sc->sc_cmd_next] = cmd; - sc->sc_arg[sc->sc_cmd_next] = arg; - sc->sc_cmd_next = (sc->sc_cmd_next + 1) % IWI_CMD_MAXOPS; - taskqueue_enqueue(sc->sc_tq, &sc->sc_opstask); - IWI_CMD_UNLOCK(sc); - return (0); -} - -static void iwi_scan_start(struct ieee80211com *ic) { /* ignore */ Modified: user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/iwi/if_iwivar.h Fri Apr 17 16:15:56 2009 (r191208) @@ -131,12 +131,8 @@ struct iwi_softc { device_t sc_dev; struct mtx sc_mtx; - struct mtx sc_cmdlock; - char sc_cmdname[12]; /* e.g. "iwi0_cmd" */ uint8_t sc_mcast[IEEE80211_ADDR_LEN]; struct unrhdr *sc_unr; - struct taskqueue *sc_tq; /* private task queue */ - struct taskqueue *sc_tq2; /* reset task queue */ uint32_t flags; #define IWI_FLAG_FW_INITED (1 << 0) @@ -196,7 +192,6 @@ struct iwi_softc { struct task sc_radiontask; /* radio on processing */ struct task sc_radiofftask; /* radio off processing */ struct task sc_restarttask; /* restart adapter processing */ - struct task sc_opstask; /* scan / auth processing */ unsigned int sc_softled : 1, /* enable LED gpio status */ sc_ledstate: 1, /* LED on/off state */ @@ -218,15 +213,6 @@ struct iwi_softc { int sc_state_timer; /* firmware state timer */ int sc_busy_timer; /* firmware cmd timer */ -#define IWI_CMD_MAXOPS 10 - int sc_cmd[IWI_CMD_MAXOPS]; - unsigned long sc_arg[IWI_CMD_MAXOPS]; - int sc_cmd_cur; /* current queued scan task */ - int sc_cmd_next; /* last queued scan task */ -#define IWI_CMD_FREE 0 /* for marking slots unused */ -#define IWI_DISASSOC 1 -#define IWI_SET_WME 2 - struct iwi_rx_radiotap_header sc_rxtap; int sc_rxtap_len; @@ -270,11 +256,3 @@ struct iwi_softc { if (!__waslocked) \ mtx_unlock(&(sc)->sc_mtx); \ } while (0) -#define IWI_CMD_LOCK_INIT(sc) do { \ - snprintf((sc)->sc_cmdname, sizeof((sc)->sc_cmdname), "%s_cmd", \ - device_get_nameunit((sc)->sc_dev)); \ - mtx_init(&(sc)->sc_cmdlock, (sc)->sc_cmdname, NULL, MTX_DEF); \ -} while (0) -#define IWI_CMD_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_cmdlock) -#define IWI_CMD_LOCK(sc) mtx_lock(&(sc)->sc_cmdlock) -#define IWI_CMD_UNLOCK(sc) mtx_unlock(&(sc)->sc_cmdlock) Modified: user/thompsa/vaptq/sys/dev/iwn/if_iwn.c ============================================================================== --- user/thompsa/vaptq/sys/dev/iwn/if_iwn.c Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/iwn/if_iwn.c Fri Apr 17 16:15:56 2009 (r191208) @@ -182,8 +182,9 @@ static void iwn_scan_end(struct ieee802 static void iwn_set_channel(struct ieee80211com *); static void iwn_scan_curchan(struct ieee80211_scan_state *, unsigned long); static void iwn_scan_mindwell(struct ieee80211_scan_state *); -static void iwn_ops(void *, int); -static int iwn_queue_cmd( struct iwn_softc *, int, int, int); +static void iwn_hwreset(void *, int); +static void iwn_radioon(void *, int); +static void iwn_radiooff(void *, int); static void iwn_bpfattach(struct iwn_softc *); static void iwn_sysctlattach(struct iwn_softc *); @@ -212,7 +213,6 @@ enum { printf(fmt, __VA_ARGS__); \ } while (0) -static const char *iwn_ops_str(int); static const char *iwn_intr_str(uint8_t); #else #define DPRINTF(sc, m, fmt, ...) do { (void) sc; } while (0) @@ -295,19 +295,10 @@ iwn_attach(device_t dev) } IWN_LOCK_INIT(sc); - IWN_CMD_LOCK_INIT(sc); callout_init_mtx(&sc->sc_timer_to, &sc->sc_mtx, 0); - - /* - * Create the taskqueues used by the driver. Primarily - * sc_tq handles most the task - */ - sc->sc_tq = taskqueue_create("iwn_taskq", M_NOWAIT | M_ZERO, - taskqueue_thread_enqueue, &sc->sc_tq); - taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", - device_get_nameunit(dev)); - - TASK_INIT(&sc->sc_ops_task, 0, iwn_ops, sc ); + TASK_INIT(&sc->sc_reinit_task, 0, iwn_hwreset, sc ); + TASK_INIT(&sc->sc_radioon_task, 0, iwn_radioon, sc ); + TASK_INIT(&sc->sc_radiooff_task, 0, iwn_radiooff, sc ); /* * Put adapter into a known state. @@ -473,6 +464,10 @@ iwn_cleanup(device_t dev) struct ieee80211com *ic = ifp->if_l2com; int i; + taskqueue_drain(taskqueue_swi, &sc->sc_reinit_task); + taskqueue_drain(taskqueue_swi, &sc->sc_radioon_task); + taskqueue_drain(taskqueue_swi, &sc->sc_radiooff_task); + if (ifp != NULL) { iwn_stop(sc); callout_drain(&sc->sc_timer_to); @@ -497,8 +492,6 @@ iwn_cleanup(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); if (ifp != NULL) if_free(ifp); - taskqueue_free(sc->sc_tq); - IWN_CMD_LOCK_DESTROY(sc); IWN_LOCK_DESTROY(sc); return 0; } @@ -1807,16 +1800,16 @@ iwn_intr(void *arg) device_printf(sc->sc_dev, "RF switch: radio %s\n", (tmp & IWN_GPIO_RF_ENABLED) ? "enabled" : "disabled"); if (tmp & IWN_GPIO_RF_ENABLED) - iwn_queue_cmd(sc, IWN_RADIO_ENABLE, 0, IWN_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_radioon_task); else - iwn_queue_cmd(sc, IWN_RADIO_DISABLE, 0, IWN_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_radiooff_task); } if (r1 & IWN_CT_REACHED) device_printf(sc->sc_dev, "critical temperature reached!\n"); if (r1 & (IWN_SW_ERROR | IWN_HW_ERROR)) { device_printf(sc->sc_dev, "error, INTR=%b STATUS=0x%x\n", r1, IWN_INTR_BITS, r2); - iwn_queue_cmd(sc, IWN_REINIT, 0, IWN_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_reinit_task); goto done; } if ((r1 & (IWN_RX_INTR | IWN_SW_RX_INTR)) || (r2 & IWN_RX_STATUS_INTR)) @@ -2345,7 +2338,7 @@ iwn_watchdog(struct iwn_softc *sc) struct ifnet *ifp = sc->sc_ifp; if_printf(ifp, "device timeout\n"); - iwn_queue_cmd(sc, IWN_REINIT, 0, IWN_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_reinit_task); } } @@ -4250,9 +4243,6 @@ iwn_stop_locked(struct iwn_softc *sc) IWN_WRITE(sc, IWN_INTR, 0xffffffff); IWN_WRITE(sc, IWN_INTR_STATUS, 0xffffffff); - /* Clear any commands left in the taskq command buffer */ - memset(sc->sc_cmd, 0, sizeof(sc->sc_cmd)); - /* reset all Tx rings */ for (i = 0; i < IWN_NTXQUEUES; i++) iwn_reset_tx_ring(sc, &sc->txq[i]); @@ -4364,94 +4354,36 @@ iwn_scan_mindwell(struct ieee80211_scan_ /* NB: don't try to abort scan; wait for firmware to finish */ } -/* - * Carry out work in the taskq context. - */ static void -iwn_ops(void *arg0, int pending) +iwn_hwreset(void *arg0, int pending) { struct iwn_softc *sc = arg0; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap; - int cmd, arg; - for (;;) { - IWN_CMD_LOCK(sc); - cmd = sc->sc_cmd[sc->sc_cmd_cur]; - if (cmd == 0) { - /* No more commands to process */ - IWN_CMD_UNLOCK(sc); - return; - } - if ((sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && - cmd != IWN_RADIO_ENABLE ) { - IWN_CMD_UNLOCK(sc); - return; - } - arg = sc->sc_cmd_arg[sc->sc_cmd_cur]; - sc->sc_cmd[sc->sc_cmd_cur] = 0; /* free the slot */ - sc->sc_cmd_cur = (sc->sc_cmd_cur + 1) % IWN_CMD_MAXOPS; - IWN_CMD_UNLOCK(sc); - - IWN_LOCK(sc); /* NB: sync debug printfs on smp */ - DPRINTF(sc, IWN_DEBUG_OPS, "%s: %s (cmd 0x%x)\n", - __func__, iwn_ops_str(cmd), cmd); - - vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ - switch (cmd) { - case IWN_REINIT: - IWN_UNLOCK(sc); - iwn_init(sc); - IWN_LOCK(sc); - ieee80211_notify_radio(ic, 1); - break; - case IWN_RADIO_ENABLE: - KASSERT(sc->fw_fp != NULL, - ("Fware Not Loaded, can't load from tq")); - IWN_UNLOCK(sc); - iwn_init(sc); - IWN_LOCK(sc); - break; - case IWN_RADIO_DISABLE: - ieee80211_notify_radio(ic, 0); - iwn_stop_locked(sc); - break; - } - IWN_UNLOCK(sc); - } + iwn_init(sc); + ieee80211_notify_radio(ic, 1); } -/* - * Queue a command for execution in the taskq thread. - * This is needed as the net80211 callbacks do not allow - * sleeping, since we need to sleep to confirm commands have - * been processed by the firmware, we must defer execution to - * a sleep enabled thread. - */ -static int -iwn_queue_cmd(struct iwn_softc *sc, int cmd, int arg, int clear) +static void +iwn_radioon(void *arg0, int pending) { - IWN_CMD_LOCK(sc); - if (clear) { - sc->sc_cmd[0] = cmd; - sc->sc_cmd_arg[0] = arg; - sc->sc_cmd_cur = 0; - sc->sc_cmd_next = 1; - } else { - if (sc->sc_cmd[sc->sc_cmd_next] != 0) { - IWN_CMD_UNLOCK(sc); - DPRINTF(sc, IWN_DEBUG_ANY, "%s: command %d dropped\n", - __func__, cmd); - return EBUSY; - } - sc->sc_cmd[sc->sc_cmd_next] = cmd; - sc->sc_cmd_arg[sc->sc_cmd_next] = arg; - sc->sc_cmd_next = (sc->sc_cmd_next + 1) % IWN_CMD_MAXOPS; - } - taskqueue_enqueue(sc->sc_tq, &sc->sc_ops_task); - IWN_CMD_UNLOCK(sc); - return 0; + struct iwn_softc *sc = arg0; + + iwn_init(sc); +} + +static void +iwn_radiooff(void *arg0, int pending) +{ + struct iwn_softc *sc = arg0; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + IWN_LOCK(sc); + ieee80211_notify_radio(ic, 0); + iwn_stop_locked(sc); + IWN_UNLOCK(sc); } static void @@ -4486,17 +4418,6 @@ iwn_sysctlattach(struct iwn_softc *sc) #ifdef IWN_DEBUG static const char * -iwn_ops_str(int cmd) -{ - switch (cmd) { - case IWN_RADIO_ENABLE: return "RADIO_ENABLE"; - case IWN_RADIO_DISABLE: return "RADIO_DISABLE"; - case IWN_REINIT: return "REINIT"; - } - return "UNKNOWN COMMAND"; -} - -static const char * iwn_intr_str(uint8_t cmd) { switch (cmd) { Modified: user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/iwn/if_iwnvar.h Fri Apr 17 16:15:56 2009 (r191208) @@ -180,26 +180,10 @@ struct iwn_softc { void *sc_ih; bus_size_t sc_sz; - /* command queue related variables */ -#define IWN_RADIO_ENABLE (1<<0) -#define IWN_RADIO_DISABLE (1<<1) -#define IWN_REINIT (1<<2) -#define IWN_CMD_MAXOPS 10 - /* command queuing request type */ -#define IWN_QUEUE_NORMAL 0 -#define IWN_QUEUE_CLEAR 1 - int sc_cmd[IWN_CMD_MAXOPS]; - int sc_cmd_arg[IWN_CMD_MAXOPS]; - int sc_cmd_cur; /* current queued task */ - int sc_cmd_next; /* last queued task */ - struct mtx sc_cmdlock; - - /* Task queues used to control the driver */ - struct taskqueue *sc_tq; /* Main command task queue */ - /* Tasks used by the driver */ - struct task sc_ops_task; /* deferred ops */ - struct task sc_bmiss_task; /* beacon miss */ + struct task sc_reinit_task; + struct task sc_radioon_task; + struct task sc_radiooff_task; /* Thermal calibration */ int calib_cnt; @@ -227,9 +211,3 @@ struct iwn_softc { #define IWN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define IWN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define IWN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) -#define IWN_CMD_LOCK_INIT(_sc) \ - mtx_init(&(_sc)->sc_cmdlock, device_get_nameunit((_sc)->sc_dev), \ - NULL, MTX_DEF); -#define IWN_CMD_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_cmdlock) -#define IWN_CMD_LOCK(_sc) mtx_lock(&(_sc)->sc_cmdlock) -#define IWN_CMD_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_cmdlock) Modified: user/thompsa/vaptq/sys/dev/wpi/if_wpi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/wpi/if_wpi.c Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/wpi/if_wpi.c Fri Apr 17 16:15:56 2009 (r191208) @@ -194,9 +194,7 @@ static void wpi_tx_intr(struct wpi_softc static void wpi_cmd_intr(struct wpi_softc *, struct wpi_rx_desc *); static void wpi_notif_intr(struct wpi_softc *); static void wpi_intr(void *); -static void wpi_ops(void *, int); static uint8_t wpi_plcp_signal(int); -static int wpi_queue_cmd(struct wpi_softc *, int, int, int); static void wpi_watchdog(void *); static int wpi_tx_data(struct wpi_softc *, struct mbuf *, struct ieee80211_node *, int); @@ -229,6 +227,8 @@ static int wpi_config(struct wpi_softc * static void wpi_stop_master(struct wpi_softc *); static int wpi_power_up(struct wpi_softc *); static int wpi_reset(struct wpi_softc *); +static void wpi_hwreset(void *, int); +static void wpi_rfreset(void *, int); static void wpi_hw_config(struct wpi_softc *); static void wpi_init(void *); static void wpi_init_locked(struct wpi_softc *, int); @@ -513,20 +513,11 @@ wpi_attach(device_t dev) } } - /* - * Create the taskqueues used by the driver. Primarily - * sc_tq handles most the task - */ - sc->sc_tq = taskqueue_create("wpi_taskq", M_NOWAIT | M_ZERO, - taskqueue_thread_enqueue, &sc->sc_tq); - taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", - device_get_nameunit(dev)); - /* Create the tasks that can be queued */ - TASK_INIT(&sc->sc_opstask, 0, wpi_ops, sc); + TASK_INIT(&sc->sc_restarttask, 0, wpi_hwreset, sc); + TASK_INIT(&sc->sc_radiotask, 0, wpi_rfreset, sc); WPI_LOCK_INIT(sc); - WPI_CMD_LOCK_INIT(sc); callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); @@ -730,6 +721,9 @@ wpi_detach(device_t dev) struct ieee80211com *ic = ifp->if_l2com; int ac; + taskqueue_drain(taskqueue_swi, &sc->sc_restarttask); + taskqueue_drain(taskqueue_swi, &sc->sc_radiotask); + if (ifp != NULL) { wpi_stop(sc); callout_drain(&sc->watchdog_to); @@ -767,10 +761,7 @@ wpi_detach(device_t dev) if (ifp != NULL) if_free(ifp); - taskqueue_free(sc->sc_tq); - WPI_LOCK_DESTROY(sc); - WPI_CMD_LOCK_DESTROY(sc); return 0; } @@ -1796,7 +1787,7 @@ wpi_intr(void *arg) device_printf(sc->sc_dev, "fatal firmware error\n"); DPRINTFN(6,("(%s)\n", (r & WPI_SW_ERROR) ? "(Software Error)" : "(Hardware Error)")); - wpi_queue_cmd(sc, WPI_RESTART, 0, WPI_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); sc->flags &= ~WPI_FLAG_BUSY; WPI_UNLOCK(sc); return; @@ -3187,12 +3178,6 @@ wpi_stop_locked(struct wpi_softc *sc) WPI_WRITE(sc, WPI_INTR_STATUS, 0xff); WPI_WRITE(sc, WPI_INTR_STATUS, 0x00070000); - /* Clear any commands left in the command buffer */ - memset(sc->sc_cmd, 0, sizeof(sc->sc_cmd)); - memset(sc->sc_cmd_arg, 0, sizeof(sc->sc_cmd_arg)); - sc->sc_cmd_cur = 0; - sc->sc_cmd_next = 0; - wpi_mem_lock(sc); wpi_mem_write(sc, WPI_MEM_MODE, 0); wpi_mem_unlock(sc); @@ -3561,6 +3546,7 @@ wpi_set_channel(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct wpi_softc *sc = ifp->if_softc; + int error; /* * Only need to set the channel in Monitor mode. AP scanning and auth @@ -3604,83 +3590,24 @@ wpi_scan_mindwell(struct ieee80211_scan_ /* NB: don't try to abort scan; wait for firmware to finish */ } -/** - * The ops function is called to perform some actual work. - * because we can't sleep from any of the ic callbacks, we queue an - * op task with wpi_queue_cmd and have the taskqueue process that task. - * The task that gets cued is a op task, which ends up calling this function. - */ static void -wpi_ops(void *arg0, int pending) +wpi_hwreset(void *arg, int pending) { - struct wpi_softc *sc = arg0; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - int cmd, arg, error; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct wpi_softc *sc = arg; -again: - WPI_CMD_LOCK(sc); - cmd = sc->sc_cmd[sc->sc_cmd_cur]; - arg = sc->sc_cmd_arg[sc->sc_cmd_cur]; - - if (cmd == 0) { - /* No more commands to process */ - WPI_CMD_UNLOCK(sc); - return; - } - sc->sc_cmd[sc->sc_cmd_cur] = 0; /* free the slot */ - sc->sc_cmd_arg[sc->sc_cmd_cur] = 0; /* free the slot */ - sc->sc_cmd_cur = (sc->sc_cmd_cur + 1) % WPI_CMD_MAXOPS; - WPI_CMD_UNLOCK(sc); WPI_LOCK(sc); - - DPRINTFN(WPI_DEBUG_OPS,("wpi_ops: command: %d\n", cmd)); - - switch (cmd) { - case WPI_RESTART: - wpi_init_locked(sc, 0); - - case WPI_RF_RESTART: - wpi_rfkill_resume(sc); - } + wpi_init_locked(sc, 0); WPI_UNLOCK(sc); } -/** - * queue a command for later execution in a different thread. - * This is needed as the net80211 callbacks do not allow - * sleeping, since we need to sleep to confirm commands have - * been processed by the firmware, we must defer execution to - * a sleep enabled thread. - */ -static int -wpi_queue_cmd(struct wpi_softc *sc, int cmd, int arg, int flush) +static void +wpi_rfreset(void *arg, int pending) { - WPI_CMD_LOCK(sc); - - if (flush) { - memset(sc->sc_cmd, 0, sizeof (sc->sc_cmd)); - memset(sc->sc_cmd_arg, 0, sizeof (sc->sc_cmd_arg)); - sc->sc_cmd_cur = 0; - sc->sc_cmd_next = 0; - } - - if (sc->sc_cmd[sc->sc_cmd_next] != 0) { - WPI_CMD_UNLOCK(sc); - DPRINTF(("%s: command %d dropped\n", __func__, cmd)); - return (EBUSY); - } - - sc->sc_cmd[sc->sc_cmd_next] = cmd; - sc->sc_cmd_arg[sc->sc_cmd_next] = arg; - sc->sc_cmd_next = (sc->sc_cmd_next + 1) % WPI_CMD_MAXOPS; - - taskqueue_enqueue(sc->sc_tq, &sc->sc_opstask); - - WPI_CMD_UNLOCK(sc); + struct wpi_softc *sc = arg; - return 0; + WPI_LOCK(sc); + wpi_rfkill_resume(sc); + WPI_UNLOCK(sc); } /* @@ -3725,7 +3652,7 @@ wpi_watchdog(void *arg) } device_printf(sc->sc_dev, "Hardware Switch Enabled\n"); - wpi_queue_cmd(sc, WPI_RF_RESTART, 0, WPI_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_radiotask); return; } @@ -3733,7 +3660,7 @@ wpi_watchdog(void *arg) if (--sc->sc_tx_timer == 0) { device_printf(sc->sc_dev,"device timeout\n"); ifp->if_oerrors++; - wpi_queue_cmd(sc, WPI_RESTART, 0, WPI_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); } } if (sc->sc_scan_timer > 0) { @@ -3743,7 +3670,7 @@ wpi_watchdog(void *arg) if (--sc->sc_scan_timer == 0 && vap != NULL) { device_printf(sc->sc_dev,"scan timeout\n"); ieee80211_cancel_scan(vap); - wpi_queue_cmd(sc, WPI_RESTART, 0, WPI_QUEUE_CLEAR); + taskqueue_enqueue(taskqueue_swi, &sc->sc_restarttask); } } Modified: user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h ============================================================================== --- user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h Fri Apr 17 16:07:13 2009 (r191207) +++ user/thompsa/vaptq/sys/dev/wpi/if_wpivar.h Fri Apr 17 16:15:56 2009 (r191208) @@ -144,9 +144,8 @@ struct wpi_softc { */ uint32_t flags; #define WPI_FLAG_HW_RADIO_OFF (1 << 0) -#define WPI_FLAG_SCANNING (1 << 1) -#define WPI_FLAG_BUSY (1 << 2) -#define WPI_FLAG_AUTH (1 << 3) +#define WPI_FLAG_BUSY (1 << 1) +#define WPI_FLAG_AUTH (1 << 2) /* shared area */ struct wpi_dma_info shared_dma; @@ -193,29 +192,9 @@ struct wpi_softc { /* firmware DMA transfer */ struct wpi_dma_info fw_dma; - /* command queue related variables */ -#define WPI_RESTART (1<<0) -#define WPI_RF_RESTART (1<<1) -#define WPI_CMD_MAXOPS 10 - /* command queuing request type */ -#define WPI_QUEUE_NORMAL 0 -#define WPI_QUEUE_CLEAR 1 - int sc_cmd[WPI_CMD_MAXOPS]; - int sc_cmd_arg[WPI_CMD_MAXOPS]; - int sc_cmd_cur; /* current queued scan task */ - int sc_cmd_next; /* last queued scan task */ - struct mtx sc_cmdlock; - - /* Task queues used to control the driver */ - struct taskqueue *sc_tq; /* Main command task queue */ - struct taskqueue *sc_tq2; /* firmware reset task queue */ - /* Tasks used by the driver */ - struct task sc_radioontask; /* enable rf transmitter task*/ - struct task sc_radioofftask;/* disable rf transmitter task*/ - struct task sc_opstask; /* operation handling task */ struct task sc_restarttask; /* reset firmware task */ - struct task sc_bmiss_task; /* beacon miss */ + struct task sc_radiotask; /* reset rf task */ /* Eeprom info */ uint8_t cap; @@ -232,10 +211,3 @@ struct wpi_softc { #define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) - -#define WPI_CMD_LOCK_INIT(_sc) \ - mtx_init(&(_sc)->sc_cmdlock, device_get_nameunit((_sc)->sc_dev), \ - NULL, MTX_DEF) -#define WPI_CMD_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_cmdlock) -#define WPI_CMD_LOCK(_sc) mtx_lock(&(_sc)->sc_cmdlock) -#define WPI_CMD_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_cmdlock) From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 16:52:16 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECA40106564A; Fri, 17 Apr 2009 16:52:16 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAEF28FC19; Fri, 17 Apr 2009 16:52:16 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HGqGN7028528; Fri, 17 Apr 2009 16:52:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3HGqGiK028526; Fri, 17 Apr 2009 16:52:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904171652.n3HGqGiK028526@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 16:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191211 - in user/thompsa/vaptq/sys: dev/iwi net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 16:52:17 -0000 Author: thompsa Date: Fri Apr 17 16:52:16 2009 New Revision: 191211 URL: http://svn.freebsd.org/changeset/base/191211 Log: Fix build. Modified: user/thompsa/vaptq/sys/dev/iwi/if_iwi.c user/thompsa/vaptq/sys/net80211/ieee80211_var.h Modified: user/thompsa/vaptq/sys/dev/iwi/if_iwi.c ============================================================================== --- user/thompsa/vaptq/sys/dev/iwi/if_iwi.c Fri Apr 17 16:42:57 2009 (r191210) +++ user/thompsa/vaptq/sys/dev/iwi/if_iwi.c Fri Apr 17 16:52:16 2009 (r191211) @@ -487,7 +487,6 @@ iwi_detach(device_t dev) delete_unrhdr(sc->sc_unr); IWI_LOCK_DESTROY(sc); - IWI_CMD_LOCK_DESTROY(sc); if_free(ifp); @@ -3172,7 +3171,6 @@ iwi_stop_locked(void *priv) iwi_reset_tx_ring(sc, &sc->txq[3]); iwi_reset_rx_ring(sc, &sc->rxq); - memset(sc->sc_cmd, 0, sizeof(sc->sc_cmd)); sc->sc_tx_timer = 0; sc->sc_state_timer = 0; sc->sc_busy_timer = 0; @@ -3234,7 +3232,6 @@ iwi_rfkill_poll(void *arg) * it is enabled so we must poll for the latter. */ if (!iwi_getrfkill(sc)) { - taskqueue_unblock(sc->sc_tq); taskqueue_enqueue(taskqueue_swi, &sc->sc_radiontask); return; } Modified: user/thompsa/vaptq/sys/net80211/ieee80211_var.h ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_var.h Fri Apr 17 16:42:57 2009 (r191210) +++ user/thompsa/vaptq/sys/net80211/ieee80211_var.h Fri Apr 17 16:52:16 2009 (r191211) @@ -129,6 +129,7 @@ struct ieee80211com { struct task ic_promisc_task;/* deferred promisc update */ struct task ic_mcast_task; /* deferred mcast update */ struct task ic_chan_task; /* deferred channel change */ + struct task ic_bmiss_task; /* deferred beacon miss hndlr */ uint32_t ic_flags; /* state flags */ uint32_t ic_flags_ext; /* extended state flags */ From owner-svn-src-user@FreeBSD.ORG Fri Apr 17 17:00:21 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A325106567C; Fri, 17 Apr 2009 17:00:21 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 189C58FC16; Fri, 17 Apr 2009 17:00:21 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HH0KgI028774; Fri, 17 Apr 2009 17:00:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3HH0KmN028772; Fri, 17 Apr 2009 17:00:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904171700.n3HH0KmN028772@svn.freebsd.org> From: Andrew Thompson Date: Fri, 17 Apr 2009 17:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191212 - user/thompsa/vaptq/sys/dev/usb/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 17:00:21 -0000 Author: thompsa Date: Fri Apr 17 17:00:20 2009 New Revision: 191212 URL: http://svn.freebsd.org/changeset/base/191212 Log: Pick up the driver lock in the amrr task. Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c Fri Apr 17 16:52:16 2009 (r191211) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_rum.c Fri Apr 17 17:00:20 2009 (r191212) @@ -2213,6 +2213,7 @@ rum_amrr_task(void *arg, int pending) struct ieee80211_node *ni = vap->iv_bss; int ok, fail; + RUM_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */ rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof(sc->sta)); @@ -2227,6 +2228,7 @@ rum_amrr_task(void *arg, int pending) ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */ usb2_callout_reset(&rvp->amrr_ch, hz, rum_amrr_timeout, rvp); + RUM_UNLOCK(sc); } /* ARGUSED */ Modified: user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c ============================================================================== --- user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Fri Apr 17 16:52:16 2009 (r191211) +++ user/thompsa/vaptq/sys/dev/usb/wlan/if_ural.c Fri Apr 17 17:00:20 2009 (r191212) @@ -2258,6 +2258,7 @@ ural_amrr_task(void *arg, int pending) struct ieee80211_node *ni = vap->iv_bss; int ok, fail; + RAL_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof(sc->sta)); @@ -2272,6 +2273,7 @@ ural_amrr_task(void *arg, int pending) ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */ usb2_callout_reset(&uvp->amrr_ch, hz, ural_amrr_timeout, uvp); + RAL_UNLOCK(sc); } static int