From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 03:09:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 082DE106566B; Sun, 15 Nov 2009 03:09:51 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBB6F8FC1C; Sun, 15 Nov 2009 03:09:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAF39o2t021171; Sun, 15 Nov 2009 03:09:50 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAF39oYJ021170; Sun, 15 Nov 2009 03:09:50 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911150309.nAF39oYJ021170@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 15 Nov 2009 03:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199284 - head/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 03:09:51 -0000 Author: marcel Date: Sun Nov 15 03:09:50 2009 New Revision: 199284 URL: http://svn.freebsd.org/changeset/base/199284 Log: Revert previous change and fix misalignment by using bcopy() to copy the file handle from fid_data into fh. This eliminates conditional compilation. Pointed out by: imp Modified: head/sys/nfsserver/nfs_fha.c Modified: head/sys/nfsserver/nfs_fha.c ============================================================================== --- head/sys/nfsserver/nfs_fha.c Sat Nov 14 23:35:37 2009 (r199283) +++ head/sys/nfsserver/nfs_fha.c Sun Nov 15 03:09:50 2009 (r199284) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -207,11 +206,7 @@ fha_extract_info(struct svc_req *req, st if (error) goto out; -#if _BYTE_ORDER == _LITTLE_ENDIAN - i->fh = le64dec(fh.fh_generic.fh_fid.fid_data); -#else - i->fh = be64dec(fh.fh_generic.fh_fid.fid_data); -#endif + bcopy(fh.fh_generic.fh_fid.fid_data, &i->fh, sizeof(i->fh)); /* Content ourselves with zero offset for all but reads. */ if (procnum != NFSPROC_READ) From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 11:07:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8896E106566B; Sun, 15 Nov 2009 11:07:23 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5D58FC15; Sun, 15 Nov 2009 11:07:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFB7N2C035826; Sun, 15 Nov 2009 11:07:23 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFB7NCD035825; Sun, 15 Nov 2009 11:07:23 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911151107.nAFB7NCD035825@svn.freebsd.org> From: Bruce M Simpson Date: Sun, 15 Nov 2009 11:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199287 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 11:07:23 -0000 Author: bms Date: Sun Nov 15 11:07:22 2009 New Revision: 199287 URL: http://svn.freebsd.org/changeset/base/199287 Log: Fix a functional regression in multicast. Userland daemons need to see IGMP traffic regardless of the group; omit the imo filter check if the proto is IGMP. The kernel part of IGMP will have already filtered appropriately at this point. MFC after: ASAP Submitted by: Franz Struwig Reported by: Ivor Prebeg, Franz Struwig Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Sun Nov 15 07:28:37 2009 (r199286) +++ head/sys/netinet/raw_ip.c Sun Nov 15 11:07:22 2009 (r199287) @@ -343,17 +343,35 @@ rip_input(struct mbuf *m, int off) */ if (inp->inp_moptions != NULL && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { - struct sockaddr_in group; + /* + * If the incoming datagram is for IGMP, allow it + * through unconditionally to the raw socket. + * + * In the case of IGMPv2, we may not have explicitly + * joined the group, and may have set IFF_ALLMULTI + * on the interface. imo_multi_filter() may discard + * control traffic we actually need to see. + * + * Userland multicast routing daemons should continue + * filter the control traffic appropriately. + */ int blocked; - bzero(&group, sizeof(struct sockaddr_in)); - group.sin_len = sizeof(struct sockaddr_in); - group.sin_family = AF_INET; - group.sin_addr = ip->ip_dst; - - blocked = imo_multi_filter(inp->inp_moptions, ifp, - (struct sockaddr *)&group, - (struct sockaddr *)&ripsrc); + blocked = MCAST_PASS; + if (proto != IPPROTO_IGMP) { + struct sockaddr_in group; + + bzero(&group, sizeof(struct sockaddr_in)); + group.sin_len = sizeof(struct sockaddr_in); + group.sin_family = AF_INET; + group.sin_addr = ip->ip_dst; + + blocked = imo_multi_filter(inp->inp_moptions, + ifp, + (struct sockaddr *)&group, + (struct sockaddr *)&ripsrc); + } + if (blocked != MCAST_PASS) { IPSTAT_INC(ips_notmember); continue; From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 11:30:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DD3A106566C; Sun, 15 Nov 2009 11:30:59 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A59E8FC0C; Sun, 15 Nov 2009 11:30:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFBUxXb036332; Sun, 15 Nov 2009 11:30:59 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFBUx6Y036327; Sun, 15 Nov 2009 11:30:59 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200911151130.nAFBUx6Y036327@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 15 Nov 2009 11:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199288 - in stable/8/sys: conf dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 11:30:59 -0000 Author: stas Date: Sun Nov 15 11:30:59 2009 New Revision: 199288 URL: http://svn.freebsd.org/changeset/base/199288 Log: - MFC r198320: Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not into if_bce.c anyway. It is disabled by default. Modified: stable/8/sys/conf/NOTES stable/8/sys/conf/options stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Sun Nov 15 11:07:22 2009 (r199287) +++ stable/8/sys/conf/NOTES Sun Nov 15 11:30:59 2009 (r199288) @@ -2023,6 +2023,12 @@ device lmc # only works for Tigon II chips, and has no effect for Tigon I chips. options TI_JUMBO_HDRSPLIT +# +# Use header splitting feature on bce(4) adapters. +# This may help to reduce the amount of jumbo-sized memory buffers used. +# +options BCE_JUMBO_HDRSPLIT + # These two options allow manipulating the mbuf cluster size and mbuf size, # respectively. Be very careful with NIC driver modules when changing # these from their default values, because that can potentially cause a Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Sun Nov 15 11:07:22 2009 (r199287) +++ stable/8/sys/conf/options Sun Nov 15 11:30:59 2009 (r199288) @@ -511,6 +511,7 @@ DRM_DEBUG opt_drm.h ZERO_COPY_SOCKETS opt_zero.h TI_PRIVATE_JUMBOS opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h +BCE_JUMBO_HDRSPLIT opt_bce.h # XXX Conflict: # of devices vs network protocol (Native ATM). # This makes "atm.h" unusable. Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Sun Nov 15 11:07:22 2009 (r199287) +++ stable/8/sys/dev/bce/if_bce.c Sun Nov 15 11:30:59 2009 (r199288) @@ -293,12 +293,12 @@ static void bce_dump_enet (str static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); #endif static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); #endif static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); @@ -306,7 +306,7 @@ static void bce_dump_ctx (struct bce_s static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); static void bce_dump_rx_chain (struct bce_softc *, u16, int); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); #endif static void bce_dump_status_block (struct bce_softc *); @@ -393,7 +393,7 @@ static int bce_init_rx_chain (struct b static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); @@ -602,7 +602,7 @@ bce_print_adapter_info(struct bce_softc /* Firmware version and device features. */ printf("B/C (%s); Flags (", sc->bce_bc_ver); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT printf("SPLT "); i++; #endif @@ -1066,7 +1066,7 @@ bce_attach(device_t dev) * This may change later if the MTU size is set to * something other than 1500. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sc->rx_bd_mbuf_alloc_size = MHLEN; /* Make sure offset is 16 byte aligned for hardware. */ sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - @@ -2835,7 +2835,7 @@ bce_dma_free(struct bce_softc *sc) } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* Free, unmap and destroy all page buffer descriptor chain pages. */ for (i = 0; i < PG_PAGES; i++ ) { if (sc->pg_bd_chain[i] != NULL) { @@ -2899,7 +2899,7 @@ bce_dma_free(struct bce_softc *sc) sc->rx_mbuf_tag = NULL; } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* Unload and destroy the page mbuf maps. */ for (i = 0; i < TOTAL_PG_BD; i++) { if (sc->pg_mbuf_map[i] != NULL) { @@ -3345,7 +3345,7 @@ bce_dma_alloc(device_t dev) /* * Create a DMA tag for RX mbufs. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? MCLBYTES : sc->rx_bd_mbuf_alloc_size); #else @@ -3386,7 +3386,7 @@ bce_dma_alloc(device_t dev) } } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* * Create a DMA tag for the page buffer descriptor chain, * allocate and clear the memory, and fetch the physical @@ -4473,7 +4473,7 @@ bce_stop(struct bce_softc *sc) bce_disable_intr(sc); /* Free RX buffers. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bce_free_pg_chain(sc); #endif bce_free_rx_chain(sc); @@ -4910,7 +4910,7 @@ bce_get_rx_buf(struct bce_softc *sc, str goto bce_get_rx_buf_exit); /* This is a new mbuf allocation. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT MGETHDR(m_new, M_DONTWAIT, MT_DATA); #else if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) @@ -4991,7 +4991,7 @@ bce_get_rx_buf_exit: } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Encapsulate an mbuf cluster into the page chain. */ /* */ @@ -5100,7 +5100,7 @@ bce_get_pg_buf_exit: return(rc); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* BCE_JUMBO_HDRSPLIT */ /****************************************************************************/ /* Initialize the TX context memory. */ @@ -5456,7 +5456,7 @@ bce_free_rx_chain(struct bce_softc *sc) } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Allocate memory and initialize the page data structures. */ /* Assumes that bce_init_rx_chain() has not already been called. */ @@ -5620,7 +5620,7 @@ bce_free_pg_chain(struct bce_softc *sc) DBEXIT(BCE_VERBOSE_RESET | BCE_VERBOSE_RECV | BCE_VERBOSE_UNLOAD); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* BCE_JUMBO_HDRSPLIT */ /****************************************************************************/ @@ -5793,7 +5793,7 @@ bce_rx_intr(struct bce_softc *sc) unsigned int pkt_len; u16 sw_rx_cons, sw_rx_cons_idx, hw_rx_cons; u32 status; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT unsigned int rem_len; u16 sw_pg_cons, sw_pg_cons_idx; #endif @@ -5809,7 +5809,7 @@ bce_rx_intr(struct bce_softc *sc) bus_dmamap_sync(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* Prepare the page chain pages to be accessed by the host CPU. */ for (int i = 0; i < PG_PAGES; i++) bus_dmamap_sync(sc->pg_bd_chain_tag, @@ -5821,7 +5821,7 @@ bce_rx_intr(struct bce_softc *sc) /* Get working copies of the driver's view of the consumer indices. */ sw_rx_cons = sc->rx_cons; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sw_pg_cons = sc->pg_cons; #endif @@ -5882,7 +5882,7 @@ bce_rx_intr(struct bce_softc *sc) */ m_adj(m0, sizeof(struct l2_fhdr) + ETHER_ALIGN); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* * Check whether the received frame fits in a single * mbuf or not (i.e. packet data + FCS <= @@ -6056,7 +6056,7 @@ bce_rx_int_next_rx: if (m0) { /* Make sure we don't lose our place when we release the lock. */ sc->rx_cons = sw_rx_cons; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sc->pg_cons = sw_pg_cons; #endif @@ -6066,7 +6066,7 @@ bce_rx_int_next_rx: /* Recover our place. */ sw_rx_cons = sc->rx_cons; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sw_pg_cons = sc->pg_cons; #endif } @@ -6077,7 +6077,7 @@ bce_rx_int_next_rx: } /* No new packets to process. Refill the RX and page chains and exit. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sc->pg_cons = sw_pg_cons; bce_fill_pg_chain(sc); #endif @@ -6090,7 +6090,7 @@ bce_rx_int_next_rx: bus_dmamap_sync(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT for (int i = 0; i < PG_PAGES; i++) bus_dmamap_sync(sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i], BUS_DMASYNC_PREWRITE); @@ -6336,7 +6336,7 @@ bce_init_locked(struct bce_softc *sc) * Calculate and program the hardware Ethernet MTU * size. Be generous on the receive if we have room. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT if (ifp->if_mtu <= (sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size)) ether_mtu = sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size; #else @@ -6368,7 +6368,7 @@ bce_init_locked(struct bce_softc *sc) /* Program appropriate promiscuous/multicast filtering. */ bce_set_rx_mode(sc); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT DBPRINT(sc, BCE_INFO_LOAD, "%s(): pg_bd_mbuf_alloc_size = %d\n", __FUNCTION__, sc->pg_bd_mbuf_alloc_size); @@ -6881,7 +6881,7 @@ bce_ioctl(struct ifnet *ifp, u_long comm BCE_LOCK(sc); ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* No buffer allocation size changes are necessary. */ #else /* Recalculate our buffer allocation sizes. */ @@ -7584,7 +7584,7 @@ bce_tick(void *xsc) bce_stats_update(sc); /* Top off the receive and page chains. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bce_fill_pg_chain(sc); #endif bce_fill_rx_chain(sc); @@ -7764,7 +7764,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Provides a sysctl interface to allow dumping the page chain. */ /* */ @@ -8392,7 +8392,7 @@ bce_add_sysctls(struct bce_softc *sc) (void *)sc, 0, bce_sysctl_dump_tx_chain, "I", "Dump tx_bd chain"); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "dump_pg_chain", CTLTYPE_INT | CTLFLAG_RW, (void *)sc, 0, @@ -8687,7 +8687,7 @@ bce_dump_rx_mbuf_chain(struct bce_softc } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Prints out the mbufs in the mbuf page chain. */ /* */ @@ -8811,7 +8811,7 @@ bce_dump_rxbd(struct bce_softc *sc, int } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Prints out a rx_bd structure in the page chain. */ /* */ @@ -9298,7 +9298,7 @@ bce_dump_rx_chain(struct bce_softc *sc, } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Prints out the page chain. */ /* */ @@ -9779,7 +9779,7 @@ bce_dump_driver_state(struct bce_softc * "0x%08X:%08X - (sc->rx_bd_chain) rx_bd chain virtual address\n", val_hi, val_lo); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT val_hi = BCE_ADDR_HI(sc->pg_bd_chain); val_lo = BCE_ADDR_LO(sc->pg_bd_chain); BCE_PRINTF( @@ -9799,7 +9799,7 @@ bce_dump_driver_state(struct bce_softc * "0x%08X:%08X - (sc->rx_mbuf_ptr) rx mbuf chain virtual address\n", val_hi, val_lo); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT val_hi = BCE_ADDR_HI(sc->pg_mbuf_ptr); val_lo = BCE_ADDR_LO(sc->pg_mbuf_ptr); BCE_PRINTF( @@ -9852,7 +9852,7 @@ bce_dump_driver_state(struct bce_softc * BCE_PRINTF(" 0x%08X - (sc->free_rx_bd) free rx_bd's\n", sc->free_rx_bd); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT BCE_PRINTF(" 0x%04X(0x%04X) - (sc->pg_prod) page producer index\n", sc->pg_prod, (u16) PG_CHAIN_IDX(sc->pg_prod)); @@ -10358,7 +10358,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); bce_dump_pg_chain(sc, 0, USABLE_PG_BD); Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Sun Nov 15 11:07:22 2009 (r199287) +++ stable/8/sys/dev/bce/if_bcereg.h Sun Nov 15 11:30:59 2009 (r199288) @@ -6216,7 +6216,7 @@ struct l2_fhdr { #define RX_PAGE(x) (((x) & ~USABLE_RX_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE) -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* * To accomodate jumbo frames, the page chain should * be 4 times larger than the receive chain. @@ -6238,7 +6238,7 @@ struct l2_fhdr { #define PG_PAGE(x) (((x) & ~USABLE_PG_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define PG_IDX(x) ((x) & USABLE_PG_BD_PER_PAGE) -#endif /* ZERO_COPY_SOCKETS */ +#endif /* BCE_JUMBO_HDRSPLIT */ #define CTX_INIT_RETRY_COUNT 10 @@ -6517,7 +6517,7 @@ struct bce_softc u16 tx_cons; u32 tx_prod_bseq; /* Counts the bytes used. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT u16 pg_prod; u16 pg_cons; #endif @@ -6534,7 +6534,7 @@ struct bce_softc int rx_bd_mbuf_data_len; int rx_bd_mbuf_align_pad; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT int pg_bd_mbuf_alloc_size; #endif @@ -6556,7 +6556,7 @@ struct bce_softc struct rx_bd *rx_bd_chain[RX_PAGES]; bus_addr_t rx_bd_chain_paddr[RX_PAGES]; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* H/W maintained page buffer descriptor chain structure. */ bus_dma_tag_t pg_bd_chain_tag; bus_dmamap_t pg_bd_chain_map[PG_PAGES]; @@ -6593,7 +6593,7 @@ struct bce_softc bus_dma_tag_t rx_mbuf_tag; bus_dma_tag_t tx_mbuf_tag; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bus_dma_tag_t pg_mbuf_tag; #endif @@ -6605,7 +6605,7 @@ struct bce_softc bus_dmamap_t rx_mbuf_map[TOTAL_RX_BD]; struct mbuf *rx_mbuf_ptr[TOTAL_RX_BD]; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* S/W maintained mbuf page chain structure. */ bus_dmamap_t pg_mbuf_map[TOTAL_PG_BD]; struct mbuf *pg_mbuf_ptr[TOTAL_PG_BD]; @@ -6617,7 +6617,7 @@ struct bce_softc u16 used_tx_bd; u16 max_tx_bd; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT u16 free_pg_bd; u16 max_pg_bd; #endif @@ -6705,7 +6705,7 @@ struct bce_softc int debug_tx_mbuf_alloc; int debug_rx_mbuf_alloc; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT int debug_pg_mbuf_alloc; #endif @@ -6722,7 +6722,7 @@ struct bce_softc u32 rx_low_watermark; /* Lowest number of rx_bd's free. */ u32 rx_empty_count; /* Number of times the RX chain was empty. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT u32 pg_low_watermark; /* Lowest number of pages free. */ u32 pg_empty_count; /* Number of times the page chain was empty. */ #endif From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 11:43:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 452DF1065692; Sun, 15 Nov 2009 11:43:29 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 318D58FC08; Sun, 15 Nov 2009 11:43:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFBhTrm036624; Sun, 15 Nov 2009 11:43:29 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFBhTSD036619; Sun, 15 Nov 2009 11:43:29 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200911151143.nAFBhTSD036619@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 15 Nov 2009 11:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199289 - in stable/7/sys: conf dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 11:43:29 -0000 Author: stas Date: Sun Nov 15 11:43:28 2009 New Revision: 199289 URL: http://svn.freebsd.org/changeset/base/199289 Log: - MFC r198320: Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not into if_bce.c anyway. It is disabled by default. > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. _M 7/sys M 7/sys/conf/NOTES M 7/sys/conf/options M 7/sys/dev/bce/if_bce.c M 7/sys/dev/bce/if_bcereg.h _M 7/sys/contrib/pf Modified: stable/7/sys/conf/NOTES stable/7/sys/conf/options stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Sun Nov 15 11:30:59 2009 (r199288) +++ stable/7/sys/conf/NOTES Sun Nov 15 11:43:28 2009 (r199289) @@ -1929,6 +1929,12 @@ device lmc # only works for Tigon II chips, and has no effect for Tigon I chips. options TI_JUMBO_HDRSPLIT +# +# Use header splitting feature on bce(4) adapters. +# This may help to reduce the amount of jumbo-sized memory buffers used. +# +options BCE_JUMBO_HDRSPLIT + # These two options allow manipulating the mbuf cluster size and mbuf size, # respectively. Be very careful with NIC driver modules when changing # these from their default values, because that can potentially cause a Modified: stable/7/sys/conf/options ============================================================================== --- stable/7/sys/conf/options Sun Nov 15 11:30:59 2009 (r199288) +++ stable/7/sys/conf/options Sun Nov 15 11:43:28 2009 (r199289) @@ -493,6 +493,7 @@ DRM_DEBUG opt_drm.h ZERO_COPY_SOCKETS opt_zero.h TI_PRIVATE_JUMBOS opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h +BCE_JUMBO_HDRSPLIT opt_bce.h # XXX Conflict: # of devices vs network protocol (Native ATM). # This makes "atm.h" unusable. Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Sun Nov 15 11:30:59 2009 (r199288) +++ stable/7/sys/dev/bce/if_bce.c Sun Nov 15 11:43:28 2009 (r199289) @@ -293,12 +293,12 @@ static void bce_dump_enet (str static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); #endif static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); #endif static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); @@ -306,7 +306,7 @@ static void bce_dump_ctx (struct bce_s static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); static void bce_dump_rx_chain (struct bce_softc *, u16, int); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); #endif static void bce_dump_status_block (struct bce_softc *); @@ -391,7 +391,7 @@ static int bce_init_rx_chain (struct b static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); @@ -597,7 +597,7 @@ bce_print_adapter_info(struct bce_softc /* Firmware version and device features. */ printf("B/C (0x%08X); Flags( ", sc->bce_bc_ver); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT printf("SPLT "); #endif if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) @@ -1013,7 +1013,7 @@ bce_attach(device_t dev) * This may change later if the MTU size is set to * something other than 1500. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sc->rx_bd_mbuf_alloc_size = MHLEN; /* Make sure offset is 16 byte aligned for hardware. */ sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - @@ -2753,7 +2753,7 @@ bce_dma_free(struct bce_softc *sc) } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* Free, unmap and destroy all page buffer descriptor chain pages. */ for (i = 0; i < PG_PAGES; i++ ) { if (sc->pg_bd_chain[i] != NULL) { @@ -2817,7 +2817,7 @@ bce_dma_free(struct bce_softc *sc) sc->rx_mbuf_tag = NULL; } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* Unload and destroy the page mbuf maps. */ for (i = 0; i < TOTAL_PG_BD; i++) { if (sc->pg_mbuf_map[i] != NULL) { @@ -3263,7 +3263,7 @@ bce_dma_alloc(device_t dev) /* * Create a DMA tag for RX mbufs. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? MCLBYTES : sc->rx_bd_mbuf_alloc_size); #else @@ -3304,7 +3304,7 @@ bce_dma_alloc(device_t dev) } } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* * Create a DMA tag for the page buffer descriptor chain, * allocate and clear the memory, and fetch the physical @@ -4393,7 +4393,7 @@ bce_stop(struct bce_softc *sc) bce_disable_intr(sc); /* Free RX buffers. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bce_free_pg_chain(sc); #endif bce_free_rx_chain(sc); @@ -4831,7 +4831,7 @@ bce_get_rx_buf(struct bce_softc *sc, str goto bce_get_rx_buf_exit); /* This is a new mbuf allocation. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT MGETHDR(m_new, M_DONTWAIT, MT_DATA); #else if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) @@ -4912,7 +4912,7 @@ bce_get_rx_buf_exit: } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Encapsulate an mbuf cluster into the page chain. */ /* */ @@ -5021,7 +5021,7 @@ bce_get_pg_buf_exit: return(rc); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* BCE_JUMBO_HDRSPLIT */ /****************************************************************************/ /* Initialize the TX context memory. */ @@ -5377,7 +5377,7 @@ bce_free_rx_chain(struct bce_softc *sc) } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Allocate memory and initialize the page data structures. */ /* Assumes that bce_init_rx_chain() has not already been called. */ @@ -5541,7 +5541,7 @@ bce_free_pg_chain(struct bce_softc *sc) DBEXIT(BCE_VERBOSE_RESET | BCE_VERBOSE_RECV | BCE_VERBOSE_UNLOAD); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* BCE_JUMBO_HDRSPLIT */ /****************************************************************************/ @@ -5714,7 +5714,7 @@ bce_rx_intr(struct bce_softc *sc) unsigned int pkt_len; u16 sw_rx_cons, sw_rx_cons_idx, hw_rx_cons; u32 status; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT unsigned int rem_len; u16 sw_pg_cons, sw_pg_cons_idx; #endif @@ -5730,7 +5730,7 @@ bce_rx_intr(struct bce_softc *sc) bus_dmamap_sync(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* Prepare the page chain pages to be accessed by the host CPU. */ for (int i = 0; i < PG_PAGES; i++) bus_dmamap_sync(sc->pg_bd_chain_tag, @@ -5742,7 +5742,7 @@ bce_rx_intr(struct bce_softc *sc) /* Get working copies of the driver's view of the consumer indices. */ sw_rx_cons = sc->rx_cons; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sw_pg_cons = sc->pg_cons; #endif @@ -5803,7 +5803,7 @@ bce_rx_intr(struct bce_softc *sc) */ m_adj(m0, sizeof(struct l2_fhdr) + ETHER_ALIGN); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* * Check whether the received frame fits in a single * mbuf or not (i.e. packet data + FCS <= @@ -5977,7 +5977,7 @@ bce_rx_int_next_rx: if (m0) { /* Make sure we don't lose our place when we release the lock. */ sc->rx_cons = sw_rx_cons; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sc->pg_cons = sw_pg_cons; #endif @@ -5987,7 +5987,7 @@ bce_rx_int_next_rx: /* Recover our place. */ sw_rx_cons = sc->rx_cons; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sw_pg_cons = sc->pg_cons; #endif } @@ -5998,7 +5998,7 @@ bce_rx_int_next_rx: } /* No new packets to process. Refill the RX and page chains and exit. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT sc->pg_cons = sw_pg_cons; bce_fill_pg_chain(sc); #endif @@ -6011,7 +6011,7 @@ bce_rx_int_next_rx: bus_dmamap_sync(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT for (int i = 0; i < PG_PAGES; i++) bus_dmamap_sync(sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i], BUS_DMASYNC_PREWRITE); @@ -6257,7 +6257,7 @@ bce_init_locked(struct bce_softc *sc) * Calculate and program the hardware Ethernet MTU * size. Be generous on the receive if we have room. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT if (ifp->if_mtu <= (sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size)) ether_mtu = sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size; #else @@ -6289,7 +6289,7 @@ bce_init_locked(struct bce_softc *sc) /* Program appropriate promiscuous/multicast filtering. */ bce_set_rx_mode(sc); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT DBPRINT(sc, BCE_INFO_LOAD, "%s(): pg_bd_mbuf_alloc_size = %d\n", __FUNCTION__, sc->pg_bd_mbuf_alloc_size); @@ -6802,7 +6802,7 @@ bce_ioctl(struct ifnet *ifp, u_long comm BCE_LOCK(sc); ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* No buffer allocation size changes are necessary. */ #else /* Recalculate our buffer allocation sizes. */ @@ -7505,7 +7505,7 @@ bce_tick(void *xsc) bce_stats_update(sc); /* Top off the receive and page chains. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bce_fill_pg_chain(sc); #endif bce_fill_rx_chain(sc); @@ -7685,7 +7685,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Provides a sysctl interface to allow dumping the page chain. */ /* */ @@ -8313,7 +8313,7 @@ bce_add_sysctls(struct bce_softc *sc) (void *)sc, 0, bce_sysctl_dump_tx_chain, "I", "Dump tx_bd chain"); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "dump_pg_chain", CTLTYPE_INT | CTLFLAG_RW, (void *)sc, 0, @@ -8608,7 +8608,7 @@ bce_dump_rx_mbuf_chain(struct bce_softc } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Prints out the mbufs in the mbuf page chain. */ /* */ @@ -8732,7 +8732,7 @@ bce_dump_rxbd(struct bce_softc *sc, int } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Prints out a rx_bd structure in the page chain. */ /* */ @@ -9219,7 +9219,7 @@ bce_dump_rx_chain(struct bce_softc *sc, } -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /****************************************************************************/ /* Prints out the page chain. */ /* */ @@ -9700,7 +9700,7 @@ bce_dump_driver_state(struct bce_softc * "0x%08X:%08X - (sc->rx_bd_chain) rx_bd chain virtual address\n", val_hi, val_lo); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT val_hi = BCE_ADDR_HI(sc->pg_bd_chain); val_lo = BCE_ADDR_LO(sc->pg_bd_chain); BCE_PRINTF( @@ -9720,7 +9720,7 @@ bce_dump_driver_state(struct bce_softc * "0x%08X:%08X - (sc->rx_mbuf_ptr) rx mbuf chain virtual address\n", val_hi, val_lo); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT val_hi = BCE_ADDR_HI(sc->pg_mbuf_ptr); val_lo = BCE_ADDR_LO(sc->pg_mbuf_ptr); BCE_PRINTF( @@ -9773,7 +9773,7 @@ bce_dump_driver_state(struct bce_softc * BCE_PRINTF(" 0x%08X - (sc->free_rx_bd) free rx_bd's\n", sc->free_rx_bd); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT BCE_PRINTF(" 0x%04X(0x%04X) - (sc->pg_prod) page producer index\n", sc->pg_prod, (u16) PG_CHAIN_IDX(sc->pg_prod)); @@ -10279,7 +10279,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); bce_dump_pg_chain(sc, 0, USABLE_PG_BD); Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Sun Nov 15 11:30:59 2009 (r199288) +++ stable/7/sys/dev/bce/if_bcereg.h Sun Nov 15 11:43:28 2009 (r199289) @@ -6205,7 +6205,7 @@ struct l2_fhdr { #define RX_PAGE(x) (((x) & ~USABLE_RX_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE) -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* * To accomodate jumbo frames, the page chain should * be 4 times larger than the receive chain. @@ -6227,7 +6227,7 @@ struct l2_fhdr { #define PG_PAGE(x) (((x) & ~USABLE_PG_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define PG_IDX(x) ((x) & USABLE_PG_BD_PER_PAGE) -#endif /* ZERO_COPY_SOCKETS */ +#endif /* BCE_JUMBO_HDRSPLIT */ #define CTX_INIT_RETRY_COUNT 10 @@ -6505,7 +6505,7 @@ struct bce_softc u16 tx_cons; u32 tx_prod_bseq; /* Counts the bytes used. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT u16 pg_prod; u16 pg_cons; #endif @@ -6522,7 +6522,7 @@ struct bce_softc int rx_bd_mbuf_data_len; int rx_bd_mbuf_align_pad; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT int pg_bd_mbuf_alloc_size; #endif @@ -6544,7 +6544,7 @@ struct bce_softc struct rx_bd *rx_bd_chain[RX_PAGES]; bus_addr_t rx_bd_chain_paddr[RX_PAGES]; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* H/W maintained page buffer descriptor chain structure. */ bus_dma_tag_t pg_bd_chain_tag; bus_dmamap_t pg_bd_chain_map[PG_PAGES]; @@ -6581,7 +6581,7 @@ struct bce_softc bus_dma_tag_t rx_mbuf_tag; bus_dma_tag_t tx_mbuf_tag; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT bus_dma_tag_t pg_mbuf_tag; #endif @@ -6593,7 +6593,7 @@ struct bce_softc bus_dmamap_t rx_mbuf_map[TOTAL_RX_BD]; struct mbuf *rx_mbuf_ptr[TOTAL_RX_BD]; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT /* S/W maintained mbuf page chain structure. */ bus_dmamap_t pg_mbuf_map[TOTAL_PG_BD]; struct mbuf *pg_mbuf_ptr[TOTAL_PG_BD]; @@ -6605,7 +6605,7 @@ struct bce_softc u16 used_tx_bd; u16 max_tx_bd; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT u16 free_pg_bd; u16 max_pg_bd; #endif @@ -6693,7 +6693,7 @@ struct bce_softc int debug_tx_mbuf_alloc; int debug_rx_mbuf_alloc; -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT int debug_pg_mbuf_alloc; #endif @@ -6710,7 +6710,7 @@ struct bce_softc u32 rx_low_watermark; /* Lowest number of rx_bd's free. */ u32 rx_empty_count; /* Number of times the RX chain was empty. */ -#ifdef ZERO_COPY_SOCKETS +#ifdef BCE_JUMBO_HDRSPLIT u32 pg_low_watermark; /* Lowest number of pages free. */ u32 pg_empty_count; /* Number of times the page chain was empty. */ #endif From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 11:44:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C78F6106566B; Sun, 15 Nov 2009 11:44:50 +0000 (UTC) (envelope-from stas@SpringDaemons.com) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 6F35D8FC08; Sun, 15 Nov 2009 11:44:50 +0000 (UTC) Received: from sputnik.SpringDaemons.com (unknown [78.110.48.118]) by mx0.deglitch.com (Postfix) with ESMTPA id B6B768FC4E; Sun, 15 Nov 2009 14:44:47 +0300 (MSK) Received: by sputnik.SpringDaemons.com (Postfix, from userid 1024) id B3D1FB86F; Sun, 15 Nov 2009 03:44:56 -0800 (PST) Date: Sun, 15 Nov 2009 03:44:50 -0800 From: Stanislav Sedov To: Tom Judge Message-Id: <20091115034450.18484593.stas@FreeBSD.org> In-Reply-To: <4AF08495.5040507@tomjudge.com> References: <200910211247.n9LCl9Ab099426@svn.freebsd.org> <4AF08495.5040507@tomjudge.com> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprin: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Sun__15_Nov_2009_03_44_50_-0800_OY8jK=VU7QqBQ2ks" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198320 - in head/sys: conf dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 11:44:50 -0000 --Signature=_Sun__15_Nov_2009_03_44_50_-0800_OY8jK=VU7QqBQ2ks Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 03 Nov 2009 19:29:25 +0000 Tom Judge mentioned: > Hi Stanislav, >=20 > Any chance this can be MFC'd to stable/8, stable/7 and releng/8.0? >=20 Hi, Tom! I did MFC to STABLE_7 and STABLE_8. It was not allowed to merge to RELENG as it was too late for this :-( --=20 Stanislav Sedov ST4096-RIPE --Signature=_Sun__15_Nov_2009_03_44_50_-0800_OY8jK=VU7QqBQ2ks Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iQIcBAEBAgAGBQJK/+m3AAoJEKN82nOYvCd0+9MP/R6B0CaWhugDG2Lgx4X5JNyA RoJFUYTu0GDaMb4YMGX9ylmWU6Dy0EVt5g4gb9zuQOcEP1+VReWt11zjNxGcIeSS 8c55LUsxnErME1bJ7Q6/CHdNqDoKtSXejwUgEGGDi5PWzUpS7QsvK/AZpAHnxHQs FJgmyM/rk4/KhkxRiembCW+wviP4l6875820H2b8rPKukSbcl6EjaB1rER409kj6 WBix4iqyX2iwYwFWF6+tmqRe74BWzaeYyjQ4PEufrCQV6fwcOdy3CugMrctgnlW3 6aHJiQCDyuT3yENF3b08mYN2JGJCfZTSN70Asu+iSotn6idO2VkLMJgX9RWwC4yo Ap5SJkzCdpAqFXdn8w1lkKe3ndblepfyYHylcW1b9Y3zMmThWHJBdsDiuXohPVEq 5e60nPKy13VfZBBobK75v8Zdm3J5faQzcQpRxrPWWYSS3/nNkI6VtHEtxTD/lHdc YMHDmK5MdutPCZwxg8J/gPbxKGsgQG9XE+VfHj8XhmtQhPe2NhJ/jOb/5JYo4MjK XLT4wdOaKpJVvLV9Bwc+e3g5rBovX2gLuUSxe5lrRG/paiMOUy4DJlHG9dWCun6Z jJVy7umNSBb30DT/8eWIpg0s0ErF2INmi7hmRkdfCUelpYsaJZgwRr/a5m0VgDR+ JEGkjHfeW9I8vjUAnpe6 =iUPa -----END PGP SIGNATURE----- --Signature=_Sun__15_Nov_2009_03_44_50_-0800_OY8jK=VU7QqBQ2ks-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 14:11:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D551065670; Sun, 15 Nov 2009 14:11:27 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78C8B8FC1C; Sun, 15 Nov 2009 14:11:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFEBRbq039615; Sun, 15 Nov 2009 14:11:27 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFEBRhI039614; Sun, 15 Nov 2009 14:11:27 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200911151411.nAFEBRhI039614@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 15 Nov 2009 14:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199290 - stable/8/usr.bin/systat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 14:11:27 -0000 Author: jh Date: Sun Nov 15 14:11:26 2009 New Revision: 199290 URL: http://svn.freebsd.org/changeset/base/199290 Log: MFC r197956: - Catch SIGHUP to perform cleanup before exiting. - Exit if getch() returns with an error other than EINTR. Otherwise systat(1) may get stuck in an infinite loop if it doesn't receive SIGHUP when terminal closes. - Remove attempt to clear stdio error indicators. getch() doesn't use stdio, making it useless. - Remove unneeded masking of getch() return value. PR: bin/107171 Approved by: trasz (mentor) Modified: stable/8/usr.bin/systat/keyboard.c stable/8/usr.bin/systat/main.c Directory Properties: stable/8/usr.bin/systat/ (props changed) Modified: stable/8/usr.bin/systat/keyboard.c ============================================================================== --- stable/8/usr.bin/systat/keyboard.c Sun Nov 15 11:43:28 2009 (r199289) +++ stable/8/usr.bin/systat/keyboard.c Sun Nov 15 14:11:26 2009 (r199290) @@ -39,8 +39,10 @@ __FBSDID("$FreeBSD$"); static const char sccsid[] = "@(#)keyboard.c 8.1 (Berkeley) 6/6/93"; #endif +#include #include #include +#include #include #include "systat.h" @@ -57,10 +59,11 @@ keyboard(void) move(CMDLINE, 0); do { refresh(); - ch = getch() & 0177; - if (ch == 0177 && ferror(stdin)) { - clearerr(stdin); - continue; + ch = getch(); + if (ch == ERR) { + if (errno == EINTR) + continue; + exit(1); } if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A'; Modified: stable/8/usr.bin/systat/main.c ============================================================================== --- stable/8/usr.bin/systat/main.c Sun Nov 15 11:43:28 2009 (r199289) +++ stable/8/usr.bin/systat/main.c Sun Nov 15 14:11:26 2009 (r199290) @@ -133,6 +133,7 @@ main(int argc, char **argv) exit(1); } } + signal(SIGHUP, die); signal(SIGINT, die); signal(SIGQUIT, die); signal(SIGTERM, die); From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 16:44:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ED08106566B; Sun, 15 Nov 2009 16:44:44 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2838FC12; Sun, 15 Nov 2009 16:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFGiiE9042742; Sun, 15 Nov 2009 16:44:44 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFGiiOT042741; Sun, 15 Nov 2009 16:44:44 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911151644.nAFGiiOT042741@svn.freebsd.org> From: Attilio Rao Date: Sun, 15 Nov 2009 16:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199291 - in head: lib/libdevinfo tools/tools/ncpus usr.sbin/bsnmpd/modules/snmp_hostres usr.sbin/devinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 16:44:44 -0000 Author: attilio Date: Sun Nov 15 16:44:43 2009 New Revision: 199291 URL: http://svn.freebsd.org/changeset/base/199291 Log: Collapse devinfo_state_t with device_state_t in order to avoid a structure replication and improve manteneability. Reviewed by: jhb, imp Tested by: Riccardo Torrini Modified: head/lib/libdevinfo/devinfo.h head/tools/tools/ncpus/acpi.c head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c head/usr.sbin/devinfo/devinfo.c Modified: head/lib/libdevinfo/devinfo.h ============================================================================== --- head/lib/libdevinfo/devinfo.h Sun Nov 15 14:11:26 2009 (r199290) +++ head/lib/libdevinfo/devinfo.h Sun Nov 15 16:44:43 2009 (r199291) @@ -32,20 +32,12 @@ #include #include +#include typedef __uintptr_t devinfo_handle_t; #define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0) -/* - * State of the device. - */ -/* XXX not sure if I want a copy here, or expose sys/bus.h */ -typedef enum devinfo_state { - DIS_NOTPRESENT = 10, /* not probed or probe failed */ - DIS_ALIVE = 20, /* probe succeeded */ - DIS_ATTACHED = 30, /* attach method called */ - DIS_BUSY = 40 /* device is open */ -} devinfo_state_t; +typedef enum device_state devinfo_state_t; struct devinfo_dev { devinfo_handle_t dd_handle; /* device handle */ Modified: head/tools/tools/ncpus/acpi.c ============================================================================== --- head/tools/tools/ncpus/acpi.c Sun Nov 15 14:11:26 2009 (r199290) +++ head/tools/tools/ncpus/acpi.c Sun Nov 15 16:44:43 2009 (r199291) @@ -247,13 +247,13 @@ static const char * devstate(devinfo_state_t state) { switch (state) { - case DIS_NOTPRESENT: + case DS_NOTPRESENT: return "not-present"; - case DIS_ALIVE: + case DS_ALIVE: return "alive"; - case DIS_ATTACHED: + case DS_ATTACHED: return "attached"; - case DIS_BUSY: + case DS_BUSY: return "busy"; default: return "unknown-state"; @@ -266,8 +266,8 @@ acpi0_check(struct devinfo_dev *dd, void printf("%s: %s %s\n", __func__, dd->dd_name, devstate(dd->dd_state)); /* NB: device must be present AND attached */ if (strcmp(dd->dd_name, "acpi0") == 0) - return (dd->dd_state == DIS_ATTACHED || - dd->dd_state == DIS_BUSY); + return (dd->dd_state == DS_ATTACHED || + dd->dd_state == DS_BUSY); return devinfo_foreach_device_child(dd, acpi0_check, arg); } Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c Sun Nov 15 14:11:26 2009 (r199290) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c Sun Nov 15 16:44:43 2009 (r199291) @@ -352,11 +352,11 @@ device_get_status(struct devinfo_dev *de assert(dev != NULL); switch (dev->dd_state) { - case DIS_ALIVE: /* probe succeeded */ - case DIS_NOTPRESENT: /* not probed or probe failed */ + case DS_ALIVE: /* probe succeeded */ + case DS_NOTPRESENT: /* not probed or probe failed */ return (DS_DOWN); - case DIS_ATTACHED: /* attach method called */ - case DIS_BUSY: /* device is open */ + case DS_ATTACHED: /* attach method called */ + case DS_BUSY: /* device is open */ return (DS_RUNNING); default: return (DS_UNKNOWN); Modified: head/usr.sbin/devinfo/devinfo.c ============================================================================== --- head/usr.sbin/devinfo/devinfo.c Sun Nov 15 14:11:26 2009 (r199290) +++ head/usr.sbin/devinfo/devinfo.c Sun Nov 15 16:44:43 2009 (r199291) @@ -137,7 +137,7 @@ print_device(struct devinfo_dev *dev, vo struct indent_arg ia; int i, indent; - if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DIS_ATTACHED)) { + if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DS_ATTACHED)) { indent = (int)(intptr_t)arg; for (i = 0; i < indent; i++) printf(" "); From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 18:31:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F12106568D; Sun, 15 Nov 2009 18:31:57 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B64518FC12; Sun, 15 Nov 2009 18:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFIVvP5044849; Sun, 15 Nov 2009 18:31:57 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFIVvMv044846; Sun, 15 Nov 2009 18:31:57 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911151831.nAFIVvMv044846@svn.freebsd.org> From: Rui Paulo Date: Sun, 15 Nov 2009 18:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199292 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 18:31:57 -0000 Author: rpaulo Date: Sun Nov 15 18:31:57 2009 New Revision: 199292 URL: http://svn.freebsd.org/changeset/base/199292 Log: Add atp(4) man page. Submitted by: Rohit Grover Added: head/share/man/man4/atp.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Nov 15 16:44:43 2009 (r199291) +++ head/share/man/man4/Makefile Sun Nov 15 18:31:57 2009 (r199292) @@ -44,6 +44,7 @@ MAN= aac.4 \ ath_hal.4 \ atkbd.4 \ atkbdc.4 \ + ${_atp.4} \ audit.4 \ auditpipe.4 \ aue.4 \ @@ -611,6 +612,7 @@ _acpi_wmi.4= acpi_wmi.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 +_atp.4= atp.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 @@ -642,6 +644,10 @@ _wpi.4= wpi.4 MLINKS+=lindev.4 full.4 .endif +.if ${MACHINE_ARCH} == "powerpc" +_atp.4= atp.4 +.endif + .if exists(${.CURDIR}/man4.${MACHINE_ARCH}) SUBDIR= man4.${MACHINE_ARCH} .endif Added: head/share/man/man4/atp.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/atp.4 Sun Nov 15 18:31:57 2009 (r199292) @@ -0,0 +1,180 @@ +.\" Copyright (c) 2009 Rohit Grover . +.\" 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. +.\" 3. Neither the name of the author nor the names of any co-contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" 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 November 12, 2009 +.Dt ATP 4 +.Os +.Sh NAME +.Nm atp +.Nd Apple touchpad driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device atp" +.Cd "device usb" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +atp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Apple Internal Trackpad +device found in many Apple laptops. +.Pp +The driver simulates a three\-button mouse using multi\-finger tap +detection. +. +A single\-finger tap generates a left button click; +two\-finger tap maps to the middle button; whereas a three\-finger tap +gets treated as a right button click. +. +A double\-tap followed by a drag is treated as a selection gesture; a +virtual left\-button click is assumed for the lifespan of the drag. +. +.Nm +attempts to filter away activity at the horizontal edges of the +trackpad\-\-this is to keep unintentional palm movement from being +considered as user input. +. +.Pp +.Nm +supports dynamic reconfiguration using +.Xr sysctl 8 ; +through nodes under +.Nm hw.usb.atp . +Pointer sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.atp.scale_factor . +. +.Sh HARDWARE +The +.Nm +driver provides support for the following Product IDs: +.Pp +.Bl -bullet -compact +.It +Core Duo MacBook & MacBook Pro (IDs: 0x0217, 0x0218, 0x0219) +.It +Core2 Duo MacBook & MacBook Pro (IDs: 0x021a, 0x021b, 0x021c) +.It +Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b) +.It +12 inch PowerBook and iBook (IDs: 0x030a, 0x030b) +.It +15 inch PowerBook (IDs: 0x020e, 0x020f, 0x0215) +.It +17 inch PowerBook (ID: 0x020d) +.El +.Pp +To discover the product\-id of a touchpad, search for 'Trackpad' in the +output of +.Xr lshal 1 +and look up the property +.Nm usb_device.product_id . +.Sh FILES +.Nm +creates a blocking pseudo\-device file, +.Pa /dev/atp0 , +which presents the mouse as a +.Ar sysmouse +or +.Ar mousesystems +type device\-\-see +.Xr moused 8 +for an explanation of these mouse +types. +.Xr moused 8 +can be configured to read touchpad data from +.Pa /dev/atp0 +and pass it along to the +.Xr sysmouse 4 +driver so that any process wanting to utilize mouse operation (such as +an X server) may fetch it from +.Pa /dev/sysmouse ; +alternatively, +.Pa /dev/atp0 +may be manipulated via +.Xr read 2 +and +.Xr ioctl 2 +calls to get mouse data directly. +.Sh EXAMPLES +To use a compatible Apple Trackpad as your console mouse: +.Pp +.Dl moused -p /dev/atp0 -t auto +.Pp +To launch +.Xr moused 8 +automatically upon boot, add the following to +.Pa /etc/rc.conf : +.Pp +.Dl moused_enable="YES" +.Dl moused_type="auto" +.Dl moused_port="/dev/atp0" +.Pp +If you want +.Xr moused 8 +to also probe for external USB mice or other devices, then add the +following to +.Pa /etc/rc.conf : +.Pp +.Dl moused_nondefault_enable="YES" +.Dl moused_ums0_enable="YES" +.Dl moused_ums1_enable="YES" +.Pp +To be able to use the trackpad under X, change the "Pointer" section in +.Nm xorg.conf +to the following: +.Pp +.Dl Device "/dev/atp0" +.Dl Protocol "Auto" +.Pp +Better still, if you want to be able to use the mouse in both virtual +consoles as well as in X change it to: +.Pp +.Dl Device "/dev/sysmouse" +.Dl Protocol "Auto" +.Sh SEE ALSO +.Xr sysmouse 4 , +.Xr usb 4 , +.Xr loader.conf 5 , +.Xr xorg.conf 5 Pq Pa ports/x11/xorg , +.Xr moused 8 , +.Xr sysctl 8 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Rohit Grover Aq rgrover1@gmail.com From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 19:26:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F601065676; Sun, 15 Nov 2009 19:26:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CB4C8FC1B; Sun, 15 Nov 2009 19:26:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFJQ6CJ045984; Sun, 15 Nov 2009 19:26:06 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFJQ6jf045982; Sun, 15 Nov 2009 19:26:06 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200911151926.nAFJQ6jf045982@svn.freebsd.org> From: Rick Macklem Date: Sun, 15 Nov 2009 19:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199293 - stable/8/sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 19:26:07 -0000 Author: rmacklem Date: Sun Nov 15 19:26:06 2009 New Revision: 199293 URL: http://svn.freebsd.org/changeset/base/199293 Log: MFC: r199053 Add a check for the connection being shut down to the krpc client just before queuing a request for the connection. The code already had a check for the connection being shut down while the request was queued, but not one for the shut down having been initiated by the server before the request was in the queue. This fixes some cases of problems w.r.t. reconnecting to a NFS server that drops inactive TCP connections. Tested by: Olaf Seibert, Daniel Braniss Reviewed by: dfr Modified: stable/8/sys/rpc/clnt_vc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/rpc/clnt_vc.c ============================================================================== --- stable/8/sys/rpc/clnt_vc.c Sun Nov 15 18:31:57 2009 (r199292) +++ stable/8/sys/rpc/clnt_vc.c Sun Nov 15 19:26:06 2009 (r199293) @@ -413,6 +413,22 @@ call_again: cr->cr_xid = xid; mtx_lock(&ct->ct_lock); + /* + * Check to see if the other end has already started to close down + * the connection. The upcall will have set ct_error.re_status + * to RPC_CANTRECV if this is the case. + * If the other end starts to close down the connection after this + * point, it will be detected later when cr_error is checked, + * since the request is in the ct_pending queue. + */ + if (ct->ct_error.re_status == RPC_CANTRECV) { + if (errp != &ct->ct_error) { + errp->re_errno = ct->ct_error.re_errno; + errp->re_status = RPC_CANTRECV; + } + stat = RPC_CANTRECV; + goto out; + } TAILQ_INSERT_TAIL(&ct->ct_pending, cr, cr_link); mtx_unlock(&ct->ct_lock); From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 21:35:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F4A21065672; Sun, 15 Nov 2009 21:35:53 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 9E31B8FC1C; Sun, 15 Nov 2009 21:35:51 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-8-131.flashcable.ch [91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id nAFL2NAT027454; Sun, 15 Nov 2009 22:02:23 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4B006C5F.7060306@fgznet.ch> Date: Sun, 15 Nov 2009 22:02:23 +0100 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Marcel Moolenaar References: <200911150309.nAF39oYJ021170@svn.freebsd.org> In-Reply-To: <200911150309.nAF39oYJ021170@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199284 - head/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 21:35:53 -0000 Marcel Moolenaar wrote: > Author: marcel > Date: Sun Nov 15 03:09:50 2009 > New Revision: 199284 > URL: http://svn.freebsd.org/changeset/base/199284 > > Log: > Revert previous change and fix misalignment by using bcopy() > to copy the file handle from fid_data into fh. This eliminates > conditional compilation. > > Pointed out by: imp > > Modified: > head/sys/nfsserver/nfs_fha.c Thanks Marcel, with this ci I'm able the mount my nfs exports from i386 on ppc/amd64 again. With the previous commit I was only able to mount the nfs exports from amd64 to powerpc but not from i386 to powerpc. Andreas From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 23:31:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B068D106568B; Sun, 15 Nov 2009 23:31:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 868BE8FC29; Sun, 15 Nov 2009 23:31:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFNV7v5051024; Sun, 15 Nov 2009 23:31:07 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFNV79R051022; Sun, 15 Nov 2009 23:31:07 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911152331.nAFNV79R051022@svn.freebsd.org> From: Doug Barton Date: Sun, 15 Nov 2009 23:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199299 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 23:31:07 -0000 Author: dougb Date: Sun Nov 15 23:31:07 2009 New Revision: 199299 URL: http://svn.freebsd.org/changeset/base/199299 Log: In r199127/r199152 I forgot to bump .Dd Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Nov 15 22:09:48 2009 (r199298) +++ head/share/man/man5/rc.conf.5 Sun Nov 15 23:31:07 2009 (r199299) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 23, 2009 +.Dd November 11, 2009 .Dt RC.CONF 5 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 23:48:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5A19106566C; Sun, 15 Nov 2009 23:48:29 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93EC78FC13; Sun, 15 Nov 2009 23:48:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFNmTpB051399; Sun, 15 Nov 2009 23:48:29 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFNmTc7051397; Sun, 15 Nov 2009 23:48:29 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911152348.nAFNmTc7051397@svn.freebsd.org> From: Doug Barton Date: Sun, 15 Nov 2009 23:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199300 - stable/8/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 23:48:29 -0000 Author: dougb Date: Sun Nov 15 23:48:29 2009 New Revision: 199300 URL: http://svn.freebsd.org/changeset/base/199300 Log: MFC r199127: Add a note about no hostname leading to "Amnesiac" on the console The text is inspired by the PR, but more in line with the existing text PR: docs/140434 Submitted by: Jason Helfman MFC r199152: s/a default/the default/ Submitted by: remko MFC r199299: In r199127/r199152 I forgot to bump .Dd Modified: stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Sun Nov 15 23:31:07 2009 (r199299) +++ stable/8/share/man/man5/rc.conf.5 Sun Nov 15 23:48:29 2009 (r199300) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2009 +.Dd November 11, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -351,6 +351,9 @@ If .Xr dhclient 8 is used to set the hostname via DHCP, this variable should be set to an empty string. +If this value remains unset when the system is done booting +your console login will display the default hostname of +.Dq Amnesiac. .It Va ipv6_enable .Pq Vt bool Enable support for IPv6 networking. From owner-svn-src-all@FreeBSD.ORG Sun Nov 15 23:51:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC4F110656A9; Sun, 15 Nov 2009 23:51:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA9CB8FC20; Sun, 15 Nov 2009 23:51:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFNpxYl051571; Sun, 15 Nov 2009 23:51:59 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFNpxWb051569; Sun, 15 Nov 2009 23:51:59 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911152351.nAFNpxWb051569@svn.freebsd.org> From: Doug Barton Date: Sun, 15 Nov 2009 23:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199302 - stable/7/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 23:51:59 -0000 Author: dougb Date: Sun Nov 15 23:51:59 2009 New Revision: 199302 URL: http://svn.freebsd.org/changeset/base/199302 Log: MFC r199127: Add a note about no hostname leading to "Amnesiac" on the console The text is inspired by the PR, but more in line with the existing text PR: docs/140434 Submitted by: Jason Helfman MFC r199152: s/a default/the default/ Submitted by: remko MFC r199299: In r199127/r199152 I forgot to bump .Dd Modified: stable/7/share/man/man5/rc.conf.5 (contents, props changed) Directory Properties: stable/7/share/man/man5/ (props changed) Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Sun Nov 15 23:49:28 2009 (r199301) +++ stable/7/share/man/man5/rc.conf.5 Sun Nov 15 23:51:59 2009 (r199302) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2009 +.Dd November 11, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -344,6 +344,9 @@ If .Xr dhclient 8 is used to set the hostname via DHCP, this variable should be set to an empty string. +If this value remains unset when the system is done booting +your console login will display the default hostname of +.Dq Amnesiac. .It Va ipv6_enable .Pq Vt bool Enable support for IPv6 networking. From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 03:52:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E46106568F; Mon, 16 Nov 2009 03:52:18 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4C68FC12; Mon, 16 Nov 2009 03:52:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAG3qIAO056688; Mon, 16 Nov 2009 03:52:18 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAG3qI7K056684; Mon, 16 Nov 2009 03:52:18 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911160352.nAG3qI7K056684@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 16 Nov 2009 03:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199307 - stable/8/lib/libc/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 03:52:18 -0000 Author: ume Date: Mon Nov 16 03:52:18 2009 New Revision: 199307 URL: http://svn.freebsd.org/changeset/base/199307 Log: MFC r199080, r199081, r199082: Add ja_JP.UTF-8 and ja_JP.eucJP catalogs. Added: stable/8/lib/libc/nls/ja_JP.UTF-8.msg - copied, changed from r199080, head/lib/libc/nls/ja_JP.UTF-8.msg stable/8/lib/libc/nls/ja_JP.eucJP.msg - copied, changed from r199081, head/lib/libc/nls/ja_JP.eucJP.msg Modified: stable/8/lib/libc/nls/Makefile.inc Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/nls/Makefile.inc ============================================================================== --- stable/8/lib/libc/nls/Makefile.inc Mon Nov 16 03:36:54 2009 (r199306) +++ stable/8/lib/libc/nls/Makefile.inc Mon Nov 16 03:52:18 2009 (r199307) @@ -22,6 +22,8 @@ NLS+= fi_FI.ISO8859-1 NLS+= fr_FR.ISO8859-1 NLS+= hu_HU.ISO8859-2 NLS+= it_IT.ISO8859-15 +NLS+= ja_JP.UTF-8 +NLS+= ja_JP.eucJP NLS+= ko_KR.UTF-8 NLS+= ko_KR.eucKR NLS+= mn_MN.UTF-8 Copied and modified: stable/8/lib/libc/nls/ja_JP.UTF-8.msg (from r199080, head/lib/libc/nls/ja_JP.UTF-8.msg) ============================================================================== --- head/lib/libc/nls/ja_JP.UTF-8.msg Mon Nov 9 12:28:59 2009 (r199080, copy source) +++ stable/8/lib/libc/nls/ja_JP.UTF-8.msg Mon Nov 16 03:52:18 2009 (r199307) @@ -1,6 +1,6 @@ $ $FreeBSD$ $ -$ Message catalog for C locale (template) +$ Message catalog for ja_JP.UTF-8 locale $ $ strerror() support catalog $ Copied and modified: stable/8/lib/libc/nls/ja_JP.eucJP.msg (from r199081, head/lib/libc/nls/ja_JP.eucJP.msg) ============================================================================== --- head/lib/libc/nls/ja_JP.eucJP.msg Mon Nov 9 12:33:47 2009 (r199081, copy source) +++ stable/8/lib/libc/nls/ja_JP.eucJP.msg Mon Nov 16 03:52:18 2009 (r199307) @@ -1,6 +1,6 @@ $ $FreeBSD$ $ -$ Message catalog for C locale (template) +$ Message catalog for ja_JP.eucJP locale $ $ strerror() support catalog $ From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 08:26:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0E121065672; Mon, 16 Nov 2009 08:26:56 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6D28FC14; Mon, 16 Nov 2009 08:26:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAG8QuNQ062584; Mon, 16 Nov 2009 08:26:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAG8Qu0R062582; Mon, 16 Nov 2009 08:26:56 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911160826.nAG8Qu0R062582@svn.freebsd.org> From: Christian Brueffer Date: Mon, 16 Nov 2009 08:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199314 - stable/8/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 08:26:56 -0000 Author: brueffer Date: Mon Nov 16 08:26:56 2009 New Revision: 199314 URL: http://svn.freebsd.org/changeset/base/199314 Log: MFC: r199046 Fix a copy+paste error by checking the correct variable against MM_NULLACT. Modified: stable/8/lib/libc/gen/fmtmsg.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/gen/fmtmsg.c ============================================================================== --- stable/8/lib/libc/gen/fmtmsg.c Mon Nov 16 06:12:49 2009 (r199313) +++ stable/8/lib/libc/gen/fmtmsg.c Mon Nov 16 08:26:56 2009 (r199314) @@ -128,7 +128,7 @@ printfmt(char *msgverb, long class, cons size += strlen(sevname); if (text != MM_NULLTXT) size += strlen(text); - if (text != MM_NULLACT) + if (act != MM_NULLACT) size += strlen(act); if (tag != MM_NULLTAG) size += strlen(tag); From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 08:27:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 011171065693; Mon, 16 Nov 2009 08:27:55 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E40058FC15; Mon, 16 Nov 2009 08:27:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAG8RsO3062656; Mon, 16 Nov 2009 08:27:54 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAG8RsRM062654; Mon, 16 Nov 2009 08:27:54 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911160827.nAG8RsRM062654@svn.freebsd.org> From: Christian Brueffer Date: Mon, 16 Nov 2009 08:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199315 - stable/7/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 08:27:55 -0000 Author: brueffer Date: Mon Nov 16 08:27:54 2009 New Revision: 199315 URL: http://svn.freebsd.org/changeset/base/199315 Log: MFC: r199046 Fix a copy+paste error by checking the correct variable against MM_NULLACT. Modified: stable/7/lib/libc/gen/fmtmsg.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/gen/fmtmsg.c ============================================================================== --- stable/7/lib/libc/gen/fmtmsg.c Mon Nov 16 08:26:56 2009 (r199314) +++ stable/7/lib/libc/gen/fmtmsg.c Mon Nov 16 08:27:54 2009 (r199315) @@ -128,7 +128,7 @@ printfmt(char *msgverb, long class, cons size += strlen(sevname); if (text != MM_NULLTXT) size += strlen(text); - if (text != MM_NULLACT) + if (act != MM_NULLACT) size += strlen(act); if (tag != MM_NULLTAG) size += strlen(tag); From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 08:32:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77B8B1065672; Mon, 16 Nov 2009 08:32:14 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6660A8FC12; Mon, 16 Nov 2009 08:32:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAG8WE1F062809; Mon, 16 Nov 2009 08:32:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAG8WEHb062807; Mon, 16 Nov 2009 08:32:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911160832.nAG8WEHb062807@svn.freebsd.org> From: Christian Brueffer Date: Mon, 16 Nov 2009 08:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199316 - stable/6/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 08:32:14 -0000 Author: brueffer Date: Mon Nov 16 08:32:13 2009 New Revision: 199316 URL: http://svn.freebsd.org/changeset/base/199316 Log: MFC: r199046 Fix a copy+paste error by checking the correct variable against MM_NULLACT. Modified: stable/6/lib/libc/gen/fmtmsg.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/gen/fmtmsg.c ============================================================================== --- stable/6/lib/libc/gen/fmtmsg.c Mon Nov 16 08:27:54 2009 (r199315) +++ stable/6/lib/libc/gen/fmtmsg.c Mon Nov 16 08:32:13 2009 (r199316) @@ -128,7 +128,7 @@ printfmt(char *msgverb, long class, cons size += strlen(sevname); if (text != MM_NULLTXT) size += strlen(text); - if (text != MM_NULLACT) + if (act != MM_NULLACT) size += strlen(act); if (tag != MM_NULLTAG) size += strlen(tag); From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 09:28:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 933E91065670; Mon, 16 Nov 2009 09:28:22 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 821CC8FC19; Mon, 16 Nov 2009 09:28:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAG9SMv3063937; Mon, 16 Nov 2009 09:28:22 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAG9SMwC063935; Mon, 16 Nov 2009 09:28:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911160928.nAG9SMwC063935@svn.freebsd.org> From: Christian Brueffer Date: Mon, 16 Nov 2009 09:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199317 - head/lib/libc/posix1e X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 09:28:22 -0000 Author: brueffer Date: Mon Nov 16 09:28:22 2009 New Revision: 199317 URL: http://svn.freebsd.org/changeset/base/199317 Log: Fix a memory leak in acl_from_text() in case the conversion succeeded. Submitted by: Jim Wilcoxson MFC after: 1 week Modified: head/lib/libc/posix1e/acl_from_text.c Modified: head/lib/libc/posix1e/acl_from_text.c ============================================================================== --- head/lib/libc/posix1e/acl_from_text.c Mon Nov 16 08:32:13 2009 (r199316) +++ head/lib/libc/posix1e/acl_from_text.c Mon Nov 16 09:28:22 2009 (r199317) @@ -257,6 +257,7 @@ acl_from_text(const char *buf_p) } #endif + free(mybuf_p); return(acl); error_label: From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 10:53:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3CFE1065670; Mon, 16 Nov 2009 10:53:04 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C369C8FC19; Mon, 16 Nov 2009 10:53:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGAr4v5068681; Mon, 16 Nov 2009 10:53:04 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGAr4hd068679; Mon, 16 Nov 2009 10:53:04 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200911161053.nAGAr4hd068679@svn.freebsd.org> From: Poul-Henning Kamp Date: Mon, 16 Nov 2009 10:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199319 - head/sys/amd64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 10:53:04 -0000 Author: phk Date: Mon Nov 16 10:53:04 2009 New Revision: 199319 URL: http://svn.freebsd.org/changeset/base/199319 Log: Uppercase the UL suffix on a constant, so Flexelint doesn't worry that 'u1' might have been intended. No, that does not make sense and yes I have told them. Modified: head/sys/amd64/include/param.h Modified: head/sys/amd64/include/param.h ============================================================================== --- head/sys/amd64/include/param.h Mon Nov 16 09:37:30 2009 (r199318) +++ head/sys/amd64/include/param.h Mon Nov 16 10:53:04 2009 (r199319) @@ -105,7 +105,7 @@ #define NPML4EPG (PAGE_SIZE/(sizeof (pml4_entry_t))) #define NPML4EPGSHIFT 9 /* LOG2(NPML4EPG) */ #define PML4SHIFT 39 /* LOG2(NBPML4) */ -#define NBPML4 (1ul< Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D474106566C; Mon, 16 Nov 2009 14:33:31 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C8FB8FC08; Mon, 16 Nov 2009 14:33:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGEXVgu072737; Mon, 16 Nov 2009 14:33:31 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGEXV4U072735; Mon, 16 Nov 2009 14:33:31 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911161433.nAGEXV4U072735@svn.freebsd.org> From: Christian Brueffer Date: Mon, 16 Nov 2009 14:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199320 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 14:33:31 -0000 Author: brueffer Date: Mon Nov 16 14:33:31 2009 New Revision: 199320 URL: http://svn.freebsd.org/changeset/base/199320 Log: Fix grammar. PR: 140459 Submitted by: Jeremy Huddleston MFC after: 1 week Modified: head/lib/libc/locale/nl_langinfo.3 Modified: head/lib/libc/locale/nl_langinfo.3 ============================================================================== --- head/lib/libc/locale/nl_langinfo.3 Mon Nov 16 10:53:04 2009 (r199319) +++ head/lib/libc/locale/nl_langinfo.3 Mon Nov 16 14:33:31 2009 (r199320) @@ -53,7 +53,7 @@ with a category corresponding to the cat or to the category .Dv LC_ALL , -may overwrite buffer pointed by the return value. +may overwrite the buffer pointed to by the return value. .Sh RETURN VALUES In a locale where langinfo data is not defined, .Fn nl_langinfo From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 15:18:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 926F1106566B; Mon, 16 Nov 2009 15:18:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81BED8FC23; Mon, 16 Nov 2009 15:18:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGFI2NB073569; Mon, 16 Nov 2009 15:18:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGFI26S073567; Mon, 16 Nov 2009 15:18:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911161518.nAGFI26S073567@svn.freebsd.org> From: Alexander Motin Date: Mon, 16 Nov 2009 15:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199321 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 15:18:02 -0000 Author: mav Date: Mon Nov 16 15:18:02 2009 New Revision: 199321 URL: http://svn.freebsd.org/changeset/base/199321 Log: Disable PortMultiplier Async Notifications for time of ports reset. They are useless at that time, but confuse Marvell AHCI. Add quirk for SiI57XX Port Multipliers, to hide extra port. Modified: head/sys/cam/ata/ata_pmp.c Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Mon Nov 16 14:33:31 2009 (r199320) +++ head/sys/cam/ata/ata_pmp.c Mon Nov 16 15:18:02 2009 (r199321) @@ -63,11 +63,12 @@ __FBSDID("$FreeBSD$"); typedef enum { PMP_STATE_NORMAL, PMP_STATE_PORTS, - PMP_STATE_CONFIG, + PMP_STATE_PRECONFIG, PMP_STATE_RESET, PMP_STATE_CONNECT, PMP_STATE_CHECK, PMP_STATE_CLEAR, + PMP_STATE_CONFIG, PMP_STATE_SCAN } pmp_state; @@ -436,7 +437,7 @@ pmpstart(struct cam_periph *periph, unio pmp_default_timeout * 1000); ata_pm_read_cmd(ataio, 2, 15); break; - case PMP_STATE_CONFIG: + case PMP_STATE_PRECONFIG: cam_fill_ataio(ataio, pmp_retry_count, pmpdone, @@ -445,7 +446,7 @@ pmpstart(struct cam_periph *periph, unio /*data_ptr*/NULL, /*dxfer_len*/0, pmp_default_timeout * 1000); - ata_pm_write_cmd(ataio, 0x60, 15, 0xf); + ata_pm_write_cmd(ataio, 0x60, 15, 0x0); break; case PMP_STATE_RESET: cam_fill_ataio(ataio, @@ -495,6 +496,17 @@ printf("PM RESET %d%s\n", softc->pm_step pmp_default_timeout * 1000); ata_pm_write_cmd(ataio, 1, softc->pm_step, 0xFFFFFFFF); break; + case PMP_STATE_CONFIG: + cam_fill_ataio(ataio, + pmp_retry_count, + pmpdone, + /*flags*/CAM_DIR_NONE, + 0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + pmp_default_timeout * 1000); + ata_pm_write_cmd(ataio, 0x60, 15, 0xf); + break; default: break; } @@ -554,24 +566,29 @@ pmpdone(struct cam_periph *periph, union (done_ccb->ataio.res.lba_mid << 16) + (done_ccb->ataio.res.lba_low << 8) + done_ccb->ataio.res.sector_count; - /* This PM declares 6 ports, while only 5 of them are real. + /* This PMP declares 6 ports, while only 5 of them are real. * Port 5 is enclosure management bridge port, which has implementation * problems, causing probe faults. Hide it for now. */ if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6) softc->pm_ports = 5; - /* This PM declares 7 ports, while only 5 of them are real. + /* This PMP declares 7 ports, while only 5 of them are real. * Port 5 is some fake "Config Disk" with 640 sectors size, * port 6 is enclosure management bridge port. * Both fake ports has implementation problems, causing * probe faults. Hide them for now. */ if (softc->pm_pid == 0x47261095 && softc->pm_ports == 7) softc->pm_ports = 5; + /* These PMPs declare one more port then actually have, + * for configuration purposes. Hide it for now. */ + if (softc->pm_pid == 0x57231095 || softc->pm_pid == 0x57331095 || + softc->pm_pid == 0x57341095 || softc->pm_pid == 0x57441095) + softc->pm_ports--; printf("PM ports: %d\n", softc->pm_ports); - softc->state = PMP_STATE_CONFIG; + softc->state = PMP_STATE_PRECONFIG; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; - case PMP_STATE_CONFIG: + case PMP_STATE_PRECONFIG: softc->pm_step = 0; softc->state = PMP_STATE_RESET; softc->reset |= ~softc->found; @@ -658,11 +675,15 @@ pmpdone(struct cam_periph *periph, union return; case PMP_STATE_CLEAR: softc->pm_step++; - if (softc->pm_step < softc->pm_ports) { - xpt_release_ccb(done_ccb); - xpt_schedule(periph, priority); - return; - } else if (softc->found) { + if (softc->pm_step >= softc->pm_ports) { + softc->state = PMP_STATE_CONFIG; + softc->pm_step = 0; + } + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + case PMP_STATE_CONFIG: + if (softc->found) { softc->pm_step = 0; softc->state = PMP_STATE_SCAN; work_ccb = xpt_alloc_ccb_nowait(); From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 15:38:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E13EB1065676; Mon, 16 Nov 2009 15:38:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF0EF8FC47; Mon, 16 Nov 2009 15:38:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGFcRgC074276; Mon, 16 Nov 2009 15:38:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGFcRsS074268; Mon, 16 Nov 2009 15:38:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911161538.nAGFcRsS074268@svn.freebsd.org> From: Alexander Motin Date: Mon, 16 Nov 2009 15:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199322 - in head/sys/dev: ahci ata ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 15:38:28 -0000 Author: mav Date: Mon Nov 16 15:38:27 2009 New Revision: 199322 URL: http://svn.freebsd.org/changeset/base/199322 Log: Change the way in which AHCI+PATA combined controllers, such as JMicron and Marvell handled. Instead of trying to attach two different drivers to single device, wrapping each call, make one of them (atajmicron, atamarvell) attach do device solely, but create child device for AHCI driver, passing it all required resources. It is quite easy, as none of resources are shared, except IRQ. As result, it: - makes drivers operation more independent and straitforward, - allows to use new ahci(4) driver with such devices, adding support for new features, such as PMP and NCQ, same time keeping legacy PATA support, - will allow to just drop old ataahci driver, when it's time come. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-ahci.c head/sys/dev/ata/chipsets/ata-jmicron.c head/sys/dev/ata/chipsets/ata-marvell.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ahci/ahci.c Mon Nov 16 15:38:27 2009 (r199322) @@ -99,7 +99,14 @@ MALLOC_DEFINE(M_AHCI, "AHCI driver", "AH static struct { uint32_t id; const char *name; - int flags; + int quirks; +#define AHCI_Q_NOFORCE 1 +#define AHCI_Q_NOPMP 2 +#define AHCI_Q_NONCQ 4 +#define AHCI_Q_1CH 8 +#define AHCI_Q_2CH 16 +#define AHCI_Q_4CH 32 +#define AHCI_Q_EDGEIS 64 } ahci_ids[] = { {0x43801002, "ATI IXP600", 0}, {0x43901002, "ATI IXP700", 0}, @@ -145,6 +152,15 @@ static struct { {0x3b2b8086, "Intel PCH", 0}, {0x3b2c8086, "Intel PCH", 0}, {0x3b2f8086, "Intel PCH", 0}, + {0x2361197b, "JMicron JMB361", AHCI_Q_NOFORCE}, + {0x2363197b, "JMicron JMB363", AHCI_Q_NOFORCE}, + {0x2365197b, "JMicron JMB365", AHCI_Q_NOFORCE}, + {0x2366197b, "JMicron JMB366", AHCI_Q_NOFORCE}, + {0x2368197b, "JMicron JMB368", AHCI_Q_NOFORCE}, + {0x611111ab, "Marvell 88SX6111", AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS}, + {0x612111ab, "Marvell 88SX6121", AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS}, + {0x614111ab, "Marvell 88SX6141", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, + {0x614511ab, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x044c10de, "NVIDIA MCP65", 0}, {0x044d10de, "NVIDIA MCP65", 0}, {0x044e10de, "NVIDIA MCP65", 0}, @@ -226,9 +242,39 @@ static int ahci_probe(device_t dev) { char buf[64]; + int i, valid = 0; + uint32_t devid = pci_get_devid(dev); + + /* Is this a possible AHCI candidate? */ + if (pci_get_class(dev) == PCIC_STORAGE && + pci_get_subclass(dev) == PCIS_STORAGE_SATA && + pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) + valid = 1; + /* Is this a known AHCI chip? */ + for (i = 0; ahci_ids[i].id != 0; i++) { + if (ahci_ids[i].id == devid && + (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { + snprintf(buf, sizeof(buf), "%s AHCI SATA controller", + ahci_ids[i].name); + device_set_desc_copy(dev, buf); + return (BUS_PROBE_VENDOR); + } + } + if (!valid) + return (ENXIO); + device_set_desc_copy(dev, "AHCI SATA controller"); + return (BUS_PROBE_VENDOR); +} + +static int +ahci_ata_probe(device_t dev) +{ + char buf[64]; int i; uint32_t devid = pci_get_devid(dev); + if ((intptr_t)device_get_ivars(dev) >= 0) + return (ENXIO); /* Is this a known AHCI chip? */ for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid) { @@ -238,11 +284,6 @@ ahci_probe(device_t dev) return (BUS_PROBE_VENDOR); } } - /* Is this a possible AHCI candidate? */ - if (pci_get_class(dev) != PCIC_STORAGE || - pci_get_subclass(dev) != PCIS_STORAGE_SATA || - pci_get_progif(dev) != PCIP_STORAGE_SATA_AHCI_1_0) - return (ENXIO); device_set_desc_copy(dev, "AHCI SATA controller"); return (BUS_PROBE_VENDOR); } @@ -252,10 +293,15 @@ ahci_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); device_t child; - int error, unit, speed; + int error, unit, speed, i; + uint32_t devid = pci_get_devid(dev); u_int32_t version; ctlr->dev = dev; + i = 0; + while (ahci_ids[i].id != 0 && ahci_ids[i].id != devid) + i++; + ctlr->quirks = ahci_ids[i].quirks; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); /* if we have a memory BAR(5) we are likely on an AHCI part */ @@ -282,10 +328,32 @@ ahci_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); }; - /* Get the number of HW channels */ + /* Get the HW capabilities */ + version = ATA_INL(ctlr->r_mem, AHCI_VS); + ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + if (version >= 0x00010020) + ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); + if (ctlr->quirks & AHCI_Q_1CH) { + ctlr->caps &= ~AHCI_CAP_NPMASK; + ctlr->ichannels &= 0x01; + } + if (ctlr->quirks & AHCI_Q_2CH) { + ctlr->caps &= ~AHCI_CAP_NPMASK; + ctlr->caps |= 1; + ctlr->ichannels &= 0x03; + } + if (ctlr->quirks & AHCI_Q_4CH) { + ctlr->caps &= ~AHCI_CAP_NPMASK; + ctlr->caps |= 3; + ctlr->ichannels &= 0x0f; + } ctlr->channels = MAX(flsl(ctlr->ichannels), - (ATA_INL(ctlr->r_mem, AHCI_CAP) & AHCI_CAP_NPMASK) + 1); + (ctlr->caps & AHCI_CAP_NPMASK) + 1); + if (ctlr->quirks & AHCI_Q_NOPMP) + ctlr->caps &= ~AHCI_CAP_SPM; + if (ctlr->quirks & AHCI_Q_NONCQ) + ctlr->caps &= ~AHCI_CAP_SNCQ; /* Setup interrupts. */ if (ahci_setup_interrupt(dev)) { bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); @@ -293,10 +361,6 @@ ahci_attach(device_t dev) return ENXIO; } /* Announce HW capabilities. */ - version = ATA_INL(ctlr->r_mem, AHCI_VS); - ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); - if (version >= 0x00010020) - ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); speed = (ctlr->caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT; device_printf(dev, "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s\n", @@ -531,8 +595,15 @@ ahci_intr(void *data) for (; unit < ctlr->channels; unit++) { if ((is & (1 << unit)) != 0 && (arg = ctlr->interrupt[unit].argument)) { - ctlr->interrupt[unit].function(arg); - ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + if (ctlr->quirks & AHCI_Q_EDGEIS) { + /* Some controller have edge triggered IS. */ + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + ctlr->interrupt[unit].function(arg); + } else { + /* but AHCI declares level triggered IS. */ + ctlr->interrupt[unit].function(arg); + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + } } } } @@ -665,6 +736,25 @@ static driver_t ahci_driver = { sizeof(struct ahci_controller) }; DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +static device_method_t ahci_ata_methods[] = { + DEVMETHOD(device_probe, ahci_ata_probe), + DEVMETHOD(device_attach, ahci_attach), + DEVMETHOD(device_detach, ahci_detach), + DEVMETHOD(device_suspend, ahci_suspend), + DEVMETHOD(device_resume, ahci_resume), + DEVMETHOD(bus_print_child, ahci_print_child), + DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), + DEVMETHOD(bus_release_resource, ahci_release_resource), + DEVMETHOD(bus_setup_intr, ahci_setup_intr), + DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), + { 0, 0 } +}; +static driver_t ahci_ata_driver = { + "ahci", + ahci_ata_methods, + sizeof(struct ahci_controller) +}; +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -688,6 +778,7 @@ ahci_ch_attach(device_t dev) ch->unit = (intptr_t)device_get_ivars(dev); ch->caps = ctlr->caps; ch->caps2 = ctlr->caps2; + ch->quirks = ctlr->quirks; ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); resource_int_value(device_get_name(dev), @@ -858,7 +949,7 @@ static driver_t ahcich_driver = { ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); struct ahci_dc_cb_args { bus_addr_t maddr; Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ahci/ahci.h Mon Nov 16 15:38:27 2009 (r199322) @@ -352,6 +352,7 @@ struct ahci_channel { struct cam_path *path; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ + int quirks; int numslots; /* Number of present slots */ int pm_level; /* power management level */ int sata_rev; /* Maximum allowed SATA generation */ @@ -391,6 +392,7 @@ struct ahci_controller { } irqs[16]; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ + int quirks; int numirqs; int channels; int ichannels; Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ata/ata-pci.c Mon Nov 16 15:38:27 2009 (r199322) @@ -189,91 +189,138 @@ ata_pci_resume(device_t dev) return error; } +int +ata_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +{ + + return (BUS_READ_IVAR(device_get_parent(dev), dev, which, result)); +} + +int +ata_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value) +{ + + return (BUS_WRITE_IVAR(device_get_parent(dev), dev, which, value)); +} + +uint32_t +ata_pci_read_config(device_t dev, device_t child, int reg, int width) +{ + + return (pci_read_config(dev, reg, width)); +} + +void +ata_pci_write_config(device_t dev, device_t child, int reg, + uint32_t val, int width) +{ + + pci_write_config(dev, reg, val, width); +} + struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; - struct resource *res = NULL; - int myrid; - - if (type == SYS_RES_IOPORT) { - switch (*rid) { - case ATA_IOADDR_RID: - if (controller->legacy) { - start = (unit ? ATA_SECONDARY : ATA_PRIMARY); - count = ATA_IOSIZE; - end = start + count - 1; - } - myrid = PCIR_BAR(0) + (unit << 3); - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, - start, end, count, flags); - break; - - case ATA_CTLADDR_RID: - if (controller->legacy) { - start = (unit ? ATA_SECONDARY : ATA_PRIMARY) + ATA_CTLOFFSET; - count = ATA_CTLIOSIZE; - end = start + count - 1; - } - myrid = PCIR_BAR(1) + (unit << 3); - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, - start, end, count, flags); - break; - } - } - if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { - if (controller->legacy) { - int irq = (unit == 0 ? 14 : 15); + struct ata_pci_controller *controller = device_get_softc(dev); + struct resource *res = NULL; + + if (device_get_devclass(child) == ata_devclass) { + int unit = ((struct ata_channel *)device_get_softc(child))->unit; + int myrid; + + if (type == SYS_RES_IOPORT) { + switch (*rid) { + case ATA_IOADDR_RID: + if (controller->legacy) { + start = (unit ? ATA_SECONDARY : ATA_PRIMARY); + count = ATA_IOSIZE; + end = start + count - 1; + } + myrid = PCIR_BAR(0) + (unit << 3); + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, &myrid, + start, end, count, flags); + break; + case ATA_CTLADDR_RID: + if (controller->legacy) { + start = (unit ? ATA_SECONDARY : ATA_PRIMARY) + + ATA_CTLOFFSET; + count = ATA_CTLIOSIZE; + end = start + count - 1; + } + myrid = PCIR_BAR(1) + (unit << 3); + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, &myrid, + start, end, count, flags); + break; + } + } + if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { + if (controller->legacy) { + int irq = (unit == 0 ? 14 : 15); - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, - SYS_RES_IRQ, rid, irq, irq, 1, flags); + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + SYS_RES_IRQ, rid, irq, irq, 1, flags); + } else + res = controller->r_irq; + } + } else { + if (type == SYS_RES_IRQ) { + if (*rid != ATA_IRQ_RID) + return (NULL); + res = controller->r_irq; + } else { + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + type, rid, start, end, count, flags); + } } - else - res = controller->r_irq; - } - return res; + return (res); } int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; - - if (type == SYS_RES_IOPORT) { - switch (rid) { - case ATA_IOADDR_RID: - return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, - PCIR_BAR(0) + (unit << 3), r); - break; - - case ATA_CTLADDR_RID: - return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, - PCIR_BAR(1) + (unit << 3), r); - break; - default: - return ENOENT; - } - } - if (type == SYS_RES_IRQ) { - if (rid != ATA_IRQ_RID) - return ENOENT; - if (controller->legacy) { - return BUS_RELEASE_RESOURCE(device_get_parent(dev), child, - SYS_RES_IRQ, rid, r); + if (device_get_devclass(child) == ata_devclass) { + struct ata_pci_controller *controller = device_get_softc(dev); + int unit = ((struct ata_channel *)device_get_softc(child))->unit; + + if (type == SYS_RES_IOPORT) { + switch (rid) { + case ATA_IOADDR_RID: + return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, + PCIR_BAR(0) + (unit << 3), r); + case ATA_CTLADDR_RID: + return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, + PCIR_BAR(1) + (unit << 3), r); + default: + return ENOENT; + } + } + if (type == SYS_RES_IRQ) { + if (rid != ATA_IRQ_RID) + return ENOENT; + if (controller->legacy) { + return BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + SYS_RES_IRQ, rid, r); + } else + return 0; + } + } else { + if (type == SYS_RES_IRQ) { + if (rid != ATA_IRQ_RID) + return (ENOENT); + return (0); + } else { + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + type, rid, r)); + } } - else - return 0; - } - return EINVAL; + return (EINVAL); } int @@ -281,44 +328,50 @@ ata_pci_setup_intr(device_t dev, device_ int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep) { - struct ata_pci_controller *controller = device_get_softc(dev); + struct ata_pci_controller *controller = device_get_softc(dev); - if (controller->legacy) { - return BUS_SETUP_INTR(device_get_parent(dev), child, irq, + if (controller->legacy) { + return BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags, filter, function, argument, cookiep); - } - else { - struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; + } else { + struct ata_pci_controller *controller = device_get_softc(dev); + int unit; - if (filter != NULL) { - printf("ata-pci.c: we cannot use a filter here\n"); - return (EINVAL); + if (filter != NULL) { + printf("ata-pci.c: we cannot use a filter here\n"); + return (EINVAL); + } + if (device_get_devclass(child) == ata_devclass) + unit = ((struct ata_channel *)device_get_softc(child))->unit; + else + unit = ATA_PCI_MAX_CH - 1; + controller->interrupt[unit].function = function; + controller->interrupt[unit].argument = argument; + *cookiep = controller; + return 0; } - controller->interrupt[unit].function = function; - controller->interrupt[unit].argument = argument; - *cookiep = controller; - return 0; - } } int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie) { - struct ata_pci_controller *controller = device_get_softc(dev); - - if (controller->legacy) { - return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie); - } - else { struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; - controller->interrupt[unit].function = NULL; - controller->interrupt[unit].argument = NULL; - return 0; - } + if (controller->legacy) { + return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie); + } else { + struct ata_pci_controller *controller = device_get_softc(dev); + int unit; + + if (device_get_devclass(child) == ata_devclass) + unit = ((struct ata_channel *)device_get_softc(child))->unit; + else + unit = ATA_PCI_MAX_CH - 1; + controller->interrupt[unit].function = NULL; + controller->interrupt[unit].argument = NULL; + return 0; + } } static void @@ -510,12 +563,16 @@ static device_method_t ata_pci_methods[] DEVMETHOD(device_shutdown, bus_generic_shutdown), /* bus methods */ + DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), + DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), DEVMETHOD(bus_release_resource, ata_pci_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), + DEVMETHOD(pci_read_config, ata_pci_read_config), + DEVMETHOD(pci_write_config, ata_pci_write_config), { 0, 0 } }; @@ -537,6 +594,8 @@ ata_pcichannel_probe(device_t dev) { char buffer[32]; + if ((intptr_t)device_get_ivars(dev) < 0) + return (ENXIO); sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); device_set_desc_copy(dev, buffer); @@ -711,7 +770,7 @@ ata_generic_intr(void *data) struct ata_channel *ch; int unit; - for (unit = 0; unit < ctlr->channels; unit++) { + for (unit = 0; unit < ATA_PCI_MAX_CH; unit++) { if ((ch = ctlr->interrupt[unit].argument)) ctlr->interrupt[unit].function(ch); } Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ata/ata-pci.h Mon Nov 16 15:38:27 2009 (r199322) @@ -36,6 +36,8 @@ struct ata_chip_id { char *text; }; +#define ATA_PCI_MAX_CH 8 + /* structure describing a PCI ATA controller */ struct ata_pci_controller { device_t dev; @@ -65,7 +67,7 @@ struct ata_pci_controller { struct { void (*function)(void *); void *argument; - } interrupt[8]; /* XXX SOS max ch# for now */ + } interrupt[ATA_PCI_MAX_CH]; void *chipset_data; }; @@ -486,6 +488,11 @@ int ata_pci_attach(device_t dev); int ata_pci_detach(device_t dev); int ata_pci_suspend(device_t dev); int ata_pci_resume(device_t dev); +int ata_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); +int ata_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value); +uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width); +void ata_pci_write_config(device_t dev, device_t child, int reg, + uint32_t val, int width); struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); @@ -509,12 +516,6 @@ int ata_mode2idx(int mode); /* global prototypes from chipsets/ata-*.c */ int ata_ahci_chipinit(device_t); -int ata_ahci_ch_attach(device_t dev); -int ata_ahci_ch_detach(device_t dev); -int ata_ahci_ch_suspend(device_t dev); -int ata_ahci_ch_resume(device_t dev); -int ata_ahci_ctlr_reset(device_t dev); -void ata_ahci_reset(device_t dev); int ata_marvell_edma_chipinit(device_t); int ata_sii_chipinit(device_t); @@ -530,12 +531,16 @@ static device_method_t __CONCAT(dname,_m DEVMETHOD(device_suspend, ata_pci_suspend), \ DEVMETHOD(device_resume, ata_pci_resume), \ DEVMETHOD(device_shutdown, bus_generic_shutdown), \ + DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), \ + DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), \ DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), \ DEVMETHOD(bus_release_resource, ata_pci_release_resource), \ DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), \ DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), \ DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), \ DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \ + DEVMETHOD(pci_read_config, ata_pci_read_config), \ + DEVMETHOD(pci_write_config, ata_pci_write_config), \ { 0, 0 } \ }; \ static driver_t __CONCAT(dname,_driver) = { \ Modified: head/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ahci.c Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ata/chipsets/ata-ahci.c Mon Nov 16 15:38:27 2009 (r199322) @@ -52,6 +52,12 @@ __FBSDID("$FreeBSD$"); #include /* local prototypes */ +static int ata_ahci_ch_attach(device_t dev); +static int ata_ahci_ch_detach(device_t dev); +static int ata_ahci_ch_suspend(device_t dev); +static int ata_ahci_ch_resume(device_t dev); +static int ata_ahci_ctlr_reset(device_t dev); +static void ata_ahci_reset(device_t dev); static int ata_ahci_suspend(device_t dev); static int ata_ahci_status(device_t dev); static int ata_ahci_begin_transaction(struct ata_request *request); @@ -97,6 +103,49 @@ ata_ahci_probe(device_t dev) return (BUS_PROBE_GENERIC); } +static int +ata_ahci_ata_probe(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(dev); + + if ((intptr_t)device_get_ivars(dev) >= 0) + return (ENXIO); + device_set_desc_copy(dev, "AHCI SATA controller"); + ctlr->chipinit = ata_ahci_chipinit; + return (BUS_PROBE_GENERIC); +} + +static int +ata_ahci_ata_attach(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(dev); + device_t child; + int unit; + + /* do chipset specific setups only needed once */ + ctlr->legacy = 0; + ctlr->ichannels = -1; + ctlr->ch_attach = ata_pci_ch_attach; + ctlr->ch_detach = ata_pci_ch_detach; + ctlr->dev = dev; + if (ctlr->chipinit(dev)) + return ENXIO; + /* attach all channels on this controller */ + for (unit = 0; unit < ctlr->channels; unit++) { + if ((ctlr->ichannels & (1 << unit)) == 0) + continue; + child = device_add_child(dev, "ata", + ((unit == 0 || unit == 1) && ctlr->legacy) ? + unit : devclass_find_free_unit(ata_devclass, 2)); + if (child == NULL) + device_printf(dev, "failed to add ata child device\n"); + else + device_set_ivars(child, (void *)(intptr_t)unit); + } + bus_generic_attach(dev); + return 0; +} + int ata_ahci_chipinit(device_t dev) { @@ -129,9 +178,15 @@ ata_ahci_chipinit(device_t dev) /* get the number of HW channels */ ctlr->ichannels = ATA_INL(ctlr->r_res2, ATA_AHCI_PI); - ctlr->channels = - MAX(flsl(ctlr->ichannels), + ctlr->channels = MAX(flsl(ctlr->ichannels), (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_NPMASK) + 1); + if (pci_get_devid(dev) == ATA_M88SX6111) + ctlr->channels = 1; + else if (pci_get_devid(dev) == ATA_M88SX6121) + ctlr->channels = 2; + else if (pci_get_devid(dev) == ATA_M88SX6141 || + pci_get_devid(dev) == ATA_M88SX6145) + ctlr->channels = 4; ctlr->reset = ata_ahci_reset; ctlr->ch_attach = ata_ahci_ch_attach; @@ -183,7 +238,7 @@ ata_ahci_chipinit(device_t dev) return 0; } -int +static int ata_ahci_ctlr_reset(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); @@ -228,7 +283,7 @@ ata_ahci_suspend(device_t dev) return 0; } -int +static int ata_ahci_ch_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -259,7 +314,7 @@ ata_ahci_ch_attach(device_t dev) return 0; } -int +static int ata_ahci_ch_detach(device_t dev) { @@ -268,7 +323,7 @@ ata_ahci_ch_detach(device_t dev) return (0); } -int +static int ata_ahci_ch_suspend(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -293,7 +348,7 @@ ata_ahci_ch_suspend(device_t dev) return (0); } -int +static int ata_ahci_ch_resume(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -813,7 +868,7 @@ ata_ahci_softreset(device_t dev, int por return ATA_INL(ctlr->r_res2, ATA_AHCI_P_SIG + offset); } -void +static void ata_ahci_reset(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -927,3 +982,26 @@ ata_ahci_setup_fis(struct ata_ahci_cmd_t } ATA_DECLARE_DRIVER(ata_ahci); +static device_method_t ata_ahci_ata_methods[] = { + DEVMETHOD(device_probe, ata_ahci_ata_probe), + DEVMETHOD(device_attach, ata_ahci_ata_attach), + DEVMETHOD(device_detach, ata_pci_detach), + DEVMETHOD(device_suspend, ata_pci_suspend), + DEVMETHOD(device_resume, ata_pci_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), + DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), + DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), + DEVMETHOD(bus_release_resource, ata_pci_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), + DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), + { 0, 0 } +}; +static driver_t ata_ahci_ata_driver = { + "atapci", + ata_ahci_ata_methods, + sizeof(struct ata_pci_controller) +}; +DRIVER_MODULE(ata_ahci_ata, atapci, ata_ahci_ata_driver, ata_pci_devclass, 0, 0); Modified: head/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-jmicron.c Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Mon Nov 16 15:38:27 2009 (r199322) @@ -53,11 +53,6 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_jmicron_chipinit(device_t dev); -static int ata_jmicron_ch_attach(device_t dev); -static int ata_jmicron_ch_detach(device_t dev); -static int ata_jmicron_ch_suspend(device_t dev); -static int ata_jmicron_ch_resume(device_t dev); -static void ata_jmicron_reset(device_t dev); static void ata_jmicron_setmode(device_t dev, int mode); /* @@ -70,10 +65,10 @@ ata_jmicron_probe(device_t dev) struct ata_chip_id *idx; static struct ata_chip_id ids[] = {{ ATA_JMB360, 0, 1, 0, ATA_SA300, "JMB360" }, - { ATA_JMB361, 0, 1, 1, ATA_SA300, "JMB361" }, - { ATA_JMB363, 0, 2, 1, ATA_SA300, "JMB363" }, - { ATA_JMB365, 0, 1, 2, ATA_SA300, "JMB365" }, - { ATA_JMB366, 0, 2, 2, ATA_SA300, "JMB366" }, + { ATA_JMB361, 0, 1, 1, ATA_UDMA6, "JMB361" }, + { ATA_JMB363, 0, 2, 1, ATA_UDMA6, "JMB363" }, + { ATA_JMB365, 0, 1, 2, ATA_UDMA6, "JMB365" }, + { ATA_JMB366, 0, 2, 2, ATA_UDMA6, "JMB366" }, { ATA_JMB368, 0, 0, 1, ATA_UDMA6, "JMB368" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -101,7 +96,7 @@ static int ata_jmicron_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); - int error; + device_t child; if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; @@ -123,116 +118,35 @@ ata_jmicron_chipinit(device_t dev) /* set controller configuration to a combined setup we support */ pci_write_config(dev, 0x40, 0x80c0a131, 4); pci_write_config(dev, 0x80, 0x01200000, 4); - - if (ctlr->chip->cfg1 && (error = ata_ahci_chipinit(dev))) - return error; - - ctlr->ch_attach = ata_jmicron_ch_attach; - ctlr->ch_detach = ata_jmicron_ch_detach; - ctlr->ch_suspend = ata_jmicron_ch_suspend; - ctlr->ch_resume = ata_jmicron_ch_resume; - ctlr->reset = ata_jmicron_reset; + /* Create AHCI subdevice if AHCI part present. */ + if (ctlr->chip->cfg1) { + child = device_add_child(dev, NULL, -1); + if (child != NULL) { + device_set_ivars(child, (void *)(intptr_t)-1); + bus_generic_attach(dev); + } + } + ctlr->ch_attach = ata_pci_ch_attach; + ctlr->ch_detach = ata_pci_ch_detach; + ctlr->reset = ata_generic_reset; ctlr->setmode = ata_jmicron_setmode; - - /* set the number of HW channels */ - ctlr->channels = ctlr->chip->cfg1 + ctlr->chip->cfg2; - ctlr->ichannels |= ((0xffffffffU >> (32 - ctlr->chip->cfg2)) - << ctlr->chip->cfg1); + ctlr->channels = ctlr->chip->cfg2; } return 0; } -static int -ata_jmicron_ch_attach(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error; - - if (ch->unit >= ctlr->chip->cfg1) { - ch->unit -= ctlr->chip->cfg1; - error = ata_pci_ch_attach(dev); - ch->unit += ctlr->chip->cfg1; - } - else - error = ata_ahci_ch_attach(dev); - return error; -} - -static int -ata_jmicron_ch_detach(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error; - - if (ch->unit >= ctlr->chip->cfg1) { - ch->unit -= ctlr->chip->cfg1; - error = ata_pci_ch_detach(dev); - ch->unit += ctlr->chip->cfg1; - } - else - error = ata_ahci_ch_detach(dev); - - return (error); -} - -static int -ata_jmicron_ch_suspend(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error = 0; - - if (ch->unit < ctlr->chip->cfg1) - error = ata_ahci_ch_suspend(dev); - return error; -} - -static int -ata_jmicron_ch_resume(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error = 0; - - if (ch->unit < ctlr->chip->cfg1) - error = ata_ahci_ch_resume(dev); - return (error); -} - -static void -ata_jmicron_reset(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - - if (ch->unit >= ctlr->chip->cfg1) - ata_generic_reset(dev); - else - ata_ahci_reset(dev); -} - static void ata_jmicron_setmode(device_t dev, int mode) { - struct ata_pci_controller *ctlr = device_get_softc(GRANDPARENT(dev)); - struct ata_channel *ch = device_get_softc(device_get_parent(dev)); - - if (pci_read_config(dev, 0xdf, 1) & 0x40 || ch->unit >= ctlr->chip->cfg1) { struct ata_device *atadev = device_get_softc(dev); /* check for 80pin cable present */ if (pci_read_config(dev, 0x40, 1) & 0x08) - mode = ata_limit_mode(dev, mode, ATA_UDMA2); + mode = ata_limit_mode(dev, mode, ATA_UDMA2); else - mode = ata_limit_mode(dev, mode, ATA_UDMA6); - + mode = ata_limit_mode(dev, mode, ATA_UDMA6); if (!ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode)) - atadev->mode = mode; - } - else - ata_sata_setmode(dev, mode); + atadev->mode = mode; } ATA_DECLARE_DRIVER(ata_jmicron); Modified: head/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-marvell.c Mon Nov 16 15:18:02 2009 (r199321) +++ head/sys/dev/ata/chipsets/ata-marvell.c Mon Nov 16 15:38:27 2009 (r199322) @@ -54,9 +54,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_marvell_chipinit(device_t dev); static int ata_marvell_ch_attach(device_t dev); -static int ata_marvell_ch_detach(device_t dev); static void ata_marvell_setmode(device_t dev, int mode); -static void ata_marvell_reset(device_t dev); static int ata_marvell_edma_ch_attach(device_t dev); static int ata_marvell_edma_ch_detach(device_t dev); static int ata_marvell_edma_status(device_t dev); @@ -111,10 +109,10 @@ ata_marvell_probe(device_t dev) { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" }, { ATA_M88SX6101, 0, 0, MV_61XX, ATA_UDMA6, "88SX6101" }, { ATA_M88SX6102, 0, 0, MV_61XX, ATA_UDMA6, "88SX6102" }, - { ATA_M88SX6111, 0, 1, MV_61XX, ATA_SA300, "88SX6111" }, - { ATA_M88SX6121, 0, 2, MV_61XX, ATA_SA300, "88SX6121" }, - { ATA_M88SX6141, 0, 4, MV_61XX, ATA_SA300, "88SX6141" }, - { ATA_M88SX6145, 0, 4, MV_61XX, ATA_SA300, "88SX6145" }, + { ATA_M88SX6111, 0, 1, MV_61XX, ATA_UDMA6, "88SX6111" }, + { ATA_M88SX6121, 0, 2, MV_61XX, ATA_UDMA6, "88SX6121" }, + { ATA_M88SX6141, 0, 4, MV_61XX, ATA_UDMA6, "88SX6141" }, + { ATA_M88SX6145, 0, 4, MV_61XX, ATA_UDMA6, "88SX6145" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_MARVELL_ID) @@ -142,83 +140,50 @@ ata_marvell_probe(device_t dev) static int ata_marvell_chipinit(device_t dev) { - struct ata_pci_controller *ctlr = device_get_softc(dev); - int error = 0; - - if (ata_setup_interrupt(dev, ata_generic_intr)) - return ENXIO; + struct ata_pci_controller *ctlr = device_get_softc(dev); + device_t child; - if (ctlr->chip->cfg1 && (error = ata_ahci_chipinit(dev))) - return (error); - ctlr->ch_attach = ata_marvell_ch_attach; - ctlr->ch_detach = ata_marvell_ch_detach; - ctlr->reset = ata_marvell_reset; - ctlr->setmode = ata_marvell_setmode; - ctlr->channels = ctlr->chip->cfg1 + 1; - return (0); + if (ata_setup_interrupt(dev, ata_generic_intr)) + return ENXIO; + /* Create AHCI subdevice if AHCI part present. */ + if (ctlr->chip->cfg1) { + child = device_add_child(dev, NULL, -1); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 18:28:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 971B01065676; Mon, 16 Nov 2009 18:28:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81A1E8FC1A; Mon, 16 Nov 2009 18:28:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGISgxn077761; Mon, 16 Nov 2009 18:28:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGISgfC077730; Mon, 16 Nov 2009 18:28:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911161828.nAGISgfC077730@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 16 Nov 2009 18:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199323 - in vendor-sys/acpica/dist: . compiler debugger dispatcher events executer include namespace parser tools/acpiexec tools/acpisrc tools/acpixtract utilities X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 18:28:42 -0000 Author: jkim Date: Mon Nov 16 18:28:41 2009 New Revision: 199323 URL: http://svn.freebsd.org/changeset/base/199323 Log: Import ACPICA 20091112. Added: vendor-sys/acpica/dist/namespace/nsrepair2.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/compiler/aslcompile.c vendor-sys/acpica/dist/compiler/aslerror.c vendor-sys/acpica/dist/compiler/asllookup.c vendor-sys/acpica/dist/compiler/asloperands.c vendor-sys/acpica/dist/compiler/asltransform.c vendor-sys/acpica/dist/compiler/asltypes.h vendor-sys/acpica/dist/debugger/dbcmds.c vendor-sys/acpica/dist/debugger/dbexec.c vendor-sys/acpica/dist/debugger/dbstats.c vendor-sys/acpica/dist/dispatcher/dsinit.c vendor-sys/acpica/dist/dispatcher/dsmthdat.c vendor-sys/acpica/dist/dispatcher/dsobject.c vendor-sys/acpica/dist/events/evgpeblk.c vendor-sys/acpica/dist/events/evregion.c vendor-sys/acpica/dist/executer/exconfig.c vendor-sys/acpica/dist/executer/exconvrt.c vendor-sys/acpica/dist/executer/exfield.c vendor-sys/acpica/dist/executer/exoparg1.c vendor-sys/acpica/dist/executer/exoparg6.c vendor-sys/acpica/dist/executer/exregion.c vendor-sys/acpica/dist/include/acconfig.h vendor-sys/acpica/dist/include/acmacros.h vendor-sys/acpica/dist/include/acnamesp.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/acutils.h vendor-sys/acpica/dist/namespace/nsdump.c vendor-sys/acpica/dist/namespace/nsdumpdv.c vendor-sys/acpica/dist/namespace/nseval.c vendor-sys/acpica/dist/namespace/nsinit.c vendor-sys/acpica/dist/namespace/nspredef.c vendor-sys/acpica/dist/namespace/nsrepair.c vendor-sys/acpica/dist/namespace/nswalk.c vendor-sys/acpica/dist/namespace/nsxfeval.c vendor-sys/acpica/dist/parser/psloop.c vendor-sys/acpica/dist/parser/psparse.c vendor-sys/acpica/dist/parser/psxface.c vendor-sys/acpica/dist/tools/acpiexec/Makefile vendor-sys/acpica/dist/tools/acpisrc/astable.c vendor-sys/acpica/dist/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/utilities/utmisc.c vendor-sys/acpica/dist/utilities/utobject.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/changes.txt Mon Nov 16 18:28:41 2009 (r199323) @@ -1,4 +1,77 @@ ---------------------------------------- +12 November 2009. Summary of changes for version 20091112: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Implemented a post-order callback to AcpiWalkNamespace. The existing +interface only has a pre-order callback. This change adds an additional +parameter for a post-order callback which will be more useful for bus scans. +ACPICA BZ 779. Lin Ming. Updated the ACPICA Programmer Reference. + +Modified the behavior of the operation region memory mapping cache for +SystemMemory. Ensure that the memory mappings created for operation regions +do not cross 4K page boundaries. Crossing a page boundary while mapping +regions can cause kernel warnings on some hosts if the pages have different +attributes. Such regions are probably BIOS bugs, and this is the workaround. +Linux BZ 14445. Lin Ming. + +Implemented an automatic repair for predefined methods that must return +sorted lists. This change will repair (by sorting) packages returned by _ALR, +_PSS, and _TSS. Drivers can now assume that the packages are correctly sorted +and do not contain NULL package elements. Adds one new file, +namespace/nsrepair2.c. ACPICA BZ 784. Lin Ming, Bob Moore. + +Fixed a possible fault during predefined name validation if a return Package +object contains NULL elements. Also adds a warning if a NULL element is +followed by any non-null elements. ACPICA BZ 813, 814. Future enhancement may +include repair or removal of all such NULL elements where possible. + +Implemented additional module-level executable AML code support. This change +will execute module-level code that is not at the root of the namespace +(under a Device object, etc.) at table load time. Module-level executable AML +code has been illegal since ACPI 2.0. ACPICA BZ 762. Lin Ming. + +Implemented a new internal function to create Integer objects. This function +simplifies miscellaneous object creation code. ACPICA BZ 823. + +Reduced the severity of predefined repair messages, Warning to Info. Since +the object was successfully repaired, a warning is too severe. Reduced to an +info message for now. These messages may eventually be changed to debug-only. +ACPICA BZ 812. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 85.8K Code, 18.0K Data, 103.8K Total + Debug Version: 161.8K Code, 50.6K Data, 212.4K Total + Current Release: + Non-Debug Version: 86.6K Code, 18.2K Data, 104.8K Total + Debug Version: 162.7K Code, 50.8K Data, 213.5K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented Switch() with While(1) so that Break works correctly. This +change correctly implements the Switch operator with a surrounding While(1) +so that the Break operator works as expected. ACPICA BZ 461. Lin Ming. + +iASL: Added a message if a package initializer list is shorter than package +length. Adds a new remark for a Package() declaration if an initializer list +exists, but is shorter than the declared length of the package. Although +technically legal, this is probably a coding error and it is seen in the +field. ACPICA BZ 815. Lin Ming, Bob Moore. + +iASL: Fixed a problem where the compiler could fault after the maximum number +of errors was reached (200). + +acpixtract: Fixed a possible warning for pointer cast if the compiler warning +level set very high. + +---------------------------------------- 13 October 2009. Summary of changes for version 20091013: This release is available at www.acpica.org/downloads Modified: vendor-sys/acpica/dist/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompile.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/compiler/aslcompile.c Mon Nov 16 18:28:41 2009 (r199323) @@ -895,13 +895,6 @@ CmCleanupAndExit ( 10) / Gbl_NsLookupCount); } - /* Close all open files */ - - for (i = 2; i < ASL_MAX_FILE_TYPE; i++) - { - FlCloseFile (i); - } - /* * TBD: SourceOutput should be .TMP, then rename if we want to keep it? */ @@ -923,6 +916,13 @@ CmCleanupAndExit ( } UtDisplaySummary (ASL_FILE_STDOUT); + + /* Close all open files */ + + for (i = 2; i < ASL_MAX_FILE_TYPE; i++) + { + FlCloseFile (i); + } } Modified: vendor-sys/acpica/dist/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslerror.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/compiler/aslerror.c Mon Nov 16 18:28:41 2009 (r199323) @@ -535,6 +535,7 @@ AslCommonError ( Gbl_NextError = Gbl_ErrorLog; CmDoOutputFiles (); CmCleanupAndExit (); + exit(1); } return; Modified: vendor-sys/acpica/dist/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asllookup.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/compiler/asllookup.c Mon Nov 16 18:28:41 2009 (r199323) @@ -526,7 +526,7 @@ LsDisplayNamespace ( /* Walk entire namespace from the root */ Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject, + ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject, NULL, NULL, NULL); /* Print the full pathname for each namespace node */ @@ -534,7 +534,7 @@ LsDisplayNamespace ( FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n"); Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, LsDoOnePathname, + ACPI_UINT32_MAX, FALSE, LsDoOnePathname, NULL, NULL, NULL); return (Status); @@ -598,7 +598,7 @@ LkObjectExists ( /* Walk entire namespace from the supplied root */ Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, LsCompareOneNamespaceObject, + ACPI_UINT32_MAX, FALSE, LsCompareOneNamespaceObject, NULL, Name, NULL); if (Status == AE_CTRL_TRUE) { @@ -753,7 +753,7 @@ LkFindUnreferencedObjects ( /* Walk entire namespace from the supplied root */ (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, LkIsObjectUsed, + ACPI_UINT32_MAX, FALSE, LkIsObjectUsed, NULL, NULL, NULL); } Modified: vendor-sys/acpica/dist/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asloperands.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/compiler/asloperands.c Mon Nov 16 18:28:41 2009 (r199323) @@ -788,20 +788,30 @@ OpnDoPackage ( if ((PackageLengthOp->Asl.ParseOpcode == PARSEOP_INTEGER) || (PackageLengthOp->Asl.ParseOpcode == PARSEOP_QWORDCONST)) { - if (PackageLengthOp->Asl.Value.Integer >= PackageLength) + if (PackageLengthOp->Asl.Value.Integer > PackageLength) { - /* Allow package to be longer than the initializer list */ + /* + * Allow package length to be longer than the initializer + * list -- but if the length of initializer list is nonzero, + * issue a message since this is probably a coding error, + * even though technically legal. + */ + if (PackageLength > 0) + { + AslError (ASL_REMARK, ASL_MSG_LIST_LENGTH_SHORT, + PackageLengthOp, NULL); + } PackageLength = (UINT32) PackageLengthOp->Asl.Value.Integer; } - else + else if (PackageLengthOp->Asl.Value.Integer < PackageLength) { /* - * Initializer list is longer than the package length. This - * is an error as per the ACPI spec. + * The package length is smaller than the length of the + * initializer list. This is an error as per the ACPI spec. */ - AslError (ASL_ERROR, ASL_MSG_LIST_LENGTH, - PackageLengthOp->Asl.Next, NULL); + AslError (ASL_ERROR, ASL_MSG_LIST_LENGTH_LONG, + PackageLengthOp, NULL); } } Modified: vendor-sys/acpica/dist/compiler/asltransform.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asltransform.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/compiler/asltransform.c Mon Nov 16 18:28:41 2009 (r199323) @@ -468,6 +468,8 @@ TrDoSwitch ( ACPI_PARSE_OBJECT *NewOp; ACPI_PARSE_OBJECT *NewOp2; ACPI_PARSE_OBJECT *MethodOp; + ACPI_PARSE_OBJECT *StoreOp; + ACPI_PARSE_OBJECT *BreakOp; char *PredicateValueName; UINT16 Index; UINT32 Btype; @@ -638,11 +640,7 @@ TrDoSwitch ( */ if (CurrentParentNode == StartNode) { - Conditional->Asl.Parent = CurrentParentNode->Asl.Parent; - - /* Link IF into the peer list */ - - TrAmlInsertPeer (CurrentParentNode, Conditional); + Conditional->Asl.Next = NULL; } else { @@ -695,6 +693,7 @@ TrDoSwitch ( { return; } + TrAmlInitNode (DefaultOp, PARSEOP_ELSE); DefaultOp->Asl.Parent = Conditional->Asl.Parent; @@ -799,22 +798,44 @@ TrDoSwitch ( TrAmlSetSubtreeParent (NewOp2, NewOp); /* - * Transform the Switch() into a Store() node which will be used to save the + * Transform the Switch() into a While(One)-Break node. + * And create a Store() node which will be used to save the * Switch() value. The store is of the form: Store (Value, _T_x) * where _T_x is the temp variable. */ - TrAmlInitNode (StartNode, PARSEOP_STORE); - StartNode->Asl.Child = NULL; + TrAmlInitNode (StartNode, PARSEOP_WHILE); + NewOp = TrCreateLeafNode (PARSEOP_ONE); + NewOp->Asl.Next = Predicate->Asl.Next; + NewOp->Asl.Parent = StartNode; + StartNode->Asl.Child = NewOp; + + /* Create a Store() node */ + + StoreOp = TrCreateLeafNode (PARSEOP_STORE); + StoreOp->Asl.Parent = StartNode; + TrAmlInsertPeer (NewOp, StoreOp); /* Complete the Store subtree */ - StartNode->Asl.Child = Predicate; - Predicate->Asl.Parent = StartNode; + StoreOp->Asl.Child = Predicate; + Predicate->Asl.Parent = StoreOp; NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); - NewOp->Asl.Parent = StartNode; + NewOp->Asl.Parent = StoreOp; Predicate->Asl.Next = NewOp; + + /* Create a Break() node and insert it into the end of While() */ + + Conditional = StartNode->Asl.Child; + while (Conditional->Asl.Next) + { + Conditional = Conditional->Asl.Next; + } + + BreakOp = TrCreateLeafNode (PARSEOP_BREAK); + BreakOp->Asl.Parent = StartNode; + TrAmlInsertPeer (Conditional, BreakOp); } Modified: vendor-sys/acpica/dist/compiler/asltypes.h ============================================================================== --- vendor-sys/acpica/dist/compiler/asltypes.h Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/compiler/asltypes.h Mon Nov 16 18:28:41 2009 (r199323) @@ -369,7 +369,8 @@ typedef enum ASL_MSG_INVALID_TIME, ASL_MSG_INVALID_TYPE, ASL_MSG_INVALID_UUID, - ASL_MSG_LIST_LENGTH, + ASL_MSG_LIST_LENGTH_LONG, + ASL_MSG_LIST_LENGTH_SHORT, ASL_MSG_LISTING_FILE_OPEN, ASL_MSG_LISTING_FILENAME, ASL_MSG_LOCAL_INIT, @@ -488,7 +489,8 @@ char *AslMessages /* ASL_MSG_INVALID_TIME */ "Time parameter too long (255 max)", /* ASL_MSG_INVALID_TYPE */ "Invalid type", /* ASL_MSG_INVALID_UUID */ "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"", -/* ASL_MSG_LIST_LENGTH */ "Initializer list too long", +/* ASL_MSG_LIST_LENGTH_LONG */ "Initializer list longer than declared package length", +/* ASL_MSG_LIST_LENGTH_SHORT */ "Initializer list shorter than declared package length", /* ASL_MSG_LISTING_FILE_OPEN */ "Could not open listing file", /* ASL_MSG_LISTING_FILENAME */ "Could not create listing filename", /* ASL_MSG_LOCAL_INIT */ "Method local variable is not initialized", Modified: vendor-sys/acpica/dist/debugger/dbcmds.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbcmds.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/debugger/dbcmds.c Mon Nov 16 18:28:41 2009 (r199323) @@ -383,7 +383,7 @@ AcpiDbFindReferences ( /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbWalkForReferences, (void *) ObjDesc, NULL); + AcpiDbWalkForReferences, NULL, (void *) ObjDesc, NULL); } @@ -475,7 +475,7 @@ AcpiDbCheckPredefinedNames ( /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbWalkForPredefinedNames, (void *) &Count, NULL); + AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL); AcpiOsPrintf ("Found %d predefined names in the namespace\n", Count); } @@ -617,7 +617,7 @@ AcpiDbBatchExecute ( /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbWalkForExecute, (void *) &Info, NULL); + AcpiDbWalkForExecute, NULL, (void *) &Info, NULL); AcpiOsPrintf ("Executed %d predefined names in the namespace\n", Info.Count); } @@ -1161,15 +1161,13 @@ AcpiDbSetMethodData ( /* Create and initialize the new object */ - ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ObjDesc = AcpiUtCreateIntegerObject ((UINT64) Value); if (!ObjDesc) { AcpiOsPrintf ("Could not create an internal object\n"); return; } - ObjDesc->Integer.Value = Value; - /* Store the new object into the target */ switch (Type) @@ -1321,7 +1319,7 @@ AcpiDbDisplayObjects ( /* Walk the namespace from the root */ (void) AcpiWalkNamespace (Type, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbWalkForSpecificObjects, (void *) &Info, NULL); + AcpiDbWalkForSpecificObjects, NULL, (void *) &Info, NULL); AcpiOsPrintf ( "\nFound %u objects of type [%s] in the current ACPI Namespace\n", @@ -1437,7 +1435,7 @@ AcpiDbFindNameInNamespace ( /* Walk the namespace from the root */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbWalkAndMatchName, AcpiName, NULL); + AcpiDbWalkAndMatchName, NULL, AcpiName, NULL); AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); return (AE_OK); @@ -1938,7 +1936,7 @@ AcpiDbCheckIntegrity ( /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbIntegrityWalk, (void *) &Info, NULL); + AcpiDbIntegrityWalk, NULL, (void *) &Info, NULL); AcpiOsPrintf ("Verified %d namespace nodes with %d Objects\n", Info.Nodes, Info.Objects); @@ -2125,7 +2123,7 @@ AcpiDbGetBusInfo ( /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbBusWalk, NULL, NULL); + AcpiDbBusWalk, NULL, NULL, NULL); } #endif /* ACPI_DEBUGGER */ Modified: vendor-sys/acpica/dist/debugger/dbexec.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbexec.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/debugger/dbexec.c Mon Nov 16 18:28:41 2009 (r199323) @@ -453,7 +453,7 @@ AcpiDbExecute ( if (*Name == '*') { (void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL); + ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL); return; } else Modified: vendor-sys/acpica/dist/debugger/dbstats.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbstats.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/debugger/dbstats.c Mon Nov 16 18:28:41 2009 (r199323) @@ -446,7 +446,7 @@ AcpiDbCountNamespaceObjects ( } (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL); + ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL); } Modified: vendor-sys/acpica/dist/dispatcher/dsinit.c ============================================================================== --- vendor-sys/acpica/dist/dispatcher/dsinit.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/dispatcher/dsinit.c Mon Nov 16 18:28:41 2009 (r199323) @@ -283,7 +283,7 @@ AcpiDsInitializeObjects ( * the namespace reader lock. */ Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX, - ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, &Info, NULL); + ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace")); Modified: vendor-sys/acpica/dist/dispatcher/dsmthdat.c ============================================================================== --- vendor-sys/acpica/dist/dispatcher/dsmthdat.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/dispatcher/dsmthdat.c Mon Nov 16 18:28:41 2009 (r199323) @@ -524,13 +524,12 @@ AcpiDsMethodDataGetValue ( if (AcpiGbl_EnableInterpreterSlack) { - Object = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + Object = AcpiUtCreateIntegerObject ((UINT64) 0); if (!Object) { return_ACPI_STATUS (AE_NO_MEMORY); } - Object->Integer.Value = 0; Node->Object = Object; } Modified: vendor-sys/acpica/dist/dispatcher/dsobject.c ============================================================================== --- vendor-sys/acpica/dist/dispatcher/dsobject.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/dispatcher/dsobject.c Mon Nov 16 18:28:41 2009 (r199323) @@ -574,7 +574,7 @@ AcpiDsBuildInternalPackageObj ( * * Note: technically, this is an error, from ACPI spec: "It is an error * for NumElements to be less than the number of elements in the - * PackageList". However, we just print an error message and + * PackageList". However, we just print a message and * no exception is returned. This provides Windows compatibility. Some * BIOSs will alter the NumElements on the fly, creating this type * of ill-formed package object. @@ -598,8 +598,8 @@ AcpiDsBuildInternalPackageObj ( Arg = Arg->Common.Next; } - ACPI_ERROR ((AE_INFO, - "Package List length (0x%X) larger than NumElements count (0x%X), truncated\n", + ACPI_INFO ((AE_INFO, + "Actual Package length (0x%X) is larger than NumElements field (0x%X), truncated\n", i, ElementCount)); } else if (i < ElementCount) Modified: vendor-sys/acpica/dist/events/evgpeblk.c ============================================================================== --- vendor-sys/acpica/dist/events/evgpeblk.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/events/evgpeblk.c Mon Nov 16 18:28:41 2009 (r199323) @@ -1110,7 +1110,7 @@ AcpiEvCreateGpeBlock ( Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice, ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK, - AcpiEvSaveMethodInfo, GpeBlock, NULL); + AcpiEvSaveMethodInfo, NULL, GpeBlock, NULL); /* Return the new block */ @@ -1192,7 +1192,7 @@ AcpiEvInitializeGpeBlock ( Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK, - AcpiEvMatchPrwAndGpe, &GpeInfo, NULL); + AcpiEvMatchPrwAndGpe, NULL, &GpeInfo, NULL); } /* Modified: vendor-sys/acpica/dist/events/evregion.c ============================================================================== --- vendor-sys/acpica/dist/events/evregion.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/events/evregion.c Mon Nov 16 18:28:41 2009 (r199323) @@ -400,25 +400,21 @@ AcpiEvExecuteRegMethod ( * connection status 1 for connecting the handler, 0 for disconnecting * the handler (Passed as a parameter) */ - Args[0] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + Args[0] = AcpiUtCreateIntegerObject ((UINT64) RegionObj->Region.SpaceId); if (!Args[0]) { Status = AE_NO_MEMORY; goto Cleanup1; } - Args[1] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + Args[1] = AcpiUtCreateIntegerObject ((UINT64) Function); if (!Args[1]) { Status = AE_NO_MEMORY; goto Cleanup2; } - /* Setup the parameter objects */ - - Args[0]->Integer.Value = RegionObj->Region.SpaceId; - Args[1]->Integer.Value = Function; - Args[2] = NULL; + Args[2] = NULL; /* Terminate list */ /* Execute the method, no return value */ @@ -1173,7 +1169,7 @@ AcpiEvInstallSpaceHandler ( * of the branch */ Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX, - ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler, + ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler, NULL, HandlerObj, NULL); UnlockAndExit: @@ -1213,7 +1209,7 @@ AcpiEvExecuteRegMethods ( * regions of this Space ID before we can run any _REG methods) */ Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX, - ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, + ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL, &SpaceId, NULL); return_ACPI_STATUS (Status); Modified: vendor-sys/acpica/dist/executer/exconfig.c ============================================================================== --- vendor-sys/acpica/dist/executer/exconfig.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/executer/exconfig.c Mon Nov 16 18:28:41 2009 (r199323) @@ -263,15 +263,13 @@ AcpiExLoadTableOp ( /* Table not found, return an Integer=0 and AE_OK */ - DdbHandle = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + DdbHandle = AcpiUtCreateIntegerObject ((UINT64) 0); if (!DdbHandle) { return_ACPI_STATUS (AE_NO_MEMORY); } - DdbHandle->Integer.Value = 0; *ReturnDesc = DdbHandle; - return_ACPI_STATUS (AE_OK); } Modified: vendor-sys/acpica/dist/executer/exconvrt.c ============================================================================== --- vendor-sys/acpica/dist/executer/exconvrt.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/executer/exconvrt.c Mon Nov 16 18:28:41 2009 (r199323) @@ -260,7 +260,7 @@ AcpiExConvertToInteger ( /* Create a new integer */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject (Result); if (!ReturnDesc) { return_ACPI_STATUS (AE_NO_MEMORY); @@ -271,7 +271,6 @@ AcpiExConvertToInteger ( /* Save the Result */ - ReturnDesc->Integer.Value = Result; AcpiExTruncateFor32bitTable (ReturnDesc); *ResultDesc = ReturnDesc; return_ACPI_STATUS (AE_OK); Modified: vendor-sys/acpica/dist/executer/exfield.c ============================================================================== --- vendor-sys/acpica/dist/executer/exfield.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/executer/exfield.c Mon Nov 16 18:28:41 2009 (r199323) @@ -249,14 +249,13 @@ AcpiExReadDataFromField ( { /* Field will fit within an Integer (normal case) */ - BufferDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + BufferDesc = AcpiUtCreateIntegerObject ((UINT64) 0); if (!BufferDesc) { return_ACPI_STATUS (AE_NO_MEMORY); } Length = AcpiGbl_IntegerByteWidth; - BufferDesc->Integer.Value = 0; Buffer = &BufferDesc->Integer.Value; } Modified: vendor-sys/acpica/dist/executer/exoparg1.c ============================================================================== --- vendor-sys/acpica/dist/executer/exoparg1.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/executer/exoparg1.c Mon Nov 16 18:28:41 2009 (r199323) @@ -183,13 +183,12 @@ AcpiExOpcode_0A_0T_1R ( /* Create a return object of type Integer */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject (AcpiOsGetTimer ()); if (!ReturnDesc) { Status = AE_NO_MEMORY; goto Cleanup; } - ReturnDesc->Integer.Value = AcpiOsGetTimer (); break; default: /* Unknown opcode */ @@ -733,7 +732,7 @@ AcpiExOpcode_1A_0T_1R ( { case AML_LNOT_OP: /* LNot (Operand) */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) 0); if (!ReturnDesc) { Status = AE_NO_MEMORY; @@ -838,14 +837,12 @@ AcpiExOpcode_1A_0T_1R ( /* Allocate a descriptor to hold the type. */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) Type); if (!ReturnDesc) { Status = AE_NO_MEMORY; goto Cleanup; } - - ReturnDesc->Integer.Value = Type; break; @@ -917,14 +914,12 @@ AcpiExOpcode_1A_0T_1R ( * Now that we have the size of the object, create a result * object to hold the value */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject (Value); if (!ReturnDesc) { Status = AE_NO_MEMORY; goto Cleanup; } - - ReturnDesc->Integer.Value = Value; break; @@ -1089,21 +1084,18 @@ AcpiExOpcode_1A_0T_1R ( * NOTE: index into a buffer is NOT a pointer to a * sub-buffer of the main buffer, it is only a pointer to a * single element (byte) of the buffer! + * + * Since we are returning the value of the buffer at the + * indexed location, we don't need to add an additional + * reference to the buffer itself. */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) + TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]); if (!ReturnDesc) { Status = AE_NO_MEMORY; goto Cleanup; } - - /* - * Since we are returning the value of the buffer at the - * indexed location, we don't need to add an additional - * reference to the buffer itself. - */ - ReturnDesc->Integer.Value = - TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]; break; Modified: vendor-sys/acpica/dist/executer/exoparg6.c ============================================================================== --- vendor-sys/acpica/dist/executer/exoparg6.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/executer/exoparg6.c Mon Nov 16 18:28:41 2009 (r199323) @@ -344,8 +344,9 @@ AcpiExOpcode_6A_0T_1R ( } /* Create an integer for the return value */ + /* Default return value is ACPI_INTEGER_MAX if no match found */ - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); + ReturnDesc = AcpiUtCreateIntegerObject (ACPI_INTEGER_MAX); if (!ReturnDesc) { Status = AE_NO_MEMORY; @@ -353,10 +354,6 @@ AcpiExOpcode_6A_0T_1R ( } - /* Default return value if no match found */ - - ReturnDesc->Integer.Value = ACPI_INTEGER_MAX; - /* * Examine each element until a match is found. Both match conditions * must be satisfied for a match to occur. Within the loop, Modified: vendor-sys/acpica/dist/executer/exregion.c ============================================================================== --- vendor-sys/acpica/dist/executer/exregion.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/executer/exregion.c Mon Nov 16 18:28:41 2009 (r199323) @@ -157,7 +157,8 @@ AcpiExSystemMemorySpaceHandler ( void *LogicalAddrPtr = NULL; ACPI_MEM_SPACE_CONTEXT *MemInfo = RegionContext; UINT32 Length; - ACPI_SIZE WindowSize; + ACPI_SIZE MapLength; + ACPI_SIZE PageBoundaryMapLength; #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED UINT32 Remainder; #endif @@ -227,26 +228,45 @@ AcpiExSystemMemorySpaceHandler ( } /* - * Don't attempt to map memory beyond the end of the region, and - * constrain the maximum mapping size to something reasonable. + * October 2009: Attempt to map from the requested address to the + * end of the region. However, we will never map more than one + * page, nor will we cross a page boundary. */ - WindowSize = (ACPI_SIZE) + MapLength = (ACPI_SIZE) ((MemInfo->Address + MemInfo->Length) - Address); - if (WindowSize > ACPI_SYSMEM_REGION_WINDOW_SIZE) + /* + * If mapping the entire remaining portion of the region will cross + * a page boundary, just map up to the page boundary, do not cross. + * On some systems, crossing a page boundary while mapping regions + * can cause warnings if the pages have different attributes + * due to resource management. + * + * This has the added benefit of constraining a single mapping to + * one page, which is similar to the original code that used a 4k + * maximum window. + */ + PageBoundaryMapLength = + ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address; + if (PageBoundaryMapLength == 0) + { + PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE; + } + + if (MapLength > PageBoundaryMapLength) { - WindowSize = ACPI_SYSMEM_REGION_WINDOW_SIZE; + MapLength = PageBoundaryMapLength; } /* Create a new mapping starting at the address given */ MemInfo->MappedLogicalAddress = AcpiOsMapMemory ( - (ACPI_PHYSICAL_ADDRESS) Address, WindowSize); + (ACPI_PHYSICAL_ADDRESS) Address, MapLength); if (!MemInfo->MappedLogicalAddress) { ACPI_ERROR ((AE_INFO, "Could not map memory at %8.8X%8.8X, size %X", - ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) WindowSize)); + ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength)); MemInfo->MappedLength = 0; return_ACPI_STATUS (AE_NO_MEMORY); } @@ -254,7 +274,7 @@ AcpiExSystemMemorySpaceHandler ( /* Save the physical address and mapping size */ MemInfo->MappedPhysicalAddress = Address; - MemInfo->MappedLength = WindowSize; + MemInfo->MappedLength = MapLength; } /* Modified: vendor-sys/acpica/dist/include/acconfig.h ============================================================================== --- vendor-sys/acpica/dist/include/acconfig.h Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/include/acconfig.h Mon Nov 16 18:28:41 2009 (r199323) @@ -177,9 +177,9 @@ #define ACPI_MAX_REFERENCE_COUNT 0x800 -/* Size of cached memory mapping for system memory operation region */ +/* Default page size for use in mapping memory for operation regions */ -#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 +#define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ /* OwnerId tracking. 8 entries allows for 255 OwnerIds */ Modified: vendor-sys/acpica/dist/include/acmacros.h ============================================================================== --- vendor-sys/acpica/dist/include/acmacros.h Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/include/acmacros.h Mon Nov 16 18:28:41 2009 (r199323) @@ -403,6 +403,7 @@ #define ACPI_ERROR_NAMESPACE(s, e) AcpiNsReportError (AE_INFO, s, e); #define ACPI_ERROR_METHOD(s, n, p, e) AcpiNsReportMethodError (AE_INFO, s, n, p, e); #define ACPI_WARN_PREDEFINED(plist) AcpiUtPredefinedWarning plist +#define ACPI_INFO_PREDEFINED(plist) AcpiUtPredefinedInfo plist #else @@ -411,6 +412,7 @@ #define ACPI_ERROR_NAMESPACE(s, e) #define ACPI_ERROR_METHOD(s, n, p, e) #define ACPI_WARN_PREDEFINED(plist) +#define ACPI_INFO_PREDEFINED(plist) #endif /* ACPI_NO_ERROR_MESSAGES */ Modified: vendor-sys/acpica/dist/include/acnamesp.h ============================================================================== --- vendor-sys/acpica/dist/include/acnamesp.h Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/include/acnamesp.h Mon Nov 16 18:28:41 2009 (r199323) @@ -189,7 +189,8 @@ AcpiNsWalkNamespace ( ACPI_HANDLE StartObject, UINT32 MaxDepth, UINT32 Flags, - ACPI_WALK_CALLBACK UserFunction, + ACPI_WALK_CALLBACK PreOrderVisit, + ACPI_WALK_CALLBACK PostOrderVisit, void *Context, void **ReturnValue); @@ -428,7 +429,8 @@ AcpiNsGetAttachedData ( /* - * nsrepair - return object repair for predefined methods/objects + * nsrepair - General return object repair for all + * predefined methods/objects */ ACPI_STATUS AcpiNsRepairObject ( @@ -444,6 +446,18 @@ AcpiNsRepairPackageList ( /* + * nsrepair2 - Return object repair for specific + * predefined methods/objects + */ +ACPI_STATUS +AcpiNsComplexRepairs ( + ACPI_PREDEFINED_DATA *Data, + ACPI_NAMESPACE_NODE *Node, + ACPI_STATUS ValidateStatus, + ACPI_OPERAND_OBJECT **ReturnObjectPtr); + + +/* * nssearch - Namespace searching and entry */ ACPI_STATUS Modified: vendor-sys/acpica/dist/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/include/acpixf.h Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/include/acpixf.h Mon Nov 16 18:28:41 2009 (r199323) @@ -120,7 +120,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20091013 +#define ACPI_CA_VERSION 0x20091112 #include "actypes.h" #include "actbl.h" @@ -267,7 +267,8 @@ AcpiWalkNamespace ( ACPI_OBJECT_TYPE Type, ACPI_HANDLE StartObject, UINT32 MaxDepth, - ACPI_WALK_CALLBACK UserFunction, + ACPI_WALK_CALLBACK PreOrderVisit, + ACPI_WALK_CALLBACK PostOrderVisit, void *Context, void **ReturnValue); Modified: vendor-sys/acpica/dist/include/acutils.h ============================================================================== --- vendor-sys/acpica/dist/include/acutils.h Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/include/acutils.h Mon Nov 16 18:28:41 2009 (r199323) @@ -644,6 +644,10 @@ AcpiUtCreatePackageObject ( UINT32 Count); ACPI_OPERAND_OBJECT * +AcpiUtCreateIntegerObject ( + UINT64 Value); + +ACPI_OPERAND_OBJECT * AcpiUtCreateBufferObject ( ACPI_SIZE BufferSize); @@ -795,6 +799,15 @@ AcpiUtPredefinedWarning ( const char *Format, ...); +void ACPI_INTERNAL_VAR_XFACE +AcpiUtPredefinedInfo ( + const char *ModuleName, + UINT32 LineNumber, + char *Pathname, + UINT8 NodeFlags, + const char *Format, + ...); + /* Values for Base above (16=Hex, 10=Decimal) */ #define ACPI_ANY_BASE 0 Modified: vendor-sys/acpica/dist/namespace/nsdump.c ============================================================================== --- vendor-sys/acpica/dist/namespace/nsdump.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/namespace/nsdump.c Mon Nov 16 18:28:41 2009 (r199323) @@ -736,7 +736,7 @@ AcpiNsDumpObjects ( (void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, - AcpiNsDumpOneObject, (void *) &Info, NULL); + AcpiNsDumpOneObject, NULL, (void *) &Info, NULL); } Modified: vendor-sys/acpica/dist/namespace/nsdumpdv.c ============================================================================== --- vendor-sys/acpica/dist/namespace/nsdumpdv.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/namespace/nsdumpdv.c Mon Nov 16 18:28:41 2009 (r199323) @@ -225,7 +225,7 @@ AcpiNsDumpRootDevices ( Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, SysBusHandle, ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK, - AcpiNsDumpOneDevice, NULL, NULL); + AcpiNsDumpOneDevice, NULL, NULL, NULL); } #endif Modified: vendor-sys/acpica/dist/namespace/nseval.c ============================================================================== --- vendor-sys/acpica/dist/namespace/nseval.c Mon Nov 16 15:38:27 2009 (r199322) +++ vendor-sys/acpica/dist/namespace/nseval.c Mon Nov 16 18:28:41 2009 (r199323) @@ -460,36 +460,53 @@ AcpiNsExecModuleCode ( ACPI_OPERAND_OBJECT *MethodObj, ACPI_EVALUATE_INFO *Info) { - ACPI_OPERAND_OBJECT *RootObj; + ACPI_OPERAND_OBJECT *ParentObj; + ACPI_NAMESPACE_NODE *ParentNode; + ACPI_OBJECT_TYPE Type; ACPI_STATUS Status; ACPI_FUNCTION_TRACE (NsExecModuleCode); + /* + * Get the parent node. We cheat by using the NextObject field + * of the method object descriptor. + */ + ParentNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, + MethodObj->Method.NextObject); + Type = AcpiNsGetType (ParentNode); + + /* Must clear NextObject (AcpiNsAttachObject needs the field) */ + + MethodObj->Method.NextObject = NULL; + /* Initialize the evaluation information block */ ACPI_MEMSET (Info, 0, sizeof (ACPI_EVALUATE_INFO)); - Info->PrefixNode = AcpiGbl_RootNode; + Info->PrefixNode = ParentNode; /* - * Get the currently attached root object. Add a reference, because the + * Get the currently attached parent object. Add a reference, because the * ref count will be decreased when the method object is installed to - * the root node. + * the parent node. */ - RootObj = AcpiNsGetAttachedObject (AcpiGbl_RootNode); - AcpiUtAddReference (RootObj); + ParentObj = AcpiNsGetAttachedObject (ParentNode); + if (ParentObj) + { + AcpiUtAddReference (ParentObj); + } - /* Install the method (module-level code) in the root node */ + /* Install the method (module-level code) in the parent node */ - Status = AcpiNsAttachObject (AcpiGbl_RootNode, MethodObj, + Status = AcpiNsAttachObject (ParentNode, MethodObj, ACPI_TYPE_METHOD); if (ACPI_FAILURE (Status)) { goto Exit; } - /* Execute the root node as a control method */ + /* Execute the parent node as a control method */ Status = AcpiNsEvaluate (Info); @@ -498,14 +515,24 @@ AcpiNsExecModuleCode ( /* Detach the temporary method object */ - AcpiNsDetachObject (AcpiGbl_RootNode); + AcpiNsDetachObject (ParentNode); - /* Restore the original root object */ + /* Restore the original parent object */ - Status = AcpiNsAttachObject (AcpiGbl_RootNode, RootObj, ACPI_TYPE_DEVICE); + if (ParentObj) + { + Status = AcpiNsAttachObject (ParentNode, ParentObj, Type); + } + else + { + ParentNode->Type = (UINT8) Type; + } Exit: - AcpiUtRemoveReference (RootObj); + if (ParentObj) + { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 18:29:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C411F1065698; Mon, 16 Nov 2009 18:29:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99B0F8FC17; Mon, 16 Nov 2009 18:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGITqSH077819; Mon, 16 Nov 2009 18:29:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGITqk4077818; Mon, 16 Nov 2009 18:29:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911161829.nAGITqk4077818@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 16 Nov 2009 18:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199324 - vendor-sys/acpica/20091112 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 18:29:52 -0000 Author: jkim Date: Mon Nov 16 18:29:52 2009 New Revision: 199324 URL: http://svn.freebsd.org/changeset/base/199324 Log: Tag ACPICA 20091112. Added: vendor-sys/acpica/20091112/ - copied from r199323, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 18:46:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76A231065670; Mon, 16 Nov 2009 18:46:33 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 655438FC1E; Mon, 16 Nov 2009 18:46:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGIkXfe078229; Mon, 16 Nov 2009 18:46:33 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGIkXeL078226; Mon, 16 Nov 2009 18:46:33 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <200911161846.nAGIkXeL078226@svn.freebsd.org> From: Jack F Vogel Date: Mon, 16 Nov 2009 18:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199325 - releng/8.0/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 18:46:33 -0000 Author: jfv Date: Mon Nov 16 18:46:33 2009 New Revision: 199325 URL: http://svn.freebsd.org/changeset/base/199325 Log: On a 32 bit kernel the igb driver may cause a page fault panic due to a failed bounce page allocation during RX mbuf setup. The large demand on bounce pages is due to the alignment requirement in the tag, the ixgbe driver has demonstrated this to be unnecessary and so it is being removed here to fix this problem. Note that ultimately there needs to be a more elegant handling of the failure case here. Approved by: re Modified: releng/8.0/sys/dev/e1000/if_igb.c Directory Properties: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/dev/e1000/if_igb.c ============================================================================== --- releng/8.0/sys/dev/e1000/if_igb.c Mon Nov 16 18:29:52 2009 (r199324) +++ releng/8.0/sys/dev/e1000/if_igb.c Mon Nov 16 18:46:33 2009 (r199325) @@ -2654,7 +2654,7 @@ igb_dma_malloc(struct adapter *adapter, int error; error = bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */ - IGB_DBA_ALIGN, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -2867,7 +2867,7 @@ igb_allocate_transmit_buffers(struct tx_ * Setup DMA descriptor areas. */ if ((error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -3554,7 +3554,7 @@ igb_allocate_receive_buffers(struct rx_r ** it may not always use this. */ if ((error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 18:58:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16425106566B; Mon, 16 Nov 2009 18:58:46 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEEC58FC12; Mon, 16 Nov 2009 18:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGIwjBE078579; Mon, 16 Nov 2009 18:58:45 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGIwjiQ078577; Mon, 16 Nov 2009 18:58:45 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <200911161858.nAGIwjiQ078577@svn.freebsd.org> From: Jack F Vogel Date: Mon, 16 Nov 2009 18:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199327 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 18:58:46 -0000 Author: jfv Date: Mon Nov 16 18:58:45 2009 New Revision: 199327 URL: http://svn.freebsd.org/changeset/base/199327 Log: On a 32 bit kernel the igb driver may cause a page fault panic due to a failed bounce page allocation during RX mbuf setup. The large demand on bounce pages is due to the alignment requirement in the tag. This restriction was removed in the ixgbe driver with no ill effects and so is being removed here also. Modified: stable/8/sys/dev/e1000/if_igb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Mon Nov 16 18:50:51 2009 (r199326) +++ stable/8/sys/dev/e1000/if_igb.c Mon Nov 16 18:58:45 2009 (r199327) @@ -2654,7 +2654,7 @@ igb_dma_malloc(struct adapter *adapter, int error; error = bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */ - IGB_DBA_ALIGN, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -2867,7 +2867,7 @@ igb_allocate_transmit_buffers(struct tx_ * Setup DMA descriptor areas. */ if ((error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -3554,7 +3554,7 @@ igb_allocate_receive_buffers(struct rx_r ** it may not always use this. */ if ((error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ + 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 19:10:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52688106566B; Mon, 16 Nov 2009 19:10:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C6D28FC0C; Mon, 16 Nov 2009 19:10:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGJA9wF078910; Mon, 16 Nov 2009 19:10:09 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGJA9Kx078907; Mon, 16 Nov 2009 19:10:09 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911161910.nAGJA9Kx078907@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 16 Nov 2009 19:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199329 - head/lib/libc/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 19:10:10 -0000 Author: jkim Date: Mon Nov 16 19:10:09 2009 New Revision: 199329 URL: http://svn.freebsd.org/changeset/base/199329 Log: Sync with C.msg r199083. Modified: head/lib/libc/nls/ko_KR.UTF-8.msg (contents, props changed) head/lib/libc/nls/ko_KR.eucKR.msg (contents, props changed) Modified: head/lib/libc/nls/ko_KR.UTF-8.msg ============================================================================== --- head/lib/libc/nls/ko_KR.UTF-8.msg Mon Nov 16 18:59:04 2009 (r199328) +++ head/lib/libc/nls/ko_KR.UTF-8.msg Mon Nov 16 19:10:09 2009 (r199329) @@ -181,6 +181,16 @@ $ ENOATTR 87 ì†ì„±ì„ ì°¾ì„ ìˆ˜ 없습니다 $ EDOOFUS 88 í”„ë¡œê·¸ëž¨ìƒ ì˜¤ë¥˜ìž…ë‹ˆë‹¤ +$ EBADMSG +89 ìž˜ëª»ëœ ë©”ì‹œì§€ìž…ë‹ˆë‹¤ +$ EMULTIHOP +90 ë©€í‹°í™‰ì´ ì‹œë„ë˜ì—ˆìŠµë‹ˆë‹¤ +$ ENOLINK +91 ì—°ê²°ì´ ëŠê²¼ìŠµë‹ˆë‹¤ +$ EPROTO +92 í”„ë¡œí† ì½œì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤ +$ ENOTCAPABLE +93 ì ‘ê·¼ ëŠ¥ë ¥ì´ ì¶©ë¶„ì¹˜ 않습니다 $ $ strsignal() support catalog $ @@ -230,7 +240,7 @@ $ SIGTTIN $ SIGTTOU 22 정지 (í„°ë¯¸ë„ ì¶œë ¥) $ SIGIO -23 I/O possible +23 I/O 가능 $ SIGXCPU 24 CPU 사용 시간 초과 $ SIGXFSZ @@ -247,3 +257,39 @@ $ SIGUSR1 30 ì‚¬ìš©ìž ì •ì˜ ì‹œê·¸ë„ 1 $ SIGUSR2 31 ì‚¬ìš©ìž ì •ì˜ ì‹œê·¸ë„ 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 호스트 ì´ë¦„ì´ ì§€ì›í•˜ì§€ 않는 주소군입니다 +$ EAI_AGAIN +2 주소 ë³€í™˜ì— ì¼ì‹œì ìœ¼ë¡œ 실패했습니다 +$ EAI_BADFLAGS +3 ìž˜ëª»ëœ ai_flags입니다 +$ EAI_FAIL +4 주소 ë³€í™˜ì— ì™„ì „ížˆ 실패했습니다 +$ EAI_FAMILY +5 지ì›ë˜ì§€ 않는 ai_family입니다 +$ EAI_MEMORY +6 메모리 í• ë‹¹ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤ +$ 7 (obsolete) +7 호스트 ì´ë¦„ê³¼ ì¼ì¹˜í•˜ëŠ” 주소가 없습니다 +$ EAI_NONAME +8 호스트 ì´ë¦„ ë˜ëŠ” 서비스 ì´ë¦„ì´ ì§€ì •ë˜ì§€ 않았거나 ì•Œ 수 없습니다 +$ EAI_SERVICE +9 서비스 ì´ë¦„ì€ ai_socktypeì—ì„œ 지ì›ë˜ì§€ 않습니다 +$ EAI_SOCKTYPE +10 지ì›ë˜ì§€ 않는 ai_socktype입니다 +$ EAI_SYSTEM +11 시스템 오류가 errnoì— ë°˜í™˜ë˜ì—ˆìŠµë‹ˆë‹¤ +$ EAI_BADHINTS +12 ìž˜ëª»ëœ hints입니다 +$ EAI_PROTOCOL +13 ì•Œ 수 없는 í”„ë¡œí† ì½œì´ ë³€í™˜ë˜ì—ˆìŠµë‹ˆë‹¤ +$ EAI_OVERFLOW +14 ì¸ìž ë²„í¼ ê³µê°„ì´ ëª¨ìžëžë‹ˆë‹¤ +$ 0 +32766 성공 +$ NL_MSGMAX +32767 ì•Œ 수 없는 오류 Modified: head/lib/libc/nls/ko_KR.eucKR.msg ============================================================================== --- head/lib/libc/nls/ko_KR.eucKR.msg Mon Nov 16 18:59:04 2009 (r199328) +++ head/lib/libc/nls/ko_KR.eucKR.msg Mon Nov 16 19:10:09 2009 (r199329) @@ -181,6 +181,16 @@ $ ENOATTR 87 ¼Ó¼ºÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù $ EDOOFUS 88 ÇÁ·Î±×·¥»ó ¿À·ùÀÔ´Ï´Ù +$ EBADMSG +89 À߸øµÈ ¸Þ½ÃÁöÀÔ´Ï´Ù +$ EMULTIHOP +90 ¸ÖƼȩÀÌ ½ÃµµµÇ¾ú½À´Ï´Ù +$ ENOLINK +91 ¿¬°áÀÌ ²÷°å½À´Ï´Ù +$ EPROTO +92 ÇÁ·ÎÅäÄÝÀÌ À߸øµÇ¾ú½À´Ï´Ù +$ ENOTCAPABLE +93 Á¢±Ù ´É·ÂÀÌ ÃæºÐÄ¡ ¾Ê½À´Ï´Ù $ $ strsignal() support catalog $ @@ -230,7 +240,7 @@ $ SIGTTIN $ SIGTTOU 22 Á¤Áö (Å͹̳ΠÃâ·Â) $ SIGIO -23 I/O possible +23 I/O °¡´É $ SIGXCPU 24 CPU »ç¿ë ½Ã°£ ÃÊ°ú $ SIGXFSZ @@ -247,3 +257,39 @@ $ SIGUSR1 30 »ç¿ëÀÚ Á¤ÀÇ ½Ã±×³Î 1 $ SIGUSR2 31 »ç¿ëÀÚ Á¤ÀÇ ½Ã±×³Î 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 È£½ºÆ® À̸§ÀÌ Áö¿øÇÏÁö ¾Ê´Â ÁÖ¼Ò±ºÀÔ´Ï´Ù +$ EAI_AGAIN +2 ÁÖ¼Ò º¯È¯¿¡ ÀϽÃÀûÀ¸·Î ½ÇÆÐÇß½À´Ï´Ù +$ EAI_BADFLAGS +3 À߸øµÈ ai_flagsÀÔ´Ï´Ù +$ EAI_FAIL +4 ÁÖ¼Ò º¯È¯¿¡ ¿ÏÀüÈ÷ ½ÇÆÐÇß½À´Ï´Ù +$ EAI_FAMILY +5 Áö¿øµÇÁö ¾Ê´Â ai_familyÀÔ´Ï´Ù +$ EAI_MEMORY +6 ¸Þ¸ð¸® ÇÒ´ç¿¡ ½ÇÆÐÇß½À´Ï´Ù +$ 7 (obsolete) +7 È£½ºÆ® À̸§°ú ÀÏÄ¡ÇÏ´Â ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù +$ EAI_NONAME +8 È£½ºÆ® À̸§ ¶Ç´Â ¼­ºñ½º À̸§ÀÌ ÁöÁ¤µÇÁö ¾Ê¾Ò°Å³ª ¾Ë ¼ö ¾ø½À´Ï´Ù +$ EAI_SERVICE +9 ¼­ºñ½º À̸§Àº ai_socktype¿¡¼­ Áö¿øµÇÁö ¾Ê½À´Ï´Ù +$ EAI_SOCKTYPE +10 Áö¿øµÇÁö ¾Ê´Â ai_socktypeÀÔ´Ï´Ù +$ EAI_SYSTEM +11 ½Ã½ºÅÛ ¿À·ù°¡ errno¿¡ ¹ÝȯµÇ¾ú½À´Ï´Ù +$ EAI_BADHINTS +12 À߸øµÈ hintsÀÔ´Ï´Ù +$ EAI_PROTOCOL +13 ¾Ë ¼ö ¾ø´Â ÇÁ·ÎÅäÄÝÀÌ º¯È¯µÇ¾ú½À´Ï´Ù +$ EAI_OVERFLOW +14 ÀÎÀÚ ¹öÆÛ °ø°£ÀÌ ¸ðÀÚ¶ø´Ï´Ù +$ 0 +32766 ¼º°ø +$ NL_MSGMAX +32767 ¾Ë ¼ö ¾ø´Â ¿À·ù From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 20:34:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12187106568F; Mon, 16 Nov 2009 20:34:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAE8F8FC16; Mon, 16 Nov 2009 20:34:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGKYrk1080686; Mon, 16 Nov 2009 20:34:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGKYrJW080684; Mon, 16 Nov 2009 20:34:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200911162034.nAGKYrJW080684@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 16 Nov 2009 20:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199330 - stable/7/sys/compat/pecoff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 20:34:54 -0000 Author: bz Date: Mon Nov 16 20:34:53 2009 New Revision: 199330 URL: http://svn.freebsd.org/changeset/base/199330 Log: As we pass the 'offset' unvalidated to vn_rdwr() make sure that it is unsigned rather than possibly set to something negative by a malicious binary. This is just the immediate fix to the problem mentioned in PR kern/80742 and by http://milw0rm.com/exploits/9206 but does not fix all possible problems imgact_pecoff has. As this feature does not work and is not compiled in by default, the security team considers this vulnerability to be of low risk to the user population and will not be issuing an advisory. Note that this is a direct commit to stable/7 as pecoff support has been removed from head and stable/8 already. PR: kern/80742 Reported by: Oliver Pinter (oliver.pntr gmail.com) via freebsd-security Help reproducing and testing by: Damian Weber (dweber htw-saarland.de) MFC After: 3 days Modified: stable/7/sys/compat/pecoff/imgact_pecoff.c Modified: stable/7/sys/compat/pecoff/imgact_pecoff.c ============================================================================== --- stable/7/sys/compat/pecoff/imgact_pecoff.c Mon Nov 16 19:10:09 2009 (r199329) +++ stable/7/sys/compat/pecoff/imgact_pecoff.c Mon Nov 16 20:34:53 2009 (r199330) @@ -136,7 +136,7 @@ exec_pecoff_coff_makecmds(struct image_p struct coff_filehdr *, int); static int pecoff_signature(struct thread *, struct vnode *, const struct pecoff_dos_filehdr *); -static int pecoff_read_from(struct thread *, struct vnode *, int, caddr_t, int); +static int pecoff_read_from(struct thread *, struct vnode *, unsigned int, caddr_t, int); static int pecoff_load_section(struct thread * td, struct vmspace * vmspace, struct vnode * vp, @@ -292,7 +292,7 @@ pecoff_load_file(struct thread * td, con struct vmspace *vmspace = td->td_proc->p_vmspace; struct vattr attr; struct image_params image_params, *imgp; - int peofs; + unsigned int peofs; int error, i, scnsiz; imgp = &image_params; @@ -554,7 +554,7 @@ int pecoff_read_from(td, vp, pos, buf, siz) struct thread *td; struct vnode *vp; - int pos; + unsigned int pos; caddr_t buf; int siz; { From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 20:35:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 388AF10656AB; Mon, 16 Nov 2009 20:35: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 231E78FC2C; Mon, 16 Nov 2009 20:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGKZGNh080741; Mon, 16 Nov 2009 20:35:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGKZGcx080738; Mon, 16 Nov 2009 20:35:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911162035.nAGKZGcx080738@svn.freebsd.org> From: Andrew Thompson Date: Mon, 16 Nov 2009 20:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199331 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 20:35:17 -0000 Author: thompsa Date: Mon Nov 16 20:35:16 2009 New Revision: 199331 URL: http://svn.freebsd.org/changeset/base/199331 Log: Add the Curitel UM175 3g device. Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Nov 16 20:34:53 2009 (r199330) +++ head/sys/dev/usb/serial/u3g.c Mon Nov 16 20:35:16 2009 (r199331) @@ -173,6 +173,7 @@ MODULE_DEPEND(u3g, usb, 1, 1, 1); static const struct usb_device_id u3g_devs[] = { #define U3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } + U3G_DEV(CURITEL, UM175, 0), /* OEM: Option */ U3G_DEV(OPTION, GT3G, 0), U3G_DEV(OPTION, GT3GQUAD, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Nov 16 20:34:53 2009 (r199330) +++ head/sys/dev/usb/usbdevs Mon Nov 16 20:35:16 2009 (r199331) @@ -1116,6 +1116,7 @@ product CTX EX1300 0x9999 Ex1300 hub product CURITEL HX550C 0x1101 CDMA 2000 1xRTT USB modem (HX-550C) product CURITEL HX57XB 0x2101 CDMA 2000 1xRTT USB modem (HX-570/575B/PR-600) product CURITEL PC5740 0x3701 Broadband Wireless modem +product CURITEL UM175 0x3714 EVDO modem /* CyberPower products */ product CYBERPOWER 1500CAVRLCD 0x0501 1500CAVRLCD From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 20:36:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F06106568B; Mon, 16 Nov 2009 20:36:43 +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 A36B08FC08; Mon, 16 Nov 2009 20:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGKahGC080827; Mon, 16 Nov 2009 20:36:43 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGKahwk080825; Mon, 16 Nov 2009 20:36:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911162036.nAGKahwk080825@svn.freebsd.org> From: Andrew Thompson Date: Mon, 16 Nov 2009 20:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199332 - head/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 20:36:43 -0000 Author: thompsa Date: Mon Nov 16 20:36:43 2009 New Revision: 199332 URL: http://svn.freebsd.org/changeset/base/199332 Log: Sort ID list by vendor. Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Nov 16 20:35:16 2009 (r199331) +++ head/sys/dev/usb/serial/u3g.c Mon Nov 16 20:36:43 2009 (r199332) @@ -174,6 +174,10 @@ MODULE_DEPEND(u3g, usb, 1, 1, 1); static const struct usb_device_id u3g_devs[] = { #define U3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } U3G_DEV(CURITEL, UM175, 0), + /* OEM: Huawei */ + U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT), + U3G_DEV(HUAWEI, E180V, U3GFL_HUAWEI_INIT), + U3G_DEV(HUAWEI, E220, U3GFL_HUAWEI_INIT), /* OEM: Option */ U3G_DEV(OPTION, GT3G, 0), U3G_DEV(OPTION, GT3GQUAD, 0), @@ -187,10 +191,8 @@ static const struct usb_device_id u3g_de /* OEM: Qualcomm, Inc. */ U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GFL_SCSI_EJECT), U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GFL_SCSI_EJECT), - /* OEM: Huawei */ - U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E180V, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E220, U3GFL_HUAWEI_INIT), + /* OEM: Merlin */ + U3G_DEV(MERLIN, V620, 0), /* OEM: Novatel */ U3G_DEV(NOVATEL, CDMA_MODEM, 0), U3G_DEV(NOVATEL, ES620, 0), @@ -209,8 +211,6 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, ZEROCD, U3GFL_SCSI_EJECT), U3G_DEV(NOVATEL, U760, U3GFL_SCSI_EJECT), U3G_DEV(DELL, U740, 0), - /* OEM: Merlin */ - U3G_DEV(MERLIN, V620, 0), /* OEM: Sierra Wireless: */ U3G_DEV(SIERRA, AIRCARD580, 0), U3G_DEV(SIERRA, AIRCARD595, 0), From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 20:54:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 333601065676; Mon, 16 Nov 2009 20:54:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2211F8FC08; Mon, 16 Nov 2009 20:54:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGKslI1081307; Mon, 16 Nov 2009 20:54:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGKslTI081305; Mon, 16 Nov 2009 20:54:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911162054.nAGKslTI081305@svn.freebsd.org> From: Alexander Motin Date: Mon, 16 Nov 2009 20:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199333 - head/sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 20:54:48 -0000 Author: mav Date: Mon Nov 16 20:54:47 2009 New Revision: 199333 URL: http://svn.freebsd.org/changeset/base/199333 Log: Do not require payload data to be aligned. It is not mentioned in datasheet and works fine in practice. Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Mon Nov 16 20:36:43 2009 (r199332) +++ head/sys/dev/siis/siis.c Mon Nov 16 20:54:47 2009 (r199333) @@ -579,7 +579,7 @@ siis_dmainit(device_t dev) } ch->dma.work_bus = dcba.maddr; /* Data area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, + if (bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, SIIS_SG_ENTRIES * PAGE_SIZE * SIIS_MAX_SLOTS, From owner-svn-src-all@FreeBSD.ORG Mon Nov 16 21:06:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50E1210656B1; Mon, 16 Nov 2009 21:06:23 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 839798FC18; Mon, 16 Nov 2009 21:06:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGL6MCR081605; Mon, 16 Nov 2009 21:06:22 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGL6Mwe081602; Mon, 16 Nov 2009 21:06:22 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911162106.nAGL6Mwe081602@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 16 Nov 2009 21:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199334 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 21:06:23 -0000 Author: edwin Date: Mon Nov 16 21:06:22 2009 New Revision: 199334 URL: http://svn.freebsd.org/changeset/base/199334 Log: Vendor import of tzdata2009s: - Harmless typo in definitions of Antarctica/Davis - Fiji will go to DST between 29 November 2009 and 25 April 2010 Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/antarctica vendor/tzdata/dist/australasia Modified: vendor/tzdata/dist/antarctica ============================================================================== --- vendor/tzdata/dist/antarctica Mon Nov 16 20:54:47 2009 (r199333) +++ vendor/tzdata/dist/antarctica Mon Nov 16 21:06:22 2009 (r199334) @@ -1,5 +1,5 @@ #
-# @(#)antarctica	8.6
+# @(#)antarctica	8.7
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -106,7 +106,7 @@ Zone Antarctica/Casey	0	-	zzz	1969
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT	2009 Oct 18 2:0
+			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00

Modified: vendor/tzdata/dist/australasia
==============================================================================
--- vendor/tzdata/dist/australasia	Mon Nov 16 20:54:47 2009	(r199333)
+++ vendor/tzdata/dist/australasia	Mon Nov 16 21:06:22 2009	(r199334)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.14
+# @(#)australasia	8.15
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -248,9 +248,30 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 			6:30	-	CCT	# Cocos Islands Time
 
 # Fiji
+# From Alexander Krivenyshev (2009-11-10):
+# According to Fiji Broadcasting Corporation,  Fiji plans to re-introduce DST
+# from November 29th 2009  to April 25th 2010.
+#
+# "Daylight savings to commence this month"
+# 
+# http://www.radiofiji.com.fj/fullstory.php?id=23719
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html
+# 
+
+# From Steffen Thorsen (2009-11-10):
+# The Fiji Government has posted some more details about the approved
+# amendments:
+# 
+# http://www.fiji.gov.fj/publish/page_16198.shtml
+# 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
+Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
+Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time

From owner-svn-src-all@FreeBSD.ORG  Mon Nov 16 21:07:17 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A04510656C1;
	Mon, 16 Nov 2009 21:07:17 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 70BF48FC31;
	Mon, 16 Nov 2009 21:07:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGL7Hmj081662;
	Mon, 16 Nov 2009 21:07:17 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGL7HN4081661;
	Mon, 16 Nov 2009 21:07:17 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911162107.nAGL7HN4081661@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 16 Nov 2009 21:07:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199335 - vendor/tzdata/tzdata2009s
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 16 Nov 2009 21:07:17 -0000

Author: edwin
Date: Mon Nov 16 21:07:17 2009
New Revision: 199335
URL: http://svn.freebsd.org/changeset/base/199335

Log:
  Tag of tzdata2009s

Added:
  vendor/tzdata/tzdata2009s/
     - copied from r199334, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Mon Nov 16 21:12:27 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B943106566C;
	Mon, 16 Nov 2009 21:12:27 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5076D8FC08;
	Mon, 16 Nov 2009 21:12:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGLCRS4081817;
	Mon, 16 Nov 2009 21:12:27 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGLCRHe081814;
	Mon, 16 Nov 2009 21:12:27 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911162112.nAGLCRHe081814@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 16 Nov 2009 21:12:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199336 - head/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 16 Nov 2009 21:12:27 -0000

Author: edwin
Date: Mon Nov 16 21:12:27 2009
New Revision: 199336
URL: http://svn.freebsd.org/changeset/base/199336

Log:
  MFV of tzdata2009s, r199334
  
  - Fix (harmless) typo in the definitions of Antarctica/David
  - Fiji will go into DST from 29 November 2009 to 25 April 2010.
  
  MFC after:	3 days

Modified:
  head/share/zoneinfo/antarctica
  head/share/zoneinfo/australasia
Directory Properties:
  head/share/zoneinfo/   (props changed)

Modified: head/share/zoneinfo/antarctica
==============================================================================
--- head/share/zoneinfo/antarctica	Mon Nov 16 21:07:17 2009	(r199335)
+++ head/share/zoneinfo/antarctica	Mon Nov 16 21:12:27 2009	(r199336)
@@ -1,5 +1,5 @@
 # 
-# @(#)antarctica	8.6
+# @(#)antarctica	8.7
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -106,7 +106,7 @@ Zone Antarctica/Casey	0	-	zzz	1969
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT	2009 Oct 18 2:0
+			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00

Modified: head/share/zoneinfo/australasia
==============================================================================
--- head/share/zoneinfo/australasia	Mon Nov 16 21:07:17 2009	(r199335)
+++ head/share/zoneinfo/australasia	Mon Nov 16 21:12:27 2009	(r199336)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.14
+# @(#)australasia	8.15
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -248,9 +248,30 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 			6:30	-	CCT	# Cocos Islands Time
 
 # Fiji
+# From Alexander Krivenyshev (2009-11-10):
+# According to Fiji Broadcasting Corporation,  Fiji plans to re-introduce DST
+# from November 29th 2009  to April 25th 2010.
+#
+# "Daylight savings to commence this month"
+# 
+# http://www.radiofiji.com.fj/fullstory.php?id=23719
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html
+# 
+
+# From Steffen Thorsen (2009-11-10):
+# The Fiji Government has posted some more details about the approved
+# amendments:
+# 
+# http://www.fiji.gov.fj/publish/page_16198.shtml
+# 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
+Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
+Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time

From owner-svn-src-all@FreeBSD.ORG  Mon Nov 16 21:47:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1E54B106568D;
	Mon, 16 Nov 2009 21:47:13 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 08CCF8FC18;
	Mon, 16 Nov 2009 21:47:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGLlC8h082520;
	Mon, 16 Nov 2009 21:47:12 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGLlCRV082494;
	Mon, 16 Nov 2009 21:47:12 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911162147.nAGLlCRV082494@svn.freebsd.org>
From: Jung-uk Kim 
Date: Mon, 16 Nov 2009 21:47:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199337 - in head: sys/conf sys/contrib/dev/acpica
	sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger
	sys/contrib/dev/acpica/dispatcher
	sys/contrib/dev/acpica/events sys/co...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 16 Nov 2009 21:47:13 -0000

Author: jkim
Date: Mon Nov 16 21:47:12 2009
New Revision: 199337
URL: http://svn.freebsd.org/changeset/base/199337

Log:
  Merge ACPICA 20091112.

Added:
  head/sys/contrib/dev/acpica/namespace/nsrepair2.c
     - copied, changed from r199336, vendor-sys/acpica/dist/namespace/nsrepair2.c
Modified:
  head/sys/conf/files
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/asllookup.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/asltransform.c
  head/sys/contrib/dev/acpica/compiler/asltypes.h
  head/sys/contrib/dev/acpica/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/debugger/dbexec.c
  head/sys/contrib/dev/acpica/debugger/dbstats.c
  head/sys/contrib/dev/acpica/dispatcher/dsinit.c
  head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
  head/sys/contrib/dev/acpica/dispatcher/dsobject.c
  head/sys/contrib/dev/acpica/events/evgpeblk.c
  head/sys/contrib/dev/acpica/events/evregion.c
  head/sys/contrib/dev/acpica/executer/exconfig.c
  head/sys/contrib/dev/acpica/executer/exconvrt.c
  head/sys/contrib/dev/acpica/executer/exfield.c
  head/sys/contrib/dev/acpica/executer/exoparg1.c
  head/sys/contrib/dev/acpica/executer/exoparg6.c
  head/sys/contrib/dev/acpica/executer/exregion.c
  head/sys/contrib/dev/acpica/include/acconfig.h
  head/sys/contrib/dev/acpica/include/acmacros.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/sys/contrib/dev/acpica/namespace/nsdump.c
  head/sys/contrib/dev/acpica/namespace/nsdumpdv.c
  head/sys/contrib/dev/acpica/namespace/nseval.c
  head/sys/contrib/dev/acpica/namespace/nsinit.c
  head/sys/contrib/dev/acpica/namespace/nspredef.c
  head/sys/contrib/dev/acpica/namespace/nsrepair.c
  head/sys/contrib/dev/acpica/namespace/nswalk.c
  head/sys/contrib/dev/acpica/namespace/nsxfeval.c
  head/sys/contrib/dev/acpica/parser/psloop.c
  head/sys/contrib/dev/acpica/parser/psparse.c
  head/sys/contrib/dev/acpica/parser/psxface.c
  head/sys/contrib/dev/acpica/utilities/utmisc.c
  head/sys/contrib/dev/acpica/utilities/utobject.c
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_dock.c
  head/sys/dev/acpica/acpi_pci.c
  head/sys/dev/acpica/acpi_video.c
  head/usr.sbin/acpi/acpidb/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/conf/files	Mon Nov 16 21:47:12 2009	(r199337)
@@ -171,107 +171,108 @@ contrib/dev/acpica/dispatcher/dswexec.c	
 contrib/dev/acpica/dispatcher/dswload.c		optional acpi
 contrib/dev/acpica/dispatcher/dswscope.c	optional acpi
 contrib/dev/acpica/dispatcher/dswstate.c	optional acpi
-contrib/dev/acpica/events/evevent.c	optional acpi
-contrib/dev/acpica/events/evgpe.c	optional acpi
-contrib/dev/acpica/events/evgpeblk.c	optional acpi
-contrib/dev/acpica/events/evmisc.c	optional acpi
-contrib/dev/acpica/events/evregion.c	optional acpi
-contrib/dev/acpica/events/evrgnini.c	optional acpi
-contrib/dev/acpica/events/evsci.c	optional acpi
-contrib/dev/acpica/events/evxface.c	optional acpi
-contrib/dev/acpica/events/evxfevnt.c	optional acpi
-contrib/dev/acpica/events/evxfregn.c	optional acpi
-contrib/dev/acpica/executer/exconfig.c	optional acpi
-contrib/dev/acpica/executer/exconvrt.c	optional acpi
-contrib/dev/acpica/executer/excreate.c	optional acpi
-contrib/dev/acpica/executer/exdump.c	optional acpi
-contrib/dev/acpica/executer/exfield.c	optional acpi
-contrib/dev/acpica/executer/exfldio.c	optional acpi
-contrib/dev/acpica/executer/exmisc.c	optional acpi
-contrib/dev/acpica/executer/exmutex.c	optional acpi
-contrib/dev/acpica/executer/exnames.c	optional acpi
-contrib/dev/acpica/executer/exoparg1.c	optional acpi
-contrib/dev/acpica/executer/exoparg2.c	optional acpi
-contrib/dev/acpica/executer/exoparg3.c	optional acpi
-contrib/dev/acpica/executer/exoparg6.c	optional acpi
-contrib/dev/acpica/executer/exprep.c	optional acpi
-contrib/dev/acpica/executer/exregion.c	optional acpi
-contrib/dev/acpica/executer/exresnte.c	optional acpi
-contrib/dev/acpica/executer/exresolv.c	optional acpi
-contrib/dev/acpica/executer/exresop.c	optional acpi
-contrib/dev/acpica/executer/exstore.c	optional acpi
-contrib/dev/acpica/executer/exstoren.c	optional acpi
-contrib/dev/acpica/executer/exstorob.c	optional acpi
-contrib/dev/acpica/executer/exsystem.c	optional acpi
-contrib/dev/acpica/executer/exutils.c	optional acpi
-contrib/dev/acpica/hardware/hwacpi.c	optional acpi
-contrib/dev/acpica/hardware/hwgpe.c	optional acpi
-contrib/dev/acpica/hardware/hwregs.c	optional acpi
-contrib/dev/acpica/hardware/hwsleep.c	optional acpi
-contrib/dev/acpica/hardware/hwtimer.c	optional acpi
-contrib/dev/acpica/hardware/hwvalid.c	optional acpi
-contrib/dev/acpica/hardware/hwxface.c	optional acpi
-contrib/dev/acpica/namespace/nsaccess.c	optional acpi
-contrib/dev/acpica/namespace/nsalloc.c	optional acpi
-contrib/dev/acpica/namespace/nsdump.c	optional acpi
-contrib/dev/acpica/namespace/nseval.c	optional acpi
-contrib/dev/acpica/namespace/nsinit.c	optional acpi
-contrib/dev/acpica/namespace/nsload.c	optional acpi
-contrib/dev/acpica/namespace/nsnames.c	optional acpi
-contrib/dev/acpica/namespace/nsobject.c	optional acpi
-contrib/dev/acpica/namespace/nsparse.c	optional acpi
-contrib/dev/acpica/namespace/nspredef.c	optional acpi
-contrib/dev/acpica/namespace/nsrepair.c	optional acpi
-contrib/dev/acpica/namespace/nssearch.c	optional acpi
-contrib/dev/acpica/namespace/nsutils.c	optional acpi
-contrib/dev/acpica/namespace/nswalk.c	optional acpi
-contrib/dev/acpica/namespace/nsxfeval.c	optional acpi
-contrib/dev/acpica/namespace/nsxfname.c	optional acpi
-contrib/dev/acpica/namespace/nsxfobj.c	optional acpi
-contrib/dev/acpica/parser/psargs.c	optional acpi
-contrib/dev/acpica/parser/psloop.c	optional acpi
-contrib/dev/acpica/parser/psopcode.c	optional acpi
-contrib/dev/acpica/parser/psparse.c	optional acpi
-contrib/dev/acpica/parser/psscope.c	optional acpi
-contrib/dev/acpica/parser/pstree.c	optional acpi
-contrib/dev/acpica/parser/psutils.c	optional acpi
-contrib/dev/acpica/parser/pswalk.c	optional acpi
-contrib/dev/acpica/parser/psxface.c	optional acpi
-contrib/dev/acpica/resources/rsaddr.c	optional acpi
-contrib/dev/acpica/resources/rscalc.c	optional acpi
-contrib/dev/acpica/resources/rscreate.c	optional acpi
-contrib/dev/acpica/resources/rsdump.c	optional acpi
-contrib/dev/acpica/resources/rsinfo.c	optional acpi
-contrib/dev/acpica/resources/rsio.c	optional acpi
-contrib/dev/acpica/resources/rsirq.c	optional acpi
-contrib/dev/acpica/resources/rslist.c	optional acpi
-contrib/dev/acpica/resources/rsmemory.c	optional acpi
-contrib/dev/acpica/resources/rsmisc.c	optional acpi
-contrib/dev/acpica/resources/rsutils.c	optional acpi
-contrib/dev/acpica/resources/rsxface.c	optional acpi
-contrib/dev/acpica/tables/tbfadt.c	optional acpi
-contrib/dev/acpica/tables/tbfind.c	optional acpi
-contrib/dev/acpica/tables/tbinstal.c	optional acpi
-contrib/dev/acpica/tables/tbutils.c	optional acpi
-contrib/dev/acpica/tables/tbxface.c	optional acpi
-contrib/dev/acpica/tables/tbxfroot.c	optional acpi
-contrib/dev/acpica/utilities/utalloc.c	optional acpi
-contrib/dev/acpica/utilities/utcache.c	optional acpi
-contrib/dev/acpica/utilities/utcopy.c	optional acpi
-contrib/dev/acpica/utilities/utdebug.c	optional acpi
-contrib/dev/acpica/utilities/utdelete.c	optional acpi
-contrib/dev/acpica/utilities/uteval.c	optional acpi
-contrib/dev/acpica/utilities/utglobal.c	optional acpi
-contrib/dev/acpica/utilities/utids.c	optional acpi
-contrib/dev/acpica/utilities/utinit.c	optional acpi
-contrib/dev/acpica/utilities/utlock.c	optional acpi
-contrib/dev/acpica/utilities/utmath.c	optional acpi
-contrib/dev/acpica/utilities/utmisc.c	optional acpi
-contrib/dev/acpica/utilities/utmutex.c	optional acpi
-contrib/dev/acpica/utilities/utobject.c	optional acpi
-contrib/dev/acpica/utilities/utresrc.c	optional acpi
-contrib/dev/acpica/utilities/utstate.c	optional acpi
-contrib/dev/acpica/utilities/utxface.c	optional acpi
+contrib/dev/acpica/events/evevent.c		optional acpi
+contrib/dev/acpica/events/evgpe.c		optional acpi
+contrib/dev/acpica/events/evgpeblk.c		optional acpi
+contrib/dev/acpica/events/evmisc.c		optional acpi
+contrib/dev/acpica/events/evregion.c		optional acpi
+contrib/dev/acpica/events/evrgnini.c		optional acpi
+contrib/dev/acpica/events/evsci.c		optional acpi
+contrib/dev/acpica/events/evxface.c		optional acpi
+contrib/dev/acpica/events/evxfevnt.c		optional acpi
+contrib/dev/acpica/events/evxfregn.c		optional acpi
+contrib/dev/acpica/executer/exconfig.c		optional acpi
+contrib/dev/acpica/executer/exconvrt.c		optional acpi
+contrib/dev/acpica/executer/excreate.c		optional acpi
+contrib/dev/acpica/executer/exdump.c		optional acpi
+contrib/dev/acpica/executer/exfield.c		optional acpi
+contrib/dev/acpica/executer/exfldio.c		optional acpi
+contrib/dev/acpica/executer/exmisc.c		optional acpi
+contrib/dev/acpica/executer/exmutex.c		optional acpi
+contrib/dev/acpica/executer/exnames.c		optional acpi
+contrib/dev/acpica/executer/exoparg1.c		optional acpi
+contrib/dev/acpica/executer/exoparg2.c		optional acpi
+contrib/dev/acpica/executer/exoparg3.c		optional acpi
+contrib/dev/acpica/executer/exoparg6.c		optional acpi
+contrib/dev/acpica/executer/exprep.c		optional acpi
+contrib/dev/acpica/executer/exregion.c		optional acpi
+contrib/dev/acpica/executer/exresnte.c		optional acpi
+contrib/dev/acpica/executer/exresolv.c		optional acpi
+contrib/dev/acpica/executer/exresop.c		optional acpi
+contrib/dev/acpica/executer/exstore.c		optional acpi
+contrib/dev/acpica/executer/exstoren.c		optional acpi
+contrib/dev/acpica/executer/exstorob.c		optional acpi
+contrib/dev/acpica/executer/exsystem.c		optional acpi
+contrib/dev/acpica/executer/exutils.c		optional acpi
+contrib/dev/acpica/hardware/hwacpi.c		optional acpi
+contrib/dev/acpica/hardware/hwgpe.c		optional acpi
+contrib/dev/acpica/hardware/hwregs.c		optional acpi
+contrib/dev/acpica/hardware/hwsleep.c		optional acpi
+contrib/dev/acpica/hardware/hwtimer.c		optional acpi
+contrib/dev/acpica/hardware/hwvalid.c		optional acpi
+contrib/dev/acpica/hardware/hwxface.c		optional acpi
+contrib/dev/acpica/namespace/nsaccess.c		optional acpi
+contrib/dev/acpica/namespace/nsalloc.c		optional acpi
+contrib/dev/acpica/namespace/nsdump.c		optional acpi
+contrib/dev/acpica/namespace/nseval.c		optional acpi
+contrib/dev/acpica/namespace/nsinit.c		optional acpi
+contrib/dev/acpica/namespace/nsload.c		optional acpi
+contrib/dev/acpica/namespace/nsnames.c		optional acpi
+contrib/dev/acpica/namespace/nsobject.c		optional acpi
+contrib/dev/acpica/namespace/nsparse.c		optional acpi
+contrib/dev/acpica/namespace/nspredef.c		optional acpi
+contrib/dev/acpica/namespace/nsrepair.c		optional acpi
+contrib/dev/acpica/namespace/nsrepair2.c	optional acpi
+contrib/dev/acpica/namespace/nssearch.c		optional acpi
+contrib/dev/acpica/namespace/nsutils.c		optional acpi
+contrib/dev/acpica/namespace/nswalk.c		optional acpi
+contrib/dev/acpica/namespace/nsxfeval.c		optional acpi
+contrib/dev/acpica/namespace/nsxfname.c		optional acpi
+contrib/dev/acpica/namespace/nsxfobj.c		optional acpi
+contrib/dev/acpica/parser/psargs.c		optional acpi
+contrib/dev/acpica/parser/psloop.c		optional acpi
+contrib/dev/acpica/parser/psopcode.c		optional acpi
+contrib/dev/acpica/parser/psparse.c		optional acpi
+contrib/dev/acpica/parser/psscope.c		optional acpi
+contrib/dev/acpica/parser/pstree.c		optional acpi
+contrib/dev/acpica/parser/psutils.c		optional acpi
+contrib/dev/acpica/parser/pswalk.c		optional acpi
+contrib/dev/acpica/parser/psxface.c		optional acpi
+contrib/dev/acpica/resources/rsaddr.c		optional acpi
+contrib/dev/acpica/resources/rscalc.c		optional acpi
+contrib/dev/acpica/resources/rscreate.c		optional acpi
+contrib/dev/acpica/resources/rsdump.c		optional acpi
+contrib/dev/acpica/resources/rsinfo.c		optional acpi
+contrib/dev/acpica/resources/rsio.c		optional acpi
+contrib/dev/acpica/resources/rsirq.c		optional acpi
+contrib/dev/acpica/resources/rslist.c		optional acpi
+contrib/dev/acpica/resources/rsmemory.c		optional acpi
+contrib/dev/acpica/resources/rsmisc.c		optional acpi
+contrib/dev/acpica/resources/rsutils.c		optional acpi
+contrib/dev/acpica/resources/rsxface.c		optional acpi
+contrib/dev/acpica/tables/tbfadt.c		optional acpi
+contrib/dev/acpica/tables/tbfind.c		optional acpi
+contrib/dev/acpica/tables/tbinstal.c		optional acpi
+contrib/dev/acpica/tables/tbutils.c		optional acpi
+contrib/dev/acpica/tables/tbxface.c		optional acpi
+contrib/dev/acpica/tables/tbxfroot.c		optional acpi
+contrib/dev/acpica/utilities/utalloc.c		optional acpi
+contrib/dev/acpica/utilities/utcache.c		optional acpi
+contrib/dev/acpica/utilities/utcopy.c		optional acpi
+contrib/dev/acpica/utilities/utdebug.c		optional acpi
+contrib/dev/acpica/utilities/utdelete.c		optional acpi
+contrib/dev/acpica/utilities/uteval.c		optional acpi
+contrib/dev/acpica/utilities/utglobal.c		optional acpi
+contrib/dev/acpica/utilities/utids.c		optional acpi
+contrib/dev/acpica/utilities/utinit.c		optional acpi
+contrib/dev/acpica/utilities/utlock.c		optional acpi
+contrib/dev/acpica/utilities/utmath.c		optional acpi
+contrib/dev/acpica/utilities/utmisc.c		optional acpi
+contrib/dev/acpica/utilities/utmutex.c		optional acpi
+contrib/dev/acpica/utilities/utobject.c		optional acpi
+contrib/dev/acpica/utilities/utresrc.c		optional acpi
+contrib/dev/acpica/utilities/utstate.c		optional acpi
+contrib/dev/acpica/utilities/utxface.c		optional acpi
 contrib/ipfilter/netinet/fil.c	optional ipfilter inet \
 	compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
 contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/changes.txt	Mon Nov 16 21:47:12 2009	(r199337)
@@ -1,4 +1,77 @@
 ----------------------------------------
+12 November 2009. Summary of changes for version 20091112:
+
+This release is available at www.acpica.org/downloads
+
+1) ACPI CA Core Subsystem:
+
+Implemented a post-order callback to AcpiWalkNamespace. The existing 
+interface only has a pre-order callback. This change adds an additional 
+parameter for a post-order callback which will be more useful for bus scans. 
+ACPICA BZ 779. Lin Ming. Updated the ACPICA Programmer Reference.
+
+Modified the behavior of the operation region memory mapping cache for 
+SystemMemory. Ensure that the memory mappings created for operation regions 
+do not cross 4K page boundaries. Crossing a page boundary while mapping 
+regions can cause kernel warnings on some hosts if the pages have different 
+attributes. Such regions are probably BIOS bugs, and this is the workaround. 
+Linux BZ 14445. Lin Ming.
+
+Implemented an automatic repair for predefined methods that must return 
+sorted lists. This change will repair (by sorting) packages returned by _ALR, 
+_PSS, and _TSS. Drivers can now assume that the packages are correctly sorted 
+and do not contain NULL package elements. Adds one new file, 
+namespace/nsrepair2.c. ACPICA BZ 784. Lin Ming, Bob Moore.
+
+Fixed a possible fault during predefined name validation if a return Package 
+object contains NULL elements. Also adds a warning if a NULL element is 
+followed by any non-null elements. ACPICA BZ 813, 814. Future enhancement may 
+include repair or removal of all such NULL elements where possible.
+
+Implemented additional module-level executable AML code support. This change 
+will execute module-level code that is not at the root of the namespace 
+(under a Device object, etc.) at table load time. Module-level executable AML 
+code has been illegal since ACPI 2.0. ACPICA BZ 762. Lin Ming.
+
+Implemented a new internal function to create Integer objects. This function 
+simplifies miscellaneous object creation code. ACPICA BZ 823.
+
+Reduced the severity of predefined repair messages, Warning to Info. Since 
+the object was successfully repaired, a warning is too severe. Reduced to an 
+info message for now. These messages may eventually be changed to debug-only. 
+ACPICA BZ 812.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and has a 
+much larger code and data size.
+
+  Previous Release:
+    Non-Debug Version:  85.8K Code, 18.0K Data, 103.8K Total
+    Debug Version:     161.8K Code, 50.6K Data, 212.4K Total
+  Current Release:
+    Non-Debug Version:  86.6K Code, 18.2K Data, 104.8K Total
+    Debug Version:     162.7K Code, 50.8K Data, 213.5K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented Switch() with While(1) so that Break works correctly. This 
+change correctly implements the Switch operator with a surrounding While(1) 
+so that the Break operator works as expected. ACPICA BZ 461. Lin Ming.
+
+iASL: Added a message if a package initializer list is shorter than package 
+length. Adds a new remark for a Package() declaration if an initializer list 
+exists, but is shorter than the declared length of the package. Although 
+technically legal, this is probably a coding error and it is seen in the 
+field. ACPICA BZ 815. Lin Ming, Bob Moore.
+
+iASL: Fixed a problem where the compiler could fault after the maximum number 
+of errors was reached (200).
+
+acpixtract: Fixed a possible warning for pointer cast if the compiler warning 
+level set very high.
+
+----------------------------------------
 13 October 2009. Summary of changes for version 20091013:
 
 This release is available at www.acpica.org/downloads

Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslcompile.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/aslcompile.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -895,13 +895,6 @@ CmCleanupAndExit (
                         10) / Gbl_NsLookupCount);
     }
 
-    /* Close all open files */
-
-    for (i = 2; i < ASL_MAX_FILE_TYPE; i++)
-    {
-        FlCloseFile (i);
-    }
-
     /*
      * TBD: SourceOutput should be .TMP, then rename if we want to keep it?
      */
@@ -923,6 +916,13 @@ CmCleanupAndExit (
     }
 
     UtDisplaySummary (ASL_FILE_STDOUT);
+
+    /* Close all open files */
+
+    for (i = 2; i < ASL_MAX_FILE_TYPE; i++)
+    {
+        FlCloseFile (i);
+    }
 }
 
 

Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslerror.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/aslerror.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -535,6 +535,7 @@ AslCommonError (
         Gbl_NextError = Gbl_ErrorLog;
         CmDoOutputFiles ();
         CmCleanupAndExit ();
+        exit(1);
     }
 
     return;

Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asllookup.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asllookup.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -526,7 +526,7 @@ LsDisplayNamespace (
     /* Walk entire namespace from the root */
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject,
+                ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject, NULL,
                 NULL, NULL);
 
     /* Print the full pathname for each namespace node */
@@ -534,7 +534,7 @@ LsDisplayNamespace (
     FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LsDoOnePathname,
+                ACPI_UINT32_MAX, FALSE, LsDoOnePathname, NULL,
                 NULL, NULL);
 
     return (Status);
@@ -598,7 +598,7 @@ LkObjectExists (
     /* Walk entire namespace from the supplied root */
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LsCompareOneNamespaceObject,
+                ACPI_UINT32_MAX, FALSE, LsCompareOneNamespaceObject, NULL,
                 Name, NULL);
     if (Status == AE_CTRL_TRUE)
     {
@@ -753,7 +753,7 @@ LkFindUnreferencedObjects (
     /* Walk entire namespace from the supplied root */
 
     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LkIsObjectUsed,
+                ACPI_UINT32_MAX, FALSE, LkIsObjectUsed, NULL,
                 NULL, NULL);
 }
 

Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asloperands.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asloperands.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -788,20 +788,30 @@ OpnDoPackage (
     if ((PackageLengthOp->Asl.ParseOpcode == PARSEOP_INTEGER)      ||
         (PackageLengthOp->Asl.ParseOpcode == PARSEOP_QWORDCONST))
     {
-        if (PackageLengthOp->Asl.Value.Integer >= PackageLength)
+        if (PackageLengthOp->Asl.Value.Integer > PackageLength)
         {
-            /* Allow package to be longer than the initializer list */
+            /*
+             * Allow package length to be longer than the initializer
+             * list -- but if the length of initializer list is nonzero,
+             * issue a message since this is probably a coding error,
+             * even though technically legal.
+             */
+            if (PackageLength > 0)
+            {
+                AslError (ASL_REMARK, ASL_MSG_LIST_LENGTH_SHORT,
+                    PackageLengthOp, NULL);
+            }
 
             PackageLength = (UINT32) PackageLengthOp->Asl.Value.Integer;
         }
-        else
+        else if (PackageLengthOp->Asl.Value.Integer < PackageLength)
         {
             /*
-             * Initializer list is longer than the package length. This
-             * is an error as per the ACPI spec.
+             * The package length is smaller than the length of the
+             * initializer list. This is an error as per the ACPI spec.
              */
-            AslError (ASL_ERROR, ASL_MSG_LIST_LENGTH,
-                PackageLengthOp->Asl.Next, NULL);
+            AslError (ASL_ERROR, ASL_MSG_LIST_LENGTH_LONG,
+                PackageLengthOp, NULL);
         }
     }
 

Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asltransform.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asltransform.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -468,6 +468,8 @@ TrDoSwitch (
     ACPI_PARSE_OBJECT       *NewOp;
     ACPI_PARSE_OBJECT       *NewOp2;
     ACPI_PARSE_OBJECT       *MethodOp;
+    ACPI_PARSE_OBJECT       *StoreOp;
+    ACPI_PARSE_OBJECT       *BreakOp;
     char                    *PredicateValueName;
     UINT16                  Index;
     UINT32                  Btype;
@@ -638,11 +640,7 @@ TrDoSwitch (
              */
             if (CurrentParentNode == StartNode)
             {
-                Conditional->Asl.Parent = CurrentParentNode->Asl.Parent;
-
-                /* Link IF into the peer list */
-
-                TrAmlInsertPeer (CurrentParentNode, Conditional);
+                Conditional->Asl.Next = NULL;
             }
             else
             {
@@ -695,6 +693,7 @@ TrDoSwitch (
             {
                 return;
             }
+
             TrAmlInitNode (DefaultOp, PARSEOP_ELSE);
             DefaultOp->Asl.Parent = Conditional->Asl.Parent;
 
@@ -799,22 +798,44 @@ TrDoSwitch (
     TrAmlSetSubtreeParent (NewOp2, NewOp);
 
     /*
-     * Transform the Switch() into a Store() node which will be used to save the
+     * Transform the Switch() into a While(One)-Break node.
+     * And create a Store() node which will be used to save the
      * Switch() value.  The store is of the form: Store (Value, _T_x)
      * where _T_x is the temp variable.
      */
-    TrAmlInitNode (StartNode, PARSEOP_STORE);
-    StartNode->Asl.Child = NULL;
+    TrAmlInitNode (StartNode, PARSEOP_WHILE);
+    NewOp = TrCreateLeafNode (PARSEOP_ONE);
+    NewOp->Asl.Next = Predicate->Asl.Next;
+    NewOp->Asl.Parent = StartNode;
+    StartNode->Asl.Child = NewOp;
+
+    /* Create a Store() node */
+
+    StoreOp = TrCreateLeafNode (PARSEOP_STORE);
+    StoreOp->Asl.Parent = StartNode;
+    TrAmlInsertPeer (NewOp, StoreOp);
 
     /* Complete the Store subtree */
 
-    StartNode->Asl.Child = Predicate;
-    Predicate->Asl.Parent = StartNode;
+    StoreOp->Asl.Child = Predicate;
+    Predicate->Asl.Parent = StoreOp;
 
     NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
                 (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName));
-    NewOp->Asl.Parent    = StartNode;
+    NewOp->Asl.Parent    = StoreOp;
     Predicate->Asl.Next  = NewOp;
+
+    /* Create a Break() node and insert it into the end of While() */
+
+    Conditional = StartNode->Asl.Child;
+    while (Conditional->Asl.Next)
+    {
+        Conditional = Conditional->Asl.Next;
+    }
+
+    BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
+    BreakOp->Asl.Parent = StartNode;
+    TrAmlInsertPeer (Conditional, BreakOp);
 }
 
 

Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asltypes.h	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asltypes.h	Mon Nov 16 21:47:12 2009	(r199337)
@@ -369,7 +369,8 @@ typedef enum
     ASL_MSG_INVALID_TIME,
     ASL_MSG_INVALID_TYPE,
     ASL_MSG_INVALID_UUID,
-    ASL_MSG_LIST_LENGTH,
+    ASL_MSG_LIST_LENGTH_LONG,
+    ASL_MSG_LIST_LENGTH_SHORT,
     ASL_MSG_LISTING_FILE_OPEN,
     ASL_MSG_LISTING_FILENAME,
     ASL_MSG_LOCAL_INIT,
@@ -488,7 +489,8 @@ char                        *AslMessages
 /*    ASL_MSG_INVALID_TIME */               "Time parameter too long (255 max)",
 /*    ASL_MSG_INVALID_TYPE */               "Invalid type",
 /*    ASL_MSG_INVALID_UUID */               "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"",
-/*    ASL_MSG_LIST_LENGTH */                "Initializer list too long",
+/*    ASL_MSG_LIST_LENGTH_LONG */           "Initializer list longer than declared package length",
+/*    ASL_MSG_LIST_LENGTH_SHORT */          "Initializer list shorter than declared package length",
 /*    ASL_MSG_LISTING_FILE_OPEN */          "Could not open listing file",
 /*    ASL_MSG_LISTING_FILENAME */           "Could not create listing filename",
 /*    ASL_MSG_LOCAL_INIT */                 "Method local variable is not initialized",

Modified: head/sys/contrib/dev/acpica/debugger/dbcmds.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbcmds.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/debugger/dbcmds.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -383,7 +383,7 @@ AcpiDbFindReferences (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                    AcpiDbWalkForReferences, (void *) ObjDesc, NULL);
+                    AcpiDbWalkForReferences, NULL, (void *) ObjDesc, NULL);
 }
 
 
@@ -475,7 +475,7 @@ AcpiDbCheckPredefinedNames (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                AcpiDbWalkForPredefinedNames, (void *) &Count, NULL);
+                AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL);
 
     AcpiOsPrintf ("Found %d predefined names in the namespace\n", Count);
 }
@@ -617,7 +617,7 @@ AcpiDbBatchExecute (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                AcpiDbWalkForExecute, (void *) &Info, NULL);
+                AcpiDbWalkForExecute, NULL, (void *) &Info, NULL);
 
     AcpiOsPrintf ("Executed %d predefined names in the namespace\n", Info.Count);
 }
@@ -1165,15 +1165,13 @@ AcpiDbSetMethodData (
 
     /* Create and initialize the new object */
 
-    ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    ObjDesc = AcpiUtCreateIntegerObject ((UINT64) Value);
     if (!ObjDesc)
     {
         AcpiOsPrintf ("Could not create an internal object\n");
         return;
     }
 
-    ObjDesc->Integer.Value = Value;
-
     /* Store the new object into the target */
 
     switch (Type)
@@ -1325,7 +1323,7 @@ AcpiDbDisplayObjects (
     /* Walk the namespace from the root */
 
     (void) AcpiWalkNamespace (Type, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                AcpiDbWalkForSpecificObjects, (void *) &Info, NULL);
+                AcpiDbWalkForSpecificObjects, NULL, (void *) &Info, NULL);
 
     AcpiOsPrintf (
         "\nFound %u objects of type [%s] in the current ACPI Namespace\n",
@@ -1441,7 +1439,7 @@ AcpiDbFindNameInNamespace (
     /* Walk the namespace from the root */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                        AcpiDbWalkAndMatchName, AcpiName, NULL);
+                        AcpiDbWalkAndMatchName, NULL, AcpiName, NULL);
 
     AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
     return (AE_OK);
@@ -1942,7 +1940,7 @@ AcpiDbCheckIntegrity (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                    AcpiDbIntegrityWalk, (void *) &Info, NULL);
+                    AcpiDbIntegrityWalk, NULL, (void *) &Info, NULL);
 
     AcpiOsPrintf ("Verified %d namespace nodes with %d Objects\n",
         Info.Nodes, Info.Objects);
@@ -2129,7 +2127,7 @@ AcpiDbGetBusInfo (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                    AcpiDbBusWalk, NULL, NULL);
+                    AcpiDbBusWalk, NULL, NULL, NULL);
 }
 
 #endif /* ACPI_DEBUGGER */

Modified: head/sys/contrib/dev/acpica/debugger/dbexec.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbexec.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/debugger/dbexec.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -453,7 +453,7 @@ AcpiDbExecute (
     if (*Name == '*')
     {
         (void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT,
-                    ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL);
+                    ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL);
         return;
     }
     else

Modified: head/sys/contrib/dev/acpica/debugger/dbstats.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbstats.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/debugger/dbstats.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -446,7 +446,7 @@ AcpiDbCountNamespaceObjects (
     }
 
     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL);
+                ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);
 }
 
 

Modified: head/sys/contrib/dev/acpica/dispatcher/dsinit.c
==============================================================================
--- head/sys/contrib/dev/acpica/dispatcher/dsinit.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/dispatcher/dsinit.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -283,7 +283,7 @@ AcpiDsInitializeObjects (
      * the namespace reader lock.
      */
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
-                ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, &Info, NULL);
+                ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL);
     if (ACPI_FAILURE (Status))
     {
         ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));

Modified: head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
==============================================================================
--- head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -524,13 +524,12 @@ AcpiDsMethodDataGetValue (
 
         if (AcpiGbl_EnableInterpreterSlack)
         {
-            Object = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+            Object = AcpiUtCreateIntegerObject ((UINT64) 0);
             if (!Object)
             {
                 return_ACPI_STATUS (AE_NO_MEMORY);
             }
 
-            Object->Integer.Value = 0;
             Node->Object = Object;
         }
 

Modified: head/sys/contrib/dev/acpica/dispatcher/dsobject.c
==============================================================================
--- head/sys/contrib/dev/acpica/dispatcher/dsobject.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/dispatcher/dsobject.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -574,7 +574,7 @@ AcpiDsBuildInternalPackageObj (
          *
          * Note: technically, this is an error, from ACPI spec: "It is an error
          * for NumElements to be less than the number of elements in the
-         * PackageList". However, we just print an error message and
+         * PackageList". However, we just print a message and
          * no exception is returned. This provides Windows compatibility. Some
          * BIOSs will alter the NumElements on the fly, creating this type
          * of ill-formed package object.
@@ -598,8 +598,8 @@ AcpiDsBuildInternalPackageObj (
             Arg = Arg->Common.Next;
         }
 
-        ACPI_ERROR ((AE_INFO,
-            "Package List length (0x%X) larger than NumElements count (0x%X), truncated\n",
+        ACPI_INFO ((AE_INFO,
+            "Actual Package length (0x%X) is larger than NumElements field (0x%X), truncated\n",
             i, ElementCount));
     }
     else if (i < ElementCount)

Modified: head/sys/contrib/dev/acpica/events/evgpeblk.c
==============================================================================
--- head/sys/contrib/dev/acpica/events/evgpeblk.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/events/evgpeblk.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -1110,7 +1110,7 @@ AcpiEvCreateGpeBlock (
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
                 ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
-                AcpiEvSaveMethodInfo, GpeBlock, NULL);
+                AcpiEvSaveMethodInfo, NULL, GpeBlock, NULL);
 
     /* Return the new block */
 
@@ -1192,7 +1192,7 @@ AcpiEvInitializeGpeBlock (
 
         Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
                     ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
-                    AcpiEvMatchPrwAndGpe, &GpeInfo, NULL);
+                    AcpiEvMatchPrwAndGpe, NULL, &GpeInfo, NULL);
     }
 
     /*

Modified: head/sys/contrib/dev/acpica/events/evregion.c
==============================================================================
--- head/sys/contrib/dev/acpica/events/evregion.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/events/evregion.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -400,25 +400,21 @@ AcpiEvExecuteRegMethod (
      *  connection status 1 for connecting the handler, 0 for disconnecting
      *  the handler (Passed as a parameter)
      */
-    Args[0] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    Args[0] = AcpiUtCreateIntegerObject ((UINT64) RegionObj->Region.SpaceId);
     if (!Args[0])
     {
         Status = AE_NO_MEMORY;
         goto Cleanup1;
     }
 
-    Args[1] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    Args[1] = AcpiUtCreateIntegerObject ((UINT64) Function);
     if (!Args[1])
     {
         Status = AE_NO_MEMORY;
         goto Cleanup2;
     }
 
-    /* Setup the parameter objects */
-
-    Args[0]->Integer.Value = RegionObj->Region.SpaceId;
-    Args[1]->Integer.Value = Function;
-    Args[2] = NULL;
+    Args[2] = NULL; /* Terminate list */
 
     /* Execute the method, no return value */
 
@@ -1173,7 +1169,7 @@ AcpiEvInstallSpaceHandler (
      * of the branch
      */
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
-                ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler,
+                ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler, NULL,
                 HandlerObj, NULL);
 
 UnlockAndExit:
@@ -1213,7 +1209,7 @@ AcpiEvExecuteRegMethods (
      * regions of this Space ID before we can run any _REG methods)
      */
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
-                ACPI_NS_WALK_UNLOCK, AcpiEvRegRun,
+                ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL,
                 &SpaceId, NULL);
 
     return_ACPI_STATUS (Status);

Modified: head/sys/contrib/dev/acpica/executer/exconfig.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exconfig.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exconfig.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -263,15 +263,13 @@ AcpiExLoadTableOp (
 
         /* Table not found, return an Integer=0 and AE_OK */
 
-        DdbHandle = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        DdbHandle = AcpiUtCreateIntegerObject ((UINT64) 0);
         if (!DdbHandle)
         {
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
 
-        DdbHandle->Integer.Value = 0;
         *ReturnDesc = DdbHandle;
-
         return_ACPI_STATUS (AE_OK);
     }
 

Modified: head/sys/contrib/dev/acpica/executer/exconvrt.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exconvrt.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exconvrt.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -260,7 +260,7 @@ AcpiExConvertToInteger (
 
     /* Create a new integer */
 
-    ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    ReturnDesc = AcpiUtCreateIntegerObject (Result);
     if (!ReturnDesc)
     {
         return_ACPI_STATUS (AE_NO_MEMORY);
@@ -271,7 +271,6 @@ AcpiExConvertToInteger (
 
     /* Save the Result */
 
-    ReturnDesc->Integer.Value = Result;
     AcpiExTruncateFor32bitTable (ReturnDesc);
     *ResultDesc = ReturnDesc;
     return_ACPI_STATUS (AE_OK);

Modified: head/sys/contrib/dev/acpica/executer/exfield.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exfield.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exfield.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -249,14 +249,13 @@ AcpiExReadDataFromField (
     {
         /* Field will fit within an Integer (normal case) */
 
-        BufferDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        BufferDesc = AcpiUtCreateIntegerObject ((UINT64) 0);
         if (!BufferDesc)
         {
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
 
         Length = AcpiGbl_IntegerByteWidth;
-        BufferDesc->Integer.Value = 0;
         Buffer = &BufferDesc->Integer.Value;
     }
 

Modified: head/sys/contrib/dev/acpica/executer/exoparg1.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exoparg1.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exoparg1.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -183,13 +183,12 @@ AcpiExOpcode_0A_0T_1R (
 
         /* Create a return object of type Integer */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject (AcpiOsGetTimer ());
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
             goto Cleanup;
         }
-        ReturnDesc->Integer.Value = AcpiOsGetTimer ();
         break;
 
     default:                /*  Unknown opcode  */
@@ -733,7 +732,7 @@ AcpiExOpcode_1A_0T_1R (
     {
     case AML_LNOT_OP:               /* LNot (Operand) */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) 0);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
@@ -838,14 +837,12 @@ AcpiExOpcode_1A_0T_1R (
 
         /* Allocate a descriptor to hold the type. */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) Type);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
             goto Cleanup;
         }
-
-        ReturnDesc->Integer.Value = Type;
         break;
 
 
@@ -917,14 +914,12 @@ AcpiExOpcode_1A_0T_1R (
          * Now that we have the size of the object, create a result
          * object to hold the value
          */
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject (Value);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
             goto Cleanup;
         }
-
-        ReturnDesc->Integer.Value = Value;
         break;
 
 
@@ -1089,21 +1084,18 @@ AcpiExOpcode_1A_0T_1R (
                      * NOTE: index into a buffer is NOT a pointer to a
                      * sub-buffer of the main buffer, it is only a pointer to a
                      * single element (byte) of the buffer!
+                     *
+                     * Since we are returning the value of the buffer at the
+                     * indexed location, we don't need to add an additional
+                     * reference to the buffer itself.
                      */
-                    ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+                    ReturnDesc = AcpiUtCreateIntegerObject ((UINT64)
+                        TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]);
                     if (!ReturnDesc)
                     {
                         Status = AE_NO_MEMORY;
                         goto Cleanup;
                     }
-
-                    /*
-                     * Since we are returning the value of the buffer at the
-                     * indexed location, we don't need to add an additional
-                     * reference to the buffer itself.
-                     */
-                    ReturnDesc->Integer.Value =
-                        TempDesc->Buffer.Pointer[Operand[0]->Reference.Value];
                     break;
 
 

Modified: head/sys/contrib/dev/acpica/executer/exoparg6.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exoparg6.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exoparg6.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -344,8 +344,9 @@ AcpiExOpcode_6A_0T_1R (
         }
 
         /* Create an integer for the return value */
+        /* Default return value is ACPI_INTEGER_MAX if no match found */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject (ACPI_INTEGER_MAX);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
@@ -353,10 +354,6 @@ AcpiExOpcode_6A_0T_1R (
 
         }
 
-        /* Default return value if no match found */
-
-        ReturnDesc->Integer.Value = ACPI_INTEGER_MAX;
-
         /*
          * Examine each element until a match is found. Both match conditions
          * must be satisfied for a match to occur. Within the loop,

Modified: head/sys/contrib/dev/acpica/executer/exregion.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exregion.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exregion.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -157,7 +157,8 @@ AcpiExSystemMemorySpaceHandler (
     void                    *LogicalAddrPtr = NULL;
     ACPI_MEM_SPACE_CONTEXT  *MemInfo = RegionContext;
     UINT32                  Length;
-    ACPI_SIZE               WindowSize;
+    ACPI_SIZE               MapLength;
+    ACPI_SIZE               PageBoundaryMapLength;
 #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
     UINT32                  Remainder;
 #endif
@@ -227,26 +228,45 @@ AcpiExSystemMemorySpaceHandler (
         }
 
         /*
-         * Don't attempt to map memory beyond the end of the region, and
-         * constrain the maximum mapping size to something reasonable.
+         * October 2009: Attempt to map from the requested address to the
+         * end of the region. However, we will never map more than one
+         * page, nor will we cross a page boundary.
          */
-        WindowSize = (ACPI_SIZE)
+        MapLength = (ACPI_SIZE)
             ((MemInfo->Address + MemInfo->Length) - Address);
 
-        if (WindowSize > ACPI_SYSMEM_REGION_WINDOW_SIZE)
+        /*
+         * If mapping the entire remaining portion of the region will cross
+         * a page boundary, just map up to the page boundary, do not cross.
+         * On some systems, crossing a page boundary while mapping regions
+         * can cause warnings if the pages have different attributes
+         * due to resource management.
+         *
+         * This has the added benefit of constraining a single mapping to
+         * one page, which is similar to the original code that used a 4k
+         * maximum window.
+         */
+        PageBoundaryMapLength =
+            ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address;
+        if (PageBoundaryMapLength == 0)
+        {
+            PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE;
+        }
+
+        if (MapLength > PageBoundaryMapLength)
         {
-            WindowSize = ACPI_SYSMEM_REGION_WINDOW_SIZE;
+            MapLength = PageBoundaryMapLength;
         }
 
         /* Create a new mapping starting at the address given */
 
         MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
-            (ACPI_PHYSICAL_ADDRESS) Address, WindowSize);
+            (ACPI_PHYSICAL_ADDRESS) Address, MapLength);
         if (!MemInfo->MappedLogicalAddress)
         {
             ACPI_ERROR ((AE_INFO,
                 "Could not map memory at %8.8X%8.8X, size %X",
-                ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) WindowSize));
+                ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength));
             MemInfo->MappedLength = 0;
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
@@ -254,7 +274,7 @@ AcpiExSystemMemorySpaceHandler (
         /* Save the physical address and mapping size */
 
         MemInfo->MappedPhysicalAddress = Address;
-        MemInfo->MappedLength = WindowSize;
+        MemInfo->MappedLength = MapLength;
     }
 
     /*

Modified: head/sys/contrib/dev/acpica/include/acconfig.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acconfig.h	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/include/acconfig.h	Mon Nov 16 21:47:12 2009	(r199337)
@@ -177,9 +177,9 @@
 
 #define ACPI_MAX_REFERENCE_COUNT        0x800
 
-/* Size of cached memory mapping for system memory operation region */
+/* Default page size for use in mapping memory for operation regions */
 
-#define ACPI_SYSMEM_REGION_WINDOW_SIZE  4096
+#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
 
 /* OwnerId tracking. 8 entries allows for 255 OwnerIds */
 

Modified: head/sys/contrib/dev/acpica/include/acmacros.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acmacros.h	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/include/acmacros.h	Mon Nov 16 21:47:12 2009	(r199337)
@@ -403,6 +403,7 @@
 #define ACPI_ERROR_NAMESPACE(s, e)      AcpiNsReportError (AE_INFO, s, e);
 #define ACPI_ERROR_METHOD(s, n, p, e)   AcpiNsReportMethodError (AE_INFO, s, n, p, e);
 #define ACPI_WARN_PREDEFINED(plist)     AcpiUtPredefinedWarning plist
+#define ACPI_INFO_PREDEFINED(plist)     AcpiUtPredefinedInfo plist
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Mon Nov 16 21:53:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B025A1065676;
	Mon, 16 Nov 2009 21:53:56 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F4168FC19;
	Mon, 16 Nov 2009 21:53:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGLruPB082710;
	Mon, 16 Nov 2009 21:53:56 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGLrutu082708;
	Mon, 16 Nov 2009 21:53:56 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911162153.nAGLrutu082708@svn.freebsd.org>
From: Jung-uk Kim 
Date: Mon, 16 Nov 2009 21:53:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199338 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 16 Nov 2009 21:53:56 -0000

Author: jkim
Date: Mon Nov 16 21:53:56 2009
New Revision: 199338
URL: http://svn.freebsd.org/changeset/base/199338

Log:
  Add a forgotten module Makefile change from the previous commit.

Modified:
  head/sys/modules/acpi/acpi/Makefile

Modified: head/sys/modules/acpi/acpi/Makefile
==============================================================================
--- head/sys/modules/acpi/acpi/Makefile	Mon Nov 16 21:47:12 2009	(r199337)
+++ head/sys/modules/acpi/acpi/Makefile	Mon Nov 16 21:53:56 2009	(r199338)
@@ -41,8 +41,8 @@ SRCS+=	exprep.c exregion.c exresnte.c ex
 SRCS+=	exstoren.c exstorob.c exsystem.c exutils.c
 SRCS+=	hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c hwvalid.c hwxface.c
 SRCS+=	nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c nsload.c nsnames.c
-SRCS+=	nsobject.c nsparse.c nspredef.c nsrepair.c nssearch.c nsutils.c
-SRCS+=	nswalk.c nsxfeval.c nsxfname.c nsxfobj.c
+SRCS+=	nsobject.c nsparse.c nspredef.c nsrepair.c nsrepair2.c nssearch.c
+SRCS+=	nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c
 SRCS+=	psargs.c psloop.c psopcode.c psparse.c psscope.c pstree.c psutils.c
 SRCS+=	pswalk.c psxface.c
 SRCS+=	rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c rsio.c rsirq.c rslist.c

From owner-svn-src-all@FreeBSD.ORG  Mon Nov 16 22:52:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 953CA1065679;
	Mon, 16 Nov 2009 22:52:52 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 84E318FC19;
	Mon, 16 Nov 2009 22:52:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAGMqqrO083975;
	Mon, 16 Nov 2009 22:52:52 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAGMqqcx083973;
	Mon, 16 Nov 2009 22:52:52 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200911162252.nAGMqqcx083973@svn.freebsd.org>
From: Xin LI 
Date: Mon, 16 Nov 2009 22:52:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199339 - head/usr.bin/gzip
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 16 Nov 2009 22:52:52 -0000

Author: delphij
Date: Mon Nov 16 22:52:52 2009
New Revision: 199339
URL: http://svn.freebsd.org/changeset/base/199339

Log:
  We should distinguish between a real truncated case and EOF after
  BZ_STREAM_END triggered re-init.  Do it by introducing a new flag
  to represent the 'cold' case after bzip2 state is reinitialized.
  
  This fixes regression reported on -current@ as well as another one
  I found during twiddling with gzip.
  
  Reported by:	swell.k gmail.com
  MFC after:	1 week

Modified:
  head/usr.bin/gzip/unbzip2.c

Modified: head/usr.bin/gzip/unbzip2.c
==============================================================================
--- head/usr.bin/gzip/unbzip2.c	Mon Nov 16 21:53:56 2009	(r199338)
+++ head/usr.bin/gzip/unbzip2.c	Mon Nov 16 22:52:52 2009	(r199339)
@@ -36,7 +36,7 @@
 static off_t
 unbzip2(int in, int out, char *pre, size_t prelen, off_t *bytes_in)
 {
-	int		ret, end_of_file;
+	int		ret, end_of_file, cold = 0;
 	off_t		bytes_out = 0;
 	bz_stream	bzs;
 	static char	*inbuf, *outbuf;
@@ -86,8 +86,18 @@ unbzip2(int in, int out, char *pre, size
 	        switch (ret) {
 	        case BZ_STREAM_END:
 	        case BZ_OK:
-	                if (ret == BZ_OK && end_of_file)
-	                        maybe_err("read");
+	                if (ret == BZ_OK && end_of_file) {
+				/*
+				 * If we hit this after a stream end, consider
+				 * it as the end of the whole file and don't
+				 * bail out.
+				 */
+				if (cold == 1)
+					ret = BZ_STREAM_END;
+				else
+					maybe_errx("truncated file");
+			}
+			cold = 0;
 	                if (!tflag && bzs.avail_out != BUFLEN) {
 				ssize_t	n;
 
@@ -100,6 +110,7 @@ unbzip2(int in, int out, char *pre, size
 				if (BZ2_bzDecompressEnd(&bzs) != BZ_OK ||
 				    BZ2_bzDecompressInit(&bzs, 0, 0) != BZ_OK)
 					maybe_errx("bzip2 re-init");
+				cold = 1;
 				ret = BZ_OK;
 			}
 			break;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 00:11:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 855FF106566B;
	Tue, 17 Nov 2009 00:11:23 +0000 (UTC)
	(envelope-from lynx.ripe@gmail.com)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153])
	by mx1.freebsd.org (Postfix) with ESMTP id 6FCFC8FC13;
	Tue, 17 Nov 2009 00:11:16 +0000 (UTC)
Received: by fg-out-1718.google.com with SMTP id e12so1286730fga.13
	for ; Mon, 16 Nov 2009 16:11:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:content-type
	:content-transfer-encoding;
	bh=L5rJ7vonNbE57RAkR/QN0t/1omRGKH7cQU0YZbcKbUw=;
	b=SsNPV8dRhRtUo5DN7vajPaJlZvjNwKzjMPZFDKvjLPpfh2i7XAH8Ov1IhxyLq0QrZ3
	6gboLfUKkHT5yJAXqC+DnXvOQgRgWSNEZn61tnJ1ZAAsjWAke5BU0bb+yYaJXXaXOezR
	JqADohtEJbno7WlcPusSFUXVeCeaCawDZdLhc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:content-type:content-transfer-encoding;
	b=as6mC6rJEfb+vmaVBHtB/QMmoAq7SZ90PXmeuV27N59dvwAgq+tGZJBxp1be3VsOtB
	IScMPJ1gfuS8YY/NT7pGtkYN3FGQY6PzavLwqKj08dWWCTwak/IolO5qCwnNaS8SVkvu
	OGwgBWUxNyfA63E2VT8B3MiG5guz3TgyQzoow=
Received: by 10.86.254.17 with SMTP id b17mr2888688fgi.65.1258415435685;
	Mon, 16 Nov 2009 15:50:35 -0800 (PST)
Received: from lynx.homenet (244-200-132-95.pool.ukrtel.net [95.132.200.244])
	by mx.google.com with ESMTPS id 3sm327497fge.29.2009.11.16.15.50.34
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Mon, 16 Nov 2009 15:50:34 -0800 (PST)
Message-ID: <4B01E548.7040708@gmail.com>
Date: Tue, 17 Nov 2009 01:50:32 +0200
From: Dmitry Pryanishnikov 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US;
	rv:1.8.1.23) Gecko/20090906 SeaMonkey/1.1.18
MIME-Version: 1.0
To: Edwin Groothuis 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r194783 - head/lib/libc/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 00:11:23 -0000


Hello!

> Author: edwin
> Date: Tue Jun 23 22:28:44 2009
> New Revision: 194783
> URL: http://svn.freebsd.org/changeset/base/194783
> 
> Log:
>   Remove duplicate if-statement on gmt_is_set in gmtsub().
>   
>   MFC after:	1 week
> 
> Modified:
>   head/lib/libc/stdtime/localtime.c
> 
> Modified: head/lib/libc/stdtime/localtime.c
> ==============================================================================
> --- head/lib/libc/stdtime/localtime.c	Tue Jun 23 22:22:20 2009	(r194782)
> +++ head/lib/libc/stdtime/localtime.c	Tue Jun 23 22:28:44 2009	(r194783)
> @@ -1472,18 +1472,16 @@ struct tm * const	tmp;
>  {
>  	register struct tm *	result;
>  
> +	_MUTEX_LOCK(&gmt_mutex);
>  	if (!gmt_is_set) {
> -		_MUTEX_LOCK(&gmt_mutex);
> -		if (!gmt_is_set) {

   This change looks like a (small?) pessimization to me: before it, 
_MUTEX_LOCK/_MUTEX_UNLOCK pair would be skipped for the case gmt_is_set 
== TRUE (all invocations except the first one), now it won't. I'm not 
sure whether this is critical here though...


Sincerely, Dmitry
-- 
nic-hdl: LYNX-RIPE

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 07:06:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F2821065676;
	Tue, 17 Nov 2009 07:06:42 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1DA748FC14;
	Tue, 17 Nov 2009 07:06:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAH76fkU094562;
	Tue, 17 Nov 2009 07:06:41 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAH76fdW094560;
	Tue, 17 Nov 2009 07:06:41 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911170706.nAH76fdW094560@svn.freebsd.org>
From: Christian Brueffer 
Date: Tue, 17 Nov 2009 07:06:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199349 - head/share/man/man3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 07:06:42 -0000

Author: brueffer
Date: Tue Nov 17 07:06:41 2009
New Revision: 199349
URL: http://svn.freebsd.org/changeset/base/199349

Log:
  Fix typo.
  
  PR:		140615
  Submitted by:	Andrius Morkunas 
  MFC after:	3 days

Modified:
  head/share/man/man3/queue.3

Modified: head/share/man/man3/queue.3
==============================================================================
--- head/share/man/man3/queue.3	Tue Nov 17 07:01:49 2009	(r199348)
+++ head/share/man/man3/queue.3	Tue Nov 17 07:06:41 2009	(r199349)
@@ -233,7 +233,7 @@ O(1) removal of any entry in the list.
 However:
 .Bl -enum -compact -offset indent
 .It
-Each elements requires two pointers rather than one.
+Each element requires two pointers rather than one.
 .It
 Code size and execution time of operations (except for removal) is about
 twice that of the singly-linked data-structures.

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 07:29:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EAD13106568B;
	Tue, 17 Nov 2009 07:29:35 +0000 (UTC)
	(envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D98258FC1B;
	Tue, 17 Nov 2009 07:29:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAH7TZPi095099;
	Tue, 17 Nov 2009 07:29:35 GMT
	(envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAH7TZN7095097;
	Tue, 17 Nov 2009 07:29:35 GMT
	(envelope-from netchild@svn.freebsd.org)
Message-Id: <200911170729.nAH7TZN7095097@svn.freebsd.org>
From: Alexander Leidinger 
Date: Tue, 17 Nov 2009 07:29:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199351 - head/bin/ps
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 07:29:36 -0000

Author: netchild
Date: Tue Nov 17 07:29:35 2009
New Revision: 199351
URL: http://svn.freebsd.org/changeset/base/199351

Log:
  Fix small resource leak (memory).
  
  Reviewed by:	gad
  MFC after:	1 week

Modified:
  head/bin/ps/keyword.c

Modified: head/bin/ps/keyword.c
==============================================================================
--- head/bin/ps/keyword.c	Tue Nov 17 07:21:27 2009	(r199350)
+++ head/bin/ps/keyword.c	Tue Nov 17 07:29:35 2009	(r199351)
@@ -330,6 +330,7 @@ findvar(char *p, int user, char **header
 				errx(1, "malloc failed");
 			snprintf(realfmt, rflen, "%s=%s", v->alias, hp);
 			parsefmt(realfmt, user);
+			free(realfmt);
 		}
 		return ((VAR *)NULL);
 	}

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 09:35:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F1CD61065670;
	Tue, 17 Nov 2009 09:35:13 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E02348FC08;
	Tue, 17 Nov 2009 09:35:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAH9ZDWC098543;
	Tue, 17 Nov 2009 09:35:13 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAH9ZDB3098540;
	Tue, 17 Nov 2009 09:35:13 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200911170935.nAH9ZDB3098540@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 17 Nov 2009 09:35:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199352 - in stable/8/sys: dev/ichwd modules/ichwd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 09:35:14 -0000

Author: avg
Date: Tue Nov 17 09:35:13 2009
New Revision: 199352
URL: http://svn.freebsd.org/changeset/base/199352

Log:
  MFC r199015: ichwd: don't attach to isa pnp device(s) by accident

Modified:
  stable/8/sys/dev/ichwd/ichwd.c
  stable/8/sys/modules/ichwd/Makefile
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/dev/ichwd/ichwd.c
==============================================================================
--- stable/8/sys/dev/ichwd/ichwd.c	Tue Nov 17 07:29:35 2009	(r199351)
+++ stable/8/sys/dev/ichwd/ichwd.c	Tue Nov 17 09:35:13 2009	(r199352)
@@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 
 #include 
@@ -393,7 +394,9 @@ static int
 ichwd_probe(device_t dev)
 {
 
-	(void)dev;
+	/* Do not claim some ISA PnP device by accident. */
+	if (isa_get_logicalid(dev) != 0)
+		return (ENXIO);
 	return (0);
 }
 

Modified: stable/8/sys/modules/ichwd/Makefile
==============================================================================
--- stable/8/sys/modules/ichwd/Makefile	Tue Nov 17 07:29:35 2009	(r199351)
+++ stable/8/sys/modules/ichwd/Makefile	Tue Nov 17 09:35:13 2009	(r199352)
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../dev/ichwd
 
 KMOD=	ichwd
-SRCS=	ichwd.c device_if.h bus_if.h pci_if.h
+SRCS=	ichwd.c device_if.h bus_if.h pci_if.h isa_if.h
 
 .include 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 09:37:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0D603106566C;
	Tue, 17 Nov 2009 09:37:44 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EFC338FC1B;
	Tue, 17 Nov 2009 09:37:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAH9bh7G098774;
	Tue, 17 Nov 2009 09:37:43 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAH9bhUW098771;
	Tue, 17 Nov 2009 09:37:43 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200911170937.nAH9bhUW098771@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 17 Nov 2009 09:37:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199353 - in stable/7/sys: dev/ichwd modules/ichwd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 09:37:44 -0000

Author: avg
Date: Tue Nov 17 09:37:43 2009
New Revision: 199353
URL: http://svn.freebsd.org/changeset/base/199353

Log:
  MFC r199015: ichwd: don't attach to isa pnp device(s) by accident

Modified:
  stable/7/sys/dev/ichwd/ichwd.c
  stable/7/sys/modules/ichwd/Makefile
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ichwd/ichwd.c
==============================================================================
--- stable/7/sys/dev/ichwd/ichwd.c	Tue Nov 17 09:35:13 2009	(r199352)
+++ stable/7/sys/dev/ichwd/ichwd.c	Tue Nov 17 09:37:43 2009	(r199353)
@@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 
 #include 
@@ -393,7 +394,9 @@ static int
 ichwd_probe(device_t dev)
 {
 
-	(void)dev;
+	/* Do not claim some ISA PnP device by accident. */
+	if (isa_get_logicalid(dev) != 0)
+		return (ENXIO);
 	return (0);
 }
 

Modified: stable/7/sys/modules/ichwd/Makefile
==============================================================================
--- stable/7/sys/modules/ichwd/Makefile	Tue Nov 17 09:35:13 2009	(r199352)
+++ stable/7/sys/modules/ichwd/Makefile	Tue Nov 17 09:37:43 2009	(r199353)
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../dev/ichwd
 
 KMOD=	ichwd
-SRCS=	ichwd.c device_if.h bus_if.h pci_if.h
+SRCS=	ichwd.c device_if.h bus_if.h pci_if.h isa_if.h
 
 .include 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 10:59:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 007D81065670;
	Tue, 17 Nov 2009 10:59:52 +0000 (UTC) (envelope-from bms@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C99038FC15;
	Tue, 17 Nov 2009 10:59:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHAxpJa004234;
	Tue, 17 Nov 2009 10:59:51 GMT (envelope-from bms@svn.freebsd.org)
Received: (from bms@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHAxpRK004232;
	Tue, 17 Nov 2009 10:59:51 GMT (envelope-from bms@svn.freebsd.org)
Message-Id: <200911171059.nAHAxpRK004232@svn.freebsd.org>
From: Bruce M Simpson 
Date: Tue, 17 Nov 2009 10:59:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199354 - stable/8/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 10:59:52 -0000

Author: bms
Date: Tue Nov 17 10:59:51 2009
New Revision: 199354
URL: http://svn.freebsd.org/changeset/base/199354

Log:
  MFC r199287:
    Fix a functional regression in multicast.
  
    Userland daemons need to see IGMP traffic regardless of the group;
    omit the imo filter check if the proto is IGMP. The kernel part
    of IGMP will have already filtered appropriately at this point.
  
  Submitted by:   Franz Struwig
  Reported by:    Ivor Prebeg, Franz Struwig

Modified:
  stable/8/sys/netinet/raw_ip.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/netinet/raw_ip.c
==============================================================================
--- stable/8/sys/netinet/raw_ip.c	Tue Nov 17 09:37:43 2009	(r199353)
+++ stable/8/sys/netinet/raw_ip.c	Tue Nov 17 10:59:51 2009	(r199354)
@@ -343,17 +343,35 @@ rip_input(struct mbuf *m, int off)
 		 */
 		if (inp->inp_moptions != NULL &&
 		    IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
-			struct sockaddr_in group;
+			/*
+			 * If the incoming datagram is for IGMP, allow it
+			 * through unconditionally to the raw socket.
+			 *
+			 * In the case of IGMPv2, we may not have explicitly
+			 * joined the group, and may have set IFF_ALLMULTI
+			 * on the interface. imo_multi_filter() may discard
+			 * control traffic we actually need to see.
+			 *
+			 * Userland multicast routing daemons should continue
+			 * filter the control traffic appropriately.
+			 */
 			int blocked;
 
-			bzero(&group, sizeof(struct sockaddr_in));
-			group.sin_len = sizeof(struct sockaddr_in);
-			group.sin_family = AF_INET;
-			group.sin_addr = ip->ip_dst;
-
-			blocked = imo_multi_filter(inp->inp_moptions, ifp,
-			    (struct sockaddr *)&group,
-			    (struct sockaddr *)&ripsrc);
+			blocked = MCAST_PASS;
+			if (proto != IPPROTO_IGMP) {
+				struct sockaddr_in group;
+
+				bzero(&group, sizeof(struct sockaddr_in));
+				group.sin_len = sizeof(struct sockaddr_in);
+				group.sin_family = AF_INET;
+				group.sin_addr = ip->ip_dst;
+
+				blocked = imo_multi_filter(inp->inp_moptions,
+				    ifp,
+				    (struct sockaddr *)&group,
+				    (struct sockaddr *)&ripsrc);
+			}
+
 			if (blocked != MCAST_PASS) {
 				IPSTAT_INC(ips_notmember);
 				continue;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 11:39:16 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 377F31065672;
	Tue, 17 Nov 2009 11:39:16 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2570E8FC13;
	Tue, 17 Nov 2009 11:39:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHBdG4M005127;
	Tue, 17 Nov 2009 11:39:16 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHBdFAA005120;
	Tue, 17 Nov 2009 11:39:15 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171139.nAHBdFAA005120@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 11:39:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199355 - in head/sys: ddb kern sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 11:39:16 -0000

Author: kib
Date: Tue Nov 17 11:39:15 2009
New Revision: 199355
URL: http://svn.freebsd.org/changeset/base/199355

Log:
  Among signal generation syscalls, only sigqueue(2) is allowed by POSIX
  to fail due to lack of resources to queue siginfo. Add KSI_SIGQ flag
  that allows sigqueue_add() to fail while trying to allocate memory for
  new siginfo. When the flag is not set, behaviour is the same as for
  KSI_TRAP: if memory cannot be allocated, set bit in sq_kill. KSI_TRAP is
  kept to preserve KBI.
  
  Add SI_KERNEL si_code, to be used in siginfo.si_code when signal is
  generated by kernel. Deliver siginfo when signal is generated by kill(2)
  family of syscalls (SI_USER with properly filled si_uid and si_pid), or
  by kernel (SI_KERNEL, mostly job control or SIGIO). Since KSI_SIGQ flag
  is not set for the ksi, low memory condition cause old behaviour.
  
  Keep psignal(9) KBI intact, but modify it to generate SI_KERNEL
  si_code. Pgsignal(9) and gsignal(9) now take ksi explicitely. Add
  pksignal(9) that behaves like psignal but takes ksi, and ddb kill
  command implemented as pksignal(..., ksi = NULL) to not do allocation
  while in debugger.
  
  While there, remove some register specifiers and use ANSI C prototypes.
  
  Reviewed by:	davidxu
  MFC after:	1 month

Modified:
  head/sys/ddb/db_command.c
  head/sys/kern/kern_sig.c
  head/sys/kern/tty.c
  head/sys/sys/signal.h
  head/sys/sys/signalvar.h

Modified: head/sys/ddb/db_command.c
==============================================================================
--- head/sys/ddb/db_command.c	Tue Nov 17 10:59:51 2009	(r199354)
+++ head/sys/ddb/db_command.c	Tue Nov 17 11:39:15 2009	(r199355)
@@ -652,7 +652,7 @@ db_kill(dummy1, dummy2, dummy3, dummy4)
 	if (PROC_TRYLOCK(p) == 0)
 		DB_ERROR(("Can't lock process with pid %ld\n", (long) pid));
 	else {
-		psignal(p, sig);
+		pksignal(p, sig, NULL);
 		PROC_UNLOCK(p);
 	}
 

Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c	Tue Nov 17 10:59:51 2009	(r199354)
+++ head/sys/kern/kern_sig.c	Tue Nov 17 11:39:15 2009	(r199355)
@@ -99,7 +99,8 @@ SDT_PROBE_ARGTYPE(proc, kernel, , signal
 
 static int	coredump(struct thread *);
 static char	*expand_name(const char *, uid_t, pid_t);
-static int	killpg1(struct thread *td, int sig, int pgid, int all);
+static int	killpg1(struct thread *td, int sig, int pgid, int all,
+		    ksiginfo_t *ksi);
 static int	issignal(struct thread *td, int stop_allowed);
 static int	sigprop(int sig);
 static void	tdsigwakeup(struct thread *, int, sig_t, int);
@@ -381,7 +382,8 @@ sigqueue_add(sigqueue_t *sq, int signo, 
 		ksi->ksi_sigq = sq;
 	}
 
-	if ((si->ksi_flags & KSI_TRAP) != 0) {
+	if ((si->ksi_flags & KSI_TRAP) != 0 ||
+	    (si->ksi_flags & KSI_SIGQ) == 0) {
 		if (ret != 0)
 			SIGADDSET(sq->sq_kill, signo);
 		ret = 0;
@@ -1611,11 +1613,9 @@ kern_sigaltstack(struct thread *td, stac
  * cp is calling process.
  */
 static int
-killpg1(td, sig, pgid, all)
-	register struct thread *td;
-	int sig, pgid, all;
+killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi)
 {
-	register struct proc *p;
+	struct proc *p;
 	struct pgrp *pgrp;
 	int nfound = 0;
 
@@ -1634,7 +1634,7 @@ killpg1(td, sig, pgid, all)
 			if (p_cansignal(td, p, sig) == 0) {
 				nfound++;
 				if (sig)
-					psignal(p, sig);
+					pksignal(p, sig, ksi);
 			}
 			PROC_UNLOCK(p);
 		}
@@ -1665,7 +1665,7 @@ killpg1(td, sig, pgid, all)
 			if (p_cansignal(td, p, sig) == 0) {
 				nfound++;
 				if (sig)
-					psignal(p, sig);
+					pksignal(p, sig, ksi);
 			}
 			PROC_UNLOCK(p);
 		}
@@ -1682,11 +1682,10 @@ struct kill_args {
 #endif
 /* ARGSUSED */
 int
-kill(td, uap)
-	register struct thread *td;
-	register struct kill_args *uap;
+kill(struct thread *td, struct kill_args *uap)
 {
-	register struct proc *p;
+	ksiginfo_t ksi;
+	struct proc *p;
 	int error;
 
 	AUDIT_ARG_SIGNUM(uap->signum);
@@ -1694,6 +1693,12 @@ kill(td, uap)
 	if ((u_int)uap->signum > _SIG_MAXSIG)
 		return (EINVAL);
 
+	ksiginfo_init(&ksi);
+	ksi.ksi_signo = uap->signum;
+	ksi.ksi_code = SI_USER;
+	ksi.ksi_pid = td->td_proc->p_pid;
+	ksi.ksi_uid = td->td_ucred->cr_ruid;
+
 	if (uap->pid > 0) {
 		/* kill single process */
 		if ((p = pfind(uap->pid)) == NULL) {
@@ -1703,17 +1708,17 @@ kill(td, uap)
 		AUDIT_ARG_PROCESS(p);
 		error = p_cansignal(td, p, uap->signum);
 		if (error == 0 && uap->signum)
-			psignal(p, uap->signum);
+			pksignal(p, uap->signum, &ksi);
 		PROC_UNLOCK(p);
 		return (error);
 	}
 	switch (uap->pid) {
 	case -1:		/* broadcast signal */
-		return (killpg1(td, uap->signum, 0, 1));
+		return (killpg1(td, uap->signum, 0, 1, &ksi));
 	case 0:			/* signal own process group */
-		return (killpg1(td, uap->signum, 0, 0));
+		return (killpg1(td, uap->signum, 0, 0, &ksi));
 	default:		/* negative explicit process group */
-		return (killpg1(td, uap->signum, -uap->pid, 0));
+		return (killpg1(td, uap->signum, -uap->pid, 0, &ksi));
 	}
 	/* NOTREACHED */
 }
@@ -1727,17 +1732,21 @@ struct okillpg_args {
 #endif
 /* ARGSUSED */
 int
-okillpg(td, uap)
-	struct thread *td;
-	register struct okillpg_args *uap;
+okillpg(struct thread *td, struct okillpg_args *uap)
 {
+	ksiginfo_t ksi;
 
 	AUDIT_ARG_SIGNUM(uap->signum);
 	AUDIT_ARG_PID(uap->pgid);
 	if ((u_int)uap->signum > _SIG_MAXSIG)
 		return (EINVAL);
 
-	return (killpg1(td, uap->signum, uap->pgid, 0));
+	ksiginfo_init(&ksi);
+	ksi.ksi_signo = uap->signum;
+	ksi.ksi_code = SI_USER;
+	ksi.ksi_pid = td->td_proc->p_pid;
+	ksi.ksi_uid = td->td_ucred->cr_ruid;
+	return (killpg1(td, uap->signum, uap->pgid, 0, &ksi));
 }
 #endif /* COMPAT_43 */
 
@@ -1772,6 +1781,7 @@ sigqueue(struct thread *td, struct sigqu
 	error = p_cansignal(td, p, uap->signum);
 	if (error == 0 && uap->signum != 0) {
 		ksiginfo_init(&ksi);
+		ksi.ksi_flags = KSI_SIGQ;
 		ksi.ksi_signo = uap->signum;
 		ksi.ksi_code = SI_QUEUE;
 		ksi.ksi_pid = td->td_proc->p_pid;
@@ -1787,8 +1797,7 @@ sigqueue(struct thread *td, struct sigqu
  * Send a signal to a process group.
  */
 void
-gsignal(pgid, sig)
-	int pgid, sig;
+gsignal(int pgid, int sig, ksiginfo_t *ksi)
 {
 	struct pgrp *pgrp;
 
@@ -1797,7 +1806,7 @@ gsignal(pgid, sig)
 		pgrp = pgfind(pgid);
 		sx_sunlock(&proctree_lock);
 		if (pgrp != NULL) {
-			pgsignal(pgrp, sig, 0);
+			pgsignal(pgrp, sig, 0, ksi);
 			PGRP_UNLOCK(pgrp);
 		}
 	}
@@ -1808,18 +1817,16 @@ gsignal(pgid, sig)
  * limit to members which have a controlling terminal.
  */
 void
-pgsignal(pgrp, sig, checkctty)
-	struct pgrp *pgrp;
-	int sig, checkctty;
+pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi)
 {
-	register struct proc *p;
+	struct proc *p;
 
 	if (pgrp) {
 		PGRP_LOCK_ASSERT(pgrp, MA_OWNED);
 		LIST_FOREACH(p, &pgrp->pg_members, p_pglist) {
 			PROC_LOCK(p);
 			if (checkctty == 0 || p->p_flag & P_CONTROLT)
-				psignal(p, sig);
+				pksignal(p, sig, ksi);
 			PROC_UNLOCK(p);
 		}
 	}
@@ -1940,7 +1947,19 @@ sigtd(struct proc *p, int sig, int prop)
 void
 psignal(struct proc *p, int sig)
 {
-	(void) tdsignal(p, NULL, sig, NULL);
+	ksiginfo_t ksi;
+
+	ksiginfo_init(&ksi);
+	ksi.ksi_signo = sig;
+	ksi.ksi_code = SI_KERNEL;
+	(void) tdsignal(p, NULL, sig, &ksi);
+}
+
+void
+pksignal(struct proc *p, int sig, ksiginfo_t *ksi)
+{
+
+	(void) tdsignal(p, NULL, sig, ksi);
 }
 
 int
@@ -3143,8 +3162,13 @@ pgsigio(sigiop, sig, checkctty)
 	struct sigio **sigiop;
 	int sig, checkctty;
 {
+	ksiginfo_t ksi;
 	struct sigio *sigio;
 
+	ksiginfo_init(&ksi);
+	ksi.ksi_signo = sig;
+	ksi.ksi_code = SI_KERNEL;
+
 	SIGIO_LOCK();
 	sigio = *sigiop;
 	if (sigio == NULL) {

Modified: head/sys/kern/tty.c
==============================================================================
--- head/sys/kern/tty.c	Tue Nov 17 10:59:51 2009	(r199354)
+++ head/sys/kern/tty.c	Tue Nov 17 11:39:15 2009	(r199355)
@@ -355,6 +355,7 @@ tty_wait_background(struct tty *tp, stru
 {
 	struct proc *p = td->td_proc;
 	struct pgrp *pg;
+	ksiginfo_t ksi;
 	int error;
 
 	MPASS(sig == SIGTTIN || sig == SIGTTOU);
@@ -396,8 +397,14 @@ tty_wait_background(struct tty *tp, stru
 		 * Send the signal and sleep until we're the new
 		 * foreground process group.
 		 */
+		if (sig != 0) {
+			ksiginfo_init(&ksi);
+			ksi.ksi_code = SI_KERNEL;
+			ksi.ksi_signo = sig;
+			sig = 0;
+		}
 		PGRP_LOCK(pg);
-		pgsignal(pg, sig, 1);
+		pgsignal(pg, ksi.ksi_signo, 1, &ksi);
 		PGRP_UNLOCK(pg);
 
 		error = tty_wait(tp, &tp->t_bgwait);
@@ -1240,6 +1247,8 @@ tty_signal_sessleader(struct tty *tp, in
 void
 tty_signal_pgrp(struct tty *tp, int sig)
 {
+	ksiginfo_t ksi;
+
 	tty_lock_assert(tp, MA_OWNED);
 	MPASS(sig >= 1 && sig < NSIG);
 
@@ -1249,8 +1258,11 @@ tty_signal_pgrp(struct tty *tp, int sig)
 	if (sig == SIGINFO && !(tp->t_termios.c_lflag & NOKERNINFO))
 		tty_info(tp);
 	if (tp->t_pgrp != NULL) {
+		ksiginfo_init(&ksi);
+		ksi.ksi_signo = sig;
+		ksi.ksi_code = SI_KERNEL;
 		PGRP_LOCK(tp->t_pgrp);
-		pgsignal(tp->t_pgrp, sig, 1);
+		pgsignal(tp->t_pgrp, sig, 1, &ksi);
 		PGRP_UNLOCK(tp->t_pgrp);
 	}
 }

Modified: head/sys/sys/signal.h
==============================================================================
--- head/sys/sys/signal.h	Tue Nov 17 10:59:51 2009	(r199354)
+++ head/sys/sys/signal.h	Tue Nov 17 11:39:15 2009	(r199355)
@@ -338,6 +338,7 @@ struct sigaction {
 					/* an asynchronous I/O request.*/
 #define	SI_MESGQ	0x10005		/* Signal generated by arrival of a */
 					/* message on an empty message queue. */
+#define	SI_KERNEL	0x10006
 #endif
 #if __BSD_VISIBLE
 #define	SI_UNDEFINED	0

Modified: head/sys/sys/signalvar.h
==============================================================================
--- head/sys/sys/signalvar.h	Tue Nov 17 10:59:51 2009	(r199354)
+++ head/sys/sys/signalvar.h	Tue Nov 17 11:39:15 2009	(r199355)
@@ -233,7 +233,8 @@ typedef struct ksiginfo {
 #define KSI_TRAP	0x01	/* Generated by trap. */
 #define	KSI_EXT		0x02	/* Externally managed ksi. */
 #define KSI_INS		0x04	/* Directly insert ksi, not the copy */
-#define	KSI_COPYMASK	KSI_TRAP
+#define	KSI_SIGQ	0x08	/* Generated by sigqueue, might ret EGAIN. */
+#define	KSI_COPYMASK	(KSI_TRAP|KSI_SIGQ)
 
 #define	KSI_ONQ(ksi)	((ksi)->ksi_sigq != NULL)
 
@@ -326,10 +327,11 @@ extern int kern_logsigexit;	/* Sysctl va
  */
 int	cursig(struct thread *td, int stop_allowed);
 void	execsigs(struct proc *p);
-void	gsignal(int pgid, int sig);
+void	gsignal(int pgid, int sig, ksiginfo_t *ksi);
 void	killproc(struct proc *p, char *why);
+void	pksignal(struct proc *p, int sig, ksiginfo_t *ksi);
 void	pgsigio(struct sigio **, int signum, int checkctty);
-void	pgsignal(struct pgrp *pgrp, int sig, int checkctty);
+void	pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi);
 int	postsig(int sig);
 void	psignal(struct proc *p, int sig);
 int	psignal_event(struct proc *p, struct sigevent *, ksiginfo_t *);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 11:43:53 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5841F1065697;
	Tue, 17 Nov 2009 11:43:53 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 474378FC1E;
	Tue, 17 Nov 2009 11:43:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHBhrC1005265;
	Tue, 17 Nov 2009 11:43:53 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHBhrGW005263;
	Tue, 17 Nov 2009 11:43:53 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171143.nAHBhrGW005263@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 11:43:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199356 - stable/8/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 11:43:53 -0000

Author: kib
Date: Tue Nov 17 11:43:53 2009
New Revision: 199356
URL: http://svn.freebsd.org/changeset/base/199356

Log:
  MFC r198853:
  If socket buffer space appears to be lower then sum of count of
  already prepared bytes and next portion of transfer, inner loop of
  kern_sendfile() aborts, not preparing next mbuf for socket buffer, and
  not modifying any outer loop invariants. The thread loops in the outer
  loop forever.
  
  Instead of breaking from inner loop, prepare only bytes that fit into
  the socket buffer space.

Modified:
  stable/8/sys/kern/uipc_syscalls.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/kern/uipc_syscalls.c
==============================================================================
--- stable/8/sys/kern/uipc_syscalls.c	Tue Nov 17 11:39:15 2009	(r199355)
+++ stable/8/sys/kern/uipc_syscalls.c	Tue Nov 17 11:43:53 2009	(r199356)
@@ -2036,20 +2036,12 @@ retry_space:
 				rem = obj->un_pager.vnp.vnp_size -
 				    uap->offset - fsbytes - loopbytes;
 			xfsize = omin(rem, xfsize);
+			xfsize = omin(space - loopbytes, xfsize);
 			if (xfsize <= 0) {
 				VM_OBJECT_UNLOCK(obj);
 				done = 1;		/* all data sent */
 				break;
 			}
-			/*
-			 * Don't overflow the send buffer.
-			 * Stop here and send out what we've
-			 * already got.
-			 */
-			if (space < loopbytes + xfsize) {
-				VM_OBJECT_UNLOCK(obj);
-				break;
-			}
 
 			/*
 			 * Attempt to look up the page.  Allocate

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 11:46:55 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A814B106566C;
	Tue, 17 Nov 2009 11:46:55 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 96FAB8FC19;
	Tue, 17 Nov 2009 11:46:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHBktHp005397;
	Tue, 17 Nov 2009 11:46:55 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHBktNV005395;
	Tue, 17 Nov 2009 11:46:55 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171146.nAHBktNV005395@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 11:46:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199357 - stable/8/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 11:46:55 -0000

Author: kib
Date: Tue Nov 17 11:46:55 2009
New Revision: 199357
URL: http://svn.freebsd.org/changeset/base/199357

Log:
  MFC r199137:
  Detect the slashdot lookup for RENAME or REMOVE in lookup(), and return
  EINVAL.

Modified:
  stable/8/sys/kern/vfs_lookup.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/kern/vfs_lookup.c
==============================================================================
--- stable/8/sys/kern/vfs_lookup.c	Tue Nov 17 11:43:53 2009	(r199356)
+++ stable/8/sys/kern/vfs_lookup.c	Tue Nov 17 11:46:55 2009	(r199357)
@@ -552,6 +552,12 @@ dirloop:
 	else
 		cnp->cn_flags &= ~ISLASTCN;
 
+	if ((cnp->cn_flags & ISLASTCN) != 0 &&
+	    cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.' &&
+	    (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) {
+		error = EINVAL;
+		goto bad;
+	}
 
 	/*
 	 * Check for degenerate name (e.g. / or "")

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:06:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71314106566C;
	Tue, 17 Nov 2009 12:06:07 +0000 (UTC) (envelope-from flo@smeets.im)
Received: from mail.solomo.de (mail.solomo.de [85.214.49.72])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F6428FC1D;
	Tue, 17 Nov 2009 12:06:06 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by mail.solomo.de (Postfix) with ESMTP id D3CB43F696;
	Tue, 17 Nov 2009 13:06:05 +0100 (CET)
X-Virus-Scanned: amavisd-new at vistream.de
Received: from mail.solomo.de ([127.0.0.1])
	by localhost (mail.solomo.de [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id AD5QjpdwNG0x; Tue, 17 Nov 2009 13:06:03 +0100 (CET)
Received: from nibbler.vistream.local (relay3.vistream.de [87.139.10.28])
	(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.solomo.de (Postfix) with ESMTPSA id A17033F68E;
	Tue, 17 Nov 2009 13:06:03 +0100 (CET)
Message-ID: <4B0291AB.8090300@smeets.im>
Date: Tue, 17 Nov 2009 13:06:03 +0100
From: Florian Smeets 
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.1.5) Gecko/20091115 Shredder/3.0.1pre
MIME-Version: 1.0
To: Andrew Thompson 
References: <200910292325.n9TNPrGq015678@svn.freebsd.org>
In-Reply-To: <200910292325.n9TNPrGq015678@svn.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r198659 - in stable/8/sys: .
 amd64/include/xen	cddl/contrib/opensolaris
 contrib/dev/acpica contrib/pf	dev/pci dev/usb/controller dev/xen/xenpci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:06:07 -0000

On 10/30/09 12:25 AM, Andrew Thompson wrote:
> Author: thompsa
> Date: Thu Oct 29 23:25:52 2009
> New Revision: 198659
> URL: http://svn.freebsd.org/changeset/base/198659
>
> Log:
>    MFC r198151
>
>     Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for
>     all host controllers at the same time, we avoid problems where the BIOS will
>     actually write to the USB registers of all the USB host controllers every time
>     we handover one of them, and consequently reset the OS programmed values.
>

Hi,

this commit causes some of my servers (all of the same type), to detect 
interrupt storms on irq11:

interrupt storm detected on "irq11:"; throttling interrupt source

and it does not stop logging these.

flo@relay3:~ 6 > vmstat -i
interrupt                          total       rate
irq0: clk                         229846        990
irq4: uart0                          596          2
irq5: sis0                          2850         12
irq8: rtc                          29595        127
irq11: sis3                       115799        499
irq14: ata0                         2071          8
Total                             380757       1641

sis3 is not used and not even up.

Setting sysctl hw.intr_storm_threshold to high values e.g. 10000 does 
not help.

The kernels on these servers do not have usb compiled in at all, but 
it's enabled in the BIOS.

Setting hw.pci.usb_early_takeover=0 "fixes" the problem.

Is this expected?

Cheers,
Florian

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:09:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C4111065672;
	Tue, 17 Nov 2009 12:09:22 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B2EC8FC15;
	Tue, 17 Nov 2009 12:09:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHC9LaF006113;
	Tue, 17 Nov 2009 12:09:21 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHC9Lm7006111;
	Tue, 17 Nov 2009 12:09:21 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171209.nAHC9Lm7006111@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 12:09:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199358 - stable/7/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:09:22 -0000

Author: kib
Date: Tue Nov 17 12:09:21 2009
New Revision: 199358
URL: http://svn.freebsd.org/changeset/base/199358

Log:
  MFC r198853:
  If socket buffer space appears to be lower then sum of count of
  already prepared bytes and next portion of transfer, inner loop of
  kern_sendfile() aborts, not preparing next mbuf for socket buffer, and
  not modifying any outer loop invariants. The thread loops in the outer
  loop forever.
  
  Instead of breaking from inner loop, prepare only bytes that fit into
  the socket buffer space.

Modified:
  stable/7/sys/kern/uipc_syscalls.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/uipc_syscalls.c
==============================================================================
--- stable/7/sys/kern/uipc_syscalls.c	Tue Nov 17 11:46:55 2009	(r199357)
+++ stable/7/sys/kern/uipc_syscalls.c	Tue Nov 17 12:09:21 2009	(r199358)
@@ -2027,20 +2027,12 @@ retry_space:
 				rem = obj->un_pager.vnp.vnp_size -
 				    uap->offset - fsbytes - loopbytes;
 			xfsize = omin(rem, xfsize);
+			xfsize = omin(space - loopbytes, xfsize);
 			if (xfsize <= 0) {
 				VM_OBJECT_UNLOCK(obj);
 				done = 1;		/* all data sent */
 				break;
 			}
-			/*
-			 * Don't overflow the send buffer.
-			 * Stop here and send out what we've
-			 * already got.
-			 */
-			if (space < loopbytes + xfsize) {
-				VM_OBJECT_UNLOCK(obj);
-				break;
-			}
 
 			/*
 			 * Attempt to look up the page.  Allocate

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:11:12 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC6AE106566C;
	Tue, 17 Nov 2009 12:11:12 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBA0D8FC08;
	Tue, 17 Nov 2009 12:11:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCBCLa006218;
	Tue, 17 Nov 2009 12:11:12 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCBCxB006216;
	Tue, 17 Nov 2009 12:11:12 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171211.nAHCBCxB006216@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 12:11:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199359 - stable/7/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:11:13 -0000

Author: kib
Date: Tue Nov 17 12:11:12 2009
New Revision: 199359
URL: http://svn.freebsd.org/changeset/base/199359

Log:
  MFC r199137:
  Detect the slashdot lookup for RENAME or REMOVE in lookup(), and return
  EINVAL.

Modified:
  stable/7/sys/kern/vfs_lookup.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/vfs_lookup.c
==============================================================================
--- stable/7/sys/kern/vfs_lookup.c	Tue Nov 17 12:09:21 2009	(r199358)
+++ stable/7/sys/kern/vfs_lookup.c	Tue Nov 17 12:11:12 2009	(r199359)
@@ -464,6 +464,12 @@ dirloop:
 	else
 		cnp->cn_flags &= ~ISLASTCN;
 
+	if ((cnp->cn_flags & ISLASTCN) != 0 &&
+	    cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.' &&
+	    (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) {
+		error = EINVAL;
+		goto bad;
+	}
 
 	/*
 	 * Check for degenerate name (e.g. / or "")

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:18:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C719E106568B;
	Tue, 17 Nov 2009 12:18:14 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B621B8FC13;
	Tue, 17 Nov 2009 12:18:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCIEJt006419;
	Tue, 17 Nov 2009 12:18:14 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCIEtX006417;
	Tue, 17 Nov 2009 12:18:14 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171218.nAHCIEtX006417@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 12:18:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199360 - stable/8/sys/dev/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:18:14 -0000

Author: mav
Date: Tue Nov 17 12:18:14 2009
New Revision: 199360
URL: http://svn.freebsd.org/changeset/base/199360

Log:
  MFC r198519:
  Don't ignore the return value of g_modevent() in acd_modevent().

Modified:
  stable/8/sys/dev/ata/atapi-cd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/dev/ata/atapi-cd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-cd.c	Tue Nov 17 12:11:12 2009	(r199359)
+++ stable/8/sys/dev/ata/atapi-cd.c	Tue Nov 17 12:18:14 2009	(r199360)
@@ -1905,8 +1905,7 @@ static devclass_t acd_devclass;
 static int
 acd_modevent(module_t mod, int what, void *arg)  
 {
-    g_modevent(0, what, &acd_class);
-    return 0;
+    return g_modevent(0, what, &acd_class);
 }
  
 DRIVER_MODULE(acd, ata, acd_driver, acd_devclass, acd_modevent, NULL);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:23:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1067106566C;
	Tue, 17 Nov 2009 12:23:14 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A6AF38FC0A;
	Tue, 17 Nov 2009 12:23:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCNEsG006585;
	Tue, 17 Nov 2009 12:23:14 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCNEnu006583;
	Tue, 17 Nov 2009 12:23:14 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171223.nAHCNEnu006583@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 12:23:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199361 - stable/8/sys/dev/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:23:14 -0000

Author: mav
Date: Tue Nov 17 12:23:14 2009
New Revision: 199361
URL: http://svn.freebsd.org/changeset/base/199361

Log:
  MFC r198582:
  Turn off use of ATA_A_4BIT on modern hardware. This flag was already
  obsoleted in 1996 by ATA-2, and crashes some modern hardware like some
  revisions of the Serverworks K2 SATA controller. Even very ancient
  hardware seems not to require it. In the unlikely event this causes
  problems, the previous behavior can be re-enabled by defining
  ATA_LEGACY_SUPPORT at the top of this file.

Modified:
  stable/8/sys/dev/ata/ata-all.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.h
==============================================================================
--- stable/8/sys/dev/ata/ata-all.h	Tue Nov 17 12:18:14 2009	(r199360)
+++ stable/8/sys/dev/ata/ata-all.h	Tue Nov 17 12:23:14 2009	(r199361)
@@ -26,6 +26,11 @@
  * $FreeBSD$
  */
 
+#if 0
+#define	ATA_LEGACY_SUPPORT		/* Enable obsolete features that break
+					 * some modern devices */
+#endif
+
 /* ATA register defines */
 #define ATA_DATA                        0       /* (RW) data */
 
@@ -81,7 +86,11 @@
 #define ATA_PC98_CTLOFFSET              0x10c   /* do for PC98 devices */
 #define         ATA_A_IDS               0x02    /* disable interrupts */
 #define         ATA_A_RESET             0x04    /* RESET controller */
-#define         ATA_A_4BIT              0x08    /* 4 head bits */
+#ifdef	ATA_LEGACY_SUPPORT			
+#define         ATA_A_4BIT              0x08    /* 4 head bits: obsolete 1996 */
+#else
+#define         ATA_A_4BIT              0x00 
+#endif
 #define         ATA_A_HOB               0x80    /* High Order Byte enable */
 
 /* SATA register defines */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:25:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 768A51065679;
	Tue, 17 Nov 2009 12:25:34 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BE428FC14;
	Tue, 17 Nov 2009 12:25:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCPYY3006686;
	Tue, 17 Nov 2009 12:25:34 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCPYxR006684;
	Tue, 17 Nov 2009 12:25:34 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171225.nAHCPYxR006684@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 12:25:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199362 - stable/8/sys/dev/ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:25:34 -0000

Author: mav
Date: Tue Nov 17 12:25:34 2009
New Revision: 199362
URL: http://svn.freebsd.org/changeset/base/199362

Log:
  MFC r198583:
  Add some magic taken from OS X and Linux to support early revision K2
  SATA controllers, like those found on the G5 Xserve.

Modified:
  stable/8/sys/dev/ata/chipsets/ata-serverworks.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-serverworks.c	Tue Nov 17 12:23:14 2009	(r199361)
+++ stable/8/sys/dev/ata/chipsets/ata-serverworks.c	Tue Nov 17 12:25:34 2009	(r199362)
@@ -41,6 +41,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef __powerpc__
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -106,6 +109,13 @@ static int
 ata_serverworks_status(device_t dev)
 {
     struct ata_channel *ch = device_get_softc(dev);
+    struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
+
+    /*
+     * Check if this interrupt belongs to our channel.
+     */
+    if (!(ATA_INL(ctlr->r_res2, 0x1f80) & (1 << ch->unit)))
+	return (0);
 
     /*
      * We need to do a 4-byte read on the status reg before the values
@@ -208,8 +218,29 @@ ata_serverworks_ch_attach(device_t dev)
     ch->hw.tf_write = ata_serverworks_tf_write;
 #ifdef __powerpc__
     ch->hw.status = ata_serverworks_status;
+
+    /* Make sure that our interrupt is edge triggered */
+    powerpc_config_intr(bus_get_resource_start(device_get_parent(dev),
+	SYS_RES_IRQ, 0), INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH);
 #endif
 
+    if (ctlr->chip->chipid == ATA_K2) {
+	/*
+	 * The revision 1 K2 SATA controller has interesting bugs. Patch them.
+	 * These magic numbers regulate interrupt delivery in the first few
+	 * cases and are pure magic in the last case.
+	 *
+	 * Values obtained from the Darwin driver.
+	 */
+
+	ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, 0x04);
+	ATA_IDX_OUTL(ch, ATA_SERROR, 0xffffffff);
+	ATA_IDX_OUTL(ch, ATA_SCONTROL, 0x00000300);
+	ATA_OUTL(ctlr->r_res2, ch_offset + 0x88, 0);
+	ATA_OUTL(ctlr->r_res2, ch_offset + 0x80,
+	    ATA_INL(ctlr->r_res2, ch_offset + 0x80) & ~0x00040000);
+    }
+
     /* chip does not reliably do 64K DMA transfers */
     ch->dma.max_iosize = 64 * DEV_BSIZE;
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:28:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48C251065679;
	Tue, 17 Nov 2009 12:28:21 +0000 (UTC) (envelope-from avg@freebsd.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
	by mx1.freebsd.org (Postfix) with ESMTP id C3C2E8FC1F;
	Tue, 17 Nov 2009 12:28:19 +0000 (UTC)
Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua
	[212.40.38.101])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA11610;
	Tue, 17 Nov 2009 14:28:13 +0200 (EET) (envelope-from avg@freebsd.org)
Message-ID: <4B0296DC.6080505@freebsd.org>
Date: Tue, 17 Nov 2009 14:28:12 +0200
From: Andriy Gapon 
User-Agent: Thunderbird 2.0.0.23 (X11/20090825)
MIME-Version: 1.0
To: Florian Smeets 
References: <200910292325.n9TNPrGq015678@svn.freebsd.org>
	<4B0291AB.8090300@smeets.im>
In-Reply-To: <4B0291AB.8090300@smeets.im>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Andrew Thompson 
Subject: Re: svn commit: r198659 - in stable/8/sys: .
 amd64/include/xen	cddl/contrib/opensolaris
 contrib/dev/acpica contrib/pf	dev/pci dev/usb/controller dev/xen/xenpci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:28:21 -0000

on 17/11/2009 14:06 Florian Smeets said the following:
> On 10/30/09 12:25 AM, Andrew Thompson wrote:
>> Author: thompsa
>> Date: Thu Oct 29 23:25:52 2009
>> New Revision: 198659
>> URL: http://svn.freebsd.org/changeset/base/198659
>>
>> Log:
>>    MFC r198151
>>
>>     Workaround buggy BIOS code in USB regard. By doing the BIOS to OS
>> handover for
>>     all host controllers at the same time, we avoid problems where the
>> BIOS will
>>     actually write to the USB registers of all the USB host
>> controllers every time
>>     we handover one of them, and consequently reset the OS programmed
>> values.
>>
> 
> Hi,
> 
> this commit causes some of my servers (all of the same type), to detect
> interrupt storms on irq11:
> 
> interrupt storm detected on "irq11:"; throttling interrupt source
> 
> and it does not stop logging these.
> 
> flo@relay3:~ 6 > vmstat -i
> interrupt                          total       rate
> irq0: clk                         229846        990
> irq4: uart0                          596          2
> irq5: sis0                          2850         12
> irq8: rtc                          29595        127
> irq11: sis3                       115799        499
> irq14: ata0                         2071          8
> Total                             380757       1641
> 
> sis3 is not used and not even up.
> 
> Setting sysctl hw.intr_storm_threshold to high values e.g. 10000 does
> not help.
> 
> The kernels on these servers do not have usb compiled in at all, but
> it's enabled in the BIOS.
> 
> Setting hw.pci.usb_early_takeover=0 "fixes" the problem.
> 
> Is this expected?

This is not expected in a sense that nobody planned to introduce interrupt storms.
 But it is possible, because this is one of the edge cases introduced by the
commit in question, and the tunable is there exactly to deal with the edge cases.
What might be happening here is that your USB controller(s) is configured with
interrupt 11, but you don't see it in vmstat -i output, because there is no USB
driver to discover the hardware and its configuration.  If we take over the
controllers, BIOS no longer controls the devices and it is expected that the OS
would do it, but it doesn't.  So if interrupts are generated by USB hardware they
remain unhandled and cause the storm.
Thus, there are 3 choices:
1. what you have already done (and it does fix the problem, no quote-unquote needed);
2. add USB drivers, so that USB interrupts are handled;
3. disable USB in BIOS.
Depending on your goals one choice may suite better than the others.

Does this make sense?

-- 
Andriy Gapon

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:30:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3BEA610656AB;
	Tue, 17 Nov 2009 12:30:07 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1102B8FC1F;
	Tue, 17 Nov 2009 12:30:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCU6sW006845;
	Tue, 17 Nov 2009 12:30:06 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCU6Fc006842;
	Tue, 17 Nov 2009 12:30:06 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171230.nAHCU6Fc006842@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 12:30:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199363 - in stable/8/sys/dev/ata: . chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:30:07 -0000

Author: mav
Date: Tue Nov 17 12:30:06 2009
New Revision: 199363
URL: http://svn.freebsd.org/changeset/base/199363

Log:
  MFC r199074:
  
  Add more ICH10 chip IDs.

Modified:
  stable/8/sys/dev/ata/ata-pci.h
  stable/8/sys/dev/ata/chipsets/ata-intel.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.h	Tue Nov 17 12:25:34 2009	(r199362)
+++ stable/8/sys/dev/ata/ata-pci.h	Tue Nov 17 12:30:06 2009	(r199363)
@@ -196,6 +196,10 @@ struct ata_pci_controller {
 #define ATA_I82801JD_AH         0x3a028086
 #define ATA_I82801JD_R1         0x3a058086
 #define ATA_I82801JD_S2         0x3a068086
+#define ATA_I82801JI_S1         0x3a208086
+#define ATA_I82801JI_AH         0x3a228086
+#define ATA_I82801JI_R1         0x3a258086
+#define ATA_I82801JI_S2         0x3a268086
 #define ATA_I31244              0x32008086
 
 #define ATA_ITE_ID              0x1283

Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-intel.c	Tue Nov 17 12:25:34 2009	(r199362)
+++ stable/8/sys/dev/ata/chipsets/ata-intel.c	Tue Nov 17 12:30:06 2009	(r199363)
@@ -135,6 +135,10 @@ ata_intel_probe(device_t dev)
      { ATA_I82801JD_AH,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
      { ATA_I82801JD_R1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
      { ATA_I82801JD_S2,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JI_S1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JI_AH,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JI_R1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JI_S2,  0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
      { ATA_I31244,       0,          0, 2, ATA_SA150, "31244" },
      { 0, 0, 0, 0, 0, 0}};
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:42:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03E401065679;
	Tue, 17 Nov 2009 12:42:28 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E6EA68FC21;
	Tue, 17 Nov 2009 12:42:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCgR8C007202;
	Tue, 17 Nov 2009 12:42:27 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCgRa8007200;
	Tue, 17 Nov 2009 12:42:27 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171242.nAHCgRa8007200@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 12:42:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199364 - stable/8/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:42:28 -0000

Author: mav
Date: Tue Nov 17 12:42:27 2009
New Revision: 199364
URL: http://svn.freebsd.org/changeset/base/199364

Log:
  MFC r197540, r198587, r198865:
  Add more defines for bits from ATA and CF specifications.

Modified:
  stable/8/sys/sys/ata.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/sys/ata.h
==============================================================================
--- stable/8/sys/sys/ata.h	Tue Nov 17 12:30:06 2009	(r199363)
+++ stable/8/sys/sys/ata.h	Tue Nov 17 12:42:27 2009	(r199364)
@@ -67,6 +67,8 @@ struct ata_params {
 /*049*/ u_int16_t       capabilities1;
 #define ATA_SUPPORT_DMA                 0x0100
 #define ATA_SUPPORT_LBA                 0x0200
+#define ATA_SUPPORT_IORDY               0x0400
+#define ATA_SUPPORT_IORDYDIS            0x0800
 #define ATA_SUPPORT_OVERLAP             0x4000
 
 /*050*/ u_int16_t       capabilities2;
@@ -108,22 +110,31 @@ struct ata_params {
 /*075*/ u_int16_t       queue;
 #define ATA_QUEUE_LEN(x)                ((x) & 0x001f)
 
-	u_int16_t       satacapabilities;
+/*76*/  u_int16_t       satacapabilities;
 #define ATA_SATA_GEN1                   0x0002
 #define ATA_SATA_GEN2                   0x0004
+#define ATA_SATA_GEN3                   0x0008
 #define ATA_SUPPORT_NCQ                 0x0100
 #define ATA_SUPPORT_IFPWRMNGTRCV        0x0200
 #define ATA_SUPPORT_PHYEVENTCNT         0x0400
 #define ATA_SUPPORT_NCQ_UNLOAD          0x0800
 #define ATA_SUPPORT_NCQ_PRIO            0x1000
-
-	u_int16_t       reserved77;
-	u_int16_t       satasupport;
+#define ATA_SUPPORT_HAPST               0x2000
+#define ATA_SUPPORT_DAPST               0x4000
+#define ATA_SUPPORT_READLOGDMAEXT       0x8000
+
+/*77*/  u_int16_t       satacapabilities2;
+#define ATA_SATA_CURR_GEN_MASK          0x0006
+#define ATA_SUPPORT_NCQ_STREAM          0x0010
+#define ATA_SUPPORT_NCQ_QMANAGEMENT     0x0020
+/*78*/  u_int16_t       satasupport;
 #define ATA_SUPPORT_NONZERO             0x0002
 #define ATA_SUPPORT_AUTOACTIVATE        0x0004
 #define ATA_SUPPORT_IFPWRMNGT           0x0008
 #define ATA_SUPPORT_INORDERDATA         0x0010
-	u_int16_t       sataenabled;
+#define ATA_SUPPORT_SOFTSETPRESERVE     0x0040
+/*79*/  u_int16_t       sataenabled;
+#define ATA_ENABLED_DAPST               0x0080
 
 /*080*/ u_int16_t       version_major;
 /*081*/ u_int16_t       version_minor;
@@ -161,8 +172,8 @@ struct ata_params {
 #define ATA_SUPPORT_FLUSHCACHE48        0x2000
 
 /*084/087*/ u_int16_t   extension;
-#define ATA_SUPPORT_SMARTTEST		0x0001
-#define ATA_SUPPORT_SMARTLOG		0x0002
+#define ATA_SUPPORT_SMARTLOG		0x0001
+#define ATA_SUPPORT_SMARTTEST		0x0002
 #define ATA_SUPPORT_MEDIASN		0x0004
 #define ATA_SUPPORT_MEDIAPASS		0x0008
 #define ATA_SUPPORT_STREAMING		0x0010
@@ -170,6 +181,7 @@ struct ata_params {
 #define ATA_SUPPORT_WRITEDMAFUAEXT	0x0040
 #define ATA_SUPPORT_WRITEDMAQFUAEXT	0x0080
 #define ATA_SUPPORT_64BITWWN		0x0100
+#define ATA_SUPPORT_UNLOAD		0x2000
 	} __packed support, enabled;
 
 /*088*/ u_int16_t       udmamodes;              /* UltraDMA modes */
@@ -192,14 +204,52 @@ struct ata_params {
 	u_int16_t       lba_size48_2;
 	u_int16_t       lba_size48_3;
 	u_int16_t       lba_size48_4;
-	u_int16_t       reserved104[23];
+	u_int16_t       reserved104[2];
+/*106*/	u_int16_t       pss;
+#define ATA_PSS_LSPPS			0x000F
+#define ATA_PSS_LSSABOVE512		0x1000
+#define ATA_PSS_MULTLS			0x2000
+/*107*/ u_int16_t       isd;
+/*108*/ u_int16_t       wwn[4];
+	u_int16_t       reserved112[5];
+/*117*/ u_int16_t       lss_1;
+/*118*/ u_int16_t       lss_2;
+/*119*/ u_int16_t       support2;
+#define ATA_SUPPORT_WRITEREADVERIFY	0x0002
+#define ATA_SUPPORT_WRITEUNCORREXT	0x0004
+#define ATA_SUPPORT_RWLOGDMAEXT		0x0008
+#define ATA_SUPPORT_MICROCODE3		0x0010
+#define ATA_SUPPORT_FREEFALL		0x0020
+/*120*/ u_int16_t       enabled2;
+	u_int16_t       reserved121[6];
 /*127*/ u_int16_t       removable_status;
 /*128*/ u_int16_t       security_status;
 	u_int16_t       reserved129[31];
 /*160*/ u_int16_t       cfa_powermode1;
-	u_int16_t       reserved161[15];
-/*176*/ u_int16_t       media_serial[30];
-	u_int16_t       reserved206[49];
+	u_int16_t       reserved161;
+/*162*/ u_int16_t       cfa_kms_support;
+/*163*/ u_int16_t       cfa_trueide_modes;
+/*164*/ u_int16_t       cfa_memory_modes;
+	u_int16_t       reserved165[11];
+/*176*/ u_int8_t        media_serial[60];
+/*206*/ u_int16_t       sct;
+	u_int16_t       reserved206[2];
+/*209*/ u_int16_t       lbalign;
+/*210*/ u_int16_t       wrv_sectors_m3_1;
+	u_int16_t       wrv_sectors_m3_2;
+/*212*/ u_int16_t       wrv_sectors_m2_1;
+	u_int16_t       wrv_sectors_m2_2;
+/*214*/ u_int16_t       nv_cache_caps;
+/*215*/ u_int16_t       nv_cache_size_1;
+	u_int16_t       nv_cache_size_2;
+/*217*/ u_int16_t       media_rotation_rate;
+	u_int16_t       reserved218;
+/*219*/ u_int16_t       nv_cache_opt;
+/*220*/ u_int16_t       wrv_mode;
+	u_int16_t       reserved221;
+/*222*/ u_int16_t       transport_major;
+/*223*/ u_int16_t       transport_minor;
+	u_int16_t       reserved224[31];
 /*255*/ u_int16_t       integrity;
 } __packed;
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:57:10 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CAC5F1065672;
	Tue, 17 Nov 2009 12:57:10 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BAA078FC23;
	Tue, 17 Nov 2009 12:57:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCvAgk007590;
	Tue, 17 Nov 2009 12:57:10 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCvAEH007588;
	Tue, 17 Nov 2009 12:57:10 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171257.nAHCvAEH007588@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 12:57:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199365 - head/sys/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:57:10 -0000

Author: tuexen
Date: Tue Nov 17 12:57:10 2009
New Revision: 199365
URL: http://svn.freebsd.org/changeset/base/199365

Log:
  Fix a LOR showing up with sctp_bsd_addr(): Do not hold a rt lock
  when calling rt_newaddrmsg().
  
  Reviewed by: qingli
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Tue Nov 17 12:42:27 2009	(r199364)
+++ head/sys/net/route.c	Tue Nov 17 12:57:10 2009	(r199365)
@@ -1497,7 +1497,11 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 			    ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index =
 				rt->rt_ifp->if_index;
 			}
+			RT_ADDREF(rt);
+			RT_UNLOCK(rt);
 			rt_newaddrmsg(cmd, ifa, error, rt);
+			RT_LOCK(rt);
+			RT_REMREF(rt);
 			if (cmd == RTM_DELETE) {
 				/*
 				 * If we are deleting, and we found an entry,

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 12:58:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6CBA71065676;
	Tue, 17 Nov 2009 12:58:08 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42E138FC24;
	Tue, 17 Nov 2009 12:58:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHCw85a007643;
	Tue, 17 Nov 2009 12:58:08 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHCw8vf007641;
	Tue, 17 Nov 2009 12:58:08 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171258.nAHCw8vf007641@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 12:58:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199366 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 12:58:08 -0000

Author: mav
Date: Tue Nov 17 12:58:07 2009
New Revision: 199366
URL: http://svn.freebsd.org/changeset/base/199366

Log:
  MFC r196897:
  Avoid extra swi_sched() call, if this SIM is already queued.
  It reduces overhead for coalesced command completions.

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 12:57:10 2009	(r199365)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 12:58:07 2009	(r199366)
@@ -4203,12 +4203,12 @@ xpt_done(union ccb *done_ccb)
 				mtx_lock(&cam_simq_lock);
 				TAILQ_INSERT_TAIL(&cam_simq, sim,
 						  links);
-				sim->flags |= CAM_SIM_ON_DONEQ;
 				mtx_unlock(&cam_simq_lock);
+				sim->flags |= CAM_SIM_ON_DONEQ;
+				if ((done_ccb->ccb_h.path->periph->flags &
+				    CAM_PERIPH_POLLED) == 0)
+					swi_sched(cambio_ih, 0);
 			}
-			if ((done_ccb->ccb_h.path->periph->flags &
-			    CAM_PERIPH_POLLED) == 0)
-				swi_sched(cambio_ih, 0);
 			break;
 		default:
 			panic("unknown periph type %d",
@@ -4894,16 +4894,20 @@ camisr(void *dummy)
 
 	mtx_lock(&cam_simq_lock);
 	TAILQ_INIT(&queue);
-	TAILQ_CONCAT(&queue, &cam_simq, links);
-	mtx_unlock(&cam_simq_lock);
-
-	while ((sim = TAILQ_FIRST(&queue)) != NULL) {
-		TAILQ_REMOVE(&queue, sim, links);
-		CAM_SIM_LOCK(sim);
-		sim->flags &= ~CAM_SIM_ON_DONEQ;
-		camisr_runqueue(&sim->sim_doneq);
-		CAM_SIM_UNLOCK(sim);
+	while (!TAILQ_EMPTY(&cam_simq)) {
+		TAILQ_CONCAT(&queue, &cam_simq, links);
+		mtx_unlock(&cam_simq_lock);
+
+		while ((sim = TAILQ_FIRST(&queue)) != NULL) {
+			TAILQ_REMOVE(&queue, sim, links);
+			CAM_SIM_LOCK(sim);
+			sim->flags &= ~CAM_SIM_ON_DONEQ;
+			camisr_runqueue(&sim->sim_doneq);
+			CAM_SIM_UNLOCK(sim);
+		}
+		mtx_lock(&cam_simq_lock);
 	}
+	mtx_unlock(&cam_simq_lock);
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:01:18 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 472E9106566B;
	Tue, 17 Nov 2009 13:01:18 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1CD618FC14;
	Tue, 17 Nov 2009 13:01:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHD1I1a007792;
	Tue, 17 Nov 2009 13:01:18 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHD1HJX007790;
	Tue, 17 Nov 2009 13:01:17 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171301.nAHD1HJX007790@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 13:01:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199367 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:01:18 -0000

Author: mav
Date: Tue Nov 17 13:01:17 2009
New Revision: 199367
URL: http://svn.freebsd.org/changeset/base/199367

Log:
  MFC r196898:
  Report scbusX in xpt_announce_periph() to less confuse users by two
  different bus addressing schemes.
  
  MFC r196900:
  s/bus %d/scbus%d/ in some messages to correct terminology.

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 12:58:07 2009	(r199366)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 13:01:17 2009	(r199367)
@@ -1038,11 +1038,12 @@ xpt_announce_periph(struct cam_periph *p
 	 * To ensure that this is printed in one piece,
 	 * mask out CAM interrupts.
 	 */
-	printf("%s%d at %s%d bus %d target %d lun %d\n",
+	printf("%s%d at %s%d bus %d scbus%d target %d lun %d\n",
 	       periph->periph_name, periph->unit_number,
 	       path->bus->sim->sim_name,
 	       path->bus->sim->unit_number,
 	       path->bus->sim->bus_id,
+	       path->bus->path_id,
 	       path->target->target_id,
 	       path->device->lun_id);
 	printf("%s%d: ", periph->periph_name, periph->unit_number);
@@ -4609,7 +4610,7 @@ xptconfigfunc(struct cam_eb *bus, void *
 					      CAM_TARGET_WILDCARD,
 					      CAM_LUN_WILDCARD)) !=CAM_REQ_CMP){
 			printf("xptconfigfunc: xpt_create_path failed with "
-			       "status %#x for bus %d\n", status, bus->path_id);
+			       "status %#x for scbus%d\n", status, bus->path_id);
 			printf("xptconfigfunc: halting bus configuration\n");
 			xpt_free_ccb(work_ccb);
 			busses_to_config--;
@@ -4620,7 +4621,7 @@ xptconfigfunc(struct cam_eb *bus, void *
 		work_ccb->ccb_h.func_code = XPT_PATH_INQ;
 		xpt_action(work_ccb);
 		if (work_ccb->ccb_h.status != CAM_REQ_CMP) {
-			printf("xptconfigfunc: CPI failed on bus %d "
+			printf("xptconfigfunc: CPI failed on scbus%d "
 			       "with status %d\n", bus->path_id,
 			       work_ccb->ccb_h.status);
 			xpt_finishconfig(xpt_periph, work_ccb);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:04:05 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AC30A106566B;
	Tue, 17 Nov 2009 13:04:05 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B7698FC13;
	Tue, 17 Nov 2009 13:04:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHD45lP007888;
	Tue, 17 Nov 2009 13:04:05 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHD45Xo007886;
	Tue, 17 Nov 2009 13:04:05 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171304.nAHD45Xo007886@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 13:04:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199368 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:04:05 -0000

Author: mav
Date: Tue Nov 17 13:04:05 2009
New Revision: 199368
URL: http://svn.freebsd.org/changeset/base/199368

Log:
  MFC r196901:
  Remove unneeded CAM_SIM_MPSAFE check.

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 13:01:17 2009	(r199367)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 13:04:05 2009	(r199368)
@@ -4412,10 +4412,7 @@ xpt_alloc_device(struct cam_eb *bus, str
 		device->tag_delay_count = 0;
 		device->tag_saved_openings = 0;
 		device->refcount = 1;
-		if (bus->sim->flags & CAM_SIM_MPSAFE)
-			callout_init_mtx(&device->callout, bus->sim->mtx, 0);
-		else
-			callout_init_mtx(&device->callout, &Giant, 0);
+		callout_init_mtx(&device->callout, bus->sim->mtx, 0);
 
 		/*
 		 * Hold a reference to our parent target so it

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:05:51 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C52681065670;
	Tue, 17 Nov 2009 13:05:51 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B4FE28FC17;
	Tue, 17 Nov 2009 13:05:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHD5pxn007983;
	Tue, 17 Nov 2009 13:05:51 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHD5pDa007981;
	Tue, 17 Nov 2009 13:05:51 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171305.nAHD5pDa007981@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 13:05:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199369 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:05:51 -0000

Author: tuexen
Date: Tue Nov 17 13:05:51 2009
New Revision: 199369
URL: http://svn.freebsd.org/changeset/base/199369

Log:
  Do not hold the lock longer than necessary.
  
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Tue Nov 17 13:04:05 2009	(r199368)
+++ head/sys/netinet/sctputil.c	Tue Nov 17 13:05:51 2009	(r199369)
@@ -6156,11 +6156,11 @@ sctp_dynamic_set_primary(struct sockaddr
 	 * newest first :-0
 	 */
 	LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr);
+	SCTP_IPI_ITERATOR_WQ_UNLOCK();
 	sctp_timer_start(SCTP_TIMER_TYPE_ADDR_WQ,
 	    (struct sctp_inpcb *)NULL,
 	    (struct sctp_tcb *)NULL,
 	    (struct sctp_nets *)NULL);
-	SCTP_IPI_ITERATOR_WQ_UNLOCK();
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:08:15 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 852811065693;
	Tue, 17 Nov 2009 13:08:15 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 750B98FC1E;
	Tue, 17 Nov 2009 13:08:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHD8FNF008067;
	Tue, 17 Nov 2009 13:08:15 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHD8FJe008065;
	Tue, 17 Nov 2009 13:08:15 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171308.nAHD8FJe008065@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 13:08:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199370 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:08:15 -0000

Author: tuexen
Date: Tue Nov 17 13:08:15 2009
New Revision: 199370
URL: http://svn.freebsd.org/changeset/base/199370

Log:
  Allow the UMA to free data. This resolves the UMA related bug reported
  by Julian.
  
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/netinet/sctp_os_bsd.h

Modified: head/sys/netinet/sctp_os_bsd.h
==============================================================================
--- head/sys/netinet/sctp_os_bsd.h	Tue Nov 17 13:05:51 2009	(r199369)
+++ head/sys/netinet/sctp_os_bsd.h	Tue Nov 17 13:08:15 2009	(r199370)
@@ -255,10 +255,9 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT);
 /* SCTP_ZONE_INIT: initialize the zone */
 typedef struct uma_zone *sctp_zone_t;
 
-#define UMA_ZFLAG_FULL	0x0020
 #define SCTP_ZONE_INIT(zone, name, size, number) { \
 	zone = uma_zcreate(name, size, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR,\
-		UMA_ZFLAG_FULL); \
+		0); \
 	uma_zone_set_max(zone, number); \
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:09:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2948F1065672;
	Tue, 17 Nov 2009 13:09:51 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18F588FC1E;
	Tue, 17 Nov 2009 13:09:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHD9op6008157;
	Tue, 17 Nov 2009 13:09:50 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHD9oli008155;
	Tue, 17 Nov 2009 13:09:50 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171309.nAHD9oli008155@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 13:09:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199371 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:09:52 -0000

Author: tuexen
Date: Tue Nov 17 13:09:50 2009
New Revision: 199371
URL: http://svn.freebsd.org/changeset/base/199371

Log:
  Disable (temporary) the thread based interator. It does not work with vnet.
  
  Approved by: rrs (mentor)

Modified:
  head/sys/netinet/sctp_constants.h

Modified: head/sys/netinet/sctp_constants.h
==============================================================================
--- head/sys/netinet/sctp_constants.h	Tue Nov 17 13:08:15 2009	(r199370)
+++ head/sys/netinet/sctp_constants.h	Tue Nov 17 13:09:50 2009	(r199371)
@@ -87,7 +87,10 @@ __FBSDID("$FreeBSD$");
 /* #define SCTP_AUDITING_ENABLED 1 used for debug/auditing */
 #define SCTP_AUDIT_SIZE 256
 
+/* temporary disabled since it does not work with VNET. */
+#if 0
 #define SCTP_USE_THREAD_BASED_ITERATOR 1
+#endif
 
 #define SCTP_KTRHEAD_NAME "sctp_iterator"
 #define SCTP_KTHREAD_PAGES 2

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:11:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B0B51065693;
	Tue, 17 Nov 2009 13:11:23 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4A9838FC16;
	Tue, 17 Nov 2009 13:11:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHDBN3K008244;
	Tue, 17 Nov 2009 13:11:23 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHDBNbd008242;
	Tue, 17 Nov 2009 13:11:23 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171311.nAHDBNbd008242@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 13:11:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199372 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:11:23 -0000

Author: tuexen
Date: Tue Nov 17 13:11:23 2009
New Revision: 199372
URL: http://svn.freebsd.org/changeset/base/199372

Log:
  Do not start the iterator when there are no associations.
  This fixes a bug found by Irene Ruengeler.
  
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/netinet/sctp_asconf.c

Modified: head/sys/netinet/sctp_asconf.c
==============================================================================
--- head/sys/netinet/sctp_asconf.c	Tue Nov 17 13:09:50 2009	(r199371)
+++ head/sys/netinet/sctp_asconf.c	Tue Nov 17 13:11:23 2009	(r199372)
@@ -3180,24 +3180,6 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *
 		ifa = NULL;
 	}
 	if (ifa != NULL) {
-		/* add this address */
-		struct sctp_asconf_iterator *asc;
-		struct sctp_laddr *wi;
-
-		SCTP_MALLOC(asc, struct sctp_asconf_iterator *,
-		    sizeof(struct sctp_asconf_iterator),
-		    SCTP_M_ASC_IT);
-		if (asc == NULL) {
-			SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM);
-			return (ENOMEM);
-		}
-		wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr),
-		    struct sctp_laddr);
-		if (wi == NULL) {
-			SCTP_FREE(asc, SCTP_M_ASC_IT);
-			SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM);
-			return (ENOMEM);
-		}
 		if (type == SCTP_ADD_IP_ADDRESS) {
 			sctp_add_local_addr_ep(inp, ifa, type);
 		} else if (type == SCTP_DEL_IP_ADDRESS) {
@@ -3205,8 +3187,6 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *
 
 			if (inp->laddr_count < 2) {
 				/* can't delete the last local address */
-				SCTP_FREE(asc, SCTP_M_ASC_IT);
-				SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), wi);
 				SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EINVAL);
 				return (EINVAL);
 			}
@@ -3218,27 +3198,49 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *
 				}
 			}
 		}
-		LIST_INIT(&asc->list_of_work);
-		asc->cnt = 1;
-		SCTP_INCR_LADDR_COUNT();
-		wi->ifa = ifa;
-		wi->action = type;
-		atomic_add_int(&ifa->refcount, 1);
-		LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr);
-		(void)sctp_initiate_iterator(sctp_asconf_iterator_ep,
-		    sctp_asconf_iterator_stcb,
-		    sctp_asconf_iterator_ep_end,
-		    SCTP_PCB_ANY_FLAGS,
-		    SCTP_PCB_ANY_FEATURES,
-		    SCTP_ASOC_ANY_STATE,
-		    (void *)asc, 0,
-		    sctp_asconf_iterator_end, inp, 0);
+		if (!LIST_EMPTY(&inp->sctp_asoc_list)) {
+			/*
+			 * There is no need to start the iterator if the inp
+			 * has no associations.
+			 */
+			struct sctp_asconf_iterator *asc;
+			struct sctp_laddr *wi;
+
+			SCTP_MALLOC(asc, struct sctp_asconf_iterator *,
+			    sizeof(struct sctp_asconf_iterator),
+			    SCTP_M_ASC_IT);
+			if (asc == NULL) {
+				SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM);
+				return (ENOMEM);
+			}
+			wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), struct sctp_laddr);
+			if (wi == NULL) {
+				SCTP_FREE(asc, SCTP_M_ASC_IT);
+				SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM);
+				return (ENOMEM);
+			}
+			LIST_INIT(&asc->list_of_work);
+			asc->cnt = 1;
+			SCTP_INCR_LADDR_COUNT();
+			wi->ifa = ifa;
+			wi->action = type;
+			atomic_add_int(&ifa->refcount, 1);
+			LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr);
+			(void)sctp_initiate_iterator(sctp_asconf_iterator_ep,
+			    sctp_asconf_iterator_stcb,
+			    sctp_asconf_iterator_ep_end,
+			    SCTP_PCB_ANY_FLAGS,
+			    SCTP_PCB_ANY_FEATURES,
+			    SCTP_ASOC_ANY_STATE,
+			    (void *)asc, 0,
+			    sctp_asconf_iterator_end, inp, 0);
+		}
+		return (0);
 	} else {
 		/* invalid address! */
 		SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EADDRNOTAVAIL);
 		return (EADDRNOTAVAIL);
 	}
-	return (0);
 }
 
 void

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:13:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54337106566B;
	Tue, 17 Nov 2009 13:13:59 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 29D038FC20;
	Tue, 17 Nov 2009 13:13:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHDDx8w008354;
	Tue, 17 Nov 2009 13:13:59 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHDDxL8008352;
	Tue, 17 Nov 2009 13:13:59 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171313.nAHDDxL8008352@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 13:13:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199373 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:13:59 -0000

Author: tuexen
Date: Tue Nov 17 13:13:58 2009
New Revision: 199373
URL: http://svn.freebsd.org/changeset/base/199373

Log:
  Fix a memory leak when destroying an SCTP stack.
  Clean up sctp_pcb_finish().
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Tue Nov 17 13:11:23 2009	(r199372)
+++ head/sys/netinet/sctp_pcb.c	Tue Nov 17 13:13:58 2009	(r199373)
@@ -5558,36 +5558,54 @@ sctp_pcb_finish(void)
 	struct sctp_ifa *ifa;
 	struct sctpvtaghead *chain;
 	struct sctp_tagblock *twait_block, *prev_twait_block;
+	struct sctp_laddr *wi;
+	struct sctp_iterator *it;
 	int i;
 
+#if defined(SCTP_USE_THREAD_BASED_ITERATOR)
+	SCTP_BASE_INFO(threads_must_exit) = 1;
+	/* Wake the thread up so it will exit now */
+	sctp_wakeup_iterator();
+
+#endif
+	SCTP_OS_TIMER_STOP(&SCTP_BASE_INFO(addr_wq_timer.timer));
+	SCTP_IPI_ITERATOR_WQ_LOCK();
+	while ((wi = LIST_FIRST(&SCTP_BASE_INFO(addr_wq))) != NULL) {
+		LIST_REMOVE(wi, sctp_nxt_addr);
+		SCTP_DECR_LADDR_COUNT();
+		SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), wi);
+	}
+	SCTP_IPI_ITERATOR_WQ_UNLOCK();
+	while ((it = TAILQ_FIRST(&SCTP_BASE_INFO(iteratorhead))) != NULL) {
+		if (it->function_atend != NULL) {
+			(*it->function_atend) (it->pointer, it->val);
+		}
+		TAILQ_REMOVE(&SCTP_BASE_INFO(iteratorhead), it, sctp_nxt_itr);
+		SCTP_FREE(it, SCTP_M_ITER);
+	}
+
 	/*
 	 * free the vrf/ifn/ifa lists and hashes (be sure address monitor is
 	 * destroyed first).
 	 */
 	vrf_bucket = &SCTP_BASE_INFO(sctp_vrfhash)[(SCTP_DEFAULT_VRFID & SCTP_BASE_INFO(hashvrfmark))];
-	vrf = LIST_FIRST(vrf_bucket);
-	while (vrf) {
-		ifn = LIST_FIRST(&vrf->ifnlist);
-		while (ifn) {
-			ifa = LIST_FIRST(&ifn->ifalist);
-			while (ifa) {
+	while ((vrf = LIST_FIRST(vrf_bucket)) != NULL) {
+		while ((ifn = LIST_FIRST(&vrf->ifnlist)) != NULL) {
+			while ((ifa = LIST_FIRST(&ifn->ifalist)) != NULL) {
 				/* free the ifa */
 				LIST_REMOVE(ifa, next_bucket);
 				LIST_REMOVE(ifa, next_ifa);
 				SCTP_FREE(ifa, SCTP_M_IFA);
-				ifa = LIST_FIRST(&ifn->ifalist);
 			}
 			/* free the ifn */
 			LIST_REMOVE(ifn, next_bucket);
 			LIST_REMOVE(ifn, next_ifn);
 			SCTP_FREE(ifn, SCTP_M_IFN);
-			ifn = LIST_FIRST(&vrf->ifnlist);
 		}
 		SCTP_HASH_FREE(vrf->vrf_addr_hash, vrf->vrf_addr_hashmark);
 		/* free the vrf */
 		LIST_REMOVE(vrf, next_vrf);
 		SCTP_FREE(vrf, SCTP_M_VRF);
-		vrf = LIST_FIRST(vrf_bucket);
 	}
 	/* free the vrf hashes */
 	SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_vrfhash), SCTP_BASE_INFO(hashvrfmark));
@@ -5614,7 +5632,6 @@ sctp_pcb_finish(void)
 	/* free the locks and mutexes */
 #ifdef SCTP_PACKET_LOGGING
 	SCTP_IP_PKTLOG_DESTROY();
-
 #endif
 	SCTP_IPI_ADDR_DESTROY();
 	SCTP_ITERATOR_LOCK_DESTROY();

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:36:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D541B1065676;
	Tue, 17 Nov 2009 13:36:21 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C4D138FC16;
	Tue, 17 Nov 2009 13:36:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHDaLu3008903;
	Tue, 17 Nov 2009 13:36:21 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHDaLY5008901;
	Tue, 17 Nov 2009 13:36:21 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911171336.nAHDaLY5008901@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 13:36:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199374 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:36:21 -0000

Author: tuexen
Date: Tue Nov 17 13:36:21 2009
New Revision: 199374
URL: http://svn.freebsd.org/changeset/base/199374

Log:
  Fix a bug where queued ASCONF messags are not sent out.
  
  Approved by: rrs (mentor)
  Obtained from:	Irene Ruengeler
  MFC after: 1 month

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Tue Nov 17 13:13:58 2009	(r199373)
+++ head/sys/netinet/sctp_output.c	Tue Nov 17 13:36:21 2009	(r199374)
@@ -9442,6 +9442,7 @@ sctp_chunk_output(struct sctp_inpcb *inp
 
 	if ((un_sent <= 0) &&
 	    (TAILQ_EMPTY(&asoc->control_send_queue)) &&
+	    (TAILQ_EMPTY(&asoc->asconf_send_queue)) &&
 	    (asoc->sent_queue_retran_cnt == 0)) {
 		/* Nothing to do unless there is something to be sent left */
 		return;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:37:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B8271065672;
	Tue, 17 Nov 2009 13:37:28 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 09CB08FC15;
	Tue, 17 Nov 2009 13:37:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHDbRZd008961;
	Tue, 17 Nov 2009 13:37:27 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHDbR1S008959;
	Tue, 17 Nov 2009 13:37:27 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911171337.nAHDbR1S008959@svn.freebsd.org>
From: Christian Brueffer 
Date: Tue, 17 Nov 2009 13:37:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199375 - stable/8/sys/contrib/altq/altq
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:37:28 -0000

Author: brueffer
Date: Tue Nov 17 13:37:27 2009
New Revision: 199375
URL: http://svn.freebsd.org/changeset/base/199375

Log:
  MFC: r198952
  
  Fix two memory leaks in error cases.

Modified:
  stable/8/sys/contrib/altq/altq/altq_hfsc.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/contrib/altq/altq/altq_hfsc.c
==============================================================================
--- stable/8/sys/contrib/altq/altq/altq_hfsc.c	Tue Nov 17 13:36:21 2009	(r199374)
+++ stable/8/sys/contrib/altq/altq/altq_hfsc.c	Tue Nov 17 13:37:27 2009	(r199375)
@@ -1809,15 +1809,20 @@ hfsc_class_modify(cl, rsc, fsc, usc)
 	    cl->cl_fsc == NULL) {
 		fsc_tmp = malloc(sizeof(struct internal_sc),
 		    M_DEVBUF, M_WAITOK);
-		if (fsc_tmp == NULL)
+		if (fsc_tmp == NULL) {
+			free(rsc_tmp);
 			return (ENOMEM);
+		}
 	}
 	if (usc != NULL && (usc->m1 != 0 || usc->m2 != 0) &&
 	    cl->cl_usc == NULL) {
 		usc_tmp = malloc(sizeof(struct internal_sc),
 		    M_DEVBUF, M_WAITOK);
-		if (usc_tmp == NULL)
+		if (usc_tmp == NULL) {
+			free(rsc_tmp);
+			free(fsc_tmp);
 			return (ENOMEM);
+		}
 	}
 
 	cur_time = read_machclk();

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 13:48:27 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5EA361065672;
	Tue, 17 Nov 2009 13:48:27 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CCA18FC12;
	Tue, 17 Nov 2009 13:48:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHDmRCW009242;
	Tue, 17 Nov 2009 13:48:27 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHDmRPB009239;
	Tue, 17 Nov 2009 13:48:27 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171348.nAHDmRPB009239@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 13:48:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199376 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 13:48:27 -0000

Author: mav
Date: Tue Nov 17 13:48:27 2009
New Revision: 199376
URL: http://svn.freebsd.org/changeset/base/199376

Log:
  MFC r196903:
  Remove duplicate qfrozen_cnt variable from struct cam_ed.
  ccbq.queue.qfrozen_cnt should be used instead.

Modified:
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/cam/cam_xpt_internal.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 13:37:27 2009	(r199375)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 13:48:27 2009	(r199376)
@@ -2477,7 +2477,7 @@ xpt_action_default(union ccb *start_ccb)
 		path = start_ccb->ccb_h.path;
 
 		cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb);
-		if (path->device->qfrozen_cnt == 0)
+		if (path->device->ccbq.queue.qfrozen_cnt == 0)
 			runq = xpt_schedule_dev_sendq(path->bus, path->device);
 		else
 			runq = 0;
@@ -2936,7 +2936,7 @@ xpt_action_default(union ccb *start_ccb)
 			xpt_release_devq(crs->ccb_h.path, /*count*/1,
 					 /*run_queue*/TRUE);
 		}
-		start_ccb->crs.qfrozen_cnt = dev->qfrozen_cnt;
+		start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt;
 		start_ccb->ccb_h.status = CAM_REQ_CMP;
 		break;
 	}
@@ -3232,7 +3232,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
 		 * If the device has been "frozen", don't attempt
 		 * to run it.
 		 */
-		if (device->qfrozen_cnt > 0) {
+		if (device->ccbq.queue.qfrozen_cnt > 0) {
 			continue;
 		}
 
@@ -3255,7 +3255,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
 				 * the device queue until we have a slot
 				 * available.
 				 */
-				device->qfrozen_cnt++;
+				device->ccbq.queue.qfrozen_cnt++;
 				STAILQ_INSERT_TAIL(&xsoftc.highpowerq,
 						   &work_ccb->ccb_h,
 						   xpt_links.stqe);
@@ -3287,7 +3287,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
 			 * The client wants to freeze the queue
 			 * after this CCB is sent.
 			 */
-			device->qfrozen_cnt++;
+			device->ccbq.queue.qfrozen_cnt++;
 		}
 
 		/* In Target mode, the peripheral driver knows best... */
@@ -4036,7 +4036,7 @@ xpt_freeze_devq(struct cam_path *path, u
 
 	mtx_assert(path->bus->sim->mtx, MA_OWNED);
 
-	path->device->qfrozen_cnt += count;
+	path->device->ccbq.queue.qfrozen_cnt += count;
 
 	/*
 	 * Mark the last CCB in the queue as needing
@@ -4054,7 +4054,7 @@ xpt_freeze_devq(struct cam_path *path, u
 	ccbh = TAILQ_LAST(&path->device->ccbq.active_ccbs, ccb_hdr_tailq);
 	if (ccbh && ccbh->status == CAM_REQ_INPROG)
 		ccbh->status = CAM_REQUEUE_REQ;
-	return (path->device->qfrozen_cnt);
+	return (path->device->ccbq.queue.qfrozen_cnt);
 }
 
 u_int32_t
@@ -4098,11 +4098,12 @@ xpt_release_devq_device(struct cam_ed *d
 	int	rundevq;
 
 	rundevq = 0;
-	if (dev->qfrozen_cnt > 0) {
+	if (dev->ccbq.queue.qfrozen_cnt > 0) {
 
-		count = (count > dev->qfrozen_cnt) ? dev->qfrozen_cnt : count;
-		dev->qfrozen_cnt -= count;
-		if (dev->qfrozen_cnt == 0) {
+		count = (count > dev->ccbq.queue.qfrozen_cnt) ?
+		    dev->ccbq.queue.qfrozen_cnt : count;
+		dev->ccbq.queue.qfrozen_cnt -= count;
+		if (dev->ccbq.queue.qfrozen_cnt == 0) {
 
 			/*
 			 * No longer need to wait for a successful
@@ -4407,7 +4408,6 @@ xpt_alloc_device(struct cam_eb *bus, str
 		SLIST_INIT(&device->periphs);
 		device->generation = 0;
 		device->owner = NULL;
-		device->qfrozen_cnt = 0;
 		device->flags = CAM_DEV_UNCONFIGURED;
 		device->tag_delay_count = 0;
 		device->tag_saved_openings = 0;
@@ -4976,7 +4976,7 @@ camisr_runqueue(void *V_queue)
 				xpt_start_tags(ccb_h->path);
 
 			if ((dev->ccbq.queue.entries > 0)
-			 && (dev->qfrozen_cnt == 0)
+			 && (dev->ccbq.queue.qfrozen_cnt == 0)
 			 && (device_is_send_queued(dev) == 0)) {
 				runq = xpt_schedule_dev_sendq(ccb_h->path->bus,
 							      dev);

Modified: stable/8/sys/cam/cam_xpt_internal.h
==============================================================================
--- stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 13:37:27 2009	(r199375)
+++ stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 13:48:27 2009	(r199376)
@@ -106,7 +106,6 @@ struct cam_ed {
 	u_int8_t	 queue_flags;	/* Queue flags from the control page */
 	u_int8_t	 serial_num_len;
 	u_int8_t	*serial_num;
-	u_int32_t	 qfrozen_cnt;
 	u_int32_t	 flags;
 #define CAM_DEV_UNCONFIGURED	 	0x01
 #define CAM_DEV_REL_TIMEOUT_PENDING	0x02

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:08:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C0FA1065676;
	Tue, 17 Nov 2009 14:08:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8900A8FC1B;
	Tue, 17 Nov 2009 14:08:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHE8gBp010463;
	Tue, 17 Nov 2009 14:08:42 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHE8gsv010462;
	Tue, 17 Nov 2009 14:08:42 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171408.nAHE8gsv010462@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 14:08:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199377 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:08:42 -0000

Author: jhb
Date: Tue Nov 17 14:08:42 2009
New Revision: 199377
URL: http://svn.freebsd.org/changeset/base/199377

Log:
  Move mergeinfo for netinet6 up to sys.

Modified:
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:13:31 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8D9C106568B;
	Tue, 17 Nov 2009 14:13:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 63FCB8FC15;
	Tue, 17 Nov 2009 14:13:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEDUJB011055;
	Tue, 17 Nov 2009 14:13:30 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEDUF6011052;
	Tue, 17 Nov 2009 14:13:30 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171413.nAHEDUF6011052@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 14:13:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199378 - head/sys/dev/de
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:13:31 -0000

Author: jhb
Date: Tue Nov 17 14:13:30 2009
New Revision: 199378
URL: http://svn.freebsd.org/changeset/base/199378

Log:
  Use a private timer to run the statistics timer instead of (ab)using
  if_watchdog and if_timer.
  
  Tested by:	WATANABE Kazuhiro  CQG00620 of nifty.ne.jp

Modified:
  head/sys/dev/de/if_de.c
  head/sys/dev/de/if_devar.h

Modified: head/sys/dev/de/if_de.c
==============================================================================
--- head/sys/dev/de/if_de.c	Tue Nov 17 14:08:42 2009	(r199377)
+++ head/sys/dev/de/if_de.c	Tue Nov 17 14:13:30 2009	(r199378)
@@ -151,6 +151,7 @@ static void	tulip_start_locked(tulip_sof
 static struct mbuf *
 		tulip_txput(tulip_softc_t * const sc, struct mbuf *m);
 static void	tulip_txput_setup(tulip_softc_t * const sc);
+static void	tulip_watchdog(void *arg);
 struct mbuf *	tulip_dequeue_mbuf(tulip_ringinfo_t *ri, tulip_descinfo_t *di,
 		    int sync);
 static void	tulip_dma_map_addr(void *, bus_dma_segment_t *, int, int);
@@ -3302,11 +3303,13 @@ tulip_init_locked(tulip_softc_t * const 
 	    TULIP_CSR_READ(sc, csr_status));
 	if ((sc->tulip_flags & (TULIP_WANTSETUP|TULIP_TXPROBE_ACTIVE)) == TULIP_WANTSETUP)
 	    tulip_txput_setup(sc);
+	callout_reset(&sc->tulip_stat_timer, hz, tulip_watchdog, sc);
     } else {
 	CTR0(KTR_TULIP, "tulip_init_locked: not up, reset chip");
 	sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	tulip_reset(sc);
 	tulip_addr_filter(sc);
+	callout_stop(&sc->tulip_stat_timer);
     }
 }
 
@@ -4319,23 +4322,17 @@ tulip_start_locked(tulip_softc_t * const
     }
 }
 
-/*
- * Even though this routine runs at device spl, it does not break
- * our use of splnet (splsoftnet under NetBSD) for the majority
- * of this driver since 
- * if_watcbog is called from if_watchdog which is called from
- * splsoftclock which is below spl[soft]net.
- */
 static void
-tulip_ifwatchdog(struct ifnet *ifp)
+tulip_watchdog(void *arg)
 {
-    TULIP_PERFSTART(ifwatchdog)
-    tulip_softc_t * const sc = (tulip_softc_t *)ifp->if_softc;
+    TULIP_PERFSTART(stat)
+    tulip_softc_t *sc = arg;
 #if defined(TULIP_DEBUG)
     u_int32_t rxintrs;
 #endif
 
-    TULIP_LOCK(sc);
+    TULIP_LOCK_ASSERT(sc);
+    callout_reset(&sc->tulip_stat_timer, hz, tulip_watchdog, sc);    
 #if defined(TULIP_DEBUG)
     rxintrs = sc->tulip_dbg.dbg_rxintrs - sc->tulip_dbg.dbg_last_rxintrs;
     if (rxintrs > sc->tulip_dbg.dbg_high_rxintrs_hz)
@@ -4343,7 +4340,6 @@ tulip_ifwatchdog(struct ifnet *ifp)
     sc->tulip_dbg.dbg_last_rxintrs = sc->tulip_dbg.dbg_rxintrs;
 #endif /* TULIP_DEBUG */
 
-    sc->tulip_ifp->if_timer = 1;
     /*
      * These should be rare so do a bulk test up front so we can just skip
      * them if needed.
@@ -4381,11 +4377,11 @@ tulip_ifwatchdog(struct ifnet *ifp)
 	tulip_init_locked(sc);
     }
 
-    TULIP_PERFEND(ifwatchdog);
+    TULIP_PERFEND(stat);
     TULIP_PERFMERGE(sc, perf_intr_cycles);
     TULIP_PERFMERGE(sc, perf_ifstart_cycles);
     TULIP_PERFMERGE(sc, perf_ifioctl_cycles);
-    TULIP_PERFMERGE(sc, perf_ifwatchdog_cycles);
+    TULIP_PERFMERGE(sc, perf_stat_cycles);
     TULIP_PERFMERGE(sc, perf_timeout_cycles);
     TULIP_PERFMERGE(sc, perf_ifstart_one_cycles);
     TULIP_PERFMERGE(sc, perf_txput_cycles);
@@ -4395,14 +4391,13 @@ tulip_ifwatchdog(struct ifnet *ifp)
     TULIP_PERFMERGE(sc, perf_intr);
     TULIP_PERFMERGE(sc, perf_ifstart);
     TULIP_PERFMERGE(sc, perf_ifioctl);
-    TULIP_PERFMERGE(sc, perf_ifwatchdog);
+    TULIP_PERFMERGE(sc, perf_stat);
     TULIP_PERFMERGE(sc, perf_timeout);
     TULIP_PERFMERGE(sc, perf_ifstart_one);
     TULIP_PERFMERGE(sc, perf_txput);
     TULIP_PERFMERGE(sc, perf_txintr);
     TULIP_PERFMERGE(sc, perf_rxintr);
     TULIP_PERFMERGE(sc, perf_rxget);
-    TULIP_UNLOCK(sc);
 }
 
 static void
@@ -4418,8 +4413,6 @@ tulip_attach(tulip_softc_t * const sc)
     ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST;
     ifp->if_ioctl = tulip_ifioctl;
     ifp->if_start = tulip_start;
-    ifp->if_watchdog = tulip_ifwatchdog;
-    ifp->if_timer = 1;
     ifp->if_init = tulip_init;
     IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
     ifp->if_snd.ifq_drv_maxlen = ifqmaxlen;
@@ -4839,6 +4832,7 @@ tulip_pci_attach(device_t dev)
     mtx_init(TULIP_MUTEX(sc), MTX_NETWORK_LOCK, device_get_nameunit(dev),
 	MTX_DEF);
     callout_init_mtx(&sc->tulip_callout, TULIP_MUTEX(sc), 0);
+    callout_init_mtx(&sc->tulip_stat_timer, TULIP_MUTEX(sc), 0);
     tulips[unit] = sc;
 
     tulip_initcsrs(sc, csr_base + csroffset, csrsize);

Modified: head/sys/dev/de/if_devar.h
==============================================================================
--- head/sys/dev/de/if_devar.h	Tue Nov 17 14:08:42 2009	(r199377)
+++ head/sys/dev/de/if_devar.h	Tue Nov 17 14:13:30 2009	(r199378)
@@ -477,7 +477,7 @@ struct tulip_perfstat {
 	u_quad_t	perf_ifstart_cycles;
 	u_quad_t	perf_ifstart_one_cycles;
 	u_quad_t	perf_ifioctl_cycles;
-	u_quad_t	perf_ifwatchdog_cycles;
+	u_quad_t	perf_stat_cycles;
 	u_quad_t	perf_timeout_cycles;
 	u_quad_t	perf_txput_cycles;
 	u_quad_t	perf_txintr_cycles;
@@ -487,7 +487,7 @@ struct tulip_perfstat {
 	unsigned int	perf_ifstart;
 	unsigned int	perf_ifstart_one;
 	unsigned int	perf_ifioctl;
-	unsigned int	perf_ifwatchdog;
+	unsigned int	perf_stat;
 	unsigned int	perf_timeout;
 	unsigned int	perf_txput;
 	unsigned int	perf_txintr;
@@ -570,6 +570,7 @@ struct tulip_softc {
 	tulip_srom_connection_t	tulip_conntype;
 	struct callout		tulip_callout;
 	struct mtx		tulip_mutex;
+	struct callout	tulip_stat_timer;
 };
 
 #define	tulip_curperfstats	tulip_perfstats[TULIP_PERF_CURRENT]

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:14:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9638D106566C;
	Tue, 17 Nov 2009 14:14:07 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 844EF8FC24;
	Tue, 17 Nov 2009 14:14:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEE7is011169;
	Tue, 17 Nov 2009 14:14:07 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEE7K3011166;
	Tue, 17 Nov 2009 14:14:07 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171414.nAHEE7K3011166@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 14:14:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199379 - stable/8/sys/cam/scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:14:07 -0000

Author: mav
Date: Tue Nov 17 14:14:07 2009
New Revision: 199379
URL: http://svn.freebsd.org/changeset/base/199379

Log:
  MFC r196983:
  Free the correct buffer in an error case.
  
  Submitted by:   phk

Modified:
  stable/8/sys/cam/scsi/scsi_cd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/scsi/scsi_cd.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_cd.c	Tue Nov 17 14:13:30 2009	(r199378)
+++ stable/8/sys/cam/scsi/scsi_cd.c	Tue Nov 17 14:14:07 2009	(r199379)
@@ -2528,7 +2528,7 @@ cdioctl(struct disk *dp, u_long cmd, voi
 
 			error = cdgetmode(periph, ¶ms, AUDIO_PAGE);
 			if (error) {
-				free(¶ms, M_SCSICD);
+				free(¶ms.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:23:10 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 019E4106566B;
	Tue, 17 Nov 2009 14:23:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E45A58FC0C;
	Tue, 17 Nov 2009 14:23:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEN9oo011959;
	Tue, 17 Nov 2009 14:23:09 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEN98w011955;
	Tue, 17 Nov 2009 14:23:09 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171423.nAHEN98w011955@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 14:23:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199380 - head/sys/dev/ed
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:23:10 -0000

Author: jhb
Date: Tue Nov 17 14:23:09 2009
New Revision: 199380
URL: http://svn.freebsd.org/changeset/base/199380

Log:
  Use a private callout timer to drive the transmit watchdog instead of using
  if_watchdog and if_timer.  The driver already contained an optional stats
  timer that individual attachments could use to provide a 'tick' event.  The
  stats timer only ran if the tick function pointer was non-NULL and the
  attachment's tick routine had to call callout_reset(), etc.  Now the driver
  always schedules a stat timer and manages the callout_reset() internally.
  This timer is used to drive the watchdog and will also call the attachment's
  'tick' handler if one is provided.
  
  Tested by:	WATANABE Kazuhiro

Modified:
  head/sys/dev/ed/if_ed.c
  head/sys/dev/ed/if_ed_pccard.c
  head/sys/dev/ed/if_edvar.h

Modified: head/sys/dev/ed/if_ed.c
==============================================================================
--- head/sys/dev/ed/if_ed.c	Tue Nov 17 14:14:07 2009	(r199379)
+++ head/sys/dev/ed/if_ed.c	Tue Nov 17 14:23:09 2009	(r199380)
@@ -77,7 +77,8 @@ static int	ed_ioctl(struct ifnet *, u_lo
 static void	ed_start(struct ifnet *);
 static void	ed_start_locked(struct ifnet *);
 static void	ed_reset(struct ifnet *);
-static void	ed_watchdog(struct ifnet *);
+static void	ed_tick(void *);
+static void	ed_watchdog(struct ed_softc *);
 
 static void	ed_ds_getmcaf(struct ed_softc *, uint32_t *);
 
@@ -281,7 +282,6 @@ ed_attach(device_t dev)
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
 	ifp->if_start = ed_start;
 	ifp->if_ioctl = ed_ioctl;
-	ifp->if_watchdog = ed_watchdog;
 	ifp->if_init = ed_init;
 	IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
 	ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
@@ -381,8 +381,8 @@ ed_detach(device_t dev)
 			ed_stop(sc);
 		ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 		ED_UNLOCK(sc);
-		callout_drain(&sc->tick_ch);
 		ether_ifdetach(ifp);
+		callout_drain(&sc->tick_ch);
 	}
 	if (sc->irq_res != NULL && sc->irq_handle)
 		bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
@@ -447,26 +447,42 @@ void
 ed_stop(struct ed_softc *sc)
 {
 	ED_ASSERT_LOCKED(sc);
-	if (sc->sc_tick)
-		callout_stop(&sc->tick_ch);
+	callout_stop(&sc->tick_ch);
 	ed_stop_hw(sc);
 }
 
 /*
+ * Periodic timer used to drive the watchdog and attachment-specific
+ * tick handler.
+ */
+static void
+ed_tick(void *arg)
+{
+	struct ed_softc *sc;
+
+	sc = arg;
+	ED_ASSERT_LOCKED(sc);
+	if (sc->sc_tick)
+		sc->sc_tick(sc);
+	if (sc->tx_timer != 0 && --sc->tx_timer == 0)
+		ed_watchdog(sc);
+	callout_reset(&sc->tick_ch, hz, ed_tick, sc);
+}
+
+/*
  * Device timeout/watchdog routine. Entered if the device neglects to
  *	generate an interrupt after a transmit has been started on it.
  */
 static void
-ed_watchdog(struct ifnet *ifp)
+ed_watchdog(struct ed_softc *sc)
 {
-	struct ed_softc *sc = ifp->if_softc;
+	struct ifnet *ifp;
 
+	ifp = sc->ifp;
 	log(LOG_ERR, "%s: device timeout\n", ifp->if_xname);
 	ifp->if_oerrors++;
 
-	ED_LOCK(sc);
 	ed_reset(ifp);
-	ED_UNLOCK(sc);
 }
 
 /*
@@ -499,7 +515,7 @@ ed_init_locked(struct ed_softc *sc)
 
 	/* reset transmitter flags */
 	sc->xmit_busy = 0;
-	ifp->if_timer = 0;
+	sc->tx_timer = 0;
 
 	sc->txb_inuse = 0;
 	sc->txb_new = 0;
@@ -612,8 +628,7 @@ ed_init_locked(struct ed_softc *sc)
 	 */
 	ed_start_locked(ifp);
 
-	if (sc->sc_tick)
-		callout_reset(&sc->tick_ch, hz, sc->sc_tick, sc);
+	callout_reset(&sc->tick_ch, hz, ed_tick, sc);
 }
 
 /*
@@ -622,7 +637,6 @@ ed_init_locked(struct ed_softc *sc)
 static __inline void
 ed_xmit(struct ed_softc *sc)
 {
-	struct ifnet *ifp = sc->ifp;
 	unsigned short len;
 
 	len = sc->txb_len[sc->txb_next_tx];
@@ -660,7 +674,7 @@ ed_xmit(struct ed_softc *sc)
 	/*
 	 * Set a timer just in case we never hear from the board again
 	 */
-	ifp->if_timer = 2;
+	sc->tx_timer = 2;
 }
 
 /*
@@ -1023,7 +1037,7 @@ edintr(void *arg)
 			/*
 			 * clear watchdog timer
 			 */
-			ifp->if_timer = 0;
+			sc->tx_timer = 0;
 
 			/*
 			 * Add in total number of collisions on last

Modified: head/sys/dev/ed/if_ed_pccard.c
==============================================================================
--- head/sys/dev/ed/if_ed_pccard.c	Tue Nov 17 14:14:07 2009	(r199379)
+++ head/sys/dev/ed/if_ed_pccard.c	Tue Nov 17 14:23:09 2009	(r199380)
@@ -250,7 +250,7 @@ static const struct ed_product {
  */
 static int	ed_pccard_probe(device_t);
 static int	ed_pccard_attach(device_t);
-static void	ed_pccard_tick(void *);
+static void	ed_pccard_tick(struct ed_softc *);
 
 static int	ed_pccard_dl100xx(device_t dev, const struct ed_product *);
 static void	ed_pccard_dl100xx_mii_reset(struct ed_softc *sc);
@@ -1196,9 +1196,8 @@ ed_child_detached(device_t dev, device_t
 }
 
 static void
-ed_pccard_tick(void *arg)
+ed_pccard_tick(struct ed_softc *sc)
 {
-	struct ed_softc *sc = arg;
 	struct mii_data *mii;
 	int media = 0;
 
@@ -1223,7 +1222,6 @@ ed_pccard_tick(void *arg)
 		}
 		
 	}
-	callout_reset(&sc->tick_ch, hz, ed_pccard_tick, sc);
 }
 
 static device_method_t ed_pccard_methods[] = {

Modified: head/sys/dev/ed/if_edvar.h
==============================================================================
--- head/sys/dev/ed/if_edvar.h	Tue Nov 17 14:14:07 2009	(r199379)
+++ head/sys/dev/ed/if_edvar.h	Tue Nov 17 14:23:09 2009	(r199380)
@@ -65,11 +65,12 @@ struct ed_softc {
 	void	(*mii_writebits)(struct ed_softc *, u_int, int);
 	u_int	(*mii_readbits)(struct ed_softc *, int);
 	struct callout	      tick_ch;
-        void	(*sc_tick)(void *);
+        void	(*sc_tick)(struct ed_softc *);
 	void (*readmem)(struct ed_softc *sc, bus_size_t src, uint8_t *dst,
 	    uint16_t amount);
 	u_short	(*sc_write_mbufs)(struct ed_softc *, struct mbuf *, bus_size_t);
 
+	int	tx_timer;
 	int	nic_offset;	/* NIC (DS8390) I/O bus address offset */
 	int	asic_offset;	/* ASIC I/O bus address offset */
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:30:11 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 471FE1065693;
	Tue, 17 Nov 2009 14:30:10 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 350F88FC16;
	Tue, 17 Nov 2009 14:30:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEU9iu012438;
	Tue, 17 Nov 2009 14:30:09 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEU9PK012436;
	Tue, 17 Nov 2009 14:30:09 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200911171430.nAHEU9PK012436@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 17 Nov 2009 14:30:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199381 - stable/8/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:30:11 -0000

Author: bz
Date: Tue Nov 17 14:30:09 2009
New Revision: 199381
URL: http://svn.freebsd.org/changeset/base/199381

Log:
  MFC r198049:
  
    Immediately after clearing a pending callout that didn't make it due
    to the lock we hold, disable interrupts, and announce to the firmware
    that we are shutting down. Especially do this before disabling blocks.
  
    This makes some types of machines with asf enabled no longer hang upon
    boot, when we start configuring the interface.
  
  PR:	i386/96382, kern/100410, kern/122252, kern/116328

Modified:
  stable/8/sys/dev/bge/if_bge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/bge/if_bge.c
==============================================================================
--- stable/8/sys/dev/bge/if_bge.c	Tue Nov 17 14:23:09 2009	(r199380)
+++ stable/8/sys/dev/bge/if_bge.c	Tue Nov 17 14:30:09 2009	(r199381)
@@ -4218,6 +4218,16 @@ bge_stop(struct bge_softc *sc)
 
 	callout_stop(&sc->bge_stat_ch);
 
+	/* Disable host interrupts. */
+	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
+	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
+
+	/*
+	 * Tell firmware we're shutting down.
+	 */
+	bge_stop_fw(sc);
+	bge_sig_pre_reset(sc, BGE_RESET_STOP);
+
 	/*
 	 * Disable all of the receiver blocks.
 	 */
@@ -4257,16 +4267,6 @@ bge_stop(struct bge_softc *sc)
 		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
 	}
 
-	/* Disable host interrupts. */
-	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
-	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
-
-	/*
-	 * Tell firmware we're shutting down.
-	 */
-
-	bge_stop_fw(sc);
-	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 	bge_reset(sc);
 	bge_sig_legacy(sc, BGE_RESET_STOP);
 	bge_sig_post_reset(sc, BGE_RESET_STOP);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:37:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B430F106568F;
	Tue, 17 Nov 2009 14:37:20 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A27A08FC26;
	Tue, 17 Nov 2009 14:37:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEbK2w012898;
	Tue, 17 Nov 2009 14:37:20 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEbKjD012896;
	Tue, 17 Nov 2009 14:37:20 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171437.nAHEbKjD012896@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 14:37:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199382 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:37:20 -0000

Author: mav
Date: Tue Nov 17 14:37:20 2009
New Revision: 199382
URL: http://svn.freebsd.org/changeset/base/199382

Log:
  MFC r197421:
  If on sense request device returns no sence, give up and return,
  or we may loop forever.

Modified:
  stable/8/sys/cam/cam_periph.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Tue Nov 17 14:30:09 2009	(r199381)
+++ stable/8/sys/cam/cam_periph.c	Tue Nov 17 14:37:20 2009	(r199382)
@@ -1034,8 +1034,13 @@ camperiphdone(struct cam_periph *periph,
 					cam_error_print(saved_ccb, CAM_ESF_ALL,
 							CAM_EPF_ALL);
 #endif
-					xpt_done_ccb = TRUE;
+				} else {
+					saved_ccb->ccb_h.status &=
+					    ~CAM_STATUS_MASK;
+					saved_ccb->ccb_h.status |=
+					    CAM_AUTOSENSE_FAIL;
 				}
+				xpt_done_ccb = TRUE;
 			}
 		}
 		bcopy(done_ccb->ccb_h.saved_ccb_ptr, done_ccb,

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:38:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB484106566B;
	Tue, 17 Nov 2009 14:38:47 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 997718FC1D;
	Tue, 17 Nov 2009 14:38:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEclhw013054;
	Tue, 17 Nov 2009 14:38:47 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEclw4013052;
	Tue, 17 Nov 2009 14:38:47 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171438.nAHEclw4013052@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 14:38:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199383 - stable/8/sys/cam/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:38:47 -0000

Author: mav
Date: Tue Nov 17 14:38:47 2009
New Revision: 199383
URL: http://svn.freebsd.org/changeset/base/199383

Log:
  MFC r197541:
  Report SATA 3.x devices.

Modified:
  stable/8/sys/cam/ata/ata_all.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_all.c
==============================================================================
--- stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 14:37:20 2009	(r199382)
+++ stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 14:38:47 2009	(r199383)
@@ -80,7 +80,9 @@ ata_print_ident(struct ata_params *ident
 	printf("<%s %s> ATA/ATAPI-%d",
 	    product, revision, ata_version(ident_data->version_major));
 	if (ident_data->satacapabilities && ident_data->satacapabilities != 0xffff) {
-		if (ident_data->satacapabilities & ATA_SATA_GEN2)
+		if (ident_data->satacapabilities & ATA_SATA_GEN3)
+			printf(" SATA 3.x");
+		else if (ident_data->satacapabilities & ATA_SATA_GEN2)
 			printf(" SATA 2.x");
 		else if (ident_data->satacapabilities & ATA_SATA_GEN1)
 			printf(" SATA 1.x");

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:47:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D56141065670;
	Tue, 17 Nov 2009 14:47:40 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A9F798FC15;
	Tue, 17 Nov 2009 14:47:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEleO5013801;
	Tue, 17 Nov 2009 14:47:40 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEle3b013799;
	Tue, 17 Nov 2009 14:47:40 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171447.nAHEle3b013799@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 14:47:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199384 - stable/8/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:47:41 -0000

Author: mav
Date: Tue Nov 17 14:47:40 2009
New Revision: 199384
URL: http://svn.freebsd.org/changeset/base/199384

Log:
  MFC r196907:
  To save small bit of CPU time, hide part of SNTF register read latency
  behind other reads.

Modified:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 14:38:47 2009	(r199383)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 14:47:40 2009	(r199384)
@@ -891,16 +891,12 @@ ahci_phy_check_events(device_t dev)
 }
 
 static void
-ahci_notify_events(device_t dev)
+ahci_notify_events(device_t dev, u_int32_t status)
 {
 	struct ahci_channel *ch = device_get_softc(dev);
 	struct cam_path *dpath;
-	u_int32_t status;
 	int i;
 
-	status = ATA_INL(ch->r_mem, AHCI_P_SNTF);
-	if (status == 0)
-		return;
 	ATA_OUTL(ch->r_mem, AHCI_P_SNTF, status);
 	if (bootverbose)
 		device_printf(dev, "SNTF 0x%04x\n", status);
@@ -948,7 +944,7 @@ ahci_ch_intr(void *data)
 {
 	device_t dev = (device_t)data;
 	struct ahci_channel *ch = device_get_softc(dev);
-	uint32_t istatus, cstatus, sstatus, ok, err;
+	uint32_t istatus, sstatus, cstatus, sntf = 0, ok, err;
 	enum ahci_err_type et;
 	int i, ccs, ncq_err = 0;
 
@@ -958,8 +954,10 @@ ahci_ch_intr(void *data)
 		return;
 	ATA_OUTL(ch->r_mem, AHCI_P_IS, istatus);
 	/* Read command statuses. */
-	cstatus = ATA_INL(ch->r_mem, AHCI_P_CI);
 	sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT);
+	cstatus = ATA_INL(ch->r_mem, AHCI_P_CI);
+	if ((istatus & AHCI_P_IX_SDB) && (ch->caps & AHCI_CAP_SSNTF))
+		sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF);
 	/* Process PHY events */
 	if (istatus & (AHCI_P_IX_PRC | AHCI_P_IX_PC))
 		ahci_phy_check_events(dev);
@@ -1023,8 +1021,8 @@ ahci_ch_intr(void *data)
 			ahci_issue_read_log(dev);
 	}
 	/* Process NOTIFY events */
-	if ((istatus & AHCI_P_IX_SDB) && (ch->caps & AHCI_CAP_SSNTF))
-		ahci_notify_events(dev);
+	if (sntf)
+		ahci_notify_events(dev, sntf);
 }
 
 /* Must be called with channel locked. */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:49:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C88EC106566C;
	Tue, 17 Nov 2009 14:49:35 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9C6F98FC14;
	Tue, 17 Nov 2009 14:49:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEnZMY013984;
	Tue, 17 Nov 2009 14:49:35 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEnZDl013979;
	Tue, 17 Nov 2009 14:49:35 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171449.nAHEnZDl013979@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 14:49:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199385 - in stable/8/sys: cam/ata dev/ahci dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:49:35 -0000

Author: mav
Date: Tue Nov 17 14:49:35 2009
New Revision: 199385
URL: http://svn.freebsd.org/changeset/base/199385

Log:
  MFC r198322:
  Report real max_target = 15. SIM doesn't need to know that target 15 is PMP.
  It is XPT business.

Modified:
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 14:47:40 2009	(r199384)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 14:49:35 2009	(r199385)
@@ -1212,7 +1212,8 @@ ata_scan_bus(struct cam_periph *periph, 
 take_next:
 		/* Take next device. Wrap from 15 (PM) to 0. */
 		scan_info->counter = (scan_info->counter + 1 ) & 0x0f;
-		if (scan_info->counter >= scan_info->cpi->max_target+1) {
+		if (scan_info->counter > scan_info->cpi->max_target -
+		    ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? 1 : 0)) {
 			xpt_free_ccb(work_ccb);
 			xpt_free_ccb((union ccb *)scan_info->cpi);
 			request_ccb = scan_info->request_ccb;

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 14:47:40 2009	(r199384)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 14:49:35 2009	(r199385)
@@ -1924,7 +1924,7 @@ ahciaction(struct cam_sim *sim, union cc
 		cpi->hba_misc = PIM_SEQSCAN;
 		cpi->hba_eng_cnt = 0;
 		if (ch->caps & AHCI_CAP_SPM)
-			cpi->max_target = 14;
+			cpi->max_target = 15;
 		else
 			cpi->max_target = 0;
 		cpi->max_lun = 0;

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 14:47:40 2009	(r199384)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 14:49:35 2009	(r199385)
@@ -1564,7 +1564,7 @@ siisaction(struct cam_sim *sim, union cc
 		cpi->target_sprt = 0;
 		cpi->hba_misc = PIM_SEQSCAN;
 		cpi->hba_eng_cnt = 0;
-		cpi->max_target = 14;
+		cpi->max_target = 15;
 		cpi->max_lun = 0;
 		cpi->initiator_id = 0;
 		cpi->bus_id = cam_sim_bus(sim);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 14:56:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 538081065670;
	Tue, 17 Nov 2009 14:56:01 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4065D8FC0A;
	Tue, 17 Nov 2009 14:56:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEu1mK014476;
	Tue, 17 Nov 2009 14:56:01 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEu1UG014474;
	Tue, 17 Nov 2009 14:56:01 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171456.nAHEu1UG014474@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 14:56:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199386 - stable/8/sys/cam/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 14:56:01 -0000

Author: mav
Date: Tue Nov 17 14:56:00 2009
New Revision: 199386
URL: http://svn.freebsd.org/changeset/base/199386

Log:
  MFC r198328:
  Add support for PIO-only devices.
  Fix maxio values and 256 sectors transactions for 28bits commands.
  Implement periodic ordered commands insertion, sames as da driver does.
  Remove some SCSIsms.

Modified:
  stable/8/sys/cam/ata/ata_da.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 14:49:35 2009	(r199385)
+++ stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 14:56:00 2009	(r199386)
@@ -63,37 +63,32 @@ __FBSDID("$FreeBSD$");
 #define ATA_MAX_28BIT_LBA               268435455UL
 
 typedef enum {
-	ADA_STATE_NORMAL
+	ADA_STATE_NORMAL,
+	ADA_STATE_SET_MULTI
 } ada_state;
 
 typedef enum {
 	ADA_FLAG_PACK_INVALID	= 0x001,
 	ADA_FLAG_CAN_48BIT	= 0x002,
 	ADA_FLAG_CAN_FLUSHCACHE	= 0x004,
-	ADA_FLAG_CAN_NCQ		= 0x008,
-	ADA_FLAG_TAGGED_QUEUING	= 0x010,
+	ADA_FLAG_CAN_NCQ	= 0x008,
+	ADA_FLAG_CAN_DMA	= 0x010,
 	ADA_FLAG_NEED_OTAG	= 0x020,
 	ADA_FLAG_WENT_IDLE	= 0x040,
-	ADA_FLAG_RETRY_UA	= 0x080,
 	ADA_FLAG_OPEN		= 0x100,
 	ADA_FLAG_SCTX_INIT	= 0x200
 } ada_flags;
 
 typedef enum {
-	ADA_Q_NONE		= 0x00,
-	ADA_Q_NO_SYNC_CACHE	= 0x01,
-	ADA_Q_NO_6_BYTE		= 0x02,
-	ADA_Q_NO_PREVENT		= 0x04
+	ADA_Q_NONE		= 0x00
 } ada_quirks;
 
 typedef enum {
-	ADA_CCB_PROBE		= 0x01,
-	ADA_CCB_PROBE2		= 0x02,
+	ADA_CCB_SET_MULTI	= 0x01,
 	ADA_CCB_BUFFER_IO	= 0x03,
 	ADA_CCB_WAITING		= 0x04,
 	ADA_CCB_DUMP		= 0x05,
 	ADA_CCB_TYPE_MASK	= 0x0F,
-	ADA_CCB_RETRY_UA		= 0x10
 } ada_ccb_state;
 
 /* Offsets into our private area for storing information */
@@ -117,6 +112,7 @@ struct ada_softc {
 	ada_quirks quirks;
 	int	 ordered_tag_count;
 	int	 outstanding_cmds;
+	int	 secsperint;
 	struct	 disk_params params;
 	struct	 disk *disk;
 	union	 ccb saved_ccb;
@@ -289,8 +285,7 @@ adaclose(struct disk *dp)
 		else
 			ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
 		cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0,
-		    /*sense_flags*/SF_RETRY_UA,
-		    softc->disk->d_devstat);
+		    /*sense_flags*/0, softc->disk->d_devstat);
 
 		if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
 			xpt_print(periph->path, "Synchronize cache failed\n");
@@ -331,19 +326,6 @@ adastrategy(struct bio *bp)
 
 	cam_periph_lock(periph);
 
-#if 0
-	/*
-	 * check it's not too big a transfer for our adapter
-	 */
-	scsi_minphys(bp,&sd_switch);
-#endif
-
-	/*
-	 * Mask interrupts so that the pack cannot be invalidated until
-	 * after we are in the queue.  Otherwise, we might not properly
-	 * clean up one of the buffers.
-	 */
-	
 	/*
 	 * If the device has been made invalid, error out
 	 */
@@ -551,11 +533,6 @@ adaasync(void *callback_arg, u_int32_t c
 		if (cgd->protocol != PROTO_ATA)
 			break;
 
-//		if (SID_TYPE(&cgd->inq_data) != T_DIRECT
-//		    && SID_TYPE(&cgd->inq_data) != T_RBC
-//		    && SID_TYPE(&cgd->inq_data) != T_OPTICAL)
-//			break;
-
 		/*
 		 * Allocate a peripheral instance for
 		 * this device and start the probe
@@ -576,18 +553,18 @@ adaasync(void *callback_arg, u_int32_t c
 	case AC_SENT_BDR:
 	case AC_BUS_RESET:
 	{
-		struct ada_softc *softc;
-		struct ccb_hdr *ccbh;
+		struct ada_softc *softc = (struct ada_softc *)periph->softc;
 
-		softc = (struct ada_softc *)periph->softc;
+		cam_periph_async(periph, code, path, arg);
+		if (softc->state != ADA_STATE_NORMAL)
+			break;
 		/*
-		 * Don't fail on the expected unit attention
-		 * that will occur.
+		 * Restore device configuration.
 		 */
-		softc->flags |= ADA_FLAG_RETRY_UA;
-		LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le)
-			ccbh->ccb_state |= ADA_CCB_RETRY_UA;
-		/* FALLTHROUGH*/
+		softc->state = ADA_STATE_SET_MULTI;
+		cam_periph_acquire(periph);
+		xpt_schedule(periph, 0);
+		break;
 	}
 	default:
 		cam_periph_async(periph, code, path, arg);
@@ -651,14 +628,15 @@ adaregister(struct cam_periph *periph, v
 
 	if (softc == NULL) {
 		printf("adaregister: Unable to probe new device. "
-		       "Unable to allocate softc\n");				
+		    "Unable to allocate softc\n");
 		return(CAM_REQ_CMP_ERR);
 	}
 
 	LIST_INIT(&softc->pending_ccbs);
-	softc->state = ADA_STATE_NORMAL;
 	bioq_init(&softc->bio_queue);
 
+	if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA)
+		softc->flags |= ADA_FLAG_CAN_DMA;
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48)
 		softc->flags |= ADA_FLAG_CAN_48BIT;
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
@@ -666,8 +644,8 @@ adaregister(struct cam_periph *periph, v
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
 	    cgd->ident_data.queue >= 31)
 		softc->flags |= ADA_FLAG_CAN_NCQ;
-//	if ((cgd->inq_data.flags & SID_CmdQue) != 0)
-//		softc->flags |= ADA_FLAG_TAGGED_QUEUING;
+	softc->secsperint = max(1, min(cgd->ident_data.sectors_intr, 16));
+	softc->state = ADA_STATE_SET_MULTI;
 
 	periph->softc = softc;
 
@@ -713,9 +691,9 @@ adaregister(struct cam_periph *periph, v
 	else if (maxio > MAXPHYS)
 		maxio = MAXPHYS;	/* for safety */
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48)
-		maxio = min(maxio, 65535 * 512);
+		maxio = min(maxio, 65536 * 512);
 	else					/* 28bit ATA command limit */
-		maxio = min(maxio, 255 * 512);
+		maxio = min(maxio, 256 * 512);
 	softc->disk->d_maxsize = maxio;
 	softc->disk->d_unit = periph->unit_number;
 	softc->disk->d_flags = 0;
@@ -730,8 +708,6 @@ adaregister(struct cam_periph *periph, v
 	/* XXX: these are not actually "firmware" values, so they may be wrong */
 	softc->disk->d_fwsectors = softc->params.secs_per_track;
 	softc->disk->d_fwheads = softc->params.heads;
-//	softc->disk->d_devstat->block_size = softc->params.secsize;
-//	softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE;
 
 	disk_create(softc->disk, DISK_VERSION);
 	mtx_lock(periph->sim->mtx);
@@ -766,8 +742,8 @@ adaregister(struct cam_periph *periph, v
 	 * to finish the probe.  The reference will be dropped in adadone at
 	 * the end of probe.
 	 */
-//	(void)cam_periph_hold(periph, PRIBIO);
-//	xpt_schedule(periph, /*priority*/5);
+	cam_periph_acquire(periph);
+	xpt_schedule(periph, /*priority*/5);
 
 	/*
 	 * Schedule a periodic event to occasionally send an
@@ -784,9 +760,8 @@ adaregister(struct cam_periph *periph, v
 static void
 adastart(struct cam_periph *periph, union ccb *start_ccb)
 {
-	struct ada_softc *softc;
-
-	softc = (struct ada_softc *)periph->softc;
+	struct ada_softc *softc = (struct ada_softc *)periph->softc;
+	struct ccb_ataio *ataio = &start_ccb->ataio;
 
 	switch (softc->state) {
 	case ADA_STATE_NORMAL:
@@ -809,7 +784,6 @@ adastart(struct cam_periph *periph, unio
 		} else if (bp == NULL) {
 			xpt_release_ccb(start_ccb);
 		} else {
-			struct ccb_ataio *ataio = &start_ccb->ataio;
 			u_int8_t tag_code;
 
 			bioq_remove(&softc->bio_queue, bp);
@@ -817,9 +791,9 @@ adastart(struct cam_periph *periph, unio
 			if ((softc->flags & ADA_FLAG_NEED_OTAG) != 0) {
 				softc->flags &= ~ADA_FLAG_NEED_OTAG;
 				softc->ordered_tag_count++;
-				tag_code = 0;//MSG_ORDERED_Q_TAG;
+				tag_code = 0;
 			} else {
-				tag_code = 0;//MSG_SIMPLE_Q_TAG;
+				tag_code = 1;
 			}
 			switch (bp->bio_cmd) {
 			case BIO_READ:
@@ -838,7 +812,7 @@ adastart(struct cam_periph *periph, unio
 				    bp->bio_bcount,
 				    ada_default_timeout*1000);
 
-				if (softc->flags & ADA_FLAG_CAN_NCQ) {
+				if ((softc->flags & ADA_FLAG_CAN_NCQ) && tag_code) {
 					if (bp->bio_cmd == BIO_READ) {
 						ata_ncq_cmd(ataio, ATA_READ_FPDMA_QUEUED,
 						    lba, count);
@@ -848,21 +822,43 @@ adastart(struct cam_periph *periph, unio
 					}
 				} else if ((softc->flags & ADA_FLAG_CAN_48BIT) &&
 				    (lba + count >= ATA_MAX_28BIT_LBA ||
-				    count >= 256)) {
-					if (bp->bio_cmd == BIO_READ) {
-						ata_48bit_cmd(ataio, ATA_READ_DMA48,
-						    0, lba, count);
+				    count > 256)) {
+					if (softc->flags & ADA_FLAG_CAN_DMA) {
+						if (bp->bio_cmd == BIO_READ) {
+							ata_48bit_cmd(ataio, ATA_READ_DMA48,
+							    0, lba, count);
+						} else {
+							ata_48bit_cmd(ataio, ATA_WRITE_DMA48,
+							    0, lba, count);
+						}
 					} else {
-						ata_48bit_cmd(ataio, ATA_WRITE_DMA48,
-						    0, lba, count);
+						if (bp->bio_cmd == BIO_READ) {
+							ata_48bit_cmd(ataio, ATA_READ_MUL48,
+							    0, lba, count);
+						} else {
+							ata_48bit_cmd(ataio, ATA_WRITE_MUL48,
+							    0, lba, count);
+						}
 					}
 				} else {
-					if (bp->bio_cmd == BIO_READ) {
-						ata_28bit_cmd(ataio, ATA_READ_DMA,
-						    0, lba, count);
+					if (count == 256)
+						count = 0;
+					if (softc->flags & ADA_FLAG_CAN_DMA) {
+						if (bp->bio_cmd == BIO_READ) {
+							ata_28bit_cmd(ataio, ATA_READ_DMA,
+							    0, lba, count);
+						} else {
+							ata_28bit_cmd(ataio, ATA_WRITE_DMA,
+							    0, lba, count);
+						}
 					} else {
-						ata_28bit_cmd(ataio, ATA_WRITE_DMA,
-						    0, lba, count);
+						if (bp->bio_cmd == BIO_READ) {
+							ata_28bit_cmd(ataio, ATA_READ_MUL,
+							    0, lba, count);
+						} else {
+							ata_28bit_cmd(ataio, ATA_WRITE_MUL,
+							    0, lba, count);
+						}
 					}
 				}
 			}
@@ -872,7 +868,7 @@ adastart(struct cam_periph *periph, unio
 				    1,
 				    adadone,
 				    CAM_DIR_NONE,
-				    tag_code,
+				    0,
 				    NULL,
 				    0,
 				    ada_default_timeout*1000);
@@ -893,12 +889,6 @@ adastart(struct cam_periph *periph, unio
 					 &start_ccb->ccb_h, periph_links.le);
 			softc->outstanding_cmds++;
 
-			/* We expect a unit attention from this device */
-			if ((softc->flags & ADA_FLAG_RETRY_UA) != 0) {
-				start_ccb->ccb_h.ccb_state |= ADA_CCB_RETRY_UA;
-				softc->flags &= ~ADA_FLAG_RETRY_UA;
-			}
-
 			start_ccb->ccb_h.ccb_bp = bp;
 			bp = bioq_first(&softc->bio_queue);
 
@@ -911,6 +901,21 @@ adastart(struct cam_periph *periph, unio
 		}
 		break;
 	}
+	case ADA_STATE_SET_MULTI:
+	{
+		cam_fill_ataio(ataio,
+		    ada_retry_count,
+		    adadone,
+		    CAM_DIR_NONE,
+		    0,
+		    NULL,
+		    0,
+		    ada_default_timeout*1000);
+
+		ata_28bit_cmd(ataio, ATA_SET_MULTI, 0, 0, softc->secsperint);
+		start_ccb->ccb_h.ccb_state = ADA_CCB_SET_MULTI;
+		xpt_action(start_ccb);
+	}
 	}
 }
 
@@ -931,16 +936,12 @@ adadone(struct cam_periph *periph, union
 		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
 			int error;
 			
-			error = adaerror(done_ccb, CAM_RETRY_SELTO, 0);
+			error = adaerror(done_ccb, 0, 0);
 			if (error == ERESTART) {
-				/*
-				 * A retry was scheuled, so
-				 * just return.
-				 */
+				/* A retry was scheduled, so just return. */
 				return;
 			}
 			if (error != 0) {
-
 				if (error == ENXIO) {
 					/*
 					 * Catastrophic error.  Mark our pack as
@@ -1002,6 +1003,35 @@ adadone(struct cam_periph *periph, union
 		wakeup(&done_ccb->ccb_h.cbfcnp);
 		return;
 	}
+	case ADA_CCB_SET_MULTI:
+	{
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+		} else {
+			int	error;
+
+			error = adaerror(done_ccb, 0, 0);
+			if (error == ERESTART) {
+				/* A retry was scheduled, so just return. */
+				return;
+			}
+		}
+		softc->state = ADA_STATE_NORMAL;
+		/*
+		 * Since our peripheral may be invalidated by an error
+		 * above or an external event, we must release our CCB
+		 * before releasing the probe lock on the peripheral.
+		 * The peripheral will only go away once the last lock
+		 * is removed, and we need it around for the CCB release
+		 * operation.
+		 */
+		xpt_release_ccb(done_ccb);
+		if (bioq_first(&softc->bio_queue) != NULL) {
+			/* Have more work to do, so ensure we stay scheduled */
+			xpt_schedule(periph, 1);
+		}
+		cam_periph_release_locked(periph);
+		return;
+	}
 	case ADA_CCB_DUMP:
 		/* No-op.  We're polling */
 		return;
@@ -1049,10 +1079,6 @@ adasetgeom(struct cam_periph *periph, st
 	lbasize = (u_int32_t)cgd->ident_data.lba_size_1 |
 		  ((u_int32_t)cgd->ident_data.lba_size_2 << 16);
 
-    /* does this device need oldstyle CHS addressing */
-//    if (!ad_version(cgd->ident_data.version_major) || !lbasize)
-//	atadev->flags |= ATA_D_USE_CHS;
-
 	/* use the 28bit LBA size if valid or bigger than the CHS mapping */
 	if (cgd->ident_data.cylinders == 16383 || dp->sectors < lbasize)
 		dp->sectors = lbasize;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:04:58 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0B0A106568D;
	Tue, 17 Nov 2009 15:04:58 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BDD0A8FC14;
	Tue, 17 Nov 2009 15:04:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHF4wa6015189;
	Tue, 17 Nov 2009 15:04:58 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHF4wt4015186;
	Tue, 17 Nov 2009 15:04:58 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171504.nAHF4wt4015186@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 15:04:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199387 - in stable/8/sys/cam: . ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:04:59 -0000

Author: mav
Date: Tue Nov 17 15:04:58 2009
New Revision: 199387
URL: http://svn.freebsd.org/changeset/base/199387

Log:
  MFC r198331:
  Separate CAM_DEV_IDENTIFY_DATA_VALID flag from CAM_DEV_INQUIRY_DATA_VALID.
  Add workaround for very old devices without support for mode setting.
  Add some PATA bus scanning support.
  Remove some SCSIsms.

Modified:
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/cam/cam_xpt_internal.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 14:56:00 2009	(r199386)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 15:04:58 2009	(r199387)
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 	/* for xpt_print below */
 #include "opt_cam.h"
@@ -755,11 +754,8 @@ probedone(struct cam_periph *periph, uni
 				    strlen(path->device->serial_num);
 			}
 
-			path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
-
-			scsi_find_quirk(path->device);
+			path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
 			ata_device_transport(path);
-
 			PROBE_SET_ACTION(softc, PROBE_SETMODE);
 			xpt_release_ccb(done_ccb);
 			xpt_schedule(periph, priority);
@@ -793,7 +789,7 @@ device_fail:
 	case PROBE_SETMODE:
 	{
 		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			if (path->device->protocol == PROTO_ATA) {
+modedone:		if (path->device->protocol == PROTO_ATA) {
 				path->device->flags &= ~CAM_DEV_UNCONFIGURED;
 				done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
 				xpt_action(done_ccb);
@@ -815,6 +811,10 @@ device_fail:
 			xpt_release_devq(done_ccb->ccb_h.path, /*count*/1,
 					 /*run_queue*/TRUE);
 		}
+		/* Old PIO2 devices may not support mode setting. */
+		if (ata_max_pmode(ident_buf) <= ATA_PIO2 &&
+		    (ident_buf->capabilities1 & ATA_SUPPORT_IORDY) == 0)
+			goto modedone;
 		goto device_fail;
 	}
 	case PROBE_INQUIRY:
@@ -854,8 +854,7 @@ device_fail:
 				}
 
 				scsi_find_quirk(path->device);
-
-//				scsi_devise_transport(path);
+				ata_device_transport(path);
 				path->device->flags &= ~CAM_DEV_UNCONFIGURED;
 				done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
 				xpt_action(done_ccb);
@@ -876,7 +875,7 @@ device_fail:
 	}
 	case PROBE_PM_PID:
 		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			if ((path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) == 0)
+			if ((path->device->flags & CAM_DEV_IDENTIFY_DATA_VALID) == 0)
 				bzero(ident_buf, sizeof(*ident_buf));
 			softc->pm_pid = (done_ccb->ataio.res.lba_high << 24) +
 			    (done_ccb->ataio.res.lba_mid << 16) +
@@ -940,7 +939,7 @@ device_fail:
 				softc->pm_ports = 5;
 			printf("PM ports: %d\n", softc->pm_ports);
 			ident_buf->config = softc->pm_ports;
-			path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
+			path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
 			softc->pm_step = 0;
 			PROBE_SET_ACTION(softc, PROBE_PM_RESET);
 			xpt_release_ccb(done_ccb);
@@ -1170,7 +1169,10 @@ ata_scan_bus(struct cam_periph *periph, 
 		}
 		scan_info->request_ccb = request_ccb;
 		scan_info->cpi = &work_ccb->cpi;
-		scan_info->found = 0x8001;
+		if (scan_info->cpi->transport == XPORT_ATA)
+			scan_info->found = 0x0003;
+		else
+			scan_info->found = 0x8001;
 		scan_info->counter = 0;
 		/* If PM supported, probe it first. */
 		if (scan_info->cpi->hba_inquiry & PI_SATAPM)
@@ -1400,68 +1402,29 @@ static void
 ata_device_transport(struct cam_path *path)
 {
 	struct ccb_pathinq cpi;
-//	struct ccb_trans_settings cts;
-	struct scsi_inquiry_data *inq_buf;
+	struct ccb_trans_settings cts;
+	struct scsi_inquiry_data *inq_buf = NULL;
+	struct ata_params *ident_buf = NULL;
 
 	/* Get transport information from the SIM */
 	xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
-	inq_buf = NULL;
-//	if ((path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0)
-//		inq_buf = &path->device->inq_data;
-//	path->device->protocol = cpi.protocol;
-//	path->device->protocol_version =
-//	    inq_buf != NULL ? SID_ANSI_REV(inq_buf) : cpi.protocol_version;
 	path->device->transport = cpi.transport;
-	path->device->transport_version = cpi.transport_version;
-#if 0
-	/*
-	 * Any device not using SPI3 features should
-	 * be considered SPI2 or lower.
-	 */
-	if (inq_buf != NULL) {
-		if (path->device->transport == XPORT_SPI
-		 && (inq_buf->spi3data & SID_SPI_MASK) == 0
-		 && path->device->transport_version > 2)
-			path->device->transport_version = 2;
-	} else {
-		struct cam_ed* otherdev;
-
-		for (otherdev = TAILQ_FIRST(&path->target->ed_entries);
-		     otherdev != NULL;
-		     otherdev = TAILQ_NEXT(otherdev, links)) {
-			if (otherdev != path->device)
-				break;
-		}
-
-		if (otherdev != NULL) {
-			/*
-			 * Initially assume the same versioning as
-			 * prior luns for this target.
-			 */
-			path->device->protocol_version =
-			    otherdev->protocol_version;
-			path->device->transport_version =
-			    otherdev->transport_version;
-		} else {
-			/* Until we know better, opt for safty */
-			path->device->protocol_version = 2;
-			if (path->device->transport == XPORT_SPI)
-				path->device->transport_version = 2;
-			else
-				path->device->transport_version = 0;
-		}
+	if ((path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0)
+		inq_buf = &path->device->inq_data;
+	if ((path->device->flags & CAM_DEV_IDENTIFY_DATA_VALID) != 0)
+		ident_buf = &path->device->ident_data;
+	if (path->device->protocol == PROTO_ATA) {
+		path->device->protocol_version = ident_buf ?
+		    ata_version(ident_buf->version_major) : cpi.protocol_version;
+	} else if (path->device->protocol == PROTO_SCSI) {
+		path->device->protocol_version = inq_buf ?
+		    SID_ANSI_REV(inq_buf) : cpi.protocol_version;
 	}
-
-	/*
-	 * XXX
-	 * For a device compliant with SPC-2 we should be able
-	 * to determine the transport version supported by
-	 * scrutinizing the version descriptors in the
-	 * inquiry buffer.
-	 */
+	path->device->transport_version = ident_buf ?
+	    ata_version(ident_buf->version_major) : cpi.transport_version;
 
 	/* Tell the controller what we think */
 	xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
@@ -1474,7 +1437,6 @@ ata_device_transport(struct cam_path *pa
 	cts.proto_specific.valid = 0;
 	cts.xport_specific.valid = 0;
 	xpt_action((union ccb *)&cts);
-#endif
 }
 
 static void
@@ -1630,114 +1592,6 @@ scsi_set_transfer_settings(struct ccb_tr
 			scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
 	}
 
-	/* SPI specific sanity checking */
-	if (cts->transport == XPORT_SPI && async_update == FALSE) {
-		u_int spi3caps;
-		struct ccb_trans_settings_spi *spi;
-		struct ccb_trans_settings_spi *cur_spi;
-
-		spi = &cts->xport_specific.spi;
-
-		cur_spi = &cur_cts.xport_specific.spi;
-
-		/* Fill in any gaps in what the user gave us */
-		if ((spi->valid & CTS_SPI_VALID_SYNC_RATE) == 0)
-			spi->sync_period = cur_spi->sync_period;
-		if ((cur_spi->valid & CTS_SPI_VALID_SYNC_RATE) == 0)
-			spi->sync_period = 0;
-		if ((spi->valid & CTS_SPI_VALID_SYNC_OFFSET) == 0)
-			spi->sync_offset = cur_spi->sync_offset;
-		if ((cur_spi->valid & CTS_SPI_VALID_SYNC_OFFSET) == 0)
-			spi->sync_offset = 0;
-		if ((spi->valid & CTS_SPI_VALID_PPR_OPTIONS) == 0)
-			spi->ppr_options = cur_spi->ppr_options;
-		if ((cur_spi->valid & CTS_SPI_VALID_PPR_OPTIONS) == 0)
-			spi->ppr_options = 0;
-		if ((spi->valid & CTS_SPI_VALID_BUS_WIDTH) == 0)
-			spi->bus_width = cur_spi->bus_width;
-		if ((cur_spi->valid & CTS_SPI_VALID_BUS_WIDTH) == 0)
-			spi->bus_width = 0;
-		if ((spi->valid & CTS_SPI_VALID_DISC) == 0) {
-			spi->flags &= ~CTS_SPI_FLAGS_DISC_ENB;
-			spi->flags |= cur_spi->flags & CTS_SPI_FLAGS_DISC_ENB;
-		}
-		if ((cur_spi->valid & CTS_SPI_VALID_DISC) == 0)
-			spi->flags &= ~CTS_SPI_FLAGS_DISC_ENB;
-		if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
-		  && (inq_data->flags & SID_Sync) == 0
-		  && cts->type == CTS_TYPE_CURRENT_SETTINGS)
-		 || ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0)) {
-			/* Force async */
-			spi->sync_period = 0;
-			spi->sync_offset = 0;
-		}
-
-		switch (spi->bus_width) {
-		case MSG_EXT_WDTR_BUS_32_BIT:
-			if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) == 0
-			  || (inq_data->flags & SID_WBus32) != 0
-			  || cts->type == CTS_TYPE_USER_SETTINGS)
-			 && (cpi.hba_inquiry & PI_WIDE_32) != 0)
-				break;
-			/* Fall Through to 16-bit */
-		case MSG_EXT_WDTR_BUS_16_BIT:
-			if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) == 0
-			  || (inq_data->flags & SID_WBus16) != 0
-			  || cts->type == CTS_TYPE_USER_SETTINGS)
-			 && (cpi.hba_inquiry & PI_WIDE_16) != 0) {
-				spi->bus_width = MSG_EXT_WDTR_BUS_16_BIT;
-				break;
-			}
-			/* Fall Through to 8-bit */
-		default: /* New bus width?? */
-		case MSG_EXT_WDTR_BUS_8_BIT:
-			/* All targets can do this */
-			spi->bus_width = MSG_EXT_WDTR_BUS_8_BIT;
-			break;
-		}
-
-		spi3caps = cpi.xport_specific.spi.ppr_options;
-		if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
-		 && cts->type == CTS_TYPE_CURRENT_SETTINGS)
-			spi3caps &= inq_data->spi3data;
-
-		if ((spi3caps & SID_SPI_CLOCK_DT) == 0)
-			spi->ppr_options &= ~MSG_EXT_PPR_DT_REQ;
-
-		if ((spi3caps & SID_SPI_IUS) == 0)
-			spi->ppr_options &= ~MSG_EXT_PPR_IU_REQ;
-
-		if ((spi3caps & SID_SPI_QAS) == 0)
-			spi->ppr_options &= ~MSG_EXT_PPR_QAS_REQ;
-
-		/* No SPI Transfer settings are allowed unless we are wide */
-		if (spi->bus_width == 0)
-			spi->ppr_options = 0;
-
-		if ((spi->valid & CTS_SPI_VALID_DISC)
-		 && ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) == 0)) {
-			/*
-			 * Can't tag queue without disconnection.
-			 */
-			scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
-			scsi->valid |= CTS_SCSI_VALID_TQ;
-		}
-
-		/*
-		 * If we are currently performing tagged transactions to
-		 * this device and want to change its negotiation parameters,
-		 * go non-tagged for a bit to give the controller a chance to
-		 * negotiate unhampered by tag messages.
-		 */
-		if (cts->type == CTS_TYPE_CURRENT_SETTINGS
-		 && (device->inq_flags & SID_CmdQue) != 0
-		 && (scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0
-		 && (spi->flags & (CTS_SPI_VALID_SYNC_RATE|
-				   CTS_SPI_VALID_SYNC_OFFSET|
-				   CTS_SPI_VALID_BUS_WIDTH)) != 0)
-			scsi_toggle_tags(cts->ccb_h.path);
-	}
-
 	if (cts->type == CTS_TYPE_CURRENT_SETTINGS
 	 && (scsi->valid & CTS_SCSI_VALID_TQ) != 0) {
 		int device_tagenb;

Modified: stable/8/sys/cam/cam_xpt_internal.h
==============================================================================
--- stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 14:56:00 2009	(r199386)
+++ stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 15:04:58 2009	(r199387)
@@ -116,6 +116,7 @@ struct cam_ed {
 #define CAM_DEV_INQUIRY_DATA_VALID	0x40
 #define	CAM_DEV_IN_DV			0x80
 #define	CAM_DEV_DV_HIT_BOTTOM		0x100
+#define CAM_DEV_IDENTIFY_DATA_VALID	0x200
 	u_int32_t	 tag_delay_count;
 #define	CAM_TAG_DELAY_COUNT		5
 	u_int32_t	 tag_saved_openings;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:08:02 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6C7BD106568B;
	Tue, 17 Nov 2009 15:08:02 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A8F58FC13;
	Tue, 17 Nov 2009 15:08:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHF82QH015470;
	Tue, 17 Nov 2009 15:08:02 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHF82lN015468;
	Tue, 17 Nov 2009 15:08:02 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171508.nAHF82lN015468@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 15:08:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199388 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:08:02 -0000

Author: mav
Date: Tue Nov 17 15:08:01 2009
New Revision: 199388
URL: http://svn.freebsd.org/changeset/base/199388

Log:
  MFC r198333:
  Do not search for bus when it is not needed.

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 15:04:58 2009	(r199387)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 15:08:01 2009	(r199388)
@@ -4148,8 +4148,6 @@ xpt_release_simq(struct cam_sim *sim, in
 
 		sendq->qfrozen_cnt--;
 		if (sendq->qfrozen_cnt == 0) {
-			struct cam_eb *bus;
-
 			/*
 			 * If there is a timeout scheduled to release this
 			 * sim queue, remove it.  The queue frozen count is
@@ -4159,15 +4157,17 @@ xpt_release_simq(struct cam_sim *sim, in
 				callout_stop(&sim->callout);
 				sim->flags &= ~CAM_SIM_REL_TIMEOUT_PENDING;
 			}
-			bus = xpt_find_bus(sim->path_id);
 
 			if (run_queue) {
+				struct cam_eb *bus;
+
 				/*
 				 * Now that we are unfrozen run the send queue.
 				 */
+				bus = xpt_find_bus(sim->path_id);
 				xpt_run_dev_sendq(bus);
+				xpt_release_bus(bus);
 			}
-			xpt_release_bus(bus);
 		}
 	}
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:14:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C11F71065672;
	Tue, 17 Nov 2009 15:14:13 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AF0EA8FC08;
	Tue, 17 Nov 2009 15:14:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFEDOZ016070;
	Tue, 17 Nov 2009 15:14:13 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFEDd5016067;
	Tue, 17 Nov 2009 15:14:13 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171514.nAHFEDd5016067@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 15:14:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199389 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:14:13 -0000

Author: mav
Date: Tue Nov 17 15:14:13 2009
New Revision: 199389
URL: http://svn.freebsd.org/changeset/base/199389

Log:
  MFC r198372, r198377:
  Implement cam_ccbq_fini().
  This is effectively NULL change, but makes this API a bit more consistent.

Modified:
  stable/8/sys/cam/cam_queue.c
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/cam_queue.c
==============================================================================
--- stable/8/sys/cam/cam_queue.c	Tue Nov 17 15:08:01 2009	(r199388)
+++ stable/8/sys/cam/cam_queue.c	Tue Nov 17 15:14:13 2009	(r199389)
@@ -289,7 +289,7 @@ void
 cam_ccbq_free(struct cam_ccbq *ccbq)
 {
 	if (ccbq) {
-		camq_fini(&ccbq->queue);
+		cam_ccbq_fini(ccbq);
 		free(ccbq, M_CAMCCBQ);
 	}
 }
@@ -338,6 +338,13 @@ cam_ccbq_init(struct cam_ccbq *ccbq, int
 	return (0);
 }
 
+void
+cam_ccbq_fini(struct cam_ccbq *ccbq)
+{
+
+	camq_fini(&ccbq->queue);
+}
+
 /*
  * Heap routines for manipulating CAM queues.
  */

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 15:08:01 2009	(r199388)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 15:14:13 2009	(r199389)
@@ -4447,7 +4447,7 @@ xpt_release_device(struct cam_eb *bus, s
 		devq = bus->sim->devq;
 		cam_devq_resize(devq, devq->alloc_queue.array_size - 1);
 		camq_fini(&device->drvq);
-		camq_fini(&device->ccbq.queue);
+		cam_ccbq_fini(&device->ccbq);
 		free(device, M_CAMXPT);
 		xpt_release_target(bus, target);
 	}

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:16:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 207E41065672;
	Tue, 17 Nov 2009 15:16:22 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0ECF98FC1D;
	Tue, 17 Nov 2009 15:16:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFGLvg016334;
	Tue, 17 Nov 2009 15:16:21 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFGLfZ016332;
	Tue, 17 Nov 2009 15:16:21 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171516.nAHFGLfZ016332@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 15:16:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199390 - stable/8/sys/cam/scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:16:22 -0000

Author: mav
Date: Tue Nov 17 15:16:21 2009
New Revision: 199390
URL: http://svn.freebsd.org/changeset/base/199390

Log:
  MFC r198381:
  Remove some obsoleted comments.

Modified:
  stable/8/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 15:14:13 2009	(r199389)
+++ stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 15:16:21 2009	(r199390)
@@ -813,19 +813,6 @@ dastrategy(struct bio *bp)
 
 	cam_periph_lock(periph);
 
-#if 0
-	/*
-	 * check it's not too big a transfer for our adapter
-	 */
-	scsi_minphys(bp,&sd_switch);
-#endif
-
-	/*
-	 * Mask interrupts so that the pack cannot be invalidated until
-	 * after we are in the queue.  Otherwise, we might not properly
-	 * clean up one of the buffers.
-	 */
-	
 	/*
 	 * If the device has been made invalid, error out
 	 */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:28:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E6C5B106566C;
	Tue, 17 Nov 2009 15:28:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D4FAB8FC22;
	Tue, 17 Nov 2009 15:28:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFSEkC017315;
	Tue, 17 Nov 2009 15:28:14 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFSEf6017313;
	Tue, 17 Nov 2009 15:28:14 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171528.nAHFSEf6017313@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:28:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199391 - stable/8/sbin/ddb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:28:15 -0000

Author: jhb
Date: Tue Nov 17 15:28:14 2009
New Revision: 199391
URL: http://svn.freebsd.org/changeset/base/199391

Log:
  MFC 198820:
  Ensure 'kvm' is always initialized.  If "-M" was not specified and the
  garbage value on the stack was not zero, then 'ddb capture' would try to
  use the garbage value as a kvm_t pointer.

Modified:
  stable/8/sbin/ddb/ddb_capture.c
Directory Properties:
  stable/8/sbin/ddb/   (props changed)

Modified: stable/8/sbin/ddb/ddb_capture.c
==============================================================================
--- stable/8/sbin/ddb/ddb_capture.c	Tue Nov 17 15:16:21 2009	(r199390)
+++ stable/8/sbin/ddb/ddb_capture.c	Tue Nov 17 15:28:14 2009	(r199391)
@@ -204,6 +204,7 @@ ddb_capture(int argc, char *argv[])
 
 	mflag = NULL;
 	nflag = NULL;
+	kvm = NULL;
 	while ((ch = getopt(argc, argv, "M:N:")) != -1) {
 		switch (ch) {
 		case 'M':

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:28:25 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B00F710656A9;
	Tue, 17 Nov 2009 15:28:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E3198FC14;
	Tue, 17 Nov 2009 15:28:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFSPIp017362;
	Tue, 17 Nov 2009 15:28:25 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFSPkP017360;
	Tue, 17 Nov 2009 15:28:25 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171528.nAHFSPkP017360@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:28:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199392 - stable/7/sbin/ddb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:28:25 -0000

Author: jhb
Date: Tue Nov 17 15:28:25 2009
New Revision: 199392
URL: http://svn.freebsd.org/changeset/base/199392

Log:
  MFC 198820:
  Ensure 'kvm' is always initialized.  If "-M" was not specified and the
  garbage value on the stack was not zero, then 'ddb capture' would try to
  use the garbage value as a kvm_t pointer.

Modified:
  stable/7/sbin/ddb/ddb_capture.c
Directory Properties:
  stable/7/sbin/ddb/   (props changed)

Modified: stable/7/sbin/ddb/ddb_capture.c
==============================================================================
--- stable/7/sbin/ddb/ddb_capture.c	Tue Nov 17 15:28:14 2009	(r199391)
+++ stable/7/sbin/ddb/ddb_capture.c	Tue Nov 17 15:28:25 2009	(r199392)
@@ -204,6 +204,7 @@ ddb_capture(int argc, char *argv[])
 
 	mflag = NULL;
 	nflag = NULL;
+	kvm = NULL;
 	while ((ch = getopt(argc, argv, "M:N:")) != -1) {
 		switch (ch) {
 		case 'M':

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:30:16 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 921031065670;
	Tue, 17 Nov 2009 15:30:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7FE5D8FC2B;
	Tue, 17 Nov 2009 15:30:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFUGHb017556;
	Tue, 17 Nov 2009 15:30:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFUGvb017554;
	Tue, 17 Nov 2009 15:30:16 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171530.nAHFUGvb017554@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:30:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199393 - stable/8/secure/usr.bin/bdes
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:30:16 -0000

Author: jhb
Date: Tue Nov 17 15:30:16 2009
New Revision: 199393
URL: http://svn.freebsd.org/changeset/base/199393

Log:
  MFC 198856: Fix a couple of comment typos.

Modified:
  stable/8/secure/usr.bin/bdes/bdes.c
Directory Properties:
  stable/8/secure/usr.bin/bdes/   (props changed)

Modified: stable/8/secure/usr.bin/bdes/bdes.c
==============================================================================
--- stable/8/secure/usr.bin/bdes/bdes.c	Tue Nov 17 15:28:25 2009	(r199392)
+++ stable/8/secure/usr.bin/bdes/bdes.c	Tue Nov 17 15:30:16 2009	(r199393)
@@ -170,11 +170,11 @@ main(int argc, char *argv[])
 	int i;				/* counter in a for loop */
 	char *p;			/* used to obtain the key */
 	DES_cblock msgbuf;		/* I/O buffer */
-	int kflag;			/* command-line encryptiooon key */
+	int kflag;			/* command-line encryption key */
 
 	setproctitle("-");		/* Hide command-line arguments */
 
-	/* initialize the initialization vctor */
+	/* initialize the initialization vector */
 	MEMZERO(ivec, 8);
 
 	/* process the argument list */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:30:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A7C11065769;
	Tue, 17 Nov 2009 15:30:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DC9EE8FC14;
	Tue, 17 Nov 2009 15:30:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFUMej017602;
	Tue, 17 Nov 2009 15:30:22 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFUMux017600;
	Tue, 17 Nov 2009 15:30:22 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171530.nAHFUMux017600@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:30:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199394 - stable/7/secure/usr.bin/bdes
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:30:23 -0000

Author: jhb
Date: Tue Nov 17 15:30:22 2009
New Revision: 199394
URL: http://svn.freebsd.org/changeset/base/199394

Log:
  MFC 198856: Fix a couple of comment typos.

Modified:
  stable/7/secure/usr.bin/bdes/bdes.c
Directory Properties:
  stable/7/secure/usr.bin/bdes/   (props changed)

Modified: stable/7/secure/usr.bin/bdes/bdes.c
==============================================================================
--- stable/7/secure/usr.bin/bdes/bdes.c	Tue Nov 17 15:30:16 2009	(r199393)
+++ stable/7/secure/usr.bin/bdes/bdes.c	Tue Nov 17 15:30:22 2009	(r199394)
@@ -170,11 +170,11 @@ main(int argc, char *argv[])
 	int i;				/* counter in a for loop */
 	char *p;			/* used to obtain the key */
 	DES_cblock msgbuf;		/* I/O buffer */
-	int kflag;			/* command-line encryptiooon key */
+	int kflag;			/* command-line encryption key */
 
 	setproctitle("-");		/* Hide command-line arguments */
 
-	/* initialize the initialization vctor */
+	/* initialize the initialization vector */
 	MEMZERO(ivec, 8);
 
 	/* process the argument list */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:47:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3B1021065751;
	Tue, 17 Nov 2009 15:47:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 29B4F8FC08;
	Tue, 17 Nov 2009 15:47:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFlJCt018812;
	Tue, 17 Nov 2009 15:47:19 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFlJsw018810;
	Tue, 17 Nov 2009 15:47:19 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171547.nAHFlJsw018810@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:47:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199395 - head/sys/pc98/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:47:20 -0000

Author: jhb
Date: Tue Nov 17 15:47:19 2009
New Revision: 199395
URL: http://svn.freebsd.org/changeset/base/199395

Log:
  Remove duplicate 'ural' entry since it was added to the MI NOTES a while
  ago.

Modified:
  head/sys/pc98/conf/NOTES

Modified: head/sys/pc98/conf/NOTES
==============================================================================
--- head/sys/pc98/conf/NOTES	Tue Nov 17 15:30:22 2009	(r199394)
+++ head/sys/pc98/conf/NOTES	Tue Nov 17 15:47:19 2009	(r199395)
@@ -385,7 +385,6 @@ hint.mse.0.irq="13"
 # ral:	Ralink Technology IEEE 802.11 wireless adapter
 # sbni: Granch SBNI12-xx ISA and PCI adapters
 # snc:	National Semiconductor DP8393X SONIC Ethernet adapter driver
-# ural:	Ralink Technology RT2500USB IEEE 802.11 wireless adapter
 # ath:  Atheros a/b/g WiFi adapters (requires ath_hal and wlan)
 
 # Order for ISA/EISA devices is important here
@@ -419,7 +418,6 @@ hint.snc.0.at="isa"
 hint.snc.0.port="0x888"
 hint.snc.0.irq="6"
 hint.snc.0.maddr="0xc0000"
-device		ural
 
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# pci/cardbus chip support

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:56:45 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BA2E6106568F;
	Tue, 17 Nov 2009 15:56:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E8768FC1B;
	Tue, 17 Nov 2009 15:56:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFujkF019397;
	Tue, 17 Nov 2009 15:56:45 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFujg8019392;
	Tue, 17 Nov 2009 15:56:45 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171556.nAHFujg8019392@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:56:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199396 - in stable/8/sys: amd64/conf i386/conf
	pc98/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:56:45 -0000

Author: jhb
Date: Tue Nov 17 15:56:45 2009
New Revision: 199396
URL: http://svn.freebsd.org/changeset/base/199396

Log:
  MFC 198043:
  Move the USB wireless drivers down into their own section next to the USB
  ethernet drivers.

Modified:
  stable/8/sys/amd64/conf/GENERIC
  stable/8/sys/i386/conf/GENERIC
  stable/8/sys/pc98/conf/GENERIC
  stable/8/sys/sparc64/conf/GENERIC
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/conf/GENERIC
==============================================================================
--- stable/8/sys/amd64/conf/GENERIC	Tue Nov 17 15:47:19 2009	(r199395)
+++ stable/8/sys/amd64/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
@@ -288,10 +288,6 @@ device		ukbd		# Keyboard
 device		ulpt		# Printer
 device		umass		# Disks/Mass storage - Requires scbus and da
 device		ums		# Mouse
-device		rum		# Ralink Technology RT2501USB wireless NICs
-device		uath		# Atheros AR5523 wireless NICs
-device		ural		# Ralink Technology RT2500USB wireless NICs
-device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 device		urio		# Diamond Rio 500 MP3 player
 # USB Serial devices
 device		uark		# Technologies ARK3116 based serial adapters
@@ -310,6 +306,11 @@ device		cue		# CATC USB Ethernet
 device		kue		# Kawasaki LSI USB Ethernet
 device		rue		# RealTek RTL8150 USB Ethernet
 device		udav		# Davicom DM9601E USB
+# USB Wireless
+device		rum		# Ralink Technology RT2501USB wireless NICs
+device		uath		# Atheros AR5523 wireless NICs
+device		ural		# Ralink Technology RT2500USB wireless NICs
+device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 
 # FireWire support
 device		firewire	# FireWire bus code

Modified: stable/8/sys/i386/conf/GENERIC
==============================================================================
--- stable/8/sys/i386/conf/GENERIC	Tue Nov 17 15:47:19 2009	(r199395)
+++ stable/8/sys/i386/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
@@ -301,10 +301,6 @@ device		ukbd		# Keyboard
 device		ulpt		# Printer
 device		umass		# Disks/Mass storage - Requires scbus and da
 device		ums		# Mouse
-device		rum		# Ralink Technology RT2501USB wireless NICs
-device		ural		# Ralink Technology RT2500USB wireless NICs
-device		uath		# Atheros AR5523 wireless NICs
-device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 device		urio		# Diamond Rio 500 MP3 player
 # USB Serial devices
 device		u3g		# USB-based 3G modems (Option, Huawei, Sierra)
@@ -324,6 +320,11 @@ device		cue		# CATC USB Ethernet
 device		kue		# Kawasaki LSI USB Ethernet
 device		rue		# RealTek RTL8150 USB Ethernet
 device		udav		# Davicom DM9601E USB
+# USB Wireless
+device		rum		# Ralink Technology RT2501USB wireless NICs
+device		uath		# Atheros AR5523 wireless NICs
+device		ural		# Ralink Technology RT2500USB wireless NICs
+device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 
 # FireWire support
 device		firewire	# FireWire bus code

Modified: stable/8/sys/pc98/conf/GENERIC
==============================================================================
--- stable/8/sys/pc98/conf/GENERIC	Tue Nov 17 15:47:19 2009	(r199395)
+++ stable/8/sys/pc98/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
@@ -255,10 +255,6 @@ device		bpf		# Berkeley packet filter
 #device		ulpt		# Printer
 #device		umass		# Disks/Mass storage - Requires scbus and da
 #device		ums		# Mouse
-#device		rum		# Ralink Technology RT2501USB wireless NICs
-#device		uath		# Atheros AR5523 wireless NICs
-#device		ural		# Ralink Technology RT2500USB wireless NICs
-#device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 #device		urio		# Diamond Rio 500 MP3 player
 # USB Serial devices
 #device		uark		# Technologies ARK3116 based serial adapters
@@ -278,6 +274,11 @@ device		bpf		# Berkeley packet filter
 #device		kue		# Kawasaki LSI USB Ethernet
 #device		rue		# RealTek RTL8150 USB Ethernet
 #device		udav		# Davicom DM9601E USB
+# USB Wireless
+#device		rum		# Ralink Technology RT2501USB wireless NICs
+#device		uath		# Atheros AR5523 wireless NICs
+#device		ural		# Ralink Technology RT2500USB wireless NICs
+#device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 
 # FireWire support
 #device		firewire	# FireWire bus code

Modified: stable/8/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/8/sys/sparc64/conf/GENERIC	Tue Nov 17 15:47:19 2009	(r199395)
+++ stable/8/sys/sparc64/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
@@ -230,10 +230,6 @@ device		ukbd		# Keyboard
 device		ulpt		# Printer
 device		umass		# Disks/Mass storage - Requires scbus and da
 device		ums		# Mouse
-device		rum		# Ralink Technology RT2501USB wireless NICs
-device		uath		# Atheros AR5523 wireless NICs
-device		ural		# Ralink Technology RT2500USB wireless NICs
-device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 device		urio		# Diamond Rio 500 MP3 player
 # USB Serial devices
 device		uark		# Technologies ARK3116 based serial adapters
@@ -252,6 +248,11 @@ device		cue		# CATC USB Ethernet
 device		kue		# Kawasaki LSI USB Ethernet
 device		rue		# RealTek RTL8150 USB Ethernet
 device		udav		# Davicom DM9601E USB
+# USB Wireless
+device		rum		# Ralink Technology RT2501USB wireless NICs
+device		uath		# Atheros AR5523 wireless NICs
+device		ural		# Ralink Technology RT2500USB wireless NICs
+device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 
 # FireWire support
 device		firewire	# FireWire bus code

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 15:59:27 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 675291065698;
	Tue, 17 Nov 2009 15:59:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B1958FC1D;
	Tue, 17 Nov 2009 15:59:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHFxRWD019577;
	Tue, 17 Nov 2009 15:59:27 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHFxRjO019573;
	Tue, 17 Nov 2009 15:59:27 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171559.nAHFxRjO019573@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 15:59:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199397 - in stable/7/sys: amd64/conf i386/conf
	pc98/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 15:59:27 -0000

Author: jhb
Date: Tue Nov 17 15:59:26 2009
New Revision: 199397
URL: http://svn.freebsd.org/changeset/base/199397

Log:
  MFC 198043:
  Move the USB wireless drivers down into their own section next to the USB
  ethernet drivers.

Modified:
  stable/7/sys/amd64/conf/GENERIC
  stable/7/sys/i386/conf/GENERIC
  stable/7/sys/pc98/conf/GENERIC
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/conf/GENERIC
==============================================================================
--- stable/7/sys/amd64/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
+++ stable/7/sys/amd64/conf/GENERIC	Tue Nov 17 15:59:26 2009	(r199397)
@@ -280,7 +280,6 @@ device		ukbd		# Keyboard
 device		ulpt		# Printer
 device		umass		# Disks/Mass storage - Requires scbus and da
 device		ums		# Mouse
-device		ural		# Ralink Technology RT2500USB wireless NICs
 device		urio		# Diamond Rio 500 MP3 player
 device		uscanner	# Scanners
 # USB Serial devices
@@ -301,6 +300,9 @@ device		cdce		# Generic USB over Etherne
 device		cue		# CATC USB Ethernet
 device		kue		# Kawasaki LSI USB Ethernet
 device		rue		# RealTek RTL8150 USB Ethernet
+# USB Wireless
+device		rum		# Ralink Technology RT2501USB wireless NICs
+device		ural		# Ralink Technology RT2500USB wireless NICs
 
 # FireWire support
 device		firewire	# FireWire bus code

Modified: stable/7/sys/i386/conf/GENERIC
==============================================================================
--- stable/7/sys/i386/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
+++ stable/7/sys/i386/conf/GENERIC	Tue Nov 17 15:59:26 2009	(r199397)
@@ -294,8 +294,6 @@ device		ukbd		# Keyboard
 device		ulpt		# Printer
 device		umass		# Disks/Mass storage - Requires scbus and da
 device		ums		# Mouse
-device		ural		# Ralink Technology RT2500USB wireless NICs
-device		rum		# Ralink Technology RT2501USB wireless NICs
 device		urio		# Diamond Rio 500 MP3 player
 device		uscanner	# Scanners
 # USB Serial devices
@@ -316,6 +314,9 @@ device		cdce		# Generic USB over Etherne
 device		cue		# CATC USB Ethernet
 device		kue		# Kawasaki LSI USB Ethernet
 device		rue		# RealTek RTL8150 USB Ethernet
+# USB Wireless
+device		rum		# Ralink Technology RT2501USB wireless NICs
+device		ural		# Ralink Technology RT2500USB wireless NICs
 
 # FireWire support
 device		firewire	# FireWire bus code

Modified: stable/7/sys/pc98/conf/GENERIC
==============================================================================
--- stable/7/sys/pc98/conf/GENERIC	Tue Nov 17 15:56:45 2009	(r199396)
+++ stable/7/sys/pc98/conf/GENERIC	Tue Nov 17 15:59:26 2009	(r199397)
@@ -248,7 +248,6 @@ device		bpf		# Berkeley packet filter
 #device		ulpt		# Printer
 #device		umass		# Disks/Mass storage - Requires scbus and da
 #device		ums		# Mouse
-#device		ural		# Ralink Technology RT2500USB wireless NICs
 #device		urio		# Diamond Rio 500 MP3 player
 #device		uscanner	# Scanners
 # USB Serial devices
@@ -269,6 +268,9 @@ device		bpf		# Berkeley packet filter
 #device		cue		# CATC USB Ethernet
 #device		kue		# Kawasaki LSI USB Ethernet
 #device		rue		# RealTek RTL8150 USB Ethernet
+# USB Wireless
+#device		rum		# Ralink Technology RT2501USB wireless NICs
+#device		ural		# Ralink Technology RT2500USB wireless NICs
 
 # FireWire support
 #device		firewire	# FireWire bus code

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:00:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 092971065676;
	Tue, 17 Nov 2009 16:00:42 +0000 (UTC)
	(envelope-from vanhu@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EBE848FC19;
	Tue, 17 Nov 2009 16:00:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHG0fEW019710;
	Tue, 17 Nov 2009 16:00:41 GMT (envelope-from vanhu@svn.freebsd.org)
Received: (from vanhu@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHG0f2e019707;
	Tue, 17 Nov 2009 16:00:41 GMT (envelope-from vanhu@svn.freebsd.org)
Message-Id: <200911171600.nAHG0f2e019707@svn.freebsd.org>
From: VANHULLEBUS Yvan 
Date: Tue, 17 Nov 2009 16:00:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199398 - head/sys/netipsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:00:42 -0000

Author: vanhu
Date: Tue Nov 17 16:00:41 2009
New Revision: 199398
URL: http://svn.freebsd.org/changeset/base/199398

Log:
  fixed two race conditions when inserting/removing SAs via PFKey,
  which can both lead to a kernel panic when adding/removing quickly
  a lot of SAs.
  
  Obtained from:	NETASQ
  MFC after:	2w (MFC on 8 before 8.0 release ???)

Modified:
  head/sys/netipsec/key.c

Modified: head/sys/netipsec/key.c
==============================================================================
--- head/sys/netipsec/key.c	Tue Nov 17 15:59:26 2009	(r199397)
+++ head/sys/netipsec/key.c	Tue Nov 17 16:00:41 2009	(r199398)
@@ -2852,9 +2852,10 @@ key_newsav(m, mhp, sah, errp, where, tag
 	sa_initref(newsav);
 	newsav->state = SADB_SASTATE_LARVAL;
 
-	/* XXX locking??? */
+	SAHTREE_LOCK();
 	LIST_INSERT_TAIL(&sah->savtree[SADB_SASTATE_LARVAL], newsav,
 			secasvar, chain);
+	SAHTREE_UNLOCK();
 done:
 	KEYDEBUG(KEYDEBUG_IPSEC_STAMP,
 		printf("DP %s from %s:%u return SP:%p\n", __func__,
@@ -5698,8 +5699,8 @@ key_delete(so, m, mhp)
 	}
 
 	key_sa_chgstate(sav, SADB_SASTATE_DEAD);
-	SAHTREE_UNLOCK();
 	KEY_FREESAV(&sav);
+	SAHTREE_UNLOCK();
 
     {
 	struct mbuf *n;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:11:53 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7A11D106566B;
	Tue, 17 Nov 2009 16:11:53 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F4858FC13;
	Tue, 17 Nov 2009 16:11:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGBrXe020471;
	Tue, 17 Nov 2009 16:11:53 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGBrlS020469;
	Tue, 17 Nov 2009 16:11:53 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <200911171611.nAHGBrlS020469@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Tue, 17 Nov 2009 16:11:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199399 - stable/8/sys/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:11:53 -0000

Author: ume
Date: Tue Nov 17 16:11:53 2009
New Revision: 199399
URL: http://svn.freebsd.org/changeset/base/199399

Log:
  MFC r197286, r197306:
  V_irtualize the lltables list, making ARP and ND reasonably
  usable again with options VIMAGE kernels.
  
  Discussed with:	hrs

Modified:
  stable/8/sys/net/if_llatbl.c
Directory Properties:
  stable/8/sys/net/   (props changed)

Modified: stable/8/sys/net/if_llatbl.c
==============================================================================
--- stable/8/sys/net/if_llatbl.c	Tue Nov 17 16:00:41 2009	(r199398)
+++ stable/8/sys/net/if_llatbl.c	Tue Nov 17 16:11:53 2009	(r199399)
@@ -57,11 +57,14 @@ __FBSDID("$FreeBSD$");
 
 MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables");
 
-static	SLIST_HEAD(, lltable) lltables = SLIST_HEAD_INITIALIZER(lltables);
+static VNET_DEFINE(SLIST_HEAD(, lltable), lltables);
+#define	V_lltables	VNET(lltables)
 
 extern void arprequest(struct ifnet *, struct in_addr *, struct in_addr *,
 	u_char *);
 
+static void vnet_lltable_init(void);
+
 struct rwlock lltable_rwlock;
 RW_SYSINIT(lltable_rwlock, &lltable_rwlock, "lltable_rwlock");
 
@@ -75,7 +78,7 @@ lltable_sysctl_dumparp(int af, struct sy
 	int error = 0;
 
 	LLTABLE_RLOCK();
-	SLIST_FOREACH(llt, &lltables, llt_link) {
+	SLIST_FOREACH(llt, &V_lltables, llt_link) {
 		if (llt->llt_af == af) {
 			error = llt->llt_dump(llt, wr);
 			if (error != 0)
@@ -157,7 +160,7 @@ lltable_free(struct lltable *llt)
 	KASSERT(llt != NULL, ("%s: llt is NULL", __func__));
 
 	LLTABLE_WLOCK();
-	SLIST_REMOVE(&lltables, llt, lltable, llt_link);
+	SLIST_REMOVE(&V_lltables, llt, lltable, llt_link);
 	LLTABLE_WUNLOCK();
 
 	for (i=0; i < LLTBL_HASHTBL_SIZE; i++) {
@@ -180,7 +183,7 @@ lltable_drain(int af)
 	register int i;
 
 	LLTABLE_RLOCK();
-	SLIST_FOREACH(llt, &lltables, llt_link) {
+	SLIST_FOREACH(llt, &V_lltables, llt_link) {
 		if (llt->llt_af != af)
 			continue;
 
@@ -202,7 +205,7 @@ lltable_prefix_free(int af, struct socka
 	struct lltable *llt;
 
 	LLTABLE_RLOCK();
-	SLIST_FOREACH(llt, &lltables, llt_link) {
+	SLIST_FOREACH(llt, &V_lltables, llt_link) {
 		if (llt->llt_af != af)
 			continue;
 
@@ -232,7 +235,7 @@ lltable_init(struct ifnet *ifp, int af)
 		LIST_INIT(&llt->lle_head[i]);
 
 	LLTABLE_WLOCK();
-	SLIST_INSERT_HEAD(&lltables, llt, llt_link);
+	SLIST_INSERT_HEAD(&V_lltables, llt, llt_link);
 	LLTABLE_WUNLOCK();
 
 	return (llt);
@@ -302,7 +305,7 @@ lla_rt_output(struct rt_msghdr *rtm, str
 
 	/* XXX linked list may be too expensive */
 	LLTABLE_RLOCK();
-	SLIST_FOREACH(llt, &lltables, llt_link) {
+	SLIST_FOREACH(llt, &V_lltables, llt_link) {
 		if (llt->llt_af == dst->sa_family &&
 		    llt->llt_ifp == ifp)
 			break;
@@ -367,3 +370,13 @@ lla_rt_output(struct rt_msghdr *rtm, str
 
 	return (error);
 }
+
+static void
+vnet_lltable_init()
+{
+
+	SLIST_INIT(&V_lltables);
+}
+VNET_SYSINIT(vnet_lltable_init, SI_SUB_PSEUDO, SI_ORDER_FIRST,
+    vnet_lltable_init, NULL);
+

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:15:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79E271065676;
	Tue, 17 Nov 2009 16:15:56 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 4AC1D8FC0A;
	Tue, 17 Nov 2009 16:15:56 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id DA55546B06;
	Tue, 17 Nov 2009 11:15:55 -0500 (EST)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 261828A020;
	Tue, 17 Nov 2009 11:15:55 -0500 (EST)
From: John Baldwin 
To: Hajimu UMEMOTO 
Date: Tue, 17 Nov 2009 11:15:43 -0500
User-Agent: KMail/1.9.7
References: <200911171611.nAHGBrlS020469@svn.freebsd.org>
In-Reply-To: <200911171611.nAHGBrlS020469@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200911171115.43633.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 17 Nov 2009 11:15:55 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r199399 - stable/8/sys/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:15:56 -0000

On Tuesday 17 November 2009 11:11:53 am Hajimu UMEMOTO wrote:
> Author: ume
> Date: Tue Nov 17 16:11:53 2009
> New Revision: 199399
> URL: http://svn.freebsd.org/changeset/base/199399
> 
> Log:
>   MFC r197286, r197306:
>   V_irtualize the lltables list, making ARP and ND reasonably
>   usable again with options VIMAGE kernels.
>   
>   Discussed with:	hrs

Please merge kernel changes to 'sys/' rather than subdirectories of sys/ such 
as sys/net.  For more details, see this page on using svn to merge changes:

http://wiki.freebsd.org/SubversionPrimer/Merging

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:17:11 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C8F9B1065698;
	Tue, 17 Nov 2009 16:17:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B0F278FC1E;
	Tue, 17 Nov 2009 16:17:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGHBW2020828;
	Tue, 17 Nov 2009 16:17:11 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGHBpp020826;
	Tue, 17 Nov 2009 16:17:11 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171617.nAHGHBpp020826@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:17:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199400 - stable/8/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:17:11 -0000

Author: jhb
Date: Tue Nov 17 16:17:11 2009
New Revision: 199400
URL: http://svn.freebsd.org/changeset/base/199400

Log:
  MFC 198990:
  Several years ago a feature was added to TCP that casued soreceive() to
  send an ACK right away if data was drained from a TCP socket that had
  previously advertised a zero-sized window.  The current code requires the
  receive window to be exactly zero for this to kick in.  If window scaling is
  enabled and the window is smaller than the scale, then the effective window
  that is advertised is zero.  However, in that case the zero-sized window
  handling is not enabled because the window is not exactly zero.  The fix
  changes the code to check the raw window value against zero.

Modified:
  stable/8/sys/netinet/tcp_output.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/tcp_output.c
==============================================================================
--- stable/8/sys/netinet/tcp_output.c	Tue Nov 17 16:11:53 2009	(r199399)
+++ stable/8/sys/netinet/tcp_output.c	Tue Nov 17 16:17:11 2009	(r199400)
@@ -992,7 +992,7 @@ send:
 	 * to read more data than can be buffered prior to transmitting on
 	 * the connection.
 	 */
-	if (recwin == 0)
+	if (th->th_win == 0)
 		tp->t_flags |= TF_RXWIN0SENT;
 	else
 		tp->t_flags &= ~TF_RXWIN0SENT;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:17:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF9081065679;
	Tue, 17 Nov 2009 16:17:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 238398FC2F;
	Tue, 17 Nov 2009 16:17:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGHeNd020888;
	Tue, 17 Nov 2009 16:17:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGHeCM020886;
	Tue, 17 Nov 2009 16:17:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171617.nAHGHeCM020886@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:17:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199401 - stable/7/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:17:40 -0000

Author: jhb
Date: Tue Nov 17 16:17:39 2009
New Revision: 199401
URL: http://svn.freebsd.org/changeset/base/199401

Log:
  MFC 198990:
  Several years ago a feature was added to TCP that casued soreceive() to
  send an ACK right away if data was drained from a TCP socket that had
  previously advertised a zero-sized window.  The current code requires the
  receive window to be exactly zero for this to kick in.  If window scaling is
  enabled and the window is smaller than the scale, then the effective window
  that is advertised is zero.  However, in that case the zero-sized window
  handling is not enabled because the window is not exactly zero.  The fix
  changes the code to check the raw window value against zero.

Modified:
  stable/7/sys/netinet/tcp_output.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netinet/tcp_output.c
==============================================================================
--- stable/7/sys/netinet/tcp_output.c	Tue Nov 17 16:17:11 2009	(r199400)
+++ stable/7/sys/netinet/tcp_output.c	Tue Nov 17 16:17:39 2009	(r199401)
@@ -939,7 +939,7 @@ send:
 	 * to read more data then can be buffered prior to transmitting on
 	 * the connection.
 	 */
-	if (recwin == 0)
+	if (th->th_win == 0)
 		tp->t_flags |= TF_RXWIN0SENT;
 	else
 		tp->t_flags &= ~TF_RXWIN0SENT;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:18:03 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7623E10656A5;
	Tue, 17 Nov 2009 16:18:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 643B98FC39;
	Tue, 17 Nov 2009 16:18:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGI3LE020989;
	Tue, 17 Nov 2009 16:18:03 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGI3YA020987;
	Tue, 17 Nov 2009 16:18:03 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171618.nAHGI3YA020987@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:18:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199403 - stable/6/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:18:03 -0000

Author: jhb
Date: Tue Nov 17 16:18:03 2009
New Revision: 199403
URL: http://svn.freebsd.org/changeset/base/199403

Log:
  MFC 198990:
  Several years ago a feature was added to TCP that casued soreceive() to
  send an ACK right away if data was drained from a TCP socket that had
  previously advertised a zero-sized window.  The current code requires the
  receive window to be exactly zero for this to kick in.  If window scaling is
  enabled and the window is smaller than the scale, then the effective window
  that is advertised is zero.  However, in that case the zero-sized window
  handling is not enabled because the window is not exactly zero.  The fix
  changes the code to check the raw window value against zero.

Modified:
  stable/6/sys/netinet/tcp_output.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/netinet/tcp_output.c
==============================================================================
--- stable/6/sys/netinet/tcp_output.c	Tue Nov 17 16:17:44 2009	(r199402)
+++ stable/6/sys/netinet/tcp_output.c	Tue Nov 17 16:18:03 2009	(r199403)
@@ -893,7 +893,7 @@ send:
 	 * to read more data then can be buffered prior to transmitting on
 	 * the connection.
 	 */
-	if (recwin == 0)
+	if (th->th_win == 0)
 		tp->t_flags |= TF_RXWIN0SENT;
 	else
 		tp->t_flags &= ~TF_RXWIN0SENT;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:26:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93C911065670;
	Tue, 17 Nov 2009 16:26:46 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 686C48FC18;
	Tue, 17 Nov 2009 16:26:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGQkWb021553;
	Tue, 17 Nov 2009 16:26:46 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGQkxO021550;
	Tue, 17 Nov 2009 16:26:46 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <200911171626.nAHGQkxO021550@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Tue, 17 Nov 2009 16:26:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199404 - head/usr.bin/make
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:26:46 -0000

Author: obrien
Date: Tue Nov 17 16:26:45 2009
New Revision: 199404
URL: http://svn.freebsd.org/changeset/base/199404

Log:
  Garbage collect some old #ifdef'ed code from 1994 that causes vi's '%'
  to be unable to find a match in Path_FindFile().

Modified:
  head/usr.bin/make/dir.c
  head/usr.bin/make/job.c

Modified: head/usr.bin/make/dir.c
==============================================================================
--- head/usr.bin/make/dir.c	Tue Nov 17 16:18:03 2009	(r199403)
+++ head/usr.bin/make/dir.c	Tue Nov 17 16:26:45 2009	(r199404)
@@ -832,21 +832,6 @@ Path_FindFile(char *name, struct Path *p
 	 * When searching for $(FILE), we will find it in $(INSTALLDIR)
 	 * b/c we added it here. This is not good...
 	 */
-#ifdef notdef
-	cp[-1] = '\0';
-	Path_AddDir(path, name);
-	cp[-1] = '/';
-
-	bigmisses += 1;
-	pe = TAILQ_LAST(path, Path);
-	if (pe == NULL)
-		return (NULL);
-
-	if (Hash_FindEntry(&pe->dir->files, cp) != NULL) {
-		return (estrdup(name));
-
-	return (NULL);
-#else /* !notdef */
 	DEBUGF(DIR, ("Looking for \"%s\"...", name));
 
 	bigmisses += 1;
@@ -864,7 +849,6 @@ Path_FindFile(char *name, struct Path *p
 		DEBUGF(DIR, ("failed. Returning NULL\n"));
 		return (NULL);
 	}
-#endif /* notdef */
 }
 
 /*-

Modified: head/usr.bin/make/job.c
==============================================================================
--- head/usr.bin/make/job.c	Tue Nov 17 16:18:03 2009	(r199403)
+++ head/usr.bin/make/job.c	Tue Nov 17 16:26:45 2009	(r199404)
@@ -1008,17 +1008,6 @@ JobFinish(Job *job, int *status)
 				if (!(job->flags & JOB_CONTINUING)) {
 					DEBUGF(JOB, ("Warning: process %jd was not "
 						     "continuing.\n", (intmax_t) job->pid));
-#ifdef notdef
-					/*
-					 * We don't really want to restart a
-					 * job from scratch just because it
-					 * continued, especially not without
-					 * killing the continuing process!
-					 * That's why this is ifdef'ed out.
-					 * FD - 9/17/90
-					 */
-					JobRestart(job);
-#endif
 				}
 				job->flags &= ~JOB_CONTINUING;
 				TAILQ_INSERT_TAIL(&jobs, job, link);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:29:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 57F88106566B;
	Tue, 17 Nov 2009 16:29:40 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 462CD8FC16;
	Tue, 17 Nov 2009 16:29:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGTe6g021738;
	Tue, 17 Nov 2009 16:29:40 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGTeUE021735;
	Tue, 17 Nov 2009 16:29:40 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <200911171629.nAHGTeUE021735@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Tue, 17 Nov 2009 16:29:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199405 - in head: lib/libc/gen share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:29:40 -0000

Author: obrien
Date: Tue Nov 17 16:29:39 2009
New Revision: 199405
URL: http://svn.freebsd.org/changeset/base/199405

Log:
  Catch up with r130332 which changed the default timezone from GMT to UTC.
  Otherwise the tzload() (when called by gmtload()) fails to locate the UTC
  file and loads the posixrules.

Modified:
  head/lib/libc/gen/tzset.3
  head/share/zoneinfo/etcetera

Modified: head/lib/libc/gen/tzset.3
==============================================================================
--- head/lib/libc/gen/tzset.3	Tue Nov 17 16:26:45 2009	(r199404)
+++ head/lib/libc/gen/tzset.3	Tue Nov 17 16:29:39 2009	(r199405)
@@ -310,14 +310,14 @@ time zone directory
 rules for
 .Tn POSIX Ns -style
 .Tn TZ Ns 's
-.It Pa /usr/share/zoneinfo/GMT
+.It Pa /usr/share/zoneinfo/Etc/GMT
 for
 .Tn UTC
 leap seconds
 .El
 .Pp
 If the file
-.Pa /usr/share/zoneinfo/GMT
+.Pa /usr/share/zoneinfo/UTC
 does not exist,
 .Tn UTC
 leap seconds are loaded from

Modified: head/share/zoneinfo/etcetera
==============================================================================
--- head/share/zoneinfo/etcetera	Tue Nov 17 16:26:45 2009	(r199404)
+++ head/share/zoneinfo/etcetera	Tue Nov 17 16:29:39 2009	(r199405)
@@ -16,9 +16,9 @@ Zone	Etc/UCT		0	-	UCT
 
 # The following link uses older naming conventions,
 # but it belongs here, not in the file `backward',
-# as functions like gmtime load the "GMT" file to handle leap seconds properly.
+# as functions like gmtime load the "UTC" file to handle leap seconds properly.
 # We want this to work even on installations that omit the other older names.
-Link	Etc/GMT				GMT
+Link	Etc/UTC				UTC
 
 Link	Etc/UTC				Etc/Universal
 Link	Etc/UTC				Etc/Zulu

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:30:58 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1713A106566C;
	Tue, 17 Nov 2009 16:30:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 039878FC13;
	Tue, 17 Nov 2009 16:30:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGUvus021843;
	Tue, 17 Nov 2009 16:30:57 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGUvFY021842;
	Tue, 17 Nov 2009 16:30:57 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171630.nAHGUvFY021842@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:30:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199406 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:30:58 -0000

Author: jhb
Date: Tue Nov 17 16:30:57 2009
New Revision: 199406
URL: http://svn.freebsd.org/changeset/base/199406

Log:
  Hoist mergeinfo from sys/net/ up to sys/.

Modified:
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/net/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:43:02 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85A66106566B;
	Tue, 17 Nov 2009 16:43:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 716CB8FC1C;
	Tue, 17 Nov 2009 16:43:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGh2V1022605;
	Tue, 17 Nov 2009 16:43:02 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGh2NV022600;
	Tue, 17 Nov 2009 16:43:02 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171643.nAHGh2NV022600@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:43:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199407 - in head/sys/dev: ce cp ctau cx
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:43:02 -0000

Author: jhb
Date: Tue Nov 17 16:43:02 2009
New Revision: 199407
URL: http://svn.freebsd.org/changeset/base/199407

Log:
  Always use a private timer instead of if_watchdog and if_timer to drive
  the transmit watchdog.  These drivers already used a private timer when
  compiled to use Netgraph.  This change just makes them always use the
  private timer.  Note that these drivers do not compile and are disconnected
  from the build due to TTY changes.

Modified:
  head/sys/dev/ce/if_ce.c
  head/sys/dev/cp/if_cp.c
  head/sys/dev/ctau/if_ct.c
  head/sys/dev/cx/if_cx.c

Modified: head/sys/dev/ce/if_ce.c
==============================================================================
--- head/sys/dev/ce/if_ce.c	Tue Nov 17 16:30:57 2009	(r199406)
+++ head/sys/dev/ce/if_ce.c	Tue Nov 17 16:43:02 2009	(r199407)
@@ -171,11 +171,11 @@ typedef struct _drv_t {
 	node_p	node;
 	struct	ifqueue queue;
 	struct	ifqueue hi_queue;
-	short	timeout;
-	struct	callout timeout_handle;
 #else
 	struct	ifnet *ifp;
 #endif
+	short	timeout;
+	struct	callout timeout_handle;
 #if __FreeBSD_version >= 500000
 	struct	cdev *devt;
 #else /* __FreeBSD_version < 500000 */
@@ -211,13 +211,13 @@ static void ce_up (drv_t *d);
 static void ce_start (drv_t *d);
 static void ce_down (drv_t *d);
 static void ce_watchdog (drv_t *d);
+static void ce_watchdog_timer (void *arg);
 #ifdef NETGRAPH
 extern struct ng_type typestruct;
 #else
 static void ce_ifstart (struct ifnet *ifp);
 static void ce_tlf (struct sppp *sp);
 static void ce_tls (struct sppp *sp);
-static void ce_ifwatchdog (struct ifnet *ifp);
 static int ce_sioctl (struct ifnet *ifp, u_long cmd, caddr_t data);
 static void ce_initialize (void *softc);
 #endif
@@ -677,6 +677,7 @@ static int ce_attach (device_t dev)
 			continue;
 		d = c->sys;
 
+		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
 			printf ("%s: cannot make common node\n", d->name);
@@ -685,7 +686,6 @@ static int ce_attach (device_t dev)
 		}
 #if __FreeBSD_version >= 500000
 		NG_NODE_SET_PRIVATE (d->node, d);
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 #else
 		d->node->private = d;
 #endif
@@ -731,7 +731,6 @@ static int ce_attach (device_t dev)
 		d->ifp->if_flags	= IFF_POINTOPOINT | IFF_MULTICAST;
 		d->ifp->if_ioctl	= ce_sioctl;
 		d->ifp->if_start	= ce_ifstart;
-		d->ifp->if_watchdog	= ce_ifwatchdog;
 		d->ifp->if_init		= ce_initialize;
 		d->rqueue.ifq_maxlen	= IFQ_MAXLEN;
 #if __FreeBSD_version >= 500000
@@ -806,6 +805,7 @@ static int ce_detach (device_t dev)
 
 		if (! d || ! d->chan)
 			continue;
+		callout_stop (&d->timeout_handle);
 #ifndef NETGRAPH
 		/* Detach from the packet filter list of interfaces. */
 		bpfdetach (d->ifp);
@@ -855,13 +855,12 @@ static int ce_detach (device_t dev)
 	TAU32_DestructiveHalt (b->ddk.pControllerObject, 0);
 	bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->ce_res);
 
-	s = splimp ();
-	CE_LOCK (bd);
 	for (c = b->chan; c < b->chan + NCHAN; ++c) {
 		drv_t *d = (drv_t*) c->sys;
 
 		if (! d || ! d->chan)
 			continue;
+		callout_drain (&d->timeout_handle);
 		channel [b->num * NCHAN + c->num] = 0;
 		/* Deallocate buffers. */
 		ce_bus_dma_mem_free (&d->dmamem);
@@ -869,8 +868,6 @@ static int ce_detach (device_t dev)
 	adapter [b->num] = 0;
 	ce_bus_dma_mem_free (&bd->dmamem);
 	free (b, M_DEVBUF);
-	CE_UNLOCK (bd);
-	splx (s);
 #if __FreeBSD_version >= 504000
 	mtx_destroy (&bd->ce_mtx);
 #endif
@@ -888,13 +885,6 @@ static void ce_ifstart (struct ifnet *if
 	CE_UNLOCK (bd);
 }
 
-static void ce_ifwatchdog (struct ifnet *ifp)
-{
-	drv_t *d = ifp->if_softc;
-
-	ce_watchdog (d);
-}
-
 static void ce_tlf (struct sppp *sp)
 {
 	drv_t *d = SP2IFP(sp)->if_softc;
@@ -989,6 +979,7 @@ static void ce_down (drv_t *d)
 	ce_set_rts (d->chan, 0);
 
 	d->running = 0;
+	callout_stop (&d->timeout_handle);
 }
 
 /*
@@ -1055,11 +1046,7 @@ static void ce_send (drv_t *d)
 		}
 		m_freem (m);
 		/* Set up transmit timeout, if the transmit ring is not empty.*/
-#ifdef NETGRAPH
 		d->timeout = 10;
-#else
-		d->ifp->if_timer = 10;
-#endif
 	}
 #ifndef NETGRAPH
 #if __FreeBSD_version >= 600034
@@ -1082,6 +1069,7 @@ static void ce_start (drv_t *d)
 		if (! d->chan->rts)
 			ce_set_rts (d->chan, 1);
 		ce_send (d);
+		callout_reset (&d->timeout_handle, hz, ce_watchdog_timer, d);
 	}
 }
 
@@ -1092,11 +1080,8 @@ static void ce_start (drv_t *d)
  */
 static void ce_watchdog (drv_t *d)
 {
-	bdrv_t *bd = d->board->sys;
 	CE_DEBUG (d, ("device timeout\n"));
 	if (d->running) {
-		int s = splimp ();
-		CE_LOCK (bd);
 		ce_set_dtr (d->chan, 0);
 		ce_set_rts (d->chan, 0);
 /*		ce_stop_chan (d->chan);*/
@@ -1104,25 +1089,35 @@ static void ce_watchdog (drv_t *d)
 		ce_set_dtr (d->chan, 1);
 		ce_set_rts (d->chan, 1);
 		ce_start (d);
-		CE_UNLOCK (bd);
-		splx (s);
 	}
 }
 
+static void ce_watchdog_timer (void *arg)
+{
+	drv_t *d = arg;
+	bdrv_t *bd = d->board->sys;
+
+	CE_LOCK(bd);
+	if (d->timeout == 1)
+		ce_watchdog (d);
+	if (d->timeout)
+		d->timeout--;
+	callout_reset (&d->timeout_handle, hz, ce_watchdog_timer, d);
+	CE_UNLOCK(bd);
+}
+
 static void ce_transmit (ce_chan_t *c, void *attachment, int len)
 {
 	drv_t *d = c->sys;
 
-#ifdef NETGRAPH
 	d->timeout = 0;
-#else
+#ifndef NETGRAPH
 	++d->ifp->if_opackets;
 #if __FreeBSD_version >=  600034
 	d->ifp->if_flags &= ~IFF_DRV_OACTIVE;
 #else
 	d->ifp->if_flags &= ~IFF_OACTIVE;
 #endif
-	d->ifp->if_timer = 0;
 #endif
 	ce_start (d);
 }
@@ -1195,16 +1190,14 @@ static void ce_error (ce_chan_t *c, int 
 		break;
 	case CE_UNDERRUN:
 		CE_DEBUG (d, ("underrun error\n"));
-#ifdef NETGRAPH
 		d->timeout = 0;
-#else
+#ifndef NETGRAPH
 		++d->ifp->if_oerrors;
 #if __FreeBSD_version >= 600034
 		d->ifp->if_flags &= ~IFF_DRV_OACTIVE;
 #else
 		d->ifp->if_flags &= ~IFF_OACTIVE;
 #endif
-		d->ifp->if_timer = 0;
 #endif
 		ce_start (d);
 		break;
@@ -2507,19 +2500,6 @@ static int ng_ce_rmnode (node_p node)
 	return 0;
 }
 
-static void ng_ce_watchdog (void *arg)
-{
-	drv_t *d = arg;
-
-	if (d) {
-		if (d->timeout == 1)
-			ce_watchdog (d);
-		if (d->timeout)
-			d->timeout--;
-		callout_reset (&d->timeout_handle, hz, ng_ce_watchdog, d);
-	}
-}
-
 static int ng_ce_connect (hook_p hook)
 {
 #if __FreeBSD_version >= 500000
@@ -2530,7 +2510,7 @@ static int ng_ce_connect (hook_p hook)
 
 	if (d) {
 		CE_DEBUG (d, ("Connect\n"));
-		callout_reset (&d->timeout_handle, hz, ng_ce_watchdog, d);
+		callout_reset (&d->timeout_handle, hz, ce_watchdog_timer, d);
 	}
 	
 	return 0;

Modified: head/sys/dev/cp/if_cp.c
==============================================================================
--- head/sys/dev/cp/if_cp.c	Tue Nov 17 16:30:57 2009	(r199406)
+++ head/sys/dev/cp/if_cp.c	Tue Nov 17 16:43:02 2009	(r199407)
@@ -117,12 +117,12 @@ typedef struct _drv_t {
 	node_p	node;
 	struct	ifqueue queue;
 	struct	ifqueue hi_queue;
-	short	timeout;
-	struct	callout timeout_handle;
 #else
 	struct	ifqueue queue;
 	struct	ifnet *ifp;
 #endif
+	short	timeout;
+	struct	callout timeout_handle;
 	struct	cdev *devt;
 } drv_t;
 
@@ -151,13 +151,13 @@ static void cp_up (drv_t *d);
 static void cp_start (drv_t *d);
 static void cp_down (drv_t *d);
 static void cp_watchdog (drv_t *d);
+static void cp_watchdog_timer (void *arg);
 #ifdef NETGRAPH
 extern struct ng_type typestruct;
 #else
 static void cp_ifstart (struct ifnet *ifp);
 static void cp_tlf (struct sppp *sp);
 static void cp_tls (struct sppp *sp);
-static void cp_ifwatchdog (struct ifnet *ifp);
 static int cp_sioctl (struct ifnet *ifp, u_long cmd, caddr_t data);
 static void cp_initialize (void *softc);
 #endif
@@ -490,6 +490,7 @@ static int cp_attach (device_t dev)
 		d->board = b;
 		d->chan = c;
 		c->sys = d;
+		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
 			printf ("%s: cannot make common node\n", d->name);
@@ -508,7 +509,6 @@ static int cp_attach (device_t dev)
 		d->hi_queue.ifq_maxlen = IFQ_MAXLEN;
 		mtx_init (&d->queue.ifq_mtx, "cp_queue", NULL, MTX_DEF);
 		mtx_init (&d->hi_queue.ifq_mtx, "cp_queue_hi", NULL, MTX_DEF);
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 #else /*NETGRAPH*/
 		d->ifp = if_alloc(IFT_PPP);
 		if (d->ifp == NULL) {
@@ -521,7 +521,6 @@ static int cp_attach (device_t dev)
 		d->ifp->if_flags	= IFF_POINTOPOINT | IFF_MULTICAST;
 		d->ifp->if_ioctl	= cp_sioctl;
 		d->ifp->if_start	= cp_ifstart;
-		d->ifp->if_watchdog	= cp_ifwatchdog;
 		d->ifp->if_init		= cp_initialize;
 		d->queue.ifq_maxlen	= NRBUF;
 		mtx_init (&d->queue.ifq_mtx, "cp_queue", NULL, MTX_DEF);
@@ -603,6 +602,7 @@ static int cp_detach (device_t dev)
 
 		if (! d || ! d->chan->type)
 			continue;
+		callout_stop (&d->timeout_handle);
 #ifndef NETGRAPH
 		/* Detach from the packet filter list of interfaces. */
 		bpfdetach (d->ifp);
@@ -639,12 +639,12 @@ static int cp_detach (device_t dev)
 	callout_drain (&led_timo[b->num]);
 	splx (s);
 
-	s = splimp ();
 	for (c = b->chan; c < b->chan + NCHAN; ++c) {
 		drv_t *d = (drv_t*) c->sys;
 
 		if (! d || ! d->chan->type)
 			continue;
+		callout_drain (&d->timeout_handle);
 		channel [b->num*NCHAN + c->num] = 0;
 		/* Deallocate buffers. */
 		cp_bus_dma_mem_free (&d->dmamem);
@@ -652,7 +652,6 @@ static int cp_detach (device_t dev)
 	adapter [b->num] = 0;
 	cp_bus_dma_mem_free (&bd->dmamem);
 	free (b, M_DEVBUF);
-	splx (s);
 	mtx_destroy (&bd->cp_mtx);
 	return 0;
 }
@@ -668,13 +667,6 @@ static void cp_ifstart (struct ifnet *if
 	CP_UNLOCK (bd);
 }
 
-static void cp_ifwatchdog (struct ifnet *ifp)
-{
-	drv_t *d = ifp->if_softc;
-
-	cp_watchdog (d);
-}
-
 static void cp_tlf (struct sppp *sp)
 {
 	drv_t *d = SP2IFP(sp)->if_softc;
@@ -766,6 +758,7 @@ static void cp_down (drv_t *d)
 	cp_set_rts (d->chan, 0);
 
 	d->running = 0;
+	callout_stop (&d->timeout_handle);
 }
 
 /*
@@ -827,11 +820,7 @@ static void cp_send (drv_t *d)
 		}
 		m_freem (m);
 		/* Set up transmit timeout, if the transmit ring is not empty.*/
-#ifdef NETGRAPH
 		d->timeout = 10;
-#else
-		d->ifp->if_timer = 10;
-#endif
 	}
 #ifndef NETGRAPH
 	d->ifp->if_drv_flags |= IFF_DRV_OACTIVE;
@@ -850,6 +839,7 @@ static void cp_start (drv_t *d)
 		if (! d->chan->rts)
 			cp_set_rts (d->chan, 1);
 		cp_send (d);
+		callout_reset (&d->timeout_handle, hz, cp_watchdog_timer, d);
 	}
 }
 
@@ -860,12 +850,8 @@ static void cp_start (drv_t *d)
  */
 static void cp_watchdog (drv_t *d)
 {
-	bdrv_t *bd = d->board->sys;
 	CP_DEBUG (d, ("device timeout\n"));
 	if (d->running) {
-		int s = splimp ();
-
-		CP_LOCK (bd);
 		cp_stop_chan (d->chan);
 		cp_stop_e1 (d->chan);
 		cp_start_e1 (d->chan);
@@ -873,21 +859,31 @@ static void cp_watchdog (drv_t *d)
 		cp_set_dtr (d->chan, 1);
 		cp_set_rts (d->chan, 1);
 		cp_start (d);
-		CP_UNLOCK (bd);
-		splx (s);
 	}
 }
 
+static void cp_watchdog_timer (void *arg)
+{
+	drv_t *d = arg;
+	bdrv_t *bd = d->board->sys;
+
+	CP_LOCK (bd);
+	if (d->timeout == 1)
+		cp_watchdog (d);
+	if (d->timeout)
+		d->timeout--;
+	callout_reset (&d->timeout_handle, hz, cp_watchdog_timer, d);
+	CP_UNLOCK (bd);
+}
+
 static void cp_transmit (cp_chan_t *c, void *attachment, int len)
 {
 	drv_t *d = c->sys;
 
-#ifdef NETGRAPH
 	d->timeout = 0;
-#else
+#ifndef NETGRAPH
 	++d->ifp->if_opackets;
 	d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	d->ifp->if_timer = 0;
 #endif
 	cp_start (d);
 }
@@ -958,12 +954,10 @@ static void cp_error (cp_chan_t *c, int 
 		break;
 	case CP_UNDERRUN:
 		CP_DEBUG (d, ("underrun error\n"));
-#ifdef NETGRAPH
 		d->timeout = 0;
-#else
+#ifndef NETGRAPH
 		++d->ifp->if_oerrors;
 		d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-		d->ifp->if_timer = 0;
 #endif
 		cp_start (d);
 		break;
@@ -2198,26 +2192,13 @@ static int ng_cp_rmnode (node_p node)
 	return 0;
 }
 
-static void ng_cp_watchdog (void *arg)
-{
-	drv_t *d = arg;
-
-	if (d) {
-		if (d->timeout == 1)
-			cp_watchdog (d);
-		if (d->timeout)
-			d->timeout--;
-		callout_reset (&d->timeout_handle, hz, ng_cp_watchdog, d);
-	}
-}
-
 static int ng_cp_connect (hook_p hook)
 {
 	drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook));
 
 	if (d) {
 		CP_DEBUG (d, ("Connect\n"));
-		callout_reset (&d->timeout_handle, hz, ng_cp_watchdog, d);
+		callout_reset (&d->timeout_handle, hz, cp_watchdog_timer, d);
 	}
 	
 	return 0;

Modified: head/sys/dev/ctau/if_ct.c
==============================================================================
--- head/sys/dev/ctau/if_ct.c	Tue Nov 17 16:30:57 2009	(r199406)
+++ head/sys/dev/ctau/if_ct.c	Tue Nov 17 16:43:02 2009	(r199407)
@@ -118,12 +118,12 @@ typedef struct _drv_t {
 	node_p	node;
 	struct	ifqueue queue;
 	struct	ifqueue hi_queue;
-	short	timeout;
-	struct	callout timeout_handle;
 #else
 	struct	ifqueue queue;
 	struct	ifnet *ifp;
 #endif
+	short	timeout;
+	struct	callout timeout_handle;
 	struct	cdev *devt;
 } drv_t;
 
@@ -155,13 +155,13 @@ static void ct_up (drv_t *d);
 static void ct_start (drv_t *d);
 static void ct_down (drv_t *d);
 static void ct_watchdog (drv_t *d);
+static void ct_watchdog_timer (void *arg);
 #ifdef NETGRAPH
 extern struct ng_type typestruct;
 #else
 static void ct_ifstart (struct ifnet *ifp);
 static void ct_tlf (struct sppp *sp);
 static void ct_tls (struct sppp *sp);
-static void ct_ifwatchdog (struct ifnet *ifp);
 static int ct_sioctl (struct ifnet *ifp, u_long cmd, caddr_t data);
 static void ct_initialize (void *softc);
 #endif
@@ -701,6 +701,7 @@ static int ct_attach (device_t dev)
 		c->sys = d;
 		channel [b->num*NCHAN + c->num] = d;
 		sprintf (d->name, "ct%d.%d", b->num, c->num);
+		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
@@ -724,8 +725,7 @@ static int ct_attach (device_t dev)
 		d->queue.ifq_maxlen = IFQ_MAXLEN;
 		d->hi_queue.ifq_maxlen = IFQ_MAXLEN;
 		mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF);
-		mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF);		
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
+		mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF);
 #else /*NETGRAPH*/
 		d->ifp = if_alloc(IFT_PPP);
 		if (d->ifp == NULL) {
@@ -742,7 +742,6 @@ static int ct_attach (device_t dev)
 		d->ifp->if_flags	= IFF_POINTOPOINT | IFF_MULTICAST;
 		d->ifp->if_ioctl	= ct_sioctl;
 		d->ifp->if_start	= ct_ifstart;
-		d->ifp->if_watchdog	= ct_ifwatchdog;
 		d->ifp->if_init		= ct_initialize;
 		d->queue.ifq_maxlen	= NBUF;
 		mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF);
@@ -816,6 +815,7 @@ static int ct_detach (device_t dev)
 		if (!d || !d->chan->type)
 			continue;
 
+		callout_stop (&d->timeout_handle);
 #ifdef NETGRAPH
 		if (d->node) {
 			ng_rmnode_self (d->node);
@@ -845,12 +845,12 @@ static int ct_detach (device_t dev)
 	callout_drain (&led_timo[b->num]);
 	splx (s);
 	
-	s = splimp ();
 	for (c = b->chan; c < b->chan + NCHAN; ++c) {
 		drv_t *d = (drv_t*) c->sys;
 
 		if (!d || !d->chan->type)
 			continue;
+		callout_drain(&d->timeout_handle);
 		
 		/* Deallocate buffers. */
 		ct_bus_dma_mem_free (&d->dmamem);
@@ -858,7 +858,6 @@ static int ct_detach (device_t dev)
 	bd->board = 0;
 	adapter [b->num] = 0;
 	free (b, M_DEVBUF);
-	splx (s);
 	
 	mtx_destroy (&bd->ct_mtx);
 
@@ -876,13 +875,6 @@ static void ct_ifstart (struct ifnet *if
 	CT_UNLOCK (bd);
 }
 
-static void ct_ifwatchdog (struct ifnet *ifp)
-{
-	drv_t *d = ifp->if_softc;
-
-	ct_watchdog (d);
-}
-
 static void ct_tlf (struct sppp *sp)
 {
 	drv_t *d = SP2IFP(sp)->if_softc;
@@ -970,6 +962,7 @@ static void ct_down (drv_t *d)
 	ct_set_dtr (d->chan, 0);
 	ct_set_rts (d->chan, 0);
 	d->running = 0;
+	callout_stop (&d->timeout_handle);
 	splx (s);
 }
 
@@ -1033,11 +1026,7 @@ static void ct_send (drv_t *d)
 
 		/* Set up transmit timeout, if the transmit ring is not empty.
 		 * Transmit timeout is 10 seconds. */
-#ifdef NETGRAPH
 		d->timeout = 10;
-#else
-		d->ifp->if_timer = 10;
-#endif
 	}
 #ifndef NETGRAPH
 	d->ifp->if_drv_flags |= IFF_DRV_OACTIVE;
@@ -1058,6 +1047,7 @@ static void ct_start (drv_t *d)
 		if (! d->chan->rts)
 			ct_set_rts (d->chan, 1);
 		ct_send (d);
+		callout_reset (&d->timeout_handle, hz, ct_watchdog_timer, d);
 	}
 
 	splx (s);
@@ -1070,11 +1060,7 @@ static void ct_start (drv_t *d)
  */
 static void ct_watchdog (drv_t *d)
 {
-	bdrv_t *bd = d->bd;
-	int s;
 
-	s = splimp ();
-	CT_LOCK (bd);
 	CT_DEBUG (d, ("device timeout\n"));
 	if (d->running) {
 		ct_setup_chan (d->chan);
@@ -1083,8 +1069,20 @@ static void ct_watchdog (drv_t *d)
 		ct_set_rts (d->chan, 1);
 		ct_start (d);
 	}
+}
+
+static void ct_watchdog_timer (void *arg)
+{
+	drv_t *d = arg;
+	bdrv_t *bd = d->bd;
+
+	CT_LOCK (bd);
+	if (d->timeout == 1)
+		ct_watchdog (d);
+	if (d->timeout)
+		d->timeout--;
+	callout_reset (&d->timeout_handle, hz, ct_watchdog_timer, d);
 	CT_UNLOCK (bd);
-	splx (s);
 }
 
 /*
@@ -1096,12 +1094,10 @@ static void ct_transmit (ct_chan_t *c, v
 
 	if (!d)
 		return;
-#ifdef NETGRAPH
 	d->timeout = 0;
-#else
+#ifndef NETGRAPH
 	++d->ifp->if_opackets;
 	d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	d->ifp->if_timer = 0;
 #endif
 	ct_start (d);
 }
@@ -1181,12 +1177,10 @@ static void ct_error (ct_chan_t *c, int 
 		break;
 	case CT_UNDERRUN:
 		CT_DEBUG (d, ("underrun error\n"));
-#ifdef NETGRAPH
 		d->timeout = 0;
-#else
+#ifndef NETGRAPH
 		++d->ifp->if_oerrors;
 		d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-		d->ifp->if_timer = 0;
 #endif
 		ct_start (d);
 		break;
@@ -2142,20 +2136,6 @@ static int ng_ct_rmnode (node_p node)
 	return 0;
 }
 
-static void ng_ct_watchdog (void *arg)
-{
-	drv_t *d = arg;
-
-	if (!d)
-		return;
-		
-	if (d->timeout == 1)
-		ct_watchdog (d);
-	if (d->timeout)
-		d->timeout--;
-	callout_reset (&d->timeout_handle, hz, ng_ct_watchdog, d);
-}
-
 static int ng_ct_connect (hook_p hook)
 {
 	drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook));
@@ -2163,7 +2143,7 @@ static int ng_ct_connect (hook_p hook)
 	if (!d)
 		return 0;
 		
-	callout_reset (&d->timeout_handle, hz, ng_ct_watchdog, d);
+	callout_reset (&d->timeout_handle, hz, ct_watchdog_timer, d);
 	return 0;
 }
 

Modified: head/sys/dev/cx/if_cx.c
==============================================================================
--- head/sys/dev/cx/if_cx.c	Tue Nov 17 16:30:57 2009	(r199406)
+++ head/sys/dev/cx/if_cx.c	Tue Nov 17 16:43:02 2009	(r199407)
@@ -143,12 +143,12 @@ typedef struct _drv_t {
 	node_p	node;
 	struct	ifqueue lo_queue;
 	struct	ifqueue hi_queue;
-	short	timeout;
-	struct	callout timeout_handle;
 #else
 	struct	ifqueue queue;
 	struct	ifnet *ifp;
 #endif
+	short	timeout;
+	struct	callout timeout_handle;
 	struct	cdev *devt;
 	async_q	aqueue;
 #define CX_READ 1
@@ -197,6 +197,7 @@ static void cx_softintr (void *);
 static void *cx_fast_ih;
 static void cx_down (drv_t *d);
 static void cx_watchdog (drv_t *d);
+static void cx_watchdog_timer (void *arg);
 static void cx_carrier (void *arg);
 
 #ifdef NETGRAPH
@@ -205,7 +206,6 @@ extern struct ng_type typestruct;
 static void cx_ifstart (struct ifnet *ifp);
 static void cx_tlf (struct sppp *sp);
 static void cx_tls (struct sppp *sp);
-static void cx_ifwatchdog (struct ifnet *ifp);
 static int cx_sioctl (struct ifnet *ifp, u_long cmd, caddr_t data);
 static void cx_initialize (void *softc);
 #endif
@@ -811,6 +811,7 @@ static int cx_attach (device_t dev)
 		case T_UNIV_RS232:
 		case T_UNIV_RS449:
 		case T_UNIV_V35:
+		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
 			printf ("%s: cannot make common node\n", d->name);
@@ -834,7 +835,6 @@ static int cx_attach (device_t dev)
 		d->hi_queue.ifq_maxlen = IFQ_MAXLEN;
 		mtx_init (&d->lo_queue.ifq_mtx, "cx_queue_lo", NULL, MTX_DEF);
 		mtx_init (&d->hi_queue.ifq_mtx, "cx_queue_hi", NULL, MTX_DEF);
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
 #else /*NETGRAPH*/
 		d->ifp = if_alloc(IFT_PPP);
 		if (d->ifp == NULL) {
@@ -851,7 +851,6 @@ static int cx_attach (device_t dev)
 		d->ifp->if_flags	= IFF_POINTOPOINT | IFF_MULTICAST;
 		d->ifp->if_ioctl	= cx_sioctl;
 		d->ifp->if_start	= cx_ifstart;
-		d->ifp->if_watchdog	= cx_ifwatchdog;
 		d->ifp->if_init		= cx_initialize;
 		d->queue.ifq_maxlen	= 2;
 		mtx_init (&d->queue.ifq_mtx, "cx_queue", NULL, MTX_DEF);
@@ -959,6 +958,7 @@ static int cx_detach (device_t dev)
 			d->tty = NULL;
 		}
 
+		callout_stop (&d->timeout_handle);
 #ifdef NETGRAPH
 		if (d->node) {
 			ng_rmnode_self (d->node);
@@ -992,6 +992,7 @@ static int cx_detach (device_t dev)
 			continue;
 
 		callout_drain (&d->dcd_timeout_handle);
+		callout_drain (&d->timeout_handle);
 	}
 	splx (s);
 	
@@ -1026,13 +1027,6 @@ static void cx_ifstart (struct ifnet *if
 	CX_UNLOCK (bd);
 }
 
-static void cx_ifwatchdog (struct ifnet *ifp)
-{
-	drv_t *d = ifp->if_softc;
-
-	cx_watchdog (d);
-}
-
 static void cx_tlf (struct sppp *sp)
 {
 	drv_t *d = SP2IFP(sp)->if_softc;
@@ -1129,6 +1123,7 @@ static void cx_down (drv_t *d)
 	cx_set_dtr (d->chan, 0);
 	cx_set_rts (d->chan, 0);
 	d->running = 0;
+	callout_stop (&d->timeout_handle);
 	splx (s);
 }
 
@@ -1191,11 +1186,7 @@ static void cx_send (drv_t *d)
 		m_freem (m);
 
 		/* Set up transmit timeout, 10 seconds. */
-#ifdef NETGRAPH
 		d->timeout = 10;
-#else
-		d->ifp->if_timer = 10;
-#endif
 	}
 #ifndef NETGRAPH
 	d->ifp->if_drv_flags |= IFF_DRV_OACTIVE;
@@ -1215,6 +1206,7 @@ static void cx_start (drv_t *d)
 		if (! d->chan->rts)
 			cx_set_rts (d->chan, 1);
 		cx_send (d);
+		callout_reset (&d->timeout_handle, hz, cx_watchdog_timer, d);
 	}
 	splx (s);
 }
@@ -1226,10 +1218,7 @@ static void cx_start (drv_t *d)
  */
 static void cx_watchdog (drv_t *d)
 {
-	bdrv_t *bd = d->board->sys;
 	
-	int s = splhigh ();
-	CX_LOCK (bd);
 	CX_DEBUG (d, ("device timeout\n"));
 	if (d->running) {
 		cx_setup_chan (d->chan);
@@ -1238,8 +1227,20 @@ static void cx_watchdog (drv_t *d)
 		cx_set_rts (d->chan, 1);
 		cx_start (d);
 	}
+}
+
+static void cx_watchdog_timer (void *arg)
+{
+	drv_t *d = arg;
+	bdrv_t *bd = d->board->sys;
+
+	CX_LOCK (bd);
+	if (d->timeout == 1)
+		cx_watchdog (d);
+	if (d->timeout)
+		d->timeout--;
+	callout_reset (&d->timeout_handle, hz, cx_watchdog_timer, d);
 	CX_UNLOCK (bd);
-	splx (s);
 }
 
 /*
@@ -1262,12 +1263,10 @@ static void cx_transmit (cx_chan_t *c, v
 		}
 		return;
 	}
-#ifdef NETGRAPH
 	d->timeout = 0;
-#else
+#ifndef NETGRAPH
 	++d->ifp->if_opackets;
 	d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	d->ifp->if_timer = 0;
 #endif
 	cx_start (d);
 }
@@ -1421,14 +1420,12 @@ static void cx_error (cx_chan_t *c, int 
 	case CX_UNDERRUN:
 		CX_DEBUG (d, ("underrun error\n"));
 		if (c->mode != M_ASYNC) {
-#ifdef NETGRAPH
 			d->timeout = 0;
-#else
+#ifndef NETGRAPH
 			++d->ifp->if_oerrors;
 			d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-			d->ifp->if_timer = 0;
-			cx_start (d);
 #endif
+			cx_start (d);
 		}
 		break;
 	case CX_BREAK:
@@ -2477,22 +2474,11 @@ static int ng_cx_rmnode (node_p node)
 	return 0;
 }
 
-static void ng_cx_watchdog (void *arg)
-{
-	drv_t *d = arg;
-
-	if (d->timeout == 1)
-		cx_watchdog (d);
-	if (d->timeout)
-		d->timeout--;
-	callout_reset (&d->timeout_handle, hz, ng_cx_watchdog, d);
-}
-
 static int ng_cx_connect (hook_p hook)
 {
 	drv_t *d = NG_NODE_PRIVATE (NG_HOOK_NODE (hook));
 
-	callout_reset (&d->timeout_handle, hz, ng_cx_watchdog, d);
+	callout_reset (&d->timeout_handle, hz, cx_watchdog_timer, d);
 	return 0;
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:50:57 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F021A106566C;
	Tue, 17 Nov 2009 16:50:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DE1D38FC16;
	Tue, 17 Nov 2009 16:50:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGovIX023178;
	Tue, 17 Nov 2009 16:50:57 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGovf1023176;
	Tue, 17 Nov 2009 16:50:57 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171650.nAHGovf1023176@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:50:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199408 - stable/8/lib/libkvm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:50:58 -0000

Author: jhb
Date: Tue Nov 17 16:50:57 2009
New Revision: 199408
URL: http://svn.freebsd.org/changeset/base/199408

Log:
  MFC 198986:
  Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
  a page mapped by a large page in the kernel.

Modified:
  stable/8/lib/libkvm/kvm_i386.c
Directory Properties:
  stable/8/lib/libkvm/   (props changed)

Modified: stable/8/lib/libkvm/kvm_i386.c
==============================================================================
--- stable/8/lib/libkvm/kvm_i386.c	Tue Nov 17 16:43:02 2009	(r199407)
+++ stable/8/lib/libkvm/kvm_i386.c	Tue Nov 17 16:50:57 2009	(r199408)
@@ -295,9 +295,9 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t *
 #define	PG_FRAME4M	(~PAGE4M_MASK)
 		pde_pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK);
 		s = _kvm_pa2off(kd, pde_pa, &ofs);
-		if (s < sizeof pde) {
-			_kvm_syserr(kd, kd->program,
-			    "_kvm_vatop: pde_pa not found");
+		if (s == 0) {
+			_kvm_err(kd, kd->program,
+			    "_kvm_vatop: 4MB page address not in dump");
 			goto invalid;
 		}
 		*pa = ofs;
@@ -391,9 +391,9 @@ _kvm_vatop_pae(kvm_t *kd, u_long va, off
 #define	PG_FRAME2M	(~PAGE2M_MASK)
 		pde_pa = ((u_long)pde & PG_FRAME2M) + (va & PAGE2M_MASK);
 		s = _kvm_pa2off(kd, pde_pa, &ofs);
-		if (s < sizeof pde) {
-			_kvm_syserr(kd, kd->program,
-			    "_kvm_vatop_pae: pde_pa not found");
+		if (s == 0) {
+			_kvm_err(kd, kd->program,
+			    "_kvm_vatop: 2MB page address not in dump");
 			goto invalid;
 		}
 		*pa = ofs;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:51:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B28C106566C;
	Tue, 17 Nov 2009 16:51:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED3B18FC1D;
	Tue, 17 Nov 2009 16:51:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGpcG5023260;
	Tue, 17 Nov 2009 16:51:38 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGpcLf023258;
	Tue, 17 Nov 2009 16:51:38 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171651.nAHGpcLf023258@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:51:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199409 - stable/7/lib/libkvm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:51:39 -0000

Author: jhb
Date: Tue Nov 17 16:51:38 2009
New Revision: 199409
URL: http://svn.freebsd.org/changeset/base/199409

Log:
  MFC 198986:
  Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
  a page mapped by a large page in the kernel.

Modified:
  stable/7/lib/libkvm/kvm_i386.c
Directory Properties:
  stable/7/lib/libkvm/   (props changed)

Modified: stable/7/lib/libkvm/kvm_i386.c
==============================================================================
--- stable/7/lib/libkvm/kvm_i386.c	Tue Nov 17 16:50:57 2009	(r199408)
+++ stable/7/lib/libkvm/kvm_i386.c	Tue Nov 17 16:51:38 2009	(r199409)
@@ -294,9 +294,9 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t *
 #define	PG_FRAME4M	(~PAGE4M_MASK)
 		pde_pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK);
 		s = _kvm_pa2off(kd, pde_pa, &ofs);
-		if (s < sizeof pde) {
-			_kvm_syserr(kd, kd->program,
-			    "_kvm_vatop: pde_pa not found");
+		if (s == 0) {
+			_kvm_err(kd, kd->program,
+			    "_kvm_vatop: 4MB page address not in dump");
 			goto invalid;
 		}
 		*pa = ofs;
@@ -390,9 +390,9 @@ _kvm_vatop_pae(kvm_t *kd, u_long va, off
 #define	PG_FRAME2M	(~PAGE2M_MASK)
 		pde_pa = ((u_long)pde & PG_FRAME2M) + (va & PAGE2M_MASK);
 		s = _kvm_pa2off(kd, pde_pa, &ofs);
-		if (s < sizeof pde) {
-			_kvm_syserr(kd, kd->program,
-			    "_kvm_vatop_pae: pde_pa not found");
+		if (s == 0) {
+			_kvm_err(kd, kd->program,
+			    "_kvm_vatop: 2MB page address not in dump");
 			goto invalid;
 		}
 		*pa = ofs;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 16:51:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D6ACE1065780;
	Tue, 17 Nov 2009 16:51:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C4A118FC16;
	Tue, 17 Nov 2009 16:51:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHGpn1m023309;
	Tue, 17 Nov 2009 16:51:49 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHGpnfW023307;
	Tue, 17 Nov 2009 16:51:49 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171651.nAHGpnfW023307@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 16:51:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199410 - stable/6/lib/libkvm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 16:51:49 -0000

Author: jhb
Date: Tue Nov 17 16:51:49 2009
New Revision: 199410
URL: http://svn.freebsd.org/changeset/base/199410

Log:
  MFC 198986:
  Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
  a page mapped by a large page in the kernel.

Modified:
  stable/6/lib/libkvm/kvm_i386.c
Directory Properties:
  stable/6/lib/libkvm/   (props changed)

Modified: stable/6/lib/libkvm/kvm_i386.c
==============================================================================
--- stable/6/lib/libkvm/kvm_i386.c	Tue Nov 17 16:51:38 2009	(r199409)
+++ stable/6/lib/libkvm/kvm_i386.c	Tue Nov 17 16:51:49 2009	(r199410)
@@ -289,9 +289,9 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t *
 #define	PG_FRAME4M	(~PAGE4M_MASK)
 		pde_pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK);
 		s = _kvm_pa2off(kd, pde_pa, &ofs);
-		if (s < sizeof pde) {
-			_kvm_syserr(kd, kd->program,
-			    "_kvm_vatop: pde_pa not found");
+		if (s == 0) {
+			_kvm_err(kd, kd->program,
+			    "_kvm_vatop: 4MB page address not in dump");
 			goto invalid;
 		}
 		*pa = ofs;
@@ -385,9 +385,9 @@ _kvm_vatop_pae(kvm_t *kd, u_long va, off
 #define	PG_FRAME2M	(~PAGE2M_MASK)
 		pde_pa = ((u_long)pde & PG_FRAME2M) + (va & PAGE2M_MASK);
 		s = _kvm_pa2off(kd, pde_pa, &ofs);
-		if (s < sizeof pde) {
-			_kvm_syserr(kd, kd->program,
-			    "_kvm_vatop_pae: pde_pa not found");
+		if (s == 0) {
+			_kvm_err(kd, kd->program,
+			    "_kvm_vatop: 2MB page address not in dump");
 			goto invalid;
 		}
 		*pa = ofs;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 17:38:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11A29106566B;
	Tue, 17 Nov 2009 17:38:42 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 000958FC21;
	Tue, 17 Nov 2009 17:38:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHHcftF026144;
	Tue, 17 Nov 2009 17:38:41 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHHcf2T026142;
	Tue, 17 Nov 2009 17:38:41 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <200911171738.nAHHcf2T026142@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Tue, 17 Nov 2009 17:38:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199411 - head/usr.sbin/fifolog/fifolog_writer
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 17:38:42 -0000

Author: jh
Date: Tue Nov 17 17:38:41 2009
New Revision: 199411
URL: http://svn.freebsd.org/changeset/base/199411

Log:
  Unify fifolog_writer usage printout with fifolog_create and
  fifolog_reader.
  
  Approved by:	trasz (mentor)

Modified:
  head/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c

Modified: head/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c
==============================================================================
--- head/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c	Tue Nov 17 16:51:49 2009	(r199410)
+++ head/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c	Tue Nov 17 17:38:41 2009	(r199411)
@@ -42,7 +42,7 @@
 static void
 usage(void)
 {
-	fprintf(stderr, "fifolog_writer [-w write-rate] [-s sync-rate] "
+	fprintf(stderr, "Usage: fifolog_writer [-w write-rate] [-s sync-rate] "
 	    "[-z compression] file\n");
 	exit(EX_USAGE);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 18:19:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4581C10656A4;
	Tue, 17 Nov 2009 18:19:46 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 33FBF8FC0A;
	Tue, 17 Nov 2009 18:19:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHIJk4k028321;
	Tue, 17 Nov 2009 18:19:46 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHIJkKh028319;
	Tue, 17 Nov 2009 18:19:46 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911171819.nAHIJkKh028319@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Tue, 17 Nov 2009 18:19:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199413 - head/sys/dev/msk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 18:19:46 -0000

Author: yongari
Date: Tue Nov 17 18:19:45 2009
New Revision: 199413
URL: http://svn.freebsd.org/changeset/base/199413

Log:
  It seems generation of link state change of e1000phy(4) is not
  reliable on some Marvell PHYs. If msk(4) know it still does not
  have established link check whether msk(4) missed the link state
  change by looking into polled link state.
  
  Reported by:	Mel Flynn < mel.flynn+fbsd.current <> mailing.thruhere dot net >,
  		Gleb Kurtsou  gmail dot com >
  Tested by:	Gleb Kurtsou  gmail dot com >

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==============================================================================
--- head/sys/dev/msk/if_msk.c	Tue Nov 17 17:53:52 2009	(r199412)
+++ head/sys/dev/msk/if_msk.c	Tue Nov 17 18:19:45 2009	(r199413)
@@ -3198,6 +3198,8 @@ msk_tick(void *xsc_if)
 	mii = device_get_softc(sc_if->msk_miibus);
 
 	mii_tick(mii);
+	if ((sc_if->msk_flags & MSK_FLAG_LINK) == 0)
+		msk_miibus_statchg(sc_if->msk_if_dev);
 	msk_watchdog(sc_if);
 	callout_reset(&sc_if->msk_tick_ch, hz, msk_tick, sc_if);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 18:22:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 862B21065695;
	Tue, 17 Nov 2009 18:22:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 736E18FC23;
	Tue, 17 Nov 2009 18:22:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHIMEdD028552;
	Tue, 17 Nov 2009 18:22:14 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHIME0p028542;
	Tue, 17 Nov 2009 18:22:14 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911171822.nAHIME0p028542@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 17 Nov 2009 18:22:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199414 - in head/sys/dev: sn tl vge wb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 18:22:14 -0000

Author: jhb
Date: Tue Nov 17 18:22:14 2009
New Revision: 199414
URL: http://svn.freebsd.org/changeset/base/199414

Log:
  Use the bus_*() routines rather than bus_space_*() for register operations.

Modified:
  head/sys/dev/sn/if_sn.c
  head/sys/dev/sn/if_sn_pccard.c
  head/sys/dev/sn/if_snvar.h
  head/sys/dev/tl/if_tl.c
  head/sys/dev/tl/if_tlreg.h
  head/sys/dev/vge/if_vge.c
  head/sys/dev/vge/if_vgevar.h
  head/sys/dev/wb/if_wb.c
  head/sys/dev/wb/if_wbreg.h

Modified: head/sys/dev/sn/if_sn.c
==============================================================================
--- head/sys/dev/sn/if_sn.c	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/sn/if_sn.c	Tue Nov 17 18:22:14 2009	(r199414)
@@ -1220,8 +1220,6 @@ sn_activate(device_t dev)
 		sn_deactivate(dev);
 		return ENOMEM;
 	}
-	sc->bst = rman_get_bustag(sc->port_res);
-	sc->bsh = rman_get_bushandle(sc->port_res);
 	return (0);
 }
 

Modified: head/sys/dev/sn/if_sn_pccard.c
==============================================================================
--- head/sys/dev/sn/if_sn_pccard.c	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/sn/if_sn_pccard.c	Tue Nov 17 18:22:14 2009	(r199414)
@@ -271,8 +271,6 @@ sn_pccard_megahertz_activate(device_t de
 		sn_deactivate(dev);
 		return ENOMEM;
 	}
-	sc->bst = rman_get_bustag(sc->port_res);
-	sc->bsh = rman_get_bushandle(sc->port_res);
 	return 0;
 }
 

Modified: head/sys/dev/sn/if_snvar.h
==============================================================================
--- head/sys/dev/sn/if_snvar.h	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/sn/if_snvar.h	Tue Nov 17 18:22:14 2009	(r199414)
@@ -32,8 +32,6 @@
 
 struct sn_softc {
 	struct ifnet    *ifp;
-	bus_space_tag_t	bst;
-	bus_space_handle_t bsh;
 	struct mtx sc_mtx;
 	int             pages_wanted;	/* Size of outstanding MMU ALLOC */
 	int             intr_mask;	/* Most recently set interrupt mask */
@@ -55,20 +53,20 @@ void	sn_intr(void *);
 int	sn_activate(device_t);
 void	sn_deactivate(device_t);
 
-#define CSR_READ_1(sc, off) (bus_space_read_1((sc)->bst, (sc)->bsh, off))
-#define CSR_READ_2(sc, off) (bus_space_read_2((sc)->bst, (sc)->bsh, off))
+#define CSR_READ_1(sc, off) (bus_read_1((sc)->port_res, off))
+#define CSR_READ_2(sc, off) (bus_read_2((sc)->port_res, off))
 #define CSR_WRITE_1(sc, off, val) \
-	bus_space_write_1(sc->bst, sc->bsh, off, val)
+	bus_write_1((sc)->port_res, off, val)
 #define CSR_WRITE_2(sc, off, val) \
-	bus_space_write_2(sc->bst, sc->bsh, off, val)
+	bus_write_2((sc)->port_res, off, val)
 #define CSR_WRITE_MULTI_1(sc, off, addr, count) \
-	bus_space_write_multi_1(sc->bst, sc->bsh, off, addr, count)
+	bus_write_multi_1((sc)->port_res, off, addr, count)
 #define CSR_WRITE_MULTI_2(sc, off, addr, count) \
-	bus_space_write_multi_2(sc->bst, sc->bsh, off, addr, count)
+	bus_write_multi_2((sc)->port_res, off, addr, count)
 #define CSR_READ_MULTI_1(sc, off, addr, count) \
-	bus_space_read_multi_1(sc->bst, sc->bsh, off, addr, count)
+	bus_read_multi_1((sc)->port_res, off, addr, count)
 #define CSR_READ_MULTI_2(sc, off, addr, count) \
-	bus_space_read_multi_2(sc->bst, sc->bsh, off, addr, count)
+	bus_read_multi_2((sc)->port_res, off, addr, count)
 
 #define SN_LOCK(_sc)		mtx_lock(&(_sc)->sc_mtx)
 #define	SN_UNLOCK(_sc)		mtx_unlock(&(_sc)->sc_mtx)

Modified: head/sys/dev/tl/if_tl.c
==============================================================================
--- head/sys/dev/tl/if_tl.c	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/tl/if_tl.c	Tue Nov 17 18:22:14 2009	(r199414)
@@ -1170,9 +1170,6 @@ tl_attach(dev)
 		goto fail;
 	}
 
-	sc->tl_btag = rman_get_bustag(sc->tl_res);
-	sc->tl_bhandle = rman_get_bushandle(sc->tl_res);
-
 #ifdef notdef
 	/*
 	 * The ThunderLAN manual suggests jacking the PCI latency

Modified: head/sys/dev/tl/if_tlreg.h
==============================================================================
--- head/sys/dev/tl/if_tlreg.h	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/tl/if_tlreg.h	Tue Nov 17 18:22:14 2009	(r199414)
@@ -112,8 +112,6 @@ struct tl_softc {
 	struct ifnet		*tl_ifp;
 	device_t		tl_dev;
 	struct ifmedia		ifmedia;	/* media info */
-	bus_space_handle_t	tl_bhandle;
-	bus_space_tag_t		tl_btag;
 	void			*tl_intrhand;
 	struct resource		*tl_irq;
 	struct resource		*tl_res;
@@ -493,19 +491,13 @@ struct tl_stats {
 /*
  * register space access macros
  */
-#define CSR_WRITE_4(sc, reg, val)	\
-	bus_space_write_4(sc->tl_btag, sc->tl_bhandle, reg, val)
-#define CSR_WRITE_2(sc, reg, val)	\
-	bus_space_write_2(sc->tl_btag, sc->tl_bhandle, reg, val)
-#define CSR_WRITE_1(sc, reg, val)	\
-	bus_space_write_1(sc->tl_btag, sc->tl_bhandle, reg, val)
-
-#define CSR_READ_4(sc, reg)		\
-	bus_space_read_4(sc->tl_btag, sc->tl_bhandle, reg)
-#define CSR_READ_2(sc, reg)		\
-	bus_space_read_2(sc->tl_btag, sc->tl_bhandle, reg)
-#define CSR_READ_1(sc, reg)		\
-	bus_space_read_1(sc->tl_btag, sc->tl_bhandle, reg)
+#define CSR_WRITE_4(sc, reg, val)	bus_write_4(sc->tl_res, reg, val)
+#define CSR_WRITE_2(sc, reg, val)	bus_write_2(sc->tl_res, reg, val)
+#define CSR_WRITE_1(sc, reg, val)	bus_write_1(sc->tl_res, reg, val)
+
+#define CSR_READ_4(sc, reg)		bus_read_4(sc->tl_res, reg)
+#define CSR_READ_2(sc, reg)		bus_read_2(sc->tl_res, reg)
+#define CSR_READ_1(sc, reg)		bus_read_1(sc->tl_res, reg)
 
 #define CMD_PUT(sc, x) CSR_WRITE_4(sc, TL_HOSTCMD, x)
 #define CMD_SET(sc, x)	\

Modified: head/sys/dev/vge/if_vge.c
==============================================================================
--- head/sys/dev/vge/if_vge.c	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/vge/if_vge.c	Tue Nov 17 18:22:14 2009	(r199414)
@@ -945,9 +945,6 @@ vge_attach(dev)
 		goto fail;
 	}
 
-	sc->vge_btag = rman_get_bustag(sc->vge_res);
-	sc->vge_bhandle = rman_get_bushandle(sc->vge_res);
-
 	/* Allocate interrupt */
 	rid = 0;
 	sc->vge_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,

Modified: head/sys/dev/vge/if_vgevar.h
==============================================================================
--- head/sys/dev/vge/if_vgevar.h	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/vge/if_vgevar.h	Tue Nov 17 18:22:14 2009	(r199414)
@@ -100,8 +100,6 @@ struct vge_list_data {
 struct vge_softc {
 	struct ifnet		*vge_ifp;	/* interface info */
 	device_t		vge_dev;
-	bus_space_handle_t	vge_bhandle;	/* bus space handle */
-	bus_space_tag_t		vge_btag;	/* bus space tag */
 	struct resource		*vge_res;
 	struct resource		*vge_irq;
 	void			*vge_intrhand;
@@ -134,20 +132,20 @@ struct vge_softc {
  * register space access macros
  */
 #define CSR_WRITE_STREAM_4(sc, reg, val)	\
-	bus_space_write_stream_4(sc->vge_btag, sc->vge_bhandle, reg, val)
+	bus_write_stream_4(sc->vge_res, reg, val)
 #define CSR_WRITE_4(sc, reg, val)	\
-	bus_space_write_4(sc->vge_btag, sc->vge_bhandle, reg, val)
+	bus_write_4(sc->vge_res, reg, val)
 #define CSR_WRITE_2(sc, reg, val)	\
-	bus_space_write_2(sc->vge_btag, sc->vge_bhandle, reg, val)
+	bus_write_2(sc->vge_res, reg, val)
 #define CSR_WRITE_1(sc, reg, val)	\
-	bus_space_write_1(sc->vge_btag, sc->vge_bhandle, reg, val)
+	bus_write_1(sc->vge_res, reg, val)
 
 #define CSR_READ_4(sc, reg)		\
-	bus_space_read_4(sc->vge_btag, sc->vge_bhandle, reg)
+	bus_read_4(sc->vge_res, reg)
 #define CSR_READ_2(sc, reg)		\
-	bus_space_read_2(sc->vge_btag, sc->vge_bhandle, reg)
+	bus_read_2(sc->vge_res, reg)
 #define CSR_READ_1(sc, reg)		\
-	bus_space_read_1(sc->vge_btag, sc->vge_bhandle, reg)
+	bus_read_1(sc->vge_res, reg)
 
 #define CSR_SETBIT_1(sc, reg, x)	\
 	CSR_WRITE_1(sc, reg, CSR_READ_1(sc, reg) | (x))

Modified: head/sys/dev/wb/if_wb.c
==============================================================================
--- head/sys/dev/wb/if_wb.c	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/wb/if_wb.c	Tue Nov 17 18:22:14 2009	(r199414)
@@ -804,9 +804,6 @@ wb_attach(dev)
 		goto fail;
 	}
 
-	sc->wb_btag = rman_get_bustag(sc->wb_res);
-	sc->wb_bhandle = rman_get_bushandle(sc->wb_res);
-
 	/* Allocate interrupt */
 	rid = 0;
 	sc->wb_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,

Modified: head/sys/dev/wb/if_wbreg.h
==============================================================================
--- head/sys/dev/wb/if_wbreg.h	Tue Nov 17 18:19:45 2009	(r199413)
+++ head/sys/dev/wb/if_wbreg.h	Tue Nov 17 18:22:14 2009	(r199414)
@@ -365,8 +365,6 @@ struct wb_softc {
 	struct ifnet		*wb_ifp;	/* interface info */
 	device_t		wb_dev;
 	device_t		wb_miibus;
-	bus_space_handle_t	wb_bhandle;
-	bus_space_tag_t		wb_btag;
 	struct resource		*wb_res;
 	struct resource		*wb_irq;
 	void			*wb_intrhand;
@@ -388,19 +386,13 @@ struct wb_softc {
 /*
  * register space access macros
  */
-#define CSR_WRITE_4(sc, reg, val)	\
-	bus_space_write_4(sc->wb_btag, sc->wb_bhandle, reg, val)
-#define CSR_WRITE_2(sc, reg, val)	\
-	bus_space_write_2(sc->wb_btag, sc->wb_bhandle, reg, val)
-#define CSR_WRITE_1(sc, reg, val)	\
-	bus_space_write_1(sc->wb_btag, sc->wb_bhandle, reg, val)
-
-#define CSR_READ_4(sc, reg)	\
-	bus_space_read_4(sc->wb_btag, sc->wb_bhandle, reg)
-#define CSR_READ_2(sc, reg)	\
-	bus_space_read_2(sc->wb_btag, sc->wb_bhandle, reg)
-#define CSR_READ_1(sc, reg)	\
-	bus_space_read_1(sc->wb_btag, sc->wb_bhandle, reg)
+#define CSR_WRITE_4(sc, reg, val)	bus_write_4(sc->wb_res, reg, val)
+#define CSR_WRITE_2(sc, reg, val)	bus_write_2(sc->wb_res, reg, val)
+#define CSR_WRITE_1(sc, reg, val)	bus_write_1(sc->wb_res, reg, val)
+
+#define CSR_READ_4(sc, reg)		bus_read_4(sc->wb_res, reg)
+#define CSR_READ_2(sc, reg)		bus_read_2(sc->wb_res, reg)
+#define CSR_READ_1(sc, reg)		bus_read_1(sc->wb_res, reg)
 
 #define WB_TIMEOUT		1000
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 18:31:10 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B6DC1065697;
	Tue, 17 Nov 2009 18:31:10 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED8648FC08;
	Tue, 17 Nov 2009 18:31:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHIV9Aw029119;
	Tue, 17 Nov 2009 18:31:09 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHIV9fZ029117;
	Tue, 17 Nov 2009 18:31:09 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171831.nAHIV9fZ029117@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 18:31:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199415 - stable/8/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 18:31:10 -0000

Author: kib
Date: Tue Nov 17 18:31:09 2009
New Revision: 199415
URL: http://svn.freebsd.org/changeset/base/199415

Log:
  MFC r198476 (by alc):
  Simplify the inner loop of vm_fault_copy_entry().
  
  Approved by:	alc

Modified:
  stable/8/sys/vm/vm_fault.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/vm/vm_fault.c
==============================================================================
--- stable/8/sys/vm/vm_fault.c	Tue Nov 17 18:22:14 2009	(r199414)
+++ stable/8/sys/vm/vm_fault.c	Tue Nov 17 18:31:09 2009	(r199415)
@@ -1133,20 +1133,20 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
 {
 	vm_object_t backing_object, dst_object, object;
 	vm_object_t src_object;
-	vm_ooffset_t dst_offset;
-	vm_ooffset_t src_offset;
-	vm_pindex_t pindex;
+	vm_pindex_t dst_pindex, pindex, src_pindex;
 	vm_prot_t prot;
 	vm_offset_t vaddr;
 	vm_page_t dst_m;
 	vm_page_t src_m;
+	boolean_t src_readonly;
 
 #ifdef	lint
 	src_map++;
 #endif	/* lint */
 
 	src_object = src_entry->object.vm_object;
-	src_offset = src_entry->offset;
+	src_pindex = OFF_TO_IDX(src_entry->offset);
+	src_readonly = (src_entry->protection & VM_PROT_WRITE) == 0;
 
 	/*
 	 * Create the top-level object for the destination entry. (Doesn't
@@ -1177,16 +1177,16 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
 	 * one from the source object (it should be there) to the destination
 	 * object.
 	 */
-	for (vaddr = dst_entry->start, dst_offset = 0;
+	for (vaddr = dst_entry->start, dst_pindex = 0;
 	    vaddr < dst_entry->end;
-	    vaddr += PAGE_SIZE, dst_offset += PAGE_SIZE) {
+	    vaddr += PAGE_SIZE, dst_pindex++) {
 
 		/*
-		 * Allocate a page in the destination object
+		 * Allocate a page in the destination object.
 		 */
 		do {
-			dst_m = vm_page_alloc(dst_object,
-				OFF_TO_IDX(dst_offset), VM_ALLOC_NORMAL);
+			dst_m = vm_page_alloc(dst_object, dst_pindex,
+			    VM_ALLOC_NORMAL);
 			if (dst_m == NULL) {
 				VM_OBJECT_UNLOCK(dst_object);
 				VM_WAIT;
@@ -1201,10 +1201,9 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
 		 */
 		VM_OBJECT_LOCK(src_object);
 		object = src_object;
-		pindex = 0;
-		while ((src_m = vm_page_lookup(object, pindex +
-		    OFF_TO_IDX(dst_offset + src_offset))) == NULL &&
-		    (src_entry->protection & VM_PROT_WRITE) == 0 &&
+		pindex = src_pindex + dst_pindex;
+		while ((src_m = vm_page_lookup(object, pindex)) == NULL &&
+		    src_readonly &&
 		    (backing_object = object->backing_object) != NULL) {
 			/*
 			 * Allow fallback to backing objects if we are reading.

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 18:38:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19D1B106566B;
	Tue, 17 Nov 2009 18:38:01 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 076348FC0C;
	Tue, 17 Nov 2009 18:38:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHIc0RL029525;
	Tue, 17 Nov 2009 18:38:00 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHIc0LD029522;
	Tue, 17 Nov 2009 18:38:00 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171838.nAHIc0LD029522@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 18:38:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199416 - stable/8/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 18:38:01 -0000

Author: kib
Date: Tue Nov 17 18:38:00 2009
New Revision: 199416
URL: http://svn.freebsd.org/changeset/base/199416

Log:
  MFC r198505:
  When protection of wired read-only mapping is changed to read-write,
  install new shadow object behind the map entry and copy the pages
  from the underlying objects to it. This makes the mprotect(2) call to
  actually perform the requested operation instead of silently do nothing
  and return success, that causes SIGSEGV on later write access to the
  mapping.
  
  Reuse vm_fault_copy_entry() to do the copying, modifying it to behave
  correctly when src_entry == dst_entry.

Modified:
  stable/8/sys/vm/vm_fault.c
  stable/8/sys/vm/vm_map.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/vm/vm_fault.c
==============================================================================
--- stable/8/sys/vm/vm_fault.c	Tue Nov 17 18:31:09 2009	(r199415)
+++ stable/8/sys/vm/vm_fault.c	Tue Nov 17 18:38:00 2009	(r199416)
@@ -1119,7 +1119,10 @@ vm_fault_unwire(vm_map_t map, vm_offset_
  *	Routine:
  *		vm_fault_copy_entry
  *	Function:
- *		Copy all of the pages from a wired-down map entry to another.
+ *		Create new shadow object backing dst_entry with private copy of
+ *		all underlying pages. When src_entry is equal to dst_entry,
+ *		function implements COW for wired-down map entry. Otherwise,
+ *		it forks wired entry into dst_map.
  *
  *	In/out conditions:
  *		The source and destination maps must be locked for write.
@@ -1131,19 +1134,20 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
     vm_map_entry_t dst_entry, vm_map_entry_t src_entry,
     vm_ooffset_t *fork_charge)
 {
-	vm_object_t backing_object, dst_object, object;
-	vm_object_t src_object;
+	vm_object_t backing_object, dst_object, object, src_object;
 	vm_pindex_t dst_pindex, pindex, src_pindex;
-	vm_prot_t prot;
+	vm_prot_t access, prot;
 	vm_offset_t vaddr;
 	vm_page_t dst_m;
 	vm_page_t src_m;
-	boolean_t src_readonly;
+	boolean_t src_readonly, upgrade;
 
 #ifdef	lint
 	src_map++;
 #endif	/* lint */
 
+	upgrade = src_entry == dst_entry;
+
 	src_object = src_entry->object.vm_object;
 	src_pindex = OFF_TO_IDX(src_entry->offset);
 	src_readonly = (src_entry->protection & VM_PROT_WRITE) == 0;
@@ -1160,17 +1164,34 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
 #endif
 
 	VM_OBJECT_LOCK(dst_object);
-	KASSERT(dst_entry->object.vm_object == NULL,
+	KASSERT(upgrade || dst_entry->object.vm_object == NULL,
 	    ("vm_fault_copy_entry: vm_object not NULL"));
 	dst_entry->object.vm_object = dst_object;
 	dst_entry->offset = 0;
-	dst_object->uip = curthread->td_ucred->cr_ruidinfo;
-	uihold(dst_object->uip);
 	dst_object->charge = dst_entry->end - dst_entry->start;
-	KASSERT(dst_entry->uip == NULL,
-	    ("vm_fault_copy_entry: leaked swp charge"));
-	*fork_charge += dst_object->charge;
-	prot = dst_entry->max_protection;
+	if (fork_charge != NULL) {
+		KASSERT(dst_entry->uip == NULL,
+		    ("vm_fault_copy_entry: leaked swp charge"));
+		dst_object->uip = curthread->td_ucred->cr_ruidinfo;
+		uihold(dst_object->uip);
+		*fork_charge += dst_object->charge;
+	} else {
+		dst_object->uip = dst_entry->uip;
+		dst_entry->uip = NULL;
+	}
+	access = prot = dst_entry->max_protection;
+	/*
+	 * If not an upgrade, then enter the mappings in the pmap as
+	 * read and/or execute accesses.  Otherwise, enter them as
+	 * write accesses.
+	 *
+	 * A writeable large page mapping is only created if all of
+	 * the constituent small page mappings are modified. Marking
+	 * PTEs as modified on inception allows promotion to happen
+	 * without taking potentially large number of soft faults.
+	 */
+	if (!upgrade)
+		access &= ~VM_PROT_WRITE;
 
 	/*
 	 * Loop through all of the pages in the entry's range, copying each
@@ -1221,21 +1242,30 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
 		VM_OBJECT_UNLOCK(dst_object);
 
 		/*
-		 * Enter it in the pmap as a read and/or execute access.
+		 * Enter it in the pmap. If a wired, copy-on-write
+		 * mapping is being replaced by a write-enabled
+		 * mapping, then wire that new mapping.
 		 */
-		pmap_enter(dst_map->pmap, vaddr, prot & ~VM_PROT_WRITE, dst_m,
-		    prot, FALSE);
+		pmap_enter(dst_map->pmap, vaddr, access, dst_m, prot, upgrade);
 
 		/*
 		 * Mark it no longer busy, and put it on the active list.
 		 */
 		VM_OBJECT_LOCK(dst_object);
 		vm_page_lock_queues();
-		vm_page_activate(dst_m);
+		if (upgrade) {
+			vm_page_unwire(src_m, 0);
+			vm_page_wire(dst_m);
+		} else
+			vm_page_activate(dst_m);
 		vm_page_unlock_queues();
 		vm_page_wakeup(dst_m);
 	}
 	VM_OBJECT_UNLOCK(dst_object);
+	if (upgrade) {
+		dst_entry->eflags &= ~(MAP_ENTRY_COW | MAP_ENTRY_NEEDS_COPY);
+		vm_object_deallocate(src_object);
+	}
 }
 
 

Modified: stable/8/sys/vm/vm_map.c
==============================================================================
--- stable/8/sys/vm/vm_map.c	Tue Nov 17 18:31:09 2009	(r199415)
+++ stable/8/sys/vm/vm_map.c	Tue Nov 17 18:38:00 2009	(r199416)
@@ -1805,10 +1805,10 @@ int
 vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end,
 	       vm_prot_t new_prot, boolean_t set_max)
 {
-	vm_map_entry_t current;
-	vm_map_entry_t entry;
+	vm_map_entry_t current, entry;
 	vm_object_t obj;
 	struct uidinfo *uip;
+	vm_prot_t old_prot;
 
 	vm_map_lock(map);
 
@@ -1897,9 +1897,8 @@ vm_map_protect(vm_map_t map, vm_offset_t
 	 */
 	current = entry;
 	while ((current != &map->header) && (current->start < end)) {
-		vm_prot_t old_prot;
-
 		old_prot = current->protection;
+
 		if (set_max)
 			current->protection =
 			    (current->max_protection = new_prot) &
@@ -1907,6 +1906,13 @@ vm_map_protect(vm_map_t map, vm_offset_t
 		else
 			current->protection = new_prot;
 
+		if ((current->eflags & (MAP_ENTRY_COW | MAP_ENTRY_USER_WIRED))
+		     == (MAP_ENTRY_COW | MAP_ENTRY_USER_WIRED) &&
+		    (current->protection & VM_PROT_WRITE) != 0 &&
+		    (old_prot & VM_PROT_WRITE) == 0) {
+			vm_fault_copy_entry(map, map, current, current, NULL);
+		}
+
 		/*
 		 * Update physical map if necessary. Worry about copy-on-write
 		 * here.

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 18:44:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 27BF7106566B;
	Tue, 17 Nov 2009 18:44:50 +0000 (UTC)
	(envelope-from jilles@crab.stack.nl)
Received: from crab.stack.nl (crab.stack.nl [131.155.140.134])
	by mx1.freebsd.org (Postfix) with ESMTP id DFB408FC1B;
	Tue, 17 Nov 2009 18:44:49 +0000 (UTC)
Received: by crab.stack.nl (Postfix, from userid 1677)
	id 093FE5C53; Tue, 17 Nov 2009 19:25:02 +0100 (CET)
Date: Tue, 17 Nov 2009 19:25:01 +0100
From: Jilles Tjoelker 
To: Dmitry Pryanishnikov 
Message-ID: <20091117182501.GA70742@stack.nl>
References: <4B01E548.7040708@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B01E548.7040708@gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Edwin Groothuis 
Subject: Re: svn commit: r194783 - head/lib/libc/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 18:44:50 -0000

On Tue, Nov 17, 2009 at 01:50:32AM +0200, Dmitry Pryanishnikov wrote:
> > Author: edwin
> > Date: Tue Jun 23 22:28:44 2009
> > New Revision: 194783
> > URL: http://svn.freebsd.org/changeset/base/194783

> > Log:
> >   Remove duplicate if-statement on gmt_is_set in gmtsub().

> >   MFC after:	1 week

> > Modified:
> >   head/lib/libc/stdtime/localtime.c

>    This change looks like a (small?) pessimization to me: before it, 
> _MUTEX_LOCK/_MUTEX_UNLOCK pair would be skipped for the case gmt_is_set 
> == TRUE (all invocations except the first one), now it won't. I'm not 
> sure whether this is critical here though...

It is certainly less efficient, but the old code was (most likely)
wrong. It used an idiom known as "double checked locking", which is
incorrect in most memory models. The problem is that the store to
gmt_is_set may become visible without stores to other memory (gmtptr and
what it points to) becoming visible.

-- 
Jilles Tjoelker

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 18:57:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 78042106566C;
	Tue, 17 Nov 2009 18:57:44 +0000 (UTC)
	(envelope-from gabor@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 671BE8FC25;
	Tue, 17 Nov 2009 18:57:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHIviRX031114;
	Tue, 17 Nov 2009 18:57:44 GMT (envelope-from gabor@svn.freebsd.org)
Received: (from gabor@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHIviGi031113;
	Tue, 17 Nov 2009 18:57:44 GMT (envelope-from gabor@svn.freebsd.org)
Message-Id: <200911171857.nAHIviGi031113@svn.freebsd.org>
From: Gabor Kovesdan 
Date: Tue, 17 Nov 2009 18:57:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199417 - head/lib/libc/nls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 18:57:44 -0000

Author: gabor (doc,ports committer)
Date: Tue Nov 17 18:57:44 2009
New Revision: 199417
URL: http://svn.freebsd.org/changeset/base/199417

Log:
  - Update Hungarian libc catalog

Modified:
  head/lib/libc/nls/hu_HU.ISO8859-2.msg

Modified: head/lib/libc/nls/hu_HU.ISO8859-2.msg
==============================================================================
--- head/lib/libc/nls/hu_HU.ISO8859-2.msg	Tue Nov 17 18:38:00 2009	(r199416)
+++ head/lib/libc/nls/hu_HU.ISO8859-2.msg	Tue Nov 17 18:57:44 2009	(r199417)
@@ -181,6 +181,16 @@ $ ENOATTR
 87 Attribútum nem található
 $ EDOOFUS
 88 Programozási hiba
+$ EBADMSG
+89 Helytelen üzenet
+$ EMULTIHOP
+90 Multihop kísérlet
+$ ENOLINK
+91 A kapcsolat szigorítva lett
+$ EPROTO
+92 Protokol hiba
+$ ENOTCAPABLE
+93 Elégtelen képességek
 $
 $ strsignal() support catalog
 $
@@ -247,3 +257,39 @@ $ SIGUSR1
 30 Felhasználói szignál 1
 $ SIGUSR2
 31 Felhasználói szignál 2
+$
+$ gai_strerror() support catalog
+$
+$set 3
+$ 1 (elavult)
+1 A hosztnévhez tartozó címcsalád nem támogatott
+$ EAI_AGAIN
+2 Ideiglenes hiba a névfeloldáskor
+$ EAI_BADFLAGS
+3 Érvénytelen ai_flags érték
+$ EAI_FAIL
+4 Nem helyreállítható hiba a névfeloldásban
+$ EAI_FAMILY
+5 ai_family nem támogatott
+$ EAI_MEMORY
+6 Memóriafoglalási hiba
+$ 7 (elavult)
+7 Nem tartozik cím í hosztnévhez
+$ EAI_NONAME
+8 Se hosztnév, se szolgáltatásnév nem áll rendelkezésre
+$ EAI_SERVICE
+9 Nem támogatott ai_socktype szolgáltatásnév
+$ EAI_SOCKTYPE
+10 ai_socktype nem támogatott
+$ EAI_SYSTEM
+11 Rendszerhiba jött vissza az errno változóban
+$ EAI_BADHINTS
+12 Érvénytelen hint érték
+$ EAI_PROTOCOL
+13 A feloldott protokol ismeretlen
+$ EAI_OVERFLOW
+14 Az argumentumok puffere túlcsordult
+$ 0
+32766 Siker
+$ NL_MSGMAX
+32767 Ismeretlen hiba

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:24:26 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 66120106566B;
	Tue, 17 Nov 2009 19:24:26 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 552DF8FC16;
	Tue, 17 Nov 2009 19:24:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJOQWu032546;
	Tue, 17 Nov 2009 19:24:26 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJOQIh032544;
	Tue, 17 Nov 2009 19:24:26 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911171924.nAHJOQIh032544@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 17 Nov 2009 19:24:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199418 - head/sys/dev/syscons
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:24:26 -0000

Author: kib
Date: Tue Nov 17 19:24:26 2009
New Revision: 199418
URL: http://svn.freebsd.org/changeset/base/199418

Log:
  Fix pgsignal() call after signature change in r199355.
  
  Reported and tested by:	bf1783 googlemail com
  MFC after:	1 month

Modified:
  head/sys/dev/syscons/scvidctl.c

Modified: head/sys/dev/syscons/scvidctl.c
==============================================================================
--- head/sys/dev/syscons/scvidctl.c	Tue Nov 17 18:57:44 2009	(r199417)
+++ head/sys/dev/syscons/scvidctl.c	Tue Nov 17 19:24:26 2009	(r199418)
@@ -321,6 +321,7 @@ sc_set_pixel_mode(scr_stat *scp, struct 
     return ENODEV;
 #else
     video_info_t info;
+    ksiginfo_t ksi;
     u_char *font;
     int prev_ysize;
     int error;
@@ -458,8 +459,11 @@ sc_set_pixel_mode(scr_stat *scp, struct 
 	tp->t_winsize.ws_col = scp->xsize;
 	tp->t_winsize.ws_row = scp->ysize;
 	if (tp->t_pgrp != NULL) {
+	    ksiginfo_init(&ksi);
+	    ksi.ksi_signo = SIGWINCH;
+	    ksi.ksi_code = SI_KERNEL;
 	    PGRP_LOCK(tp->t_pgrp);
-	    pgsignal(tp->t_pgrp, SIGWINCH, 1);
+	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
 	    PGRP_UNLOCK(tp->t_pgrp);
 	}
     }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:35:11 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id CCBDE106568B;
	Tue, 17 Nov 2009 19:35:10 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: src-committers@FreeBSD.org
Date: Tue, 17 Nov 2009 14:34:54 -0500
User-Agent: KMail/1.6.2
References: <200911171924.nAHJOQIh032544@svn.freebsd.org>
In-Reply-To: <200911171924.nAHJOQIh032544@svn.freebsd.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_grvALVEc9GqwctC"
Message-Id: <200911171434.56358.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	Konstantin Belousov 
Subject: Re: svn commit: r199418 - head/sys/dev/syscons
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:35:11 -0000


--Boundary-00=_grvALVEc9GqwctC
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 17 November 2009 02:24 pm, Konstantin Belousov wrote:
> Author: kib
> Date: Tue Nov 17 19:24:26 2009
> New Revision: 199418
> URL: http://svn.freebsd.org/changeset/base/199418
>
> Log:
>   Fix pgsignal() call after signature change in r199355.
>
>   Reported and tested by:	bf1783 googlemail com
>   MFC after:	1 month
>
> Modified:
>   head/sys/dev/syscons/scvidctl.c
>
> Modified: head/sys/dev/syscons/scvidctl.c
> ===================================================================
>=========== --- head/sys/dev/syscons/scvidctl.c	Tue Nov 17 18:57:44
> 2009	(r199417) +++ head/sys/dev/syscons/scvidctl.c	Tue Nov 17
> 19:24:26 2009	(r199418) @@ -321,6 +321,7 @@
> sc_set_pixel_mode(scr_stat *scp, struct return ENODEV;
>  #else
>      video_info_t info;
> +    ksiginfo_t ksi;
>      u_char *font;
>      int prev_ysize;
>      int error;
> @@ -458,8 +459,11 @@ sc_set_pixel_mode(scr_stat *scp, struct
>  	tp->t_winsize.ws_col = scp->xsize;
>  	tp->t_winsize.ws_row = scp->ysize;
>  	if (tp->t_pgrp != NULL) {
> +	    ksiginfo_init(&ksi);
> +	    ksi.ksi_signo = SIGWINCH;
> +	    ksi.ksi_code = SI_KERNEL;
>  	    PGRP_LOCK(tp->t_pgrp);
> -	    pgsignal(tp->t_pgrp, SIGWINCH, 1);
> +	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
>  	    PGRP_UNLOCK(tp->t_pgrp);
>  	}
>      }

Probably you wanted this:

--- sys/dev/syscons/scvidctl.c
+++ sys/dev/syscons/scvidctl.c
@@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
     return ENODEV;
 #else
     video_info_t info;
-    ksiginfo_t ksi;
     u_char *font;
     int prev_ysize;
     int error;
@@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
        || tp->t_winsize.ws_row != scp->ysize) {
        tp->t_winsize.ws_col = scp->xsize;
        tp->t_winsize.ws_row = scp->ysize;
-       if (tp->t_pgrp != NULL) {
-           ksiginfo_init(&ksi);
-           ksi.ksi_signo = SIGWINCH;
-           ksi.ksi_code = SI_KERNEL;
-           PGRP_LOCK(tp->t_pgrp);
-           pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
-           PGRP_UNLOCK(tp->t_pgrp);
-       }
+
+       tty_signal_pgrp(tp, SIGWINCH);
     }
 
     return 0;
------------------------------------------------------------------

In fact, it seems it was missed in r181905.

Jung-uk Kim

--Boundary-00=_grvALVEc9GqwctC
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="scvidctl.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="scvidctl.c.diff"

--- sys/dev/syscons/scvidctl.c
+++ sys/dev/syscons/scvidctl.c
@@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
     return ENODEV;
 #else
     video_info_t info;
-    ksiginfo_t ksi;
     u_char *font;
     int prev_ysize;
     int error;
@@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
 	|| tp->t_winsize.ws_row != scp->ysize) {
 	tp->t_winsize.ws_col = scp->xsize;
 	tp->t_winsize.ws_row = scp->ysize;
-	if (tp->t_pgrp != NULL) {
-	    ksiginfo_init(&ksi);
-	    ksi.ksi_signo = SIGWINCH;
-	    ksi.ksi_code = SI_KERNEL;
-	    PGRP_LOCK(tp->t_pgrp);
-	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
-	    PGRP_UNLOCK(tp->t_pgrp);
-	}
+
+	tty_signal_pgrp(tp, SIGWINCH);
     }
 
     return 0;

--Boundary-00=_grvALVEc9GqwctC--

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:35:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87A181065698;
	Tue, 17 Nov 2009 19:35:39 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76BAE8FC1A;
	Tue, 17 Nov 2009 19:35:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJZddU033171;
	Tue, 17 Nov 2009 19:35:39 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJZdbQ033168;
	Tue, 17 Nov 2009 19:35:39 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <200911171935.nAHJZdbQ033168@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Tue, 17 Nov 2009 19:35:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199419 - head/usr.bin/make
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:35:39 -0000

Author: obrien
Date: Tue Nov 17 19:35:39 2009
New Revision: 199419
URL: http://svn.freebsd.org/changeset/base/199419

Log:
  Catch up with r144020's /Dir_FindFile/Path_FindFile/

Modified:
  head/usr.bin/make/arch.c
  head/usr.bin/make/dir.c

Modified: head/usr.bin/make/arch.c
==============================================================================
--- head/usr.bin/make/arch.c	Tue Nov 17 19:24:26 2009	(r199418)
+++ head/usr.bin/make/arch.c	Tue Nov 17 19:35:39 2009	(r199419)
@@ -1131,7 +1131,7 @@ Arch_MemMTime(GNode *gn)
  *	command (or the linker will know where to find it) and set the
  *	TARGET variable for this node to be the node's name. Otherwise,
  *	we set the TARGET variable to be the full path of the library,
- *	as returned by Dir_FindFile.
+ *	as returned by Path_FindFile.
  *
  *-----------------------------------------------------------------------
  */

Modified: head/usr.bin/make/dir.c
==============================================================================
--- head/usr.bin/make/dir.c	Tue Nov 17 19:24:26 2009	(r199418)
+++ head/usr.bin/make/dir.c	Tue Nov 17 19:35:39 2009	(r199419)
@@ -862,7 +862,7 @@ Path_FindFile(char *name, struct Path *p
  *
  * Side Effects:
  *	The modification time is placed in the node's mtime slot.
- *	If the node didn't have a path entry before, and Dir_FindFile
+ *	If the node didn't have a path entry before, and Path_FindFile
  *	found one for it, the full name is placed in the path slot.
  *-----------------------------------------------------------------------
  */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:36:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8DA641065670;
	Tue, 17 Nov 2009 19:36:06 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 621718FC0A;
	Tue, 17 Nov 2009 19:36:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJa6c0033236;
	Tue, 17 Nov 2009 19:36:06 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJa6oc033233;
	Tue, 17 Nov 2009 19:36:06 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171936.nAHJa6oc033233@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 19:36:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199420 - in stable/8/sys/dev: ahci siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:36:06 -0000

Author: mav
Date: Tue Nov 17 19:36:06 2009
New Revision: 199420
URL: http://svn.freebsd.org/changeset/base/199420

Log:
  MFC r197838:
  On command timeout handle frozen command first, to not run it inside
  XXX_end_transaction().

Modified:
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 19:35:39 2009	(r199419)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 19:36:06 2009	(r199420)
@@ -1259,15 +1259,16 @@ ahci_timeout(struct ahci_slot *slot)
 
 	if (!ch->readlog)
 		xpt_freeze_simq(ch->sim, ch->numrslots);
-	/* Handle command with timeout. */
-	ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT);
-	/* Handle the rest of commands. */
+	/* Handle frozen command. */
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
 		fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
 		xpt_done(fccb);
 	}
+	/* Handle command with timeout. */
+	ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT);
+	/* Handle the rest of commands. */
 	for (i = 0; i < ch->numslots; i++) {
 		/* Do we have a running request on slot? */
 		if (ch->slot[i].state < AHCI_SLOT_RUNNING)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 19:35:39 2009	(r199419)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 19:36:06 2009	(r199420)
@@ -982,15 +982,16 @@ device_printf(dev, "%s is %08x ss %08x r
 
 	if (!ch->readlog)
 		xpt_freeze_simq(ch->sim, ch->numrslots);
-	/* Handle command with timeout. */
-	siis_end_transaction(&ch->slot[slot->slot], SIIS_ERR_TIMEOUT);
-	/* Handle the rest of commands. */
+	/* Handle frozen command. */
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
 		fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
 		xpt_done(fccb);
 	}
+	/* Handle command with timeout. */
+	siis_end_transaction(&ch->slot[slot->slot], SIIS_ERR_TIMEOUT);
+	/* Handle the rest of commands. */
 	for (i = 0; i < SIIS_MAX_SLOTS; i++) {
 		/* Do we have a running request on slot? */
 		if (ch->slot[i].state < SIIS_SLOT_RUNNING)

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:38:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CF36106566B;
	Tue, 17 Nov 2009 19:38:20 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 49BA38FC1B;
	Tue, 17 Nov 2009 19:38:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJcKUc033450;
	Tue, 17 Nov 2009 19:38:20 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJcKJd033435;
	Tue, 17 Nov 2009 19:38:20 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171938.nAHJcKJd033435@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 19:38:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199421 - in stable/8/sys/cam: . ata scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:38:20 -0000

Author: mav
Date: Tue Nov 17 19:38:19 2009
New Revision: 199421
URL: http://svn.freebsd.org/changeset/base/199421

Log:
  MFC r198382, r198385:
  Replace most of priority numbers with defines. No logical changes.

Modified:
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/cam/cam.h
  stable/8/sys/cam/cam_periph.c
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/cam/scsi/scsi_all.c
  stable/8/sys/cam/scsi/scsi_cd.c
  stable/8/sys/cam/scsi/scsi_ch.c
  stable/8/sys/cam/scsi/scsi_da.c
  stable/8/sys/cam/scsi/scsi_pt.c
  stable/8/sys/cam/scsi/scsi_sa.c
  stable/8/sys/cam/scsi/scsi_targ_bh.c
  stable/8/sys/cam/scsi/scsi_target.c
  stable/8/sys/cam/scsi/scsi_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -270,7 +270,7 @@ adaclose(struct disk *dp)
 	/* We only sync the cache if the drive is capable of it. */
 	if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
 
-		ccb = cam_periph_getccb(periph, /*priority*/1);
+		ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 		cam_fill_ataio(&ccb->ataio,
 				    1,
 				    adadone,
@@ -343,7 +343,7 @@ adastrategy(struct bio *bp)
 	/*
 	 * Schedule ourselves for performing the work.
 	 */
-	xpt_schedule(periph, /* XXX priority */1);
+	xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 	cam_periph_unlock(periph);
 
 	return;
@@ -377,7 +377,7 @@ adadump(void *arg, void *virtual, vm_off
 
 	if (length > 0) {
 		periph->flags |= CAM_PERIPH_POLLED;
-		xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
 		cam_fill_ataio(&ccb.ataio,
 		    0,
@@ -408,7 +408,7 @@ adadump(void *arg, void *virtual, vm_off
 	}
 
 	if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
-		xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 
 		ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
 		cam_fill_ataio(&ccb.ataio,
@@ -563,7 +563,7 @@ adaasync(void *callback_arg, u_int32_t c
 		 */
 		softc->state = ADA_STATE_SET_MULTI;
 		cam_periph_acquire(periph);
-		xpt_schedule(periph, 0);
+		xpt_schedule(periph, CAM_PRIORITY_DEV);
 		break;
 	}
 	default:
@@ -665,7 +665,7 @@ adaregister(struct cam_periph *periph, v
 
 	/* Check if the SIM does not want queued commands */
 	bzero(&cpi, sizeof(cpi));
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 	if (cpi.ccb_h.status != CAM_REQ_CMP ||
@@ -897,7 +897,7 @@ adastart(struct cam_periph *periph, unio
 		
 		if (bp != NULL) {
 			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, /* XXX priority */1);
+			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}
 		break;
 	}
@@ -1027,7 +1027,7 @@ adadone(struct cam_periph *periph, union
 		xpt_release_ccb(done_ccb);
 		if (bioq_first(&softc->bio_queue) != NULL) {
 			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, 1);
+			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}
 		cam_periph_release_locked(periph);
 		return;
@@ -1139,7 +1139,7 @@ adashutdown(void * arg, int howto)
 			continue;
 		}
 
-		xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 
 		ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
 		cam_fill_ataio(&ccb.ataio,

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -270,7 +270,7 @@ probeschedule(struct cam_periph *periph)
 	softc = (probe_softc *)periph->softc;
 	ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs);
 
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -506,7 +506,7 @@ proberequestdefaultnegotiation(struct ca
 {
 	struct ccb_trans_settings cts;
 
-	xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_USER_SETTINGS;
 	xpt_action((union ccb *)&cts);
@@ -528,7 +528,7 @@ proberequestbackoff(struct cam_periph *p
 	struct ccb_trans_settings_spi *spi;
 
 	memset(&cts, 0, sizeof (cts));
-	xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
 	xpt_action((union ccb *)&cts);
@@ -655,7 +655,7 @@ probedone(struct cam_periph *periph, uni
 
 				/* Report SIM that PM is present. */
 				bzero(&cts, sizeof(cts));
-				xpt_setup_ccb(&cts.ccb_h, path, 1);
+				xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
 				cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 				cts.type = CTS_TYPE_CURRENT_SETTINGS;
 				cts.xport_specific.sata.pm_present = 1;
@@ -1270,7 +1270,7 @@ ata_scan_lun(struct cam_periph *periph, 
 	CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
 		  ("xpt_scan_lun\n"));
 
-	xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1308,7 +1308,7 @@ ata_scan_lun(struct cam_periph *periph, 
 			free(new_path, M_CAMXPT);
 			return;
 		}
-		xpt_setup_ccb(&request_ccb->ccb_h, new_path, /*priority*/ 1);
+		xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_NORMAL);
 		request_ccb->ccb_h.cbfcnp = xptscandone;
 		request_ccb->ccb_h.func_code = XPT_SCAN_LUN;
 		request_ccb->crcn.flags = flags;
@@ -1407,7 +1407,7 @@ ata_device_transport(struct cam_path *pa
 	struct ata_params *ident_buf = NULL;
 
 	/* Get transport information from the SIM */
-	xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1427,7 +1427,7 @@ ata_device_transport(struct cam_path *pa
 	    ata_version(ident_buf->version_major) : cpi.transport_version;
 
 	/* Tell the controller what we think */
-	xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
 	cts.transport = path->device->transport;
@@ -1555,7 +1555,7 @@ scsi_set_transfer_settings(struct ccb_tr
 
 	inq_data = &device->inq_data;
 	scsi = &cts->proto_specific.scsi;
-	xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1576,7 +1576,7 @@ scsi_set_transfer_settings(struct ccb_tr
 		 * Perform sanity checking against what the
 		 * controller and device can do.
 		 */
-		xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, /*priority*/1);
+		xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
 		cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cur_cts.type = cts->type;
 		xpt_action((union ccb *)&cur_cts);
@@ -1636,7 +1636,7 @@ scsi_set_transfer_settings(struct ccb_tr
 				device->tag_delay_count = 0;
 
 				xpt_setup_ccb(&crs.ccb_h, cts->ccb_h.path,
-					      /*priority*/1);
+				    CAM_PRIORITY_NORMAL);
 				crs.ccb_h.func_code = XPT_REL_SIMQ;
 				crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
 				crs.openings
@@ -1669,7 +1669,7 @@ scsi_toggle_tags(struct cam_path *path)
  	  && (dev->inq_flags & (SID_Sync|SID_WBus16|SID_WBus32)) != 0)) {
 		struct ccb_trans_settings cts;
 
-		xpt_setup_ccb(&cts.ccb_h, path, 1);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
 		cts.protocol = PROTO_SCSI;
 		cts.protocol_version = PROTO_VERSION_UNSPECIFIED;
 		cts.transport = XPORT_UNSPECIFIED;

Modified: stable/8/sys/cam/cam.h
==============================================================================
--- stable/8/sys/cam/cam.h	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/cam.h	Tue Nov 17 19:38:19 2009	(r199421)
@@ -66,6 +66,8 @@ struct cam_periph;
  */
 typedef struct {
 	u_int32_t priority;
+#define CAM_PRIORITY_DEV	0
+#define CAM_PRIORITY_NORMAL	1
 #define CAM_PRIORITY_NONE	(u_int32_t)-1
 	u_int32_t generation;
 	int       index;

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/cam_periph.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -534,13 +534,13 @@ camperiphfree(struct cam_periph *periph)
 		switch (periph->deferred_ac) {
 		case AC_FOUND_DEVICE:
 			ccb.ccb_h.func_code = XPT_GDEV_TYPE;
-			xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/ 1);
+			xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 			xpt_action(&ccb);
 			arg = &ccb;
 			break;
 		case AC_PATH_REGISTERED:
 			ccb.ccb_h.func_code = XPT_PATH_INQ;
-			xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/ 1);
+			xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 			xpt_action(&ccb);
 			arg = &ccb;
 			break;
@@ -831,10 +831,10 @@ cam_periph_ioctl(struct cam_periph *peri
 
 	switch(cmd){
 	case CAMGETPASSTHRU:
-		ccb = cam_periph_getccb(periph, /* priority */ 1);
+		ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 		xpt_setup_ccb(&ccb->ccb_h,
 			      ccb->ccb_h.path,
-			      /*priority*/1);
+			      CAM_PRIORITY_NORMAL);
 		ccb->ccb_h.func_code = XPT_GDEVLIST;
 
 		/*
@@ -939,7 +939,7 @@ cam_freeze_devq(struct cam_path *path)
 {
 	struct ccb_hdr ccb_h;
 
-	xpt_setup_ccb(&ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&ccb_h, path, CAM_PRIORITY_NORMAL);
 	ccb_h.func_code = XPT_NOOP;
 	ccb_h.flags = CAM_DEV_QFREEZE;
 	xpt_action((union ccb *)&ccb_h);
@@ -952,8 +952,7 @@ cam_release_devq(struct cam_path *path, 
 {
 	struct ccb_relsim crs;
 
-	xpt_setup_ccb(&crs.ccb_h, path,
-		      /*priority*/1);
+	xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
 	crs.ccb_h.func_code = XPT_REL_SIMQ;
 	crs.ccb_h.flags = getcount_only ? CAM_DEV_QFREEZE : 0;
 	crs.release_flags = relsim_flags;
@@ -1070,7 +1069,7 @@ camperiphdone(struct cam_periph *periph,
 			 * Grab the inquiry data for this device.
 			 */
 			xpt_setup_ccb(&cgd.ccb_h, done_ccb->ccb_h.path,
-				      /*priority*/ 1);
+			    CAM_PRIORITY_NORMAL);
 			cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 			xpt_action((union ccb *)&cgd);
 			err_action = scsi_error_action(&done_ccb->csio,
@@ -1212,7 +1211,7 @@ cam_periph_bus_settle(struct cam_periph 
 {
 	struct ccb_getdevstats cgds;
 
-	xpt_setup_ccb(&cgds.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cgds.ccb_h.func_code = XPT_GDEV_STATS;
 	xpt_action((union ccb *)&cgds);
 	cam_periph_freeze_after_event(periph, &cgds.last_reset, bus_settle);
@@ -1280,7 +1279,7 @@ camperiphscsistatuserror(union ccb *ccb,
 		 */
 		xpt_setup_ccb(&cgds.ccb_h,
 			      ccb->ccb_h.path,
-			      /*priority*/1);
+			      CAM_PRIORITY_NORMAL);
 		cgds.ccb_h.func_code = XPT_GDEV_STATS;
 		xpt_action((union ccb *)&cgds);
 
@@ -1403,7 +1402,7 @@ camperiphscsisenseerror(union ccb *ccb, 
 		/*
 		 * Grab the inquiry data for this device.
 		 */
-		xpt_setup_ccb(&cgd.ccb_h, ccb->ccb_h.path, /*priority*/ 1);
+		xpt_setup_ccb(&cgd.ccb_h, ccb->ccb_h.path, CAM_PRIORITY_NORMAL);
 		cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 		xpt_action((union ccb *)&cgd);
 
@@ -1543,14 +1542,14 @@ camperiphscsisenseerror(union ccb *ccb, 
 		
 		if ((err_action & SS_MASK) >= SS_START) {
 			/*
-			 * Drop the priority to 0 so that the recovery
+			 * Drop the priority, so that the recovery
 			 * CCB is the first to execute.  Freeze the queue
 			 * after this command is sent so that we can
 			 * restore the old csio and have it queued in
 			 * the proper order before we release normal 
 			 * transactions to the device.
 			 */
-			ccb->ccb_h.pinfo.priority = 0;
+			ccb->ccb_h.pinfo.priority = CAM_PRIORITY_DEV;
 			ccb->ccb_h.flags |= CAM_DEV_QFREEZE;
 			ccb->ccb_h.saved_ccb_ptr = save_ccb;
 			error = ERESTART;

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -812,7 +812,7 @@ xpt_scanner_thread(void *dummy)
 			else
 				ccb->ccb_h.func_code = XPT_SCAN_LUN;
 			ccb->ccb_h.cbfcnp = xptdone;
-			xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, 1);
+			xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, CAM_PRIORITY_NORMAL);
 			cam_periph_runccb(ccb, NULL, 0, 0, NULL);
 			xpt_free_path(ccb->ccb_h.path);
 			xpt_free_ccb(ccb);
@@ -1059,7 +1059,7 @@ xpt_announce_periph(struct cam_periph *p
 		printf("%s%d: Serial Number %.60s\n", periph->periph_name,
 		       periph->unit_number, path->device->serial_num);
 	}
-	xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
 	xpt_action((union ccb*)&cts);
@@ -1068,7 +1068,7 @@ xpt_announce_periph(struct cam_periph *p
 	}
 
 	/* Ask the SIM for its base transfer speed */
-	xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -2335,7 +2335,7 @@ xptsetasyncfunc(struct cam_ed *device, v
 			 device->target->bus->path_id,
 			 device->target->target_id,
 			 device->lun_id);
-	xpt_setup_ccb(&cgd.ccb_h, &path, /*priority*/1);
+	xpt_setup_ccb(&cgd.ccb_h, &path, CAM_PRIORITY_NORMAL);
 	cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 	xpt_action((union ccb *)&cgd);
 	cur_entry->callback(cur_entry->callback_arg,
@@ -2359,7 +2359,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, v
 			 bus->sim->path_id,
 			 CAM_TARGET_WILDCARD,
 			 CAM_LUN_WILDCARD);
-	xpt_setup_ccb(&cpi.ccb_h, &path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 	cur_entry->callback(cur_entry->callback_arg,
@@ -3799,7 +3799,7 @@ xpt_bus_register(struct cam_sim *sim, de
 	if (status != CAM_REQ_CMP)
 		printf("xpt_compile_path returned %d\n", status);
 
-	xpt_setup_ccb(&cpi.ccb_h, &path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -4544,7 +4544,7 @@ xpt_start_tags(struct cam_path *path)
 		newopenings = min(device->maxtags,
 				  sim->max_tagged_dev_openings);
 	xpt_dev_ccbq_resize(path, newopenings);
-	xpt_setup_ccb(&crs.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
 	crs.ccb_h.func_code = XPT_REL_SIMQ;
 	crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
 	crs.openings
@@ -4571,7 +4571,7 @@ xptconfigbuscountfunc(struct cam_eb *bus
 		busses_to_config++;
 		xpt_compile_path(&path, NULL, bus->path_id,
 				 CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
-		xpt_setup_ccb(&cpi.ccb_h, &path, /*priority*/1);
+		xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL);
 		cpi.ccb_h.func_code = XPT_PATH_INQ;
 		xpt_action((union ccb *)&cpi);
 		can_negotiate = cpi.hba_inquiry;
@@ -4614,7 +4614,7 @@ xptconfigfunc(struct cam_eb *bus, void *
 			xpt_finishconfig(xpt_periph, NULL);
 			return(0);
 		}
-		xpt_setup_ccb(&work_ccb->ccb_h, path, /*priority*/1);
+		xpt_setup_ccb(&work_ccb->ccb_h, path, CAM_PRIORITY_NORMAL);
 		work_ccb->ccb_h.func_code = XPT_PATH_INQ;
 		xpt_action(work_ccb);
 		if (work_ccb->ccb_h.status != CAM_REQ_CMP) {
@@ -4629,7 +4629,7 @@ xptconfigfunc(struct cam_eb *bus, void *
 		can_negotiate &= (PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE);
 		if ((work_ccb->cpi.hba_misc & PIM_NOBUSRESET) == 0
 		 && (can_negotiate != 0)) {
-			xpt_setup_ccb(&work_ccb->ccb_h, path, /*priority*/1);
+			xpt_setup_ccb(&work_ccb->ccb_h, path, CAM_PRIORITY_NORMAL);
 			work_ccb->ccb_h.func_code = XPT_RESET_BUS;
 			work_ccb->ccb_h.cbfcnp = NULL;
 			CAM_DEBUG(path, CAM_DEBUG_SUBTRACE,

Modified: stable/8/sys/cam/scsi/scsi_all.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_all.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_all.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -3004,7 +3004,7 @@ scsi_command_string(struct cam_device *d
 	 */
 	xpt_setup_ccb(&cgd.ccb_h,
 		      csio->ccb_h.path,
-		      /*priority*/ 1);
+		      CAM_PRIORITY_NORMAL);
 	cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 	xpt_action((union ccb *)&cgd);
 
@@ -3088,7 +3088,7 @@ scsi_sense_sbuf(struct cam_device *devic
 	 */
 	xpt_setup_ccb(&cgd.ccb_h,
 		      csio->ccb_h.path,
-		      /*priority*/ 1);
+		      CAM_PRIORITY_NORMAL);
 	cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 	xpt_action((union ccb *)&cgd);
 

Modified: stable/8/sys/cam/scsi/scsi_cd.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_cd.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_cd.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -673,7 +673,7 @@ cdregister(struct cam_periph *periph, vo
 		softc->quirks = CD_Q_NONE;
 
 	/* Check if the SIM does not want 6 byte commands */
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 	if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE))
@@ -1105,7 +1105,7 @@ cdschedule(struct cam_periph *periph, in
 		 * We don't do anything with the priority here.
 		 * This is strictly a fifo queue.
 		 */
-		softc->pinfo.priority = 1;
+		softc->pinfo.priority = CAM_PRIORITY_NORMAL;
 		softc->pinfo.generation = ++softc->changer->devq.generation;
 		camq_insert(&softc->changer->devq, (cam_pinfo *)softc);
 
@@ -1206,7 +1206,7 @@ cdrunchangerqueue(void *arg)
 
 	/* Just in case this device is waiting */
 	wakeup(&softc->changer);
-	xpt_schedule(softc->periph, /*priority*/ 1);
+	xpt_schedule(softc->periph, CAM_PRIORITY_NORMAL);
 
 	/*
 	 * Get rid of any pending timeouts, and set a flag to schedule new
@@ -1344,7 +1344,7 @@ cdgetccb(struct cam_periph *periph, u_in
 			 * If this changer isn't already queued, queue it up.
 			 */
 			if (softc->pinfo.index == CAM_UNQUEUED_INDEX) {
-				softc->pinfo.priority = 1;
+				softc->pinfo.priority = CAM_PRIORITY_NORMAL;
 				softc->pinfo.generation =
 					++softc->changer->devq.generation;
 				camq_insert(&softc->changer->devq,
@@ -1421,9 +1421,9 @@ cdstrategy(struct bio *bp)
 	 * differently for changers.
 	 */
 	if ((softc->flags & CD_FLAG_CHANGER) == 0)
-		xpt_schedule(periph, /* XXX priority */1);
+		xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 	else
-		cdschedule(periph, /* priority */ 1);
+		cdschedule(periph, CAM_PRIORITY_NORMAL);
 
 	cam_periph_unlock(periph);
 	return;
@@ -1493,7 +1493,7 @@ cdstart(struct cam_periph *periph, union
 		}
 		if (bp != NULL) {
 			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, /* XXX priority */1);
+			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}
 		break;
 	}
@@ -1668,7 +1668,7 @@ cddone(struct cam_periph *periph, union 
 
 				xpt_setup_ccb(&cgd.ccb_h, 
 					      done_ccb->ccb_h.path,
-					      /* priority */ 1);
+					      CAM_PRIORITY_NORMAL);
 				cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 				xpt_action((union ccb *)&cgd);
 
@@ -2727,7 +2727,7 @@ cdprevent(struct cam_periph *periph, int
 		return;
 	}
 	    
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_prevent(&ccb->csio, 
 		     /*retries*/ 1,
@@ -2901,7 +2901,7 @@ cdsize(struct cam_periph *periph, u_int3
 
 	softc = (struct cd_softc *)periph->softc;
              
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	/* XXX Should be M_WAITOK */
 	rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), 
@@ -3153,7 +3153,7 @@ cdreadtoc(struct cam_periph *periph, u_i
 	ntoc = len;
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3200,7 +3200,7 @@ cdreadsubchannel(struct cam_periph *peri
 
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3252,7 +3252,7 @@ cdgetmode(struct cam_periph *periph, str
 
 	softc = (struct cd_softc *)periph->softc;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3351,7 +3351,7 @@ cdsetmode(struct cam_periph *periph, str
 
 	softc = (struct cd_softc *)periph->softc;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3443,7 +3443,7 @@ cdplay(struct cam_periph *periph, u_int3
 	u_int8_t cdb_len;
 
 	error = 0;
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 	csio = &ccb->csio;
 	/*
 	 * Use the smallest possible command to perform the operation.
@@ -3500,7 +3500,7 @@ cdplaymsf(struct cam_periph *periph, u_i
 
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3546,7 +3546,7 @@ cdplaytracks(struct cam_periph *periph, 
 
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3588,7 +3588,7 @@ cdpause(struct cam_periph *periph, u_int
 
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	csio = &ccb->csio;
 
@@ -3625,7 +3625,7 @@ cdstartunit(struct cam_periph *periph, i
 
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_start_stop(&ccb->csio,
 			/* retries */ 1,
@@ -3653,7 +3653,7 @@ cdstopunit(struct cam_periph *periph, u_
 
 	error = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_start_stop(&ccb->csio,
 			/* retries */ 1,
@@ -3682,7 +3682,7 @@ cdsetspeed(struct cam_periph *periph, u_
 	int error;
 
 	error = 0;
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 	csio = &ccb->csio;
 
 	/* Preserve old behavior: units in multiples of CDROM speed */
@@ -3730,7 +3730,7 @@ cdreportkey(struct cam_periph *periph, s
 	databuf = NULL;
 	lba = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	switch (authinfo->format) {
 	case DVD_REPORT_AGID:
@@ -3887,7 +3887,7 @@ cdsendkey(struct cam_periph *periph, str
 	error = 0;
 	databuf = NULL;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	switch(authinfo->format) {
 	case DVD_SEND_CHALLENGE: {
@@ -3983,7 +3983,7 @@ cdreaddvdstructure(struct cam_periph *pe
 	/* The address is reserved for many of the formats */
 	address = 0;
 
-	ccb = cdgetccb(periph, /* priority */ 1);
+	ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
 
 	switch(dvdstruct->format) {
 	case DVD_STRUCT_PHYSICAL:

Modified: stable/8/sys/cam/scsi/scsi_ch.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_ch.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_ch.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -809,7 +809,7 @@ chmove(struct cam_periph *periph, struct
 	fromelem = softc->sc_firsts[cm->cm_fromtype] + cm->cm_fromunit;
 	toelem = softc->sc_firsts[cm->cm_totype] + cm->cm_tounit;
 
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_move_medium(&ccb->csio,
 			 /* retries */ 1,
@@ -868,7 +868,7 @@ chexchange(struct cam_periph *periph, st
 	dst1 = softc->sc_firsts[ce->ce_fdsttype] + ce->ce_fdstunit;
 	dst2 = softc->sc_firsts[ce->ce_sdsttype] + ce->ce_sdstunit;
 
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_exchange_medium(&ccb->csio,
 			     /* retries */ 1,
@@ -918,7 +918,7 @@ chposition(struct cam_periph *periph, st
 	 */
 	dst = softc->sc_firsts[cp->cp_type] + cp->cp_unit;
 
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_position_to_element(&ccb->csio,
 				 /* retries */ 1,
@@ -1075,7 +1075,7 @@ chgetelemstatus(struct cam_periph *perip
 	data = (caddr_t)malloc(1024, M_DEVBUF, M_WAITOK);
 
 	cam_periph_lock(periph);
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_read_element_status(&ccb->csio,
 				 /* retries */ 1,
@@ -1201,7 +1201,7 @@ chielem(struct cam_periph *periph,
 	error = 0;
 	softc = (struct ch_softc *)periph->softc;
 
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_initialize_element_status(&ccb->csio,
 				      /* retries */ 1,
@@ -1285,7 +1285,7 @@ chsetvoltag(struct cam_periph *periph,
 	       min(strlen(csvr->csvr_voltag.cv_volid), sizeof(ssvtp.vitf)));
 	scsi_ulto2b(csvr->csvr_voltag.cv_serial, ssvtp.minvsn);
 
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_send_volume_tag(&ccb->csio,
 			     /* retries */ 1,
@@ -1323,7 +1323,7 @@ chgetparams(struct cam_periph *periph)
 
 	softc = (struct ch_softc *)periph->softc;
 
-	ccb = cam_periph_getccb(periph, /*priority*/ 1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	/*
 	 * The scsi_mode_sense_data structure is just a convenience

Modified: stable/8/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -729,7 +729,7 @@ daclose(struct disk *dp)
 	if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) {
 		union	ccb *ccb;
 
-		ccb = cam_periph_getccb(periph, /*priority*/1);
+		ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 		scsi_synchronize_cache(&ccb->csio,
 				       /*retries*/1,
@@ -830,7 +830,7 @@ dastrategy(struct bio *bp)
 	/*
 	 * Schedule ourselves for performing the work.
 	 */
-	xpt_schedule(periph, /* XXX priority */1);
+	xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 	cam_periph_unlock(periph);
 
 	return;
@@ -860,7 +860,7 @@ dadump(void *arg, void *virtual, vm_offs
 
 	if (length > 0) {
 		periph->flags |= CAM_PERIPH_POLLED;
-		xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		csio.ccb_h.ccb_state = DA_CCB_DUMP;
 		scsi_read_write(&csio,
 				/*retries*/1,
@@ -897,7 +897,7 @@ dadump(void *arg, void *virtual, vm_offs
 	 */
 	if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) {
 
-		xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		csio.ccb_h.ccb_state = DA_CCB_DUMP;
 		scsi_synchronize_cache(&csio,
 				       /*retries*/1,
@@ -1194,7 +1194,7 @@ daregister(struct cam_periph *periph, vo
 
 	/* Check if the SIM does not want 6 byte commands */
 	bzero(&cpi, sizeof(cpi));
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 	if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE))
@@ -1381,7 +1381,7 @@ dastart(struct cam_periph *periph, union
 		
 		if (bp != NULL) {
 			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, /* XXX priority */1);
+			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}
 		break;
 	}
@@ -1678,7 +1678,7 @@ dadone(struct cam_periph *periph, union 
 
 				xpt_setup_ccb(&cgd.ccb_h, 
 					      done_ccb->ccb_h.path,
-					      /* priority */ 1);
+					      CAM_PRIORITY_NORMAL);
 				cgd.ccb_h.func_code = XPT_GDEV_TYPE;
 				xpt_action((union ccb *)&cgd);
 
@@ -1832,7 +1832,7 @@ daprevent(struct cam_periph *periph, int
 		return;
 	}
 
-	ccb = cam_periph_getccb(periph, /*priority*/1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
 	scsi_prevent(&ccb->csio,
 		     /*retries*/1,
@@ -1882,7 +1882,7 @@ dagetcapacity(struct cam_periph *periph)
 	if (rcap == NULL)
 		return (ENOMEM);
 		
-	ccb = cam_periph_getccb(periph, /*priority*/1);
+	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 	scsi_read_capacity(&ccb->csio,
 			   /*retries*/4,
 			   /*cbfncp*/dadone,
@@ -1976,7 +1976,7 @@ dasetgeom(struct cam_periph *periph, uin
 	 * up with something that will make this a bootable
 	 * device.
 	 */
-	xpt_setup_ccb(&ccg.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&ccg.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	ccg.ccb_h.func_code = XPT_CALC_GEOMETRY;
 	ccg.block_size = dp->secsize;
 	ccg.volume_size = dp->sectors;
@@ -2050,7 +2050,7 @@ dashutdown(void * arg, int howto)
 			continue;
 		}
 
-		xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 
 		ccb.ccb_h.ccb_state = DA_CCB_DUMP;
 		scsi_synchronize_cache(&ccb.csio,

Modified: stable/8/sys/cam/scsi/scsi_pt.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_pt.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_pt.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -224,7 +224,7 @@ ptstrategy(struct bio *bp)
 	/*
 	 * Schedule ourselves for performing the work.
 	 */
-	xpt_schedule(periph, /* XXX priority */1);
+	xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 	cam_periph_unlock(periph);
 
 	return;
@@ -464,7 +464,7 @@ ptstart(struct cam_periph *periph, union
 		
 		if (bp != NULL) {
 			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, /* XXX priority */1);
+			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}
 	}
 }

Modified: stable/8/sys/cam/scsi/scsi_sa.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_sa.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_sa.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -786,7 +786,7 @@ sastrategy(struct bio *bp)
 	/*
 	 * Schedule ourselves for performing the work.
 	 */
-	xpt_schedule(periph, 1);
+	xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 	cam_periph_unlock(periph);
 
 	return;
@@ -1689,7 +1689,7 @@ again:
 		
 		if (bp != NULL) {
 			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, 1);
+			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}
 		break;
 	}

Modified: stable/8/sys/cam/scsi/scsi_targ_bh.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_targ_bh.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_targ_bh.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -240,7 +240,7 @@ targbhenlun(struct cam_periph *periph)
 	if ((softc->flags & TARGBH_FLAG_LUN_ENABLED) != 0)
 		return (CAM_REQ_CMP);
 
-	xpt_setup_ccb(&immed_ccb.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&immed_ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	immed_ccb.ccb_h.func_code = XPT_EN_LUN;
 
 	/* Don't need support for any vendor specific commands */
@@ -280,7 +280,7 @@ targbhenlun(struct cam_periph *periph)
 			break;
 		}
 
-		xpt_setup_ccb(&atio->ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&atio->ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		atio->ccb_h.func_code = XPT_ACCEPT_TARGET_IO;
 		atio->ccb_h.cbfcnp = targbhdone;
 		xpt_action((union ccb *)atio);
@@ -318,7 +318,7 @@ targbhenlun(struct cam_periph *periph)
 			break;
 		}
 
-		xpt_setup_ccb(&inot->ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&inot->ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		inot->ccb_h.func_code = XPT_IMMED_NOTIFY;
 		inot->ccb_h.cbfcnp = targbhdone;
 		xpt_action((union ccb *)inot);
@@ -361,7 +361,7 @@ targbhdislun(struct cam_periph *periph)
 		
 		softc->accept_tio_list =
 		    ((struct targbh_cmd_desc*)atio->ccb_h.ccb_descr)->atio_link;
-		xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		ccb.cab.ccb_h.func_code = XPT_ABORT;
 		ccb.cab.abort_ccb = (union ccb *)atio;
 		xpt_action(&ccb);
@@ -369,7 +369,7 @@ targbhdislun(struct cam_periph *periph)
 
 	while ((ccb_h = SLIST_FIRST(&softc->immed_notify_slist)) != NULL) {
 		SLIST_REMOVE_HEAD(&softc->immed_notify_slist, periph_links.sle);
-		xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, /*priority*/1);
+		xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		ccb.cab.ccb_h.func_code = XPT_ABORT;
 		ccb.cab.abort_ccb = (union ccb *)ccb_h;
 		xpt_action(&ccb);
@@ -378,7 +378,7 @@ targbhdislun(struct cam_periph *periph)
 	/*
 	 * Dissable this lun.
 	 */
-	xpt_setup_ccb(&ccb.cel.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&ccb.cel.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	ccb.cel.ccb_h.func_code = XPT_EN_LUN;
 	ccb.cel.enable = 0;
 	xpt_action(&ccb);
@@ -528,7 +528,7 @@ targbhstart(struct cam_periph *periph, u
 		ccbh = TAILQ_FIRST(&softc->work_queue);
 	}
 	if (ccbh != NULL)
-		xpt_schedule(periph, /*priority*/1);
+		xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 }
 
 static void
@@ -647,7 +647,7 @@ targbhdone(struct cam_periph *periph, un
 		} else {
 			TAILQ_INSERT_TAIL(&softc->work_queue, &atio->ccb_h,
 					  periph_links.tqe);
-			priority = 1;
+			priority = CAM_PRIORITY_NORMAL;
 		}
 		xpt_schedule(periph, priority);
 		break;

Modified: stable/8/sys/cam/scsi/scsi_target.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_target.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_target.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -296,7 +296,7 @@ targioctl(struct cdev *dev, u_long cmd, 
 		else
 			cdbg.flags = CAM_DEBUG_NONE;
 		cam_periph_lock(softc->periph);
-		xpt_setup_ccb(&cdbg.ccb_h, softc->path, /*priority*/0);
+		xpt_setup_ccb(&cdbg.ccb_h, softc->path, CAM_PRIORITY_NORMAL);
 		cdbg.ccb_h.func_code = XPT_DEBUG;
 		cdbg.ccb_h.cbfcnp = targdone;
 
@@ -387,7 +387,7 @@ targendislun(struct cam_path *path, int 
 	cam_status	  status;
 
 	/* Tell the lun to begin answering selects */
-	xpt_setup_ccb(&en_ccb.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&en_ccb.ccb_h, path, CAM_PRIORITY_NORMAL);
 	en_ccb.ccb_h.func_code = XPT_EN_LUN;
 	/* Don't need support for any vendor specific commands */
 	en_ccb.grp6_len = grp6_len;
@@ -415,7 +415,7 @@ targenable(struct targ_softc *softc, str
 		return (CAM_LUN_ALRDY_ENA);
 
 	/* Make sure SIM supports target mode */
-	xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 	status = cpi.ccb_h.status & CAM_STATUS_MASK;
@@ -563,7 +563,7 @@ targwrite(struct cdev *dev, struct uio *
 			break;
 		}
 		priority = fuword32(&user_ccb->ccb_h.pinfo.priority);
-		if (priority == -1) {
+		if (priority == CAM_PRIORITY_NONE) {
 			error = EINVAL;
 			break;
 		}
@@ -1067,7 +1067,7 @@ abort_all_pending(struct targ_softc *sof
 	 * Then abort all pending CCBs.
 	 * targdone() will return the aborted CCB via user_ccb_queue
 	 */
-	xpt_setup_ccb(&cab.ccb_h, softc->path, /*priority*/0);
+	xpt_setup_ccb(&cab.ccb_h, softc->path, CAM_PRIORITY_NORMAL);
 	cab.ccb_h.func_code = XPT_ABORT;
 	cab.ccb_h.status = CAM_REQ_CMP_ERR;
 	TAILQ_FOREACH(ccb_h, &softc->pending_ccb_queue, periph_links.tqe) {

Modified: stable/8/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_xpt.c	Tue Nov 17 19:36:06 2009	(r199420)
+++ stable/8/sys/cam/scsi/scsi_xpt.c	Tue Nov 17 19:38:19 2009	(r199421)
@@ -629,7 +629,7 @@ probeschedule(struct cam_periph *periph)
 	softc = (probe_softc *)periph->softc;
 	ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs);
 
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -880,7 +880,7 @@ proberequestdefaultnegotiation(struct ca
 {
 	struct ccb_trans_settings cts;
 
-	xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_USER_SETTINGS;
 	xpt_action((union ccb *)&cts);
@@ -902,7 +902,7 @@ proberequestbackoff(struct cam_periph *p
 	struct ccb_trans_settings_spi *spi;
 
 	memset(&cts, 0, sizeof (cts));
-	xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
+	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
 	xpt_action((union ccb *)&cts);
@@ -1748,7 +1748,7 @@ scsi_scan_lun(struct cam_periph *periph,
 	CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
 		  ("scsi_scan_lun\n"));
 
-	xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1798,7 +1798,7 @@ scsi_scan_lun(struct cam_periph *periph,
 			free(new_path, M_CAMXPT);
 			return;
 		}

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:40:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F26EC1065672;
	Tue, 17 Nov 2009 19:40:39 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DFF1C8FC28;
	Tue, 17 Nov 2009 19:40:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJedPh033593;
	Tue, 17 Nov 2009 19:40:39 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJedAs033590;
	Tue, 17 Nov 2009 19:40:39 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171940.nAHJedAs033590@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 19:40:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199422 - stable/8/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:40:40 -0000

Author: mav
Date: Tue Nov 17 19:40:39 2009
New Revision: 199422
URL: http://svn.freebsd.org/changeset/base/199422

Log:
  MFC r198319:
  On error, freeze device queue, to allow periph driver to do proper recovery.
  Freeze SIM queue only in some cases, when it is needed to protect SIM.
  
  Implement better command timeout detection logic for non-queued commands.
  This fixes false positives when command with short timeout waiting for the
  long one. For example, when hald tastes CD during burning process.
  
  Read and clear SERR register on interrupt.

Modified:
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/ahci/ahci.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 19:38:19 2009	(r199421)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 19:40:39 2009	(r199422)
@@ -866,15 +866,11 @@ ahci_slotsfree(device_t dev)
 }
 
 static void
-ahci_phy_check_events(device_t dev)
+ahci_phy_check_events(device_t dev, u_int32_t serr)
 {
 	struct ahci_channel *ch = device_get_softc(dev);
-	u_int32_t error = ATA_INL(ch->r_mem, AHCI_P_SERR);
 
-	/* Clear error bits/interrupt */
-	ATA_OUTL(ch->r_mem, AHCI_P_SERR, error);
-	/* If we have a connection event, deal with it */
-	if ((error & ATA_SE_PHY_CHANGED) && (ch->pm_level == 0)) {
+	if ((serr & ATA_SE_PHY_CHANGED) && (ch->pm_level == 0)) {
 		u_int32_t status = ATA_INL(ch->r_mem, AHCI_P_SSTS);
 		if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
 		    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
@@ -944,7 +940,7 @@ ahci_ch_intr(void *data)
 {
 	device_t dev = (device_t)data;
 	struct ahci_channel *ch = device_get_softc(dev);
-	uint32_t istatus, sstatus, cstatus, sntf = 0, ok, err;
+	uint32_t istatus, sstatus, cstatus, serr = 0, sntf = 0, ok, err;
 	enum ahci_err_type et;
 	int i, ccs, ncq_err = 0;
 
@@ -959,14 +955,20 @@ ahci_ch_intr(void *data)
 	if ((istatus & AHCI_P_IX_SDB) && (ch->caps & AHCI_CAP_SSNTF))
 		sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF);
 	/* Process PHY events */
-	if (istatus & (AHCI_P_IX_PRC | AHCI_P_IX_PC))
-		ahci_phy_check_events(dev);
+	if (istatus & (AHCI_P_IX_PC | AHCI_P_IX_PRC | AHCI_P_IX_OF |
+	    AHCI_P_IX_IF | AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) {
+		serr = ATA_INL(ch->r_mem, AHCI_P_SERR);
+		if (serr) {
+			ATA_OUTL(ch->r_mem, AHCI_P_SERR, serr);
+			ahci_phy_check_events(dev, serr);
+		}
+	}
 	/* Process command errors */
-	if (istatus & (AHCI_P_IX_IF | AHCI_P_IX_HBD | AHCI_P_IX_HBF |
-		       AHCI_P_IX_TFE | AHCI_P_IX_OF)) {
+	if (istatus & (AHCI_P_IX_OF | AHCI_P_IX_IF |
+	    AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) {
 //device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x\n",
 //    __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD),
-//    ATA_INL(ch->r_mem, AHCI_P_SERR));
+//    serr);
 		ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK)
 		    >> AHCI_P_CMD_CCS_SHIFT;
 		err = ch->rslots & (cstatus | sstatus);
@@ -985,19 +987,26 @@ ahci_ch_intr(void *data)
 	}
 	/* On error, complete the rest of commands with error statuses. */
 	if (err) {
-		if (!ch->readlog)
-			xpt_freeze_simq(ch->sim, ch->numrslots);
 		if (ch->frozen) {
 			union ccb *fccb = ch->frozen;
 			ch->frozen = NULL;
 			fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+			if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
+				xpt_freeze_devq(fccb->ccb_h.path, 1);
+				fccb->ccb_h.status |= CAM_DEV_QFRZN;
+			}
 			xpt_done(fccb);
 		}
 		for (i = 0; i < ch->numslots; i++) {
 			/* XXX: reqests in loading state. */
 			if (((err >> i) & 1) == 0)
 				continue;
-			if (istatus & AHCI_P_IX_TFE) {
+			if (istatus & AHCI_P_IX_IF) {
+				if (ch->numtslots == 0 && i != ccs)
+					et = AHCI_ERR_INNOCENT;
+				else
+					et = AHCI_ERR_SATA;
+			} else if (istatus & AHCI_P_IX_TFE) {
 				/* Task File Error */
 				if (ch->numtslots == 0) {
 					/* Untagged operation. */
@@ -1010,9 +1019,6 @@ ahci_ch_intr(void *data)
 					et = AHCI_ERR_NCQ;
 					ncq_err = 1;
 				}
-			} else if (istatus & AHCI_P_IX_IF) {
-				/* SATA error */
-				et = AHCI_ERR_SATA;
 			} else
 				et = AHCI_ERR_INVALID;
 			ahci_end_transaction(&ch->slot[i], et);
@@ -1121,8 +1127,6 @@ ahci_dmasetprd(void *arg, bus_dma_segmen
 
 	if (error) {
 		device_printf(slot->dev, "DMA load error\n");
-		if (!ch->readlog)
-			xpt_freeze_simq(ch->sim, 1);
 		ahci_end_transaction(slot, AHCI_ERR_INVALID);
 		return;
 	}
@@ -1161,8 +1165,6 @@ ahci_execute_transaction(struct ahci_slo
 	/* Setup the FIS for this request */
 	if (!(fis_size = ahci_setup_fis(ctp, ccb, slot->slot))) {
 		device_printf(ch->dev, "Setting up SATA FIS failed\n");
-		if (!ch->readlog)
-			xpt_freeze_simq(ch->sim, 1);
 		ahci_end_transaction(slot, AHCI_ERR_INVALID);
 		return;
 	}
@@ -1229,13 +1231,12 @@ ahci_execute_transaction(struct ahci_slo
 			/* Kick controller into sane state */
 			ahci_stop(ch->dev);
 			ahci_start(ch->dev);
-			xpt_freeze_simq(ch->sim, 1);
 		}
 		ahci_end_transaction(slot, et);
 		return;
 	}
 	/* Start command execution timeout */
-	callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 1000,
+	callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 2000,
 	    (timeout_t*)ahci_timeout, slot);
 	return;
 }
@@ -1246,24 +1247,47 @@ ahci_timeout(struct ahci_slot *slot)
 {
 	device_t dev = slot->dev;
 	struct ahci_channel *ch = device_get_softc(dev);
+	uint32_t sstatus;
+	int ccs;
 	int i;
 
 	/* Check for stale timeout. */
-	if (slot->state != AHCI_SLOT_RUNNING)
+	if (slot->state < AHCI_SLOT_RUNNING)
 		return;
 
+	/* Check if slot was not being executed last time we checked. */
+	if (slot->state < AHCI_SLOT_EXECUTING) {
+		/* Check if slot started executing. */
+		sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT);
+		ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK)
+		    >> AHCI_P_CMD_CCS_SHIFT;
+		if ((sstatus & (1 << slot->slot)) != 0 || ccs == slot->slot)
+			slot->state = AHCI_SLOT_EXECUTING;
+
+		callout_reset(&slot->timeout,
+		    (int)slot->ccb->ccb_h.timeout * hz / 2000,
+		    (timeout_t*)ahci_timeout, slot);
+		return;
+	}
+
 	device_printf(dev, "Timeout on slot %d\n", slot->slot);
+	device_printf(dev, "is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x\n",
+	    ATA_INL(ch->r_mem, AHCI_P_IS), ATA_INL(ch->r_mem, AHCI_P_CI),
+	    ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots,
+	    ATA_INL(ch->r_mem, AHCI_P_TFD), ATA_INL(ch->r_mem, AHCI_P_SERR));
 	/* Kick controller into sane state. */
 	ahci_stop(ch->dev);
 	ahci_start(ch->dev);
 
-	if (!ch->readlog)
-		xpt_freeze_simq(ch->sim, ch->numrslots);
 	/* Handle frozen command. */
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
 		fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+		if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
+			xpt_freeze_devq(fccb->ccb_h.path, 1);
+			fccb->ccb_h.status |= CAM_DEV_QFRZN;
+		}
 		xpt_done(fccb);
 	}
 	/* Handle command with timeout. */
@@ -1321,10 +1345,14 @@ ahci_end_transaction(struct ahci_slot *s
 		    BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
 		bus_dmamap_unload(ch->dma.data_tag, slot->dma.data_map);
 	}
+	/* In case of error, freeze device for proper recovery. */
+	if ((et != AHCI_ERR_NONE) && (!ch->readlog) &&
+	    !(ccb->ccb_h.status & CAM_DEV_QFRZN)) {
+		xpt_freeze_devq(ccb->ccb_h.path, 1);
+		ccb->ccb_h.status |= CAM_DEV_QFRZN;
+	}
 	/* Set proper result status. */
 	ccb->ccb_h.status &= ~CAM_STATUS_MASK;
-	if (et != AHCI_ERR_NONE)
-		ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
 	switch (et) {
 	case AHCI_ERR_NONE:
 		ccb->ccb_h.status |= CAM_REQ_CMP;
@@ -1338,6 +1366,7 @@ ahci_end_transaction(struct ahci_slot *s
 		ccb->ccb_h.status |= CAM_REQUEUE_REQ;
 		break;
 	case AHCI_ERR_TFE:
+	case AHCI_ERR_NCQ:
 		if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
 			ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR;
 			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
@@ -1346,13 +1375,21 @@ ahci_end_transaction(struct ahci_slot *s
 		}
 		break;
 	case AHCI_ERR_SATA:
-			ccb->ccb_h.status |= CAM_UNCOR_PARITY;
+		if (!ch->readlog) {
+			xpt_freeze_simq(ch->sim, 1);
+			ccb->ccb_h.status &= ~CAM_STATUS_MASK;
+			ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
+		}
+		ccb->ccb_h.status |= CAM_UNCOR_PARITY;
 		break;
 	case AHCI_ERR_TIMEOUT:
+		if (!ch->readlog) {
+			xpt_freeze_simq(ch->sim, 1);
+			ccb->ccb_h.status &= ~CAM_STATUS_MASK;
+			ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
+		}
 		ccb->ccb_h.status |= CAM_CMD_TIMEOUT;
 		break;
-	case AHCI_ERR_NCQ:
-		ccb->ccb_h.status |= CAM_ATA_STATUS_ERROR;
 	default:
 		ccb->ccb_h.status |= CAM_REQ_CMP_ERR;
 	}
@@ -1436,7 +1473,8 @@ ahci_issue_read_log(device_t dev)
 	ataio->cmd.lba_low = 0x10;
 	ataio->cmd.lba_mid = 0;
 	ataio->cmd.lba_mid_exp = 0;
-	
+	/* Freeze SIM while doing READ LOG EXT. */
+	xpt_freeze_simq(ch->sim, 1);
 	ahci_begin_transaction(dev, ccb);
 }
 
@@ -1491,6 +1529,7 @@ ahci_process_read_log(device_t dev, unio
 	}
 	free(ccb->ataio.data_ptr, M_AHCI);
 	xpt_free_ccb(ccb);
+	xpt_release_simq(ch->sim, TRUE);
 }
 
 static void
@@ -1615,12 +1654,15 @@ ahci_reset(device_t dev)
 
 	if (bootverbose)
 		device_printf(dev, "AHCI reset...\n");
-	xpt_freeze_simq(ch->sim, ch->numrslots);
 	/* Requeue freezed command. */
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
 		fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+		if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
+			xpt_freeze_devq(fccb->ccb_h.path, 1);
+			fccb->ccb_h.status |= CAM_DEV_QFRZN;
+		}
 		xpt_done(fccb);
 	}
 	/* Kill the engine and requeue all running commands. */
@@ -1632,6 +1674,8 @@ ahci_reset(device_t dev)
 		/* XXX; Commands in loading state. */
 		ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT);
 	}
+	/* Tell the XPT about the event */
+	xpt_async(AC_BUS_RESET, ch->path, NULL);
 	/* Disable port interrupts */
 	ATA_OUTL(ch->r_mem, AHCI_P_IE, 0);
 	/* Reset and reconnect PHY, */
@@ -1661,8 +1705,6 @@ ahci_reset(device_t dev)
 	      AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR)));
 	if (bootverbose)
 		device_printf(dev, "AHCI reset done: device found\n");
-	/* Tell the XPT about the event */
-	xpt_async(AC_BUS_RESET, ch->path, NULL);
 }
 
 static int

Modified: stable/8/sys/dev/ahci/ahci.h
==============================================================================
--- stable/8/sys/dev/ahci/ahci.h	Tue Nov 17 19:38:19 2009	(r199421)
+++ stable/8/sys/dev/ahci/ahci.h	Tue Nov 17 19:40:39 2009	(r199422)
@@ -328,7 +328,7 @@ enum ahci_slot_states {
 	AHCI_SLOT_EMPTY,
 	AHCI_SLOT_LOADING,
 	AHCI_SLOT_RUNNING,
-	AHCI_SLOT_WAITING
+	AHCI_SLOT_EXECUTING
 };
 
 struct ahci_slot {

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:42:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3962210656CB;
	Tue, 17 Nov 2009 19:42:07 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 26F688FC1D;
	Tue, 17 Nov 2009 19:42:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJg7gh033755;
	Tue, 17 Nov 2009 19:42:07 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJg7Z7033753;
	Tue, 17 Nov 2009 19:42:07 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171942.nAHJg7Z7033753@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 19:42:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199423 - stable/8/sys/dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:42:07 -0000

Author: mav
Date: Tue Nov 17 19:42:06 2009
New Revision: 199423
URL: http://svn.freebsd.org/changeset/base/199423

Log:
  MFC r198321
  Freeze device queue on error to permit periph driver to do proper recovery.

Modified:
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 19:40:39 2009	(r199422)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 19:42:06 2009	(r199423)
@@ -752,7 +752,12 @@ siis_ch_intr(void *data)
 		if (ch->frozen) {
 			union ccb *fccb = ch->frozen;
 			ch->frozen = NULL;
-			fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+			fccb->ccb_h.status &= ~CAM_STATUS_MASK;
+			fccb->ccb_h.status |= CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+			if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
+				xpt_freeze_devq(fccb->ccb_h.path, 1);
+				fccb->ccb_h.status |= CAM_DEV_QFRZN;
+			}
 			xpt_done(fccb);
 		}
 		if (estatus == SIIS_P_CMDERR_DEV ||
@@ -986,7 +991,12 @@ device_printf(dev, "%s is %08x ss %08x r
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
-		fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+		fccb->ccb_h.status &= ~CAM_STATUS_MASK;
+		fccb->ccb_h.status |= CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+		if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
+			xpt_freeze_devq(fccb->ccb_h.path, 1);
+			fccb->ccb_h.status |= CAM_DEV_QFRZN;
+		}
 		xpt_done(fccb);
 	}
 	/* Handle command with timeout. */
@@ -1044,11 +1054,17 @@ siis_end_transaction(struct siis_slot *s
 		bus_dmamap_unload(ch->dma.data_tag, slot->dma.data_map);
 	}
 	/* Set proper result status. */
-	ccb->ccb_h.status &= ~CAM_STATUS_MASK;
 	if (et != SIIS_ERR_NONE || ch->recovery) {
 		ch->eslots |= (1 << slot->slot);
 		ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
 	}
+	/* In case of error, freeze device for proper recovery. */
+	if (et != SIIS_ERR_NONE &&
+	    !(ccb->ccb_h.status & CAM_DEV_QFRZN)) {
+		xpt_freeze_devq(ccb->ccb_h.path, 1);
+		ccb->ccb_h.status |= CAM_DEV_QFRZN;
+	}
+	ccb->ccb_h.status &= ~CAM_STATUS_MASK;
 	switch (et) {
 	case SIIS_ERR_NONE:
 		ccb->ccb_h.status |= CAM_REQ_CMP;
@@ -1062,6 +1078,7 @@ siis_end_transaction(struct siis_slot *s
 		ccb->ccb_h.status |= CAM_REQUEUE_REQ;
 		break;
 	case SIIS_ERR_TFE:
+	case SIIS_ERR_NCQ:
 		if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
 			ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR;
 			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
@@ -1075,9 +1092,6 @@ siis_end_transaction(struct siis_slot *s
 	case SIIS_ERR_TIMEOUT:
 		ccb->ccb_h.status |= CAM_CMD_TIMEOUT;
 		break;
-	case SIIS_ERR_NCQ:
-		ccb->ccb_h.status |= CAM_ATA_STATUS_ERROR;
-		break;
 	default:
 		ccb->ccb_h.status |= CAM_REQ_CMP_ERR;
 	}
@@ -1281,7 +1295,12 @@ siis_reset(device_t dev)
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
-		fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+		fccb->ccb_h.status &= ~CAM_STATUS_MASK;
+		fccb->ccb_h.status |= CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
+		if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
+			xpt_freeze_devq(fccb->ccb_h.path, 1);
+			fccb->ccb_h.status |= CAM_DEV_QFRZN;
+		}
 		xpt_done(fccb);
 	}
 	/* Disable port interrupts */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:50:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9FF1710656C5;
	Tue, 17 Nov 2009 19:50:13 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D94E8FC13;
	Tue, 17 Nov 2009 19:50:12 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id nAHJo8HG078921
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 17 Nov 2009 21:50:08 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id
	nAHJo8dx084045; Tue, 17 Nov 2009 21:50:08 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nAHJo8Tx084044; 
	Tue, 17 Nov 2009 21:50:08 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Tue, 17 Nov 2009 21:50:08 +0200
From: Kostik Belousov 
To: Jung-uk Kim 
Message-ID: <20091117195008.GH2331@deviant.kiev.zoral.com.ua>
References: <200911171924.nAHJOQIh032544@svn.freebsd.org>
	<200911171434.56358.jkim@FreeBSD.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="qOvqZqNrf4y6v2y5"
Content-Disposition: inline
In-Reply-To: <200911171434.56358.jkim@FreeBSD.org>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199418 - head/sys/dev/syscons
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:50:13 -0000


--qOvqZqNrf4y6v2y5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 17, 2009 at 02:34:54PM -0500, Jung-uk Kim wrote:
> On Tuesday 17 November 2009 02:24 pm, Konstantin Belousov wrote:
> > Author: kib
> > Date: Tue Nov 17 19:24:26 2009
> > New Revision: 199418
> > URL: http://svn.freebsd.org/changeset/base/199418
> >
> > Log:
> >   Fix pgsignal() call after signature change in r199355.
> >
> >   Reported and tested by:	bf1783 googlemail com
> >   MFC after:	1 month
> >
> > Modified:
> >   head/sys/dev/syscons/scvidctl.c
> >
> > Modified: head/sys/dev/syscons/scvidctl.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/sys/dev/syscons/scvidctl.c	Tu=
e Nov 17 18:57:44
> > 2009	(r199417) +++ head/sys/dev/syscons/scvidctl.c	Tue Nov 17
> > 19:24:26 2009	(r199418) @@ -321,6 +321,7 @@
> > sc_set_pixel_mode(scr_stat *scp, struct return ENODEV;
> >  #else
> >      video_info_t info;
> > +    ksiginfo_t ksi;
> >      u_char *font;
> >      int prev_ysize;
> >      int error;
> > @@ -458,8 +459,11 @@ sc_set_pixel_mode(scr_stat *scp, struct
> >  	tp->t_winsize.ws_col =3D scp->xsize;
> >  	tp->t_winsize.ws_row =3D scp->ysize;
> >  	if (tp->t_pgrp !=3D NULL) {
> > +	    ksiginfo_init(&ksi);
> > +	    ksi.ksi_signo =3D SIGWINCH;
> > +	    ksi.ksi_code =3D SI_KERNEL;
> >  	    PGRP_LOCK(tp->t_pgrp);
> > -	    pgsignal(tp->t_pgrp, SIGWINCH, 1);
> > +	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
> >  	    PGRP_UNLOCK(tp->t_pgrp);
> >  	}
> >      }
>=20
> Probably you wanted this:
>=20
> --- sys/dev/syscons/scvidctl.c
> +++ sys/dev/syscons/scvidctl.c
> @@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
>      return ENODEV;
>  #else
>      video_info_t info;
> -    ksiginfo_t ksi;
>      u_char *font;
>      int prev_ysize;
>      int error;
> @@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
>         || tp->t_winsize.ws_row !=3D scp->ysize) {
>         tp->t_winsize.ws_col =3D scp->xsize;
>         tp->t_winsize.ws_row =3D scp->ysize;
> -       if (tp->t_pgrp !=3D NULL) {
> -           ksiginfo_init(&ksi);
> -           ksi.ksi_signo =3D SIGWINCH;
> -           ksi.ksi_code =3D SI_KERNEL;
> -           PGRP_LOCK(tp->t_pgrp);
> -           pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
> -           PGRP_UNLOCK(tp->t_pgrp);
> -       }
> +
> +       tty_signal_pgrp(tp, SIGWINCH);
>      }
> =20
>      return 0;
> ------------------------------------------------------------------
>=20
> In fact, it seems it was missed in r181905.
>=20
> Jung-uk Kim

I do not think so, at least it needs further considerations.
First, call to tty_signal_pgrp() requires locked tty.
Second, tty_signal_pgrp() restores i/o processing on the terminal,
	tp->t_flags &=3D ~TF_STOPPED;
that is not quite obviously right thing to do on SIGWINCH.


--qOvqZqNrf4y6v2y5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAksC/nAACgkQC3+MBN1Mb4hrnQCfbyLMUGGuI4ZwzECtvsXyVd2e
Gd0Anil753cThd7joNwmYP/Od/uGBSAc
=BpuX
-----END PGP SIGNATURE-----

--qOvqZqNrf4y6v2y5--

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:51:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D7227106566C;
	Tue, 17 Nov 2009 19:51:39 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C5D828FC12;
	Tue, 17 Nov 2009 19:51:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJpdmF034294;
	Tue, 17 Nov 2009 19:51:39 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJpdrF034292;
	Tue, 17 Nov 2009 19:51:39 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171951.nAHJpdrF034292@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 19:51:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199424 - stable/8/sbin/camcontrol
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:51:40 -0000

Author: mav
Date: Tue Nov 17 19:51:39 2009
New Revision: 199424
URL: http://svn.freebsd.org/changeset/base/199424

Log:
  MFC r197419:
  Reduce code duplication.

Modified:
  stable/8/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/8/sbin/camcontrol/   (props changed)

Modified: stable/8/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 19:42:06 2009	(r199423)
+++ stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 19:51:39 2009	(r199424)
@@ -1055,23 +1055,22 @@ atacapprint(struct ata_params *parm)
 		printf("\n");
 
 	printf("PIO supported         PIO");
-	if (parm->atavalid & ATA_FLAG_64_70) {
-		if (parm->apiomodes & 0x02)
-			printf("4");
-		else if (parm->apiomodes & 0x01)
-			printf("3");
-	} else if (parm->mwdmamodes & 0x04)
+	switch (ata_max_pmode(parm)) {
+	case ATA_PIO4:
 		printf("4");
-	else if (parm->mwdmamodes & 0x02)
+		break;
+	case ATA_PIO3:
 		printf("3");
-	else if (parm->mwdmamodes & 0x01)
+		break;
+	case ATA_PIO2:
 		printf("2");
-	else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x200)
-		printf("2");
-	else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x100)
+		break;
+	case ATA_PIO1:
 		printf("1");
-	else
+		break;
+	default:
 		printf("0");
+	}
 	printf("\n");
 
 	printf("DMA%ssupported         ",

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 19:52:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 61F67106566B;
	Tue, 17 Nov 2009 19:52:52 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D29E8FC16;
	Tue, 17 Nov 2009 19:52:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJqqqK034388;
	Tue, 17 Nov 2009 19:52:52 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJqpMi034386;
	Tue, 17 Nov 2009 19:52:51 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911171952.nAHJqpMi034386@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 19:52:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199425 - stable/8/sbin/camcontrol
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 19:52:52 -0000

Author: mav
Date: Tue Nov 17 19:52:51 2009
New Revision: 199425
URL: http://svn.freebsd.org/changeset/base/199425

Log:
  MFC r197545:
  Fethch more information from IDENTIFY result.

Modified:
  stable/8/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/8/sbin/camcontrol/   (props changed)

Modified: stable/8/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 19:51:39 2009	(r199424)
+++ stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 19:52:51 2009	(r199425)
@@ -1019,18 +1019,28 @@ atacapprint(struct ata_params *parm)
 	printf("protocol              ");
 	printf("ATA/ATAPI-%d", ata_version(parm->version_major));
 	if (parm->satacapabilities && parm->satacapabilities != 0xffff) {
-		if (parm->satacapabilities & ATA_SATA_GEN2)
+		if (parm->satacapabilities & ATA_SATA_GEN3)
+			printf(" SATA 3.x\n");
+		else if (parm->satacapabilities & ATA_SATA_GEN2)
 			printf(" SATA 2.x\n");
 		else if (parm->satacapabilities & ATA_SATA_GEN1)
 			printf(" SATA 1.x\n");
 		else
-			printf(" SATA x.x\n");
+			printf(" SATA\n");
 	}
 	else
 		printf("\n");
 	printf("device model          %.40s\n", parm->model);
-	printf("serial number         %.20s\n", parm->serial);
 	printf("firmware revision     %.8s\n", parm->revision);
+	printf("serial number         %.20s\n", parm->serial);
+	if (parm->enabled.extension & ATA_SUPPORT_64BITWWN) {
+		printf("WWN                   %02x%02x%02x%02x\n",
+		    parm->wwn[0], parm->wwn[1], parm->wwn[2], parm->wwn[3]);
+	}
+	if (parm->enabled.extension & ATA_SUPPORT_MEDIASN) {
+		printf("media serial number   %.30s\n",
+		    parm->media_serial);
+	}
 
 	printf("cylinders             %d\n", parm->cylinders);
 	printf("heads                 %d\n", parm->heads);
@@ -1071,6 +1081,8 @@ atacapprint(struct ata_params *parm)
 	default:
 		printf("0");
 	}
+	if ((parm->capabilities1 & ATA_SUPPORT_IORDY) == 0)
+		printf(" w/o IORDY");
 	printf("\n");
 
 	printf("DMA%ssupported         ",
@@ -1110,18 +1122,25 @@ atacapprint(struct ata_params *parm)
 
 	printf("overlap%ssupported\n",
 		parm->capabilities1 & ATA_SUPPORT_OVERLAP ? " " : " not ");
+	if (parm->media_rotation_rate == 1) {
+		printf("media RPM             non-rotating\n");
+	} else if (parm->media_rotation_rate >= 0x0401 &&
+	    parm->media_rotation_rate <= 0xFFFE) {
+		printf("media RPM             %d\n",
+			parm->media_rotation_rate);
+	}
 
 	printf("\nFeature                      "
 		"Support  Enable    Value           Vendor\n");
-
-	printf("write cache                    %s	%s\n",
-		parm->support.command1 & ATA_SUPPORT_WRITECACHE ? "yes" : "no",
-		parm->enabled.command1 & ATA_SUPPORT_WRITECACHE ? "yes" : "no");
-
 	printf("read ahead                     %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no");
-
+	printf("write cache                    %s	%s\n",
+		parm->support.command1 & ATA_SUPPORT_WRITECACHE ? "yes" : "no",
+		parm->enabled.command1 & ATA_SUPPORT_WRITECACHE ? "yes" : "no");
+	printf("flush cache                    %s	%s\n",
+		parm->support.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no",
+		parm->enabled.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no");
 	if (parm->satacapabilities && parm->satacapabilities != 0xffff) {
 		printf("Native Command Queuing (NCQ)   %s	"
 			"	%d/0x%02X\n",
@@ -1136,28 +1155,22 @@ atacapprint(struct ata_params *parm)
 		parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no",
 		parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no",
 		ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue));
-
 	printf("SMART                          %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no");
-
 	printf("microcode download             %s	%s\n",
 		parm->support.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no",
 		parm->enabled.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no");
-
 	printf("security                       %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no");
-
 	printf("power management               %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no");
-
 	printf("advanced power management      %s	%s	%d/0x%02X\n",
 		parm->support.command2 & ATA_SUPPORT_APM ? "yes" : "no",
 		parm->enabled.command2 & ATA_SUPPORT_APM ? "yes" : "no",
 		parm->apm_value, parm->apm_value);
-
 	printf("automatic acoustic management  %s	%s	"
 		"%d/0x%02X	%d/0x%02X\n",
 		parm->support.command2 & ATA_SUPPORT_AUTOACOUSTIC ? "yes" :"no",
@@ -1166,6 +1179,22 @@ atacapprint(struct ata_params *parm)
 		ATA_ACOUSTIC_CURRENT(parm->acoustic),
 		ATA_ACOUSTIC_VENDOR(parm->acoustic),
 		ATA_ACOUSTIC_VENDOR(parm->acoustic));
+	printf("media status notification      %s	%s\n",
+		parm->support.command2 & ATA_SUPPORT_NOTIFY ? "yes" : "no",
+		parm->enabled.command2 & ATA_SUPPORT_NOTIFY ? "yes" : "no");
+	printf("power-up in Standby            %s	%s\n",
+		parm->support.command2 & ATA_SUPPORT_STANDBY ? "yes" : "no",
+		parm->enabled.command2 & ATA_SUPPORT_STANDBY ? "yes" : "no");
+	printf("write-read-verify              %s	%s	%d/0x%x\n",
+		parm->support2 & ATA_SUPPORT_WRITEREADVERIFY ? "yes" : "no",
+		parm->enabled2 & ATA_SUPPORT_WRITEREADVERIFY ? "yes" : "no",
+		parm->wrv_mode, parm->wrv_mode);
+	printf("unload                         %s	%s\n",
+		parm->support.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no",
+		parm->enabled.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no");
+	printf("free-fall                      %s	%s\n",
+		parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no",
+		parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no");
 }
 
 
@@ -1261,6 +1290,7 @@ ataidentify(struct cam_device *device, i
 		ata_bswap(ident_buf->model, sizeof(ident_buf->model));
 		ata_bswap(ident_buf->revision, sizeof(ident_buf->revision));
 		ata_bswap(ident_buf->serial, sizeof(ident_buf->serial));
+		ata_bswap(ident_buf->media_serial, sizeof(ident_buf->media_serial));
 	}
 	ata_btrim(ident_buf->model, sizeof(ident_buf->model));
 	ata_bpack(ident_buf->model, ident_buf->model, sizeof(ident_buf->model));
@@ -1268,6 +1298,9 @@ ataidentify(struct cam_device *device, i
 	ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision));
 	ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
 	ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
+	ata_btrim(ident_buf->media_serial, sizeof(ident_buf->media_serial));
+	ata_bpack(ident_buf->media_serial, ident_buf->media_serial,
+	    sizeof(ident_buf->media_serial));
 
 	fprintf(stdout, "%s%d: ", device->device_name,
 		device->dev_unit_num);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:01:04 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id 1BB0E1065670;
	Tue, 17 Nov 2009 20:01:04 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: Kostik Belousov 
Date: Tue, 17 Nov 2009 15:00:49 -0500
User-Agent: KMail/1.6.2
References: <200911171924.nAHJOQIh032544@svn.freebsd.org>
	<200911171434.56358.jkim@FreeBSD.org>
	<20091117195008.GH2331@deviant.kiev.zoral.com.ua>
In-Reply-To: <20091117195008.GH2331@deviant.kiev.zoral.com.ua>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <200911171500.52995.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r199418 - head/sys/dev/syscons
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:01:04 -0000

On Tuesday 17 November 2009 02:50 pm, Kostik Belousov wrote:
> On Tue, Nov 17, 2009 at 02:34:54PM -0500, Jung-uk Kim wrote:
> > On Tuesday 17 November 2009 02:24 pm, Konstantin Belousov wrote:
> > > Author: kib
> > > Date: Tue Nov 17 19:24:26 2009
> > > New Revision: 199418
> > > URL: http://svn.freebsd.org/changeset/base/199418
> > >
> > > Log:
> > >   Fix pgsignal() call after signature change in r199355.
> > >
> > >   Reported and tested by:	bf1783 googlemail com
> > >   MFC after:	1 month
> > >
> > > Modified:
> > >   head/sys/dev/syscons/scvidctl.c
> > >
> > > Modified: head/sys/dev/syscons/scvidctl.c
> > > ===============================================================
> > >==== =========== --- head/sys/dev/syscons/scvidctl.c	Tue Nov 17
> > > 18:57:44 2009	(r199417) +++ head/sys/dev/syscons/scvidctl.c	Tue
> > > Nov 17 19:24:26 2009	(r199418) @@ -321,6 +321,7 @@
> > > sc_set_pixel_mode(scr_stat *scp, struct return ENODEV;
> > >  #else
> > >      video_info_t info;
> > > +    ksiginfo_t ksi;
> > >      u_char *font;
> > >      int prev_ysize;
> > >      int error;
> > > @@ -458,8 +459,11 @@ sc_set_pixel_mode(scr_stat *scp, struct
> > >  	tp->t_winsize.ws_col = scp->xsize;
> > >  	tp->t_winsize.ws_row = scp->ysize;
> > >  	if (tp->t_pgrp != NULL) {
> > > +	    ksiginfo_init(&ksi);
> > > +	    ksi.ksi_signo = SIGWINCH;
> > > +	    ksi.ksi_code = SI_KERNEL;
> > >  	    PGRP_LOCK(tp->t_pgrp);
> > > -	    pgsignal(tp->t_pgrp, SIGWINCH, 1);
> > > +	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
> > >  	    PGRP_UNLOCK(tp->t_pgrp);
> > >  	}
> > >      }
> >
> > Probably you wanted this:
> >
> > --- sys/dev/syscons/scvidctl.c
> > +++ sys/dev/syscons/scvidctl.c
> > @@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty
> > *tp, i return ENODEV;
> >  #else
> >      video_info_t info;
> > -    ksiginfo_t ksi;
> >      u_char *font;
> >      int prev_ysize;
> >      int error;
> > @@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty
> > *tp, i
> >
> >         || tp->t_winsize.ws_row != scp->ysize) {
> >
> >         tp->t_winsize.ws_col = scp->xsize;
> >         tp->t_winsize.ws_row = scp->ysize;
> > -       if (tp->t_pgrp != NULL) {
> > -           ksiginfo_init(&ksi);
> > -           ksi.ksi_signo = SIGWINCH;
> > -           ksi.ksi_code = SI_KERNEL;
> > -           PGRP_LOCK(tp->t_pgrp);
> > -           pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
> > -           PGRP_UNLOCK(tp->t_pgrp);
> > -       }
> > +
> > +       tty_signal_pgrp(tp, SIGWINCH);
> >      }
> >
> >      return 0;
> > -----------------------------------------------------------------
> >-
> >
> > In fact, it seems it was missed in r181905.
> >
> > Jung-uk Kim
>
> I do not think so, at least it needs further considerations.
> First, call to tty_signal_pgrp() requires locked tty.
> Second, tty_signal_pgrp() restores i/o processing on the terminal,
> 	tp->t_flags &= ~TF_STOPPED;
> that is not quite obviously right thing to do on SIGWINCH.

If so, r181905 is wrong, too:

http://svn.freebsd.org/viewvc/base/head/sys/dev/syscons/scvidctl.c?r1=181905&r2=181904&pathrev=181905

Jung-uk Kim

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:17:48 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85EE8106568B;
	Tue, 17 Nov 2009 20:17:48 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 72CE38FC15;
	Tue, 17 Nov 2009 20:17:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKHmtc035710;
	Tue, 17 Nov 2009 20:17:48 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKHm3T035706;
	Tue, 17 Nov 2009 20:17:48 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172017.nAHKHm3T035706@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:17:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199426 - in stable/8/sys: cam/ata conf modules/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:17:48 -0000

Author: mav
Date: Tue Nov 17 20:17:48 2009
New Revision: 199426
URL: http://svn.freebsd.org/changeset/base/199426

Log:
  MFC r198389:
  Move Port Multiplier support code out of ATA XPT into pmp periph driver.
  This is convinient, as PMP itself is a bus target and has own state.

Added:
  stable/8/sys/cam/ata/ata_pmp.c
     - copied unchanged from r198389, head/sys/cam/ata/ata_pmp.c
Modified:
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/conf/files
  stable/8/sys/modules/cam/Makefile
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Copied: stable/8/sys/cam/ata/ata_pmp.c (from r198389, head/sys/cam/ata/ata_pmp.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/cam/ata/ata_pmp.c	Tue Nov 17 20:17:48 2009	(r199426, copy of r198389, head/sys/cam/ata/ata_pmp.c)
@@ -0,0 +1,735 @@
+/*-
+ * Copyright (c) 2009 Alexander Motin 
+ * 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,
+ *    without modification, immediately at the beginning of the file.
+ * 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 ``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 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$");
+
+#include 
+
+#ifdef _KERNEL
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#endif /* _KERNEL */
+
+#ifndef _KERNEL
+#include 
+#include 
+#endif /* _KERNEL */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#ifdef _KERNEL
+
+typedef enum {
+	PMP_STATE_NORMAL,
+	PMP_STATE_PORTS,
+	PMP_STATE_CONFIG,
+	PMP_STATE_RESET,
+	PMP_STATE_CONNECT,
+	PMP_STATE_CHECK,
+	PMP_STATE_CLEAR,
+	PMP_STATE_SCAN
+} pmp_state;
+
+typedef enum {
+	PMP_FLAG_SCTX_INIT	= 0x200
+} pmp_flags;
+
+typedef enum {
+	PMP_CCB_PROBE		= 0x01,
+} pmp_ccb_state;
+
+/* Offsets into our private area for storing information */
+#define ccb_state	ppriv_field0
+#define ccb_bp		ppriv_ptr1
+
+struct pmp_softc {
+	SLIST_ENTRY(pmp_softc)	links;
+	pmp_state		state;
+	pmp_flags		flags;
+	uint32_t		pm_pid;
+	uint32_t		pm_prv;
+	int			pm_ports;
+	int			pm_step;
+	int			pm_try;
+	int			found;
+	int			frozen;
+	union			ccb saved_ccb;
+	struct task		sysctl_task;
+	struct sysctl_ctx_list	sysctl_ctx;
+	struct sysctl_oid	*sysctl_tree;
+};
+
+static	periph_init_t	pmpinit;
+static	void		pmpasync(void *callback_arg, u_int32_t code,
+				struct cam_path *path, void *arg);
+static	void		pmpsysctlinit(void *context, int pending);
+static	periph_ctor_t	pmpregister;
+static	periph_dtor_t	pmpcleanup;
+static	periph_start_t	pmpstart;
+static	periph_oninv_t	pmponinvalidate;
+static	void		pmpdone(struct cam_periph *periph,
+			       union ccb *done_ccb);
+
+#ifndef PMP_DEFAULT_TIMEOUT
+#define PMP_DEFAULT_TIMEOUT 30	/* Timeout in seconds */
+#endif
+
+#ifndef	PMP_DEFAULT_RETRY
+#define	PMP_DEFAULT_RETRY	1
+#endif
+
+static int pmp_retry_count = PMP_DEFAULT_RETRY;
+static int pmp_default_timeout = PMP_DEFAULT_TIMEOUT;
+
+SYSCTL_NODE(_kern_cam, OID_AUTO, pmp, CTLFLAG_RD, 0,
+            "CAM Direct Access Disk driver");
+SYSCTL_INT(_kern_cam_pmp, OID_AUTO, retry_count, CTLFLAG_RW,
+           &pmp_retry_count, 0, "Normal I/O retry count");
+TUNABLE_INT("kern.cam.pmp.retry_count", &pmp_retry_count);
+SYSCTL_INT(_kern_cam_pmp, OID_AUTO, default_timeout, CTLFLAG_RW,
+           &pmp_default_timeout, 0, "Normal I/O timeout (in seconds)");
+TUNABLE_INT("kern.cam.pmp.default_timeout", &pmp_default_timeout);
+
+static struct periph_driver pmpdriver =
+{
+	pmpinit, "pmp",
+	TAILQ_HEAD_INITIALIZER(pmpdriver.units), /* generation */ 0
+};
+
+PERIPHDRIVER_DECLARE(pmp, pmpdriver);
+
+MALLOC_DEFINE(M_ATPMP, "ata_pmp", "ata_pmp buffers");
+
+static void
+pmpinit(void)
+{
+	cam_status status;
+
+	/*
+	 * Install a global async callback.  This callback will
+	 * receive async callbacks like "new device found".
+	 */
+	status = xpt_register_async(AC_FOUND_DEVICE, pmpasync, NULL, NULL);
+
+	if (status != CAM_REQ_CMP) {
+		printf("pmp: Failed to attach master async callback "
+		       "due to status 0x%x!\n", status);
+	}
+}
+
+static void
+pmpfreeze(struct cam_periph *periph, int mask)
+{
+	struct pmp_softc *softc = (struct pmp_softc *)periph->softc;
+	struct cam_path *dpath;
+	int i;
+
+	mask &= ~softc->frozen;
+	for (i = 0; i < 15; i++) {
+		if ((mask & (1 << i)) == 0)
+			continue;
+		if (xpt_create_path(&dpath, periph,
+		    xpt_path_path_id(periph->path),
+		    i, 0) == CAM_REQ_CMP) {
+printf("PMP freeze: %d\n", i);
+			softc->frozen |= (1 << i);
+			cam_freeze_devq(dpath);
+			xpt_free_path(dpath);
+		}
+	}
+}
+
+static void
+pmprelease(struct cam_periph *periph, int mask)
+{
+	struct pmp_softc *softc = (struct pmp_softc *)periph->softc;
+	struct cam_path *dpath;
+	int i;
+
+	mask &= softc->frozen;
+	for (i = 0; i < 15; i++) {
+		if ((mask & (1 << i)) == 0)
+			continue;
+		if (xpt_create_path(&dpath, periph,
+		    xpt_path_path_id(periph->path),
+		    i, 0) == CAM_REQ_CMP) {
+printf("PMP release: %d\n", i);
+			softc->frozen &= ~(1 << i);
+			cam_release_devq(dpath, 0, 0, 0, FALSE);
+			xpt_free_path(dpath);
+		}
+	}
+}
+
+static void
+pmponinvalidate(struct cam_periph *periph)
+{
+	struct pmp_softc *softc;
+	struct cam_path *dpath;
+	int i;
+
+	softc = (struct pmp_softc *)periph->softc;
+
+	/*
+	 * De-register any async callbacks.
+	 */
+	xpt_register_async(0, pmpasync, periph, periph->path);
+
+	for (i = 0; i < 15; i++) {
+		if (xpt_create_path(&dpath, periph,
+		    xpt_path_path_id(periph->path),
+		    i, 0) == CAM_REQ_CMP) {
+			xpt_async(AC_LOST_DEVICE, dpath, NULL);
+			xpt_free_path(dpath);
+		}
+	}
+	xpt_print(periph->path, "lost device\n");
+}
+
+static void
+pmpcleanup(struct cam_periph *periph)
+{
+	struct pmp_softc *softc;
+
+	softc = (struct pmp_softc *)periph->softc;
+
+	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_unlock(periph);
+
+	/*
+	 * If we can't free the sysctl tree, oh well...
+	 */
+	if ((softc->flags & PMP_FLAG_SCTX_INIT) != 0
+	    && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
+		xpt_print(periph->path, "can't remove sysctl context\n");
+	}
+
+	free(softc, M_DEVBUF);
+	cam_periph_lock(periph);
+}
+
+static void
+pmpasync(void *callback_arg, u_int32_t code,
+	struct cam_path *path, void *arg)
+{
+	struct cam_periph *periph;
+	struct pmp_softc *softc;
+
+	periph = (struct cam_periph *)callback_arg;
+	switch (code) {
+	case AC_FOUND_DEVICE:
+	{
+		struct ccb_getdev *cgd;
+		cam_status status;
+ 
+		cgd = (struct ccb_getdev *)arg;
+		if (cgd == NULL)
+			break;
+
+		if (cgd->protocol != PROTO_SATAPM)
+			break;
+
+		/*
+		 * Allocate a peripheral instance for
+		 * this device and start the probe
+		 * process.
+		 */
+		status = cam_periph_alloc(pmpregister, pmponinvalidate,
+					  pmpcleanup, pmpstart,
+					  "pmp", CAM_PERIPH_BIO,
+					  cgd->ccb_h.path, pmpasync,
+					  AC_FOUND_DEVICE, cgd);
+
+		if (status != CAM_REQ_CMP
+		 && status != CAM_REQ_INPROG)
+			printf("pmpasync: Unable to attach to new device "
+				"due to status 0x%x\n", status);
+		break;
+	}
+	case AC_SCSI_AEN:
+	case AC_SENT_BDR:
+	case AC_BUS_RESET:
+		softc = (struct pmp_softc *)periph->softc;
+		cam_periph_async(periph, code, path, arg);
+		if (softc->state != PMP_STATE_NORMAL)
+			break;
+		pmpfreeze(periph, softc->found);
+		if (code == AC_SENT_BDR || code == AC_BUS_RESET)
+			softc->found = 0; /* We have to reset everything. */
+		softc->state = PMP_STATE_PORTS;
+		cam_periph_acquire(periph);
+		xpt_schedule(periph, CAM_PRIORITY_DEV);
+		break;
+	default:
+		cam_periph_async(periph, code, path, arg);
+		break;
+	}
+}
+
+static void
+pmpsysctlinit(void *context, int pending)
+{
+	struct cam_periph *periph;
+	struct pmp_softc *softc;
+	char tmpstr[80], tmpstr2[80];
+
+	periph = (struct cam_periph *)context;
+	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+		return;
+
+	softc = (struct pmp_softc *)periph->softc;
+	snprintf(tmpstr, sizeof(tmpstr), "CAM PMP unit %d", periph->unit_number);
+	snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
+
+	sysctl_ctx_init(&softc->sysctl_ctx);
+	softc->flags |= PMP_FLAG_SCTX_INIT;
+	softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
+		SYSCTL_STATIC_CHILDREN(_kern_cam_pmp), OID_AUTO, tmpstr2,
+		CTLFLAG_RD, 0, tmpstr);
+	if (softc->sysctl_tree == NULL) {
+		printf("pmpsysctlinit: unable to allocate sysctl tree\n");
+		cam_periph_release(periph);
+		return;
+	}
+
+	cam_periph_release(periph);
+}
+
+static cam_status
+pmpregister(struct cam_periph *periph, void *arg)
+{
+	struct pmp_softc *softc;
+	struct ccb_pathinq cpi;
+	struct ccb_getdev *cgd;
+
+	cgd = (struct ccb_getdev *)arg;
+	if (periph == NULL) {
+		printf("pmpregister: periph was NULL!!\n");
+		return(CAM_REQ_CMP_ERR);
+	}
+
+	if (cgd == NULL) {
+		printf("pmpregister: no getdev CCB, can't register device\n");
+		return(CAM_REQ_CMP_ERR);
+	}
+
+	softc = (struct pmp_softc *)malloc(sizeof(*softc), M_DEVBUF,
+	    M_NOWAIT|M_ZERO);
+
+	if (softc == NULL) {
+		printf("pmpregister: Unable to probe new device. "
+		       "Unable to allocate softc\n");				
+		return(CAM_REQ_CMP_ERR);
+	}
+	periph->softc = softc;
+
+	softc->state = PMP_STATE_PORTS;
+	softc->pm_pid = ((uint32_t *)&cgd->ident_data)[0];
+	softc->pm_prv = ((uint32_t *)&cgd->ident_data)[1];
+
+	/* Check if the SIM does not want queued commands */
+	bzero(&cpi, sizeof(cpi));
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
+	cpi.ccb_h.func_code = XPT_PATH_INQ;
+	xpt_action((union ccb *)&cpi);
+
+	TASK_INIT(&softc->sysctl_task, 0, pmpsysctlinit, periph);
+
+	xpt_announce_periph(periph, NULL);
+
+	/*
+	 * Add async callbacks for bus reset and
+	 * bus device reset calls.  I don't bother
+	 * checking if this fails as, in most cases,
+	 * the system will function just fine without
+	 * them and the only alternative would be to
+	 * not attach the device on failure.
+	 */
+	xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE |
+		AC_SCSI_AEN, pmpasync, periph, periph->path);
+
+	/*
+	 * Take an exclusive refcount on the periph while pmpstart is called
+	 * to finish the probe.  The reference will be dropped in pmpdone at
+	 * the end of probe.
+	 */
+	(void)cam_periph_acquire(periph);
+	xpt_schedule(periph, CAM_PRIORITY_DEV);
+
+	return(CAM_REQ_CMP);
+}
+
+static void
+pmpstart(struct cam_periph *periph, union ccb *start_ccb)
+{
+	struct ccb_ataio *ataio;
+	struct pmp_softc *softc;
+
+	softc = (struct pmp_softc *)periph->softc;
+	ataio = &start_ccb->ataio;
+
+	switch (softc->state) {
+	case PMP_STATE_PORTS:
+		cam_fill_ataio(ataio,
+		      pmp_retry_count,
+		      pmpdone,
+		      /*flags*/CAM_DIR_NONE,
+		      0,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      pmp_default_timeout * 1000);
+		ata_pm_read_cmd(ataio, 2, 15);
+		break;
+	case PMP_STATE_CONFIG:
+		cam_fill_ataio(ataio,
+		      pmp_retry_count,
+		      pmpdone,
+		      /*flags*/CAM_DIR_NONE,
+		      0,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      pmp_default_timeout * 1000);
+		ata_pm_write_cmd(ataio, 0x60, 15, 0xf);
+		break;
+	case PMP_STATE_RESET:
+		cam_fill_ataio(ataio,
+		      pmp_retry_count,
+		      pmpdone,
+		      /*flags*/CAM_DIR_NONE,
+		      0,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      pmp_default_timeout * 1000);
+		ata_pm_write_cmd(ataio, 2, softc->pm_step,
+		    (softc->found & (1 << softc->pm_step)) ? 0 : 1);
+printf("PM RESET %d%s\n", softc->pm_step,
+    (softc->found & (1 << softc->pm_step)) ? " skipping" : "");
+		break;
+	case PMP_STATE_CONNECT:
+		cam_fill_ataio(ataio,
+		      pmp_retry_count,
+		      pmpdone,
+		      /*flags*/CAM_DIR_NONE,
+		      0,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      pmp_default_timeout * 1000);
+		ata_pm_write_cmd(ataio, 2, softc->pm_step, 0);
+		break;
+	case PMP_STATE_CHECK:
+		cam_fill_ataio(ataio,
+		      pmp_retry_count,
+		      pmpdone,
+		      /*flags*/CAM_DIR_NONE,
+		      0,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      pmp_default_timeout * 1000);
+		ata_pm_read_cmd(ataio, 0, softc->pm_step);
+		break;
+	case PMP_STATE_CLEAR:
+		cam_fill_ataio(ataio,
+		      pmp_retry_count,
+		      pmpdone,
+		      /*flags*/CAM_DIR_NONE,
+		      0,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      pmp_default_timeout * 1000);
+		ata_pm_write_cmd(ataio, 1, softc->pm_step, 0xFFFFFFFF);
+		break;
+	default:
+		break;
+	}
+	xpt_action(start_ccb);
+}
+
+static void
+pmpdone(struct cam_periph *periph, union ccb *done_ccb)
+{
+	struct pmp_softc *softc;
+	struct ccb_ataio *ataio;
+	union ccb *work_ccb;
+	struct cam_path *path, *dpath;
+	u_int32_t  priority;
+
+	softc = (struct pmp_softc *)periph->softc;
+	ataio = &done_ccb->ataio;
+
+	CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("pmpdone\n"));
+
+	path = done_ccb->ccb_h.path;
+	priority = done_ccb->ccb_h.pinfo.priority;
+
+	switch (softc->state) {
+	case PMP_STATE_PORTS:
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+			softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) +
+			    (done_ccb->ataio.res.lba_mid << 16) +
+			    (done_ccb->ataio.res.lba_low << 8) +
+			    done_ccb->ataio.res.sector_count;
+			/* This PM declares 6 ports, while only 5 of them are real.
+			 * Port 5 is enclosure management bridge port, which has implementation
+			 * problems, causing probe faults. Hide it for now. */
+			if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6)
+				softc->pm_ports = 5;
+			/* This PM declares 7 ports, while only 5 of them are real.
+			 * Port 5 is some fake "Config  Disk" with 640 sectors size,
+			 * port 6 is enclosure management bridge port.
+			 * Both fake ports has implementation problems, causing
+			 * probe faults. Hide them for now. */
+			if (softc->pm_pid == 0x47261095 && softc->pm_ports == 7)
+				softc->pm_ports = 5;
+			printf("PM ports: %d\n", softc->pm_ports);
+			softc->state = PMP_STATE_CONFIG;
+			xpt_release_ccb(done_ccb);
+			xpt_schedule(periph, priority);
+			return;
+		} else if (cam_periph_error(done_ccb, 0, 0,
+					    &softc->saved_ccb) == ERESTART) {
+			return;
+		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+				cam_release_devq(done_ccb->ccb_h.path,
+						 /*relsim_flags*/0,
+						 /*reduction*/0,
+						 /*timeout*/0,
+						 /*getcount_only*/0);
+		}
+		xpt_release_ccb(done_ccb);
+		break;
+	case PMP_STATE_CONFIG:
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+			softc->pm_step = 0;
+			softc->state = PMP_STATE_RESET;
+			xpt_release_ccb(done_ccb);
+			xpt_schedule(periph, priority);
+			return;
+		} else if (cam_periph_error(done_ccb, 0, 0,
+					    &softc->saved_ccb) == ERESTART) {
+			return;
+		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+				cam_release_devq(done_ccb->ccb_h.path,
+						 /*relsim_flags*/0,
+						 /*reduction*/0,
+						 /*timeout*/0,
+						 /*getcount_only*/0);
+		}
+		xpt_release_ccb(done_ccb);
+		break;
+	case PMP_STATE_RESET:
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+			softc->pm_step++;
+			if (softc->pm_step < softc->pm_ports) {
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			} else {
+				softc->pm_step = 0;
+				DELAY(5000);
+				printf("PM reset done\n");
+				softc->state = PMP_STATE_CONNECT;
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			}
+		} else if (cam_periph_error(done_ccb, 0, 0,
+					    &softc->saved_ccb) == ERESTART) {
+			return;
+		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+				cam_release_devq(done_ccb->ccb_h.path,
+						 /*relsim_flags*/0,
+						 /*reduction*/0,
+						 /*timeout*/0,
+						 /*getcount_only*/0);
+		}
+		xpt_release_ccb(done_ccb);
+		break;
+	case PMP_STATE_CONNECT:
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+			softc->pm_step++;
+			if (softc->pm_step < softc->pm_ports) {
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			} else {
+				softc->pm_step = 0;
+				softc->pm_try = 0;
+				printf("PM connect done\n");
+				softc->state = PMP_STATE_CHECK;
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			}
+		} else if (cam_periph_error(done_ccb, 0, 0,
+					    &softc->saved_ccb) == ERESTART) {
+			return;
+		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+				cam_release_devq(done_ccb->ccb_h.path,
+						 /*relsim_flags*/0,
+						 /*reduction*/0,
+						 /*timeout*/0,
+						 /*getcount_only*/0);
+		}
+		xpt_release_ccb(done_ccb);
+		break;
+	case PMP_STATE_CHECK:
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+			int res = (done_ccb->ataio.res.lba_high << 24) +
+			    (done_ccb->ataio.res.lba_mid << 16) +
+			    (done_ccb->ataio.res.lba_low << 8) +
+			    done_ccb->ataio.res.sector_count;
+			if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) {
+				printf("PM status: %d - %08x\n", softc->pm_step, res);
+				softc->found |= (1 << softc->pm_step);
+				softc->pm_step++;
+			} else {
+				if (softc->pm_try < 100) {
+					DELAY(10000);
+					softc->pm_try++;
+				} else {
+					printf("PM status: %d - %08x\n", softc->pm_step, res);
+					softc->found &= ~(1 << softc->pm_step);
+					if (xpt_create_path(&dpath, periph,
+					    done_ccb->ccb_h.path_id,
+					    softc->pm_step, 0) == CAM_REQ_CMP) {
+						xpt_async(AC_LOST_DEVICE, dpath, NULL);
+						xpt_free_path(dpath);
+					}
+					softc->pm_step++;
+				}
+			}
+			if (softc->pm_step < softc->pm_ports) {
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			} else {
+				softc->pm_step = 0;
+				softc->state = PMP_STATE_CLEAR;
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			}
+		} else if (cam_periph_error(done_ccb, 0, 0,
+					    &softc->saved_ccb) == ERESTART) {
+			return;
+		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+				cam_release_devq(done_ccb->ccb_h.path,
+						 /*relsim_flags*/0,
+						 /*reduction*/0,
+						 /*timeout*/0,
+						 /*getcount_only*/0);
+		}
+		xpt_release_ccb(done_ccb);
+		break;
+	case PMP_STATE_CLEAR:
+		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+			softc->pm_step++;
+			if (softc->pm_step < softc->pm_ports) {
+				xpt_release_ccb(done_ccb);
+				xpt_schedule(periph, priority);
+				return;
+			} else if (softc->found) {
+				softc->pm_step = 0;
+				softc->state = PMP_STATE_SCAN;
+				work_ccb = xpt_alloc_ccb_nowait();
+				if (work_ccb != NULL)
+					goto do_scan;
+				xpt_release_ccb(done_ccb);
+			}
+			break;
+		} else if (cam_periph_error(done_ccb, 0, 0,
+					    &softc->saved_ccb) == ERESTART) {
+			return;
+		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+				cam_release_devq(done_ccb->ccb_h.path,
+						 /*relsim_flags*/0,
+						 /*reduction*/0,
+						 /*timeout*/0,
+						 /*getcount_only*/0);
+		}
+		xpt_release_ccb(done_ccb);
+		break;
+	case PMP_STATE_SCAN:
+		work_ccb = done_ccb;
+		done_ccb = (union ccb*)work_ccb->ccb_h.ppriv_ptr0;
+		/* Free the current request path- we're done with it. */
+		xpt_free_path(work_ccb->ccb_h.path);
+		softc->pm_step++;
+do_scan:
+		while (softc->pm_step < softc->pm_ports &&
+		    (softc->found & (1 << softc->pm_step)) == 0) {
+			softc->pm_step++;
+		}
+		if (softc->pm_step >= softc->pm_ports) {
+			xpt_free_ccb(work_ccb);
+			xpt_release_ccb(done_ccb);
+			break;
+		}
+		if (xpt_create_path(&dpath, periph,
+		    done_ccb->ccb_h.path_id,
+		    softc->pm_step, 0) != CAM_REQ_CMP) {
+			printf("pmpdone: xpt_create_path failed"
+			    ", bus scan halted\n");
+			xpt_free_ccb(work_ccb);
+			xpt_release_ccb(done_ccb);
+			break;
+		}
+		xpt_setup_ccb(&work_ccb->ccb_h, dpath,
+		    done_ccb->ccb_h.pinfo.priority);
+		work_ccb->ccb_h.func_code = XPT_SCAN_LUN;
+		work_ccb->ccb_h.cbfcnp = pmpdone;
+		work_ccb->ccb_h.ppriv_ptr0 = done_ccb;
+		work_ccb->crcn.flags = done_ccb->crcn.flags;
+		xpt_action(work_ccb);
+		pmprelease(periph, 1 << softc->pm_step);
+		return;
+	default:
+		break;
+	}
+	softc->state = PMP_STATE_NORMAL;
+	pmprelease(periph, -1);
+	cam_periph_release_locked(periph);
+}
+
+#endif /* _KERNEL */

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 19:52:51 2009	(r199425)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 20:17:48 2009	(r199426)
@@ -96,11 +96,6 @@ typedef enum {
 	PROBE_FULL_INQUIRY,
 	PROBE_PM_PID,
 	PROBE_PM_PRV,
-	PROBE_PM_PORTS,
-	PROBE_PM_RESET,
-	PROBE_PM_CONNECT,
-	PROBE_PM_CHECK,
-	PROBE_PM_CLEAR,
 	PROBE_INVALID
 } probe_action;
 
@@ -112,11 +107,6 @@ static char *probe_action_text[] = {
 	"PROBE_FULL_INQUIRY",
 	"PROBE_PM_PID",
 	"PROBE_PM_PRV",
-	"PROBE_PM_PORTS",
-	"PROBE_PM_RESET",
-	"PROBE_PM_CONNECT",
-	"PROBE_PM_CHECK",
-	"PROBE_PM_CLEAR",
 	"PROBE_INVALID"
 };
 
@@ -142,9 +132,6 @@ typedef struct {
 	u_int8_t	digest[16];
 	uint32_t	pm_pid;
 	uint32_t	pm_prv;
-	int		pm_ports;
-	int		pm_step;
-	int		pm_try;
 	struct cam_periph *periph;
 } probe_softc;
 
@@ -274,10 +261,9 @@ probeschedule(struct cam_periph *periph)
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
-	if (periph->path->device->flags & CAM_DEV_UNCONFIGURED)
+	if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) ||
+	    periph->path->device->protocol == PROTO_SATAPM)
 		PROBE_SET_ACTION(softc, PROBE_RESET);
-	else if (periph->path->device->protocol == PROTO_SATAPM)
-		PROBE_SET_ACTION(softc, PROBE_PM_PID);
 	else
 		PROBE_SET_ACTION(softc, PROBE_IDENTIFY);
 
@@ -295,7 +281,6 @@ probestart(struct cam_periph *periph, un
 	/* Probe the device that our peripheral driver points to */
 	struct ccb_ataio *ataio;
 	struct ccb_scsiio *csio;
-	struct ccb_trans_settings cts;
 	probe_softc *softc;
 
 	CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probestart\n"));
@@ -306,21 +291,11 @@ probestart(struct cam_periph *periph, un
 
 	switch (softc->action) {
 	case PROBE_RESET:
-		if (start_ccb->ccb_h.target_id == 15) {
-			/* Report SIM that we have no knowledge about PM presence. */
-			bzero(&cts, sizeof(cts));
-			xpt_setup_ccb(&cts.ccb_h, start_ccb->ccb_h.path, 1);
-			cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
-			cts.type = CTS_TYPE_CURRENT_SETTINGS;
-			cts.xport_specific.sata.pm_present = 0;
-			cts.xport_specific.sata.valid = CTS_SATA_VALID_PM;
-			xpt_action((union ccb *)&cts);
-		}
 		cam_fill_ataio(ataio,
 		      0,
 		      probedone,
 		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
+		      0,
 		      /*data_ptr*/NULL,
 		      /*dxfer_len*/0,
 		      (start_ccb->ccb_h.target_id == 15 ? 3 : 15) * 1000);
@@ -351,7 +326,7 @@ probestart(struct cam_periph *periph, un
 		      1,
 		      probedone,
 		      /*flags*/CAM_DIR_IN,
-		      MSG_SIMPLE_Q_TAG,
+		      0,
 		      /*data_ptr*/(u_int8_t *)ident_buf,
 		      /*dxfer_len*/sizeof(struct ata_params),
 		      30 * 1000);
@@ -413,7 +388,7 @@ probestart(struct cam_periph *periph, un
 		      1,
 		      probedone,
 		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
+		      0,
 		      /*data_ptr*/NULL,
 		      /*dxfer_len*/0,
 		      10 * 1000);
@@ -424,74 +399,12 @@ probestart(struct cam_periph *periph, un
 		      1,
 		      probedone,
 		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
+		      0,
 		      /*data_ptr*/NULL,
 		      /*dxfer_len*/0,
 		      10 * 1000);
 		ata_pm_read_cmd(ataio, 1, 15);
 		break;
-	case PROBE_PM_PORTS:
-		cam_fill_ataio(ataio,
-		      1,
-		      probedone,
-		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
-		      /*data_ptr*/NULL,
-		      /*dxfer_len*/0,
-		      10 * 1000);
-		ata_pm_read_cmd(ataio, 2, 15);
-		break;
-	case PROBE_PM_RESET:
-	{
-		struct ata_params *ident_buf =
-		    &periph->path->device->ident_data;
-		cam_fill_ataio(ataio,
-		      1,
-		      probedone,
-		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
-		      /*data_ptr*/NULL,
-		      /*dxfer_len*/0,
-		      10 * 1000);
-		ata_pm_write_cmd(ataio, 2, softc->pm_step,
-		    (ident_buf->cylinders & (1 << softc->pm_step)) ? 0 : 1);
-printf("PM RESET %d %04x %d\n", softc->pm_step, ident_buf->cylinders,
-    (ident_buf->cylinders & (1 << softc->pm_step)) ? 0 : 1);
-		break;
-	}
-	case PROBE_PM_CONNECT:
-		cam_fill_ataio(ataio,
-		      1,
-		      probedone,
-		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
-		      /*data_ptr*/NULL,
-		      /*dxfer_len*/0,
-		      10 * 1000);
-		ata_pm_write_cmd(ataio, 2, softc->pm_step, 0);
-		break;
-	case PROBE_PM_CHECK:
-		cam_fill_ataio(ataio,
-		      1,
-		      probedone,
-		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
-		      /*data_ptr*/NULL,
-		      /*dxfer_len*/0,
-		      10 * 1000);
-		ata_pm_read_cmd(ataio, 0, softc->pm_step);
-		break;
-	case PROBE_PM_CLEAR:
-		cam_fill_ataio(ataio,
-		      1,
-		      probedone,
-		      /*flags*/CAM_DIR_NONE,
-		      MSG_SIMPLE_Q_TAG,
-		      /*data_ptr*/NULL,
-		      /*dxfer_len*/0,
-		      10 * 1000);
-		ata_pm_write_cmd(ataio, 1, softc->pm_step, 0xFFFFFFFF);
-		break;
 	case PROBE_INVALID:
 		CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_INFO,
 		    ("probestart: invalid action state\n"));
@@ -630,7 +543,7 @@ probedone(struct cam_periph *periph, uni
 	probe_softc *softc;
 	struct cam_path *path;
 	u_int32_t  priority;
-	int found = 0;
+	int found = 1;
 
 	CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n"));
 
@@ -672,8 +585,7 @@ probedone(struct cam_periph *periph, uni
 					xpt_print(path,
 					    "Unexpected signature 0x%04x\n", sign);
 				}
-				xpt_release_ccb(done_ccb);
-				break;
+				goto device_fail;
 			}
 			xpt_release_ccb(done_ccb);
 			xpt_schedule(periph, priority);
@@ -780,9 +692,8 @@ device_fail:
 		 * drivers that this device is no more.
 		 */
 		if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
-			/* Send the async notification. */
 			xpt_async(AC_LOST_DEVICE, path, NULL);
-
+		found = 0;
 		xpt_release_ccb(done_ccb);
 		break;
 	}
@@ -881,6 +792,7 @@ modedone:		if (path->device->protocol ==
 			    (done_ccb->ataio.res.lba_mid << 16) +
 			    (done_ccb->ataio.res.lba_low << 8) +
 			    done_ccb->ataio.res.sector_count;
+			((uint32_t *)ident_buf)[0] = softc->pm_pid;
 			printf("PM Product ID: %08x\n", softc->pm_pid);
 			snprintf(ident_buf->model, sizeof(ident_buf->model),
 			    "Port Multiplier %08x", softc->pm_pid);
@@ -903,164 +815,24 @@ modedone:		if (path->device->protocol ==
 			    (done_ccb->ataio.res.lba_mid << 16) +
 			    (done_ccb->ataio.res.lba_low << 8) +
 			    done_ccb->ataio.res.sector_count;
+			((uint32_t *)ident_buf)[1] = softc->pm_prv;
 			printf("PM Revision: %08x\n", softc->pm_prv);
 			snprintf(ident_buf->revision, sizeof(ident_buf->revision),
 			    "%04x", softc->pm_prv);
-			PROBE_SET_ACTION(softc, PROBE_PM_PORTS);
-			xpt_release_ccb(done_ccb);
-			xpt_schedule(periph, priority);
-			return;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-			/* Don't wedge the queue */
-			xpt_release_devq(done_ccb->ccb_h.path, /*count*/1,
-					 /*run_queue*/TRUE);
-		}
-		goto device_fail;
-	case PROBE_PM_PORTS:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) +
-			    (done_ccb->ataio.res.lba_mid << 16) +
-			    (done_ccb->ataio.res.lba_low << 8) +
-			    done_ccb->ataio.res.sector_count;
-			/* This PM declares 6 ports, while only 5 of them are real.
-			 * Port 5 is enclosure management bridge port, which has implementation
-			 * problems, causing probe faults. Hide it for now. */
-			if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6)
-				softc->pm_ports = 5;
-			/* This PM declares 7 ports, while only 5 of them are real.
-			 * Port 5 is some fake "Config  Disk" with 640 sectors size,
-			 * port 6 is enclosure management bridge port.
-			 * Both fake ports has implementation problems, causing
-			 * probe faults. Hide them for now. */
-			if (softc->pm_pid == 0x47261095 && softc->pm_ports == 7)
-				softc->pm_ports = 5;
-			printf("PM ports: %d\n", softc->pm_ports);
-			ident_buf->config = softc->pm_ports;
 			path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
-			softc->pm_step = 0;
-			PROBE_SET_ACTION(softc, PROBE_PM_RESET);
-			xpt_release_ccb(done_ccb);
-			xpt_schedule(periph, priority);
-			return;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:19:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1058106568D;
	Tue, 17 Nov 2009 20:19:20 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C05C08FC12;
	Tue, 17 Nov 2009 20:19:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKJKYV035804;
	Tue, 17 Nov 2009 20:19:20 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKJK4Y035802;
	Tue, 17 Nov 2009 20:19:20 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172019.nAHKJK4Y035802@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:19:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199427 - stable/8/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:19:20 -0000

Author: mav
Date: Tue Nov 17 20:19:20 2009
New Revision: 199427
URL: http://svn.freebsd.org/changeset/base/199427

Log:
  MFC r198390:
  Revert interrupt reason check order back.
  ATAPI errors may set IF bit together with TFE.

Modified:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 20:17:48 2009	(r199426)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 20:19:20 2009	(r199427)
@@ -1001,12 +1001,7 @@ ahci_ch_intr(void *data)
 			/* XXX: reqests in loading state. */
 			if (((err >> i) & 1) == 0)
 				continue;
-			if (istatus & AHCI_P_IX_IF) {
-				if (ch->numtslots == 0 && i != ccs)
-					et = AHCI_ERR_INNOCENT;
-				else
-					et = AHCI_ERR_SATA;
-			} else if (istatus & AHCI_P_IX_TFE) {
+			if (istatus & AHCI_P_IX_TFE) {
 				/* Task File Error */
 				if (ch->numtslots == 0) {
 					/* Untagged operation. */
@@ -1019,6 +1014,11 @@ ahci_ch_intr(void *data)
 					et = AHCI_ERR_NCQ;
 					ncq_err = 1;
 				}
+			} else if (istatus & AHCI_P_IX_IF) {
+				if (ch->numtslots == 0 && i != ccs)
+					et = AHCI_ERR_INNOCENT;
+				else
+					et = AHCI_ERR_SATA;
 			} else
 				et = AHCI_ERR_INVALID;
 			ahci_end_transaction(&ch->slot[i], et);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:20:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A5FB9106566C;
	Tue, 17 Nov 2009 20:20:56 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B88D8FC1A;
	Tue, 17 Nov 2009 20:20:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKKuOX035975;
	Tue, 17 Nov 2009 20:20:56 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKKugd035973;
	Tue, 17 Nov 2009 20:20:56 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172020.nAHKKugd035973@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:20:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199428 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:20:56 -0000

Author: mav
Date: Tue Nov 17 20:20:56 2009
New Revision: 199428
URL: http://svn.freebsd.org/changeset/base/199428

Log:
  MFC r198394:
  Make "Retrying Command" to be printed before actual retrying.
  It should make debug/error log a bit more readable.

Modified:
  stable/8/sys/cam/cam_periph.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Tue Nov 17 20:19:20 2009	(r199427)
+++ stable/8/sys/cam/cam_periph.c	Tue Nov 17 20:20:56 2009	(r199428)
@@ -1767,16 +1767,27 @@ cam_periph_error(union ccb *ccb, cam_fla
 		break;
 	}
 
+	/*
+	 * If we have and error and are booting verbosely, whine
+	 * *unless* this was a non-retryable selection timeout.
+	 */
+	if (error != 0 && bootverbose &&
+	    !(status == CAM_SEL_TIMEOUT && (camflags & CAM_RETRY_SELTO) == 0)) {
+		if (error != ERESTART) {
+			if (action_string == NULL)
+				action_string = "Unretryable Error";
+			xpt_print(ccb->ccb_h.path, "error %d\n", error);
+			xpt_print(ccb->ccb_h.path, "%s\n", action_string);
+		} else
+			xpt_print(ccb->ccb_h.path, "Retrying Command\n");
+	}
+
 	/* Attempt a retry */
-	if (error == ERESTART || error == 0) {	
+	if (error == ERESTART || error == 0) {
 		if (frozen != 0)
 			ccb->ccb_h.status &= ~CAM_DEV_QFRZN;
-
-		if (error == ERESTART) {
-			action_string = "Retrying Command";
+		if (error == ERESTART)
 			xpt_action(ccb);
-		}
-		
 		if (frozen != 0)
 			cam_release_devq(ccb->ccb_h.path,
 					 relsim_flags,
@@ -1785,21 +1796,5 @@ cam_periph_error(union ccb *ccb, cam_fla
 					 /*getcount_only*/0);
 	}
 
-	/*
-	 * If we have and error and are booting verbosely, whine
-	 * *unless* this was a non-retryable selection timeout.
-	 */
-	if (error != 0 && bootverbose &&
-	    !(status == CAM_SEL_TIMEOUT && (camflags & CAM_RETRY_SELTO) == 0)) {
-
-
-		if (action_string == NULL)
-			action_string = "Unretryable Error";
-		if (error != ERESTART) {
-			xpt_print(ccb->ccb_h.path, "error %d\n", error);
-		}
-		xpt_print(ccb->ccb_h.path, "%s\n", action_string);
-	}
-
 	return (error);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:35:30 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0E3C1065693;
	Tue, 17 Nov 2009 20:35:30 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EB38C8FC1F;
	Tue, 17 Nov 2009 20:35:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKZTu2036683;
	Tue, 17 Nov 2009 20:35:29 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKZTjL036681;
	Tue, 17 Nov 2009 20:35:29 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172035.nAHKZTjL036681@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:35:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199429 - stable/8/sys/dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:35:30 -0000

Author: mav
Date: Tue Nov 17 20:35:29 2009
New Revision: 199429
URL: http://svn.freebsd.org/changeset/base/199429

Log:
  MFC r198426:
  Reimplement device reset sequence in more controller-specific way.

Modified:
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 20:20:56 2009	(r199428)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 20:35:29 2009	(r199429)
@@ -80,7 +80,6 @@ static void siis_portinit(device_t dev);
 static int siis_wait_ready(device_t dev, int t);
 
 static int siis_sata_connect(struct siis_channel *ch);
-static int siis_sata_phy_reset(device_t dev);
 
 static void siis_issue_read_log(device_t dev);
 static void siis_process_read_log(device_t dev, union ccb *ccb);
@@ -1250,16 +1249,27 @@ siis_portinit(device_t dev)
 	siis_wait_ready(dev, 1000);
 }
 
-#if 0
-static void
+static int
 siis_devreset(device_t dev)
 {
 	struct siis_channel *ch = device_get_softc(dev);
+	int timeout = 0;
+	uint32_t val;
 
 	ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_DEV_RESET);
-	siis_wait_ready(dev, 1000);
+	while (((val = ATA_INL(ch->r_mem, SIIS_P_STS)) &
+	    SIIS_P_CTL_DEV_RESET) != 0) {
+		DELAY(1000);
+		if (timeout++ > 100) {
+			device_printf(dev, "device reset stuck (timeout %dms) "
+			    "status = %08x\n", timeout, val);
+			return (EBUSY);
+		}
+	}
+	if (bootverbose)
+		device_printf(dev, "device reset time=%dms\n", timeout);
+	return (0);
 }
-#endif
 
 static int
 siis_wait_ready(device_t dev, int t)
@@ -1287,6 +1297,7 @@ siis_reset(device_t dev)
 {
 	struct siis_channel *ch = device_get_softc(dev);
 	int i;
+	uint32_t val;
 
 	if (bootverbose)
 		device_printf(dev, "SIIS reset...\n");
@@ -1303,10 +1314,7 @@ siis_reset(device_t dev)
 		}
 		xpt_done(fccb);
 	}
-	/* Disable port interrupts */
-	ATA_OUTL(ch->r_mem, SIIS_P_IECLR, 0x0000FFFF);
-	/* Kill the engine and requeue all running commands. */
-	siis_portinit(dev);
+	/* Requeue all running commands. */
 	for (i = 0; i < SIIS_MAX_SLOTS; i++) {
 		/* Do we have a running request on slot? */
 		if (ch->slot[i].state < SIIS_SLOT_RUNNING)
@@ -1314,8 +1322,23 @@ siis_reset(device_t dev)
 		/* XXX; Commands in loading state. */
 		siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT);
 	}
+	/* Disable port interrupts */
+	ATA_OUTL(ch->r_mem, SIIS_P_IECLR, 0x0000FFFF);
+	/* Set speed limit. */
+	if (ch->sata_rev == 1)
+		val = ATA_SC_SPD_SPEED_GEN1;
+	else if (ch->sata_rev == 2)
+		val = ATA_SC_SPD_SPEED_GEN2;
+	else if (ch->sata_rev == 3)
+		val = ATA_SC_SPD_SPEED_GEN3;
+	else
+		val = 0;
+	ATA_OUTL(ch->r_mem, SIIS_P_SCTL,
+	    ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 :
+	    (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)));
+	siis_devreset(dev);
 	/* Reset and reconnect PHY, */
-	if (!siis_sata_phy_reset(dev)) {
+	if (!siis_sata_connect(ch)) {
 		ch->devices = 0;
 		/* Enable port interrupts */
 		ATA_OUTL(ch->r_mem, SIIS_P_IESET, SIIS_P_IX_ENABLED);
@@ -1327,9 +1350,8 @@ siis_reset(device_t dev)
 		return;
 	}
 	/* Wait for clearing busy status. */
-	if (siis_wait_ready(dev, 10000)) {
+	if (siis_wait_ready(dev, 10000))
 		device_printf(dev, "device ready timeout\n");
-	}
 	ch->devices = 1;
 	/* Enable port interrupts */
 	ATA_OUTL(ch->r_mem, SIIS_P_IS, 0xFFFFFFFF);
@@ -1420,32 +1442,6 @@ siis_sata_connect(struct siis_channel *c
 	return (1);
 }
 
-static int
-siis_sata_phy_reset(device_t dev)
-{
-	struct siis_channel *ch = device_get_softc(dev);
-	uint32_t val;
-
-	if (bootverbose)
-		device_printf(dev, "hardware reset ...\n");
-	ATA_OUTL(ch->r_mem, SIIS_P_SCTL, ATA_SC_IPM_DIS_PARTIAL |
-	    ATA_SC_IPM_DIS_SLUMBER | ATA_SC_DET_RESET);
-	DELAY(50000);
-	if (ch->sata_rev == 1)
-		val = ATA_SC_SPD_SPEED_GEN1;
-	else if (ch->sata_rev == 2)
-		val = ATA_SC_SPD_SPEED_GEN2;
-	else if (ch->sata_rev == 3)
-		val = ATA_SC_SPD_SPEED_GEN3;
-	else
-		val = 0;
-	ATA_OUTL(ch->r_mem, SIIS_P_SCTL,
-	    ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 :
-	    (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)));
-	DELAY(50000);
-	return (siis_sata_connect(ch));
-}
-
 static void
 siisaction(struct cam_sim *sim, union ccb *ccb)
 {

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:41:15 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EED0C106566C;
	Tue, 17 Nov 2009 20:41:15 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C3E258FC16;
	Tue, 17 Nov 2009 20:41:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKfFs3037007;
	Tue, 17 Nov 2009 20:41:15 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKfF09037005;
	Tue, 17 Nov 2009 20:41:15 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172041.nAHKfF09037005@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:41:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199430 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:41:16 -0000

Author: mav
Date: Tue Nov 17 20:41:15 2009
New Revision: 199430
URL: http://svn.freebsd.org/changeset/base/199430

Log:
  MFC r198705:
  Ensure target/lun passed from user-level supported on this bus.
  Scanning unsupported IDs causes different issues from duplicate
  devices to system crash.

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 20:35:29 2009	(r199429)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 20:41:15 2009	(r199430)
@@ -452,7 +452,34 @@ xptioctl(struct cdev *dev, u_long cmd, c
 			ccb = xpt_alloc_ccb();
 
 			CAM_SIM_LOCK(bus->sim);
-
+			/* Ensure passed in target/lun supported on this bus. */
+			if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD) ||
+			    (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD)) {
+				if (xpt_create_path(&ccb->ccb_h.path,
+					    xpt_periph,
+					    inccb->ccb_h.path_id,
+					    CAM_TARGET_WILDCARD,
+					    CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
+					error = EINVAL;
+					CAM_SIM_UNLOCK(bus->sim);
+					xpt_free_ccb(ccb);
+					break;
+				}
+				xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path,
+				    inccb->ccb_h.pinfo.priority);
+				ccb->ccb_h.func_code = XPT_PATH_INQ;
+				xpt_action(ccb);
+				xpt_free_path(ccb->ccb_h.path);
+				if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD &&
+				    inccb->ccb_h.target_id > ccb->cpi.max_target) ||
+				    (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD &&
+				    inccb->ccb_h.target_lun > ccb->cpi.max_lun)) {
+					error = EINVAL;
+					CAM_SIM_UNLOCK(bus->sim);
+					xpt_free_ccb(ccb);
+					break;
+				}
+			}
 			/*
 			 * Create a path using the bus, target, and lun the
 			 * user passed in.

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:43:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95BAD1065672;
	Tue, 17 Nov 2009 20:43:04 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8342C8FC23;
	Tue, 17 Nov 2009 20:43:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKh4gR037131;
	Tue, 17 Nov 2009 20:43:04 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKh4Ho037126;
	Tue, 17 Nov 2009 20:43:04 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172043.nAHKh4Ho037126@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:43:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199431 - in stable/8/sys/cam: . ata scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:43:05 -0000

Author: mav
Date: Tue Nov 17 20:43:04 2009
New Revision: 199431
URL: http://svn.freebsd.org/changeset/base/199431

Log:
  MFC r198708:
  - Reduce code duplication in ATA XPT and PMP driver.
  - Move PIO size setting from ada driver to ATA XPT. It is XPT business
  to negotiate transfer details. ada driver is now stateless.
  - Report PIO size to SIM. It is required for correct PATA SIM operation.
  - Tune PMP scan timings. It workarounds some problems with SiI.
  - If reset hapens during PMP initialization - restart it.
  - Introduce early-initialized periph drivers, which are used during initial
  scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance
  to finish scan before mountroot and numerate devices in right order.

Modified:
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/ata/ata_pmp.c
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/cam/cam.h
  stable/8/sys/cam/cam_ccb.h
  stable/8/sys/cam/cam_periph.h
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/cam/scsi/scsi_da.c
  stable/8/sys/cam/scsi/scsi_sg.c
  stable/8/sys/cam/scsi/scsi_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 20:41:15 2009	(r199430)
+++ stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 20:43:04 2009	(r199431)
@@ -63,8 +63,7 @@ __FBSDID("$FreeBSD$");
 #define ATA_MAX_28BIT_LBA               268435455UL
 
 typedef enum {
-	ADA_STATE_NORMAL,
-	ADA_STATE_SET_MULTI
+	ADA_STATE_NORMAL
 } ada_state;
 
 typedef enum {
@@ -84,7 +83,6 @@ typedef enum {
 } ada_quirks;
 
 typedef enum {
-	ADA_CCB_SET_MULTI	= 0x01,
 	ADA_CCB_BUFFER_IO	= 0x03,
 	ADA_CCB_WAITING		= 0x04,
 	ADA_CCB_DUMP		= 0x05,
@@ -112,7 +110,6 @@ struct ada_softc {
 	ada_quirks quirks;
 	int	 ordered_tag_count;
 	int	 outstanding_cmds;
-	int	 secsperint;
 	struct	 disk_params params;
 	struct	 disk *disk;
 	union	 ccb saved_ccb;
@@ -550,22 +547,6 @@ adaasync(void *callback_arg, u_int32_t c
 				"due to status 0x%x\n", status);
 		break;
 	}
-	case AC_SENT_BDR:
-	case AC_BUS_RESET:
-	{
-		struct ada_softc *softc = (struct ada_softc *)periph->softc;
-
-		cam_periph_async(periph, code, path, arg);
-		if (softc->state != ADA_STATE_NORMAL)
-			break;
-		/*
-		 * Restore device configuration.
-		 */
-		softc->state = ADA_STATE_SET_MULTI;
-		cam_periph_acquire(periph);
-		xpt_schedule(periph, CAM_PRIORITY_DEV);
-		break;
-	}
 	default:
 		cam_periph_async(periph, code, path, arg);
 		break;
@@ -644,8 +625,7 @@ adaregister(struct cam_periph *periph, v
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
 	    cgd->ident_data.queue >= 31)
 		softc->flags |= ADA_FLAG_CAN_NCQ;
-	softc->secsperint = max(1, min(cgd->ident_data.sectors_intr, 16));
-	softc->state = ADA_STATE_SET_MULTI;
+	softc->state = ADA_STATE_NORMAL;
 
 	periph->softc = softc;
 
@@ -734,18 +714,10 @@ adaregister(struct cam_periph *periph, v
 	 * them and the only alternative would be to
 	 * not attach the device on failure.
 	 */
-	xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE,
+	xpt_register_async(AC_LOST_DEVICE,
 			   adaasync, periph, periph->path);
 
 	/*
-	 * Take an exclusive refcount on the periph while adastart is called
-	 * to finish the probe.  The reference will be dropped in adadone at
-	 * the end of probe.
-	 */
-	cam_periph_acquire(periph);
-	xpt_schedule(periph, /*priority*/5);
-
-	/*
 	 * Schedule a periodic event to occasionally send an
 	 * ordered tag to a device.
 	 */
@@ -901,21 +873,6 @@ adastart(struct cam_periph *periph, unio
 		}
 		break;
 	}
-	case ADA_STATE_SET_MULTI:
-	{
-		cam_fill_ataio(ataio,
-		    ada_retry_count,
-		    adadone,
-		    CAM_DIR_NONE,
-		    0,
-		    NULL,
-		    0,
-		    ada_default_timeout*1000);
-
-		ata_28bit_cmd(ataio, ATA_SET_MULTI, 0, 0, softc->secsperint);
-		start_ccb->ccb_h.ccb_state = ADA_CCB_SET_MULTI;
-		xpt_action(start_ccb);
-	}
 	}
 }
 
@@ -1003,35 +960,6 @@ adadone(struct cam_periph *periph, union
 		wakeup(&done_ccb->ccb_h.cbfcnp);
 		return;
 	}
-	case ADA_CCB_SET_MULTI:
-	{
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-		} else {
-			int	error;
-
-			error = adaerror(done_ccb, 0, 0);
-			if (error == ERESTART) {
-				/* A retry was scheduled, so just return. */
-				return;
-			}
-		}
-		softc->state = ADA_STATE_NORMAL;
-		/*
-		 * Since our peripheral may be invalidated by an error
-		 * above or an external event, we must release our CCB
-		 * before releasing the probe lock on the peripheral.
-		 * The peripheral will only go away once the last lock
-		 * is removed, and we need it around for the CCB release
-		 * operation.
-		 */
-		xpt_release_ccb(done_ccb);
-		if (bioq_first(&softc->bio_queue) != NULL) {
-			/* Have more work to do, so ensure we stay scheduled */
-			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
-		}
-		cam_periph_release_locked(periph);
-		return;
-	}
 	case ADA_CCB_DUMP:
 		/* No-op.  We're polling */
 		return;

Modified: stable/8/sys/cam/ata/ata_pmp.c
==============================================================================
--- stable/8/sys/cam/ata/ata_pmp.c	Tue Nov 17 20:41:15 2009	(r199430)
+++ stable/8/sys/cam/ata/ata_pmp.c	Tue Nov 17 20:43:04 2009	(r199431)
@@ -93,7 +93,9 @@ struct pmp_softc {
 	int			pm_step;
 	int			pm_try;
 	int			found;
+	int			reset;
 	int			frozen;
+	int			restart;
 	union			ccb saved_ccb;
 	struct task		sysctl_task;
 	struct sysctl_ctx_list	sysctl_ctx;
@@ -134,7 +136,8 @@ TUNABLE_INT("kern.cam.pmp.default_timeou
 static struct periph_driver pmpdriver =
 {
 	pmpinit, "pmp",
-	TAILQ_HEAD_INITIALIZER(pmpdriver.units), /* generation */ 0
+	TAILQ_HEAD_INITIALIZER(pmpdriver.units), /* generation */ 0,
+	CAM_PERIPH_DRV_EARLY
 };
 
 PERIPHDRIVER_DECLARE(pmp, pmpdriver);
@@ -292,14 +295,21 @@ pmpasync(void *callback_arg, u_int32_t c
 	case AC_BUS_RESET:
 		softc = (struct pmp_softc *)periph->softc;
 		cam_periph_async(periph, code, path, arg);
-		if (softc->state != PMP_STATE_NORMAL)
+		if (code == AC_SCSI_AEN && softc->state != PMP_STATE_NORMAL &&
+		    softc->state != PMP_STATE_SCAN)
 			break;
-		pmpfreeze(periph, softc->found);
+		if (softc->state != PMP_STATE_SCAN)
+			pmpfreeze(periph, softc->found);
+		else
+			pmpfreeze(periph, softc->found & ~(1 << softc->pm_step));
 		if (code == AC_SENT_BDR || code == AC_BUS_RESET)
 			softc->found = 0; /* We have to reset everything. */
-		softc->state = PMP_STATE_PORTS;
-		cam_periph_acquire(periph);
-		xpt_schedule(periph, CAM_PRIORITY_DEV);
+		if (softc->state == PMP_STATE_NORMAL) {
+			softc->state = PMP_STATE_PORTS;
+			cam_periph_acquire(periph);
+			xpt_schedule(periph, CAM_PRIORITY_BUS);
+		} else
+			softc->restart = 1;
 		break;
 	default:
 		cam_periph_async(periph, code, path, arg);
@@ -395,7 +405,7 @@ pmpregister(struct cam_periph *periph, v
 	 * the end of probe.
 	 */
 	(void)cam_periph_acquire(periph);
-	xpt_schedule(periph, CAM_PRIORITY_DEV);
+	xpt_schedule(periph, CAM_PRIORITY_BUS);
 
 	return(CAM_REQ_CMP);
 }
@@ -408,6 +418,11 @@ pmpstart(struct cam_periph *periph, unio
 
 	softc = (struct pmp_softc *)periph->softc;
 	ataio = &start_ccb->ataio;
+	
+	if (softc->restart) {
+		softc->restart = 0;
+		softc->state = PMP_STATE_PORTS;
+	}
 
 	switch (softc->state) {
 	case PMP_STATE_PORTS:
@@ -469,6 +484,7 @@ printf("PM RESET %d%s\n", softc->pm_step
 		ata_pm_read_cmd(ataio, 0, softc->pm_step);
 		break;
 	case PMP_STATE_CLEAR:
+		softc->reset = 0;
 		cam_fill_ataio(ataio,
 		      pmp_retry_count,
 		      pmpdone,
@@ -492,7 +508,7 @@ pmpdone(struct cam_periph *periph, union
 	struct ccb_ataio *ataio;
 	union ccb *work_ccb;
 	struct cam_path *path, *dpath;
-	u_int32_t  priority;
+	u_int32_t  priority, res;
 
 	softc = (struct pmp_softc *)periph->softc;
 	ataio = &done_ccb->ataio;
@@ -502,193 +518,158 @@ pmpdone(struct cam_periph *periph, union
 	path = done_ccb->ccb_h.path;
 	priority = done_ccb->ccb_h.pinfo.priority;
 
-	switch (softc->state) {
-	case PMP_STATE_PORTS:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) +
-			    (done_ccb->ataio.res.lba_mid << 16) +
-			    (done_ccb->ataio.res.lba_low << 8) +
-			    done_ccb->ataio.res.sector_count;
-			/* This PM declares 6 ports, while only 5 of them are real.
-			 * Port 5 is enclosure management bridge port, which has implementation
-			 * problems, causing probe faults. Hide it for now. */
-			if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6)
-				softc->pm_ports = 5;
-			/* This PM declares 7 ports, while only 5 of them are real.
-			 * Port 5 is some fake "Config  Disk" with 640 sectors size,
-			 * port 6 is enclosure management bridge port.
-			 * Both fake ports has implementation problems, causing
-			 * probe faults. Hide them for now. */
-			if (softc->pm_pid == 0x47261095 && softc->pm_ports == 7)
-				softc->pm_ports = 5;
-			printf("PM ports: %d\n", softc->pm_ports);
-			softc->state = PMP_STATE_CONFIG;
-			xpt_release_ccb(done_ccb);
-			xpt_schedule(periph, priority);
-			return;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
+	if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+		if (cam_periph_error(done_ccb, 0, 0,
+		    &softc->saved_ccb) == ERESTART) {
 			return;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-				cam_release_devq(done_ccb->ccb_h.path,
-						 /*relsim_flags*/0,
-						 /*reduction*/0,
-						 /*timeout*/0,
-						 /*getcount_only*/0);
+			cam_release_devq(done_ccb->ccb_h.path,
+			    /*relsim_flags*/0,
+			    /*reduction*/0,
+			    /*timeout*/0,
+			    /*getcount_only*/0);
+		}
+		goto done;
+	}
+
+	if (softc->restart) {
+		softc->restart = 0;
+		if (softc->state == PMP_STATE_SCAN) {
+			pmpfreeze(periph, 1 << softc->pm_step);
+			work_ccb = done_ccb;
+			done_ccb = (union ccb*)work_ccb->ccb_h.ppriv_ptr0;
+			/* Free the current request path- we're done with it. */
+		    	xpt_free_path(work_ccb->ccb_h.path);
+			xpt_free_ccb(work_ccb);
 		}
 		xpt_release_ccb(done_ccb);
-		break;
+		softc->state = PMP_STATE_PORTS;
+		xpt_schedule(periph, priority);
+		return;
+	}
+
+	switch (softc->state) {
+	case PMP_STATE_PORTS:
+		softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) +
+		    (done_ccb->ataio.res.lba_mid << 16) +
+		    (done_ccb->ataio.res.lba_low << 8) +
+		    done_ccb->ataio.res.sector_count;
+		/* This PM declares 6 ports, while only 5 of them are real.
+		 * Port 5 is enclosure management bridge port, which has implementation
+		 * problems, causing probe faults. Hide it for now. */
+		if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6)
+			softc->pm_ports = 5;
+		/* This PM declares 7 ports, while only 5 of them are real.
+		 * Port 5 is some fake "Config  Disk" with 640 sectors size,
+		 * port 6 is enclosure management bridge port.
+		 * Both fake ports has implementation problems, causing
+		 * probe faults. Hide them for now. */
+		if (softc->pm_pid == 0x47261095 && softc->pm_ports == 7)
+			softc->pm_ports = 5;
+		printf("PM ports: %d\n", softc->pm_ports);
+		softc->state = PMP_STATE_CONFIG;
+		xpt_release_ccb(done_ccb);
+		xpt_schedule(periph, priority);
+		return;
 	case PMP_STATE_CONFIG:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			softc->pm_step = 0;
-			softc->state = PMP_STATE_RESET;
-			xpt_release_ccb(done_ccb);
-			xpt_schedule(periph, priority);
-			return;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-				cam_release_devq(done_ccb->ccb_h.path,
-						 /*relsim_flags*/0,
-						 /*reduction*/0,
-						 /*timeout*/0,
-						 /*getcount_only*/0);
-		}
+		softc->pm_step = 0;
+		softc->state = PMP_STATE_RESET;
+		softc->reset |= ~softc->found;
 		xpt_release_ccb(done_ccb);
-		break;
+		xpt_schedule(periph, priority);
+		return;
 	case PMP_STATE_RESET:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			softc->pm_step++;
-			if (softc->pm_step < softc->pm_ports) {
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			} else {
-				softc->pm_step = 0;
-				DELAY(5000);
-				printf("PM reset done\n");
-				softc->state = PMP_STATE_CONNECT;
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			}
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-				cam_release_devq(done_ccb->ccb_h.path,
-						 /*relsim_flags*/0,
-						 /*reduction*/0,
-						 /*timeout*/0,
-						 /*getcount_only*/0);
+		softc->pm_step++;
+		if (softc->pm_step >= softc->pm_ports) {
+			softc->pm_step = 0;
+			cam_freeze_devq(periph->path);
+			cam_release_devq(periph->path,
+			    RELSIM_RELEASE_AFTER_TIMEOUT,
+			    /*reduction*/0,
+			    /*timeout*/5,
+			    /*getcount_only*/0);
+			printf("PM reset done\n");
+			softc->state = PMP_STATE_CONNECT;
 		}
 		xpt_release_ccb(done_ccb);
-		break;
+		xpt_schedule(periph, priority);
+		return;
 	case PMP_STATE_CONNECT:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			softc->pm_step++;
-			if (softc->pm_step < softc->pm_ports) {
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			} else {
-				softc->pm_step = 0;
-				softc->pm_try = 0;
-				printf("PM connect done\n");
-				softc->state = PMP_STATE_CHECK;
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			}
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-				cam_release_devq(done_ccb->ccb_h.path,
-						 /*relsim_flags*/0,
-						 /*reduction*/0,
-						 /*timeout*/0,
-						 /*getcount_only*/0);
+		softc->pm_step++;
+		if (softc->pm_step >= softc->pm_ports) {
+			softc->pm_step = 0;
+			softc->pm_try = 0;
+			cam_freeze_devq(periph->path);
+			cam_release_devq(periph->path,
+			    RELSIM_RELEASE_AFTER_TIMEOUT,
+			    /*reduction*/0,
+			    /*timeout*/10,
+			    /*getcount_only*/0);
+			printf("PM connect done\n");
+			softc->state = PMP_STATE_CHECK;
 		}
 		xpt_release_ccb(done_ccb);
-		break;
+		xpt_schedule(periph, priority);
+		return;
 	case PMP_STATE_CHECK:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			int res = (done_ccb->ataio.res.lba_high << 24) +
-			    (done_ccb->ataio.res.lba_mid << 16) +
-			    (done_ccb->ataio.res.lba_low << 8) +
-			    done_ccb->ataio.res.sector_count;
-			if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) {
-				printf("PM status: %d - %08x\n", softc->pm_step, res);
-				softc->found |= (1 << softc->pm_step);
-				softc->pm_step++;
+		res = (done_ccb->ataio.res.lba_high << 24) +
+		    (done_ccb->ataio.res.lba_mid << 16) +
+		    (done_ccb->ataio.res.lba_low << 8) +
+		    done_ccb->ataio.res.sector_count;
+		if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) {
+			printf("PM status: %d - %08x\n", softc->pm_step, res);
+			softc->found |= (1 << softc->pm_step);
+			softc->pm_step++;
+		} else {
+			if (softc->pm_try < 10) {
+				cam_freeze_devq(periph->path);
+				cam_release_devq(periph->path,
+				    RELSIM_RELEASE_AFTER_TIMEOUT,
+				    /*reduction*/0,
+				    /*timeout*/10,
+				    /*getcount_only*/0);
+				softc->pm_try++;
 			} else {
-				if (softc->pm_try < 100) {
-					DELAY(10000);
-					softc->pm_try++;
-				} else {
-					printf("PM status: %d - %08x\n", softc->pm_step, res);
-					softc->found &= ~(1 << softc->pm_step);
-					if (xpt_create_path(&dpath, periph,
-					    done_ccb->ccb_h.path_id,
-					    softc->pm_step, 0) == CAM_REQ_CMP) {
-						xpt_async(AC_LOST_DEVICE, dpath, NULL);
-						xpt_free_path(dpath);
-					}
-					softc->pm_step++;
+				printf("PM status: %d - %08x\n", softc->pm_step, res);
+				softc->found &= ~(1 << softc->pm_step);
+				if (xpt_create_path(&dpath, periph,
+				    done_ccb->ccb_h.path_id,
+				    softc->pm_step, 0) == CAM_REQ_CMP) {
+					xpt_async(AC_LOST_DEVICE, dpath, NULL);
+					xpt_free_path(dpath);
 				}
+				softc->pm_step++;
 			}
-			if (softc->pm_step < softc->pm_ports) {
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			} else {
-				softc->pm_step = 0;
-				softc->state = PMP_STATE_CLEAR;
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
+		}
+		if (softc->pm_step >= softc->pm_ports) {
+			if (softc->reset & softc->found) {
+				cam_freeze_devq(periph->path);
+				cam_release_devq(periph->path,
+				    RELSIM_RELEASE_AFTER_TIMEOUT,
+				    /*reduction*/0,
+				    /*timeout*/1000,
+				    /*getcount_only*/0);
 			}
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-				cam_release_devq(done_ccb->ccb_h.path,
-						 /*relsim_flags*/0,
-						 /*reduction*/0,
-						 /*timeout*/0,
-						 /*getcount_only*/0);
+			softc->state = PMP_STATE_CLEAR;
+			softc->pm_step = 0;
 		}
 		xpt_release_ccb(done_ccb);
-		break;
+		xpt_schedule(periph, priority);
+		return;
 	case PMP_STATE_CLEAR:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			softc->pm_step++;
-			if (softc->pm_step < softc->pm_ports) {
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			} else if (softc->found) {
-				softc->pm_step = 0;
-				softc->state = PMP_STATE_SCAN;
-				work_ccb = xpt_alloc_ccb_nowait();
-				if (work_ccb != NULL)
-					goto do_scan;
-				xpt_release_ccb(done_ccb);
-			}
-			break;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
+		softc->pm_step++;
+		if (softc->pm_step < softc->pm_ports) {
+			xpt_release_ccb(done_ccb);
+			xpt_schedule(periph, priority);
 			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-				cam_release_devq(done_ccb->ccb_h.path,
-						 /*relsim_flags*/0,
-						 /*reduction*/0,
-						 /*timeout*/0,
-						 /*getcount_only*/0);
+		} else if (softc->found) {
+			softc->pm_step = 0;
+			softc->state = PMP_STATE_SCAN;
+			work_ccb = xpt_alloc_ccb_nowait();
+			if (work_ccb != NULL)
+				goto do_scan;
+			xpt_release_ccb(done_ccb);
 		}
-		xpt_release_ccb(done_ccb);
 		break;
 	case PMP_STATE_SCAN:
 		work_ccb = done_ccb;
@@ -703,7 +684,6 @@ do_scan:
 		}
 		if (softc->pm_step >= softc->pm_ports) {
 			xpt_free_ccb(work_ccb);
-			xpt_release_ccb(done_ccb);
 			break;
 		}
 		if (xpt_create_path(&dpath, periph,
@@ -712,7 +692,6 @@ do_scan:
 			printf("pmpdone: xpt_create_path failed"
 			    ", bus scan halted\n");
 			xpt_free_ccb(work_ccb);
-			xpt_release_ccb(done_ccb);
 			break;
 		}
 		xpt_setup_ccb(&work_ccb->ccb_h, dpath,
@@ -727,6 +706,8 @@ do_scan:
 	default:
 		break;
 	}
+done:
+	xpt_release_ccb(done_ccb);
 	softc->state = PMP_STATE_NORMAL;
 	pmprelease(periph, -1);
 	cam_periph_release_locked(periph);

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 20:41:15 2009	(r199430)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 20:43:04 2009	(r199431)
@@ -83,7 +83,8 @@ static periph_init_t probe_periph_init;
 static struct periph_driver probe_driver =
 {
 	probe_periph_init, "aprobe",
-	TAILQ_HEAD_INITIALIZER(probe_driver.units)
+	TAILQ_HEAD_INITIALIZER(probe_driver.units), /* generation */ 0,
+	CAM_PERIPH_DRV_EARLY
 };
 
 PERIPHDRIVER_DECLARE(aprobe, probe_driver);
@@ -92,6 +93,7 @@ typedef enum {
 	PROBE_RESET,
 	PROBE_IDENTIFY,
 	PROBE_SETMODE,
+	PROBE_SET_MULTI,
 	PROBE_INQUIRY,
 	PROBE_FULL_INQUIRY,
 	PROBE_PM_PID,
@@ -103,6 +105,7 @@ static char *probe_action_text[] = {
 	"PROBE_RESET",
 	"PROBE_IDENTIFY",
 	"PROBE_SETMODE",
+	"PROBE_SET_MULTI",
 	"PROBE_INQUIRY",
 	"PROBE_FULL_INQUIRY",
 	"PROBE_PM_PID",
@@ -282,12 +285,16 @@ probestart(struct cam_periph *periph, un
 	struct ccb_ataio *ataio;
 	struct ccb_scsiio *csio;
 	probe_softc *softc;
+	struct cam_path *path;
+	struct ata_params *ident_buf;
 
 	CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probestart\n"));
 
 	softc = (probe_softc *)periph->softc;
+	path = start_ccb->ccb_h.path;
 	ataio = &start_ccb->ataio;
 	csio = &start_ccb->csio;
+	ident_buf = &periph->path->device->ident_data;
 
 	switch (softc->action) {
 	case PROBE_RESET:
@@ -302,10 +309,6 @@ probestart(struct cam_periph *periph, un
 		ata_reset_cmd(ataio);
 		break;
 	case PROBE_IDENTIFY:
-	{
-		struct ata_params *ident_buf =
-		    &periph->path->device->ident_data;
-
 		if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) {
 			/* Prepare check that it is the same device. */
 			MD5_CTX context;
@@ -335,12 +338,7 @@ probestart(struct cam_periph *periph, un
 		else
 			ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0);
 		break;
-	}
 	case PROBE_SETMODE:
-	{
-		struct ata_params *ident_buf =
-		    &periph->path->device->ident_data;
-
 		cam_fill_ataio(ataio,
 		      1,
 		      probedone,
@@ -352,6 +350,37 @@ probestart(struct cam_periph *periph, un
 		ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0,
 		    ata_max_mode(ident_buf, ATA_UDMA6, ATA_UDMA6));
 		break;
+	case PROBE_SET_MULTI:
+	{
+		struct ccb_trans_settings cts;
+		u_int sectors;
+
+		sectors = max(1, min(ident_buf->sectors_intr & 0xff, 16));
+
+		/* Report bytecount to SIM. */
+		bzero(&cts, sizeof(cts));
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
+		cts.type = CTS_TYPE_CURRENT_SETTINGS;
+		if (path->device->transport == XPORT_ATA) {
+			cts.xport_specific.ata.bytecount = sectors * 512;
+			cts.xport_specific.ata.valid = CTS_ATA_VALID_BYTECOUNT;
+		} else {
+			cts.xport_specific.sata.bytecount = sectors * 512;
+			cts.xport_specific.sata.valid = CTS_SATA_VALID_BYTECOUNT;
+		}
+		xpt_action((union ccb *)&cts);
+
+		cam_fill_ataio(ataio,
+		    1,
+		    probedone,
+		    CAM_DIR_NONE,
+		    0,
+		    NULL,
+		    0,
+		    30*1000);
+		ata_28bit_cmd(ataio, ATA_SET_MULTI, 0, 0, sectors);
+		break;
 	}
 	case PROBE_INQUIRY:
 	case PROBE_FULL_INQUIRY:
@@ -406,7 +435,7 @@ probestart(struct cam_periph *periph, un
 		ata_pm_read_cmd(ataio, 1, 15);
 		break;
 	case PROBE_INVALID:
-		CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_INFO,
+		CAM_DEBUG(path, CAM_DEBUG_INFO,
 		    ("probestart: invalid action state\n"));
 	default:
 		break;
@@ -552,101 +581,119 @@ probedone(struct cam_periph *periph, uni
 	priority = done_ccb->ccb_h.pinfo.priority;
 	ident_buf = &path->device->ident_data;
 
-	switch (softc->action) {
-	case PROBE_RESET:
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			int sign = (done_ccb->ataio.res.lba_high << 8) +
-			    done_ccb->ataio.res.lba_mid;
-			xpt_print(path, "SIGNATURE: %04x\n", sign);
-			if (sign == 0x0000 &&
-			    done_ccb->ccb_h.target_id != 15) {
-				path->device->protocol = PROTO_ATA;
-				PROBE_SET_ACTION(softc, PROBE_IDENTIFY);
-			} else if (sign == 0x9669 &&
-			    done_ccb->ccb_h.target_id == 15) {
-				struct ccb_trans_settings cts;
-
-				/* Report SIM that PM is present. */
-				bzero(&cts, sizeof(cts));
-				xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
-				cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
-				cts.type = CTS_TYPE_CURRENT_SETTINGS;
-				cts.xport_specific.sata.pm_present = 1;
-				cts.xport_specific.sata.valid = CTS_SATA_VALID_PM;
-				xpt_action((union ccb *)&cts);
-				path->device->protocol = PROTO_SATAPM;
-				PROBE_SET_ACTION(softc, PROBE_PM_PID);
-			} else if (sign == 0xeb14 &&
-			    done_ccb->ccb_h.target_id != 15) {
-				path->device->protocol = PROTO_SCSI;
-				PROBE_SET_ACTION(softc, PROBE_IDENTIFY);
-			} else {
-				if (done_ccb->ccb_h.target_id != 15) {
-					xpt_print(path,
-					    "Unexpected signature 0x%04x\n", sign);
-				}
-				goto device_fail;
-			}
-			xpt_release_ccb(done_ccb);
-			xpt_schedule(periph, priority);
-			return;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
+	if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+device_fail:	if (cam_periph_error(done_ccb, 0, 0,
+		    &softc->saved_ccb) == ERESTART) {
 			return;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
 			xpt_release_devq(done_ccb->ccb_h.path, /*count*/1,
 					 /*run_queue*/TRUE);
 		}
-		goto device_fail;
-	case PROBE_IDENTIFY:
+		/* Old PIO2 devices may not support mode setting. */
+		if (softc->action == PROBE_SETMODE &&
+		    ata_max_pmode(ident_buf) <= ATA_PIO2 &&
+		    (ident_buf->capabilities1 & ATA_SUPPORT_IORDY) == 0)
+			goto noerror;
+		/*
+		 * If we get to this point, we got an error status back
+		 * from the inquiry and the error status doesn't require
+		 * automatically retrying the command.  Therefore, the
+		 * inquiry failed.  If we had inquiry information before
+		 * for this device, but this latest inquiry command failed,
+		 * the device has probably gone away.  If this device isn't
+		 * already marked unconfigured, notify the peripheral
+		 * drivers that this device is no more.
+		 */
+		if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
+			xpt_async(AC_LOST_DEVICE, path, NULL);
+		found = 0;
+		goto done;
+	}
+noerror:
+	switch (softc->action) {
+	case PROBE_RESET:
 	{
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			int16_t *ptr;
+		int sign = (done_ccb->ataio.res.lba_high << 8) +
+		    done_ccb->ataio.res.lba_mid;
+		xpt_print(path, "SIGNATURE: %04x\n", sign);
+		if (sign == 0x0000 &&
+		    done_ccb->ccb_h.target_id != 15) {
+			path->device->protocol = PROTO_ATA;
+			PROBE_SET_ACTION(softc, PROBE_IDENTIFY);
+		} else if (sign == 0x9669 &&
+		    done_ccb->ccb_h.target_id == 15) {
+			struct ccb_trans_settings cts;
 
-			for (ptr = (int16_t *)ident_buf;
-			     ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) {
-				*ptr = le16toh(*ptr);
-			}
-			if (strncmp(ident_buf->model, "FX", 2) &&
-			    strncmp(ident_buf->model, "NEC", 3) &&
-			    strncmp(ident_buf->model, "Pioneer", 7) &&
-			    strncmp(ident_buf->model, "SHARP", 5)) {
-				ata_bswap(ident_buf->model, sizeof(ident_buf->model));
-				ata_bswap(ident_buf->revision, sizeof(ident_buf->revision));
-				ata_bswap(ident_buf->serial, sizeof(ident_buf->serial));
-			}
-			ata_btrim(ident_buf->model, sizeof(ident_buf->model));
-			ata_bpack(ident_buf->model, ident_buf->model, sizeof(ident_buf->model));
-			ata_btrim(ident_buf->revision, sizeof(ident_buf->revision));
-			ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision));
-			ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
-			ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
-
-			if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) {
-				/* Check that it is the same device. */
-				MD5_CTX context;
-				u_int8_t digest[16];
-
-				MD5Init(&context);
-				MD5Update(&context,
-				    (unsigned char *)ident_buf->model,
-				    sizeof(ident_buf->model));
-				MD5Update(&context,
-				    (unsigned char *)ident_buf->revision,
-				    sizeof(ident_buf->revision));
-				MD5Update(&context,
-				    (unsigned char *)ident_buf->serial,
-				    sizeof(ident_buf->serial));
-				MD5Final(digest, &context);
-				if (bcmp(digest, softc->digest, sizeof(digest))) {
-					/* Device changed. */
-					xpt_async(AC_LOST_DEVICE, path, NULL);
-				}
-				xpt_release_ccb(done_ccb);
-				break;
+				/* Report SIM that PM is present. */
+			bzero(&cts, sizeof(cts));
+			xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+			cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
+			cts.type = CTS_TYPE_CURRENT_SETTINGS;
+			cts.xport_specific.sata.pm_present = 1;
+			cts.xport_specific.sata.valid = CTS_SATA_VALID_PM;
+			xpt_action((union ccb *)&cts);
+			path->device->protocol = PROTO_SATAPM;
+			PROBE_SET_ACTION(softc, PROBE_PM_PID);
+		} else if (sign == 0xeb14 &&
+		    done_ccb->ccb_h.target_id != 15) {
+			path->device->protocol = PROTO_SCSI;
+			PROBE_SET_ACTION(softc, PROBE_IDENTIFY);
+		} else {
+			if (done_ccb->ccb_h.target_id != 15) {
+				xpt_print(path,
+				    "Unexpected signature 0x%04x\n", sign);
 			}
+			goto device_fail;
+		}
+		xpt_release_ccb(done_ccb);
+		xpt_schedule(periph, priority);
+		return;
+	}
+	case PROBE_IDENTIFY:
+	{
+		int16_t *ptr;
+
+		for (ptr = (int16_t *)ident_buf;
+		     ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) {
+			*ptr = le16toh(*ptr);
+		}
+		if (strncmp(ident_buf->model, "FX", 2) &&
+		    strncmp(ident_buf->model, "NEC", 3) &&
+		    strncmp(ident_buf->model, "Pioneer", 7) &&
+		    strncmp(ident_buf->model, "SHARP", 5)) {
+			ata_bswap(ident_buf->model, sizeof(ident_buf->model));
+			ata_bswap(ident_buf->revision, sizeof(ident_buf->revision));
+			ata_bswap(ident_buf->serial, sizeof(ident_buf->serial));
+		}
+		ata_btrim(ident_buf->model, sizeof(ident_buf->model));
+		ata_bpack(ident_buf->model, ident_buf->model, sizeof(ident_buf->model));
+		ata_btrim(ident_buf->revision, sizeof(ident_buf->revision));
+		ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision));
+		ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
+		ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
 
+		if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) {
+			/* Check that it is the same device. */
+			MD5_CTX context;
+			u_int8_t digest[16];
+
+			MD5Init(&context);
+			MD5Update(&context,
+			    (unsigned char *)ident_buf->model,
+			    sizeof(ident_buf->model));
+			MD5Update(&context,
+			    (unsigned char *)ident_buf->revision,
+			    sizeof(ident_buf->revision));
+			MD5Update(&context,
+			    (unsigned char *)ident_buf->serial,
+			    sizeof(ident_buf->serial));
+			MD5Final(digest, &context);
+			if (bcmp(digest, softc->digest, sizeof(digest))) {
+				/* Device changed. */
+				xpt_async(AC_LOST_DEVICE, path, NULL);
+			}
+		} else {
 			/* Clean up from previous instance of this device */
 			if (path->device->serial_num != NULL) {
 				free(path->device->serial_num, M_CAMXPT);
@@ -655,7 +702,7 @@ probedone(struct cam_periph *periph, uni
 			}
 			path->device->serial_num =
 				(u_int8_t *)malloc((sizeof(ident_buf->serial) + 1),
-						   M_CAMXPT, M_NOWAIT);
+					   M_CAMXPT, M_NOWAIT);
 			if (path->device->serial_num != NULL) {
 				bcopy(ident_buf->serial,
 				      path->device->serial_num,
@@ -667,188 +714,120 @@ probedone(struct cam_periph *periph, uni
 			}
 
 			path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
-			ata_device_transport(path);
-			PROBE_SET_ACTION(softc, PROBE_SETMODE);
-			xpt_release_ccb(done_ccb);
-			xpt_schedule(periph, priority);
-			return;
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-			/* Don't wedge the queue */
-			xpt_release_devq(done_ccb->ccb_h.path, /*count*/1,
-					 /*run_queue*/TRUE);
 		}
-device_fail:
-		/*
-		 * If we get to this point, we got an error status back
-		 * from the inquiry and the error status doesn't require
-		 * automatically retrying the command.  Therefore, the
-		 * inquiry failed.  If we had inquiry information before
-		 * for this device, but this latest inquiry command failed,
-		 * the device has probably gone away.  If this device isn't
-		 * already marked unconfigured, notify the peripheral
-		 * drivers that this device is no more.
-		 */
-		if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
-			xpt_async(AC_LOST_DEVICE, path, NULL);
-		found = 0;
+		ata_device_transport(path);
+		PROBE_SET_ACTION(softc, PROBE_SETMODE);
 		xpt_release_ccb(done_ccb);
-		break;
+		xpt_schedule(periph, priority);
+		return;
 	}
 	case PROBE_SETMODE:
-	{
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-modedone:		if (path->device->protocol == PROTO_ATA) {
-				path->device->flags &= ~CAM_DEV_UNCONFIGURED;
-				done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
-				xpt_action(done_ccb);
-				xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path,
-				    done_ccb);
-				xpt_release_ccb(done_ccb);
-				break;
-			} else {
-				PROBE_SET_ACTION(softc, PROBE_INQUIRY);
-				xpt_release_ccb(done_ccb);
-				xpt_schedule(periph, priority);
-				return;
-			}
-		} else if (cam_periph_error(done_ccb, 0, 0,
-					    &softc->saved_ccb) == ERESTART) {
-			return;
-		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
-			/* Don't wedge the queue */
-			xpt_release_devq(done_ccb->ccb_h.path, /*count*/1,
-					 /*run_queue*/TRUE);
+		if (path->device->protocol == PROTO_ATA) {
+			PROBE_SET_ACTION(softc, PROBE_SET_MULTI);
+		} else {
+			PROBE_SET_ACTION(softc, PROBE_INQUIRY);
 		}
-		/* Old PIO2 devices may not support mode setting. */
-		if (ata_max_pmode(ident_buf) <= ATA_PIO2 &&
-		    (ident_buf->capabilities1 & ATA_SUPPORT_IORDY) == 0)
-			goto modedone;
-		goto device_fail;
-	}
+		xpt_release_ccb(done_ccb);
+		xpt_schedule(periph, priority);
+		return;
+	case PROBE_SET_MULTI:
+		if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
+			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+			done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
+			xpt_action(done_ccb);
+			xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path,
+			    done_ccb);
+		}
+		break;
 	case PROBE_INQUIRY:
 	case PROBE_FULL_INQUIRY:
 	{
-		if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
-			struct scsi_inquiry_data *inq_buf;
-			u_int8_t periph_qual;
+		struct scsi_inquiry_data *inq_buf;
+		u_int8_t periph_qual, len;
 
-			path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:45:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E22C7106568B;
	Tue, 17 Nov 2009 20:45:49 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D0CED8FC08;
	Tue, 17 Nov 2009 20:45:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKjnJg037394;
	Tue, 17 Nov 2009 20:45:49 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKjnqE037392;
	Tue, 17 Nov 2009 20:45:49 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172045.nAHKjnqE037392@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:45:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199432 - stable/8/sbin/camcontrol
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:45:50 -0000

Author: mav
Date: Tue Nov 17 20:45:49 2009
New Revision: 199432
URL: http://svn.freebsd.org/changeset/base/199432

Log:
  MFC r198709:
  Sync connection speed reporting with kernel.
  Report speed in identify command, same as done by inquiry.

Modified:
  stable/8/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/8/sbin/camcontrol/   (props changed)

Modified: stable/8/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 20:43:04 2009	(r199431)
+++ stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 20:45:49 2009	(r199432)
@@ -186,7 +186,7 @@ static int scsidoinquiry(struct cam_devi
 			 char *combinedopt, int retry_count, int timeout);
 static int scsiinquiry(struct cam_device *device, int retry_count, int timeout);
 static int scsiserial(struct cam_device *device, int retry_count, int timeout);
-static int scsixferrate(struct cam_device *device);
+static int camxferrate(struct cam_device *device);
 #endif /* MINIMALISTIC */
 static int parse_btl(char *tstr, int *bus, int *target, int *lun,
 		     cam_argmask *arglst);
@@ -663,7 +663,7 @@ scsidoinquiry(struct cam_device *device,
 		return(error);
 
 	if (arglist & CAM_ARG_GET_XFERRATE)
-		error = scsixferrate(device);
+		error = camxferrate(device);
 
 	return(error);
 }
@@ -873,14 +873,18 @@ scsiserial(struct cam_device *device, in
 }
 
 static int
-scsixferrate(struct cam_device *device)
+camxferrate(struct cam_device *device)
 {
+	struct ccb_pathinq cpi;
 	u_int32_t freq = 0;
 	u_int32_t speed = 0;
 	union ccb *ccb;
 	u_int mb;
 	int retval = 0;
 
+	if ((retval = get_cpi(device, &cpi)) != 0)
+		return (1);
+
 	ccb = cam_getccb(device);
 
 	if (ccb == NULL) {
@@ -913,6 +917,8 @@ scsixferrate(struct cam_device *device)
 
 	}
 
+	speed = cpi.base_transfer_speed;
+	freq = 0;
 	if (ccb->cts.transport == XPORT_SPI) {
 		struct ccb_trans_settings_spi *spi =
 		    &ccb->cts.xport_specific.spi;
@@ -920,31 +926,44 @@ scsixferrate(struct cam_device *device)
 		if ((spi->valid & CTS_SPI_VALID_SYNC_RATE) != 0) {
 			freq = scsi_calc_syncsrate(spi->sync_period);
 			speed = freq;
-		} else {
-			struct ccb_pathinq cpi;
-
-			retval = get_cpi(device, &cpi);
-			if (retval == 0) {
-				speed = cpi.base_transfer_speed;
-				freq = 0;
-			}
 		}
-
-		fprintf(stdout, "%s%d: ", device->device_name,
-			device->dev_unit_num);
-
 		if ((spi->valid & CTS_SPI_VALID_BUS_WIDTH) != 0) {
 			speed *= (0x01 << spi->bus_width);
 		}
+	} else if (ccb->cts.transport == XPORT_FC) {
+		struct ccb_trans_settings_fc *fc =
+		    &ccb->cts.xport_specific.fc;
+
+		if (fc->valid & CTS_FC_VALID_SPEED)
+			speed = fc->bitrate;
+	} else if (ccb->cts.transport == XPORT_SAS) {
+		struct ccb_trans_settings_sas *sas =
+		    &ccb->cts.xport_specific.sas;
+
+		if (sas->valid & CTS_SAS_VALID_SPEED)
+			speed = sas->bitrate;
+	} else if (ccb->cts.transport == XPORT_SATA) {
+		struct ccb_trans_settings_sata *sata =
+		    &ccb->cts.xport_specific.sata;
+
+		if (sata->valid & CTS_SATA_VALID_SPEED)
+			speed = sata->bitrate;
+	}
+
+	mb = speed / 1000;
+	if (mb > 0) {
+		fprintf(stdout, "%s%d: %d.%03dMB/s transfers ",
+			device->device_name, device->dev_unit_num,
+			mb, speed % 1000);
+	} else {
+		fprintf(stdout, "%s%d: %dKB/s transfers ",
+			device->device_name, device->dev_unit_num,
+			speed);
+	}
 
-		mb = speed / 1000;
-
-		if (mb > 0) 
-			fprintf(stdout, "%d.%03dMB/s transfers ",
-				mb, speed % 1000);
-		else
-			fprintf(stdout, "%dKB/s transfers ",
-				speed);
+	if (ccb->cts.transport == XPORT_SPI) {
+		struct ccb_trans_settings_spi *spi =
+		    &ccb->cts.xport_specific.spi;
 
 		if (((spi->valid & CTS_SPI_VALID_SYNC_OFFSET) != 0)
 		 && (spi->sync_offset != 0))
@@ -964,25 +983,22 @@ scsixferrate(struct cam_device *device)
 		 && (spi->sync_offset != 0)) {
 			fprintf(stdout, ")");
 		}
-	} else {
-		struct ccb_pathinq cpi;
-
-		retval = get_cpi(device, &cpi);
-
-		if (retval != 0)
-			goto xferrate_bailout;
-
-		speed = cpi.base_transfer_speed;
-		freq = 0;
-
-		mb = speed / 1000;
-
-		if (mb > 0) 
-			fprintf(stdout, "%d.%03dMB/s transfers ",
-				mb, speed % 1000);
-		else
-			fprintf(stdout, "%dKB/s transfers ",
-				speed);
+	} else if (ccb->cts.transport == XPORT_ATA) {
+		struct ccb_trans_settings_ata *ata =
+		    &ccb->cts.xport_specific.ata;
+
+		if (ata->valid & CTS_ATA_VALID_BYTECOUNT) {
+			fprintf(stdout, "(PIO size %dbytes)",
+			    ata->bytecount);
+		}
+	} else if (ccb->cts.transport == XPORT_SATA) {
+		struct ccb_trans_settings_sata *sata =
+		    &ccb->cts.xport_specific.sata;
+
+		if (sata->valid & CTS_SATA_VALID_BYTECOUNT) {
+			fprintf(stdout, "(PIO size %dbytes)",
+			    sata->bytecount);
+		}
 	}
 
 	if (ccb->cts.protocol == PROTO_SCSI) {
@@ -1305,6 +1321,7 @@ ataidentify(struct cam_device *device, i
 	fprintf(stdout, "%s%d: ", device->device_name,
 		device->dev_unit_num);
 	ata_print_ident(ident_buf);
+	camxferrate(device);
 	atacapprint(ident_buf);
 
 	free(ident_buf);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:48:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19B87106566C;
	Tue, 17 Nov 2009 20:48:33 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0917B8FC18;
	Tue, 17 Nov 2009 20:48:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKmW4g037550;
	Tue, 17 Nov 2009 20:48:32 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKmWPP037548;
	Tue, 17 Nov 2009 20:48:32 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200911172048.nAHKmWPP037548@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 17 Nov 2009 20:48:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199433 - stable/7/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:48:33 -0000

Author: bz
Date: Tue Nov 17 20:48:32 2009
New Revision: 199433
URL: http://svn.freebsd.org/changeset/base/199433

Log:
  MFC r198049:
  
    Immediately after clearing a pending callout that didn't make it due
    to the lock we hold, disable interrupts, and announce to the firmware
    that we are shutting down. Especially do this before disabling blocks.
  
    This makes some types of machines with asf enabled no longer hang upon
    boot, when we start configuring the interface.
  
  PR:	i386/96382, kern/100410, kern/122252, kern/116328

Modified:
  stable/7/sys/dev/bge/if_bge.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/bge/if_bge.c
==============================================================================
--- stable/7/sys/dev/bge/if_bge.c	Tue Nov 17 20:45:49 2009	(r199432)
+++ stable/7/sys/dev/bge/if_bge.c	Tue Nov 17 20:48:32 2009	(r199433)
@@ -4213,6 +4213,16 @@ bge_stop(struct bge_softc *sc)
 
 	callout_stop(&sc->bge_stat_ch);
 
+	/* Disable host interrupts. */
+	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
+	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
+
+	/*
+	 * Tell firmware we're shutting down.
+	 */
+	bge_stop_fw(sc);
+	bge_sig_pre_reset(sc, BGE_RESET_STOP);
+
 	/*
 	 * Disable all of the receiver blocks.
 	 */
@@ -4252,16 +4262,6 @@ bge_stop(struct bge_softc *sc)
 		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
 	}
 
-	/* Disable host interrupts. */
-	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
-	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
-
-	/*
-	 * Tell firmware we're shutting down.
-	 */
-
-	bge_stop_fw(sc);
-	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 	bge_reset(sc);
 	bge_sig_legacy(sc, BGE_RESET_STOP);
 	bge_sig_post_reset(sc, BGE_RESET_STOP);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:49:09 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B5EBE10656A4;
	Tue, 17 Nov 2009 20:49:09 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A525B8FC20;
	Tue, 17 Nov 2009 20:49:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKn9nX037605;
	Tue, 17 Nov 2009 20:49:09 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKn9Gf037603;
	Tue, 17 Nov 2009 20:49:09 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200911172049.nAHKn9Gf037603@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 17 Nov 2009 20:49:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199434 - stable/6/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:49:09 -0000

Author: bz
Date: Tue Nov 17 20:49:09 2009
New Revision: 199434
URL: http://svn.freebsd.org/changeset/base/199434

Log:
  MFC r198049:
  
    Immediately after clearing a pending callout that didn't make it due
    to the lock we hold, disable interrupts, and announce to the firmware
    that we are shutting down. Especially do this before disabling blocks.
  
    This makes some types of machines with asf enabled no longer hang upon
    boot, when we start configuring the interface.
  
  PR:	i386/96382, kern/100410, kern/122252, kern/116328

Modified:
  stable/6/sys/dev/bge/if_bge.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/dev/bge/if_bge.c
==============================================================================
--- stable/6/sys/dev/bge/if_bge.c	Tue Nov 17 20:48:32 2009	(r199433)
+++ stable/6/sys/dev/bge/if_bge.c	Tue Nov 17 20:49:09 2009	(r199434)
@@ -4146,6 +4146,16 @@ bge_stop(struct bge_softc *sc)
 
 	callout_stop(&sc->bge_stat_ch);
 
+	/* Disable host interrupts. */
+	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
+	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
+
+	/*
+	 * Tell firmware we're shutting down.
+	 */
+	bge_stop_fw(sc);
+	bge_sig_pre_reset(sc, BGE_RESET_STOP);
+
 	/*
 	 * Disable all of the receiver blocks.
 	 */
@@ -4185,16 +4195,6 @@ bge_stop(struct bge_softc *sc)
 		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
 	}
 
-	/* Disable host interrupts. */
-	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
-	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
-
-	/*
-	 * Tell firmware we're shutting down.
-	 */
-
-	bge_stop_fw(sc);
-	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 	bge_reset(sc);
 	bge_sig_legacy(sc, BGE_RESET_STOP);
 	bge_sig_post_reset(sc, BGE_RESET_STOP);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:49:26 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A314E1065697;
	Tue, 17 Nov 2009 20:49:26 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 914638FC20;
	Tue, 17 Nov 2009 20:49:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKnQcB037658;
	Tue, 17 Nov 2009 20:49:26 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKnQwu037653;
	Tue, 17 Nov 2009 20:49:26 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172049.nAHKnQwu037653@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:49:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199435 - in stable/8/sys/cam: . ata scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:49:26 -0000

Author: mav
Date: Tue Nov 17 20:49:26 2009
New Revision: 199435
URL: http://svn.freebsd.org/changeset/base/199435

Log:
  MFC r198748, r198782:
  Fix reference counting bug, when device unreferenced before
  invalidated. To do it, do not handle validity flag as another
  reference, but explicitly modify reference count each time flag is
  modified.
  The async callback could free the device. If it is a broadcast async,
  it doesn't hold device reference, so take our own reference.

Modified:
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/cam/cam_xpt_internal.h
  stable/8/sys/cam/scsi/scsi_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 20:49:09 2009	(r199434)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 20:49:26 2009	(r199435)
@@ -733,6 +733,7 @@ noerror:
 	case PROBE_SET_MULTI:
 		if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
 			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+			xpt_acquire_device(path->device);
 			done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
 			xpt_action(done_ccb);
 			xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path,
@@ -777,6 +778,7 @@ noerror:
 		ata_device_transport(path);
 		if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
 			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+			xpt_acquire_device(path->device);
 			done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
 			xpt_action(done_ccb);
 			xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, done_ccb);
@@ -810,6 +812,7 @@ noerror:
 		path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
 		if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
 			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+			xpt_acquire_device(path->device);
 			done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
 			xpt_action(done_ccb);
 			xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path,
@@ -1485,8 +1488,10 @@ ata_dev_async(u_int32_t async_code, stru
 				     CAM_EXPECT_INQ_CHANGE, NULL);
 		}
 		xpt_release_path(&newpath);
-	} else if (async_code == AC_LOST_DEVICE) {
+	} else if (async_code == AC_LOST_DEVICE &&
+	    (device->flags & CAM_DEV_UNCONFIGURED) == 0) {
 		device->flags |= CAM_DEV_UNCONFIGURED;
+		xpt_release_device(device);
 	} else if (async_code == AC_TRANSFER_NEG) {
 		struct ccb_trans_settings *settings;
 

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 20:49:09 2009	(r199434)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 20:49:26 2009	(r199435)
@@ -217,9 +217,7 @@ static void	 xpt_release_devq_device(str
 					 int run_queue);
 static struct cam_et*
 		 xpt_alloc_target(struct cam_eb *bus, target_id_t target_id);
-static void	 xpt_release_target(struct cam_eb *bus, struct cam_et *target);
-static void	 xpt_release_device(struct cam_eb *bus, struct cam_et *target,
-				    struct cam_ed *device);
+static void	 xpt_release_target(struct cam_et *target);
 static struct cam_eb*
 		 xpt_find_bus(path_id_t path_id);
 static struct cam_et*
@@ -3521,9 +3519,9 @@ xpt_compile_path(struct cam_path *new_pa
 		CAM_DEBUG(new_path, CAM_DEBUG_TRACE, ("xpt_compile_path\n"));
 	} else {
 		if (device != NULL)
-			xpt_release_device(bus, target, device);
+			xpt_release_device(device);
 		if (target != NULL)
-			xpt_release_target(bus, target);
+			xpt_release_target(target);
 		if (bus != NULL)
 			xpt_release_bus(bus);
 	}
@@ -3535,11 +3533,11 @@ xpt_release_path(struct cam_path *path)
 {
 	CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_release_path\n"));
 	if (path->device != NULL) {
-		xpt_release_device(path->bus, path->target, path->device);
+		xpt_release_device(path->device);
 		path->device = NULL;
 	}
 	if (path->target != NULL) {
-		xpt_release_target(path->bus, path->target);
+		xpt_release_target(path->target);
 		path->target = NULL;
 	}
 	if (path->bus != NULL) {
@@ -4024,13 +4022,19 @@ xpt_async(u_int32_t async_code, struct c
 			 && path->device->lun_id != CAM_LUN_WILDCARD
 			 && device->lun_id != CAM_LUN_WILDCARD)
 				continue;
-
+			/*
+			 * The async callback could free the device.
+			 * If it is a broadcast async, it doesn't hold
+			 * device reference, so take our own reference.
+			 */
+			xpt_acquire_device(device);
 			(*(bus->xport->async))(async_code, bus,
 					       target, device,
 					       async_arg);
 
 			xpt_async_bcast(&device->asyncs, async_code,
 					path, async_arg);
+			xpt_release_device(device);
 		}
 	}
 
@@ -4375,15 +4379,15 @@ xpt_alloc_target(struct cam_eb *bus, tar
 }
 
 static void
-xpt_release_target(struct cam_eb *bus, struct cam_et *target)
+xpt_release_target(struct cam_et *target)
 {
 
 	if ((--target->refcount == 0)
 	 && (TAILQ_FIRST(&target->ed_entries) == NULL)) {
-		TAILQ_REMOVE(&bus->et_entries, target, links);
-		bus->generation++;
+		TAILQ_REMOVE(&target->bus->et_entries, target, links);
+		target->bus->generation++;
+		xpt_release_bus(target->bus);
 		free(target, M_CAMXPT);
-		xpt_release_bus(bus);
 	}
 }
 
@@ -4470,13 +4474,18 @@ xpt_alloc_device(struct cam_eb *bus, str
 	return (device);
 }
 
-static void
-xpt_release_device(struct cam_eb *bus, struct cam_et *target,
-		   struct cam_ed *device)
+void
+xpt_acquire_device(struct cam_ed *device)
+{
+
+	device->refcount++;
+}
+
+void
+xpt_release_device(struct cam_ed *device)
 {
 
-	if ((--device->refcount == 0)
-	 && ((device->flags & CAM_DEV_UNCONFIGURED) != 0)) {
+	if (--device->refcount == 0) {
 		struct cam_devq *devq;
 
 		if (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX
@@ -4486,16 +4495,16 @@ xpt_release_device(struct cam_eb *bus, s
 		if ((device->flags & CAM_DEV_REL_TIMEOUT_PENDING) != 0)
 				callout_stop(&device->callout);
 
-		TAILQ_REMOVE(&target->ed_entries, device,links);
-		target->generation++;
-		bus->sim->max_ccbs -= device->ccbq.devq_openings;
+		TAILQ_REMOVE(&device->target->ed_entries, device,links);
+		device->target->generation++;
+		device->target->bus->sim->max_ccbs -= device->ccbq.devq_openings;
 		/* Release our slot in the devq */
-		devq = bus->sim->devq;
+		devq = device->target->bus->sim->devq;
 		cam_devq_resize(devq, devq->alloc_queue.array_size - 1);
 		camq_fini(&device->drvq);
 		cam_ccbq_fini(&device->ccbq);
+		xpt_release_target(device->target);
 		free(device, M_CAMXPT);
-		xpt_release_target(bus, target);
 	}
 }
 

Modified: stable/8/sys/cam/cam_xpt_internal.h
==============================================================================
--- stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 20:49:09 2009	(r199434)
+++ stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 20:49:26 2009	(r199435)
@@ -37,9 +37,7 @@ struct cam_ed;
 typedef struct cam_ed * (*xpt_alloc_device_func)(struct cam_eb *bus,
 					         struct cam_et *target,
 					         lun_id_t lun_id);
-typedef void (*xpt_release_device_func)(struct cam_eb *bus,
-				        struct cam_et *target,
-				        struct cam_ed *device);
+typedef void (*xpt_release_device_func)(struct cam_ed *device);
 typedef void (*xpt_action_func)(union ccb *start_ccb);
 typedef void (*xpt_dev_async_func)(u_int32_t async_code,
 				   struct cam_eb *bus,
@@ -172,6 +170,8 @@ struct xpt_xport *	ata_get_xport(void);
 struct cam_ed *		xpt_alloc_device(struct cam_eb *bus,
 					 struct cam_et *target,
 					 lun_id_t lun_id);
+void			xpt_acquire_device(struct cam_ed *device);
+void			xpt_release_device(struct cam_ed *device);
 void			xpt_run_dev_sendq(struct cam_eb *bus);
 int			xpt_schedule_dev(struct camq *queue, cam_pinfo *dev_pinfo,
 					 u_int32_t new_priority);

Modified: stable/8/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_xpt.c	Tue Nov 17 20:49:09 2009	(r199434)
+++ stable/8/sys/cam/scsi/scsi_xpt.c	Tue Nov 17 20:49:26 2009	(r199435)
@@ -1076,8 +1076,10 @@ probedone(struct cam_periph *periph, uni
 				else
 					PROBE_SET_ACTION(softc, PROBE_SERIAL_NUM_0);
 
-				path->device->flags &= ~CAM_DEV_UNCONFIGURED;
-
+				if (path->device->flags & CAM_DEV_UNCONFIGURED) {
+					path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+					xpt_acquire_device(path->device);
+				}
 				xpt_release_ccb(done_ccb);
 				xpt_schedule(periph, priority);
 				return;
@@ -1336,8 +1338,12 @@ probedone(struct cam_periph *periph, uni
 			CAM_DEBUG(periph->path, CAM_DEBUG_INFO,
 			    ("Leave Domain Validation\n"));
 		}
+		if (path->device->flags & CAM_DEV_UNCONFIGURED) {
+			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+			xpt_acquire_device(path->device);
+		}
 		path->device->flags &=
-		    ~(CAM_DEV_UNCONFIGURED|CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM);
+		    ~(CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM);
 		if ((softc->flags & PROBE_NO_ANNOUNCE) == 0) {
 			/* Inform the XPT that a new device has been found */
 			done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
@@ -1387,8 +1393,12 @@ probedone(struct cam_periph *periph, uni
 			CAM_DEBUG(periph->path, CAM_DEBUG_INFO,
 			    ("Leave Domain Validation Successfully\n"));
 		}
+		if (path->device->flags & CAM_DEV_UNCONFIGURED) {
+			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
+			xpt_acquire_device(path->device);
+		}
 		path->device->flags &=
-		    ~(CAM_DEV_UNCONFIGURED|CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM);
+		    ~(CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM);
 		if ((softc->flags & PROBE_NO_ANNOUNCE) == 0) {
 			/* Inform the XPT that a new device has been found */
 			done_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
@@ -2375,8 +2385,10 @@ scsi_dev_async(u_int32_t async_code, str
 				     CAM_EXPECT_INQ_CHANGE, NULL);
 		}
 		xpt_release_path(&newpath);
-	} else if (async_code == AC_LOST_DEVICE) {
+	} else if (async_code == AC_LOST_DEVICE &&
+	    (device->flags & CAM_DEV_UNCONFIGURED) == 0) {
 		device->flags |= CAM_DEV_UNCONFIGURED;
+		xpt_release_device(device);
 	} else if (async_code == AC_TRANSFER_NEG) {
 		struct ccb_trans_settings *settings;
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:54:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 84AB0106566B;
	Tue, 17 Nov 2009 20:54:52 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 741BA8FC0A;
	Tue, 17 Nov 2009 20:54:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKsqBO037902;
	Tue, 17 Nov 2009 20:54:52 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKsqBi037900;
	Tue, 17 Nov 2009 20:54:52 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172054.nAHKsqBi037900@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:54:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199436 - stable/8/sys/cam/scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:54:52 -0000

Author: mav
Date: Tue Nov 17 20:54:52 2009
New Revision: 199436
URL: http://svn.freebsd.org/changeset/base/199436

Log:
  MFC r198832:
  Provide the same sanity check on the sector size in dagetcapacity as when the
  disk is first probed. dagetcapacity is called whenever the disk is opened from
  geom via d_open(), a zero sector size will cause geom to panic later on.

Modified:
  stable/8/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 20:49:26 2009	(r199435)
+++ stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 20:54:52 2009	(r199436)
@@ -1948,8 +1948,15 @@ dagetcapacity(struct cam_periph *periph)
 
 done:
 
-	if (error == 0)
-		dasetgeom(periph, block_len, maxsector);
+	if (error == 0) {
+		if (block_len >= MAXPHYS || block_len == 0) {
+			xpt_print(periph->path,
+			    "unsupportable block size %ju\n",
+			    (uintmax_t) block_len);
+			error = EINVAL;
+		} else
+			dasetgeom(periph, block_len, maxsector);
+	}
 
 	xpt_release_ccb(ccb);
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:56:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DBDC91065695;
	Tue, 17 Nov 2009 20:56:14 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBA528FC16;
	Tue, 17 Nov 2009 20:56:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKuEkR038044;
	Tue, 17 Nov 2009 20:56:14 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKuEXf038039;
	Tue, 17 Nov 2009 20:56:14 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911172056.nAHKuEXf038039@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 20:56:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199437 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:56:15 -0000

Author: tuexen
Date: Tue Nov 17 20:56:14 2009
New Revision: 199437
URL: http://svn.freebsd.org/changeset/base/199437

Log:
  Use always LIST_EMPTY instead of sometime SCTP_LIST_EMPTY,
  which is defined as LIST_EMPTY.
  
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/netinet/sctp_auth.c
  head/sys/netinet/sctp_os_bsd.h
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_auth.c
==============================================================================
--- head/sys/netinet/sctp_auth.c	Tue Nov 17 20:54:52 2009	(r199436)
+++ head/sys/netinet/sctp_auth.c	Tue Nov 17 20:56:14 2009	(r199437)
@@ -573,7 +573,7 @@ sctp_insert_sharedkey(struct sctp_keyhea
 		return (EINVAL);
 
 	/* insert into an empty list? */
-	if (SCTP_LIST_EMPTY(shared_keys)) {
+	if (LIST_EMPTY(shared_keys)) {
 		LIST_INSERT_HEAD(shared_keys, new_skey, next);
 		return (0);
 	}

Modified: head/sys/netinet/sctp_os_bsd.h
==============================================================================
--- head/sys/netinet/sctp_os_bsd.h	Tue Nov 17 20:54:52 2009	(r199436)
+++ head/sys/netinet/sctp_os_bsd.h	Tue Nov 17 20:56:14 2009	(r199437)
@@ -153,7 +153,6 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT);
  *
  */
 #define USER_ADDR_NULL	(NULL)	/* FIX ME: temp */
-#define SCTP_LIST_EMPTY(list)	LIST_EMPTY(list)
 
 #if defined(SCTP_DEBUG)
 #define SCTPDBG(level, params...)					\

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Tue Nov 17 20:54:52 2009	(r199436)
+++ head/sys/netinet/sctp_pcb.c	Tue Nov 17 20:56:14 2009	(r199437)
@@ -452,7 +452,7 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa
 			sctp_ifap->ifn_p->num_v4--;
 
 		ifn_index = sctp_ifap->ifn_p->ifn_index;
-		if (SCTP_LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) {
+		if (LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) {
 			/* remove the ifn, possibly freeing it */
 			sctp_delete_ifn(sctp_ifap->ifn_p, SCTP_ADDR_LOCKED);
 		} else {
@@ -4262,7 +4262,7 @@ sctp_delete_from_timewait(uint32_t tag, 
 	int i;
 
 	chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)];
-	if (!SCTP_LIST_EMPTY(chain)) {
+	if (!LIST_EMPTY(chain)) {
 		LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) {
 			for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) {
 				if ((twait_block->vtag_block[i].v_tag == tag) &&
@@ -4292,7 +4292,7 @@ sctp_is_in_timewait(uint32_t tag, uint16
 
 	SCTP_INP_INFO_WLOCK();
 	chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)];
-	if (!SCTP_LIST_EMPTY(chain)) {
+	if (!LIST_EMPTY(chain)) {
 		LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) {
 			for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) {
 				if ((twait_block->vtag_block[i].v_tag == tag) &&
@@ -4326,7 +4326,7 @@ sctp_add_vtag_to_timewait(uint32_t tag, 
 	(void)SCTP_GETTIME_TIMEVAL(&now);
 	chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)];
 	set = 0;
-	if (!SCTP_LIST_EMPTY(chain)) {
+	if (!LIST_EMPTY(chain)) {
 		/* Block(s) present, lets find space, and expire on the fly */
 		LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) {
 			for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) {
@@ -4953,7 +4953,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, 
 		sctp_free_remote_addr(net);
 	}
 
-	while (!SCTP_LIST_EMPTY(&asoc->sctp_restricted_addrs)) {
+	while (!LIST_EMPTY(&asoc->sctp_restricted_addrs)) {
 		/* sa_ignore FREED_MEMORY */
 		laddr = LIST_FIRST(&asoc->sctp_restricted_addrs);
 		sctp_remove_laddr(laddr);
@@ -5617,7 +5617,7 @@ sctp_pcb_finish(void)
 	 */
 	for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) {
 		chain = &SCTP_BASE_INFO(vtag_timewait)[i];
-		if (!SCTP_LIST_EMPTY(chain)) {
+		if (!LIST_EMPTY(chain)) {
 			prev_twait_block = NULL;
 			LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) {
 				if (prev_twait_block) {
@@ -6387,7 +6387,7 @@ skip_vtag_check:
 
 	chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))];
 	/* Now what about timed wait ? */
-	if (!SCTP_LIST_EMPTY(chain)) {
+	if (!LIST_EMPTY(chain)) {
 		/*
 		 * Block(s) are present, lets see if we have this tag in the
 		 * list

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Tue Nov 17 20:54:52 2009	(r199436)
+++ head/sys/netinet/sctp_usrreq.c	Tue Nov 17 20:56:14 2009	(r199437)
@@ -759,7 +759,7 @@ sctp_disconnect(struct socket *so)
 	SCTP_INP_RLOCK(inp);
 	if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
 	    (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
-		if (SCTP_LIST_EMPTY(&inp->sctp_asoc_list)) {
+		if (LIST_EMPTY(&inp->sctp_asoc_list)) {
 			/* No connection */
 			SCTP_INP_RUNLOCK(inp);
 			return (0);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:56:24 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7EE68106578D;
	Tue, 17 Nov 2009 20:56:24 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CE948FC18;
	Tue, 17 Nov 2009 20:56:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKuOt5038095;
	Tue, 17 Nov 2009 20:56:24 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKuOHu038089;
	Tue, 17 Nov 2009 20:56:24 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172056.nAHKuOHu038089@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:56:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199438 - in stable/8/sys/cam: . ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:56:24 -0000

Author: mav
Date: Tue Nov 17 20:56:24 2009
New Revision: 199438
URL: http://svn.freebsd.org/changeset/base/199438

Log:
  MFC r198849:
  Improve reporting ATA Status error details.

Modified:
  stable/8/sys/cam/ata/ata_all.c
  stable/8/sys/cam/ata/ata_all.h
  stable/8/sys/cam/cam.c
  stable/8/sys/cam/cam.h
  stable/8/sys/cam/cam_periph.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_all.c
==============================================================================
--- stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 20:56:14 2009	(r199437)
+++ stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 20:56:24 2009	(r199438)
@@ -68,6 +68,185 @@ ata_version(int ver)
 	return 0;
 }
 
+char *
+ata_op_string(struct ata_cmd *cmd)
+{
+
+	switch (cmd->command) {
+	case 0x00: return ("NOP");
+	case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR");
+	case 0x08: return ("DEVICE_RESET");
+	case 0x20: return ("READ");
+	case 0x24: return ("READ48");
+	case 0x25: return ("READ_DMA48");
+	case 0x26: return ("READ_DMA_QUEUED48");
+	case 0x27: return ("READ_NATIVE_MAX_ADDRESS48");
+	case 0x29: return ("READ_MUL48");
+	case 0x2a: return ("READ_STREAM_DMA48");
+	case 0x2b: return ("READ_STREAM48");
+	case 0x2f: return ("READ_LOG_EXT");
+	case 0x30: return ("WRITE");
+	case 0x34: return ("WRITE48");
+	case 0x35: return ("WRITE_DMA48");
+	case 0x36: return ("WRITE_DMA_QUEUED48");
+	case 0x37: return ("SET_MAX_ADDRESS48");
+	case 0x39: return ("WRITE_MUL48");
+	case 0x3a: return ("WRITE_STREAM_DMA48");
+	case 0x3b: return ("WRITE_STREAM48");
+	case 0x3d: return ("WRITE_DMA_FUA");
+	case 0x3e: return ("WRITE_DMA_FUA48");
+	case 0x3f: return ("WRITE_LOG_EXT");
+	case 0x40: return ("READ_VERIFY");
+	case 0x42: return ("READ_VERIFY48");
+	case 0x51: return ("CONFIGURE_STREAM");
+	case 0x60: return ("READ_FPDMA_QUEUED");
+	case 0x61: return ("WRITE_FPDMA_QUEUED");
+	case 0x70: return ("SEEK");
+	case 0x87: return ("CFA_TRANSLATE_SECTOR");
+	case 0x90: return ("EXECUTE_DEVICE_DIAGNOSTIC");
+	case 0x92: return ("DOWNLOAD_MICROCODE");
+	case 0xa0: return ("PACKET");
+	case 0xa1: return ("ATAPI_IDENTIFY");
+	case 0xa2: return ("SERVICE");
+	case 0xb0: return ("SMART");
+	case 0xb1: return ("DEVICE CONFIGURATION");
+	case 0xc0: return ("CFA_ERASE");
+	case 0xc4: return ("READ_MUL");
+	case 0xc5: return ("WRITE_MUL");
+	case 0xc6: return ("SET_MULTI");
+	case 0xc7: return ("READ_DMA_QUEUED");
+	case 0xc8: return ("READ_DMA");
+	case 0xca: return ("WRITE_DMA");
+	case 0xcc: return ("WRITE_DMA_QUEUED");
+	case 0xcd: return ("CFA_WRITE_MULTIPLE_WITHOUT_ERASE");
+	case 0xce: return ("WRITE_MULTIPLE_FUA48");
+	case 0xd1: return ("CHECK_MEDIA_CARD_TYPE");
+	case 0xda: return ("GET_MEDIA_STATUS");
+	case 0xde: return ("MEDIA_LOCK");
+	case 0xdf: return ("MEDIA_UNLOCK");
+	case 0xe0: return ("STANDBY_IMMEDIATE");
+	case 0xe1: return ("IDLE_IMMEDIATE");
+	case 0xe2: return ("STANDBY");
+	case 0xe3: return ("IDLE");
+	case 0xe4: return ("READ_BUFFER/PM");
+	case 0xe5: return ("CHECK_POWER_MODE");
+	case 0xe6: return ("SLEEP");
+	case 0xe7: return ("FLUSHCACHE");
+	case 0xe8: return ("WRITE_PM");
+	case 0xea: return ("FLUSHCACHE48");
+	case 0xec: return ("ATA_IDENTIFY");
+	case 0xed: return ("MEDIA_EJECT");
+	case 0xef:
+		switch (cmd->features) {
+	        case 0x03: return ("SETFEATURES SET TRANSFER MODE");
+	        case 0x02: return ("SETFEATURES ENABLE WCACHE");
+	        case 0x82: return ("SETFEATURES DISABLE WCACHE");
+	        case 0xaa: return ("SETFEATURES ENABLE RCACHE");
+	        case 0x55: return ("SETFEATURES DISABLE RCACHE");
+	        }
+	        return "SETFEATURES";
+	case 0xf1: return ("SECURITY_SET_PASSWORD");
+	case 0xf2: return ("SECURITY_UNLOCK");
+	case 0xf3: return ("SECURITY_ERASE_PREPARE");
+	case 0xf4: return ("SECURITY_ERASE_UNIT");
+	case 0xf5: return ("SECURITY_FREE_LOCK");
+	case 0xf6: return ("SECURITY DISABLE PASSWORD");
+	case 0xf8: return ("READ_NATIVE_MAX_ADDRESS");
+	case 0xf9: return ("SET_MAX_ADDRESS");
+	}
+	return "UNKNOWN";
+}
+
+char *
+ata_cmd_string(struct ata_cmd *cmd, char *cmd_string, size_t len)
+{
+
+	snprintf(cmd_string, len, "%02x %02x %02x %02x "
+	    "%02x %02x %02x %02x %02x %02x %02x %02x",
+	    cmd->command, cmd->features,
+	    cmd->lba_low, cmd->lba_mid, cmd->lba_high, cmd->device,
+	    cmd->lba_low_exp, cmd->lba_mid_exp, cmd->lba_high_exp,
+	    cmd->features_exp, cmd->sector_count, cmd->sector_count_exp);
+
+	return(cmd_string);
+}
+
+char *
+ata_res_string(struct ata_res *res, char *res_string, size_t len)
+{
+
+	snprintf(res_string, len, "%02x %02x %02x %02x "
+	    "%02x %02x %02x %02x %02x %02x %02x",
+	    res->status, res->error,
+	    res->lba_low, res->lba_mid, res->lba_high, res->device,
+	    res->lba_low_exp, res->lba_mid_exp, res->lba_high_exp,
+	    res->sector_count, res->sector_count_exp);
+
+	return(res_string);
+}
+
+/*
+ * ata_command_sbuf() returns 0 for success and -1 for failure.
+ */
+int
+ata_command_sbuf(struct ccb_ataio *ataio, struct sbuf *sb)
+{
+	char cmd_str[(12 * 3) + 1];
+
+	sbuf_printf(sb, "CMD: %s: %s",
+	    ata_op_string(&ataio->cmd),
+	    ata_cmd_string(&ataio->cmd, cmd_str, sizeof(cmd_str)));
+
+	return(0);
+}
+
+/*
+ * ata_status_abuf() returns 0 for success and -1 for failure.
+ */
+int
+ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb)
+{
+
+	sbuf_printf(sb, "ATA Status: %02x (%s%s%s%s%s%s%s%s)",
+	    ataio->res.status,
+	    (ataio->res.status & 0x80) ? "BSY " : "",
+	    (ataio->res.status & 0x40) ? "DRDY " : "",
+	    (ataio->res.status & 0x20) ? "DF " : "",
+	    (ataio->res.status & 0x10) ? "SERV " : "",
+	    (ataio->res.status & 0x08) ? "DRQ " : "",
+	    (ataio->res.status & 0x04) ? "CORR " : "",
+	    (ataio->res.status & 0x02) ? "IDX " : "",
+	    (ataio->res.status & 0x01) ? "ERR" : "");
+	if (ataio->res.status & 1) {
+	    sbuf_printf(sb, ", Error: %02x (%s%s%s%s%s%s%s%s)",
+		ataio->res.error,
+		(ataio->res.error & 0x80) ? "ICRC " : "",
+		(ataio->res.error & 0x40) ? "UNC " : "",
+		(ataio->res.error & 0x20) ? "MC " : "",
+		(ataio->res.error & 0x10) ? "IDNF " : "",
+		(ataio->res.error & 0x08) ? "MCR " : "",
+		(ataio->res.error & 0x04) ? "ABRT " : "",
+		(ataio->res.error & 0x02) ? "NM " : "",
+		(ataio->res.error & 0x01) ? "ILI" : "");
+	}
+
+	return(0);
+}
+
+/*
+ * ata_res_sbuf() returns 0 for success and -1 for failure.
+ */
+int
+ata_res_sbuf(struct ccb_ataio *ataio, struct sbuf *sb)
+{
+	char res_str[(11 * 3) + 1];
+
+	sbuf_printf(sb, "RES: %s",
+	    ata_res_string(&ataio->res, res_str, sizeof(res_str)));
+
+	return(0);
+}
+
 void
 ata_print_ident(struct ata_params *ident_data)
 {

Modified: stable/8/sys/cam/ata/ata_all.h
==============================================================================
--- stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 20:56:14 2009	(r199437)
+++ stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 20:56:24 2009	(r199438)
@@ -81,6 +81,14 @@ struct ata_res {
 };
 
 int	ata_version(int ver);
+
+char *	ata_op_string(struct ata_cmd *cmd);
+char *	ata_cmd_string(struct ata_cmd *cmd, char *cmd_string, size_t len);
+char *	ata_res_string(struct ata_res *res, char *res_string, size_t len);
+int	ata_command_sbuf(struct ccb_ataio *ataio, struct sbuf *sb);
+int	ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb);
+int	ata_res_sbuf(struct ccb_ataio *ataio, struct sbuf *sb);
+
 void	ata_print_ident(struct ata_params *ident_data);
 
 void	ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,

Modified: stable/8/sys/cam/cam.c
==============================================================================
--- stable/8/sys/cam/cam.c	Tue Nov 17 20:56:14 2009	(r199437)
+++ stable/8/sys/cam/cam.c	Tue Nov 17 20:56:24 2009	(r199438)
@@ -229,6 +229,21 @@ cam_error_string(struct cam_device *devi
 		return(NULL);
 
 	switch (ccb->ccb_h.func_code) {
+		case XPT_ATA_IO:
+			switch (proto_flags & CAM_EPF_LEVEL_MASK) {
+			case CAM_EPF_NONE:
+				break;
+			case CAM_EPF_ALL:
+			case CAM_EPF_NORMAL:
+				proto_flags |= CAM_EAF_PRINT_RESULT;
+				/* FALLTHROUGH */
+			case CAM_EPF_MINIMAL:
+				proto_flags |= CAM_EAF_PRINT_STATUS;
+				/* FALLTHROUGH */
+			default:
+				break;
+			}
+			break;
 		case XPT_SCSI_IO:
 			switch (proto_flags & CAM_EPF_LEVEL_MASK) {
 			case CAM_EPF_NONE:
@@ -256,10 +271,12 @@ cam_error_string(struct cam_device *devi
 	sbuf_new(&sb, str, str_len, 0);
 
 	if (flags & CAM_ESF_COMMAND) {
-
 		sbuf_cat(&sb, path_str);
-
 		switch (ccb->ccb_h.func_code) {
+		case XPT_ATA_IO:
+			ata_command_sbuf(&ccb->ataio, &sb);
+			sbuf_printf(&sb, "\n");
+			break;
 		case XPT_SCSI_IO:
 #ifdef _KERNEL
 			scsi_command_string(&ccb->csio, &sb);
@@ -267,7 +284,6 @@ cam_error_string(struct cam_device *devi
 			scsi_command_string(device, &ccb->csio, &sb);
 #endif /* _KERNEL/!_KERNEL */
 			sbuf_printf(&sb, "\n");
-			
 			break;
 		default:
 			break;
@@ -295,6 +311,22 @@ cam_error_string(struct cam_device *devi
 	if (flags & CAM_ESF_PROTO_STATUS) {
   
 		switch (ccb->ccb_h.func_code) {
+		case XPT_ATA_IO:
+			if ((ccb->ccb_h.status & CAM_STATUS_MASK) !=
+			     CAM_ATA_STATUS_ERROR)
+				break;
+			if (proto_flags & CAM_EAF_PRINT_STATUS) {
+				sbuf_cat(&sb, path_str);
+				ata_status_sbuf(&ccb->ataio, &sb);
+				sbuf_printf(&sb, "\n");
+			}
+			if (proto_flags & CAM_EAF_PRINT_RESULT) {
+				sbuf_cat(&sb, path_str);
+				ata_res_sbuf(&ccb->ataio, &sb);
+				sbuf_printf(&sb, "\n");
+			}
+
+			break;
 		case XPT_SCSI_IO:
 			if ((ccb->ccb_h.status & CAM_STATUS_MASK) !=
 			     CAM_SCSI_STATUS_ERROR)
@@ -302,10 +334,6 @@ cam_error_string(struct cam_device *devi
 
 			if (proto_flags & CAM_ESF_PRINT_STATUS) {
 				sbuf_cat(&sb, path_str);
-				/*
-				 * Print out the SCSI status byte as long as
-				 * the user wants some protocol output.
-				 */
 				sbuf_printf(&sb, "SCSI Status: %s\n",
 					    scsi_status_string(&ccb->csio));
 			}

Modified: stable/8/sys/cam/cam.h
==============================================================================
--- stable/8/sys/cam/cam.h	Tue Nov 17 20:56:14 2009	(r199437)
+++ stable/8/sys/cam/cam.h	Tue Nov 17 20:56:24 2009	(r199438)
@@ -184,6 +184,12 @@ typedef enum {
 	CAM_ESF_PRINT_SENSE	= 0x20
 } cam_error_scsi_flags;
 
+typedef enum {
+	CAM_EAF_PRINT_NONE	= 0x00,
+	CAM_EAF_PRINT_STATUS	= 0x10,
+	CAM_EAF_PRINT_RESULT	= 0x20
+} cam_error_ata_flags;
+
 struct cam_status_entry
 {
 	cam_status  status_code;

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Tue Nov 17 20:56:14 2009	(r199437)
+++ stable/8/sys/cam/cam_periph.c	Tue Nov 17 20:56:24 2009	(r199438)
@@ -1612,6 +1612,7 @@ cam_periph_error(union ccb *ccb, cam_fla
 		if (bootverbose && printed == 0) {
 			xpt_print(ccb->ccb_h.path,
 			    "Request completed with CAM_ATA_STATUS_ERROR\n");
+			cam_error_print(ccb, CAM_ESF_ALL, CAM_EPF_ALL);
 			printed++;
 		}
 		/* FALLTHROUGH */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:57:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 686471065679;
	Tue, 17 Nov 2009 20:57:35 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 577518FC19;
	Tue, 17 Nov 2009 20:57:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKvZFn038193;
	Tue, 17 Nov 2009 20:57:35 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKvZ17038190;
	Tue, 17 Nov 2009 20:57:35 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172057.nAHKvZ17038190@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:57:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199439 - stable/8/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:57:35 -0000

Author: mav
Date: Tue Nov 17 20:57:35 2009
New Revision: 199439
URL: http://svn.freebsd.org/changeset/base/199439

Log:
  MFC r198851:
  - Handle timeouts and fatal errors with port hard-reset. The rest of
  recovery will be done by XPT on receiving async event. More gracefull
  per-device soft-reset recovery can be implemented later.
  - Add workaround for ATI SB600/SB700 PMP probe related bug, to speedup boot.

Modified:
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/ahci/ahci.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 20:56:24 2009	(r199438)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 20:57:35 2009	(r199439)
@@ -1221,6 +1221,13 @@ ahci_execute_transaction(struct ahci_slo
 				et = AHCI_ERR_TFE;
 				break;
 			}
+			/* Workaround for ATI SB600/SB700 chipsets. */
+			if (ccb->ccb_h.target_id == 15 &&
+			    pci_get_vendor(device_get_parent(dev)) == 0x1002 &&
+			    (ATA_INL(ch->r_mem, AHCI_P_IS) & AHCI_P_IX_IPM)) {
+				et = AHCI_ERR_TIMEOUT;
+				break;
+			}
 		}
 		if (timeout && (count >= timeout)) {
 			device_printf(ch->dev,
@@ -1275,10 +1282,8 @@ ahci_timeout(struct ahci_slot *slot)
 	    ATA_INL(ch->r_mem, AHCI_P_IS), ATA_INL(ch->r_mem, AHCI_P_CI),
 	    ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots,
 	    ATA_INL(ch->r_mem, AHCI_P_TFD), ATA_INL(ch->r_mem, AHCI_P_SERR));
-	/* Kick controller into sane state. */
-	ahci_stop(ch->dev);
-	ahci_start(ch->dev);
 
+	ch->fatalerr = 1;
 	/* Handle frozen command. */
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
@@ -1360,6 +1365,7 @@ ahci_end_transaction(struct ahci_slot *s
 			ccb->csio.scsi_status = SCSI_STATUS_OK;
 		break;
 	case AHCI_ERR_INVALID:
+		ch->fatalerr = 1;
 		ccb->ccb_h.status |= CAM_REQ_INVALID;
 		break;
 	case AHCI_ERR_INNOCENT:
@@ -1375,6 +1381,7 @@ ahci_end_transaction(struct ahci_slot *s
 		}
 		break;
 	case AHCI_ERR_SATA:
+		ch->fatalerr = 1;
 		if (!ch->readlog) {
 			xpt_freeze_simq(ch->sim, 1);
 			ccb->ccb_h.status &= ~CAM_STATUS_MASK;
@@ -1383,6 +1390,10 @@ ahci_end_transaction(struct ahci_slot *s
 		ccb->ccb_h.status |= CAM_UNCOR_PARITY;
 		break;
 	case AHCI_ERR_TIMEOUT:
+		/* Do no treat soft-reset timeout as fatal here. */
+		if (ccb->ccb_h.func_code != XPT_ATA_IO ||
+	            !(ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL))
+			ch->fatalerr = 1;
 		if (!ch->readlog) {
 			xpt_freeze_simq(ch->sim, 1);
 			ccb->ccb_h.status &= ~CAM_STATUS_MASK;
@@ -1391,6 +1402,7 @@ ahci_end_transaction(struct ahci_slot *s
 		ccb->ccb_h.status |= CAM_CMD_TIMEOUT;
 		break;
 	default:
+		ch->fatalerr = 1;
 		ccb->ccb_h.status |= CAM_REQ_CMP_ERR;
 	}
 	/* Free slot. */
@@ -1414,12 +1426,13 @@ ahci_end_transaction(struct ahci_slot *s
 		ahci_begin_transaction(dev, ccb);
 		return;
 	}
+	/* If it was our READ LOG command - process it. */
+	if (ch->readlog) {
+		ahci_process_read_log(dev, ccb);
 	/* If it was NCQ command error, put result on hold. */
-	if (et == AHCI_ERR_NCQ) {
+	} else if (et == AHCI_ERR_NCQ) {
 		ch->hold[slot->slot] = ccb;
-	} else if (ch->readlog)	/* If it was our READ LOG command - process it. */
-		ahci_process_read_log(dev, ccb);
-	else
+	} else
 		xpt_done(ccb);
 	/* Unfreeze frozen command. */
 	if (ch->frozen && ch->numrslots == 0) {
@@ -1428,6 +1441,13 @@ ahci_end_transaction(struct ahci_slot *s
 		ahci_begin_transaction(dev, fccb);
 		xpt_release_simq(ch->sim, TRUE);
 	}
+	/* If we have no other active commands, ... */
+	if (ch->rslots == 0) {
+		/* if there was fatal error - reset port. */
+		if (ch->fatalerr) {
+			ahci_reset(dev);
+		}
+	}
 	/* Start PM timer. */
 	if (ch->numrslots == 0 && ch->pm_level > 3) {
 		callout_schedule(&ch->pm_timer,
@@ -1674,6 +1694,13 @@ ahci_reset(device_t dev)
 		/* XXX; Commands in loading state. */
 		ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT);
 	}
+	for (i = 0; i < ch->numslots; i++) {
+		if (!ch->hold[i])
+			continue;
+		xpt_done(ch->hold[i]);
+		ch->hold[i] = NULL;
+	}
+	ch->fatalerr = 0;
 	/* Tell the XPT about the event */
 	xpt_async(AC_BUS_RESET, ch->path, NULL);
 	/* Disable port interrupts */

Modified: stable/8/sys/dev/ahci/ahci.h
==============================================================================
--- stable/8/sys/dev/ahci/ahci.h	Tue Nov 17 20:56:24 2009	(r199438)
+++ stable/8/sys/dev/ahci/ahci.h	Tue Nov 17 20:57:35 2009	(r199439)
@@ -366,6 +366,7 @@ struct ahci_channel {
 	int			numrslots;	/* Number of running slots */
 	int			numtslots;	/* Number of tagged slots */
 	int			readlog;	/* Our READ LOG active */
+	int			fatalerr;	/* Fatal error happend */
 	int			lastslot;	/* Last used slot */
 	int			taggedtarget;	/* Last tagged target */
 	union ccb		*frozen;	/* Frozen command */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 20:59:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 495A8106568D;
	Tue, 17 Nov 2009 20:59:01 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3745D8FC15;
	Tue, 17 Nov 2009 20:59:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKx1mP038289;
	Tue, 17 Nov 2009 20:59:01 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKx1fC038286;
	Tue, 17 Nov 2009 20:59:01 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172059.nAHKx1fC038286@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 20:59:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199440 - stable/8/sys/dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 20:59:01 -0000

Author: mav
Date: Tue Nov 17 20:59:00 2009
New Revision: 199440
URL: http://svn.freebsd.org/changeset/base/199440

Log:
  MFC r198852:
  - Rework timeout handling, to make it more graceful for devices sharing
  controller port (with PMP). Wait for other commands completion/timeout
  before initiating recovery.
  - Handle timeouts and fatal errors with port hard-reset. The rest of
  recovery will be done by XPT on receiving async event. More gracefull
  per-device soft-reset recovery can be implemented later.

Modified:
  stable/8/sys/dev/siis/siis.c
  stable/8/sys/dev/siis/siis.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 20:57:35 2009	(r199439)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 20:59:00 2009	(r199440)
@@ -511,7 +511,10 @@ siis_ch_resume(device_t dev)
 	/* Get port out of reset state. */
 	ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PORT_RESET);
 	ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_32BIT);
-	ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME);
+	if (ch->pm_present)
+		ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PME);
+	else
+		ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME);
 	/* Enable port interrupts */
 	ATA_OUTL(ch->r_mem, SIIS_P_IESET, SIIS_P_IX_ENABLED);
 	return (0);
@@ -764,7 +767,7 @@ siis_ch_intr(void *data)
 		    estatus == SIIS_P_CMDERR_DATAFIS) {
 			tslots = ch->numtslots[port];
 			for (i = 0; i < SIIS_MAX_SLOTS; i++) {
-				/* XXX: reqests in loading state. */
+				/* XXX: requests in loading state. */
 				if (((ch->rslots >> i) & 1) == 0)
 					continue;
 				if (ch->slot[i].ccb->ccb_h.target_id != port)
@@ -796,7 +799,7 @@ siis_ch_intr(void *data)
 			} else
 				et = SIIS_ERR_INVALID;
 			for (i = 0; i < SIIS_MAX_SLOTS; i++) {
-				/* XXX: reqests in loading state. */
+				/* XXX: requests in loading state. */
 				if (((ch->rslots >> i) & 1) == 0)
 					continue;
 				siis_end_transaction(&ch->slot[i], et);
@@ -967,48 +970,51 @@ siis_execute_transaction(struct siis_slo
 	return;
 }
 
-/* Locked by callout mechanism. */
+/* Must be called with channel locked. */
 static void
-siis_timeout(struct siis_slot *slot)
+siis_process_timeout(device_t dev)
 {
-	device_t dev = slot->dev;
 	struct siis_channel *ch = device_get_softc(dev);
 	int i;
 
 	mtx_assert(&ch->mtx, MA_OWNED);
-	device_printf(dev, "Timeout on slot %d\n", slot->slot);
-device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n",
-    __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots,
-    ATA_INL(ch->r_mem, SIIS_P_CMDERR), ATA_INL(ch->r_mem, SIIS_P_STS),
-    ATA_INL(ch->r_mem, SIIS_P_SERR));
-	/* Kick controller into sane state. */
-	siis_portinit(ch->dev);
-
-	if (!ch->readlog)
+	if (!ch->readlog && !ch->recovery) {
 		xpt_freeze_simq(ch->sim, ch->numrslots);
-	/* Handle frozen command. */
-	if (ch->frozen) {
-		union ccb *fccb = ch->frozen;
-		ch->frozen = NULL;
-		fccb->ccb_h.status &= ~CAM_STATUS_MASK;
-		fccb->ccb_h.status |= CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ;
-		if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) {
-			xpt_freeze_devq(fccb->ccb_h.path, 1);
-			fccb->ccb_h.status |= CAM_DEV_QFRZN;
-		}
-		xpt_done(fccb);
+		ch->recovery = 1;
 	}
-	/* Handle command with timeout. */
-	siis_end_transaction(&ch->slot[slot->slot], SIIS_ERR_TIMEOUT);
 	/* Handle the rest of commands. */
 	for (i = 0; i < SIIS_MAX_SLOTS; i++) {
 		/* Do we have a running request on slot? */
 		if (ch->slot[i].state < SIIS_SLOT_RUNNING)
 			continue;
-		siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT);
+		siis_end_transaction(&ch->slot[i], SIIS_ERR_TIMEOUT);
 	}
 }
 
+/* Locked by callout mechanism. */
+static void
+siis_timeout(struct siis_slot *slot)
+{
+	device_t dev = slot->dev;
+	struct siis_channel *ch = device_get_softc(dev);
+
+	mtx_assert(&ch->mtx, MA_OWNED);
+	device_printf(dev, "Timeout on slot %d\n", slot->slot);
+device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n",
+    __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots,
+    ATA_INL(ch->r_mem, SIIS_P_CMDERR), ATA_INL(ch->r_mem, SIIS_P_STS),
+    ATA_INL(ch->r_mem, SIIS_P_SERR));
+
+	if (ch->toslots == 0)
+		xpt_freeze_simq(ch->sim, 1);
+	ch->toslots |= (1 << slot->slot);
+	if ((ch->rslots & ~ch->toslots) == 0)
+		siis_process_timeout(dev);
+	else
+		device_printf(dev, " ... waiting for slots %08x\n",
+		    ch->rslots & ~ch->toslots);
+}
+
 /* Must be called with channel locked. */
 static void
 siis_end_transaction(struct siis_slot *slot, enum siis_err_type et)
@@ -1071,6 +1077,7 @@ siis_end_transaction(struct siis_slot *s
 			ccb->csio.scsi_status = SCSI_STATUS_OK;
 		break;
 	case SIIS_ERR_INVALID:
+		ch->fatalerr = 1;
 		ccb->ccb_h.status |= CAM_REQ_INVALID;
 		break;
 	case SIIS_ERR_INNOCENT:
@@ -1086,9 +1093,11 @@ siis_end_transaction(struct siis_slot *s
 		}
 		break;
 	case SIIS_ERR_SATA:
+		ch->fatalerr = 1;
 		ccb->ccb_h.status |= CAM_UNCOR_PARITY;
 		break;
 	case SIIS_ERR_TIMEOUT:
+		ch->fatalerr = 1;
 		ccb->ccb_h.status |= CAM_CMD_TIMEOUT;
 		break;
 	default:
@@ -1097,6 +1106,11 @@ siis_end_transaction(struct siis_slot *s
 	/* Free slot. */
 	ch->rslots &= ~(1 << slot->slot);
 	ch->aslots &= ~(1 << slot->slot);
+	if (et != SIIS_ERR_TIMEOUT) {
+		if (ch->toslots == (1 << slot->slot))
+			xpt_release_simq(ch->sim, TRUE);
+		ch->toslots &= ~(1 << slot->slot);
+	}
 	slot->state = SIIS_SLOT_EMPTY;
 	slot->ccb = NULL;
 	/* Update channel stats. */
@@ -1105,13 +1119,14 @@ siis_end_transaction(struct siis_slot *s
 	    (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) {
 		ch->numtslots[ccb->ccb_h.target_id]--;
 	}
+	/* If it was our READ LOG command - process it. */
+	if (ch->readlog) {
+		siis_process_read_log(dev, ccb);
 	/* If it was NCQ command error, put result on hold. */
-	if (et == SIIS_ERR_NCQ) {
+	} else if (et == SIIS_ERR_NCQ) {
 		ch->hold[slot->slot] = ccb;
 		ch->numhslots++;
-	} else if (ch->readlog)	/* If it was our READ LOG command - process it. */
-		siis_process_read_log(dev, ccb);
-	else
+	} else
 		xpt_done(ccb);
 	/* Unfreeze frozen command. */
 	if (ch->frozen && ch->numrslots == 0) {
@@ -1122,13 +1137,20 @@ siis_end_transaction(struct siis_slot *s
 	}
 	/* If we have no other active commands, ... */
 	if (ch->rslots == 0) {
-		/* if we have slots in error, we can reinit port. */
-		if (ch->eslots != 0)
-			siis_portinit(dev);
-		/* if there commands on hold, we can do READ LOG. */
-		if (!ch->readlog && ch->numhslots)
-			siis_issue_read_log(dev);
-	}
+		/* if there were timeouts or fatal error - reset port. */
+		if (ch->toslots != 0 || ch->fatalerr) {
+			siis_reset(dev);
+		} else {
+			/* if we have slots in error, we can reinit port. */
+			if (ch->eslots != 0)
+				siis_portinit(dev);
+			/* if there commands on hold, we can do READ LOG. */
+			if (!ch->readlog && ch->numhslots)
+				siis_issue_read_log(dev);
+		}
+	/* If all the reset of commands are in timeout - abort them. */
+	} else if ((ch->rslots & ~ch->toslots) == 0)
+		siis_process_timeout(dev);
 }
 
 static void
@@ -1296,13 +1318,14 @@ static void
 siis_reset(device_t dev)
 {
 	struct siis_channel *ch = device_get_softc(dev);
-	int i;
+	int i, retry = 0;
 	uint32_t val;
 
 	if (bootverbose)
 		device_printf(dev, "SIIS reset...\n");
-	xpt_freeze_simq(ch->sim, ch->numrslots);
-	/* Requeue freezed command. */
+	if (!ch->readlog && !ch->recovery)
+		xpt_freeze_simq(ch->sim, ch->numrslots);
+	/* Requeue frozen command. */
 	if (ch->frozen) {
 		union ccb *fccb = ch->frozen;
 		ch->frozen = NULL;
@@ -1322,6 +1345,20 @@ siis_reset(device_t dev)
 		/* XXX; Commands in loading state. */
 		siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT);
 	}
+	/* Finish all holden commands as-is. */
+	for (i = 0; i < SIIS_MAX_SLOTS; i++) {
+		if (!ch->hold[i])
+			continue;
+		xpt_done(ch->hold[i]);
+		ch->hold[i] = NULL;
+		ch->numhslots--;
+	}
+	if (ch->toslots != 0)
+		xpt_release_simq(ch->sim, TRUE);
+	ch->eslots = 0;
+	ch->recovery = 0;
+	ch->toslots = 0;
+	ch->fatalerr = 0;
 	/* Disable port interrupts */
 	ATA_OUTL(ch->r_mem, SIIS_P_IECLR, 0x0000FFFF);
 	/* Set speed limit. */
@@ -1336,6 +1373,7 @@ siis_reset(device_t dev)
 	ATA_OUTL(ch->r_mem, SIIS_P_SCTL,
 	    ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 :
 	    (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)));
+retry:
 	siis_devreset(dev);
 	/* Reset and reconnect PHY, */
 	if (!siis_sata_connect(ch)) {
@@ -1350,8 +1388,25 @@ siis_reset(device_t dev)
 		return;
 	}
 	/* Wait for clearing busy status. */
-	if (siis_wait_ready(dev, 10000))
+	if (siis_wait_ready(dev, 10000)) {
 		device_printf(dev, "device ready timeout\n");
+		if (!retry) {
+			device_printf(dev, "trying full port reset ...\n");
+			/* Get port to the reset state. */
+			ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PORT_RESET);
+			DELAY(10000);
+			/* Get port out of reset state. */
+			ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PORT_RESET);
+			ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_32BIT);
+			if (ch->pm_present)
+				ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PME);
+			else
+				ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME);
+			siis_wait_ready(dev, 5000);
+			retry = 1;
+			goto retry;
+		}
+	}
 	ch->devices = 1;
 	/* Enable port interrupts */
 	ATA_OUTL(ch->r_mem, SIIS_P_IS, 0xFFFFFFFF);
@@ -1487,7 +1542,8 @@ siisaction(struct cam_sim *sim, union cc
 		struct	ccb_trans_settings *cts = &ccb->cts;
 
 		if (cts->xport_specific.sata.valid & CTS_SATA_VALID_PM) {
-			if (cts->xport_specific.sata.pm_present)
+			ch->pm_present = cts->xport_specific.sata.pm_present;
+			if (ch->pm_present)
 				ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PME);
 			else
 				ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME);
@@ -1522,9 +1578,7 @@ siisaction(struct cam_sim *sim, union cc
 			cts->xport_specific.sata.bitrate = 150000;
 			cts->xport_specific.sata.valid |= CTS_SATA_VALID_SPEED;
 		}
-		cts->xport_specific.sata.pm_present =
-			(ATA_INL(ch->r_mem, SIIS_P_STS) & SIIS_P_CTL_PME) ?
-			    1 : 0;
+		cts->xport_specific.sata.pm_present = ch->pm_present;
 		cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM;
 		ccb->ccb_h.status = CAM_REQ_CMP;
 		xpt_done(ccb);

Modified: stable/8/sys/dev/siis/siis.h
==============================================================================
--- stable/8/sys/dev/siis/siis.h	Tue Nov 17 20:57:35 2009	(r199439)
+++ stable/8/sys/dev/siis/siis.h	Tue Nov 17 20:59:00 2009	(r199440)
@@ -373,13 +373,14 @@ struct siis_channel {
 	uint32_t		rslots;		/* Running slots */
 	uint32_t		aslots;		/* Slots with atomic commands */
 	uint32_t		eslots;		/* Slots in error */
+	uint32_t		toslots;	/* Slots in timeout */
 	int			numrslots;	/* Number of running slots */
 	int			numtslots[SIIS_MAX_SLOTS]; /* Number of tagged slots */
 	int			numhslots;	/* Number of holden slots */
 	int			readlog;	/* Our READ LOG active */
+	int			fatalerr;	/* Fatal error happend */
 	int			recovery;	/* Some slots are in error */
 	int			lastslot;	/* Last used slot */
-	int			taggedtarget;	/* Last tagged target */
 	union ccb		*frozen;	/* Frozen command */
 };
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:00:03 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4272A106566B;
	Tue, 17 Nov 2009 21:00:03 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 117028FC13;
	Tue, 17 Nov 2009 21:00:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHL02ur038436;
	Tue, 17 Nov 2009 21:00:02 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHL02nY038435;
	Tue, 17 Nov 2009 21:00:02 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172100.nAHL02nY038435@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:00:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199441 - stable/8/sys/dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:00:03 -0000

Author: mav
Date: Tue Nov 17 21:00:02 2009
New Revision: 199441
URL: http://svn.freebsd.org/changeset/base/199441

Log:
  MFC r198896:
  Do not unarm callout on request completion and change slot selection
  algorithm as done in ahci(4). This saves some CPU time on high request
  rates.

Modified:
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 20:59:00 2009	(r199440)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:00:02 2009	(r199441)
@@ -641,6 +641,7 @@ siis_slotsfree(device_t dev)
 	for (i = 0; i < SIIS_MAX_SLOTS; i++) {
 		struct siis_slot *slot = &ch->slot[i];
 
+		callout_drain(&slot->timeout);
 		if (slot->dma.data_map) {
 			bus_dmamap_destroy(ch->dma.data_tag, slot->dma.data_map);
 			slot->dma.data_map = NULL;
@@ -838,15 +839,11 @@ siis_begin_transaction(device_t dev, uni
 	mtx_assert(&ch->mtx, MA_OWNED);
 	/* Choose empty slot. */
 	tag = ch->lastslot;
-	do {
-		tag++;
-		if (tag >= SIIS_MAX_SLOTS)
+	while (ch->slot[tag].state != SIIS_SLOT_EMPTY) {
+		if (++tag >= SIIS_MAX_SLOTS)
 			tag = 0;
-		if (ch->slot[tag].state == SIIS_SLOT_EMPTY)
-			break;
-	} while (tag != ch->lastslot);
-	if (ch->slot[tag].state != SIIS_SLOT_EMPTY)
-		device_printf(ch->dev, "ALL SLOTS BUSY!\n");
+		KASSERT(tag != ch->lastslot, ("siis: ALL SLOTS BUSY!"));
+	}
 	ch->lastslot = tag;
 	/* Occupy chosen slot. */
 	slot = &ch->slot[tag];
@@ -999,6 +996,9 @@ siis_timeout(struct siis_slot *slot)
 	struct siis_channel *ch = device_get_softc(dev);
 
 	mtx_assert(&ch->mtx, MA_OWNED);
+	/* Check for stale timeout. */
+	if (slot->state < SIIS_SLOT_RUNNING)
+		return;
 	device_printf(dev, "Timeout on slot %d\n", slot->slot);
 device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n",
     __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots,
@@ -1024,8 +1024,6 @@ siis_end_transaction(struct siis_slot *s
 	union ccb *ccb = slot->ccb;
 
 	mtx_assert(&ch->mtx, MA_OWNED);
-	/* Cancel command execution timeout */
-	callout_stop(&slot->timeout);
 	bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
 	    BUS_DMASYNC_POSTWRITE);
 	/* Read result registers to the result struct

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:08:10 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2F56106568D;
	Tue, 17 Nov 2009 21:08:10 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C2E948FC18;
	Tue, 17 Nov 2009 21:08:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHL8AB4038907;
	Tue, 17 Nov 2009 21:08:10 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHL8A0K038906;
	Tue, 17 Nov 2009 21:08:10 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200911172108.nAHL8A0K038906@svn.freebsd.org>
From: Marius Strobl 
Date: Tue, 17 Nov 2009 21:08:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199442 - head/sys/sparc64/sparc64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:08:11 -0000

Author: marius
Date: Tue Nov 17 21:08:10 2009
New Revision: 199442
URL: http://svn.freebsd.org/changeset/base/199442

Log:
  Unroll copying of the registers in {g,s}et_mcontext() and limit it
  to the set actually restored by tl0_ret() instead of using the whole
  trapframe. Additionally skip %g7 as that register is used as the
  userland TLS pointer.
  
  PR:		140523
  MFC after:	1 week

Modified:
  head/sys/sparc64/sparc64/machdep.c

Modified: head/sys/sparc64/sparc64/machdep.c
==============================================================================
--- head/sys/sparc64/sparc64/machdep.c	Tue Nov 17 21:00:02 2009	(r199441)
+++ head/sys/sparc64/sparc64/machdep.c	Tue Nov 17 21:08:10 2009	(r199442)
@@ -692,12 +692,39 @@ get_mcontext(struct thread *td, mcontext
 
 	tf = td->td_frame;
 	pcb = td->td_pcb;
-	bcopy(tf, mc, sizeof(*tf));
+	/*
+	 * Copy the registers which will be restored by tl0_ret() from the
+	 * trapframe.
+	 * Note that we skip %g7 which is used as the userland TLS register
+	 * and %wstate.
+	 */
+	mc->mc_flags = _MC_VERSION;
+	mc->mc_global[1] = tf->tf_global[1];
+	mc->mc_global[2] = tf->tf_global[2];
+	mc->mc_global[3] = tf->tf_global[3];
+	mc->mc_global[4] = tf->tf_global[4];
+	mc->mc_global[5] = tf->tf_global[5];
+	mc->mc_global[6] = tf->tf_global[6];
 	if (flags & GET_MC_CLEAR_RET) {
 		mc->mc_out[0] = 0;
 		mc->mc_out[1] = 0;
+	} else {
+		mc->mc_out[0] = tf->tf_out[0];
+		mc->mc_out[1] = tf->tf_out[1];
 	}
-	mc->mc_flags = _MC_VERSION;
+	mc->mc_out[2] = tf->tf_out[2];
+	mc->mc_out[3] = tf->tf_out[3];
+	mc->mc_out[4] = tf->tf_out[4];
+	mc->mc_out[5] = tf->tf_out[5];
+	mc->mc_out[6] = tf->tf_out[6];
+	mc->mc_out[7] = tf->tf_out[7];
+	mc->mc_fprs = tf->tf_fprs;
+	mc->mc_fsr = tf->tf_fsr;
+	mc->mc_gsr = tf->tf_gsr;
+	mc->mc_tnpc = tf->tf_tnpc;
+	mc->mc_tpc = tf->tf_tpc;
+	mc->mc_tstate = tf->tf_tstate;
+	mc->mc_y = tf->tf_y;
 	critical_enter();
 	if ((tf->tf_fprs & FPRS_FEF) != 0) {
 		savefpctx(pcb->pcb_ufp);
@@ -717,7 +744,6 @@ set_mcontext(struct thread *td, const mc
 {
 	struct trapframe *tf;
 	struct pcb *pcb;
-	uint64_t wstate;
 
 	if (!TSTATE_SECURE(mc->mc_tstate) ||
 	    (mc->mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION)
@@ -726,9 +752,33 @@ set_mcontext(struct thread *td, const mc
 	pcb = td->td_pcb;
 	/* Make sure the windows are spilled first. */
 	flushw();
-	wstate = tf->tf_wstate;
-	bcopy(mc, tf, sizeof(*tf));
-	tf->tf_wstate = wstate;
+	/*
+	 * Copy the registers which will be restored by tl0_ret() to the
+	 * trapframe.
+	 * Note that we skip %g7 which is used as the userland TLS register
+	 * and %wstate.
+	 */
+	tf->tf_global[1] = mc->mc_global[1];
+	tf->tf_global[2] = mc->mc_global[2];
+	tf->tf_global[3] = mc->mc_global[3];
+	tf->tf_global[4] = mc->mc_global[4];
+	tf->tf_global[5] = mc->mc_global[5];
+	tf->tf_global[6] = mc->mc_global[6];
+	tf->tf_out[0] = mc->mc_out[0];
+	tf->tf_out[1] = mc->mc_out[1];
+	tf->tf_out[2] = mc->mc_out[2];
+	tf->tf_out[3] = mc->mc_out[3];
+	tf->tf_out[4] = mc->mc_out[4];
+	tf->tf_out[5] = mc->mc_out[5];
+	tf->tf_out[6] = mc->mc_out[6];
+	tf->tf_out[7] = mc->mc_out[7];
+	tf->tf_fprs = mc->mc_fprs;
+	tf->tf_fsr = mc->mc_fsr;
+	tf->tf_gsr = mc->mc_gsr;
+	tf->tf_tnpc = mc->mc_tnpc;
+	tf->tf_tpc = mc->mc_tpc;
+	tf->tf_tstate = mc->mc_tstate;
+	tf->tf_y = mc->mc_y;
 	if ((mc->mc_fprs & FPRS_FEF) != 0) {
 		tf->tf_fprs = 0;
 		bcopy(mc->mc_fp, pcb->pcb_ufp, sizeof(pcb->pcb_ufp));

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:08:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F3BB41065695;
	Tue, 17 Nov 2009 21:08:12 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DFB978FC15;
	Tue, 17 Nov 2009 21:08:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHL8CLA038948;
	Tue, 17 Nov 2009 21:08:12 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHL8Crv038941;
	Tue, 17 Nov 2009 21:08:12 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172108.nAHL8Crv038941@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:08:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199443 - in stable/8: . contrib/top lib/libusb
	sbin/camcontrol sys/cam/ata sys/sys tools/regression/lib/msun
	tools/regression/usr.bin/pkill tools/tools/ath/common
	tools/tools/termcap u...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:08:13 -0000

Author: mav
Date: Tue Nov 17 21:08:12 2009
New Revision: 199443
URL: http://svn.freebsd.org/changeset/base/199443

Log:
  MFC r198897:
  - Add support for sector size > 512 bytes and physical sector of several
  logical sectors, introduced by ATA-7 specification.
  - Remove some obsoleted code.

Modified:
  stable/8/sbin/camcontrol/camcontrol.c
  stable/8/sys/cam/ata/ata_all.c
  stable/8/sys/cam/ata/ata_all.h
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/sys/ata.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/ObsoleteFiles.inc   (props changed)
  stable/8/UPDATING   (props changed)
  stable/8/bin/csh/   (props changed)
  stable/8/bin/sh/   (props changed)
  stable/8/cddl/compat/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/cddl/lib/libnvpair/   (props changed)
  stable/8/contrib/bind9/   (props changed)
  stable/8/contrib/bzip2/   (props changed)
  stable/8/contrib/cpio/   (props changed)
  stable/8/contrib/csup/   (props changed)
  stable/8/contrib/ee/   (props changed)
  stable/8/contrib/file/   (props changed)
  stable/8/contrib/gdb/   (props changed)
  stable/8/contrib/gdtoa/   (props changed)
  stable/8/contrib/less/   (props changed)
  stable/8/contrib/libpcap/   (props changed)
  stable/8/contrib/ncurses/   (props changed)
  stable/8/contrib/netcat/   (props changed)
  stable/8/contrib/ntp/   (props changed)
  stable/8/contrib/openbsm/   (props changed)
  stable/8/contrib/openpam/   (props changed)
  stable/8/contrib/pf/   (props changed)
  stable/8/contrib/sendmail/   (props changed)
  stable/8/contrib/tcpdump/   (props changed)
  stable/8/contrib/tcsh/   (props changed)
  stable/8/contrib/top/   (props changed)
  stable/8/contrib/top/install-sh   (props changed)
  stable/8/contrib/traceroute/   (props changed)
  stable/8/contrib/wpa/   (props changed)
  stable/8/crypto/openssh/   (props changed)
  stable/8/crypto/openssl/   (props changed)
  stable/8/etc/   (props changed)
  stable/8/games/fortune/   (props changed)
  stable/8/games/fortune/datfiles/   (props changed)
  stable/8/gnu/usr.bin/groff/   (props changed)
  stable/8/gnu/usr.bin/patch/   (props changed)
  stable/8/include/   (props changed)
  stable/8/kerberos5/lib/libgssapi_krb5/   (props changed)
  stable/8/kerberos5/lib/libgssapi_spnego/   (props changed)
  stable/8/lib/libarchive/   (props changed)
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libdevinfo/   (props changed)
  stable/8/lib/libdisk/   (props changed)
  stable/8/lib/libkvm/   (props changed)
  stable/8/lib/libradius/   (props changed)
  stable/8/lib/libstand/   (props changed)
  stable/8/lib/libthr/   (props changed)
  stable/8/lib/libusb/   (props changed)
  stable/8/lib/libusb/usb.h   (props changed)
  stable/8/lib/libutil/   (props changed)
  stable/8/libexec/rtld-elf/   (props changed)
  stable/8/release/   (props changed)
  stable/8/release/doc/   (props changed)
  stable/8/release/doc/en_US.ISO8859-1/hardware/   (props changed)
  stable/8/sbin/   (props changed)
  stable/8/sbin/bsdlabel/   (props changed)
  stable/8/sbin/camcontrol/   (props changed)
  stable/8/sbin/ddb/   (props changed)
  stable/8/sbin/dhclient/   (props changed)
  stable/8/sbin/geom/   (props changed)
  stable/8/sbin/ifconfig/   (props changed)
  stable/8/sbin/ipfw/   (props changed)
  stable/8/sbin/mksnap_ffs/   (props changed)
  stable/8/sbin/mount/   (props changed)
  stable/8/sbin/mount_nfs/   (props changed)
  stable/8/sbin/umount/   (props changed)
  stable/8/secure/usr.bin/bdes/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man5/   (props changed)
  stable/8/share/man/man7/   (props changed)
  stable/8/share/man/man9/   (props changed)
  stable/8/share/misc/   (props changed)
  stable/8/share/timedef/   (props changed)
  stable/8/share/zoneinfo/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/tools/kerneldoc/subsys/   (props changed)
  stable/8/tools/regression/bin/sh/   (props changed)
  stable/8/tools/regression/lib/msun/test-conj.t   (props changed)
  stable/8/tools/regression/poll/   (props changed)
  stable/8/tools/regression/priv/   (props changed)
  stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t   (props changed)
  stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t   (props changed)
  stable/8/tools/regression/usr.bin/pkill/pkill-_g.t   (props changed)
  stable/8/tools/tools/ath/common/dumpregs.h   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5210.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5211.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5212.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5416.c   (props changed)
  stable/8/tools/tools/termcap/termcap.pl   (props changed)
  stable/8/tools/tools/vimage/   (props changed)
  stable/8/usr.bin/calendar/calendars/calendar.freebsd   (props changed)
  stable/8/usr.bin/csup/   (props changed)
  stable/8/usr.bin/find/   (props changed)
  stable/8/usr.bin/fstat/   (props changed)
  stable/8/usr.bin/gcore/   (props changed)
  stable/8/usr.bin/locale/   (props changed)
  stable/8/usr.bin/look/   (props changed)
  stable/8/usr.bin/netstat/   (props changed)
  stable/8/usr.bin/procstat/   (props changed)
  stable/8/usr.bin/systat/   (props changed)
  stable/8/usr.bin/vmstat/   (props changed)
  stable/8/usr.bin/w/   (props changed)
  stable/8/usr.bin/whois/   (props changed)
  stable/8/usr.sbin/   (props changed)
  stable/8/usr.sbin/acpi/   (props changed)
  stable/8/usr.sbin/arp/   (props changed)
  stable/8/usr.sbin/cdcontrol/   (props changed)
  stable/8/usr.sbin/crashinfo/   (props changed)
  stable/8/usr.sbin/dumpcis/cardinfo.h   (props changed)
  stable/8/usr.sbin/dumpcis/cis.h   (props changed)
  stable/8/usr.sbin/freebsd-update/   (props changed)
  stable/8/usr.sbin/iostat/   (props changed)
  stable/8/usr.sbin/jail/   (props changed)
  stable/8/usr.sbin/jls/   (props changed)
  stable/8/usr.sbin/lpr/   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  stable/8/usr.sbin/makefs/getid.c   (props changed)
  stable/8/usr.sbin/mfiutil/mfiutil.8   (props changed)
  stable/8/usr.sbin/ndp/   (props changed)
  stable/8/usr.sbin/ntp/   (props changed)
  stable/8/usr.sbin/ppp/   (props changed)
  stable/8/usr.sbin/pstat/   (props changed)
  stable/8/usr.sbin/sysinstall/   (props changed)
  stable/8/usr.sbin/traceroute6/   (props changed)
  stable/8/usr.sbin/usbconfig/   (props changed)
  stable/8/usr.sbin/wpa/   (props changed)
  stable/8/usr.sbin/zic/   (props changed)

Modified: stable/8/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 21:08:10 2009	(r199442)
+++ stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 21:08:12 2009	(r199443)
@@ -1061,6 +1061,10 @@ atacapprint(struct ata_params *parm)
 	printf("cylinders             %d\n", parm->cylinders);
 	printf("heads                 %d\n", parm->heads);
 	printf("sectors/track         %d\n", parm->sectors);
+	printf("sector size           logical %u, physical %lu, offset %lu\n",
+	    ata_logical_sector_size(parm),
+	    (unsigned long)ata_physical_sector_size(parm),
+	    (unsigned long)ata_logical_sector_offset(parm));
 
 	if (parm->config == ATA_PROTO_CFA ||
 	    (parm->support.command2 & ATA_SUPPORT_CFA))

Modified: stable/8/sys/cam/ata/ata_all.c
==============================================================================
--- stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 21:08:10 2009	(r199442)
+++ stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 21:08:12 2009	(r199443)
@@ -271,6 +271,38 @@ ata_print_ident(struct ata_params *ident
 	printf(" device\n");
 }
 
+uint32_t
+ata_logical_sector_size(struct ata_params *ident_data)
+{
+	if ((ident_data->pss & 0xc000) == 0x4000 &&
+	    (ident_data->pss & ATA_PSS_LSSABOVE512)) {
+		return ((u_int32_t)ident_data->lss_1 |
+		    ((u_int32_t)ident_data->lss_2 << 16));
+	}
+	return (512);
+}
+
+uint64_t
+ata_physical_sector_size(struct ata_params *ident_data)
+{
+	if ((ident_data->pss & 0xc000) == 0x4000 &&
+	    (ident_data->pss & ATA_PSS_MULTLS)) {
+		return ((uint64_t)ata_logical_sector_size(ident_data) *
+		    (1 << (ident_data->pss & ATA_PSS_LSPPS)));
+	}
+	return (512);
+}
+
+uint64_t
+ata_logical_sector_offset(struct ata_params *ident_data)
+{
+	if ((ident_data->lsalign & 0xc000) == 0x4000) {
+		return ((uint64_t)ata_logical_sector_size(ident_data) *
+		    (ident_data->lsalign & 0x3fff));
+	}
+	return (0);
+}
+
 void
 ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,
     uint32_t lba, uint8_t sector_count)

Modified: stable/8/sys/cam/ata/ata_all.h
==============================================================================
--- stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 21:08:10 2009	(r199442)
+++ stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 21:08:12 2009	(r199443)
@@ -91,6 +91,10 @@ int	ata_res_sbuf(struct ccb_ataio *ataio
 
 void	ata_print_ident(struct ata_params *ident_data);
 
+uint32_t	ata_logical_sector_size(struct ata_params *ident_data);
+uint64_t	ata_physical_sector_size(struct ata_params *ident_data);
+uint64_t	ata_logical_sector_offset(struct ata_params *ident_data);
+
 void	ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,
     uint32_t lba, uint8_t sector_count);
 void	ata_48bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint16_t features,

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 21:08:10 2009	(r199442)
+++ stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 21:08:12 2009	(r199443)
@@ -95,16 +95,14 @@ typedef enum {
 
 struct disk_params {
 	u_int8_t  heads;
-	u_int32_t cylinders;
 	u_int8_t  secs_per_track;
-	u_int32_t secsize;	/* Number of bytes/sector */
-	u_int64_t sectors;	/* total number sectors */
+	u_int32_t cylinders;
+	u_int32_t secsize;	/* Number of bytes/logical sector */
+	u_int64_t sectors;	/* Total number sectors */
 };
 
 struct ada_softc {
 	struct	 bio_queue_head bio_queue;
-	SLIST_ENTRY(ada_softc) links;
-	LIST_HEAD(, ccb_hdr) pending_ccbs;
 	ada_state state;
 	ada_flags flags;	
 	ada_quirks quirks;
@@ -142,7 +140,7 @@ static	void		adadone(struct cam_periph *
 			       union ccb *done_ccb);
 static  int		adaerror(union ccb *ccb, u_int32_t cam_flags,
 				u_int32_t sense_flags);
-static void		adasetgeom(struct cam_periph *periph,
+static void		adagetparams(struct cam_periph *periph,
 				struct ccb_getdev *cgd);
 static timeout_t	adasendorderedtag;
 static void		adashutdown(void *arg, int howto);
@@ -613,7 +611,6 @@ adaregister(struct cam_periph *periph, v
 		return(CAM_REQ_CMP_ERR);
 	}
 
-	LIST_INIT(&softc->pending_ccbs);
 	bioq_init(&softc->bio_queue);
 
 	if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA)
@@ -658,6 +655,7 @@ adaregister(struct cam_periph *periph, v
 	 * Register this media as a disk
 	 */
 	mtx_unlock(periph->sim->mtx);
+	adagetparams(periph, cgd);
 	softc->disk = disk_alloc();
 	softc->disk->d_open = adaopen;
 	softc->disk->d_close = adaclose;
@@ -671,9 +669,9 @@ adaregister(struct cam_periph *periph, v
 	else if (maxio > MAXPHYS)
 		maxio = MAXPHYS;	/* for safety */
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48)
-		maxio = min(maxio, 65536 * 512);
+		maxio = min(maxio, 65536 * softc->params.secsize);
 	else					/* 28bit ATA command limit */
-		maxio = min(maxio, 256 * 512);
+		maxio = min(maxio, 256 * softc->params.secsize);
 	softc->disk->d_maxsize = maxio;
 	softc->disk->d_unit = periph->unit_number;
 	softc->disk->d_flags = 0;
@@ -682,9 +680,12 @@ adaregister(struct cam_periph *periph, v
 	strlcpy(softc->disk->d_ident, cgd->serial_num,
 	    MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1));
 
-	adasetgeom(periph, cgd);
 	softc->disk->d_sectorsize = softc->params.secsize;
-	softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors;
+	softc->disk->d_mediasize = (off_t)softc->params.sectors *
+	    softc->params.secsize;
+	softc->disk->d_stripesize = ata_physical_sector_size(&cgd->ident_data);
+	softc->disk->d_stripeoffset = softc->disk->d_stripesize -
+	    ata_logical_sector_offset(&cgd->ident_data);
 	/* XXX: these are not actually "firmware" values, so they may be wrong */
 	softc->disk->d_fwsectors = softc->params.secs_per_track;
 	softc->disk->d_fwheads = softc->params.heads;
@@ -852,19 +853,10 @@ adastart(struct cam_periph *periph, unio
 				break;
 			}
 			start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO;
-
-			/*
-			 * Block out any asyncronous callbacks
-			 * while we touch the pending ccb list.
-			 */
-			LIST_INSERT_HEAD(&softc->pending_ccbs,
-					 &start_ccb->ccb_h, periph_links.le);
-			softc->outstanding_cmds++;
-
 			start_ccb->ccb_h.ccb_bp = bp;
-			bp = bioq_first(&softc->bio_queue);
-
+			softc->outstanding_cmds++;
 			xpt_action(start_ccb);
+			bp = bioq_first(&softc->bio_queue);
 		}
 		
 		if (bp != NULL) {
@@ -941,12 +933,6 @@ adadone(struct cam_periph *periph, union
 			if (ataio->resid > 0)
 				bp->bio_flags |= BIO_ERROR;
 		}
-
-		/*
-		 * Block out any asyncronous callbacks
-		 * while we touch the pending ccb list.
-		 */
-		LIST_REMOVE(&done_ccb->ccb_h, periph_links.le);
 		softc->outstanding_cmds--;
 		if (softc->outstanding_cmds == 0)
 			softc->flags |= ADA_FLAG_WENT_IDLE;
@@ -983,14 +969,14 @@ adaerror(union ccb *ccb, u_int32_t cam_f
 }
 
 static void
-adasetgeom(struct cam_periph *periph, struct ccb_getdev *cgd)
+adagetparams(struct cam_periph *periph, struct ccb_getdev *cgd)
 {
 	struct ada_softc *softc = (struct ada_softc *)periph->softc;
 	struct disk_params *dp = &softc->params;
 	u_int64_t lbasize48;
 	u_int32_t lbasize;
 
-	dp->secsize = 512;
+	dp->secsize = ata_logical_sector_size(&cgd->ident_data);
 	if ((cgd->ident_data.atavalid & ATA_FLAG_54_58) &&
 		cgd->ident_data.current_heads && cgd->ident_data.current_sectors) {
 		dp->heads = cgd->ident_data.current_heads;

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 21:08:10 2009	(r199442)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 21:08:12 2009	(r199443)
@@ -363,10 +363,12 @@ probestart(struct cam_periph *periph, un
 		cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_CURRENT_SETTINGS;
 		if (path->device->transport == XPORT_ATA) {
-			cts.xport_specific.ata.bytecount = sectors * 512;
+			cts.xport_specific.ata.bytecount = sectors *
+			    ata_logical_sector_size(ident_buf);
 			cts.xport_specific.ata.valid = CTS_ATA_VALID_BYTECOUNT;
 		} else {
-			cts.xport_specific.sata.bytecount = sectors * 512;
+			cts.xport_specific.sata.bytecount = sectors *
+			    ata_logical_sector_size(ident_buf);
 			cts.xport_specific.sata.valid = CTS_SATA_VALID_BYTECOUNT;
 		}
 		xpt_action((union ccb *)&cts);

Modified: stable/8/sys/sys/ata.h
==============================================================================
--- stable/8/sys/sys/ata.h	Tue Nov 17 21:08:10 2009	(r199442)
+++ stable/8/sys/sys/ata.h	Tue Nov 17 21:08:12 2009	(r199443)
@@ -234,7 +234,7 @@ struct ata_params {
 /*176*/ u_int8_t        media_serial[60];
 /*206*/ u_int16_t       sct;
 	u_int16_t       reserved206[2];
-/*209*/ u_int16_t       lbalign;
+/*209*/ u_int16_t       lsalign;
 /*210*/ u_int16_t       wrv_sectors_m3_1;
 	u_int16_t       wrv_sectors_m3_2;
 /*212*/ u_int16_t       wrv_sectors_m2_1;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:09:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB5321065676;
	Tue, 17 Nov 2009 21:09:47 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AA01F8FC13;
	Tue, 17 Nov 2009 21:09:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHL9l1d039041;
	Tue, 17 Nov 2009 21:09:47 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHL9lO8039036;
	Tue, 17 Nov 2009 21:09:47 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172109.nAHL9lO8039036@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:09:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199444 - in stable/8/sys/cam: . ata scsi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:09:47 -0000

Author: mav
Date: Tue Nov 17 21:09:47 2009
New Revision: 199444
URL: http://svn.freebsd.org/changeset/base/199444

Log:
  MFC r198899:
  - Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be
  periph flag. May be SIM, may be CCB, but now it works fine just without it.
  - Remove check unused for at least five years. If we will ever have non-BIO
  devices in CAM, this check is smallest of what we will need.
  - If several controllers complete requests same time, call swi_sched()
  only once.

Modified:
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/cam_periph.h
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 21:08:12 2009	(r199443)
+++ stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 21:09:47 2009	(r199444)
@@ -371,7 +371,6 @@ adadump(void *arg, void *virtual, vm_off
 	}
 
 	if (length > 0) {
-		periph->flags |= CAM_PERIPH_POLLED;
 		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
 		cam_fill_ataio(&ccb.ataio,
@@ -431,7 +430,6 @@ adadump(void *arg, void *virtual, vm_off
 					 /*timeout*/0,
 					 /*getcount_only*/0);
 	}
-	periph->flags &= ~CAM_PERIPH_POLLED;
 	cam_periph_unlock(periph);
 	return (0);
 }

Modified: stable/8/sys/cam/cam_periph.h
==============================================================================
--- stable/8/sys/cam/cam_periph.h	Tue Nov 17 21:08:12 2009	(r199443)
+++ stable/8/sys/cam/cam_periph.h	Tue Nov 17 21:09:47 2009	(r199444)
@@ -117,7 +117,6 @@ struct cam_periph {
 #define CAM_PERIPH_INVALID		0x08
 #define CAM_PERIPH_NEW_DEV_FOUND	0x10
 #define CAM_PERIPH_RECOVERY_INPROG	0x20
-#define CAM_PERIPH_POLLED		0x40
 	u_int32_t		 immediate_priority;
 	u_int32_t		 refcount;
 	SLIST_HEAD(, ccb_hdr)	 ccb_list;	/* For "immediate" requests */

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 21:08:12 2009	(r199443)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 21:09:47 2009	(r199444)
@@ -4238,6 +4238,7 @@ void
 xpt_done(union ccb *done_ccb)
 {
 	struct cam_sim *sim;
+	int	first;
 
 	CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done\n"));
 	if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) {
@@ -4246,25 +4247,17 @@ xpt_done(union ccb *done_ccb)
 		 * any of the "non-immediate" type of ccbs.
 		 */
 		sim = done_ccb->ccb_h.path->bus->sim;
-		switch (done_ccb->ccb_h.path->periph->type) {
-		case CAM_PERIPH_BIO:
-			TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h,
-					  sim_links.tqe);
-			done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX;
-			if ((sim->flags & CAM_SIM_ON_DONEQ) == 0) {
-				mtx_lock(&cam_simq_lock);
-				TAILQ_INSERT_TAIL(&cam_simq, sim,
-						  links);
-				mtx_unlock(&cam_simq_lock);
-				sim->flags |= CAM_SIM_ON_DONEQ;
-				if ((done_ccb->ccb_h.path->periph->flags &
-				    CAM_PERIPH_POLLED) == 0)
-					swi_sched(cambio_ih, 0);
-			}
-			break;
-		default:
-			panic("unknown periph type %d",
-			    done_ccb->ccb_h.path->periph->type);
+		TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h,
+		    sim_links.tqe);
+		done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX;
+		if ((sim->flags & CAM_SIM_ON_DONEQ) == 0) {
+			mtx_lock(&cam_simq_lock);
+			first = TAILQ_EMPTY(&cam_simq);
+			TAILQ_INSERT_TAIL(&cam_simq, sim, links);
+			mtx_unlock(&cam_simq_lock);
+			sim->flags |= CAM_SIM_ON_DONEQ;
+			if (first)
+				swi_sched(cambio_ih, 0);
 		}
 	}
 }

Modified: stable/8/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 21:08:12 2009	(r199443)
+++ stable/8/sys/cam/scsi/scsi_da.c	Tue Nov 17 21:09:47 2009	(r199444)
@@ -859,7 +859,6 @@ dadump(void *arg, void *virtual, vm_offs
 	}
 
 	if (length > 0) {
-		periph->flags |= CAM_PERIPH_POLLED;
 		xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 		csio.ccb_h.ccb_state = DA_CCB_DUMP;
 		scsi_read_write(&csio,
@@ -885,7 +884,6 @@ dadump(void *arg, void *virtual, vm_offs
 			else
 				printf("status == 0x%x, scsi status == 0x%x\n",
 				       csio.ccb_h.status, csio.scsi_status);
-			periph->flags |= CAM_PERIPH_POLLED;
 			return(EIO);
 		}
 		cam_periph_unlock(periph);
@@ -929,7 +927,6 @@ dadump(void *arg, void *virtual, vm_offs
 			}
 		}
 	}
-	periph->flags &= ~CAM_PERIPH_POLLED;
 	cam_periph_unlock(periph);
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:14:02 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BBCC31065693;
	Tue, 17 Nov 2009 21:14:02 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9190F8FC12;
	Tue, 17 Nov 2009 21:14:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLE2oH039329;
	Tue, 17 Nov 2009 21:14:02 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLE2hg039326;
	Tue, 17 Nov 2009 21:14:02 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172114.nAHLE2hg039326@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:14:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199445 - stable/8/sys/cam/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:14:02 -0000

Author: mav
Date: Tue Nov 17 21:14:02 2009
New Revision: 199445
URL: http://svn.freebsd.org/changeset/base/199445

Log:
  MFC r198904, r198905:
  PMP commands use short format. PMP write doesn't return result.

Modified:
  stable/8/sys/cam/ata/ata_all.c
  stable/8/sys/cam/ata/ata_all.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_all.c
==============================================================================
--- stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 21:09:47 2009	(r199444)
+++ stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 21:14:02 2009	(r199445)
@@ -368,30 +368,24 @@ void
 ata_pm_read_cmd(struct ccb_ataio *ataio, int reg, int port)
 {
 	bzero(&ataio->cmd, sizeof(ataio->cmd));
-	ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT;
+	ataio->cmd.flags = CAM_ATAIO_NEEDRESULT;
 	ataio->cmd.command = ATA_READ_PM;
 	ataio->cmd.features = reg;
-	ataio->cmd.features_exp = reg >> 8;
 	ataio->cmd.device = port & 0x0f;
 }
 
 void
-ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint64_t val)
+ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint32_t val)
 {
 	bzero(&ataio->cmd, sizeof(ataio->cmd));
-	ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT;
+	ataio->cmd.flags = 0;
 	ataio->cmd.command = ATA_WRITE_PM;
 	ataio->cmd.features = reg;
+	ataio->cmd.sector_count = val;
 	ataio->cmd.lba_low = val >> 8;
 	ataio->cmd.lba_mid = val >> 16;
 	ataio->cmd.lba_high = val >> 24;
 	ataio->cmd.device = port & 0x0f;
-	ataio->cmd.lba_low_exp = val >> 40;
-	ataio->cmd.lba_mid_exp = val >> 48;
-	ataio->cmd.lba_high_exp = val >> 56;
-	ataio->cmd.features_exp = reg >> 8;
-	ataio->cmd.sector_count = val;
-	ataio->cmd.sector_count_exp = val >> 32;
 }
 
 void

Modified: stable/8/sys/cam/ata/ata_all.h
==============================================================================
--- stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 21:09:47 2009	(r199444)
+++ stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 21:14:02 2009	(r199445)
@@ -103,7 +103,7 @@ void	ata_ncq_cmd(struct ccb_ataio *ataio
     uint64_t lba, uint16_t sector_count);
 void	ata_reset_cmd(struct ccb_ataio *ataio);
 void	ata_pm_read_cmd(struct ccb_ataio *ataio, int reg, int port);
-void	ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint64_t val);
+void	ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint32_t val);
 
 void	ata_bswap(int8_t *buf, int len);
 void	ata_btrim(int8_t *buf, int len);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:14:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10F141065694;
	Tue, 17 Nov 2009 21:14:59 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 006518FC2E;
	Tue, 17 Nov 2009 21:14:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLEwI1039411;
	Tue, 17 Nov 2009 21:14:58 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLEwkC039409;
	Tue, 17 Nov 2009 21:14:58 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172114.nAHLEwkC039409@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:14:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199446 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:14:59 -0000

Author: mav
Date: Tue Nov 17 21:14:58 2009
New Revision: 199446
URL: http://svn.freebsd.org/changeset/base/199446

Log:
  MFC r198947:
  Implement device stats accounting for ATA commands.

Modified:
  stable/8/sys/cam/cam_periph.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Tue Nov 17 21:14:02 2009	(r199445)
+++ stable/8/sys/cam/cam_periph.c	Tue Nov 17 21:14:58 2009	(r199446)
@@ -898,7 +898,8 @@ cam_periph_runccb(union ccb *ccb,
 	 * If the user has supplied a stats structure, and if we understand
 	 * this particular type of ccb, record the transaction start.
 	 */
-	if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO))
+	if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO ||
+	    ccb->ccb_h.func_code == XPT_ATA_IO))
 		devstat_start_transaction(ds, NULL);
 
 	xpt_action(ccb);
@@ -921,15 +922,27 @@ cam_periph_runccb(union ccb *ccb,
 				 /* timeout */0,
 				 /* getcount_only */ FALSE);
 
-	if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO))
-		devstat_end_transaction(ds,
+	if (ds != NULL) {
+		if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
+			devstat_end_transaction(ds,
 					ccb->csio.dxfer_len,
-					ccb->csio.tag_action & 0xf,
+					ccb->csio.tag_action & 0x3,
 					((ccb->ccb_h.flags & CAM_DIR_MASK) ==
 					CAM_DIR_NONE) ?  DEVSTAT_NO_DATA : 
 					(ccb->ccb_h.flags & CAM_DIR_OUT) ?
 					DEVSTAT_WRITE : 
 					DEVSTAT_READ, NULL, NULL);
+		} else if (ccb->ccb_h.func_code == XPT_ATA_IO) {
+			devstat_end_transaction(ds,
+					ccb->ataio.dxfer_len,
+					ccb->ataio.tag_action & 0x3,
+					((ccb->ccb_h.flags & CAM_DIR_MASK) ==
+					CAM_DIR_NONE) ?  DEVSTAT_NO_DATA : 
+					(ccb->ccb_h.flags & CAM_DIR_OUT) ?
+					DEVSTAT_WRITE : 
+					DEVSTAT_READ, NULL, NULL);
+		}
+	}
 
 	return(error);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:17:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A66DE1065676;
	Tue, 17 Nov 2009 21:17:22 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 950338FC0A;
	Tue, 17 Nov 2009 21:17:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLHMEq039555;
	Tue, 17 Nov 2009 21:17:22 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLHMfb039552;
	Tue, 17 Nov 2009 21:17:22 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172117.nAHLHMfb039552@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:17:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199447 - stable/8/sbin/camcontrol
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:17:22 -0000

Author: mav
Date: Tue Nov 17 21:17:22 2009
New Revision: 199447
URL: http://svn.freebsd.org/changeset/base/199447

Log:
  MFC r199079, r199101:
  Add support for ATA Power Management.

Modified:
  stable/8/sbin/camcontrol/camcontrol.8
  stable/8/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/8/sbin/camcontrol/   (props changed)

Modified: stable/8/sbin/camcontrol/camcontrol.8
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.8	Tue Nov 17 21:14:58 2009	(r199446)
+++ stable/8/sbin/camcontrol/camcontrol.8	Tue Nov 17 21:17:22 2009	(r199447)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 4, 2009
+.Dd November 9, 2009
 .Dt CAMCONTROL 8
 .Os
 .Sh NAME
@@ -165,6 +165,20 @@
 .Op Fl w
 .Op Fl y
 .Nm
+.Ic idle
+.Op device id
+.Op generic args
+.Op Fl t Ar time
+.Nm
+.Ic standby
+.Op device id
+.Op generic args
+.Op Fl t Ar time
+.Nm
+.Ic sleep
+.Op device id
+.Op generic args
+.Nm
 .Ic help
 .Sh DESCRIPTION
 The
@@ -821,6 +835,15 @@ The user
 will not be asked about the timeout if a timeout is specified on the
 command line.
 .El
+.It Ic idle
+Put ATA device into IDLE state. Optional parameter specifies automatic
+idle timer value in seconds.
+.It Ic standby
+Put ATA device into STANDBY state. Optional parameter specifies automatic
+standby timer value in seconds.
+.It Ic sleep
+Put ATA device into SLEEP state. Note that the only way get device out of
+this state may be reset.
 .It Ic help
 Print out verbose usage information.
 .El

Modified: stable/8/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 21:14:58 2009	(r199446)
+++ stable/8/sbin/camcontrol/camcontrol.c	Tue Nov 17 21:17:22 2009	(r199447)
@@ -74,7 +74,10 @@ typedef enum {
 	CAM_CMD_DETACH		= 0x00000010,
 	CAM_CMD_REPORTLUNS	= 0x00000011,
 	CAM_CMD_READCAP		= 0x00000012,
-	CAM_CMD_IDENTIFY	= 0x00000013
+	CAM_CMD_IDENTIFY	= 0x00000013,
+	CAM_CMD_IDLE		= 0x00000014,
+	CAM_CMD_STANDBY		= 0x00000015,
+	CAM_CMD_SLEEP		= 0x00000016
 } cam_cmdmask;
 
 typedef enum {
@@ -154,6 +157,9 @@ struct camcontrol_opts option_table[] = 
 	{"rate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts},
 	{"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXc"},
 	{"format", CAM_CMD_FORMAT, CAM_ARG_NONE, "qrwy"},
+	{"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"},
+	{"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"},
+	{"sleep", CAM_CMD_SLEEP, CAM_ARG_NONE, ""},
 #endif /* MINIMALISTIC */
 	{"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL},
 	{"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL},
@@ -217,6 +223,8 @@ static int scsireportluns(struct cam_dev
 			  char *combinedopt, int retry_count, int timeout);
 static int scsireadcapacity(struct cam_device *device, int argc, char **argv,
 			    char *combinedopt, int retry_count, int timeout);
+static int atapm(struct cam_device *device, int argc, char **argv,
+			    char *combinedopt, int retry_count, int timeout);
 #endif /* MINIMALISTIC */
 
 camcontrol_optret
@@ -4128,6 +4136,91 @@ bailout:
 	return (retval);
 }
 
+static int
+atapm(struct cam_device *device, int argc, char **argv,
+		 char *combinedopt, int retry_count, int timeout)
+{
+	union ccb *ccb;
+	int retval = 0;
+	int t = -1;
+	int c;
+	u_char cmd, sc;
+
+	ccb = cam_getccb(device);
+
+	if (ccb == NULL) {
+		warnx("%s: error allocating ccb", __func__);
+		return (1);
+	}
+
+	while ((c = getopt(argc, argv, combinedopt)) != -1) {
+		switch (c) {
+		case 't':
+			t = atoi(optarg);
+			break;
+		default:
+			break;
+		}
+	}
+	if (strcmp(argv[1], "idle") == 0) {
+		if (t == -1)
+			cmd = ATA_IDLE_IMMEDIATE;
+		else
+			cmd = ATA_IDLE_CMD;
+	} else if (strcmp(argv[1], "standby") == 0) {
+		if (t == -1)
+			cmd = ATA_STANDBY_IMMEDIATE;
+		else
+			cmd = ATA_STANDBY_CMD;
+	} else {
+		cmd = ATA_SLEEP;
+		t = -1;
+	}
+	if (t < 0)
+		sc = 0;
+	else if (t <= (240 * 5))
+		sc = t / 5;
+	else if (t <= (11 * 30 * 60))
+		sc = t / (30 * 60) + 241;
+	else
+		sc = 253;
+	cam_fill_ataio(&ccb->ataio,
+		      retry_count,
+		      NULL,
+		      /*flags*/CAM_DIR_NONE,
+		      MSG_SIMPLE_Q_TAG,
+		      /*data_ptr*/NULL,
+		      /*dxfer_len*/0,
+		      timeout ? timeout : 30 * 1000);
+	ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, sc);
+
+	/* Disable freezing the device queue */
+	ccb->ccb_h.flags |= CAM_DEV_QFRZDIS;
+
+	if (arglist & CAM_ARG_ERR_RECOVER)
+		ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
+
+	if (cam_send_ccb(device, ccb) < 0) {
+		warn("error sending command");
+
+		if (arglist & CAM_ARG_VERBOSE)
+			cam_error_print(device, ccb, CAM_ESF_ALL,
+					CAM_EPF_ALL, stderr);
+
+		retval = 1;
+		goto bailout;
+	}
+
+	if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+		cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr);
+		retval = 1;
+		goto bailout;
+	}
+bailout:
+	cam_freeccb(ccb);
+	return (retval);
+}
+
 #endif /* MINIMALISTIC */
 
 void 
@@ -4166,6 +4259,9 @@ usage(int verbose)
 "                              [-R syncrate][-v][-T ]\n"
 "                              [-U][-W bus_width]\n"
 "        camcontrol format     [dev_id][generic args][-q][-r][-w][-y]\n"
+"        camcontrol idle       [dev_id][generic args][-t time]\n"
+"        camcontrol standby    [dev_id][generic args][-t time]\n"
+"        camcontrol sleep      [dev_id][generic args]\n"
 #endif /* MINIMALISTIC */
 "        camcontrol help\n");
 	if (!verbose)
@@ -4193,6 +4289,9 @@ usage(int verbose)
 "tags        report or set the number of transaction slots for a device\n"
 "negotiate   report or set device negotiation parameters\n"
 "format      send the SCSI FORMAT UNIT command to the named device\n"
+"idle        send the ATA IDLE command to the named device\n"
+"standby     send the ATA STANDBY command to the named device\n"
+"sleep       send the ATA SLEEP command to the named device\n"
 "help        this message\n"
 "Device Identifiers:\n"
 "bus:target        specify the bus and target, lun defaults to 0\n"
@@ -4259,7 +4358,9 @@ usage(int verbose)
 "-q                be quiet, don't print status messages\n"
 "-r                run in report only mode\n"
 "-w                don't send immediate format command\n"
-"-y                don't ask any questions\n");
+"-y                don't ask any questions\n"
+"idle/standby arguments:\n"
+"-t           number of seconds before respective state.\n");
 #endif /* MINIMALISTIC */
 }
 
@@ -4555,6 +4656,13 @@ main(int argc, char **argv)
 						 combinedopt, retry_count,
 						 timeout);
 			break;
+		case CAM_CMD_IDLE:
+		case CAM_CMD_STANDBY:
+		case CAM_CMD_SLEEP:
+			error = atapm(cam_dev, argc, argv,
+						 combinedopt, retry_count,
+						 timeout);
+			break;
 #endif /* MINIMALISTIC */
 		case CAM_CMD_USAGE:
 			usage(1);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:20:19 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D14DE1065679;
	Tue, 17 Nov 2009 21:20:19 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B6C858FC1E;
	Tue, 17 Nov 2009 21:20:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLKJ3g039730;
	Tue, 17 Nov 2009 21:20:19 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLKJ0Q039727;
	Tue, 17 Nov 2009 21:20:19 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172120.nAHLKJ0Q039727@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:20:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199448 - stable/8/sys/dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:20:20 -0000

Author: mav
Date: Tue Nov 17 21:20:19 2009
New Revision: 199448
URL: http://svn.freebsd.org/changeset/base/199448

Log:
  MFC r199132:
  Organize device IDs and add some more of them.

Modified:
  stable/8/sys/dev/siis/siis.c
  stable/8/sys/dev/siis/siis.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:17:22 2009	(r199447)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:20:19 2009	(r199448)
@@ -89,24 +89,37 @@ static void siispoll(struct cam_sim *sim
 
 MALLOC_DEFINE(M_SIIS, "SIIS driver", "SIIS driver data buffers");
 
+static struct {
+	uint32_t	id;
+	const char	*name;
+	int		ports;
+} siis_ids[] = {
+	{0x31241095,	"SiI3124",	4},
+	{0x31248086,	"SiI3124",	4},
+	{0x31321095,	"SiI3132",	2},
+	{0x02421095,	"SiI3132",	2},
+	{0x02441095,	"SiI3132",	2},
+	{0x31311095,	"SiI3131",	1},
+	{0x35311095,	"SiI3531",	1},
+	{0,		NULL,		0}
+};
+
 static int
 siis_probe(device_t dev)
 {
+	char buf[64];
+	int i;
 	uint32_t devid = pci_get_devid(dev);
 
-	if (devid == SIIS_SII3124) {
-		device_set_desc_copy(dev, "SiI3124 SATA2 controller");
-	} else if (devid == SIIS_SII3132 ||
-		   devid == SIIS_SII3132_1 ||
-		   devid == SIIS_SII3132_2) {
-		device_set_desc_copy(dev, "SiI3132 SATA2 controller");
-	} else if (devid == SIIS_SII3531) {
-		device_set_desc_copy(dev, "SiI3531 SATA2 controller");
-	} else {
-		return (ENXIO);
+	for (i = 0; siis_ids[i].id != 0; i++) {
+		if (siis_ids[i].id == devid) {
+			snprintf(buf, sizeof(buf), "%s SATA2 controller",
+			    siis_ids[i].name);
+			device_set_desc_copy(dev, buf);
+			return (BUS_PROBE_VENDOR);
+		}
 	}
-
-	return (BUS_PROBE_VENDOR);
+	return (ENXIO);
 }
 
 static int
@@ -115,8 +128,12 @@ siis_attach(device_t dev)
 	struct siis_controller *ctlr = device_get_softc(dev);
 	uint32_t devid = pci_get_devid(dev);
 	device_t child;
-	int	error, unit;
+	int	error, i, unit;
 
+	for (i = 0; siis_ids[i].id != 0; i++) {
+		if (siis_ids[i].id == devid)
+			break;
+	}
 	ctlr->dev = dev;
 	/* Global memory */
 	ctlr->r_grid = PCIR_BAR(0);
@@ -146,8 +163,7 @@ siis_attach(device_t dev)
 	/* Reset controller */
 	siis_resume(dev);
 	/* Number of HW channels */
-	ctlr->channels = (devid == SIIS_SII3124) ? 4 :
-	    (devid == SIIS_SII3531 ? 1 : 2);
+	ctlr->channels = siis_ids[i].ports;
 	/* Setup interrupts. */
 	if (siis_setup_interrupt(dev)) {
 		bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem);

Modified: stable/8/sys/dev/siis/siis.h
==============================================================================
--- stable/8/sys/dev/siis/siis.h	Tue Nov 17 21:17:22 2009	(r199447)
+++ stable/8/sys/dev/siis/siis.h	Tue Nov 17 21:20:19 2009	(r199448)
@@ -137,12 +137,6 @@
 
 #define ATA_SACTIVE                     16
 
-#define SIIS_SII3124		0x31241095
-#define SIIS_SII3132		0x31321095
-#define SIIS_SII3132_1		0x02421095
-#define SIIS_SII3132_2		0x02441095
-#define SIIS_SII3531		0x35311095
-
 /*
  * Global registers
  */

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:21:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 258EE106568D;
	Tue, 17 Nov 2009 21:21:28 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0AD878FC1E;
	Tue, 17 Nov 2009 21:21:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLLRov039856;
	Tue, 17 Nov 2009 21:21:27 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLLR7W039854;
	Tue, 17 Nov 2009 21:21:27 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172121.nAHLLR7W039854@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:21:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199449 - stable/8/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:21:28 -0000

Author: mav
Date: Tue Nov 17 21:21:27 2009
New Revision: 199449
URL: http://svn.freebsd.org/changeset/base/199449

Log:
  MFC r199176:
  Add set of chip IDs, known to support AHCI.

Modified:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 21:20:19 2009	(r199448)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 21:21:27 2009	(r199449)
@@ -96,23 +96,154 @@ static void ahcipoll(struct cam_sim *sim
 
 MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers");
 
-/*
- * AHCI v1.x compliant SATA chipset support functions
- */
+static struct {
+	uint32_t	id;
+	const char	*name;
+	int		flags;
+} ahci_ids[] = {
+	{0x43801002, "ATI IXP600",	0},
+	{0x43901002, "ATI IXP700",	0},
+	{0x43911002, "ATI IXP700",	0},
+	{0x43921002, "ATI IXP700",	0},
+	{0x43931002, "ATI IXP700",	0},
+	{0x43941002, "ATI IXP800",	0},
+	{0x43951002, "ATI IXP800",	0},
+	{0x26528086, "Intel ICH6",	0},
+	{0x26538086, "Intel ICH6M",	0},
+	{0x26818086, "Intel ESB2",	0},
+	{0x26828086, "Intel ESB2",	0},
+	{0x26838086, "Intel ESB2",	0},
+	{0x27c18086, "Intel ICH7",	0},
+	{0x27c38086, "Intel ICH7",	0},
+	{0x27c58086, "Intel ICH7M",	0},
+	{0x27c68086, "Intel ICH7M",	0},
+	{0x28218086, "Intel ICH8",	0},
+	{0x28228086, "Intel ICH8",	0},
+	{0x28248086, "Intel ICH8",	0},
+	{0x28298086, "Intel ICH8M",	0},
+	{0x282a8086, "Intel ICH8M",	0},
+	{0x29228086, "Intel ICH9",	0},
+	{0x29238086, "Intel ICH9",	0},
+	{0x29248086, "Intel ICH9",	0},
+	{0x29258086, "Intel ICH9",	0},
+	{0x29278086, "Intel ICH9",	0},
+	{0x29298086, "Intel ICH9M",	0},
+	{0x292a8086, "Intel ICH9M",	0},
+	{0x292b8086, "Intel ICH9M",	0},
+	{0x292c8086, "Intel ICH9M",	0},
+	{0x292f8086, "Intel ICH9M",	0},
+	{0x294d8086, "Intel ICH9",	0},
+	{0x294e8086, "Intel ICH9M",	0},
+	{0x3a058086, "Intel ICH10",	0},
+	{0x3a228086, "Intel ICH10",	0},
+	{0x3a258086, "Intel ICH10",	0},
+	{0x3b228086, "Intel PCH",	0},
+	{0x3b238086, "Intel PCH",	0},
+	{0x3b248086, "Intel PCH",	0},
+	{0x3b258086, "Intel PCH",	0},
+	{0x3b298086, "Intel PCH",	0},
+	{0x3b2b8086, "Intel PCH",	0},
+	{0x3b2c8086, "Intel PCH",	0},
+	{0x3b2f8086, "Intel PCH",	0},
+	{0x044c10de, "NVIDIA MCP65",	0},
+	{0x044d10de, "NVIDIA MCP65",	0},
+	{0x044e10de, "NVIDIA MCP65",	0},
+	{0x044f10de, "NVIDIA MCP65",	0},
+	{0x045c10de, "NVIDIA MCP65",	0},
+	{0x045d10de, "NVIDIA MCP65",	0},
+	{0x045e10de, "NVIDIA MCP65",	0},
+	{0x045f10de, "NVIDIA MCP65",	0},
+	{0x055010de, "NVIDIA MCP67",	0},
+	{0x055110de, "NVIDIA MCP67",	0},
+	{0x055210de, "NVIDIA MCP67",	0},
+	{0x055310de, "NVIDIA MCP67",	0},
+	{0x055410de, "NVIDIA MCP67",	0},
+	{0x055510de, "NVIDIA MCP67",	0},
+	{0x055610de, "NVIDIA MCP67",	0},
+	{0x055710de, "NVIDIA MCP67",	0},
+	{0x055810de, "NVIDIA MCP67",	0},
+	{0x055910de, "NVIDIA MCP67",	0},
+	{0x055A10de, "NVIDIA MCP67",	0},
+	{0x055B10de, "NVIDIA MCP67",	0},
+	{0x058410de, "NVIDIA MCP67",	0},
+	{0x07f010de, "NVIDIA MCP73",	0},
+	{0x07f110de, "NVIDIA MCP73",	0},
+	{0x07f210de, "NVIDIA MCP73",	0},
+	{0x07f310de, "NVIDIA MCP73",	0},
+	{0x07f410de, "NVIDIA MCP73",	0},
+	{0x07f510de, "NVIDIA MCP73",	0},
+	{0x07f610de, "NVIDIA MCP73",	0},
+	{0x07f710de, "NVIDIA MCP73",	0},
+	{0x07f810de, "NVIDIA MCP73",	0},
+	{0x07f910de, "NVIDIA MCP73",	0},
+	{0x07fa10de, "NVIDIA MCP73",	0},
+	{0x07fb10de, "NVIDIA MCP73",	0},
+	{0x0ad010de, "NVIDIA MCP77",	0},
+	{0x0ad110de, "NVIDIA MCP77",	0},
+	{0x0ad210de, "NVIDIA MCP77",	0},
+	{0x0ad310de, "NVIDIA MCP77",	0},
+	{0x0ad410de, "NVIDIA MCP77",	0},
+	{0x0ad510de, "NVIDIA MCP77",	0},
+	{0x0ad610de, "NVIDIA MCP77",	0},
+	{0x0ad710de, "NVIDIA MCP77",	0},
+	{0x0ad810de, "NVIDIA MCP77",	0},
+	{0x0ad910de, "NVIDIA MCP77",	0},
+	{0x0ada10de, "NVIDIA MCP77",	0},
+	{0x0adb10de, "NVIDIA MCP77",	0},
+	{0x0ab410de, "NVIDIA MCP79",	0},
+	{0x0ab510de, "NVIDIA MCP79",	0},
+	{0x0ab610de, "NVIDIA MCP79",	0},
+	{0x0ab710de, "NVIDIA MCP79",	0},
+	{0x0ab810de, "NVIDIA MCP79",	0},
+	{0x0ab910de, "NVIDIA MCP79",	0},
+	{0x0aba10de, "NVIDIA MCP79",	0},
+	{0x0abb10de, "NVIDIA MCP79",	0},
+	{0x0abc10de, "NVIDIA MCP79",	0},
+	{0x0abd10de, "NVIDIA MCP79",	0},
+	{0x0abe10de, "NVIDIA MCP79",	0},
+	{0x0abf10de, "NVIDIA MCP79",	0},
+	{0x0d8410de, "NVIDIA MCP89",	0},
+	{0x0d8510de, "NVIDIA MCP89",	0},
+	{0x0d8610de, "NVIDIA MCP89",	0},
+	{0x0d8710de, "NVIDIA MCP89",	0},
+	{0x0d8810de, "NVIDIA MCP89",	0},
+	{0x0d8910de, "NVIDIA MCP89",	0},
+	{0x0d8a10de, "NVIDIA MCP89",	0},
+	{0x0d8b10de, "NVIDIA MCP89",	0},
+	{0x0d8c10de, "NVIDIA MCP89",	0},
+	{0x0d8d10de, "NVIDIA MCP89",	0},
+	{0x0d8e10de, "NVIDIA MCP89",	0},
+	{0x0d8f10de, "NVIDIA MCP89",	0},
+	{0x33491106, "VIA VT8251",	0},
+	{0x62871106, "VIA VT8251",	0},
+	{0x11841039, "SiS 966",		0},
+	{0x11851039, "SiS 968",		0},
+	{0x01861039, "SiS 968",		0},
+	{0,	     NULL,		0}
+};
+
 static int
 ahci_probe(device_t dev)
 {
+	char buf[64];
+	int i;
+	uint32_t devid = pci_get_devid(dev);
 
-	/* is this a possible AHCI candidate ? */
+	/* Is this a known AHCI chip? */
+	for (i = 0; ahci_ids[i].id != 0; i++) {
+		if (ahci_ids[i].id == devid) {
+			snprintf(buf, sizeof(buf), "%s AHCI SATA controller",
+			    ahci_ids[i].name);
+			device_set_desc_copy(dev, buf);
+			return (BUS_PROBE_VENDOR);
+		}
+	}
+	/* Is this a possible AHCI candidate? */
 	if (pci_get_class(dev) != PCIC_STORAGE ||
-	    pci_get_subclass(dev) != PCIS_STORAGE_SATA)
+	    pci_get_subclass(dev) != PCIS_STORAGE_SATA ||
+	    pci_get_progif(dev) != PCIP_STORAGE_SATA_AHCI_1_0)
 		return (ENXIO);
-
-	/* is this PCI device flagged as an AHCI compliant chip ? */
-	if (pci_get_progif(dev) != PCIP_STORAGE_SATA_AHCI_1_0)
-		return (ENXIO);
-
-	device_set_desc_copy(dev, "AHCI controller");
+	device_set_desc_copy(dev, "AHCI SATA controller");
 	return (BUS_PROBE_VENDOR);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:23:05 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D92481065672;
	Tue, 17 Nov 2009 21:23:05 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C745C8FC08;
	Tue, 17 Nov 2009 21:23:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLN5eF039985;
	Tue, 17 Nov 2009 21:23:05 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLN5mS039973;
	Tue, 17 Nov 2009 21:23:05 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172123.nAHLN5mS039973@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:23:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199450 - in stable/8/sys: cam cam/ata cam/scsi
	dev/ahci dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:23:06 -0000

Author: mav
Date: Tue Nov 17 21:23:05 2009
New Revision: 199450
URL: http://svn.freebsd.org/changeset/base/199450

Log:
  MFC r199178:
  - Move tagged queueing control from ADA to ATA XPT. It allows to control
    device command queue length correctly. First step to support < 32 tags.
  - Limit queue for non-tagged devices by 2 slots for ahci(4) and siis(4).
  - Implement quirk matching for ATA devices.
  - Move xpt_schedule_dev_sendq() from header to source file.
  - Move delayed queue shrinking to the more expected place - element freeing.
  - Remove some SCSIsms in ATA.

Modified:
  stable/8/sys/cam/ata/ata_all.c
  stable/8/sys/cam/ata/ata_all.h
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/ata/ata_xpt.c
  stable/8/sys/cam/cam.c
  stable/8/sys/cam/cam_ccb.h
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/cam/cam_xpt_internal.h
  stable/8/sys/cam/scsi/scsi_xpt.c
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_all.c
==============================================================================
--- stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/ata/ata_all.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -509,3 +509,38 @@ ata_max_mode(struct ata_params *ap, int 
     return (mode);
 }
 
+int
+ata_identify_match(caddr_t identbuffer, caddr_t table_entry)
+{
+	struct scsi_inquiry_pattern *entry;
+	struct ata_params *ident;
+ 
+	entry = (struct scsi_inquiry_pattern *)table_entry;
+	ident = (struct ata_params *)identbuffer;
+
+	if ((cam_strmatch(ident->model, entry->product,
+			  sizeof(ident->model)) == 0)
+	 && (cam_strmatch(ident->revision, entry->revision,
+			  sizeof(ident->revision)) == 0)) {
+		return (0);
+	}
+        return (-1);
+}
+
+int
+ata_static_identify_match(caddr_t identbuffer, caddr_t table_entry)
+{
+	struct scsi_static_inquiry_pattern *entry;
+	struct ata_params *ident;
+ 
+	entry = (struct scsi_static_inquiry_pattern *)table_entry;
+	ident = (struct ata_params *)identbuffer;
+
+	if ((cam_strmatch(ident->model, entry->product,
+			  sizeof(ident->model)) == 0)
+	 && (cam_strmatch(ident->revision, entry->revision,
+			  sizeof(ident->revision)) == 0)) {
+		return (0);
+	}
+        return (-1);
+}

Modified: stable/8/sys/cam/ata/ata_all.h
==============================================================================
--- stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/ata/ata_all.h	Tue Nov 17 21:23:05 2009	(r199450)
@@ -114,4 +114,7 @@ int	ata_max_wmode(struct ata_params *ap)
 int	ata_max_umode(struct ata_params *ap);
 int	ata_max_mode(struct ata_params *ap, int mode, int maxmode);
 
+int	ata_identify_match(caddr_t identbuffer, caddr_t table_entry);
+int	ata_static_identify_match(caddr_t identbuffer, caddr_t table_entry);
+
 #endif

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/ata/ata_da.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -122,9 +122,17 @@ struct ada_quirk_entry {
 	ada_quirks quirks;
 };
 
-//static struct ada_quirk_entry ada_quirk_table[] =
-//{
-//};
+static struct ada_quirk_entry ada_quirk_table[] =
+{
+	{
+		/* Default */
+		{
+		  T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
+		  /*vendor*/"*", /*product*/"*", /*revision*/"*"
+		},
+		/*quirks*/0
+	},
+};
 
 static	disk_strategy_t	adastrategy;
 static	dumper_t	adadump;
@@ -618,7 +626,7 @@ adaregister(struct cam_periph *periph, v
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
 		softc->flags |= ADA_FLAG_CAN_FLUSHCACHE;
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
-	    cgd->ident_data.queue >= 31)
+	    cgd->inq_flags & SID_CmdQue)
 		softc->flags |= ADA_FLAG_CAN_NCQ;
 	softc->state = ADA_STATE_NORMAL;
 
@@ -627,12 +635,10 @@ adaregister(struct cam_periph *periph, v
 	/*
 	 * See if this device has any quirks.
 	 */
-//	match = cam_quirkmatch((caddr_t)&cgd->inq_data,
-//			       (caddr_t)ada_quirk_table,
-//			       sizeof(ada_quirk_table)/sizeof(*ada_quirk_table),
-//			       sizeof(*ada_quirk_table), scsi_inquiry_match);
-	match = NULL;
-
+	match = cam_quirkmatch((caddr_t)&cgd->ident_data,
+			       (caddr_t)ada_quirk_table,
+			       sizeof(ada_quirk_table)/sizeof(*ada_quirk_table),
+			       sizeof(*ada_quirk_table), ata_identify_match);
 	if (match != NULL)
 		softc->quirks = ((struct ada_quirk_entry *)match)->quirks;
 	else
@@ -700,11 +706,6 @@ adaregister(struct cam_periph *periph, v
 		dp->secsize, dp->heads,
 		dp->secs_per_track, dp->cylinders);
 	xpt_announce_periph(periph, announce_buf);
-	if (softc->flags & ADA_FLAG_CAN_NCQ) {
-		printf("%s%d: Native Command Queueing enabled\n",
-		       periph->periph_name, periph->unit_number);
-	}
-
 	/*
 	 * Add async callbacks for bus reset and
 	 * bus device reset calls.  I don't bother

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -66,17 +66,12 @@ __FBSDID("$FreeBSD$");
 #include 	/* for xpt_print below */
 #include "opt_cam.h"
 
-struct scsi_quirk_entry {
+struct ata_quirk_entry {
 	struct scsi_inquiry_pattern inq_pat;
 	u_int8_t quirks;
-#define	CAM_QUIRK_NOLUNS	0x01
-#define	CAM_QUIRK_NOSERIAL	0x02
-#define	CAM_QUIRK_HILUNS	0x04
-#define	CAM_QUIRK_NOHILUNS	0x08
-	u_int mintags;
+#define	CAM_QUIRK_MAXTAGS	0x01
 	u_int maxtags;
 };
-#define SCSI_QUIRK(dev)	((struct scsi_quirk_entry *)((dev)->quirk))
 
 static periph_init_t probe_periph_init;
 
@@ -138,7 +133,7 @@ typedef struct {
 	struct cam_periph *periph;
 } probe_softc;
 
-static struct scsi_quirk_entry scsi_quirk_table[] =
+static struct ata_quirk_entry ata_quirk_table[] =
 {
 	{
 		/* Default tagged queuing parameters for all devices */
@@ -146,12 +141,12 @@ static struct scsi_quirk_entry scsi_quir
 		  T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
 		  /*vendor*/"*", /*product*/"*", /*revision*/"*"
 		},
-		/*quirks*/0, /*mintags*/2, /*maxtags*/32
+		/*quirks*/0, /*maxtags*/0
 	},
 };
 
-static const int scsi_quirk_table_size =
-	sizeof(scsi_quirk_table) / sizeof(*scsi_quirk_table);
+static const int ata_quirk_table_size =
+	sizeof(ata_quirk_table) / sizeof(*ata_quirk_table);
 
 static cam_status	proberegister(struct cam_periph *periph,
 				      void *arg);
@@ -162,7 +157,7 @@ static void	 probestart(struct cam_perip
 //				     struct cam_ed *device);
 static void	 probedone(struct cam_periph *periph, union ccb *done_ccb);
 static void	 probecleanup(struct cam_periph *periph);
-static void	 scsi_find_quirk(struct cam_ed *device);
+static void	 ata_find_quirk(struct cam_ed *device);
 static void	 ata_scan_bus(struct cam_periph *periph, union ccb *ccb);
 static void	 ata_scan_lun(struct cam_periph *periph,
 			       struct cam_path *path, cam_flags flags,
@@ -172,10 +167,9 @@ static struct cam_ed *
 		 ata_alloc_device(struct cam_eb *bus, struct cam_et *target,
 				   lun_id_t lun_id);
 static void	 ata_device_transport(struct cam_path *path);
-static void	 scsi_set_transfer_settings(struct ccb_trans_settings *cts,
+static void	 ata_set_transfer_settings(struct ccb_trans_settings *cts,
 					    struct cam_ed *device,
 					    int async_update);
-static void	 scsi_toggle_tags(struct cam_path *path);
 static void	 ata_dev_async(u_int32_t async_code,
 				struct cam_eb *bus,
 				struct cam_et *target,
@@ -717,6 +711,17 @@ noerror:
 
 			path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
 		}
+		if (ident_buf->satacapabilities & ATA_SUPPORT_NCQ) {
+			path->device->mintags = path->device->maxtags =
+			    ATA_QUEUE_LEN(ident_buf->queue) + 1;
+		}
+		ata_find_quirk(path->device);
+		/* XXX: If not all tags allowed, we must to tell SIM which are. */
+		if (path->device->mintags < path->bus->sim->max_tagged_dev_openings)
+			path->device->mintags = path->device->maxtags = 0;
+		if (path->device->mintags != 0) {
+			xpt_start_tags(path);
+		}
 		ata_device_transport(path);
 		PROBE_SET_ACTION(softc, PROBE_SETMODE);
 		xpt_release_ccb(done_ccb);
@@ -776,7 +781,6 @@ noerror:
 			return;
 		}
 
-		scsi_find_quirk(path->device);
 		ata_device_transport(path);
 		if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) {
 			path->device->flags &= ~CAM_DEV_UNCONFIGURED;
@@ -853,24 +857,23 @@ probecleanup(struct cam_periph *periph)
 }
 
 static void
-scsi_find_quirk(struct cam_ed *device)
+ata_find_quirk(struct cam_ed *device)
 {
-	struct scsi_quirk_entry *quirk;
+	struct ata_quirk_entry *quirk;
 	caddr_t	match;
 
-	match = cam_quirkmatch((caddr_t)&device->inq_data,
-			       (caddr_t)scsi_quirk_table,
-			       sizeof(scsi_quirk_table) /
-			       sizeof(*scsi_quirk_table),
-			       sizeof(*scsi_quirk_table), scsi_inquiry_match);
+	match = cam_quirkmatch((caddr_t)&device->ident_data,
+			       (caddr_t)ata_quirk_table,
+			       ata_quirk_table_size,
+			       sizeof(*ata_quirk_table), ata_identify_match);
 
 	if (match == NULL)
 		panic("xpt_find_quirk: device didn't match wildcard entry!!");
 
-	quirk = (struct scsi_quirk_entry *)match;
+	quirk = (struct ata_quirk_entry *)match;
 	device->quirk = quirk;
-	device->mintags = quirk->mintags;
-	device->maxtags = quirk->maxtags;
+	if (quirk->quirks & CAM_QUIRK_MAXTAGS)
+		device->mintags = device->maxtags = quirk->maxtags;
 }
 
 typedef struct {
@@ -1101,7 +1104,7 @@ static struct cam_ed *
 ata_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
 {
 	struct cam_path path;
-	struct scsi_quirk_entry *quirk;
+	struct ata_quirk_entry *quirk;
 	struct cam_ed *device;
 	struct cam_ed *cur_device;
 
@@ -1113,10 +1116,10 @@ ata_alloc_device(struct cam_eb *bus, str
 	 * Take the default quirk entry until we have inquiry
 	 * data and can determine a better quirk to use.
 	 */
-	quirk = &scsi_quirk_table[scsi_quirk_table_size - 1];
+	quirk = &ata_quirk_table[ata_quirk_table_size - 1];
 	device->quirk = (void *)quirk;
-	device->mintags = quirk->mintags;
-	device->maxtags = quirk->maxtags;
+	device->mintags = 0;
+	device->maxtags = 0;
 	bzero(&device->inq_data, sizeof(device->inq_data));
 	device->inq_flags = 0;
 	device->queue_flags = 0;
@@ -1199,7 +1202,7 @@ ata_action(union ccb *start_ccb)
 	switch (start_ccb->ccb_h.func_code) {
 	case XPT_SET_TRAN_SETTINGS:
 	{
-		scsi_set_transfer_settings(&start_ccb->cts,
+		ata_set_transfer_settings(&start_ccb->cts,
 					   start_ccb->ccb_h.path->device,
 					   /*async_update*/FALSE);
 		break;
@@ -1227,7 +1230,7 @@ ata_action(union ccb *start_ccb)
 }
 
 static void
-scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
+ata_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
 			   int async_update)
 {
 	struct	ccb_pathinq cpi;
@@ -1379,24 +1382,7 @@ scsi_set_transfer_settings(struct ccb_tr
 				device->tag_delay_count = CAM_TAG_DELAY_COUNT;
 				device->flags |= CAM_DEV_TAG_AFTER_COUNT;
 			} else {
-				struct ccb_relsim crs;
-
-				xpt_freeze_devq(cts->ccb_h.path, /*count*/1);
-		  		device->inq_flags &= ~SID_CmdQue;
-				xpt_dev_ccbq_resize(cts->ccb_h.path,
-						    sim->max_dev_openings);
-				device->flags &= ~CAM_DEV_TAG_AFTER_COUNT;
-				device->tag_delay_count = 0;
-
-				xpt_setup_ccb(&crs.ccb_h, cts->ccb_h.path,
-				    CAM_PRIORITY_NORMAL);
-				crs.ccb_h.func_code = XPT_REL_SIMQ;
-				crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
-				crs.openings
-				    = crs.release_timeout
-				    = crs.qfrozen_cnt
-				    = 0;
-				xpt_action((union ccb *)&crs);
+				xpt_stop_tags(cts->ccb_h.path);
 			}
 		}
 	}
@@ -1404,39 +1390,6 @@ scsi_set_transfer_settings(struct ccb_tr
 		(*(sim->sim_action))(sim, (union ccb *)cts);
 }
 
-static void
-scsi_toggle_tags(struct cam_path *path)
-{
-	struct cam_ed *dev;
-
-	/*
-	 * Give controllers a chance to renegotiate
-	 * before starting tag operations.  We
-	 * "toggle" tagged queuing off then on
-	 * which causes the tag enable command delay
-	 * counter to come into effect.
-	 */
-	dev = path->device;
-	if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0
-	 || ((dev->inq_flags & SID_CmdQue) != 0
- 	  && (dev->inq_flags & (SID_Sync|SID_WBus16|SID_WBus32)) != 0)) {
-		struct ccb_trans_settings cts;
-
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
-		cts.protocol = PROTO_SCSI;
-		cts.protocol_version = PROTO_VERSION_UNSPECIFIED;
-		cts.transport = XPORT_UNSPECIFIED;
-		cts.transport_version = XPORT_VERSION_UNSPECIFIED;
-		cts.proto_specific.scsi.flags = 0;
-		cts.proto_specific.scsi.valid = CTS_SCSI_VALID_TQ;
-		scsi_set_transfer_settings(&cts, path->device,
-					  /*async_update*/TRUE);
-		cts.proto_specific.scsi.flags = CTS_SCSI_FLAGS_TAG_ENB;
-		scsi_set_transfer_settings(&cts, path->device,
-					  /*async_update*/TRUE);
-	}
-}
-
 /*
  * Handle any per-device event notifications that require action by the XPT.
  */
@@ -1469,15 +1422,6 @@ ata_dev_async(u_int32_t async_code, stru
 		status = CAM_REQ_CMP_ERR;
 
 	if (status == CAM_REQ_CMP) {
-
-		/*
-		 * Allow transfer negotiation to occur in a
-		 * tag free environment.
-		 */
-		if (async_code == AC_SENT_BDR
-		 || async_code == AC_BUS_RESET)
-			scsi_toggle_tags(&newpath);
-
 		if (async_code == AC_INQ_CHANGED) {
 			/*
 			 * We've sent a start unit command, or
@@ -1498,7 +1442,7 @@ ata_dev_async(u_int32_t async_code, stru
 		struct ccb_trans_settings *settings;
 
 		settings = (struct ccb_trans_settings *)async_arg;
-		scsi_set_transfer_settings(settings, device,
+		ata_set_transfer_settings(settings, device,
 					  /*async_update*/TRUE);
 	}
 }

Modified: stable/8/sys/cam/cam.c
==============================================================================
--- stable/8/sys/cam/cam.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/cam.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -165,8 +165,12 @@ cam_strmatch(const u_int8_t *str, const 
 		str++;
 		str_len--;
 	}
-	while (str_len > 0 && *str++ == ' ')
+	while (str_len > 0 && *str == ' ') {
+		str++;
 		str_len--;
+	}
+	if (str_len > 0 && *str == 0)
+		str_len = 0;
 
 	return (str_len);
 }

Modified: stable/8/sys/cam/cam_ccb.h
==============================================================================
--- stable/8/sys/cam/cam_ccb.h	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/cam_ccb.h	Tue Nov 17 21:23:05 2009	(r199450)
@@ -307,7 +307,7 @@ struct ccb_getdev {
 	struct scsi_inquiry_data inq_data;
 	struct ata_params ident_data;
 	u_int8_t  serial_num[252];
-	u_int8_t  reserved;
+	u_int8_t  inq_flags;
 	u_int8_t  serial_num_len;
 };
 

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/cam_xpt.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -285,7 +285,6 @@ static xpt_devicefunc_t	xptsetasyncfunc;
 static xpt_busfunc_t	xptsetasyncbusfunc;
 static cam_status	xptregister(struct cam_periph *periph,
 				    void *arg);
-static void	 xpt_start_tags(struct cam_path *path);
 static __inline int xpt_schedule_dev_allocq(struct cam_eb *bus,
 					    struct cam_ed *dev);
 static __inline int periph_is_queued(struct cam_periph *periph);
@@ -299,12 +298,6 @@ xpt_schedule_dev_allocq(struct cam_eb *b
 	int retval;
 
 	if (dev->ccbq.devq_openings > 0) {
-		if ((dev->flags & CAM_DEV_RESIZE_QUEUE_NEEDED) != 0) {
-			cam_ccbq_resize(&dev->ccbq,
-					dev->ccbq.dev_openings
-					+ dev->ccbq.dev_active);
-			dev->flags &= ~CAM_DEV_RESIZE_QUEUE_NEEDED;
-		}
 		/*
 		 * The priority of a device waiting for CCB resources
 		 * is that of the the highest priority peripheral driver
@@ -321,6 +314,27 @@ xpt_schedule_dev_allocq(struct cam_eb *b
 }
 
 static __inline int
+xpt_schedule_dev_sendq(struct cam_eb *bus, struct cam_ed *dev)
+{
+	int	retval;
+
+	if (dev->ccbq.dev_openings > 0) {
+		/*
+		 * The priority of a device waiting for controller
+		 * resources is that of the the highest priority CCB
+		 * enqueued.
+		 */
+		retval =
+		    xpt_schedule_dev(&bus->sim->devq->send_queue,
+				     &dev->send_ccb_entry.pinfo,
+				     CAMQ_GET_HEAD(&dev->ccbq.queue)->priority);
+	} else {
+		retval = 0;
+	}
+	return (retval);
+}
+
+static __inline int
 periph_is_queued(struct cam_periph *periph)
 {
 	return (periph->pinfo.index != CAM_UNQUEUED_INDEX);
@@ -2657,6 +2671,7 @@ xpt_action_default(union ccb *start_ccb)
 			cgd->protocol = dev->protocol;
 			cgd->inq_data = dev->inq_data;
 			cgd->ident_data = dev->ident_data;
+			cgd->inq_flags = dev->inq_flags;
 			cgd->ccb_h.status = CAM_REQ_CMP;
 			cgd->serial_num_len = dev->serial_num_len;
 			if ((dev->serial_num_len > 0)
@@ -3747,6 +3762,11 @@ xpt_release_ccb(union ccb *free_ccb)
 	mtx_assert(sim->mtx, MA_OWNED);
 
 	cam_ccbq_release_opening(&device->ccbq);
+	if (device->flags & CAM_DEV_RESIZE_QUEUE_NEEDED) {
+		device->flags &= ~CAM_DEV_RESIZE_QUEUE_NEEDED;
+		cam_ccbq_resize(&device->ccbq,
+		    device->ccbq.dev_openings + device->ccbq.dev_active);
+	}
 	if (sim->ccb_count > sim->max_ccbs) {
 		xpt_free_ccb(free_ccb);
 		sim->ccb_count--;
@@ -4573,7 +4593,7 @@ xpt_find_device(struct cam_et *target, l
 	return (device);
 }
 
-static void
+void
 xpt_start_tags(struct cam_path *path)
 {
 	struct ccb_relsim crs;
@@ -4602,6 +4622,30 @@ xpt_start_tags(struct cam_path *path)
 	xpt_action((union ccb *)&crs);
 }
 
+void
+xpt_stop_tags(struct cam_path *path)
+{
+	struct ccb_relsim crs;
+	struct cam_ed *device;
+	struct cam_sim *sim;
+
+	device = path->device;
+	sim = path->bus->sim;
+	device->flags &= ~CAM_DEV_TAG_AFTER_COUNT;
+	device->tag_delay_count = 0;
+	xpt_freeze_devq(path, /*count*/1);
+	device->inq_flags &= ~SID_CmdQue;
+	xpt_dev_ccbq_resize(path, sim->max_dev_openings);
+	xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
+	crs.ccb_h.func_code = XPT_REL_SIMQ;
+	crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
+	crs.openings
+	    = crs.release_timeout
+	    = crs.qfrozen_cnt
+	    = 0;
+	xpt_action((union ccb *)&crs);
+}
+
 static int busses_to_config;
 static int busses_to_reset;
 

Modified: stable/8/sys/cam/cam_xpt_internal.h
==============================================================================
--- stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/cam_xpt_internal.h	Tue Nov 17 21:23:05 2009	(r199450)
@@ -176,29 +176,8 @@ void			xpt_run_dev_sendq(struct cam_eb *
 int			xpt_schedule_dev(struct camq *queue, cam_pinfo *dev_pinfo,
 					 u_int32_t new_priority);
 u_int32_t		xpt_dev_ccbq_resize(struct cam_path *path, int newopenings);
-
-
-
-static __inline int
-xpt_schedule_dev_sendq(struct cam_eb *bus, struct cam_ed *dev)
-{
-	int	retval;
-
-	if (dev->ccbq.dev_openings > 0) {
-		/*
-		 * The priority of a device waiting for controller
-		 * resources is that of the the highest priority CCB
-		 * enqueued.
-		 */
-		retval =
-		    xpt_schedule_dev(&bus->sim->devq->send_queue,
-				     &dev->send_ccb_entry.pinfo,
-				     CAMQ_GET_HEAD(&dev->ccbq.queue)->priority);
-	} else {
-		retval = 0;
-	}
-	return (retval);
-}
+void			xpt_start_tags(struct cam_path *path);
+void			xpt_stop_tags(struct cam_path *path);
 
 MALLOC_DECLARE(M_CAMXPT);
 

Modified: stable/8/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_xpt.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/cam/scsi/scsi_xpt.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -2274,24 +2274,7 @@ scsi_set_transfer_settings(struct ccb_tr
 				device->tag_delay_count = CAM_TAG_DELAY_COUNT;
 				device->flags |= CAM_DEV_TAG_AFTER_COUNT;
 			} else {
-				struct ccb_relsim crs;
-
-				xpt_freeze_devq(cts->ccb_h.path, /*count*/1);
-		  		device->inq_flags &= ~SID_CmdQue;
-				xpt_dev_ccbq_resize(cts->ccb_h.path,
-						    sim->max_dev_openings);
-				device->flags &= ~CAM_DEV_TAG_AFTER_COUNT;
-				device->tag_delay_count = 0;
-
-				xpt_setup_ccb(&crs.ccb_h, cts->ccb_h.path,
-				    CAM_PRIORITY_NORMAL);
-				crs.ccb_h.func_code = XPT_REL_SIMQ;
-				crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
-				crs.openings
-				    = crs.release_timeout
-				    = crs.qfrozen_cnt
-				    = 0;
-				xpt_action((union ccb *)&crs);
+				xpt_stop_tags(cts->ccb_h.path);
 			}
 		}
 	}

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -733,7 +733,8 @@ ahci_ch_attach(device_t dev)
 	}
 	/* Construct SIM entry */
 	ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch,
-	    device_get_unit(dev), &ch->mtx, ch->numslots, 0, devq);
+	    device_get_unit(dev), &ch->mtx,
+	    min(2, ch->numslots), ch->numslots, devq);
 	if (ch->sim == NULL) {
 		device_printf(dev, "unable to allocate sim\n");
 		error = ENOMEM;

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:21:27 2009	(r199449)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:23:05 2009	(r199450)
@@ -454,7 +454,7 @@ siis_ch_attach(device_t dev)
 	}
 	/* Construct SIM entry */
 	ch->sim = cam_sim_alloc(siisaction, siispoll, "siisch", ch,
-	    device_get_unit(dev), &ch->mtx, SIIS_MAX_SLOTS, 0, devq);
+	    device_get_unit(dev), &ch->mtx, 2, SIIS_MAX_SLOTS, devq);
 	if (ch->sim == NULL) {
 		device_printf(dev, "unable to allocate sim\n");
 		error = ENOMEM;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:26:05 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D8C571065670;
	Tue, 17 Nov 2009 21:26:05 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C864E8FC1A;
	Tue, 17 Nov 2009 21:26:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLQ5fg040202;
	Tue, 17 Nov 2009 21:26:05 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLQ51C040200;
	Tue, 17 Nov 2009 21:26:05 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172126.nAHLQ51C040200@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:26:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199451 - stable/8/sys/cam/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:26:06 -0000

Author: mav
Date: Tue Nov 17 21:26:05 2009
New Revision: 199451
URL: http://svn.freebsd.org/changeset/base/199451

Log:
  MFC r199263:
  Do not enable tagged queueing if controller reports 0 tags support.

Modified:
  stable/8/sys/cam/ata/ata_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 21:23:05 2009	(r199450)
+++ stable/8/sys/cam/ata/ata_xpt.c	Tue Nov 17 21:26:05 2009	(r199451)
@@ -719,7 +719,8 @@ noerror:
 		/* XXX: If not all tags allowed, we must to tell SIM which are. */
 		if (path->device->mintags < path->bus->sim->max_tagged_dev_openings)
 			path->device->mintags = path->device->maxtags = 0;
-		if (path->device->mintags != 0) {
+		if (path->device->mintags != 0 &&
+		    path->bus->sim->max_tagged_dev_openings != 0) {
 			xpt_start_tags(path);
 		}
 		ata_device_transport(path);

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:27:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 178251065693;
	Tue, 17 Nov 2009 21:27:22 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 074E88FC27;
	Tue, 17 Nov 2009 21:27:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLRL7S040307;
	Tue, 17 Nov 2009 21:27:21 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLRLmH040305;
	Tue, 17 Nov 2009 21:27:21 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172127.nAHLRLmH040305@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:27:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199452 - stable/8/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:27:22 -0000

Author: mav
Date: Tue Nov 17 21:27:21 2009
New Revision: 199452
URL: http://svn.freebsd.org/changeset/base/199452

Log:
  MFC r199278:
  Check SNCQ HBA capability bit when reporting NCQ support to CAM.

Modified:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 21:26:05 2009	(r199451)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Nov 17 21:27:21 2009	(r199452)
@@ -734,7 +734,9 @@ ahci_ch_attach(device_t dev)
 	/* Construct SIM entry */
 	ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch,
 	    device_get_unit(dev), &ch->mtx,
-	    min(2, ch->numslots), ch->numslots, devq);
+	    min(2, ch->numslots),
+	    (ch->caps & AHCI_CAP_SNCQ) ? ch->numslots : 0,
+	    devq);
 	if (ch->sim == NULL) {
 		device_printf(dev, "unable to allocate sim\n");
 		error = ENOMEM;
@@ -2119,7 +2121,9 @@ ahciaction(struct cam_sim *sim, union cc
 		struct ccb_pathinq *cpi = &ccb->cpi;
 
 		cpi->version_num = 1; /* XXX??? */
-		cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE;
+		cpi->hba_inquiry = PI_SDTR_ABLE;
+		if (ch->caps & AHCI_CAP_SNCQ)
+			cpi->hba_inquiry |= PI_TAG_ABLE;
 		if (ch->caps & AHCI_CAP_SPM)
 			cpi->hba_inquiry |= PI_SATAPM;
 		cpi->target_sprt = 0;

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:28:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 798641065672;
	Tue, 17 Nov 2009 21:28:59 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 693388FC1C;
	Tue, 17 Nov 2009 21:28:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLSx5w040453;
	Tue, 17 Nov 2009 21:28:59 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLSxAG040451;
	Tue, 17 Nov 2009 21:28:59 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172128.nAHLSxAG040451@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:28:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199453 - stable/8/sys/dev/siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:28:59 -0000

Author: mav
Date: Tue Nov 17 21:28:59 2009
New Revision: 199453
URL: http://svn.freebsd.org/changeset/base/199453

Log:
  MFC r199333:
  Do not require payload data to be aligned. It is not mentioned in datasheet
  and works fine in practice.

Modified:
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:27:21 2009	(r199452)
+++ stable/8/sys/dev/siis/siis.c	Tue Nov 17 21:28:59 2009	(r199453)
@@ -579,7 +579,7 @@ siis_dmainit(device_t dev)
 	}
 	ch->dma.work_bus = dcba.maddr;
 	/* Data area. */
-	if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0,
+	if (bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
 	    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
 	    NULL, NULL,
 	    SIIS_SG_ENTRIES * PAGE_SIZE * SIIS_MAX_SLOTS,

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:42:12 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7FE3A10656B6;
	Tue, 17 Nov 2009 21:42:12 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 55B298FC21;
	Tue, 17 Nov 2009 21:42:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLgCOP041264;
	Tue, 17 Nov 2009 21:42:12 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLgCka041263;
	Tue, 17 Nov 2009 21:42:12 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172142.nAHLgCka041263@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:42:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199454 - stable/8/sys/geom/stripe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:42:12 -0000

Author: mav
Date: Tue Nov 17 21:42:11 2009
New Revision: 199454
URL: http://svn.freebsd.org/changeset/base/199454

Log:
  MFC r196837:
  Remove artificial MAX_IO_SIZE constant, equal to DFLTPHYS * 2. Use MAXPHYS
  instead. It is NULL change for GENERIC kernel, but allows 'fast' mode to
  work on systems with increased MAXPHYS.

Modified:
  stable/8/sys/geom/stripe/g_stripe.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/geom/stripe/g_stripe.c
==============================================================================
--- stable/8/sys/geom/stripe/g_stripe.c	Tue Nov 17 21:28:59 2009	(r199453)
+++ stable/8/sys/geom/stripe/g_stripe.c	Tue Nov 17 21:42:11 2009	(r199454)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 
 
-#define	MAX_IO_SIZE	(DFLTPHYS * 2)
 static MALLOC_DEFINE(M_STRIPE, "stripe_data", "GEOM_STRIPE Data");
 
 static uma_zone_t g_stripe_zone;
@@ -87,7 +86,7 @@ g_sysctl_stripe_fast(SYSCTL_HANDLER_ARGS
 }
 SYSCTL_PROC(_kern_geom_stripe, OID_AUTO, fast, CTLTYPE_INT | CTLFLAG_RW,
     NULL, 0, g_sysctl_stripe_fast, "I", "Fast, but memory-consuming, mode");
-static u_int g_stripe_maxmem = MAX_IO_SIZE * 100;
+static u_int g_stripe_maxmem = MAXPHYS * 100;
 TUNABLE_INT("kern.geom.stripe.maxmem", &g_stripe_maxmem);
 SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, maxmem, CTLFLAG_RD, &g_stripe_maxmem,
     0, "Maximum memory that can be allocated in \"fast\" mode (in bytes)");
@@ -125,10 +124,10 @@ static void
 g_stripe_init(struct g_class *mp __unused)
 {
 
-	g_stripe_zone = uma_zcreate("g_stripe_zone", MAX_IO_SIZE, NULL, NULL,
+	g_stripe_zone = uma_zcreate("g_stripe_zone", MAXPHYS, NULL, NULL,
 	    NULL, NULL, 0, 0);
-	g_stripe_maxmem -= g_stripe_maxmem % MAX_IO_SIZE;
-	uma_zone_set_max(g_stripe_zone, g_stripe_maxmem / MAX_IO_SIZE);
+	g_stripe_maxmem -= g_stripe_maxmem % MAXPHYS;
+	uma_zone_set_max(g_stripe_zone, g_stripe_maxmem / MAXPHYS);
 }
 
 static void
@@ -613,14 +612,14 @@ g_stripe_start(struct bio *bp)
 	 * Do use "fast" mode when:
 	 * 1. "Fast" mode is ON.
 	 * and
-	 * 2. Request size is less than or equal to MAX_IO_SIZE (128kB),
+	 * 2. Request size is less than or equal to MAXPHYS,
 	 *    which should always be true.
 	 * and
 	 * 3. Request size is bigger than stripesize * ndisks. If it isn't,
 	 *    there will be no need to send more than one I/O request to
 	 *    a provider, so there is nothing to optmize.
 	 */
-	if (g_stripe_fast && bp->bio_length <= MAX_IO_SIZE &&
+	if (g_stripe_fast && bp->bio_length <= MAXPHYS &&
 	    bp->bio_length >= stripesize * sc->sc_ndisks) {
 		fast = 1;
 	}

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:43:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A86F81065694;
	Tue, 17 Nov 2009 21:43:42 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 97F8C8FC2F;
	Tue, 17 Nov 2009 21:43:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLhgfZ041385;
	Tue, 17 Nov 2009 21:43:42 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLhgC3041383;
	Tue, 17 Nov 2009 21:43:42 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172143.nAHLhgC3041383@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:43:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199455 - stable/8/sys/geom
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:43:42 -0000

Author: mav
Date: Tue Nov 17 21:43:42 2009
New Revision: 199455
URL: http://svn.freebsd.org/changeset/base/199455

Log:
  MFC r196904:
  Remove msleep() timeout from g_io_schedule_up/down(). It works fine
  without it, saving few percents of CPU on high request rates without
  need to rearm callout twice per request.

Modified:
  stable/8/sys/geom/geom_io.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/geom/geom_io.c
==============================================================================
--- stable/8/sys/geom/geom_io.c	Tue Nov 17 21:42:11 2009	(r199454)
+++ stable/8/sys/geom/geom_io.c	Tue Nov 17 21:43:42 2009	(r199455)
@@ -567,7 +567,7 @@ g_io_schedule_down(struct thread *tp __u
 		if (bp == NULL) {
 			CTR0(KTR_GEOM, "g_down going to sleep");
 			msleep(&g_wait_down, &g_bio_run_down.bio_queue_lock,
-			    PRIBIO | PDROP, "-", hz/10);
+			    PRIBIO | PDROP, "-", 0);
 			continue;
 		}
 		CTR0(KTR_GEOM, "g_down has work to do");
@@ -672,7 +672,7 @@ g_io_schedule_up(struct thread *tp __unu
 		}
 		CTR0(KTR_GEOM, "g_up going to sleep");
 		msleep(&g_wait_up, &g_bio_run_up.bio_queue_lock,
-		    PRIBIO | PDROP, "-", hz/10);
+		    PRIBIO | PDROP, "-", 0);
 	}
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:45:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D37A7106566C;
	Tue, 17 Nov 2009 21:45:28 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C309A8FC08;
	Tue, 17 Nov 2009 21:45:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLjSiA041515;
	Tue, 17 Nov 2009 21:45:28 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLjSVZ041513;
	Tue, 17 Nov 2009 21:45:28 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911172145.nAHLjSVZ041513@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 17 Nov 2009 21:45:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199456 - stable/8/sys/geom
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:45:28 -0000

Author: mav
Date: Tue Nov 17 21:45:28 2009
New Revision: 199456
URL: http://svn.freebsd.org/changeset/base/199456

Log:
  MFC r196964:
  Do not check proper request alignment here in geom_dev in production.
  It will be checked any way later by g_io_check() in g_io_schedule_down().
  It is only needed here to not trigger panic from additional check, when
  INVARIANTS enabled. So cover it with #ifdef INVARIANTS. It saves two
  64bit divisions per request.

Modified:
  stable/8/sys/geom/geom_dev.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/geom/geom_dev.c
==============================================================================
--- stable/8/sys/geom/geom_dev.c	Tue Nov 17 21:43:42 2009	(r199455)
+++ stable/8/sys/geom/geom_dev.c	Tue Nov 17 21:45:28 2009	(r199456)
@@ -371,14 +371,14 @@ g_dev_strategy(struct bio *bp)
 	cp = dev->si_drv2;
 	KASSERT(cp->acr || cp->acw,
 	    ("Consumer with zero access count in g_dev_strategy"));
-
+#ifdef INVARIANTS
 	if ((bp->bio_offset % cp->provider->sectorsize) != 0 ||
 	    (bp->bio_bcount % cp->provider->sectorsize) != 0) {
 		bp->bio_resid = bp->bio_bcount;
 		biofinish(bp, NULL, EINVAL);
 		return;
 	}
-
+#endif
 	for (;;) {
 		/*
 		 * XXX: This is not an ideal solution, but I belive it to

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 21:56:12 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98E1A1065697;
	Tue, 17 Nov 2009 21:56:12 +0000 (UTC)
	(envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 88FEF8FC12;
	Tue, 17 Nov 2009 21:56:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLuC5u042033;
	Tue, 17 Nov 2009 21:56:12 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLuC5f042031;
	Tue, 17 Nov 2009 21:56:12 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <200911172156.nAHLuC5f042031@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Tue, 17 Nov 2009 21:56:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199457 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 21:56:12 -0000

Author: gonzo
Date: Tue Nov 17 21:56:12 2009
New Revision: 199457
URL: http://svn.freebsd.org/changeset/base/199457

Log:
  - Unbreak build with KLD_DEBUG defined
  - Add debug.kld_debug sysctl to control KLD debugging level
  - Print information about KLD dependencies with debug enabled

Modified:
  head/sys/kern/kern_linker.c

Modified: head/sys/kern/kern_linker.c
==============================================================================
--- head/sys/kern/kern_linker.c	Tue Nov 17 21:45:28 2009	(r199456)
+++ head/sys/kern/kern_linker.c	Tue Nov 17 21:56:12 2009	(r199457)
@@ -64,6 +64,8 @@ __FBSDID("$FreeBSD$");
 
 #ifdef KLD_DEBUG
 int kld_debug = 0;
+SYSCTL_INT(_debug, OID_AUTO, kld_debug, CTLFLAG_RW,
+        &kld_debug, 0, "Set various levels of KLD debug");
 #endif
 
 #define	KLD_LOCK()		sx_xlock(&kld_sx)
@@ -632,7 +634,7 @@ linker_file_unload(linker_file_t file, i
 		 */
 		if ((error = module_unload(mod)) != 0) {
 			KLD_DPF(FILE, ("linker_file_unload: module %s"
-			    " failed unload\n", mod));
+			    " failed unload\n", module_getname(mod)));
 			return (error);
 		}
 		MOD_XLOCK;
@@ -709,6 +711,9 @@ linker_file_add_dependency(linker_file_t
 	file->deps = newdeps;
 	file->deps[file->ndeps] = dep;
 	file->ndeps++;
+	KLD_DPF(FILE, ("linker_file_add_dependency:"
+	    " adding %s as dependency for %s\n", 
+	    dep->filename, file->filename));
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 22:47:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5374D106568F;
	Tue, 17 Nov 2009 22:47:21 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 41C7E8FC1E;
	Tue, 17 Nov 2009 22:47:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHMlKG6044146;
	Tue, 17 Nov 2009 22:47:20 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHMlKCF044145;
	Tue, 17 Nov 2009 22:47:20 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <200911172247.nAHMlKCF044145@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Tue, 17 Nov 2009 22:47:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199458 - in head/bin: . pwait
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 22:47:21 -0000

Author: jilles
Date: Tue Nov 17 22:47:20 2009
New Revision: 199458
URL: http://svn.freebsd.org/changeset/base/199458

Log:
  Add pwait utility, which waits for any process to terminate.
  
  This is similar to the Solaris utility of the same name.
  
  Some use cases:
  * rc.subr's wait_for_pids
  * interactive use, e.g. to shut down the computer when some task is done
    even if the task is already running
  
  Discussed on:	hackers@

Added:
  head/bin/pwait/
  head/bin/pwait/Makefile   (contents, props changed)
  head/bin/pwait/pwait.1   (contents, props changed)
  head/bin/pwait/pwait.c   (contents, props changed)
Modified:
  head/bin/Makefile

Modified: head/bin/Makefile
==============================================================================
--- head/bin/Makefile	Tue Nov 17 21:56:12 2009	(r199457)
+++ head/bin/Makefile	Tue Nov 17 22:47:20 2009	(r199458)
@@ -27,6 +27,7 @@ SUBDIR= cat \
 	pax \
 	pkill \
 	ps \
+	pwait \
 	pwd \
 	${_rcp} \
 	realpath \

Added: head/bin/pwait/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/pwait/Makefile	Tue Nov 17 22:47:20 2009	(r199458)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+PROG=	pwait
+
+.include 

Added: head/bin/pwait/pwait.1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/pwait/pwait.1	Tue Nov 17 22:47:20 2009	(r199458)
@@ -0,0 +1,78 @@
+.\"
+.\" Copyright (c) 2004-2009, Jilles Tjoelker
+.\" 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 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 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 November 1, 2009
+.Os
+.Dt PWAIT 1
+.Sh NAME
+.Nm pwait
+.Nd wait for processes to terminate
+.Sh SYNOPSIS
+.Nm
+.Op Fl v
+.Ar pid
+\&...
+.Sh DESCRIPTION
+The
+.Nm
+utility will wait until each of the given processes has terminated. 
+.Pp
+The following option is available:
+.Bl -tag -width indent
+.It Fl v
+Print the exit status when each process terminates.
+.El
+.Sh DIAGNOSTICS
+.Pp
+The
+.Nm
+utility returns 0 on success, and >0 if an error occurs.
+.Pp
+Invalid pids elicit a warning message but are otherwise ignored.
+.Sh SEE ALSO
+.Xr kill 1 ,
+.Xr pkill 1 ,
+.Xr ps 1 ,
+.Xr wait 1 ,
+.Xr kqueue 2
+.Sh NOTES
+.Nm
+is not a substitute for the
+.Xr wait 1
+builtin
+as it will not clean up any zombies or state in the parent process.
+.Sh HISTORY
+A
+.Nm
+command first appeared in SunOS 5.8.

Added: head/bin/pwait/pwait.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/pwait/pwait.c	Tue Nov 17 22:47:20 2009	(r199458)
@@ -0,0 +1,145 @@
+/*-
+ * Copyright (c) 2004-2009, Jilles Tjoelker
+ * 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 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 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$");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static void
+usage(void)
+{
+
+	fprintf(stderr, "usage: pwait [-v] pid ...\n");
+	exit(EX_USAGE);
+}
+
+/*
+ * pwait - wait for processes to terminate
+ */
+int
+main(int argc, char *argv[])
+{
+	int kq;
+	struct kevent *e;
+	int verbose = 0;
+	int opt, nleft, n, i, duplicate, status;
+	long pid;
+	char *s, *end;
+
+	while ((opt = getopt(argc, argv, "v")) != -1) {
+		switch (opt) {
+		case 'v':
+			verbose = 1;
+			break;
+		default:
+			usage();
+			/* NOTREACHED */
+		}
+	}
+
+	argc -= optind;
+	argv += optind;
+
+	if (argc == 0)
+		usage();
+
+	kq = kqueue();
+	if (kq == -1)
+		err(1, "kqueue");
+
+	e = malloc(argc * sizeof(struct kevent));
+	if (e == NULL)
+		err(1, "malloc");
+	nleft = 0;
+	for (n = 0; n < argc; n++) {
+		s = argv[n];
+		if (!strncmp(s, "/proc/", 6)) /* Undocumented Solaris compat */
+			s += 6;
+		errno = 0;
+		pid = strtol(s, &end, 10);
+		if (pid < 0 || *end != '\0' || errno != 0) {
+			warnx("%s: bad process id", s);
+			continue;
+		}
+		duplicate = 0;
+		for (i = 0; i < nleft; i++)
+			if (e[i].ident == (uintptr_t)pid)
+				duplicate = 1;
+		if (!duplicate) {
+			EV_SET(e + nleft, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT,
+			    0, NULL);
+			if (kevent(kq, e + nleft, 1, NULL, 0, NULL) == -1)
+				warn("%ld", pid);
+			else
+				nleft++;
+		}
+	}
+
+	while (nleft > 0) {
+		n = kevent(kq, NULL, 0, e, nleft, NULL);
+		if (n == -1)
+			err(1, "kevent");
+		if (verbose)
+			for (i = 0; i < n; i++) {
+				status = e[i].data;
+				if (WIFEXITED(status))
+					printf("%ld: exited with status %d.\n",
+					    (long)e[i].ident,
+					    WEXITSTATUS(status));
+				else if (WIFSIGNALED(status))
+					printf("%ld: killed by signal %d.\n",
+					    (long)e[i].ident,
+					    WTERMSIG(status));
+				else
+					printf("%ld: terminated.\n",
+					    (long)e[i].ident);
+			}
+		nleft -= n;
+	}
+
+	return 0;
+}

From owner-svn-src-all@FreeBSD.ORG  Tue Nov 17 23:03:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 784B91065670;
	Tue, 17 Nov 2009 23:03:39 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4ED9A8FC1F;
	Tue, 17 Nov 2009 23:03:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHN3dsZ044935;
	Tue, 17 Nov 2009 23:03:39 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHN3dM4044931;
	Tue, 17 Nov 2009 23:03:39 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911172303.nAHN3dM4044931@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 17 Nov 2009 23:03:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199459 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Nov 2009 23:03:39 -0000

Author: tuexen
Date: Tue Nov 17 23:03:38 2009
New Revision: 199459
URL: http://svn.freebsd.org/changeset/base/199459

Log:
  Get rid of unused fields addr_over which is never really used,
  only copied around.
  
  Approved by: rrs (mentor)

Modified:
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_structs.h
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Tue Nov 17 22:47:20 2009	(r199458)
+++ head/sys/netinet/sctp_output.c	Tue Nov 17 23:03:38 2009	(r199459)
@@ -5875,10 +5875,8 @@ sctp_msg_append(struct sctp_tcb *stcb,
 	sp->strseq = 0;
 	if (sp->sinfo_flags & SCTP_ADDR_OVER) {
 		sp->net = net;
-		sp->addr_over = 1;
 	} else {
 		sp->net = stcb->asoc.primary_destination;
-		sp->addr_over = 0;
 	}
 	atomic_add_int(&sp->net->ref_count, 1);
 	(void)SCTP_GETTIME_TIMEVAL(&sp->ts);
@@ -7052,7 +7050,6 @@ dont_do_it:
 
 	chk->rec.data.timetodrop = sp->ts;
 	chk->flags = sp->act_flags;
-	chk->addr_over = sp->addr_over;
 
 	chk->whoTo = net;
 	atomic_add_int(&chk->whoTo->ref_count, 1);
@@ -12252,10 +12249,8 @@ skip_copy:
 	} else {
 		if (sp->sinfo_flags & SCTP_ADDR_OVER) {
 			sp->net = net;
-			sp->addr_over = 1;
 		} else {
 			sp->net = asoc->primary_destination;
-			sp->addr_over = 0;
 		}
 		atomic_add_int(&sp->net->ref_count, 1);
 		sctp_set_prsctp_policy(sp);

Modified: head/sys/netinet/sctp_structs.h
==============================================================================
--- head/sys/netinet/sctp_structs.h	Tue Nov 17 22:47:20 2009	(r199458)
+++ head/sys/netinet/sctp_structs.h	Tue Nov 17 23:03:38 2009	(r199459)
@@ -364,9 +364,6 @@ struct sctp_tmit_chunk {
 	uint8_t pad_inplace;
 	uint8_t do_rtt;
 	uint8_t book_size_scale;
-	uint8_t addr_over;	/* flag which is set if the dest address for
-				 * this chunk is overridden by user. Used for
-				 * CMT (iyengar@cis.udel.edu, 2005/06/21) */
 	uint8_t no_fr_allowed;
 	uint8_t pr_sctp_on;
 	uint8_t copy_by_ref;
@@ -444,7 +441,6 @@ struct sctp_stream_queue_pending {
 	uint8_t holds_key_ref;
 	uint8_t msg_is_complete;
 	uint8_t some_taken;
-	uint8_t addr_over;
 	uint8_t pr_sctp_on;
 	uint8_t sender_all_done;
 	uint8_t put_last_out;

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Tue Nov 17 22:47:20 2009	(r199458)
+++ head/sys/netinet/sctputil.c	Tue Nov 17 23:03:38 2009	(r199459)
@@ -4791,7 +4791,6 @@ next_on_sent:
 					chk->rec.data.payloadtype = sp->ppid;
 					chk->rec.data.context = sp->context;
 					chk->flags = sp->act_flags;
-					chk->addr_over = sp->addr_over;
 					chk->whoTo = sp->net;
 					atomic_add_int(&chk->whoTo->ref_count, 1);
 					chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1);

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 00:56:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0BE48106566C;
	Wed, 18 Nov 2009 00:56:06 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D5B138FC18;
	Wed, 18 Nov 2009 00:56:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI0u57W049826;
	Wed, 18 Nov 2009 00:56:05 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAI0u5KY049822;
	Wed, 18 Nov 2009 00:56:05 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200911180056.nAI0u5KY049822@svn.freebsd.org>
From: Xin LI 
Date: Wed, 18 Nov 2009 00:56:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199463 - in head: . share/man/man8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 00:56:06 -0000

Author: delphij
Date: Wed Nov 18 00:56:05 2009
New Revision: 199463
URL: http://svn.freebsd.org/changeset/base/199463

Log:
  rc.early(8) was removed as of 20090530 so remove manual page reference
  to it.
  
  MFC after:	1 week

Modified:
  head/ObsoleteFiles.inc
  head/share/man/man8/Makefile
  head/share/man/man8/rc.8

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Wed Nov 18 00:51:31 2009	(r199462)
+++ head/ObsoleteFiles.inc	Wed Nov 18 00:56:05 2009	(r199463)
@@ -14,6 +14,8 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20091117: removal of rc.early(8) link
+OLD_FILES+=usr/share/man/man8/rc.early.8.gz
 # 20091027: pselect.3 implemented as syscall
 OLD_FILES+=usr/share/man/man3/pselect.3.gz
 # 20091005: fusword.9 and susword.9 removed

Modified: head/share/man/man8/Makefile
==============================================================================
--- head/share/man/man8/Makefile	Wed Nov 18 00:51:31 2009	(r199462)
+++ head/share/man/man8/Makefile	Wed Nov 18 00:56:05 2009	(r199463)
@@ -16,7 +16,6 @@ MAN=	crash.8 \
 
 MLINKS=	rc.8 rc.atm.8 \
 	rc.8 rc.d.8 \
-	rc.8 rc.early.8 \
 	rc.8 rc.firewall.8 \
 	rc.8 rc.local.8 \
 	rc.8 rc.network.8 \

Modified: head/share/man/man8/rc.8
==============================================================================
--- head/share/man/man8/rc.8	Wed Nov 18 00:51:31 2009	(r199462)
+++ head/share/man/man8/rc.8	Wed Nov 18 00:56:05 2009	(r199463)
@@ -35,7 +35,7 @@
 .\"     @(#)rc.8	8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd May 18, 2007
+.Dd November 17, 2009
 .Dt RC 8
 .Os
 .Sh NAME
@@ -394,20 +394,6 @@ is not set, when going from single-user 
 the script does not do anything.
 .Pp
 The
-.Nm rc.early
-script is run very early in the startup process, immediately before the
-file system check.
-The
-.Nm rc.early
-script is deprecated.
-Any commands in this
-file should be separated out into
-.Nm rc.d/
-style scripts and integrated into the
-.Nm
-system.
-.Pp
-The
 .Pa /etc/rc.d/local
 script can execute scripts from multiple
 .Nm rc.d/

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 01:13:15 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6FB16106568D;
	Wed, 18 Nov 2009 01:13:15 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F1E28FC15;
	Wed, 18 Nov 2009 01:13:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI1DF0i050543;
	Wed, 18 Nov 2009 01:13:15 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAI1DFF5050541;
	Wed, 18 Nov 2009 01:13:15 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200911180113.nAI1DFF5050541@svn.freebsd.org>
From: Xin LI 
Date: Wed, 18 Nov 2009 01:13:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199464 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 01:13:15 -0000

Author: delphij
Date: Wed Nov 18 01:13:15 2009
New Revision: 199464
URL: http://svn.freebsd.org/changeset/base/199464

Log:
  Add a missing .Ed tag.
  
  MFC after:	2 weeks

Modified:
  head/share/man/man4/wi.4

Modified: head/share/man/man4/wi.4
==============================================================================
--- head/share/man/man4/wi.4	Wed Nov 18 00:56:05 2009	(r199463)
+++ head/share/man/man4/wi.4	Wed Nov 18 01:13:15 2009	(r199464)
@@ -253,6 +253,7 @@ Join a specific BSS network with network
 .Bd -literal -offset indent
 ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
     netmask 0xffffff00 ssid my_net
+.Ed
 .Pp
 Join a specific BSS network with WEP encryption:
 .Bd -literal -offset indent

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 01:35:36 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EDB3B1065672;
	Wed, 18 Nov 2009 01:35:36 +0000 (UTC)
	(envelope-from davidxu@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DCF708FC17;
	Wed, 18 Nov 2009 01:35:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI1ZaCR051551;
	Wed, 18 Nov 2009 01:35:36 GMT (envelope-from davidxu@svn.freebsd.org)
Received: (from davidxu@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAI1ZaIe051549;
	Wed, 18 Nov 2009 01:35:36 GMT (envelope-from davidxu@svn.freebsd.org)
Message-Id: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
From: David Xu 
Date: Wed, 18 Nov 2009 01:35:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199465 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 01:35:37 -0000

Author: davidxu
Date: Wed Nov 18 01:35:36 2009
New Revision: 199465
URL: http://svn.freebsd.org/changeset/base/199465

Log:
  Fix compiler warnings.

Modified:
  head/lib/librt/sigev_thread.c

Modified: head/lib/librt/sigev_thread.c
==============================================================================
--- head/lib/librt/sigev_thread.c	Wed Nov 18 01:13:15 2009	(r199464)
+++ head/lib/librt/sigev_thread.c	Wed Nov 18 01:35:36 2009	(r199465)
@@ -439,9 +439,9 @@ worker_routine(void *arg)
 {
 	struct sigev_node *sn = arg;
 
-	_pthread_cleanup_push(worker_cleanup, sn);
+	pthread_cleanup_push(worker_cleanup, sn);
 	sn->sn_dispatch(sn);
-	_pthread_cleanup_pop(1);
+	pthread_cleanup_pop(1);
 
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 03:51:34 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A35F9106566B;
	Wed, 18 Nov 2009 03:51:34 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 62FF68FC13;
	Wed, 18 Nov 2009 03:51:34 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAI3l9g3049188;
	Tue, 17 Nov 2009 20:47:10 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 17 Nov 2009 20:47:32 -0700 (MST)
Message-Id: <20091117.204732.1339398361.imp@bsdimp.com>
To: lynx.ripe@gmail.com
From: "M. Warner Losh" 
In-Reply-To: <4B01E548.7040708@gmail.com>
References: <4B01E548.7040708@gmail.com>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, edwin@FreeBSD.org
Subject: Re: svn commit: r194783 - head/lib/libc/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 03:51:34 -0000

In message: <4B01E548.7040708@gmail.com>
            Dmitry Pryanishnikov  writes:
: 
: Hello!
: 
: > Author: edwin
: > Date: Tue Jun 23 22:28:44 2009
: > New Revision: 194783
: > URL: http://svn.freebsd.org/changeset/base/194783
: > 
: > Log:
: >   Remove duplicate if-statement on gmt_is_set in gmtsub().
: >   
: >   MFC after:	1 week
: > 
: > Modified:
: >   head/lib/libc/stdtime/localtime.c
: > 
: > Modified: head/lib/libc/stdtime/localtime.c
: > ==============================================================================
: > --- head/lib/libc/stdtime/localtime.c	Tue Jun 23 22:22:20 2009	(r194782)
: > +++ head/lib/libc/stdtime/localtime.c	Tue Jun 23 22:28:44 2009	(r194783)
: > @@ -1472,18 +1472,16 @@ struct tm * const	tmp;
: >  {
: >  	register struct tm *	result;
: >  
: > +	_MUTEX_LOCK(&gmt_mutex);
: >  	if (!gmt_is_set) {
: > -		_MUTEX_LOCK(&gmt_mutex);
: > -		if (!gmt_is_set) {
: 
:    This change looks like a (small?) pessimization to me: before it, 
: _MUTEX_LOCK/_MUTEX_UNLOCK pair would be skipped for the case gmt_is_set 
: == TRUE (all invocations except the first one), now it won't. I'm not 
: sure whether this is critical here though...

I think this is a big pessimization.  gmt_is_set code only needs to
execute once, and this code was designed to be lockless once
gmt_is_set was set...

Warner

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 03:58:26 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95C6610656C4;
	Wed, 18 Nov 2009 03:58:26 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 567098FC15;
	Wed, 18 Nov 2009 03:58:26 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAI3tb1o049261;
	Tue, 17 Nov 2009 20:55:37 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 17 Nov 2009 20:56:00 -0700 (MST)
Message-Id: <20091117.205600.-1447187016.imp@bsdimp.com>
To: davidxu@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
References: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r199465 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 03:58:26 -0000

In message: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
            David Xu  writes:
: Author: davidxu
: Date: Wed Nov 18 01:35:36 2009
: New Revision: 199465
: URL: http://svn.freebsd.org/changeset/base/199465
: 
: Log:
:   Fix compiler warnings.
: 
: Modified:
:   head/lib/librt/sigev_thread.c
: 
: Modified: head/lib/librt/sigev_thread.c
: ==============================================================================
: --- head/lib/librt/sigev_thread.c	Wed Nov 18 01:13:15 2009	(r199464)
: +++ head/lib/librt/sigev_thread.c	Wed Nov 18 01:35:36 2009	(r199465)
: @@ -439,9 +439,9 @@ worker_routine(void *arg)
:  {
:  	struct sigev_node *sn = arg;
:  
: -	_pthread_cleanup_push(worker_cleanup, sn);
: +	pthread_cleanup_push(worker_cleanup, sn);
:  	sn->sn_dispatch(sn);
: -	_pthread_cleanup_pop(1);
: +	pthread_cleanup_pop(1);
:  
:  	return (0);
:  }

Is this what is causing the tinerbox failure on MIPS?

Warner

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 03:58:27 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2885710656DA;
	Wed, 18 Nov 2009 03:58:27 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id D99BF8FC1B;
	Wed, 18 Nov 2009 03:58:26 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAI3rSaX049243;
	Tue, 17 Nov 2009 20:53:28 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 17 Nov 2009 20:53:50 -0700 (MST)
Message-Id: <20091117.205350.1682637096.imp@bsdimp.com>
To: jilles@stack.nl
From: "M. Warner Losh" 
In-Reply-To: <20091117182501.GA70742@stack.nl>
References: <4B01E548.7040708@gmail.com>
	<20091117182501.GA70742@stack.nl>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, lynx.ripe@gmail.com, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, edwin@FreeBSD.org
Subject: Re: svn commit: r194783 - head/lib/libc/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 03:58:27 -0000

In message: <20091117182501.GA70742@stack.nl>
            Jilles Tjoelker  writes:
: On Tue, Nov 17, 2009 at 01:50:32AM +0200, Dmitry Pryanishnikov wrote:
: > > Author: edwin
: > > Date: Tue Jun 23 22:28:44 2009
: > > New Revision: 194783
: > > URL: http://svn.freebsd.org/changeset/base/194783
: 
: > > Log:
: > >   Remove duplicate if-statement on gmt_is_set in gmtsub().
: 
: > >   MFC after:	1 week
: 
: > > Modified:
: > >   head/lib/libc/stdtime/localtime.c
: 
: >    This change looks like a (small?) pessimization to me: before it, 
: > _MUTEX_LOCK/_MUTEX_UNLOCK pair would be skipped for the case gmt_is_set 
: > == TRUE (all invocations except the first one), now it won't. I'm not 
: > sure whether this is critical here though...
: 
: It is certainly less efficient, but the old code was (most likely)
: wrong. It used an idiom known as "double checked locking", which is
: incorrect in most memory models. The problem is that the store to
: gmt_is_set may become visible without stores to other memory (gmtptr and
: what it points to) becoming visible.

Wouldn't a memory barrier solve that at a much lower cost than a full
lock?

Warner

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 04:13:00 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8210D1065672;
	Wed, 18 Nov 2009 04:13:00 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 4188A8FC1B;
	Wed, 18 Nov 2009 04:13:00 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAI44eF4049358;
	Tue, 17 Nov 2009 21:04:40 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 17 Nov 2009 21:05:02 -0700 (MST)
Message-Id: <20091117.210502.-1623813784.imp@bsdimp.com>
To: davidxu@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
References: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r199465 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 04:13:00 -0000

In message: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
            David Xu  writes:
: Author: davidxu
: Date: Wed Nov 18 01:35:36 2009
: New Revision: 199465
: URL: http://svn.freebsd.org/changeset/base/199465
: 
: Log:
:   Fix compiler warnings.
: 
: Modified:
:   head/lib/librt/sigev_thread.c
: 
: Modified: head/lib/librt/sigev_thread.c
: ==============================================================================
: --- head/lib/librt/sigev_thread.c	Wed Nov 18 01:13:15 2009	(r199464)
: +++ head/lib/librt/sigev_thread.c	Wed Nov 18 01:35:36 2009	(r199465)
: @@ -439,9 +439,9 @@ worker_routine(void *arg)
:  {
:  	struct sigev_node *sn = arg;
:  
: -	_pthread_cleanup_push(worker_cleanup, sn);
: +	pthread_cleanup_push(worker_cleanup, sn);
:  	sn->sn_dispatch(sn);
: -	_pthread_cleanup_pop(1);
: +	pthread_cleanup_pop(1);
:  
:  	return (0);
:  }

This change causes libthr to be needed now for librt.  Before this
wasn't the case, so ntp break on mips now (I haven't looked at other
arcs yet).  _pthread_cleanup_pop is exported from libc, while
pthread_cleanup_pop causes __pthread_cleanup_pop_imp to be referenced,
which is defined in libthr.

I guess that's a long way of saying "gee, this seems wrong to me,
please explain what you are fixing better or revert this change,
thanks" :)

Warner


From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 04:18:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 240281065672;
	Wed, 18 Nov 2009 04:18:13 +0000 (UTC)
	(envelope-from davidxu@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 1116A8FC18;
	Wed, 18 Nov 2009 04:18:13 +0000 (UTC)
Received: from apple.my.domain (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI4IBB9082098;
	Wed, 18 Nov 2009 04:18:12 GMT (envelope-from davidxu@freebsd.org)
Message-ID: <4B037583.4010605@freebsd.org>
Date: Wed, 18 Nov 2009 12:18:11 +0800
From: David Xu 
User-Agent: Thunderbird 2.0.0.9 (X11/20080612)
MIME-Version: 1.0
To: "M. Warner Losh" 
References: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
	<20091117.210502.-1623813784.imp@bsdimp.com>
In-Reply-To: <20091117.210502.-1623813784.imp@bsdimp.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199465 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 04:18:13 -0000

M. Warner Losh wrote:
> In message: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
>             David Xu  writes:
> : Author: davidxu
> : Date: Wed Nov 18 01:35:36 2009
> : New Revision: 199465
> : URL: http://svn.freebsd.org/changeset/base/199465
> : 
> : Log:
> :   Fix compiler warnings.
> : 
> : Modified:
> :   head/lib/librt/sigev_thread.c
> : 
> : Modified: head/lib/librt/sigev_thread.c
> : ==============================================================================
> : --- head/lib/librt/sigev_thread.c	Wed Nov 18 01:13:15 2009	(r199464)
> : +++ head/lib/librt/sigev_thread.c	Wed Nov 18 01:35:36 2009	(r199465)
> : @@ -439,9 +439,9 @@ worker_routine(void *arg)
> :  {
> :  	struct sigev_node *sn = arg;
> :  
> : -	_pthread_cleanup_push(worker_cleanup, sn);
> : +	pthread_cleanup_push(worker_cleanup, sn);
> :  	sn->sn_dispatch(sn);
> : -	_pthread_cleanup_pop(1);
> : +	pthread_cleanup_pop(1);
> :  
> :  	return (0);
> :  }
> 
> This change causes libthr to be needed now for librt.  Before this
> wasn't the case, so ntp break on mips now (I haven't looked at other
> arcs yet).  _pthread_cleanup_pop is exported from libc, while
> pthread_cleanup_pop causes __pthread_cleanup_pop_imp to be referenced,
> which is defined in libthr.
> 
> I guess that's a long way of saying "gee, this seems wrong to me,
> please explain what you are fixing better or revert this change,
> thanks" :)
> 
> Warner
> 
> 
hmm, why should ntpd use librt?

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 04:46:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6391F1065676;
	Wed, 18 Nov 2009 04:46:04 +0000 (UTC)
	(envelope-from davidxu@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 371EF8FC0A;
	Wed, 18 Nov 2009 04:46:04 +0000 (UTC)
Received: from apple.my.domain (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI4k2l6008466;
	Wed, 18 Nov 2009 04:46:02 GMT (envelope-from davidxu@freebsd.org)
Message-ID: <4B037C0A.5030804@freebsd.org>
Date: Wed, 18 Nov 2009 12:46:02 +0800
From: David Xu 
User-Agent: Thunderbird 2.0.0.9 (X11/20080612)
MIME-Version: 1.0
To: "M. Warner Losh" 
References: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
	<20091117.210502.-1623813784.imp@bsdimp.com>
In-Reply-To: <20091117.210502.-1623813784.imp@bsdimp.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199465 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 04:46:04 -0000

M. Warner Losh wrote:
> In message: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
>             David Xu  writes:
> : Author: davidxu
> : Date: Wed Nov 18 01:35:36 2009
> : New Revision: 199465
> : URL: http://svn.freebsd.org/changeset/base/199465
> : 
> : Log:
> :   Fix compiler warnings.
> : 
> : Modified:
> :   head/lib/librt/sigev_thread.c
> : 
> : Modified: head/lib/librt/sigev_thread.c
> : ==============================================================================
> : --- head/lib/librt/sigev_thread.c	Wed Nov 18 01:13:15 2009	(r199464)
> : +++ head/lib/librt/sigev_thread.c	Wed Nov 18 01:35:36 2009	(r199465)
> : @@ -439,9 +439,9 @@ worker_routine(void *arg)
> :  {
> :  	struct sigev_node *sn = arg;
> :  
> : -	_pthread_cleanup_push(worker_cleanup, sn);
> : +	pthread_cleanup_push(worker_cleanup, sn);
> :  	sn->sn_dispatch(sn);
> : -	_pthread_cleanup_pop(1);
> : +	pthread_cleanup_pop(1);
> :  
> :  	return (0);
> :  }
> 
> This change causes libthr to be needed now for librt.  Before this
> wasn't the case, so ntp break on mips now (I haven't looked at other
> arcs yet).  _pthread_cleanup_pop is exported from libc, while
> pthread_cleanup_pop causes __pthread_cleanup_pop_imp to be referenced,
> which is defined in libthr.
> 
> I guess that's a long way of saying "gee, this seems wrong to me,
> please explain what you are fixing better or revert this change,
> thanks" :)
> 
> Warner
> 
> 

librt needs libpthread to function correctly, otherwise SIGEV_THREAD
notification won't work, though the ntp code may not use it, but who
can guarantee librt never use threads? in old design, the timer
functions were really in libpthread and implemented as threads.

Regards,
David Xu


Index: ntpdate/Makefile
===================================================================
--- ntpdate/Makefile	(revision 199351)
+++ ntpdate/Makefile	(working copy)
@@ -9,7 +9,7 @@
  CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../

  DPADD=	${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT}
-LDADD=	${LIBNTP} -lm -lmd -lrt
+LDADD=	${LIBNTP} -lm -lmd -lrt -lpthread

  CLEANFILES+= .version version.c

Index: ntpd/Makefile
===================================================================
--- ntpd/Makefile	(revision 199351)
+++ ntpd/Makefile	(working copy)
@@ -33,7 +33,7 @@
  	-I${.CURDIR}/../../../contrib/ntp/libopts -I${.CURDIR}

  DPADD=	${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT} ${LIBOPTS}
-LDADD=	${LIBPARSE} ${LIBNTP} -lm -lmd -lrt ${LIBOPTS}
+LDADD=	${LIBPARSE} ${LIBNTP} -lm -lmd -lrt -lpthread ${LIBOPTS}

  .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
  DPADD+=	${LIBCRYPTO}

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 05:09:03 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 72CD71065693;
	Wed, 18 Nov 2009 05:09:03 +0000 (UTC)
	(envelope-from davidxu@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 47EA08FC16;
	Wed, 18 Nov 2009 05:09:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI593J4058972;
	Wed, 18 Nov 2009 05:09:03 GMT (envelope-from davidxu@svn.freebsd.org)
Received: (from davidxu@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAI593kQ058970;
	Wed, 18 Nov 2009 05:09:03 GMT (envelope-from davidxu@svn.freebsd.org)
Message-Id: <200911180509.nAI593kQ058970@svn.freebsd.org>
From: David Xu 
Date: Wed, 18 Nov 2009 05:09:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199469 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 05:09:03 -0000

Author: davidxu
Date: Wed Nov 18 05:09:03 2009
New Revision: 199469
URL: http://svn.freebsd.org/changeset/base/199469

Log:
  link libpthread because the librt really needs it to fully function.

Modified:
  head/lib/librt/Makefile

Modified: head/lib/librt/Makefile
==============================================================================
--- head/lib/librt/Makefile	Wed Nov 18 04:34:43 2009	(r199468)
+++ head/lib/librt/Makefile	Wed Nov 18 05:09:03 2009	(r199469)
@@ -4,6 +4,7 @@ LIB=rt
 SHLIB_MAJOR= 1
 CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}
 CFLAGS+=-Winline -Wall -g
+LDADD+=-lpthread
 
 #MAN=	libthr.3
 

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 06:10:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6115D106566B;
	Wed, 18 Nov 2009 06:10:50 +0000 (UTC)
	(envelope-from davidxu@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4FC388FC0A;
	Wed, 18 Nov 2009 06:10:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAI6Aoi7060566;
	Wed, 18 Nov 2009 06:10:50 GMT (envelope-from davidxu@svn.freebsd.org)
Received: (from davidxu@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAI6AoMJ060564;
	Wed, 18 Nov 2009 06:10:50 GMT (envelope-from davidxu@svn.freebsd.org)
Message-Id: <200911180610.nAI6AoMJ060564@svn.freebsd.org>
From: David Xu 
Date: Wed, 18 Nov 2009 06:10:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199475 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 06:10:50 -0000

Author: davidxu
Date: Wed Nov 18 06:10:50 2009
New Revision: 199475
URL: http://svn.freebsd.org/changeset/base/199475

Log:
  Make following functions be cancellation points:
  mq_receive
  mq_send
  mq_timereceive
  mq_timedsend

Modified:
  head/lib/librt/mq.c

Modified: head/lib/librt/mq.c
==============================================================================
--- head/lib/librt/mq.c	Wed Nov 18 05:52:09 2009	(r199474)
+++ head/lib/librt/mq.c	Wed Nov 18 06:10:50 2009	(r199475)
@@ -33,6 +33,7 @@
 
 #include "namespace.h"
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -66,15 +67,15 @@ __weak_reference(__mq_getattr, mq_getatt
 __weak_reference(__mq_getattr, _mq_getattr);
 __weak_reference(__mq_setattr, mq_setattr);
 __weak_reference(__mq_setattr, _mq_setattr);
-__weak_reference(__mq_timedreceive, mq_timedreceive);
+__weak_reference(__mq_timedreceive_cancel, mq_timedreceive);
 __weak_reference(__mq_timedreceive, _mq_timedreceive);
-__weak_reference(__mq_timedsend, mq_timedsend);
+__weak_reference(__mq_timedsend_cancel, mq_timedsend);
 __weak_reference(__mq_timedsend, _mq_timedsend);
 __weak_reference(__mq_unlink, mq_unlink);
 __weak_reference(__mq_unlink, _mq_unlink);
-__weak_reference(__mq_send, mq_send);
+__weak_reference(__mq_send_cancel, mq_send);
 __weak_reference(__mq_send, _mq_send);
-__weak_reference(__mq_receive, mq_receive);
+__weak_reference(__mq_receive_cancel, mq_receive);
 __weak_reference(__mq_receive, _mq_receive);
 
 mqd_t
@@ -196,6 +197,19 @@ __mq_timedreceive(mqd_t mqd, char *buf, 
 }
 
 ssize_t
+__mq_timedreceive_cancel(mqd_t mqd, char *buf, size_t len,
+	unsigned *prio, const struct timespec *timeout)
+{
+	int oldtype;
+	int ret;
+
+	_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
+	ret = __sys_kmq_timedreceive(mqd->oshandle, buf, len, prio, timeout);
+	_pthread_setcanceltype(oldtype, NULL);
+	return (ret);
+}
+
+ssize_t
 __mq_receive(mqd_t mqd, char *buf, size_t len, unsigned *prio)
 {
 
@@ -203,6 +217,17 @@ __mq_receive(mqd_t mqd, char *buf, size_
 }
 
 ssize_t
+__mq_receive_cancel(mqd_t mqd, char *buf, size_t len, unsigned *prio)
+{
+	int oldtype;
+	int ret;
+
+	_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
+	ret = __sys_kmq_timedreceive(mqd->oshandle, buf, len, prio, NULL);
+	_pthread_setcanceltype(oldtype, NULL);
+	return (ret);
+}
+ssize_t
 __mq_timedsend(mqd_t mqd, char *buf, size_t len,
 	unsigned prio, const struct timespec *timeout)
 {
@@ -211,12 +236,38 @@ __mq_timedsend(mqd_t mqd, char *buf, siz
 }
 
 ssize_t
+__mq_timedsend_cancel(mqd_t mqd, char *buf, size_t len,
+	unsigned prio, const struct timespec *timeout)
+{
+	int oldtype;
+	int ret;
+
+	_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
+	ret = __sys_kmq_timedsend(mqd->oshandle, buf, len, prio, timeout);
+	_pthread_setcanceltype(oldtype, NULL);
+	return (ret);
+}
+
+ssize_t
 __mq_send(mqd_t mqd, char *buf, size_t len, unsigned prio)
 {
 
 	return __sys_kmq_timedsend(mqd->oshandle, buf, len, prio, NULL);
 }
 
+
+ssize_t
+__mq_send_cancel(mqd_t mqd, char *buf, size_t len, unsigned prio)
+{
+	int oldtype;
+	int ret;
+
+	_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
+	ret = __sys_kmq_timedsend(mqd->oshandle, buf, len, prio, NULL);
+	_pthread_setcanceltype(oldtype, NULL);
+	return (ret);
+}
+
 int
 __mq_unlink(const char *path)
 {

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 12:17:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DBE6B106568B;
	Wed, 18 Nov 2009 12:17:06 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CAB918FC20;
	Wed, 18 Nov 2009 12:17:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAICH6Kv070843;
	Wed, 18 Nov 2009 12:17:06 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAICH6kp070841;
	Wed, 18 Nov 2009 12:17:06 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911181217.nAICH6kp070841@svn.freebsd.org>
From: Michael Tuexen 
Date: Wed, 18 Nov 2009 12:17:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199477 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 12:17:07 -0000

Author: tuexen
Date: Wed Nov 18 12:17:06 2009
New Revision: 199477
URL: http://svn.freebsd.org/changeset/base/199477

Log:
  Fix a bug where the system panics when a SHUTDOWN is received with an
  illegal TSN.
  
  Approved by: rrs (mentor)
  MFC after: ASAP

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Wed Nov 18 09:20:04 2009	(r199476)
+++ head/sys/netinet/sctp_input.c	Wed Nov 18 12:17:06 2009	(r199477)
@@ -834,6 +834,9 @@ sctp_handle_shutdown(struct sctp_shutdow
 		return;
 	} else {
 		sctp_update_acked(stcb, cp, net, abort_flag);
+		if (*abort_flag) {
+			return;
+		}
 	}
 	if (asoc->control_pdapi) {
 		/*

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 13:53:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 574121065698;
	Wed, 18 Nov 2009 13:53:04 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 092468FC0A;
	Wed, 18 Nov 2009 13:53:03 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAIDfNxG062318;
	Wed, 18 Nov 2009 06:41:23 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Wed, 18 Nov 2009 06:41:46 -0700 (MST)
Message-Id: <20091118.064146.-290369589.imp@bsdimp.com>
To: davidxu@freebsd.org
From: "M. Warner Losh" 
In-Reply-To: <4B037C0A.5030804@freebsd.org>
References: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
	<20091117.210502.-1623813784.imp@bsdimp.com>
	<4B037C0A.5030804@freebsd.org>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199465 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 13:53:04 -0000

In message: <4B037C0A.5030804@freebsd.org>
            David Xu  writes:
: M. Warner Losh wrote:
: > In message: <200911180135.nAI1ZaIe051549@svn.freebsd.org>
: >             David Xu  writes:
: > : Author: davidxu
: > : Date: Wed Nov 18 01:35:36 2009
: > : New Revision: 199465
: > : URL: http://svn.freebsd.org/changeset/base/199465
: > : 
: > : Log:
: > :   Fix compiler warnings.
: > : 
: > : Modified:
: > :   head/lib/librt/sigev_thread.c
: > : 
: > : Modified: head/lib/librt/sigev_thread.c
: > : ==============================================================================
: > : --- head/lib/librt/sigev_thread.c	Wed Nov 18 01:13:15 2009	(r199464)
: > : +++ head/lib/librt/sigev_thread.c	Wed Nov 18 01:35:36 2009	(r199465)
: > : @@ -439,9 +439,9 @@ worker_routine(void *arg)
: > :  {
: > :  	struct sigev_node *sn = arg;
: > :  
: > : -	_pthread_cleanup_push(worker_cleanup, sn);
: > : +	pthread_cleanup_push(worker_cleanup, sn);
: > :  	sn->sn_dispatch(sn);
: > : -	_pthread_cleanup_pop(1);
: > : +	pthread_cleanup_pop(1);
: > :  
: > :  	return (0);
: > :  }
: > 
: > This change causes libthr to be needed now for librt.  Before this
: > wasn't the case, so ntp break on mips now (I haven't looked at other
: > arcs yet).  _pthread_cleanup_pop is exported from libc, while
: > pthread_cleanup_pop causes __pthread_cleanup_pop_imp to be referenced,
: > which is defined in libthr.
: > 
: > I guess that's a long way of saying "gee, this seems wrong to me,
: > please explain what you are fixing better or revert this change,
: > thanks" :)
: > 
: > Warner
: > 
: > 
: 
: librt needs libpthread to function correctly, otherwise SIGEV_THREAD
: notification won't work, though the ntp code may not use it, but who
: can guarantee librt never use threads? in old design, the timer
: functions were really in libpthread and implemented as threads.
: 
: Regards,
: David Xu
: 
: 
: Index: ntpdate/Makefile
: ===================================================================
: --- ntpdate/Makefile	(revision 199351)
: +++ ntpdate/Makefile	(working copy)
: @@ -9,7 +9,7 @@
:   CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
: 
:   DPADD=	${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT}
: -LDADD=	${LIBNTP} -lm -lmd -lrt
: +LDADD=	${LIBNTP} -lm -lmd -lrt -lpthread
: 
:   CLEANFILES+= .version version.c
: 
: Index: ntpd/Makefile
: ===================================================================
: --- ntpd/Makefile	(revision 199351)
: +++ ntpd/Makefile	(working copy)
: @@ -33,7 +33,7 @@
:   	-I${.CURDIR}/../../../contrib/ntp/libopts -I${.CURDIR}
: 
:   DPADD=	${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT} ${LIBOPTS}
: -LDADD=	${LIBPARSE} ${LIBNTP} -lm -lmd -lrt ${LIBOPTS}
: +LDADD=	${LIBPARSE} ${LIBNTP} -lm -lmd -lrt -lpthread ${LIBOPTS}
: 
:   .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
:   DPADD+=	${LIBCRYPTO}

I'd like to look more deeply into this issue.  Can you back out the
original commit until I can track things down a little more
completely?

Warner



From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 14:35:10 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4EA321065698;
	Wed, 18 Nov 2009 14:35:10 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 108CC8FC16;
	Wed, 18 Nov 2009 14:35:09 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAIEOptD063104;
	Wed, 18 Nov 2009 07:24:51 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Wed, 18 Nov 2009 07:25:14 -0700 (MST)
Message-Id: <20091118.072514.673374189.imp@bsdimp.com>
To: davidxu@freebsd.org
From: "M. Warner Losh" 
In-Reply-To: <200911180509.nAI593kQ058970@svn.freebsd.org>
References: <200911180509.nAI593kQ058970@svn.freebsd.org>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199469 - head/lib/librt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 14:35:10 -0000

In message: <200911180509.nAI593kQ058970@svn.freebsd.org>
            David Xu  writes:
: Author: davidxu
: Date: Wed Nov 18 05:09:03 2009
: New Revision: 199469
: URL: http://svn.freebsd.org/changeset/base/199469
: 
: Log:
:   link libpthread because the librt really needs it to fully function.

If you are now requiring libpthread, why are you using the _pthread_*
functions everywhere else?

Warner

: Modified:
:   head/lib/librt/Makefile
: 
: Modified: head/lib/librt/Makefile
: ==============================================================================
: --- head/lib/librt/Makefile	Wed Nov 18 04:34:43 2009	(r199468)
: +++ head/lib/librt/Makefile	Wed Nov 18 05:09:03 2009	(r199469)
: @@ -4,6 +4,7 @@ LIB=rt
:  SHLIB_MAJOR= 1
:  CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}
:  CFLAGS+=-Winline -Wall -g
: +LDADD+=-lpthread
:  
:  #MAN=	libthr.3
:  
: 

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 14:40:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 228141065672;
	Wed, 18 Nov 2009 14:40:01 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EA6C48FC24;
	Wed, 18 Nov 2009 14:40:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIEe0q5074257;
	Wed, 18 Nov 2009 14:40:00 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIEe07c074255;
	Wed, 18 Nov 2009 14:40:00 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <200911181440.nAIEe07c074255@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Wed, 18 Nov 2009 14:40:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199478 - stable/8/lib/libc/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 14:40:01 -0000

Author: ume
Date: Wed Nov 18 14:40:00 2009
New Revision: 199478
URL: http://svn.freebsd.org/changeset/base/199478

Log:
  MFC r199188: ANSIfy.

Modified:
  stable/8/lib/libc/net/ip6opt.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/net/ip6opt.c
==============================================================================
--- stable/8/lib/libc/net/ip6opt.c	Wed Nov 18 12:17:06 2009	(r199477)
+++ stable/8/lib/libc/net/ip6opt.c	Wed Nov 18 14:40:00 2009	(r199478)
@@ -55,8 +55,7 @@ static void inet6_insert_padopt(u_char *
  * byte, the length byte, and the option data.
  */
 int
-inet6_option_space(nbytes)
-	int nbytes;
+inet6_option_space(int nbytes)
 {
 	nbytes += 2;	/* we need space for nxt-hdr and length fields */
 	return(CMSG_SPACE((nbytes + 7) & ~7));
@@ -68,10 +67,7 @@ inet6_option_space(nbytes)
  * success or -1 on an error.
  */
 int
-inet6_option_init(bp, cmsgp, type)
-	void *bp;
-	struct cmsghdr **cmsgp;
-	int type;
+inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type)
 {
 	struct cmsghdr *ch = (struct cmsghdr *)bp;
 
@@ -98,11 +94,8 @@ inet6_option_init(bp, cmsgp, type)
  * earlier.  It must have a value between 0 and 7, inclusive.
  */
 int
-inet6_option_append(cmsg, typep, multx, plusy)
-	struct cmsghdr *cmsg;
-	const u_int8_t *typep;
-	int multx;
-	int plusy;
+inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx,
+    int plusy)
 {
 	int padlen, optlen, off;
 	u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
@@ -171,11 +164,7 @@ inet6_option_append(cmsg, typep, multx, 
  * 
  */
 u_int8_t *
-inet6_option_alloc(cmsg, datalen, multx, plusy)
-	struct cmsghdr *cmsg;
-	int datalen;
-	int multx;
-	int plusy;
+inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy)
 {
 	int padlen, off;
 	u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
@@ -238,9 +227,7 @@ inet6_option_alloc(cmsg, datalen, multx,
  * (RFC 2292, 6.3.5)
  */
 int
-inet6_option_next(cmsg, tptrp)
-	const struct cmsghdr *cmsg;
-	u_int8_t **tptrp;
+inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp)
 {
 	struct ip6_ext *ip6e;
 	int hdrlen, optlen;
@@ -296,10 +283,7 @@ inet6_option_next(cmsg, tptrp)
  *       it's a typo. The variable should be type of u_int8_t **.
  */
 int
-inet6_option_find(cmsg, tptrp, type)
-	const struct cmsghdr *cmsg;
-	u_int8_t **tptrp;
-	int type;
+inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type)
 {
 	struct ip6_ext *ip6e;
 	int hdrlen, optlen;
@@ -352,8 +336,7 @@ inet6_option_find(cmsg, tptrp, type)
  * calculated length and the limitation of the buffer.
  */
 static int
-ip6optlen(opt, lim)
-	u_int8_t *opt, *lim;
+ip6optlen(u_int8_t *opt, u_int8_t *lim)
 {
 	int optlen;
 

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 14:46:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 44047106566B;
	Wed, 18 Nov 2009 14:46:47 +0000 (UTC)
	(envelope-from mandree@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 329C88FC1E;
	Wed, 18 Nov 2009 14:46:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIEkkWL074505;
	Wed, 18 Nov 2009 14:46:46 GMT (envelope-from mandree@svn.freebsd.org)
Received: (from mandree@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIEkke5074503;
	Wed, 18 Nov 2009 14:46:46 GMT (envelope-from mandree@svn.freebsd.org)
Message-Id: <200911181446.nAIEkke5074503@svn.freebsd.org>
From: Matthias Andree 
Date: Wed, 18 Nov 2009 14:46:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199479 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 14:46:47 -0000

Author: mandree (ports committer)
Date: Wed Nov 18 14:46:46 2009
New Revision: 199479
URL: http://svn.freebsd.org/changeset/base/199479

Log:
  Add mandree@ and mentorship relations with garga/miwi.

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Wed Nov 18 14:40:00 2009	(r199478)
+++ head/share/misc/committers-ports.dot	Wed Nov 18 14:46:46 2009	(r199479)
@@ -110,6 +110,7 @@ lwhsu [label="Li-Wen Hsu\nlwhsu@FreeBSD.
 lx [label="David Thiel\nlx@FreeBSD.org\n2006/11/29"]
 maho [label="Maho Nakata\nmaho@FreeBSD.org\n2002/10/17"]
 makc [label="Max Brazhnikov\makc@FreeBSD.org\n2008/08/25"]
+mandree [label="Matthias Andree\nmandree@FreeBSD.org\n2009/11/18"]
 marcus [label="Joe Marcus Clarke\nmarcus@FreeBSD.org\n2002/04/05"]
 markus [label="Markus Brueffer\nmarkus@FreeBSD.org\n2004/02/21"]
 mat [label="Mathieu Arnold\nmat@FreeBSD.org\n2003/08/15"]
@@ -225,6 +226,7 @@ gabor -> pgj
 
 garga -> acm
 garga -> alepulver
+garga -> mandree
 garga -> mm
 garga -> rnoland
 garga -> vd
@@ -280,6 +282,7 @@ miwi -> beat
 miwi -> farrokhi
 miwi -> gahr
 miwi -> makc
+miwi -> mandree
 miwi -> mva
 miwi -> nox
 miwi -> tabthorpe

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 14:47:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DD5D510656B4;
	Wed, 18 Nov 2009 14:47:47 +0000 (UTC)
	(envelope-from mandree@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CC5768FC13;
	Wed, 18 Nov 2009 14:47:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIEllSP074562;
	Wed, 18 Nov 2009 14:47:47 GMT (envelope-from mandree@svn.freebsd.org)
Received: (from mandree@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIEll9d074560;
	Wed, 18 Nov 2009 14:47:47 GMT (envelope-from mandree@svn.freebsd.org)
Message-Id: <200911181447.nAIEll9d074560@svn.freebsd.org>
From: Matthias Andree 
Date: Wed, 18 Nov 2009 14:47:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199480 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 14:47:48 -0000

Author: mandree (ports committer)
Date: Wed Nov 18 14:47:47 2009
New Revision: 199480
URL: http://svn.freebsd.org/changeset/base/199480

Log:
  Fix mistyped \n in makc's label.
  
  This and previous commit have been...
  Approved by:    garga (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Wed Nov 18 14:46:46 2009	(r199479)
+++ head/share/misc/committers-ports.dot	Wed Nov 18 14:47:47 2009	(r199480)
@@ -109,7 +109,7 @@ lth [label="Lars Thegler\nlth@FreeBSD.or
 lwhsu [label="Li-Wen Hsu\nlwhsu@FreeBSD.org\n2007/04/03"]
 lx [label="David Thiel\nlx@FreeBSD.org\n2006/11/29"]
 maho [label="Maho Nakata\nmaho@FreeBSD.org\n2002/10/17"]
-makc [label="Max Brazhnikov\makc@FreeBSD.org\n2008/08/25"]
+makc [label="Max Brazhnikov\nmakc@FreeBSD.org\n2008/08/25"]
 mandree [label="Matthias Andree\nmandree@FreeBSD.org\n2009/11/18"]
 marcus [label="Joe Marcus Clarke\nmarcus@FreeBSD.org\n2002/04/05"]
 markus [label="Markus Brueffer\nmarkus@FreeBSD.org\n2004/02/21"]

From owner-svn-src-all@FreeBSD.ORG  Wed Nov 18 14:58:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B3A011065693;
	Wed, 18 Nov 2009 14:58:35 +0000 (UTC)
	(envelope-from rdivacky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D86C8FC1D;
	Wed, 18 Nov 2009 14:58:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIEwZht074861;
	Wed, 18 Nov 2009 14:58:35 GMT
	(envelope-from rdivacky@svn.freebsd.org)
Received: (from rdivacky@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIEwZ67074840;
	Wed, 18 Nov 2009 14:58:35 GMT
	(envelope-from rdivacky@svn.freebsd.org)
Message-Id: <200911181458.nAIEwZ67074840@svn.freebsd.org>
From: Roman Divacky 
Date: Wed, 18 Nov 2009 14:58:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199481 - in vendor/llvm/dist: . autoconf cmake
	cmake/modules docs docs/CommandGuide include/llvm
	include/llvm-c/Transforms include/llvm/ADT
	include/llvm/Analysis include/llvm/Bitcode i...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 18 Nov 2009 14:58:35 -0000

Author: rdivacky
Date: Wed Nov 18 14:58:34 2009
New Revision: 199481
URL: http://svn.freebsd.org/changeset/base/199481

Log:
  Update LLVM to r89205.

Added:
  vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h
  vendor/llvm/dist/include/llvm/Analysis/LazyValueInfo.h
  vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp
  vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp
  vendor/llvm/dist/test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-11-13-CoalescerCrash.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-11-13-ScavengerAssert.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-11-13-ScavengerAssert2.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-11-13-VRRewriterCrash.ll
  vendor/llvm/dist/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
  vendor/llvm/dist/test/CodeGen/MSP430/2009-11-05-8BitLibcalls.ll
  vendor/llvm/dist/test/CodeGen/MSP430/2009-11-08-InvalidResNo.ll
  vendor/llvm/dist/test/CodeGen/MSP430/AddrMode-bis-rx.ll
  vendor/llvm/dist/test/CodeGen/MSP430/AddrMode-bis-xr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/AddrMode-mov-rx.ll
  vendor/llvm/dist/test/CodeGen/MSP430/AddrMode-mov-xr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/postinc.ll
  vendor/llvm/dist/test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/2009-11-15-ProcImpDefsBug.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/ppc-prologue.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/vec_auto_constant.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/vec_splat_constant.ll
  vendor/llvm/dist/test/CodeGen/Thumb/machine-licm.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/2009-11-13-STRDBug.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/lsr-deficiency.ll
  vendor/llvm/dist/test/CodeGen/X86/2009-09-10-SpillComments.ll
  vendor/llvm/dist/test/CodeGen/X86/2009-11-13-VirtRegRewriterBug.ll
  vendor/llvm/dist/test/CodeGen/X86/2009-11-16-MachineLICM.ll
  vendor/llvm/dist/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll
  vendor/llvm/dist/test/CodeGen/X86/2009-11-17-UpdateTerminator.ll
  vendor/llvm/dist/test/CodeGen/X86/bigstructret.ll
  vendor/llvm/dist/test/CodeGen/X86/hidden-vis-5.ll
  vendor/llvm/dist/test/CodeGen/X86/object-size.ll
  vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll
  vendor/llvm/dist/test/CodeGen/XCore/bigstructret.ll
  vendor/llvm/dist/test/DebugInfo/2009-11-05-DeadGlobalVariable.ll
  vendor/llvm/dist/test/DebugInfo/2009-11-06-InvalidDerivedType.ll
  vendor/llvm/dist/test/DebugInfo/2009-11-06-NamelessGlobalVariable.ll
  vendor/llvm/dist/test/DebugInfo/2009-11-10-CurrentFn.ll
  vendor/llvm/dist/test/DebugInfo/2009-11-10-ParentScope.ll
  vendor/llvm/dist/test/Transforms/ABCD/
  vendor/llvm/dist/test/Transforms/ABCD/basic.ll
  vendor/llvm/dist/test/Transforms/ABCD/dg.exp
  vendor/llvm/dist/test/Transforms/DeadStoreElimination/2009-11-10-Trampoline.ll
  vendor/llvm/dist/test/Transforms/DeadStoreElimination/const-pointers.ll
  vendor/llvm/dist/test/Transforms/DeadStoreElimination/lifetime.ll
  vendor/llvm/dist/test/Transforms/DeadStoreElimination/memintrinsics.ll
  vendor/llvm/dist/test/Transforms/DeadStoreElimination/partial-overwrite.ll
  vendor/llvm/dist/test/Transforms/GVN/null-aliases-nothing.ll
  vendor/llvm/dist/test/Transforms/Inline/delete-call.ll
  vendor/llvm/dist/test/Transforms/InstCombine/compare-signs.ll
  vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll
  vendor/llvm/dist/test/Transforms/InstCombine/invariant.ll
  vendor/llvm/dist/test/Transforms/LCSSA/indirectbr.ll
  vendor/llvm/dist/test/Transforms/LoopSimplify/indirectbr.ll
  vendor/llvm/dist/test/Transforms/LoopStrengthReduce/2009-11-10-LSRCrash.ll
  vendor/llvm/dist/test/Transforms/LoopStrengthReduce/count-to-zero.ll
  vendor/llvm/dist/test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll
  vendor/llvm/dist/test/Transforms/TailCallElim/nocapture.ll
  vendor/llvm/dist/test/Transforms/TailCallElim/switch.ll
  vendor/llvm/dist/test/Unit/lit.site.cfg.in
  vendor/llvm/dist/utils/Misc/
  vendor/llvm/dist/utils/Misc/zkill   (contents, props changed)
  vendor/llvm/dist/utils/lit/ExampleTests/
  vendor/llvm/dist/utils/lit/ExampleTests.ObjDir/
  vendor/llvm/dist/utils/lit/ExampleTests.ObjDir/lit.site.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/Clang/
  vendor/llvm/dist/utils/lit/ExampleTests/Clang/fsyntax-only.c
  vendor/llvm/dist/utils/lit/ExampleTests/Clang/lit.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/Bar/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/Bar/dg.exp
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/lit.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/lit.site.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.InTree/test/site.exp
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/lit.local.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/obj/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/obj/test/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/obj/test/Foo/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/obj/test/Foo/lit.local.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/obj/test/lit.site.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/test/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/data.txt
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/dg.exp
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/pct-S.ll
  vendor/llvm/dist/utils/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/ShExternal/
  vendor/llvm/dist/utils/lit/ExampleTests/ShExternal/lit.local.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/ShInternal/
  vendor/llvm/dist/utils/lit/ExampleTests/ShInternal/lit.local.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/TclTest/
  vendor/llvm/dist/utils/lit/ExampleTests/TclTest/lit.local.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/TclTest/stderr-pipe.ll
  vendor/llvm/dist/utils/lit/ExampleTests/TclTest/tcl-redir-1.ll
  vendor/llvm/dist/utils/lit/ExampleTests/fail.c
  vendor/llvm/dist/utils/lit/ExampleTests/lit.cfg
  vendor/llvm/dist/utils/lit/ExampleTests/pass.c
  vendor/llvm/dist/utils/lit/ExampleTests/xfail.c
  vendor/llvm/dist/utils/lit/ExampleTests/xpass.c
Deleted:
  vendor/llvm/dist/lib/Transforms/Scalar/CondPropagate.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopUnroll.cpp
Modified:
  vendor/llvm/dist/CMakeLists.txt
  vendor/llvm/dist/Makefile
  vendor/llvm/dist/Makefile.config.in
  vendor/llvm/dist/Makefile.rules
  vendor/llvm/dist/autoconf/configure.ac
  vendor/llvm/dist/cmake/config-ix.cmake
  vendor/llvm/dist/cmake/modules/AddLLVM.cmake
  vendor/llvm/dist/cmake/modules/GetTargetTriple.cmake
  vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake
  vendor/llvm/dist/configure
  vendor/llvm/dist/docs/CommandGuide/lit.pod
  vendor/llvm/dist/docs/LangRef.html
  vendor/llvm/dist/docs/SourceLevelDebugging.html
  vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h
  vendor/llvm/dist/include/llvm/ADT/DenseMap.h
  vendor/llvm/dist/include/llvm/ADT/GraphTraits.h
  vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h
  vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h
  vendor/llvm/dist/include/llvm/ADT/PointerUnion.h
  vendor/llvm/dist/include/llvm/ADT/PriorityQueue.h
  vendor/llvm/dist/include/llvm/ADT/SCCIterator.h
  vendor/llvm/dist/include/llvm/ADT/STLExtras.h
  vendor/llvm/dist/include/llvm/ADT/StringMap.h
  vendor/llvm/dist/include/llvm/ADT/StringRef.h
  vendor/llvm/dist/include/llvm/ADT/StringSwitch.h
  vendor/llvm/dist/include/llvm/ADT/Trie.h
  vendor/llvm/dist/include/llvm/ADT/Triple.h
  vendor/llvm/dist/include/llvm/Analysis/CFGPrinter.h
  vendor/llvm/dist/include/llvm/Analysis/ConstantFolding.h
  vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h
  vendor/llvm/dist/include/llvm/Analysis/Dominators.h
  vendor/llvm/dist/include/llvm/Analysis/IVUsers.h
  vendor/llvm/dist/include/llvm/Analysis/LiveValues.h
  vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h
  vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h
  vendor/llvm/dist/include/llvm/Analysis/Passes.h
  vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h
  vendor/llvm/dist/include/llvm/Analysis/SparsePropagation.h
  vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h
  vendor/llvm/dist/include/llvm/BasicBlock.h
  vendor/llvm/dist/include/llvm/Bitcode/BitstreamWriter.h
  vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/BinaryObject.h
  vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h
  vendor/llvm/dist/include/llvm/CodeGen/DAGISelHeader.h
  vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h
  vendor/llvm/dist/include/llvm/CodeGen/LinkAllAsmWriterComponents.h
  vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h
  vendor/llvm/dist/include/llvm/CodeGen/LiveVariables.h
  vendor/llvm/dist/include/llvm/CodeGen/MachORelocation.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineCodeInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineJumpTableInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineRelocation.h
  vendor/llvm/dist/include/llvm/CodeGen/PseudoSourceValue.h
  vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h
  vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h
  vendor/llvm/dist/include/llvm/CompilerDriver/BuiltinOptions.h
  vendor/llvm/dist/include/llvm/Config/config.h.cmake
  vendor/llvm/dist/include/llvm/Config/config.h.in
  vendor/llvm/dist/include/llvm/Constants.h
  vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h
  vendor/llvm/dist/include/llvm/ExecutionEngine/JITMemoryManager.h
  vendor/llvm/dist/include/llvm/Function.h
  vendor/llvm/dist/include/llvm/GlobalValue.h
  vendor/llvm/dist/include/llvm/GlobalVariable.h
  vendor/llvm/dist/include/llvm/InlineAsm.h
  vendor/llvm/dist/include/llvm/InstrTypes.h
  vendor/llvm/dist/include/llvm/IntrinsicInst.h
  vendor/llvm/dist/include/llvm/IntrinsicsX86.td
  vendor/llvm/dist/include/llvm/LinkAllPasses.h
  vendor/llvm/dist/include/llvm/Linker.h
  vendor/llvm/dist/include/llvm/MC/MCAsmLexer.h
  vendor/llvm/dist/include/llvm/MC/MCContext.h
  vendor/llvm/dist/include/llvm/MC/MCExpr.h
  vendor/llvm/dist/include/llvm/MC/MCSection.h
  vendor/llvm/dist/include/llvm/MC/MCSectionELF.h
  vendor/llvm/dist/include/llvm/MC/MCSectionMachO.h
  vendor/llvm/dist/include/llvm/MC/MCStreamer.h
  vendor/llvm/dist/include/llvm/MC/MCSymbol.h
  vendor/llvm/dist/include/llvm/Metadata.h
  vendor/llvm/dist/include/llvm/Module.h
  vendor/llvm/dist/include/llvm/Pass.h
  vendor/llvm/dist/include/llvm/PassAnalysisSupport.h
  vendor/llvm/dist/include/llvm/PassManagers.h
  vendor/llvm/dist/include/llvm/Support/CommandLine.h
  vendor/llvm/dist/include/llvm/Support/Compiler.h
  vendor/llvm/dist/include/llvm/Support/ConstantFolder.h
  vendor/llvm/dist/include/llvm/Support/ConstantRange.h
  vendor/llvm/dist/include/llvm/Support/ErrorHandling.h
  vendor/llvm/dist/include/llvm/Support/IRBuilder.h
  vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h
  vendor/llvm/dist/include/llvm/Support/StandardPasses.h
  vendor/llvm/dist/include/llvm/Support/TargetFolder.h
  vendor/llvm/dist/include/llvm/Support/raw_ostream.h
  vendor/llvm/dist/include/llvm/Support/type_traits.h
  vendor/llvm/dist/include/llvm/System/Host.h
  vendor/llvm/dist/include/llvm/System/TimeValue.h
  vendor/llvm/dist/include/llvm/Target/Target.td
  vendor/llvm/dist/include/llvm/Target/TargetData.h
  vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h
  vendor/llvm/dist/include/llvm/Target/TargetLowering.h
  vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h
  vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h
  vendor/llvm/dist/include/llvm/Target/TargetRegistry.h
  vendor/llvm/dist/include/llvm/Target/TargetSubtarget.h
  vendor/llvm/dist/include/llvm/Transforms/RSProfiling.h
  vendor/llvm/dist/include/llvm/Transforms/Scalar.h
  vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h
  vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h
  vendor/llvm/dist/include/llvm/Transforms/Utils/SSI.h
  vendor/llvm/dist/include/llvm/TypeSymbolTable.h
  vendor/llvm/dist/include/llvm/Value.h
  vendor/llvm/dist/include/llvm/ValueSymbolTable.h
  vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp
  vendor/llvm/dist/lib/Analysis/CMakeLists.txt
  vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp
  vendor/llvm/dist/lib/Analysis/DebugInfo.cpp
  vendor/llvm/dist/lib/Analysis/IPA/Andersens.cpp
  vendor/llvm/dist/lib/Analysis/IVUsers.cpp
  vendor/llvm/dist/lib/Analysis/LiveValues.cpp
  vendor/llvm/dist/lib/Analysis/LoopInfo.cpp
  vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp
  vendor/llvm/dist/lib/Analysis/PointerTracking.cpp
  vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
  vendor/llvm/dist/lib/Analysis/ValueTracking.cpp
  vendor/llvm/dist/lib/AsmParser/LLParser.cpp
  vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp
  vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h
  vendor/llvm/dist/lib/CodeGen/AntiDepBreaker.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
  vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp
  vendor/llvm/dist/lib/CodeGen/BranchFolding.h
  vendor/llvm/dist/lib/CodeGen/CodePlacementOpt.cpp
  vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp
  vendor/llvm/dist/lib/CodeGen/LatencyPriorityQueue.cpp
  vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp
  vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp
  vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp
  vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp
  vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp
  vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp
  vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp
  vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp
  vendor/llvm/dist/lib/CodeGen/PHIElimination.h
  vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp
  vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp
  vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp
  vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp
  vendor/llvm/dist/lib/CodeGen/PseudoSourceValue.cpp
  vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp
  vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp
  vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp
  vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp
  vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp
  vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp
  vendor/llvm/dist/lib/CodeGen/Spiller.cpp
  vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp
  vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp
  vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp
  vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp
  vendor/llvm/dist/lib/CompilerDriver/Action.cpp
  vendor/llvm/dist/lib/CompilerDriver/BuiltinOptions.cpp
  vendor/llvm/dist/lib/CompilerDriver/Main.cpp
  vendor/llvm/dist/lib/CompilerDriver/Tool.cpp
  vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp
  vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Execution.cpp
  vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
  vendor/llvm/dist/lib/Linker/LinkArchives.cpp
  vendor/llvm/dist/lib/Linker/LinkItems.cpp
  vendor/llvm/dist/lib/Linker/Linker.cpp
  vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp
  vendor/llvm/dist/lib/MC/MCAssembler.cpp
  vendor/llvm/dist/lib/MC/MCContext.cpp
  vendor/llvm/dist/lib/MC/MCExpr.cpp
  vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp
  vendor/llvm/dist/lib/MC/MCNullStreamer.cpp
  vendor/llvm/dist/lib/MC/MCSection.cpp
  vendor/llvm/dist/lib/MC/MCSectionELF.cpp
  vendor/llvm/dist/lib/MC/MCSectionMachO.cpp
  vendor/llvm/dist/lib/MC/MCSymbol.cpp
  vendor/llvm/dist/lib/Support/CommandLine.cpp
  vendor/llvm/dist/lib/Support/ConstantRange.cpp
  vendor/llvm/dist/lib/Support/Debug.cpp
  vendor/llvm/dist/lib/Support/MemoryBuffer.cpp
  vendor/llvm/dist/lib/Support/StringExtras.cpp
  vendor/llvm/dist/lib/Support/StringMap.cpp
  vendor/llvm/dist/lib/Support/StringRef.cpp
  vendor/llvm/dist/lib/Support/Timer.cpp
  vendor/llvm/dist/lib/Support/Triple.cpp
  vendor/llvm/dist/lib/System/Host.cpp
  vendor/llvm/dist/lib/System/Unix/Program.inc
  vendor/llvm/dist/lib/Target/ARM/ARM.h
  vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h
  vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h
  vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h
  vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.h
  vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h
  vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.h
  vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td
  vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td
  vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td
  vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td
  vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td
  vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h
  vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp
  vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt
  vendor/llvm/dist/lib/Target/ARM/NEONMoveFix.cpp
  vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp
  vendor/llvm/dist/lib/Target/ARM/README-Thumb.txt
  vendor/llvm/dist/lib/Target/ARM/README.txt
  vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.h
  vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.h
  vendor/llvm/dist/lib/Target/ARM/Thumb2ITBlockPass.cpp
  vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.h
  vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.h
  vendor/llvm/dist/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.td
  vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.h
  vendor/llvm/dist/lib/Target/Alpha/AlphaTargetMachine.cpp
  vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.cpp
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.td
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.h
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinTargetMachine.cpp
  vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.td
  vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.h
  vendor/llvm/dist/lib/Target/CellSPU/SPUSubtarget.h
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430.td
  vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h
  vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td
  vendor/llvm/dist/lib/Target/MSP430/MSP430MCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.h
  vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp
  vendor/llvm/dist/lib/Target/MSP430/README.txt
  vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td
  vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsMachineFunction.h
  vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.h
  vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp
  vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16RegisterInfo.h
  vendor/llvm/dist/lib/Target/PIC16/PIC16TargetMachine.cpp
  vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.h
  vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.h
  vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp
  vendor/llvm/dist/lib/Target/README.txt
  vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Sparc/SparcISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp
  vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td
  vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.h
  vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp
  vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.h
  vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.cpp
  vendor/llvm/dist/lib/Target/TargetData.cpp
  vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp
  vendor/llvm/dist/lib/Target/TargetSubtarget.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
  vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp
  vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h
  vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
  vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td
  vendor/llvm/dist/lib/Target/X86/X86JITInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h
  vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp
  vendor/llvm/dist/lib/Target/X86/X86Subtarget.h
  vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp
  vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h
  vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td
  vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.h
  vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp
  vendor/llvm/dist/lib/Transforms/Hello/CMakeLists.txt
  vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp
  vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp
  vendor/llvm/dist/lib/Transforms/IPO/LoopExtractor.cpp
  vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt
  vendor/llvm/dist/lib/Transforms/Scalar/ConstantProp.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/InstructionCombining.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SCCVN.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/TailDuplication.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp
  vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp
  vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp
  vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp
  vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp
  vendor/llvm/dist/lib/Transforms/Utils/Local.cpp
  vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp
  vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp
  vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp
  vendor/llvm/dist/lib/VMCore/AsmWriter.cpp
  vendor/llvm/dist/lib/VMCore/Constants.cpp
  vendor/llvm/dist/lib/VMCore/Core.cpp
  vendor/llvm/dist/lib/VMCore/Globals.cpp
  vendor/llvm/dist/lib/VMCore/InlineAsm.cpp
  vendor/llvm/dist/lib/VMCore/Instructions.cpp
  vendor/llvm/dist/lib/VMCore/Metadata.cpp
  vendor/llvm/dist/lib/VMCore/Module.cpp
  vendor/llvm/dist/lib/VMCore/Pass.cpp
  vendor/llvm/dist/lib/VMCore/PassManager.cpp
  vendor/llvm/dist/lib/VMCore/TypeSymbolTable.cpp
  vendor/llvm/dist/lib/VMCore/ValueSymbolTable.cpp
  vendor/llvm/dist/lib/VMCore/Verifier.cpp
  vendor/llvm/dist/test/Analysis/PointerTracking/sizes.ll
  vendor/llvm/dist/test/CMakeLists.txt
  vendor/llvm/dist/test/CodeGen/ARM/2009-07-18-RewriterBug.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-09-09-fpcmp-ole.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-09-24-spill-align.ll
  vendor/llvm/dist/test/CodeGen/ARM/2009-11-01-NeonMoves.ll
  vendor/llvm/dist/test/CodeGen/ARM/arguments_f64_backfill.ll
  vendor/llvm/dist/test/CodeGen/ARM/compare-call.ll
  vendor/llvm/dist/test/CodeGen/ARM/fabss.ll
  vendor/llvm/dist/test/CodeGen/ARM/fadds.ll
  vendor/llvm/dist/test/CodeGen/ARM/fcopysign.ll
  vendor/llvm/dist/test/CodeGen/ARM/fdivs.ll
  vendor/llvm/dist/test/CodeGen/ARM/fixunsdfdi.ll
  vendor/llvm/dist/test/CodeGen/ARM/fmacs.ll
  vendor/llvm/dist/test/CodeGen/ARM/fmscs.ll
  vendor/llvm/dist/test/CodeGen/ARM/fmuls.ll
  vendor/llvm/dist/test/CodeGen/ARM/fnegs.ll
  vendor/llvm/dist/test/CodeGen/ARM/fnmacs.ll
  vendor/llvm/dist/test/CodeGen/ARM/fnmscs.ll
  vendor/llvm/dist/test/CodeGen/ARM/fnmul.ll
  vendor/llvm/dist/test/CodeGen/ARM/fp.ll
  vendor/llvm/dist/test/CodeGen/ARM/fp_convert.ll
  vendor/llvm/dist/test/CodeGen/ARM/fparith.ll
  vendor/llvm/dist/test/CodeGen/ARM/fpcmp.ll
  vendor/llvm/dist/test/CodeGen/ARM/fpconv.ll
  vendor/llvm/dist/test/CodeGen/ARM/fpmem.ll
  vendor/llvm/dist/test/CodeGen/ARM/fptoint.ll
  vendor/llvm/dist/test/CodeGen/ARM/fsubs.ll
  vendor/llvm/dist/test/CodeGen/ARM/globals.ll
  vendor/llvm/dist/test/CodeGen/ARM/ifcvt5.ll
  vendor/llvm/dist/test/CodeGen/ARM/ifcvt6.ll
  vendor/llvm/dist/test/CodeGen/ARM/ifcvt7.ll
  vendor/llvm/dist/test/CodeGen/ARM/ifcvt8.ll
  vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll
  vendor/llvm/dist/test/CodeGen/ARM/neon_ld1.ll
  vendor/llvm/dist/test/CodeGen/ARM/neon_ld2.ll
  vendor/llvm/dist/test/CodeGen/ARM/select.ll
  vendor/llvm/dist/test/CodeGen/ARM/spill-q.ll
  vendor/llvm/dist/test/CodeGen/ARM/vfp.ll
  vendor/llvm/dist/test/CodeGen/ARM/vget_lane.ll
  vendor/llvm/dist/test/CodeGen/ARM/vmov.ll
  vendor/llvm/dist/test/CodeGen/Generic/switch-lower.ll
  vendor/llvm/dist/test/CodeGen/MSP430/2009-09-18-AbsoluteAddr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/Inst16mr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/Inst16rm.ll
  vendor/llvm/dist/test/CodeGen/MSP430/Inst16rr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/Inst8mr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/Inst8rm.ll
  vendor/llvm/dist/test/CodeGen/MSP430/Inst8rr.ll
  vendor/llvm/dist/test/CodeGen/MSP430/inline-asm.ll
  vendor/llvm/dist/test/CodeGen/Mips/2008-08-03-ReturnDouble.ll
  vendor/llvm/dist/test/CodeGen/PowerPC/indirectbr.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/large-stack.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/load-global.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cbnz.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt3.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-jtb.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-select_xform.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-shifter.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-smla.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-smul.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-spill-q.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-str_pre.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sxt_rot.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-tbh.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-teq2.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxt_rot.ll
  vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxtb.ll
  vendor/llvm/dist/test/CodeGen/X86/2006-04-04-CrossBlockCrash.ll
  vendor/llvm/dist/test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll
  vendor/llvm/dist/test/CodeGen/X86/2007-05-17-ShuffleISelBug.ll
  vendor/llvm/dist/test/CodeGen/X86/2008-04-15-LiveVariableBug.ll
  vendor/llvm/dist/test/CodeGen/X86/cmp0.ll
  vendor/llvm/dist/test/CodeGen/X86/loop-blocks.ll
  vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce2.ll
  vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce3.ll
  vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce5.ll
  vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce6.ll
  vendor/llvm/dist/test/CodeGen/X86/sse3.ll
  vendor/llvm/dist/test/CodeGen/X86/stack-color-with-reg.ll
  vendor/llvm/dist/test/CodeGen/X86/tailcall1.ll
  vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-3.ll
  vendor/llvm/dist/test/CodeGen/X86/vec_zero-2.ll
  vendor/llvm/dist/test/FrontendC++/2006-11-06-StackTrace.cpp
  vendor/llvm/dist/test/FrontendC++/2006-11-30-NoCompileUnit.cpp
  vendor/llvm/dist/test/FrontendC++/2006-11-30-Pubnames.cpp
  vendor/llvm/dist/test/FrontendC++/2009-07-15-LineNumbers.cpp
  vendor/llvm/dist/test/FrontendC/Atomics-no64bit.c
  vendor/llvm/dist/test/FrontendC/Atomics.c
  vendor/llvm/dist/test/LLVMC/test_data/false.cpp
  vendor/llvm/dist/test/LLVMC/test_data/false2.cpp
  vendor/llvm/dist/test/LLVMC/test_data/together.c
  vendor/llvm/dist/test/Makefile
  vendor/llvm/dist/test/Transforms/InstCombine/2008-01-21-MulTrunc.ll
  vendor/llvm/dist/test/Transforms/InstCombine/apint-cast.ll
  vendor/llvm/dist/test/Transforms/InstCombine/cast-mul-select.ll
  vendor/llvm/dist/test/Transforms/InstCombine/cast-set.ll
  vendor/llvm/dist/test/Transforms/InstCombine/cast.ll
  vendor/llvm/dist/test/Transforms/InstCombine/phi.ll
  vendor/llvm/dist/test/Transforms/InstCombine/sext-misc.ll
  vendor/llvm/dist/test/Transforms/InstCombine/udivrem-change-width.ll
  vendor/llvm/dist/test/Transforms/JumpThreading/basic.ll
  vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll
  vendor/llvm/dist/test/Transforms/SCCP/crash.ll
  vendor/llvm/dist/test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll
  vendor/llvm/dist/test/Transforms/SimplifyLibCalls/memcmp.ll
  vendor/llvm/dist/test/Unit/lit.cfg
  vendor/llvm/dist/test/lit.cfg
  vendor/llvm/dist/test/site.exp.in
  vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp
  vendor/llvm/dist/tools/llvm-config/CMakeLists.txt
  vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp
  vendor/llvm/dist/unittests/ADT/DenseMapTest.cpp
  vendor/llvm/dist/unittests/ADT/StringRefTest.cpp
  vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp
  vendor/llvm/dist/utils/NewNightlyTest.pl
  vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp
  vendor/llvm/dist/utils/TableGen/CodeGenTarget.h
  vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp
  vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp
  vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp
  vendor/llvm/dist/utils/lit/LitFormats.py
  vendor/llvm/dist/utils/lit/Test.py
  vendor/llvm/dist/utils/lit/TestFormats.py
  vendor/llvm/dist/utils/lit/TestRunner.py
  vendor/llvm/dist/utils/lit/TestingConfig.py
  vendor/llvm/dist/utils/lit/lit.py

Modified: vendor/llvm/dist/CMakeLists.txt
==============================================================================
--- vendor/llvm/dist/CMakeLists.txt	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/CMakeLists.txt	Wed Nov 18 14:58:34 2009	(r199481)
@@ -70,6 +70,9 @@ else( MSVC )
     CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
 endif( MSVC )
 
+set(C_INCLUDE_DIRS "" CACHE STRING
+  "Colon separated list of directories clang will search for headers.")
+
 set(LLVM_TARGET_ARCH "host"
   CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.")
 
@@ -164,13 +167,19 @@ option(LLVM_ENABLE_PIC "Build Position-I
 
 set(ENABLE_PIC 0)
 if( LLVM_ENABLE_PIC )
-  if( SUPPORTS_FPIC_FLAG )
-    message(STATUS "Building with -fPIC")
-    add_llvm_definitions(-fPIC)
-    set(ENABLE_PIC 1)
- else( SUPPORTS_FPIC_FLAG )
-    message(STATUS "Warning: -fPIC not supported.")
-  endif()
+ if( XCODE )
+   # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't
+   # know how to disable this, so just force ENABLE_PIC off for now.
+   message(STATUS "Warning: -fPIC not supported with Xcode.")
+ else( XCODE )
+   if( SUPPORTS_FPIC_FLAG )
+      message(STATUS "Building with -fPIC")
+      add_llvm_definitions(-fPIC)
+      set(ENABLE_PIC 1)
+   else( SUPPORTS_FPIC_FLAG )
+      message(STATUS "Warning: -fPIC not supported.")
+   endif()
+ endif()
 endif()
 
 set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR} )

Modified: vendor/llvm/dist/Makefile
==============================================================================
--- vendor/llvm/dist/Makefile	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/Makefile	Wed Nov 18 14:58:34 2009	(r199481)
@@ -32,7 +32,11 @@ ifeq ($(BUILD_DIRS_ONLY),1)
 else
   DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
           tools runtime docs unittests
-  OPTIONAL_DIRS := examples projects bindings
+  OPTIONAL_DIRS := projects bindings
+endif
+
+ifeq ($(BUILD_EXAMPLES),1)
+  OPTIONAL_DIRS += examples
 endif
 
 EXTRA_DIST := test unittests llvm.spec include win32 Xcode

Modified: vendor/llvm/dist/Makefile.config.in
==============================================================================
--- vendor/llvm/dist/Makefile.config.in	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/Makefile.config.in	Wed Nov 18 14:58:34 2009	(r199481)
@@ -313,6 +313,12 @@ endif
 # Location of the plugin header file for gold.
 BINUTILS_INCDIR := @BINUTILS_INCDIR@
 
+C_INCLUDE_DIRS := @C_INCLUDE_DISR@
+CXX_INCLUDE_ROOT := @CXX_INCLUDE_ROOT@
+CXX_INCLUDE_ARCH := @CXX_INCLUDE_ARCH@
+CXX_INCLUDE_32BIT_DIR = @CXX_INCLUDE_32BIT_DIR@
+CXX_INCLUDE_64BIT_DIR = @CXX_INCLUDE_64BIT_DIR@
+
 # When ENABLE_LLVMC_DYNAMIC is enabled, LLVMC will link libCompilerDriver
 # dynamically. This is needed to make dynamic plugins work on some targets
 # (Windows).

Modified: vendor/llvm/dist/Makefile.rules
==============================================================================
--- vendor/llvm/dist/Makefile.rules	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/Makefile.rules	Wed Nov 18 14:58:34 2009	(r199481)
@@ -338,11 +338,19 @@ ifeq ($(ENABLE_OPTIMIZED),1)
     KEEP_SYMBOLS := 1
   endif
 else
-  BuildMode := Debug
-  CXX.Flags += -g
-  C.Flags   += -g
-  LD.Flags  += -g
-  KEEP_SYMBOLS := 1
+  ifdef NO_DEBUG_SYMBOLS
+    BuildMode := Unoptimized
+    CXX.Flags +=
+    C.Flags   +=
+    LD.Flags  +=
+    KEEP_SYMBOLS := 1
+  else
+    BuildMode := Debug
+    CXX.Flags += -g
+    C.Flags   += -g
+    LD.Flags  += -g
+    KEEP_SYMBOLS := 1
+  endif
 endif
 
 ifeq ($(ENABLE_PROFILING),1)

Modified: vendor/llvm/dist/autoconf/configure.ac
==============================================================================
--- vendor/llvm/dist/autoconf/configure.ac	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/autoconf/configure.ac	Wed Nov 18 14:58:34 2009	(r199481)
@@ -667,6 +667,41 @@ case "$withval" in
   *) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;;
 esac
 
+AC_ARG_WITH(c-include-dir,
+  AS_HELP_STRING([--with-c-include-dirs],
+    [Colon separated list of directories clang will search for headers]),,
+    withval="")
+AC_DEFINE_UNQUOTED(C_INCLUDE_DIRS,"$withval",
+                   [Directories clang will search for headers])
+
+AC_ARG_WITH(cxx-include-root,
+  AS_HELP_STRING([--with-cxx-include-root],
+    [Directory with the libstdc++ headers.]),,
+    withval="")
+AC_DEFINE_UNQUOTED(CXX_INCLUDE_ROOT,"$withval",
+                   [Directory with the libstdc++ headers.])
+
+AC_ARG_WITH(cxx-include-arch,
+  AS_HELP_STRING([--with-cxx-include-arch],
+    [Architecture of the libstdc++ headers.]),,
+    withval="")
+AC_DEFINE_UNQUOTED(CXX_INCLUDE_ARCH,"$withval",
+                   [Arch the libstdc++ headers.])
+
+AC_ARG_WITH(cxx-include-32bit-dir,
+  AS_HELP_STRING([--with-cxx-include-32bit-dir],
+    [32 bit multilib dir.]),,
+    withval="")
+AC_DEFINE_UNQUOTED(CXX_INCLUDE_32BIT_DIR,"$withval",
+                   [32 bit multilib directory.])
+
+AC_ARG_WITH(cxx-include-64bit-dir,
+  AS_HELP_STRING([--with-cxx-include-64bit-dir],
+    [64 bit multilib directory.]),,
+    withval="")
+AC_DEFINE_UNQUOTED(CXX_INCLUDE_64BIT_DIR,"$withval",
+                   [64 bit multilib directory.])
+
 dnl Allow linking of LLVM with GPLv3 binutils code.
 AC_ARG_WITH(binutils-include,
   AS_HELP_STRING([--with-binutils-include],

Modified: vendor/llvm/dist/cmake/config-ix.cmake
==============================================================================
--- vendor/llvm/dist/cmake/config-ix.cmake	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/cmake/config-ix.cmake	Wed Nov 18 14:58:34 2009	(r199481)
@@ -4,6 +4,11 @@ include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckCXXSourceCompiles)
 
+if( UNIX )
+  # Used by check_symbol_exists:
+  set(CMAKE_REQUIRED_LIBRARIES m)
+endif()
+
 # Helper macros and functions
 macro(add_cxx_include result files)
   set(${result} "")
@@ -39,7 +44,9 @@ check_include_file(malloc.h HAVE_MALLOC_
 check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
 check_include_file(memory.h HAVE_MEMORY_H)
 check_include_file(ndir.h HAVE_NDIR_H)
-check_include_file(pthread.h HAVE_PTHREAD_H)
+if( NOT LLVM_ON_WIN32 )
+  check_include_file(pthread.h HAVE_PTHREAD_H)
+endif()
 check_include_file(setjmp.h HAVE_SETJMP_H)
 check_include_file(signal.h HAVE_SIGNAL_H)
 check_include_file(stdint.h HAVE_STDINT_H)
@@ -63,10 +70,12 @@ check_include_file(utime.h HAVE_UTIME_H)
 check_include_file(windows.h HAVE_WINDOWS_H)
 
 # library checks
-check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
-check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
-check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
-check_library_exists(dl dlopen "" HAVE_LIBDL)
+if( NOT LLVM_ON_WIN32 )
+  check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
+  check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
+  check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
+  check_library_exists(dl dlopen "" HAVE_LIBDL)
+endif()
 
 # function checks
 check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
@@ -80,13 +89,16 @@ check_symbol_exists(isnan cmath HAVE_ISN
 check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H)
 check_symbol_exists(ceilf math.h HAVE_CEILF)
 check_symbol_exists(floorf math.h HAVE_FLOORF)
+check_symbol_exists(nearbyintf math.h HAVE_NEARBYINTF)
 check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
 check_symbol_exists(malloc_zone_statistics malloc/malloc.h
                     HAVE_MALLOC_ZONE_STATISTICS)
 check_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
 check_symbol_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP)
 check_symbol_exists(mktemp "stdlib.h;unistd.h" HAVE_MKTEMP)
-check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
+if( NOT LLVM_ON_WIN32 )
+  check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
+endif()
 check_symbol_exists(sbrk unistd.h HAVE_SBRK)
 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
 check_symbol_exists(strerror string.h HAVE_STRERROR)
@@ -120,6 +132,27 @@ endif()
 check_type_exists(uint64_t "${headers}" HAVE_UINT64_T)
 check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T)
 
+# available programs checks
+function(llvm_find_program name)
+  string(TOUPPER ${name} NAME)
+  find_program(LLVM_PATH_${NAME} ${name})
+  mark_as_advanced(LLVM_PATH_${NAME})
+  if(LLVM_PATH_${NAME})
+    set(HAVE_${NAME} 1 CACHE INTERNAL "Is ${name} available ?")
+    mark_as_advanced(HAVE_${NAME})
+  else(LLVM_PATH_${NAME})
+    set(HAVE_${NAME} "" CACHE INTERNAL "Is ${name} available ?")
+  endif(LLVM_PATH_${NAME})
+endfunction()
+
+llvm_find_program(gv)
+llvm_find_program(circo)
+llvm_find_program(twopi)
+llvm_find_program(neato)
+llvm_find_program(fdp)
+llvm_find_program(dot)
+llvm_find_program(dotty)
+
 # Define LLVM_MULTITHREADED if gcc atomic builtins exists.
 include(CheckAtomic)
 
@@ -132,7 +165,9 @@ endif()
 
 include(GetTargetTriple)
 get_target_triple(LLVM_HOSTTRIPLE)
-message(STATUS "LLVM_HOSTTRIPLE: ${LLVM_HOSTTRIPLE}")
+
+# FIXME: We don't distinguish the target and the host. :(
+set(TARGET_TRIPLE "${LLVM_HOSTTRIPLE}")
 
 # Determine the native architecture.
 string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH)

Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake
==============================================================================
--- vendor/llvm/dist/cmake/modules/AddLLVM.cmake	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake	Wed Nov 18 14:58:34 2009	(r199481)
@@ -22,6 +22,28 @@ macro(add_llvm_library name)
 endmacro(add_llvm_library name)
 
 
+macro(add_llvm_loadable_module name)
+  if( NOT LLVM_ON_UNIX )
+    message(STATUS "Loadable modules not supported on this platform.
+${name} ignored.")
+  else()
+    llvm_process_sources( ALL_FILES ${ARGN} )
+    add_library( ${name} MODULE ${ALL_FILES} )
+    set_target_properties( ${name} PROPERTIES PREFIX "" )
+
+    if (APPLE)
+      # Darwin-specific linker flags for loadable modules.
+      set_target_properties(${name} PROPERTIES
+        LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
+    endif()
+
+    install(TARGETS ${name}
+      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+  endif()
+endmacro(add_llvm_loadable_module name)
+
+
 macro(add_llvm_executable name)
   llvm_process_sources( ALL_FILES ${ARGN} )
   add_executable(${name} ${ALL_FILES})

Modified: vendor/llvm/dist/cmake/modules/GetTargetTriple.cmake
==============================================================================
--- vendor/llvm/dist/cmake/modules/GetTargetTriple.cmake	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/cmake/modules/GetTargetTriple.cmake	Wed Nov 18 14:58:34 2009	(r199481)
@@ -4,12 +4,12 @@
 function( get_target_triple var )
   if( MSVC )
     if( CMAKE_CL_64 )
-      set( ${var} "x86_64-pc-win32" PARENT_SCOPE )
+      set( value "x86_64-pc-win32" )
     else()
-      set( ${var} "i686-pc-win32" PARENT_SCOPE )
+      set( value "i686-pc-win32" )
     endif()
   elseif( MINGW AND NOT MSYS )
-    set( ${var} "i686-pc-mingw32" PARENT_SCOPE )
+    set( value "i686-pc-mingw32" )
   else( MSVC )
     set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
     execute_process(COMMAND sh ${config_guess}
@@ -19,7 +19,8 @@ function( get_target_triple var )
     if( NOT TT_RV EQUAL 0 )
       message(FATAL_ERROR "Failed to execute ${config_guess}")
     endif( NOT TT_RV EQUAL 0 )
-    set( ${var} ${TT_OUT} PARENT_SCOPE )
-    message(STATUS "Target triple: ${${var}}")
+    set( value ${TT_OUT} )
   endif( MSVC )
+  set( ${var} ${value} PARENT_SCOPE )
+  message(STATUS "Target triple: ${value}")
 endfunction( get_target_triple var )

Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake
==============================================================================
--- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake	Wed Nov 18 14:58:34 2009	(r199481)
@@ -24,7 +24,6 @@ set(MSVC_LIB_DEPS_LLVMCore LLVMSupport L
 set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMHello LLVMCore LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget)

Modified: vendor/llvm/dist/configure
==============================================================================
--- vendor/llvm/dist/configure	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/configure	Wed Nov 18 14:58:34 2009	(r199481)
@@ -1603,6 +1603,14 @@ Optional Packages:
   --with-extra-options    Specify additional options to compile LLVM with
   --with-ocaml-libdir     Specify install location for ocaml bindings (default
                           is stdlib)
+  --with-c-include-dirs   Colon separated list of directories clang will
+                          search for headers
+  --with-cxx-include-root Directory with the libstdc++ headers.
+  --with-cxx-include-arch Architecture of the libstdc++ headers.
+  --with-cxx-include-32bit-dir
+                          32 bit multilib dir.
+  --with-cxx-include-64bit-dir
+                          64 bit multilib directory.
   --with-binutils-include Specify path to binutils/include/ containing
                           plugin-api.h file for gold plugin.
   --with-tclinclude       directory where tcl headers are
@@ -5272,6 +5280,76 @@ echo "$as_me: error: Invalid path for --
 esac
 
 
+# Check whether --with-c-include-dir was given.
+if test "${with_c_include_dir+set}" = set; then
+  withval=$with_c_include_dir;
+else
+  withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define C_INCLUDE_DIRS "$withval"
+_ACEOF
+
+
+
+# Check whether --with-cxx-include-root was given.
+if test "${with_cxx_include_root+set}" = set; then
+  withval=$with_cxx_include_root;
+else
+  withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CXX_INCLUDE_ROOT "$withval"
+_ACEOF
+
+
+
+# Check whether --with-cxx-include-arch was given.
+if test "${with_cxx_include_arch+set}" = set; then
+  withval=$with_cxx_include_arch;
+else
+  withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CXX_INCLUDE_ARCH "$withval"
+_ACEOF
+
+
+
+# Check whether --with-cxx-include-32bit-dir was given.
+if test "${with_cxx_include_32bit_dir+set}" = set; then
+  withval=$with_cxx_include_32bit_dir;
+else
+  withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CXX_INCLUDE_32BIT_DIR "$withval"
+_ACEOF
+
+
+
+# Check whether --with-cxx-include-64bit-dir was given.
+if test "${with_cxx_include_64bit_dir+set}" = set; then
+  withval=$with_cxx_include_64bit_dir;
+else
+  withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CXX_INCLUDE_64BIT_DIR "$withval"
+_ACEOF
+
+
+
 # Check whether --with-binutils-include was given.
 if test "${with_binutils_include+set}" = set; then
   withval=$with_binutils_include;
@@ -11036,7 +11114,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext < conftest.$ac_ext
+  echo '#line 13261 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14898,11 +14976,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14901: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14979: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14905: \$? = $ac_status" >&5
+   echo "$as_me:14983: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15166,11 +15244,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15169: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15247: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15173: \$? = $ac_status" >&5
+   echo "$as_me:15251: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15270,11 +15348,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15273: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15351: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15277: \$? = $ac_status" >&5
+   echo "$as_me:15355: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17722,7 +17800,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext < conftest.$ac_ext <&5)
+   (eval echo "\"\$as_me:20271: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20197: \$? = $ac_status" >&5
+   echo "$as_me:20275: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -20294,11 +20372,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20297: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20375: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:20301: \$? = $ac_status" >&5
+   echo "$as_me:20379: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21864,11 +21942,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21867: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21945: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:21871: \$? = $ac_status" >&5
+   echo "$as_me:21949: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -21968,11 +22046,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21971: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:22049: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:21975: \$? = $ac_status" >&5
+   echo "$as_me:22053: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -24203,11 +24281,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:24206: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24284: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:24210: \$? = $ac_status" >&5
+   echo "$as_me:24288: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -24471,11 +24549,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:24474: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24552: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:24478: \$? = $ac_status" >&5
+   echo "$as_me:24556: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -24575,11 +24653,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:24578: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24656: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:24582: \$? = $ac_status" >&5
+   echo "$as_me:24660: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized

Modified: vendor/llvm/dist/docs/CommandGuide/lit.pod
==============================================================================
--- vendor/llvm/dist/docs/CommandGuide/lit.pod	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/docs/CommandGuide/lit.pod	Wed Nov 18 14:58:34 2009	(r199481)
@@ -36,6 +36,9 @@ Finally, B also supports additional
 the options specified on the command line, see L<"SELECTION OPTIONS"> for
 more information.
 
+Users interested in the B architecture or designing a B testing
+implementation should see L<"LIT ARCHITECTURE">
+
 =head1 GENERAL OPTIONS
 
 =over
@@ -146,6 +149,11 @@ List the discovered test suites as part 
 
 Run Tcl scripts internally (instead of converting to shell scripts).
 
+=item B<--repeat>=I
+
+Run each test I times. Currently this is primarily useful for timing tests,
+other results are not collated in any reasonable fashion.
+
 =back
 
 =head1 EXIT STATUS
@@ -222,6 +230,119 @@ Depending on the test format tests may p
 their status (generally only for failures). See the L
 section for more information.
 
+=head1 LIT INFRASTRUCTURE
+
+This section describes the B testing architecture for users interested in
+creating a new B testing implementation, or extending an existing one.
+
+B proper is primarily an infrastructure for discovering and running
+arbitrary tests, and to expose a single convenient interface to these
+tests. B itself doesn't contain know how to run tests, rather this logic is
+defined by I.
+
+=head2 TEST SUITES
+
+As described in L<"TEST DISCOVERY">, tests are always located inside a I. Test suites serve to define the format of the tests they contain, the
+logic for finding those tests, and any additional information to run the tests.
+
+B identifies test suites as directories containing I or
+I files (see also B<--config-prefix>. Test suites are initially
+discovered by recursively searching up the directory hierarchy for all the input
+files passed on the command line. You can use B<--show-suites> to display the
+discovered test suites at startup.
+
+Once a test suite is discovered, its config file is loaded. Config files
+themselves are just Python modules which will be executed. When the config file
+is executed, two important global variables are predefined:
+
+=over
+
+=item B
+
+The global B configuration object (a I instance), which defines
+the builtin test formats, global configuration parameters, and other helper
+routines for implementing test configurations.
+
+=item B
+
+This is the config object (a I instance) for the test suite,
+which the config file is expected to populate. The following variables are also
+available on the I object, some of which must be set by the config and
+others are optional or predefined:
+
+B I<[required]> The name of the test suite, for use in reports and
+diagnostics.
+
+B I<[required]> The test format object which will be used to
+discover and run tests in the test suite. Generally this will be a builtin test
+format available from the I module.
+
+B The filesystem path to the test suite root. For out-of-dir
+builds this is the directory that will be scanned for tests.
+
+B For out-of-dir builds, the path to the test suite root inside
+the object directory. This is where tests will be run and temporary output files
+places.
+
+B A dictionary representing the environment to use when executing
+tests in the suite.
+
+B For B test formats which scan directories for tests, this
+variable as a list of suffixes to identify test files. Used by: I,
+I.
+
+B For B test formats which substitute variables into a test
+script, the list of substitutions to perform. Used by: I, I.
+
+B Mark an unsupported directory, all tests within it will be
+reported as unsupported. Used by: I, I.
+
+B The parent configuration, this is the config object for the directory
+containing the test suite, or None.
+
+B The config is actually cloned for every subdirectory inside a test
+suite, to allow local configuration on a per-directory basis. The I
+variable can be set to a Python function which will be called whenever a
+configuration is cloned (for a subdirectory). The function should takes three
+arguments: (1) the parent configuration, (2) the new configuration (which the
+I function will generally modify), and (3) the test path to the new
+directory being scanned.
+
+=back
+
+=head2 TEST DISCOVERY
+
+Once test suites are located, B recursively traverses the source directory
+(following I) looking for tests. When B enters a
+sub-directory, it first checks to see if a nest test suite is defined in that
+directory. If so, it loads that test suite recursively, otherwise it
+instantiates a local test config for the directory (see L<"LOCAL CONFIGURATION
+FILES">).
+
+Tests are identified by the test suite they are contained within, and the
+relative path inside that suite. Note that the relative path may not refer to an
+actual file on disk; some test formats (such as I) define "virtual
+tests" which have a path that contains both the path to the actual test file and
+a subpath to identify the virtual test.
+
+=head2 LOCAL CONFIGURATION FILES
+
+When B loads a subdirectory in a test suite, it instantiates a local test
+configuration by cloning the configuration for the parent direction -- the root
+of this configuration chain will always be a test suite. Once the test
+configuration is cloned B checks for a I file in the
+subdirectory. If present, this file will be loaded and can be used to specialize
+the configuration for each individual directory. This facility can be used to
+define subdirectories of optional tests, or to change other configuration
+parameters -- for example, to change the test format, or the suffixes which
+identify test files.
+
+=head2 LIT EXAMPLE TESTS
+
+The B distribution contains several example implementations of test suites
+in the I directory.
+
 =head1 SEE ALSO
 
 L

Modified: vendor/llvm/dist/docs/LangRef.html
==============================================================================
--- vendor/llvm/dist/docs/LangRef.html	Wed Nov 18 14:47:47 2009	(r199480)
+++ vendor/llvm/dist/docs/LangRef.html	Wed Nov 18 14:58:34 2009	(r199481)
@@ -1215,6 +1215,13 @@ target datalayout = "layout specifica
   
ssize:abi:pref
This specifies the alignment for a stack object of a given bit size.
+ +
nsize1:size2:size3...
+
This specifies a set of native integer widths for the target CPU + in bits. For example, it might contain "n32" for 32-bit PowerPC, + "n32:64" for PowerPC 64, or "n8:16:32:64" for X86-64. Elements of + this set are considered to support most general arithmetic + operations efficiently.

When constructing the data layout for a given target, LLVM starts with a @@ -1569,12 +1576,12 @@ Classifications -

Note that 'variable sized arrays' can be implemented in LLVM with a zero - length array. Normally, accesses past the end of an array are undefined in - LLVM (e.g. it is illegal to access the 5th element of a 3 element array). As - a special case, however, zero length arrays are recognized to be variable - length. This allows implementation of 'pascal style arrays' with the LLVM - type "{ i32, [0 x float]}", for example.

+

There is no restriction on indexing beyond the end of the array implied by + a static type (though there are restrictions on indexing beyond the bounds + of an allocated object in some cases). This means that single-dimension + 'variable sized array' addressing can be implemented in LLVM with a zero + length array type. An implementation of 'pascal style arrays' in LLVM could + use the type "{ i32, [0 x float]}", for example.

Note that the code generator does not yet support large aggregate types to be used as function return types. The specific limit on how large an aggregate @@ -7278,7 +7285,7 @@ LLVM.

Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2009-11-02 01:25:26 +0100 (Mon, 02 Nov 2009) $ + Last modified: $Date: 2009-11-09 20:01:53 +0100 (Mon, 09 Nov 2009) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Wed Nov 18 14:58:34 2009 (r199481) @@ -774,7 +774,7 @@ DW_TAG_return_variable = 258

This intrinsic is used to provide correspondence between the source file and the generated code. The first argument is the line number (base 1), second argument is the column number (0 if unknown) and the third argument the - source %llvm.dbg.compile_unit. + source %llvm.dbg.compile_unit. Code following a call to this intrinsic will have been defined in close proximity of the line, column and file. This information holds until the next call @@ -1813,7 +1813,7 @@ enum Trees { Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ + Last modified: $Date: 2009-11-17 14:13:59 +0100 (Tue, 17 Nov 2009) $ Modified: vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h Wed Nov 18 14:58:34 2009 (r199481) @@ -31,9 +31,6 @@ void LLVMAddAggressiveDCEPass(LLVMPassMa /** See llvm::createCFGSimplificationPass function. */ void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); -/** See llvm::createCondPropagationPass function. */ -void LLVMAddCondPropagationPass(LLVMPassManagerRef PM); - /** See llvm::createDeadStoreEliminationPass function. */ void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM); Modified: vendor/llvm/dist/include/llvm/ADT/DenseMap.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/DenseMap.h Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/include/llvm/ADT/DenseMap.h Wed Nov 18 14:58:34 2009 (r199481) @@ -14,8 +14,9 @@ #ifndef LLVM_ADT_DENSEMAP_H #define LLVM_ADT_DENSEMAP_H -#include "llvm/Support/PointerLikeTypeTraits.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/PointerLikeTypeTraits.h" +#include "llvm/Support/type_traits.h" #include "llvm/ADT/DenseMapInfo.h" #include #include @@ -27,12 +28,8 @@ namespace llvm { template, - typename ValueInfoT = DenseMapInfo > + typename ValueInfoT = DenseMapInfo, bool IsConst = false> class DenseMapIterator; -template, - typename ValueInfoT = DenseMapInfo > -class DenseMapConstIterator; template, @@ -73,7 +70,8 @@ public: } typedef DenseMapIterator iterator; - typedef DenseMapConstIterator const_iterator; + typedef DenseMapIterator const_iterator; inline iterator begin() { return iterator(Buckets, Buckets+NumBuckets); } @@ -426,32 +424,47 @@ private: } }; -template -class DenseMapIterator : - public std::iterator, - ptrdiff_t> { - typedef std::pair BucketT; -protected: - const BucketT *Ptr, *End; +template +class DenseMapIterator { + typedef std::pair Bucket; + typedef DenseMapIterator ConstIterator; + friend class DenseMapIterator; +public: + typedef ptrdiff_t difference_type; + typedef typename conditional::type value_type; + typedef value_type *pointer; + typedef value_type &reference; + typedef std::forward_iterator_tag iterator_category; +private: + pointer Ptr, End; public: DenseMapIterator() : Ptr(0), End(0) {} - DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) { + DenseMapIterator(pointer Pos, pointer E) : Ptr(Pos), End(E) { AdvancePastEmptyBuckets(); } - std::pair &operator*() const { - return *const_cast(Ptr); + // If IsConst is true this is a converting constructor from iterator to + // const_iterator and the default copy constructor is used. + // Otherwise this is a copy constructor for iterator. + DenseMapIterator(const DenseMapIterator& I) + : Ptr(I.Ptr), End(I.End) {} + + reference operator*() const { + return *Ptr; } - std::pair *operator->() const { - return const_cast(Ptr); + pointer operator->() const { + return Ptr; } - bool operator==(const DenseMapIterator &RHS) const { - return Ptr == RHS.Ptr; + bool operator==(const ConstIterator &RHS) const { + return Ptr == RHS.operator->(); } - bool operator!=(const DenseMapIterator &RHS) const { - return Ptr != RHS.Ptr; + bool operator!=(const ConstIterator &RHS) const { + return Ptr != RHS.operator->(); } inline DenseMapIterator& operator++() { // Preincrement @@ -475,22 +488,6 @@ private: } }; -template -class DenseMapConstIterator : public DenseMapIterator { -public: - DenseMapConstIterator() : DenseMapIterator() {} - DenseMapConstIterator(const std::pair *Pos, - const std::pair *E) - : DenseMapIterator(Pos, E) { - } - const std::pair &operator*() const { - return *this->Ptr; - } - const std::pair *operator->() const { - return this->Ptr; - } -}; - } // end namespace llvm #endif Modified: vendor/llvm/dist/include/llvm/ADT/GraphTraits.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/GraphTraits.h Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/include/llvm/ADT/GraphTraits.h Wed Nov 18 14:58:34 2009 (r199481) @@ -30,7 +30,7 @@ struct GraphTraits { // typedef NodeType - Type of Node in the graph // typedef ChildIteratorType - Type used to iterate over children in graph - // static NodeType *getEntryNode(GraphType *) + // static NodeType *getEntryNode(const GraphType &) // Return the entry node of the graph // static ChildIteratorType child_begin(NodeType *) Modified: vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h Wed Nov 18 14:58:34 2009 (r199481) @@ -102,8 +102,8 @@ public: } private: - Factory(const Factory& RHS) {}; - void operator=(const Factory& RHS) {}; + Factory(const Factory& RHS); // DO NOT IMPLEMENT + void operator=(const Factory& RHS); // DO NOT IMPLEMENT }; friend class Factory; Modified: vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h Wed Nov 18 14:58:34 2009 (r199481) @@ -988,8 +988,8 @@ public: BumpPtrAllocator& getAllocator() { return F.getAllocator(); } private: - Factory(const Factory& RHS) {} - void operator=(const Factory& RHS) {} + Factory(const Factory& RHS); // DO NOT IMPLEMENT + void operator=(const Factory& RHS); // DO NOT IMPLEMENT }; friend class Factory; Modified: vendor/llvm/dist/include/llvm/ADT/PointerUnion.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/PointerUnion.h Wed Nov 18 14:47:47 2009 (r199480) +++ vendor/llvm/dist/include/llvm/ADT/PointerUnion.h Wed Nov 18 14:58:34 2009 (r199481) @@ -186,8 +186,9 @@ namespace llvm { int is() const { // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.is() && Val.get().is(); - return Val.is(); + return Val.template is() && + Val.template get().template is(); + return Val.template is(); } /// get() - Return the value of the specified pointer type. If the @@ -197,9 +198,9 @@ namespace llvm { assert(is() && "Invalid accessor called"); // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.get().get(); + return Val.template get().template get(); - return Val.get(); + return Val.template get(); } /// dyn_cast() - If the current value is of the specified pointer type, @@ -291,8 +292,10 @@ namespace llvm { int is() const { // Is it PT1/PT2? if (::llvm::getPointerUnionTypeNum((T*)0) != -1) - return Val.is() && Val.get().is(); - return Val.is() && Val.get().is(); + return Val.template is() && + Val.template get().template is(); + return Val.template is() && + Val.template get().template is(); } /// get() - Return the value of the specified pointer type. If the @@ -302,9 +305,9 @@ namespace llvm { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 14:59:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBF86106568D; Wed, 18 Nov 2009 14:59:58 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5F4C8FC13; Wed, 18 Nov 2009 14:59:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIExwgd074938; Wed, 18 Nov 2009 14:59:58 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIExwjI074923; Wed, 18 Nov 2009 14:59:58 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911181459.nAIExwjI074923@svn.freebsd.org> From: Roman Divacky Date: Wed, 18 Nov 2009 14:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199482 - in vendor/clang/dist: . clang.xcodeproj docs include/clang-c include/clang/AST include/clang/Analysis include/clang/Analysis/Analyses include/clang/Analysis/FlowSensitive incl... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 14:59:58 -0000 Author: rdivacky Date: Wed Nov 18 14:59:57 2009 New Revision: 199482 URL: http://svn.freebsd.org/changeset/base/199482 Log: Update clang to r89205. Added: vendor/clang/dist/include/clang/Analysis/ManagerRegistry.h vendor/clang/dist/include/clang/Basic/TargetOptions.h vendor/clang/dist/include/clang/CodeGen/CodeGenOptions.h vendor/clang/dist/include/clang/Frontend/ChainedDiagnosticClient.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h vendor/clang/dist/include/clang/Frontend/DependencyOutputOptions.h vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/FrontendPluginRegistry.h vendor/clang/dist/include/clang/Frontend/HeaderSearchOptions.h vendor/clang/dist/include/clang/Frontend/PreprocessorOptions.h vendor/clang/dist/include/clang/Frontend/PreprocessorOutputOptions.h vendor/clang/dist/include/clang/Frontend/VerifyDiagnosticsClient.h vendor/clang/dist/include/clang/Parse/Template.h vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/ArrayBoundChecker.cpp vendor/clang/dist/lib/Analysis/CastToStructChecker.cpp vendor/clang/dist/lib/Analysis/CheckSizeofPointer.cpp vendor/clang/dist/lib/Analysis/FixedAddressChecker.cpp vendor/clang/dist/lib/Analysis/GRExprEngineExperimentalChecks.cpp vendor/clang/dist/lib/Analysis/GRExprEngineExperimentalChecks.h vendor/clang/dist/lib/Analysis/GRExprEngineInternalChecks.h vendor/clang/dist/lib/Analysis/MallocChecker.cpp vendor/clang/dist/lib/Analysis/ManagerRegistry.cpp vendor/clang/dist/lib/Analysis/PointerArithChecker.cpp vendor/clang/dist/lib/Analysis/PointerSubChecker.cpp vendor/clang/dist/lib/Analysis/PthreadLockChecker.cpp vendor/clang/dist/lib/Analysis/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Analysis/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Analysis/ReturnUndefChecker.cpp vendor/clang/dist/lib/Analysis/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/CodeGen/GlobalDecl.h vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/FrontendOptions.cpp vendor/clang/dist/lib/Frontend/VerifyDiagnosticsClient.cpp vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/test/Analysis/malloc.c vendor/clang/dist/test/Analysis/plist-output.m vendor/clang/dist/test/Analysis/sizeofpointer.c vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.udir/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.unnamed/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udir/p1.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.delete/p5.cpp vendor/clang/dist/test/CXX/special/class.free/p1.cpp vendor/clang/dist/test/CXX/special/class.free/p6.cpp vendor/clang/dist/test/CodeCompletion/objc-message.m vendor/clang/dist/test/CodeGenCXX/array-operator-delete-call.cpp vendor/clang/dist/test/CodeGenCXX/array-value-initialize.cpp vendor/clang/dist/test/CodeGenCXX/assign-operator.cpp vendor/clang/dist/test/CodeGenCXX/debug-info.cpp vendor/clang/dist/test/CodeGenCXX/default-arguments.cpp vendor/clang/dist/test/CodeGenCXX/default-constructor-default-argument.cpp vendor/clang/dist/test/CodeGenCXX/delete-two-arg.cpp vendor/clang/dist/test/CodeGenCXX/dyncast.cpp vendor/clang/dist/test/CodeGenCXX/empty-union.cpp vendor/clang/dist/test/CodeGenCXX/global-array-destruction.cpp vendor/clang/dist/test/CodeGenCXX/init-incomplete-type.cpp vendor/clang/dist/test/CodeGenCXX/instantiate-init-list.cpp vendor/clang/dist/test/CodeGenCXX/mangle-system-header.cpp vendor/clang/dist/test/CodeGenCXX/member-expressions.cpp vendor/clang/dist/test/CodeGenCXX/member-init-struct.cpp vendor/clang/dist/test/CodeGenCXX/member-init-union.cpp vendor/clang/dist/test/CodeGenCXX/new-operator-phi.cpp vendor/clang/dist/test/CodeGenCXX/rtti.cpp vendor/clang/dist/test/CodeGenCXX/static-init-1.cpp vendor/clang/dist/test/CodeGenCXX/static-init-2.cpp vendor/clang/dist/test/CodeGenCXX/typeinfo vendor/clang/dist/test/CodeGenCXX/vararg-conversion-ctor.cpp vendor/clang/dist/test/CodeGenCXX/virt-dtor-gen.cpp vendor/clang/dist/test/CodeGenCXX/virtual-operator-call.cpp vendor/clang/dist/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp vendor/clang/dist/test/CodeGenObjC/hidden-visibility.m vendor/clang/dist/test/CodeGenObjC/missing-atend-metadata.m vendor/clang/dist/test/CodeGenObjC/objc2-weak-import-attribute.m vendor/clang/dist/test/CodeGenObjC/super-message-fragileabi.m vendor/clang/dist/test/Index/Inputs/ vendor/clang/dist/test/Index/Inputs/c-index-pch.h vendor/clang/dist/test/Index/Inputs/foo.h vendor/clang/dist/test/Index/Inputs/lit.local.cfg vendor/clang/dist/test/Index/Inputs/objc.h vendor/clang/dist/test/Index/Inputs/t1.c vendor/clang/dist/test/Index/Inputs/t1.m vendor/clang/dist/test/Index/Inputs/t2.c vendor/clang/dist/test/Index/Inputs/t2.m vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/TestClassForwardDecl.m vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/c-index-getCursor-test.m vendor/clang/dist/test/Index/code-completion.cpp vendor/clang/dist/test/Index/complete-member-access.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Index/complete-protocols.m vendor/clang/dist/test/Sema/conversion-64-32.c vendor/clang/dist/test/Sema/conversion.c vendor/clang/dist/test/Sema/pointer-conversion.c vendor/clang/dist/test/SemaCXX/builtins.cpp vendor/clang/dist/test/SemaCXX/format-attribute.cpp vendor/clang/dist/test/SemaCXX/vararg-default-arg.cpp vendor/clang/dist/test/SemaObjC/atomoic-property-synnthesis-rules.m vendor/clang/dist/test/SemaObjC/idiomatic-parentheses.m vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/instantiate-attr.cpp vendor/clang/dist/test/SemaTemplate/instantiate-decl-init.cpp vendor/clang/dist/test/SemaTemplate/instantiate-overloaded-arrow.cpp vendor/clang/dist/tools/clang-cc/Options.cpp vendor/clang/dist/tools/clang-cc/Options.h vendor/clang/dist/utils/C++Tests/Clang-Code-Compile/ vendor/clang/dist/utils/C++Tests/Clang-Code-Compile/lit.local.cfg vendor/clang/dist/utils/C++Tests/Clang-Code-Syntax/ vendor/clang/dist/utils/C++Tests/Clang-Code-Syntax/lit.local.cfg vendor/clang/dist/utils/C++Tests/Clang-Syntax/ vendor/clang/dist/utils/C++Tests/Clang-Syntax/lit.local.cfg Deleted: vendor/clang/dist/lib/Analysis/AnalysisManager.cpp vendor/clang/dist/lib/Frontend/ManagerRegistry.cpp Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/Makefile vendor/clang/dist/NOTES.txt vendor/clang/dist/TODO.txt vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclContextInternals.h vendor/clang/dist/include/clang/AST/DeclNodes.def vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/RecordLayout.h vendor/clang/dist/include/clang/AST/Redeclarable.h vendor/clang/dist/include/clang/AST/TemplateBase.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeLocBuilder.h vendor/clang/dist/include/clang/Analysis/Analyses/LiveVariables.h vendor/clang/dist/include/clang/Analysis/FlowSensitive/DataflowSolver.h vendor/clang/dist/include/clang/Analysis/LocalCheckers.h vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/Analysis/PathSensitive/BugReporter.h vendor/clang/dist/include/clang/Analysis/PathSensitive/BugType.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/CheckerVisitor.def vendor/clang/dist/include/clang/Analysis/PathSensitive/CheckerVisitor.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRWorkList.h vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Analysis/PathSensitive/SVals.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Store.h vendor/clang/dist/include/clang/Analysis/ProgramPoint.h vendor/clang/dist/include/clang/Analysis/Support/Optional.h vendor/clang/dist/include/clang/Analysis/Support/SaveAndRestore.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/Makefile vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/CodeGen/ModuleBuilder.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.def vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Driver/Types.h vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/Analyses.def vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h vendor/clang/dist/include/clang/Frontend/CommandLineSourceLoc.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/PCHWriter.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/TypeXML.def vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/PTHManager.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/Token.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/AttributeList.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Ownership.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Parse/Scope.h vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h vendor/clang/dist/include/clang/Sema/ParseAST.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/DeclarationName.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateBase.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/Analysis/AttrNonNullChecker.cpp vendor/clang/dist/lib/Analysis/BadCallChecker.cpp vendor/clang/dist/lib/Analysis/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Analysis/BasicStore.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/CallGraph.cpp vendor/clang/dist/lib/Analysis/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Analysis/DereferenceChecker.cpp vendor/clang/dist/lib/Analysis/DivZeroChecker.cpp vendor/clang/dist/lib/Analysis/ExplodedGraph.cpp vendor/clang/dist/lib/Analysis/GRCoreEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngineInternalChecks.cpp vendor/clang/dist/lib/Analysis/GRState.cpp vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/MemRegion.cpp vendor/clang/dist/lib/Analysis/NSErrorChecker.cpp vendor/clang/dist/lib/Analysis/RangeConstraintManager.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Analysis/SVals.cpp vendor/clang/dist/lib/Analysis/SValuator.cpp vendor/clang/dist/lib/Analysis/Store.cpp vendor/clang/dist/lib/Analysis/UndefinedArgChecker.cpp vendor/clang/dist/lib/Analysis/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Analysis/VLASizeChecker.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCXXClass.cpp vendor/clang/dist/lib/CodeGen/CGCXXExpr.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGRtti.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/Mangle.h vendor/clang/dist/lib/CodeGen/ModuleBuilder.cpp vendor/clang/dist/lib/CodeGen/TargetABIInfo.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/Backend.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/DocumentXML.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PlistDiagnostics.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/Warnings.cpp vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Index/ResolveLocation.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/PPCaching.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/PTHLexer.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/MinimalAction.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/DeltaTree.cpp vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/ParseAST.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaOverload.h vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/CFDateGC.m vendor/clang/dist/test/Analysis/CFNumber.c vendor/clang/dist/test/Analysis/CFRetainRelease_NSAssertionHandler.m vendor/clang/dist/test/Analysis/CGColorSpace.c vendor/clang/dist/test/Analysis/CheckNSError.m vendor/clang/dist/test/Analysis/MissingDealloc.m vendor/clang/dist/test/Analysis/NSPanel.m vendor/clang/dist/test/Analysis/NSString.m vendor/clang/dist/test/Analysis/NSWindow.m vendor/clang/dist/test/Analysis/NoReturn.m vendor/clang/dist/test/Analysis/ObjCProperties.m vendor/clang/dist/test/Analysis/ObjCRetSigs.m vendor/clang/dist/test/Analysis/PR2599.m vendor/clang/dist/test/Analysis/PR2978.m vendor/clang/dist/test/Analysis/PR3991.m vendor/clang/dist/test/Analysis/array-struct.c vendor/clang/dist/test/Analysis/casts.c vendor/clang/dist/test/Analysis/casts.m vendor/clang/dist/test/Analysis/cfref_PR2519.c vendor/clang/dist/test/Analysis/cfref_rdar6080742.c vendor/clang/dist/test/Analysis/complex.c vendor/clang/dist/test/Analysis/concrete-address.c vendor/clang/dist/test/Analysis/conditional-op-missing-lhs.c vendor/clang/dist/test/Analysis/dead-stores.c vendor/clang/dist/test/Analysis/dead-stores.cpp vendor/clang/dist/test/Analysis/dead-stores.m vendor/clang/dist/test/Analysis/delegates.m vendor/clang/dist/test/Analysis/elementtype.c vendor/clang/dist/test/Analysis/exercise-ps.c vendor/clang/dist/test/Analysis/fields.c vendor/clang/dist/test/Analysis/func.c vendor/clang/dist/test/Analysis/misc-ps-64.m vendor/clang/dist/test/Analysis/misc-ps-basic-store.m vendor/clang/dist/test/Analysis/misc-ps-eager-assume.m vendor/clang/dist/test/Analysis/misc-ps-ranges.m vendor/clang/dist/test/Analysis/misc-ps-region-store-i386.m vendor/clang/dist/test/Analysis/misc-ps-region-store-x86_64.m vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m vendor/clang/dist/test/Analysis/no-exit-cfg.c vendor/clang/dist/test/Analysis/no-outofbounds.c vendor/clang/dist/test/Analysis/null-deref-ps-region.c vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/override-werror.c vendor/clang/dist/test/Analysis/pr4209.m vendor/clang/dist/test/Analysis/pr_2542_rdar_6793404.m vendor/clang/dist/test/Analysis/pr_4164.c vendor/clang/dist/test/Analysis/ptr-arith.c vendor/clang/dist/test/Analysis/rdar-6442306-1.m vendor/clang/dist/test/Analysis/rdar-6540084.m vendor/clang/dist/test/Analysis/rdar-6541136-region.c vendor/clang/dist/test/Analysis/rdar-6541136.c vendor/clang/dist/test/Analysis/rdar-6562655.m vendor/clang/dist/test/Analysis/rdar-6582778-basic-store.c vendor/clang/dist/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m vendor/clang/dist/test/Analysis/rdar-7168531.m vendor/clang/dist/test/Analysis/refcnt_naming.m vendor/clang/dist/test/Analysis/region-1.m vendor/clang/dist/test/Analysis/retain-release-gc-only.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/security-syntax-checks.m vendor/clang/dist/test/Analysis/stack-addr-ps.c vendor/clang/dist/test/Analysis/uninit-msg-expr.m vendor/clang/dist/test/Analysis/uninit-ps-rdar6145427.m vendor/clang/dist/test/Analysis/uninit-vals-ps.c vendor/clang/dist/test/Analysis/uninit-vals.m vendor/clang/dist/test/Analysis/unused-ivars.m vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p3.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp vendor/clang/dist/test/CXX/temp/temp.param/p1.cpp vendor/clang/dist/test/CXX/temp/temp.param/p12.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp vendor/clang/dist/test/CodeCompletion/call.cpp vendor/clang/dist/test/CodeCompletion/enum-switch-case-qualified.cpp vendor/clang/dist/test/CodeCompletion/enum-switch-case.c vendor/clang/dist/test/CodeCompletion/enum-switch-case.cpp vendor/clang/dist/test/CodeCompletion/function-templates.cpp vendor/clang/dist/test/CodeCompletion/functions.cpp vendor/clang/dist/test/CodeCompletion/macros.c vendor/clang/dist/test/CodeCompletion/member-access.c vendor/clang/dist/test/CodeCompletion/member-access.cpp vendor/clang/dist/test/CodeCompletion/namespace-alias.cpp vendor/clang/dist/test/CodeCompletion/namespace.cpp vendor/clang/dist/test/CodeCompletion/nested-name-specifier.cpp vendor/clang/dist/test/CodeCompletion/operator.cpp vendor/clang/dist/test/CodeCompletion/ordinary-name.c vendor/clang/dist/test/CodeCompletion/property.m vendor/clang/dist/test/CodeCompletion/tag.c vendor/clang/dist/test/CodeCompletion/tag.cpp vendor/clang/dist/test/CodeCompletion/templates.cpp vendor/clang/dist/test/CodeCompletion/truncation.c vendor/clang/dist/test/CodeCompletion/using-namespace.cpp vendor/clang/dist/test/CodeCompletion/using.cpp vendor/clang/dist/test/CodeGen/2008-07-17-no-emit-on-error.c vendor/clang/dist/test/CodeGen/2008-07-22-bitfield-init-after-zero-len-array.c vendor/clang/dist/test/CodeGen/2008-07-29-override-alias-decl.c vendor/clang/dist/test/CodeGen/2008-07-30-implicit-initialization.c vendor/clang/dist/test/CodeGen/2008-07-31-asm-labels.c vendor/clang/dist/test/CodeGen/2009-10-20-GlobalDebug.c vendor/clang/dist/test/CodeGen/PR2001-bitfield-reload.c vendor/clang/dist/test/CodeGen/PR3589-freestanding-libcalls.c vendor/clang/dist/test/CodeGen/PR3613-static-decl.c vendor/clang/dist/test/CodeGen/PR4611-bitfield-layout.c vendor/clang/dist/test/CodeGen/address-space-field1.c vendor/clang/dist/test/CodeGen/address-space.c vendor/clang/dist/test/CodeGen/alias.c vendor/clang/dist/test/CodeGen/alignof.c vendor/clang/dist/test/CodeGen/always_inline.c vendor/clang/dist/test/CodeGen/arm-arguments.c vendor/clang/dist/test/CodeGen/asm-2.c vendor/clang/dist/test/CodeGen/asm-inout.c vendor/clang/dist/test/CodeGen/asm.c vendor/clang/dist/test/CodeGen/atomic.c vendor/clang/dist/test/CodeGen/attr-nodebug.c vendor/clang/dist/test/CodeGen/attr-noinline.c vendor/clang/dist/test/CodeGen/attr-used.c vendor/clang/dist/test/CodeGen/attributes.c vendor/clang/dist/test/CodeGen/bitfield-assign.c vendor/clang/dist/test/CodeGen/bitfield-promote.c vendor/clang/dist/test/CodeGen/bitfield.c vendor/clang/dist/test/CodeGen/blocks-1.c vendor/clang/dist/test/CodeGen/blocks-2.c vendor/clang/dist/test/CodeGen/blocks-aligned-byref-variable.c vendor/clang/dist/test/CodeGen/blocks-seq.c vendor/clang/dist/test/CodeGen/blocks.c vendor/clang/dist/test/CodeGen/builtin-count-zeros.c vendor/clang/dist/test/CodeGen/builtin-memfns.c vendor/clang/dist/test/CodeGen/builtin-nanf.c vendor/clang/dist/test/CodeGen/builtin-stackaddress.c vendor/clang/dist/test/CodeGen/builtins-ffs_parity_popcount.c vendor/clang/dist/test/CodeGen/builtins-powi.c vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/CodeGen/builtins.c vendor/clang/dist/test/CodeGen/c-strings.c vendor/clang/dist/test/CodeGen/cleanup-stack.c vendor/clang/dist/test/CodeGen/compound-type.c vendor/clang/dist/test/CodeGen/conditional.c vendor/clang/dist/test/CodeGen/const-init.c vendor/clang/dist/test/CodeGen/constant-comparison.c vendor/clang/dist/test/CodeGen/constructor-attribute.c vendor/clang/dist/test/CodeGen/darwin-string-literals.c vendor/clang/dist/test/CodeGen/debug-info.c vendor/clang/dist/test/CodeGen/designated-initializers.c vendor/clang/dist/test/CodeGen/dllimport-dllexport.c vendor/clang/dist/test/CodeGen/emit-all-decls.c vendor/clang/dist/test/CodeGen/ext-vector-shuffle.c vendor/clang/dist/test/CodeGen/flexible-array-init.c vendor/clang/dist/test/CodeGen/functions.c vendor/clang/dist/test/CodeGen/global-decls.c vendor/clang/dist/test/CodeGen/init.c vendor/clang/dist/test/CodeGen/inline.c vendor/clang/dist/test/CodeGen/inline2.c vendor/clang/dist/test/CodeGen/libcalls.c vendor/clang/dist/test/CodeGen/lineno-dbginfo.c vendor/clang/dist/test/CodeGen/mandel.c vendor/clang/dist/test/CodeGen/no-common.c vendor/clang/dist/test/CodeGen/object-size.c vendor/clang/dist/test/CodeGen/packed-union.c vendor/clang/dist/test/CodeGen/parameter-passing.c vendor/clang/dist/test/CodeGen/pragma-pack-2.c vendor/clang/dist/test/CodeGen/pragma-pack-3.c vendor/clang/dist/test/CodeGen/predefined-expr.c vendor/clang/dist/test/CodeGen/private-extern.c vendor/clang/dist/test/CodeGen/rdr-6098585-default-after-caserange.c vendor/clang/dist/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c vendor/clang/dist/test/CodeGen/rdr-6098585-empty-case-range.c vendor/clang/dist/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c vendor/clang/dist/test/CodeGen/rdr-6098585-unsigned-caserange.c vendor/clang/dist/test/CodeGen/stack-protector.c vendor/clang/dist/test/CodeGen/staticinit.c vendor/clang/dist/test/CodeGen/stdcall-fastcall.c vendor/clang/dist/test/CodeGen/string-init.c vendor/clang/dist/test/CodeGen/struct-passing.c vendor/clang/dist/test/CodeGen/struct-x86-darwin.c vendor/clang/dist/test/CodeGen/target-data.c vendor/clang/dist/test/CodeGen/tentative-decls.c vendor/clang/dist/test/CodeGen/trapv.c vendor/clang/dist/test/CodeGen/unreachable.c vendor/clang/dist/test/CodeGen/unwind-attr.c vendor/clang/dist/test/CodeGen/visibility.c vendor/clang/dist/test/CodeGen/volatile-1.c vendor/clang/dist/test/CodeGen/volatile.c vendor/clang/dist/test/CodeGen/x86.c vendor/clang/dist/test/CodeGen/x86_32-arguments.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/PR5050-constructor-conversion.cpp vendor/clang/dist/test/CodeGenCXX/array-construction.cpp vendor/clang/dist/test/CodeGenCXX/attr.cpp vendor/clang/dist/test/CodeGenCXX/call-arg-zero-temp.cpp vendor/clang/dist/test/CodeGenCXX/cast-conversion.cpp vendor/clang/dist/test/CodeGenCXX/class-layout.cpp vendor/clang/dist/test/CodeGenCXX/constructor-conversion.cpp vendor/clang/dist/test/CodeGenCXX/constructor-default-arg.cpp vendor/clang/dist/test/CodeGenCXX/constructor-for-array-members.cpp vendor/clang/dist/test/CodeGenCXX/constructor-template.cpp vendor/clang/dist/test/CodeGenCXX/conversion-function.cpp vendor/clang/dist/test/CodeGenCXX/convert-to-fptr.cpp vendor/clang/dist/test/CodeGenCXX/copy-assign-synthesis-1.cpp vendor/clang/dist/test/CodeGenCXX/copy-assign-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-elim.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/decl-ref-init.cpp vendor/clang/dist/test/CodeGenCXX/default-arg-temps.cpp vendor/clang/dist/test/CodeGenCXX/default-constructor-for-members.cpp vendor/clang/dist/test/CodeGenCXX/default-destructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/delete.cpp vendor/clang/dist/test/CodeGenCXX/derived-to-base-conv.cpp vendor/clang/dist/test/CodeGenCXX/destructors.cpp vendor/clang/dist/test/CodeGenCXX/explicit-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/extern-c.cpp vendor/clang/dist/test/CodeGenCXX/implicit-instantiation-1.cpp vendor/clang/dist/test/CodeGenCXX/mangle-subst.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/member-functions.cpp vendor/clang/dist/test/CodeGenCXX/member-pointers-zero-init.cpp vendor/clang/dist/test/CodeGenCXX/new.cpp vendor/clang/dist/test/CodeGenCXX/ptr-to-member-function.cpp vendor/clang/dist/test/CodeGenCXX/reinterpret-cast.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/trivial-constructor-init.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments.cpp vendor/clang/dist/test/CodeGenObjC/bitfield-1.m vendor/clang/dist/test/CodeGenObjC/bitfield-ivar-metadata.m vendor/clang/dist/test/CodeGenObjC/bitfield-ivar-offsets.m vendor/clang/dist/test/CodeGenObjC/blocks-1.m vendor/clang/dist/test/CodeGenObjC/blocks-2.m vendor/clang/dist/test/CodeGenObjC/blocks-3.m vendor/clang/dist/test/CodeGenObjC/blocks.m vendor/clang/dist/test/CodeGenObjC/category-super-class-meth.m vendor/clang/dist/test/CodeGenObjC/class-getter-dotsyntax.m vendor/clang/dist/test/CodeGenObjC/class-type.m vendor/clang/dist/test/CodeGenObjC/constant-strings.m vendor/clang/dist/test/CodeGenObjC/continuation-class.m vendor/clang/dist/test/CodeGenObjC/deadcode_strip_used_var.m vendor/clang/dist/test/CodeGenObjC/debug-info-linkagename.m vendor/clang/dist/test/CodeGenObjC/dot-syntax-1.m vendor/clang/dist/test/CodeGenObjC/dot-syntax.m vendor/clang/dist/test/CodeGenObjC/encode-test-1.m vendor/clang/dist/test/CodeGenObjC/encode-test-2.m vendor/clang/dist/test/CodeGenObjC/encode-test-3.m vendor/clang/dist/test/CodeGenObjC/encode-test-5.m vendor/clang/dist/test/CodeGenObjC/encode-test.m vendor/clang/dist/test/CodeGenObjC/forward-class-impl-metadata.m vendor/clang/dist/test/CodeGenObjC/hidden.m vendor/clang/dist/test/CodeGenObjC/image-info.m vendor/clang/dist/test/CodeGenObjC/implicit-objc_msgSend.m vendor/clang/dist/test/CodeGenObjC/interface-layout-64.m vendor/clang/dist/test/CodeGenObjC/interface.m vendor/clang/dist/test/CodeGenObjC/ivar-layout-64.m vendor/clang/dist/test/CodeGenObjC/ivar-layout-no-optimize.m vendor/clang/dist/test/CodeGenObjC/ivars.m vendor/clang/dist/test/CodeGenObjC/link-errors.m vendor/clang/dist/test/CodeGenObjC/message-arrays.m vendor/clang/dist/test/CodeGenObjC/messages-2.m vendor/clang/dist/test/CodeGenObjC/messages.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-32.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-64.m vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/CodeGenObjC/newproperty-nested-synthesis-1.m vendor/clang/dist/test/CodeGenObjC/non-lazy-classes.m vendor/clang/dist/test/CodeGenObjC/objc-align.m vendor/clang/dist/test/CodeGenObjC/objc-assign-ivar.m vendor/clang/dist/test/CodeGenObjC/objc-gc-aggr-assign.m vendor/clang/dist/test/CodeGenObjC/objc-read-weak-byref.m vendor/clang/dist/test/CodeGenObjC/objc2-assign-global.m vendor/clang/dist/test/CodeGenObjC/objc2-ivar-assign.m vendor/clang/dist/test/CodeGenObjC/objc2-new-gc-api-strongcast.m vendor/clang/dist/test/CodeGenObjC/objc2-no-write-barrier.m vendor/clang/dist/test/CodeGenObjC/objc2-property-encode.m vendor/clang/dist/test/CodeGenObjC/objc2-protocol-enc.m vendor/clang/dist/test/CodeGenObjC/objc2-strong-cast.m vendor/clang/dist/test/CodeGenObjC/objc2-weak-assign.m vendor/clang/dist/test/CodeGenObjC/objc2-weak-compare.m vendor/clang/dist/test/CodeGenObjC/objc2-weak-ivar-debug.m vendor/clang/dist/test/CodeGenObjC/objc2-write-barrier-2.m vendor/clang/dist/test/CodeGenObjC/objc2-write-barrier-3.m vendor/clang/dist/test/CodeGenObjC/objc2-write-barrier-4.m vendor/clang/dist/test/CodeGenObjC/objc2-write-barrier-5.m vendor/clang/dist/test/CodeGenObjC/objc2-write-barrier.m vendor/clang/dist/test/CodeGenObjC/object-incr-decr-1.m vendor/clang/dist/test/CodeGenObjC/overloadable.m vendor/clang/dist/test/CodeGenObjC/property-aggr-type.m vendor/clang/dist/test/CodeGenObjC/property-agrr-getter.m vendor/clang/dist/test/CodeGenObjC/property-complex.m vendor/clang/dist/test/CodeGenObjC/property-getter-dot-syntax.m vendor/clang/dist/test/CodeGenObjC/property-incr-decr-1.m vendor/clang/dist/test/CodeGenObjC/property-setter-attr.m vendor/clang/dist/test/CodeGenObjC/property.m vendor/clang/dist/test/CodeGenObjC/protocol-in-extended-class.m vendor/clang/dist/test/CodeGenObjC/protocol-property-synth.m vendor/clang/dist/test/CodeGenObjC/protocols-lazy.m vendor/clang/dist/test/CodeGenObjC/protocols.m vendor/clang/dist/test/CodeGenObjC/runtime-fns.m vendor/clang/dist/test/CodeGenObjC/super-classmethod-category.m vendor/clang/dist/test/CodeGenObjC/synchronized.m vendor/clang/dist/test/CodeGenObjC/synthesize_ivar-cont-class.m vendor/clang/dist/test/CodeGenObjC/synthesize_ivar.m vendor/clang/dist/test/CodeGenObjC/try.m vendor/clang/dist/test/CodeGenObjC/unname-bf-metadata.m vendor/clang/dist/test/CodeGenObjC/variadic-sends.m vendor/clang/dist/test/Coverage/ast-printing.c vendor/clang/dist/test/Coverage/ast-printing.cpp vendor/clang/dist/test/Coverage/ast-printing.m vendor/clang/dist/test/Coverage/codegen-next.m vendor/clang/dist/test/Coverage/codegen.c vendor/clang/dist/test/Coverage/html-diagnostics.c vendor/clang/dist/test/Coverage/parse-callbacks.c vendor/clang/dist/test/Coverage/parse-callbacks.m vendor/clang/dist/test/Coverage/targets.c vendor/clang/dist/test/Driver/Xarch.c vendor/clang/dist/test/Driver/analyze.c vendor/clang/dist/test/Driver/arm-darwin-builtin.c vendor/clang/dist/test/Driver/ast.c vendor/clang/dist/test/Driver/bindings.c vendor/clang/dist/test/Driver/clang-translation.c vendor/clang/dist/test/Driver/clang_cpp.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Driver/cxx-pth.cpp vendor/clang/dist/test/Driver/darwin-as.c vendor/clang/dist/test/Driver/darwin-cc.c vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Driver/default-toolchain.c vendor/clang/dist/test/Driver/dragonfly.c vendor/clang/dist/test/Driver/emit-llvm.c vendor/clang/dist/test/Driver/flags.c vendor/clang/dist/test/Driver/freebsd.c vendor/clang/dist/test/Driver/hello.c vendor/clang/dist/test/Driver/immediate-options.c vendor/clang/dist/test/Driver/lto.c vendor/clang/dist/test/Driver/openbsd.c vendor/clang/dist/test/Driver/parsing.c vendor/clang/dist/test/Driver/phases.c vendor/clang/dist/test/Driver/preprocessor.c vendor/clang/dist/test/Driver/pth.c vendor/clang/dist/test/Driver/redzone.c vendor/clang/dist/test/Driver/std.c vendor/clang/dist/test/Driver/unknown-gcc-arch.c vendor/clang/dist/test/Driver/x86_features.c vendor/clang/dist/test/FixIt/fixit-at.c vendor/clang/dist/test/FixIt/fixit-c90.c vendor/clang/dist/test/FixIt/fixit-errors-1.c vendor/clang/dist/test/FixIt/fixit-errors.c vendor/clang/dist/test/FixIt/fixit-objc.m vendor/clang/dist/test/FixIt/fixit-pmem.cpp vendor/clang/dist/test/FixIt/fixit.c vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/Frontend/ast-codegen.c vendor/clang/dist/test/Frontend/ast-main.c vendor/clang/dist/test/Frontend/cpp-output.c vendor/clang/dist/test/Frontend/darwin-version.c vendor/clang/dist/test/Frontend/dependency-gen.c vendor/clang/dist/test/Frontend/rewrite-macros.c vendor/clang/dist/test/Frontend/stdin.c vendor/clang/dist/test/Index/c-index-api-test.m vendor/clang/dist/test/Index/c-index-pch.c vendor/clang/dist/test/Index/comments.c vendor/clang/dist/test/Index/find-decls.c vendor/clang/dist/test/Index/find-defs.c vendor/clang/dist/test/Index/find-refs.c vendor/clang/dist/test/Index/multiple-redecls.c vendor/clang/dist/test/Index/objc-decls.m vendor/clang/dist/test/Index/objc-message.m vendor/clang/dist/test/Index/resolve-loc.c vendor/clang/dist/test/Lexer/block_cmt_end.c vendor/clang/dist/test/Lexer/counter.c vendor/clang/dist/test/Lexer/digraph.c vendor/clang/dist/test/Lexer/dollar-idents.c vendor/clang/dist/test/Lexer/escape_newline.c vendor/clang/dist/test/Lexer/rdr-6096838.c vendor/clang/dist/test/Lexer/token-concat.c vendor/clang/dist/test/Misc/caret-diags-macros.c vendor/clang/dist/test/Misc/diag-mapping.c vendor/clang/dist/test/Misc/diag-mapping2.c vendor/clang/dist/test/Misc/message-length.c vendor/clang/dist/test/PCH/asm.c vendor/clang/dist/test/PCH/attrs.c vendor/clang/dist/test/PCH/blocks.c vendor/clang/dist/test/PCH/builtins.c vendor/clang/dist/test/PCH/enum.c vendor/clang/dist/test/PCH/exprs.c vendor/clang/dist/test/PCH/ext_vector.c vendor/clang/dist/test/PCH/external-defs.c vendor/clang/dist/test/PCH/functions.c vendor/clang/dist/test/PCH/fuzzy-pch.c vendor/clang/dist/test/PCH/line-directive.c vendor/clang/dist/test/PCH/method_pool.m vendor/clang/dist/test/PCH/multiple_decls.c vendor/clang/dist/test/PCH/nonvisible-external-defs.c vendor/clang/dist/test/PCH/objc_exprs.m vendor/clang/dist/test/PCH/objc_import.m vendor/clang/dist/test/PCH/objc_methods.m vendor/clang/dist/test/PCH/objc_property.m vendor/clang/dist/test/PCH/pr4489.c vendor/clang/dist/test/PCH/preprocess.c vendor/clang/dist/test/PCH/reloc.c vendor/clang/dist/test/PCH/stmts.c vendor/clang/dist/test/PCH/struct.c vendor/clang/dist/test/PCH/tentative-defs.c vendor/clang/dist/test/PCH/types.c vendor/clang/dist/test/PCH/va_arg.c vendor/clang/dist/test/PCH/variables.c vendor/clang/dist/test/Parser/2008-10-31-parse-noop-failure.c vendor/clang/dist/test/Parser/block-block-storageclass.c vendor/clang/dist/test/Parser/control-scope.c vendor/clang/dist/test/Parser/cxx-using-declaration.cpp vendor/clang/dist/test/Parser/objc-init.m vendor/clang/dist/test/Parser/objc-try-catch-1.m vendor/clang/dist/test/Preprocessor/_Pragma-dependency.c vendor/clang/dist/test/Preprocessor/_Pragma-physloc.c vendor/clang/dist/test/Preprocessor/assembler-with-cpp.c vendor/clang/dist/test/Preprocessor/builtin_line.c vendor/clang/dist/test/Preprocessor/comment_save_macro.c vendor/clang/dist/test/Preprocessor/cxx_and.cpp vendor/clang/dist/test/Preprocessor/cxx_bitand.cpp vendor/clang/dist/test/Preprocessor/cxx_bitor.cpp vendor/clang/dist/test/Preprocessor/cxx_compl.cpp vendor/clang/dist/test/Preprocessor/cxx_not.cpp vendor/clang/dist/test/Preprocessor/cxx_not_eq.cpp vendor/clang/dist/test/Preprocessor/cxx_oper_keyword.cpp vendor/clang/dist/test/Preprocessor/cxx_or.cpp vendor/clang/dist/test/Preprocessor/cxx_true.cpp vendor/clang/dist/test/Preprocessor/cxx_xor.cpp vendor/clang/dist/test/Preprocessor/dependencies-and-pp.c vendor/clang/dist/test/Preprocessor/dump-options.c vendor/clang/dist/test/Preprocessor/dump_macros.c vendor/clang/dist/test/Preprocessor/expr_comma.c vendor/clang/dist/test/Preprocessor/expr_invalid_tok.c vendor/clang/dist/test/Preprocessor/expr_liveness.c vendor/clang/dist/test/Preprocessor/feature_tests.c vendor/clang/dist/test/Preprocessor/hash_line.c vendor/clang/dist/test/Preprocessor/header_lookup1.c vendor/clang/dist/test/Preprocessor/if_warning.c vendor/clang/dist/test/Preprocessor/include-pth.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/line-directive.c vendor/clang/dist/test/Preprocessor/macro-multiline.c vendor/clang/dist/test/Preprocessor/macro_disable.c vendor/clang/dist/test/Preprocessor/macro_expand.c vendor/clang/dist/test/Preprocessor/macro_fn_comma_swallow.c vendor/clang/dist/test/Preprocessor/macro_fn_disable_expand.c vendor/clang/dist/test/Preprocessor/macro_fn_lparen_scan.c vendor/clang/dist/test/Preprocessor/macro_fn_preexpand.c vendor/clang/dist/test/Preprocessor/macro_fn_varargs_iso.c vendor/clang/dist/test/Preprocessor/macro_fn_varargs_named.c vendor/clang/dist/test/Preprocessor/macro_paste_c_block_comment.c vendor/clang/dist/test/Preprocessor/macro_paste_commaext.c vendor/clang/dist/test/Preprocessor/macro_paste_empty.c vendor/clang/dist/test/Preprocessor/macro_paste_hard.c vendor/clang/dist/test/Preprocessor/macro_rescan.c vendor/clang/dist/test/Preprocessor/macro_rescan2.c vendor/clang/dist/test/Preprocessor/objc-pp.m vendor/clang/dist/test/Preprocessor/optimize.c vendor/clang/dist/test/Preprocessor/pic.c vendor/clang/dist/test/Preprocessor/pragma_unknown.c vendor/clang/dist/test/Preprocessor/print_line_track.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Preprocessor/x86_target_features.c vendor/clang/dist/test/Rewriter/objc-ivar-receiver-1.m vendor/clang/dist/test/Sema/128bitint.c vendor/clang/dist/test/Sema/PR2727.c vendor/clang/dist/test/Sema/PR2728.c vendor/clang/dist/test/Sema/attr-format_arg.c vendor/clang/dist/test/Sema/attr-malloc.c vendor/clang/dist/test/Sema/block-byref-args.c vendor/clang/dist/test/Sema/block-storageclass.c vendor/clang/dist/test/Sema/builtin-object-size.c vendor/clang/dist/test/Sema/callingconv.c vendor/clang/dist/test/Sema/check-increment.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/conditional-expr.c vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/Sema/expr-comma-c89.c vendor/clang/dist/test/Sema/expr-comma.c vendor/clang/dist/test/Sema/format-attr-pr4470.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/i-c-e.c vendor/clang/dist/test/Sema/implicit-builtin-redecl.c vendor/clang/dist/test/Sema/implicit-def.c vendor/clang/dist/test/Sema/parentheses.c vendor/clang/dist/test/Sema/pragma-pack-4.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/shift.c vendor/clang/dist/test/Sema/ucn-cstring.c vendor/clang/dist/test/Sema/varargs.c vendor/clang/dist/test/Sema/wchar.c vendor/clang/dist/test/Sema/x86-intrinsics-headers.c vendor/clang/dist/test/SemaCXX/__null.cpp vendor/clang/dist/test/SemaCXX/arrow-operator.cpp vendor/clang/dist/test/SemaCXX/cast-conversion.cpp vendor/clang/dist/test/SemaCXX/compare.cpp vendor/clang/dist/test/SemaCXX/composite-pointer-type.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/conversion-function.cpp vendor/clang/dist/test/SemaCXX/decltype-this.cpp vendor/clang/dist/test/SemaCXX/default-constructor-initializers.cpp vendor/clang/dist/test/SemaCXX/dependent-types.cpp vendor/clang/dist/test/SemaCXX/friend-class-nodecl.cpp vendor/clang/dist/test/SemaCXX/linkage-spec.cpp vendor/clang/dist/test/SemaCXX/member-expr.cpp vendor/clang/dist/test/SemaCXX/member-pointer-size.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/overloaded-builtin-operators.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/pseudo-destructors.cpp vendor/clang/dist/test/SemaCXX/static-cast.cpp vendor/clang/dist/test/SemaCXX/using-decl-1.cpp vendor/clang/dist/test/SemaCXX/using-decl-templates.cpp vendor/clang/dist/test/SemaCXX/value-initialization.cpp vendor/clang/dist/test/SemaCXX/vararg-non-pod.cpp vendor/clang/dist/test/SemaCXX/warn-for-var-in-else.cpp vendor/clang/dist/test/SemaCXX/warn-unused-variables.cpp vendor/clang/dist/test/SemaObjC/call-super-2.m vendor/clang/dist/test/SemaObjC/class-method-lookup.m vendor/clang/dist/test/SemaObjC/compare-qualified-id.m vendor/clang/dist/test/SemaObjC/continuation-class-err.m vendor/clang/dist/test/SemaObjC/deref-interface.m vendor/clang/dist/test/SemaObjC/ivar-sem-check-2.m vendor/clang/dist/test/SemaObjC/method-arg-decay.m vendor/clang/dist/test/SemaObjC/objc-string-constant.m vendor/clang/dist/test/SemaObjC/property-category-1.m vendor/clang/dist/test/SemaObjC/property-nonfragile-abi.m vendor/clang/dist/test/SemaObjC/sizeof-interface.m vendor/clang/dist/test/SemaObjC/static-ivar-ref-1.m vendor/clang/dist/test/SemaObjC/string.m vendor/clang/dist/test/SemaObjC/synthesized-ivar.m vendor/clang/dist/test/SemaObjC/unused.m vendor/clang/dist/test/SemaObjC/warn-selector-selection.m vendor/clang/dist/test/SemaTemplate/class-template-decl.cpp vendor/clang/dist/test/SemaTemplate/class-template-spec.cpp vendor/clang/dist/test/SemaTemplate/constructor-template.cpp vendor/clang/dist/test/SemaTemplate/default-arguments.cpp vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp vendor/clang/dist/test/SemaTemplate/enum-argument.cpp vendor/clang/dist/test/SemaTemplate/example-dynarray.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-pointers.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-template-template-parm.cpp vendor/clang/dist/test/SemaTemplate/instantiate-using-decl.cpp vendor/clang/dist/test/SemaTemplate/instantiation-default-2.cpp vendor/clang/dist/test/SemaTemplate/member-function-template.cpp vendor/clang/dist/test/SemaTemplate/nested-name-spec-template.cpp vendor/clang/dist/test/SemaTemplate/nested-template.cpp vendor/clang/dist/test/SemaTemplate/operator-template.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_template.cpp vendor/clang/dist/test/SemaTemplate/value-dependent-null-pointer-constant.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/test/lit.site.cfg.in vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/CIndex/Makefile vendor/clang/dist/tools/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/clang-cc/CMakeLists.txt vendor/clang/dist/tools/clang-cc/clang-cc.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/utils/C++Tests/LLVM-Syntax/lit.local.cfg vendor/clang/dist/utils/C++Tests/lit.cfg vendor/clang/dist/utils/ccc-analyzer vendor/clang/dist/utils/scan-build vendor/clang/dist/www/get_started.html vendor/clang/dist/www/hacking.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/CMakeLists.txt Wed Nov 18 14:59:57 2009 (r199482) @@ -94,6 +94,11 @@ install(DIRECTORY include/ add_definitions( -D_GNU_SOURCE ) +option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) +if(CLANG_BUILD_EXAMPLES) + add_subdirectory(examples) +endif () + add_subdirectory(include) add_subdirectory(lib) add_subdirectory(tools) Modified: vendor/clang/dist/Makefile ============================================================================== --- vendor/clang/dist/Makefile Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/Makefile Wed Nov 18 14:59:57 2009 (r199482) @@ -1,6 +1,12 @@ LEVEL = ../.. DIRS := include lib tools docs +PARALLEL_DIRS := + +ifeq ($(BUILD_EXAMPLES),1) + PARALLEL_DIRS += examples +endif + include $(LEVEL)/Makefile.common ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) Modified: vendor/clang/dist/NOTES.txt ============================================================================== --- vendor/clang/dist/NOTES.txt Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/NOTES.txt Wed Nov 18 14:59:57 2009 (r199482) @@ -50,7 +50,7 @@ TODO: File Manager Speedup: //===---------------------------------------------------------------------===// // Specifying targets: -triple and -arch -===---------------------------------------------------------------------===// +//===---------------------------------------------------------------------===// The clang supports "-triple" and "-arch" options. At most one -triple and one -arch option may be specified. Both are optional. Modified: vendor/clang/dist/TODO.txt ============================================================================== --- vendor/clang/dist/TODO.txt Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/TODO.txt Wed Nov 18 14:59:57 2009 (r199482) @@ -66,3 +66,12 @@ More ideas for code modification hints: - If a class member is defined out-of-line but isn't in the class declaration (and there are no close matches!), provide the option to add an in-class declaration. - Fix-it hints for the inclusion of headers when needed for particular features (e.g., for typeid) - Change "foo.bar" to "foo->bar" when "foo" is a pointer. + +//===---------------------------------------------------------------------===// + +Options to support: + -Wfatal-errors + -ftabstop=width + -fpreprocessed mode. + -nostdinc++ + -imultilib Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Wed Nov 18 14:59:57 2009 (r199482) @@ -46,6 +46,9 @@ 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */; }; 1AA1D91810125DE30078DEBC /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */; }; 1ABC36940C7A4BDC006DB0AB /* CGBuiltin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */; }; + 1ADD795410A90C6100741BBA /* TypePrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795110A90C6100741BBA /* TypePrinter.cpp */; }; + 1ADD795510A90C6100741BBA /* TypeLoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795210A90C6100741BBA /* TypeLoc.cpp */; }; + 1ADD795610A90C6100741BBA /* TemplateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795310A90C6100741BBA /* TemplateBase.cpp */; }; 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; 1AE4EE3E103B89ED00888A23 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */; }; 1AE4EE40103B8A0A00888A23 /* TargetABIInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3F103B8A0A00888A23 /* TargetABIInfo.cpp */; }; @@ -362,6 +365,7 @@ 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StmtXML.cpp; path = lib/Frontend/StmtXML.cpp; sourceTree = ""; }; 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Warnings.cpp; path = lib/Frontend/Warnings.cpp; sourceTree = ""; }; 1A30A9E80B93A4C800201A91 /* ExprCXX.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprCXX.h; path = clang/AST/ExprCXX.h; sourceTree = ""; tabWidth = 2; }; + 1A31B27210ACE6DA009E0C8B /* GlobalDecl.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = GlobalDecl.h; path = lib/CodeGen/GlobalDecl.h; sourceTree = ""; tabWidth = 2; }; 1A32C17E0E1C87AD00A6B483 /* ExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ExprConstant.cpp; path = lib/AST/ExprConstant.cpp; sourceTree = ""; tabWidth = 2; }; 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprConstant.cpp; path = lib/CodeGen/CGExprConstant.cpp; sourceTree = ""; tabWidth = 2; }; 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBlocks.cpp; path = lib/CodeGen/CGBlocks.cpp; sourceTree = ""; tabWidth = 2; }; @@ -396,6 +400,9 @@ 1AA1D91710125DE30078DEBC /* RecordLayoutBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = RecordLayoutBuilder.h; path = lib/AST/RecordLayoutBuilder.h; sourceTree = ""; tabWidth = 2; }; 1AB290021045858B00FE33D8 /* PartialDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = PartialDiagnostic.h; sourceTree = ""; tabWidth = 2; }; 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBuiltin.cpp; path = lib/CodeGen/CGBuiltin.cpp; sourceTree = ""; tabWidth = 2; }; + 1ADD795110A90C6100741BBA /* TypePrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypePrinter.cpp; path = lib/AST/TypePrinter.cpp; sourceTree = ""; }; + 1ADD795210A90C6100741BBA /* TypeLoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeLoc.cpp; path = lib/AST/TypeLoc.cpp; sourceTree = ""; }; + 1ADD795310A90C6100741BBA /* TemplateBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateBase.cpp; path = lib/AST/TemplateBase.cpp; sourceTree = ""; }; 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiateDecl.cpp; path = lib/Sema/SemaTemplateInstantiateDecl.cpp; sourceTree = ""; tabWidth = 2; }; 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtProfile.cpp; path = lib/AST/StmtProfile.cpp; sourceTree = ""; tabWidth = 2; }; @@ -1289,6 +1296,7 @@ DE928B7E0C0A615600231DA4 /* CodeGenModule.cpp */, DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */, DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */, + 1A31B27210ACE6DA009E0C8B /* GlobalDecl.h */, 1A2193CC0F45EEB700C0713D /* Mangle.cpp */, 1A2193CD0F45EEB700C0713D /* Mangle.h */, DE928B120C05659200231DA4 /* ModuleBuilder.cpp */, @@ -1385,8 +1393,11 @@ DE34621C0AFEB19B00DBC861 /* StmtPrinter.cpp */, 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */, 35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */, + 1ADD795310A90C6100741BBA /* TemplateBase.cpp */, DEDFF8870F848CF80035BD10 /* TemplateName.cpp */, DE75EDF00B06880E0020CF81 /* Type.cpp */, + 1ADD795210A90C6100741BBA /* TypeLoc.cpp */, + 1ADD795110A90C6100741BBA /* TypePrinter.cpp */, ); name = AST; sourceTree = ""; @@ -1919,6 +1930,9 @@ 1A6C01F7108128710072DEE4 /* CGRtti.cpp in Sources */, 1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */, 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */, + 1ADD795410A90C6100741BBA /* TypePrinter.cpp in Sources */, + 1ADD795510A90C6100741BBA /* TypeLoc.cpp in Sources */, + 1ADD795610A90C6100741BBA /* TemplateBase.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/docs/UsersManual.html ============================================================================== --- vendor/clang/dist/docs/UsersManual.html Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/docs/UsersManual.html Wed Nov 18 14:59:57 2009 (r199482) @@ -126,7 +126,7 @@ reasonably possible, easing migration fr

In addition to language specific features, Clang has a variety of features that depend on what CPU architecture or operating system is being compiled for. -Please see the Target-Specific Features and +Please see the Target-Specific Features and Limitations section for more details.

The rest of the introduction introduces some basic '). + */ + CXCompletionChunk_RightAngle, + /** + * \brief A comma separator (','). + */ + CXCompletionChunk_Comma +}; + +/** + * \brief Callback function that receives a single code-completion result. + * + * This callback will be invoked by \c clang_codeComplete() for each + * code-completion result. + * + * \param completion_result a pointer to the current code-completion result, + * providing one possible completion. The pointer itself is only valid + * during the execution of the completion callback. + * + * \param client_data the client data provided to \c clang_codeComplete(). + */ +typedef void (*CXCompletionIterator)(CXCompletionResult *completion_result, + CXClientData client_data); + +/** + * \brief Determine the kind of a particular chunk within a completion string. + * + * \param completion_string the completion string to query. + * + * \param chunk_number the 0-based index of the chunk in the completion string. + * + * \returns the kind of the chunk at the index \c chunk_number. + */ +CINDEX_LINKAGE enum CXCompletionChunkKind +clang_getCompletionChunkKind(CXCompletionString completion_string, + unsigned chunk_number); + +/** + * \brief Retrieve the text associated with a particular chunk within a + * completion string. + * + * \param completion_string the completion string to query. + * + * \param chunk_number the 0-based index of the chunk in the completion string. + * + * \returns the text associated with the chunk at index \c chunk_number. + */ +CINDEX_LINKAGE const char * +clang_getCompletionChunkText(CXCompletionString completion_string, + unsigned chunk_number); + +/** + * \brief Retrieve the completion string associated with a particular chunk + * within a completion string. + * + * \param completion_string the completion string to query. + * + * \param chunk_number the 0-based index of the chunk in the completion string. + * + * \returns the completion string associated with the chunk at index + * \c chunk_number, or NULL if that chunk is not represented by a completion + * string. + */ +CINDEX_LINKAGE CXCompletionString +clang_getCompletionChunkCompletionString(CXCompletionString completion_string, + unsigned chunk_number); + +/** + * \brief Retrieve the number of chunks in the given code-completion string. + */ +CINDEX_LINKAGE unsigned +clang_getNumCompletionChunks(CXCompletionString completion_string); + +/** + * \brief Perform code completion at a given location in a source file. + * + * This function performs code completion at a particular file, line, and + * column within source code, providing results that suggest potential + * code snippets based on the context of the completion. The basic model + * for code completion is that Clang will parse a complete source file, + * performing syntax checking up to the location where code-completion has + * been requested. At that point, a special code-completion token is passed + * to the parser, which recognizes this token and determines, based on the + * current location in the C/Objective-C/C++ grammar and the state of + * semantic analysis, what completions to provide. These completions are + * enumerated through a callback interface to the client. + * + * Code completion itself is meant to be triggered by the client when the + * user types punctuation characters or whitespace, at which point the + * code-completion location will coincide with the cursor. For example, if \c p + * is a pointer, code-completion might be triggered after the "-" and then + * after the ">" in \c p->. When the code-completion location is afer the ">", + * the completion results will provide, e.g., the members of the struct that + * "p" points to. The client is responsible for placing the cursor at the + * beginning of the token currently being typed, then filtering the results + * based on the contents of the token. For example, when code-completing for + * the expression \c p->get, the client should provide the location just after + * the ">" (e.g., pointing at the "g") to this code-completion hook. Then, the + * client can filter the results based on the current token text ("get"), only + * showing those results that start with "get". The intent of this interface + * is to separate the relatively high-latency acquisition of code-competion + * results from the filtering of results on a per-character basis, which must + * have a lower latency. + * + * \param CIdx the \c CXIndex instance that will be used to perform code + * completion. + * + * \param source_filename the name of the source file that should be parsed + * to perform code-completion. This source file must be the same as or + * include the filename described by \p complete_filename, or no code-completion + * results will be produced. NOTE: One can also specify NULL for this argument if + * the source file is included in command_line_args. + * + * \param num_command_line_args the number of command-line arguments stored in + * \p command_line_args. + * + * \param command_line_args the command-line arguments to pass to the Clang + * compiler to build the given source file. This should include all of the + * necessary include paths, language-dialect switches, precompiled header + * includes, etc., but should not include any information specific to + * code completion. + * + * \param complete_filename the name of the source file where code completion + * should be performed. In many cases, this name will be the same as the + * source filename. However, the completion filename may also be a file + * included by the source file, which is required when producing + * code-completion results for a header. + * + * \param complete_line the line at which code-completion should occur. + * + * \param complete_column the column at which code-completion should occur. + * Note that the column should point just after the syntactic construct that + * initiated code completion, and not in the middle of a lexical token. + * + * \param completion_iterator a callback function that will receive + * code-completion results. + * + * \param client_data client-specific data that will be passed back via the + * code-completion callback function. + */ +CINDEX_LINKAGE void clang_codeComplete(CXIndex CIdx, + const char *source_filename, + int num_command_line_args, + const char **command_line_args, + const char *complete_filename, + unsigned complete_line, + unsigned complete_column, + CXCompletionIterator completion_iterator, + CXClientData client_data); + + #ifdef __cplusplus } #endif Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Wed Nov 18 14:59:57 2009 (r199482) @@ -37,6 +37,7 @@ namespace llvm { namespace clang { class FileManager; class ASTRecordLayout; + class BlockExpr; class Expr; class ExternalASTSource; class IdentifierTable; @@ -55,7 +56,6 @@ namespace clang { class TranslationUnitDecl; class TypeDecl; class TypedefDecl; - class UnresolvedUsingDecl; class UsingDecl; namespace Builtin { class Context; } @@ -204,7 +204,7 @@ class ASTContext { /// /// This mapping will contain an entry that maps from the UsingDecl in /// B to the UnresolvedUsingDecl in B. - llvm::DenseMap + llvm::DenseMap InstantiatedFromUnresolvedUsingDecl; llvm::DenseMap InstantiatedFromUnnamedFieldDecl; @@ -232,7 +232,7 @@ class ASTContext { llvm::DenseMap DeclComments; public: - TargetInfo &Target; + const TargetInfo &Target; IdentifierTable &Idents; SelectorTable &Selectors; Builtin::Context &BuiltinInfo; @@ -284,12 +284,11 @@ public: /// \brief If this using decl is instantiated from an unresolved using decl, /// return it. - UnresolvedUsingDecl *getInstantiatedFromUnresolvedUsingDecl(UsingDecl *UUD); + NamedDecl *getInstantiatedFromUnresolvedUsingDecl(UsingDecl *UUD); /// \brief Note that the using decl \p Inst is an instantiation of /// the unresolved using decl \p Tmpl of a class template. - void setInstantiatedFromUnresolvedUsingDecl(UsingDecl *Inst, - UnresolvedUsingDecl *Tmpl); + void setInstantiatedFromUnresolvedUsingDecl(UsingDecl *Inst, NamedDecl *Tmpl); FieldDecl *getInstantiatedFromUnnamedFieldDecl(FieldDecl *Field); @@ -319,7 +318,7 @@ public: CanQualType UndeducedAutoTy; CanQualType ObjCBuiltinIdTy, ObjCBuiltinClassTy; - ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t, + ASTContext(const LangOptions& LOpts, SourceManager &SM, const TargetInfo &t, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, bool FreeMemory = true, unsigned size_reserve=0); @@ -672,6 +671,10 @@ public: /// declaration. void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S); + /// getObjCEncodingForBlockDecl - Return the encoded type for this block + /// declaration. + void getObjCEncodingForBlock(const BlockExpr *Expr, std::string& S); + /// getObjCEncodingForPropertyDecl - Return the encoded type for /// this method declaration. If non-NULL, Container must be either /// an ObjCCategoryImplDecl or ObjCImplementationDecl; it should @@ -872,9 +875,9 @@ public: /// \brief Determine whether the given types are equivalent after /// cvr-qualifiers have been removed. bool hasSameUnqualifiedType(QualType T1, QualType T2) { - T1 = getCanonicalType(T1); - T2 = getCanonicalType(T2); - return T1.getUnqualifiedType() == T2.getUnqualifiedType(); + CanQualType CT1 = getCanonicalType(T1); + CanQualType CT2 = getCanonicalType(T2); + return CT1.getUnqualifiedType() == CT2.getUnqualifiedType(); } /// \brief Retrieves the "canonical" declaration of @@ -925,6 +928,10 @@ public: /// types, values, and templates. TemplateName getCanonicalTemplateName(TemplateName Name); + /// \brief Determine whether the given template names refer to the same + /// template. + bool hasSameTemplateName(TemplateName X, TemplateName Y); + /// \brief Retrieve the "canonical" template argument. /// /// The canonical template argument is the simplest template argument Modified: vendor/clang/dist/include/clang/AST/Attr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Attr.h Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/include/clang/AST/Attr.h Wed Nov 18 14:59:57 2009 (r199482) @@ -50,6 +50,7 @@ public: Annotate, AsmLabel, // Represent GCC asm label extension. Blocks, + CDecl, Cleanup, Const, Constructor, @@ -442,6 +443,7 @@ DEF_SIMPLE_ATTR(DLLImport); DEF_SIMPLE_ATTR(DLLExport); DEF_SIMPLE_ATTR(FastCall); DEF_SIMPLE_ATTR(StdCall); +DEF_SIMPLE_ATTR(CDecl); DEF_SIMPLE_ATTR(TransparentUnion); DEF_SIMPLE_ATTR(ObjCNSObject); DEF_SIMPLE_ATTR(ObjCException); Modified: vendor/clang/dist/include/clang/AST/CanonicalType.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CanonicalType.h Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/include/clang/AST/CanonicalType.h Wed Nov 18 14:59:57 2009 (r199482) @@ -71,6 +71,9 @@ public: /// \brief Implicit conversion to a qualified type. operator QualType() const { return Stored; } + /// \brief Implicit conversion to bool. + operator bool() const { return !isNull(); } + bool isNull() const { return Stored.isNull(); } @@ -99,22 +102,22 @@ public: CanProxy operator->() const; /// \brief Retrieve all qualifiers. - Qualifiers getQualifiers() const { return Stored.getQualifiers(); } + Qualifiers getQualifiers() const { return Stored.getLocalQualifiers(); } /// \brief Retrieve the const/volatile/restrict qualifiers. - unsigned getCVRQualifiers() const { return Stored.getCVRQualifiers(); } + unsigned getCVRQualifiers() const { return Stored.getLocalCVRQualifiers(); } /// \brief Determines whether this type has any qualifiers - bool hasQualifiers() const { return Stored.hasQualifiers(); } + bool hasQualifiers() const { return Stored.hasLocalQualifiers(); } bool isConstQualified() const { - return Stored.isConstQualified(); + return Stored.isLocalConstQualified(); } bool isVolatileQualified() const { - return Stored.isVolatileQualified(); + return Stored.isLocalVolatileQualified(); } bool isRestrictQualified() const { - return Stored.isRestrictQualified(); + return Stored.isLocalRestrictQualified(); } /// \brief Retrieve the unqualified form of this type. @@ -635,7 +638,7 @@ struct CanProxyAdaptor inline CanQual CanQual::getUnqualifiedType() const { - return CanQual::CreateUnsafe(Stored.getUnqualifiedType()); + return CanQual::CreateUnsafe(Stored.getLocalUnqualifiedType()); } template Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/include/clang/AST/Decl.h Wed Nov 18 14:59:57 2009 (r199482) @@ -232,6 +232,7 @@ public: void setOriginalNamespace(NamespaceDecl *ND) { OrigNamespace = ND; } virtual NamespaceDecl *getCanonicalDecl() { return OrigNamespace; } + const NamespaceDecl *getCanonicalDecl() const { return OrigNamespace; } virtual SourceRange getSourceRange() const { return SourceRange(getLocation(), RBracLoc); @@ -552,6 +553,9 @@ public: } virtual VarDecl *getCanonicalDecl(); + const VarDecl *getCanonicalDecl() const { + return const_cast(this)->getCanonicalDecl(); + } /// hasLocalStorage - Returns true if a variable with function scope /// is a non-static local variable. @@ -1424,6 +1428,9 @@ public: virtual SourceRange getSourceRange() const; virtual TagDecl* getCanonicalDecl(); + const TagDecl* getCanonicalDecl() const { + return const_cast(this)->getCanonicalDecl(); + } /// isDefinition - Return true if this decl has its body specified. bool isDefinition() const { @@ -1515,6 +1522,9 @@ public: EnumDecl *getCanonicalDecl() { return cast(TagDecl::getCanonicalDecl()); } + const EnumDecl *getCanonicalDecl() const { + return cast(TagDecl::getCanonicalDecl()); + } static EnumDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Wed Nov 18 14:59:57 2009 (r199482) @@ -79,9 +79,11 @@ public: /// namespaces, labels, tags, members and ordinary /// identifiers. These are meant as bitmasks, so that searches in /// C++ can look into the "tag" namespace during ordinary lookup. We - /// use additional namespaces for Objective-C entities. We also - /// put C++ friend declarations (of previously-undeclared entities) in - /// shadow namespaces. + /// use additional namespaces for Objective-C entities. We also put + /// C++ friend declarations (of previously-undeclared entities) in + /// shadow namespaces, and 'using' declarations (as opposed to their + /// implicit shadow declarations) can be found in their own + /// namespace. enum IdentifierNamespace { IDNS_Label = 0x1, IDNS_Tag = 0x2, @@ -91,7 +93,8 @@ public: IDNS_ObjCImplementation = 0x20, IDNS_ObjCCategoryImpl = 0x40, IDNS_OrdinaryFriend = 0x80, - IDNS_TagFriend = 0x100 + IDNS_TagFriend = 0x100, + IDNS_Using = 0x200 }; /// ObjCDeclQualifier - Qualifier used on types in method declarations Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Wed Nov 18 14:58:34 2009 (r199481) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Wed Nov 18 14:59:57 2009 (r199482) @@ -432,6 +432,9 @@ public: virtual CXXRecordDecl *getCanonicalDecl() { return cast(RecordDecl::getCanonicalDecl()); } + virtual const CXXRecordDecl *getCanonicalDecl() const { + return cast(RecordDecl::getCanonicalDecl()); + } static CXXRecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, @@ -768,7 +771,7 @@ public: /// \param Base the base class we are searching for. /// /// \returns true if this class is derived from Base, false otherwise. - bool isDerivedFrom(CXXRecordDecl *Base); + bool isDerivedFrom(CXXRecordDecl *Base) const; /// \brief Determine whether this class is derived from the type \p Base. /// @@ -786,7 +789,7 @@ public: /// /// \todo add a separate paramaeter to configure IsDerivedFrom, rather than /// tangling input and output in \p Paths - bool isDerivedFrom(CXXRecordDecl *Base, CXXBasePaths &Paths); + bool isDerivedFrom(CXXRecordDecl *Base, CXXBasePaths &Paths) const; /// \brief Function type used by lookupInBases() to determine whether a /// specific base class subobject matches the lookup criteria. @@ -801,7 +804,7 @@ public: /// lookupInBases(). /// /// \returns true if this base matched the search criteria, false otherwise. - typedef bool BaseMatchesCallback(CXXBaseSpecifier *Specifier, + typedef bool BaseMatchesCallback(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, void *UserData); @@ -826,7 +829,7 @@ public: /// \returns true if there exists any path from this class to a base class /// subobject that matches the search criteria. bool lookupInBases(BaseMatchesCallback *BaseMatches, void *UserData, - CXXBasePaths &Paths); + CXXBasePaths &Paths) const; /// \brief Base-class lookup callback that determines whether the given /// base class specifier refers to a specific class declaration. @@ -835,8 +838,8 @@ public: /// a given derived class has is a base class subobject of a particular type. /// The user data pointer should refer to the canonical CXXRecordDecl of the /// base class that we are searching for. - static bool FindBaseClass(CXXBaseSpecifier *Specifier, CXXBasePath &Path, - void *BaseRecord); + static bool FindBaseClass(const CXXBaseSpecifier *Specifier, + CXXBasePath &Path, void *BaseRecord); /// \brief Base-class lookup callback that determines whether there exists /// a tag with the given name. @@ -844,8 +847,8 @@ public: /// This callback can be used with \c lookupInBases() to find tag members /// of the given name within a C++ class hierarchy. The user data pointer /// is an opaque \c DeclarationName pointer. - static bool FindTagMember(CXXBaseSpecifier *Specifier, CXXBasePath &Path, - void *Name); + static bool FindTagMember(const CXXBaseSpecifier *Specifier, + CXXBasePath &Path, void *Name); /// \brief Base-class lookup callback that determines whether there exists /// a member with the given name. @@ -853,8 +856,8 @@ public: /// This callback can be used with \c lookupInBases() to find members /// of the given name within a C++ class hierarchy. The user data pointer /// is an opaque \c DeclarationName pointer. - static bool FindOrdinaryMember(CXXBaseSpecifier *Specifier, CXXBasePath &Path, - void *Name); + static bool FindOrdinaryMember(const CXXBaseSpecifier *Specifier, + CXXBasePath &Path, void *Name); /// \brief Base-class lookup callback that determines whether there exists /// a member with the given name that can be used in a nested-name-specifier. @@ -862,7 +865,7 @@ public: /// This callback can be used with \c lookupInBases() to find membes of /// the given name within a C++ class hierarchy that can occur within /// nested-name-specifiers. - static bool FindNestedNameSpecifierMember(CXXBaseSpecifier *Specifier, + static bool FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, void *UserData); @@ -1244,6 +1247,11 @@ public: /// used for user-defined conversions. bool isConvertingConstructor(bool AllowExplicit) const; + /// \brief Determine whether this is a member template specialization that + /// looks like a copy constructor. Such constructors are never used to copy + /// an object. + bool isCopyConstructorLikeSpecialization() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return D->getKind() == CXXConstructor; @@ -1261,13 +1269,6 @@ public: /// }; /// @endcode class CXXDestructorDecl : public CXXMethodDecl { -public: - enum KindOfObjectToDestroy { - VBASE = 0x1, - DRCTNONVBASE = 0x2, - ANYBASE = 0x3 - }; -private: /// ImplicitlyDefined - Whether this destructor was implicitly /// defined by the compiler. When false, the destructor was defined /// by the user. In C++03, this flag will have the same value as @@ -1276,24 +1277,15 @@ private: /// @c !Implicit && ImplicitlyDefined. bool ImplicitlyDefined : 1; - /// Support for base and member destruction. - /// BaseOrMemberDestructions - The arguments used to destruct the base - /// or member. Each uintptr_t value represents one of base classes (either - /// virtual or direct non-virtual base), or non-static data member - /// to be destroyed. The low two bits encode the kind of object - /// being destroyed. - uintptr_t *BaseOrMemberDestructions; - unsigned NumBaseOrMemberDestructions; - + FunctionDecl *OperatorDelete; + CXXDestructorDecl(CXXRecordDecl *RD, SourceLocation L, DeclarationName N, QualType T, bool isInline, bool isImplicitlyDeclared) : CXXMethodDecl(CXXDestructor, RD, L, N, T, /*DInfo=*/0, false, isInline), - ImplicitlyDefined(false), - BaseOrMemberDestructions(0), NumBaseOrMemberDestructions(0) { + ImplicitlyDefined(false), OperatorDelete(0) { setImplicit(isImplicitlyDeclared); } - virtual void Destroy(ASTContext& C); public: static CXXDestructorDecl *Create(ASTContext &C, CXXRecordDecl *RD, @@ -1319,95 +1311,8 @@ public: ImplicitlyDefined = ID; } - /// destr_iterator - Iterates through the member/base destruction list. - - /// destr_const_iterator - Iterates through the member/base destruction list. - typedef uintptr_t const destr_const_iterator; - - /// destr_begin() - Retrieve an iterator to the first destructed member/base. - uintptr_t* destr_begin() { - return BaseOrMemberDestructions; - } - /// destr_begin() - Retrieve an iterator to the first destructed member/base. - uintptr_t* destr_begin() const { - return BaseOrMemberDestructions; - } - - /// destr_end() - Retrieve an iterator past the last destructed member/base. - uintptr_t* destr_end() { - return BaseOrMemberDestructions + NumBaseOrMemberDestructions; - } - /// destr_end() - Retrieve an iterator past the last destructed member/base. - uintptr_t* destr_end() const { - return BaseOrMemberDestructions + NumBaseOrMemberDestructions; - } - - /// getNumBaseOrMemberDestructions - Number of base and non-static members - /// to destroy. - unsigned getNumBaseOrMemberDestructions() const { - return NumBaseOrMemberDestructions; - } - - /// setNumBaseOrMemberDestructions - Set number of base and non-static members - /// to destroy. - void setNumBaseOrMemberDestructions(unsigned numBaseOrMemberDestructions) { - NumBaseOrMemberDestructions = numBaseOrMemberDestructions; - } - - /// getBaseOrMemberToDestroy - get the generic 'member' representing either - /// the field or a base class. - uintptr_t* getBaseOrMemberToDestroy() const { - return BaseOrMemberDestructions; - } - - /// setBaseOrMemberToDestroy - set the generic 'member' representing either - /// the field or a base class. - void setBaseOrMemberDestructions(uintptr_t* baseOrMemberDestructions) { - BaseOrMemberDestructions = baseOrMemberDestructions; - } - - /// isVbaseToDestroy - returns true, if object is virtual base. - bool isVbaseToDestroy(uintptr_t Vbase) const { - return (Vbase & VBASE) != 0; - } - /// isDirectNonVBaseToDestroy - returns true, if object is direct non-virtual - /// base. - bool isDirectNonVBaseToDestroy(uintptr_t DrctNonVbase) const { - return (DrctNonVbase & DRCTNONVBASE) != 0; - } - /// isAnyBaseToDestroy - returns true, if object is any base (virtual or - /// direct non-virtual) - bool isAnyBaseToDestroy(uintptr_t AnyBase) const { - return (AnyBase & ANYBASE) != 0; - } - /// isMemberToDestroy - returns true if object is a non-static data member. - bool isMemberToDestroy(uintptr_t Member) const { - return (Member & ANYBASE) == 0; - } - /// getAnyBaseClassToDestroy - Get the type for the given base class object. - Type *getAnyBaseClassToDestroy(uintptr_t Base) const { - if (isAnyBaseToDestroy(Base)) - return reinterpret_cast(Base & ~0x03); - return 0; - } - /// getMemberToDestroy - Get the member for the given object. - FieldDecl *getMemberToDestroy(uintptr_t Member) const { - if (isMemberToDestroy(Member)) - return reinterpret_cast(Member); - return 0; - } - /// getVbaseClassToDestroy - Get the virtual base. - Type *getVbaseClassToDestroy(uintptr_t Vbase) const { - if (isVbaseToDestroy(Vbase)) - return reinterpret_cast(Vbase & ~0x01); - return 0; - } - /// getDirectNonVBaseClassToDestroy - Get the virtual base. - Type *getDirectNonVBaseClassToDestroy(uintptr_t Base) const { - if (isDirectNonVBaseToDestroy(Base)) - return reinterpret_cast(Base & ~0x02); - return 0; - } + void setOperatorDelete(FunctionDecl *OD) { OperatorDelete = OD; } + const FunctionDecl *getOperatorDelete() const { return OperatorDelete; } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { @@ -1739,6 +1644,56 @@ public: static bool classof(const NamespaceAliasDecl *D) { return true; } }; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 15:12:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 014BA106566C; Wed, 18 Nov 2009 15:12:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C7CF08FC1B; Wed, 18 Nov 2009 15:12:17 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 67FA046B53; Wed, 18 Nov 2009 10:12:17 -0500 (EST) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 6F7A98A020; Wed, 18 Nov 2009 10:12:16 -0500 (EST) From: John Baldwin To: Jilles Tjoelker Date: Wed, 18 Nov 2009 08:41:54 -0500 User-Agent: KMail/1.9.7 References: <4B01E548.7040708@gmail.com> <20091117182501.GA70742@stack.nl> In-Reply-To: <20091117182501.GA70742@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200911180841.55183.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 18 Nov 2009 10:12:16 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Dmitry Pryanishnikov , svn-src-all@freebsd.org, src-committers@freebsd.org, Edwin Groothuis Subject: Re: svn commit: r194783 - head/lib/libc/stdtime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 15:12:18 -0000 On Tuesday 17 November 2009 1:25:01 pm Jilles Tjoelker wrote: > On Tue, Nov 17, 2009 at 01:50:32AM +0200, Dmitry Pryanishnikov wrote: > > > Author: edwin > > > Date: Tue Jun 23 22:28:44 2009 > > > New Revision: 194783 > > > URL: http://svn.freebsd.org/changeset/base/194783 > > > > Log: > > > Remove duplicate if-statement on gmt_is_set in gmtsub(). > > > > MFC after: 1 week > > > > Modified: > > > head/lib/libc/stdtime/localtime.c > > > This change looks like a (small?) pessimization to me: before it, > > _MUTEX_LOCK/_MUTEX_UNLOCK pair would be skipped for the case gmt_is_set > > == TRUE (all invocations except the first one), now it won't. I'm not > > sure whether this is critical here though... > > It is certainly less efficient, but the old code was (most likely) > wrong. It used an idiom known as "double checked locking", which is > incorrect in most memory models. The problem is that the store to > gmt_is_set may become visible without stores to other memory (gmtptr and > what it points to) becoming visible. That is easily fixed with a memory barrier. Just use atomic_store_rel() to set gmt_is_set at the end of the setup phase. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 15:35:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91CCF106566B; Wed, 18 Nov 2009 15:35:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801158FC21; Wed, 18 Nov 2009 15:35:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIFZ3Dv076261; Wed, 18 Nov 2009 15:35:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIFZ3kk076259; Wed, 18 Nov 2009 15:35:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200911181535.nAIFZ3kk076259@svn.freebsd.org> From: Michael Tuexen Date: Wed, 18 Nov 2009 15:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199484 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 15:35:03 -0000 Author: tuexen Date: Wed Nov 18 15:35:03 2009 New Revision: 199484 URL: http://svn.freebsd.org/changeset/base/199484 Log: MFC 199477 Fix a bug where the system panics when a SHUTDOWN is received with an illegal TSN. This bug was reported by Irene Ruengeler. Approved by: re, rrs (mentor) Modified: stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Wed Nov 18 15:14:47 2009 (r199483) +++ stable/8/sys/netinet/sctp_input.c Wed Nov 18 15:35:03 2009 (r199484) @@ -834,6 +834,9 @@ sctp_handle_shutdown(struct sctp_shutdow return; } else { sctp_update_acked(stcb, cp, net, abort_flag); + if (*abort_flag) { + return; + } } if (asoc->control_pdapi) { /* From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 18:05:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CB1B106568F; Wed, 18 Nov 2009 18:05:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F04C18FC28; Wed, 18 Nov 2009 18:05:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAII5sHI079488; Wed, 18 Nov 2009 18:05:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAII5s1J079483; Wed, 18 Nov 2009 18:05:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911181805.nAII5s1J079483@svn.freebsd.org> From: Alan Cox Date: Wed, 18 Nov 2009 18:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199490 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 18:05:55 -0000 Author: alc Date: Wed Nov 18 18:05:54 2009 New Revision: 199490 URL: http://svn.freebsd.org/changeset/base/199490 Log: Simplify both the invocation and the implementation of vm_fault() for wiring pages. (Note: Claims made in the comments about the handling of breakpoints in wired pages have been false for roughly a decade. This and another bug involving breakpoints will be fixed in coming changes.) Reviewed by: kib Modified: head/sys/vm/vm_extern.h head/sys/vm/vm_fault.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Wed Nov 18 17:51:54 2009 (r199489) +++ head/sys/vm/vm_extern.h Wed Nov 18 18:05:54 2009 (r199490) @@ -58,7 +58,7 @@ int vm_fault(vm_map_t, vm_offset_t, vm_p void vm_fault_copy_entry(vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t, vm_ooffset_t *); void vm_fault_unwire(vm_map_t, vm_offset_t, vm_offset_t, boolean_t); -int vm_fault_wire(vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t); +int vm_fault_wire(vm_map_t, vm_offset_t, vm_offset_t, boolean_t); int vm_forkproc(struct thread *, struct proc *, struct thread *, struct vmspace *, int); void vm_waitproc(struct proc *); int vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, objtype_t, void *, vm_ooffset_t); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Nov 18 17:51:54 2009 (r199489) +++ head/sys/vm/vm_fault.c Wed Nov 18 18:05:54 2009 (r199490) @@ -185,7 +185,7 @@ unlock_and_deallocate(struct faultstate * default objects are zero-fill, there is no real pager. */ #define TRYPAGER (fs.object->type != OBJT_DEFAULT && \ - (((fault_flags & VM_FAULT_WIRE_MASK) == 0) || wired)) + ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 || wired)) /* * vm_fault: @@ -238,31 +238,15 @@ RetryFault:; result = vm_map_lookup(&fs.map, vaddr, fault_type, &fs.entry, &fs.first_object, &fs.first_pindex, &prot, &wired); if (result != KERN_SUCCESS) { - if (result != KERN_PROTECTION_FAILURE || - (fault_flags & VM_FAULT_WIRE_MASK) != VM_FAULT_USER_WIRE) { - if (growstack && result == KERN_INVALID_ADDRESS && - map != kernel_map && curproc != NULL) { - result = vm_map_growstack(curproc, vaddr); - if (result != KERN_SUCCESS) - return (KERN_FAILURE); - growstack = FALSE; - goto RetryFault; - } - return (result); + if (growstack && result == KERN_INVALID_ADDRESS && + map != kernel_map) { + result = vm_map_growstack(curproc, vaddr); + if (result != KERN_SUCCESS) + return (KERN_FAILURE); + growstack = FALSE; + goto RetryFault; } - - /* - * If we are user-wiring a r/w segment, and it is COW, then - * we need to do the COW operation. Note that we don't COW - * currently RO sections now, because it is NOT desirable - * to COW .text. We simply keep .text from ever being COW'ed - * and take the heat that one cannot debug wired .text sections. - */ - result = vm_map_lookup(&fs.map, vaddr, - VM_PROT_READ|VM_PROT_WRITE|VM_PROT_OVERRIDE_WRITE, - &fs.entry, &fs.first_object, &fs.first_pindex, &prot, &wired); - if (result != KERN_SUCCESS) - return (result); + return (result); } map_generation = fs.map->timestamp; @@ -919,9 +903,8 @@ vnode_locked: * won't find it (yet). */ pmap_enter(fs.map->pmap, vaddr, fault_type, fs.m, prot, wired); - if (((fault_flags & VM_FAULT_WIRE_MASK) == 0) && (wired == 0)) { + if ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0) vm_fault_prefault(fs.map->pmap, vaddr, fs.entry); - } VM_OBJECT_LOCK(fs.object); vm_page_lock_queues(); vm_page_flag_set(fs.m, PG_REFERENCED); @@ -930,7 +913,7 @@ vnode_locked: * If the page is not wired down, then put it where the pageout daemon * can find it. */ - if (fault_flags & VM_FAULT_WIRE_MASK) { + if (fault_flags & VM_FAULT_CHANGE_WIRING) { if (wired) vm_page_wire(fs.m); else @@ -1048,7 +1031,7 @@ vm_fault_quick(caddr_t v, int prot) */ int vm_fault_wire(vm_map_t map, vm_offset_t start, vm_offset_t end, - boolean_t user_wire, boolean_t fictitious) + boolean_t fictitious) { vm_offset_t va; int rv; @@ -1059,9 +1042,7 @@ vm_fault_wire(vm_map_t map, vm_offset_t * read-only sections. */ for (va = start; va < end; va += PAGE_SIZE) { - rv = vm_fault(map, va, - user_wire ? VM_PROT_READ : VM_PROT_READ | VM_PROT_WRITE, - user_wire ? VM_FAULT_USER_WIRE : VM_FAULT_CHANGE_WIRING); + rv = vm_fault(map, va, VM_PROT_NONE, VM_FAULT_CHANGE_WIRING); if (rv) { if (va != start) vm_fault_unwire(map, start, va, fictitious); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Nov 18 17:51:54 2009 (r199489) +++ head/sys/vm/vm_map.c Wed Nov 18 18:05:54 2009 (r199490) @@ -2381,7 +2381,7 @@ vm_map_wire(vm_map_t map, vm_offset_t st */ vm_map_unlock(map); rv = vm_fault_wire(map, saved_start, saved_end, - user_wire, fictitious); + fictitious); vm_map_lock(map); if (last_timestamp + 1 != map->timestamp) { /* @@ -3563,7 +3563,7 @@ RetryLookup:; else prot = entry->protection; fault_type &= (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); - if ((fault_type & prot) != fault_type) { + if ((fault_type & prot) != fault_type || prot == VM_PROT_NONE) { vm_map_unlock_read(map); return (KERN_PROTECTION_FAILURE); } Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Wed Nov 18 17:51:54 2009 (r199489) +++ head/sys/vm/vm_map.h Wed Nov 18 18:05:54 2009 (r199490) @@ -319,8 +319,6 @@ long vmspace_wired_count(struct vmspace */ #define VM_FAULT_NORMAL 0 /* Nothing special */ #define VM_FAULT_CHANGE_WIRING 1 /* Change the wiring as appropriate */ -#define VM_FAULT_USER_WIRE 2 /* Likewise, but for user purposes */ -#define VM_FAULT_WIRE_MASK (VM_FAULT_CHANGE_WIRING|VM_FAULT_USER_WIRE) #define VM_FAULT_DIRTY 8 /* Dirty the page */ /* From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 18:48:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF34D106566C; Wed, 18 Nov 2009 18:48:18 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C60318FC13; Wed, 18 Nov 2009 18:48:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIImITo080568; Wed, 18 Nov 2009 18:48:18 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIImIEG080565; Wed, 18 Nov 2009 18:48:18 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911181848.nAIImIEG080565@svn.freebsd.org> From: Rui Paulo Date: Wed, 18 Nov 2009 18:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199491 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 18:48:19 -0000 Author: rpaulo Date: Wed Nov 18 18:48:18 2009 New Revision: 199491 URL: http://svn.freebsd.org/changeset/base/199491 Log: Add WorldB SKU. Reviewed by: sam MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.c Wed Nov 18 18:05:54 2009 (r199490) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Wed Nov 18 18:48:18 2009 (r199491) @@ -170,6 +170,7 @@ enum { WOR9_WORLD = 0x69, /* World9 (WO9 SKU) */ WORA_WORLD = 0x6A, /* WorldA (WOA SKU) */ + WORB_WORLD = 0x6B, /* WorldB (WOB SKU) */ MKK3_MKKB = 0x80, /* Japan UNI-1 even + MKKB */ MKK3_MKKA2 = 0x81, /* Japan UNI-1 even + MKKA2 */ @@ -432,6 +433,7 @@ static REG_DMN_PAIR_MAPPING regDomainPai {EU1_WORLD, EU1_WORLD, EU1_WORLD, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {WOR9_WORLD, WOR9_WORLD, WOR9_WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {WORA_WORLD, WORA_WORLD, WORA_WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, + {WORB_WORLD, WORB_WORLD, WORB_WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, }; /* @@ -1681,6 +1683,31 @@ static REG_DOMAIN regDomains[] = { WG1_2467_2467), .chan11g_turbo = BM1(T3_2437_2437)}, + {.regDmnEnum = WORB_WORLD, + .conformanceTestLimit = NO_CTL, + .dfsMask = DFS_FCC3 | DFS_ETSI, + .pscan = PSCAN_WWR, + .flags = DISALLOW_ADHOC_11A, + .chan11a = BM4(W1_5260_5320, + W1_5180_5240, + W1_5745_5825, + W1_5500_5700), + .chan11b = BM7(W1_2412_2412, + W1_2437_2442, + W1_2462_2462, + W1_2472_2472, + W1_2417_2432, + W1_2447_2457, + W1_2467_2467), + .chan11g = BM7(WG1_2412_2412, + WG1_2437_2442, + WG1_2462_2462, + WG1_2472_2472, + WG1_2417_2432, + WG1_2447_2457, + WG1_2467_2467), + .chan11g_turbo = BM1(T3_2437_2437)}, + {.regDmnEnum = NULL1, .conformanceTestLimit = NO_CTL, } From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 19:26:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D3B91065670; Wed, 18 Nov 2009 19:26:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF428FC0A; Wed, 18 Nov 2009 19:26:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIJQHsb081478; Wed, 18 Nov 2009 19:26:17 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAIJQHOR081471; Wed, 18 Nov 2009 19:26:17 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911181926.nAIJQHOR081471@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 18 Nov 2009 19:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199492 - in head/sys: amd64/amd64 i386/i386 net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 19:26:17 -0000 Author: jkim Date: Wed Nov 18 19:26:17 2009 New Revision: 199492 URL: http://svn.freebsd.org/changeset/base/199492 Log: - Make BPF JIT compiler working again in userland. We are limiting size of generated native binary to page size for now. - Update copyright date and fix some style nits. Modified: head/sys/amd64/amd64/bpf_jit_machdep.c head/sys/amd64/amd64/bpf_jit_machdep.h head/sys/i386/i386/bpf_jit_machdep.c head/sys/i386/i386/bpf_jit_machdep.h head/sys/net/bpf_jitter.c head/sys/net/bpf_jitter.h Modified: head/sys/amd64/amd64/bpf_jit_machdep.c ============================================================================== --- head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 18:48:18 2009 (r199491) +++ head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 19:26:17 2009 (r199492) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim + * Copyright (C) 2005-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include #else #include +#include +#include #endif #include @@ -97,9 +99,9 @@ emit_code(bpf_bin_stream *stream, u_int bpf_filter_func bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) { + bpf_bin_stream stream; struct bpf_insn *ins; u_int i, pass; - bpf_bin_stream stream; /* * NOTE: do not modify the name of this variable, as it's used by @@ -475,20 +477,31 @@ bpf_jit_compile(struct bpf_insn *prog, u } pass++; - if (pass == 2) + if (pass >= 2) { +#ifndef _KERNEL + if (mprotect(stream.ibuf, stream.cur_ip, + PROT_READ | PROT_EXEC) != 0) { + munmap(stream.ibuf, BPF_JIT_MAXSIZE); + stream.ibuf = NULL; + } +#endif break; + } #ifdef _KERNEL stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); - if (stream.ibuf == NULL) { - free(stream.refs, M_BPFJIT); - return (NULL); - } + if (stream.ibuf == NULL) + break; #else - stream.ibuf = (char *)malloc(stream.cur_ip); - if (stream.ibuf == NULL) { - free(stream.refs); - return (NULL); + if (stream.cur_ip > BPF_JIT_MAXSIZE) { + stream.ibuf = NULL; + break; + } + stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, + PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); + if (stream.ibuf == MAP_FAILED) { + stream.ibuf = NULL; + break; } #endif Modified: head/sys/amd64/amd64/bpf_jit_machdep.h ============================================================================== --- head/sys/amd64/amd64/bpf_jit_machdep.h Wed Nov 18 18:48:18 2009 (r199491) +++ head/sys/amd64/amd64/bpf_jit_machdep.h Wed Nov 18 19:26:17 2009 (r199492) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim + * Copyright (C) 2005-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/i386/i386/bpf_jit_machdep.c ============================================================================== --- head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 18:48:18 2009 (r199491) +++ head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 19:26:17 2009 (r199492) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim + * Copyright (C) 2005-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include #else #include +#include +#include #endif #include @@ -97,9 +99,9 @@ emit_code(bpf_bin_stream *stream, u_int bpf_filter_func bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) { + bpf_bin_stream stream; struct bpf_insn *ins; u_int i, pass; - bpf_bin_stream stream; /* * NOTE: do not modify the name of this variable, as it's used by @@ -498,20 +500,31 @@ bpf_jit_compile(struct bpf_insn *prog, u } pass++; - if (pass == 2) + if (pass >= 2) { +#ifndef _KERNEL + if (mprotect(stream.ibuf, stream.cur_ip, + PROT_READ | PROT_EXEC) != 0) { + munmap(stream.ibuf, BPF_JIT_MAXSIZE); + stream.ibuf = NULL; + } +#endif break; + } #ifdef _KERNEL stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); - if (stream.ibuf == NULL) { - free(stream.refs, M_BPFJIT); - return (NULL); - } + if (stream.ibuf == NULL) + break; #else - stream.ibuf = (char *)malloc(stream.cur_ip); - if (stream.ibuf == NULL) { - free(stream.refs); - return (NULL); + if (stream.cur_ip > BPF_JIT_MAXSIZE) { + stream.ibuf = NULL; + break; + } + stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, + PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); + if (stream.ibuf == MAP_FAILED) { + stream.ibuf = NULL; + break; } #endif Modified: head/sys/i386/i386/bpf_jit_machdep.h ============================================================================== --- head/sys/i386/i386/bpf_jit_machdep.h Wed Nov 18 18:48:18 2009 (r199491) +++ head/sys/i386/i386/bpf_jit_machdep.h Wed Nov 18 19:26:17 2009 (r199492) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim + * Copyright (C) 2005-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/net/bpf_jitter.c ============================================================================== --- head/sys/net/bpf_jitter.c Wed Nov 18 18:48:18 2009 (r199491) +++ head/sys/net/bpf_jitter.c Wed Nov 18 19:26:17 2009 (r199492) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim + * Copyright (C) 2005-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #else #include #include +#include +#include #include #endif @@ -127,7 +129,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f { if (filter->func != bpf_jit_accept_all) - free(filter->func); + munmap(filter->func, BPF_JIT_MAXSIZE); free(filter); } #endif Modified: head/sys/net/bpf_jitter.h ============================================================================== --- head/sys/net/bpf_jitter.h Wed Nov 18 18:48:18 2009 (r199491) +++ head/sys/net/bpf_jitter.h Wed Nov 18 19:26:17 2009 (r199492) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim + * Copyright (C) 2005-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +36,8 @@ #ifdef _KERNEL MALLOC_DECLARE(M_BPFJIT); +#else +#define BPF_JIT_MAXSIZE PAGE_SIZE #endif extern int bpf_jitter_enable; From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 22:39:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7601A1065694; Wed, 18 Nov 2009 22:39:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF568FC18; Wed, 18 Nov 2009 22:39:07 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 7C4BB46B03; Wed, 18 Nov 2009 17:39:06 -0500 (EST) Date: Wed, 18 Nov 2009 22:39:06 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jung-uk Kim In-Reply-To: <200911181926.nAIJQHOR081471@svn.freebsd.org> Message-ID: References: <200911181926.nAIJQHOR081471@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199492 - in head/sys: amd64/amd64 i386/i386 net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 22:39:07 -0000 On Wed, 18 Nov 2009, Jung-uk Kim wrote: > Author: jkim > Date: Wed Nov 18 19:26:17 2009 > New Revision: 199492 > URL: http://svn.freebsd.org/changeset/base/199492 > > Log: > - Make BPF JIT compiler working again in userland. We are limiting size of > generated native binary to page size for now. > - Update copyright date and fix some style nits. I'm not sure if you have noticed, but there are a bunch of embedded target ports of the BPF JIT in the PR collection -- ARM, MIPS, etc. Any chance we might see those integrated into 9.x at some point? The less cache-rich CPUs are especially helped by JIT parts. Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > head/sys/amd64/amd64/bpf_jit_machdep.c > head/sys/amd64/amd64/bpf_jit_machdep.h > head/sys/i386/i386/bpf_jit_machdep.c > head/sys/i386/i386/bpf_jit_machdep.h > head/sys/net/bpf_jitter.c > head/sys/net/bpf_jitter.h > > Modified: head/sys/amd64/amd64/bpf_jit_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 18:48:18 2009 (r199491) > +++ head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 19:26:17 2009 (r199492) > @@ -1,6 +1,6 @@ > /*- > * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) > - * Copyright (C) 2005-2008 Jung-uk Kim > + * Copyright (C) 2005-2009 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); > #include > #else > #include > +#include > +#include > #endif > > #include > @@ -97,9 +99,9 @@ emit_code(bpf_bin_stream *stream, u_int > bpf_filter_func > bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) > { > + bpf_bin_stream stream; > struct bpf_insn *ins; > u_int i, pass; > - bpf_bin_stream stream; > > /* > * NOTE: do not modify the name of this variable, as it's used by > @@ -475,20 +477,31 @@ bpf_jit_compile(struct bpf_insn *prog, u > } > > pass++; > - if (pass == 2) > + if (pass >= 2) { > +#ifndef _KERNEL > + if (mprotect(stream.ibuf, stream.cur_ip, > + PROT_READ | PROT_EXEC) != 0) { > + munmap(stream.ibuf, BPF_JIT_MAXSIZE); > + stream.ibuf = NULL; > + } > +#endif > break; > + } > > #ifdef _KERNEL > stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); > - if (stream.ibuf == NULL) { > - free(stream.refs, M_BPFJIT); > - return (NULL); > - } > + if (stream.ibuf == NULL) > + break; > #else > - stream.ibuf = (char *)malloc(stream.cur_ip); > - if (stream.ibuf == NULL) { > - free(stream.refs); > - return (NULL); > + if (stream.cur_ip > BPF_JIT_MAXSIZE) { > + stream.ibuf = NULL; > + break; > + } > + stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, > + PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); > + if (stream.ibuf == MAP_FAILED) { > + stream.ibuf = NULL; > + break; > } > #endif > > > Modified: head/sys/amd64/amd64/bpf_jit_machdep.h > ============================================================================== > --- head/sys/amd64/amd64/bpf_jit_machdep.h Wed Nov 18 18:48:18 2009 (r199491) > +++ head/sys/amd64/amd64/bpf_jit_machdep.h Wed Nov 18 19:26:17 2009 (r199492) > @@ -1,6 +1,6 @@ > /*- > * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) > - * Copyright (C) 2005-2008 Jung-uk Kim > + * Copyright (C) 2005-2009 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > > Modified: head/sys/i386/i386/bpf_jit_machdep.c > ============================================================================== > --- head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 18:48:18 2009 (r199491) > +++ head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 19:26:17 2009 (r199492) > @@ -1,6 +1,6 @@ > /*- > * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) > - * Copyright (C) 2005-2008 Jung-uk Kim > + * Copyright (C) 2005-2009 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); > #include > #else > #include > +#include > +#include > #endif > > #include > @@ -97,9 +99,9 @@ emit_code(bpf_bin_stream *stream, u_int > bpf_filter_func > bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) > { > + bpf_bin_stream stream; > struct bpf_insn *ins; > u_int i, pass; > - bpf_bin_stream stream; > > /* > * NOTE: do not modify the name of this variable, as it's used by > @@ -498,20 +500,31 @@ bpf_jit_compile(struct bpf_insn *prog, u > } > > pass++; > - if (pass == 2) > + if (pass >= 2) { > +#ifndef _KERNEL > + if (mprotect(stream.ibuf, stream.cur_ip, > + PROT_READ | PROT_EXEC) != 0) { > + munmap(stream.ibuf, BPF_JIT_MAXSIZE); > + stream.ibuf = NULL; > + } > +#endif > break; > + } > > #ifdef _KERNEL > stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); > - if (stream.ibuf == NULL) { > - free(stream.refs, M_BPFJIT); > - return (NULL); > - } > + if (stream.ibuf == NULL) > + break; > #else > - stream.ibuf = (char *)malloc(stream.cur_ip); > - if (stream.ibuf == NULL) { > - free(stream.refs); > - return (NULL); > + if (stream.cur_ip > BPF_JIT_MAXSIZE) { > + stream.ibuf = NULL; > + break; > + } > + stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, > + PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); > + if (stream.ibuf == MAP_FAILED) { > + stream.ibuf = NULL; > + break; > } > #endif > > > Modified: head/sys/i386/i386/bpf_jit_machdep.h > ============================================================================== > --- head/sys/i386/i386/bpf_jit_machdep.h Wed Nov 18 18:48:18 2009 (r199491) > +++ head/sys/i386/i386/bpf_jit_machdep.h Wed Nov 18 19:26:17 2009 (r199492) > @@ -1,6 +1,6 @@ > /*- > * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) > - * Copyright (C) 2005-2008 Jung-uk Kim > + * Copyright (C) 2005-2009 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > > Modified: head/sys/net/bpf_jitter.c > ============================================================================== > --- head/sys/net/bpf_jitter.c Wed Nov 18 18:48:18 2009 (r199491) > +++ head/sys/net/bpf_jitter.c Wed Nov 18 19:26:17 2009 (r199492) > @@ -1,6 +1,6 @@ > /*- > * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) > - * Copyright (C) 2005-2008 Jung-uk Kim > + * Copyright (C) 2005-2009 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); > #else > #include > #include > +#include > +#include > #include > #endif > > @@ -127,7 +129,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f > { > > if (filter->func != bpf_jit_accept_all) > - free(filter->func); > + munmap(filter->func, BPF_JIT_MAXSIZE); > free(filter); > } > #endif > > Modified: head/sys/net/bpf_jitter.h > ============================================================================== > --- head/sys/net/bpf_jitter.h Wed Nov 18 18:48:18 2009 (r199491) > +++ head/sys/net/bpf_jitter.h Wed Nov 18 19:26:17 2009 (r199492) > @@ -1,6 +1,6 @@ > /*- > * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) > - * Copyright (C) 2005-2008 Jung-uk Kim > + * Copyright (C) 2005-2009 Jung-uk Kim > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -36,6 +36,8 @@ > > #ifdef _KERNEL > MALLOC_DECLARE(M_BPFJIT); > +#else > +#define BPF_JIT_MAXSIZE PAGE_SIZE > #endif > > extern int bpf_jitter_enable; > From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 23:40:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6777106566C; Wed, 18 Nov 2009 23:40:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9340A8FC08; Wed, 18 Nov 2009 23:40:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAINeJ6T087656; Wed, 18 Nov 2009 23:40:19 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAINeJ3W087652; Wed, 18 Nov 2009 23:40:19 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911182340.nAINeJ3W087652@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 18 Nov 2009 23:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 23:40:19 -0000 Author: jkim Date: Wed Nov 18 23:40:19 2009 New Revision: 199498 URL: http://svn.freebsd.org/changeset/base/199498 Log: - Change internal function bpf_jit_compile() to return allocated size of the generated binary and remove page size limitation for userland. - Use contigmalloc(9)/contigfree(9) instead of malloc(9)/free(9) to make sure the generated binary aligns properly and make it physically contiguous. Modified: head/sys/amd64/amd64/bpf_jit_machdep.c head/sys/i386/i386/bpf_jit_machdep.c head/sys/net/bpf_jitter.c head/sys/net/bpf_jitter.h Modified: head/sys/amd64/amd64/bpf_jit_machdep.c ============================================================================== --- head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 22:53:05 2009 (r199497) +++ head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 23:40:19 2009 (r199498) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *); /* * emit routine to update the jump table @@ -97,7 +97,7 @@ emit_code(bpf_bin_stream *stream, u_int * Function that does the real stuff */ bpf_filter_func -bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) +bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size, int *mem) { bpf_bin_stream stream; struct bpf_insn *ins; @@ -481,23 +481,21 @@ bpf_jit_compile(struct bpf_insn *prog, u #ifndef _KERNEL if (mprotect(stream.ibuf, stream.cur_ip, PROT_READ | PROT_EXEC) != 0) { - munmap(stream.ibuf, BPF_JIT_MAXSIZE); + munmap(stream.ibuf, stream.cur_ip); stream.ibuf = NULL; } #endif + *size = stream.cur_ip; break; } #ifdef _KERNEL - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); + stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT, + M_NOWAIT, 0, ~0ULL, 16, 0); if (stream.ibuf == NULL) break; #else - if (stream.cur_ip > BPF_JIT_MAXSIZE) { - stream.ibuf = NULL; - break; - } - stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, + stream.ibuf = (char *)mmap(NULL, stream.cur_ip, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); if (stream.ibuf == MAP_FAILED) { stream.ibuf = NULL; Modified: head/sys/i386/i386/bpf_jit_machdep.c ============================================================================== --- head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 22:53:05 2009 (r199497) +++ head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 23:40:19 2009 (r199498) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *); /* * emit routine to update the jump table @@ -97,7 +97,7 @@ emit_code(bpf_bin_stream *stream, u_int * Function that does the real stuff */ bpf_filter_func -bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) +bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size, int *mem) { bpf_bin_stream stream; struct bpf_insn *ins; @@ -504,23 +504,21 @@ bpf_jit_compile(struct bpf_insn *prog, u #ifndef _KERNEL if (mprotect(stream.ibuf, stream.cur_ip, PROT_READ | PROT_EXEC) != 0) { - munmap(stream.ibuf, BPF_JIT_MAXSIZE); + munmap(stream.ibuf, stream.cur_ip); stream.ibuf = NULL; } #endif + *size = stream.cur_ip; break; } #ifdef _KERNEL - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); + stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT, + M_NOWAIT, 0, ~0ULL, 16, 0); if (stream.ibuf == NULL) break; #else - if (stream.cur_ip > BPF_JIT_MAXSIZE) { - stream.ibuf = NULL; - break; - } - stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, + stream.ibuf = (char *)mmap(NULL, stream.cur_ip, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); if (stream.ibuf == MAP_FAILED) { stream.ibuf = NULL; Modified: head/sys/net/bpf_jitter.c ============================================================================== --- head/sys/net/bpf_jitter.c Wed Nov 18 22:53:05 2009 (r199497) +++ head/sys/net/bpf_jitter.c Wed Nov 18 23:40:19 2009 (r199498) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *); static u_int bpf_jit_accept_all(u_char *, u_int, u_int); @@ -81,7 +81,8 @@ bpf_jitter(struct bpf_insn *fp, int nins } /* Create the binary */ - if ((filter->func = bpf_jit_compile(fp, nins, filter->mem)) == NULL) { + if ((filter->func = bpf_jit_compile(fp, nins, &filter->size, + filter->mem)) == NULL) { free(filter, M_BPFJIT); return (NULL); } @@ -94,7 +95,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f { if (filter->func != bpf_jit_accept_all) - free(filter->func, M_BPFJIT); + contigfree(filter->func, filter->size, M_BPFJIT); free(filter, M_BPFJIT); } #else @@ -116,7 +117,8 @@ bpf_jitter(struct bpf_insn *fp, int nins } /* Create the binary */ - if ((filter->func = bpf_jit_compile(fp, nins, filter->mem)) == NULL) { + if ((filter->func = bpf_jit_compile(fp, nins, &filter->size, + filter->mem)) == NULL) { free(filter); return (NULL); } @@ -129,7 +131,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f { if (filter->func != bpf_jit_accept_all) - munmap(filter->func, BPF_JIT_MAXSIZE); + munmap(filter->func, filter->size); free(filter); } #endif Modified: head/sys/net/bpf_jitter.h ============================================================================== --- head/sys/net/bpf_jitter.h Wed Nov 18 22:53:05 2009 (r199497) +++ head/sys/net/bpf_jitter.h Wed Nov 18 23:40:19 2009 (r199498) @@ -36,8 +36,6 @@ #ifdef _KERNEL MALLOC_DECLARE(M_BPFJIT); -#else -#define BPF_JIT_MAXSIZE PAGE_SIZE #endif extern int bpf_jitter_enable; @@ -55,7 +53,7 @@ typedef u_int (*bpf_filter_func)(u_char typedef struct bpf_jit_filter { /* The native filtering binary, in the form of a bpf_filter_func. */ bpf_filter_func func; - + size_t size; int mem[BPF_MEMWORDS]; /* Scratch memory */ } bpf_jit_filter; From owner-svn-src-all@FreeBSD.ORG Wed Nov 18 23:47:52 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 66444106568B; Wed, 18 Nov 2009 23:47:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Robert Watson Date: Wed, 18 Nov 2009 18:47:34 -0500 User-Agent: KMail/1.6.2 References: <200911181926.nAIJQHOR081471@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911181847.44496.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r199492 - in head/sys: amd64/amd64 i386/i386 net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 23:47:52 -0000 On Wednesday 18 November 2009 05:39 pm, Robert Watson wrote: > I'm not sure if you have noticed, but there are a bunch of embedded > target ports of the BPF JIT in the PR collection -- ARM, MIPS, etc. > Any chance we might see those integrated into 9.x at some point? > The less cache-rich CPUs are especially helped by JIT parts. Yes, I am aware of such patches. However, I am not qualified to review/test them. :-( If someone has time/hardware/knowledge to verify their correctness, I'll be happy to commit them. Thanks, Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 00:00:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B0D7106566C; Thu, 19 Nov 2009 00:00:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 565E78FC0C; Thu, 19 Nov 2009 00:00:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ00WJS088115; Thu, 19 Nov 2009 00:00:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJ00WPa088112; Thu, 19 Nov 2009 00:00:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911190000.nAJ00WPa088112@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 19 Nov 2009 00:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199499 - in head/tools/regression/bpf/bpf_filter: . tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 00:00:32 -0000 Author: jkim Date: Thu Nov 19 00:00:31 2009 New Revision: 199499 URL: http://svn.freebsd.org/changeset/base/199499 Log: Add a test case for very long BPF program. Added: head/tools/regression/bpf/bpf_filter/tests/test0084.h (contents, props changed) Modified: head/tools/regression/bpf/bpf_filter/Makefile Modified: head/tools/regression/bpf/bpf_filter/Makefile ============================================================================== --- head/tools/regression/bpf/bpf_filter/Makefile Wed Nov 18 23:40:19 2009 (r199498) +++ head/tools/regression/bpf/bpf_filter/Makefile Thu Nov 19 00:00:31 2009 (r199499) @@ -20,7 +20,7 @@ TEST_CASES?= test0001 test0002 test0003 test0069 test0070 test0071 test0072 \ test0073 test0074 test0075 test0076 \ test0077 test0078 test0079 test0080 \ - test0081 test0082 test0083 + test0081 test0082 test0083 test0084 SYSDIR?= ${.CURDIR}/../../../../sys Added: head/tools/regression/bpf/bpf_filter/tests/test0084.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bpf/bpf_filter/tests/test0084.h Thu Nov 19 00:00:31 2009 (r199499) @@ -0,0 +1,1030 @@ +/*- + * Test 0084: Check very long BPF program. + * + * $FreeBSD$ + */ + +/* BPF program */ +struct bpf_insn pc[] = { + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), + BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 01:11:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EA6F1065676; Thu, 19 Nov 2009 01:11:16 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8BCF18FC20; Thu, 19 Nov 2009 01:11:16 +0000 (UTC) Received: from apple.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ1BE7x006003; Thu, 19 Nov 2009 01:11:15 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4B049B32.6090801@freebsd.org> Date: Thu, 19 Nov 2009 09:11:14 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20080612) MIME-Version: 1.0 To: "M. Warner Losh" References: <200911180509.nAI593kQ058970@svn.freebsd.org> <20091118.072514.673374189.imp@bsdimp.com> In-Reply-To: <20091118.072514.673374189.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199469 - head/lib/librt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 01:11:16 -0000 M. Warner Losh wrote: > In message: <200911180509.nAI593kQ058970@svn.freebsd.org> > David Xu writes: > : Author: davidxu > : Date: Wed Nov 18 05:09:03 2009 > : New Revision: 199469 > : URL: http://svn.freebsd.org/changeset/base/199469 > : > : Log: > : link libpthread because the librt really needs it to fully function. > > If you are now requiring libpthread, why are you using the _pthread_* > functions everywhere else? > > Warner now the pthread_cleanup_push is a macro, but originally it is a function. I don't know if we need an underline version of pthread_cleanup_push, it is trivial if one wants to add it. From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 01:27:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB864106566C; Thu, 19 Nov 2009 01:27:22 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9ED88FC15; Thu, 19 Nov 2009 01:27:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ1RMjZ089832; Thu, 19 Nov 2009 01:27:22 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJ1RMLb089829; Thu, 19 Nov 2009 01:27:22 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911190127.nAJ1RMLb089829@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 19 Nov 2009 01:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199502 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 01:27:23 -0000 Author: marcel Date: Thu Nov 19 01:27:22 2009 New Revision: 199502 URL: http://svn.freebsd.org/changeset/base/199502 Log: opt_* headers are included using the quoted form. Modified: head/sys/ia64/ia64/db_machdep.c head/sys/ia64/ia64/exception.S Modified: head/sys/ia64/ia64/db_machdep.c ============================================================================== --- head/sys/ia64/ia64/db_machdep.c Thu Nov 19 01:20:16 2009 (r199501) +++ head/sys/ia64/ia64/db_machdep.c Thu Nov 19 01:27:22 2009 (r199502) @@ -29,7 +29,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_xtrace.h" #include #include Modified: head/sys/ia64/ia64/exception.S ============================================================================== --- head/sys/ia64/ia64/exception.S Thu Nov 19 01:20:16 2009 (r199501) +++ head/sys/ia64/ia64/exception.S Thu Nov 19 01:27:22 2009 (r199502) @@ -28,7 +28,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_xtrace.h" #include #include From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 04:12:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CD2D106566C; Thu, 19 Nov 2009 04:12:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1D5378FC0A; Thu, 19 Nov 2009 04:12:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAJ46ZWi072500; Wed, 18 Nov 2009 21:06:35 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 18 Nov 2009 21:06:59 -0700 (MST) Message-Id: <20091118.210659.63015724.imp@bsdimp.com> To: davidxu@freebsd.org From: "M. Warner Losh" In-Reply-To: <4B049B32.6090801@freebsd.org> References: <200911180509.nAI593kQ058970@svn.freebsd.org> <20091118.072514.673374189.imp@bsdimp.com> <4B049B32.6090801@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199469 - head/lib/librt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 04:12:37 -0000 In message: <4B049B32.6090801@freebsd.org> David Xu writes: : M. Warner Losh wrote: : > In message: <200911180509.nAI593kQ058970@svn.freebsd.org> : > David Xu writes: : > : Author: davidxu : > : Date: Wed Nov 18 05:09:03 2009 : > : New Revision: 199469 : > : URL: http://svn.freebsd.org/changeset/base/199469 : > : : > : Log: : > : link libpthread because the librt really needs it to fully function. : > : > If you are now requiring libpthread, why are you using the _pthread_* : > functions everywhere else? : > : > Warner : : now the pthread_cleanup_push is a macro, but originally it is a : function. : : I don't know if we need an underline version of pthread_cleanup_push, : it is trivial if one wants to add it. That makes sense. won't we need some compat shim for old binaries? Warner From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 08:10:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB572106566C; Thu, 19 Nov 2009 08:10:24 +0000 (UTC) (envelope-from darrenr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9E748FC0A; Thu, 19 Nov 2009 08:10:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ8AOdu098107; Thu, 19 Nov 2009 08:10:24 GMT (envelope-from darrenr@svn.freebsd.org) Received: (from darrenr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJ8AOKF098105; Thu, 19 Nov 2009 08:10:24 GMT (envelope-from darrenr@svn.freebsd.org) Message-Id: <200911190810.nAJ8AOKF098105@svn.freebsd.org> From: Darren Reed Date: Thu, 19 Nov 2009 08:10:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199510 - head/contrib/ipfilter/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 08:10:25 -0000 Author: darrenr Date: Thu Nov 19 08:10:24 2009 New Revision: 199510 URL: http://svn.freebsd.org/changeset/base/199510 Log: fix spelling mistake Modified: head/contrib/ipfilter/man/ipf.8 Modified: head/contrib/ipfilter/man/ipf.8 ============================================================================== --- head/contrib/ipfilter/man/ipf.8 Thu Nov 19 07:01:09 2009 (r199509) +++ head/contrib/ipfilter/man/ipf.8 Thu Nov 19 08:10:24 2009 (r199510) @@ -46,7 +46,7 @@ supports \fBlanguage\fI. At present, th \fBC\fB (-cc) for which two files - \fBip_rules.c\fP and \fBip_rules.h\fP are generated in the \fBCURRENT DIRECTORY\fP when \fBipf\fP is being run. These files can be used with the -\fBIPFILTER_COMPILED\fP kernel option to build filter rules staticly into +\fBIPFILTER_COMPILED\fP kernel option to build filter rules staticlly into the kernel. .TP .B \-d From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 08:26:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A7C5106566C; Thu, 19 Nov 2009 08:26:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2A3618FC27; Thu, 19 Nov 2009 08:26:28 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B1D5946B03; Thu, 19 Nov 2009 03:26:27 -0500 (EST) Date: Thu, 19 Nov 2009 08:26:27 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jung-uk Kim In-Reply-To: <200911182340.nAINeJ3W087652@svn.freebsd.org> Message-ID: References: <200911182340.nAINeJ3W087652@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 08:26:28 -0000 On Wed, 18 Nov 2009, Jung-uk Kim wrote: > - Change internal function bpf_jit_compile() to return allocated size of > the generated binary and remove page size limitation for userland. > - Use contigmalloc(9)/contigfree(9) instead of malloc(9)/free(9) to make > sure the generated binary aligns properly and make it physically contiguous. Is physical contiguity actually required here -- I would have thought virtual contiguity and alignment would be sufficient, in which case the normal trick is to allocate using malloc the size + min-align + 1 and then fudge the pointer forward until it's properly aligned. Also, in 9.x I'm going to be looking at parallel execution within BPF descriptors, and I notice that the JIT compiles the register array pointer into the generated code, rather than allowing a pointer to be passed in to each instance. I guess it's non-trivial to change that, suggesting that we have a pool of compiled instances, but it would be preferable to be able to do what the normal BPF code does: allocate a per-thread register block when needed. Robert N M Watson Computer Laboratory University of Cambridge > Modified: > head/sys/amd64/amd64/bpf_jit_machdep.c > head/sys/i386/i386/bpf_jit_machdep.c > head/sys/net/bpf_jitter.c > head/sys/net/bpf_jitter.h > > Modified: head/sys/amd64/amd64/bpf_jit_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 22:53:05 2009 (r199497) > +++ head/sys/amd64/amd64/bpf_jit_machdep.c Wed Nov 18 23:40:19 2009 (r199498) > @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); > > #include > > -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); > +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *); > > /* > * emit routine to update the jump table > @@ -97,7 +97,7 @@ emit_code(bpf_bin_stream *stream, u_int > * Function that does the real stuff > */ > bpf_filter_func > -bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) > +bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size, int *mem) > { > bpf_bin_stream stream; > struct bpf_insn *ins; > @@ -481,23 +481,21 @@ bpf_jit_compile(struct bpf_insn *prog, u > #ifndef _KERNEL > if (mprotect(stream.ibuf, stream.cur_ip, > PROT_READ | PROT_EXEC) != 0) { > - munmap(stream.ibuf, BPF_JIT_MAXSIZE); > + munmap(stream.ibuf, stream.cur_ip); > stream.ibuf = NULL; > } > #endif > + *size = stream.cur_ip; > break; > } > > #ifdef _KERNEL > - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); > + stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT, > + M_NOWAIT, 0, ~0ULL, 16, 0); > if (stream.ibuf == NULL) > break; > #else > - if (stream.cur_ip > BPF_JIT_MAXSIZE) { > - stream.ibuf = NULL; > - break; > - } > - stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, > + stream.ibuf = (char *)mmap(NULL, stream.cur_ip, > PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); > if (stream.ibuf == MAP_FAILED) { > stream.ibuf = NULL; > > Modified: head/sys/i386/i386/bpf_jit_machdep.c > ============================================================================== > --- head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 22:53:05 2009 (r199497) > +++ head/sys/i386/i386/bpf_jit_machdep.c Wed Nov 18 23:40:19 2009 (r199498) > @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); > > #include > > -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); > +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *); > > /* > * emit routine to update the jump table > @@ -97,7 +97,7 @@ emit_code(bpf_bin_stream *stream, u_int > * Function that does the real stuff > */ > bpf_filter_func > -bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) > +bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size, int *mem) > { > bpf_bin_stream stream; > struct bpf_insn *ins; > @@ -504,23 +504,21 @@ bpf_jit_compile(struct bpf_insn *prog, u > #ifndef _KERNEL > if (mprotect(stream.ibuf, stream.cur_ip, > PROT_READ | PROT_EXEC) != 0) { > - munmap(stream.ibuf, BPF_JIT_MAXSIZE); > + munmap(stream.ibuf, stream.cur_ip); > stream.ibuf = NULL; > } > #endif > + *size = stream.cur_ip; > break; > } > > #ifdef _KERNEL > - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); > + stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT, > + M_NOWAIT, 0, ~0ULL, 16, 0); > if (stream.ibuf == NULL) > break; > #else > - if (stream.cur_ip > BPF_JIT_MAXSIZE) { > - stream.ibuf = NULL; > - break; > - } > - stream.ibuf = (char *)mmap(NULL, BPF_JIT_MAXSIZE, > + stream.ibuf = (char *)mmap(NULL, stream.cur_ip, > PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); > if (stream.ibuf == MAP_FAILED) { > stream.ibuf = NULL; > > Modified: head/sys/net/bpf_jitter.c > ============================================================================== > --- head/sys/net/bpf_jitter.c Wed Nov 18 22:53:05 2009 (r199497) > +++ head/sys/net/bpf_jitter.c Wed Nov 18 23:40:19 2009 (r199498) > @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); > +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *); > > static u_int bpf_jit_accept_all(u_char *, u_int, u_int); > > @@ -81,7 +81,8 @@ bpf_jitter(struct bpf_insn *fp, int nins > } > > /* Create the binary */ > - if ((filter->func = bpf_jit_compile(fp, nins, filter->mem)) == NULL) { > + if ((filter->func = bpf_jit_compile(fp, nins, &filter->size, > + filter->mem)) == NULL) { > free(filter, M_BPFJIT); > return (NULL); > } > @@ -94,7 +95,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f > { > > if (filter->func != bpf_jit_accept_all) > - free(filter->func, M_BPFJIT); > + contigfree(filter->func, filter->size, M_BPFJIT); > free(filter, M_BPFJIT); > } > #else > @@ -116,7 +117,8 @@ bpf_jitter(struct bpf_insn *fp, int nins > } > > /* Create the binary */ > - if ((filter->func = bpf_jit_compile(fp, nins, filter->mem)) == NULL) { > + if ((filter->func = bpf_jit_compile(fp, nins, &filter->size, > + filter->mem)) == NULL) { > free(filter); > return (NULL); > } > @@ -129,7 +131,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f > { > > if (filter->func != bpf_jit_accept_all) > - munmap(filter->func, BPF_JIT_MAXSIZE); > + munmap(filter->func, filter->size); > free(filter); > } > #endif > > Modified: head/sys/net/bpf_jitter.h > ============================================================================== > --- head/sys/net/bpf_jitter.h Wed Nov 18 22:53:05 2009 (r199497) > +++ head/sys/net/bpf_jitter.h Wed Nov 18 23:40:19 2009 (r199498) > @@ -36,8 +36,6 @@ > > #ifdef _KERNEL > MALLOC_DECLARE(M_BPFJIT); > -#else > -#define BPF_JIT_MAXSIZE PAGE_SIZE > #endif > > extern int bpf_jitter_enable; > @@ -55,7 +53,7 @@ typedef u_int (*bpf_filter_func)(u_char > typedef struct bpf_jit_filter { > /* The native filtering binary, in the form of a bpf_filter_func. */ > bpf_filter_func func; > - > + size_t size; > int mem[BPF_MEMWORDS]; /* Scratch memory */ > } bpf_jit_filter; > > From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 08:32:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A3D4106566B; Thu, 19 Nov 2009 08:32:10 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id D28A08FC17; Thu, 19 Nov 2009 08:32:09 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D524041C756; Thu, 19 Nov 2009 09:32:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id DE0NEYWiSDn7; Thu, 19 Nov 2009 09:32:07 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 2D88A41C75C; Thu, 19 Nov 2009 09:32:07 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 4769C4448E6; Thu, 19 Nov 2009 08:30:54 +0000 (UTC) Date: Thu, 19 Nov 2009 08:30:54 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Darren Reed In-Reply-To: <200911190810.nAJ8AOKF098105@svn.freebsd.org> Message-ID: <20091119083005.S37440@maildrop.int.zabbadoz.net> References: <200911190810.nAJ8AOKF098105@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199510 - head/contrib/ipfilter/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 08:32:10 -0000 On Thu, 19 Nov 2009, Darren Reed wrote: > Author: darrenr > Date: Thu Nov 19 08:10:24 2009 > New Revision: 199510 > URL: http://svn.freebsd.org/changeset/base/199510 > > Log: > fix spelling mistake > > Modified: > head/contrib/ipfilter/man/ipf.8 > > Modified: head/contrib/ipfilter/man/ipf.8 > ============================================================================== > --- head/contrib/ipfilter/man/ipf.8 Thu Nov 19 07:01:09 2009 (r199509) > +++ head/contrib/ipfilter/man/ipf.8 Thu Nov 19 08:10:24 2009 (r199510) > @@ -46,7 +46,7 @@ supports \fBlanguage\fI. At present, th > \fBC\fB (-cc) for which two files - \fBip_rules.c\fP > and \fBip_rules.h\fP are generated in the \fBCURRENT DIRECTORY\fP when > \fBipf\fP is being run. These files can be used with the > -\fBIPFILTER_COMPILED\fP kernel option to build filter rules staticly into > +\fBIPFILTER_COMPILED\fP kernel option to build filter rules staticlly into I might need coffee, still, but did you mean "statically"? > the kernel. > .TP > .B \-d > -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 08:59:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 210CC106566C; Thu, 19 Nov 2009 08:59:29 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E81DE8FC08; Thu, 19 Nov 2009 08:59:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ8xSO0099259; Thu, 19 Nov 2009 08:59:28 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJ8xSxh099240; Thu, 19 Nov 2009 08:59:28 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911190859.nAJ8xSxh099240@svn.freebsd.org> From: Roman Divacky Date: Thu, 19 Nov 2009 08:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199511 - in vendor/llvm/dist: . autoconf include/llvm/ADT include/llvm/CodeGen include/llvm/Support include/llvm/Target include/llvm/Transforms/Utils lib/Analysis lib/CodeGen lib/CodeG... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 08:59:29 -0000 Author: rdivacky Date: Thu Nov 19 08:59:28 2009 New Revision: 199511 URL: http://svn.freebsd.org/changeset/base/199511 Log: Update LLVM to r89337. Added: vendor/llvm/dist/test/CodeGen/ARM/tail-opts.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-18-TwoAddrKill.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-load.ll vendor/llvm/dist/test/CodeGen/XCore/indirectbr.ll vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp vendor/llvm/dist/utils/TableGen/OptParserEmitter.h Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/Makefile.rules vendor/llvm/dist/autoconf/config.guess vendor/llvm/dist/autoconf/config.sub vendor/llvm/dist/include/llvm/ADT/Twine.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Target/SubtargetFeature.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.h vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/CodeGen/Spiller.h vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleV6.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleV7.td vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp vendor/llvm/dist/lib/Target/SubtargetFeature.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/test/CodeGen/Mips/2008-08-03-ReturnDouble.ll vendor/llvm/dist/test/CodeGen/Thumb/pop.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/large-stack.ll vendor/llvm/dist/test/CodeGen/Thumb2/ldr-str-imm12.ll vendor/llvm/dist/test/FrontendC++/2009-07-15-LineNumbers.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/tools/lto/LTOModule.h vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/lit/TestFormats.py Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/CMakeLists.txt Thu Nov 19 08:59:28 2009 (r199511) @@ -323,7 +323,7 @@ if(LLVM_BUILD_TOOLS) add_subdirectory(tools) endif() -option(LLVM_BUILD_EXAMPLES "Build LLVM example programs." ON) +option(LLVM_BUILD_EXAMPLES "Build LLVM example programs." OFF) if(LLVM_BUILD_EXAMPLES) add_subdirectory(examples) endif () Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/Makefile.rules Thu Nov 19 08:59:28 2009 (r199511) @@ -736,6 +736,8 @@ else Ranlib = ranlib endif +AliasTool = ln -s + #---------------------------------------------------------- # Get the list of source files and compute object file # names from them. @@ -1215,10 +1217,20 @@ ifdef TOOLNAME #--------------------------------------------------------- # Set up variables for building a tool. #--------------------------------------------------------- +TOOLEXENAME := $(strip $(TOOLNAME))$(EXEEXT) +ifdef EXAMPLE_TOOL +ToolBuildPath := $(ExmplDir)/$(TOOLEXENAME) +else +ToolBuildPath := $(ToolDir)/$(TOOLEXENAME) +endif + +# TOOLALIAS is a name to symlink (or copy) the tool to. +ifdef TOOLALIAS ifdef EXAMPLE_TOOL -ToolBuildPath := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT) +ToolAliasBuildPath := $(ExmplDir)/$(strip $(TOOLALIAS))$(EXEEXT) else -ToolBuildPath := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT) +ToolAliasBuildPath := $(ToolDir)/$(strip $(TOOLALIAS))$(EXEEXT) +endif endif #--------------------------------------------------------- @@ -1246,12 +1258,15 @@ endif #--------------------------------------------------------- # Provide targets for building the tools #--------------------------------------------------------- -all-local:: $(ToolBuildPath) +all-local:: $(ToolBuildPath) $(ToolAliasBuildPath) clean-local:: ifneq ($(strip $(ToolBuildPath)),) -$(Verb) $(RM) -f $(ToolBuildPath) endif +ifneq ($(strip $(ToolAliasBuildPath)),) + -$(Verb) $(RM) -f $(ToolAliasBuildPath) +endif ifdef EXAMPLE_TOOL $(ToolBuildPath): $(ExmplDir)/.dir @@ -1266,13 +1281,22 @@ $(ToolBuildPath): $(ObjectsO) $(ProjLibs $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \ $(StripWarnMsg) +ifneq ($(strip $(ToolAliasBuildPath)),) +$(ToolAliasBuildPath): $(ToolBuildPath) + $(Echo) Creating $(BuildMode) Alias $(TOOLALIAS) $(StripWarnMsg) + $(Verb) $(RM) -f $(ToolAliasBuildPath) + $(Verb) $(AliasTool) $(TOOLEXENAME) $(ToolAliasBuildPath) + $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLNAME) \ + $(StripWarnMsg) +endif + ifdef NO_INSTALL install-local:: $(Echo) Install circumvented with NO_INSTALL uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -DestTool = $(PROJ_bindir)/$(TOOLNAME)$(EXEEXT) +DestTool = $(PROJ_bindir)/$(TOOLEXENAME) install-local:: $(DestTool) @@ -1283,6 +1307,23 @@ $(DestTool): $(ToolBuildPath) $(PROJ_bin uninstall-local:: $(Echo) Uninstalling $(BuildMode) $(DestTool) -$(Verb) $(RM) -f $(DestTool) + +# TOOLALIAS install. +ifdef TOOLALIAS +DestToolAlias = $(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) + +install-local:: $(DestToolAlias) + +$(DestToolAlias): $(DestTool) $(PROJ_bindir) + $(Echo) Installing $(BuildMode) $(DestToolAlias) + $(Verb) $(RM) -f $(DestToolAlias) + $(Verb) $(AliasTool) $(TOOLEXENAME) $(DestToolAlias) + +uninstall-local:: + $(Echo) Uninstalling $(BuildMode) $(DestToolAlias) + -$(Verb) $(RM) -f $(DestToolAlias) +endif + endif endif Modified: vendor/llvm/dist/autoconf/config.guess ============================================================================== --- vendor/llvm/dist/autoconf/config.guess Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/autoconf/config.guess Thu Nov 19 08:59:28 2009 (r199511) @@ -333,6 +333,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + AUX_ARCH="i386" + echo ${AUX_ARCH}-pc-auroraux`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" Modified: vendor/llvm/dist/autoconf/config.sub ============================================================================== --- vendor/llvm/dist/autoconf/config.sub Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/autoconf/config.sub Thu Nov 19 08:59:28 2009 (r199511) @@ -1256,6 +1256,9 @@ case $os in -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; + -auroraux) + os=-auroraux + ;; -solaris) os=-solaris2 ;; @@ -1274,7 +1277,7 @@ case $os in # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ Modified: vendor/llvm/dist/include/llvm/ADT/Twine.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/Twine.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/include/llvm/ADT/Twine.h Thu Nov 19 08:59:28 2009 (r199511) @@ -133,9 +133,9 @@ namespace llvm { /// Null or Empty kinds. const void *RHS; /// LHSKind - The NodeKind of the left hand side, \see getLHSKind(). - NodeKind LHSKind : 8; + unsigned char LHSKind; /// RHSKind - The NodeKind of the left hand side, \see getLHSKind(). - NodeKind RHSKind : 8; + unsigned char RHSKind; private: /// Construct a nullary twine; the kind must be NullKind or EmptyKind. @@ -209,10 +209,10 @@ namespace llvm { } /// getLHSKind - Get the NodeKind of the left-hand side. - NodeKind getLHSKind() const { return LHSKind; } + NodeKind getLHSKind() const { return (NodeKind) LHSKind; } /// getRHSKind - Get the NodeKind of the left-hand side. - NodeKind getRHSKind() const { return RHSKind; } + NodeKind getRHSKind() const { return (NodeKind) RHSKind; } /// printOneChild - Print one child from a twine. void printOneChild(raw_ostream &OS, const void *Ptr, NodeKind Kind) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Nov 19 08:59:28 2009 (r199511) @@ -60,9 +60,6 @@ namespace llvm { typedef DenseMap Reg2IntervalMap; Reg2IntervalMap r2iMap_; - /// phiJoinCopies - Copy instructions which are PHI joins. - SmallVector phiJoinCopies; - /// allocatableRegs_ - A bit vector of allocatable registers. BitVector allocatableRegs_; @@ -278,13 +275,6 @@ namespace llvm { /// computeIntervals - Compute live intervals. void computeIntervals(); - bool isSafeAndProfitableToCoalesce(LiveInterval &DstInt, - LiveInterval &SrcInt, - SmallVector &IdentCopies, - SmallVector &OtherCopies); - - void performEarlyCoalescing(); - /// handleRegisterDef - update intervals for a register def /// (calls handlePhysicalRegisterDef and /// handleVirtualRegisterDef) Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Thu Nov 19 08:59:28 2009 (r199511) @@ -233,7 +233,7 @@ public: /// verify - Run the current MachineFunction through the machine code /// verifier, useful for debugger use. - void verify() const; + void verify(Pass *p=NULL, bool allowDoubleDefs=false) const; // Provide accessors for the MachineBasicBlock list... typedef BasicBlockListType::iterator iterator; Modified: vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h Thu Nov 19 08:59:28 2009 (r199511) @@ -24,7 +24,7 @@ namespace llvm { /// of memory, and provides simple methods for reading files and standard input /// into a memory buffer. In addition to basic access to the characters in the /// file, this interface guarantees you can read one character past the end of -/// @verbatim the file, and that this character will read as '\0'. @endverbatim +/// the file, and that this character will read as '\0'. class MemoryBuffer { const char *BufferStart; // Start of the buffer. const char *BufferEnd; // End of the buffer. Modified: vendor/llvm/dist/include/llvm/Target/SubtargetFeature.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/SubtargetFeature.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/include/llvm/Target/SubtargetFeature.h Thu Nov 19 08:59:28 2009 (r199511) @@ -21,6 +21,7 @@ #include #include #include +#include "llvm/ADT/Triple.h" #include "llvm/System/DataTypes.h" namespace llvm { @@ -106,6 +107,10 @@ public: // Dump feature info. void dump() const; + + /// Retrieve a formatted string of the default features for + /// the specified target triple. + static std::string getDefaultSubtargetFeatures(const Triple &Triple); }; } // End namespace llvm Modified: vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h ============================================================================== --- vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h Thu Nov 19 08:59:28 2009 (r199511) @@ -107,7 +107,14 @@ void MergeBasicBlockIntoOnlyPred(BasicBl /// rewriting all the predecessors to branch to the successor block and return /// true. If we can't transform, return false. bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB); - + +/// EliminateDuplicatePHINodes - Check for and eliminate duplicate PHI +/// nodes in this block. This doesn't try to be clever about PHI nodes +/// which differ only in the order of the incoming values, but instcombine +/// orders them so it usually won't matter. +/// +bool EliminateDuplicatePHINodes(BasicBlock *BB); + /// SimplifyCFG - This function is used to do simplification of a CFG. For /// example, it adjusts branches to branches to eliminate the extra hop, it /// eliminates unreachable basic blocks, and does other "peephole" optimization Modified: vendor/llvm/dist/lib/Analysis/IVUsers.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/IVUsers.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/Analysis/IVUsers.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -24,6 +24,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/CommandLine.h" #include using namespace llvm; @@ -31,6 +32,10 @@ char IVUsers::ID = 0; static RegisterPass X("iv-users", "Induction Variable Users", false, true); +static cl::opt +SimplifyIVUsers("simplify-iv-users", cl::Hidden, cl::init(false), + cl::desc("Restrict IV Users to loop-invariant strides")); + Pass *llvm::createIVUsersPass() { return new IVUsers(); } @@ -208,6 +213,11 @@ bool IVUsers::AddUsersIfInteresting(Inst if (!getSCEVStartAndStride(ISE, L, UseLoop, Start, Stride, SE, DT)) return false; // Non-reducible symbolic expression, bail out. + // Keep things simple. Don't touch loop-variant strides. + if (SimplifyIVUsers && !Stride->isLoopInvariant(L) + && L->contains(I->getParent())) + return false; + SmallPtrSet UniqueUsers; for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) { Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -727,7 +727,8 @@ void DwarfException::EmitExceptionTable( // somewhere. This predicate should be moved to a shared location that is // in target-independent code. // - if (LSDASection->getKind().isWriteable() || + if ((LSDASection->getKind().isWriteable() && + !LSDASection->getKind().isReadOnlyWithRel()) || Asm->TM.getRelocationModel() == Reloc::Static) TTypeFormat = dwarf::DW_EH_PE_absptr; else @@ -917,14 +918,36 @@ void DwarfException::EmitExceptionTable( } // Emit the Catch TypeInfos. + const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); + unsigned Index = 1; + for (std::vector::const_reverse_iterator I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) { - const GlobalVariable *GV = *I; - PrintRelDirective(); + const GlobalVariable *TI = *I; + + if (TI) { + if (!LSDASection->getKind().isReadOnlyWithRel() && + (TTypeFormat == dwarf::DW_EH_PE_absptr || + TI->getLinkage() == GlobalValue::InternalLinkage)) { + // Print out the unadorned name of the type info. + PrintRelDirective(); + O << Asm->Mang->getMangledName(TI); + } else { + bool IsTypeInfoIndirect = false, IsTypeInfoPCRel = false; + const MCExpr *TypeInfoRef = + TLOF.getSymbolForDwarfGlobalReference(TI, Asm->Mang, Asm->MMI, + IsTypeInfoIndirect, + IsTypeInfoPCRel); + + if (!IsTypeInfoPCRel) + TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr", + Index++); - if (GV) { - O << Asm->Mang->getMangledName(GV); + O << MAI->getData32bitsDirective(); + TypeInfoRef->print(O, MAI); + } } else { + PrintRelDirective(); O << "0x0"; } Modified: vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -41,8 +41,12 @@ using namespace llvm; STATISTIC(NumDeadBlocks, "Number of dead blocks removed"); STATISTIC(NumBranchOpts, "Number of branches optimized"); STATISTIC(NumTailMerge , "Number of block tails merged"); +STATISTIC(NumTailDups , "Number of tail duplicated blocks"); +STATISTIC(NumInstrDups , "Additional instructions due to tail duplication"); + static cl::opt FlagEnableTailMerge("enable-tail-merge", cl::init(cl::BOU_UNSET), cl::Hidden); + // Throttle for huge numbers of predecessors (compile speed problems) static cl::opt TailMergeThreshold("tail-merge-threshold", @@ -193,7 +197,6 @@ bool BranchFolder::OptimizeFunction(Mach MadeChange |= OptimizeImpDefsBlock(MBB); } - bool MadeChangeThisIteration = true; while (MadeChangeThisIteration) { MadeChangeThisIteration = false; @@ -202,10 +205,15 @@ bool BranchFolder::OptimizeFunction(Mach MadeChange |= MadeChangeThisIteration; } - // Do tail duplication once after tail merging is done. Otherwise it is + // Do tail duplication after tail merging is done. Otherwise it is // tough to avoid situations where tail duplication and tail merging undo // each other's transformations ad infinitum. - MadeChange |= TailDuplicateBlocks(MF); + MadeChangeThisIteration = true; + while (MadeChangeThisIteration) { + MadeChangeThisIteration = false; + MadeChangeThisIteration |= TailDuplicateBlocks(MF); + MadeChange |= MadeChangeThisIteration; + } // See if any jump tables have become mergable or dead as the code generator // did its thing. @@ -1003,9 +1011,6 @@ static bool IsBetterFallthrough(MachineB bool BranchFolder::TailDuplicateBlocks(MachineFunction &MF) { bool MadeChange = false; - // Make sure blocks are numbered in order - MF.RenumberBlocks(); - for (MachineFunction::iterator I = ++MF.begin(), E = MF.end(); I != E; ) { MachineBasicBlock *MBB = I++; @@ -1017,6 +1022,7 @@ bool BranchFolder::TailDuplicateBlocks(M // If it is dead, remove it. if (MBB->pred_empty()) { + NumInstrDups -= MBB->size(); RemoveDeadBlock(MBB); MadeChange = true; ++NumDeadBlocks; @@ -1097,6 +1103,7 @@ bool BranchFolder::TailDuplicate(Machine MachineInstr *NewMI = MF.CloneMachineInstr(I); PredBB->insert(PredBB->end(), NewMI); } + NumInstrDups += TailBB->size() - 1; // subtract one for removed branch // Update the CFG. PredBB->removeSuccessor(PredBB->succ_begin()); @@ -1107,6 +1114,7 @@ bool BranchFolder::TailDuplicate(Machine PredBB->addSuccessor(*I); Changed = true; + ++NumTailDups; } // If TailBB was duplicated into all its predecessors except for the prior Modified: vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -53,16 +53,9 @@ static cl::opt DisableReMat("disab static cl::opt EnableFastSpilling("fast-spill", cl::init(false), cl::Hidden); -static cl::opt EarlyCoalescing("early-coalescing", - cl::init(false), cl::Hidden); - -static cl::opt CoalescingLimit("early-coalescing-limit", - cl::init(-1), cl::Hidden); - STATISTIC(numIntervals , "Number of original intervals"); STATISTIC(numFolds , "Number of loads/stores folded into instructions"); STATISTIC(numSplits , "Number of intervals split"); -STATISTIC(numCoalescing, "Number of early coalescing performed"); char LiveIntervals::ID = 0; static RegisterPass X("liveintervals", "Live Interval Analysis"); @@ -96,7 +89,6 @@ void LiveIntervals::releaseMemory() { delete I->second; r2iMap_.clear(); - phiJoinCopies.clear(); // Release VNInfo memroy regions after all VNInfo objects are dtor'd. VNInfoAllocator.Reset(); @@ -121,7 +113,6 @@ bool LiveIntervals::runOnMachineFunction allocatableRegs_ = tri_->getAllocatableSet(fn); computeIntervals(); - performEarlyCoalescing(); numIntervals += getNumIntervals(); @@ -409,7 +400,6 @@ void LiveIntervals::handleVirtualRegiste // Remove the old range that we now know has an incorrect number. VNInfo *VNI = interval.getValNumInfo(0); MachineInstr *Killer = vi.Kills[0]; - phiJoinCopies.push_back(Killer); SlotIndex Start = getMBBStartIdx(Killer->getParent()); SlotIndex End = getInstructionIndex(Killer).getDefIndex(); DEBUG({ @@ -653,133 +643,6 @@ void LiveIntervals::handleLiveInRegister DEBUG(errs() << " +" << LR << '\n'); } -bool LiveIntervals:: -isSafeAndProfitableToCoalesce(LiveInterval &DstInt, - LiveInterval &SrcInt, - SmallVector &IdentCopies, - SmallVector &OtherCopies) { - unsigned NumIdent = 0; - for (MachineRegisterInfo::def_iterator ri = mri_->def_begin(SrcInt.reg), - re = mri_->def_end(); ri != re; ++ri) { - MachineInstr *MI = &*ri; - unsigned SrcReg, DstReg, SrcSubReg, DstSubReg; - if (!tii_->isMoveInstr(*MI, SrcReg, DstReg, SrcSubReg, DstSubReg)) - return false; - if (SrcReg != DstInt.reg) { - // Non-identity copy - we cannot handle overlapping intervals - if (DstInt.liveAt(getInstructionIndex(MI))) - return false; - OtherCopies.push_back(MI); - } else { - IdentCopies.push_back(MI); - ++NumIdent; - } - } - - return IdentCopies.size() > OtherCopies.size(); -} - -void LiveIntervals::performEarlyCoalescing() { - if (!EarlyCoalescing) - return; - - /// Perform early coalescing: eliminate copies which feed into phi joins - /// and whose sources are defined by the phi joins. - for (unsigned i = 0, e = phiJoinCopies.size(); i != e; ++i) { - MachineInstr *Join = phiJoinCopies[i]; - if (CoalescingLimit != -1 && (int)numCoalescing == CoalescingLimit) - break; - - unsigned PHISrc, PHIDst, SrcSubReg, DstSubReg; - bool isMove= tii_->isMoveInstr(*Join, PHISrc, PHIDst, SrcSubReg, DstSubReg); -#ifndef NDEBUG - assert(isMove && "PHI join instruction must be a move!"); -#else - isMove = isMove; -#endif - - LiveInterval &DstInt = getInterval(PHIDst); - LiveInterval &SrcInt = getInterval(PHISrc); - SmallVector IdentCopies; - SmallVector OtherCopies; - if (!isSafeAndProfitableToCoalesce(DstInt, SrcInt, - IdentCopies, OtherCopies)) - continue; - - DEBUG(errs() << "PHI Join: " << *Join); - assert(DstInt.containsOneValue() && "PHI join should have just one val#!"); - assert(std::distance(mri_->use_begin(PHISrc), mri_->use_end()) == 1 && - "PHI join src should not be used elsewhere"); - VNInfo *VNI = DstInt.getValNumInfo(0); - - // Change the non-identity copies to directly target the phi destination. - for (unsigned i = 0, e = OtherCopies.size(); i != e; ++i) { - MachineInstr *PHICopy = OtherCopies[i]; - SlotIndex MIIndex = getInstructionIndex(PHICopy); - DEBUG(errs() << "Moving: " << MIIndex << ' ' << *PHICopy); - SlotIndex DefIndex = MIIndex.getDefIndex(); - LiveRange *SLR = SrcInt.getLiveRangeContaining(DefIndex); - SlotIndex StartIndex = SLR->start; - SlotIndex EndIndex = SLR->end; - - // Delete val# defined by the now identity copy and add the range from - // beginning of the mbb to the end of the range. - SrcInt.removeValNo(SLR->valno); - DEBUG(errs() << " added range [" << StartIndex << ',' - << EndIndex << "] to reg" << DstInt.reg << '\n'); - assert (!DstInt.liveAt(StartIndex) && "Cannot coalesce when dst live!"); - VNInfo *NewVNI = DstInt.getNextValue(DefIndex, PHICopy, true, - VNInfoAllocator); - NewVNI->setHasPHIKill(true); - DstInt.addRange(LiveRange(StartIndex, EndIndex, NewVNI)); - for (unsigned j = 0, ee = PHICopy->getNumOperands(); j != ee; ++j) { - MachineOperand &MO = PHICopy->getOperand(j); - if (!MO.isReg() || MO.getReg() != PHISrc) - continue; - MO.setReg(PHIDst); - } - } - - // Now let's eliminate all the would-be identity copies. - for (unsigned i = 0, e = IdentCopies.size(); i != e; ++i) { - MachineInstr *PHICopy = IdentCopies[i]; - DEBUG(errs() << "Coalescing: " << *PHICopy); - - SlotIndex MIIndex = getInstructionIndex(PHICopy); - SlotIndex DefIndex = MIIndex.getDefIndex(); - LiveRange *SLR = SrcInt.getLiveRangeContaining(DefIndex); - SlotIndex StartIndex = SLR->start; - SlotIndex EndIndex = SLR->end; - - // Delete val# defined by the now identity copy and add the range from - // beginning of the mbb to the end of the range. - SrcInt.removeValNo(SLR->valno); - RemoveMachineInstrFromMaps(PHICopy); - PHICopy->eraseFromParent(); - DEBUG(errs() << " added range [" << StartIndex << ',' - << EndIndex << "] to reg" << DstInt.reg << '\n'); - DstInt.addRange(LiveRange(StartIndex, EndIndex, VNI)); - } - - // Remove the phi join and update the phi block liveness. - SlotIndex MIIndex = getInstructionIndex(Join); - SlotIndex UseIndex = MIIndex.getUseIndex(); - SlotIndex DefIndex = MIIndex.getDefIndex(); - LiveRange *SLR = SrcInt.getLiveRangeContaining(UseIndex); - LiveRange *DLR = DstInt.getLiveRangeContaining(DefIndex); - DLR->valno->setCopy(0); - DLR->valno->setIsDefAccurate(false); - DstInt.addRange(LiveRange(SLR->start, SLR->end, DLR->valno)); - SrcInt.removeRange(SLR->start, SLR->end); - assert(SrcInt.empty()); - removeInterval(PHISrc); - RemoveMachineInstrFromMaps(Join); - Join->eraseFromParent(); - - ++numCoalescing; - } -} - /// computeIntervals - computes the live intervals for virtual /// registers. for some ordering of the machine instructions [1,N] a /// live interval is an interval [i, j) where 1 <= i <= j < N for Modified: vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -42,23 +42,18 @@ using namespace llvm; namespace { - struct MachineVerifier : public MachineFunctionPass { - static char ID; // Pass ID, replacement for typeid + struct MachineVerifier { - MachineVerifier(bool allowDoubleDefs = false) : - MachineFunctionPass(&ID), + MachineVerifier(Pass *pass, bool allowDoubleDefs) : + PASS(pass), allowVirtDoubleDefs(allowDoubleDefs), allowPhysDoubleDefs(allowDoubleDefs), OutFileName(getenv("LLVM_VERIFY_MACHINEINSTRS")) - {} - - void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); - MachineFunctionPass::getAnalysisUsage(AU); - } + {} bool runOnMachineFunction(MachineFunction &MF); + Pass *const PASS; const bool allowVirtDoubleDefs; const bool allowPhysDoubleDefs; @@ -112,6 +107,10 @@ namespace { // regsKilled and regsLiveOut. RegSet vregsPassed; + // Vregs that must pass through MBB because they are needed by a successor + // block. This set is disjoint from regsLiveOut. + RegSet vregsRequired; + BBInfo() : reachable(false) {} // Add register to vregsPassed if it belongs there. Return true if @@ -133,6 +132,34 @@ namespace { return changed; } + // Add register to vregsRequired if it belongs there. Return true if + // anything changed. + bool addRequired(unsigned Reg) { + if (!TargetRegisterInfo::isVirtualRegister(Reg)) + return false; + if (regsLiveOut.count(Reg)) + return false; + return vregsRequired.insert(Reg).second; + } + + // Same for a full set. + bool addRequired(const RegSet &RS) { + bool changed = false; + for (RegSet::const_iterator I = RS.begin(), E = RS.end(); I != E; ++I) + if (addRequired(*I)) + changed = true; + return changed; + } + + // Same for a full map. + bool addRequired(const RegMap &RM) { + bool changed = false; + for (RegMap::const_iterator I = RM.begin(), E = RM.end(); I != E; ++I) + if (addRequired(I->first)) + changed = true; + return changed; + } + // Live-out registers are either in regsLiveOut or vregsPassed. bool isLiveOut(unsigned Reg) const { return regsLiveOut.count(Reg) || vregsPassed.count(Reg); @@ -146,6 +173,9 @@ namespace { return Reg < regsReserved.size() && regsReserved.test(Reg); } + // Analysis information if available + LiveVariables *LiveVars; + void visitMachineFunctionBefore(); void visitMachineBasicBlockBefore(const MachineBasicBlock *MBB); void visitMachineInstrBefore(const MachineInstr *MI); @@ -163,20 +193,44 @@ namespace { void calcMaxRegsPassed(); void calcMinRegsPassed(); void checkPHIOps(const MachineBasicBlock *MBB); + + void calcRegsRequired(); + void verifyLiveVariables(); + }; + + struct MachineVerifierPass : public MachineFunctionPass { + static char ID; // Pass ID, replacement for typeid + bool AllowDoubleDefs; + + explicit MachineVerifierPass(bool allowDoubleDefs = false) + : MachineFunctionPass(&ID), + AllowDoubleDefs(allowDoubleDefs) {} + + void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); + } + + bool runOnMachineFunction(MachineFunction &MF) { + MF.verify(this, AllowDoubleDefs); + return false; + } }; + } -char MachineVerifier::ID = 0; -static RegisterPass +char MachineVerifierPass::ID = 0; +static RegisterPass MachineVer("machineverifier", "Verify generated machine code"); static const PassInfo *const MachineVerifyID = &MachineVer; FunctionPass *llvm::createMachineVerifierPass(bool allowPhysDoubleDefs) { - return new MachineVerifier(allowPhysDoubleDefs); + return new MachineVerifierPass(allowPhysDoubleDefs); } -void MachineFunction::verify() const { - MachineVerifier().runOnMachineFunction(const_cast(*this)); +void MachineFunction::verify(Pass *p, bool allowDoubleDefs) const { + MachineVerifier(p, allowDoubleDefs) + .runOnMachineFunction(const_cast(*this)); } bool MachineVerifier::runOnMachineFunction(MachineFunction &MF) { @@ -202,6 +256,12 @@ bool MachineVerifier::runOnMachineFuncti TRI = TM->getRegisterInfo(); MRI = &MF.getRegInfo(); + if (PASS) { + LiveVars = PASS->getAnalysisIfAvailable(); + } else { + LiveVars = NULL; + } + visitMachineFunctionBefore(); for (MachineFunction::const_iterator MFI = MF.begin(), MFE = MF.end(); MFI!=MFE; ++MFI) { @@ -518,8 +578,9 @@ MachineVerifier::visitMachineOperand(con } else if (MO->isUse()) { regsLiveInButUnused.erase(Reg); + bool isKill = false; if (MO->isKill()) { - addRegWithSubRegs(regsKilled, Reg); + isKill = true; // Tied operands on two-address instuctions MUST NOT have a flag. if (MI->isRegTiedToDefOperand(MONum)) report("Illegal kill flag on two-address instruction operand", @@ -529,8 +590,20 @@ MachineVerifier::visitMachineOperand(con unsigned defIdx; if (MI->isRegTiedToDefOperand(MONum, &defIdx) && MI->getOperand(defIdx).getReg() == Reg) - addRegWithSubRegs(regsKilled, Reg); + isKill = true; + } + if (isKill) { + addRegWithSubRegs(regsKilled, Reg); + + // Check that LiveVars knows this kill + if (LiveVars && TargetRegisterInfo::isVirtualRegister(Reg)) { + LiveVariables::VarInfo &VI = LiveVars->getVarInfo(Reg); + if (std::find(VI.Kills.begin(), + VI.Kills.end(), MI) == VI.Kills.end()) + report("Kill missing from LiveVariables", MO, MONum); + } } + // Use of a dead register. if (!regsLive.count(Reg)) { if (TargetRegisterInfo::isPhysicalRegister(Reg)) { @@ -734,6 +807,41 @@ void MachineVerifier::calcMinRegsPassed( } } +// Calculate the set of virtual registers that must be passed through each basic +// block in order to satisfy the requirements of successor blocks. This is very +// similar to calcMaxRegsPassed, only backwards. +void MachineVerifier::calcRegsRequired() { + // First push live-in regs to predecessors' vregsRequired. + DenseSet todo; + for (MachineFunction::const_iterator MFI = MF->begin(), MFE = MF->end(); + MFI != MFE; ++MFI) { + const MachineBasicBlock &MBB(*MFI); + BBInfo &MInfo = MBBInfoMap[&MBB]; + for (MachineBasicBlock::const_pred_iterator PrI = MBB.pred_begin(), + PrE = MBB.pred_end(); PrI != PrE; ++PrI) { + BBInfo &PInfo = MBBInfoMap[*PrI]; + if (PInfo.addRequired(MInfo.vregsLiveIn)) + todo.insert(*PrI); + } + } + + // Iteratively push vregsRequired to predecessors. This will converge to the + // same final state regardless of DenseSet iteration order. + while (!todo.empty()) { + const MachineBasicBlock *MBB = *todo.begin(); + todo.erase(MBB); + BBInfo &MInfo = MBBInfoMap[MBB]; + for (MachineBasicBlock::const_pred_iterator PrI = MBB->pred_begin(), + PrE = MBB->pred_end(); PrI != PrE; ++PrI) { + if (*PrI == MBB) + continue; + BBInfo &SInfo = MBBInfoMap[*PrI]; + if (SInfo.addRequired(MInfo.vregsRequired)) + todo.insert(*PrI); + } + } +} + // Check PHI instructions at the beginning of MBB. It is assumed that // calcMinRegsPassed has been run so BBInfo::isLiveOut is valid. void MachineVerifier::checkPHIOps(const MachineBasicBlock *MBB) { @@ -849,4 +957,39 @@ void MachineVerifier::visitMachineFuncti } } } + + // Now check LiveVariables info if available + if (LiveVars) { + calcRegsRequired(); + verifyLiveVariables(); + } } + +void MachineVerifier::verifyLiveVariables() { + assert(LiveVars && "Don't call verifyLiveVariables without LiveVars"); + for (unsigned Reg = TargetRegisterInfo::FirstVirtualRegister, + RegE = MRI->getLastVirtReg()-1; Reg != RegE; ++Reg) { + LiveVariables::VarInfo &VI = LiveVars->getVarInfo(Reg); + for (MachineFunction::const_iterator MFI = MF->begin(), MFE = MF->end(); + MFI != MFE; ++MFI) { + BBInfo &MInfo = MBBInfoMap[MFI]; + + // Our vregsRequired should be identical to LiveVariables' AliveBlocks + if (MInfo.vregsRequired.count(Reg)) { + if (!VI.AliveBlocks.test(MFI->getNumber())) { + report("LiveVariables: Block missing from AliveBlocks", MFI); + *OS << "Virtual register %reg" << Reg + << " must be live through the block.\n"; + } + } else { + if (VI.AliveBlocks.test(MFI->getNumber())) { + report("LiveVariables: Block should not be in AliveBlocks", MFI); + *OS << "Virtual register %reg" << Reg + << " is not needed live through the block.\n"; + } + } + } + } +} + + Modified: vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -21,7 +21,6 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/RegAllocRegistry.h" #include "llvm/Function.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/SmallPtrSet.h" @@ -37,37 +36,17 @@ using namespace llvm; STATISTIC(NumAtomic, "Number of atomic phis lowered"); STATISTIC(NumSplits, "Number of critical edges split on demand"); -static cl::opt -SplitEdges("split-phi-edges", - cl::desc("Split critical edges during phi elimination"), - cl::init(false), cl::Hidden); - char PHIElimination::ID = 0; static RegisterPass X("phi-node-elimination", "Eliminate PHI nodes for register allocation"); const PassInfo *const llvm::PHIEliminationID = &X; -namespace llvm { FunctionPass *createLocalRegisterAllocator(); } - -// Should we run edge splitting? -static bool shouldSplitEdges() { - // Edge splitting breaks the local register allocator. It cannot tolerate - // LiveVariables being run. - if (RegisterRegAlloc::getDefault() == createLocalRegisterAllocator) - return false; - return SplitEdges; -} - void llvm::PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved(); AU.addPreserved(); - if (shouldSplitEdges()) { - AU.addRequired(); - } else { - AU.setPreservesCFG(); - AU.addPreservedID(MachineLoopInfoID); - } + // rdar://7401784 This would be nice: + // AU.addPreservedID(MachineLoopInfoID); MachineFunctionPass::getAnalysisUsage(AU); } @@ -79,9 +58,9 @@ bool llvm::PHIElimination::runOnMachineF bool Changed = false; // Split critical edges to help the coalescer - if (shouldSplitEdges()) + if (LiveVariables *LV = getAnalysisIfAvailable()) for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) - Changed |= SplitPHIEdges(Fn, *I); + Changed |= SplitPHIEdges(Fn, *I, *LV); // Populate VRegPHIUseCount analyzePHINodes(Fn); @@ -361,10 +340,11 @@ void llvm::PHIElimination::analyzePHINod } bool llvm::PHIElimination::SplitPHIEdges(MachineFunction &MF, - MachineBasicBlock &MBB) { + MachineBasicBlock &MBB, + LiveVariables &LV) { if (MBB.empty() || MBB.front().getOpcode() != TargetInstrInfo::PHI) return false; // Quick exit for basic blocks without PHIs. - LiveVariables &LV = getAnalysis(); + for (MachineBasicBlock::const_iterator BBI = MBB.begin(), BBE = MBB.end(); BBI != BBE && BBI->getOpcode() == TargetInstrInfo::PHI; ++BBI) { for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) { Modified: vendor/llvm/dist/lib/CodeGen/PHIElimination.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/PHIElimination.h Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/PHIElimination.h Thu Nov 19 08:59:28 2009 (r199511) @@ -90,7 +90,8 @@ namespace llvm { void analyzePHINodes(const MachineFunction& Fn); /// Split critical edges where necessary for good coalescer performance. - bool SplitPHIEdges(MachineFunction &MF, MachineBasicBlock &MBB); + bool SplitPHIEdges(MachineFunction &MF, MachineBasicBlock &MBB, + LiveVariables &LV); /// isLiveOut - Determine if Reg is live out from MBB, when not /// considering PHI nodes. This means that Reg is either killed by Modified: vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp Thu Nov 19 08:10:24 2009 (r199510) +++ vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp Thu Nov 19 08:59:28 2009 (r199511) @@ -59,11 +59,6 @@ PreSplitIntervals("pre-alloc-split", cl::desc("Pre-register allocation live interval splitting"), cl::init(false), cl::Hidden); -static cl::opt -NewSpillFramework("new-spill-framework", - cl::desc("New spilling framework"), - cl::init(false), cl::Hidden); - static RegisterRegAlloc linearscanRegAlloc("linearscan", "linear scan register allocator", createLinearScanRegisterAllocator); @@ -441,9 +436,7 @@ bool RALinScan::runOnMachineFunction(Mac vrm_ = &getAnalysis(); if (!rewriter_.get()) rewriter_.reset(createVirtRegRewriter()); - if (NewSpillFramework) { - spiller_.reset(createSpiller(mf_, li_, ls_, vrm_)); - } + spiller_.reset(createSpiller(mf_, li_, ls_, loopInfo, vrm_)); initIntervalSets(); @@ -1157,11 +1150,7 @@ void RALinScan::assignRegOrStackSlotAtIn SmallVector spillIs; std::vector added; - if (!NewSpillFramework) { - added = li_->addIntervalsForSpills(*cur, spillIs, loopInfo, *vrm_); - } else { - added = spiller_->spill(cur); - } + added = spiller_->spill(cur, spillIs); std::sort(added.begin(), added.end(), LISorter()); addStackInterval(cur, ls_, li_, mri_, *vrm_); @@ -1241,11 +1230,7 @@ void RALinScan::assignRegOrStackSlotAtIn earliestStartInterval : sli; std::vector newIs; - if (!NewSpillFramework) { - newIs = li_->addIntervalsForSpills(*sli, spillIs, loopInfo, *vrm_); - } else { - newIs = spiller_->spill(sli); - } + newIs = spiller_->spill(sli, spillIs); addStackInterval(sli, ls_, li_, mri_, *vrm_); std::copy(newIs.begin(), newIs.end(), std::back_inserter(added)); spilled.insert(sli->reg); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 09:00:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B4001065698; Thu, 19 Nov 2009 09:00:01 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 220798FC13; Thu, 19 Nov 2009 09:00:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ9010n099331; Thu, 19 Nov 2009 09:00:01 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJ900eg099314; Thu, 19 Nov 2009 09:00:00 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911190900.nAJ900eg099314@svn.freebsd.org> From: Roman Divacky Date: Thu, 19 Nov 2009 09:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199512 - in vendor/clang/dist: include/clang include/clang/AST include/clang/Analysis/PathSensitive/Checkers include/clang/Analysis/Visitors include/clang/Basic include/clang/Driver in... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 09:00:01 -0000 Author: rdivacky Date: Thu Nov 19 09:00:00 2009 New Revision: 199512 URL: http://svn.freebsd.org/changeset/base/199512 Log: Update clang to r89337. Added: vendor/clang/dist/include/clang/Driver/CC1Options.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/CMakeLists.txt vendor/clang/dist/include/clang/Driver/Makefile vendor/clang/dist/include/clang/Driver/OptParser.td vendor/clang/dist/include/clang/Driver/OptSpecifier.h vendor/clang/dist/include/clang/Driver/OptTable.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/lib/Driver/CC1Options.cpp vendor/clang/dist/lib/Driver/DriverOptions.cpp vendor/clang/dist/test/CXX/special/class.dtor/p2.cpp vendor/clang/dist/test/Index/complete-categories.m vendor/clang/dist/test/Index/complete-interfaces.m vendor/clang/dist/test/Index/complete-properties.m vendor/clang/dist/test/Index/complete-property-flags.m vendor/clang/dist/test/Index/complete-property-getset.m vendor/clang/dist/test/Parser/objc-synthesized-recover.m vendor/clang/dist/test/SemaCXX/cxx-member-pointer-op.cpp vendor/clang/dist/test/SemaObjC/class-protocol.m vendor/clang/dist/test/SemaObjC/no-warn-qual-mismatch.m vendor/clang/dist/test/SemaTemplate/instantiate-case.cpp vendor/clang/dist/tools/driver/cc1_main.cpp Deleted: vendor/clang/dist/include/clang/AST/CFG.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h vendor/clang/dist/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h vendor/clang/dist/include/clang/Driver/Options.def vendor/clang/dist/include/clang/Frontend/CompileOptions.h vendor/clang/dist/include/clang/Frontend/InitHeaderSearch.h vendor/clang/dist/include/clang/Frontend/InitPreprocessor.h vendor/clang/dist/include/clang/Frontend/ManagerRegistry.h Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/CMakeLists.txt vendor/clang/dist/include/clang/Driver/ArgList.h vendor/clang/dist/include/clang/Driver/Option.h vendor/clang/dist/include/clang/Driver/Options.h vendor/clang/dist/include/clang/Frontend/HeaderSearchOptions.h vendor/clang/dist/include/clang/Makefile vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGRtti.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/Driver/ArgList.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/OptTable.cpp vendor/clang/dist/lib/Driver/Option.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp vendor/clang/dist/test/CodeGen/libcalls.c vendor/clang/dist/test/Driver/analyze.c vendor/clang/dist/test/Driver/clang-translation.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/TestClassForwardDecl.m vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Sema/unused-expr.c vendor/clang/dist/test/SemaCXX/abstract.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/reinterpret-cast.cpp vendor/clang/dist/test/SemaCXX/rval-references.cpp vendor/clang/dist/test/SemaCXX/using-directive.cpp vendor/clang/dist/test/SemaTemplate/constructor-template.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/clang-cc/Options.cpp vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/driver.cpp Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Thu Nov 19 08:59:28 2009 (r199511) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Thu Nov 19 09:00:00 2009 (r199512) @@ -808,7 +808,7 @@ public: /// - myMethod; /// @end /// -/// Cateogries also allow you to split the implementation of a class across +/// Categories also allow you to split the implementation of a class across /// several files (a feature more naturally supported in C++). /// /// Categories were originally inspired by dynamic languages such as Common Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Diagnostic.h Thu Nov 19 08:59:28 2009 (r199511) +++ vendor/clang/dist/include/clang/Basic/Diagnostic.h Thu Nov 19 09:00:00 2009 (r199512) @@ -235,8 +235,8 @@ public: // Diagnostic characterization methods, used by a client to customize how // - DiagnosticClient *getClient() { return Client; }; - const DiagnosticClient *getClient() const { return Client; }; + DiagnosticClient *getClient() { return Client; } + const DiagnosticClient *getClient() const { return Client; } /// pushMappings - Copies the current DiagMappings and pushes the new copy Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Thu Nov 19 08:59:28 2009 (r199511) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Thu Nov 19 09:00:00 2009 (r199512) @@ -117,8 +117,6 @@ def err_expected_semi_after_static_asser "expected ';' after static_assert">; def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">; def err_expected_colon_after : Error<"expected ':' after %0">; -def err_pointer_to_member_type : Error< - "invalid use of pointer to member type after %0">; def err_label_end_of_compound_statement : Error< "label at end of compound statement: expected statement">; def err_expected_string_literal : Error<"expected string literal">; @@ -201,6 +199,8 @@ def warn_expected_implementation : Warni "@end must appear in an @implementation context">; def error_property_ivar_decl : Error< "property synthesize requires specification of an ivar">; +def err_synthesized_property_name : Error< + "expected a property name in @synthesize">; def warn_semicolon_before_method_body : Warning< "semicolon before method body is ignored">, InGroup>, DefaultIgnore; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Nov 19 08:59:28 2009 (r199511) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Nov 19 09:00:00 2009 (r199512) @@ -979,6 +979,8 @@ def err_template_arg_not_pointer_to_memb "non-type template argument is not a pointer to member constant">; def err_template_arg_extra_parens : Error< "non-type template argument cannot be surrounded by parentheses">; +def err_pointer_to_member_type : Error< + "invalid use of pointer to member type after %select{.*|->*}0">; // C++ template specialization def err_template_spec_unknown_kind : Error< @@ -1811,6 +1813,8 @@ def err_typecheck_bool_condition : Error "value of type %0 is not contextually convertible to 'bool'">; def err_typecheck_ambiguous_condition : Error< "conversion from %0 to %1 is ambiguous">; +def err_typecheck_nonviable_condition : Error< + "no viable conversion from %0 to %1 is possible">; def err_expected_class_or_namespace : Error<"expected a class or namespace">; def err_invalid_declarator_scope : Error< "definition or redeclaration of %0 not in a namespace enclosing %1">; Modified: vendor/clang/dist/include/clang/CMakeLists.txt ============================================================================== --- vendor/clang/dist/include/clang/CMakeLists.txt Thu Nov 19 08:59:28 2009 (r199511) +++ vendor/clang/dist/include/clang/CMakeLists.txt Thu Nov 19 09:00:00 2009 (r199512) @@ -1 +1,2 @@ add_subdirectory(Basic) +add_subdirectory(Driver) Modified: vendor/clang/dist/include/clang/Driver/ArgList.h ============================================================================== --- vendor/clang/dist/include/clang/Driver/ArgList.h Thu Nov 19 08:59:28 2009 (r199511) +++ vendor/clang/dist/include/clang/Driver/ArgList.h Thu Nov 19 09:00:00 2009 (r199512) @@ -10,8 +10,7 @@ #ifndef CLANG_DRIVER_ARGLIST_H_ #define CLANG_DRIVER_ARGLIST_H_ -#include "clang/Driver/Options.h" - +#include "clang/Driver/OptSpecifier.h" #include "clang/Driver/Util.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" @@ -26,6 +25,7 @@ namespace llvm { namespace clang { namespace driver { class Arg; + class Option; /// ArgList - Ordered collection of driver arguments. /// @@ -77,20 +77,26 @@ namespace driver { /// hasArg - Does the arg list contain any option matching \arg Id. /// /// \arg Claim Whether the argument should be claimed, if it exists. - bool hasArg(options::ID Id, bool Claim=true) const { - return getLastArg(Id, Claim) != 0; + bool hasArgNoClaim(OptSpecifier Id) const { + return getLastArgNoClaim(Id) != 0; + } + bool hasArg(OptSpecifier Id) const { + return getLastArg(Id) != 0; + } + bool hasArg(OptSpecifier Id0, OptSpecifier Id1) const { + return getLastArg(Id0, Id1) != 0; } - bool hasArg(options::ID Id0, options::ID Id1, bool Claim=true) const { - return getLastArg(Id0, Id1, Claim) != 0; + bool hasArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const { + return getLastArg(Id0, Id1, Id2) != 0; } /// getLastArg - Return the last argument matching \arg Id, or null. /// /// \arg Claim Whether the argument should be claimed, if it exists. - Arg *getLastArg(options::ID Id, bool Claim=true) const; - Arg *getLastArg(options::ID Id0, options::ID Id1, bool Claim=true) const; - Arg *getLastArg(options::ID Id0, options::ID Id1, options::ID Id2, - bool Claim=true) const; + Arg *getLastArgNoClaim(OptSpecifier Id) const; + Arg *getLastArg(OptSpecifier Id) const; + Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1) const; + Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const; /// getArgString - Return the input argument string at \arg Index. virtual const char *getArgString(unsigned Index) const = 0; @@ -102,24 +108,24 @@ namespace driver { /// negation is present, and \arg Default if neither option is /// given. If both the option and its negation are present, the /// last one wins. - bool hasFlag(options::ID Pos, options::ID Neg, bool Default=true) const; + bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const; /// AddLastArg - Render only the last argument match \arg Id0, if /// present. - void AddLastArg(ArgStringList &Output, options::ID Id0) const; + void AddLastArg(ArgStringList &Output, OptSpecifier Id0) const; /// AddAllArgs - Render all arguments matching the given ids. - void AddAllArgs(ArgStringList &Output, options::ID Id0) const; - void AddAllArgs(ArgStringList &Output, options::ID Id0, - options::ID Id1) const; - void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1, - options::ID Id2) const; + void AddAllArgs(ArgStringList &Output, OptSpecifier Id0) const; + void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, + OptSpecifier Id1) const; + void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1, + OptSpecifier Id2) const; /// AddAllArgValues - Render the argument values of all arguments /// matching the given ids. - void AddAllArgValues(ArgStringList &Output, options::ID Id0) const; - void AddAllArgValues(ArgStringList &Output, options::ID Id0, - options::ID Id1) const; + void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0) const; + void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0, + OptSpecifier Id1) const; /// AddAllArgsTranslated - Render all the arguments matching the /// given ids, but forced to separate args and using the provided @@ -127,13 +133,13 @@ namespace driver { /// /// \param Joined - If true, render the argument as joined with /// the option specifier. - void AddAllArgsTranslated(ArgStringList &Output, options::ID Id0, + void AddAllArgsTranslated(ArgStringList &Output, OptSpecifier Id0, const char *Translation, bool Joined = false) const; /// ClaimAllArgs - Claim all arguments which match the given /// option id. - void ClaimAllArgs(options::ID Id0) const; + void ClaimAllArgs(OptSpecifier Id0) const; /// @} /// @name Arg Synthesis Added: vendor/clang/dist/include/clang/Driver/CC1Options.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Driver/CC1Options.h Thu Nov 19 09:00:00 2009 (r199512) @@ -0,0 +1,34 @@ +//===--- CC1Options.h - Clang CC1 Options Table -----------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef CLANG_DRIVER_CC1OPTIONS_H +#define CLANG_DRIVER_CC1OPTIONS_H + +namespace clang { +namespace driver { + class OptTable; + +namespace cc1options { + enum ID { + OPT_INVALID = 0, // This is not an option ID. + OPT_INPUT, // Reserved ID for input option. + OPT_UNKNOWN, // Reserved ID for unknown option. +#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \ + HELPTEXT, METAVAR) OPT_##ID, +#include "clang/Driver/CC1Options.inc" + LastOption +#undef OPTION + }; +} + + OptTable *createCC1OptTable(); +} +} + +#endif Added: vendor/clang/dist/include/clang/Driver/CC1Options.td ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Driver/CC1Options.td Thu Nov 19 09:00:00 2009 (r199512) @@ -0,0 +1,26 @@ +//===--- CC1Options.td - Options for clang -cc1 ---------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the options accepted by clang -cc1. +// +//===----------------------------------------------------------------------===// + +// Include the common option parsing interfaces. +include "OptParser.td" + +// Target Options + +def target_abi : Separate<"-target-abi">, + HelpText<"Target a particular ABI type">; +def target_cpu : Separate<"-mcpu">, + HelpText<"Target a specific cpu type (-mcpu=help for details)">; +def target_features : Separate<"-target-feature">, + HelpText<"Target specific attributes">; +def target_triple : Separate<"-triple">, + HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; Added: vendor/clang/dist/include/clang/Driver/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Driver/CMakeLists.txt Thu Nov 19 09:00:00 2009 (r199512) @@ -0,0 +1,11 @@ +set(LLVM_TARGET_DEFINITIONS Options.td) +tablegen(Options.inc + -gen-opt-parser-defs) +add_custom_target(ClangDriverOptions + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Options.inc) + +set(LLVM_TARGET_DEFINITIONS CC1Options.td) +tablegen(CC1Options.inc + -gen-opt-parser-defs) +add_custom_target(ClangCC1Options + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/CC1Options.inc) Added: vendor/clang/dist/include/clang/Driver/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Driver/Makefile Thu Nov 19 09:00:00 2009 (r199512) @@ -0,0 +1,16 @@ +LEVEL = ../../../../.. +BUILT_SOURCES = Options.inc CC1Options.inc + +TABLEGEN_INC_FILES_COMMON = 1 + +include $(LEVEL)/Makefile.common + +$(ObjDir)/Options.inc.tmp : Options.td OptParser.td $(ObjDir)/.dir + $(Echo) "Building Clang Driver Option tables with tblgen" + $(Verb) $(TableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $< + +$(ObjDir)/CC1Options.inc.tmp : CC1Options.td OptParser.td $(ObjDir)/.dir + $(Echo) "Building Clang CC1 Option tables with tblgen" + $(Verb) $(TableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $< + + Added: vendor/clang/dist/include/clang/Driver/OptParser.td ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Driver/OptParser.td Thu Nov 19 09:00:00 2009 (r199512) @@ -0,0 +1,116 @@ +//===--- OptParser.td - Common Option Parsing Interfaces ------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the common interfaces used by the option parsing TableGen +// backend. +// +//===----------------------------------------------------------------------===// + +// Define the kinds of options. + +class OptionKind { + string Name = name; + // The kind precedence, kinds with lower precedence are matched first. + int Precedence = predecence; +} + +// An option group. +def KIND_GROUP : OptionKind<"Group">; +// A flag with no values. +def KIND_FLAG : OptionKind<"Flag">; +// An option which prefixes its (single) value. +def KIND_JOINED : OptionKind<"Joined", 1>; +// An option which is followed by its value. +def KIND_SEPARATE : OptionKind<"Separate">; +// An option followed by its values, which are separated by commas. +def KIND_COMMAJOINED : OptionKind<"CommaJoined">; +// An option which is which takes multiple (separate) arguments. +def KIND_MULTIARG : OptionKind<"MultiArg">; +// An option which is either joined to its (non-empty) value, or followed by its +// value. +def KIND_JOINED_OR_SEPARATE : OptionKind<"JoinedOrSeparate">; +// An option which is both joined to its (first) value, and followed by its +// (second) value. +def KIND_JOINED_AND_SEPARATE : OptionKind<"JoinedAndSeparate">; + +// Define the option flags. + +class OptionFlag {} + +// DriverOption - The option is a "driver" option, and should not be forwarded +// to gcc. +def DriverOption : OptionFlag; + +// LinkerInput - The option is a linker input. +def LinkerInput : OptionFlag; + +// NoArgumentUnused - Don't report argument unused warnings for this option; this +// is useful for options like -static or -dynamic which a user may always end up +// passing, even if the platform defaults to (or only supports) that option. +def NoArgumentUnused : OptionFlag; + +// RenderAsInput - The option should not render the name when rendered as an +// input (i.e., the option is rendered as values). +def RenderAsInput : OptionFlag; + +// RenderJoined - The option should be rendered joined, even if separate (only +// sensible on single value separate options). +def RenderJoined : OptionFlag; + +// RenderSeparate - The option should be rendered separately, even if joined +// (only sensible on joined options). +def RenderSeparate : OptionFlag; + +// Unsupported - The option is unsupported, and the driver will reject command +// lines that use it. +def Unsupported : OptionFlag; + +// Define the option group class. + +class OptionGroup { + string EnumName = ?; // Uses the def name if undefined. + string Name = name; + OptionGroup Group = ?; +} + +// Define the option class. + +class Option { + string EnumName = ?; // Uses the def name if undefined. + string Name = name; + OptionKind Kind = kind; + // Used by MultiArg option kind. + int NumArgs = 0; + string HelpText = ?; + string MetaVarName = ?; + list Flags = []; + OptionGroup Group = ?; + Option Alias = ?; +} + +// Helpers for defining options. + +class Flag : Option; +class Joined : Option; +class Separate : Option; +class CommaJoined : Option; +class MultiArg : Option { + int NumArgs = numargs; +} +class JoinedOrSeparate : Option; +class JoinedAndSeparate : Option; + +// Mix-ins for adding optional attributes. + +class Alias">; +def d_Group : OptionGroup<"">; +def f_Group : OptionGroup<"">; +def g_Group : OptionGroup<"">; +def i_Group : OptionGroup<"">; +def clang_i_Group : OptionGroup<"">, Group; +def m_Group : OptionGroup<"">; +def m_x86_Features_Group : OptionGroup<"">; +def u_Group : OptionGroup<"">; + +def pedantic_Group : OptionGroup<"">; + +// Temporary groups for clang options which we know we don't support, +// but don't want to verbosely warn the user about. +def clang_ignored_f_Group : OptionGroup<"">, + Group; +def clang_ignored_m_Group : OptionGroup<"">, + Group; + +///////// +// Options + +// The internal option ID must be a valid C++ identifier and results in a +// clang::driver::options::OPT_XX enum constant for XX. +// +// We want to unambiguously be able to refer to options from the driver source +// code, for this reason the option name is mangled into an ID. This mangling +// isn't guaranteed to have an inverse, but for practical purposes it does. +// +// The mangling scheme is to ignore the leading '-', and perform the following +// substitutions: +// _ => __ +// - => _ +// # => _HASH +// , => _COMMA +// = => _EQ +// C++ => CXX + +def _HASH_HASH_HASH : Flag<"-###">, Flags<[DriverOption]>, + HelpText<"Print the commands to run for this compilation">; +def A : JoinedOrSeparate<"-A">; +def B : JoinedOrSeparate<"-B">, Flags<[Unsupported]>; +def CC : Flag<"-CC">; +def C : Flag<"-C">; +def D : JoinedOrSeparate<"-D">; +def E : Flag<"-E">, Flags<[DriverOption]>, + HelpText<"Only run the preprocessor">; +def F : JoinedOrSeparate<"-F">; +def H : Flag<"-H">; +def I_ : Flag<"-I-">, Group; +def I : JoinedOrSeparate<"-I">, Group; +def L : JoinedOrSeparate<"-L">; +def MD : Flag<"-MD">, Group; +def MF : JoinedOrSeparate<"-MF">, Group; +def MG : Flag<"-MG">, Group; +def MMD : Flag<"-MMD">, Group; +def MM : Flag<"-MM">, Group; +def MP : Flag<"-MP">, Group; +def MQ : JoinedOrSeparate<"-MQ">, Group; +def MT : JoinedOrSeparate<"-MT">, Group; +def Mach : Flag<"-Mach">; +def M : Flag<"-M">, Group; +def O4 : Joined<"-O4">, Group; +def ObjCXX : Flag<"-ObjC++">, Flags<[DriverOption]>, + HelpText<"Treat source input files as Objective-C++ inputs">; +def ObjC : Flag<"-ObjC">, Flags<[DriverOption]>, + HelpText<"Treat source input files as Objective-C inputs">; +def O : Joined<"-O">, Group; +def P : Flag<"-P">; +def Qn : Flag<"-Qn">; +def Qunused_arguments : Flag<"-Qunused-arguments">, Flags<[DriverOption]>, + HelpText<"Don't emit warning for unused driver arguments">; +def Q : Flag<"-Q">; +def R : Flag<"-R">; +def S : Flag<"-S">, Flags<[DriverOption]>, + HelpText<"Only run preprocess and compilation steps">; +def Tbss : JoinedOrSeparate<"-Tbss">, Group; +def Tdata : JoinedOrSeparate<"-Tdata">, Group; +def Ttext : JoinedOrSeparate<"-Ttext">, Group; +def T : JoinedOrSeparate<"-T">, Group; +def U : JoinedOrSeparate<"-U">; +def V : JoinedOrSeparate<"-V">, Flags<[DriverOption, Unsupported]>; +def Wa_COMMA : CommaJoined<"-Wa,">, + HelpText<"Pass the comma separated arguments in to the assembler">, + MetaVarName<"">; +def Wall : Flag<"-Wall">, Group; +def Wextra : Flag<"-Wextra">, Group; +def Wl_COMMA : CommaJoined<"-Wl,">, Flags<[LinkerInput, RenderAsInput]>, + HelpText<"Pass the comma separated arguments in to the linker">, + MetaVarName<"">; +def Wno_nonportable_cfstrings : Joined<"-Wno-nonportable-cfstrings">, Group; +def Wnonportable_cfstrings : Joined<"-Wnonportable-cfstrings">, Group; +def Wp_COMMA : CommaJoined<"-Wp,">, + HelpText<"Pass the comma separated arguments in to the preprocessor">, + MetaVarName<"">; +def W_Joined : Joined<"-W">, Group; +def Xanalyzer : Separate<"-Xanalyzer">, + HelpText<"Pass to the static analyzer">, MetaVarName<"">; +def Xarch__ : JoinedAndSeparate<"-Xarch_">, Flags<[DriverOption]>; +def Xassembler : Separate<"-Xassembler">, + HelpText<"Pass to the assembler">, MetaVarName<"">; +def Xclang : Separate<"-Xclang">, + HelpText<"Pass to the clang compiler">, MetaVarName<"">; +def Xlinker : Separate<"-Xlinker">, Flags<[LinkerInput, RenderAsInput]>, + HelpText<"Pass to the linker">, MetaVarName<"">; +def Xpreprocessor : Separate<"-Xpreprocessor">, + HelpText<"Pass to the preprocessor">, MetaVarName<"">; +def X_Flag : Flag<"-X">; +def X_Joined : Joined<"-X">; +def Z_Flag : Flag<"-Z">; +def Z_Joined : Joined<"-Z">; +def all__load : Flag<"-all_load">; +def allowable__client : Separate<"-allowable_client">; +def ansi : Flag<"-ansi">, Group; +def arch__errors__fatal : Flag<"-arch_errors_fatal">; +def arch : Separate<"-arch">, Flags<[DriverOption]>; +def a : Joined<"-a">, Group; +def bind__at__load : Flag<"-bind_at_load">; +def bundle__loader : Separate<"-bundle_loader">; +def bundle : Flag<"-bundle">; +def b : JoinedOrSeparate<"-b">, Flags<[Unsupported]>; +def client__name : JoinedOrSeparate<"-client_name">; +def combine : Flag<"-combine">, Flags<[DriverOption, Unsupported]>; +def compatibility__version : JoinedOrSeparate<"-compatibility_version">; +def coverage : Flag<"-coverage">; +def cpp_precomp : Flag<"-cpp-precomp">; +def current__version : JoinedOrSeparate<"-current_version">; +def c : Flag<"-c">, Flags<[DriverOption]>, + HelpText<"Only run preprocess, compile, and assemble steps">; +def dA : Flag<"-dA">, Group; +def dD : Flag<"-dD">, Group; +def dM : Flag<"-dM">, Group; +def dead__strip : Flag<"-dead_strip">; +def dependency_file : Separate<"-dependency-file">; +def dumpmachine : Flag<"-dumpmachine">, Flags<[Unsupported]>; +def dumpspecs : Flag<"-dumpspecs">, Flags<[Unsupported]>; +def dumpversion : Flag<"-dumpversion">; +def dylib__file : Separate<"-dylib_file">; +def dylinker__install__name : JoinedOrSeparate<"-dylinker_install_name">; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 09:07:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1F91065696; Thu, 19 Nov 2009 09:07:01 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0A448FC0A; Thu, 19 Nov 2009 09:07:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJ971rr099551; Thu, 19 Nov 2009 09:07:01 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJ971uv099550; Thu, 19 Nov 2009 09:07:01 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911190907.nAJ971uv099550@svn.freebsd.org> From: Roman Divacky Date: Thu, 19 Nov 2009 09:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199513 - in vendor/llvm/dist/include/llvm: . Analysis Support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 09:07:01 -0000 Author: rdivacky Date: Thu Nov 19 09:07:01 2009 New Revision: 199513 URL: http://svn.freebsd.org/changeset/base/199513 Log: Remove includes that were removed upstream. Deleted: vendor/llvm/dist/include/llvm/Analysis/MallocHelper.h vendor/llvm/dist/include/llvm/IntrinsicsBlackfin.td vendor/llvm/dist/include/llvm/Support/AIXDataTypesFix.h From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 11:55:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DD04106566C; Thu, 19 Nov 2009 11:55:20 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0E18FC0C; Thu, 19 Nov 2009 11:55:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJBtJ5Z005582; Thu, 19 Nov 2009 11:55:19 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJBtJRT005580; Thu, 19 Nov 2009 11:55:19 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191155.nAJBtJRT005580@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 11:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199518 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 11:55:20 -0000 Author: bms Date: Thu Nov 19 11:55:19 2009 New Revision: 199518 URL: http://svn.freebsd.org/changeset/base/199518 Log: Adapt the fix for IGMPv2 in r199287 for the IPv6 stack. Only multicast routing is affected by the issue. MFC after: 1 day Modified: head/sys/netinet6/raw_ip6.c Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Thu Nov 19 11:16:37 2009 (r199517) +++ head/sys/netinet6/raw_ip6.c Thu Nov 19 11:55:19 2009 (r199518) @@ -213,17 +213,39 @@ rip6_input(struct mbuf **mp, int *offp, */ if (in6p->in6p_moptions && IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - struct sockaddr_in6 mcaddr; + /* + * If the incoming datagram is for MLD, allow it + * through unconditionally to the raw socket. + * + * Use the M_RTALERT_MLD flag to check for MLD + * traffic without having to inspect the mbuf chain + * more deeply, as all MLDv1/v2 host messages MUST + * contain the Router Alert option. + * + * In the case of MLDv1, we may not have explicitly + * joined the group, and may have set IFF_ALLMULTI + * on the interface. im6o_mc_filter() may discard + * control traffic we actually need to see. + * + * Userland multicast routing daemons should continue + * filter the control traffic appropriately. + */ int blocked; - bzero(&mcaddr, sizeof(struct sockaddr_in6)); - mcaddr.sin6_len = sizeof(struct sockaddr_in6); - mcaddr.sin6_family = AF_INET6; - mcaddr.sin6_addr = ip6->ip6_dst; - - blocked = im6o_mc_filter(in6p->in6p_moptions, ifp, - (struct sockaddr *)&mcaddr, - (struct sockaddr *)&fromsa); + blocked = MCAST_PASS; + if ((m->m_flags & M_RTALERT_MLD) == 0) { + struct sockaddr_in6 mcaddr; + + bzero(&mcaddr, sizeof(struct sockaddr_in6)); + mcaddr.sin6_len = sizeof(struct sockaddr_in6); + mcaddr.sin6_family = AF_INET6; + mcaddr.sin6_addr = ip6->ip6_dst; + + blocked = im6o_mc_filter(in6p->in6p_moptions, + ifp, + (struct sockaddr *)&mcaddr, + (struct sockaddr *)&fromsa); + } if (blocked != MCAST_PASS) { IP6STAT_INC(ip6s_notmember); continue; From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 12:07:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF4A21065679; Thu, 19 Nov 2009 12:07:00 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DDEF8FC21; Thu, 19 Nov 2009 12:07:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJC704g005873; Thu, 19 Nov 2009 12:07:00 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJC70Rh005871; Thu, 19 Nov 2009 12:07:00 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200911191207.nAJC70Rh005871@svn.freebsd.org> From: Takahashi Yoshihiro Date: Thu, 19 Nov 2009 12:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199519 - stable/8/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 12:07:00 -0000 Author: nyan Date: Thu Nov 19 12:07:00 2009 New Revision: 199519 URL: http://svn.freebsd.org/changeset/base/199519 Log: MFC: revision 199219 Fix cpu model for PODP5V83. It is P24T, not P54T. Also remove redundant 'Overdrive' word. Modified: stable/8/sys/i386/i386/identcpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/i386/identcpu.c ============================================================================== --- stable/8/sys/i386/i386/identcpu.c Thu Nov 19 11:55:19 2009 (r199518) +++ stable/8/sys/i386/i386/identcpu.c Thu Nov 19 12:07:00 2009 (r199519) @@ -265,7 +265,7 @@ printcpuinfo(void) strcat(cpu_model, "/P54C"); break; case 0x30: - strcat(cpu_model, "/P54T Overdrive"); + strcat(cpu_model, "/P24T"); break; case 0x40: strcat(cpu_model, "/P55C"); From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 12:08:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C08106566B; Thu, 19 Nov 2009 12:08:17 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E39788FC25; Thu, 19 Nov 2009 12:08:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJC8G1I005936; Thu, 19 Nov 2009 12:08:16 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJC8GeS005934; Thu, 19 Nov 2009 12:08:16 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200911191208.nAJC8GeS005934@svn.freebsd.org> From: Takahashi Yoshihiro Date: Thu, 19 Nov 2009 12:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199520 - stable/7/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 12:08:17 -0000 Author: nyan Date: Thu Nov 19 12:08:16 2009 New Revision: 199520 URL: http://svn.freebsd.org/changeset/base/199520 Log: MFC: revision 199219 Fix cpu model for PODP5V83. It is P24T, not P54T. Also remove redundant 'Overdrive' word. Modified: stable/7/sys/i386/i386/identcpu.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Thu Nov 19 12:07:00 2009 (r199519) +++ stable/7/sys/i386/i386/identcpu.c Thu Nov 19 12:08:16 2009 (r199520) @@ -265,7 +265,7 @@ printcpuinfo(void) strcat(cpu_model, "/P54C"); break; case 0x30: - strcat(cpu_model, "/P54T Overdrive"); + strcat(cpu_model, "/P24T"); break; case 0x40: strcat(cpu_model, "/P55C"); From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 12:10:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD1D91065694; Thu, 19 Nov 2009 12:10:34 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA478FC15; Thu, 19 Nov 2009 12:10:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJCAYLD006018; Thu, 19 Nov 2009 12:10:34 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJCAYNe006016; Thu, 19 Nov 2009 12:10:34 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200911191210.nAJCAYNe006016@svn.freebsd.org> From: Takahashi Yoshihiro Date: Thu, 19 Nov 2009 12:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199521 - stable/6/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 12:10:34 -0000 Author: nyan Date: Thu Nov 19 12:10:34 2009 New Revision: 199521 URL: http://svn.freebsd.org/changeset/base/199521 Log: MFC: revision 199219 Fix cpu model for PODP5V83. It is P24T, not P54T. Also remove redundant 'Overdrive' word. Modified: stable/6/sys/i386/i386/identcpu.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/i386/i386/identcpu.c ============================================================================== --- stable/6/sys/i386/i386/identcpu.c Thu Nov 19 12:08:16 2009 (r199520) +++ stable/6/sys/i386/i386/identcpu.c Thu Nov 19 12:10:34 2009 (r199521) @@ -247,7 +247,7 @@ printcpuinfo(void) strcat(cpu_model, "/P54C"); break; case 0x30: - strcat(cpu_model, "/P54T Overdrive"); + strcat(cpu_model, "/P24T"); break; case 0x40: strcat(cpu_model, "/P55C"); From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 12:18:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 408F8106568D; Thu, 19 Nov 2009 12:18:31 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3050C8FC18; Thu, 19 Nov 2009 12:18:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJCIVq0006228; Thu, 19 Nov 2009 12:18:31 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJCIV2u006226; Thu, 19 Nov 2009 12:18:31 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191218.nAJCIV2u006226@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 12:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199522 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 12:18:31 -0000 Author: bms Date: Thu Nov 19 12:18:30 2009 New Revision: 199522 URL: http://svn.freebsd.org/changeset/base/199522 Log: Adapt r197130 to IPv6 stack: Fix an obvious logic error in the IPv4 multicast leave processing, where the filter mode vector was not updated correctly after the leave. MFC after: 1 day Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Nov 19 12:10:34 2009 (r199521) +++ head/sys/netinet6/in6_mcast.c Thu Nov 19 12:18:30 2009 (r199522) @@ -2272,8 +2272,10 @@ out_im6f_rollback: if (is_final) { /* Remove the gap in the membership array. */ - for (++idx; idx < imo->im6o_num_memberships; ++idx) + for (++idx; idx < imo->im6o_num_memberships; ++idx) { imo->im6o_membership[idx-1] = imo->im6o_membership[idx]; + imo->im6o_mfilters[idx-1] = imo->im6o_mfilters[idx]; + } imo->im6o_num_memberships--; } From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 12:21:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2A81065670; Thu, 19 Nov 2009 12:21:20 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 885188FC12; Thu, 19 Nov 2009 12:21:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJCLKdn006383; Thu, 19 Nov 2009 12:21:20 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJCLKox006381; Thu, 19 Nov 2009 12:21:20 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191221.nAJCLKox006381@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 12:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199523 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 12:21:20 -0000 Author: bms Date: Thu Nov 19 12:21:20 2009 New Revision: 199523 URL: http://svn.freebsd.org/changeset/base/199523 Log: Adapt r197314 to IPv6 stack: Return ENOBUFS consistently if user attempts to exceed in_mcast_maxsocksrc resource limit. MFC after: 1 day Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Nov 19 12:18:30 2009 (r199522) +++ head/sys/netinet6/in6_mcast.c Thu Nov 19 12:21:20 2009 (r199523) @@ -2342,9 +2342,11 @@ in6p_set_source_filters(struct inpcb *in if (error) return (error); - if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc || - (msfr.msfr_fmode != MCAST_EXCLUDE && - msfr.msfr_fmode != MCAST_INCLUDE)) + if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc) + return (ENOBUFS); + + if (msfr.msfr_fmode != MCAST_EXCLUDE && + msfr.msfr_fmode != MCAST_INCLUDE) return (EINVAL); if (msfr.msfr_group.ss_family != AF_INET6 || From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 13:21:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 462771065670; Thu, 19 Nov 2009 13:21:38 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 362308FC08; Thu, 19 Nov 2009 13:21:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJDLc5x007666; Thu, 19 Nov 2009 13:21:38 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJDLc4d007664; Thu, 19 Nov 2009 13:21:38 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191321.nAJDLc4d007664@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 13:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199525 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 13:21:38 -0000 Author: bms Date: Thu Nov 19 13:21:37 2009 New Revision: 199525 URL: http://svn.freebsd.org/changeset/base/199525 Log: Correct a comment. MFC after: 1 day Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Thu Nov 19 12:51:19 2009 (r199524) +++ head/sys/netinet/in_mcast.c Thu Nov 19 13:21:37 2009 (r199525) @@ -1967,7 +1967,7 @@ inp_join_group(struct inpcb *inp, struct imf = &imo->imo_mfilters[idx]; if (ssa->ss.ss_family != AF_UNSPEC) { /* - * MCAST_JOIN_SOURCE on an exclusive membership + * MCAST_JOIN_SOURCE_GROUP on an exclusive membership * is an error. On an existing inclusive membership, * it just adds the source to the filter list. */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 13:30:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4908E106566C; Thu, 19 Nov 2009 13:30:07 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38B3A8FC17; Thu, 19 Nov 2009 13:30:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJDU7kI007904; Thu, 19 Nov 2009 13:30:07 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJDU72V007902; Thu, 19 Nov 2009 13:30:07 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191330.nAJDU72V007902@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 13:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199526 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 13:30:07 -0000 Author: bms Date: Thu Nov 19 13:30:06 2009 New Revision: 199526 URL: http://svn.freebsd.org/changeset/base/199526 Log: Adapt r197132 to IPv6 stack: Tighten input checking in in6p_join_group(): * Don't try to use the source address, when its family is unspecified. * If we get a join without a source, on an existing inclusive mode group, this is an error, as it would change the filter mode. Fix a problem with the handling of in6_mfilter for new memberships: * Do not rely on im6f being NULL; it is explicitly initialized to a non-NULL pointer when constructing a membership. * Explicitly initialize *im6f to EX mode when the source address is unspecified. This fixes a problem with in_mfilter slot recycling in the join path. MFC after: 1 day Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Nov 19 13:21:37 2009 (r199525) +++ head/sys/netinet6/in6_mcast.c Thu Nov 19 13:30:06 2009 (r199526) @@ -1917,11 +1917,6 @@ in6p_join_group(struct inpcb *inp, struc */ (void)in6_setscope(&gsa->sin6.sin6_addr, ifp, NULL); - /* - * MCAST_JOIN_SOURCE on an exclusive membership is an error. - * On an existing inclusive membership, it just adds the - * source to the filter list. - */ imo = in6p_findmoptions(inp); idx = im6o_match_group(imo, ifp, &gsa->sa); if (idx == -1) { @@ -1929,15 +1924,33 @@ in6p_join_group(struct inpcb *inp, struc } else { inm = imo->im6o_membership[idx]; imf = &imo->im6o_mfilters[idx]; - if (ssa->ss.ss_family != AF_UNSPEC && - imf->im6f_st[1] != MCAST_INCLUDE) { - error = EINVAL; - goto out_in6p_locked; - } - lims = im6o_match_source(imo, idx, &ssa->sa); - if (lims != NULL) { - error = EADDRNOTAVAIL; - goto out_in6p_locked; + if (ssa->ss.ss_family != AF_UNSPEC) { + /* + * MCAST_JOIN_SOURCE_GROUP on an exclusive membership + * is an error. On an existing inclusive membership, + * it just adds the source to the filter list. + */ + if (imf->im6f_st[1] != MCAST_INCLUDE) { + error = EINVAL; + goto out_in6p_locked; + } + /* Throw out duplicates. */ + lims = im6o_match_source(imo, idx, &ssa->sa); + if (lims != NULL) { + error = EADDRNOTAVAIL; + goto out_in6p_locked; + } + } else { + /* + * MCAST_JOIN_GROUP on an existing inclusive + * membership is an error; if you want to change + * filter mode, you must use the userland API + * setsourcefilter(). + */ + if (imf->im6f_st[1] == MCAST_INCLUDE) { + error = EINVAL; + goto out_in6p_locked; + } } } @@ -1970,7 +1983,8 @@ in6p_join_group(struct inpcb *inp, struc /* * Graft new source into filter list for this inpcb's * membership of the group. The in6_multi may not have - * been allocated yet if this is a new membership. + * been allocated yet if this is a new membership, however, + * the in_mfilter slot will be allocated and must be initialized. */ if (ssa->ss.ss_family != AF_UNSPEC) { /* Membership starts in IN mode */ @@ -1987,6 +2001,12 @@ in6p_join_group(struct inpcb *inp, struc error = ENOMEM; goto out_im6o_free; } + } else { + /* No address specified; Membership starts in EX mode */ + if (is_new) { + CTR1(KTR_MLD, "%s: new join w/o source", __func__); + im6f_init(imf, MCAST_UNDEFINED, MCAST_EXCLUDE); + } } /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 13:33:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A2FE1065693; Thu, 19 Nov 2009 13:33:24 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4A4D8FC0C; Thu, 19 Nov 2009 13:33:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJDXNQw008049; Thu, 19 Nov 2009 13:33:23 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJDXNvT008047; Thu, 19 Nov 2009 13:33:23 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191333.nAJDXNvT008047@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 13:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199527 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 13:33:24 -0000 Author: bms Date: Thu Nov 19 13:33:23 2009 New Revision: 199527 URL: http://svn.freebsd.org/changeset/base/199527 Log: Adapt r197135 to IPv6 stack: Don't allow joins w/o source on an existing group. This is almost always pilot error. We don't need to check for group filter UNDEFINED state at t1, because we only ever allocate filters with their groups, so we unconditionally reject such calls with EINVAL. Trying to change the active filter mode w/o going through IPV6_MSFILTER is also disallowed. MFC after: 1 day Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Nov 19 13:30:06 2009 (r199526) +++ head/sys/netinet6/in6_mcast.c Thu Nov 19 13:33:23 2009 (r199527) @@ -1942,15 +1942,18 @@ in6p_join_group(struct inpcb *inp, struc } } else { /* - * MCAST_JOIN_GROUP on an existing inclusive - * membership is an error; if you want to change - * filter mode, you must use the userland API - * setsourcefilter(). + * MCAST_JOIN_GROUP alone, on any existing membership, + * is rejected, to stop the same inpcb tying up + * multiple refs to the in_multi. + * On an existing inclusive membership, this is also + * an error; if you want to change filter mode, + * you must use the userland API setsourcefilter(). + * XXX We don't reject this for imf in UNDEFINED + * state at t1, because allocation of a filter + * is atomic with allocation of a membership. */ - if (imf->im6f_st[1] == MCAST_INCLUDE) { - error = EINVAL; - goto out_in6p_locked; - } + error = EINVAL; + goto out_in6p_locked; } } @@ -1985,6 +1988,9 @@ in6p_join_group(struct inpcb *inp, struc * membership of the group. The in6_multi may not have * been allocated yet if this is a new membership, however, * the in_mfilter slot will be allocated and must be initialized. + * + * Note: Grafting of exclusive mode filters doesn't happen + * in this path. */ if (ssa->ss.ss_family != AF_UNSPEC) { /* Membership starts in IN mode */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 13:39:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B773F106566B; Thu, 19 Nov 2009 13:39:07 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A749E8FC18; Thu, 19 Nov 2009 13:39:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJDd7TO008197; Thu, 19 Nov 2009 13:39:07 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJDd7MS008195; Thu, 19 Nov 2009 13:39:07 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191339.nAJDd7MS008195@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 13:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199528 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 13:39:07 -0000 Author: bms Date: Thu Nov 19 13:39:07 2009 New Revision: 199528 URL: http://svn.freebsd.org/changeset/base/199528 Log: Adapt r197136 to IPv6 stack: Comment some flawed assumptions in in6p_join_group() about mixing SSM full-state and delta-based APIs. MFC after: 1 day Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Nov 19 13:33:23 2009 (r199527) +++ head/sys/netinet6/in6_mcast.c Thu Nov 19 13:39:07 2009 (r199528) @@ -1814,6 +1814,7 @@ in6p_join_group(struct inpcb *inp, struc ifp = NULL; imf = NULL; + lims = NULL; error = 0; is_new = 0; @@ -1934,9 +1935,25 @@ in6p_join_group(struct inpcb *inp, struc error = EINVAL; goto out_in6p_locked; } - /* Throw out duplicates. */ + /* + * Throw out duplicates. + * + * XXX FIXME: This makes a naive assumption that + * even if entries exist for *ssa in this imf, + * they will be rejected as dupes, even if they + * are not valid in the current mode (in-mode). + * + * in6_msource is transactioned just as for anything + * else in SSM -- but note naive use of in6m_graft() + * below for allocating new filter entries. + * + * This is only an issue if someone mixes the + * full-state SSM API with the delta-based API, + * which is discouraged in the relevant RFCs. + */ lims = im6o_match_source(imo, idx, &ssa->sa); - if (lims != NULL) { + if (lims != NULL /*&& + lims->im6sl_st[1] == MCAST_INCLUDE*/) { error = EADDRNOTAVAIL; goto out_in6p_locked; } @@ -1991,6 +2008,8 @@ in6p_join_group(struct inpcb *inp, struc * * Note: Grafting of exclusive mode filters doesn't happen * in this path. + * XXX: Should check for non-NULL lims (node exists but may + * not be in-mode) for interop with full-state API. */ if (ssa->ss.ss_family != AF_UNSPEC) { /* Membership starts in IN mode */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 14:33:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461F51065707; Thu, 19 Nov 2009 14:33:04 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 369B48FC0A; Thu, 19 Nov 2009 14:33:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJEX33Y009273; Thu, 19 Nov 2009 14:33:03 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJEX3GH009271; Thu, 19 Nov 2009 14:33:03 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200911191433.nAJEX3GH009271@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 19 Nov 2009 14:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199529 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 14:33:04 -0000 Author: jh Date: Thu Nov 19 14:33:03 2009 New Revision: 199529 URL: http://svn.freebsd.org/changeset/base/199529 Log: Extend ddb(4) "show mount" command to print active string mount options. Note that only option names are printed, not values. Reviewed by: pjd Approved by: trasz (mentor) MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Nov 19 13:39:07 2009 (r199528) +++ head/sys/kern/vfs_subr.c Thu Nov 19 14:33:03 2009 (r199529) @@ -2761,6 +2761,7 @@ DB_SHOW_COMMAND(vnode, db_show_vnode) DB_SHOW_COMMAND(mount, db_show_mount) { struct mount *mp; + struct vfsopt *opt; struct statfs *sp; struct vnode *vp; char buf[512]; @@ -2866,6 +2867,18 @@ DB_SHOW_COMMAND(mount, db_show_mount) } db_printf(" mnt_kern_flag = %s\n", buf); + db_printf(" mnt_opt = "); + opt = TAILQ_FIRST(mp->mnt_opt); + if (opt != NULL) { + db_printf("%s", opt->name); + opt = TAILQ_NEXT(opt, link); + while (opt != NULL) { + db_printf(", %s", opt->name); + opt = TAILQ_NEXT(opt, link); + } + } + db_printf("\n"); + sp = &mp->mnt_stat; db_printf(" mnt_stat = { version=%u type=%u flags=0x%016jx " "bsize=%ju iosize=%ju blocks=%ju bfree=%ju bavail=%jd files=%ju " From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 15:28:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3808106568B; Thu, 19 Nov 2009 15:28:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8B7E8FC1E; Thu, 19 Nov 2009 15:28:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJFS8CX010419; Thu, 19 Nov 2009 15:28:08 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJFS8bD010417; Thu, 19 Nov 2009 15:28:08 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911191528.nAJFS8bD010417@svn.freebsd.org> From: Rui Paulo Date: Thu, 19 Nov 2009 15:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199530 - stable/8/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 15:28:10 -0000 Author: rpaulo Date: Thu Nov 19 15:28:08 2009 New Revision: 199530 URL: http://svn.freebsd.org/changeset/base/199530 Log: MFC 199232: Add a missing check for Apple HFS partitions. Modified: stable/8/sys/geom/part/g_part_gpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/8/sys/geom/part/g_part_gpt.c Thu Nov 19 14:33:03 2009 (r199529) +++ stable/8/sys/geom/part/g_part_gpt.c Thu Nov 19 15:28:08 2009 (r199530) @@ -708,6 +708,8 @@ g_part_gpt_type(struct g_part_table *bas return (g_part_alias_name(G_PART_ALIAS_FREEBSD_ZFS)); if (EQUUID(type, &gpt_uuid_mbr)) return (g_part_alias_name(G_PART_ALIAS_MBR)); + if (EQUUID(type, &gpt_uuid_apple_hfs)) + return (g_part_alias_name(G_PART_ALIAS_APPLE_HFS)); buf[0] = '!'; snprintf_uuid(buf + 1, bufsz - 1, type); return (buf); From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 15:45:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 798FF1065676; Thu, 19 Nov 2009 15:45:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69FA68FC12; Thu, 19 Nov 2009 15:45:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJFjOnl010827; Thu, 19 Nov 2009 15:45:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJFjOBN010824; Thu, 19 Nov 2009 15:45:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911191545.nAJFjOBN010824@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 19 Nov 2009 15:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199531 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 15:45:24 -0000 Author: jkim Date: Thu Nov 19 15:45:24 2009 New Revision: 199531 URL: http://svn.freebsd.org/changeset/base/199531 Log: Fix tinderbox build for i386 and sync amd64 with it. Modified: head/sys/amd64/amd64/bpf_jit_machdep.c head/sys/i386/i386/bpf_jit_machdep.c Modified: head/sys/amd64/amd64/bpf_jit_machdep.c ============================================================================== --- head/sys/amd64/amd64/bpf_jit_machdep.c Thu Nov 19 15:28:08 2009 (r199530) +++ head/sys/amd64/amd64/bpf_jit_machdep.c Thu Nov 19 15:45:24 2009 (r199531) @@ -491,7 +491,7 @@ bpf_jit_compile(struct bpf_insn *prog, u #ifdef _KERNEL stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT, - M_NOWAIT, 0, ~0ULL, 16, 0); + M_NOWAIT, 0, ~0UL, 16, 0); if (stream.ibuf == NULL) break; #else Modified: head/sys/i386/i386/bpf_jit_machdep.c ============================================================================== --- head/sys/i386/i386/bpf_jit_machdep.c Thu Nov 19 15:28:08 2009 (r199530) +++ head/sys/i386/i386/bpf_jit_machdep.c Thu Nov 19 15:45:24 2009 (r199531) @@ -514,7 +514,7 @@ bpf_jit_compile(struct bpf_insn *prog, u #ifdef _KERNEL stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT, - M_NOWAIT, 0, ~0ULL, 16, 0); + M_NOWAIT, 0, ~0UL, 16, 0); if (stream.ibuf == NULL) break; #else From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 16:15:21 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4D258106566B; Thu, 19 Nov 2009 16:15:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Robert Watson Date: Thu, 19 Nov 2009 11:15:01 -0500 User-Agent: KMail/1.6.2 References: <200911182340.nAINeJ3W087652@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911191115.11088.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 16:15:21 -0000 On Thursday 19 November 2009 03:26 am, Robert Watson wrote: > On Wed, 18 Nov 2009, Jung-uk Kim wrote: > > - Change internal function bpf_jit_compile() to return allocated > > size of the generated binary and remove page size limitation for > > userland. - Use contigmalloc(9)/contigfree(9) instead of > > malloc(9)/free(9) to make sure the generated binary aligns > > properly and make it physically contiguous. > > Is physical contiguity actually required here -- I would have > thought virtual contiguity and alignment would be sufficient, in > which case the normal trick is to allocate using malloc the size + > min-align + 1 and then fudge the pointer forward until it's > properly aligned. I don't believe it is strictly necessary but I assumed it might have performance benefit for very big BPF programs although I have not measured it. Also, contigmalloc(9)/contigfree(9) is too obvious to ignore for this purpose. :-) > Also, in 9.x I'm going to be looking at parallel execution within > BPF descriptors, and I notice that the JIT compiles the register > array pointer into the generated code, rather than allowing a > pointer to be passed in to each instance. I guess it's non-trivial > to change that, suggesting that we have a pool of compiled > instances, but it would be preferable to be able to do what the > normal BPF code does: allocate a per-thread register block when > needed. It is non-trivial but certainly not impossible. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 16:19:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08AE31065679; Thu, 19 Nov 2009 16:19:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECCAB8FC12; Thu, 19 Nov 2009 16:19:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJGJ5a2011570; Thu, 19 Nov 2009 16:19:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJGJ5N5011567; Thu, 19 Nov 2009 16:19:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911191619.nAJGJ5N5011567@svn.freebsd.org> From: Alexander Motin Date: Thu, 19 Nov 2009 16:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199532 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 16:19:06 -0000 Author: mav Date: Thu Nov 19 16:19:05 2009 New Revision: 199532 URL: http://svn.freebsd.org/changeset/base/199532 Log: Add ada(4) man page. Added: head/share/man/man4/ada.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Nov 19 15:45:24 2009 (r199531) +++ head/share/man/man4/Makefile Thu Nov 19 16:19:05 2009 (r199532) @@ -15,6 +15,7 @@ MAN= aac.4 \ ${_acpi_toshiba.4} \ acpi_video.4 \ ${_acpi_wmi.4} \ + ada.4 \ adv.4 \ adw.4 \ ae.4 \ Added: head/share/man/man4/ada.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ada.4 Thu Nov 19 16:19:05 2009 (r199532) @@ -0,0 +1,138 @@ +.\" Copyright (c) 2009 Alexander Motin +.\" 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 November 19, 2009 +.Dt ADA 4 +.Os +.Sh NAME +.Nm ada +.Nd ATA Direct Access device driver +.Sh SYNOPSIS +.Cd device ada +.Sh DESCRIPTION +The +.Nm +driver provides support for direct access devices, implementing +.Tn ATA +command protocol, that are attached to the system through a host adapter +supported by CAM subsystem. +.Pp +Host adapter must also be separately configured into the system before a +.Tn ATA +direct access device can be configured. +.Sh COMMAND QUEUING +Command queueing allows the device to process multiple transactions +concurrently, often re-ordering them to reduce the number and length of +seeks. +.Tn ATA +defines two types of queueing: +.Tn TCQ (Tagged Command Queueing, PATA legacy) +and +.Tn NCQ (Native Command Queueing, SATA). +The +.Nm +device driver takes full advantage of the NCQ, when supported. +To ensure that transactions to distant portions of the media, +which may be deferred indefinitely by servicing requests nearer the current +head position, are completed in a timely fashion, an ordered +transaction is sent every 7 seconds during continuous device operation. +.Sh CACHE EFFECTS +Many direct access devices are equipped with read and/or write caches. +Parameters affecting the device's cache are reported in device IDENTIFY data +and can be examined and modified via the +.Xr camcontrol 8 +utility. +.Pp +The read cache is used to store data from device-initiated read ahead +operations as well as frequently used data. +The read cache is transparent +to the user and can be enabled without any adverse effect. +Most devices +with a read cache come from the factory with it enabled. +.Pp +The write cache can greatly decrease the latency of write operations +and allows the device to reorganize writes to increase efficiency and +performance. +This performance gain comes at a price. +Should the device +lose power while its cache contains uncommitted write operations, these +writes will be lost. +The effect of a loss of write transactions on +a file system is non-deterministic and can cause corruption. +Most +devices age write transactions to limit vulnerability to a few transactions +recently reported as complete, but it is none-the-less recommended that +systems with write cache enabled devices reside on an Uninterruptible +Power Supply (UPS). +The +.Nm +device driver ensures that the cache and media are synchronized upon +final close of the device or an unexpected shutdown (panic) event. +This ensures that it is safe to disconnect power once the operating system +has reported that it has halted. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width 12 +.It kern.cam.ada.retry_count +.Pp +This variable determines how many times the +.Nm +driver will retry a READ or WRITE command. +This does not affect the number of retries used during probe time or for +the +.Nm +driver dump routine. +This value currently defaults to 4. +.It kern.cam.ada.default_timeout +.Pp +This variable determines how long the +.Nm +driver will wait before timing out an outstanding command. +The units for this value are seconds, and the default is currently 30 +seconds. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/ada*" -compact +.It Pa /dev/ada* +ATA device nodes +.El +.Sh SEE ALSO +.Xr ahci 4 , +.Xr siis 4 , +.Xr ad 4 +.Xr da 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 16:21:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1816410656C0; Thu, 19 Nov 2009 16:21:27 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08D1E8FC1C; Thu, 19 Nov 2009 16:21:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJGLQS7011672; Thu, 19 Nov 2009 16:21:26 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJGLQNp011670; Thu, 19 Nov 2009 16:21:26 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200911191621.nAJGLQNp011670@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 19 Nov 2009 16:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199533 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 16:21:27 -0000 Author: raj Date: Thu Nov 19 16:21:26 2009 New Revision: 199533 URL: http://svn.freebsd.org/changeset/base/199533 Log: Fix cpuid output on E500 core. Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Thu Nov 19 16:19:05 2009 (r199532) +++ head/sys/powerpc/powerpc/cpu.c Thu Nov 19 16:21:26 2009 (r199533) @@ -429,6 +429,8 @@ cpu_e500_setup(int cpuid, uint16_t vers) { register_t hid0; + printf("\n"); + hid0 = mfspr(SPR_HID0); printf("cpu%d: HID0 %b", cpuid, (int)hid0, HID0_E500_BITMASK); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 16:25:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 866EA106568B; Thu, 19 Nov 2009 16:25:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7772D8FC1C; Thu, 19 Nov 2009 16:25:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJGPf7p011866; Thu, 19 Nov 2009 16:25:41 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJGPfx7011864; Thu, 19 Nov 2009 16:25:41 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200911191625.nAJGPfx7011864@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 19 Nov 2009 16:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199534 - head/sys/boot/uboot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 16:25:41 -0000 Author: raj Date: Thu Nov 19 16:25:41 2009 New Revision: 199534 URL: http://svn.freebsd.org/changeset/base/199534 Log: Provide an effective (relocated) address when building modules metadata. This lets modules loaded dynamically in loader(8) work for U-Boot-based platforms. MFC after: 1 week Modified: head/sys/boot/uboot/common/metadata.c Modified: head/sys/boot/uboot/common/metadata.c ============================================================================== --- head/sys/boot/uboot/common/metadata.c Thu Nov 19 16:21:26 2009 (r199533) +++ head/sys/boot/uboot/common/metadata.c Thu Nov 19 16:25:41 2009 (r199534) @@ -231,6 +231,7 @@ md_copymodules(vm_offset_t addr) struct preloaded_file *fp; struct file_metadata *md; int c; + vm_offset_t a; c = addr != 0; /* start with the first module on the list, should be the kernel */ @@ -240,7 +241,8 @@ md_copymodules(vm_offset_t addr) MOD_TYPE(addr, fp->f_type, c); if (fp->f_args) MOD_ARGS(addr, fp->f_args, c); - MOD_ADDR(addr, fp->f_addr, c); + a = fp->f_addr - __elfN(relocation_offset); + MOD_ADDR(addr, a, c); MOD_SIZE(addr, fp->f_size, c); for (md = fp->f_metadata; md != NULL; md = md->md_next) { if (!(md->md_type & MODINFOMD_NOCOPY)) From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 16:26:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C72B9106566B; Thu, 19 Nov 2009 16:26:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B849A8FC24; Thu, 19 Nov 2009 16:26:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJGQ7j2011916; Thu, 19 Nov 2009 16:26:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJGQ70v011914; Thu, 19 Nov 2009 16:26:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911191626.nAJGQ70v011914@svn.freebsd.org> From: Alexander Motin Date: Thu, 19 Nov 2009 16:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199535 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 16:26:07 -0000 Author: mav Date: Thu Nov 19 16:26:07 2009 New Revision: 199535 URL: http://svn.freebsd.org/changeset/base/199535 Log: Tune CAM ATA kernel options a bit. Move PMP support from da to scbus and add ada device option, according to man page. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Nov 19 16:25:41 2009 (r199534) +++ head/sys/conf/files Thu Nov 19 16:26:07 2009 (r199535) @@ -112,12 +112,12 @@ cam/cam_sim.c optional scbus cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus +cam/ata/ata_pmp.c optional scbus cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch -cam/ata/ata_da.c optional da -cam/ata/ata_pmp.c optional da +cam/ata/ata_da.c optional ada | da cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ct | ncv | nsp | stg cam/scsi/scsi_low_pisa.c optional ct | ncv | nsp | stg From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 16:27:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54E1210656A7; Thu, 19 Nov 2009 16:27:52 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 432888FC14; Thu, 19 Nov 2009 16:27:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJGRq4d011997; Thu, 19 Nov 2009 16:27:52 GMT (envelope-from mr@svn.freebsd.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJGRqae011985; Thu, 19 Nov 2009 16:27:52 GMT (envelope-from mr@svn.freebsd.org) Message-Id: <200911191627.nAJGRqae011985@svn.freebsd.org> From: Michael Reifenberger Date: Thu, 19 Nov 2009 16:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199536 - in head/tools/tools/nanobsd/pcengines: . Files Files/etc Files/root Files/usr Files/usr/ports Pkg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 16:27:52 -0000 Author: mr Date: Thu Nov 19 16:27:51 2009 New Revision: 199536 URL: http://svn.freebsd.org/changeset/base/199536 Log: Add nanobsd example for the PC Engines ALIX board (serial console). Added: head/tools/tools/nanobsd/pcengines/ head/tools/tools/nanobsd/pcengines/ALIX_DSK (contents, props changed) head/tools/tools/nanobsd/pcengines/ALIX_NFS (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/ head/tools/tools/nanobsd/pcengines/Files/etc/ head/tools/tools/nanobsd/pcengines/Files/etc/rc.conf (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/etc/ttys (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/ head/tools/tools/nanobsd/pcengines/Files/root/.cshrc (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/.k5login (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/.login (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/change_password (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/save_cfg (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/save_sshkeys (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/updatep1 (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/root/updatep2 (contents, props changed) head/tools/tools/nanobsd/pcengines/Files/usr/ head/tools/tools/nanobsd/pcengines/Files/usr/ports/ head/tools/tools/nanobsd/pcengines/Files/usr/ports/.keepme (contents, props changed) head/tools/tools/nanobsd/pcengines/Pkg/ head/tools/tools/nanobsd/pcengines/alix_dsk.conf (contents, props changed) head/tools/tools/nanobsd/pcengines/alix_nfs.conf (contents, props changed) head/tools/tools/nanobsd/pcengines/build.sh (contents, props changed) head/tools/tools/nanobsd/pcengines/common.conf (contents, props changed) head/tools/tools/nanobsd/pcengines/test.sh (contents, props changed) Added: head/tools/tools/nanobsd/pcengines/ALIX_DSK ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/ALIX_DSK Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,113 @@ +# +# $FreeBSD$ +# + +cpu I586_CPU +ident ALIX_DSK +makeoptions DEBUG=-g +options CPU_GEODE +options SCHED_ULE +options PREEMPTION +options INET +options INET6 +options FFS +options SOFTUPDATES +options UFS_ACL +options UFS_DIRHASH +options NFSCLIENT +options NFSLOCKD +options MSDOSFS +options CD9660 +options PROCFS +options PSEUDOFS +options GEOM_PART_GPT +options GEOM_LABEL +options COMPAT_43TTY +options COMPAT_FREEBSD7 +options SCSI_DELAY=5000 +options SYSVSHM +options SYSVMSG +options SYSVSEM +options P1003_1B_SEMAPHORES +options _KPOSIX_PRIORITY_SCHEDULING +options PRINTF_BUFR_SIZE=128 +device apic +device pci +device fdc +device ata +device atadisk +device atapicd +device atapist +options ATA_STATIC_ID +device scbus +device da +device sa +device cd +device pass +device uart +device em +device miibus +device vr +device wlan +options IEEE80211_DEBUG +options IEEE80211_AMPDU_AGE +options IEEE80211_SUPPORT_MESH +device wlan_wep +device wlan_ccmp +device wlan_tkip +device wlan_amrr +device an +device ath +device ath_hal +options AH_SUPPORT_AR5416 +device ath_rate_sample +device wi +device loop +device random +device ether +device tun +device pty +device md +device gif +device faith +device firmware +device bpf +device uhci +device ohci +device ehci +device usb +device ulpt +device umass +device u3g +device ubsa +device uftdi + +options INCLUDE_CONFIG_FILE + +options ALTQ +options ALTQ_CBQ +options ALTQ_RED +options ALTQ_RIO +options ALTQ_HFSC +options ALTQ_CDNR +options ALTQ_PRIQ + +device pf +device pflog +device pfsync +device carp +device if_bridge + +options DEVICE_POLLING + +options NETGRAPH +options NETGRAPH_BPF +options NETGRAPH_ETHER +options NETGRAPH_IFACE +options NETGRAPH_PPP +options NETGRAPH_PPPOE +options NETGRAPH_PPTPGRE +options NETGRAPH_MPPC_ENCRYPTION +options NETGRAPH_SOCKET +options NETGRAPH_KSOCKET +options NETGRAPH_VJC Added: head/tools/tools/nanobsd/pcengines/ALIX_NFS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/ALIX_NFS Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,121 @@ +# +# $FreeBSD$ +# + +cpu I586_CPU +ident ALIX_DSK +makeoptions DEBUG=-g +options CPU_GEODE +options SCHED_ULE +options PREEMPTION +options INET +options INET6 +options FFS +options SOFTUPDATES +options UFS_ACL +options UFS_DIRHASH +options NFSCLIENT +options NFSLOCKD +options MSDOSFS +options CD9660 +options PROCFS +options PSEUDOFS +options GEOM_PART_GPT +options GEOM_LABEL +options COMPAT_43TTY +options COMPAT_FREEBSD7 +options SCSI_DELAY=5000 +options SYSVSHM +options SYSVMSG +options SYSVSEM +options P1003_1B_SEMAPHORES +options _KPOSIX_PRIORITY_SCHEDULING +options PRINTF_BUFR_SIZE=128 +device apic +device pci +device fdc +device ata +device atadisk +device atapicd +device atapist +options ATA_STATIC_ID +device scbus +device da +device sa +device cd +device pass +device uart +device em +device miibus +device vr +device wlan +options IEEE80211_DEBUG +options IEEE80211_AMPDU_AGE +options IEEE80211_SUPPORT_MESH +device wlan_wep +device wlan_ccmp +device wlan_tkip +device wlan_amrr +device an +device ath +device ath_hal +options AH_SUPPORT_AR5416 +device ath_rate_sample +device wi +device loop +device random +device ether +device tun +device pty +device md +device gif +device faith +device firmware +device bpf +device uhci +device ohci +device ehci +device usb +device ulpt +device umass +device u3g +device ubsa +device uftdi + +options INCLUDE_CONFIG_FILE + +options ALTQ +options ALTQ_CBQ +options ALTQ_RED +options ALTQ_RIO +options ALTQ_HFSC +options ALTQ_CDNR +options ALTQ_PRIQ + +device pf +device pflog +device pfsync +device carp +device if_bridge + +options DEVICE_POLLING + +options NETGRAPH +options NETGRAPH_BPF +options NETGRAPH_ETHER +options NETGRAPH_IFACE +options NETGRAPH_PPP +options NETGRAPH_PPPOE +options NETGRAPH_PPTPGRE +options NETGRAPH_MPPC_ENCRYPTION +options NETGRAPH_SOCKET +options NETGRAPH_KSOCKET +options NETGRAPH_VJC + +options NFS_ROOT +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=fxp0 +#options BOOTP_WIRED_TO=ath0 +options BOOTP_COMPAT Added: head/tools/tools/nanobsd/pcengines/Files/etc/rc.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/etc/rc.conf Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,13 @@ +# +# $FreeBSD$ +# + +hostname="alix" +ifconfig_vr0="DHCP" +ifconfig_em0="DHCP" + +sshd_enable="YES" +#ntpdate_enable="YES" +#ntpdate_hosts="1.0.0.0" +#ntpd_enable="YES" +#ntpd_sync_on_start="YES" Added: head/tools/tools/nanobsd/pcengines/Files/etc/ttys ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/etc/ttys Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,565 @@ +# +# $FreeBSD$ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is typically xterm, but +# vt220 will work better if you need interoperability with other +# systems like Solaris or GNU/Linux. +# Other common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" xterm off secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" xterm off secure +ttyv2 "/usr/libexec/getty Pc" xterm off secure +ttyv3 "/usr/libexec/getty Pc" xterm off secure +ttyv4 "/usr/libexec/getty Pc" xterm off secure +ttyv5 "/usr/libexec/getty Pc" xterm off secure +ttyv6 "/usr/libexec/getty Pc" xterm off secure +ttyv7 "/usr/libexec/getty Pc" xterm off secure +ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyu0 "/usr/libexec/getty std.9600" xterm on secure +ttyd1 "/usr/libexec/getty std.9600" dialup off secure +ttyd2 "/usr/libexec/getty std.9600" dialup off secure +ttyd3 "/usr/libexec/getty std.9600" dialup off secure +# Dumb console +dcons "/usr/libexec/getty std.9600" vt100 off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network +ttyl0 none network +ttyl1 none network +ttyl2 none network +ttyl3 none network +ttyl4 none network +ttyl5 none network +ttyl6 none network +ttyl7 none network +ttyl8 none network +ttyl9 none network +ttyla none network +ttylb none network +ttylc none network +ttyld none network +ttyle none network +ttylf none network +ttylg none network +ttylh none network +ttyli none network +ttylj none network +ttylk none network +ttyll none network +ttylm none network +ttyln none network +ttylo none network +ttylp none network +ttylq none network +ttylr none network +ttyls none network +ttylt none network +ttylu none network +ttylv none network +ttym0 none network +ttym1 none network +ttym2 none network +ttym3 none network +ttym4 none network +ttym5 none network +ttym6 none network +ttym7 none network +ttym8 none network +ttym9 none network +ttyma none network +ttymb none network +ttymc none network +ttymd none network +ttyme none network +ttymf none network +ttymg none network +ttymh none network +ttymi none network +ttymj none network +ttymk none network +ttyml none network +ttymm none network +ttymn none network +ttymo none network +ttymp none network +ttymq none network +ttymr none network +ttyms none network +ttymt none network +ttymu none network +ttymv none network +ttyn0 none network +ttyn1 none network +ttyn2 none network +ttyn3 none network +ttyn4 none network +ttyn5 none network +ttyn6 none network +ttyn7 none network +ttyn8 none network +ttyn9 none network +ttyna none network +ttynb none network +ttync none network +ttynd none network +ttyne none network +ttynf none network +ttyng none network +ttynh none network +ttyni none network +ttynj none network +ttynk none network +ttynl none network +ttynm none network +ttynn none network +ttyno none network +ttynp none network +ttynq none network +ttynr none network +ttyns none network +ttynt none network +ttynu none network +ttynv none network +ttyo0 none network +ttyo1 none network +ttyo2 none network +ttyo3 none network +ttyo4 none network +ttyo5 none network +ttyo6 none network +ttyo7 none network +ttyo8 none network +ttyo9 none network +ttyoa none network +ttyob none network +ttyoc none network +ttyod none network +ttyoe none network +ttyof none network +ttyog none network +ttyoh none network +ttyoi none network +ttyoj none network +ttyok none network +ttyol none network +ttyom none network +ttyon none network +ttyoo none network +ttyop none network +ttyoq none network +ttyor none network +ttyos none network +ttyot none network +ttyou none network +ttyov none network +ttyL0 none network +ttyL1 none network +ttyL2 none network +ttyL3 none network +ttyL4 none network +ttyL5 none network +ttyL6 none network +ttyL7 none network +ttyL8 none network +ttyL9 none network +ttyLa none network +ttyLb none network +ttyLc none network +ttyLd none network +ttyLe none network +ttyLf none network +ttyLg none network +ttyLh none network +ttyLi none network +ttyLj none network +ttyLk none network +ttyLl none network +ttyLm none network +ttyLn none network +ttyLo none network +ttyLp none network +ttyLq none network +ttyLr none network +ttyLs none network +ttyLt none network +ttyLu none network +ttyLv none network +ttyM0 none network +ttyM1 none network +ttyM2 none network +ttyM3 none network +ttyM4 none network +ttyM5 none network +ttyM6 none network +ttyM7 none network +ttyM8 none network +ttyM9 none network +ttyMa none network +ttyMb none network +ttyMc none network +ttyMd none network +ttyMe none network +ttyMf none network +ttyMg none network +ttyMh none network +ttyMi none network +ttyMj none network +ttyMk none network +ttyMl none network +ttyMm none network +ttyMn none network +ttyMo none network +ttyMp none network +ttyMq none network +ttyMr none network +ttyMs none network +ttyMt none network +ttyMu none network +ttyMv none network +ttyN0 none network +ttyN1 none network +ttyN2 none network +ttyN3 none network +ttyN4 none network +ttyN5 none network +ttyN6 none network +ttyN7 none network +ttyN8 none network +ttyN9 none network +ttyNa none network +ttyNb none network +ttyNc none network +ttyNd none network +ttyNe none network +ttyNf none network +ttyNg none network +ttyNh none network +ttyNi none network +ttyNj none network +ttyNk none network +ttyNl none network +ttyNm none network +ttyNn none network +ttyNo none network +ttyNp none network +ttyNq none network +ttyNr none network +ttyNs none network +ttyNt none network +ttyNu none network +ttyNv none network +ttyO0 none network +ttyO1 none network +ttyO2 none network +ttyO3 none network +ttyO4 none network +ttyO5 none network +ttyO6 none network +ttyO7 none network +ttyO8 none network +ttyO9 none network +ttyOa none network +ttyOb none network +ttyOc none network +ttyOd none network +ttyOe none network +ttyOf none network +ttyOg none network +ttyOh none network +ttyOi none network +ttyOj none network +ttyOk none network +ttyOl none network +ttyOm none network +ttyOn none network +ttyOo none network +ttyOp none network +ttyOq none network +ttyOr none network +ttyOs none network +ttyOt none network +ttyOu none network +ttyOv none network Added: head/tools/tools/nanobsd/pcengines/Files/root/.cshrc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/root/.cshrc Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,35 @@ +# $FreeBSD$ +# +# .cshrc - csh resource script, read at beginning of execution by each shell +# +# see also csh(1), environ(7). +# + +alias h history 25 +alias j jobs -l +alias la ls -a +alias lf ls -FA +alias ll ls -lA + +# A righteous umask +umask 22 + +set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin) + +setenv EDITOR vi +setenv PAGER more +setenv BLOCKSIZE K + +if ($?prompt) then + # An interactive shell -- set some stuff up + set prompt = "`/bin/hostname -s`# " + set filec + set history = 100 + set savehist = 100 + set mail = (/var/mail/$USER) + if ( $?tcsh ) then + bindkey "^W" backward-delete-word + bindkey -k up history-search-backward + bindkey -k down history-search-forward + endif +endif Added: head/tools/tools/nanobsd/pcengines/Files/root/.k5login ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/root/.k5login Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +# user1/root@YOUR.REALM.WHEREVER +# user2/root@YOUR.REALM.WHEREVER Added: head/tools/tools/nanobsd/pcengines/Files/root/.login ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/root/.login Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# .login - csh login script, read by login shell, after `.cshrc' at login. +# +# see also csh(1), environ(7). +# + +# Uncomment to display a random cookie each login: +# [ -x /usr/games/fortune ] && /usr/games/fortune -s Added: head/tools/tools/nanobsd/pcengines/Files/root/change_password ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/root/change_password Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Copyright (c) 2004-2005 Poul-Henning Kamp. +# 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$ +# + +set -e + +passwd root + +cfgslice=`grep '/cfg' /etc/fstab | cut -d \ -f 1` + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +cp /etc/master.passwd /etc/passwd /etc/pwd.db /etc/spwd.db /etc/group /cfg +umount /cfg +trap 1 2 15 EXIT Added: head/tools/tools/nanobsd/pcengines/Files/root/save_cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/root/save_cfg Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (c) 2006 Mathieu Arnold +# 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$ +# + +set -e + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +( +cd /cfg +for i in "$@" `find * -type f` +do + cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i +done +) +umount /cfg +trap 1 2 15 EXIT Added: head/tools/tools/nanobsd/pcengines/Files/root/save_sshkeys ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/pcengines/Files/root/save_sshkeys Thu Nov 19 16:27:51 2009 (r199536) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Copyright (c) 2004-2005 Poul-Henning Kamp. +# 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$ +# *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 18:11:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43B2E106568F; Thu, 19 Nov 2009 18:11:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1899D8FC1C; Thu, 19 Nov 2009 18:11:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJIBNI1014363; Thu, 19 Nov 2009 18:11:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJIBNU4014359; Thu, 19 Nov 2009 18:11:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911191811.nAJIBNU4014359@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 18:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199537 - in head/sys: arm/at91 dev/nxge dev/wl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 18:11:24 -0000 Author: jhb Date: Thu Nov 19 18:11:23 2009 New Revision: 199537 URL: http://svn.freebsd.org/changeset/base/199537 Log: These drivers only set if_timer but never set if_watchdog. Just remove the assignments to if_timer. Modified: head/sys/arm/at91/if_ate.c head/sys/dev/nxge/if_nxge.c head/sys/dev/wl/if_wl.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Thu Nov 19 16:27:51 2009 (r199536) +++ head/sys/arm/at91/if_ate.c Thu Nov 19 18:11:23 2009 (r199537) @@ -276,7 +276,6 @@ ate_attach(device_t dev) IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - ifp->if_timer = 0; ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); sc->mibdata.dot3Compliance = DOT3COMPLIANCE_COLLS; @@ -999,7 +998,6 @@ atestop(struct ate_softc *sc) ATE_ASSERT_LOCKED(sc); ifp = sc->ifp; if (ifp) { - ifp->if_timer = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); } Modified: head/sys/dev/nxge/if_nxge.c ============================================================================== --- head/sys/dev/nxge/if_nxge.c Thu Nov 19 16:27:51 2009 (r199536) +++ head/sys/dev/nxge/if_nxge.c Thu Nov 19 18:11:23 2009 (r199537) @@ -2946,7 +2946,6 @@ xge_flush_txds(xge_hal_channel_h channel struct ifnet *ifnetp = lldev->ifnetp; u8 t_code; - ifnetp->if_timer = 0; while(xge_hal_fifo_dtr_next_completed(channelh, &tx_dtr, &t_code) == XGE_HAL_OK) { XGE_DRV_STATS(tx_desc_compl); @@ -3105,7 +3104,6 @@ _exit1: XGE_DRV_STATS(tx_again); _exit: - ifnetp->if_timer = 15; } /** @@ -3269,8 +3267,6 @@ xge_tx_compl(xge_hal_channel_h channelh, XGE_DRV_STATS(tx_completions); - ifnetp->if_timer = 0; - /* * For each completed descriptor: Get private structure, free buffer, * do unmapping, and free descriptor Modified: head/sys/dev/wl/if_wl.c ============================================================================== --- head/sys/dev/wl/if_wl.c Thu Nov 19 16:27:51 2009 (r199536) +++ head/sys/dev/wl/if_wl.c Thu Nov 19 18:11:23 2009 (r199537) @@ -559,10 +559,8 @@ wlattach(device_t device) ifp->if_init = wlinit; ifp->if_start = wlstart; ifp->if_ioctl = wlioctl; - ifp->if_timer = 0; /* paranoia */ ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; /* no entries - ifp->if_watchdog ifp->if_done ifp->if_reset */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 18:21:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 754F81065670; Thu, 19 Nov 2009 18:21:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 648488FC0C; Thu, 19 Nov 2009 18:21:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJILpQN014637; Thu, 19 Nov 2009 18:21:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJILpZ6014634; Thu, 19 Nov 2009 18:21:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911191821.nAJILpZ6014634@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 18:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199538 - head/sys/dev/lmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 18:21:51 -0000 Author: jhb Date: Thu Nov 19 18:21:51 2009 New Revision: 199538 URL: http://svn.freebsd.org/changeset/base/199538 Log: This driver has two modes, a netgraph mode and an ifnet mode. In the netgraph mode it used a private timer to drive the transmit watchdog. In the ifnet mode it used if_watchdog. Now it always uses the private timer. Modified: head/sys/dev/lmc/if_lmc.c head/sys/dev/lmc/if_lmc.h Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Thu Nov 19 18:11:23 2009 (r199537) +++ head/sys/dev/lmc/if_lmc.c Thu Nov 19 18:21:51 2009 (r199538) @@ -4642,8 +4642,9 @@ lmc_raw_output(struct ifnet *ifp, struct /* Called from a softirq once a second. */ static void -lmc_ifnet_watchdog(struct ifnet *ifp) +lmc_watchdog(void *arg) { + struct ifnet *ifp = arg; softc_t *sc = IFP2SC(ifp); u_int8_t old_oper_status = sc->status.oper_status; struct event_cntrs *cntrs = &sc->status.cntrs; @@ -4734,7 +4735,7 @@ lmc_ifnet_watchdog(struct ifnet *ifp) # endif /* Call this procedure again after one second. */ - ifp->if_timer = 1; + callout_reset(&sc->callout, hz, lmc_watchdog, ifp); } # ifdef __OpenBSD__ @@ -4822,8 +4823,6 @@ setup_ifnet(struct ifnet *ifp) ifp->if_start = lmc_ifnet_start; /* sppp changes this */ ifp->if_output = lmc_raw_output; /* sppp & p2p change this */ ifp->if_input = lmc_raw_input; - ifp->if_watchdog = lmc_ifnet_watchdog; - ifp->if_timer = 1; ifp->if_mtu = MAX_DESC_LEN; /* sppp & p2p change this */ ifp->if_type = IFT_PTPSERIAL; /* p2p changes this */ @@ -4917,6 +4916,8 @@ lmc_ifnet_attach(softc_t *sc) } # endif /* __OpenBSD__ */ + callout_reset(&sc->callout, hz, lmc_watchdog, sc); + return 0; } @@ -5244,7 +5245,7 @@ ng_watchdog(void *arg) sc->status.line_prot = 0; /* Call this procedure again after one second. */ - callout_reset(&sc->ng_callout, hz, ng_watchdog, sc); + callout_reset(&sc->callout, hz, ng_watchdog, sc); } # endif @@ -5301,16 +5302,9 @@ ng_attach(softc_t *sc) IFQ_SET_MAXLEN(&sc->ng_sndq, SNDQ_MAXLEN); IFQ_SET_READY(&sc->ng_sndq); - /* If ifnet is present, it will call watchdog. */ - /* Otherwise, arrange to call watchdog here. */ # if (IFNET == 0) /* Arrange to call ng_watchdog() once a second. */ -# if (__FreeBSD_version >= 500000) - callout_init(&sc->ng_callout, 0); -# else /* FreeBSD-4 */ - callout_init(&sc->ng_callout); -# endif - callout_reset(&sc->ng_callout, hz, ng_watchdog, sc); + callout_reset(&sc->callout, hz, ng_watchdog, sc); # endif return 0; @@ -5319,9 +5313,7 @@ ng_attach(softc_t *sc) static void ng_detach(softc_t *sc) { -# if (IFNET == 0) - callout_stop(&sc->ng_callout); -# endif + callout_drain(&sc->callout); # if (__FreeBSD_version >= 500000) mtx_destroy(&sc->ng_sndq.ifq_mtx); mtx_destroy(&sc->ng_fastq.ifq_mtx); @@ -5493,6 +5485,12 @@ attach_card(softc_t *sc, const char *int /* Start the card. */ if ((error = startup_card(sc))) return error; +# if (__FreeBSD_version >= 500000) + callout_init(&sc->callout, 0); +# else /* FreeBSD-4 */ + callout_init(&sc->callout); +# endif + /* Attach a kernel interface. */ #if NETGRAPH if ((error = ng_attach(sc))) return error; Modified: head/sys/dev/lmc/if_lmc.h ============================================================================== --- head/sys/dev/lmc/if_lmc.h Thu Nov 19 18:11:23 2009 (r199537) +++ head/sys/dev/lmc/if_lmc.h Thu Nov 19 18:21:51 2009 (r199538) @@ -1140,7 +1140,6 @@ struct softc #endif #if NETGRAPH - struct callout ng_callout; /* ng_watchdog needs this */ node_p ng_node; /* pointer to our node struct */ hook_p ng_hook; /* non-zero means NETGRAPH owns device */ # if (__FreeBSD_version >= 503000) @@ -1153,6 +1152,7 @@ struct softc #endif #ifdef __FreeBSD__ + struct callout callout; /* watchdog needs this */ struct device *dev; /* base device pointer */ bus_space_tag_t csr_tag; /* bus_space needs this */ bus_space_handle_t csr_handle;/* bus_space_needs this */ @@ -1596,7 +1596,6 @@ static int lmc_ifnet_ioctl(struct ifnet static void lmc_ifnet_start(struct ifnet *); static int lmc_raw_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct route *); -static void lmc_ifnet_watchdog(struct ifnet *); # ifdef __OpenBSD__ static int ifmedia_change(struct ifnet *); static void ifmedia_status(struct ifnet *, struct ifmediareq *); From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 18:37:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BE031065670; Thu, 19 Nov 2009 18:37:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AC8F8FC15; Thu, 19 Nov 2009 18:37:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJIbt9Z015112; Thu, 19 Nov 2009 18:37:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJIbtJM015109; Thu, 19 Nov 2009 18:37:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911191837.nAJIbtJM015109@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 18:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199539 - head/sys/dev/ixgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 18:37:55 -0000 Author: jhb Date: Thu Nov 19 18:37:55 2009 New Revision: 199539 URL: http://svn.freebsd.org/changeset/base/199539 Log: - Use callout_init_mtx() instead of callout_init(..., CALLOUT_MPSAFE). - Add a missing callout_drain() to detach. - Hook into the stats timer and use that to drive the transmit watchdog instead of using if_watchdog. - Run the stats timer every second to match other drivers instead of every other second. - Remove dubious callout handling that stopped the timer only to start it again while holding the driver lock without dropping it in between the stop and the start. Modified: head/sys/dev/ixgb/if_ixgb.c head/sys/dev/ixgb/if_ixgb.h Modified: head/sys/dev/ixgb/if_ixgb.c ============================================================================== --- head/sys/dev/ixgb/if_ixgb.c Thu Nov 19 18:21:51 2009 (r199538) +++ head/sys/dev/ixgb/if_ixgb.c Thu Nov 19 18:37:55 2009 (r199539) @@ -97,7 +97,7 @@ static void ixgb_intr(void *); static void ixgb_start(struct ifnet *); static void ixgb_start_locked(struct ifnet *); static int ixgb_ioctl(struct ifnet *, IOCTL_CMD_TYPE, caddr_t); -static void ixgb_watchdog(struct ifnet *); +static void ixgb_watchdog(struct adapter *); static void ixgb_init(void *); static void ixgb_init_locked(struct adapter *); static void ixgb_stop(void *); @@ -274,7 +274,7 @@ ixgb_attach(device_t dev) (void *)adapter, 0, ixgb_sysctl_stats, "I", "Statistics"); - callout_init(&adapter->timer, CALLOUT_MPSAFE); + callout_init_mtx(&adapter->timer, &adapter->mtx, 0); /* Determine hardware revision */ ixgb_identify_hardware(adapter); @@ -382,13 +382,14 @@ ixgb_detach(device_t dev) IXGB_UNLOCK(adapter); #if __FreeBSD_version < 500000 - ether_ifdetach(adapter->ifp, ETHER_BPF_SUPPORTED); + ether_ifdetach(ifp, ETHER_BPF_SUPPORTED); #else - ether_ifdetach(adapter->ifp); + ether_ifdetach(ifp); #endif + callout_drain(&adapter->timer); ixgb_free_pci_resources(adapter); #if __FreeBSD_version >= 500000 - if_free(adapter->ifp); + if_free(ifp); #endif /* Free Transmit Descriptor ring */ @@ -409,9 +410,6 @@ ixgb_detach(device_t dev) if (adapter->prev != NULL) adapter->prev->next = adapter->next; - ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - ifp->if_timer = 0; - IXGB_LOCK_DESTROY(adapter); return (0); } @@ -473,7 +471,7 @@ ixgb_start_locked(struct ifnet * ifp) ETHER_BPF_MTAP(ifp, m_head); #endif /* Set timeout in case hardware has problems transmitting */ - ifp->if_timer = IXGB_TX_TIMEOUT; + adapter->tx_timer = IXGB_TX_TIMEOUT; } return; @@ -610,26 +608,24 @@ out: **********************************************************************/ static void -ixgb_watchdog(struct ifnet * ifp) +ixgb_watchdog(struct adapter *adapter) { - struct adapter *adapter; - adapter = ifp->if_softc; + struct ifnet *ifp; + + ifp = adapter->ifp; /* * If we are in this routine because of pause frames, then don't * reset the hardware. */ if (IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_TXOFF) { - ifp->if_timer = IXGB_TX_TIMEOUT; + adapter->tx_timer = IXGB_TX_TIMEOUT; return; } if_printf(ifp, "watchdog timeout -- resetting\n"); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - - ixgb_stop(adapter); - ixgb_init(adapter); + ixgb_init_locked(adapter); ifp->if_oerrors++; @@ -713,7 +709,7 @@ ixgb_init_locked(struct adapter *adapter temp_reg |= IXGB_CTRL0_JFE; IXGB_WRITE_REG(&adapter->hw, CTRL0, temp_reg); } - callout_reset(&adapter->timer, 2 * hz, ixgb_local_timer, adapter); + callout_reset(&adapter->timer, hz, ixgb_local_timer, adapter); ixgb_clear_hw_cntrs(&adapter->hw); #ifdef DEVICE_POLLING /* @@ -753,11 +749,8 @@ ixgb_poll_locked(struct ifnet * ifp, enu if (cmd == POLL_AND_CHECK_STATUS) { reg_icr = IXGB_READ_REG(&adapter->hw, ICR); if (reg_icr & (IXGB_INT_RXSEQ | IXGB_INT_LSC)) { - callout_stop(&adapter->timer); ixgb_check_for_link(&adapter->hw); ixgb_print_link_status(adapter); - callout_reset(&adapter->timer, 2 * hz, ixgb_local_timer, - adapter); } } rx_npkts = ixgb_process_receive_interrupts(adapter, count); @@ -830,11 +823,8 @@ ixgb_intr(void *arg) /* Link status change */ if (reg_icr & (IXGB_INT_RXSEQ | IXGB_INT_LSC)) { - callout_stop(&adapter->timer); ixgb_check_for_link(&adapter->hw); ixgb_print_link_status(adapter); - callout_reset(&adapter->timer, 2 * hz, ixgb_local_timer, - adapter); } while (loop_cnt > 0) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { @@ -1123,7 +1113,7 @@ ixgb_local_timer(void *arg) struct adapter *adapter = arg; ifp = adapter->ifp; - IXGB_LOCK(adapter); + IXGB_LOCK_ASSERT(adapter); ixgb_check_for_link(&adapter->hw); ixgb_print_link_status(adapter); @@ -1131,10 +1121,9 @@ ixgb_local_timer(void *arg) if (ixgb_display_debug_stats && ifp->if_drv_flags & IFF_DRV_RUNNING) { ixgb_print_hw_stats(adapter); } - callout_reset(&adapter->timer, 2 * hz, ixgb_local_timer, adapter); - - IXGB_UNLOCK(adapter); - return; + if (adapter->tx_timer != 0 && --adapter->tx_timer == 0) + ixgb_watchdog(adapter); + callout_reset(&adapter->timer, hz, ixgb_local_timer, adapter); } static void @@ -1183,9 +1172,9 @@ ixgb_stop(void *arg) ixgb_free_transmit_structures(adapter); ixgb_free_receive_structures(adapter); - /* Tell the stack that the interface is no longer active */ ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->tx_timer = 0; return; } @@ -1352,7 +1341,6 @@ ixgb_setup_interface(device_t dev, struc ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgb_ioctl; ifp->if_start = ixgb_start; - ifp->if_watchdog = ixgb_watchdog; ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 1; #if __FreeBSD_version < 500000 @@ -1755,9 +1743,9 @@ ixgb_clean_transmit_interrupts(struct ad ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (num_avail == adapter->num_tx_desc) - ifp->if_timer = 0; + adapter->tx_timer = 0; else if (num_avail == adapter->num_tx_desc_avail) - ifp->if_timer = IXGB_TX_TIMEOUT; + adapter->tx_timer = IXGB_TX_TIMEOUT; } adapter->num_tx_desc_avail = num_avail; return; Modified: head/sys/dev/ixgb/if_ixgb.h ============================================================================== --- head/sys/dev/ixgb/if_ixgb.h Thu Nov 19 18:21:51 2009 (r199538) +++ head/sys/dev/ixgb/if_ixgb.h Thu Nov 19 18:37:55 2009 (r199539) @@ -284,6 +284,7 @@ struct adapter { struct ifmedia media; struct callout timer; int io_rid; + int tx_timer; struct mtx mtx; /* Info about the board itself */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 18:38:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65EC01065672 for ; Thu, 19 Nov 2009 18:38:45 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outO.internet-mail-service.net (outo.internet-mail-service.net [216.240.47.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE798FC1B for ; Thu, 19 Nov 2009 18:38:45 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 595EE14E053; Thu, 19 Nov 2009 10:38:44 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 500AD2D6018; Thu, 19 Nov 2009 10:38:43 -0800 (PST) Message-ID: <4B0590B2.1010007@elischer.org> Date: Thu, 19 Nov 2009 10:38:42 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: John Baldwin References: <200911191821.nAJILpZ6014634@svn.freebsd.org> In-Reply-To: <200911191821.nAJILpZ6014634@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199538 - head/sys/dev/lmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 18:38:45 -0000 John Baldwin wrote: > Author: jhb > Date: Thu Nov 19 18:21:51 2009 > +# if (__FreeBSD_version >= 500000) > + callout_init(&sc->callout, 0); > +# else /* FreeBSD-4 */ > + callout_init(&sc->callout); > +# endif > + I think the OpenBSD and _FreeBSD_version >= 500000 conditions can probably be removed.. > > #ifdef __FreeBSD__ > + struct callout callout; /* watchdog needs this */ > struct device *dev; /* base device pointer */ > bus_space_tag_t csr_tag; /* bus_space needs this */ > bus_space_handle_t csr_handle;/* bus_space_needs this */ along with #ifdef __FreeBSD__ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 18:43:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23B2D1065698; Thu, 19 Nov 2009 18:43:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1231A8FC13; Thu, 19 Nov 2009 18:43:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJIhhvv015298; Thu, 19 Nov 2009 18:43:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJIhh0q015295; Thu, 19 Nov 2009 18:43:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911191843.nAJIhh0q015295@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 18:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199540 - head/sys/dev/my X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 18:43:44 -0000 Author: jhb Date: Thu Nov 19 18:43:43 2009 New Revision: 199540 URL: http://svn.freebsd.org/changeset/base/199540 Log: - This driver used the if_watchdog timer both as a watchdog on transmit and auto-negotiation. To make this simpler and easier to understand I have split this out into two separate timers. One just manages the auto-neg side of things and one is a transmit watchdog. Neither uses if_watchdog. - Call ether_ifdetach() at the start of detach. Modified: head/sys/dev/my/if_my.c head/sys/dev/my/if_myreg.h Modified: head/sys/dev/my/if_my.c ============================================================================== --- head/sys/dev/my/if_my.c Thu Nov 19 18:37:55 2009 (r199539) +++ head/sys/dev/my/if_my.c Thu Nov 19 18:43:43 2009 (r199540) @@ -126,7 +126,8 @@ static int my_ioctl(struct ifnet *, static void my_init(void *); static void my_init_locked(struct my_softc *); static void my_stop(struct my_softc *); -static void my_watchdog(struct ifnet *); +static void my_autoneg_timeout(void *); +static void my_watchdog(void *); static int my_shutdown(device_t); static int my_ifmedia_upd(struct ifnet *); static void my_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -382,6 +383,15 @@ my_autoneg_xmit(struct my_softc * sc) return; } +static void +my_autoneg_timeout(void *arg) +{ + struct my_softc *sc; + + sc = arg; + MY_LOCK_ASSERT(sc); + my_autoneg_mii(sc, MY_FLAG_DELAYTIMEO, 1); +} /* * Invoke autonegotiation on a PHY. @@ -439,12 +449,13 @@ my_autoneg_mii(struct my_softc * sc, int return; } my_autoneg_xmit(sc); - ifp->if_timer = 5; + callout_reset(&sc->my_autoneg_timer, hz * 5, my_autoneg_timeout, + sc); sc->my_autoneg = 1; sc->my_want_auto = 0; return; case MY_FLAG_DELAYTIMEO: - ifp->if_timer = 0; + callout_stop(&sc->my_autoneg_timer); sc->my_autoneg = 0; break; default: @@ -661,7 +672,8 @@ my_setmode_mii(struct my_softc * sc, int */ if (sc->my_autoneg) { device_printf(sc->my_dev, "canceling autoneg session\n"); - ifp->if_timer = sc->my_autoneg = sc->my_want_auto = 0; + callout_stop(&sc->my_autoneg_timer); + sc->my_autoneg = sc->my_want_auto = 0; bmcr = my_phy_readreg(sc, PHY_BMCR); bmcr &= ~PHY_BMCR_AUTONEGENBL; my_phy_writereg(sc, PHY_BMCR, bmcr); @@ -808,6 +820,8 @@ my_attach(device_t dev) sc->my_dev = dev; mtx_init(&sc->my_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); + callout_init_mtx(&sc->my_autoneg_timer, &sc->my_mtx, 0); + callout_init_mtx(&sc->my_watchdog, &sc->my_mtx, 0); /* * Map control/status registers. @@ -886,7 +900,6 @@ my_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = my_ioctl; ifp->if_start = my_start; - ifp->if_watchdog = my_watchdog; ifp->if_init = my_init; ifp->if_baudrate = 10000000; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); @@ -984,13 +997,15 @@ my_detach(device_t dev) struct ifnet *ifp; sc = device_get_softc(dev); + ifp = sc->my_ifp; + ether_ifdetach(ifp); MY_LOCK(sc); my_stop(sc); MY_UNLOCK(sc); bus_teardown_intr(dev, sc->my_irq, sc->my_intrhand); + callout_drain(&sc->my_watchdog); + callout_drain(&sc->my_autoneg_timer); - ifp = sc->my_ifp; - ether_ifdetach(ifp); if_free(ifp); free(sc->my_ldata_ptr, M_DEVBUF); @@ -1188,7 +1203,7 @@ my_txeof(struct my_softc * sc) MY_LOCK_ASSERT(sc); ifp = sc->my_ifp; /* Clear the timeout timer. */ - ifp->if_timer = 0; + sc->my_timer = 0; if (sc->my_cdata.my_tx_head == NULL) { return; } @@ -1240,7 +1255,7 @@ my_txeoc(struct my_softc * sc) MY_LOCK_ASSERT(sc); ifp = sc->my_ifp; - ifp->if_timer = 0; + sc->my_timer = 0; if (sc->my_cdata.my_tx_head == NULL) { ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->my_cdata.my_tx_tail = NULL; @@ -1249,7 +1264,7 @@ my_txeoc(struct my_softc * sc) } else { if (MY_TXOWN(sc->my_cdata.my_tx_head) == MY_UNSENT) { MY_TXOWN(sc->my_cdata.my_tx_head) = MY_OWNByNIC; - ifp->if_timer = 5; + sc->my_timer = 5; CSR_WRITE_4(sc, MY_TXPDR, 0xFFFFFFFF); } } @@ -1455,7 +1470,7 @@ my_start_locked(struct ifnet * ifp) /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + sc->my_timer = 5; return; } @@ -1555,6 +1570,8 @@ my_init_locked(struct my_softc *sc) my_phy_writereg(sc, PHY_BMCR, phy_bmcr); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + callout_reset(&sc->my_watchdog, hz, my_watchdog, sc); return; } @@ -1680,17 +1697,18 @@ my_ioctl(struct ifnet * ifp, u_long comm } static void -my_watchdog(struct ifnet * ifp) +my_watchdog(void *arg) { struct my_softc *sc; + struct ifnet *ifp; - sc = ifp->if_softc; - MY_LOCK(sc); - if (sc->my_autoneg) { - my_autoneg_mii(sc, MY_FLAG_DELAYTIMEO, 1); - MY_UNLOCK(sc); + sc = arg; + MY_LOCK_ASSERT(sc); + callout_reset(&sc->my_watchdog, hz, my_watchdog, sc); + if (sc->my_timer == 0 || --sc->my_timer > 0) return; - } + + ifp = sc->my_ifp; ifp->if_oerrors++; if_printf(ifp, "watchdog timeout\n"); if (!(my_phy_readreg(sc, PHY_BMSR) & PHY_BMSR_LINKSTAT)) @@ -1700,8 +1718,6 @@ my_watchdog(struct ifnet * ifp) my_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) my_start_locked(ifp); - MY_UNLOCK(sc); - return; } @@ -1716,7 +1732,9 @@ my_stop(struct my_softc * sc) MY_LOCK_ASSERT(sc); ifp = sc->my_ifp; - ifp->if_timer = 0; + + callout_stop(&sc->my_autoneg_timer); + callout_stop(&sc->my_watchdog); MY_CLRBIT(sc, MY_TCRRCR, (MY_RE | MY_TE)); CSR_WRITE_4(sc, MY_IMR, 0x00000000); Modified: head/sys/dev/my/if_myreg.h ============================================================================== --- head/sys/dev/my/if_myreg.h Thu Nov 19 18:37:55 2009 (r199539) +++ head/sys/dev/my/if_myreg.h Thu Nov 19 18:43:43 2009 (r199540) @@ -371,8 +371,10 @@ struct my_softc { struct my_chain_data my_cdata; device_t my_miibus; /* Add by Surfer 2001/12/2 */ - struct mtx my_mtx; - + struct mtx my_mtx; + struct callout my_autoneg_timer; + struct callout my_watchdog; + int my_timer; }; /* Add by Surfer 2001/12/2 */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 19:19:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 526ED1065672; Thu, 19 Nov 2009 19:19:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2405E8FC08; Thu, 19 Nov 2009 19:19:38 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9D1FF46B2C; Thu, 19 Nov 2009 14:19:37 -0500 (EST) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id DEBC18A020; Thu, 19 Nov 2009 14:19:36 -0500 (EST) From: John Baldwin To: Julian Elischer Date: Thu, 19 Nov 2009 14:19:29 -0500 User-Agent: KMail/1.9.7 References: <200911191821.nAJILpZ6014634@svn.freebsd.org> <4B0590B2.1010007@elischer.org> In-Reply-To: <4B0590B2.1010007@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200911191419.30432.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 19 Nov 2009 14:19:36 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199538 - head/sys/dev/lmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 19:19:38 -0000 On Thursday 19 November 2009 1:38:42 pm Julian Elischer wrote: > John Baldwin wrote: > > Author: jhb > > Date: Thu Nov 19 18:21:51 2009 > > > +# if (__FreeBSD_version >= 500000) > > + callout_init(&sc->callout, 0); > > +# else /* FreeBSD-4 */ > > + callout_init(&sc->callout); > > +# endif > > + > > > I think the OpenBSD and _FreeBSD_version >= 500000 > conditions can probably be removed.. > > > > > > #ifdef __FreeBSD__ > > + struct callout callout; /* watchdog needs this */ > > struct device *dev; /* base device pointer */ > > bus_space_tag_t csr_tag; /* bus_space needs this */ > > bus_space_handle_t csr_handle;/* bus_space_needs this */ > > along with #ifdef __FreeBSD__ Go for it. :) I was just removing if_watchdog use in this sweep. No one stepped up to test this since I posted it almost 2 weeks ago though, so I'm not sure if there are any users of this. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 19:25:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 608BB106566B; Thu, 19 Nov 2009 19:25:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7D78FC13; Thu, 19 Nov 2009 19:25:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJJPmAO016379; Thu, 19 Nov 2009 19:25:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJJPmIZ016374; Thu, 19 Nov 2009 19:25:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911191925.nAJJPmIZ016374@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 19:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199542 - head/sys/dev/pdq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 19:25:48 -0000 Author: jhb Date: Thu Nov 19 19:25:47 2009 New Revision: 199542 URL: http://svn.freebsd.org/changeset/base/199542 Log: Several fixes to these drivers. Note that these two drivers are actually just two different attachments (EISA and PCI) to a single driver. - Add real locking. Previously these drivers only acquired their lock in their interrupt handler or in the ioctl routine (but too broadly in the latter). No locking was used for the stack calling down into the driver via if_init() or if_start(), for device shutdown or detach. Also, the interrupt handler held the driver lock while calling if_input(). All this stuff should be fixed in the locking changes. - Really fix these drivers to handle if_alloc(). The front-end attachments were using if_initname() before the ifnet was allocated. Fix this by moving some of the duplicated logic from each driver into pdq_ifattach(). While here, make pdq_ifattach() return an error so that the driver just fails to attach if if_alloc() fails rather than panic'ing. Also, defer freeing the ifnet until the driver has stopped using it during detach. - Add a new private timer to drive the watchdog timer. - Pass the softc pointer to the interrupt handlers instead of the device_t so we can avoid the use of device_get_softc() and to better match what other drivers do. Modified: head/sys/dev/pdq/if_fea.c head/sys/dev/pdq/if_fpa.c head/sys/dev/pdq/pdq_freebsd.h head/sys/dev/pdq/pdq_ifsubr.c Modified: head/sys/dev/pdq/if_fea.c ============================================================================== --- head/sys/dev/pdq/if_fea.c Thu Nov 19 18:56:06 2009 (r199541) +++ head/sys/dev/pdq/if_fea.c Thu Nov 19 19:25:47 2009 (r199542) @@ -163,11 +163,9 @@ static void pdq_eisa_ifintr(arg) void * arg; { - device_t dev; pdq_softc_t * sc; - dev = (device_t)arg; - sc = device_get_softc(dev); + sc = arg; PDQ_LOCK(sc); (void) pdq_interrupt(sc->sc_pdq); @@ -181,11 +179,9 @@ pdq_eisa_attach (dev) device_t dev; { pdq_softc_t * sc; - struct ifnet * ifp; int error; sc = device_get_softc(dev); - ifp = sc->ifp; sc->dev = dev; @@ -222,28 +218,20 @@ pdq_eisa_attach (dev) goto bad; } - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - pdq_eisa_devinit(sc); - sc->sc_pdq = pdq_initialize(sc->mem_bst, sc->mem_bsh, - ifp->if_xname, -1, - (void *)sc, PDQ_DEFEA); - if (sc->sc_pdq == NULL) { - device_printf(dev, "Initialization failed.\n"); - error = ENXIO; + error = pdq_ifattach(sc, sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, + PDQ_DEFEA); + if (error) goto bad; - } - error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, - NULL, pdq_eisa_ifintr, dev, &sc->irq_ih); + error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, + NULL, pdq_eisa_ifintr, sc, &sc->irq_ih); if (error) { device_printf(dev, "Failed to setup interrupt handler.\n"); - error = ENXIO; - goto bad; + pdq_ifdetach(sc); + return (error); } - pdq_ifattach(sc, sc->sc_pdq->pdq_hwaddr.lanaddr_bytes); - return (0); bad: pdq_free(dev); @@ -269,7 +257,9 @@ pdq_eisa_shutdown(dev) pdq_softc_t * sc; sc = device_get_softc(dev); + PDQ_LOCK(sc); pdq_hwreset(sc->sc_pdq); + PDQ_UNLOCK(sc); return (0); } Modified: head/sys/dev/pdq/if_fpa.c ============================================================================== --- head/sys/dev/pdq/if_fpa.c Thu Nov 19 18:56:06 2009 (r199541) +++ head/sys/dev/pdq/if_fpa.c Thu Nov 19 19:25:47 2009 (r199542) @@ -73,11 +73,9 @@ static void pdq_pci_ifintr (void *); static void pdq_pci_ifintr(void *arg) { - device_t dev; pdq_softc_t *sc; - dev = (device_t)arg; - sc = device_get_softc(dev); + sc = arg; PDQ_LOCK(sc); (void) pdq_interrupt(sc->sc_pdq); @@ -105,12 +103,10 @@ static int pdq_pci_attach(device_t dev) { pdq_softc_t *sc; - struct ifnet *ifp; u_int32_t command; int error; sc = device_get_softc(dev); - ifp = sc->ifp; sc->dev = dev; @@ -146,26 +142,18 @@ pdq_pci_attach(device_t dev) goto bad; } - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - - sc->sc_pdq = pdq_initialize(sc->mem_bst, sc->mem_bsh, - ifp->if_xname, -1, - (void *)sc, PDQ_DEFPA); - if (sc->sc_pdq == NULL) { - device_printf(dev, "Initialization failed.\n"); - error = ENXIO; + error = pdq_ifattach(sc, sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, PDQ_DEFPA); + if (error) goto bad; - } - - error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, NULL, - pdq_pci_ifintr, dev, &sc->irq_ih); + + error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, NULL, + pdq_pci_ifintr, sc, &sc->irq_ih); if (error) { device_printf(dev, "Failed to setup interrupt handler.\n"); - error = ENXIO; - goto bad; + pdq_ifdetach(sc); + return (error); } - pdq_ifattach(sc, sc->sc_pdq->pdq_hwaddr.lanaddr_bytes); return (0); bad: @@ -191,7 +179,9 @@ pdq_pci_shutdown(device_t dev) pdq_softc_t *sc; sc = device_get_softc(dev); + PDQ_LOCK(sc); pdq_hwreset(sc->sc_pdq); + PDQ_UNLOCK(sc); return (0); } Modified: head/sys/dev/pdq/pdq_freebsd.h ============================================================================== --- head/sys/dev/pdq/pdq_freebsd.h Thu Nov 19 18:56:06 2009 (r199541) +++ head/sys/dev/pdq/pdq_freebsd.h Thu Nov 19 19:25:47 2009 (r199542) @@ -124,10 +124,13 @@ typedef struct _pdq_os_ctx_t { void * irq_ih; struct mtx mtx; + struct callout watchdog; + int timer; } pdq_softc_t; #define PDQ_LOCK(_sc) mtx_lock(&(_sc)->mtx) #define PDQ_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx) +#define PDQ_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED) #define PDQ_OS_HDR_OFFSET PDQ_RX_FC_OFFSET @@ -255,7 +258,8 @@ pdq_state_t pdq_stop (pdq_t *pdq); * OS dependent functions provided by * pdq_ifsubr.c or pdq.c to the bus front ends */ -void pdq_ifattach (pdq_softc_t *, const pdq_uint8_t *); +int pdq_ifattach (pdq_softc_t *, const pdq_uint8_t *, + pdq_type_t type); void pdq_ifdetach (pdq_softc_t *); void pdq_free (device_t); int pdq_interrupt (pdq_t *pdq); Modified: head/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- head/sys/dev/pdq/pdq_ifsubr.c Thu Nov 19 18:56:06 2009 (r199541) +++ head/sys/dev/pdq/pdq_ifsubr.c Thu Nov 19 19:25:47 2009 (r199542) @@ -69,10 +69,23 @@ __FBSDID("$FreeBSD$"); devclass_t pdq_devclass; +static void pdq_watchdog(void *); + +static void +pdq_ifstop(pdq_softc_t *sc) +{ + + PDQ_IFNET(sc)->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + sc->sc_pdq->pdq_flags &= ~PDQ_RUNNING; + pdq_stop(sc->sc_pdq); + callout_stop(&sc->watchdog); +} + static void -pdq_ifinit( - pdq_softc_t *sc) +pdq_ifinit_locked(pdq_softc_t *sc) { + + PDQ_LOCK_ASSERT(sc); if (PDQ_IFNET(sc)->if_flags & IFF_UP) { PDQ_IFNET(sc)->if_drv_flags |= IFF_DRV_RUNNING; if (PDQ_IFNET(sc)->if_flags & IFF_PROMISC) { @@ -87,24 +100,40 @@ pdq_ifinit( } sc->sc_pdq->pdq_flags |= PDQ_RUNNING; pdq_run(sc->sc_pdq); - } else { - PDQ_IFNET(sc)->if_drv_flags &= ~IFF_DRV_RUNNING; - sc->sc_pdq->pdq_flags &= ~PDQ_RUNNING; - pdq_stop(sc->sc_pdq); - } + callout_reset(&sc->watchdog, hz, pdq_watchdog, sc); + } else + pdq_ifstop(sc); +} + +static void +pdq_ifinit(void *arg) +{ + pdq_softc_t *sc; + + sc = arg; + PDQ_LOCK(sc); + pdq_ifinit_locked(sc); + PDQ_UNLOCK(sc); } static void -pdq_ifwatchdog( - struct ifnet *ifp) +pdq_watchdog(void *arg) { + pdq_softc_t *sc; + struct ifnet *ifp; + + sc = arg; + PDQ_LOCK_ASSERT(sc); + callout_reset(&sc->watchdog, hz, pdq_watchdog, sc); + if (sc->timer == 0 || --sc->timer > 0) + return; + /* * No progress was made on the transmit queue for PDQ_OS_TX_TRANSMIT * seconds. Remove all queued packets. */ - + ifp = PDQ_IFNET(sc); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ifp->if_timer = 0; for (;;) { struct mbuf *m; IFQ_DEQUEUE(&ifp->if_snd, m); @@ -115,18 +144,18 @@ pdq_ifwatchdog( } static void -pdq_ifstart( - struct ifnet *ifp) +pdq_ifstart_locked(struct ifnet *ifp) { pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp); struct mbuf *m; int tx = 0; + PDQ_LOCK_ASSERT(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - if (PDQ_IFNET(sc)->if_timer == 0) - PDQ_IFNET(sc)->if_timer = PDQ_OS_TX_TIMEOUT; + if (sc->timer == 0) + sc->timer = PDQ_OS_TX_TIMEOUT; if ((sc->sc_pdq->pdq_flags & PDQ_TXOK) == 0) { PDQ_IFNET(sc)->if_drv_flags |= IFF_DRV_OACTIVE; @@ -177,6 +206,16 @@ pdq_ifstart( PDQ_DO_TYPE2_PRODUCER(sc->sc_pdq); sc->sc_flags &= ~PDQIF_DOWNCALL; } + +static void +pdq_ifstart(struct ifnet *ifp) +{ + pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp); + + PDQ_LOCK(sc); + pdq_ifstart_locked(ifp); + PDQ_UNLOCK(sc); +} void pdq_os_receive_pdu( @@ -218,7 +257,9 @@ pdq_os_receive_pdu( } m->m_pkthdr.rcvif = ifp; + PDQ_UNLOCK(sc); (*ifp->if_input)(ifp, m); + PDQ_LOCK(sc); } void @@ -228,11 +269,11 @@ pdq_os_restart_transmitter( pdq_softc_t *sc = pdq->pdq_os_ctx; PDQ_IFNET(sc)->if_drv_flags &= ~IFF_DRV_OACTIVE; if (IFQ_IS_EMPTY(&PDQ_IFNET(sc)->if_snd) == 0) { - PDQ_IFNET(sc)->if_timer = PDQ_OS_TX_TIMEOUT; + sc->timer = PDQ_OS_TX_TIMEOUT; if ((sc->sc_flags & PDQIF_DOWNCALL) == 0) - pdq_ifstart(PDQ_IFNET(sc)); + pdq_ifstart_locked(PDQ_IFNET(sc)); } else { - PDQ_IFNET(sc)->if_timer = 0; + sc->timer = 0; } } @@ -305,6 +346,7 @@ pdq_ifmedia_change( { pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp); + PDQ_LOCK(sc); if (sc->sc_ifmedia.ifm_media & IFM_FDX) { if ((sc->sc_pdq->pdq_flags & PDQ_WANT_FDX) == 0) { sc->sc_pdq->pdq_flags |= PDQ_WANT_FDX; @@ -316,6 +358,7 @@ pdq_ifmedia_change( if (sc->sc_pdq->pdq_flags & PDQ_RUNNING) pdq_run(sc->sc_pdq); } + PDQ_UNLOCK(sc); return 0; } @@ -327,6 +370,7 @@ pdq_ifmedia_status( { pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp); + PDQ_LOCK(sc); ifmr->ifm_status = IFM_AVALID; if (sc->sc_pdq->pdq_flags & PDQ_IS_ONRING) ifmr->ifm_status |= IFM_ACTIVE; @@ -334,6 +378,7 @@ pdq_ifmedia_status( ifmr->ifm_active = (ifmr->ifm_current & ~IFM_FDX); if (sc->sc_pdq->pdq_flags & PDQ_IS_FDX) ifmr->ifm_active |= IFM_FDX; + PDQ_UNLOCK(sc); } void @@ -369,8 +414,6 @@ pdq_ifioctl( pdq_softc_t *sc = PDQ_OS_IFP_TO_SOFTC(ifp); int error = 0; - PDQ_LOCK(sc); - switch (cmd) { case SIOCSIFFLAGS: { pdq_ifinit(sc); @@ -379,10 +422,12 @@ pdq_ifioctl( case SIOCADDMULTI: case SIOCDELMULTI: { + PDQ_LOCK(sc); if (PDQ_IFNET(sc)->if_drv_flags & IFF_DRV_RUNNING) { pdq_run(sc->sc_pdq); error = 0; } + PDQ_UNLOCK(sc); break; } @@ -401,7 +446,6 @@ pdq_ifioctl( } } - PDQ_UNLOCK(sc); return error; } @@ -409,25 +453,27 @@ pdq_ifioctl( #define IFF_NOTRAILERS 0 #endif -void -pdq_ifattach(pdq_softc_t *sc, const pdq_uint8_t *llc) +int +pdq_ifattach(pdq_softc_t *sc, const pdq_uint8_t *llc, pdq_type_t type) { struct ifnet *ifp; ifp = PDQ_IFNET(sc) = if_alloc(IFT_FDDI); - if (ifp == NULL) - panic("%s: can not if_alloc()", device_get_nameunit(sc->dev)); + if (ifp == NULL) { + device_printf(sc->dev, "can not if_alloc()\n"); + return (ENOSPC); + } mtx_init(&sc->mtx, device_get_nameunit(sc->dev), MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE); + MTX_DEF); + callout_init_mtx(&sc->watchdog, &sc->mtx, 0); + if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); ifp->if_softc = sc; - ifp->if_init = (if_init_f_t *)pdq_ifinit; + ifp->if_init = pdq_ifinit; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST; - ifp->if_watchdog = pdq_ifwatchdog; - ifp->if_ioctl = pdq_ifioctl; ifp->if_start = pdq_ifstart; @@ -441,7 +487,15 @@ pdq_ifattach(pdq_softc_t *sc, const pdq_ } #endif + sc->sc_pdq = pdq_initialize(sc->mem_bst, sc->mem_bsh, ifp->if_xname, -1, + sc, type); + if (sc->sc_pdq == NULL) { + device_printf(sc->dev, "Initialization failed.\n"); + return (ENXIO); + } + fddi_ifattach(ifp, llc, FDDI_BPF_SUPPORTED); + return (0); } void @@ -452,8 +506,10 @@ pdq_ifdetach (pdq_softc_t *sc) ifp = sc->ifp; fddi_ifdetach(ifp, FDDI_BPF_SUPPORTED); - if_free(ifp); - pdq_stop(sc->sc_pdq); + PDQ_LOCK(sc); + pdq_ifstop(sc); + PDQ_UNLOCK(sc); + callout_drain(&sc->watchdog); pdq_free(sc->dev); return; @@ -474,6 +530,8 @@ pdq_free (device_t dev) bus_teardown_intr(dev, sc->irq, sc->irq_ih); if (sc->irq) bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); + if (sc->ifp) + if_free(sc->ifp); /* * Destroy the mutex. From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 19:35:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27161106566B; Thu, 19 Nov 2009 19:35:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 153B18FC08; Thu, 19 Nov 2009 19:35:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJJZFpp016642; Thu, 19 Nov 2009 19:35:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJJZF8x016639; Thu, 19 Nov 2009 19:35:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911191935.nAJJZF8x016639@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 19:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199543 - head/sys/dev/vge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 19:35:16 -0000 Author: jhb Date: Thu Nov 19 19:35:15 2009 New Revision: 199543 URL: http://svn.freebsd.org/changeset/base/199543 Log: Several fixes to this driver: - Overhaul the locking to avoid recursion and add missing locking in a few places. - Don't schedule a task to call vge_start() from contexts that are safe to call vge_start() directly. Just invoke the routine directly instead (this is what all of the other NIC drivers I am familiar with do). Note that vge(4) does not use an interrupt filter handler which is the primary reason some other drivers use tasks. - Add a new private timer to drive the watchdog timer instead of using if_watchdog and if_timer. - Fixup detach by calling ether_ifdetach() before stopping the interface. Modified: head/sys/dev/vge/if_vge.c head/sys/dev/vge/if_vgevar.h Modified: head/sys/dev/vge/if_vge.c ============================================================================== --- head/sys/dev/vge/if_vge.c Thu Nov 19 19:25:47 2009 (r199542) +++ head/sys/dev/vge/if_vge.c Thu Nov 19 19:35:15 2009 (r199543) @@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -160,12 +159,13 @@ static int vge_rxeof (struct vge_softc static void vge_txeof (struct vge_softc *); static void vge_intr (void *); static void vge_tick (void *); -static void vge_tx_task (void *, int); static void vge_start (struct ifnet *); +static void vge_start_locked (struct ifnet *); static int vge_ioctl (struct ifnet *, u_long, caddr_t); static void vge_init (void *); +static void vge_init_locked (struct vge_softc *); static void vge_stop (struct vge_softc *); -static void vge_watchdog (struct ifnet *); +static void vge_watchdog (void *); static int vge_suspend (device_t); static int vge_resume (device_t); static int vge_shutdown (device_t); @@ -378,7 +378,7 @@ vge_miibus_readreg(dev, phy, reg) if (phy != (CSR_READ_1(sc, VGE_MIICFG) & 0x1F)) return(0); - VGE_LOCK(sc); + VGE_LOCK_ASSERT(sc); vge_miipoll_stop(sc); /* Specify the register we want to read. */ @@ -400,7 +400,6 @@ vge_miibus_readreg(dev, phy, reg) rval = CSR_READ_2(sc, VGE_MIIDATA); vge_miipoll_start(sc); - VGE_UNLOCK(sc); return (rval); } @@ -418,7 +417,7 @@ vge_miibus_writereg(dev, phy, reg, data) if (phy != (CSR_READ_1(sc, VGE_MIICFG) & 0x1F)) return(0); - VGE_LOCK(sc); + VGE_LOCK_ASSERT(sc); vge_miipoll_stop(sc); /* Specify the register we want to write. */ @@ -443,7 +442,6 @@ vge_miibus_writereg(dev, phy, reg, data) } vge_miipoll_start(sc); - VGE_UNLOCK(sc); return (rval); } @@ -929,7 +927,9 @@ vge_attach(dev) sc->vge_dev = dev; mtx_init(&sc->vge_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE); + MTX_DEF); + callout_init_mtx(&sc->vge_watchdog, &sc->vge_mtx, 0); + /* * Map control/status registers. */ @@ -1014,14 +1014,11 @@ vge_attach(dev) #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif - ifp->if_watchdog = vge_watchdog; ifp->if_init = vge_init; IFQ_SET_MAXLEN(&ifp->if_snd, VGE_IFQ_MAXLEN); ifp->if_snd.ifq_drv_maxlen = VGE_IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - TASK_INIT(&sc->vge_txtask, 0, vge_tx_task, ifp); - /* * Call MI attach routine. */ @@ -1070,21 +1067,11 @@ vge_detach(dev) /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { - vge_stop(sc); - /* - * Force off the IFF_UP flag here, in case someone - * still had a BPF descriptor attached to this - * interface. If they do, ether_ifattach() will cause - * the BPF code to try and clear the promisc mode - * flag, which will bubble down to vge_ioctl(), - * which will try to call vge_init() again. This will - * turn the NIC back on and restart the MII ticker, - * which will panic the system when the kernel tries - * to invoke the vge_tick() function that isn't there - * anymore. - */ - ifp->if_flags &= ~IFF_UP; ether_ifdetach(ifp); + VGE_LOCK(sc); + vge_stop(sc); + VGE_UNLOCK(sc); + callout_drain(&sc->vge_watchdog); } if (sc->vge_miibus) device_delete_child(dev, sc->vge_miibus); @@ -1523,7 +1510,7 @@ vge_txeof(sc) if (idx != sc->vge_ldata.vge_tx_considx) { sc->vge_ldata.vge_tx_considx = idx; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ifp->if_timer = 0; + sc->vge_timer = 0; } /* @@ -1549,7 +1536,7 @@ vge_tick(xsc) sc = xsc; ifp = sc->vge_ifp; - VGE_LOCK(sc); + VGE_LOCK_ASSERT(sc); mii = device_get_softc(sc->vge_miibus); mii_tick(mii); @@ -1566,13 +1553,10 @@ vge_tick(xsc) if_link_state_change(sc->vge_ifp, LINK_STATE_UP); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(taskqueue_swi, - &sc->vge_txtask); + vge_start_locked(ifp); } } - VGE_UNLOCK(sc); - return; } @@ -1592,7 +1576,7 @@ vge_poll (struct ifnet *ifp, enum poll_c vge_txeof(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(taskqueue_swi, &sc->vge_txtask); + vge_start_locked(ifp); if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */ u_int32_t status; @@ -1608,7 +1592,7 @@ vge_poll (struct ifnet *ifp, enum poll_c if (status & VGE_ISR_TXDMA_STALL || status & VGE_ISR_RXDMA_STALL) - vge_init(sc); + vge_init_locked(sc); if (status & (VGE_ISR_RXOFLOW|VGE_ISR_RXNODESC)) { vge_rxeof(sc); @@ -1681,7 +1665,7 @@ vge_intr(arg) vge_txeof(sc); if (status & (VGE_ISR_TXDMA_STALL|VGE_ISR_RXDMA_STALL)) - vge_init(sc); + vge_init_locked(sc); if (status & VGE_ISR_LINKSTS) vge_tick(sc); @@ -1690,10 +1674,10 @@ vge_intr(arg) /* Re-enable interrupts */ CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); - VGE_UNLOCK(sc); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(taskqueue_swi, &sc->vge_txtask); + vge_start_locked(ifp); + + VGE_UNLOCK(sc); return; } @@ -1774,19 +1758,6 @@ vge_encap(sc, m_head, idx) return (0); } -static void -vge_tx_task(arg, npending) - void *arg; - int npending; -{ - struct ifnet *ifp; - - ifp = arg; - vge_start(ifp); - - return; -} - /* * Main transmit routine. */ @@ -1796,21 +1767,29 @@ vge_start(ifp) struct ifnet *ifp; { struct vge_softc *sc; + + sc = ifp->if_softc; + VGE_LOCK(sc); + vge_start_locked(ifp); + VGE_UNLOCK(sc); +} + +static void +vge_start_locked(ifp) + struct ifnet *ifp; +{ + struct vge_softc *sc; struct mbuf *m_head = NULL; int idx, pidx = 0; sc = ifp->if_softc; - VGE_LOCK(sc); + VGE_LOCK_ASSERT(sc); - if (!sc->vge_link || ifp->if_drv_flags & IFF_DRV_OACTIVE) { - VGE_UNLOCK(sc); + if (!sc->vge_link || ifp->if_drv_flags & IFF_DRV_OACTIVE) return; - } - if (IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - VGE_UNLOCK(sc); + if (IFQ_DRV_IS_EMPTY(&ifp->if_snd)) return; - } idx = sc->vge_ldata.vge_tx_prodidx; @@ -1843,10 +1822,8 @@ vge_start(ifp) ETHER_BPF_MTAP(ifp, m_head); } - if (idx == sc->vge_ldata.vge_tx_prodidx) { - VGE_UNLOCK(sc); + if (idx == sc->vge_ldata.vge_tx_prodidx) return; - } /* Flush the TX descriptors */ @@ -1870,12 +1847,10 @@ vge_start(ifp) */ CSR_WRITE_1(sc, VGE_CRS1, VGE_CR1_TIMER0_ENABLE); - VGE_UNLOCK(sc); - /* * Set a timeout in case the chip goes out to lunch. */ - ifp->if_timer = 5; + sc->vge_timer = 5; return; } @@ -1885,11 +1860,20 @@ vge_init(xsc) void *xsc; { struct vge_softc *sc = xsc; + + VGE_LOCK(sc); + vge_init_locked(sc); + VGE_UNLOCK(sc); +} + +static void +vge_init_locked(struct vge_softc *sc) +{ struct ifnet *ifp = sc->vge_ifp; struct mii_data *mii; int i; - VGE_LOCK(sc); + VGE_LOCK_ASSERT(sc); mii = device_get_softc(sc->vge_miibus); /* @@ -2045,12 +2029,11 @@ vge_init(xsc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + callout_reset(&sc->vge_watchdog, hz, vge_watchdog, sc); sc->vge_if_flags = 0; sc->vge_link = 0; - VGE_UNLOCK(sc); - return; } @@ -2087,7 +2070,9 @@ vge_ifmedia_sts(ifp, ifmr) sc = ifp->if_softc; mii = device_get_softc(sc->vge_miibus); + VGE_LOCK(sc); mii_pollstat(mii); + VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; @@ -2162,6 +2147,7 @@ vge_ioctl(ifp, command, data) ifp->if_mtu = ifr->ifr_mtu; break; case SIOCSIFFLAGS: + VGE_LOCK(sc); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && @@ -2176,16 +2162,19 @@ vge_ioctl(ifp, command, data) VGE_RXCTL_RX_PROMISC); vge_setmulti(sc); } else - vge_init(sc); + vge_init_locked(sc); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) vge_stop(sc); } sc->vge_if_flags = ifp->if_flags; + VGE_UNLOCK(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: + VGE_LOCK(sc); vge_setmulti(sc); + VGE_UNLOCK(sc); break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: @@ -2219,6 +2208,7 @@ vge_ioctl(ifp, command, data) } } #endif /* DEVICE_POLLING */ + VGE_LOCK(sc); if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { ifp->if_capenable ^= IFCAP_TXCSUM; @@ -2230,6 +2220,7 @@ vge_ioctl(ifp, command, data) if ((mask & IFCAP_RXCSUM) != 0 && (ifp->if_capabilities & IFCAP_RXCSUM) != 0) ifp->if_capenable ^= IFCAP_RXCSUM; + VGE_UNLOCK(sc); } break; default: @@ -2241,22 +2232,25 @@ vge_ioctl(ifp, command, data) } static void -vge_watchdog(ifp) - struct ifnet *ifp; +vge_watchdog(void *arg) { - struct vge_softc *sc; + struct vge_softc *sc; + struct ifnet *ifp; - sc = ifp->if_softc; - VGE_LOCK(sc); + sc = arg; + VGE_LOCK_ASSERT(sc); + callout_reset(&sc->vge_watchdog, hz, vge_watchdog, sc); + if (sc->vge_timer == 0 || --sc->vge_timer > 0) + return; + + ifp = sc->vge_ifp; if_printf(ifp, "watchdog timeout\n"); ifp->if_oerrors++; vge_txeof(sc); vge_rxeof(sc); - vge_init(sc); - - VGE_UNLOCK(sc); + vge_init_locked(sc); return; } @@ -2272,9 +2266,10 @@ vge_stop(sc) register int i; struct ifnet *ifp; - VGE_LOCK(sc); + VGE_LOCK_ASSERT(sc); ifp = sc->vge_ifp; - ifp->if_timer = 0; + sc->vge_timer = 0; + callout_stop(&sc->vge_watchdog); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); @@ -2312,8 +2307,6 @@ vge_stop(sc) } } - VGE_UNLOCK(sc); - return; } @@ -2330,9 +2323,11 @@ vge_suspend(dev) sc = device_get_softc(dev); + VGE_LOCK(sc); vge_stop(sc); sc->suspended = 1; + VGE_UNLOCK(sc); return (0); } @@ -2357,10 +2352,12 @@ vge_resume(dev) pci_enable_io(dev, SYS_RES_MEMORY); /* reinitialize interface if necessary */ + VGE_LOCK(sc); if (ifp->if_flags & IFF_UP) - vge_init(sc); + vge_init_locked(sc); sc->suspended = 0; + VGE_UNLOCK(sc); return (0); } @@ -2377,7 +2374,9 @@ vge_shutdown(dev) sc = device_get_softc(dev); + VGE_LOCK(sc); vge_stop(sc); + VGE_UNLOCK(sc); return (0); } Modified: head/sys/dev/vge/if_vgevar.h ============================================================================== --- head/sys/dev/vge/if_vgevar.h Thu Nov 19 19:25:47 2009 (r199542) +++ head/sys/dev/vge/if_vgevar.h Thu Nov 19 19:35:15 2009 (r199543) @@ -111,8 +111,9 @@ struct vge_softc { int vge_rx_consumed; int vge_link; int vge_camidx; - struct task vge_txtask; struct mtx vge_mtx; + struct callout vge_watchdog; + int vge_timer; struct mbuf *vge_head; struct mbuf *vge_tail; From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 20:30:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D88551065679; Thu, 19 Nov 2009 20:30:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C669B8FC0A; Thu, 19 Nov 2009 20:30:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKUImo018123; Thu, 19 Nov 2009 20:30:18 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKUIdc018121; Thu, 19 Nov 2009 20:30:18 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200911192030.nAJKUIdc018121@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 19 Nov 2009 20:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199544 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 20:30:19 -0000 Author: np Date: Thu Nov 19 20:30:18 2009 New Revision: 199544 URL: http://svn.freebsd.org/changeset/base/199544 Log: Fix cxgb(4)'s LRO in stable/7 Submitted by: matthew.fleming at isilon.com Reviewed by: gnn Modified: stable/7/sys/dev/cxgb/cxgb_main.c Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Thu Nov 19 19:35:15 2009 (r199543) +++ stable/7/sys/dev/cxgb/cxgb_main.c Thu Nov 19 20:30:18 2009 (r199544) @@ -981,13 +981,6 @@ cxgb_makedev(struct port_info *pi) return (0); } -#ifndef LRO_SUPPORTED -#ifdef IFCAP_LRO -#undef IFCAP_LRO -#endif -#define IFCAP_LRO 0x0 -#endif - #ifdef TSO_SUPPORTED #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO) /* Don't enable TSO6 yet */ @@ -1994,7 +1987,6 @@ cxgb_set_mtu(struct port_info *p, int mt return (error); } -#ifdef LRO_SUPPORTED /* * Mark lro enabled or disabled in all qsets for this port */ @@ -2012,7 +2004,6 @@ cxgb_set_lro(struct port_info *p, int en } return (0); } -#endif static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) @@ -2105,14 +2096,14 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l error = EINVAL; } } -#ifdef LRO_SUPPORTED + if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; /* Safe to do this even if cxgb_up not called yet */ cxgb_set_lro(p, ifp->if_capenable & IFCAP_LRO); } -#endif + if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = ifp->if_drv_flags & IFF_DRV_RUNNING; From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 20:40:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B803106566C; Thu, 19 Nov 2009 20:40:11 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB878FC16; Thu, 19 Nov 2009 20:40:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKeB94018451; Thu, 19 Nov 2009 20:40:11 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKeBY9018448; Thu, 19 Nov 2009 20:40:11 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911192040.nAJKeBY9018448@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 19 Nov 2009 20:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199545 - stable/8/share/zoneinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 20:40:11 -0000 Author: edwin Date: Thu Nov 19 20:40:11 2009 New Revision: 199545 URL: http://svn.freebsd.org/changeset/base/199545 Log: MFC of r199336 MFV of tzdata2009s, r199334 - Fix (harmless) typo in the definitions of Antarctica/David - Fiji will go into DST from 29 November 2009 to 25 April 2010. Modified: stable/8/share/zoneinfo/antarctica stable/8/share/zoneinfo/australasia Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/antarctica ============================================================================== --- stable/8/share/zoneinfo/antarctica Thu Nov 19 20:30:18 2009 (r199544) +++ stable/8/share/zoneinfo/antarctica Thu Nov 19 20:40:11 2009 (r199545) @@ -1,5 +1,5 @@ #

-# @(#)antarctica	8.6
+# @(#)antarctica	8.7
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -106,7 +106,7 @@ Zone Antarctica/Casey	0	-	zzz	1969
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT	2009 Oct 18 2:0
+			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Thu Nov 19 20:30:18 2009	(r199544)
+++ stable/8/share/zoneinfo/australasia	Thu Nov 19 20:40:11 2009	(r199545)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.14
+# @(#)australasia	8.15
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -248,9 +248,30 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 			6:30	-	CCT	# Cocos Islands Time
 
 # Fiji
+# From Alexander Krivenyshev (2009-11-10):
+# According to Fiji Broadcasting Corporation,  Fiji plans to re-introduce DST
+# from November 29th 2009  to April 25th 2010.
+#
+# "Daylight savings to commence this month"
+# 
+# http://www.radiofiji.com.fj/fullstory.php?id=23719
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html
+# 
+
+# From Steffen Thorsen (2009-11-10):
+# The Fiji Government has posted some more details about the approved
+# amendments:
+# 
+# http://www.fiji.gov.fj/publish/page_16198.shtml
+# 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
+Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
+Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 20:40:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A1B9F1065695;
	Thu, 19 Nov 2009 20:40:52 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 756568FC21;
	Thu, 19 Nov 2009 20:40:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKeqQ0018510;
	Thu, 19 Nov 2009 20:40:52 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKeqN8018507;
	Thu, 19 Nov 2009 20:40:52 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911192040.nAJKeqN8018507@svn.freebsd.org>
From: Edwin Groothuis 
Date: Thu, 19 Nov 2009 20:40:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199546 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 20:40:52 -0000

Author: edwin
Date: Thu Nov 19 20:40:52 2009
New Revision: 199546
URL: http://svn.freebsd.org/changeset/base/199546

Log:
  MFC of r199336
  MFV of tzdata2009s, r199334
  
  - Fix (harmless) typo in the definitions of Antarctica/David
  - Fiji will go into DST from 29 November 2009 to 25 April 2010.

Modified:
  stable/7/share/zoneinfo/antarctica
  stable/7/share/zoneinfo/australasia
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/antarctica
==============================================================================
--- stable/7/share/zoneinfo/antarctica	Thu Nov 19 20:40:11 2009	(r199545)
+++ stable/7/share/zoneinfo/antarctica	Thu Nov 19 20:40:52 2009	(r199546)
@@ -1,5 +1,5 @@
 # 
-# @(#)antarctica	8.6
+# @(#)antarctica	8.7
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -106,7 +106,7 @@ Zone Antarctica/Casey	0	-	zzz	1969
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT	2009 Oct 18 2:0
+			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00

Modified: stable/7/share/zoneinfo/australasia
==============================================================================
--- stable/7/share/zoneinfo/australasia	Thu Nov 19 20:40:11 2009	(r199545)
+++ stable/7/share/zoneinfo/australasia	Thu Nov 19 20:40:52 2009	(r199546)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.14
+# @(#)australasia	8.15
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -248,9 +248,30 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 			6:30	-	CCT	# Cocos Islands Time
 
 # Fiji
+# From Alexander Krivenyshev (2009-11-10):
+# According to Fiji Broadcasting Corporation,  Fiji plans to re-introduce DST
+# from November 29th 2009  to April 25th 2010.
+#
+# "Daylight savings to commence this month"
+# 
+# http://www.radiofiji.com.fj/fullstory.php?id=23719
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html
+# 
+
+# From Steffen Thorsen (2009-11-10):
+# The Fiji Government has posted some more details about the approved
+# amendments:
+# 
+# http://www.fiji.gov.fj/publish/page_16198.shtml
+# 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
+Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
+Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 20:41:37 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71CCF1065676;
	Thu, 19 Nov 2009 20:41:37 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 462768FC14;
	Thu, 19 Nov 2009 20:41:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKfb9Y018584;
	Thu, 19 Nov 2009 20:41:37 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKfbbC018581;
	Thu, 19 Nov 2009 20:41:37 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911192041.nAJKfbbC018581@svn.freebsd.org>
From: Edwin Groothuis 
Date: Thu, 19 Nov 2009 20:41:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199547 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 20:41:37 -0000

Author: edwin
Date: Thu Nov 19 20:41:36 2009
New Revision: 199547
URL: http://svn.freebsd.org/changeset/base/199547

Log:
  MFC of r199336
  MFV of tzdata2009s, r199334
  
  - Fix (harmless) typo in the definitions of Antarctica/David
  - Fiji will go into DST from 29 November 2009 to 25 April 2010.

Modified:
  stable/6/share/zoneinfo/antarctica
  stable/6/share/zoneinfo/australasia
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/antarctica
==============================================================================
--- stable/6/share/zoneinfo/antarctica	Thu Nov 19 20:40:52 2009	(r199546)
+++ stable/6/share/zoneinfo/antarctica	Thu Nov 19 20:41:36 2009	(r199547)
@@ -1,5 +1,5 @@
 # 
-# @(#)antarctica	8.6
+# @(#)antarctica	8.7
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -106,7 +106,7 @@ Zone Antarctica/Casey	0	-	zzz	1969
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT	2009 Oct 18 2:0
+			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Thu Nov 19 20:40:52 2009	(r199546)
+++ stable/6/share/zoneinfo/australasia	Thu Nov 19 20:41:36 2009	(r199547)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.14
+# @(#)australasia	8.15
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -248,9 +248,30 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 			6:30	-	CCT	# Cocos Islands Time
 
 # Fiji
+# From Alexander Krivenyshev (2009-11-10):
+# According to Fiji Broadcasting Corporation,  Fiji plans to re-introduce DST
+# from November 29th 2009  to April 25th 2010.
+#
+# "Daylight savings to commence this month"
+# 
+# http://www.radiofiji.com.fj/fullstory.php?id=23719
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html
+# 
+
+# From Steffen Thorsen (2009-11-10):
+# The Fiji Government has posted some more details about the approved
+# amendments:
+# 
+# http://www.fiji.gov.fj/publish/page_16198.shtml
+# 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
+Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
+Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 20:57:36 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 44DB6106566B;
	Thu, 19 Nov 2009 20:57:36 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3192A8FC14;
	Thu, 19 Nov 2009 20:57:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKva1b019071;
	Thu, 19 Nov 2009 20:57:36 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKvawI019067;
	Thu, 19 Nov 2009 20:57:36 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192057.nAJKvawI019067@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 20:57:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199548 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 20:57:36 -0000

Author: yongari
Date: Thu Nov 19 20:57:35 2009
New Revision: 199548
URL: http://svn.freebsd.org/changeset/base/199548

Log:
  Remove complex macros that were used to compute bits values.
  Although these macros may have its own strength, its complex
  definition make hard to read the code.
  
  Approved by:	delphij

Modified:
  head/sys/dev/et/if_et.c
  head/sys/dev/et/if_etreg.h
  head/sys/dev/et/if_etvar.h

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 20:41:36 2009	(r199547)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 20:57:35 2009	(r199548)
@@ -404,8 +404,8 @@ et_miibus_readreg(device_t dev, int phy,
 	/* Stop any pending operations */
 	CSR_WRITE_4(sc, ET_MII_CMD, 0);
 
-	val = __SHIFTIN(phy, ET_MII_ADDR_PHY) |
-	      __SHIFTIN(reg, ET_MII_ADDR_REG);
+	val = (phy << ET_MII_ADDR_PHY_SHIFT) & ET_MII_ADDR_PHY_MASK;
+	val |= (reg << ET_MII_ADDR_REG_SHIFT) & ET_MII_ADDR_REG_MASK;
 	CSR_WRITE_4(sc, ET_MII_ADDR, val);
 
 	/* Start reading */
@@ -429,7 +429,7 @@ et_miibus_readreg(device_t dev, int phy,
 #undef NRETRY
 
 	val = CSR_READ_4(sc, ET_MII_STAT);
-	ret = __SHIFTOUT(val, ET_MII_STAT_VALUE);
+	ret = val & ET_MII_STAT_VALUE_MASK;
 
 back:
 	/* Make sure that the current operation is stopped */
@@ -447,12 +447,13 @@ et_miibus_writereg(device_t dev, int phy
 	/* Stop any pending operations */
 	CSR_WRITE_4(sc, ET_MII_CMD, 0);
 
-	val = __SHIFTIN(phy, ET_MII_ADDR_PHY) |
-	      __SHIFTIN(reg, ET_MII_ADDR_REG);
+	val = (phy << ET_MII_ADDR_PHY_SHIFT) & ET_MII_ADDR_PHY_MASK;
+	val |= (reg << ET_MII_ADDR_REG_SHIFT) & ET_MII_ADDR_REG_MASK;
 	CSR_WRITE_4(sc, ET_MII_ADDR, val);
 
 	/* Start writing */
-	CSR_WRITE_4(sc, ET_MII_CTRL, __SHIFTIN(val0, ET_MII_CTRL_VALUE));
+	CSR_WRITE_4(sc, ET_MII_CTRL,
+	    (val0 << ET_MII_CTRL_VALUE_SHIFT) & ET_MII_CTRL_VALUE_MASK);
 
 #define NRETRY 100
 
@@ -601,8 +602,13 @@ et_bus_config(device_t dev)
 	/*
 	 * Set L0s and L1 latency timer to 2us
 	 */
-	val = ET_PCIV_L0S_LATENCY(2) | ET_PCIV_L1_LATENCY(2);
-	pci_write_config(dev, ET_PCIR_L0S_L1_LATENCY, val, 1);
+	val = pci_read_config(dev, ET_PCIR_L0S_L1_LATENCY, 4);
+	val &= ~(PCIM_LINK_CAP_L0S_EXIT | PCIM_LINK_CAP_L1_EXIT);
+	/* L0s exit latency : 2us */
+	val |= 0x00005000;
+	/* L1 exit latency : 2us */
+	val |= 0x00028000;
+	pci_write_config(dev, ET_PCIR_L0S_L1_LATENCY, val, 4);
 
 	/*
 	 * Set max read request size to 2048 bytes
@@ -1021,10 +1027,10 @@ et_chip_attach(struct et_softc *sc)
 	/*
 	 * Setup half duplex mode
 	 */
-	val = __SHIFTIN(10, ET_MAC_HDX_ALT_BEB_TRUNC) |
-	      __SHIFTIN(15, ET_MAC_HDX_REXMIT_MAX) |
-	      __SHIFTIN(55, ET_MAC_HDX_COLLWIN) |
-	      ET_MAC_HDX_EXC_DEFER;
+	val = (10 << ET_MAC_HDX_ALT_BEB_TRUNC_SHIFT) |
+	    (15 << ET_MAC_HDX_REXMIT_MAX_SHIFT) |
+	    (55 << ET_MAC_HDX_COLLWIN_SHIFT) |
+	    ET_MAC_HDX_EXC_DEFER;
 	CSR_WRITE_4(sc, ET_MAC_HDX, val);
 
 	/* Clear MAC control */
@@ -1655,19 +1661,19 @@ et_init_mac(struct et_softc *sc)
 	/*
 	 * Setup inter packet gap
 	 */
-	val = __SHIFTIN(56, ET_IPG_NONB2B_1) |
-	      __SHIFTIN(88, ET_IPG_NONB2B_2) |
-	      __SHIFTIN(80, ET_IPG_MINIFG) |
-	      __SHIFTIN(96, ET_IPG_B2B);
+	val = (56 << ET_IPG_NONB2B_1_SHIFT) |
+	    (88 << ET_IPG_NONB2B_2_SHIFT) |
+	    (80 << ET_IPG_MINIFG_SHIFT) |
+	    (96 << ET_IPG_B2B_SHIFT);
 	CSR_WRITE_4(sc, ET_IPG, val);
 
 	/*
 	 * Setup half duplex mode
 	 */
-	val = __SHIFTIN(10, ET_MAC_HDX_ALT_BEB_TRUNC) |
-	      __SHIFTIN(15, ET_MAC_HDX_REXMIT_MAX) |
-	      __SHIFTIN(55, ET_MAC_HDX_COLLWIN) |
-	      ET_MAC_HDX_EXC_DEFER;
+	val = (10 << ET_MAC_HDX_ALT_BEB_TRUNC_SHIFT) |
+	    (15 << ET_MAC_HDX_REXMIT_MAX_SHIFT) |
+	    (55 << ET_MAC_HDX_COLLWIN_SHIFT) |
+	    ET_MAC_HDX_EXC_DEFER;
 	CSR_WRITE_4(sc, ET_MAC_HDX, val);
 
 	/* Clear MAC control */
@@ -1738,7 +1744,7 @@ et_init_rxmac(struct et_softc *sc)
 		 * since this is the size of the PCI-Express TLP's
 		 * that the ET1310 uses.
 		 */
-		val = __SHIFTIN(ET_RXMAC_SEGSZ(256), ET_RXMAC_MC_SEGSZ_MAX) |
+		val = (ET_RXMAC_SEGSZ(256) & ET_RXMAC_MC_SEGSZ_MAX_MASK) |
 		      ET_RXMAC_MC_SEGSZ_ENABLE;
 	} else {
 		val = 0;
@@ -1761,7 +1767,9 @@ et_init_rxmac(struct et_softc *sc)
 	/*
 	 * Configure runt filtering (may not work on certain chip generation)
 	 */
-	val = __SHIFTIN(ETHER_MIN_LEN, ET_PKTFILT_MINLEN) | ET_PKTFILT_FRAG;
+	val = (ETHER_MIN_LEN << ET_PKTFILT_MINLEN_SHIFT) &
+	    ET_PKTFILT_MINLEN_MASK;
+	val |= ET_PKTFILT_FRAG;
 	CSR_WRITE_4(sc, ET_PKTFILT, val);
 
 	/* Enable RX MAC but leave WOL disabled */
@@ -1793,11 +1801,9 @@ et_start_rxdma(struct et_softc *sc)
 {
 	uint32_t val = 0;
 
-	val |= __SHIFTIN(sc->sc_rx_data[0].rbd_bufsize,
-			 ET_RXDMA_CTRL_RING0_SIZE) |
+	val |= (sc->sc_rx_data[0].rbd_bufsize & ET_RXDMA_CTRL_RING0_SIZE_MASK) |
 	       ET_RXDMA_CTRL_RING0_ENABLE;
-	val |= __SHIFTIN(sc->sc_rx_data[1].rbd_bufsize,
-			 ET_RXDMA_CTRL_RING1_SIZE) |
+	val |= (sc->sc_rx_data[1].rbd_bufsize & ET_RXDMA_CTRL_RING1_SIZE_MASK) |
 	       ET_RXDMA_CTRL_RING1_ENABLE;
 
 	CSR_WRITE_4(sc, ET_RXDMA_CTRL, val);
@@ -1892,7 +1898,8 @@ et_rxeof(struct et_softc *sc)
 
 	rxs_stat_ring = rxsd->rxsd_status->rxs_stat_ring;
 	rxst_wrap = (rxs_stat_ring & ET_RXS_STATRING_WRAP) ? 1 : 0;
-	rxst_index = __SHIFTOUT(rxs_stat_ring, ET_RXS_STATRING_INDEX);
+	rxst_index = (rxs_stat_ring & ET_RXS_STATRING_INDEX_MASK) >>
+	    ET_RXS_STATRING_INDEX_SHIFT;
 
 	while (rxst_index != rxst_ring->rsr_index ||
 	       rxst_wrap != rxst_ring->rsr_wrap) {
@@ -1906,16 +1913,18 @@ et_rxeof(struct et_softc *sc)
 		MPASS(rxst_ring->rsr_index < ET_RX_NSTAT);
 		st = &rxst_ring->rsr_stat[rxst_ring->rsr_index];
 
-		buflen = __SHIFTOUT(st->rxst_info2, ET_RXST_INFO2_LEN);
-		buf_idx = __SHIFTOUT(st->rxst_info2, ET_RXST_INFO2_BUFIDX);
-		ring_idx = __SHIFTOUT(st->rxst_info2, ET_RXST_INFO2_RINGIDX);
+		buflen = (st->rxst_info2 & ET_RXST_INFO2_LEN_MASK) >>
+		    ET_RXST_INFO2_LEN_SHIFT;
+		buf_idx = (st->rxst_info2 & ET_RXST_INFO2_BUFIDX_MASK) >>
+		    ET_RXST_INFO2_BUFIDX_SHIFT;
+		ring_idx = (st->rxst_info2 & ET_RXST_INFO2_RINGIDX_MASK) >>
+		    ET_RXST_INFO2_RINGIDX_SHIFT;
 
 		if (++rxst_ring->rsr_index == ET_RX_NSTAT) {
 			rxst_ring->rsr_index = 0;
 			rxst_ring->rsr_wrap ^= 1;
 		}
-		rxstat_pos = __SHIFTIN(rxst_ring->rsr_index,
-				       ET_RXSTAT_POS_INDEX);
+		rxstat_pos = rxst_ring->rsr_index & ET_RXSTAT_POS_INDEX_MASK;
 		if (rxst_ring->rsr_wrap)
 			rxstat_pos |= ET_RXSTAT_POS_WRAP;
 		CSR_WRITE_4(sc, ET_RXSTAT_POS, rxstat_pos);
@@ -1968,7 +1977,7 @@ et_rxeof(struct et_softc *sc)
 			rx_ring->rr_index = 0;
 			rx_ring->rr_wrap ^= 1;
 		}
-		rxring_pos = __SHIFTIN(rx_ring->rr_index, ET_RX_RING_POS_INDEX);
+		rxring_pos = rx_ring->rr_index & ET_RX_RING_POS_INDEX_MASK;
 		if (rx_ring->rr_wrap)
 			rxring_pos |= ET_RX_RING_POS_WRAP;
 		CSR_WRITE_4(sc, rx_ring->rr_posreg, rxring_pos);
@@ -2056,7 +2065,7 @@ et_encap(struct et_softc *sc, struct mbu
 		td = &tx_ring->tr_desc[idx];
 		td->td_addr_hi = ET_ADDR_HI(segs[i].ds_addr);
 		td->td_addr_lo = ET_ADDR_LO(segs[i].ds_addr);
-		td->td_ctrl1 = __SHIFTIN(segs[i].ds_len, ET_TDCTRL1_LEN);
+		td->td_ctrl1 =  segs[i].ds_len & ET_TDCTRL1_LEN_MASK;
 
 		if (i == ctx.nsegs - 1) {	/* Last frag */
 			td->td_ctrl2 = last_td_ctrl2;
@@ -2083,8 +2092,7 @@ et_encap(struct et_softc *sc, struct mbu
 	bus_dmamap_sync(tx_ring->tr_dtag, tx_ring->tr_dmap,
 			BUS_DMASYNC_PREWRITE);
 
-	tx_ready_pos = __SHIFTIN(tx_ring->tr_ready_index,
-		       ET_TX_READY_POS_INDEX);
+	tx_ready_pos = tx_ring->tr_ready_index & ET_TX_READY_POS_INDEX_MASK;
 	if (tx_ring->tr_ready_wrap)
 		tx_ready_pos |= ET_TX_READY_POS_WRAP;
 	CSR_WRITE_4(sc, ET_TX_READY_POS, tx_ready_pos);
@@ -2119,7 +2127,7 @@ et_txeof(struct et_softc *sc)
 		return;
 
 	tx_done = CSR_READ_4(sc, ET_TX_DONE_POS);
-	end = __SHIFTOUT(tx_done, ET_TX_DONE_POS_INDEX);
+	end = tx_done & ET_TX_DONE_POS_INDEX_MASK;
 	wrap = (tx_done & ET_TX_DONE_POS_WRAP) ? 1 : 0;
 
 	while (tbd->tbd_start_index != end || tbd->tbd_start_wrap != wrap) {
@@ -2352,7 +2360,8 @@ et_setmedia(struct et_softc *sc)
 	cfg2 &= ~(ET_MAC_CFG2_MODE_MII | ET_MAC_CFG2_MODE_GMII |
 		  ET_MAC_CFG2_FDX | ET_MAC_CFG2_BIGFRM);
 	cfg2 |= ET_MAC_CFG2_LENCHK | ET_MAC_CFG2_CRC | ET_MAC_CFG2_PADCRC |
-		__SHIFTIN(7, ET_MAC_CFG2_PREAMBLE_LEN);
+	    ((7 << ET_MAC_CFG2_PREAMBLE_LEN_SHIFT) &
+	    ET_MAC_CFG2_PREAMBLE_LEN_MASK);
 
 	ctrl = CSR_READ_4(sc, ET_MAC_CTRL);
 	ctrl &= ~(ET_MAC_CTRL_GHDX | ET_MAC_CTRL_MODE_MII);
@@ -2384,7 +2393,7 @@ et_setup_rxdesc(struct et_rxbuf_data *rb
 
 	desc->rd_addr_hi = ET_ADDR_HI(paddr);
 	desc->rd_addr_lo = ET_ADDR_LO(paddr);
-	desc->rd_ctrl = __SHIFTIN(buf_idx, ET_RDCTRL_BUFIDX);
+	desc->rd_ctrl = buf_idx & ET_RDCTRL_BUFIDX_MASK;
 
 	bus_dmamap_sync(rx_ring->rr_dtag, rx_ring->rr_dmap,
 			BUS_DMASYNC_PREWRITE);

Modified: head/sys/dev/et/if_etreg.h
==============================================================================
--- head/sys/dev/et/if_etreg.h	Thu Nov 19 20:41:36 2009	(r199547)
+++ head/sys/dev/et/if_etreg.h	Thu Nov 19 20:57:35 2009	(r199548)
@@ -73,50 +73,6 @@
 #ifndef _IF_ETREG_H
 #define _IF_ETREG_H
 
-/*
- * __BIT(n): Return a bitmask with bit n set, where the least
- *           significant bit is bit 0.
- *
- * __BITS(m, n): Return a bitmask with bits m through n, inclusive,
- *               set.  It does not matter whether m>n or m<=n.  The
- *               least significant bit is bit 0.
- *
- * A "bitfield" is a span of consecutive bits defined by a bitmask,
- * where 1s select the bits in the bitfield.  __SHIFTIN, __SHIFTOUT,
- * and __SHIFTOUT_MASK help read and write bitfields from device
- * registers.
- *
- * __SHIFTIN(v, mask): Left-shift bits `v' into the bitfield
- *                     defined by `mask', and return them.  No
- *                     side-effects.
- *
- * __SHIFTOUT(v, mask): Extract and return the bitfield selected
- *                      by `mask' from `v', right-shifting the
- *                      bits so that the rightmost selected bit
- *                      is at bit 0.  No side-effects.
- *
- * __SHIFTOUT_MASK(mask): Right-shift the bits in `mask' so that
- *                        the rightmost non-zero bit is at bit
- *                        0.  This is useful for finding the
- *                        greatest unsigned value that a bitfield
- *                        can hold.  No side-effects.  Note that
- *                        __SHIFTOUT_MASK(m) = __SHIFTOUT(m, m).
- */
-
-/* __BIT(n): nth bit, where __BIT(0) == 0x1. */
-#define	__BIT(__n) (((__n) == 32) ? 0 : ((uint32_t)1 << (__n)))
-
-/* __BITS(m, n): bits m through n, m < n. */
-#define	__BITS(__m, __n)	\
-	((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))
-
-/* Find least significant bit that is set */
-#define	__LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))
-
-#define	__SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask))
-#define	__SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask))
-#define	__SHIFTOUT_MASK(__mask) __SHIFTOUT((__mask), (__mask))
-
 #define ET_MEM_TXSIZE_EX		182
 #define ET_MEM_RXSIZE_MIN		608
 #define ET_MEM_RXSIZE_DEFAULT		11216
@@ -159,10 +115,6 @@
 #define ET_PCIV_REPLAY_TIMER_256	(1248 + ET_REPLAY_TIMER_RX_L0S_ADJ)
 
 #define ET_PCIR_L0S_L1_LATENCY		0xcf
-#define ET_PCIM_L0S_LATENCY		__BITS(2, 0)
-#define ET_PCIM_L1_LATENCY		__BITS(5, 3)
-#define ET_PCIV_L0S_LATENCY(l)		__SHIFTIN((l) - 1, ET_PCIM_L0S_LATENCY)
-#define ET_PCIV_L1_LATENCY(l)		__SHIFTIN((l) - 1, ET_PCIM_L1_LATENCY)
 
 /*
  * CSR
@@ -176,22 +128,22 @@
 #define ET_QUEUE_ADDR_END		ET_QUEUE_ADDR(ET_MEM_SIZE)
 
 #define ET_PM				0x0010
-#define ET_PM_SYSCLK_GATE		__BIT(3)
-#define ET_PM_TXCLK_GATE		__BIT(4)
-#define ET_PM_RXCLK_GATE		__BIT(5)
+#define ET_PM_SYSCLK_GATE		0x00000008
+#define ET_PM_TXCLK_GATE		0x00000010
+#define ET_PM_RXCLK_GATE		0x00000020
 
 #define ET_INTR_STATUS			0x0018
 #define ET_INTR_MASK			0x001c
 
 #define ET_SWRST			0x0028
-#define ET_SWRST_TXDMA			__BIT(0)
-#define ET_SWRST_RXDMA			__BIT(1)
-#define ET_SWRST_TXMAC			__BIT(2)
-#define ET_SWRST_RXMAC			__BIT(3)
-#define ET_SWRST_MAC			__BIT(4)
-#define ET_SWRST_MAC_STAT		__BIT(5)
-#define ET_SWRST_MMC			__BIT(6)
-#define ET_SWRST_SELFCLR_DISABLE	__BIT(31)
+#define ET_SWRST_TXDMA			0x00000001
+#define ET_SWRST_RXDMA			0x00000002
+#define ET_SWRST_TXMAC			0x00000004
+#define ET_SWRST_RXMAC			0x00000008
+#define ET_SWRST_MAC			0x00000010
+#define ET_SWRST_MAC_STAT		0x00000020
+#define ET_SWRST_MMC			0x00000040
+#define ET_SWRST_SELFCLR_DISABLE	0x80000000
 
 #define ET_MSI_CFG			0x0030
 
@@ -200,9 +152,9 @@
 #define ET_TIMER			0x0038
 
 #define ET_TXDMA_CTRL			0x1000
-#define ET_TXDMA_CTRL_HALT		__BIT(0)
-#define ET_TXDMA_CTRL_CACHE_THR		__BITS(7, 4)
-#define ET_TXDMA_CTRL_SINGLE_EPKT	__BIT(8)	/* ??? */
+#define ET_TXDMA_CTRL_HALT		0x00000001
+#define ET_TXDMA_CTRL_CACHE_THR_MASK	0x000000F0
+#define ET_TXDMA_CTRL_SINGLE_EPKT	0x00000100	/* ??? */
 
 #define ET_TX_RING_HI			0x1004
 #define ET_TX_RING_LO			0x1008
@@ -212,28 +164,28 @@
 #define ET_TX_STATUS_LO			0x1020
 
 #define ET_TX_READY_POS			0x1024
-#define ET_TX_READY_POS_INDEX		__BITS(9, 0)
-#define ET_TX_READY_POS_WRAP		__BIT(10)
+#define ET_TX_READY_POS_INDEX_MASK	0x000003FF
+#define ET_TX_READY_POS_WRAP		0x00000400
 
 #define ET_TX_DONE_POS			0x1060
-#define ET_TX_DONE_POS_INDEX		__BITS(9, 0)
-#define ET_TX_DONE_POS_WRAP		__BIT(10)
+#define ET_TX_DONE_POS_INDEX_MASK	0x0000003FF
+#define ET_TX_DONE_POS_WRAP		0x000000400
 
 #define ET_RXDMA_CTRL			0x2000
-#define ET_RXDMA_CTRL_HALT		__BIT(0)
-#define ET_RXDMA_CTRL_RING0_SIZE	__BITS(9, 8)
-#define ET_RXDMA_CTRL_RING0_128		0		/* 127 */
-#define ET_RXDMA_CTRL_RING0_256		1		/* 255 */
-#define ET_RXDMA_CTRL_RING0_512		2		/* 511 */
-#define ET_RXDMA_CTRL_RING0_1024	3		/* 1023 */
-#define ET_RXDMA_CTRL_RING0_ENABLE	__BIT(10)
-#define ET_RXDMA_CTRL_RING1_SIZE	__BITS(12, 11)
-#define ET_RXDMA_CTRL_RING1_2048	0		/* 2047 */
-#define ET_RXDMA_CTRL_RING1_4096	1		/* 4095 */
-#define ET_RXDMA_CTRL_RING1_8192	2		/* 8191 */
-#define ET_RXDMA_CTRL_RING1_16384	3		/* 16383 (9022?) */
-#define ET_RXDMA_CTRL_RING1_ENABLE	__BIT(13)
-#define ET_RXDMA_CTRL_HALTED		__BIT(17)
+#define ET_RXDMA_CTRL_HALT		0x00000001
+#define ET_RXDMA_CTRL_RING0_SIZE_MASK	0x00000300
+#define ET_RXDMA_CTRL_RING0_128		0x00000000	/* 127 */
+#define ET_RXDMA_CTRL_RING0_256		0x00000100	/* 255 */
+#define ET_RXDMA_CTRL_RING0_512		0x00000200	/* 511 */
+#define ET_RXDMA_CTRL_RING0_1024	0x00000300	/* 1023 */
+#define ET_RXDMA_CTRL_RING0_ENABLE	0x00000400
+#define ET_RXDMA_CTRL_RING1_SIZE_MASK	0x00001800
+#define ET_RXDMA_CTRL_RING1_2048	0x00000000	/* 2047 */
+#define ET_RXDMA_CTRL_RING1_4096	0x00000800	/* 4095 */
+#define ET_RXDMA_CTRL_RING1_8192	0x00001000	/* 8191 */
+#define ET_RXDMA_CTRL_RING1_16384	0x00001800	/* 16383 (9022?) */
+#define ET_RXDMA_CTRL_RING1_ENABLE	0x00002000
+#define ET_RXDMA_CTRL_HALTED		0x00020000
 
 #define ET_RX_STATUS_LO			0x2004
 #define ET_RX_STATUS_HI			0x2008
@@ -246,8 +198,8 @@
 #define ET_RXSTAT_CNT			0x2028
 
 #define ET_RXSTAT_POS			0x2030
-#define ET_RXSTAT_POS_INDEX		__BITS(11, 0)
-#define ET_RXSTAT_POS_WRAP		__BIT(12)
+#define ET_RXSTAT_POS_INDEX_MASK	0x00000FFF
+#define ET_RXSTAT_POS_WRAP		0x00001000
 
 #define ET_RXSTAT_MINCNT		0x2038
 
@@ -256,8 +208,8 @@
 #define ET_RX_RING0_CNT			0x2044
 
 #define ET_RX_RING0_POS			0x204c
-#define ET_RX_RING0_POS_INDEX		__BITS(9, 0)
-#define ET_RX_RING0_POS_WRAP		__BIT(10)
+#define ET_RX_RING0_POS_INDEX_MASK	0x000003FF
+#define ET_RX_RING0_POS_WRAP		0x00000400
 
 #define ET_RX_RING0_MINCNT		0x2054
 
@@ -266,21 +218,21 @@
 #define ET_RX_RING1_CNT			0x2060
 
 #define ET_RX_RING1_POS			0x2068
-#define ET_RX_RING1_POS_INDEX		__BITS(9, 0)
-#define ET_RX_RING1_POS_WRAP		__BIT(10)
+#define ET_RX_RING1_POS_INDEX		0x000003FF
+#define ET_RX_RING1_POS_WRAP		0x00000400
 
 #define ET_RX_RING1_MINCNT		0x2070
 
 #define ET_TXMAC_CTRL			0x3000
-#define ET_TXMAC_CTRL_ENABLE		__BIT(0)
-#define ET_TXMAC_CTRL_FC_DISABLE	__BIT(3)
+#define ET_TXMAC_CTRL_ENABLE		0x00000001
+#define ET_TXMAC_CTRL_FC_DISABLE	0x00000008
 
 #define ET_TXMAC_FLOWCTRL		0x3010
 
 #define ET_RXMAC_CTRL			0x4000
-#define ET_RXMAC_CTRL_ENABLE		__BIT(0)
-#define ET_RXMAC_CTRL_NO_PKTFILT	__BIT(2)
-#define ET_RXMAC_CTRL_WOL_DISABLE	__BIT(3)
+#define ET_RXMAC_CTRL_ENABLE		0x00000001
+#define ET_RXMAC_CTRL_NO_PKTFILT	0x00000004
+#define ET_RXMAC_CTRL_WOL_DISABLE	0x00000008
 
 #define ET_WOL_CRC			0x4004
 #define ET_WOL_SA_LO			0x4010
@@ -294,16 +246,17 @@
 #define ET_MULTI_HASH			0x4074
 
 #define ET_PKTFILT			0x4084
-#define ET_PKTFILT_BCAST		__BIT(0)
-#define ET_PKTFILT_MCAST		__BIT(1)
-#define ET_PKTFILT_UCAST		__BIT(2)
-#define ET_PKTFILT_FRAG			__BIT(3)
-#define ET_PKTFILT_MINLEN		__BITS(22, 16)
+#define ET_PKTFILT_BCAST		0x00000001
+#define ET_PKTFILT_MCAST		0x00000002
+#define ET_PKTFILT_UCAST		0x00000004
+#define ET_PKTFILT_FRAG			0x00000008
+#define ET_PKTFILT_MINLEN_MASK		0x007F0000
+#define ET_PKTFILT_MINLEN_SHIFT		16
 
 #define ET_RXMAC_MC_SEGSZ		0x4088
-#define ET_RXMAC_MC_SEGSZ_ENABLE	__BIT(0)
-#define ET_RXMAC_MC_SEGSZ_FC		__BIT(1)
-#define ET_RXMAC_MC_SEGSZ_MAX		__BITS(9, 2)
+#define ET_RXMAC_MC_SEGSZ_ENABLE	0x00000001
+#define ET_RXMAC_MC_SEGSZ_FC		0x00000002
+#define ET_RXMAC_MC_SEGSZ_MAX_MASK	0x000003FC
 #define ET_RXMAC_SEGSZ(segsz)		((segsz) / ET_MEM_UNIT)
 #define ET_RXMAC_CUT_THRU_FRMLEN	8074
 
@@ -311,110 +264,121 @@
 #define ET_RXMAC_SPACE_AVL		0x4094
 
 #define ET_RXMAC_MGT			0x4098
-#define ET_RXMAC_MGT_PASS_ECRC		__BIT(4)
-#define ET_RXMAC_MGT_PASS_ELEN		__BIT(5)
-#define ET_RXMAC_MGT_PASS_ETRUNC	__BIT(16)
-#define ET_RXMAC_MGT_CHECK_PKT		__BIT(17)
+#define ET_RXMAC_MGT_PASS_ECRC		0x00000010
+#define ET_RXMAC_MGT_PASS_ELEN		0x00000020
+#define ET_RXMAC_MGT_PASS_ETRUNC	0x00010000
+#define ET_RXMAC_MGT_CHECK_PKT		0x00020000
 
 #define ET_MAC_CFG1			0x5000
-#define ET_MAC_CFG1_TXEN		__BIT(0)
-#define ET_MAC_CFG1_SYNC_TXEN		__BIT(1)
-#define ET_MAC_CFG1_RXEN		__BIT(2)
-#define ET_MAC_CFG1_SYNC_RXEN		__BIT(3)
-#define ET_MAC_CFG1_TXFLOW		__BIT(4)
-#define ET_MAC_CFG1_RXFLOW		__BIT(5)
-#define ET_MAC_CFG1_LOOPBACK		__BIT(8)
-#define ET_MAC_CFG1_RST_TXFUNC		__BIT(16)
-#define ET_MAC_CFG1_RST_RXFUNC		__BIT(17)
-#define ET_MAC_CFG1_RST_TXMC		__BIT(18)
-#define ET_MAC_CFG1_RST_RXMC		__BIT(19)
-#define ET_MAC_CFG1_SIM_RST		__BIT(30)
-#define ET_MAC_CFG1_SOFT_RST		__BIT(31)
+#define ET_MAC_CFG1_TXEN		0x00000001
+#define ET_MAC_CFG1_SYNC_TXEN		0x00000002
+#define ET_MAC_CFG1_RXEN		0x00000004
+#define ET_MAC_CFG1_SYNC_RXEN		0x00000008
+#define ET_MAC_CFG1_TXFLOW		0x00000010
+#define ET_MAC_CFG1_RXFLOW		0x00000020
+#define ET_MAC_CFG1_LOOPBACK		0x00000100
+#define ET_MAC_CFG1_RST_TXFUNC		0x00010000
+#define ET_MAC_CFG1_RST_RXFUNC		0x00020000
+#define ET_MAC_CFG1_RST_TXMC		0x00040000
+#define ET_MAC_CFG1_RST_RXMC		0x00080000
+#define ET_MAC_CFG1_SIM_RST		0x40000000
+#define ET_MAC_CFG1_SOFT_RST		0x80000000
 
 #define ET_MAC_CFG2			0x5004
-#define ET_MAC_CFG2_FDX			__BIT(0)
-#define ET_MAC_CFG2_CRC			__BIT(1)
-#define ET_MAC_CFG2_PADCRC		__BIT(2)
-#define ET_MAC_CFG2_LENCHK		__BIT(4)
-#define ET_MAC_CFG2_BIGFRM		__BIT(5)
-#define ET_MAC_CFG2_MODE_MII		__BIT(8)
-#define ET_MAC_CFG2_MODE_GMII		__BIT(9)
-#define ET_MAC_CFG2_PREAMBLE_LEN	__BITS(15, 12)
+#define ET_MAC_CFG2_FDX			0x00000001
+#define ET_MAC_CFG2_CRC			0x00000002
+#define ET_MAC_CFG2_PADCRC		0x00000004
+#define ET_MAC_CFG2_LENCHK		0x00000010
+#define ET_MAC_CFG2_BIGFRM		0x00000020
+#define ET_MAC_CFG2_MODE_MII		0x00000100
+#define ET_MAC_CFG2_MODE_GMII		0x00000200
+#define ET_MAC_CFG2_PREAMBLE_LEN_MASK	0x0000F000
+#define ET_MAC_CFG2_PREAMBLE_LEN_SHIFT	12
 
 #define ET_IPG				0x5008
-#define ET_IPG_B2B			__BITS(6, 0)
-#define ET_IPG_MINIFG			__BITS(15, 8)
-#define ET_IPG_NONB2B_2			__BITS(22, 16)
-#define ET_IPG_NONB2B_1			__BITS(30, 24)
+#define ET_IPG_B2B_MASK			0x0000007F
+#define ET_IPG_MINIFG_MASK		0x0000FF00
+#define ET_IPG_NONB2B_2_MASK		0x007F0000
+#define ET_IPG_NONB2B_1_MASK		0x7F000000
+#define ET_IPG_B2B_SHIFT		0
+#define ET_IPG_MINIFG_SHIFT		8
+#define ET_IPG_NONB2B_2_SHIFT		16
+#define ET_IPG_NONB2B_1_SHIFT		24
 
 #define ET_MAC_HDX			0x500c
-#define ET_MAC_HDX_COLLWIN		__BITS(9, 0)
-#define ET_MAC_HDX_REXMIT_MAX		__BITS(15, 12)
-#define ET_MAC_HDX_EXC_DEFER		__BIT(16)
-#define ET_MAC_HDX_NOBACKOFF		__BIT(17)
-#define ET_MAC_HDX_BP_NOBACKOFF		__BIT(18)
-#define ET_MAC_HDX_ALT_BEB		__BIT(19)
-#define ET_MAC_HDX_ALT_BEB_TRUNC	__BITS(23, 20)
+#define ET_MAC_HDX_COLLWIN_MASK		0x000003FF
+#define ET_MAC_HDX_REXMIT_MAX_MASK	0x0000F000
+#define ET_MAC_HDX_EXC_DEFER		0x00010000
+#define ET_MAC_HDX_NOBACKOFF		0x00020000
+#define ET_MAC_HDX_BP_NOBACKOFF		0x00040000
+#define ET_MAC_HDX_ALT_BEB		0x00080000
+#define ET_MAC_HDX_ALT_BEB_TRUNC_MASK	0x00F00000
+#define ET_MAC_HDX_COLLWIN_SHIFT	0
+#define ET_MAC_HDX_REXMIT_MAX_SHIFT	12
+#define ET_MAC_HDX_ALT_BEB_TRUNC_SHIFT	20
 
 #define ET_MAX_FRMLEN			0x5010
 
 #define ET_MII_CFG			0x5020
-#define ET_MII_CFG_CLKRST		__BITS(2, 0)
-#define ET_MII_CFG_PREAMBLE_SUP		__BIT(4)
-#define ET_MII_CFG_SCAN_AUTOINC		__BIT(5)
-#define ET_MII_CFG_RST			__BIT(31)
+#define ET_MII_CFG_CLKRST		0x00000007
+#define ET_MII_CFG_PREAMBLE_SUP		0x00000010
+#define ET_MII_CFG_SCAN_AUTOINC		0x00000020
+#define ET_MII_CFG_RST			0x80000000
 
 #define ET_MII_CMD			0x5024
-#define ET_MII_CMD_READ			__BIT(0)
+#define ET_MII_CMD_READ			0x00000001
 
 #define ET_MII_ADDR			0x5028
-#define ET_MII_ADDR_REG			__BITS(4, 0)
-#define ET_MII_ADDR_PHY			__BITS(12, 8)
+#define ET_MII_ADDR_REG_MASK		0x0000001F
+#define ET_MII_ADDR_PHY_MASK		0x00001F00
+#define ET_MII_ADDR_REG_SHIFT		0
+#define ET_MII_ADDR_PHY_SHIFT		8
 
 #define ET_MII_CTRL			0x502c
-#define ET_MII_CTRL_VALUE		__BITS(15, 0) 
+#define ET_MII_CTRL_VALUE_MASK		0x0000FFFF
+#define ET_MII_CTRL_VALUE_SHIFT		0
 
 #define ET_MII_STAT			0x5030
-#define ET_MII_STAT_VALUE		__BITS(15, 0)
+#define ET_MII_STAT_VALUE_MASK		0x0000FFFF
 
 #define ET_MII_IND			0x5034
-#define ET_MII_IND_BUSY			__BIT(0)
-#define ET_MII_IND_INVALID		__BIT(2)
+#define ET_MII_IND_BUSY			0x00000001
+#define ET_MII_IND_INVALID		0x00000004
 
 #define ET_MAC_CTRL			0x5038
-#define ET_MAC_CTRL_MODE_MII		__BIT(24)
-#define ET_MAC_CTRL_LHDX		__BIT(25)
-#define ET_MAC_CTRL_GHDX		__BIT(26)
+#define ET_MAC_CTRL_MODE_MII		0x01000000
+#define ET_MAC_CTRL_LHDX		0x02000000
+#define ET_MAC_CTRL_GHDX		0x04000000
 
 #define ET_MAC_ADDR1			0x5040
 #define ET_MAC_ADDR2			0x5044
 
 #define ET_MMC_CTRL			0x7000
-#define ET_MMC_CTRL_ENABLE		__BIT(0)
-#define ET_MMC_CTRL_ARB_DISABLE		__BIT(1)
-#define ET_MMC_CTRL_RXMAC_DISABLE	__BIT(2)
-#define ET_MMC_CTRL_TXMAC_DISABLE	__BIT(3)
-#define ET_MMC_CTRL_TXDMA_DISABLE	__BIT(4)
-#define ET_MMC_CTRL_RXDMA_DISABLE	__BIT(5)
-#define ET_MMC_CTRL_FORCE_CE		__BIT(6)
+#define ET_MMC_CTRL_ENABLE		0x00000001
+#define ET_MMC_CTRL_ARB_DISABLE		0x00000002
+#define ET_MMC_CTRL_RXMAC_DISABLE	0x00000004
+#define ET_MMC_CTRL_TXMAC_DISABLE	0x00000008
+#define ET_MMC_CTRL_TXDMA_DISABLE	0x00000010
+#define ET_MMC_CTRL_RXDMA_DISABLE	0x00000020
+#define ET_MMC_CTRL_FORCE_CE		0x00000040
 
 /*
  * Interrupts
  */
-#define ET_INTR_TXEOF			__BIT(3)
-#define ET_INTR_TXDMA_ERROR		__BIT(4)
-#define ET_INTR_RXEOF			__BIT(5)
-#define ET_INTR_RXRING0_LOW		__BIT(6)
-#define ET_INTR_RXRING1_LOW		__BIT(7)
-#define ET_INTR_RXSTAT_LOW		__BIT(8)
-#define ET_INTR_RXDMA_ERROR		__BIT(9)
-#define ET_INTR_TIMER			__BIT(14)
-#define ET_INTR_WOL			__BIT(15)
-#define ET_INTR_PHY			__BIT(16)
-#define ET_INTR_TXMAC			__BIT(17)
-#define ET_INTR_RXMAC			__BIT(18)
-#define ET_INTR_MAC_STATS		__BIT(19)
-#define ET_INTR_SLAVE_TO		__BIT(20)
+#define ET_INTR_TXEOF			0x00000008
+#define ET_INTR_TXDMA_ERROR		0x00000010
+#define ET_INTR_RXEOF			0x00000020
+#define ET_INTR_RXRING0_LOW		0x00000040
+#define ET_INTR_RXRING1_LOW		0x00000080
+#define ET_INTR_RXSTAT_LOW		0x00000100
+#define ET_INTR_RXDMA_ERROR		0x00000200
+#define ET_INTR_TIMER			0x00004000
+#define ET_INTR_WOL			0x00008000
+#define ET_INTR_PHY			0x00010000
+#define ET_INTR_TXMAC			0x00020000
+#define ET_INTR_RXMAC			0x00040000
+#define ET_INTR_MAC_STATS		0x00080000
+#define ET_INTR_SLAVE_TO		0x00100000
 
 #define ET_INTRS			(ET_INTR_TXEOF | \
 					 ET_INTR_RXEOF | \
@@ -423,8 +387,8 @@
 /*
  * RX ring position uses same layout
  */
-#define ET_RX_RING_POS_INDEX		__BITS(9, 0)
-#define ET_RX_RING_POS_WRAP		__BIT(10)
+#define ET_RX_RING_POS_INDEX_MASK	0x000003FF
+#define ET_RX_RING_POS_WRAP		0x00000400
 
 /*
  * PCI IDs

Modified: head/sys/dev/et/if_etvar.h
==============================================================================
--- head/sys/dev/et/if_etvar.h	Thu Nov 19 20:41:36 2009	(r199547)
+++ head/sys/dev/et/if_etvar.h	Thu Nov 19 20:57:35 2009	(r199548)
@@ -106,11 +106,11 @@ struct et_txdesc {
 	uint32_t	td_ctrl2;	/* ET_TDCTRL2_ */
 } __packed;
 
-#define ET_TDCTRL1_LEN		__BITS(15, 0)
+#define ET_TDCTRL1_LEN_MASK	0x0000FFFF
 
-#define ET_TDCTRL2_LAST_FRAG	__BIT(0)
-#define ET_TDCTRL2_FIRST_FRAG	__BIT(1)
-#define ET_TDCTRL2_INTR		__BIT(2)
+#define ET_TDCTRL2_LAST_FRAG	0x00000001
+#define ET_TDCTRL2_FIRST_FRAG	0x00000002
+#define ET_TDCTRL2_INTR		0x00000004
 
 struct et_rxdesc {
 	uint32_t	rd_addr_lo;
@@ -118,24 +118,28 @@ struct et_rxdesc {
 	uint32_t	rd_ctrl;	/* ET_RDCTRL_ */
 } __packed;
 
-#define ET_RDCTRL_BUFIDX	__BITS(9, 0)
+#define ET_RDCTRL_BUFIDX_MASK	0x000003FF
 
 struct et_rxstat {
 	uint32_t	rxst_info1;
 	uint32_t	rxst_info2;	/* ET_RXST_INFO2_ */
 } __packed;
 
-#define ET_RXST_INFO2_LEN	__BITS(15, 0)
-#define ET_RXST_INFO2_BUFIDX	__BITS(25, 16)
-#define ET_RXST_INFO2_RINGIDX	__BITS(27, 26)
+#define ET_RXST_INFO2_LEN_MASK	0x0000FFFF
+#define ET_RXST_INFO2_LEN_SHIFT	0
+#define ET_RXST_INFO2_BUFIDX_MASK	0x03FF0000
+#define ET_RXST_INFO2_BUFIDX_SHIFT	16
+#define ET_RXST_INFO2_RINGIDX_MASK	0x0C000000
+#define ET_RXST_INFO2_RINGIDX_SHIFT	26
 
 struct et_rxstatus {
 	uint32_t	rxs_ring;
 	uint32_t	rxs_stat_ring;	/* ET_RXS_STATRING_ */
 } __packed;
 
-#define ET_RXS_STATRING_INDEX	__BITS(27, 16)
-#define ET_RXS_STATRING_WRAP	__BIT(28)
+#define ET_RXS_STATRING_INDEX_MASK	0x0FFF0000
+#define ET_RXS_STATRING_INDEX_SHIFT	16
+#define ET_RXS_STATRING_WRAP	0x10000000
 
 struct et_dmamap_ctx {
 	int		nsegs;

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 20:59:41 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C095106566B;
	Thu, 19 Nov 2009 20:59:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2A39D8FC14;
	Thu, 19 Nov 2009 20:59:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKxeHS019169;
	Thu, 19 Nov 2009 20:59:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKxegM019167;
	Thu, 19 Nov 2009 20:59:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911192059.nAJKxegM019167@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 19 Nov 2009 20:59:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199549 - head/sys/dev/xen/netfront
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 20:59:41 -0000

Author: jhb
Date: Thu Nov 19 20:59:40 2009
New Revision: 199549
URL: http://svn.freebsd.org/changeset/base/199549

Log:
  Remove commented out reference to if_watchdog and an assignment of zero to
  if_timer.
  
  Reviewed by:	scottl

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c	Thu Nov 19 20:57:35 2009	(r199548)
+++ head/sys/dev/xen/netfront/netfront.c	Thu Nov 19 20:59:40 2009	(r199549)
@@ -1056,7 +1056,6 @@ xn_txeof(struct netfront_info *np)
 		return;
 	
 	ifp = np->xn_ifp;
-	ifp->if_timer = 0;
 	
 	do {
 		prod = np->tx.sring->rsp_prod;
@@ -1948,9 +1947,6 @@ create_netdev(device_t dev)
     	ifp->if_ioctl = xn_ioctl;
     	ifp->if_output = ether_output;
     	ifp->if_start = xn_start;
-#ifdef notyet
-    	ifp->if_watchdog = xn_watchdog;
-#endif
     	ifp->if_init = xn_ifinit;
     	ifp->if_mtu = ETHERMTU;
     	ifp->if_snd.ifq_maxlen = NET_TX_RING_SIZE - 1;

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:08:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B1946106568B;
	Thu, 19 Nov 2009 21:08:33 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F9558FC13;
	Thu, 19 Nov 2009 21:08:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJL8XEH019448;
	Thu, 19 Nov 2009 21:08:33 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJL8XEE019446;
	Thu, 19 Nov 2009 21:08:33 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192108.nAJL8XEE019446@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 21:08:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199550 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:08:33 -0000

Author: yongari
Date: Thu Nov 19 21:08:33 2009
New Revision: 199550
URL: http://svn.freebsd.org/changeset/base/199550

Log:
  Remove support code for FreeBSD 6.x versions.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 20:59:40 2009	(r199549)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 21:08:33 2009	(r199550)
@@ -322,13 +322,8 @@ et_attach(device_t dev)
 	ether_ifattach(ifp, eaddr);
 	callout_init_mtx(&sc->sc_tick, &sc->sc_mtx, 0);
 
-#if __FreeBSD_version > 700030
 	error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_NET | INTR_MPSAFE,
 			       NULL, et_intr, sc, &sc->sc_irq_handle);
-#else
-	error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_NET | INTR_MPSAFE,
-			       et_intr, sc, &sc->sc_irq_handle);
-#endif
 
 	if (error) {
 		ether_ifdetach(ifp);

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:39:43 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8D8991065670;
	Thu, 19 Nov 2009 21:39:43 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 61AFF8FC0C;
	Thu, 19 Nov 2009 21:39:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJLdhmm020263;
	Thu, 19 Nov 2009 21:39:43 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJLdhC3020261;
	Thu, 19 Nov 2009 21:39:43 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192139.nAJLdhC3020261@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 21:39:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199551 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:39:43 -0000

Author: yongari
Date: Thu Nov 19 21:39:43 2009
New Revision: 199551
URL: http://svn.freebsd.org/changeset/base/199551

Log:
  Destroy driver mutex in device detach.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 21:08:33 2009	(r199550)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 21:39:43 2009	(r199551)
@@ -373,7 +373,8 @@ et_detach(device_t dev)
 		if_free(sc->ifp);
 
 	et_dma_free(dev);
-	/* XXX Destroy lock here */
+
+	mtx_destroy(&sc->sc_mtx);
 
 	return 0;
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:45:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AED4F1065696;
	Thu, 19 Nov 2009 21:45:06 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9C7B68FC17;
	Thu, 19 Nov 2009 21:45:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJLj6cf020457;
	Thu, 19 Nov 2009 21:45:06 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJLj6KD020454;
	Thu, 19 Nov 2009 21:45:06 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192145.nAJLj6KD020454@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 21:45:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199552 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:45:06 -0000

Author: yongari
Date: Thu Nov 19 21:45:06 2009
New Revision: 199552
URL: http://svn.freebsd.org/changeset/base/199552

Log:
  Add MSI support.

Modified:
  head/sys/dev/et/if_et.c
  head/sys/dev/et/if_etvar.h

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 21:39:43 2009	(r199551)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 21:45:06 2009	(r199552)
@@ -76,6 +76,10 @@ MODULE_DEPEND(et, pci, 1, 1, 1);
 MODULE_DEPEND(et, ether, 1, 1, 1);
 MODULE_DEPEND(et, miibus, 1, 1, 1);
 
+/* Tunables. */
+static int msi_disable = 0;
+TUNABLE_INT("hw.re.msi_disable", &msi_disable);
+
 static int	et_probe(device_t);
 static int	et_attach(device_t);
 static int	et_detach(device_t);
@@ -230,7 +234,7 @@ et_attach(device_t dev)
 	struct et_softc *sc;
 	struct ifnet *ifp;
 	uint8_t eaddr[ETHER_ADDR_LEN];
-	int error;
+	int cap, error, msic;
 
 	sc = device_get_softc(dev);
 	sc->dev = dev;
@@ -268,13 +272,38 @@ et_attach(device_t dev)
 	sc->sc_mem_bt = rman_get_bustag(sc->sc_mem_res);
 	sc->sc_mem_bh = rman_get_bushandle(sc->sc_mem_res);
 
+	msic = 0;
+	if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) == 0) {
+		sc->sc_expcap = cap;
+		sc->sc_flags |= ET_FLAG_PCIE;
+		msic = pci_msi_count(dev);
+		if (bootverbose)
+			device_printf(dev, "MSI count : %d\n", msic);
+	}
+	if (msic > 0 && msi_disable == 0) {
+		msic = 1;
+		if (pci_alloc_msi(dev, &msic) == 0) {
+			if (msic == 1) {
+				device_printf(dev, "Using %d MSI message\n",
+				    msic);
+				sc->sc_flags |= ET_FLAG_MSI;
+			} else
+				pci_release_msi(dev);
+		}
+	}
+
 	/*
 	 * Allocate IRQ
 	 */
-	sc->sc_irq_rid = 0;
-	sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
-						&sc->sc_irq_rid,
-						RF_SHAREABLE | RF_ACTIVE);
+	if ((sc->sc_flags & ET_FLAG_MSI) == 0) {
+		sc->sc_irq_rid = 0;
+		sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+		    &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE);
+	} else {
+		sc->sc_irq_rid = 1;
+		sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+		    &sc->sc_irq_rid, RF_ACTIVE);
+	}
 	if (sc->sc_irq_res == NULL) {
 		device_printf(dev, "can't allocate irq\n");
 		error = ENXIO;
@@ -323,8 +352,7 @@ et_attach(device_t dev)
 	callout_init_mtx(&sc->sc_tick, &sc->sc_mtx, 0);
 
 	error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_NET | INTR_MPSAFE,
-			       NULL, et_intr, sc, &sc->sc_irq_handle);
-
+	    NULL, et_intr, sc, &sc->sc_irq_handle);
 	if (error) {
 		ether_ifdetach(ifp);
 		device_printf(dev, "can't setup intr\n");
@@ -363,6 +391,8 @@ et_detach(device_t dev)
 		bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid,
 				     sc->sc_irq_res);
 	}
+	if ((sc->sc_flags & ET_FLAG_MSI) != 0)
+		pci_release_msi(dev);
 
 	if (sc->sc_mem_res != NULL) {
 		bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mem_rid,
@@ -1433,7 +1463,8 @@ et_chip_init(struct et_softc *sc)
 	CSR_WRITE_4(sc, ET_LOOPBACK, 0);
 
 	/* Clear MSI configure */
-	CSR_WRITE_4(sc, ET_MSI_CFG, 0);
+	if ((sc->sc_flags & ET_FLAG_MSI) == 0)
+		CSR_WRITE_4(sc, ET_MSI_CFG, 0);
 
 	/* Disable timer */
 	CSR_WRITE_4(sc, ET_TIMER, 0);

Modified: head/sys/dev/et/if_etvar.h
==============================================================================
--- head/sys/dev/et/if_etvar.h	Thu Nov 19 21:39:43 2009	(r199551)
+++ head/sys/dev/et/if_etvar.h	Thu Nov 19 21:45:06 2009	(r199552)
@@ -238,6 +238,7 @@ struct et_softc {
 	struct arpcom		arpcom;
 	int			sc_if_flags;
 	uint32_t		sc_flags;	/* ET_FLAG_ */
+	int			sc_expcap;
 
 	int			sc_mem_rid;
 
@@ -277,7 +278,9 @@ struct et_softc {
 #define ET_UNLOCK(_sc)		mtx_unlock(&(_sc)->sc_mtx)
 #define ET_LOCK_ASSERT(_sc)	mtx_assert(&(_sc)->sc_mtx, MA_OWNED)
 
-#define ET_FLAG_TXRX_ENABLED	0x1
-#define ET_FLAG_JUMBO		0x2
+#define ET_FLAG_PCIE		0x0001
+#define ET_FLAG_MSI		0x0002
+#define ET_FLAG_TXRX_ENABLED	0x0100
+#define ET_FLAG_JUMBO		0x0200
 
 #endif	/* !_IF_ETVAR_H */

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:46:58 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8323C106568B;
	Thu, 19 Nov 2009 21:46:58 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 70A358FC0C;
	Thu, 19 Nov 2009 21:46:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJLkw6H020537;
	Thu, 19 Nov 2009 21:46:58 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJLkwTt020533;
	Thu, 19 Nov 2009 21:46:58 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192146.nAJLkwTt020533@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 21:46:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199553 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:46:58 -0000

Author: yongari
Date: Thu Nov 19 21:46:58 2009
New Revision: 199553
URL: http://svn.freebsd.org/changeset/base/199553

Log:
  Remove extra spce at the EOL.

Modified:
  head/sys/dev/et/if_et.c
  head/sys/dev/et/if_etreg.h
  head/sys/dev/et/if_etvar.h

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 21:45:06 2009	(r199552)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 21:46:58 2009	(r199553)
@@ -1358,7 +1358,7 @@ et_free_rx_ring(struct et_softc *sc)
 			struct et_rxbuf *rb = &rbd->rbd_buf[i];
 
 			if (rb->rb_mbuf != NULL) {
-				bus_dmamap_unload(sc->sc_mbuf_dtag, 
+				bus_dmamap_unload(sc->sc_mbuf_dtag,
 			  	    rb->rb_dmap);
 				m_freem(rb->rb_mbuf);
 				rb->rb_mbuf = NULL;

Modified: head/sys/dev/et/if_etreg.h
==============================================================================
--- head/sys/dev/et/if_etreg.h	Thu Nov 19 21:45:06 2009	(r199552)
+++ head/sys/dev/et/if_etreg.h	Thu Nov 19 21:46:58 2009	(r199553)
@@ -1,13 +1,13 @@
 /*-
  * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
- * 
+ *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 
- * 
+ *
  * 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
@@ -17,7 +17,7 @@
  * 3. Neither the name of The DragonFly Project 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
@@ -30,7 +30,7 @@
  * 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.
- * 
+ *
  * $DragonFly: src/sys/dev/netif/et/if_etreg.h,v 1.3 2007/10/23 14:28:42 sephe Exp $
  * $FreeBSD$
  */

Modified: head/sys/dev/et/if_etvar.h
==============================================================================
--- head/sys/dev/et/if_etvar.h	Thu Nov 19 21:45:06 2009	(r199552)
+++ head/sys/dev/et/if_etvar.h	Thu Nov 19 21:46:58 2009	(r199553)
@@ -1,13 +1,13 @@
 /*-
  * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
- * 
+ *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 
- * 
+ *
  * 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
@@ -17,7 +17,7 @@
  * 3. Neither the name of The DragonFly Project 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
@@ -30,7 +30,7 @@
  * 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.
- * 
+ *
  * $DragonFly: src/sys/dev/netif/et/if_etvar.h,v 1.4 2007/10/23 14:28:42 sephe Exp $
  * $FreeBSD$
  */
@@ -40,7 +40,7 @@
 
 /* DragonFly compatibility */
 #define EVL_ENCAPLEN		ETHER_VLAN_ENCAP_LEN
- 
+
 /*
  * Allocate the right type of mbuf for the desired total length.
  */

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:47:55 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3268E1065694;
	Thu, 19 Nov 2009 21:47:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 06EFB8FC1D;
	Thu, 19 Nov 2009 21:47:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJLlsSb020595;
	Thu, 19 Nov 2009 21:47:54 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJLlsll020593;
	Thu, 19 Nov 2009 21:47:54 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911192147.nAJLlsll020593@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 19 Nov 2009 21:47:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199554 - head/sys/dev/nxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:47:55 -0000

Author: jhb
Date: Thu Nov 19 21:47:54 2009
New Revision: 199554
URL: http://svn.freebsd.org/changeset/base/199554

Log:
  Fix compile after previous "harmless" commit.
  
  Pointy hat to:	jhb

Modified:
  head/sys/dev/nxge/if_nxge.c

Modified: head/sys/dev/nxge/if_nxge.c
==============================================================================
--- head/sys/dev/nxge/if_nxge.c	Thu Nov 19 21:46:58 2009	(r199553)
+++ head/sys/dev/nxge/if_nxge.c	Thu Nov 19 21:47:54 2009	(r199554)
@@ -2943,7 +2943,6 @@ xge_flush_txds(xge_hal_channel_h channel
 	xge_lldev_t *lldev = xge_hal_channel_userdata(channelh);
 	xge_hal_dtr_h tx_dtr;
 	xge_tx_priv_t *tx_priv;
-	struct ifnet *ifnetp = lldev->ifnetp;
 	u8 t_code;
 
 	while(xge_hal_fifo_dtr_next_completed(channelh, &tx_dtr, &t_code)
@@ -3005,7 +3004,7 @@ xge_send_locked(struct ifnet *ifnetp, in
 
 	/* If device is not initialized, return */
 	if((!lldev->initialized) || (!(ifnetp->if_drv_flags & IFF_DRV_RUNNING)))
-	    goto _exit;
+	    return;
 
 	XGE_DRV_STATS(tx_calls);
 
@@ -3015,7 +3014,10 @@ xge_send_locked(struct ifnet *ifnetp, in
 	 */
 	for(;;) {
 	    IF_DEQUEUE(&ifnetp->if_snd, m_head);
-	    if(m_head == NULL) break;
+	    if (m_head == NULL) {
+		ifnetp->if_drv_flags &= ~(IFF_DRV_OACTIVE);
+		return;
+	    }
 
 	    for(m_buf = m_head; m_buf != NULL; m_buf = m_buf->m_next) {
 	        if(m_buf->m_len) count += 1;
@@ -3032,7 +3034,7 @@ xge_send_locked(struct ifnet *ifnetp, in
 	    if(status != XGE_HAL_OK) {
 	        XGE_DRV_STATS(tx_no_txd);
 	        xge_flush_txds(channelh);
-	        goto _exit1;
+		break;
 	    }
 
 	    vlan_tag =
@@ -3053,7 +3055,7 @@ xge_send_locked(struct ifnet *ifnetp, in
 	        ll_tx_priv->dma_map, m_head, segs, &nsegs, BUS_DMA_NOWAIT)) {
 	        xge_trace(XGE_TRACE, "DMA map load failed");
 	        XGE_DRV_STATS(tx_map_fail);
-	        goto _exit1;
+		break;
 	    }
 
 	    if(lldev->driver_stats.tx_max_frags < nsegs)
@@ -3092,9 +3094,7 @@ xge_send_locked(struct ifnet *ifnetp, in
 	     * listener so that we can use tools like tcpdump */
 	    ETHER_BPF_MTAP(ifnetp, m_head);
 	}
-	ifnetp->if_drv_flags &= ~(IFF_DRV_OACTIVE);
-	goto _exit;
-_exit1:
+
 	/* Prepend the packet back to queue */
 	IF_PREPEND(&ifnetp->if_snd, m_head);
 	ifnetp->if_drv_flags |= IFF_DRV_OACTIVE;
@@ -3102,8 +3102,6 @@ _exit1:
 	xge_queue_produce_context(xge_hal_device_queue(lldev->devh),
 	    XGE_LL_EVENT_TRY_XMIT_AGAIN, lldev->devh);
 	XGE_DRV_STATS(tx_again);
-
-_exit:
 }
 
 /**

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:50:54 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 525BE106577D
	for ; Thu, 19 Nov 2009 21:50:54 +0000 (UTC)
	(envelope-from julian@elischer.org)
Received: from outI.internet-mail-service.net (outi.internet-mail-service.net
	[216.240.47.232])
	by mx1.freebsd.org (Postfix) with ESMTP id 36D6C8FC13
	for ; Thu, 19 Nov 2009 21:50:54 +0000 (UTC)
Received: from idiom.com (mx0.idiom.com [216.240.32.160])
	by out.internet-mail-service.net (Postfix) with ESMTP id 3362714DF1D;
	Thu, 19 Nov 2009 13:50:54 -0800 (PST)
X-Client-Authorized: MaGic Cook1e
X-Client-Authorized: MaGic Cook1e
X-Client-Authorized: MaGic Cook1e
X-Client-Authorized: MaGic Cook1e
Received: from julian-mac.elischer.org
	(h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137])
	by idiom.com (Postfix) with ESMTP id D1EA32D6013;
	Thu, 19 Nov 2009 13:50:52 -0800 (PST)
Message-ID: <4B05BDBA.30602@elischer.org>
Date: Thu, 19 Nov 2009 13:50:50 -0800
From: Julian Elischer 
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: John Baldwin 
References: <200911191821.nAJILpZ6014634@svn.freebsd.org>
	<4B0590B2.1010007@elischer.org>
	<200911191419.30432.jhb@freebsd.org>
In-Reply-To: <200911191419.30432.jhb@freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199538 - head/sys/dev/lmc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:50:54 -0000

John Baldwin wrote:
> On Thursday 19 November 2009 1:38:42 pm Julian Elischer wrote:
>> John Baldwin wrote:
>>> Author: jhb
>>> Date: Thu Nov 19 18:21:51 2009
>>> +#  if (__FreeBSD_version >= 500000)
>>> +  callout_init(&sc->callout, 0);
>>> +#  else  /* FreeBSD-4 */
>>> +  callout_init(&sc->callout);
>>> +#  endif
>>> +
>>
>> I think the OpenBSD and _FreeBSD_version >= 500000
>> conditions can probably be removed..
>>
>>
>>>  
>>>  #ifdef __FreeBSD__
>>> +  struct callout callout;	/* watchdog needs this                  */
>>>    struct device	*dev;		/* base device pointer                     */
>>>    bus_space_tag_t csr_tag;	/* bus_space needs this                    */
>>>    bus_space_handle_t csr_handle;/* bus_space_needs this                    
> */
>> along with #ifdef __FreeBSD__
> 
> Go for it. :)  I was just removing if_watchdog use in this sweep.  No one 
> stepped up to test this since I posted it almost 2 weeks ago though, so I'm 
> not sure if there are any users of this.
> 

I didn't realize it was an externally maintained driver...

stripping saves some space..
-rw-r--r--    1 root  wheel  212883 Nov 19 11:54 if_lmc.c
-rw-r--r--    1 root  wheel   76600 Nov 19 11:54 if_lmc.h
-rw-r--r--    1 root  wheel  142163 Nov 19 13:41 stripped.c
-rw-r--r--    1 root  wheel   61537 Nov 19 13:47 stripped.h

but I'll ask the author first..



From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:53:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5EFE2106568F;
	Thu, 19 Nov 2009 21:53:21 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BD968FC16;
	Thu, 19 Nov 2009 21:53:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJLrLCH020868;
	Thu, 19 Nov 2009 21:53:21 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJLrLfB020866;
	Thu, 19 Nov 2009 21:53:21 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192153.nAJLrLfB020866@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 21:53:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199556 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:53:21 -0000

Author: yongari
Date: Thu Nov 19 21:53:21 2009
New Revision: 199556
URL: http://svn.freebsd.org/changeset/base/199556

Log:
  style(9)

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 21:48:01 2009	(r199555)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 21:53:21 2009	(r199556)
@@ -222,10 +222,10 @@ et_probe(device_t dev)
 	for (d = et_devices; d->desc != NULL; ++d) {
 		if (vid == d->vid && did == d->did) {
 			device_set_desc(dev, d->desc);
-			return 0;
+			return (0);
 		}
 	}
-	return ENXIO;
+	return (ENXIO);
 }
 
 static int
@@ -267,7 +267,7 @@ et_attach(device_t dev)
 						&sc->sc_mem_rid, RF_ACTIVE);
 	if (sc->sc_mem_res == NULL) {
 		device_printf(dev, "can't allocate IO memory\n");
-		return ENXIO;
+		return (ENXIO);
 	}
 	sc->sc_mem_bt = rman_get_bustag(sc->sc_mem_res);
 	sc->sc_mem_bh = rman_get_bushandle(sc->sc_mem_res);
@@ -361,10 +361,10 @@ et_attach(device_t dev)
 
 	et_add_sysctls(sc);
 
-	return 0;
+	return (0);
 fail:
 	et_detach(dev);
-	return error;
+	return (error);
 }
 
 static int
@@ -406,7 +406,7 @@ et_detach(device_t dev)
 
 	mtx_destroy(&sc->sc_mtx);
 
-	return 0;
+	return (0);
 }
 
 static int
@@ -417,7 +417,7 @@ et_shutdown(device_t dev)
 	ET_LOCK(sc);
 	et_stop(sc);
 	ET_UNLOCK(sc);
-	return 0;
+	return (0);
 }
 
 static int
@@ -460,7 +460,7 @@ et_miibus_readreg(device_t dev, int phy,
 back:
 	/* Make sure that the current operation is stopped */
 	CSR_WRITE_4(sc, ET_MII_CMD, 0);
-	return ret;
+	return (ret);
 }
 
 static int
@@ -499,7 +499,7 @@ et_miibus_writereg(device_t dev, int phy
 
 	/* Make sure that the current operation is stopped */
 	CSR_WRITE_4(sc, ET_MII_CMD, 0);
-	return 0;
+	return (0);
 }
 
 static void
@@ -522,7 +522,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp)
 	}
 	mii_mediachg(mii);
 
-	return 0;
+	return (0);
 }
 
 static int
@@ -535,7 +535,7 @@ et_ifmedia_upd(struct ifnet *ifp)
 	res = et_ifmedia_upd_locked(ifp);
 	ET_UNLOCK(sc);
 
-	return res;
+	return (res);
 }
 
 static void
@@ -590,7 +590,7 @@ et_bus_config(device_t dev)
 	val = pci_read_config(dev, ET_PCIR_EEPROM_STATUS, 1);
 	if (val & ET_PCIM_EEPROM_STATUS_ERROR) {
 		device_printf(dev, "EEPROM status error 0x%02x\n", val);
-		return ENXIO;
+		return (ENXIO);
 	}
 
 	/* TODO: LED */
@@ -644,7 +644,7 @@ et_bus_config(device_t dev)
 	val |= ET_PCIV_DEVICE_CTRL_RRSZ_2K;
 	pci_write_config(dev, ET_PCIR_DEVICE_CTRL, val, 2);
 
-	return 0;
+	return (0);
 }
 
 static void
@@ -716,7 +716,7 @@ et_dma_alloc(device_t dev)
 				   0, NULL, NULL, &sc->sc_dtag);
 	if (error) {
 		device_printf(dev, "can't create DMA tag\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -727,7 +727,7 @@ et_dma_alloc(device_t dev)
 				  &tx_ring->tr_paddr, &tx_ring->tr_dmap);
 	if (error) {
 		device_printf(dev, "can't create TX ring DMA stuffs\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -738,7 +738,7 @@ et_dma_alloc(device_t dev)
 				  &txsd->txsd_paddr, &txsd->txsd_dmap);
 	if (error) {
 		device_printf(dev, "can't create TX status DMA stuffs\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -758,7 +758,7 @@ et_dma_alloc(device_t dev)
 		if (error) {
 			device_printf(dev, "can't create DMA stuffs for "
 				      "the %d RX ring\n", i);
-			return error;
+			return (error);
 		}
 		rx_ring->rr_posreg = rx_ring_posreg[i];
 	}
@@ -772,7 +772,7 @@ et_dma_alloc(device_t dev)
 				  &rxst_ring->rsr_paddr, &rxst_ring->rsr_dmap);
 	if (error) {
 		device_printf(dev, "can't create RX stat ring DMA stuffs\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -784,7 +784,7 @@ et_dma_alloc(device_t dev)
 				  &rxsd->rxsd_paddr, &rxsd->rxsd_dmap);
 	if (error) {
 		device_printf(dev, "can't create RX status DMA stuffs\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -792,9 +792,9 @@ et_dma_alloc(device_t dev)
 	 */
 	error = et_dma_mbuf_create(dev);
 	if (error)
-		return error;
+		return (error);
 
-	return 0;
+	return (0);
 }
 
 static void
@@ -873,7 +873,7 @@ et_dma_mbuf_create(device_t dev)
 				   BUS_DMA_ALLOCNOW, NULL, NULL, &sc->sc_mbuf_dtag);
 	if (error) {
 		device_printf(dev, "can't create mbuf DMA tag\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -884,7 +884,7 @@ et_dma_mbuf_create(device_t dev)
 		device_printf(dev, "can't create spare mbuf DMA map\n");
 		bus_dma_tag_destroy(sc->sc_mbuf_dtag);
 		sc->sc_mbuf_dtag = NULL;
-		return error;
+		return (error);
 	}
 
 	/*
@@ -903,7 +903,7 @@ et_dma_mbuf_create(device_t dev)
 					      "for %d RX ring\n", j, i);
 				rx_done[i] = j;
 				et_dma_mbuf_destroy(dev, 0, rx_done);
-				return error;
+				return (error);
 			}
 		}
 		rx_done[i] = ET_RX_NDESC;
@@ -922,11 +922,11 @@ et_dma_mbuf_create(device_t dev)
 			device_printf(dev, "can't create %d TX mbuf "
 				      "DMA map\n", i);
 			et_dma_mbuf_destroy(dev, i, rx_done);
-			return error;
+			return (error);
 		}
 	}
 
-	return 0;
+	return (0);
 }
 
 static void
@@ -991,7 +991,7 @@ et_dma_mem_create(device_t dev, bus_size
 				   0, NULL, NULL, dtag);
 	if (error) {
 		device_printf(dev, "can't create DMA tag\n");
-		return error;
+		return (error);
 	}
 
 	error = bus_dmamem_alloc(*dtag, addr, BUS_DMA_WAITOK | BUS_DMA_ZERO,
@@ -1000,7 +1000,7 @@ et_dma_mem_create(device_t dev, bus_size
 		device_printf(dev, "can't allocate DMA mem\n");
 		bus_dma_tag_destroy(*dtag);
 		*dtag = NULL;
-		return error;
+		return (error);
 	}
 
 	error = bus_dmamap_load(*dtag, *dmap, *addr, size,
@@ -1010,9 +1010,9 @@ et_dma_mem_create(device_t dev, bus_size
 		bus_dmamem_free(*dtag, *addr, *dmap);
 		bus_dma_tag_destroy(*dtag);
 		*dtag = NULL;
-		return error;
+		return (error);
 	}
-	return 0;
+	return (0);
 }
 
 static void
@@ -1230,7 +1230,7 @@ et_ioctl(struct ifnet *ifp, u_long cmd, 
 		error = ether_ioctl(ifp, cmd, data);
 		break;
 	}
-	return error;
+	return (error);
 }
 
 static void
@@ -1309,9 +1309,9 @@ et_stop_rxdma(struct et_softc *sc)
 	DELAY(5);
 	if ((CSR_READ_4(sc, ET_RXDMA_CTRL) & ET_RXDMA_CTRL_HALTED) == 0) {
 		if_printf(sc->ifp, "can't stop RX DMA engine\n");
-		return ETIMEDOUT;
+		return (ETIMEDOUT);
 	}
-	return 0;
+	return (0);
 }
 
 static int
@@ -1319,7 +1319,7 @@ et_stop_txdma(struct et_softc *sc)
 {
 	CSR_WRITE_4(sc, ET_TXDMA_CTRL,
 		    ET_TXDMA_CTRL_HALT | ET_TXDMA_CTRL_SINGLE_EPKT);
-	return 0;
+	return (0);
 }
 
 static void
@@ -1484,14 +1484,14 @@ et_chip_init(struct et_softc *sc)
 	/* Initialize RX DMA engine */
 	error = et_init_rxdma(sc);
 	if (error)
-		return error;
+		return (error);
 
 	/* Initialize TX DMA engine */
 	error = et_init_txdma(sc);
 	if (error)
-		return error;
+		return (error);
 
-	return 0;
+	return (0);
 }
 
 static int
@@ -1512,7 +1512,7 @@ et_init_tx_ring(struct et_softc *sc)
 	bzero(txsd->txsd_status, sizeof(uint32_t));
 	bus_dmamap_sync(txsd->txsd_dtag, txsd->txsd_dmap,
 			BUS_DMASYNC_PREWRITE);
-	return 0;
+	return (0);
 }
 
 static int
@@ -1531,7 +1531,7 @@ et_init_rx_ring(struct et_softc *sc)
 			if (error) {
 				if_printf(sc->ifp, "%d ring %d buf, "
 					  "newbuf failed: %d\n", n, i, error);
-				return error;
+				return (error);
 			}
 		}
 	}
@@ -1544,7 +1544,7 @@ et_init_rx_ring(struct et_softc *sc)
 	bus_dmamap_sync(rxst_ring->rsr_dtag, rxst_ring->rsr_dmap,
 			BUS_DMASYNC_PREWRITE);
 
-	return 0;
+	return (0);
 }
 
 static void
@@ -1578,7 +1578,7 @@ et_init_rxdma(struct et_softc *sc)
 	error = et_stop_rxdma(sc);
 	if (error) {
 		if_printf(sc->ifp, "can't init RX DMA engine\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -1634,7 +1634,7 @@ et_init_rxdma(struct et_softc *sc)
 	CSR_WRITE_4(sc, ET_RX_INTR_NPKTS, sc->sc_rx_intr_npkts);
 	CSR_WRITE_4(sc, ET_RX_INTR_DELAY, sc->sc_rx_intr_delay);
 
-	return 0;
+	return (0);
 }
 
 static int
@@ -1647,7 +1647,7 @@ et_init_txdma(struct et_softc *sc)
 	error = et_stop_txdma(sc);
 	if (error) {
 		if_printf(sc->ifp, "can't init TX DMA engine\n");
-		return error;
+		return (error);
 	}
 
 	/*
@@ -1669,7 +1669,7 @@ et_init_txdma(struct et_softc *sc)
 	tx_ring->tr_ready_index = 0;
 	tx_ring->tr_ready_wrap = 0;
 
-	return 0;
+	return (0);
 }
 
 static void
@@ -1839,16 +1839,16 @@ et_start_rxdma(struct et_softc *sc)
 
 	if (CSR_READ_4(sc, ET_RXDMA_CTRL) & ET_RXDMA_CTRL_HALTED) {
 		if_printf(sc->ifp, "can't start RX DMA engine\n");
-		return ETIMEDOUT;
+		return (ETIMEDOUT);
 	}
-	return 0;
+	return (0);
 }
 
 static int
 et_start_txdma(struct et_softc *sc)
 {
 	CSR_WRITE_4(sc, ET_TXDMA_CTRL, ET_TXDMA_CTRL_SINGLE_EPKT);
-	return 0;
+	return (0);
 }
 
 static int
@@ -1881,7 +1881,7 @@ et_enable_txrx(struct et_softc *sc, int 
 	}
 	if (i == NRETRY) {
 		if_printf(ifp, "can't enable RX/TX\n");
-		return 0;
+		return (0);
 	}
 	sc->sc_flags |= ET_FLAG_TXRX_ENABLED;
 
@@ -1892,13 +1892,13 @@ et_enable_txrx(struct et_softc *sc, int 
 	 */
 	error = et_start_rxdma(sc);
 	if (error)
-		return error;
+		return (error);
 
 	error = et_start_txdma(sc);
 	if (error)
-		return error;
+		return (error);
 
-	return 0;
+	return (0);
 }
 
 static void
@@ -2130,7 +2130,7 @@ back:
 		m_freem(m);
 		*m0 = NULL;
 	}
-	return error;
+	return (error);
 }
 
 static void
@@ -2218,13 +2218,13 @@ et_tick(void *xsc)
 static int
 et_newbuf_cluster(struct et_rxbuf_data *rbd, int buf_idx, int init)
 {
-	return et_newbuf(rbd, buf_idx, init, MCLBYTES);
+	return (et_newbuf(rbd, buf_idx, init, MCLBYTES));
 }
 
 static int
 et_newbuf_hdr(struct et_rxbuf_data *rbd, int buf_idx, int init)
 {
-	return et_newbuf(rbd, buf_idx, init, MHLEN);
+	return (et_newbuf(rbd, buf_idx, init, MHLEN));
 }
 
 static int
@@ -2248,7 +2248,7 @@ et_newbuf(struct et_rxbuf_data *rbd, int
 		if (init) {
 			if_printf(sc->ifp,
 				  "m_getl failed, size %d\n", len0);
-			return error;
+			return (error);
 		} else {
 			goto back;
 		}
@@ -2275,7 +2275,7 @@ et_newbuf(struct et_rxbuf_data *rbd, int
 
 		if (init) {
 			if_printf(sc->ifp, "can't load RX mbuf\n");
-			return error;
+			return (error);
 		} else {
 			goto back;
 		}
@@ -2299,7 +2299,7 @@ et_newbuf(struct et_rxbuf_data *rbd, int
 	error = 0;
 back:
 	et_setup_rxdesc(rbd, buf_idx, rb->rb_paddr);
-	return error;
+	return (error);
 }
 
 /*
@@ -2349,7 +2349,7 @@ et_sysctl_rx_intr_npkts(SYSCTL_HANDLER_A
 		sc->sc_rx_intr_npkts = v;
 	}
 back:
-	return error;
+	return (error);
 }
 
 static int
@@ -2374,7 +2374,7 @@ et_sysctl_rx_intr_delay(SYSCTL_HANDLER_A
 		sc->sc_rx_intr_delay = v;
 	}
 back:
-	return error;
+	return (error);
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:55:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CD99F106568B;
	Thu, 19 Nov 2009 21:55:33 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 988BB8FC08;
	Thu, 19 Nov 2009 21:55:33 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 214D446B38;
	Thu, 19 Nov 2009 16:55:33 -0500 (EST)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 583088A020;
	Thu, 19 Nov 2009 16:55:32 -0500 (EST)
From: John Baldwin 
To: Jung-uk Kim 
Date: Thu, 19 Nov 2009 16:49:36 -0500
User-Agent: KMail/1.9.7
References: <200911182340.nAINeJ3W087652@svn.freebsd.org>
	
	<200911191115.11088.jkim@FreeBSD.org>
In-Reply-To: <200911191115.11088.jkim@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200911191649.37198.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 19 Nov 2009 16:55:32 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Robert Watson 
Subject: Re: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:55:33 -0000

On Thursday 19 November 2009 11:15:01 am Jung-uk Kim wrote:
> On Thursday 19 November 2009 03:26 am, Robert Watson wrote:
> > On Wed, 18 Nov 2009, Jung-uk Kim wrote:
> > >  - Change internal function bpf_jit_compile() to return allocated
> > > size of the generated binary and remove page size limitation for
> > > userland. - Use contigmalloc(9)/contigfree(9) instead of
> > > malloc(9)/free(9) to make sure the generated binary aligns
> > > properly and make it physically contiguous.
> >
> > Is physical contiguity actually required here -- I would have
> > thought virtual contiguity and alignment would be sufficient, in
> > which case the normal trick is to allocate using malloc the size +
> > min-align + 1 and then fudge the pointer forward until it's
> > properly aligned.
> 
> I don't believe it is strictly necessary but I assumed it might have 
> performance benefit for very big BPF programs although I have not 
> measured it.  Also, contigmalloc(9)/contigfree(9) is too obvious to 
> ignore for this purpose. :-)

Why would it have a performance benefit to have the pages be physically 
contiguous?  contigmalloc() is expensive and should really only be used if 
you truly need contiguous memory.  If you can get by with malloc(), just use 
malloc().

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 21:55:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A29EF1065693;
	Thu, 19 Nov 2009 21:55:34 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 622C08FC15;
	Thu, 19 Nov 2009 21:55:34 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id EBF3346B03;
	Thu, 19 Nov 2009 16:55:33 -0500 (EST)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 08A098A021;
	Thu, 19 Nov 2009 16:55:33 -0500 (EST)
From: John Baldwin 
To: Jilles Tjoelker 
Date: Thu, 19 Nov 2009 16:55:31 -0500
User-Agent: KMail/1.9.7
References: <4B01E548.7040708@gmail.com> <20091117182501.GA70742@stack.nl>
	<200911180841.55183.jhb@freebsd.org>
In-Reply-To: <200911180841.55183.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_T7bBLr0AvhuQLBB"
Message-Id: <200911191655.32008.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 19 Nov 2009 16:55:33 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, Dmitry Pryanishnikov ,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Edwin Groothuis 
Subject: Re: svn commit: r194783 - head/lib/libc/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 21:55:34 -0000

--Boundary-00=_T7bBLr0AvhuQLBB
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wednesday 18 November 2009 8:41:54 am John Baldwin wrote:
> On Tuesday 17 November 2009 1:25:01 pm Jilles Tjoelker wrote:
> > On Tue, Nov 17, 2009 at 01:50:32AM +0200, Dmitry Pryanishnikov wrote:
> > > > Author: edwin
> > > > Date: Tue Jun 23 22:28:44 2009
> > > > New Revision: 194783
> > > > URL: http://svn.freebsd.org/changeset/base/194783
> > 
> > > > Log:
> > > >   Remove duplicate if-statement on gmt_is_set in gmtsub().
> > 
> > > >   MFC after:	1 week
> > 
> > > > Modified:
> > > >   head/lib/libc/stdtime/localtime.c
> > 
> > >    This change looks like a (small?) pessimization to me: before it, 
> > > _MUTEX_LOCK/_MUTEX_UNLOCK pair would be skipped for the case gmt_is_set 
> > > == TRUE (all invocations except the first one), now it won't. I'm not 
> > > sure whether this is critical here though...
> > 
> > It is certainly less efficient, but the old code was (most likely)
> > wrong. It used an idiom known as "double checked locking", which is
> > incorrect in most memory models. The problem is that the store to
> > gmt_is_set may become visible without stores to other memory (gmtptr and
> > what it points to) becoming visible.
> 
> That is easily fixed with a memory barrier.  Just use atomic_store_rel() to 
> set gmt_is_set at the end of the setup phase.

Alan Cox suggested that it might be best to provide an abstraction for this 
sort of thing rather than having N copies of using various memory barriers 
and atomic ops, etc.  This patch adds a new internal method to libc _once() 
that is just like pthread_once().  It is called _once() because it has some 
extra trickery to use pthread_once() for a multithreaded process and to use 
an internal stub version for single-threaded processes.  I also converted the 
gmt_is_set stuff to use this instead.  This should restore the lockless code 
for the common case.  Edwin, can you test this against the bug you were 
seeing?

-- 
John Baldwin

--Boundary-00=_T7bBLr0AvhuQLBB
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="stdtime.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="stdtime.patch"

Index: gen/Makefile.inc
===================================================================
--- gen/Makefile.inc	(revision 199529)
+++ gen/Makefile.inc	(working copy)
@@ -5,7 +5,8 @@
 .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen
 
 SRCS+=  __getosreldate.c __xuname.c \
-	_pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \
+	_once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \
+	_thread_init.c \
 	alarm.c arc4random.c assert.c basename.c check_utility_compat.c \
 	clock.c closedir.c confstr.c \
 	crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \
Index: gen/_once_stub.c
===================================================================
--- gen/_once_stub.c	(revision 0)
+++ gen/_once_stub.c	(revision 0)
@@ -0,0 +1,67 @@
+/*-
+ * Copyright (c) 2009 Advanced Computing Technologies LLC
+ * Written by: John H. Baldwin 
+ * 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include 
+#include "un-namespace.h"
+#include "libc_private.h"
+
+/*
+ * This implements pthread_once() for the single-threaded case.  It is
+ * non-static so that it can be used by _pthread_stubs.c.
+ */
+int
+_libc_once(pthread_once_t *once_control, void (*init_routine)(void))
+{
+
+	if (once_control->state == PTHREAD_NEEDS_INIT)
+		return (0);
+	init_routine();
+	once_control->state = PTHREAD_DONE_INIT;
+	return (0);
+}
+
+/*
+ * This is the internal interface provided to libc.  It will use
+ * pthread_once() from the threading library in a multi-threaded
+ * process and _libc_once() for a single-threaded library.  Because
+ * _libc_once() uses the same ABI for the values in the pthread_once_t
+ * structure as the threading library, it is safe for a process to
+ * switch from _libc_once() to pthread_once() when threading is
+ * enabled.
+ */
+int
+_once(pthread_once_t *once_control, void (*init_routine)(void))
+{
+
+	if (__isthreaded)
+		return (_pthread_once(once_control, init_routine));
+	return (_libc_once(once_control, init_routine));
+}

Property changes on: gen/_once_stub.c
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + FreeBSD=%H
Added: svn:eol-style
   + native

Index: gen/_pthread_stubs.c
===================================================================
--- gen/_pthread_stubs.c	(revision 199529)
+++ gen/_pthread_stubs.c	(working copy)
@@ -105,7 +105,7 @@
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_LOCK */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_TRYLOCK */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_UNLOCK */
-	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_ONCE */
+	{PJT_DUAL_ENTRY(_libc_once)},   /* PJT_ONCE */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_DESTROY */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_INIT */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_RDLOCK */
Index: stdtime/localtime.c
===================================================================
--- stdtime/localtime.c	(revision 199529)
+++ stdtime/localtime.c	(working copy)
@@ -235,9 +235,8 @@
 
 static char		lcl_TZname[TZ_STRLEN_MAX + 1];
 static int		lcl_is_set;
-static int		gmt_is_set;
+static pthread_once_t	gmt_once = PTHREAD_ONCE_INIT;
 static pthread_rwlock_t	lcl_rwlock = PTHREAD_RWLOCK_INITIALIZER;
-static pthread_mutex_t	gmt_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 char *			tzname[2] = {
 	wildabbr,
@@ -1464,6 +1463,17 @@
 	return tmp;
 }
 
+static void
+gmt_init(void)
+{
+
+#ifdef ALL_STATE
+	gmtptr = (struct state *) malloc(sizeof *gmtptr);
+	if (gmtptr != NULL)
+#endif /* defined ALL_STATE */
+		gmtload(gmtptr);
+}
+
 /*
 ** gmtsub is to gmtime as localsub is to localtime.
 */
@@ -1476,16 +1486,7 @@
 {
 	register struct tm *	result;
 
-	_MUTEX_LOCK(&gmt_mutex);
-	if (!gmt_is_set) {
-#ifdef ALL_STATE
-		gmtptr = (struct state *) malloc(sizeof *gmtptr);
-		if (gmtptr != NULL)
-#endif /* defined ALL_STATE */
-			gmtload(gmtptr);
-		gmt_is_set = TRUE;
-	}
-	_MUTEX_UNLOCK(&gmt_mutex);
+	_once(&gmt_once, gmt_init);
 	result = timesub(timep, offset, gmtptr, tmp);
 #ifdef TM_ZONE
 	/*
Index: include/libc_private.h
===================================================================
--- include/libc_private.h	(revision 199529)
+++ include/libc_private.h	(working copy)
@@ -34,6 +34,7 @@
 
 #ifndef _LIBC_PRIVATE_H_
 #define _LIBC_PRIVATE_H_
+#include 
 
 /*
  * This global flag is non-zero when a process has created one
@@ -147,6 +148,13 @@
 void _init_tls(void);
 
 /*
+ * Provides pthread_once()-like functionality for both single-threaded
+ * and multi-threaded applications.
+ */
+int _once(pthread_once_t *, void (*)(void));
+int _libc_once(pthread_once_t *, void (*)(void));
+
+/*
  * Set the TLS thread pointer
  */
 void _set_tp(void *tp);

--Boundary-00=_T7bBLr0AvhuQLBB--

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:04:03 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 670D0106566C;
	Thu, 19 Nov 2009 22:04:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B8748FC19;
	Thu, 19 Nov 2009 22:04:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJM43Et021199;
	Thu, 19 Nov 2009 22:04:03 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJM43Sg021197;
	Thu, 19 Nov 2009 22:04:03 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911192204.nAJM43Sg021197@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 19 Nov 2009 22:04:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199557 - head/sys/arm/at91
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:04:03 -0000

Author: jhb
Date: Thu Nov 19 22:04:02 2009
New Revision: 199557
URL: http://svn.freebsd.org/changeset/base/199557

Log:
  - Initialize callout before it is used in atestop() during attach.
  - Reorder detach so that ether_ifdetach() is called first.  This removes
    the race that ATE_FLAG_DETACHING closed, so that flag can be removed.
  - Trim a duplicate clearing of IFF_DRV_RUNNING.
  
  Reviewed by:	imp

Modified:
  head/sys/arm/at91/if_ate.c

Modified: head/sys/arm/at91/if_ate.c
==============================================================================
--- head/sys/arm/at91/if_ate.c	Thu Nov 19 21:53:21 2009	(r199556)
+++ head/sys/arm/at91/if_ate.c	Thu Nov 19 22:04:02 2009	(r199557)
@@ -75,8 +75,7 @@ __FBSDID("$FreeBSD$");
 /*
  * Driver-specific flags.
  */
-#define	ATE_FLAG_DETACHING	0x01
-#define	ATE_FLAG_MULTICAST	0x02
+#define	ATE_FLAG_MULTICAST	0x01
 
 struct ate_softc
 {
@@ -196,6 +195,7 @@ ate_attach(device_t dev)
 	sc = device_get_softc(dev);
 	sc->dev = dev;
 	ATE_LOCK_INIT(sc);
+	callout_init_mtx(&sc->tick_ch, &sc->sc_mtx, 0);
 	
 	/*
 	 * Allocate resources.
@@ -233,7 +233,6 @@ ate_attach(device_t dev)
 	ATE_LOCK(sc);
 	atestop(sc);
 	ATE_UNLOCK(sc);
-	callout_init_mtx(&sc->tick_ch, &sc->sc_mtx, 0);
 
 	if ((err = ate_get_mac(sc, eaddr)) != 0) {
 		/*
@@ -310,12 +309,11 @@ ate_detach(device_t dev)
 	KASSERT(sc != NULL, ("[ate: %d]: sc is NULL", __LINE__));
 	ifp = sc->ifp;
 	if (device_is_attached(dev)) {
+		ether_ifdetach(ifp);
 		ATE_LOCK(sc);
-			sc->flags |= ATE_FLAG_DETACHING;
-			atestop(sc);
+		atestop(sc);
 		ATE_UNLOCK(sc);
 		callout_drain(&sc->tick_ch);
-		ether_ifdetach(ifp);
 	}
 	if (sc->miibus != NULL) {
 		device_delete_child(dev, sc->miibus);
@@ -1107,11 +1105,9 @@ ateioctl(struct ifnet *ifp, u_long cmd, 
 				    & (IFF_PROMISC | IFF_ALLMULTI)) != 0)
 					ate_rxfilter(sc);
 			} else {
-				if ((sc->flags & ATE_FLAG_DETACHING) == 0)
-					ateinit_locked(sc);
+				ateinit_locked(sc);
 			}
 		} else if ((drv_flags & IFF_DRV_RUNNING) != 0) {
-			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			atestop(sc);
 		}
 		sc->if_flags = flags;

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:06:19 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 61B181065695;
	Thu, 19 Nov 2009 22:06:19 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F9028FC08;
	Thu, 19 Nov 2009 22:06:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJM6JD8021286;
	Thu, 19 Nov 2009 22:06:19 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJM6J1l021283;
	Thu, 19 Nov 2009 22:06:19 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192206.nAJM6J1l021283@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 22:06:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199558 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:06:19 -0000

Author: yongari
Date: Thu Nov 19 22:06:19 2009
New Revision: 199558
URL: http://svn.freebsd.org/changeset/base/199558

Log:
  Use bus_{read,write}_4 rather than bus_space_{read,write}_4.

Modified:
  head/sys/dev/et/if_et.c
  head/sys/dev/et/if_etvar.h

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 22:04:02 2009	(r199557)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 22:06:19 2009	(r199558)
@@ -269,8 +269,6 @@ et_attach(device_t dev)
 		device_printf(dev, "can't allocate IO memory\n");
 		return (ENXIO);
 	}
-	sc->sc_mem_bt = rman_get_bustag(sc->sc_mem_res);
-	sc->sc_mem_bh = rman_get_bushandle(sc->sc_mem_res);
 
 	msic = 0;
 	if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) == 0) {

Modified: head/sys/dev/et/if_etvar.h
==============================================================================
--- head/sys/dev/et/if_etvar.h	Thu Nov 19 22:04:02 2009	(r199557)
+++ head/sys/dev/et/if_etvar.h	Thu Nov 19 22:06:19 2009	(r199558)
@@ -92,9 +92,9 @@ m_getl(int len, int how, int type, int f
 #define ET_JUMBO_MEM_SIZE	(ET_JSLOTS * ET_JLEN)
 
 #define CSR_WRITE_4(sc, reg, val)	\
-	bus_space_write_4((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg), (val))
+	bus_write_4((sc)->sc_mem_res, (reg), (val))
 #define CSR_READ_4(sc, reg)		\
-	bus_space_read_4((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg))
+	bus_read_4((sc)->sc_mem_res, (reg))
 
 #define ET_ADDR_HI(addr)	((uint64_t) (addr) >> 32)
 #define ET_ADDR_LO(addr)	((uint64_t) (addr) & 0xffffffff)
@@ -229,8 +229,6 @@ struct et_softc {
 	device_t		dev;
 	struct mtx		sc_mtx;
 	device_t		sc_miibus;
-	bus_space_handle_t	sc_mem_bh;
-	bus_space_tag_t		sc_mem_bt;
 	void			*sc_irq_handle;
 	struct resource		*sc_irq_res;
 	struct resource		*sc_mem_res;

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:06:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C2AD51065695;
	Thu, 19 Nov 2009 22:06:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AD7AF8FC21;
	Thu, 19 Nov 2009 22:06:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJM6eRX021347;
	Thu, 19 Nov 2009 22:06:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJM6e99021330;
	Thu, 19 Nov 2009 22:06:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911192206.nAJM6e99021330@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 19 Nov 2009 22:06:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199559 - in head/sys/dev: cm ep fatm malo mwl sn ste
	ti vx
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:06:40 -0000

Author: jhb
Date: Thu Nov 19 22:06:40 2009
New Revision: 199559
URL: http://svn.freebsd.org/changeset/base/199559

Log:
  - Add a private timer to drive the transmit watchdog instead of using
    if_watchdog and if_timer.
  - Fix some issues in detach for sn(4), ste(4), and ti(4).  Primarily this
    means calling ether_ifdetach() before anything else.

Modified:
  head/sys/dev/cm/smc90cx6.c
  head/sys/dev/cm/smc90cx6var.h
  head/sys/dev/ep/if_ep.c
  head/sys/dev/ep/if_epvar.h
  head/sys/dev/fatm/if_fatm.c
  head/sys/dev/fatm/if_fatmvar.h
  head/sys/dev/malo/if_malo.c
  head/sys/dev/malo/if_malo.h
  head/sys/dev/mwl/if_mwl.c
  head/sys/dev/mwl/if_mwlvar.h
  head/sys/dev/sn/if_sn.c
  head/sys/dev/sn/if_snvar.h
  head/sys/dev/ste/if_ste.c
  head/sys/dev/ste/if_stereg.h
  head/sys/dev/ti/if_ti.c
  head/sys/dev/ti/if_tireg.h
  head/sys/dev/vx/if_vx.c
  head/sys/dev/vx/if_vxvar.h

Modified: head/sys/dev/cm/smc90cx6.c
==============================================================================
--- head/sys/dev/cm/smc90cx6.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/cm/smc90cx6.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -124,7 +124,7 @@ static void cm_reset_locked(struct cm_so
 void	cm_start(struct ifnet *);
 void	cm_start_locked(struct ifnet *);
 int	cm_ioctl(struct ifnet *, unsigned long, caddr_t);
-void	cm_watchdog(struct ifnet *);
+void	cm_watchdog(void *);
 void	cm_srint_locked(void *vsc);
 static	void cm_tint_locked(struct cm_softc *, int);
 void	cm_reconwatch_locked(void *);
@@ -194,11 +194,9 @@ cm_attach(dev)
 	ifp->if_output = arc_output;
 	ifp->if_start = cm_start;
 	ifp->if_ioctl = cm_ioctl;
-	ifp->if_watchdog  = cm_watchdog;
 	ifp->if_init = cm_init;
 	/* XXX IFQ_SET_READY(&ifp->if_snd); */
 	ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
-	ifp->if_timer = 0;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
 
 	arc_ifattach(ifp, linkaddress);
@@ -210,6 +208,7 @@ cm_attach(dev)
 #endif
 
 	callout_init_mtx(&sc->sc_recon_ch, &sc->sc_mtx, 0);
+	callout_init_mtx(&sc->sc_watchdog_timer, &sc->sc_mtx, 0);
 
 	if_printf(ifp, "link addr 0x%02x (%d)\n", linkaddress, linkaddress);
 	return 0;
@@ -315,6 +314,7 @@ cm_reset_locked(sc)
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 
+	callout_reset(&sc->sc_watchdog_timer, hz, cm_watchdog, sc);
 	cm_start_locked(ifp);
 }
 
@@ -332,7 +332,8 @@ cm_stop_locked(sc)
 	GETREG(CMRESET);
 
 	/* Stop watchdog timer */
-	sc->sc_ifp->if_timer = 0;
+	callout_stop(&sc->sc_watchdog_timer);
+	sc->sc_timer = 0;
 }
 
 void
@@ -464,7 +465,7 @@ cm_start_locked(ifp)
 		PUTREG(CMCMD, CM_TX(buffer));
 		PUTREG(CMSTAT, sc->sc_intmask);
 
-		ifp->if_timer = ARCTIMEOUT;
+		sc->sc_timer = ARCTIMEOUT;
 	}
 	m_freem(m);
 
@@ -627,7 +628,7 @@ cm_tint_locked(sc, isr)
 	if (isr & CM_TMA || sc->sc_broadcast[buffer])
 		ifp->if_opackets++;
 #ifdef CMRETRANSMIT
-	else if (ifp->if_flags & IFF_LINK2 && ifp->if_timer > 0
+	else if (ifp->if_flags & IFF_LINK2 && sc->sc_timer > 0
 	    && --sc->sc_retransmits[buffer] > 0) {
 		/* retransmit same buffer */
 		PUTREG(CMCMD, CM_TX(buffer));
@@ -657,7 +658,7 @@ cm_tint_locked(sc, isr)
 		 */
 		PUTREG(CMCMD, CM_TX(buffer));
 		/* init watchdog timer */
-		ifp->if_timer = ARCTIMEOUT;
+		sc->sc_timer = ARCTIMEOUT;
 
 #if defined(CM_DEBUG) && (CM_DEBUG > 1)
 		if_printf(ifp,
@@ -669,7 +670,7 @@ cm_tint_locked(sc, isr)
 		sc->sc_intmask &= ~CM_TA;
 		PUTREG(CMSTAT, sc->sc_intmask);
 		/* ... and watchdog timer */
-		ifp->if_timer = 0;
+		sc->sc_timer = 0;
 
 #ifdef CM_DEBUG
 		if_printf(ifp, "tint: no more buffers to send, status 0x%02x\n",
@@ -920,12 +921,13 @@ cm_ioctl(ifp, command, data)
  * retransmission is implemented).
  */
 void
-cm_watchdog(ifp)
-	struct ifnet *ifp;
+cm_watchdog(void *arg)
 {
-	struct cm_softc *sc = ifp->if_softc;
+	struct cm_softc *sc;
 
-	CM_LOCK(sc);
+	sc = arg;
+	callout_reset(&sc->sc_watchdog_timer, hz, cm_watchdog, sc);
+	if (sc->sc_timer == 0 || --sc->sc_timer > 0)
+		return;
 	PUTREG(CMCMD, CM_TXDIS);
-	CM_UNLOCK(sc);
 }

Modified: head/sys/dev/cm/smc90cx6var.h
==============================================================================
--- head/sys/dev/cm/smc90cx6var.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/cm/smc90cx6var.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -77,6 +77,8 @@ struct cm_softc {
 	u_long	sc_reconcount_excessive; /* for the above */
 #define ARC_EXCESSIVE_RECONS 20
 #define ARC_EXCESSIVE_RECONS_REWARN 400
+	struct callout sc_watchdog_timer;
+	int	sc_timer;
 	u_char	sc_intmask;
 	u_char	sc_rx_act;		/* 2..3 */
 	u_char	sc_tx_act;		/* 0..1 */

Modified: head/sys/dev/ep/if_ep.c
==============================================================================
--- head/sys/dev/ep/if_ep.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/ep/if_ep.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -91,10 +92,12 @@ static int ep_media2if_media[] =
 static void epinit(void *);
 static int epioctl(struct ifnet *, u_long, caddr_t);
 static void epstart(struct ifnet *);
-static void epwatchdog(struct ifnet *);
 
+static void ep_intr_locked(struct ep_softc *);
 static void epstart_locked(struct ifnet *);
 static void epinit_locked(struct ep_softc *);
+static void eptick(void *);
+static void epwatchdog(struct ep_softc *);
 
 /* if_media functions */
 static int ep_ifmedia_upd(struct ifnet *);
@@ -302,12 +305,12 @@ ep_attach(struct ep_softc *sc)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = epstart;
 	ifp->if_ioctl = epioctl;
-	ifp->if_watchdog = epwatchdog;
 	ifp->if_init = epinit;
 	IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
 	ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
 	IFQ_SET_READY(&ifp->if_snd);
 
+	callout_init_mtx(&sc->watchdog_timer, &sc->sc_mtx, 0);
 	if (!sc->epb.mii_trans) {
 		ifmedia_init(&sc->ifmedia, 0, ep_ifmedia_upd, ep_ifmedia_sts);
 
@@ -361,6 +364,7 @@ ep_detach(device_t dev)
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	EP_UNLOCK(sc);
 	ether_ifdetach(ifp);
+	callout_drain(&sc->watchdog_timer);
 	ep_free(dev);
 
 	if_free(ifp);
@@ -457,6 +461,7 @@ epinit_locked(struct ep_softc *sc)
 
 	GO_WINDOW(sc, 1);
 	epstart_locked(ifp);
+	callout_reset(&sc->watchdog_timer, hz, eptick, sc);
 }
 
 static void
@@ -556,7 +561,7 @@ startagain:
 
 	BPF_MTAP(ifp, m0);
 
-	ifp->if_timer = 2;
+	sc->tx_timer = 2;
 	ifp->if_opackets++;
 	m_freem(m0);
 
@@ -583,20 +588,26 @@ void
 ep_intr(void *arg)
 {
 	struct ep_softc *sc;
-	int status;
-	struct ifnet *ifp;
 
 	sc = (struct ep_softc *) arg;
 	EP_LOCK(sc);
+	ep_intr_locked(sc);
+	EP_UNLOCK(sc);
+}
+
+static void
+ep_intr_locked(struct ep_softc *sc)
+{
+	int status;
+	struct ifnet *ifp;
+
 	/* XXX 4.x splbio'd here to reduce interruptability */
 
 	/*
 	 * quick fix: Try to detect an interrupt when the card goes away.
 	 */
-	if (sc->gone || CSR_READ_2(sc, EP_STATUS) == 0xffff) {
-		EP_UNLOCK(sc);
+	if (sc->gone || CSR_READ_2(sc, EP_STATUS) == 0xffff)
 		return;
-	}
 	ifp = sc->ifp;
 
 	CSR_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK);	/* disable all Ints */
@@ -612,14 +623,14 @@ rescan:
 			epread(sc);
 		if (status & S_TX_AVAIL) {
 			/* we need ACK */
-			ifp->if_timer = 0;
+			sc->tx_timer = 0;
 			ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 			GO_WINDOW(sc, 1);
 			CSR_READ_2(sc, EP_W1_FREE_TX);
 			epstart_locked(ifp);
 		}
 		if (status & S_CARD_FAILURE) {
-			ifp->if_timer = 0;
+			sc->tx_timer = 0;
 #ifdef EP_LOCAL_STATS
 			device_printf(sc->dev, "\n\tStatus: %x\n", status);
 			GO_WINDOW(sc, 4);
@@ -642,11 +653,10 @@ rescan:
 
 #endif
 			epinit_locked(sc);
-			EP_UNLOCK(sc);
 			return;
 		}
 		if (status & S_TX_COMPLETE) {
-			ifp->if_timer = 0;
+			sc->tx_timer = 0;
 			/*
 			 * We need ACK. We do it at the end.
 			 *
@@ -700,7 +710,6 @@ rescan:
 
 	/* re-enable Ints */
 	CSR_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK | S_5_INTS);
-	EP_UNLOCK(sc);
 }
 
 static void
@@ -933,7 +942,6 @@ epioctl(struct ifnet *ifp, u_long cmd, c
 		EP_LOCK(sc);
 		if (((ifp->if_flags & IFF_UP) == 0) &&
 		    (ifp->if_drv_flags & IFF_DRV_RUNNING)) {
-			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			epstop(sc);
 		} else
 			/* reinitialize card on any parameter change */
@@ -966,15 +974,27 @@ epioctl(struct ifnet *ifp, u_long cmd, c
 }
 
 static void
-epwatchdog(struct ifnet *ifp)
+eptick(void *arg)
 {
-	struct ep_softc *sc = ifp->if_softc;
+	struct ep_softc *sc;
+
+	sc = arg;
+	if (sc->tx_timer != 0 && --sc->tx_timer == 0)
+		epwatchdog(sc);
+	callout_reset(&sc->watchdog_timer, hz, eptick, sc);
+}
+
+static void
+epwatchdog(struct ep_softc *sc)
+{
+	struct ifnet *ifp;
 
+	ifp = sc->ifp;
 	if (sc->gone)
 		return;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	epstart(ifp);
-	ep_intr(ifp->if_softc);
+	epstart_locked(ifp);
+	ep_intr_locked(sc);
 }
 
 static void
@@ -997,4 +1017,7 @@ epstop(struct ep_softc *sc)
 	CSR_WRITE_2(sc, EP_COMMAND, SET_RD_0_MASK);
 	CSR_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK);
 	CSR_WRITE_2(sc, EP_COMMAND, SET_RX_FILTER);
+
+	sc->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+	callout_stop(&sc->watchdog_timer);
 }

Modified: head/sys/dev/ep/if_epvar.h
==============================================================================
--- head/sys/dev/ep/if_epvar.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/ep/if_epvar.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -45,6 +45,9 @@ struct ep_softc {
 	bus_space_tag_t bst;
 	void *ep_intrhand;
 
+	struct callout watchdog_timer;
+	int tx_timer;
+
 	u_short ep_connectors;	/* Connectors on this card. */
 	u_char ep_connector;	/* Configured connector. */
 

Modified: head/sys/dev/fatm/if_fatm.c
==============================================================================
--- head/sys/dev/fatm/if_fatm.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/fatm/if_fatm.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -391,16 +391,14 @@ fatm_check_heartbeat(struct fatm_softc *
  * Ensure that the heart is still beating.
  */
 static void
-fatm_watchdog(struct ifnet *ifp)
+fatm_watchdog(void *arg)
 {
-	struct fatm_softc *sc = ifp->if_softc;
+	struct fatm_softc *sc;
 
-	FATM_LOCK(sc);
-	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-		fatm_check_heartbeat(sc);
-		ifp->if_timer = 5;
-	}
-	FATM_UNLOCK(sc);
+	sc = arg;
+	FATM_CHECKLOCK(sc);
+	fatm_check_heartbeat(sc);
+	callout_reset(&sc->watchdog_timer, hz * 5, fatm_watchdog, sc);
 }
 
 /*
@@ -474,7 +472,7 @@ fatm_stop(struct fatm_softc *sc)
 	(void)fatm_reset(sc);
 
 	/* stop watchdog */
-	sc->ifp->if_timer = 0;
+	callout_stop(&sc->watchdog_timer);
 
 	if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) {
 		sc->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
@@ -1341,7 +1339,7 @@ fatm_init_locked(struct fatm_softc *sc)
 	/*
 	 * Start the watchdog timer
 	 */
-	sc->ifp->if_timer = 5;
+	callout_reset(&sc->watchdog_timer, hz * 5, fatm_watchdog, sc);
 
 	/* start SUNI */
 	utopia_start(&sc->utopia);
@@ -2543,6 +2541,7 @@ fatm_detach(device_t dev)
 		FATM_UNLOCK(sc);
 		atm_ifdetach(sc->ifp);		/* XXX race */
 	}
+	callout_drain(&sc->watchdog_timer);
 
 	if (sc->ih != NULL)
 		bus_teardown_intr(dev, sc->irqres, sc->ih);
@@ -2784,6 +2783,7 @@ fatm_attach(device_t dev)
 	cv_init(&sc->cv_regs, "fatm_regs");
 
 	sysctl_ctx_init(&sc->sysctl_ctx);
+	callout_init_mtx(&sc->watchdog_timer, &sc->mtx, 0);
 
 	/*
 	 * Make the sysctl tree
@@ -2824,7 +2824,6 @@ fatm_attach(device_t dev)
 	ifp->if_flags = IFF_SIMPLEX;
 	ifp->if_ioctl = fatm_ioctl;
 	ifp->if_start = fatm_start;
-	ifp->if_watchdog = fatm_watchdog;
 	ifp->if_init = fatm_init;
 	ifp->if_linkmib = &IFP2IFATM(sc->ifp)->mib;
 	ifp->if_linkmiblen = sizeof(IFP2IFATM(sc->ifp)->mib);

Modified: head/sys/dev/fatm/if_fatmvar.h
==============================================================================
--- head/sys/dev/fatm/if_fatmvar.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/fatm/if_fatmvar.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -188,6 +188,7 @@ struct fatm_softc {
 	struct ifnet	*ifp;		/* common part */
 	struct mtx	mtx;		/* lock this structure */
 	struct ifmedia	media;		/* media */
+	struct callout	watchdog_timer;
 
 	int		init_state;	/* initialisation step */
 	int		memid;		/* resource id for card memory */

Modified: head/sys/dev/malo/if_malo.c
==============================================================================
--- head/sys/dev/malo/if_malo.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/malo/if_malo.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -135,7 +135,7 @@ static	int	malo_setup_hwdma(struct malo_
 static	void	malo_txq_init(struct malo_softc *, struct malo_txq *, int);
 static	void	malo_tx_cleanupq(struct malo_softc *, struct malo_txq *);
 static	void	malo_start(struct ifnet *);
-static	void	malo_watchdog(struct ifnet *);
+static	void	malo_watchdog(void *);
 static	int	malo_ioctl(struct ifnet *, u_long, caddr_t);
 static	void	malo_updateslot(struct ifnet *);
 static	int	malo_newstate(struct ieee80211vap *, enum ieee80211_state, int);
@@ -191,6 +191,7 @@ malo_attach(uint16_t devid, struct malo_
 	ic = ifp->if_l2com;
 
 	MALO_LOCK_INIT(sc);
+	callout_init_mtx(&sc->malo_watchdog_timer, &sc->malo_mtx, 0);
 
 	/* set these up early for if_printf use */
 	if_initname(ifp, device_get_name(sc->malo_dev),
@@ -272,7 +273,6 @@ malo_attach(uint16_t devid, struct malo_
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
 	ifp->if_start = malo_start;
-	ifp->if_watchdog = malo_watchdog;
 	ifp->if_ioctl = malo_ioctl;
 	ifp->if_init = malo_init;
 	IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
@@ -1076,7 +1076,7 @@ malo_tx_proc(void *arg, int npending)
 
 	if (nreaped != 0) {
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-		ifp->if_timer = 0;
+		sc->malo_timer = 0;
 		malo_start(ifp);
 	}
 }
@@ -1260,7 +1260,7 @@ malo_tx_start(struct malo_softc *sc, str
 	MALO_TXDESC_SYNC(txq, ds, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
 	ifp->if_opackets++;
-	ifp->if_timer = 5;
+	sc->malo_timer = 5;
 	MALO_TXQ_UNLOCK(txq);
 	return 0;
 #undef IEEE80211_DIR_DSTODS
@@ -1339,10 +1339,17 @@ malo_start(struct ifnet *ifp)
 }
 
 static void
-malo_watchdog(struct ifnet *ifp)
+malo_watchdog(void *arg)
 {
-	struct malo_softc *sc = ifp->if_softc;
+	struct malo_softc *sc;
+	struct ifnet *ifp;
+
+	sc = arg;
+	callout_reset(&sc->malo_watchdog_timer, hz, malo_watchdog, sc);
+	if (sc->malo_timer == 0 || --sc->malo_timer > 0)
+		return;
 
+	ifp = sc->malo_ifp;
 	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && !sc->malo_invalid) {
 		if_printf(ifp, "watchdog timeout\n");
 
@@ -1536,6 +1543,7 @@ malo_init_locked(struct malo_softc *sc)
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	malo_hal_intrset(mh, sc->malo_imask);
+	callout_reset(&sc->malo_watchdog_timer, hz, malo_watchdog, sc);
 }
 
 static void
@@ -1699,7 +1707,8 @@ malo_stop_locked(struct ifnet *ifp, int 
 	 * is gone (invalid).
 	 */
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
-	ifp->if_timer = 0;
+	callout_stop(&sc->malo_watchdog_timer);
+	sc->malo_timer = 0;
 	/* diable interrupt.  */
 	malo_hal_intrset(mh, 0);
 	/* turn off the radio.  */
@@ -2241,6 +2250,7 @@ malo_detach(struct malo_softc *sc)
 	 * Other than that, it's straightforward...
 	 */
 	ieee80211_ifdetach(ic);
+	callout_drain(&sc->malo_watchdog_timer);
 	malo_dma_cleanup(sc);
 	malo_tx_cleanup(sc);
 	malo_hal_detach(sc->malo_mh);

Modified: head/sys/dev/malo/if_malo.h
==============================================================================
--- head/sys/dev/malo/if_malo.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/malo/if_malo.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -550,6 +550,8 @@ struct malo_softc {
 
 	struct malo_txq		malo_txq[MALO_NUM_TX_QUEUES];
 	struct task		malo_txtask;	/* tx int processing */
+	struct callout	malo_watchdog_timer;
+	int			malo_timer;
 
 	struct malo_tx_radiotap_header malo_tx_th;
 	struct malo_rx_radiotap_header malo_rx_th;

Modified: head/sys/dev/mwl/if_mwl.c
==============================================================================
--- head/sys/dev/mwl/if_mwl.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/mwl/if_mwl.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -98,7 +98,7 @@ static void	mwl_start(struct ifnet *);
 static int	mwl_raw_xmit(struct ieee80211_node *, struct mbuf *,
 			const struct ieee80211_bpf_params *);
 static int	mwl_media_change(struct ifnet *);
-static void	mwl_watchdog(struct ifnet *);
+static void	mwl_watchdog(void *);
 static int	mwl_ioctl(struct ifnet *, u_long, caddr_t);
 static void	mwl_radar_proc(void *, int);
 static void	mwl_chanswitch_proc(void *, int);
@@ -360,6 +360,7 @@ mwl_attach(uint16_t devid, struct mwl_so
 		goto bad1;
 
 	callout_init(&sc->sc_timer, CALLOUT_MPSAFE);
+	callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0);
 
 	sc->sc_tq = taskqueue_create("mwl_taskq", M_NOWAIT,
 		taskqueue_thread_enqueue, &sc->sc_tq);
@@ -401,7 +402,6 @@ mwl_attach(uint16_t devid, struct mwl_so
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
 	ifp->if_start = mwl_start;
-	ifp->if_watchdog = mwl_watchdog;
 	ifp->if_ioctl = mwl_ioctl;
 	ifp->if_init = mwl_init;
 	IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
@@ -558,6 +558,7 @@ mwl_detach(struct mwl_softc *sc)
 	 * Other than that, it's straightforward...
 	 */
 	ieee80211_ifdetach(ic);
+	callout_drain(&sc->sc_watchdog);
 	mwl_dma_cleanup(sc);
 	mwl_tx_cleanup(sc);
 	mwl_hal_detach(sc->sc_mh);
@@ -1214,6 +1215,7 @@ mwl_init_locked(struct mwl_softc *sc)
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	mwl_hal_intrset(mh, sc->sc_imask);
+	callout_reset(&sc->sc_watchdog, hz, mwl_watchdog, sc);
 
 	return 0;
 }
@@ -1251,7 +1253,8 @@ mwl_stop_locked(struct ifnet *ifp, int d
 		 * Shutdown the hardware and driver.
 		 */
 		ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
-		ifp->if_timer = 0;
+		callout_stop(&sc->sc_watchdog);
+		sc->sc_tx_timer = 0;
 		mwl_draintxq(sc);
 	}
 }
@@ -3411,7 +3414,7 @@ mwl_tx_start(struct mwl_softc *sc, struc
 	MWL_TXDESC_SYNC(txq, ds, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
 	ifp->if_opackets++;
-	ifp->if_timer = 5;
+	sc->sc_tx_timer = 5;
 	MWL_TXQ_UNLOCK(txq);
 
 	return 0;
@@ -3558,7 +3561,7 @@ mwl_tx_proc(void *arg, int npending)
 
 	if (nreaped != 0) {
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-		ifp->if_timer = 0;
+		sc->sc_tx_timer = 0;
 		if (!IFQ_IS_EMPTY(&ifp->if_snd)) {
 			/* NB: kick fw; the tx thread may have been preempted */
 			mwl_hal_txstart(sc->sc_mh, 0);
@@ -3624,7 +3627,7 @@ mwl_draintxq(struct mwl_softc *sc)
 	for (i = 0; i < MWL_NUM_TX_QUEUES; i++)
 		mwl_tx_draintxq(sc, &sc->sc_txq[i]);
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	ifp->if_timer = 0;
+	sc->sc_tx_timer = 0;
 }
 
 #ifdef MWL_DIAGAPI
@@ -4770,10 +4773,17 @@ mwl_txq_dump(struct mwl_txq *txq)
 #endif
 
 static void
-mwl_watchdog(struct ifnet *ifp)
+mwl_watchdog(void *arg)
 {
-	struct mwl_softc *sc = ifp->if_softc;
+	struct mwl_softc *sc;
+	struct ifnet *ifp;
+
+	sc = arg;
+	callout_reset(&sc->sc_watchdog, hz, mwl_watchdog, sc);
+	if (sc->sc_tx_timer == 0 || --sc->sc_tx_timer > 0)
+		return;
 
+	ifp = sc->sc_ifp;
 	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && !sc->sc_invalid) {
 		if (mwl_hal_setkeepalive(sc->sc_mh))
 			if_printf(ifp, "transmit timeout (firmware hung?)\n");

Modified: head/sys/dev/mwl/if_mwlvar.h
==============================================================================
--- head/sys/dev/mwl/if_mwlvar.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/mwl/if_mwlvar.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -255,6 +255,8 @@ struct mwl_softc {
 	bus_space_tag_t		sc_io1t;
 	struct mtx		sc_mtx;		/* master lock (recursive) */
 	struct taskqueue	*sc_tq;		/* private task queue */
+	struct callout	sc_watchdog;
+	int			sc_tx_timer;
 	unsigned int		sc_invalid : 1,	/* disable hardware accesses */
 				sc_recvsetup:1,	/* recv setup */
 				sc_csapending:1,/* 11h channel switch pending */

Modified: head/sys/dev/sn/if_sn.c
==============================================================================
--- head/sys/dev/sn/if_sn.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/sn/if_sn.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -121,6 +122,7 @@ static int snioctl(struct ifnet * ifp, u
 
 static void snresume(struct ifnet *);
 
+static void snintr_locked(struct sn_softc *);
 static void sninit_locked(void *);
 static void snstart_locked(struct ifnet *);
 
@@ -128,7 +130,7 @@ static void sninit(void *);
 static void snread(struct ifnet *);
 static void snstart(struct ifnet *);
 static void snstop(struct sn_softc *);
-static void snwatchdog(struct ifnet *);
+static void snwatchdog(void *);
 
 static void sn_setmcast(struct sn_softc *);
 static int sn_getmcf(struct ifnet *ifp, u_char *mcf);
@@ -170,6 +172,7 @@ sn_attach(device_t dev)
 	}
 
 	SN_LOCK_INIT(sc);
+	callout_init_mtx(&sc->watchdog, &sc->sc_mtx, 0);
 	snstop(sc);
 	sc->pages_wanted = -1;
 
@@ -202,13 +205,11 @@ sn_attach(device_t dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = snstart;
 	ifp->if_ioctl = snioctl;
-	ifp->if_watchdog = snwatchdog;
 	ifp->if_init = sninit;
 	ifp->if_baudrate = 10000000;
 	IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
 	ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
 	IFQ_SET_READY(&ifp->if_snd);
-	ifp->if_timer = 0;
 
 	ether_ifattach(ifp, eaddr);
 
@@ -233,9 +234,11 @@ sn_detach(device_t dev)
 	struct sn_softc	*sc = device_get_softc(dev);
 	struct ifnet	*ifp = sc->ifp;
 
-	snstop(sc);
-	ifp->if_drv_flags &= ~IFF_DRV_RUNNING; 
 	ether_ifdetach(ifp);
+	SN_LOCK(sc);
+	snstop(sc);
+	SN_UNLOCK(sc);
+	callout_drain(&sc->watchdog);
 	sn_deactivate(dev);
 	if_free(ifp);
 	SN_LOCK_DESTROY(sc);
@@ -342,6 +345,7 @@ sninit_locked(void *xsc)
 	 */
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+	callout_reset(&sc->watchdog, hz, snwatchdog, sc);
 
 	/*
 	 * Attempt to push out any waiting packets.
@@ -463,7 +467,7 @@ startagain:
 		CSR_WRITE_1(sc, INTR_MASK_REG_B, mask);
 		sc->intr_mask = mask;
 
-		ifp->if_timer = 1;
+		sc->timer = 1;
 		ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 		sc->pages_wanted = numPages;
 		return;
@@ -548,7 +552,7 @@ startagain:
 	CSR_WRITE_2(sc, MMU_CMD_REG_W, MMUCR_ENQUEUE);
 
 	ifp->if_drv_flags |= IFF_DRV_OACTIVE;
-	ifp->if_timer = 1;
+	sc->timer = 1;
 
 	BPF_MTAP(ifp, top);
 
@@ -657,7 +661,7 @@ snresume(struct ifnet *ifp)
 	packet_no = CSR_READ_1(sc, ALLOC_RESULT_REG_B);
 	if (packet_no & ARR_FAILED) {
 		if_printf(ifp, "Memory allocation failed.  Weird.\n");
-		ifp->if_timer = 1;
+		sc->timer = 1;
 		goto try_start;
 	}
 	/*
@@ -755,24 +759,32 @@ try_start:
 	 * Now pass control to snstart() to queue any additional packets
 	 */
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	snstart(ifp);
+	snstart_locked(ifp);
 
 	/*
 	 * We've sent something, so we're active.  Set a watchdog in case the
 	 * TX_EMPTY interrupt is lost.
 	 */
 	ifp->if_drv_flags |= IFF_DRV_OACTIVE;
-	ifp->if_timer = 1;
+	sc->timer = 1;
 
 	return;
 }
 
-
 void
 sn_intr(void *arg)
 {
-	int             status, interrupts;
 	struct sn_softc *sc = (struct sn_softc *) arg;
+
+	SN_LOCK(sc);
+	snintr_locked(sc);
+	SN_UNLOCK(sc);
+}
+
+static void
+snintr_locked(struct sn_softc *sc)
+{
+	int             status, interrupts;
 	struct ifnet   *ifp = sc->ifp;
 
 	/*
@@ -783,12 +795,10 @@ sn_intr(void *arg)
 	uint16_t        tx_status;
 	uint16_t        card_stats;
 
-	SN_LOCK(sc);
-
 	/*
 	 * Clear the watchdog.
 	 */
-	ifp->if_timer = 0;
+	sc->timer = 0;
 
 	SMC_SELECT_BANK(sc, 2);
 
@@ -981,7 +991,6 @@ out:
 	mask |= CSR_READ_1(sc, INTR_MASK_REG_B);
 	CSR_WRITE_1(sc, INTR_MASK_REG_B, mask);
 	sc->intr_mask = mask;
-	SN_UNLOCK(sc);
 }
 
 static void
@@ -1136,7 +1145,6 @@ snioctl(struct ifnet *ifp, u_long cmd, c
 		SN_LOCK(sc);
 		if ((ifp->if_flags & IFF_UP) == 0 &&
 		    ifp->if_drv_flags & IFF_DRV_RUNNING) {
-			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			snstop(sc);
 		} else {
 			/* reinitialize card on any parameter change */
@@ -1161,9 +1169,16 @@ snioctl(struct ifnet *ifp, u_long cmd, c
 }
 
 static void
-snwatchdog(struct ifnet *ifp)
+snwatchdog(void *arg)
 {
-	sn_intr(ifp->if_softc);
+	struct sn_softc *sc;
+
+	sc = arg;
+	SN_ASSERT_LOCKED(sc);
+	callout_reset(&sc->watchdog, hz, snwatchdog, sc);
+	if (sc->timer == 0 || --sc->timer > 0)
+		return;
+	snintr_locked(sc);
 }
 
 
@@ -1193,7 +1208,9 @@ snstop(struct sn_softc *sc)
 	/*
 	 * Cancel watchdog.
 	 */
-	ifp->if_timer = 0;
+	sc->timer = 0;
+	callout_stop(&sc->watchdog);
+	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 }
 
 

Modified: head/sys/dev/sn/if_snvar.h
==============================================================================
--- head/sys/dev/sn/if_snvar.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/sn/if_snvar.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -33,6 +33,8 @@
 struct sn_softc {
 	struct ifnet    *ifp;
 	struct mtx sc_mtx;
+	struct callout watchdog;
+	int		timer;
 	int             pages_wanted;	/* Size of outstanding MMU ALLOC */
 	int             intr_mask;	/* Most recently set interrupt mask */
 	device_t	dev;

Modified: head/sys/dev/ste/if_ste.c
==============================================================================
--- head/sys/dev/ste/if_ste.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/ste/if_ste.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -108,7 +108,7 @@ static int ste_ioctl(struct ifnet *, u_l
 static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *);
 static void ste_start(struct ifnet *);
 static void ste_start_locked(struct ifnet *);
-static void ste_watchdog(struct ifnet *);
+static void ste_watchdog(struct ste_softc *);
 static int ste_shutdown(device_t);
 static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *,
 		struct mbuf *);
@@ -924,7 +924,7 @@ ste_txeof(sc)
 
 	sc->ste_cdata.ste_tx_cons = idx;
 	if (idx == sc->ste_cdata.ste_tx_prod)
-		ifp->if_timer = 0;
+		sc->ste_timer = 0;
 }
 
 static void
@@ -960,6 +960,8 @@ ste_stats_update(xsc)
 		}
 	}
 
+	if (sc->ste_timer > 0 && --sc->ste_timer == 0)
+		ste_watchdog(sc);
 	callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc);
 
 	return;
@@ -1094,7 +1096,6 @@ ste_attach(dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = ste_ioctl;
 	ifp->if_start = ste_start;
-	ifp->if_watchdog = ste_watchdog;
 	ifp->if_init = ste_init;
 	IFQ_SET_MAXLEN(&ifp->if_snd, STE_TX_LIST_CNT - 1);
 	ifp->if_snd.ifq_drv_maxlen = STE_TX_LIST_CNT - 1;
@@ -1159,11 +1160,11 @@ ste_detach(dev)
 
 	/* These should only be active if attach succeeded */
 	if (device_is_attached(dev)) {
+		ether_ifdetach(ifp);
 		STE_LOCK(sc);
 		ste_stop(sc);
 		STE_UNLOCK(sc);
 		callout_drain(&sc->ste_stat_callout);
-		ether_ifdetach(ifp);
 	}
 	if (sc->ste_miibus)
 		device_delete_child(dev, sc->ste_miibus);
@@ -1708,7 +1709,7 @@ ste_start_locked(ifp)
 		BPF_MTAP(ifp, cur_tx->ste_mbuf);
 
 		STE_INC(idx, STE_TX_LIST_CNT);
-		ifp->if_timer = 5;
+		sc->ste_timer = 5;
 	}
 	sc->ste_cdata.ste_tx_prod = idx;
 
@@ -1716,13 +1717,12 @@ ste_start_locked(ifp)
 }
 
 static void
-ste_watchdog(ifp)
-	struct ifnet		*ifp;
+ste_watchdog(struct ste_softc *sc)
 {
-	struct ste_softc	*sc;
+	struct ifnet		*ifp;
 
-	sc = ifp->if_softc;
-	STE_LOCK(sc);
+	ifp = sc->ste_ifp;
+	STE_LOCK_ASSERT(sc);
 
 	ifp->if_oerrors++;
 	if_printf(ifp, "watchdog timeout\n");
@@ -1736,7 +1736,6 @@ ste_watchdog(ifp)
 
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		ste_start_locked(ifp);
-	STE_UNLOCK(sc);
 
 	return;
 }

Modified: head/sys/dev/ste/if_stereg.h
==============================================================================
--- head/sys/dev/ste/if_stereg.h	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/ste/if_stereg.h	Thu Nov 19 22:06:40 2009	(r199559)
@@ -517,6 +517,7 @@ struct ste_softc {
 	int			ste_tx_thresh;
 	u_int8_t		ste_link;
 	int			ste_if_flags;
+	int			ste_timer;
 	struct ste_chain	*ste_tx_prev;
 	struct ste_list_data	*ste_ldata;
 	struct ste_chain_data	ste_cdata;

Modified: head/sys/dev/ti/if_ti.c
==============================================================================
--- head/sys/dev/ti/if_ti.c	Thu Nov 19 22:06:19 2009	(r199558)
+++ head/sys/dev/ti/if_ti.c	Thu Nov 19 22:06:40 2009	(r199559)
@@ -194,7 +194,7 @@ static void ti_init(void *);
 static void ti_init_locked(void *);
 static void ti_init2(struct ti_softc *);
 static void ti_stop(struct ti_softc *);
-static void ti_watchdog(struct ifnet *);
+static void ti_watchdog(void *);
 static int ti_shutdown(device_t);
 static int ti_ifmedia_upd(struct ifnet *);
 static void ti_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -2285,6 +2285,7 @@ ti_attach(dev)
 
 	mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
 	    MTX_DEF);
+	callout_init_mtx(&sc->ti_watchdog, &sc->ti_mtx, 0);
 	ifmedia_init(&sc->ifmedia, IFM_IMASK, ti_ifmedia_upd, ti_ifmedia_sts);
 	ifp = sc->ti_ifp = if_alloc(IFT_ETHER);
 	if (ifp == NULL) {
@@ -2486,7 +2487,6 @@ ti_attach(dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = ti_ioctl;
 	ifp->if_start = ti_start;
-	ifp->if_watchdog = ti_watchdog;
 	ifp->if_init = ti_init;
 	ifp->if_baudrate = 1000000000;
 	ifp->if_mtu = ETHERMTU;
@@ -2565,24 +2565,22 @@ ti_detach(dev)
 {
 	struct ti_softc		*sc;
 	struct ifnet		*ifp;
-	int			attached;
 
 	sc = device_get_softc(dev);
 	if (sc->dev)
 		destroy_dev(sc->dev);
 	KASSERT(mtx_initialized(&sc->ti_mtx), ("ti mutex not initialized"));
-	attached = device_is_attached(dev);
-	TI_LOCK(sc);
 	ifp = sc->ti_ifp;
-	if (attached)
-		ti_stop(sc);
-	TI_UNLOCK(sc);
-	if (attached)
+	if (device_is_attached(dev)) {
 		ether_ifdetach(ifp);
+		TI_LOCK(sc);
+		ti_stop(sc);
+		TI_UNLOCK(sc);
+	}
 
 	/* These should only be active if attach succeeded */
-	if (attached)
-		bus_generic_detach(dev);
+	callout_drain(&sc->ti_watchdog);
+	bus_generic_detach(dev);
 	ti_free_dmamaps(sc);
 	ifmedia_removeall(&sc->ifmedia);
 
@@ -2866,7 +2864,7 @@ ti_txeof(sc)
 	}
 	sc->ti_tx_saved_considx = idx;
 
-	ifp->if_timer = sc->ti_txcnt > 0 ? 5 : 0;
+	sc->ti_timer = sc->ti_txcnt > 0 ? 5 : 0;
 }
 
 static void
@@ -3121,7 +3119,7 @@ ti_start_locked(ifp)
 		/*
 		 * Set a timeout in case the chip goes out to lunch.
 		 */
-		ifp->if_timer = 5;
+		sc->ti_timer = 5;
 	}
 }
 
@@ -3225,6 +3223,7 @@ static void ti_init2(sc)
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+	callout_reset(&sc->ti_watchdog, hz, ti_watchdog, sc);
 
 	/*
 	 * Make sure to set media properly. We have to do this
@@ -3786,30 +3785,31 @@ ti_ioctl2(struct cdev *dev, u_long cmd, 
 }
 
 static void
-ti_watchdog(ifp)
-	struct ifnet		*ifp;
+ti_watchdog(void *arg)
 {
 	struct ti_softc		*sc;
+	struct ifnet		*ifp;
 
-	sc = ifp->if_softc;
-	TI_LOCK(sc);
+	sc = arg;
+	TI_LOCK_ASSERT(sc);
+	callout_reset(&sc->ti_watchdog, hz, ti_watchdog, sc);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:14:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CDF49106566C;
	Thu, 19 Nov 2009 22:14:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BACD18FC08;
	Thu, 19 Nov 2009 22:14:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJMEN4L021567;
	Thu, 19 Nov 2009 22:14:23 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJMENe4021556;
	Thu, 19 Nov 2009 22:14:23 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911192214.nAJMENe4021556@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 19 Nov 2009 22:14:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199560 - in head/sys/dev: lge nve pcn tl wb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:14:23 -0000

Author: jhb
Date: Thu Nov 19 22:14:23 2009
New Revision: 199560
URL: http://svn.freebsd.org/changeset/base/199560

Log:
  - Hook into the existing stat timer to drive the transmit watchdog instead
    of using if_watchdog and if_timer.
  - Reorder detach to call ether_ifdetach() before anything else in tl(4)
    and wb(4).

Modified:
  head/sys/dev/lge/if_lge.c
  head/sys/dev/lge/if_lgereg.h
  head/sys/dev/nve/if_nve.c
  head/sys/dev/nve/if_nvereg.h
  head/sys/dev/pcn/if_pcn.c
  head/sys/dev/pcn/if_pcnreg.h
  head/sys/dev/tl/if_tl.c
  head/sys/dev/tl/if_tlreg.h
  head/sys/dev/wb/if_wb.c
  head/sys/dev/wb/if_wbreg.h

Modified: head/sys/dev/lge/if_lge.c
==============================================================================
--- head/sys/dev/lge/if_lge.c	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/lge/if_lge.c	Thu Nov 19 22:14:23 2009	(r199560)
@@ -137,7 +137,7 @@ static int lge_ioctl(struct ifnet *, u_l
 static void lge_init(void *);
 static void lge_init_locked(struct lge_softc *);
 static void lge_stop(struct lge_softc *);
-static void lge_watchdog(struct ifnet *);
+static void lge_watchdog(struct lge_softc *);
 static int lge_shutdown(device_t);
 static int lge_ifmedia_upd(struct ifnet *);
 static void lge_ifmedia_upd_locked(struct ifnet *);
@@ -544,7 +544,6 @@ lge_attach(dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = lge_ioctl;
 	ifp->if_start = lge_start;
-	ifp->if_watchdog = lge_watchdog;
 	ifp->if_init = lge_init;
 	ifp->if_snd.ifq_maxlen = LGE_TX_LIST_CNT - 1;
 	ifp->if_capabilities = IFCAP_RXCSUM;
@@ -1000,7 +999,7 @@ lge_txeof(sc)
 	ifp = sc->lge_ifp;
 
 	/* Clear the timeout timer. */
-	ifp->if_timer = 0;
+	sc->lge_timer = 0;
 
 	/*
 	 * Go through our tx list and free mbufs for those
@@ -1021,7 +1020,7 @@ lge_txeof(sc)
 
 		txdone--;
 		LGE_INC(idx, LGE_TX_LIST_CNT);
-		ifp->if_timer = 0;
+		sc->lge_timer = 0;
 	}
 
 	sc->lge_cdata.lge_tx_cons = idx;
@@ -1064,6 +1063,8 @@ lge_tick(xsc)
 		}
 	}
 
+	if (sc->lge_timer != 0 && --sc->lge_timer == 0)
+		lge_watchdog(sc);
 	callout_reset(&sc->lge_stat_callout, hz, lge_tick, sc);
 
 	return;
@@ -1236,7 +1237,7 @@ lge_start_locked(ifp)
 	/*
 	 * Set a timeout in case the chip goes out to lunch.
 	 */
-	ifp->if_timer = 5;
+	sc->lge_timer = 5;
 
 	return;
 }
@@ -1506,14 +1507,14 @@ lge_ioctl(ifp, command, data)
 }
 
 static void
-lge_watchdog(ifp)
-	struct ifnet		*ifp;
-{
+lge_watchdog(sc)
 	struct lge_softc	*sc;
+{
+	struct ifnet		*ifp;
 
-	sc = ifp->if_softc;
+	LGE_LOCK_ASSERT(sc);
+	ifp = sc->lge_ifp;
 
-	LGE_LOCK(sc);
 	ifp->if_oerrors++;
 	if_printf(ifp, "watchdog timeout\n");
 
@@ -1524,9 +1525,6 @@ lge_watchdog(ifp)
 
 	if (ifp->if_snd.ifq_head != NULL)
 		lge_start_locked(ifp);
-	LGE_UNLOCK(sc);
-
-	return;
 }
 
 /*
@@ -1542,7 +1540,7 @@ lge_stop(sc)
 
 	LGE_LOCK_ASSERT(sc);
 	ifp = sc->lge_ifp;
-	ifp->if_timer = 0;
+	sc->lge_timer = 0;
 	callout_stop(&sc->lge_stat_callout);
 	CSR_WRITE_4(sc, LGE_IMR, LGE_IMR_INTR_ENB);
 

Modified: head/sys/dev/lge/if_lgereg.h
==============================================================================
--- head/sys/dev/lge/if_lgereg.h	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/lge/if_lgereg.h	Thu Nov 19 22:14:23 2009	(r199560)
@@ -534,6 +534,7 @@ struct lge_softc {
 	u_int8_t		lge_link;
 	u_int8_t		lge_pcs;
 	int			lge_if_flags;
+	int			lge_timer;
 	struct lge_list_data	*lge_ldata;
 	struct lge_ring_data	lge_cdata;
 	struct callout		lge_stat_callout;

Modified: head/sys/dev/nve/if_nve.c
==============================================================================
--- head/sys/dev/nve/if_nve.c	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/nve/if_nve.c	Thu Nov 19 22:14:23 2009	(r199560)
@@ -140,7 +140,7 @@ static int      nve_ioctl(struct ifnet *
 static void     nve_intr(void *);
 static void     nve_tick(void *);
 static void     nve_setmulti(struct nve_softc *);
-static void     nve_watchdog(struct ifnet *);
+static void     nve_watchdog(struct nve_softc *);
 static void     nve_update_stats(struct nve_softc *);
 
 static int      nve_ifmedia_upd(struct ifnet *);
@@ -540,8 +540,6 @@ nve_attach(device_t dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = nve_ioctl;
 	ifp->if_start = nve_ifstart;
-	ifp->if_watchdog = nve_watchdog;
-	ifp->if_timer = 0;
 	ifp->if_init = nve_init;
 	ifp->if_mtu = ETHERMTU;
 	ifp->if_baudrate = IF_Mbps(100);
@@ -709,7 +707,7 @@ nve_stop(struct nve_softc *sc)
 	DEBUGOUT(NVE_DEBUG_RUNNING, "nve: nve_stop - entry\n");
 
 	ifp = sc->ifp;
-	ifp->if_timer = 0;
+	sc->tx_timer = 0;
 
 	/* Cancel tick timer */
 	callout_stop(&sc->stat_callout);
@@ -983,7 +981,7 @@ nve_ifstart_locked(struct ifnet *ifp)
 			return;
 		}
 		/* Set watchdog timer. */
-		ifp->if_timer = 8;
+		sc->tx_timer = 8;
 
 		/* Copy packet to BPF tap */
 		BPF_MTAP(ifp, m0);
@@ -1095,7 +1093,7 @@ nve_intr(void *arg)
 
 	/* If no pending packets we don't need a timeout */
 	if (sc->pending_txs == 0)
-		sc->ifp->if_timer = 0;
+		sc->tx_timer = 0;
 	NVE_UNLOCK(sc);
 
 	DEBUGOUT(NVE_DEBUG_INTERRUPT, "nve: nve_intr - exit\n");
@@ -1236,6 +1234,9 @@ nve_tick(void *xsc)
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 			nve_ifstart_locked(ifp);
 	}
+
+	if (sc->tx_timer > 0 && --sc->tx_timer == 0)
+		nve_watchdog(sc);
 	callout_reset(&sc->stat_callout, hz, nve_tick, sc);
 
 	return;
@@ -1307,12 +1308,13 @@ nve_miibus_writereg(device_t dev, int ph
 
 /* Watchdog timer to prevent PHY lockups */
 static void
-nve_watchdog(struct ifnet *ifp)
+nve_watchdog(struct nve_softc *sc)
 {
-	struct nve_softc *sc = ifp->if_softc;
+	struct ifnet *ifp;
 	int pending_txs_start;
 
-	NVE_LOCK(sc);
+	NVE_LOCK_ASSERT(sc);
+	ifp = sc->ifp;
 
 	/*
 	 * The nvidia driver blob defers tx completion notifications.
@@ -1328,24 +1330,18 @@ nve_watchdog(struct ifnet *ifp)
 	sc->hwapi->pfnDisableInterrupts(sc->hwapi->pADCX);
 	sc->hwapi->pfnHandleInterrupt(sc->hwapi->pADCX);
 	sc->hwapi->pfnEnableInterrupts(sc->hwapi->pADCX);
-	if (sc->pending_txs < pending_txs_start) {
-		NVE_UNLOCK(sc);
+	if (sc->pending_txs < pending_txs_start)
 		return;
-	}
 
 	device_printf(sc->dev, "device timeout (%d)\n", sc->pending_txs);
 
 	sc->tx_errors++;
 
 	nve_stop(sc);
-	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	nve_init_locked(sc);
 
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		nve_ifstart_locked(ifp);
-	NVE_UNLOCK(sc);
-
-	return;
 }
 
 /* --- Start of NVOSAPI interface --- */

Modified: head/sys/dev/nve/if_nvereg.h
==============================================================================
--- head/sys/dev/nve/if_nvereg.h	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/nve/if_nvereg.h	Thu Nov 19 22:14:23 2009	(r199560)
@@ -138,6 +138,7 @@ struct nve_softc {
 	device_t miibus;
 	device_t dev;
 	struct callout stat_callout;
+	int tx_timer;
 
 	void *sc_ih;
 	bus_space_tag_t sc_st;

Modified: head/sys/dev/pcn/if_pcn.c
==============================================================================
--- head/sys/dev/pcn/if_pcn.c	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/pcn/if_pcn.c	Thu Nov 19 22:14:23 2009	(r199560)
@@ -143,7 +143,7 @@ static int pcn_ioctl(struct ifnet *, u_l
 static void pcn_init(void *);
 static void pcn_init_locked(struct pcn_softc *);
 static void pcn_stop(struct pcn_softc *);
-static void pcn_watchdog(struct ifnet *);
+static void pcn_watchdog(struct pcn_softc *);
 static int pcn_shutdown(device_t);
 static int pcn_ifmedia_upd(struct ifnet *);
 static void pcn_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -630,7 +630,6 @@ pcn_attach(dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = pcn_ioctl;
 	ifp->if_start = pcn_start;
-	ifp->if_watchdog = pcn_watchdog;
 	ifp->if_init = pcn_init;
 	ifp->if_snd.ifq_maxlen = PCN_TX_LIST_CNT - 1;
 
@@ -948,7 +947,7 @@ pcn_txeof(sc)
 		sc->pcn_cdata.pcn_tx_cons = idx;
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	}
-	ifp->if_timer = (sc->pcn_cdata.pcn_tx_cnt == 0) ? 0 : 5;
+	sc->pcn_timer = (sc->pcn_cdata.pcn_tx_cnt == 0) ? 0 : 5;
 
 	return;
 }
@@ -980,6 +979,8 @@ pcn_tick(xsc)
 			pcn_start_locked(ifp);
 	}
 
+	if (sc->pcn_timer > 0 && --sc->pcn_timer == 0)
+		pcn_watchdog(sc);
 	callout_reset(&sc->pcn_stat_callout, hz, pcn_tick, sc);
 
 	return;
@@ -1147,7 +1148,7 @@ pcn_start_locked(ifp)
 	/*
 	 * Set a timeout in case the chip goes out to lunch.
 	 */
-	ifp->if_timer = 5;
+	sc->pcn_timer = 5;
 
 	return;
 }
@@ -1429,14 +1430,12 @@ pcn_ioctl(ifp, command, data)
 }
 
 static void
-pcn_watchdog(ifp)
-	struct ifnet		*ifp;
+pcn_watchdog(struct pcn_softc *sc)
 {
-	struct pcn_softc	*sc;
-
-	sc = ifp->if_softc;
+	struct ifnet		*ifp;
 
-	PCN_LOCK(sc);
+	PCN_LOCK_ASSERT(sc);
+	ifp = sc->pcn_ifp;
 
 	ifp->if_oerrors++;
 	if_printf(ifp, "watchdog timeout\n");
@@ -1447,10 +1446,6 @@ pcn_watchdog(ifp)
 
 	if (ifp->if_snd.ifq_head != NULL)
 		pcn_start_locked(ifp);
-
-	PCN_UNLOCK(sc);
-
-	return;
 }
 
 /*
@@ -1465,7 +1460,7 @@ pcn_stop(struct pcn_softc *sc)
 
 	PCN_LOCK_ASSERT(sc);
 	ifp = sc->pcn_ifp;
-	ifp->if_timer = 0;
+	sc->pcn_timer = 0;
 
 	callout_stop(&sc->pcn_stat_callout);
 

Modified: head/sys/dev/pcn/if_pcnreg.h
==============================================================================
--- head/sys/dev/pcn/if_pcnreg.h	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/pcn/if_pcnreg.h	Thu Nov 19 22:14:23 2009	(r199560)
@@ -465,6 +465,7 @@ struct pcn_softc {
 	struct pcn_ring_data	pcn_cdata;
 	struct callout		pcn_stat_callout;
 	struct mtx		pcn_mtx;
+	int			pcn_timer;
 };
 
 #define	PCN_LOCK(_sc)		mtx_lock(&(_sc)->pcn_mtx)

Modified: head/sys/dev/tl/if_tl.c
==============================================================================
--- head/sys/dev/tl/if_tl.c	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/tl/if_tl.c	Thu Nov 19 22:14:23 2009	(r199560)
@@ -281,7 +281,7 @@ static int tl_ioctl(struct ifnet *, u_lo
 static void tl_init(void *);
 static void tl_init_locked(struct tl_softc *);
 static void tl_stop(struct tl_softc *);
-static void tl_watchdog(struct ifnet *);
+static void tl_watchdog(struct tl_softc *);
 static int tl_shutdown(device_t);
 static int tl_ifmedia_upd(struct ifnet *);
 static void tl_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -1260,7 +1260,6 @@ tl_attach(dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = tl_ioctl;
 	ifp->if_start = tl_start;
-	ifp->if_watchdog = tl_watchdog;
 	ifp->if_init = tl_init;
 	ifp->if_mtu = ETHERMTU;
 	ifp->if_snd.ifq_maxlen = TL_TX_LIST_CNT - 1;
@@ -1337,11 +1336,11 @@ tl_detach(dev)
 
 	/* These should only be active if attach succeeded */
 	if (device_is_attached(dev)) {
+		ether_ifdetach(ifp);
 		TL_LOCK(sc);
 		tl_stop(sc);
 		TL_UNLOCK(sc);
 		callout_drain(&sc->tl_stat_callout);
-		ether_ifdetach(ifp);
 	}
 	if (sc->tl_miibus)
 		device_delete_child(dev, sc->tl_miibus);
@@ -1635,7 +1634,7 @@ tl_intvec_txeoc(xsc, type)
 	ifp = sc->tl_ifp;
 
 	/* Clear the timeout timer. */
-	ifp->if_timer = 0;
+	sc->tl_timer = 0;
 
 	if (sc->tl_cdata.tl_tx_head == NULL) {
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -1821,6 +1820,9 @@ tl_stats_update(xsc)
 		}
 	}
 
+	if (sc->tl_timer > 0 && --sc->tl_timer == 0)
+		tl_watchdog(sc);
+
 	callout_reset(&sc->tl_stat_callout, hz, tl_stats_update, sc);
 
 	if (!sc->tl_bitrate) {
@@ -2029,7 +2031,7 @@ tl_start_locked(ifp)
 	/*
 	 * Set a timeout in case the chip goes out to lunch.
 	 */
-	ifp->if_timer = 5;
+	sc->tl_timer = 5;
 
 	return;
 }
@@ -2254,21 +2256,20 @@ tl_ioctl(ifp, command, data)
 }
 
 static void
-tl_watchdog(ifp)
-	struct ifnet		*ifp;
-{
+tl_watchdog(sc)
 	struct tl_softc		*sc;
+{
+	struct ifnet		*ifp;
 
-	sc = ifp->if_softc;
+	TL_LOCK_ASSERT(sc);
+	ifp = sc->tl_ifp;
 
 	if_printf(ifp, "device timeout\n");
 
-	TL_LOCK(sc);
 	ifp->if_oerrors++;
 
 	tl_softreset(sc, 1);
 	tl_init_locked(sc);
-	TL_UNLOCK(sc);
 
 	return;
 }

Modified: head/sys/dev/tl/if_tlreg.h
==============================================================================
--- head/sys/dev/tl/if_tlreg.h	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/tl/if_tlreg.h	Thu Nov 19 22:14:23 2009	(r199560)
@@ -125,6 +125,7 @@ struct tl_softc {
 	int			tl_if_flags;
 	struct callout		tl_stat_callout;
 	struct mtx		tl_mtx;
+	int			tl_timer;
 };
 
 #define	TL_LOCK(_sc)		mtx_lock(&(_sc)->tl_mtx)

Modified: head/sys/dev/wb/if_wb.c
==============================================================================
--- head/sys/dev/wb/if_wb.c	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/wb/if_wb.c	Thu Nov 19 22:14:23 2009	(r199560)
@@ -158,7 +158,7 @@ static int wb_ioctl(struct ifnet *, u_lo
 static void wb_init(void *);
 static void wb_init_locked(struct wb_softc *);
 static void wb_stop(struct wb_softc *);
-static void wb_watchdog(struct ifnet *);
+static void wb_watchdog(struct wb_softc *);
 static int wb_shutdown(device_t);
 static int wb_ifmedia_upd(struct ifnet *);
 static void wb_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -849,7 +849,6 @@ wb_attach(dev)
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = wb_ioctl;
 	ifp->if_start = wb_start;
-	ifp->if_watchdog = wb_watchdog;
 	ifp->if_init = wb_init;
 	ifp->if_snd.ifq_maxlen = WB_TX_LIST_CNT - 1;
 
@@ -907,11 +906,11 @@ wb_detach(dev)
 	 * This should only be done if attach succeeded.
 	 */
 	if (device_is_attached(dev)) {
+		ether_ifdetach(ifp);
 		WB_LOCK(sc);
 		wb_stop(sc);
 		WB_UNLOCK(sc);
 		callout_drain(&sc->wb_stat_callout);
-		ether_ifdetach(ifp);
 	}
 	if (sc->wb_miibus)
 		device_delete_child(dev, sc->wb_miibus);
@@ -1157,7 +1156,7 @@ wb_txeof(sc)
 	ifp = sc->wb_ifp;
 
 	/* Clear the timeout timer. */
-	ifp->if_timer = 0;
+	sc->wb_timer = 0;
 
 	if (sc->wb_cdata.wb_tx_head == NULL)
 		return;
@@ -1212,7 +1211,7 @@ wb_txeoc(sc)
 
 	ifp = sc->wb_ifp;
 
-	ifp->if_timer = 0;
+	sc->wb_timer = 0;
 
 	if (sc->wb_cdata.wb_tx_head == NULL) {
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -1220,7 +1219,7 @@ wb_txeoc(sc)
 	} else {
 		if (WB_TXOWN(sc->wb_cdata.wb_tx_head) == WB_UNSENT) {
 			WB_TXOWN(sc->wb_cdata.wb_tx_head) = WB_TXSTAT_OWN;
-			ifp->if_timer = 5;
+			sc->wb_timer = 5;
 			CSR_WRITE_4(sc, WB_TXSTART, 0xFFFFFFFF);
 		}
 	}
@@ -1329,6 +1328,8 @@ wb_tick(xsc)
 
 	mii_tick(mii);
 
+	if (sc->wb_timer > 0 && --sc->wb_timer == 0)
+		wb_watchdog(sc);
 	callout_reset(&sc->wb_stat_callout, hz, wb_tick, sc);
 
 	return;
@@ -1529,7 +1530,7 @@ wb_start_locked(ifp)
 	/*
 	 * Set a timeout in case the chip goes out to lunch.
 	 */
-	ifp->if_timer = 5;
+	sc->wb_timer = 5;
 
 	return;
 }
@@ -1748,14 +1749,13 @@ wb_ioctl(ifp, command, data)
 }
 
 static void
-wb_watchdog(ifp)
-	struct ifnet		*ifp;
-{
+wb_watchdog(sc)
 	struct wb_softc		*sc;
+{
+	struct ifnet		*ifp;
 
-	sc = ifp->if_softc;
-
-	WB_LOCK(sc);
+	WB_LOCK_ASSERT(sc);
+	ifp = sc->wb_ifp;
 	ifp->if_oerrors++;
 	if_printf(ifp, "watchdog timeout\n");
 #ifdef foo
@@ -1768,7 +1768,6 @@ wb_watchdog(ifp)
 
 	if (ifp->if_snd.ifq_head != NULL)
 		wb_start_locked(ifp);
-	WB_UNLOCK(sc);
 
 	return;
 }
@@ -1786,7 +1785,7 @@ wb_stop(sc)
 
 	WB_LOCK_ASSERT(sc);
 	ifp = sc->wb_ifp;
-	ifp->if_timer = 0;
+	sc->wb_timer = 0;
 
 	callout_stop(&sc->wb_stat_callout);
 

Modified: head/sys/dev/wb/if_wbreg.h
==============================================================================
--- head/sys/dev/wb/if_wbreg.h	Thu Nov 19 22:06:40 2009	(r199559)
+++ head/sys/dev/wb/if_wbreg.h	Thu Nov 19 22:14:23 2009	(r199560)
@@ -372,6 +372,7 @@ struct wb_softc {
 	u_int8_t		wb_type;
 	u_int16_t		wb_txthresh;
 	int			wb_cachesize;
+	int			wb_timer;
 	caddr_t			wb_ldata_ptr;
 	struct wb_list_data	*wb_ldata;
 	struct wb_chain_data	wb_cdata;

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:31:13 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id 4E3171065670;
	Thu, 19 Nov 2009 22:31:13 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: John Baldwin 
Date: Thu, 19 Nov 2009 17:31:00 -0500
User-Agent: KMail/1.6.2
References: <200911182340.nAINeJ3W087652@svn.freebsd.org>
	<200911191115.11088.jkim@FreeBSD.org>
	<200911191649.37198.jhb@freebsd.org>
In-Reply-To: <200911191649.37198.jhb@freebsd.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <200911191731.04075.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Robert Watson 
Subject: Re: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:31:14 -0000

On Thursday 19 November 2009 04:49 pm, John Baldwin wrote:
> On Thursday 19 November 2009 11:15:01 am Jung-uk Kim wrote:
> > On Thursday 19 November 2009 03:26 am, Robert Watson wrote:
> > > On Wed, 18 Nov 2009, Jung-uk Kim wrote:
> > > >  - Change internal function bpf_jit_compile() to return
> > > > allocated size of the generated binary and remove page size
> > > > limitation for userland. - Use contigmalloc(9)/contigfree(9)
> > > > instead of malloc(9)/free(9) to make sure the generated
> > > > binary aligns properly and make it physically contiguous.
> > >
> > > Is physical contiguity actually required here -- I would have
> > > thought virtual contiguity and alignment would be sufficient,
> > > in which case the normal trick is to allocate using malloc the
> > > size + min-align + 1 and then fudge the pointer forward until
> > > it's properly aligned.
> >
> > I don't believe it is strictly necessary but I assumed it might
> > have performance benefit for very big BPF programs although I
> > have not measured it.  Also, contigmalloc(9)/contigfree(9) is too
> > obvious to ignore for this purpose. :-)
>
> Why would it have a performance benefit to have the pages be
> physically contiguous?  contigmalloc() is expensive and should
> really only be used if you truly need contiguous memory.  If you
> can get by with malloc(), just use malloc().

Remember are allocating memory for a function pointer here.  If we 
want to take care of alignment, then "fudging the pointer forward" 
trick is not going to be easy unless I embed real offset in the 
structure and pass it around with the pointer.  I don't mind doing it 
but it seemed unnecessary to me.  Besides, it is very unlikely to see 
a lot of parallel BPF filter allocations in real world.  Actually, 
that is a big assumption for BPF JIT compiler by itself because 
filter compilation is expensive.  Also, if contigmalloc() fails, 
bpf(4) simply falls back to good old bpf_filter().  So, I don't see 
anything wrong with this.

Jung-uk Kim

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:41:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id 30D59106568D; Thu, 19 Nov 2009 22:41:52 +0000 (UTC)
Date: Thu, 19 Nov 2009 22:41:52 +0000
From: Alexey Dokuchaev 
To: Pyun YongHyeon 
Message-ID: <20091119224151.GA79179@FreeBSD.org>
References: <200911192145.nAJLj6KD020454@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <200911192145.nAJLj6KD020454@svn.freebsd.org>
User-Agent: Mutt/1.4.2.1i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199552 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:41:52 -0000

On Thu, Nov 19, 2009 at 09:45:06PM +0000, Pyun YongHyeon wrote:
> 
> Modified: head/sys/dev/et/if_et.c
> ==============================================================================
> --- head/sys/dev/et/if_et.c	Thu Nov 19 21:39:43 2009	(r199551)
> +++ head/sys/dev/et/if_et.c	Thu Nov 19 21:45:06 2009	(r199552)
> @@ -76,6 +76,10 @@ MODULE_DEPEND(et, pci, 1, 1, 1);
>  MODULE_DEPEND(et, ether, 1, 1, 1);
>  MODULE_DEPEND(et, miibus, 1, 1, 1);
>  
> +/* Tunables. */
> +static int msi_disable = 0;
> +TUNABLE_INT("hw.re.msi_disable", &msi_disable);
		^^^^^
Shouldn't it be "hw.et" instead?

> +		msic = pci_msi_count(dev);
> +		if (bootverbose)
> +			device_printf(dev, "MSI count : %d\n", msic);

Is extra space before colon really necessary here?

./danfe

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:53:41 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95B7B1065672;
	Thu, 19 Nov 2009 22:53:41 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8360C8FC1A;
	Thu, 19 Nov 2009 22:53:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJMrfBX022441;
	Thu, 19 Nov 2009 22:53:41 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJMrf3P022439;
	Thu, 19 Nov 2009 22:53:41 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192253.nAJMrf3P022439@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 22:53:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199561 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:53:41 -0000

Author: yongari
Date: Thu Nov 19 22:53:41 2009
New Revision: 199561
URL: http://svn.freebsd.org/changeset/base/199561

Log:
  Use capability pointer to access PCIe registers rather than
  directly access them at fixed address. Frequently the register
  offset could be changed if additional PCI capabilities are added to
  controller.
  One odd thing is ET_PCIR_L0S_L1_LATENCY register. I think it's PCIe
  link capabilities register but the location of the register does
  not match with PCIe capability pointer + offset. I'm not sure it's
  shadow register of PCIe link capabilities register.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 22:14:23 2009	(r199560)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 22:53:41 2009	(r199561)
@@ -142,7 +142,7 @@ static int	et_stop_rxdma(struct et_softc
 static int	et_stop_txdma(struct et_softc *);
 static int	et_enable_txrx(struct et_softc *, int);
 static void	et_reset(struct et_softc *);
-static int	et_bus_config(device_t);
+static int	et_bus_config(struct et_softc *);
 static void	et_get_eaddr(device_t, uint8_t[]);
 static void	et_setmulti(struct et_softc *);
 static void	et_tick(void *);
@@ -308,7 +308,7 @@ et_attach(device_t dev)
 		goto fail;
 	}
 
-	error = et_bus_config(dev);
+	error = et_bus_config(sc);
 	if (error)
 		goto fail;
 
@@ -575,7 +575,7 @@ et_stop(struct et_softc *sc)
 }
 
 static int
-et_bus_config(device_t dev)
+et_bus_config(struct et_softc *sc)
 {
 	uint32_t val, max_plsz;
 	uint16_t ack_latency, replay_timer;
@@ -584,21 +584,25 @@ et_bus_config(device_t dev)
 	 * Test whether EEPROM is valid
 	 * NOTE: Read twice to get the correct value
 	 */
-	pci_read_config(dev, ET_PCIR_EEPROM_STATUS, 1);
-	val = pci_read_config(dev, ET_PCIR_EEPROM_STATUS, 1);
+	pci_read_config(sc->dev, ET_PCIR_EEPROM_STATUS, 1);
+	val = pci_read_config(sc->dev, ET_PCIR_EEPROM_STATUS, 1);
 	if (val & ET_PCIM_EEPROM_STATUS_ERROR) {
-		device_printf(dev, "EEPROM status error 0x%02x\n", val);
+		device_printf(sc->dev, "EEPROM status error 0x%02x\n", val);
 		return (ENXIO);
 	}
 
 	/* TODO: LED */
 
+	if ((sc->sc_flags & ET_FLAG_PCIE) == 0)
+		return (0);
+
 	/*
 	 * Configure ACK latency and replay timer according to
 	 * max playload size
 	 */
-	val = pci_read_config(dev, ET_PCIR_DEVICE_CAPS, 4);
-	max_plsz = val & ET_PCIM_DEVICE_CAPS_MAX_PLSZ;
+	val = pci_read_config(sc->dev,
+	    sc->sc_expcap + PCIR_EXPRESS_DEVICE_CAP, 4);
+	max_plsz = val & PCIM_EXP_CAP_MAX_PAYLOAD;
 
 	switch (max_plsz) {
 	case ET_PCIV_DEVICE_CAPS_PLSZ_128:
@@ -612,35 +616,39 @@ et_bus_config(device_t dev)
 		break;
 
 	default:
-		ack_latency = pci_read_config(dev, ET_PCIR_ACK_LATENCY, 2);
-		replay_timer = pci_read_config(dev, ET_PCIR_REPLAY_TIMER, 2);
-		device_printf(dev, "ack latency %u, replay timer %u\n",
+		ack_latency = pci_read_config(sc->dev, ET_PCIR_ACK_LATENCY, 2);
+		replay_timer = pci_read_config(sc->dev,
+		    ET_PCIR_REPLAY_TIMER, 2);
+		device_printf(sc->dev, "ack latency %u, replay timer %u\n",
 			      ack_latency, replay_timer);
 		break;
 	}
 	if (ack_latency != 0) {
-		pci_write_config(dev, ET_PCIR_ACK_LATENCY, ack_latency, 2);
-		pci_write_config(dev, ET_PCIR_REPLAY_TIMER, replay_timer, 2);
+		pci_write_config(sc->dev, ET_PCIR_ACK_LATENCY, ack_latency, 2);
+		pci_write_config(sc->dev, ET_PCIR_REPLAY_TIMER, replay_timer,
+		    2);
 	}
 
 	/*
 	 * Set L0s and L1 latency timer to 2us
 	 */
-	val = pci_read_config(dev, ET_PCIR_L0S_L1_LATENCY, 4);
+	val = pci_read_config(sc->dev, ET_PCIR_L0S_L1_LATENCY, 4);
 	val &= ~(PCIM_LINK_CAP_L0S_EXIT | PCIM_LINK_CAP_L1_EXIT);
 	/* L0s exit latency : 2us */
 	val |= 0x00005000;
 	/* L1 exit latency : 2us */
 	val |= 0x00028000;
-	pci_write_config(dev, ET_PCIR_L0S_L1_LATENCY, val, 4);
+	pci_write_config(sc->dev, ET_PCIR_L0S_L1_LATENCY, val, 4);
 
 	/*
 	 * Set max read request size to 2048 bytes
 	 */
-	val = pci_read_config(dev, ET_PCIR_DEVICE_CTRL, 2);
-	val &= ~ET_PCIM_DEVICE_CTRL_MAX_RRSZ;
+	val = pci_read_config(sc->dev,
+	    sc->sc_expcap + PCIR_EXPRESS_DEVICE_CTL, 2);
+	val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST;
 	val |= ET_PCIV_DEVICE_CTRL_RRSZ_2K;
-	pci_write_config(dev, ET_PCIR_DEVICE_CTRL, val, 2);
+	pci_write_config(sc->dev,
+	    sc->sc_expcap + PCIR_EXPRESS_DEVICE_CTL, val, 2);
 
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:57:16 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AC864106568D;
	Thu, 19 Nov 2009 22:57:16 +0000 (UTC)
	(envelope-from pyunyh@gmail.com)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C20E8FC19;
	Thu, 19 Nov 2009 22:57:15 +0000 (UTC)
Received: by qw-out-2122.google.com with SMTP id 9so623407qwb.7
	for ; Thu, 19 Nov 2009 14:57:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:received:from:date:to:cc
	:subject:message-id:reply-to:references:mime-version:content-type
	:content-disposition:in-reply-to:user-agent;
	bh=cyI5ynS2OEJQ9u5SGRMrxKsQWLeBSSXIX5q81GRwL8k=;
	b=NYIY/k0DFr1gqcQgNOEsu+Lz7UkSmykdZivUFPkxFJZU9wEOyov1o6/Fmmdz13ijxk
	bxJHZpukE7nACMfVcwobHvc+6axZoTTPpdkq0MR2KvZemw0VucZleKoig5jSbKJ8wggc
	eZOkDs+F28H82HrydJIvuwuEda7ZmNWF87azM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:date:to:cc:subject:message-id:reply-to:references:mime-version
	:content-type:content-disposition:in-reply-to:user-agent;
	b=PX9HNGq7nctdOv7wghWwJ0yLp2ldDJL5IkN3EXoRb/E3MuKI2v4nWQw6LuDXNW+jL9
	a2I9MWjyNe/ukaUb8VPdrX+tcEtV+MAaRA+4QQCTIB8VFWyxVZDVPylHwkU5hwvQ/yDd
	thZViWdfSsoKHL8seYJy2YQ+8Fa6E5VV+X1TI=
Received: by 10.224.96.202 with SMTP id i10mr413758qan.311.1258671435353;
	Thu, 19 Nov 2009 14:57:15 -0800 (PST)
Received: from pyunyh@gmail.com ([174.35.1.224])
	by mx.google.com with ESMTPS id 20sm729646qyk.9.2009.11.19.14.57.12
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 19 Nov 2009 14:57:13 -0800 (PST)
Received: by pyunyh@gmail.com (sSMTP sendmail emulation);
	Thu, 19 Nov 2009 14:56:44 -0800
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 14:56:44 -0800
To: Alexey Dokuchaev 
Message-ID: <20091119225644.GU1262@michelle.cdnetworks.com>
References: <200911192145.nAJLj6KD020454@svn.freebsd.org>
	<20091119224151.GA79179@FreeBSD.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20091119224151.GA79179@FreeBSD.org>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Pyun YongHyeon 
Subject: Re: svn commit: r199552 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: pyunyh@gmail.com
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:57:16 -0000

On Thu, Nov 19, 2009 at 10:41:52PM +0000, Alexey Dokuchaev wrote:
> On Thu, Nov 19, 2009 at 09:45:06PM +0000, Pyun YongHyeon wrote:
> > 
> > Modified: head/sys/dev/et/if_et.c
> > ==============================================================================
> > --- head/sys/dev/et/if_et.c	Thu Nov 19 21:39:43 2009	(r199551)
> > +++ head/sys/dev/et/if_et.c	Thu Nov 19 21:45:06 2009	(r199552)
> > @@ -76,6 +76,10 @@ MODULE_DEPEND(et, pci, 1, 1, 1);
> >  MODULE_DEPEND(et, ether, 1, 1, 1);
> >  MODULE_DEPEND(et, miibus, 1, 1, 1);
> >  
> > +/* Tunables. */
> > +static int msi_disable = 0;
> > +TUNABLE_INT("hw.re.msi_disable", &msi_disable);
> 		^^^^^
> Shouldn't it be "hw.et" instead?
> 

Oops, right.

> > +		msic = pci_msi_count(dev);
> > +		if (bootverbose)
> > +			device_printf(dev, "MSI count : %d\n", msic);
> 
> Is extra space before colon really necessary here?
> 

Not needed here.

Thanks for reviewing!

> ./danfe

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:59:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C86011065676;
	Thu, 19 Nov 2009 22:59:35 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B57D78FC0C;
	Thu, 19 Nov 2009 22:59:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJMxZHK022615;
	Thu, 19 Nov 2009 22:59:35 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJMxZBc022613;
	Thu, 19 Nov 2009 22:59:35 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200911192259.nAJMxZBc022613@svn.freebsd.org>
From: Michael Tuexen 
Date: Thu, 19 Nov 2009 22:59:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199562 - stable/7/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:59:35 -0000

Author: tuexen
Date: Thu Nov 19 22:59:35 2009
New Revision: 199562
URL: http://svn.freebsd.org/changeset/base/199562

Log:
  MFC 199477
  Fix a bug where the system panics when a SHUTDOWN is received with an
  illegal TSN.
  This bug was reported by Irene Ruengeler.
  
  Approved by: rrs (mentor)

Modified:
  stable/7/sys/netinet/sctp_input.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netinet/sctp_input.c
==============================================================================
--- stable/7/sys/netinet/sctp_input.c	Thu Nov 19 22:53:41 2009	(r199561)
+++ stable/7/sys/netinet/sctp_input.c	Thu Nov 19 22:59:35 2009	(r199562)
@@ -816,6 +816,9 @@ sctp_handle_shutdown(struct sctp_shutdow
 		return;
 	} else {
 		sctp_update_acked(stcb, cp, net, abort_flag);
+		if (*abort_flag) {
+			return;
+		}
 	}
 	if (asoc->control_pdapi) {
 		/*

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 22:59:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C40631065696;
	Thu, 19 Nov 2009 22:59:52 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B21468FC1C;
	Thu, 19 Nov 2009 22:59:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJMxqQF022659;
	Thu, 19 Nov 2009 22:59:52 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJMxqPR022657;
	Thu, 19 Nov 2009 22:59:52 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192259.nAJMxqPR022657@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 22:59:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199563 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 22:59:52 -0000

Author: yongari
Date: Thu Nov 19 22:59:52 2009
New Revision: 199563
URL: http://svn.freebsd.org/changeset/base/199563

Log:
  Fix copy & paste error and remove extra space before colon.
  
  Pointed out by: danfe

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Thu Nov 19 22:59:35 2009	(r199562)
+++ head/sys/dev/et/if_et.c	Thu Nov 19 22:59:52 2009	(r199563)
@@ -78,7 +78,7 @@ MODULE_DEPEND(et, miibus, 1, 1, 1);
 
 /* Tunables. */
 static int msi_disable = 0;
-TUNABLE_INT("hw.re.msi_disable", &msi_disable);
+TUNABLE_INT("hw.et.msi_disable", &msi_disable);
 
 static int	et_probe(device_t);
 static int	et_attach(device_t);
@@ -276,7 +276,7 @@ et_attach(device_t dev)
 		sc->sc_flags |= ET_FLAG_PCIE;
 		msic = pci_msi_count(dev);
 		if (bootverbose)
-			device_printf(dev, "MSI count : %d\n", msic);
+			device_printf(dev, "MSI count: %d\n", msic);
 	}
 	if (msic > 0 && msi_disable == 0) {
 		msic = 1;

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 23:12:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F2B41065700;
	Thu, 19 Nov 2009 23:12:44 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 637558FC0C;
	Thu, 19 Nov 2009 23:12:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJNCidf023013;
	Thu, 19 Nov 2009 23:12:44 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJNCisS023011;
	Thu, 19 Nov 2009 23:12:44 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192312.nAJNCisS023011@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 23:12:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199564 - head/sys/dev/re
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 23:12:44 -0000

Author: yongari
Date: Thu Nov 19 23:12:44 2009
New Revision: 199564
URL: http://svn.freebsd.org/changeset/base/199564

Log:
  Minimize interface reinitialization by checking IFF_DRV_RUNNING
  flag. This fixes unnecessary interface UP/DOWNs during getting an
  IP address via DHCP.
  
  Tested by:	Warren Block ( wblock<> wonkity dot com )

Modified:
  head/sys/dev/re/if_re.c

Modified: head/sys/dev/re/if_re.c
==============================================================================
--- head/sys/dev/re/if_re.c	Thu Nov 19 22:59:52 2009	(r199563)
+++ head/sys/dev/re/if_re.c	Thu Nov 19 23:12:44 2009	(r199564)
@@ -753,6 +753,7 @@ re_diag(struct rl_softc *sc)
 
 	ifp->if_flags |= IFF_PROMISC;
 	sc->rl_testmode = 1;
+	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	re_init_locked(sc);
 	sc->rl_flags |= RL_FLAG_LINK;
 	if (sc->rl_type == RL_8169)
@@ -2145,8 +2146,10 @@ re_poll_locked(struct ifnet *ifp, enum p
 		 * XXX check behaviour on receiver stalls.
 		 */
 
-		if (status & RL_ISR_SYSTEM_ERR)
+		if (status & RL_ISR_SYSTEM_ERR) {
+			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			re_init_locked(sc);
+		}
 	}
 	return (rx_npkts);
 }
@@ -2222,8 +2225,10 @@ re_int_task(void *arg, int npending)
 	    RL_ISR_TX_ERR|RL_ISR_TX_DESC_UNAVAIL))
 		re_txeof(sc);
 
-	if (status & RL_ISR_SYSTEM_ERR)
+	if (status & RL_ISR_SYSTEM_ERR) {
+		ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 		re_init_locked(sc);
+	}
 
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask);
@@ -2539,6 +2544,9 @@ re_init_locked(struct rl_softc *sc)
 
 	mii = device_get_softc(sc->rl_miibus);
 
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+		return;
+
 	/*
 	 * Cancel pending I/O and free all RX/TX buffers.
 	 */
@@ -2793,7 +2801,8 @@ re_ioctl(struct ifnet *ifp, u_long comma
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
 		RL_LOCK(sc);
-		re_set_rxmode(sc);
+		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+			re_set_rxmode(sc);
 		RL_UNLOCK(sc);
 		break;
 	case SIOCGIFMEDIA:
@@ -2862,8 +2871,10 @@ re_ioctl(struct ifnet *ifp, u_long comma
 			if ((mask & IFCAP_WOL_MAGIC) != 0)
 				ifp->if_capenable ^= IFCAP_WOL_MAGIC;
 		}
-		if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING)
+		if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) {
+			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			re_init(sc);
+		}
 		VLAN_CAPABILITIES(ifp);
 	    }
 		break;
@@ -2899,6 +2910,7 @@ re_watchdog(struct rl_softc *sc)
 	ifp->if_oerrors++;
 
 	re_rxeof(sc, NULL);
+	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	re_init_locked(sc);
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask);

From owner-svn-src-all@FreeBSD.ORG  Thu Nov 19 23:14:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 68866106568B;
	Thu, 19 Nov 2009 23:14:40 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 56E018FC16;
	Thu, 19 Nov 2009 23:14:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJNEePC023084;
	Thu, 19 Nov 2009 23:14:40 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJNEek2023082;
	Thu, 19 Nov 2009 23:14:40 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911192314.nAJNEek2023082@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 19 Nov 2009 23:14:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199565 - head/sys/dev/re
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 19 Nov 2009 23:14:40 -0000

Author: yongari
Date: Thu Nov 19 23:14:40 2009
New Revision: 199565
URL: http://svn.freebsd.org/changeset/base/199565

Log:
  Move interface reinitialization down after disabling WOL in resume
  path.

Modified:
  head/sys/dev/re/if_re.c

Modified: head/sys/dev/re/if_re.c
==============================================================================
--- head/sys/dev/re/if_re.c	Thu Nov 19 23:12:44 2009	(r199564)
+++ head/sys/dev/re/if_re.c	Thu Nov 19 23:14:40 2009	(r199565)
@@ -3023,15 +3023,16 @@ re_resume(device_t dev)
 			    CSR_READ_1(sc, RL_GPIO) | 0x01);
 	}
 
-	/* reinitialize interface if necessary */
-	if (ifp->if_flags & IFF_UP)
-		re_init_locked(sc);
-
 	/*
 	 * Clear WOL matching such that normal Rx filtering
 	 * wouldn't interfere with WOL patterns.
 	 */
 	re_clrwol(sc);
+
+	/* reinitialize interface if necessary */
+	if (ifp->if_flags & IFF_UP)
+		re_init_locked(sc);
+
 	sc->suspended = 0;
 	RL_UNLOCK(sc);
 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 03:14:55 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 68421106566B;
	Fri, 20 Nov 2009 03:14:55 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 56EF28FC08;
	Fri, 20 Nov 2009 03:14:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK3EtT5027932;
	Fri, 20 Nov 2009 03:14:55 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK3EtwR027929;
	Fri, 20 Nov 2009 03:14:55 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <200911200314.nAK3EtwR027929@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Fri, 20 Nov 2009 03:14:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199566 - head/sys/ia64/ia64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 03:14:55 -0000

Author: marcel
Date: Fri Nov 20 03:14:54 2009
New Revision: 199566
URL: http://svn.freebsd.org/changeset/base/199566

Log:
  Add a seatbelt to the Nested TLB Fault handler to give us a chance
  to panic when we have an unexpected TLB fault while interrupt
  collection is disabled. Use a token rather than the actual address
  of the restart point to avoid the need for the movl instruction.
  The token is arbitrary. For the drummers: it's based on a single
  paradiddle.

Modified:
  head/sys/ia64/ia64/exception.S
  head/sys/ia64/ia64/trap.c

Modified: head/sys/ia64/ia64/exception.S
==============================================================================
--- head/sys/ia64/ia64/exception.S	Thu Nov 19 23:14:40 2009	(r199565)
+++ head/sys/ia64/ia64/exception.S	Fri Nov 20 03:14:54 2009	(r199566)
@@ -28,12 +28,21 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_kstack_pages.h"
 #include "opt_xtrace.h"
 
 #include 
 #include 
 
 /*
+ * Nested TLB restart tokens. These are used by the
+ * nested TLB handler for jumping back to the code
+ * where the nested TLB was caused.
+ */
+#define	NTLBRT_SAVE	0x12c12c
+#define	NTLBRT_RESTORE  0x12c12d
+
+/*
  * ar.k7 = kernel memory stack
  * ar.k6 = kernel register stack
  * ar.k5 = EPC gateway page
@@ -140,9 +149,10 @@ ENTRY_NOPROFILE(exception_save, 0)
 	add		r31=8,r30
 	;;
 }
-{	.mlx
+{	.mib
 	mov		r22=cr.iip
-	movl		r26=exception_save_restart
+	addl		r29=NTLBRT_SAVE,r0	// 22-bit restart token.
+	nop		0
 	;;
 }
 
@@ -157,7 +167,7 @@ ENTRY_NOPROFILE(exception_save, 0)
 	 * that are currently alive:
 	 *	r16,r17=arguments
 	 *	r18=pr, r19=length, r20=unat, r21=rsc, r22=iip, r23=TOS
-	 *	r26=restart point
+	 *	r29=restart point
 	 *	r30,r31=trapframe pointers
 	 *	p14,p15=memory stack switch
 	 */
@@ -544,7 +554,7 @@ ENTRY_NOPROFILE(exception_restore, 0)
 	ld8		r21=[r31],24		// rnat
 	mov		ar.pfs=r28
 	;;
-	ld8.fill	r29=[r30],16		// tp
+	ld8.fill	r26=[r30],16		// tp
 	ld8		r22=[r31],16		// rsc
 	;;
 {	.mmi
@@ -555,21 +565,21 @@ ENTRY_NOPROFILE(exception_restore, 0)
 }
 {	.mmi
 	ld8.fill	r1=[r30],16		// gp
-	ld8		r25=[r31],16		// ndirty
+	ld8		r27=[r31],16		// ndirty
 	cmp.le		p14,p15=5,r28
 	;;
 }
 {	.mmb
-	ld8		r26=[r30]		// cfm
+	ld8		r25=[r30]		// cfm
 	ld8		r19=[r31]		// ip
 	nop		0
 	;;
 }
-{	.mib
+{	.mii
 	// Switch register stack
 	alloc		r30=ar.pfs,0,0,0,0	// discard current frame
-	shl		r31=r25,16		// value for ar.rsc
-	nop		0
+	shl		r31=r27,16		// value for ar.rsc
+(p15)	mov		r13=r26
 	;;
 }
 	// The loadrs can fault if the backing store is not currently
@@ -580,7 +590,7 @@ ENTRY_NOPROFILE(exception_restore, 0)
 {	.mmi
 	mov		ar.rsc=r31		// setup for loadrs
 	mov		ar.k7=r16
-(p15)	mov		r13=r29
+	addl		r29=NTLBRT_RESTORE,r0	// 22-bit restart token 
 	;;
 }
 exception_restore_restart:
@@ -611,7 +621,7 @@ exception_restore_restart:
 }
 {	.mmi
 	mov		cr.ipsr=r24
-	mov		cr.ifs=r26
+	mov		cr.ifs=r25
 	mov		pr=r18,0x1ffff
 	;;
 }
@@ -944,7 +954,7 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400)
 }
 {	.mii
 	ld8		r27=[r27]				// dir L0 page
-	extr.u		r29=r30,2*PAGE_SHIFT-5, PAGE_SHIFT-3	// dir L1 index
+	extr.u		r26=r30,2*PAGE_SHIFT-5, PAGE_SHIFT-3	// dir L1 index
 	;;
 	dep		r27=0,r27,61,3
 	;;
@@ -957,16 +967,16 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400)
 	;;
 }
 {	.mmi
-	shladd		r27=r29,3,r27
+	shladd		r27=r26,3,r27
 	;;
-	mov		r29=rr[r30]
+	mov		r26=rr[r30]
 	dep		r27=0,r27,61,3
 	;;
 }
 {	.mii
 	ld8		r27=[r27]				// pte page
 	shl		r28=r28,5
-	dep		r29=0,r29,0,2
+	dep		r26=0,r26,0,2
 	;;
 }
 {	.mmi
@@ -979,28 +989,54 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400)
 {	.mmi
 	ld8		r28=[r27]		// pte
 	;;
-	mov		cr.itir=r29
+	mov		cr.itir=r26
 	or		r28=PTE_DIRTY+PTE_ACCESSED,r28
 	;;
 }
-{	.mlx
+{	.mmi
 	st8		[r27]=r28
-	movl		r29=exception_save_restart
 	;;
+	addl		r26=NTLBRT_SAVE,r0
+	addl		r27=NTLBRT_RESTORE,r0
 }
 {	.mmi
 	itc.d		r28
 	;;
 	ssm		psr.dt
-	cmp.eq		p12,p13=r26,r29
+	cmp.eq		p12,p0=r29,r26
 	;;
 }
-{	.mbb
+{	.mib
 	srlz.d
+	cmp.eq		p13,p0=r29,r27
 (p12)	br.sptk		exception_save_restart
+	;;
+}
+{	.mib
+	nop		0
+	nop		0
 (p13)	br.sptk		exception_restore_restart
 	;;
 }
+{	.mlx
+	mov		r26=ar.bsp
+	movl		r27=kstack
+	;;
+}
+{	.mib
+	mov		r28=sp
+	addl		r27=KSTACK_PAGES*PAGE_SIZE-16,r0
+	nop		0
+	;;
+}
+{	.mmi
+	mov		sp=r27
+	;;
+	mov		r27=ar.bspstore
+	nop		0
+	;;
+}
+	CALL(trap, 5, r30)
 IVT_END(Data_Nested_TLB)
 
 IVT_ENTRY(Instruction_Key_Miss, 0x1800)

Modified: head/sys/ia64/ia64/trap.c
==============================================================================
--- head/sys/ia64/ia64/trap.c	Thu Nov 19 23:14:40 2009	(r199565)
+++ head/sys/ia64/ia64/trap.c	Fri Nov 20 03:14:54 2009	(r199566)
@@ -414,11 +414,9 @@ trap(int vector, struct trapframe *tf)
 
 	case IA64_VEC_NESTED_DTLB:
 		/*
-		 * We never call trap() with this vector. We may want to
-		 * do that in the future in case the nested TLB handler
-		 * could not find the translation it needs. In that case
-		 * we could switch to a special (hardwired) stack and
-		 * come here to produce a nice panic().
+		 * When the nested TLB handler encounters an unexpected
+		 * condition, it'll switch to the backup stack and transfer
+		 * here. All we need to do is panic.
 		 */
 		trap_panic(vector, tf);
 		break;

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 06:39:29 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 59C41106566C;
	Fri, 20 Nov 2009 06:39:29 +0000 (UTC) (envelope-from alc@cs.rice.edu)
Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31])
	by mx1.freebsd.org (Postfix) with ESMTP id 181FF8FC12;
	Fri, 20 Nov 2009 06:39:28 +0000 (UTC)
Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1])
	by mail.cs.rice.edu (Postfix) with ESMTP id 5509B2C2D87;
	Fri, 20 Nov 2009 00:39:28 -0600 (CST)
X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu
Received: from mail.cs.rice.edu ([127.0.0.1])
	by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new,
	port 10024)
	with LMTP id AaL+zKdw-nY5; Fri, 20 Nov 2009 00:39:20 -0600 (CST)
Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net
	(adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.cs.rice.edu (Postfix) with ESMTP id EBE662C2D89;
	Fri, 20 Nov 2009 00:39:19 -0600 (CST)
Message-ID: <4B063997.2010900@cs.rice.edu>
Date: Fri, 20 Nov 2009 00:39:19 -0600
From: Alan Cox 
User-Agent: Thunderbird 2.0.0.23 (X11/20090822)
MIME-Version: 1.0
To: John Baldwin 
References: <200911182340.nAINeJ3W087652@svn.freebsd.org>
	
	<200911191115.11088.jkim@FreeBSD.org>
	<200911191649.37198.jhb@freebsd.org>
In-Reply-To: <200911191649.37198.jhb@freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Robert Watson ,
	Jung-uk Kim 
Subject: Re: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 06:39:29 -0000

John Baldwin wrote:
> On Thursday 19 November 2009 11:15:01 am Jung-uk Kim wrote:
>   
>> On Thursday 19 November 2009 03:26 am, Robert Watson wrote:
>>     
>>> On Wed, 18 Nov 2009, Jung-uk Kim wrote:
>>>       
>>>>  - Change internal function bpf_jit_compile() to return allocated
>>>> size of the generated binary and remove page size limitation for
>>>> userland. - Use contigmalloc(9)/contigfree(9) instead of
>>>> malloc(9)/free(9) to make sure the generated binary aligns
>>>> properly and make it physically contiguous.
>>>>         
>>> Is physical contiguity actually required here -- I would have
>>> thought virtual contiguity and alignment would be sufficient, in
>>> which case the normal trick is to allocate using malloc the size +
>>> min-align + 1 and then fudge the pointer forward until it's
>>> properly aligned.
>>>       
>> I don't believe it is strictly necessary but I assumed it might have 
>> performance benefit for very big BPF programs although I have not 
>> measured it.  Also, contigmalloc(9)/contigfree(9) is too obvious to 
>> ignore for this purpose. :-)
>>     
>
> Why would it have a performance benefit to have the pages be physically 
> contiguous?  contigmalloc() is expensive and should really only be used if 
> you truly need contiguous memory.  If you can get by with malloc(), just use 
> malloc().
>
>   

If anything, there is a performance benefit from using malloc.  Kernel 
memory allocated with malloc on amd64 is likely to be backed by 
superpages.  This is not true of contigmalloc.

Alan



From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 06:54:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83B4C1065670;
	Fri, 20 Nov 2009 06:54:47 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 724108FC24;
	Fri, 20 Nov 2009 06:54:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK6slbe032074;
	Fri, 20 Nov 2009 06:54:47 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK6slMl032072;
	Fri, 20 Nov 2009 06:54:47 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <200911200654.nAK6slMl032072@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Fri, 20 Nov 2009 06:54:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199567 - stable/8/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 06:54:47 -0000

Author: ume
Date: Fri Nov 20 06:54:47 2009
New Revision: 199567
URL: http://svn.freebsd.org/changeset/base/199567

Log:
  MFC r199225:
  - We are not guaranteed that we're not dropping a reference that
    we did not add.  Call LLE_REMREF() only when callout_stop()
    actually canceled a pending callout.
  - callout_reset() may cancel a pending callout.  When
    callout_reset() canceled a pending callout, call LLE_REMREF()
    to drop a reference for the canceled callout.

Modified:
  stable/8/sys/netinet6/nd6.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/arm/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/bsm/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/compat/   (props changed)
  stable/8/sys/contrib/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/crypto/   (props changed)
  stable/8/sys/ddb/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/fs/   (props changed)
  stable/8/sys/gdb/   (props changed)
  stable/8/sys/geom/   (props changed)
  stable/8/sys/gnu/   (props changed)
  stable/8/sys/i386/acpica/   (props changed)
  stable/8/sys/i386/bios/   (props changed)
  stable/8/sys/i386/compile/   (props changed)
  stable/8/sys/i386/cpufreq/   (props changed)
  stable/8/sys/i386/i386/   (props changed)
  stable/8/sys/i386/ibcs2/   (props changed)
  stable/8/sys/i386/include/   (props changed)
  stable/8/sys/i386/isa/   (props changed)
  stable/8/sys/i386/linux/   (props changed)
  stable/8/sys/i386/pci/   (props changed)
  stable/8/sys/i386/svr4/   (props changed)
  stable/8/sys/i386/xbox/   (props changed)
  stable/8/sys/i386/xen/   (props changed)
  stable/8/sys/ia64/   (props changed)
  stable/8/sys/isa/   (props changed)
  stable/8/sys/kern/   (props changed)
  stable/8/sys/kgssapi/   (props changed)
  stable/8/sys/libkern/   (props changed)
  stable/8/sys/mips/   (props changed)
  stable/8/sys/modules/   (props changed)
  stable/8/sys/net80211/   (props changed)
  stable/8/sys/netatalk/   (props changed)
  stable/8/sys/netgraph/   (props changed)
  stable/8/sys/netinet/   (props changed)
  stable/8/sys/netipsec/   (props changed)
  stable/8/sys/netipx/   (props changed)
  stable/8/sys/netnatm/   (props changed)
  stable/8/sys/netncp/   (props changed)
  stable/8/sys/netsmb/   (props changed)
  stable/8/sys/nfs/   (props changed)
  stable/8/sys/nfsclient/   (props changed)
  stable/8/sys/nfsserver/   (props changed)
  stable/8/sys/nlm/   (props changed)
  stable/8/sys/opencrypto/   (props changed)
  stable/8/sys/pc98/   (props changed)
  stable/8/sys/pci/   (props changed)
  stable/8/sys/powerpc/   (props changed)
  stable/8/sys/rpc/   (props changed)
  stable/8/sys/security/   (props changed)
  stable/8/sys/sparc64/   (props changed)
  stable/8/sys/sun4v/   (props changed)
  stable/8/sys/sys/   (props changed)
  stable/8/sys/tools/   (props changed)
  stable/8/sys/ufs/   (props changed)
  stable/8/sys/vm/   (props changed)
  stable/8/sys/xdr/   (props changed)
  stable/8/sys/xen/   (props changed)

Modified: stable/8/sys/netinet6/nd6.c
==============================================================================
--- stable/8/sys/netinet6/nd6.c	Fri Nov 20 03:14:54 2009	(r199566)
+++ stable/8/sys/netinet6/nd6.c	Fri Nov 20 06:54:47 2009	(r199567)
@@ -434,31 +434,27 @@ skip1:
 void
 nd6_llinfo_settimer_locked(struct llentry *ln, long tick)
 {
+	int canceled;
+
 	if (tick < 0) {
 		ln->la_expire = 0;
 		ln->ln_ntick = 0;
-		callout_stop(&ln->ln_timer_ch);
-		/*
-		 * XXX - do we know that there is
-		 * callout installed? i.e. are we 
-		 * guaranteed that we're not dropping
-		 * a reference that we did not add?
-		 * KMM 
-		 */
-		LLE_REMREF(ln);
+		canceled = callout_stop(&ln->ln_timer_ch);
 	} else {
 		ln->la_expire = time_second + tick / hz;
 		LLE_ADDREF(ln);
 		if (tick > INT_MAX) {
 			ln->ln_ntick = tick - INT_MAX;
-			callout_reset(&ln->ln_timer_ch, INT_MAX,
+			canceled = callout_reset(&ln->ln_timer_ch, INT_MAX,
 			    nd6_llinfo_timer, ln);
 		} else {
 			ln->ln_ntick = 0;
-			callout_reset(&ln->ln_timer_ch, tick,
+			canceled = callout_reset(&ln->ln_timer_ch, tick,
 			    nd6_llinfo_timer, ln);
 		}
 	}
+	if (canceled)
+		LLE_REMREF(ln);
 }
 
 void
@@ -1047,6 +1043,9 @@ nd6_free(struct llentry *ln, int gc)
 			else
 				nd6_llinfo_settimer(ln, (long)V_nd6_gctimer * hz);
 			splx(s);
+			LLE_WLOCK(ln);
+			LLE_REMREF(ln);
+			LLE_WUNLOCK(ln);
 			return (LIST_NEXT(ln, lle_next));
 		}
 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 06:55:36 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0F030106566C;
	Fri, 20 Nov 2009 06:55:36 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F1CA58FC1B;
	Fri, 20 Nov 2009 06:55:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK6tZdl032150;
	Fri, 20 Nov 2009 06:55:35 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK6tZjE032148;
	Fri, 20 Nov 2009 06:55:35 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911200655.nAK6tZjE032148@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 20 Nov 2009 06:55:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199568 - stable/8/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 06:55:36 -0000

Author: brueffer
Date: Fri Nov 20 06:55:35 2009
New Revision: 199568
URL: http://svn.freebsd.org/changeset/base/199568

Log:
  MFC: r199255, r199257
  
  Improved the manpage description.  The committed wording
  was provided by jhb.
  
  Remove a note about vfork(4) going to be eliminated, it's here to stay.

Modified:
  stable/8/lib/libc/sys/vfork.2
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/sys/vfork.2
==============================================================================
--- stable/8/lib/libc/sys/vfork.2	Fri Nov 20 06:54:47 2009	(r199567)
+++ stable/8/lib/libc/sys/vfork.2	Fri Nov 20 06:55:35 2009	(r199568)
@@ -28,12 +28,12 @@
 .\"     @(#)vfork.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd November 13, 2009
 .Dt VFORK 2
 .Os
 .Sh NAME
 .Nm vfork
-.Nd spawn new process in a virtual memory efficient way
+.Nd create a new process without copying the address space
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -113,14 +113,6 @@ The
 system call appeared in
 .Bx 2.9 .
 .Sh BUGS
-This system call will be eliminated when proper system sharing
-mechanisms are implemented.
-Users should not depend on the memory
-sharing semantics of
-.Fn vfork
-as it will, in that case, be made synonymous to
-.Xr fork 2 .
-.Pp
 To avoid a possible deadlock situation,
 processes that are children in the middle
 of a

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 07:00:41 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 35EEB106566C;
	Fri, 20 Nov 2009 07:00:41 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 244CE8FC1A;
	Fri, 20 Nov 2009 07:00:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK70fR2032316;
	Fri, 20 Nov 2009 07:00:41 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK70f1v032314;
	Fri, 20 Nov 2009 07:00:41 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911200700.nAK70f1v032314@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 20 Nov 2009 07:00:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199569 - stable/7/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 07:00:41 -0000

Author: brueffer
Date: Fri Nov 20 07:00:40 2009
New Revision: 199569
URL: http://svn.freebsd.org/changeset/base/199569

Log:
  MFC: r199255, r199257
  
  Improved the manpage description.  The committed wording
  was provided by jhb.
  
  Remove a note about vfork(4) going to be eliminated, it's here to stay.

Modified:
  stable/7/lib/libc/sys/vfork.2
Directory Properties:
  stable/7/lib/libc/   (props changed)

Modified: stable/7/lib/libc/sys/vfork.2
==============================================================================
--- stable/7/lib/libc/sys/vfork.2	Fri Nov 20 06:55:35 2009	(r199568)
+++ stable/7/lib/libc/sys/vfork.2	Fri Nov 20 07:00:40 2009	(r199569)
@@ -28,12 +28,12 @@
 .\"     @(#)vfork.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd November 13, 2009
 .Dt VFORK 2
 .Os
 .Sh NAME
 .Nm vfork
-.Nd spawn new process in a virtual memory efficient way
+.Nd create a new process without copying the address space
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -113,14 +113,6 @@ The
 system call appeared in
 .Bx 2.9 .
 .Sh BUGS
-This system call will be eliminated when proper system sharing
-mechanisms are implemented.
-Users should not depend on the memory
-sharing semantics of
-.Fn vfork
-as it will, in that case, be made synonymous to
-.Xr fork 2 .
-.Pp
 To avoid a possible deadlock situation,
 processes that are children in the middle
 of a

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 07:05:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C75DB106566B;
	Fri, 20 Nov 2009 07:05:38 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B5D698FC1B;
	Fri, 20 Nov 2009 07:05:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK75cS3032474;
	Fri, 20 Nov 2009 07:05:38 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK75cPM032472;
	Fri, 20 Nov 2009 07:05:38 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911200705.nAK75cPM032472@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 20 Nov 2009 07:05:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199570 - stable/6/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 07:05:38 -0000

Author: brueffer
Date: Fri Nov 20 07:05:38 2009
New Revision: 199570
URL: http://svn.freebsd.org/changeset/base/199570

Log:
  MFC: r199255, r199257
  
  Improved the manpage description.  The committed wording
  was provided by jhb.
  
  Remove a note about vfork(4) going to be eliminated, it's here to stay.

Modified:
  stable/6/lib/libc/sys/vfork.2
Directory Properties:
  stable/6/lib/libc/   (props changed)

Modified: stable/6/lib/libc/sys/vfork.2
==============================================================================
--- stable/6/lib/libc/sys/vfork.2	Fri Nov 20 07:00:40 2009	(r199569)
+++ stable/6/lib/libc/sys/vfork.2	Fri Nov 20 07:05:38 2009	(r199570)
@@ -32,12 +32,12 @@
 .\"     @(#)vfork.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd November 13, 2009
 .Dt VFORK 2
 .Os
 .Sh NAME
 .Nm vfork
-.Nd spawn new process in a virtual memory efficient way
+.Nd create a new process without copying the address space
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -117,14 +117,6 @@ The
 system call appeared in
 .Bx 2.9 .
 .Sh BUGS
-This system call will be eliminated when proper system sharing
-mechanisms are implemented.
-Users should not depend on the memory
-sharing semantics of
-.Fn vfork
-as it will, in that case, be made synonymous to
-.Xr fork 2 .
-.Pp
 To avoid a possible deadlock situation,
 processes that are children in the middle
 of a

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 07:19:11 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 203EC1065694;
	Fri, 20 Nov 2009 07:19:11 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D3E38FC08;
	Fri, 20 Nov 2009 07:19:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK7JAoC032806;
	Fri, 20 Nov 2009 07:19:10 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK7JALk032805;
	Fri, 20 Nov 2009 07:19:10 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911200719.nAK7JALk032805@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 20 Nov 2009 07:19:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199571 - stable/8/share/man/man3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 07:19:11 -0000

Author: brueffer
Date: Fri Nov 20 07:19:09 2009
New Revision: 199571
URL: http://svn.freebsd.org/changeset/base/199571

Log:
  MFC: r199349
  
  Fix typo.

Modified:
  stable/8/share/man/man3/queue.3
Directory Properties:
  stable/8/share/man/man3/   (props changed)

Modified: stable/8/share/man/man3/queue.3
==============================================================================
--- stable/8/share/man/man3/queue.3	Fri Nov 20 07:05:38 2009	(r199570)
+++ stable/8/share/man/man3/queue.3	Fri Nov 20 07:19:09 2009	(r199571)
@@ -233,7 +233,7 @@ O(1) removal of any entry in the list.
 However:
 .Bl -enum -compact -offset indent
 .It
-Each elements requires two pointers rather than one.
+Each element requires two pointers rather than one.
 .It
 Code size and execution time of operations (except for removal) is about
 twice that of the singly-linked data-structures.

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 07:19:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E159810656A3;
	Fri, 20 Nov 2009 07:19:46 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D031E8FC24;
	Fri, 20 Nov 2009 07:19:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK7Jk4j032862;
	Fri, 20 Nov 2009 07:19:46 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK7JkpQ032860;
	Fri, 20 Nov 2009 07:19:46 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911200719.nAK7JkpQ032860@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 20 Nov 2009 07:19:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199572 - stable/7/share/man/man3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 07:19:47 -0000

Author: brueffer
Date: Fri Nov 20 07:19:46 2009
New Revision: 199572
URL: http://svn.freebsd.org/changeset/base/199572

Log:
  MFC: r199349
  
  Fix typo.

Modified:
  stable/7/share/man/man3/queue.3
Directory Properties:
  stable/7/share/man/man3/   (props changed)

Modified: stable/7/share/man/man3/queue.3
==============================================================================
--- stable/7/share/man/man3/queue.3	Fri Nov 20 07:19:09 2009	(r199571)
+++ stable/7/share/man/man3/queue.3	Fri Nov 20 07:19:46 2009	(r199572)
@@ -229,7 +229,7 @@ O(1) removal of any entry in the list.
 However:
 .Bl -enum -compact -offset indent
 .It
-Each elements requires two pointers rather than one.
+Each element requires two pointers rather than one.
 .It
 Code size and execution time of operations (except for removal) is about
 twice that of the singly-linked data-structures.

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 07:23:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 69A561065670;
	Fri, 20 Nov 2009 07:23:49 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 582CD8FC12;
	Fri, 20 Nov 2009 07:23:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK7Nn2j033019;
	Fri, 20 Nov 2009 07:23:49 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK7NnwQ033017;
	Fri, 20 Nov 2009 07:23:49 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911200723.nAK7NnwQ033017@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 20 Nov 2009 07:23:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199573 - stable/6/share/man/man3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 07:23:49 -0000

Author: brueffer
Date: Fri Nov 20 07:23:49 2009
New Revision: 199573
URL: http://svn.freebsd.org/changeset/base/199573

Log:
  MFC: r199349
  
  Fix typo.

Modified:
  stable/6/share/man/man3/queue.3
Directory Properties:
  stable/6/share/man/man3/   (props changed)

Modified: stable/6/share/man/man3/queue.3
==============================================================================
--- stable/6/share/man/man3/queue.3	Fri Nov 20 07:19:46 2009	(r199572)
+++ stable/6/share/man/man3/queue.3	Fri Nov 20 07:23:49 2009	(r199573)
@@ -223,7 +223,7 @@ O(1) removal of any entry in the list.
 However:
 .Bl -enum -compact -offset indent
 .It
-Each elements requires two pointers rather than one.
+Each element requires two pointers rather than one.
 .It
 Code size and execution time of operations (except for removal) is about
 twice that of the singly-linked data-structures.

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 07:40:02 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EDE91106568F;
	Fri, 20 Nov 2009 07:40:02 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DD88E8FC0C;
	Fri, 20 Nov 2009 07:40:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK7e2j8033336;
	Fri, 20 Nov 2009 07:40:02 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK7e2kK033334;
	Fri, 20 Nov 2009 07:40:02 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <200911200740.nAK7e2kK033334@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Fri, 20 Nov 2009 07:40:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199574 - head/sys/ia64/ia64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 07:40:03 -0000

Author: marcel
Date: Fri Nov 20 07:40:02 2009
New Revision: 199574
URL: http://svn.freebsd.org/changeset/base/199574

Log:
  No need to include opt_kstack_pages.h, because KSTACK_PAGES is
  already defined through genassym.c

Modified:
  head/sys/ia64/ia64/exception.S

Modified: head/sys/ia64/ia64/exception.S
==============================================================================
--- head/sys/ia64/ia64/exception.S	Fri Nov 20 07:23:49 2009	(r199573)
+++ head/sys/ia64/ia64/exception.S	Fri Nov 20 07:40:02 2009	(r199574)
@@ -28,7 +28,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_kstack_pages.h"
 #include "opt_xtrace.h"
 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 08:57:26 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94138106566B;
	Fri, 20 Nov 2009 08:57:26 +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 821A58FC1C;
	Fri, 20 Nov 2009 08:57:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK8vQGc035053;
	Fri, 20 Nov 2009 08:57:26 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK8vQxX035052;
	Fri, 20 Nov 2009 08:57:26 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200911200857.nAK8vQxX035052@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 20 Nov 2009 08:57:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199575 - head/lib/libusb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 08:57:26 -0000

Author: thompsa
Date: Fri Nov 20 08:57:25 2009
New Revision: 199575
URL: http://svn.freebsd.org/changeset/base/199575

Log:
  Sync to P4
   - fix a transfer cancelling bug/segfault [1]
   - correct a return code in the transfer cancel function.
   - add new API function, libusb20_tr_bulk_intr_sync().
  
  Submitted by:	HPS
  Reported by:	Robert Jenssen [1]

Modified:
  head/lib/libusb/libusb10.c
  head/lib/libusb/libusb10.h
  head/lib/libusb/libusb20.3
  head/lib/libusb/libusb20.c
  head/lib/libusb/libusb20.h

Modified: head/lib/libusb/libusb10.c
==============================================================================
--- head/lib/libusb/libusb10.c	Fri Nov 20 07:40:02 2009	(r199574)
+++ head/lib/libusb/libusb10.c	Fri Nov 20 08:57:25 2009	(r199575)
@@ -833,8 +833,12 @@ libusb10_complete_transfer(struct libusb
 	if (pxfer != NULL)
 		libusb20_tr_set_priv_sc1(pxfer, NULL);
 
+	/* set transfer status */
 	uxfer->status = status;
 
+	/* update super transfer state */
+	sxfer->state = LIBUSB_SUPER_XFER_ST_NONE;
+
 	dev = libusb_get_device(uxfer->dev_handle);
 
 	TAILQ_INSERT_TAIL(&dev->ctx->tr_done, sxfer, entry);
@@ -1111,6 +1115,8 @@ libusb10_submit_transfer_sub(struct libu
 		return;
 	case 2:
 		sxfer = libusb20_tr_get_priv_sc1(pxfer1);
+		if (sxfer == NULL)
+			return;		/* cancelling */
 		if (sxfer->rem_len)
 			return;		/* cannot queue another one */
 		/* swap transfers */
@@ -1118,6 +1124,8 @@ libusb10_submit_transfer_sub(struct libu
 		break;
 	case 1:
 		sxfer = libusb20_tr_get_priv_sc1(pxfer0);
+		if (sxfer == NULL)
+			return;		/* cancelling */
 		if (sxfer->rem_len)
 			return;		/* cannot queue another one */
 		/* swap transfers */
@@ -1229,12 +1237,18 @@ libusb_submit_transfer(struct libusb_tra
 	if (pxfer0 == NULL || pxfer1 == NULL) {
 		err = LIBUSB_ERROR_OTHER;
 	} else if ((sxfer->entry.tqe_prev != NULL) ||
-		    (libusb20_tr_get_priv_sc1(pxfer0) == sxfer) ||
+	    (libusb20_tr_get_priv_sc1(pxfer0) == sxfer) ||
 	    (libusb20_tr_get_priv_sc1(pxfer1) == sxfer)) {
 		err = LIBUSB_ERROR_BUSY;
 	} else {
+
+		/* set pending state */
+		sxfer->state = LIBUSB_SUPER_XFER_ST_PEND;
+
+		/* insert transfer into transfer head list */
 		TAILQ_INSERT_TAIL(&dev->tr_head, sxfer, entry);
 
+		/* start work transfers */
 		libusb10_submit_transfer_sub(
 		    uxfer->dev_handle, endpoint);
 
@@ -1258,12 +1272,14 @@ libusb_cancel_transfer(struct libusb_tra
 	struct libusb_super_transfer *sxfer;
 	struct libusb_device *dev;
 	uint32_t endpoint;
+	int retval;
 
 	if (uxfer == NULL)
 		return (LIBUSB_ERROR_INVALID_PARAM);
 
+	/* check if not initialised */
 	if (uxfer->dev_handle == NULL)
-		return (LIBUSB_ERROR_INVALID_PARAM);
+		return (LIBUSB_ERROR_NOT_FOUND);
 
 	endpoint = uxfer->endpoint;
 
@@ -1277,39 +1293,50 @@ libusb_cancel_transfer(struct libusb_tra
 	sxfer = (struct libusb_super_transfer *)(
 	    (uint8_t *)uxfer - sizeof(*sxfer));
 
+	retval = 0;
+
 	CTX_LOCK(dev->ctx);
 
 	pxfer0 = libusb10_get_transfer(uxfer->dev_handle, endpoint, 0);
 	pxfer1 = libusb10_get_transfer(uxfer->dev_handle, endpoint, 1);
 
-	if (sxfer->entry.tqe_prev != NULL) {
+	if (sxfer->state != LIBUSB_SUPER_XFER_ST_PEND) {
+		/* only update the transfer status */
+		uxfer->status = LIBUSB_TRANSFER_CANCELLED;
+		retval = LIBUSB_ERROR_NOT_FOUND;
+	} else if (sxfer->entry.tqe_prev != NULL) {
 		/* we are lucky - transfer is on a queue */
 		TAILQ_REMOVE(&dev->tr_head, sxfer, entry);
 		sxfer->entry.tqe_prev = NULL;
-		libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_CANCELLED);
+		libusb10_complete_transfer(NULL,
+		    sxfer, LIBUSB_TRANSFER_CANCELLED);
 	} else if (pxfer0 == NULL || pxfer1 == NULL) {
 		/* not started */
+		retval = LIBUSB_ERROR_NOT_FOUND;
 	} else if (libusb20_tr_get_priv_sc1(pxfer0) == sxfer) {
-		libusb10_complete_transfer(pxfer0, sxfer, LIBUSB_TRANSFER_CANCELLED);
+		libusb10_complete_transfer(pxfer0,
+		    sxfer, LIBUSB_TRANSFER_CANCELLED);
 		libusb20_tr_stop(pxfer0);
 		/* make sure the queue doesn't stall */
 		libusb10_submit_transfer_sub(
 		    uxfer->dev_handle, endpoint);
 	} else if (libusb20_tr_get_priv_sc1(pxfer1) == sxfer) {
-		libusb10_complete_transfer(pxfer1, sxfer, LIBUSB_TRANSFER_CANCELLED);
+		libusb10_complete_transfer(pxfer1,
+		    sxfer, LIBUSB_TRANSFER_CANCELLED);
 		libusb20_tr_stop(pxfer1);
 		/* make sure the queue doesn't stall */
 		libusb10_submit_transfer_sub(
 		    uxfer->dev_handle, endpoint);
 	} else {
 		/* not started */
+		retval = LIBUSB_ERROR_NOT_FOUND;
 	}
 
 	CTX_UNLOCK(dev->ctx);
 
 	DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_cancel_transfer leave");
 
-	return (0);
+	return (retval);
 }
 
 UNEXPORTED void

Modified: head/lib/libusb/libusb10.h
==============================================================================
--- head/lib/libusb/libusb10.h	Fri Nov 20 07:40:02 2009	(r199574)
+++ head/lib/libusb/libusb10.h	Fri Nov 20 08:57:25 2009	(r199575)
@@ -65,7 +65,9 @@ struct libusb_super_transfer {
 	uint8_t *curr_data;
 	uint32_t rem_len;
 	uint32_t last_len;
-	uint8_t	flags;
+	uint8_t	state;
+#define	LIBUSB_SUPER_XFER_ST_NONE 0
+#define	LIBUSB_SUPER_XFER_ST_PEND 1
 };
 
 struct libusb_context {

Modified: head/lib/libusb/libusb20.3
==============================================================================
--- head/lib/libusb/libusb20.3	Fri Nov 20 07:40:02 2009	(r199574)
+++ head/lib/libusb/libusb20.3	Fri Nov 20 08:57:25 2009	(r199575)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 22, 2009
+.Dd November 18, 2009
 .Dt LIBUSB20 3
 .Os
 .Sh NAME
@@ -98,6 +98,8 @@ USB access library (libusb -lusb)
 .Fn libusb20_tr_setup_intr "struct libusb20_transfer *xfer" "void *pbuf" "uint32_t length" "uint32_t timeout"
 .Ft void
 .Fn libusb20_tr_setup_isoc "struct libusb20_transfer *xfer" "void *pbuf" "uint32_t length" "uint61_t fr_index"
+.Ft uint8_t
+.Fn libusb20_tr_bulk_intr_sync "struct libusb20_transfer *xfer" "void *pbuf" "uint32_t length" "uint32_t *pactlen" "uint32_t timeout"
 .Ft void
 .Fn libusb20_tr_start "struct libusb20_transfer *xfer"
 .Ft void
@@ -451,6 +453,29 @@ is a helper function for setting up a mu
 .
 .Pp
 .
+.Fn libusb20_tr_bulk_intr_sync
+will perform a synchronous BULK or INTERRUPT transfer having length given by the
+.Fa length
+argument and buffer pointer given by the
+.Fa pbuf
+argument on the USB transfer given by the
+.Fa xfer
+argument.
+.
+If the
+.Fa pactlen
+argument is non-NULL the actual transfer length will be stored at the given pointer destination.
+.
+If the
+.Fa timeout
+argument is non-zero the transfer will timeout after the given value in milliseconds.
+.
+This function does not change the transfer flags, like short packet not ok.
+.
+This function returns zero on success else a LIBUSB20_TRANSFER_XXX value is returned.
+.
+.Pp
+.
 .Fn libusb20_tr_start
 will get the USB transfer started, if not already
 started.

Modified: head/lib/libusb/libusb20.c
==============================================================================
--- head/lib/libusb/libusb20.c	Fri Nov 20 07:40:02 2009	(r199574)
+++ head/lib/libusb/libusb20.c	Fri Nov 20 08:57:25 2009	(r199575)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
+ * Copyright (c) 2008-2009 Hans Petter Selasky. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -263,6 +263,10 @@ libusb20_tr_get_priv_sc1(struct libusb20
 void
 libusb20_tr_stop(struct libusb20_transfer *xfer)
 {
+	if (!xfer->is_opened) {
+		/* transfer is not opened */
+		return;
+	}
 	if (!xfer->is_pending) {
 		/* transfer not pending */
 		return;
@@ -280,6 +284,10 @@ libusb20_tr_stop(struct libusb20_transfe
 void
 libusb20_tr_drain(struct libusb20_transfer *xfer)
 {
+	if (!xfer->is_opened) {
+		/* transfer is not opened */
+		return;
+	}
 	/* make sure that we are cancelling */
 	libusb20_tr_stop(xfer);
 
@@ -415,9 +423,79 @@ libusb20_tr_setup_isoc(struct libusb20_t
 	return;
 }
 
+uint8_t
+libusb20_tr_bulk_intr_sync(struct libusb20_transfer *xfer,
+    void *pbuf, uint32_t length, uint32_t *pactlen,
+    uint32_t timeout)
+{
+	struct libusb20_device *pdev = xfer->pdev;
+	uint32_t transfer_max;
+	uint32_t transfer_act;
+	uint8_t retval;
+
+	/* set some sensible default value */
+	if (pactlen != NULL)
+		*pactlen = 0;
+
+	/* check for error condition */
+	if (libusb20_tr_pending(xfer))
+		return (LIBUSB20_ERROR_OTHER);
+
+	do {
+		/* compute maximum transfer length */
+		transfer_max = 
+		    libusb20_tr_get_max_total_length(xfer);
+
+		if (transfer_max > length)
+			transfer_max = length;
+
+		/* setup bulk or interrupt transfer */
+		libusb20_tr_setup_bulk(xfer, pbuf, 
+		    transfer_max, timeout);
+
+		/* start the transfer */
+		libusb20_tr_start(xfer);
+
+		/* wait for transfer completion */
+		while (libusb20_dev_process(pdev) == 0) {
+
+			if (libusb20_tr_pending(xfer) == 0)
+				break;
+
+			libusb20_dev_wait_process(pdev, -1);
+		}
+
+		transfer_act = libusb20_tr_get_actual_length(xfer);
+
+		/* update actual length, if any */
+		if (pactlen != NULL)
+			pactlen[0] += transfer_act;
+
+		/* check transfer status */
+		retval = libusb20_tr_get_status(xfer);
+		if (retval)
+			break;
+
+		/* check for short transfer */
+		if (transfer_act != transfer_max)
+			break;
+
+		/* update buffer pointer and length */
+		pbuf = ((uint8_t *)pbuf) + transfer_max;
+		length = length - transfer_max;
+
+	} while (length != 0);
+
+	return (retval);
+}
+
 void
 libusb20_tr_submit(struct libusb20_transfer *xfer)
 {
+	if (!xfer->is_opened) {
+		/* transfer is not opened */
+		return;
+	}
 	if (xfer->is_pending) {
 		/* should not happen */
 		return;
@@ -433,6 +511,10 @@ libusb20_tr_submit(struct libusb20_trans
 void
 libusb20_tr_start(struct libusb20_transfer *xfer)
 {
+	if (!xfer->is_opened) {
+		/* transfer is not opened */
+		return;
+	}
 	if (xfer->is_pending) {
 		if (xfer->is_cancel) {
 			/* cancelling - restart */
@@ -461,7 +543,14 @@ libusb20_dev_close(struct libusb20_devic
 	for (x = 0; x != pdev->nTransfer; x++) {
 		xfer = pdev->pTransfer + x;
 
+		if (!xfer->is_opened) {
+			/* transfer is not opened */
+			continue;
+		}
+
 		libusb20_tr_drain(xfer);
+
+		libusb20_tr_close(xfer);
 	}
 
 	if (pdev->pTransfer != NULL) {

Modified: head/lib/libusb/libusb20.h
==============================================================================
--- head/lib/libusb/libusb20.h	Fri Nov 20 07:40:02 2009	(r199574)
+++ head/lib/libusb/libusb20.h	Fri Nov 20 08:57:25 2009	(r199575)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
+ * Copyright (c) 2008-2009 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 2007-2008 Daniel Drake.  All rights reserved.
  * Copyright (c) 2001 Johannes Erdfelt.  All rights reserved.
  *
@@ -226,6 +226,7 @@ void	libusb20_tr_setup_bulk(struct libus
 void	libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pbuf, uint32_t timeout);
 void	libusb20_tr_setup_intr(struct libusb20_transfer *xfer, void *pbuf, uint32_t length, uint32_t timeout);
 void	libusb20_tr_setup_isoc(struct libusb20_transfer *xfer, void *pbuf, uint32_t length, uint16_t fr_index);
+uint8_t	libusb20_tr_bulk_intr_sync(struct libusb20_transfer *xfer, void *pbuf, uint32_t length, uint32_t *pactlen, uint32_t timeout);
 void	libusb20_tr_start(struct libusb20_transfer *xfer);
 void	libusb20_tr_stop(struct libusb20_transfer *xfer);
 void	libusb20_tr_submit(struct libusb20_transfer *xfer);

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 09:00:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6C91C106566B;
	Fri, 20 Nov 2009 09:00:39 +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 4219A8FC1D;
	Fri, 20 Nov 2009 09:00:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAK90cCK035171;
	Fri, 20 Nov 2009 09:00:38 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAK90cEN035169;
	Fri, 20 Nov 2009 09:00:38 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200911200900.nAK90cEN035169@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 20 Nov 2009 09:00:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199576 - head/sys/dev/sound/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 09:00:39 -0000

Author: thompsa
Date: Fri Nov 20 09:00:38 2009
New Revision: 199576
URL: http://svn.freebsd.org/changeset/base/199576

Log:
  remove volume alignment (was previously not correctly implemented)
  
  Submitted by:	HPS
  Reported by:	Jaakko Heinonen

Modified:
  head/sys/dev/sound/usb/uaudio.c

Modified: head/sys/dev/sound/usb/uaudio.c
==============================================================================
--- head/sys/dev/sound/usb/uaudio.c	Fri Nov 20 08:57:25 2009	(r199575)
+++ head/sys/dev/sound/usb/uaudio.c	Fri Nov 20 09:00:38 2009	(r199576)
@@ -118,7 +118,6 @@ struct uaudio_mixer_node {
 	int32_t	maxval;
 #define	MIX_MAX_CHAN 8
 	int32_t	wValue[MIX_MAX_CHAN];	/* using nchan */
-	uint32_t mod;		/* modulus */
 	uint32_t mul;
 	uint32_t ctl;
 
@@ -1318,6 +1317,11 @@ uaudio_chan_init(struct uaudio_softc *sc
 	ch->pcm_cap.minspeed = ch->sample_rate;
 	ch->pcm_cap.maxspeed = ch->sample_rate;
 
+	/* setup mutex and PCM channel */
+
+	ch->pcm_ch = c;
+	ch->pcm_mtx = c->lock;
+
 	if (ch->p_asf1d->bNrChannels >= 2)
 		ch->pcm_cap.fmtlist[0] =
 		    SND_FORMAT(ch->p_fmt->freebsd_fmt, 2, 0);
@@ -1391,8 +1395,6 @@ uaudio_chan_init(struct uaudio_softc *sc
 	ch->start = ch->buf;
 	ch->end = ch->buf + buf_size;
 	ch->cur = ch->buf;
-	ch->pcm_ch = c;
-	ch->pcm_mtx = c->lock;
 	ch->pcm_buf = b;
 
 	if (ch->pcm_mtx == NULL) {
@@ -1570,9 +1572,7 @@ uaudio_mixer_add_ctl(struct uaudio_softc
 	if (mc->type == MIX_ON_OFF) {
 		mc->minval = 0;
 		mc->maxval = 1;
-		mc->mod = 1;
 	} else if (mc->type == MIX_SELECTOR) {
-		mc->mod = 1;
 	} else {
 
 		/* determine min and max values */
@@ -1600,11 +1600,8 @@ uaudio_mixer_add_ctl(struct uaudio_softc
 
 		/* compute value alignment */
 		res = uaudio_mixer_get(sc->sc_udev, GET_RES, mc);
-		if (res == 0)
-			res = 1;
-		mc->mod = mc->mul / res;
-		if (mc->mod == 0)
-			mc->mod = 1;
+
+		DPRINTF("Resolution = %d\n", (int)res);
 	}
 
 	uaudio_mixer_add_ctl_sub(sc, mc);
@@ -3097,9 +3094,6 @@ uaudio_mixer_bsd2value(struct uaudio_mix
 		/* compute actual volume */
 		val = (val * mc->mul) / 255;
 
-		/* align volume level */
-		val = val - (val % mc->mod);
-
 		/* add lower offset */
 		val = val + mc->minval;
 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 11:58:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4CA91065672;
	Fri, 20 Nov 2009 11:58:04 +0000 (UTC) (envelope-from bms@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B297D8FC15;
	Fri, 20 Nov 2009 11:58:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKBw4Y6042907;
	Fri, 20 Nov 2009 11:58:04 GMT (envelope-from bms@svn.freebsd.org)
Received: (from bms@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKBw4cw042905;
	Fri, 20 Nov 2009 11:58:04 GMT (envelope-from bms@svn.freebsd.org)
Message-Id: <200911201158.nAKBw4cw042905@svn.freebsd.org>
From: Bruce M Simpson 
Date: Fri, 20 Nov 2009 11:58:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199577 - stable/8/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 11:58:04 -0000

Author: bms
Date: Fri Nov 20 11:58:04 2009
New Revision: 199577
URL: http://svn.freebsd.org/changeset/base/199577

Log:
  MFC r199518:
    Adapt the fix for IGMPv2 in r199287 for the IPv6 stack.
    Only multicast routing is affected by the issue.

Modified:
  stable/8/sys/netinet6/raw_ip6.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/arm/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/bsm/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/compat/   (props changed)
  stable/8/sys/contrib/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/crypto/   (props changed)
  stable/8/sys/ddb/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/fs/   (props changed)
  stable/8/sys/gdb/   (props changed)
  stable/8/sys/geom/   (props changed)
  stable/8/sys/gnu/   (props changed)
  stable/8/sys/i386/acpica/   (props changed)
  stable/8/sys/i386/bios/   (props changed)
  stable/8/sys/i386/compile/   (props changed)
  stable/8/sys/i386/cpufreq/   (props changed)
  stable/8/sys/i386/i386/   (props changed)
  stable/8/sys/i386/ibcs2/   (props changed)
  stable/8/sys/i386/include/   (props changed)
  stable/8/sys/i386/isa/   (props changed)
  stable/8/sys/i386/linux/   (props changed)
  stable/8/sys/i386/pci/   (props changed)
  stable/8/sys/i386/svr4/   (props changed)
  stable/8/sys/i386/xbox/   (props changed)
  stable/8/sys/i386/xen/   (props changed)
  stable/8/sys/ia64/   (props changed)
  stable/8/sys/isa/   (props changed)
  stable/8/sys/kern/   (props changed)
  stable/8/sys/kgssapi/   (props changed)
  stable/8/sys/libkern/   (props changed)
  stable/8/sys/mips/   (props changed)
  stable/8/sys/modules/   (props changed)
  stable/8/sys/net80211/   (props changed)
  stable/8/sys/netatalk/   (props changed)
  stable/8/sys/netgraph/   (props changed)
  stable/8/sys/netinet/   (props changed)
  stable/8/sys/netipsec/   (props changed)
  stable/8/sys/netipx/   (props changed)
  stable/8/sys/netnatm/   (props changed)
  stable/8/sys/netncp/   (props changed)
  stable/8/sys/netsmb/   (props changed)
  stable/8/sys/nfs/   (props changed)
  stable/8/sys/nfsclient/   (props changed)
  stable/8/sys/nfsserver/   (props changed)
  stable/8/sys/nlm/   (props changed)
  stable/8/sys/opencrypto/   (props changed)
  stable/8/sys/pc98/   (props changed)
  stable/8/sys/pci/   (props changed)
  stable/8/sys/powerpc/   (props changed)
  stable/8/sys/rpc/   (props changed)
  stable/8/sys/security/   (props changed)
  stable/8/sys/sparc64/   (props changed)
  stable/8/sys/sun4v/   (props changed)
  stable/8/sys/sys/   (props changed)
  stable/8/sys/tools/   (props changed)
  stable/8/sys/ufs/   (props changed)
  stable/8/sys/vm/   (props changed)
  stable/8/sys/xdr/   (props changed)
  stable/8/sys/xen/   (props changed)

Modified: stable/8/sys/netinet6/raw_ip6.c
==============================================================================
--- stable/8/sys/netinet6/raw_ip6.c	Fri Nov 20 09:00:38 2009	(r199576)
+++ stable/8/sys/netinet6/raw_ip6.c	Fri Nov 20 11:58:04 2009	(r199577)
@@ -213,17 +213,39 @@ rip6_input(struct mbuf **mp, int *offp, 
 		 */
 		if (in6p->in6p_moptions &&
 		    IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
-			struct sockaddr_in6 mcaddr;
+			/*
+			 * If the incoming datagram is for MLD, allow it
+			 * through unconditionally to the raw socket.
+			 *
+			 * Use the M_RTALERT_MLD flag to check for MLD
+			 * traffic without having to inspect the mbuf chain
+			 * more deeply, as all MLDv1/v2 host messages MUST
+			 * contain the Router Alert option.
+			 *
+			 * In the case of MLDv1, we may not have explicitly
+			 * joined the group, and may have set IFF_ALLMULTI
+			 * on the interface. im6o_mc_filter() may discard
+			 * control traffic we actually need to see.
+			 *
+			 * Userland multicast routing daemons should continue
+			 * filter the control traffic appropriately.
+			 */
 			int blocked;
 
-			bzero(&mcaddr, sizeof(struct sockaddr_in6));
-			mcaddr.sin6_len = sizeof(struct sockaddr_in6);
-			mcaddr.sin6_family = AF_INET6;
-			mcaddr.sin6_addr = ip6->ip6_dst;
-
-			blocked = im6o_mc_filter(in6p->in6p_moptions, ifp,
-			    (struct sockaddr *)&mcaddr,
-			    (struct sockaddr *)&fromsa);
+			blocked = MCAST_PASS;
+			if ((m->m_flags & M_RTALERT_MLD) == 0) {
+				struct sockaddr_in6 mcaddr;
+
+				bzero(&mcaddr, sizeof(struct sockaddr_in6));
+				mcaddr.sin6_len = sizeof(struct sockaddr_in6);
+				mcaddr.sin6_family = AF_INET6;
+				mcaddr.sin6_addr = ip6->ip6_dst;
+
+				blocked = im6o_mc_filter(in6p->in6p_moptions,
+				    ifp,
+				    (struct sockaddr *)&mcaddr,
+				    (struct sockaddr *)&fromsa);
+			}
 			if (blocked != MCAST_PASS) {
 				IP6STAT_INC(ip6s_notmember);
 				continue;

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 12:30:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD7741065670;
	Fri, 20 Nov 2009 12:30:42 +0000 (UTC) (envelope-from bms@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9759A8FC0A;
	Fri, 20 Nov 2009 12:30:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKCUgQb043656;
	Fri, 20 Nov 2009 12:30:42 GMT (envelope-from bms@svn.freebsd.org)
Received: (from bms@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKCUg40043653;
	Fri, 20 Nov 2009 12:30:42 GMT (envelope-from bms@svn.freebsd.org)
Message-Id: <200911201230.nAKCUg40043653@svn.freebsd.org>
From: Bruce M Simpson 
Date: Fri, 20 Nov 2009 12:30:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199578 - in stable/8/sys: amd64 boot bsm crypto ddb
	gdb geom i386/acpica i386/bios i386/compile i386/cpufreq
	i386/i386 i386/ibcs2 i386/include i386/isa i386/linux
	i386/pci i386/svr4 i3...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 12:30:42 -0000

Author: bms
Date: Fri Nov 20 12:30:40 2009
New Revision: 199578
URL: http://svn.freebsd.org/changeset/base/199578

Log:
  MFC r199522..199528:
    Pullup IPv6 mcast SSM KPI fixes from HEAD, including fix for
    filter deallocation from Stef Walter.

Modified:
  stable/8/sys/netinet/in_mcast.c   (contents, props changed)
  stable/8/sys/netinet6/in6_mcast.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/   (props changed)
  stable/8/sys/amd64/Makefile   (props changed)
  stable/8/sys/amd64/acpica/   (props changed)
  stable/8/sys/amd64/amd64/   (props changed)
  stable/8/sys/amd64/compile/   (props changed)
  stable/8/sys/amd64/conf/   (props changed)
  stable/8/sys/amd64/ia32/   (props changed)
  stable/8/sys/amd64/include/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/amd64/isa/   (props changed)
  stable/8/sys/amd64/linux32/   (props changed)
  stable/8/sys/amd64/pci/   (props changed)
  stable/8/sys/arm/   (props changed)
  stable/8/sys/arm/arm/   (props changed)
  stable/8/sys/arm/at91/   (props changed)
  stable/8/sys/arm/compile/   (props changed)
  stable/8/sys/arm/conf/   (props changed)
  stable/8/sys/arm/include/   (props changed)
  stable/8/sys/arm/mv/   (props changed)
  stable/8/sys/arm/sa11x0/   (props changed)
  stable/8/sys/arm/xscale/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/boot/Makefile   (props changed)
  stable/8/sys/boot/Makefile.inc   (props changed)
  stable/8/sys/boot/README   (props changed)
  stable/8/sys/boot/arm/   (props changed)
  stable/8/sys/boot/common/   (props changed)
  stable/8/sys/boot/efi/   (props changed)
  stable/8/sys/boot/ficl/   (props changed)
  stable/8/sys/boot/forth/   (props changed)
  stable/8/sys/boot/i386/   (props changed)
  stable/8/sys/boot/ia64/   (props changed)
  stable/8/sys/boot/ofw/   (props changed)
  stable/8/sys/boot/pc98/   (props changed)
  stable/8/sys/boot/powerpc/   (props changed)
  stable/8/sys/boot/sparc64/   (props changed)
  stable/8/sys/boot/uboot/   (props changed)
  stable/8/sys/boot/zfs/   (props changed)
  stable/8/sys/bsm/   (props changed)
  stable/8/sys/bsm/audit.h   (props changed)
  stable/8/sys/bsm/audit_domain.h   (props changed)
  stable/8/sys/bsm/audit_errno.h   (props changed)
  stable/8/sys/bsm/audit_fcntl.h   (props changed)
  stable/8/sys/bsm/audit_internal.h   (props changed)
  stable/8/sys/bsm/audit_kevents.h   (props changed)
  stable/8/sys/bsm/audit_record.h   (props changed)
  stable/8/sys/bsm/audit_socket_type.h   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/boot/   (props changed)
  stable/8/sys/cddl/compat/   (props changed)
  stable/8/sys/cddl/contrib/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/cddl/dev/   (props changed)
  stable/8/sys/compat/   (props changed)
  stable/8/sys/compat/freebsd32/   (props changed)
  stable/8/sys/compat/ia32/   (props changed)
  stable/8/sys/compat/linprocfs/   (props changed)
  stable/8/sys/compat/linsysfs/   (props changed)
  stable/8/sys/compat/linux/   (props changed)
  stable/8/sys/compat/ndis/   (props changed)
  stable/8/sys/compat/netbsd/   (props changed)
  stable/8/sys/compat/svr4/   (props changed)
  stable/8/sys/contrib/   (props changed)
  stable/8/sys/contrib/altq/   (props changed)
  stable/8/sys/contrib/dev/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/ia64/   (props changed)
  stable/8/sys/contrib/ipfilter/   (props changed)
  stable/8/sys/contrib/ngatm/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/contrib/rdma/   (props changed)
  stable/8/sys/crypto/   (props changed)
  stable/8/sys/crypto/blowfish/   (props changed)
  stable/8/sys/crypto/camellia/   (props changed)
  stable/8/sys/crypto/des/   (props changed)
  stable/8/sys/crypto/rc4/   (props changed)
  stable/8/sys/crypto/rijndael/   (props changed)
  stable/8/sys/crypto/sha1.c   (props changed)
  stable/8/sys/crypto/sha1.h   (props changed)
  stable/8/sys/crypto/sha2/   (props changed)
  stable/8/sys/crypto/via/   (props changed)
  stable/8/sys/ddb/   (props changed)
  stable/8/sys/ddb/db_access.c   (props changed)
  stable/8/sys/ddb/db_access.h   (props changed)
  stable/8/sys/ddb/db_break.c   (props changed)
  stable/8/sys/ddb/db_break.h   (props changed)
  stable/8/sys/ddb/db_capture.c   (props changed)
  stable/8/sys/ddb/db_command.c   (props changed)
  stable/8/sys/ddb/db_command.h   (props changed)
  stable/8/sys/ddb/db_examine.c   (props changed)
  stable/8/sys/ddb/db_expr.c   (props changed)
  stable/8/sys/ddb/db_input.c   (props changed)
  stable/8/sys/ddb/db_lex.c   (props changed)
  stable/8/sys/ddb/db_lex.h   (props changed)
  stable/8/sys/ddb/db_main.c   (props changed)
  stable/8/sys/ddb/db_output.c   (props changed)
  stable/8/sys/ddb/db_output.h   (props changed)
  stable/8/sys/ddb/db_print.c   (props changed)
  stable/8/sys/ddb/db_ps.c   (props changed)
  stable/8/sys/ddb/db_run.c   (props changed)
  stable/8/sys/ddb/db_script.c   (props changed)
  stable/8/sys/ddb/db_sym.c   (props changed)
  stable/8/sys/ddb/db_sym.h   (props changed)
  stable/8/sys/ddb/db_textdump.c   (props changed)
  stable/8/sys/ddb/db_thread.c   (props changed)
  stable/8/sys/ddb/db_variables.c   (props changed)
  stable/8/sys/ddb/db_variables.h   (props changed)
  stable/8/sys/ddb/db_watch.c   (props changed)
  stable/8/sys/ddb/db_watch.h   (props changed)
  stable/8/sys/ddb/db_write_cmd.c   (props changed)
  stable/8/sys/ddb/ddb.h   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/fs/   (props changed)
  stable/8/sys/fs/cd9660/   (props changed)
  stable/8/sys/fs/coda/   (props changed)
  stable/8/sys/fs/deadfs/   (props changed)
  stable/8/sys/fs/devfs/   (props changed)
  stable/8/sys/fs/fdescfs/   (props changed)
  stable/8/sys/fs/fifofs/   (props changed)
  stable/8/sys/fs/hpfs/   (props changed)
  stable/8/sys/fs/msdosfs/   (props changed)
  stable/8/sys/fs/nfs/   (props changed)
  stable/8/sys/fs/nfsclient/   (props changed)
  stable/8/sys/fs/nfsserver/   (props changed)
  stable/8/sys/fs/ntfs/   (props changed)
  stable/8/sys/fs/nullfs/   (props changed)
  stable/8/sys/fs/nwfs/   (props changed)
  stable/8/sys/fs/portalfs/   (props changed)
  stable/8/sys/fs/procfs/   (props changed)
  stable/8/sys/fs/pseudofs/   (props changed)
  stable/8/sys/fs/smbfs/   (props changed)
  stable/8/sys/fs/tmpfs/   (props changed)
  stable/8/sys/fs/udf/   (props changed)
  stable/8/sys/fs/unionfs/   (props changed)
  stable/8/sys/gdb/   (props changed)
  stable/8/sys/gdb/gdb.h   (props changed)
  stable/8/sys/gdb/gdb_cons.c   (props changed)
  stable/8/sys/gdb/gdb_int.h   (props changed)
  stable/8/sys/gdb/gdb_main.c   (props changed)
  stable/8/sys/gdb/gdb_packet.c   (props changed)
  stable/8/sys/geom/   (props changed)
  stable/8/sys/geom/bde/   (props changed)
  stable/8/sys/geom/cache/   (props changed)
  stable/8/sys/geom/concat/   (props changed)
  stable/8/sys/geom/eli/   (props changed)
  stable/8/sys/geom/gate/   (props changed)
  stable/8/sys/geom/geom.h   (props changed)
  stable/8/sys/geom/geom_aes.c   (props changed)
  stable/8/sys/geom/geom_bsd.c   (props changed)
  stable/8/sys/geom/geom_bsd_enc.c   (props changed)
  stable/8/sys/geom/geom_ccd.c   (props changed)
  stable/8/sys/geom/geom_ctl.c   (props changed)
  stable/8/sys/geom/geom_ctl.h   (props changed)
  stable/8/sys/geom/geom_dev.c   (props changed)
  stable/8/sys/geom/geom_disk.c   (props changed)
  stable/8/sys/geom/geom_disk.h   (props changed)
  stable/8/sys/geom/geom_dump.c   (props changed)
  stable/8/sys/geom/geom_event.c   (props changed)
  stable/8/sys/geom/geom_fox.c   (props changed)
  stable/8/sys/geom/geom_int.h   (props changed)
  stable/8/sys/geom/geom_io.c   (props changed)
  stable/8/sys/geom/geom_kern.c   (props changed)
  stable/8/sys/geom/geom_mbr.c   (props changed)
  stable/8/sys/geom/geom_mbr_enc.c   (props changed)
  stable/8/sys/geom/geom_pc98.c   (props changed)
  stable/8/sys/geom/geom_pc98_enc.c   (props changed)
  stable/8/sys/geom/geom_redboot.c   (props changed)
  stable/8/sys/geom/geom_slice.c   (props changed)
  stable/8/sys/geom/geom_slice.h   (props changed)
  stable/8/sys/geom/geom_subr.c   (props changed)
  stable/8/sys/geom/geom_sunlabel.c   (props changed)
  stable/8/sys/geom/geom_sunlabel_enc.c   (props changed)
  stable/8/sys/geom/geom_vfs.c   (props changed)
  stable/8/sys/geom/geom_vfs.h   (props changed)
  stable/8/sys/geom/geom_vol_ffs.c   (props changed)
  stable/8/sys/geom/journal/   (props changed)
  stable/8/sys/geom/label/   (props changed)
  stable/8/sys/geom/linux_lvm/   (props changed)
  stable/8/sys/geom/mirror/   (props changed)
  stable/8/sys/geom/multipath/   (props changed)
  stable/8/sys/geom/nop/   (props changed)
  stable/8/sys/geom/notes   (props changed)
  stable/8/sys/geom/part/   (props changed)
  stable/8/sys/geom/raid3/   (props changed)
  stable/8/sys/geom/shsec/   (props changed)
  stable/8/sys/geom/stripe/   (props changed)
  stable/8/sys/geom/uzip/   (props changed)
  stable/8/sys/geom/vinum/   (props changed)
  stable/8/sys/geom/virstor/   (props changed)
  stable/8/sys/geom/zero/   (props changed)
  stable/8/sys/gnu/   (props changed)
  stable/8/sys/gnu/dev/   (props changed)
  stable/8/sys/gnu/fs/   (props changed)
  stable/8/sys/i386/acpica/   (props changed)
  stable/8/sys/i386/acpica/Makefile   (props changed)
  stable/8/sys/i386/acpica/OsdEnvironment.c   (props changed)
  stable/8/sys/i386/acpica/acpi_machdep.c   (props changed)
  stable/8/sys/i386/acpica/acpi_wakecode.S   (props changed)
  stable/8/sys/i386/acpica/acpi_wakeup.c   (props changed)
  stable/8/sys/i386/acpica/genwakecode.sh   (props changed)
  stable/8/sys/i386/acpica/madt.c   (props changed)
  stable/8/sys/i386/bios/   (props changed)
  stable/8/sys/i386/bios/apm.c   (props changed)
  stable/8/sys/i386/bios/apm.h   (props changed)
  stable/8/sys/i386/bios/mca_machdep.c   (props changed)
  stable/8/sys/i386/bios/mca_machdep.h   (props changed)
  stable/8/sys/i386/bios/smapi.c   (props changed)
  stable/8/sys/i386/bios/smapi_bios.S   (props changed)
  stable/8/sys/i386/bios/smbios.c   (props changed)
  stable/8/sys/i386/bios/vpd.c   (props changed)
  stable/8/sys/i386/compile/   (props changed)
  stable/8/sys/i386/compile/.cvsignore   (props changed)
  stable/8/sys/i386/cpufreq/   (props changed)
  stable/8/sys/i386/cpufreq/est.c   (props changed)
  stable/8/sys/i386/cpufreq/hwpstate.c   (props changed)
  stable/8/sys/i386/cpufreq/p4tcc.c   (props changed)
  stable/8/sys/i386/cpufreq/powernow.c   (props changed)
  stable/8/sys/i386/cpufreq/smist.c   (props changed)
  stable/8/sys/i386/i386/   (props changed)
  stable/8/sys/i386/i386/apic_vector.s   (props changed)
  stable/8/sys/i386/i386/atomic.c   (props changed)
  stable/8/sys/i386/i386/autoconf.c   (props changed)
  stable/8/sys/i386/i386/bios.c   (props changed)
  stable/8/sys/i386/i386/bioscall.s   (props changed)
  stable/8/sys/i386/i386/bpf_jit_machdep.c   (props changed)
  stable/8/sys/i386/i386/bpf_jit_machdep.h   (props changed)
  stable/8/sys/i386/i386/busdma_machdep.c   (props changed)
  stable/8/sys/i386/i386/db_disasm.c   (props changed)
  stable/8/sys/i386/i386/db_interface.c   (props changed)
  stable/8/sys/i386/i386/db_trace.c   (props changed)
  stable/8/sys/i386/i386/dump_machdep.c   (props changed)
  stable/8/sys/i386/i386/elan-mmcr.c   (props changed)
  stable/8/sys/i386/i386/elf_machdep.c   (props changed)
  stable/8/sys/i386/i386/exception.s   (props changed)
  stable/8/sys/i386/i386/gdb_machdep.c   (props changed)
  stable/8/sys/i386/i386/genassym.c   (props changed)
  stable/8/sys/i386/i386/geode.c   (props changed)
  stable/8/sys/i386/i386/i686_mem.c   (props changed)
  stable/8/sys/i386/i386/identcpu.c   (props changed)
  stable/8/sys/i386/i386/in_cksum.c   (props changed)
  stable/8/sys/i386/i386/initcpu.c   (props changed)
  stable/8/sys/i386/i386/intr_machdep.c   (props changed)
  stable/8/sys/i386/i386/io.c   (props changed)
  stable/8/sys/i386/i386/io_apic.c   (props changed)
  stable/8/sys/i386/i386/k6_mem.c   (props changed)
  stable/8/sys/i386/i386/legacy.c   (props changed)
  stable/8/sys/i386/i386/local_apic.c   (props changed)
  stable/8/sys/i386/i386/locore.s   (props changed)
  stable/8/sys/i386/i386/longrun.c   (props changed)
  stable/8/sys/i386/i386/machdep.c   (props changed)
  stable/8/sys/i386/i386/mca.c   (props changed)
  stable/8/sys/i386/i386/mem.c   (props changed)
  stable/8/sys/i386/i386/minidump_machdep.c   (props changed)
  stable/8/sys/i386/i386/mp_clock.c   (props changed)
  stable/8/sys/i386/i386/mp_machdep.c   (props changed)
  stable/8/sys/i386/i386/mp_watchdog.c   (props changed)
  stable/8/sys/i386/i386/mpboot.s   (props changed)
  stable/8/sys/i386/i386/mptable.c   (props changed)
  stable/8/sys/i386/i386/mptable_pci.c   (props changed)
  stable/8/sys/i386/i386/msi.c   (props changed)
  stable/8/sys/i386/i386/nexus.c   (props changed)
  stable/8/sys/i386/i386/perfmon.c   (props changed)
  stable/8/sys/i386/i386/pmap.c   (props changed)
  stable/8/sys/i386/i386/ptrace_machdep.c   (props changed)
  stable/8/sys/i386/i386/stack_machdep.c   (props changed)
  stable/8/sys/i386/i386/support.s   (props changed)
  stable/8/sys/i386/i386/swtch.s   (props changed)
  stable/8/sys/i386/i386/symbols.raw   (props changed)
  stable/8/sys/i386/i386/sys_machdep.c   (props changed)
  stable/8/sys/i386/i386/trap.c   (props changed)
  stable/8/sys/i386/i386/tsc.c   (props changed)
  stable/8/sys/i386/i386/uio_machdep.c   (props changed)
  stable/8/sys/i386/i386/vm86.c   (props changed)
  stable/8/sys/i386/i386/vm86bios.s   (props changed)
  stable/8/sys/i386/i386/vm_machdep.c   (props changed)
  stable/8/sys/i386/ibcs2/   (props changed)
  stable/8/sys/i386/ibcs2/Makefile   (props changed)
  stable/8/sys/i386/ibcs2/coff.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_dirent.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_errno.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_errno.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_fcntl.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_fcntl.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ioctl.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ioctl.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ipc.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ipc.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_isc.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_isc_syscall.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_isc_sysent.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_misc.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_mount.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_msg.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_other.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_proto.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_signal.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_signal.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_socksys.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_socksys.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_stat.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_stat.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_statfs.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_stropts.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_syscall.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_sysent.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_sysi86.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_sysvec.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_termios.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_time.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_types.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_unistd.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ustat.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_util.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_util.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_utime.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_utsname.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix_syscall.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix_sysent.c   (props changed)
  stable/8/sys/i386/ibcs2/imgact_coff.c   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.conf   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.isc   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.isc.conf   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.master   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.xenix   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.xenix.conf   (props changed)
  stable/8/sys/i386/include/   (props changed)
  stable/8/sys/i386/include/_bus.h   (props changed)
  stable/8/sys/i386/include/_inttypes.h   (props changed)
  stable/8/sys/i386/include/_limits.h   (props changed)
  stable/8/sys/i386/include/_stdint.h   (props changed)
  stable/8/sys/i386/include/_types.h   (props changed)
  stable/8/sys/i386/include/acpica_machdep.h   (props changed)
  stable/8/sys/i386/include/apicreg.h   (props changed)
  stable/8/sys/i386/include/apicvar.h   (props changed)
  stable/8/sys/i386/include/apm_bios.h   (props changed)
  stable/8/sys/i386/include/apm_segments.h   (props changed)
  stable/8/sys/i386/include/asm.h   (props changed)
  stable/8/sys/i386/include/asmacros.h   (props changed)
  stable/8/sys/i386/include/atomic.h   (props changed)
  stable/8/sys/i386/include/bootinfo.h   (props changed)
  stable/8/sys/i386/include/bus.h   (props changed)
  stable/8/sys/i386/include/bus_dma.h   (props changed)
  stable/8/sys/i386/include/clock.h   (props changed)
  stable/8/sys/i386/include/cpu.h   (props changed)
  stable/8/sys/i386/include/cpufunc.h   (props changed)
  stable/8/sys/i386/include/cputypes.h   (props changed)
  stable/8/sys/i386/include/cserial.h   (props changed)
  stable/8/sys/i386/include/db_machdep.h   (props changed)
  stable/8/sys/i386/include/elan_mmcr.h   (props changed)
  stable/8/sys/i386/include/elf.h   (props changed)
  stable/8/sys/i386/include/endian.h   (props changed)
  stable/8/sys/i386/include/exec.h   (props changed)
  stable/8/sys/i386/include/float.h   (props changed)
  stable/8/sys/i386/include/floatingpoint.h   (props changed)
  stable/8/sys/i386/include/frame.h   (props changed)
  stable/8/sys/i386/include/gdb_machdep.h   (props changed)
  stable/8/sys/i386/include/ieeefp.h   (props changed)
  stable/8/sys/i386/include/if_wl_wavelan.h   (props changed)
  stable/8/sys/i386/include/in_cksum.h   (props changed)
  stable/8/sys/i386/include/intr_machdep.h   (props changed)
  stable/8/sys/i386/include/ioctl_bt848.h   (props changed)
  stable/8/sys/i386/include/ioctl_meteor.h   (props changed)
  stable/8/sys/i386/include/iodev.h   (props changed)
  stable/8/sys/i386/include/kdb.h   (props changed)
  stable/8/sys/i386/include/legacyvar.h   (props changed)
  stable/8/sys/i386/include/limits.h   (props changed)
  stable/8/sys/i386/include/mca.h   (props changed)
  stable/8/sys/i386/include/md_var.h   (props changed)
  stable/8/sys/i386/include/memdev.h   (props changed)
  stable/8/sys/i386/include/metadata.h   (props changed)
  stable/8/sys/i386/include/minidump.h   (props changed)
  stable/8/sys/i386/include/mp_watchdog.h   (props changed)
  stable/8/sys/i386/include/mptable.h   (props changed)
  stable/8/sys/i386/include/mutex.h   (props changed)
  stable/8/sys/i386/include/nexusvar.h   (props changed)
  stable/8/sys/i386/include/npx.h   (props changed)
  stable/8/sys/i386/include/param.h   (props changed)
  stable/8/sys/i386/include/pc/   (props changed)
  stable/8/sys/i386/include/pcaudioio.h   (props changed)
  stable/8/sys/i386/include/pcb.h   (props changed)
  stable/8/sys/i386/include/pcb_ext.h   (props changed)
  stable/8/sys/i386/include/pci_cfgreg.h   (props changed)
  stable/8/sys/i386/include/pcpu.h   (props changed)
  stable/8/sys/i386/include/perfmon.h   (props changed)
  stable/8/sys/i386/include/pmap.h   (props changed)
  stable/8/sys/i386/include/pmc_mdep.h   (props changed)
  stable/8/sys/i386/include/ppireg.h   (props changed)
  stable/8/sys/i386/include/privatespace.h   (props changed)
  stable/8/sys/i386/include/proc.h   (props changed)
  stable/8/sys/i386/include/profile.h   (props changed)
  stable/8/sys/i386/include/psl.h   (props changed)
  stable/8/sys/i386/include/ptrace.h   (props changed)
  stable/8/sys/i386/include/reg.h   (props changed)
  stable/8/sys/i386/include/reloc.h   (props changed)
  stable/8/sys/i386/include/resource.h   (props changed)
  stable/8/sys/i386/include/runq.h   (props changed)
  stable/8/sys/i386/include/segments.h   (props changed)
  stable/8/sys/i386/include/setjmp.h   (props changed)
  stable/8/sys/i386/include/sf_buf.h   (props changed)
  stable/8/sys/i386/include/sigframe.h   (props changed)
  stable/8/sys/i386/include/signal.h   (props changed)
  stable/8/sys/i386/include/smapi.h   (props changed)
  stable/8/sys/i386/include/smp.h   (props changed)
  stable/8/sys/i386/include/speaker.h   (props changed)
  stable/8/sys/i386/include/specialreg.h   (props changed)
  stable/8/sys/i386/include/stack.h   (props changed)
  stable/8/sys/i386/include/stdarg.h   (props changed)
  stable/8/sys/i386/include/sysarch.h   (props changed)
  stable/8/sys/i386/include/timerreg.h   (props changed)
  stable/8/sys/i386/include/trap.h   (props changed)
  stable/8/sys/i386/include/tss.h   (props changed)
  stable/8/sys/i386/include/ucontext.h   (props changed)
  stable/8/sys/i386/include/varargs.h   (props changed)
  stable/8/sys/i386/include/vm.h   (props changed)
  stable/8/sys/i386/include/vm86.h   (props changed)
  stable/8/sys/i386/include/vmparam.h   (props changed)
  stable/8/sys/i386/include/xbox.h   (props changed)
  stable/8/sys/i386/include/xen/   (props changed)
  stable/8/sys/i386/isa/   (props changed)
  stable/8/sys/i386/isa/atpic.c   (props changed)
  stable/8/sys/i386/isa/atpic_vector.s   (props changed)
  stable/8/sys/i386/isa/ccbque.h   (props changed)
  stable/8/sys/i386/isa/clock.c   (props changed)
  stable/8/sys/i386/isa/dpms.c   (props changed)
  stable/8/sys/i386/isa/elcr.c   (props changed)
  stable/8/sys/i386/isa/elink.c   (props changed)
  stable/8/sys/i386/isa/elink.h   (props changed)
  stable/8/sys/i386/isa/icu.h   (props changed)
  stable/8/sys/i386/isa/isa.c   (props changed)
  stable/8/sys/i386/isa/isa.h   (props changed)
  stable/8/sys/i386/isa/isa_dma.c   (props changed)
  stable/8/sys/i386/isa/nmi.c   (props changed)
  stable/8/sys/i386/isa/npx.c   (props changed)
  stable/8/sys/i386/isa/pmtimer.c   (props changed)
  stable/8/sys/i386/isa/prof_machdep.c   (props changed)
  stable/8/sys/i386/isa/spic.c   (props changed)
  stable/8/sys/i386/isa/spicreg.h   (props changed)
  stable/8/sys/i386/isa/vesa.c   (props changed)
  stable/8/sys/i386/linux/   (props changed)
  stable/8/sys/i386/linux/Makefile   (props changed)
  stable/8/sys/i386/linux/imgact_linux.c   (props changed)
  stable/8/sys/i386/linux/linux.h   (props changed)
  stable/8/sys/i386/linux/linux_dummy.c   (props changed)
  stable/8/sys/i386/linux/linux_genassym.c   (props changed)
  stable/8/sys/i386/linux/linux_ipc64.h   (props changed)
  stable/8/sys/i386/linux/linux_locore.s   (props changed)
  stable/8/sys/i386/linux/linux_machdep.c   (props changed)
  stable/8/sys/i386/linux/linux_proto.h   (props changed)
  stable/8/sys/i386/linux/linux_ptrace.c   (props changed)
  stable/8/sys/i386/linux/linux_support.s   (props changed)
  stable/8/sys/i386/linux/linux_syscall.h   (props changed)
  stable/8/sys/i386/linux/linux_sysent.c   (props changed)
  stable/8/sys/i386/linux/linux_sysvec.c   (props changed)
  stable/8/sys/i386/linux/syscalls.conf   (props changed)
  stable/8/sys/i386/linux/syscalls.master   (props changed)
  stable/8/sys/i386/pci/   (props changed)
  stable/8/sys/i386/pci/pci_bus.c   (props changed)
  stable/8/sys/i386/pci/pci_cfgreg.c   (props changed)
  stable/8/sys/i386/pci/pci_pir.c   (props changed)
  stable/8/sys/i386/svr4/   (props changed)
  stable/8/sys/i386/svr4/svr4_genassym.c   (props changed)
  stable/8/sys/i386/svr4/svr4_locore.s   (props changed)
  stable/8/sys/i386/svr4/svr4_machdep.c   (props changed)
  stable/8/sys/i386/svr4/svr4_machdep.h   (props changed)
  stable/8/sys/i386/xbox/   (props changed)
  stable/8/sys/i386/xbox/pic16l.s   (props changed)
  stable/8/sys/i386/xbox/xbox.c   (props changed)
  stable/8/sys/i386/xbox/xboxfb.c   (props changed)
  stable/8/sys/i386/xen/   (props changed)
  stable/8/sys/i386/xen/clock.c   (props changed)
  stable/8/sys/i386/xen/exception.s   (props changed)
  stable/8/sys/i386/xen/locore.s   (props changed)
  stable/8/sys/i386/xen/mp_machdep.c   (props changed)
  stable/8/sys/i386/xen/mptable.c   (props changed)
  stable/8/sys/i386/xen/pmap.c   (props changed)
  stable/8/sys/i386/xen/xen_clock_util.c   (props changed)
  stable/8/sys/i386/xen/xen_machdep.c   (props changed)
  stable/8/sys/i386/xen/xen_rtc.c   (props changed)
  stable/8/sys/ia64/   (props changed)
  stable/8/sys/ia64/acpica/   (props changed)
  stable/8/sys/ia64/compile/   (props changed)
  stable/8/sys/ia64/conf/   (props changed)
  stable/8/sys/ia64/disasm/   (props changed)
  stable/8/sys/ia64/ia32/   (props changed)
  stable/8/sys/ia64/ia64/   (props changed)
  stable/8/sys/ia64/include/   (props changed)
  stable/8/sys/ia64/isa/   (props changed)
  stable/8/sys/ia64/pci/   (props changed)
  stable/8/sys/isa/   (props changed)
  stable/8/sys/isa/atrtc.c   (props changed)
  stable/8/sys/isa/isa_common.c   (props changed)
  stable/8/sys/isa/isa_common.h   (props changed)
  stable/8/sys/isa/isa_dmareg.h   (props changed)
  stable/8/sys/isa/isa_if.m   (props changed)
  stable/8/sys/isa/isahint.c   (props changed)
  stable/8/sys/isa/isareg.h   (props changed)
  stable/8/sys/isa/isavar.h   (props changed)
  stable/8/sys/isa/orm.c   (props changed)
  stable/8/sys/isa/pnp.c   (props changed)
  stable/8/sys/isa/pnpparse.c   (props changed)
  stable/8/sys/isa/pnpreg.h   (props changed)
  stable/8/sys/isa/pnpvar.h   (props changed)
  stable/8/sys/isa/rtc.h   (props changed)
  stable/8/sys/isa/syscons_isa.c   (props changed)
  stable/8/sys/isa/vga_isa.c   (props changed)
  stable/8/sys/kern/   (props changed)
  stable/8/sys/kern/Make.tags.inc   (props changed)
  stable/8/sys/kern/Makefile   (props changed)
  stable/8/sys/kern/bus_if.m   (props changed)
  stable/8/sys/kern/clock_if.m   (props changed)
  stable/8/sys/kern/cpufreq_if.m   (props changed)
  stable/8/sys/kern/device_if.m   (props changed)
  stable/8/sys/kern/genassym.sh   (props changed)
  stable/8/sys/kern/imgact_aout.c   (props changed)
  stable/8/sys/kern/imgact_elf.c   (props changed)
  stable/8/sys/kern/imgact_elf32.c   (props changed)
  stable/8/sys/kern/imgact_elf64.c   (props changed)
  stable/8/sys/kern/imgact_gzip.c   (props changed)
  stable/8/sys/kern/imgact_shell.c   (props changed)
  stable/8/sys/kern/inflate.c   (props changed)
  stable/8/sys/kern/init_main.c   (props changed)
  stable/8/sys/kern/init_sysent.c   (props changed)
  stable/8/sys/kern/kern_acct.c   (props changed)
  stable/8/sys/kern/kern_alq.c   (props changed)
  stable/8/sys/kern/kern_clock.c   (props changed)
  stable/8/sys/kern/kern_condvar.c   (props changed)
  stable/8/sys/kern/kern_conf.c   (props changed)
  stable/8/sys/kern/kern_cons.c   (props changed)
  stable/8/sys/kern/kern_context.c   (props changed)
  stable/8/sys/kern/kern_cpu.c   (props changed)
  stable/8/sys/kern/kern_cpuset.c   (props changed)
  stable/8/sys/kern/kern_ctf.c   (props changed)
  stable/8/sys/kern/kern_descrip.c   (props changed)
  stable/8/sys/kern/kern_dtrace.c   (props changed)
  stable/8/sys/kern/kern_environment.c   (props changed)
  stable/8/sys/kern/kern_event.c   (props changed)
  stable/8/sys/kern/kern_exec.c   (props changed)
  stable/8/sys/kern/kern_exit.c   (props changed)
  stable/8/sys/kern/kern_fail.c   (props changed)
  stable/8/sys/kern/kern_fork.c   (props changed)
  stable/8/sys/kern/kern_idle.c   (props changed)
  stable/8/sys/kern/kern_intr.c   (props changed)
  stable/8/sys/kern/kern_jail.c   (props changed)
  stable/8/sys/kern/kern_kthread.c   (props changed)
  stable/8/sys/kern/kern_ktr.c   (props changed)
  stable/8/sys/kern/kern_ktrace.c   (props changed)
  stable/8/sys/kern/kern_linker.c   (props changed)
  stable/8/sys/kern/kern_lock.c   (props changed)
  stable/8/sys/kern/kern_lockf.c   (props changed)
  stable/8/sys/kern/kern_lockstat.c   (props changed)
  stable/8/sys/kern/kern_malloc.c   (props changed)
  stable/8/sys/kern/kern_mbuf.c   (props changed)
  stable/8/sys/kern/kern_mib.c   (props changed)
  stable/8/sys/kern/kern_module.c   (props changed)
  stable/8/sys/kern/kern_mtxpool.c   (props changed)
  stable/8/sys/kern/kern_mutex.c   (props changed)
  stable/8/sys/kern/kern_ntptime.c   (props changed)
  stable/8/sys/kern/kern_osd.c   (props changed)
  stable/8/sys/kern/kern_physio.c   (props changed)
  stable/8/sys/kern/kern_pmc.c   (props changed)
  stable/8/sys/kern/kern_poll.c   (props changed)
  stable/8/sys/kern/kern_priv.c   (props changed)
  stable/8/sys/kern/kern_proc.c   (props changed)
  stable/8/sys/kern/kern_prot.c   (props changed)
  stable/8/sys/kern/kern_resource.c   (props changed)
  stable/8/sys/kern/kern_rmlock.c   (props changed)
  stable/8/sys/kern/kern_rwlock.c   (props changed)
  stable/8/sys/kern/kern_sdt.c   (props changed)
  stable/8/sys/kern/kern_sema.c   (props changed)
  stable/8/sys/kern/kern_shutdown.c   (props changed)
  stable/8/sys/kern/kern_sig.c   (props changed)
  stable/8/sys/kern/kern_subr.c   (props changed)
  stable/8/sys/kern/kern_switch.c   (props changed)
  stable/8/sys/kern/kern_sx.c   (props changed)
  stable/8/sys/kern/kern_synch.c   (props changed)
  stable/8/sys/kern/kern_syscalls.c   (props changed)
  stable/8/sys/kern/kern_sysctl.c   (props changed)
  stable/8/sys/kern/kern_tc.c   (props changed)
  stable/8/sys/kern/kern_thr.c   (props changed)
  stable/8/sys/kern/kern_thread.c   (props changed)
  stable/8/sys/kern/kern_time.c   (props changed)
  stable/8/sys/kern/kern_timeout.c   (props changed)
  stable/8/sys/kern/kern_umtx.c   (props changed)
  stable/8/sys/kern/kern_uuid.c   (props changed)
  stable/8/sys/kern/kern_xxx.c   (props changed)
  stable/8/sys/kern/ksched.c   (props changed)
  stable/8/sys/kern/link_elf.c   (props changed)
  stable/8/sys/kern/link_elf_obj.c   (props changed)
  stable/8/sys/kern/linker_if.m   (props changed)
  stable/8/sys/kern/makesyscalls.sh   (props changed)
  stable/8/sys/kern/md4c.c   (props changed)
  stable/8/sys/kern/md5c.c   (props changed)
  stable/8/sys/kern/p1003_1b.c   (props changed)
  stable/8/sys/kern/posix4_mib.c   (props changed)
  stable/8/sys/kern/sched_4bsd.c   (props changed)
  stable/8/sys/kern/sched_ule.c   (props changed)
  stable/8/sys/kern/serdev_if.m   (props changed)
  stable/8/sys/kern/stack_protector.c   (props changed)
  stable/8/sys/kern/subr_acl_nfs4.c   (props changed)
  stable/8/sys/kern/subr_acl_posix1e.c   (props changed)
  stable/8/sys/kern/subr_autoconf.c   (props changed)
  stable/8/sys/kern/subr_blist.c   (props changed)
  stable/8/sys/kern/subr_bufring.c   (props changed)
  stable/8/sys/kern/subr_bus.c   (props changed)
  stable/8/sys/kern/subr_clock.c   (props changed)
  stable/8/sys/kern/subr_devstat.c   (props changed)
  stable/8/sys/kern/subr_disk.c   (props changed)
  stable/8/sys/kern/subr_eventhandler.c   (props changed)
  stable/8/sys/kern/subr_fattime.c   (props changed)
  stable/8/sys/kern/subr_firmware.c   (props changed)
  stable/8/sys/kern/subr_hints.c   (props changed)
  stable/8/sys/kern/subr_kdb.c   (props changed)
  stable/8/sys/kern/subr_kobj.c   (props changed)
  stable/8/sys/kern/subr_lock.c   (props changed)
  stable/8/sys/kern/subr_log.c   (props changed)
  stable/8/sys/kern/subr_mbpool.c   (props changed)
  stable/8/sys/kern/subr_mchain.c   (props changed)
  stable/8/sys/kern/subr_module.c   (props changed)
  stable/8/sys/kern/subr_msgbuf.c   (props changed)
  stable/8/sys/kern/subr_param.c   (props changed)
  stable/8/sys/kern/subr_pcpu.c   (props changed)
  stable/8/sys/kern/subr_power.c   (props changed)
  stable/8/sys/kern/subr_prf.c   (props changed)
  stable/8/sys/kern/subr_prof.c   (props changed)
  stable/8/sys/kern/subr_rman.c   (props changed)
  stable/8/sys/kern/subr_rtc.c   (props changed)
  stable/8/sys/kern/subr_sbuf.c   (props changed)
  stable/8/sys/kern/subr_scanf.c   (props changed)
  stable/8/sys/kern/subr_sglist.c   (props changed)
  stable/8/sys/kern/subr_sleepqueue.c   (props changed)
  stable/8/sys/kern/subr_smp.c   (props changed)
  stable/8/sys/kern/subr_stack.c   (props changed)
  stable/8/sys/kern/subr_taskqueue.c   (props changed)
  stable/8/sys/kern/subr_trap.c   (props changed)
  stable/8/sys/kern/subr_turnstile.c   (props changed)
  stable/8/sys/kern/subr_unit.c   (props changed)
  stable/8/sys/kern/subr_witness.c   (props changed)
  stable/8/sys/kern/sys_generic.c   (props changed)
  stable/8/sys/kern/sys_pipe.c   (props changed)
  stable/8/sys/kern/sys_process.c   (props changed)
  stable/8/sys/kern/sys_socket.c   (props changed)
  stable/8/sys/kern/syscalls.c   (props changed)
  stable/8/sys/kern/syscalls.master   (props changed)
  stable/8/sys/kern/systrace_args.c   (props changed)
  stable/8/sys/kern/sysv_ipc.c   (props changed)
  stable/8/sys/kern/sysv_msg.c   (props changed)
  stable/8/sys/kern/sysv_sem.c   (props changed)
  stable/8/sys/kern/sysv_shm.c   (props changed)
  stable/8/sys/kern/tty.c   (props changed)
  stable/8/sys/kern/tty_compat.c   (props changed)
  stable/8/sys/kern/tty_info.c   (props changed)
  stable/8/sys/kern/tty_inq.c   (props changed)
  stable/8/sys/kern/tty_outq.c   (props changed)
  stable/8/sys/kern/tty_pts.c   (props changed)
  stable/8/sys/kern/tty_pty.c   (props changed)
  stable/8/sys/kern/tty_tty.c   (props changed)
  stable/8/sys/kern/tty_ttydisc.c   (props changed)
  stable/8/sys/kern/uipc_accf.c   (props changed)
  stable/8/sys/kern/uipc_cow.c   (props changed)
  stable/8/sys/kern/uipc_debug.c   (props changed)
  stable/8/sys/kern/uipc_domain.c   (props changed)
  stable/8/sys/kern/uipc_mbuf.c   (props changed)
  stable/8/sys/kern/uipc_mbuf2.c   (props changed)
  stable/8/sys/kern/uipc_mqueue.c   (props changed)
  stable/8/sys/kern/uipc_sem.c   (props changed)
  stable/8/sys/kern/uipc_shm.c   (props changed)
  stable/8/sys/kern/uipc_sockbuf.c   (props changed)
  stable/8/sys/kern/uipc_socket.c   (props changed)
  stable/8/sys/kern/uipc_syscalls.c   (props changed)
  stable/8/sys/kern/uipc_usrreq.c   (props changed)
  stable/8/sys/kern/vfs_acl.c   (props changed)
  stable/8/sys/kern/vfs_aio.c   (props changed)
  stable/8/sys/kern/vfs_bio.c   (props changed)
  stable/8/sys/kern/vfs_cache.c   (props changed)
  stable/8/sys/kern/vfs_cluster.c   (props changed)
  stable/8/sys/kern/vfs_default.c   (props changed)
  stable/8/sys/kern/vfs_export.c   (props changed)
  stable/8/sys/kern/vfs_extattr.c   (props changed)
  stable/8/sys/kern/vfs_hash.c   (props changed)
  stable/8/sys/kern/vfs_init.c   (props changed)
  stable/8/sys/kern/vfs_lookup.c   (props changed)
  stable/8/sys/kern/vfs_mount.c   (props changed)
  stable/8/sys/kern/vfs_subr.c   (props changed)
  stable/8/sys/kern/vfs_syscalls.c   (props changed)
  stable/8/sys/kern/vfs_vnops.c   (props changed)
  stable/8/sys/kern/vnode_if.src   (props changed)
  stable/8/sys/kgssapi/   (props changed)
  stable/8/sys/kgssapi/gss_accept_sec_context.c   (props changed)
  stable/8/sys/kgssapi/gss_acquire_cred.c   (props changed)
  stable/8/sys/kgssapi/gss_add_oid_set_member.c   (props changed)
  stable/8/sys/kgssapi/gss_canonicalize_name.c   (props changed)
  stable/8/sys/kgssapi/gss_create_empty_oid_set.c   (props changed)
  stable/8/sys/kgssapi/gss_delete_sec_context.c   (props changed)
  stable/8/sys/kgssapi/gss_display_status.c   (props changed)
  stable/8/sys/kgssapi/gss_export_name.c   (props changed)
  stable/8/sys/kgssapi/gss_get_mic.c   (props changed)
  stable/8/sys/kgssapi/gss_impl.c   (props changed)
  stable/8/sys/kgssapi/gss_import_name.c   (props changed)
  stable/8/sys/kgssapi/gss_init_sec_context.c   (props changed)
  stable/8/sys/kgssapi/gss_names.c   (props changed)
  stable/8/sys/kgssapi/gss_pname_to_uid.c   (props changed)
  stable/8/sys/kgssapi/gss_release_buffer.c   (props changed)
  stable/8/sys/kgssapi/gss_release_cred.c   (props changed)
  stable/8/sys/kgssapi/gss_release_name.c   (props changed)
  stable/8/sys/kgssapi/gss_release_oid_set.c   (props changed)
  stable/8/sys/kgssapi/gss_set_cred_option.c   (props changed)
  stable/8/sys/kgssapi/gss_test_oid_set_member.c   (props changed)
  stable/8/sys/kgssapi/gss_unwrap.c   (props changed)
  stable/8/sys/kgssapi/gss_verify_mic.c   (props changed)
  stable/8/sys/kgssapi/gss_wrap.c   (props changed)
  stable/8/sys/kgssapi/gss_wrap_size_limit.c   (props changed)
  stable/8/sys/kgssapi/gssapi.h   (props changed)
  stable/8/sys/kgssapi/gssapi_impl.h   (props changed)
  stable/8/sys/kgssapi/gssd.x   (props changed)
  stable/8/sys/kgssapi/gssd_prot.c   (props changed)
  stable/8/sys/kgssapi/gsstest.c   (props changed)
  stable/8/sys/kgssapi/kgss_if.m   (props changed)
  stable/8/sys/kgssapi/krb5/   (props changed)
  stable/8/sys/libkern/   (props changed)
  stable/8/sys/libkern/arc4random.c   (props changed)
  stable/8/sys/libkern/arm/   (props changed)
  stable/8/sys/libkern/ashldi3.c   (props changed)
  stable/8/sys/libkern/ashrdi3.c   (props changed)
  stable/8/sys/libkern/bcd.c   (props changed)
  stable/8/sys/libkern/bcmp.c   (props changed)
  stable/8/sys/libkern/bsearch.c   (props changed)
  stable/8/sys/libkern/cmpdi2.c   (props changed)
  stable/8/sys/libkern/crc32.c   (props changed)
  stable/8/sys/libkern/divdi3.c   (props changed)
  stable/8/sys/libkern/ffs.c   (props changed)
  stable/8/sys/libkern/ffsl.c   (props changed)
  stable/8/sys/libkern/fls.c   (props changed)
  stable/8/sys/libkern/flsl.c   (props changed)
  stable/8/sys/libkern/fnmatch.c   (props changed)
  stable/8/sys/libkern/gets.c   (props changed)
  stable/8/sys/libkern/ia64/   (props changed)
  stable/8/sys/libkern/iconv.c   (props changed)
  stable/8/sys/libkern/iconv_converter_if.m   (props changed)
  stable/8/sys/libkern/iconv_xlat.c   (props changed)
  stable/8/sys/libkern/iconv_xlat16.c   (props changed)
  stable/8/sys/libkern/index.c   (props changed)
  stable/8/sys/libkern/inet_ntoa.c   (props changed)
  stable/8/sys/libkern/jenkins.h   (props changed)
  stable/8/sys/libkern/lshrdi3.c   (props changed)
  stable/8/sys/libkern/mcount.c   (props changed)
  stable/8/sys/libkern/memcmp.c   (props changed)
  stable/8/sys/libkern/memmove.c   (props changed)
  stable/8/sys/libkern/memset.c   (props changed)
  stable/8/sys/libkern/moddi3.c   (props changed)
  stable/8/sys/libkern/qdivrem.c   (props changed)
  stable/8/sys/libkern/qsort.c   (props changed)
  stable/8/sys/libkern/qsort_r.c   (props changed)
  stable/8/sys/libkern/quad.h   (props changed)
  stable/8/sys/libkern/random.c   (props changed)
  stable/8/sys/libkern/rindex.c   (props changed)
  stable/8/sys/libkern/scanc.c   (props changed)
  stable/8/sys/libkern/skpc.c   (props changed)
  stable/8/sys/libkern/strcasecmp.c   (props changed)
  stable/8/sys/libkern/strcat.c   (props changed)
  stable/8/sys/libkern/strcmp.c   (props changed)
  stable/8/sys/libkern/strcpy.c   (props changed)
  stable/8/sys/libkern/strcspn.c   (props changed)
  stable/8/sys/libkern/strdup.c   (props changed)
  stable/8/sys/libkern/strlcat.c   (props changed)
  stable/8/sys/libkern/strlcpy.c   (props changed)
  stable/8/sys/libkern/strlen.c   (props changed)
  stable/8/sys/libkern/strncmp.c   (props changed)
  stable/8/sys/libkern/strncpy.c   (props changed)
  stable/8/sys/libkern/strsep.c   (props changed)
  stable/8/sys/libkern/strspn.c   (props changed)
  stable/8/sys/libkern/strstr.c   (props changed)
  stable/8/sys/libkern/strtol.c   (props changed)
  stable/8/sys/libkern/strtoq.c   (props changed)
  stable/8/sys/libkern/strtoul.c   (props changed)
  stable/8/sys/libkern/strtouq.c   (props changed)
  stable/8/sys/libkern/strvalid.c   (props changed)
  stable/8/sys/libkern/ucmpdi2.c   (props changed)
  stable/8/sys/libkern/udivdi3.c   (props changed)
  stable/8/sys/libkern/umoddi3.c   (props changed)
  stable/8/sys/mips/   (props changed)
  stable/8/sys/mips/adm5120/   (props changed)
  stable/8/sys/mips/compile/   (props changed)
  stable/8/sys/mips/conf/   (props changed)
  stable/8/sys/mips/idt/   (props changed)
  stable/8/sys/mips/include/   (props changed)
  stable/8/sys/mips/malta/   (props changed)
  stable/8/sys/mips/mips/   (props changed)
  stable/8/sys/mips/sentry5/   (props changed)
  stable/8/sys/modules/   (props changed)
  stable/8/sys/modules/3dfx/   (props changed)
  stable/8/sys/modules/3dfx_linux/   (props changed)
  stable/8/sys/modules/Makefile   (props changed)
  stable/8/sys/modules/Makefile.inc   (props changed)
  stable/8/sys/modules/aac/   (props changed)
  stable/8/sys/modules/accf_data/   (props changed)
  stable/8/sys/modules/accf_dns/   (props changed)
  stable/8/sys/modules/accf_http/   (props changed)
  stable/8/sys/modules/acpi/   (props changed)
  stable/8/sys/modules/ae/   (props changed)
  stable/8/sys/modules/age/   (props changed)
  stable/8/sys/modules/agp/   (props changed)
  stable/8/sys/modules/aha/   (props changed)
  stable/8/sys/modules/ahb/   (props changed)
  stable/8/sys/modules/ahci/   (props changed)
  stable/8/sys/modules/aic/   (props changed)
  stable/8/sys/modules/aic7xxx/   (props changed)
  stable/8/sys/modules/aio/   (props changed)
  stable/8/sys/modules/alc/   (props changed)
  stable/8/sys/modules/ale/   (props changed)
  stable/8/sys/modules/amd/   (props changed)
  stable/8/sys/modules/amdtemp/   (props changed)
  stable/8/sys/modules/amr/   (props changed)
  stable/8/sys/modules/an/   (props changed)
  stable/8/sys/modules/aout/   (props changed)
  stable/8/sys/modules/apm/   (props changed)
  stable/8/sys/modules/arcmsr/   (props changed)
  stable/8/sys/modules/arcnet/   (props changed)
  stable/8/sys/modules/asmc/   (props changed)
  stable/8/sys/modules/asr/   (props changed)
  stable/8/sys/modules/ata/   (props changed)
  stable/8/sys/modules/ath/   (props changed)
  stable/8/sys/modules/auxio/   (props changed)
  stable/8/sys/modules/bce/   (props changed)
  stable/8/sys/modules/bfe/   (props changed)
  stable/8/sys/modules/bge/   (props changed)
  stable/8/sys/modules/bios/   (props changed)
  stable/8/sys/modules/bktr/   (props changed)
  stable/8/sys/modules/bm/   (props changed)
  stable/8/sys/modules/bridgestp/   (props changed)
  stable/8/sys/modules/bwi/   (props changed)
  stable/8/sys/modules/cam/   (props changed)
  stable/8/sys/modules/canbepm/   (props changed)
  stable/8/sys/modules/canbus/   (props changed)
  stable/8/sys/modules/cardbus/   (props changed)
  stable/8/sys/modules/cas/   (props changed)
  stable/8/sys/modules/cbb/   (props changed)
  stable/8/sys/modules/cd9660/   (props changed)
  stable/8/sys/modules/cd9660_iconv/   (props changed)
  stable/8/sys/modules/ce/   (props changed)
  stable/8/sys/modules/ciss/   (props changed)
  stable/8/sys/modules/cm/   (props changed)
  stable/8/sys/modules/cmx/   (props changed)
  stable/8/sys/modules/coda/   (props changed)
  stable/8/sys/modules/coda5/   (props changed)
  stable/8/sys/modules/coff/   (props changed)
  stable/8/sys/modules/coretemp/   (props changed)
  stable/8/sys/modules/cp/   (props changed)
  stable/8/sys/modules/cpuctl/   (props changed)
  stable/8/sys/modules/cpufreq/   (props changed)
  stable/8/sys/modules/crypto/   (props changed)
  stable/8/sys/modules/cryptodev/   (props changed)
  stable/8/sys/modules/cs/   (props changed)
  stable/8/sys/modules/ctau/   (props changed)
  stable/8/sys/modules/cx/   (props changed)
  stable/8/sys/modules/cxgb/   (props changed)
  stable/8/sys/modules/cyclic/   (props changed)
  stable/8/sys/modules/dc/   (props changed)
  stable/8/sys/modules/dcons/   (props changed)
  stable/8/sys/modules/dcons_crom/   (props changed)
  stable/8/sys/modules/de/   (props changed)
  stable/8/sys/modules/digi/   (props changed)
  stable/8/sys/modules/dpms/   (props changed)
  stable/8/sys/modules/dpt/   (props changed)
  stable/8/sys/modules/drm/   (props changed)
  stable/8/sys/modules/dtrace/   (props changed)
  stable/8/sys/modules/dummynet/   (props changed)
  stable/8/sys/modules/ed/   (props changed)
  stable/8/sys/modules/elink/   (props changed)
  stable/8/sys/modules/em/   (props changed)
  stable/8/sys/modules/en/   (props changed)
  stable/8/sys/modules/ep/   (props changed)
  stable/8/sys/modules/esp/   (props changed)
  stable/8/sys/modules/et/   (props changed)
  stable/8/sys/modules/ex/   (props changed)
  stable/8/sys/modules/exca/   (props changed)
  stable/8/sys/modules/ext2fs/   (props changed)
  stable/8/sys/modules/fatm/   (props changed)
  stable/8/sys/modules/fdc/   (props changed)
  stable/8/sys/modules/fdescfs/   (props changed)
  stable/8/sys/modules/fe/   (props changed)
  stable/8/sys/modules/firewire/   (props changed)
  stable/8/sys/modules/firmware/   (props changed)
  stable/8/sys/modules/fxp/   (props changed)
  stable/8/sys/modules/gem/   (props changed)
  stable/8/sys/modules/geom/   (props changed)
  stable/8/sys/modules/glxsb/   (props changed)
  stable/8/sys/modules/hatm/   (props changed)
  stable/8/sys/modules/hifn/   (props changed)
  stable/8/sys/modules/hme/   (props changed)
  stable/8/sys/modules/hpfs/   (props changed)
  stable/8/sys/modules/hptiop/   (props changed)
  stable/8/sys/modules/hptmv/   (props changed)
  stable/8/sys/modules/hptrr/   (props changed)
  stable/8/sys/modules/hwpmc/   (props changed)
  stable/8/sys/modules/i2c/   (props changed)
  stable/8/sys/modules/ibcs2/   (props changed)
  stable/8/sys/modules/ichwd/   (props changed)
  stable/8/sys/modules/ida/   (props changed)
  stable/8/sys/modules/ie/   (props changed)
  stable/8/sys/modules/if_bridge/   (props changed)
  stable/8/sys/modules/if_disc/   (props changed)
  stable/8/sys/modules/if_edsc/   (props changed)
  stable/8/sys/modules/if_ef/   (props changed)
  stable/8/sys/modules/if_epair/   (props changed)
  stable/8/sys/modules/if_faith/   (props changed)
  stable/8/sys/modules/if_gif/   (props changed)
  stable/8/sys/modules/if_gre/   (props changed)
  stable/8/sys/modules/if_lagg/   (props changed)
  stable/8/sys/modules/if_ndis/   (props changed)
  stable/8/sys/modules/if_stf/   (props changed)
  stable/8/sys/modules/if_tap/   (props changed)
  stable/8/sys/modules/if_tun/   (props changed)
  stable/8/sys/modules/if_vlan/   (props changed)
  stable/8/sys/modules/igb/   (props changed)
  stable/8/sys/modules/iir/   (props changed)
  stable/8/sys/modules/io/   (props changed)
  stable/8/sys/modules/ip6_mroute_mod/   (props changed)
  stable/8/sys/modules/ip_mroute_mod/   (props changed)
  stable/8/sys/modules/ipdivert/   (props changed)
  stable/8/sys/modules/ipfilter/   (props changed)
  stable/8/sys/modules/ipfw/   (props changed)
  stable/8/sys/modules/ipfw_nat/   (props changed)
  stable/8/sys/modules/ipmi/   (props changed)
  stable/8/sys/modules/ips/   (props changed)
  stable/8/sys/modules/ipw/   (props changed)
  stable/8/sys/modules/ipwfw/   (props changed)
  stable/8/sys/modules/iscsi/   (props changed)
  stable/8/sys/modules/isp/   (props changed)
  stable/8/sys/modules/ispfw/   (props changed)
  stable/8/sys/modules/iwi/   (props changed)
  stable/8/sys/modules/iwifw/   (props changed)
  stable/8/sys/modules/iwn/   (props changed)
  stable/8/sys/modules/iwnfw/   (props changed)
  stable/8/sys/modules/ixgb/   (props changed)
  stable/8/sys/modules/ixgbe/   (props changed)
  stable/8/sys/modules/jme/   (props changed)
  stable/8/sys/modules/joy/   (props changed)
  stable/8/sys/modules/kbdmux/   (props changed)
  stable/8/sys/modules/kgssapi/   (props changed)
  stable/8/sys/modules/kgssapi_krb5/   (props changed)
  stable/8/sys/modules/krpc/   (props changed)
  stable/8/sys/modules/ksyms/   (props changed)
  stable/8/sys/modules/le/   (props changed)
  stable/8/sys/modules/lge/   (props changed)
  stable/8/sys/modules/libalias/   (props changed)
  stable/8/sys/modules/libiconv/   (props changed)
  stable/8/sys/modules/libmbpool/   (props changed)
  stable/8/sys/modules/libmchain/   (props changed)
  stable/8/sys/modules/linprocfs/   (props changed)
  stable/8/sys/modules/linsysfs/   (props changed)
  stable/8/sys/modules/linux/   (props changed)
  stable/8/sys/modules/lmc/   (props changed)
  stable/8/sys/modules/lpt/   (props changed)
  stable/8/sys/modules/mac_biba/   (props changed)
  stable/8/sys/modules/mac_bsdextended/   (props changed)
  stable/8/sys/modules/mac_ifoff/   (props changed)
  stable/8/sys/modules/mac_lomac/   (props changed)
  stable/8/sys/modules/mac_mls/   (props changed)
  stable/8/sys/modules/mac_none/   (props changed)
  stable/8/sys/modules/mac_partition/   (props changed)
  stable/8/sys/modules/mac_portacl/   (props changed)
  stable/8/sys/modules/mac_seeotheruids/   (props changed)
  stable/8/sys/modules/mac_stub/   (props changed)
  stable/8/sys/modules/mac_test/   (props changed)
  stable/8/sys/modules/malo/   (props changed)
  stable/8/sys/modules/mcd/   (props changed)
  stable/8/sys/modules/md/   (props changed)
  stable/8/sys/modules/mem/   (props changed)
  stable/8/sys/modules/mfi/   (props changed)
  stable/8/sys/modules/mii/   (props changed)
  stable/8/sys/modules/mlx/   (props changed)
  stable/8/sys/modules/mly/   (props changed)
  stable/8/sys/modules/mmc/   (props changed)
  stable/8/sys/modules/mmcsd/   (props changed)
  stable/8/sys/modules/mpt/   (props changed)
  stable/8/sys/modules/mqueue/   (props changed)
  stable/8/sys/modules/msdosfs/   (props changed)
  stable/8/sys/modules/msdosfs_iconv/   (props changed)
  stable/8/sys/modules/mse/   (props changed)
  stable/8/sys/modules/msk/   (props changed)
  stable/8/sys/modules/mwl/   (props changed)
  stable/8/sys/modules/mwlfw/   (props changed)
  stable/8/sys/modules/mxge/   (props changed)
  stable/8/sys/modules/my/   (props changed)
  stable/8/sys/modules/ncp/   (props changed)
  stable/8/sys/modules/ncv/   (props changed)
  stable/8/sys/modules/ndis/   (props changed)
  stable/8/sys/modules/netgraph/   (props changed)
  stable/8/sys/modules/nfe/   (props changed)
  stable/8/sys/modules/nfscl/   (props changed)
  stable/8/sys/modules/nfsclient/   (props changed)
  stable/8/sys/modules/nfscommon/   (props changed)
  stable/8/sys/modules/nfsd/   (props changed)
  stable/8/sys/modules/nfslockd/   (props changed)
  stable/8/sys/modules/nfsserver/   (props changed)
  stable/8/sys/modules/nfssvc/   (props changed)
  stable/8/sys/modules/nge/   (props changed)
  stable/8/sys/modules/nmdm/   (props changed)
  stable/8/sys/modules/nsp/   (props changed)
  stable/8/sys/modules/ntfs/   (props changed)
  stable/8/sys/modules/ntfs_iconv/   (props changed)
  stable/8/sys/modules/nullfs/   (props changed)
  stable/8/sys/modules/nve/   (props changed)
  stable/8/sys/modules/nvram/   (props changed)
  stable/8/sys/modules/nwfs/   (props changed)
  stable/8/sys/modules/nxge/   (props changed)
  stable/8/sys/modules/opensolaris/   (props changed)
  stable/8/sys/modules/padlock/   (props changed)
  stable/8/sys/modules/patm/   (props changed)
  stable/8/sys/modules/pccard/   (props changed)
  stable/8/sys/modules/pcfclock/   (props changed)
  stable/8/sys/modules/pcn/   (props changed)
  stable/8/sys/modules/pf/   (props changed)
  stable/8/sys/modules/pflog/   (props changed)
  stable/8/sys/modules/plip/   (props changed)
  stable/8/sys/modules/pmc/   (props changed)
  stable/8/sys/modules/portalfs/   (props changed)
  stable/8/sys/modules/powermac_nvram/   (props changed)
  stable/8/sys/modules/ppbus/   (props changed)
  stable/8/sys/modules/ppc/   (props changed)
  stable/8/sys/modules/ppi/   (props changed)
  stable/8/sys/modules/pps/   (props changed)
  stable/8/sys/modules/procfs/   (props changed)
  stable/8/sys/modules/pseudofs/   (props changed)
  stable/8/sys/modules/pst/   (props changed)
  stable/8/sys/modules/puc/   (props changed)
  stable/8/sys/modules/ral/   (props changed)
  stable/8/sys/modules/ralfw/   (props changed)
  stable/8/sys/modules/random/   (props changed)
  stable/8/sys/modules/rc/   (props changed)
  stable/8/sys/modules/rc4/   (props changed)
  stable/8/sys/modules/rdma/   (props changed)
  stable/8/sys/modules/re/   (props changed)
  stable/8/sys/modules/reiserfs/   (props changed)
  stable/8/sys/modules/rl/   (props changed)
  stable/8/sys/modules/rndtest/   (props changed)
  stable/8/sys/modules/rp/   (props changed)
  stable/8/sys/modules/s3/   (props changed)
  stable/8/sys/modules/safe/   (props changed)
  stable/8/sys/modules/sbni/   (props changed)
  stable/8/sys/modules/scc/   (props changed)
  stable/8/sys/modules/scd/   (props changed)
  stable/8/sys/modules/scsi_low/   (props changed)
  stable/8/sys/modules/sdhci/   (props changed)
  stable/8/sys/modules/sem/   (props changed)
  stable/8/sys/modules/sf/   (props changed)
  stable/8/sys/modules/siis/   (props changed)
  stable/8/sys/modules/sio/   (props changed)
  stable/8/sys/modules/sis/   (props changed)
  stable/8/sys/modules/sk/   (props changed)
  stable/8/sys/modules/smbfs/   (props changed)
  stable/8/sys/modules/sn/   (props changed)
  stable/8/sys/modules/snc/   (props changed)
  stable/8/sys/modules/snp/   (props changed)
  stable/8/sys/modules/sound/   (props changed)
  stable/8/sys/modules/speaker/   (props changed)
  stable/8/sys/modules/splash/   (props changed)
  stable/8/sys/modules/sppp/   (props changed)
  stable/8/sys/modules/ste/   (props changed)
  stable/8/sys/modules/stg/   (props changed)
  stable/8/sys/modules/stge/   (props changed)
  stable/8/sys/modules/streams/   (props changed)
  stable/8/sys/modules/svr4/   (props changed)
  stable/8/sys/modules/sym/   (props changed)
  stable/8/sys/modules/syscons/   (props changed)
  stable/8/sys/modules/sysvipc/   (props changed)
  stable/8/sys/modules/ti/   (props changed)
  stable/8/sys/modules/tl/   (props changed)
  stable/8/sys/modules/tmpfs/   (props changed)
  stable/8/sys/modules/trm/   (props changed)
  stable/8/sys/modules/twa/   (props changed)
  stable/8/sys/modules/twe/   (props changed)
  stable/8/sys/modules/tx/   (props changed)
  stable/8/sys/modules/txp/   (props changed)
  stable/8/sys/modules/uart/   (props changed)
  stable/8/sys/modules/ubsec/   (props changed)
  stable/8/sys/modules/ubser/   (props changed)
  stable/8/sys/modules/uchcom/   (props changed)
  stable/8/sys/modules/ucycom/   (props changed)
  stable/8/sys/modules/udf/   (props changed)
  stable/8/sys/modules/udf_iconv/   (props changed)
  stable/8/sys/modules/ufs/   (props changed)
  stable/8/sys/modules/unionfs/   (props changed)
  stable/8/sys/modules/usb/   (props changed)
  stable/8/sys/modules/utopia/   (props changed)
  stable/8/sys/modules/vesa/   (props changed)
  stable/8/sys/modules/vge/   (props changed)
  stable/8/sys/modules/vkbd/   (props changed)
  stable/8/sys/modules/vpo/   (props changed)
  stable/8/sys/modules/vr/   (props changed)
  stable/8/sys/modules/vx/   (props changed)
  stable/8/sys/modules/wb/   (props changed)
  stable/8/sys/modules/wi/   (props changed)
  stable/8/sys/modules/wlan/   (props changed)
  stable/8/sys/modules/wlan_acl/   (props changed)
  stable/8/sys/modules/wlan_amrr/   (props changed)
  stable/8/sys/modules/wlan_ccmp/   (props changed)
  stable/8/sys/modules/wlan_rssadapt/   (props changed)
  stable/8/sys/modules/wlan_tkip/   (props changed)
  stable/8/sys/modules/wlan_wep/   (props changed)
  stable/8/sys/modules/wlan_xauth/   (props changed)
  stable/8/sys/modules/wpi/   (props changed)
  stable/8/sys/modules/wpifw/   (props changed)
  stable/8/sys/modules/xe/   (props changed)
  stable/8/sys/modules/xfs/   (props changed)
  stable/8/sys/modules/xl/   (props changed)
  stable/8/sys/modules/zfs/   (props changed)
  stable/8/sys/modules/zlib/   (props changed)
  stable/8/sys/net80211/   (props changed)
  stable/8/sys/net80211/_ieee80211.h   (props changed)
  stable/8/sys/net80211/ieee80211.c   (props changed)
  stable/8/sys/net80211/ieee80211.h   (props changed)
  stable/8/sys/net80211/ieee80211_acl.c   (props changed)
  stable/8/sys/net80211/ieee80211_action.c   (props changed)
  stable/8/sys/net80211/ieee80211_action.h   (props changed)
  stable/8/sys/net80211/ieee80211_adhoc.c   (props changed)
  stable/8/sys/net80211/ieee80211_adhoc.h   (props changed)
  stable/8/sys/net80211/ieee80211_ageq.c   (props changed)
  stable/8/sys/net80211/ieee80211_ageq.h   (props changed)
  stable/8/sys/net80211/ieee80211_amrr.c   (props changed)
  stable/8/sys/net80211/ieee80211_amrr.h   (props changed)
  stable/8/sys/net80211/ieee80211_crypto.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto.h   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_ccmp.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_none.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_tkip.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_wep.c   (props changed)
  stable/8/sys/net80211/ieee80211_ddb.c   (props changed)
  stable/8/sys/net80211/ieee80211_dfs.c   (props changed)
  stable/8/sys/net80211/ieee80211_dfs.h   (props changed)
  stable/8/sys/net80211/ieee80211_freebsd.c   (props changed)
  stable/8/sys/net80211/ieee80211_freebsd.h   (props changed)
  stable/8/sys/net80211/ieee80211_hostap.c   (props changed)
  stable/8/sys/net80211/ieee80211_hostap.h   (props changed)
  stable/8/sys/net80211/ieee80211_ht.c   (props changed)
  stable/8/sys/net80211/ieee80211_ht.h   (props changed)
  stable/8/sys/net80211/ieee80211_hwmp.c   (props changed)
  stable/8/sys/net80211/ieee80211_input.c   (props changed)
  stable/8/sys/net80211/ieee80211_input.h   (props changed)
  stable/8/sys/net80211/ieee80211_ioctl.c   (props changed)
  stable/8/sys/net80211/ieee80211_ioctl.h   (props changed)
  stable/8/sys/net80211/ieee80211_mesh.c   (props changed)
  stable/8/sys/net80211/ieee80211_mesh.h   (props changed)
  stable/8/sys/net80211/ieee80211_monitor.c   (props changed)
  stable/8/sys/net80211/ieee80211_monitor.h   (props changed)
  stable/8/sys/net80211/ieee80211_node.c   (props changed)
  stable/8/sys/net80211/ieee80211_node.h   (props changed)
  stable/8/sys/net80211/ieee80211_output.c   (props changed)
  stable/8/sys/net80211/ieee80211_phy.c   (props changed)
  stable/8/sys/net80211/ieee80211_phy.h   (props changed)
  stable/8/sys/net80211/ieee80211_power.c   (props changed)
  stable/8/sys/net80211/ieee80211_power.h   (props changed)
  stable/8/sys/net80211/ieee80211_proto.c   (props changed)
  stable/8/sys/net80211/ieee80211_proto.h   (props changed)
  stable/8/sys/net80211/ieee80211_radiotap.c   (props changed)
  stable/8/sys/net80211/ieee80211_radiotap.h   (props changed)
  stable/8/sys/net80211/ieee80211_regdomain.c   (props changed)
  stable/8/sys/net80211/ieee80211_regdomain.h   (props changed)
  stable/8/sys/net80211/ieee80211_rssadapt.c   (props changed)
  stable/8/sys/net80211/ieee80211_rssadapt.h   (props changed)
  stable/8/sys/net80211/ieee80211_scan.c   (props changed)
  stable/8/sys/net80211/ieee80211_scan.h   (props changed)
  stable/8/sys/net80211/ieee80211_scan_sta.c   (props changed)
  stable/8/sys/net80211/ieee80211_sta.c   (props changed)
  stable/8/sys/net80211/ieee80211_sta.h   (props changed)
  stable/8/sys/net80211/ieee80211_superg.c   (props changed)
  stable/8/sys/net80211/ieee80211_superg.h   (props changed)
  stable/8/sys/net80211/ieee80211_tdma.c   (props changed)
  stable/8/sys/net80211/ieee80211_tdma.h   (props changed)
  stable/8/sys/net80211/ieee80211_var.h   (props changed)
  stable/8/sys/net80211/ieee80211_wds.c   (props changed)
  stable/8/sys/net80211/ieee80211_wds.h   (props changed)
  stable/8/sys/net80211/ieee80211_xauth.c   (props changed)
  stable/8/sys/netatalk/   (props changed)
  stable/8/sys/netatalk/COPYRIGHT   (props changed)
  stable/8/sys/netatalk/aarp.c   (props changed)
  stable/8/sys/netatalk/aarp.h   (props changed)
  stable/8/sys/netatalk/at.h   (props changed)
  stable/8/sys/netatalk/at_control.c   (props changed)
  stable/8/sys/netatalk/at_extern.h   (props changed)
  stable/8/sys/netatalk/at_proto.c   (props changed)
  stable/8/sys/netatalk/at_rmx.c   (props changed)
  stable/8/sys/netatalk/at_var.h   (props changed)
  stable/8/sys/netatalk/ddp.h   (props changed)
  stable/8/sys/netatalk/ddp_input.c   (props changed)
  stable/8/sys/netatalk/ddp_output.c   (props changed)
  stable/8/sys/netatalk/ddp_pcb.c   (props changed)
  stable/8/sys/netatalk/ddp_pcb.h   (props changed)
  stable/8/sys/netatalk/ddp_usrreq.c   (props changed)
  stable/8/sys/netatalk/ddp_var.h   (props changed)
  stable/8/sys/netatalk/endian.h   (props changed)
  stable/8/sys/netatalk/phase2.h   (props changed)
  stable/8/sys/netgraph/   (props changed)
  stable/8/sys/netgraph/NOTES   (props changed)
  stable/8/sys/netgraph/atm/   (props changed)
  stable/8/sys/netgraph/bluetooth/   (props changed)
  stable/8/sys/netgraph/netflow/   (props changed)
  stable/8/sys/netgraph/netgraph.h   (props changed)
  stable/8/sys/netgraph/ng_UI.c   (props changed)
  stable/8/sys/netgraph/ng_UI.h   (props changed)
  stable/8/sys/netgraph/ng_async.c   (props changed)
  stable/8/sys/netgraph/ng_async.h   (props changed)
  stable/8/sys/netgraph/ng_atmllc.c   (props changed)
  stable/8/sys/netgraph/ng_atmllc.h   (props changed)
  stable/8/sys/netgraph/ng_base.c   (props changed)
  stable/8/sys/netgraph/ng_bpf.c   (props changed)
  stable/8/sys/netgraph/ng_bpf.h   (props changed)
  stable/8/sys/netgraph/ng_bridge.c   (props changed)
  stable/8/sys/netgraph/ng_bridge.h   (props changed)
  stable/8/sys/netgraph/ng_car.c   (props changed)
  stable/8/sys/netgraph/ng_car.h   (props changed)
  stable/8/sys/netgraph/ng_cisco.c   (props changed)
  stable/8/sys/netgraph/ng_cisco.h   (props changed)
  stable/8/sys/netgraph/ng_deflate.c   (props changed)
  stable/8/sys/netgraph/ng_deflate.h   (props changed)
  stable/8/sys/netgraph/ng_device.c   (props changed)
  stable/8/sys/netgraph/ng_device.h   (props changed)
  stable/8/sys/netgraph/ng_echo.c   (props changed)
  stable/8/sys/netgraph/ng_echo.h   (props changed)
  stable/8/sys/netgraph/ng_eiface.c   (props changed)
  stable/8/sys/netgraph/ng_eiface.h   (props changed)
  stable/8/sys/netgraph/ng_etf.c   (props changed)
  stable/8/sys/netgraph/ng_etf.h   (props changed)
  stable/8/sys/netgraph/ng_ether.c   (props changed)
  stable/8/sys/netgraph/ng_ether.h   (props changed)
  stable/8/sys/netgraph/ng_ether_echo.c   (props changed)
  stable/8/sys/netgraph/ng_ether_echo.h   (props changed)
  stable/8/sys/netgraph/ng_fec.c   (props changed)
  stable/8/sys/netgraph/ng_fec.h   (props changed)
  stable/8/sys/netgraph/ng_frame_relay.c   (props changed)
  stable/8/sys/netgraph/ng_frame_relay.h   (props changed)
  stable/8/sys/netgraph/ng_gif.c   (props changed)
  stable/8/sys/netgraph/ng_gif.h   (props changed)
  stable/8/sys/netgraph/ng_gif_demux.c   (props changed)
  stable/8/sys/netgraph/ng_gif_demux.h   (props changed)
  stable/8/sys/netgraph/ng_hole.c   (props changed)
  stable/8/sys/netgraph/ng_hole.h   (props changed)
  stable/8/sys/netgraph/ng_hub.c   (props changed)
  stable/8/sys/netgraph/ng_hub.h   (props changed)
  stable/8/sys/netgraph/ng_iface.c   (props changed)
  stable/8/sys/netgraph/ng_iface.h   (props changed)
  stable/8/sys/netgraph/ng_ip_input.c   (props changed)
  stable/8/sys/netgraph/ng_ip_input.h   (props changed)
  stable/8/sys/netgraph/ng_ipfw.c   (props changed)
  stable/8/sys/netgraph/ng_ipfw.h   (props changed)
  stable/8/sys/netgraph/ng_ksocket.c   (props changed)
  stable/8/sys/netgraph/ng_ksocket.h   (props changed)
  stable/8/sys/netgraph/ng_l2tp.c   (props changed)
  stable/8/sys/netgraph/ng_l2tp.h   (props changed)
  stable/8/sys/netgraph/ng_lmi.c   (props changed)
  stable/8/sys/netgraph/ng_lmi.h   (props changed)
  stable/8/sys/netgraph/ng_message.h   (props changed)
  stable/8/sys/netgraph/ng_mppc.c   (props changed)
  stable/8/sys/netgraph/ng_mppc.h   (props changed)
  stable/8/sys/netgraph/ng_nat.c   (props changed)
  stable/8/sys/netgraph/ng_nat.h   (props changed)
  stable/8/sys/netgraph/ng_one2many.c   (props changed)
  stable/8/sys/netgraph/ng_one2many.h   (props changed)
  stable/8/sys/netgraph/ng_parse.c   (props changed)
  stable/8/sys/netgraph/ng_parse.h   (props changed)
  stable/8/sys/netgraph/ng_pipe.c   (props changed)
  stable/8/sys/netgraph/ng_pipe.h   (props changed)
  stable/8/sys/netgraph/ng_ppp.c   (props changed)
  stable/8/sys/netgraph/ng_ppp.h   (props changed)
  stable/8/sys/netgraph/ng_pppoe.c   (props changed)
  stable/8/sys/netgraph/ng_pppoe.h   (props changed)
  stable/8/sys/netgraph/ng_pptpgre.c   (props changed)
  stable/8/sys/netgraph/ng_pptpgre.h   (props changed)
  stable/8/sys/netgraph/ng_pred1.c   (props changed)
  stable/8/sys/netgraph/ng_pred1.h   (props changed)
  stable/8/sys/netgraph/ng_rfc1490.c   (props changed)
  stable/8/sys/netgraph/ng_rfc1490.h   (props changed)
  stable/8/sys/netgraph/ng_sample.c   (props changed)
  stable/8/sys/netgraph/ng_sample.h   (props changed)
  stable/8/sys/netgraph/ng_socket.c   (props changed)
  stable/8/sys/netgraph/ng_socket.h   (props changed)
  stable/8/sys/netgraph/ng_socketvar.h   (props changed)
  stable/8/sys/netgraph/ng_source.c   (props changed)
  stable/8/sys/netgraph/ng_source.h   (props changed)
  stable/8/sys/netgraph/ng_split.c   (props changed)
  stable/8/sys/netgraph/ng_split.h   (props changed)
  stable/8/sys/netgraph/ng_sppp.c   (props changed)
  stable/8/sys/netgraph/ng_sppp.h   (props changed)
  stable/8/sys/netgraph/ng_tag.c   (props changed)
  stable/8/sys/netgraph/ng_tag.h   (props changed)
  stable/8/sys/netgraph/ng_tcpmss.c   (props changed)
  stable/8/sys/netgraph/ng_tcpmss.h   (props changed)
  stable/8/sys/netgraph/ng_tee.c   (props changed)
  stable/8/sys/netgraph/ng_tee.h   (props changed)
  stable/8/sys/netgraph/ng_tty.c   (props changed)
  stable/8/sys/netgraph/ng_tty.h   (props changed)
  stable/8/sys/netgraph/ng_vjc.c   (props changed)
  stable/8/sys/netgraph/ng_vjc.h   (props changed)
  stable/8/sys/netgraph/ng_vlan.c   (props changed)
  stable/8/sys/netgraph/ng_vlan.h   (props changed)
  stable/8/sys/netinet/   (props changed)
  stable/8/sys/netinet/accf_data.c   (props changed)
  stable/8/sys/netinet/accf_dns.c   (props changed)
  stable/8/sys/netinet/accf_http.c   (props changed)
  stable/8/sys/netinet/icmp6.h   (props changed)
  stable/8/sys/netinet/icmp_var.h   (props changed)
  stable/8/sys/netinet/if_atm.c   (props changed)
  stable/8/sys/netinet/if_atm.h   (props changed)
  stable/8/sys/netinet/if_ether.c   (props changed)
  stable/8/sys/netinet/if_ether.h   (props changed)
  stable/8/sys/netinet/igmp.c   (props changed)
  stable/8/sys/netinet/igmp.h   (props changed)
  stable/8/sys/netinet/igmp_var.h   (props changed)
  stable/8/sys/netinet/in.c   (props changed)
  stable/8/sys/netinet/in.h   (props changed)
  stable/8/sys/netinet/in_cksum.c   (props changed)
  stable/8/sys/netinet/in_gif.c   (props changed)
  stable/8/sys/netinet/in_gif.h   (props changed)
  stable/8/sys/netinet/in_pcb.c   (props changed)
  stable/8/sys/netinet/in_pcb.h   (props changed)
  stable/8/sys/netinet/in_proto.c   (props changed)
  stable/8/sys/netinet/in_rmx.c   (props changed)
  stable/8/sys/netinet/in_systm.h   (props changed)
  stable/8/sys/netinet/in_var.h   (props changed)
  stable/8/sys/netinet/ip.h   (props changed)
  stable/8/sys/netinet/ip6.h   (props changed)
  stable/8/sys/netinet/ip_carp.c   (props changed)
  stable/8/sys/netinet/ip_carp.h   (props changed)
  stable/8/sys/netinet/ip_divert.c   (props changed)
  stable/8/sys/netinet/ip_divert.h   (props changed)
  stable/8/sys/netinet/ip_dummynet.h   (props changed)
  stable/8/sys/netinet/ip_ecn.c   (props changed)
  stable/8/sys/netinet/ip_ecn.h   (props changed)
  stable/8/sys/netinet/ip_encap.c   (props changed)
  stable/8/sys/netinet/ip_encap.h   (props changed)
  stable/8/sys/netinet/ip_fastfwd.c   (props changed)
  stable/8/sys/netinet/ip_fw.h   (props changed)
  stable/8/sys/netinet/ip_gre.c   (props changed)
  stable/8/sys/netinet/ip_gre.h   (props changed)
  stable/8/sys/netinet/ip_icmp.c   (props changed)
  stable/8/sys/netinet/ip_icmp.h   (props changed)
  stable/8/sys/netinet/ip_id.c   (props changed)
  stable/8/sys/netinet/ip_input.c   (props changed)
  stable/8/sys/netinet/ip_ipsec.c   (props changed)
  stable/8/sys/netinet/ip_ipsec.h   (props changed)
  stable/8/sys/netinet/ip_mroute.c   (props changed)
  stable/8/sys/netinet/ip_mroute.h   (props changed)
  stable/8/sys/netinet/ip_options.c   (props changed)
  stable/8/sys/netinet/ip_options.h   (props changed)
  stable/8/sys/netinet/ip_output.c   (props changed)
  stable/8/sys/netinet/ip_var.h   (props changed)
  stable/8/sys/netinet/ipfw/   (props changed)
  stable/8/sys/netinet/libalias/   (props changed)
  stable/8/sys/netinet/pim.h   (props changed)
  stable/8/sys/netinet/pim_var.h   (props changed)
  stable/8/sys/netinet/raw_ip.c   (props changed)
  stable/8/sys/netinet/sctp.h   (props changed)
  stable/8/sys/netinet/sctp_asconf.c   (props changed)
  stable/8/sys/netinet/sctp_asconf.h   (props changed)
  stable/8/sys/netinet/sctp_auth.c   (props changed)
  stable/8/sys/netinet/sctp_auth.h   (props changed)
  stable/8/sys/netinet/sctp_bsd_addr.c   (props changed)
  stable/8/sys/netinet/sctp_bsd_addr.h   (props changed)
  stable/8/sys/netinet/sctp_cc_functions.c   (props changed)
  stable/8/sys/netinet/sctp_cc_functions.h   (props changed)
  stable/8/sys/netinet/sctp_constants.h   (props changed)
  stable/8/sys/netinet/sctp_crc32.c   (props changed)
  stable/8/sys/netinet/sctp_crc32.h   (props changed)
  stable/8/sys/netinet/sctp_header.h   (props changed)
  stable/8/sys/netinet/sctp_indata.c   (props changed)
  stable/8/sys/netinet/sctp_indata.h   (props changed)
  stable/8/sys/netinet/sctp_input.c   (props changed)
  stable/8/sys/netinet/sctp_input.h   (props changed)
  stable/8/sys/netinet/sctp_lock_bsd.h   (props changed)
  stable/8/sys/netinet/sctp_os.h   (props changed)
  stable/8/sys/netinet/sctp_os_bsd.h   (props changed)
  stable/8/sys/netinet/sctp_output.c   (props changed)
  stable/8/sys/netinet/sctp_output.h   (props changed)
  stable/8/sys/netinet/sctp_pcb.c   (props changed)
  stable/8/sys/netinet/sctp_pcb.h   (props changed)
  stable/8/sys/netinet/sctp_peeloff.c   (props changed)
  stable/8/sys/netinet/sctp_peeloff.h   (props changed)
  stable/8/sys/netinet/sctp_structs.h   (props changed)
  stable/8/sys/netinet/sctp_sysctl.c   (props changed)
  stable/8/sys/netinet/sctp_sysctl.h   (props changed)
  stable/8/sys/netinet/sctp_timer.c   (props changed)
  stable/8/sys/netinet/sctp_timer.h   (props changed)
  stable/8/sys/netinet/sctp_uio.h   (props changed)
  stable/8/sys/netinet/sctp_usrreq.c   (props changed)
  stable/8/sys/netinet/sctp_var.h   (props changed)
  stable/8/sys/netinet/sctputil.c   (props changed)
  stable/8/sys/netinet/sctputil.h   (props changed)
  stable/8/sys/netinet/tcp.h   (props changed)
  stable/8/sys/netinet/tcp_debug.c   (props changed)
  stable/8/sys/netinet/tcp_debug.h   (props changed)
  stable/8/sys/netinet/tcp_fsm.h   (props changed)
  stable/8/sys/netinet/tcp_hostcache.c   (props changed)
  stable/8/sys/netinet/tcp_hostcache.h   (props changed)
  stable/8/sys/netinet/tcp_input.c   (props changed)
  stable/8/sys/netinet/tcp_lro.c   (props changed)
  stable/8/sys/netinet/tcp_lro.h   (props changed)
  stable/8/sys/netinet/tcp_offload.c   (props changed)
  stable/8/sys/netinet/tcp_offload.h   (props changed)
  stable/8/sys/netinet/tcp_output.c   (props changed)
  stable/8/sys/netinet/tcp_reass.c   (props changed)
  stable/8/sys/netinet/tcp_sack.c   (props changed)
  stable/8/sys/netinet/tcp_seq.h   (props changed)
  stable/8/sys/netinet/tcp_subr.c   (props changed)
  stable/8/sys/netinet/tcp_syncache.c   (props changed)
  stable/8/sys/netinet/tcp_syncache.h   (props changed)
  stable/8/sys/netinet/tcp_timer.c   (props changed)
  stable/8/sys/netinet/tcp_timer.h   (props changed)
  stable/8/sys/netinet/tcp_timewait.c   (props changed)
  stable/8/sys/netinet/tcp_usrreq.c   (props changed)
  stable/8/sys/netinet/tcp_var.h   (props changed)
  stable/8/sys/netinet/tcpip.h   (props changed)
  stable/8/sys/netinet/toedev.h   (props changed)
  stable/8/sys/netinet/udp.h   (props changed)
  stable/8/sys/netinet/udp_usrreq.c   (props changed)
  stable/8/sys/netinet/udp_var.h   (props changed)
  stable/8/sys/netipsec/   (props changed)
  stable/8/sys/netipsec/ah.h   (props changed)
  stable/8/sys/netipsec/ah_var.h   (props changed)
  stable/8/sys/netipsec/esp.h   (props changed)
  stable/8/sys/netipsec/esp_var.h   (props changed)
  stable/8/sys/netipsec/ipcomp.h   (props changed)
  stable/8/sys/netipsec/ipcomp_var.h   (props changed)
  stable/8/sys/netipsec/ipip_var.h   (props changed)
  stable/8/sys/netipsec/ipsec.c   (props changed)
  stable/8/sys/netipsec/ipsec.h   (props changed)
  stable/8/sys/netipsec/ipsec6.h   (props changed)
  stable/8/sys/netipsec/ipsec_input.c   (props changed)
  stable/8/sys/netipsec/ipsec_mbuf.c   (props changed)
  stable/8/sys/netipsec/ipsec_output.c   (props changed)
  stable/8/sys/netipsec/key.c   (props changed)
  stable/8/sys/netipsec/key.h   (props changed)
  stable/8/sys/netipsec/key_debug.c   (props changed)
  stable/8/sys/netipsec/key_debug.h   (props changed)
  stable/8/sys/netipsec/key_var.h   (props changed)
  stable/8/sys/netipsec/keydb.h   (props changed)
  stable/8/sys/netipsec/keysock.c   (props changed)
  stable/8/sys/netipsec/keysock.h   (props changed)
  stable/8/sys/netipsec/xform.h   (props changed)
  stable/8/sys/netipsec/xform_ah.c   (props changed)
  stable/8/sys/netipsec/xform_esp.c   (props changed)
  stable/8/sys/netipsec/xform_ipcomp.c   (props changed)
  stable/8/sys/netipsec/xform_ipip.c   (props changed)
  stable/8/sys/netipsec/xform_tcp.c   (props changed)
  stable/8/sys/netipx/   (props changed)
  stable/8/sys/netipx/README   (props changed)
  stable/8/sys/netipx/ipx.c   (props changed)
  stable/8/sys/netipx/ipx.h   (props changed)
  stable/8/sys/netipx/ipx_cksum.c   (props changed)
  stable/8/sys/netipx/ipx_if.h   (props changed)
  stable/8/sys/netipx/ipx_input.c   (props changed)
  stable/8/sys/netipx/ipx_outputfl.c   (props changed)
  stable/8/sys/netipx/ipx_pcb.c   (props changed)
  stable/8/sys/netipx/ipx_pcb.h   (props changed)
  stable/8/sys/netipx/ipx_proto.c   (props changed)
  stable/8/sys/netipx/ipx_usrreq.c   (props changed)
  stable/8/sys/netipx/ipx_var.h   (props changed)
  stable/8/sys/netipx/spx.h   (props changed)
  stable/8/sys/netipx/spx_debug.c   (props changed)
  stable/8/sys/netipx/spx_debug.h   (props changed)
  stable/8/sys/netipx/spx_reass.c   (props changed)
  stable/8/sys/netipx/spx_timer.h   (props changed)
  stable/8/sys/netipx/spx_usrreq.c   (props changed)
  stable/8/sys/netipx/spx_var.h   (props changed)
  stable/8/sys/netnatm/   (props changed)
  stable/8/sys/netnatm/natm.c   (props changed)
  stable/8/sys/netnatm/natm.h   (props changed)
  stable/8/sys/netnatm/natm_pcb.c   (props changed)
  stable/8/sys/netnatm/natm_proto.c   (props changed)
  stable/8/sys/netncp/   (props changed)
  stable/8/sys/netncp/ncp.h   (props changed)
  stable/8/sys/netncp/ncp_cfg.h   (props changed)
  stable/8/sys/netncp/ncp_conn.c   (props changed)
  stable/8/sys/netncp/ncp_conn.h   (props changed)
  stable/8/sys/netncp/ncp_crypt.c   (props changed)
  stable/8/sys/netncp/ncp_file.h   (props changed)
  stable/8/sys/netncp/ncp_lib.h   (props changed)
  stable/8/sys/netncp/ncp_login.c   (props changed)
  stable/8/sys/netncp/ncp_mod.c   (props changed)
  stable/8/sys/netncp/ncp_ncp.c   (props changed)
  stable/8/sys/netncp/ncp_ncp.h   (props changed)
  stable/8/sys/netncp/ncp_nls.c   (props changed)
  stable/8/sys/netncp/ncp_nls.h   (props changed)
  stable/8/sys/netncp/ncp_rcfile.h   (props changed)
  stable/8/sys/netncp/ncp_rq.c   (props changed)
  stable/8/sys/netncp/ncp_rq.h   (props changed)
  stable/8/sys/netncp/ncp_sock.c   (props changed)
  stable/8/sys/netncp/ncp_sock.h   (props changed)
  stable/8/sys/netncp/ncp_subr.c   (props changed)
  stable/8/sys/netncp/ncp_subr.h   (props changed)
  stable/8/sys/netncp/ncp_user.h   (props changed)
  stable/8/sys/netncp/ncpio.h   (props changed)
  stable/8/sys/netncp/nwerror.h   (props changed)
  stable/8/sys/netsmb/   (props changed)
  stable/8/sys/netsmb/netbios.h   (props changed)
  stable/8/sys/netsmb/smb.h   (props changed)
  stable/8/sys/netsmb/smb_conn.c   (props changed)
  stable/8/sys/netsmb/smb_conn.h   (props changed)
  stable/8/sys/netsmb/smb_crypt.c   (props changed)
  stable/8/sys/netsmb/smb_dev.c   (props changed)
  stable/8/sys/netsmb/smb_dev.h   (props changed)
  stable/8/sys/netsmb/smb_iod.c   (props changed)
  stable/8/sys/netsmb/smb_rq.c   (props changed)
  stable/8/sys/netsmb/smb_rq.h   (props changed)
  stable/8/sys/netsmb/smb_smb.c   (props changed)
  stable/8/sys/netsmb/smb_subr.c   (props changed)
  stable/8/sys/netsmb/smb_subr.h   (props changed)
  stable/8/sys/netsmb/smb_tran.h   (props changed)
  stable/8/sys/netsmb/smb_trantcp.c   (props changed)
  stable/8/sys/netsmb/smb_trantcp.h   (props changed)
  stable/8/sys/netsmb/smb_usr.c   (props changed)
  stable/8/sys/nfs/   (props changed)
  stable/8/sys/nfs/nfs_common.c   (props changed)
  stable/8/sys/nfs/nfs_common.h   (props changed)
  stable/8/sys/nfs/nfs_nfssvc.c   (props changed)
  stable/8/sys/nfs/nfsproto.h   (props changed)
  stable/8/sys/nfs/nfssvc.h   (props changed)
  stable/8/sys/nfs/xdr_subs.h   (props changed)
  stable/8/sys/nfsclient/   (props changed)
  stable/8/sys/nfsclient/bootp_subr.c   (props changed)
  stable/8/sys/nfsclient/krpc.h   (props changed)
  stable/8/sys/nfsclient/krpc_subr.c   (props changed)
  stable/8/sys/nfsclient/nfs.h   (props changed)
  stable/8/sys/nfsclient/nfs_bio.c   (props changed)
  stable/8/sys/nfsclient/nfs_diskless.c   (props changed)
  stable/8/sys/nfsclient/nfs_kdtrace.c   (props changed)
  stable/8/sys/nfsclient/nfs_kdtrace.h   (props changed)
  stable/8/sys/nfsclient/nfs_krpc.c   (props changed)
  stable/8/sys/nfsclient/nfs_lock.c   (props changed)
  stable/8/sys/nfsclient/nfs_lock.h   (props changed)
  stable/8/sys/nfsclient/nfs_nfsiod.c   (props changed)
  stable/8/sys/nfsclient/nfs_node.c   (props changed)
  stable/8/sys/nfsclient/nfs_subs.c   (props changed)
  stable/8/sys/nfsclient/nfs_vfsops.c   (props changed)
  stable/8/sys/nfsclient/nfs_vnops.c   (props changed)
  stable/8/sys/nfsclient/nfsargs.h   (props changed)
  stable/8/sys/nfsclient/nfsdiskless.h   (props changed)
  stable/8/sys/nfsclient/nfsm_subs.h   (props changed)
  stable/8/sys/nfsclient/nfsmount.h   (props changed)
  stable/8/sys/nfsclient/nfsnode.h   (props changed)
  stable/8/sys/nfsclient/nfsstats.h   (props changed)
  stable/8/sys/nfsclient/nlminfo.h   (props changed)
  stable/8/sys/nfsserver/   (props changed)
  stable/8/sys/nfsserver/nfs.h   (props changed)
  stable/8/sys/nfsserver/nfs_fha.c   (props changed)
  stable/8/sys/nfsserver/nfs_fha.h   (props changed)
  stable/8/sys/nfsserver/nfs_serv.c   (props changed)
  stable/8/sys/nfsserver/nfs_srvkrpc.c   (props changed)
  stable/8/sys/nfsserver/nfs_srvsubs.c   (props changed)
  stable/8/sys/nfsserver/nfsm_subs.h   (props changed)
  stable/8/sys/nfsserver/nfsrvcache.h   (props changed)
  stable/8/sys/nfsserver/nfsrvstats.h   (props changed)
  stable/8/sys/nlm/   (props changed)
  stable/8/sys/nlm/nlm.h   (props changed)
  stable/8/sys/nlm/nlm_advlock.c   (props changed)
  stable/8/sys/nlm/nlm_prot.h   (props changed)
  stable/8/sys/nlm/nlm_prot_clnt.c   (props changed)
  stable/8/sys/nlm/nlm_prot_impl.c   (props changed)
  stable/8/sys/nlm/nlm_prot_server.c   (props changed)
  stable/8/sys/nlm/nlm_prot_svc.c   (props changed)
  stable/8/sys/nlm/nlm_prot_xdr.c   (props changed)
  stable/8/sys/nlm/sm_inter.h   (props changed)
  stable/8/sys/nlm/sm_inter_xdr.c   (props changed)
  stable/8/sys/opencrypto/   (props changed)
  stable/8/sys/opencrypto/cast.c   (props changed)
  stable/8/sys/opencrypto/cast.h   (props changed)
  stable/8/sys/opencrypto/castsb.h   (props changed)
  stable/8/sys/opencrypto/criov.c   (props changed)
  stable/8/sys/opencrypto/crypto.c   (props changed)
  stable/8/sys/opencrypto/cryptodev.c   (props changed)
  stable/8/sys/opencrypto/cryptodev.h   (props changed)
  stable/8/sys/opencrypto/cryptodev_if.m   (props changed)
  stable/8/sys/opencrypto/cryptosoft.c   (props changed)
  stable/8/sys/opencrypto/cryptosoft.h   (props changed)
  stable/8/sys/opencrypto/deflate.c   (props changed)
  stable/8/sys/opencrypto/deflate.h   (props changed)
  stable/8/sys/opencrypto/rmd160.c   (props changed)
  stable/8/sys/opencrypto/rmd160.h   (props changed)
  stable/8/sys/opencrypto/skipjack.c   (props changed)
  stable/8/sys/opencrypto/skipjack.h   (props changed)
  stable/8/sys/opencrypto/xform.c   (props changed)
  stable/8/sys/opencrypto/xform.h   (props changed)
  stable/8/sys/pc98/   (props changed)
  stable/8/sys/pc98/apm/   (props changed)
  stable/8/sys/pc98/cbus/   (props changed)
  stable/8/sys/pc98/compile/   (props changed)
  stable/8/sys/pc98/conf/   (props changed)
  stable/8/sys/pc98/include/   (props changed)
  stable/8/sys/pc98/linux/   (props changed)
  stable/8/sys/pc98/pc98/   (props changed)
  stable/8/sys/pci/   (props changed)
  stable/8/sys/pci/alpm.c   (props changed)
  stable/8/sys/pci/amdpm.c   (props changed)
  stable/8/sys/pci/amdsmb.c   (props changed)
  stable/8/sys/pci/if_rl.c   (props changed)
  stable/8/sys/pci/if_rlreg.h   (props changed)
  stable/8/sys/pci/intpm.c   (props changed)
  stable/8/sys/pci/intpmreg.h   (props changed)
  stable/8/sys/pci/locate.pl   (props changed)
  stable/8/sys/pci/ncr.c   (props changed)
  stable/8/sys/pci/ncrreg.h   (props changed)
  stable/8/sys/pci/nfsmb.c   (props changed)
  stable/8/sys/pci/viapm.c   (props changed)
  stable/8/sys/powerpc/   (props changed)
  stable/8/sys/powerpc/aim/   (props changed)
  stable/8/sys/powerpc/booke/   (props changed)
  stable/8/sys/powerpc/compile/   (props changed)
  stable/8/sys/powerpc/conf/   (props changed)
  stable/8/sys/powerpc/cpufreq/   (props changed)
  stable/8/sys/powerpc/fpu/   (props changed)
  stable/8/sys/powerpc/include/   (props changed)
  stable/8/sys/powerpc/mpc85xx/   (props changed)
  stable/8/sys/powerpc/ofw/   (props changed)
  stable/8/sys/powerpc/powermac/   (props changed)
  stable/8/sys/powerpc/powerpc/   (props changed)
  stable/8/sys/powerpc/psim/   (props changed)
  stable/8/sys/rpc/   (props changed)
  stable/8/sys/rpc/auth.h   (props changed)
  stable/8/sys/rpc/auth_none.c   (props changed)
  stable/8/sys/rpc/auth_unix.c   (props changed)
  stable/8/sys/rpc/authunix_prot.c   (props changed)
  stable/8/sys/rpc/clnt.h   (props changed)
  stable/8/sys/rpc/clnt_dg.c   (props changed)
  stable/8/sys/rpc/clnt_rc.c   (props changed)
  stable/8/sys/rpc/clnt_stat.h   (props changed)
  stable/8/sys/rpc/clnt_vc.c   (props changed)
  stable/8/sys/rpc/getnetconfig.c   (props changed)
  stable/8/sys/rpc/inet_ntop.c   (props changed)
  stable/8/sys/rpc/inet_pton.c   (props changed)
  stable/8/sys/rpc/netconfig.h   (props changed)
  stable/8/sys/rpc/nettype.h   (props changed)
  stable/8/sys/rpc/pmap_prot.h   (props changed)
  stable/8/sys/rpc/replay.c   (props changed)
  stable/8/sys/rpc/replay.h   (props changed)
  stable/8/sys/rpc/rpc.h   (props changed)
  stable/8/sys/rpc/rpc_callmsg.c   (props changed)
  stable/8/sys/rpc/rpc_com.h   (props changed)
  stable/8/sys/rpc/rpc_generic.c   (props changed)
  stable/8/sys/rpc/rpc_msg.h   (props changed)
  stable/8/sys/rpc/rpc_prot.c   (props changed)
  stable/8/sys/rpc/rpcb_clnt.c   (props changed)
  stable/8/sys/rpc/rpcb_clnt.h   (props changed)
  stable/8/sys/rpc/rpcb_prot.c   (props changed)
  stable/8/sys/rpc/rpcb_prot.h   (props changed)
  stable/8/sys/rpc/rpcm_subs.h   (props changed)
  stable/8/sys/rpc/rpcsec_gss/   (props changed)
  stable/8/sys/rpc/rpcsec_gss.h   (props changed)
  stable/8/sys/rpc/svc.c   (props changed)
  stable/8/sys/rpc/svc.h   (props changed)
  stable/8/sys/rpc/svc_auth.c   (props changed)
  stable/8/sys/rpc/svc_auth.h   (props changed)
  stable/8/sys/rpc/svc_auth_unix.c   (props changed)
  stable/8/sys/rpc/svc_dg.c   (props changed)
  stable/8/sys/rpc/svc_generic.c   (props changed)
  stable/8/sys/rpc/svc_vc.c   (props changed)
  stable/8/sys/rpc/types.h   (props changed)
  stable/8/sys/rpc/xdr.h   (props changed)
  stable/8/sys/security/   (props changed)
  stable/8/sys/security/audit/   (props changed)
  stable/8/sys/security/mac/   (props changed)
  stable/8/sys/security/mac_biba/   (props changed)
  stable/8/sys/security/mac_bsdextended/   (props changed)
  stable/8/sys/security/mac_ifoff/   (props changed)
  stable/8/sys/security/mac_lomac/   (props changed)
  stable/8/sys/security/mac_mls/   (props changed)
  stable/8/sys/security/mac_none/   (props changed)
  stable/8/sys/security/mac_partition/   (props changed)
  stable/8/sys/security/mac_portacl/   (props changed)
  stable/8/sys/security/mac_seeotheruids/   (props changed)
  stable/8/sys/security/mac_stub/   (props changed)
  stable/8/sys/security/mac_test/   (props changed)
  stable/8/sys/sparc64/   (props changed)
  stable/8/sys/sparc64/central/   (props changed)
  stable/8/sys/sparc64/compile/   (props changed)
  stable/8/sys/sparc64/conf/   (props changed)
  stable/8/sys/sparc64/ebus/   (props changed)
  stable/8/sys/sparc64/fhc/   (props changed)
  stable/8/sys/sparc64/include/   (props changed)
  stable/8/sys/sparc64/isa/   (props changed)
  stable/8/sys/sparc64/pci/   (props changed)
  stable/8/sys/sparc64/sbus/   (props changed)
  stable/8/sys/sparc64/sparc64/   (props changed)
  stable/8/sys/sun4v/   (props changed)
  stable/8/sys/sun4v/cddl/   (props changed)
  stable/8/sys/sun4v/compile/   (props changed)
  stable/8/sys/sun4v/conf/   (props changed)
  stable/8/sys/sun4v/include/   (props changed)
  stable/8/sys/sun4v/mdesc/   (props changed)
  stable/8/sys/sun4v/sun4v/   (props changed)
  stable/8/sys/sys/   (props changed)
  stable/8/sys/sys/_bus_dma.h   (props changed)
  stable/8/sys/sys/_iovec.h   (props changed)
  stable/8/sys/sys/_lock.h   (props changed)
  stable/8/sys/sys/_lockmgr.h   (props changed)
  stable/8/sys/sys/_mutex.h   (props changed)
  stable/8/sys/sys/_null.h   (props changed)
  stable/8/sys/sys/_pthreadtypes.h   (props changed)
  stable/8/sys/sys/_rmlock.h   (props changed)
  stable/8/sys/sys/_rwlock.h   (props changed)
  stable/8/sys/sys/_semaphore.h   (props changed)
  stable/8/sys/sys/_sigset.h   (props changed)
  stable/8/sys/sys/_stack.h   (props changed)
  stable/8/sys/sys/_sx.h   (props changed)
  stable/8/sys/sys/_task.h   (props changed)
  stable/8/sys/sys/_timespec.h   (props changed)
  stable/8/sys/sys/_timeval.h   (props changed)
  stable/8/sys/sys/_types.h   (props changed)
  stable/8/sys/sys/aac_ioctl.h   (props changed)
  stable/8/sys/sys/acct.h   (props changed)
  stable/8/sys/sys/acl.h   (props changed)
  stable/8/sys/sys/agpio.h   (props changed)
  stable/8/sys/sys/aio.h   (props changed)
  stable/8/sys/sys/alq.h   (props changed)
  stable/8/sys/sys/apm.h   (props changed)
  stable/8/sys/sys/assym.h   (props changed)
  stable/8/sys/sys/ata.h   (props changed)
  stable/8/sys/sys/bio.h   (props changed)
  stable/8/sys/sys/bitstring.h   (props changed)
  stable/8/sys/sys/blist.h   (props changed)
  stable/8/sys/sys/buf.h   (props changed)
  stable/8/sys/sys/buf_ring.h   (props changed)
  stable/8/sys/sys/bufobj.h   (props changed)
  stable/8/sys/sys/bus.h   (props changed)
  stable/8/sys/sys/bus_dma.h   (props changed)
  stable/8/sys/sys/callout.h   (props changed)
  stable/8/sys/sys/cdefs.h   (props changed)
  stable/8/sys/sys/cdio.h   (props changed)
  stable/8/sys/sys/cdrio.h   (props changed)
  stable/8/sys/sys/cfictl.h   (props changed)
  stable/8/sys/sys/chio.h   (props changed)
  stable/8/sys/sys/clock.h   (props changed)
  stable/8/sys/sys/condvar.h   (props changed)
  stable/8/sys/sys/conf.h   (props changed)
  stable/8/sys/sys/cons.h   (props changed)
  stable/8/sys/sys/consio.h   (props changed)
  stable/8/sys/sys/copyright.h   (props changed)
  stable/8/sys/sys/cpu.h   (props changed)
  stable/8/sys/sys/cpuctl.h   (props changed)
  stable/8/sys/sys/cpuset.h   (props changed)
  stable/8/sys/sys/ctype.h   (props changed)
  stable/8/sys/sys/dataacq.h   (props changed)
  stable/8/sys/sys/device_port.h   (props changed)
  stable/8/sys/sys/devicestat.h   (props changed)
  stable/8/sys/sys/digiio.h   (props changed)
  stable/8/sys/sys/dir.h   (props changed)
  stable/8/sys/sys/dirent.h   (props changed)
  stable/8/sys/sys/disk.h   (props changed)
  stable/8/sys/sys/disklabel.h   (props changed)
  stable/8/sys/sys/diskmbr.h   (props changed)
  stable/8/sys/sys/diskpc98.h   (props changed)
  stable/8/sys/sys/dkstat.h   (props changed)
  stable/8/sys/sys/domain.h   (props changed)
  stable/8/sys/sys/dtrace_bsd.h   (props changed)
  stable/8/sys/sys/dvdio.h   (props changed)
  stable/8/sys/sys/elf.h   (props changed)
  stable/8/sys/sys/elf32.h   (props changed)
  stable/8/sys/sys/elf64.h   (props changed)
  stable/8/sys/sys/elf_common.h   (props changed)
  stable/8/sys/sys/elf_generic.h   (props changed)
  stable/8/sys/sys/endian.h   (props changed)
  stable/8/sys/sys/errno.h   (props changed)
  stable/8/sys/sys/eui64.h   (props changed)
  stable/8/sys/sys/event.h   (props changed)
  stable/8/sys/sys/eventhandler.h   (props changed)
  stable/8/sys/sys/eventvar.h   (props changed)
  stable/8/sys/sys/exec.h   (props changed)
  stable/8/sys/sys/extattr.h   (props changed)
  stable/8/sys/sys/fail.h   (props changed)
  stable/8/sys/sys/fbio.h   (props changed)
  stable/8/sys/sys/fcntl.h   (props changed)
  stable/8/sys/sys/fdcio.h   (props changed)
  stable/8/sys/sys/file.h   (props changed)
  stable/8/sys/sys/filedesc.h   (props changed)
  stable/8/sys/sys/filio.h   (props changed)
  stable/8/sys/sys/firmware.h   (props changed)
  stable/8/sys/sys/fnv_hash.h   (props changed)
  stable/8/sys/sys/gmon.h   (props changed)
  stable/8/sys/sys/gpt.h   (props changed)
  stable/8/sys/sys/hash.h   (props changed)
  stable/8/sys/sys/iconv.h   (props changed)
  stable/8/sys/sys/imgact.h   (props changed)
  stable/8/sys/sys/imgact_aout.h   (props changed)
  stable/8/sys/sys/imgact_elf.h   (props changed)
  stable/8/sys/sys/inflate.h   (props changed)
  stable/8/sys/sys/interrupt.h   (props changed)
  stable/8/sys/sys/ioccom.h   (props changed)
  stable/8/sys/sys/ioctl.h   (props changed)
  stable/8/sys/sys/ioctl_compat.h   (props changed)
  stable/8/sys/sys/ipc.h   (props changed)
  stable/8/sys/sys/ipmi.h   (props changed)
  stable/8/sys/sys/jail.h   (props changed)
  stable/8/sys/sys/joystick.h   (props changed)
  stable/8/sys/sys/kbio.h   (props changed)
  stable/8/sys/sys/kdb.h   (props changed)
  stable/8/sys/sys/kenv.h   (props changed)
  stable/8/sys/sys/kernel.h   (props changed)
  stable/8/sys/sys/kerneldump.h   (props changed)
  stable/8/sys/sys/kobj.h   (props changed)
  stable/8/sys/sys/ksem.h   (props changed)
  stable/8/sys/sys/ksyms.h   (props changed)
  stable/8/sys/sys/kthread.h   (props changed)
  stable/8/sys/sys/ktr.h   (props changed)
  stable/8/sys/sys/ktrace.h   (props changed)
  stable/8/sys/sys/libkern.h   (props changed)
  stable/8/sys/sys/limits.h   (props changed)
  stable/8/sys/sys/link_aout.h   (props changed)
  stable/8/sys/sys/link_elf.h   (props changed)
  stable/8/sys/sys/linker.h   (props changed)
  stable/8/sys/sys/linker_set.h   (props changed)
  stable/8/sys/sys/lock.h   (props changed)
  stable/8/sys/sys/lock_profile.h   (props changed)
  stable/8/sys/sys/lockf.h   (props changed)
  stable/8/sys/sys/lockmgr.h   (props changed)
  stable/8/sys/sys/lockstat.h   (props changed)
  stable/8/sys/sys/mac.h   (props changed)
  stable/8/sys/sys/malloc.h   (props changed)
  stable/8/sys/sys/mbpool.h   (props changed)
  stable/8/sys/sys/mbuf.h   (props changed)
  stable/8/sys/sys/mchain.h   (props changed)
  stable/8/sys/sys/md4.h   (props changed)
  stable/8/sys/sys/md5.h   (props changed)
  stable/8/sys/sys/mdioctl.h   (props changed)
  stable/8/sys/sys/memrange.h   (props changed)
  stable/8/sys/sys/mman.h   (props changed)
  stable/8/sys/sys/module.h   (props changed)
  stable/8/sys/sys/mount.h   (props changed)
  stable/8/sys/sys/mouse.h   (props changed)
  stable/8/sys/sys/mpt_ioctl.h   (props changed)
  stable/8/sys/sys/mqueue.h   (props changed)
  stable/8/sys/sys/msg.h   (props changed)
  stable/8/sys/sys/msgbuf.h   (props changed)
  stable/8/sys/sys/mtio.h   (props changed)
  stable/8/sys/sys/mutex.h   (props changed)
  stable/8/sys/sys/namei.h   (props changed)
  stable/8/sys/sys/nlist_aout.h   (props changed)
  stable/8/sys/sys/osd.h   (props changed)
  stable/8/sys/sys/param.h   (props changed)
  stable/8/sys/sys/pciio.h   (props changed)
  stable/8/sys/sys/pcpu.h   (props changed)
  stable/8/sys/sys/pioctl.h   (props changed)
  stable/8/sys/sys/pipe.h   (props changed)
  stable/8/sys/sys/pmc.h   (props changed)
  stable/8/sys/sys/pmckern.h   (props changed)
  stable/8/sys/sys/pmclog.h   (props changed)
  stable/8/sys/sys/poll.h   (props changed)
  stable/8/sys/sys/posix4.h   (props changed)
  stable/8/sys/sys/power.h   (props changed)
  stable/8/sys/sys/priority.h   (props changed)
  stable/8/sys/sys/priv.h   (props changed)
  stable/8/sys/sys/proc.h   (props changed)
  stable/8/sys/sys/procfs.h   (props changed)
  stable/8/sys/sys/protosw.h   (props changed)
  stable/8/sys/sys/ptio.h   (props changed)
  stable/8/sys/sys/ptrace.h   (props changed)
  stable/8/sys/sys/queue.h   (props changed)
  stable/8/sys/sys/random.h   (props changed)
  stable/8/sys/sys/reboot.h   (props changed)
  stable/8/sys/sys/refcount.h   (props changed)
  stable/8/sys/sys/regression.h   (props changed)
  stable/8/sys/sys/resource.h   (props changed)
  stable/8/sys/sys/resourcevar.h   (props changed)
  stable/8/sys/sys/rman.h   (props changed)
  stable/8/sys/sys/rmlock.h   (props changed)
  stable/8/sys/sys/rtprio.h   (props changed)
  stable/8/sys/sys/runq.h   (props changed)
  stable/8/sys/sys/rwlock.h   (props changed)
  stable/8/sys/sys/sbuf.h   (props changed)
  stable/8/sys/sys/sched.h   (props changed)
  stable/8/sys/sys/sdt.h   (props changed)
  stable/8/sys/sys/select.h   (props changed)
  stable/8/sys/sys/selinfo.h   (props changed)
  stable/8/sys/sys/sem.h   (props changed)
  stable/8/sys/sys/sema.h   (props changed)
  stable/8/sys/sys/semaphore.h   (props changed)
  stable/8/sys/sys/serial.h   (props changed)
  stable/8/sys/sys/sf_buf.h   (props changed)
  stable/8/sys/sys/sglist.h   (props changed)
  stable/8/sys/sys/shm.h   (props changed)
  stable/8/sys/sys/sigio.h   (props changed)
  stable/8/sys/sys/signal.h   (props changed)
  stable/8/sys/sys/signalvar.h   (props changed)
  stable/8/sys/sys/sleepqueue.h   (props changed)
  stable/8/sys/sys/smp.h   (props changed)
  stable/8/sys/sys/snoop.h   (props changed)
  stable/8/sys/sys/sockbuf.h   (props changed)
  stable/8/sys/sys/socket.h   (props changed)
  stable/8/sys/sys/socketvar.h   (props changed)
  stable/8/sys/sys/sockio.h   (props changed)
  stable/8/sys/sys/sockopt.h   (props changed)
  stable/8/sys/sys/sockstate.h   (props changed)
  stable/8/sys/sys/soundcard.h   (props changed)
  stable/8/sys/sys/stack.h   (props changed)
  stable/8/sys/sys/stat.h   (props changed)
  stable/8/sys/sys/statvfs.h   (props changed)
  stable/8/sys/sys/stddef.h   (props changed)
  stable/8/sys/sys/stdint.h   (props changed)
  stable/8/sys/sys/sun_disklabel.h   (props changed)
  stable/8/sys/sys/sx.h   (props changed)
  stable/8/sys/sys/syscall.h   (props changed)
  stable/8/sys/sys/syscall.mk   (props changed)
  stable/8/sys/sys/syscallsubr.h   (props changed)
  stable/8/sys/sys/sysctl.h   (props changed)
  stable/8/sys/sys/sysent.h   (props changed)
  stable/8/sys/sys/syslimits.h   (props changed)
  stable/8/sys/sys/syslog.h   (props changed)
  stable/8/sys/sys/sysproto.h   (props changed)
  stable/8/sys/sys/systm.h   (props changed)
  stable/8/sys/sys/taskqueue.h   (props changed)
  stable/8/sys/sys/termios.h   (props changed)
  stable/8/sys/sys/thr.h   (props changed)
  stable/8/sys/sys/tiio.h   (props changed)
  stable/8/sys/sys/time.h   (props changed)
  stable/8/sys/sys/timeb.h   (props changed)
  stable/8/sys/sys/timepps.h   (props changed)
  stable/8/sys/sys/timers.h   (props changed)
  stable/8/sys/sys/times.h   (props changed)
  stable/8/sys/sys/timespec.h   (props changed)
  stable/8/sys/sys/timetc.h   (props changed)
  stable/8/sys/sys/timex.h   (props changed)
  stable/8/sys/sys/tree.h   (props changed)
  stable/8/sys/sys/tty.h   (props changed)
  stable/8/sys/sys/ttycom.h   (props changed)
  stable/8/sys/sys/ttydefaults.h   (props changed)
  stable/8/sys/sys/ttydevsw.h   (props changed)
  stable/8/sys/sys/ttydisc.h   (props changed)
  stable/8/sys/sys/ttyhook.h   (props changed)
  stable/8/sys/sys/ttyqueue.h   (props changed)
  stable/8/sys/sys/turnstile.h   (props changed)
  stable/8/sys/sys/types.h   (props changed)
  stable/8/sys/sys/ucontext.h   (props changed)
  stable/8/sys/sys/ucred.h   (props changed)
  stable/8/sys/sys/uio.h   (props changed)
  stable/8/sys/sys/umtx.h   (props changed)
  stable/8/sys/sys/un.h   (props changed)
  stable/8/sys/sys/unistd.h   (props changed)
  stable/8/sys/sys/unpcb.h   (props changed)
  stable/8/sys/sys/user.h   (props changed)
  stable/8/sys/sys/utsname.h   (props changed)
  stable/8/sys/sys/uuid.h   (props changed)
  stable/8/sys/sys/vmmeter.h   (props changed)
  stable/8/sys/sys/vnode.h   (props changed)
  stable/8/sys/sys/vtoc.h   (props changed)
  stable/8/sys/sys/wait.h   (props changed)
  stable/8/sys/sys/watchdog.h   (props changed)
  stable/8/sys/tools/   (props changed)
  stable/8/sys/tools/acpi_quirks2h.awk   (props changed)
  stable/8/sys/tools/bus_macro.sh   (props changed)
  stable/8/sys/tools/embed_mfs.sh   (props changed)
  stable/8/sys/tools/fw_stub.awk   (props changed)
  stable/8/sys/tools/makeobjops.awk   (props changed)
  stable/8/sys/tools/miidevs2h.awk   (props changed)
  stable/8/sys/tools/pccarddevs2h.awk   (props changed)
  stable/8/sys/tools/sound/   (props changed)
  stable/8/sys/tools/usbdevs2h.awk   (props changed)
  stable/8/sys/tools/vnode_if.awk   (props changed)
  stable/8/sys/ufs/   (props changed)
  stable/8/sys/ufs/ffs/   (props changed)
  stable/8/sys/ufs/ufs/   (props changed)
  stable/8/sys/vm/   (props changed)
  stable/8/sys/vm/default_pager.c   (props changed)
  stable/8/sys/vm/device_pager.c   (props changed)
  stable/8/sys/vm/memguard.c   (props changed)
  stable/8/sys/vm/memguard.h   (props changed)
  stable/8/sys/vm/phys_pager.c   (props changed)
  stable/8/sys/vm/pmap.h   (props changed)
  stable/8/sys/vm/redzone.c   (props changed)
  stable/8/sys/vm/redzone.h   (props changed)
  stable/8/sys/vm/sg_pager.c   (props changed)
  stable/8/sys/vm/swap_pager.c   (props changed)
  stable/8/sys/vm/swap_pager.h   (props changed)
  stable/8/sys/vm/uma.h   (props changed)
  stable/8/sys/vm/uma_core.c   (props changed)
  stable/8/sys/vm/uma_dbg.c   (props changed)
  stable/8/sys/vm/uma_dbg.h   (props changed)
  stable/8/sys/vm/uma_int.h   (props changed)
  stable/8/sys/vm/vm.h   (props changed)
  stable/8/sys/vm/vm_contig.c   (props changed)
  stable/8/sys/vm/vm_extern.h   (props changed)
  stable/8/sys/vm/vm_fault.c   (props changed)
  stable/8/sys/vm/vm_glue.c   (props changed)
  stable/8/sys/vm/vm_init.c   (props changed)
  stable/8/sys/vm/vm_kern.c   (props changed)
  stable/8/sys/vm/vm_kern.h   (props changed)
  stable/8/sys/vm/vm_map.c   (props changed)
  stable/8/sys/vm/vm_map.h   (props changed)
  stable/8/sys/vm/vm_meter.c   (props changed)
  stable/8/sys/vm/vm_mmap.c   (props changed)
  stable/8/sys/vm/vm_object.c   (props changed)
  stable/8/sys/vm/vm_object.h   (props changed)
  stable/8/sys/vm/vm_page.c   (props changed)
  stable/8/sys/vm/vm_page.h   (props changed)
  stable/8/sys/vm/vm_pageout.c   (props changed)
  stable/8/sys/vm/vm_pageout.h   (props changed)
  stable/8/sys/vm/vm_pager.c   (props changed)
  stable/8/sys/vm/vm_pager.h   (props changed)
  stable/8/sys/vm/vm_param.h   (props changed)
  stable/8/sys/vm/vm_phys.c   (props changed)
  stable/8/sys/vm/vm_phys.h   (props changed)
  stable/8/sys/vm/vm_reserv.c   (props changed)
  stable/8/sys/vm/vm_reserv.h   (props changed)
  stable/8/sys/vm/vm_unix.c   (props changed)
  stable/8/sys/vm/vm_zeroidle.c   (props changed)
  stable/8/sys/vm/vnode_pager.c   (props changed)
  stable/8/sys/vm/vnode_pager.h   (props changed)
  stable/8/sys/xdr/   (props changed)
  stable/8/sys/xdr/xdr.c   (props changed)
  stable/8/sys/xdr/xdr_array.c   (props changed)
  stable/8/sys/xdr/xdr_mbuf.c   (props changed)
  stable/8/sys/xdr/xdr_mem.c   (props changed)
  stable/8/sys/xdr/xdr_reference.c   (props changed)
  stable/8/sys/xdr/xdr_sizeof.c   (props changed)
  stable/8/sys/xen/   (props changed)
  stable/8/sys/xen/evtchn/   (props changed)
  stable/8/sys/xen/evtchn.h   (props changed)
  stable/8/sys/xen/features.c   (props changed)
  stable/8/sys/xen/features.h   (props changed)
  stable/8/sys/xen/gnttab.c   (props changed)
  stable/8/sys/xen/gnttab.h   (props changed)
  stable/8/sys/xen/hypervisor.h   (props changed)
  stable/8/sys/xen/interface/   (props changed)
  stable/8/sys/xen/reboot.c   (props changed)
  stable/8/sys/xen/xen_intr.h   (props changed)
  stable/8/sys/xen/xenbus/   (props changed)

Modified: stable/8/sys/netinet/in_mcast.c
==============================================================================
--- stable/8/sys/netinet/in_mcast.c	Fri Nov 20 11:58:04 2009	(r199577)
+++ stable/8/sys/netinet/in_mcast.c	Fri Nov 20 12:30:40 2009	(r199578)
@@ -1966,7 +1966,7 @@ inp_join_group(struct inpcb *inp, struct
 		imf = &imo->imo_mfilters[idx];
 		if (ssa->ss.ss_family != AF_UNSPEC) {
 			/*
-			 * MCAST_JOIN_SOURCE on an exclusive membership
+			 * MCAST_JOIN_SOURCE_GROUP on an exclusive membership
 			 * is an error. On an existing inclusive membership,
 			 * it just adds the source to the filter list.
 			 */

Modified: stable/8/sys/netinet6/in6_mcast.c
==============================================================================
--- stable/8/sys/netinet6/in6_mcast.c	Fri Nov 20 11:58:04 2009	(r199577)
+++ stable/8/sys/netinet6/in6_mcast.c	Fri Nov 20 12:30:40 2009	(r199578)
@@ -1814,6 +1814,7 @@ in6p_join_group(struct inpcb *inp, struc
 
 	ifp = NULL;
 	imf = NULL;
+	lims = NULL;
 	error = 0;
 	is_new = 0;
 
@@ -1917,11 +1918,6 @@ in6p_join_group(struct inpcb *inp, struc
 	 */
 	(void)in6_setscope(&gsa->sin6.sin6_addr, ifp, NULL);
 
-	/*
-	 * MCAST_JOIN_SOURCE on an exclusive membership is an error.
-	 * On an existing inclusive membership, it just adds the
-	 * source to the filter list.
-	 */
 	imo = in6p_findmoptions(inp);
 	idx = im6o_match_group(imo, ifp, &gsa->sa);
 	if (idx == -1) {
@@ -1929,16 +1925,53 @@ in6p_join_group(struct inpcb *inp, struc
 	} else {
 		inm = imo->im6o_membership[idx];
 		imf = &imo->im6o_mfilters[idx];
-		if (ssa->ss.ss_family != AF_UNSPEC &&
-		    imf->im6f_st[1] != MCAST_INCLUDE) {
+		if (ssa->ss.ss_family != AF_UNSPEC) {
+			/*
+			 * MCAST_JOIN_SOURCE_GROUP on an exclusive membership
+			 * is an error. On an existing inclusive membership,
+			 * it just adds the source to the filter list.
+			 */
+			if (imf->im6f_st[1] != MCAST_INCLUDE) {
+				error = EINVAL;
+				goto out_in6p_locked;
+			}
+			/*
+			 * Throw out duplicates.
+			 *
+			 * XXX FIXME: This makes a naive assumption that
+			 * even if entries exist for *ssa in this imf,
+			 * they will be rejected as dupes, even if they
+			 * are not valid in the current mode (in-mode).
+			 *
+			 * in6_msource is transactioned just as for anything
+			 * else in SSM -- but note naive use of in6m_graft()
+			 * below for allocating new filter entries.
+			 *
+			 * This is only an issue if someone mixes the
+			 * full-state SSM API with the delta-based API,
+			 * which is discouraged in the relevant RFCs.
+			 */
+			lims = im6o_match_source(imo, idx, &ssa->sa);
+			if (lims != NULL /*&&
+			    lims->im6sl_st[1] == MCAST_INCLUDE*/) {
+				error = EADDRNOTAVAIL;
+				goto out_in6p_locked;
+			}
+		} else {
+			/*
+			 * MCAST_JOIN_GROUP alone, on any existing membership,
+			 * is rejected, to stop the same inpcb tying up
+			 * multiple refs to the in_multi.
+			 * On an existing inclusive membership, this is also
+			 * an error; if you want to change filter mode,
+			 * you must use the userland API setsourcefilter().
+			 * XXX We don't reject this for imf in UNDEFINED
+			 * state at t1, because allocation of a filter
+			 * is atomic with allocation of a membership.
+			 */
 			error = EINVAL;
 			goto out_in6p_locked;
 		}
-		lims = im6o_match_source(imo, idx, &ssa->sa);
-		if (lims != NULL) {
-			error = EADDRNOTAVAIL;
-			goto out_in6p_locked;
-		}
 	}
 
 	/*
@@ -1970,7 +2003,13 @@ in6p_join_group(struct inpcb *inp, struc
 	/*
 	 * Graft new source into filter list for this inpcb's
 	 * membership of the group. The in6_multi may not have
-	 * been allocated yet if this is a new membership.
+	 * been allocated yet if this is a new membership, however,
+	 * the in_mfilter slot will be allocated and must be initialized.
+	 *
+	 * Note: Grafting of exclusive mode filters doesn't happen
+	 * in this path.
+	 * XXX: Should check for non-NULL lims (node exists but may
+	 * not be in-mode) for interop with full-state API.
 	 */
 	if (ssa->ss.ss_family != AF_UNSPEC) {
 		/* Membership starts in IN mode */
@@ -1987,6 +2026,12 @@ in6p_join_group(struct inpcb *inp, struc
 			error = ENOMEM;
 			goto out_im6o_free;
 		}
+	} else {
+		/* No address specified; Membership starts in EX mode */
+		if (is_new) {
+			CTR1(KTR_MLD, "%s: new join w/o source", __func__);
+			im6f_init(imf, MCAST_UNDEFINED, MCAST_EXCLUDE);
+		}
 	}
 
 	/*
@@ -2272,8 +2317,10 @@ out_im6f_rollback:
 
 	if (is_final) {
 		/* Remove the gap in the membership array. */
-		for (++idx; idx < imo->im6o_num_memberships; ++idx)
+		for (++idx; idx < imo->im6o_num_memberships; ++idx) {
 			imo->im6o_membership[idx-1] = imo->im6o_membership[idx];
+			imo->im6o_mfilters[idx-1] = imo->im6o_mfilters[idx];
+		}
 		imo->im6o_num_memberships--;
 	}
 
@@ -2340,9 +2387,11 @@ in6p_set_source_filters(struct inpcb *in
 	if (error)
 		return (error);
 
-	if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc ||
-	    (msfr.msfr_fmode != MCAST_EXCLUDE &&
-	     msfr.msfr_fmode != MCAST_INCLUDE))
+	if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc)
+		return (ENOBUFS);
+
+	if (msfr.msfr_fmode != MCAST_EXCLUDE &&
+	    msfr.msfr_fmode != MCAST_INCLUDE)
 		return (EINVAL);
 
 	if (msfr.msfr_group.ss_family != AF_INET6 ||

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 12:48:36 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 877301065670;
	Fri, 20 Nov 2009 12:48:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 75DB18FC18;
	Fri, 20 Nov 2009 12:48:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKCmaZY044085;
	Fri, 20 Nov 2009 12:48:36 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKCma12044082;
	Fri, 20 Nov 2009 12:48:36 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911201248.nAKCma12044082@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 20 Nov 2009 12:48:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199579 - head/sys/boot/i386/zfsboot
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 12:48:36 -0000

Author: jhb
Date: Fri Nov 20 12:48:35 2009
New Revision: 199579
URL: http://svn.freebsd.org/changeset/base/199579

Log:
  Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
  fully support booting from large volumes.
  
  Tested by:	Emil Smolenski  ambsd of raisa.eu.org
  Submitted by:	Matt Reimer  mattjreimer of gmail (most of the C bits)
  MFC after:	1 week

Modified:
  head/sys/boot/i386/zfsboot/zfsboot.c
  head/sys/boot/i386/zfsboot/zfsldr.S

Modified: head/sys/boot/i386/zfsboot/zfsboot.c
==============================================================================
--- head/sys/boot/i386/zfsboot/zfsboot.c	Fri Nov 20 12:30:40 2009	(r199578)
+++ head/sys/boot/i386/zfsboot/zfsboot.c	Fri Nov 20 12:48:35 2009	(r199579)
@@ -138,8 +138,8 @@ struct dsk {
     unsigned unit;
     unsigned slice;
     unsigned part;
-    unsigned start;
     int init;
+    daddr_t start;
 };
 static char cmd[512];
 static char kname[1024];
@@ -163,7 +163,7 @@ static int parse(void);
 static void printf(const char *,...);
 static void putchar(int);
 static uint32_t memsize(void);
-static int drvread(struct dsk *, void *, unsigned, unsigned);
+static int drvread(struct dsk *, void *, daddr_t, unsigned);
 static int keyhit(unsigned);
 static int xputc(int);
 static int xgetc(int);
@@ -310,7 +310,8 @@ static int
 vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes)
 {
 	char *p;
-	unsigned int lba, nb;
+	daddr_t lba;
+	unsigned int nb;
 	struct dsk *dsk = (struct dsk *) priv;
 
 	if ((off & (DEV_BSIZE - 1)) || (bytes & (DEV_BSIZE - 1)))
@@ -964,7 +965,7 @@ static struct {
 #endif
 
 static int
-drvread(struct dsk *dsk, void *buf, unsigned lba, unsigned nblk)
+drvread(struct dsk *dsk, void *buf, daddr_t lba, unsigned nblk)
 {
 #ifdef GPT
     static unsigned c = 0x2d5c7c2f;
@@ -999,7 +1000,7 @@ drvread(struct dsk *dsk, void *buf, unsi
     v86.es = VTOPSEG(buf);
     v86.eax = lba;
     v86.ebx = VTOPOFF(buf);
-    v86.ecx = lba >> 16;
+    v86.ecx = lba >> 32;
     v86.edx = nblk << 8 | dsk->drive;
     v86int();
     v86.ctl = V86_FLAGS;

Modified: head/sys/boot/i386/zfsboot/zfsldr.S
==============================================================================
--- head/sys/boot/i386/zfsboot/zfsldr.S	Fri Nov 20 12:30:40 2009	(r199578)
+++ head/sys/boot/i386/zfsboot/zfsldr.S	Fri Nov 20 12:48:35 2009	(r199579)
@@ -83,7 +83,7 @@ ebpb:		.byte	0		# BIOS physical drive nu
  * Trampoline used by boot2 to call read to read data from the disk via
  * the BIOS.  Call with:
  *
- * %cx:%ax	- long    - LBA to read in
+ * %ecx:%eax	- long    - LBA to read in
  * %es:(%bx)	- caddr_t - buffer to read data into
  * %dl		- byte    - drive to read from
  * %dh		- byte    - num sectors to read
@@ -94,10 +94,8 @@ xread:		push %ss			# Address
 /*
  * Setup an EDD disk packet and pass it to read
  */
-xread.1:					# Starting
-		pushl $0x0			#  absolute
-		push %cx			#  block
-		push %ax			#  number
+xread.1:	pushl %ecx			# Starting absolute block
+		pushl %eax			#  block number
 		push %es			# Address of
 		push %bx			#  transfer buffer
 		xor %ax,%ax			# Number of
@@ -195,7 +193,7 @@ main.4: 	xor %dx,%dx			# Partition:drive
  */
 main.5: 	mov %dx,MEM_ARG			# Save args
 		movb $NSECT,%dh			# Sector count
-		movw $1024,%ax			# Offset to boot2
+		movl $1024,%eax			# Offset to boot2
 		callw nread.1			# Read disk
 main.6:		mov $MEM_BUF,%si		# BTX (before reloc)
 		mov 0xa(%si),%bx		# Get BTX length and set
@@ -245,10 +243,11 @@ seta20.3:	sti				# Enable interrupts
 /*
  * Trampoline used to call read from within boot1.
  */
-nread:		xor %ax,%ax			# Sector offset in partition
+nread:		xor %eax,%eax			# Sector offset in partition
 nread.1:	mov $MEM_BUF,%bx		# Transfer buffer
-		add 0x8(%si),%ax		# Get
-		mov 0xa(%si),%cx		#  LBA
+		xor %ecx,%ecx			# Get
+		addl 0x8(%si),%eax		#  LBA
+		adc $0,%ecx
 		push %cs			# Read from
 		callw xread.1	 		#  disk
 		jnc return			# If success, return

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 13:28:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 456FC106577B;
	Fri, 20 Nov 2009 13:28:07 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 345388FC13;
	Fri, 20 Nov 2009 13:28:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKDS7wd044942;
	Fri, 20 Nov 2009 13:28:07 GMT (envelope-from raj@svn.freebsd.org)
Received: (from raj@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKDS7vd044940;
	Fri, 20 Nov 2009 13:28:07 GMT (envelope-from raj@svn.freebsd.org)
Message-Id: <200911201328.nAKDS7vd044940@svn.freebsd.org>
From: Rafal Jaworowski 
Date: Fri, 20 Nov 2009 13:28:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199580 - head/sys/dev/tsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 13:28:07 -0000

Author: raj
Date: Fri Nov 20 13:28:06 2009
New Revision: 199580
URL: http://svn.freebsd.org/changeset/base/199580

Log:
  tsec: Use IFQ_DRV macros for managing interface packet queue.
  
  This lets tsec(4) work with ALTQ.
  
  Submitted by:	Marcin Ligenza
  MFC after:	1 week

Modified:
  head/sys/dev/tsec/if_tsec.c

Modified: head/sys/dev/tsec/if_tsec.c
==============================================================================
--- head/sys/dev/tsec/if_tsec.c	Fri Nov 20 12:48:35 2009	(r199579)
+++ head/sys/dev/tsec/if_tsec.c	Fri Nov 20 13:28:06 2009	(r199580)
@@ -716,9 +716,9 @@ tsec_start_locked(struct ifnet *ifp)
 	bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap,
 	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 
-	for (;;) {
+	while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
 		/* Get packet from the queue */
-		IF_DEQUEUE(&ifp->if_snd, m0);
+		IFQ_DRV_DEQUEUE(&ifp->if_snd, m0);
 		if (m0 == NULL)
 			break;
 
@@ -755,7 +755,7 @@ tsec_start_locked(struct ifnet *ifp)
 			m0 = mtmp;
 
 		if (tsec_encap(sc, m0, fcb_inserted)) {
-			IF_PREPEND(&ifp->if_snd, m0);
+			IFQ_DRV_PREPEND(&ifp->if_snd, m0);
 			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 			break;
 		}

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 14:41:37 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D08D61065670;
	Fri, 20 Nov 2009 14:41:37 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D33D8FC15;
	Fri, 20 Nov 2009 14:41:37 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 2942E46B03;
	Fri, 20 Nov 2009 09:41:37 -0500 (EST)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 768678A01B;
	Fri, 20 Nov 2009 09:41:36 -0500 (EST)
From: John Baldwin 
To: Jung-uk Kim 
Date: Fri, 20 Nov 2009 07:43:26 -0500
User-Agent: KMail/1.9.7
References: <200911182340.nAINeJ3W087652@svn.freebsd.org>
	<200911191649.37198.jhb@freebsd.org>
	<200911191731.04075.jkim@FreeBSD.org>
In-Reply-To: <200911191731.04075.jkim@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200911200743.27239.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Fri, 20 Nov 2009 09:41:36 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Robert Watson 
Subject: Re: svn commit: r199498 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 14:41:37 -0000

On Thursday 19 November 2009 5:31:00 pm Jung-uk Kim wrote:
> On Thursday 19 November 2009 04:49 pm, John Baldwin wrote:
> > On Thursday 19 November 2009 11:15:01 am Jung-uk Kim wrote:
> > > On Thursday 19 November 2009 03:26 am, Robert Watson wrote:
> > > > On Wed, 18 Nov 2009, Jung-uk Kim wrote:
> > > > >  - Change internal function bpf_jit_compile() to return
> > > > > allocated size of the generated binary and remove page size
> > > > > limitation for userland. - Use contigmalloc(9)/contigfree(9)
> > > > > instead of malloc(9)/free(9) to make sure the generated
> > > > > binary aligns properly and make it physically contiguous.
> > > >
> > > > Is physical contiguity actually required here -- I would have
> > > > thought virtual contiguity and alignment would be sufficient,
> > > > in which case the normal trick is to allocate using malloc the
> > > > size + min-align + 1 and then fudge the pointer forward until
> > > > it's properly aligned.
> > >
> > > I don't believe it is strictly necessary but I assumed it might
> > > have performance benefit for very big BPF programs although I
> > > have not measured it.  Also, contigmalloc(9)/contigfree(9) is too
> > > obvious to ignore for this purpose. :-)
> >
> > Why would it have a performance benefit to have the pages be
> > physically contiguous?  contigmalloc() is expensive and should
> > really only be used if you truly need contiguous memory.  If you
> > can get by with malloc(), just use malloc().
> 
> Remember are allocating memory for a function pointer here.  If we 
> want to take care of alignment, then "fudging the pointer forward" 
> trick is not going to be easy unless I embed real offset in the 
> structure and pass it around with the pointer.  I don't mind doing it 
> but it seemed unnecessary to me.  Besides, it is very unlikely to see 
> a lot of parallel BPF filter allocations in real world.  Actually, 
> that is a big assumption for BPF JIT compiler by itself because 
> filter compilation is expensive.  Also, if contigmalloc() fails, 
> bpf(4) simply falls back to good old bpf_filter().  So, I don't see 
> anything wrong with this.

Why does a function pointer matter?  Fudging the pointer forward will always 
work as virtual addresses always have the same sub-page alignment as physical 
addresses, so doing something like:

	foo *realp;
	void *p;

	align = 16;
	p = malloc(size + (align -1));
	realp = (foo *)(roundup2((uintptr_t)p, align));

Will always work to give a 16-byte aligned pointer.  However, the in-kernel 
malloc() already gives you aligned memory anyway.  Are you seeing any panics
or buggy behavior when using malloc()?

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:27:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 74785106566C;
	Fri, 20 Nov 2009 15:27:01 +0000 (UTC)
	(envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 61F8C8FC20;
	Fri, 20 Nov 2009 15:27:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFR1o3047806;
	Fri, 20 Nov 2009 15:27:01 GMT
	(envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFR1RS047805;
	Fri, 20 Nov 2009 15:27:01 GMT
	(envelope-from netchild@svn.freebsd.org)
Message-Id: <200911201527.nAKFR1RS047805@svn.freebsd.org>
From: Alexander Leidinger 
Date: Fri, 20 Nov 2009 15:27:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199582 - head/sbin/fsck
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:27:01 -0000

Author: netchild
Date: Fri Nov 20 15:27:00 2009
New Revision: 199582
URL: http://svn.freebsd.org/changeset/base/199582

Log:
  Fix minor resource leak in a function which was introduced by changing an
  err() to a return in r106254.
  
  MFC after:	1 week

Modified:
  head/sbin/fsck/fsck.c

Modified: head/sbin/fsck/fsck.c
==============================================================================
--- head/sbin/fsck/fsck.c	Fri Nov 20 14:50:03 2009	(r199581)
+++ head/sbin/fsck/fsck.c	Fri Nov 20 15:27:00 2009	(r199582)
@@ -543,8 +543,10 @@ getfslab(const char *str)
 	if ((fd = open(str, O_RDONLY)) == -1)
 		err(1, "cannot open `%s'", str);
 
-	if (ioctl(fd, DIOCGDINFO, &dl) == -1)
+	if (ioctl(fd, DIOCGDINFO, &dl) == -1) {
+		(void) close(fd);
 		return(NULL);
+	}
 
 	(void) close(fd);
 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:27:53 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC680106568F;
	Fri, 20 Nov 2009 15:27:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B61828FC12;
	Fri, 20 Nov 2009 15:27:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFRrin047855;
	Fri, 20 Nov 2009 15:27:53 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFRrAo047854;
	Fri, 20 Nov 2009 15:27:53 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911201527.nAKFRrAo047854@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 20 Nov 2009 15:27:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199583 - in stable/8/sys: amd64 boot bsm crypto ddb
	gdb geom i386/acpica i386/bios i386/compile i386/cpufreq
	i386/i386 i386/ibcs2 i386/include i386/isa i386/linux
	i386/pci i386/svr4 i3...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:27:54 -0000

Author: jhb
Date: Fri Nov 20 15:27:52 2009
New Revision: 199583
URL: http://svn.freebsd.org/changeset/base/199583

Log:
  Purge extraneous mergeinfo.

Modified:
Directory Properties:
  stable/8/sys/amd64/   (props changed)
  stable/8/sys/amd64/Makefile   (props changed)
  stable/8/sys/amd64/acpica/   (props changed)
  stable/8/sys/amd64/amd64/   (props changed)
  stable/8/sys/amd64/compile/   (props changed)
  stable/8/sys/amd64/conf/   (props changed)
  stable/8/sys/amd64/ia32/   (props changed)
  stable/8/sys/amd64/include/   (props changed)
  stable/8/sys/amd64/isa/   (props changed)
  stable/8/sys/amd64/linux32/   (props changed)
  stable/8/sys/amd64/pci/   (props changed)
  stable/8/sys/arm/   (props changed)
  stable/8/sys/arm/arm/   (props changed)
  stable/8/sys/arm/at91/   (props changed)
  stable/8/sys/arm/compile/   (props changed)
  stable/8/sys/arm/conf/   (props changed)
  stable/8/sys/arm/include/   (props changed)
  stable/8/sys/arm/mv/   (props changed)
  stable/8/sys/arm/sa11x0/   (props changed)
  stable/8/sys/arm/xscale/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/boot/Makefile   (props changed)
  stable/8/sys/boot/Makefile.inc   (props changed)
  stable/8/sys/boot/README   (props changed)
  stable/8/sys/boot/arm/   (props changed)
  stable/8/sys/boot/common/   (props changed)
  stable/8/sys/boot/efi/   (props changed)
  stable/8/sys/boot/ficl/   (props changed)
  stable/8/sys/boot/forth/   (props changed)
  stable/8/sys/boot/i386/   (props changed)
  stable/8/sys/boot/ia64/   (props changed)
  stable/8/sys/boot/ofw/   (props changed)
  stable/8/sys/boot/pc98/   (props changed)
  stable/8/sys/boot/powerpc/   (props changed)
  stable/8/sys/boot/sparc64/   (props changed)
  stable/8/sys/boot/uboot/   (props changed)
  stable/8/sys/boot/zfs/   (props changed)
  stable/8/sys/bsm/   (props changed)
  stable/8/sys/bsm/audit.h   (props changed)
  stable/8/sys/bsm/audit_domain.h   (props changed)
  stable/8/sys/bsm/audit_errno.h   (props changed)
  stable/8/sys/bsm/audit_fcntl.h   (props changed)
  stable/8/sys/bsm/audit_internal.h   (props changed)
  stable/8/sys/bsm/audit_kevents.h   (props changed)
  stable/8/sys/bsm/audit_record.h   (props changed)
  stable/8/sys/bsm/audit_socket_type.h   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/boot/   (props changed)
  stable/8/sys/cddl/compat/   (props changed)
  stable/8/sys/cddl/contrib/   (props changed)
  stable/8/sys/cddl/dev/   (props changed)
  stable/8/sys/compat/   (props changed)
  stable/8/sys/compat/freebsd32/   (props changed)
  stable/8/sys/compat/ia32/   (props changed)
  stable/8/sys/compat/linprocfs/   (props changed)
  stable/8/sys/compat/linsysfs/   (props changed)
  stable/8/sys/compat/linux/   (props changed)
  stable/8/sys/compat/ndis/   (props changed)
  stable/8/sys/compat/netbsd/   (props changed)
  stable/8/sys/compat/svr4/   (props changed)
  stable/8/sys/contrib/   (props changed)
  stable/8/sys/contrib/altq/   (props changed)
  stable/8/sys/contrib/dev/   (props changed)
  stable/8/sys/contrib/ia64/   (props changed)
  stable/8/sys/contrib/ipfilter/   (props changed)
  stable/8/sys/contrib/ngatm/   (props changed)
  stable/8/sys/contrib/rdma/   (props changed)
  stable/8/sys/crypto/   (props changed)
  stable/8/sys/crypto/blowfish/   (props changed)
  stable/8/sys/crypto/camellia/   (props changed)
  stable/8/sys/crypto/des/   (props changed)
  stable/8/sys/crypto/rc4/   (props changed)
  stable/8/sys/crypto/rijndael/   (props changed)
  stable/8/sys/crypto/sha1.c   (props changed)
  stable/8/sys/crypto/sha1.h   (props changed)
  stable/8/sys/crypto/sha2/   (props changed)
  stable/8/sys/crypto/via/   (props changed)
  stable/8/sys/ddb/   (props changed)
  stable/8/sys/ddb/db_access.c   (props changed)
  stable/8/sys/ddb/db_access.h   (props changed)
  stable/8/sys/ddb/db_break.c   (props changed)
  stable/8/sys/ddb/db_break.h   (props changed)
  stable/8/sys/ddb/db_capture.c   (props changed)
  stable/8/sys/ddb/db_command.c   (props changed)
  stable/8/sys/ddb/db_command.h   (props changed)
  stable/8/sys/ddb/db_examine.c   (props changed)
  stable/8/sys/ddb/db_expr.c   (props changed)
  stable/8/sys/ddb/db_input.c   (props changed)
  stable/8/sys/ddb/db_lex.c   (props changed)
  stable/8/sys/ddb/db_lex.h   (props changed)
  stable/8/sys/ddb/db_main.c   (props changed)
  stable/8/sys/ddb/db_output.c   (props changed)
  stable/8/sys/ddb/db_output.h   (props changed)
  stable/8/sys/ddb/db_print.c   (props changed)
  stable/8/sys/ddb/db_ps.c   (props changed)
  stable/8/sys/ddb/db_run.c   (props changed)
  stable/8/sys/ddb/db_script.c   (props changed)
  stable/8/sys/ddb/db_sym.c   (props changed)
  stable/8/sys/ddb/db_sym.h   (props changed)
  stable/8/sys/ddb/db_textdump.c   (props changed)
  stable/8/sys/ddb/db_thread.c   (props changed)
  stable/8/sys/ddb/db_variables.c   (props changed)
  stable/8/sys/ddb/db_variables.h   (props changed)
  stable/8/sys/ddb/db_watch.c   (props changed)
  stable/8/sys/ddb/db_watch.h   (props changed)
  stable/8/sys/ddb/db_write_cmd.c   (props changed)
  stable/8/sys/ddb/ddb.h   (props changed)
  stable/8/sys/fs/   (props changed)
  stable/8/sys/fs/cd9660/   (props changed)
  stable/8/sys/fs/coda/   (props changed)
  stable/8/sys/fs/deadfs/   (props changed)
  stable/8/sys/fs/devfs/   (props changed)
  stable/8/sys/fs/fdescfs/   (props changed)
  stable/8/sys/fs/fifofs/   (props changed)
  stable/8/sys/fs/hpfs/   (props changed)
  stable/8/sys/fs/msdosfs/   (props changed)
  stable/8/sys/fs/nfs/   (props changed)
  stable/8/sys/fs/nfsclient/   (props changed)
  stable/8/sys/fs/nfsserver/   (props changed)
  stable/8/sys/fs/ntfs/   (props changed)
  stable/8/sys/fs/nullfs/   (props changed)
  stable/8/sys/fs/nwfs/   (props changed)
  stable/8/sys/fs/portalfs/   (props changed)
  stable/8/sys/fs/procfs/   (props changed)
  stable/8/sys/fs/pseudofs/   (props changed)
  stable/8/sys/fs/smbfs/   (props changed)
  stable/8/sys/fs/tmpfs/   (props changed)
  stable/8/sys/fs/udf/   (props changed)
  stable/8/sys/fs/unionfs/   (props changed)
  stable/8/sys/gdb/   (props changed)
  stable/8/sys/gdb/gdb.h   (props changed)
  stable/8/sys/gdb/gdb_cons.c   (props changed)
  stable/8/sys/gdb/gdb_int.h   (props changed)
  stable/8/sys/gdb/gdb_main.c   (props changed)
  stable/8/sys/gdb/gdb_packet.c   (props changed)
  stable/8/sys/geom/   (props changed)
  stable/8/sys/geom/bde/   (props changed)
  stable/8/sys/geom/cache/   (props changed)
  stable/8/sys/geom/concat/   (props changed)
  stable/8/sys/geom/eli/   (props changed)
  stable/8/sys/geom/gate/   (props changed)
  stable/8/sys/geom/geom.h   (props changed)
  stable/8/sys/geom/geom_aes.c   (props changed)
  stable/8/sys/geom/geom_bsd.c   (props changed)
  stable/8/sys/geom/geom_bsd_enc.c   (props changed)
  stable/8/sys/geom/geom_ccd.c   (props changed)
  stable/8/sys/geom/geom_ctl.c   (props changed)
  stable/8/sys/geom/geom_ctl.h   (props changed)
  stable/8/sys/geom/geom_dev.c   (props changed)
  stable/8/sys/geom/geom_disk.c   (props changed)
  stable/8/sys/geom/geom_disk.h   (props changed)
  stable/8/sys/geom/geom_dump.c   (props changed)
  stable/8/sys/geom/geom_event.c   (props changed)
  stable/8/sys/geom/geom_fox.c   (props changed)
  stable/8/sys/geom/geom_int.h   (props changed)
  stable/8/sys/geom/geom_io.c   (props changed)
  stable/8/sys/geom/geom_kern.c   (props changed)
  stable/8/sys/geom/geom_mbr.c   (props changed)
  stable/8/sys/geom/geom_mbr_enc.c   (props changed)
  stable/8/sys/geom/geom_pc98.c   (props changed)
  stable/8/sys/geom/geom_pc98_enc.c   (props changed)
  stable/8/sys/geom/geom_redboot.c   (props changed)
  stable/8/sys/geom/geom_slice.c   (props changed)
  stable/8/sys/geom/geom_slice.h   (props changed)
  stable/8/sys/geom/geom_subr.c   (props changed)
  stable/8/sys/geom/geom_sunlabel.c   (props changed)
  stable/8/sys/geom/geom_sunlabel_enc.c   (props changed)
  stable/8/sys/geom/geom_vfs.c   (props changed)
  stable/8/sys/geom/geom_vfs.h   (props changed)
  stable/8/sys/geom/geom_vol_ffs.c   (props changed)
  stable/8/sys/geom/journal/   (props changed)
  stable/8/sys/geom/label/   (props changed)
  stable/8/sys/geom/linux_lvm/   (props changed)
  stable/8/sys/geom/mirror/   (props changed)
  stable/8/sys/geom/multipath/   (props changed)
  stable/8/sys/geom/nop/   (props changed)
  stable/8/sys/geom/notes   (props changed)
  stable/8/sys/geom/part/   (props changed)
  stable/8/sys/geom/raid3/   (props changed)
  stable/8/sys/geom/shsec/   (props changed)
  stable/8/sys/geom/stripe/   (props changed)
  stable/8/sys/geom/uzip/   (props changed)
  stable/8/sys/geom/vinum/   (props changed)
  stable/8/sys/geom/virstor/   (props changed)
  stable/8/sys/geom/zero/   (props changed)
  stable/8/sys/gnu/   (props changed)
  stable/8/sys/gnu/dev/   (props changed)
  stable/8/sys/gnu/fs/   (props changed)
  stable/8/sys/i386/acpica/   (props changed)
  stable/8/sys/i386/acpica/Makefile   (props changed)
  stable/8/sys/i386/acpica/OsdEnvironment.c   (props changed)
  stable/8/sys/i386/acpica/acpi_machdep.c   (props changed)
  stable/8/sys/i386/acpica/acpi_wakecode.S   (props changed)
  stable/8/sys/i386/acpica/acpi_wakeup.c   (props changed)
  stable/8/sys/i386/acpica/genwakecode.sh   (props changed)
  stable/8/sys/i386/acpica/madt.c   (props changed)
  stable/8/sys/i386/bios/   (props changed)
  stable/8/sys/i386/bios/apm.c   (props changed)
  stable/8/sys/i386/bios/apm.h   (props changed)
  stable/8/sys/i386/bios/mca_machdep.c   (props changed)
  stable/8/sys/i386/bios/mca_machdep.h   (props changed)
  stable/8/sys/i386/bios/smapi.c   (props changed)
  stable/8/sys/i386/bios/smapi_bios.S   (props changed)
  stable/8/sys/i386/bios/smbios.c   (props changed)
  stable/8/sys/i386/bios/vpd.c   (props changed)
  stable/8/sys/i386/compile/   (props changed)
  stable/8/sys/i386/compile/.cvsignore   (props changed)
  stable/8/sys/i386/cpufreq/   (props changed)
  stable/8/sys/i386/cpufreq/est.c   (props changed)
  stable/8/sys/i386/cpufreq/hwpstate.c   (props changed)
  stable/8/sys/i386/cpufreq/p4tcc.c   (props changed)
  stable/8/sys/i386/cpufreq/powernow.c   (props changed)
  stable/8/sys/i386/cpufreq/smist.c   (props changed)
  stable/8/sys/i386/i386/   (props changed)
  stable/8/sys/i386/i386/apic_vector.s   (props changed)
  stable/8/sys/i386/i386/atomic.c   (props changed)
  stable/8/sys/i386/i386/autoconf.c   (props changed)
  stable/8/sys/i386/i386/bios.c   (props changed)
  stable/8/sys/i386/i386/bioscall.s   (props changed)
  stable/8/sys/i386/i386/bpf_jit_machdep.c   (props changed)
  stable/8/sys/i386/i386/bpf_jit_machdep.h   (props changed)
  stable/8/sys/i386/i386/busdma_machdep.c   (props changed)
  stable/8/sys/i386/i386/db_disasm.c   (props changed)
  stable/8/sys/i386/i386/db_interface.c   (props changed)
  stable/8/sys/i386/i386/db_trace.c   (props changed)
  stable/8/sys/i386/i386/dump_machdep.c   (props changed)
  stable/8/sys/i386/i386/elan-mmcr.c   (props changed)
  stable/8/sys/i386/i386/elf_machdep.c   (props changed)
  stable/8/sys/i386/i386/exception.s   (props changed)
  stable/8/sys/i386/i386/gdb_machdep.c   (props changed)
  stable/8/sys/i386/i386/genassym.c   (props changed)
  stable/8/sys/i386/i386/geode.c   (props changed)
  stable/8/sys/i386/i386/i686_mem.c   (props changed)
  stable/8/sys/i386/i386/identcpu.c   (props changed)
  stable/8/sys/i386/i386/in_cksum.c   (props changed)
  stable/8/sys/i386/i386/initcpu.c   (props changed)
  stable/8/sys/i386/i386/intr_machdep.c   (props changed)
  stable/8/sys/i386/i386/io.c   (props changed)
  stable/8/sys/i386/i386/io_apic.c   (props changed)
  stable/8/sys/i386/i386/k6_mem.c   (props changed)
  stable/8/sys/i386/i386/legacy.c   (props changed)
  stable/8/sys/i386/i386/local_apic.c   (props changed)
  stable/8/sys/i386/i386/locore.s   (props changed)
  stable/8/sys/i386/i386/longrun.c   (props changed)
  stable/8/sys/i386/i386/machdep.c   (props changed)
  stable/8/sys/i386/i386/mca.c   (props changed)
  stable/8/sys/i386/i386/mem.c   (props changed)
  stable/8/sys/i386/i386/minidump_machdep.c   (props changed)
  stable/8/sys/i386/i386/mp_clock.c   (props changed)
  stable/8/sys/i386/i386/mp_machdep.c   (props changed)
  stable/8/sys/i386/i386/mp_watchdog.c   (props changed)
  stable/8/sys/i386/i386/mpboot.s   (props changed)
  stable/8/sys/i386/i386/mptable.c   (props changed)
  stable/8/sys/i386/i386/mptable_pci.c   (props changed)
  stable/8/sys/i386/i386/msi.c   (props changed)
  stable/8/sys/i386/i386/nexus.c   (props changed)
  stable/8/sys/i386/i386/perfmon.c   (props changed)
  stable/8/sys/i386/i386/pmap.c   (props changed)
  stable/8/sys/i386/i386/ptrace_machdep.c   (props changed)
  stable/8/sys/i386/i386/stack_machdep.c   (props changed)
  stable/8/sys/i386/i386/support.s   (props changed)
  stable/8/sys/i386/i386/swtch.s   (props changed)
  stable/8/sys/i386/i386/symbols.raw   (props changed)
  stable/8/sys/i386/i386/sys_machdep.c   (props changed)
  stable/8/sys/i386/i386/trap.c   (props changed)
  stable/8/sys/i386/i386/tsc.c   (props changed)
  stable/8/sys/i386/i386/uio_machdep.c   (props changed)
  stable/8/sys/i386/i386/vm86.c   (props changed)
  stable/8/sys/i386/i386/vm86bios.s   (props changed)
  stable/8/sys/i386/i386/vm_machdep.c   (props changed)
  stable/8/sys/i386/ibcs2/   (props changed)
  stable/8/sys/i386/ibcs2/Makefile   (props changed)
  stable/8/sys/i386/ibcs2/coff.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_dirent.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_errno.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_errno.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_fcntl.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_fcntl.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ioctl.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ioctl.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ipc.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ipc.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_isc.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_isc_syscall.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_isc_sysent.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_misc.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_mount.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_msg.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_other.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_proto.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_signal.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_signal.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_socksys.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_socksys.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_stat.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_stat.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_statfs.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_stropts.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_syscall.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_sysent.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_sysi86.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_sysvec.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_termios.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_time.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_types.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_unistd.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_ustat.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_util.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_util.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_utime.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_utsname.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix.c   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix_syscall.h   (props changed)
  stable/8/sys/i386/ibcs2/ibcs2_xenix_sysent.c   (props changed)
  stable/8/sys/i386/ibcs2/imgact_coff.c   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.conf   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.isc   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.isc.conf   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.master   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.xenix   (props changed)
  stable/8/sys/i386/ibcs2/syscalls.xenix.conf   (props changed)
  stable/8/sys/i386/include/   (props changed)
  stable/8/sys/i386/include/_bus.h   (props changed)
  stable/8/sys/i386/include/_inttypes.h   (props changed)
  stable/8/sys/i386/include/_limits.h   (props changed)
  stable/8/sys/i386/include/_stdint.h   (props changed)
  stable/8/sys/i386/include/_types.h   (props changed)
  stable/8/sys/i386/include/acpica_machdep.h   (props changed)
  stable/8/sys/i386/include/apicreg.h   (props changed)
  stable/8/sys/i386/include/apicvar.h   (props changed)
  stable/8/sys/i386/include/apm_bios.h   (props changed)
  stable/8/sys/i386/include/apm_segments.h   (props changed)
  stable/8/sys/i386/include/asm.h   (props changed)
  stable/8/sys/i386/include/asmacros.h   (props changed)
  stable/8/sys/i386/include/atomic.h   (props changed)
  stable/8/sys/i386/include/bootinfo.h   (props changed)
  stable/8/sys/i386/include/bus.h   (props changed)
  stable/8/sys/i386/include/bus_dma.h   (props changed)
  stable/8/sys/i386/include/clock.h   (props changed)
  stable/8/sys/i386/include/cpu.h   (props changed)
  stable/8/sys/i386/include/cpufunc.h   (props changed)
  stable/8/sys/i386/include/cputypes.h   (props changed)
  stable/8/sys/i386/include/cserial.h   (props changed)
  stable/8/sys/i386/include/db_machdep.h   (props changed)
  stable/8/sys/i386/include/elan_mmcr.h   (props changed)
  stable/8/sys/i386/include/elf.h   (props changed)
  stable/8/sys/i386/include/endian.h   (props changed)
  stable/8/sys/i386/include/exec.h   (props changed)
  stable/8/sys/i386/include/float.h   (props changed)
  stable/8/sys/i386/include/floatingpoint.h   (props changed)
  stable/8/sys/i386/include/frame.h   (props changed)
  stable/8/sys/i386/include/gdb_machdep.h   (props changed)
  stable/8/sys/i386/include/ieeefp.h   (props changed)
  stable/8/sys/i386/include/if_wl_wavelan.h   (props changed)
  stable/8/sys/i386/include/in_cksum.h   (props changed)
  stable/8/sys/i386/include/intr_machdep.h   (props changed)
  stable/8/sys/i386/include/ioctl_bt848.h   (props changed)
  stable/8/sys/i386/include/ioctl_meteor.h   (props changed)
  stable/8/sys/i386/include/iodev.h   (props changed)
  stable/8/sys/i386/include/kdb.h   (props changed)
  stable/8/sys/i386/include/legacyvar.h   (props changed)
  stable/8/sys/i386/include/limits.h   (props changed)
  stable/8/sys/i386/include/mca.h   (props changed)
  stable/8/sys/i386/include/md_var.h   (props changed)
  stable/8/sys/i386/include/memdev.h   (props changed)
  stable/8/sys/i386/include/metadata.h   (props changed)
  stable/8/sys/i386/include/minidump.h   (props changed)
  stable/8/sys/i386/include/mp_watchdog.h   (props changed)
  stable/8/sys/i386/include/mptable.h   (props changed)
  stable/8/sys/i386/include/mutex.h   (props changed)
  stable/8/sys/i386/include/nexusvar.h   (props changed)
  stable/8/sys/i386/include/npx.h   (props changed)
  stable/8/sys/i386/include/param.h   (props changed)
  stable/8/sys/i386/include/pc/   (props changed)
  stable/8/sys/i386/include/pcaudioio.h   (props changed)
  stable/8/sys/i386/include/pcb.h   (props changed)
  stable/8/sys/i386/include/pcb_ext.h   (props changed)
  stable/8/sys/i386/include/pci_cfgreg.h   (props changed)
  stable/8/sys/i386/include/pcpu.h   (props changed)
  stable/8/sys/i386/include/perfmon.h   (props changed)
  stable/8/sys/i386/include/pmap.h   (props changed)
  stable/8/sys/i386/include/pmc_mdep.h   (props changed)
  stable/8/sys/i386/include/ppireg.h   (props changed)
  stable/8/sys/i386/include/privatespace.h   (props changed)
  stable/8/sys/i386/include/proc.h   (props changed)
  stable/8/sys/i386/include/profile.h   (props changed)
  stable/8/sys/i386/include/psl.h   (props changed)
  stable/8/sys/i386/include/ptrace.h   (props changed)
  stable/8/sys/i386/include/reg.h   (props changed)
  stable/8/sys/i386/include/reloc.h   (props changed)
  stable/8/sys/i386/include/resource.h   (props changed)
  stable/8/sys/i386/include/runq.h   (props changed)
  stable/8/sys/i386/include/segments.h   (props changed)
  stable/8/sys/i386/include/setjmp.h   (props changed)
  stable/8/sys/i386/include/sf_buf.h   (props changed)
  stable/8/sys/i386/include/sigframe.h   (props changed)
  stable/8/sys/i386/include/signal.h   (props changed)
  stable/8/sys/i386/include/smapi.h   (props changed)
  stable/8/sys/i386/include/smp.h   (props changed)
  stable/8/sys/i386/include/speaker.h   (props changed)
  stable/8/sys/i386/include/specialreg.h   (props changed)
  stable/8/sys/i386/include/stack.h   (props changed)
  stable/8/sys/i386/include/stdarg.h   (props changed)
  stable/8/sys/i386/include/sysarch.h   (props changed)
  stable/8/sys/i386/include/timerreg.h   (props changed)
  stable/8/sys/i386/include/trap.h   (props changed)
  stable/8/sys/i386/include/tss.h   (props changed)
  stable/8/sys/i386/include/ucontext.h   (props changed)
  stable/8/sys/i386/include/varargs.h   (props changed)
  stable/8/sys/i386/include/vm.h   (props changed)
  stable/8/sys/i386/include/vm86.h   (props changed)
  stable/8/sys/i386/include/vmparam.h   (props changed)
  stable/8/sys/i386/include/xbox.h   (props changed)
  stable/8/sys/i386/include/xen/   (props changed)
  stable/8/sys/i386/isa/   (props changed)
  stable/8/sys/i386/isa/atpic.c   (props changed)
  stable/8/sys/i386/isa/atpic_vector.s   (props changed)
  stable/8/sys/i386/isa/ccbque.h   (props changed)
  stable/8/sys/i386/isa/clock.c   (props changed)
  stable/8/sys/i386/isa/dpms.c   (props changed)
  stable/8/sys/i386/isa/elcr.c   (props changed)
  stable/8/sys/i386/isa/elink.c   (props changed)
  stable/8/sys/i386/isa/elink.h   (props changed)
  stable/8/sys/i386/isa/icu.h   (props changed)
  stable/8/sys/i386/isa/isa.c   (props changed)
  stable/8/sys/i386/isa/isa.h   (props changed)
  stable/8/sys/i386/isa/isa_dma.c   (props changed)
  stable/8/sys/i386/isa/nmi.c   (props changed)
  stable/8/sys/i386/isa/npx.c   (props changed)
  stable/8/sys/i386/isa/pmtimer.c   (props changed)
  stable/8/sys/i386/isa/prof_machdep.c   (props changed)
  stable/8/sys/i386/isa/spic.c   (props changed)
  stable/8/sys/i386/isa/spicreg.h   (props changed)
  stable/8/sys/i386/isa/vesa.c   (props changed)
  stable/8/sys/i386/linux/   (props changed)
  stable/8/sys/i386/linux/Makefile   (props changed)
  stable/8/sys/i386/linux/imgact_linux.c   (props changed)
  stable/8/sys/i386/linux/linux.h   (props changed)
  stable/8/sys/i386/linux/linux_dummy.c   (props changed)
  stable/8/sys/i386/linux/linux_genassym.c   (props changed)
  stable/8/sys/i386/linux/linux_ipc64.h   (props changed)
  stable/8/sys/i386/linux/linux_locore.s   (props changed)
  stable/8/sys/i386/linux/linux_machdep.c   (props changed)
  stable/8/sys/i386/linux/linux_proto.h   (props changed)
  stable/8/sys/i386/linux/linux_ptrace.c   (props changed)
  stable/8/sys/i386/linux/linux_support.s   (props changed)
  stable/8/sys/i386/linux/linux_syscall.h   (props changed)
  stable/8/sys/i386/linux/linux_sysent.c   (props changed)
  stable/8/sys/i386/linux/linux_sysvec.c   (props changed)
  stable/8/sys/i386/linux/syscalls.conf   (props changed)
  stable/8/sys/i386/linux/syscalls.master   (props changed)
  stable/8/sys/i386/pci/   (props changed)
  stable/8/sys/i386/pci/pci_bus.c   (props changed)
  stable/8/sys/i386/pci/pci_cfgreg.c   (props changed)
  stable/8/sys/i386/pci/pci_pir.c   (props changed)
  stable/8/sys/i386/svr4/   (props changed)
  stable/8/sys/i386/svr4/svr4_genassym.c   (props changed)
  stable/8/sys/i386/svr4/svr4_locore.s   (props changed)
  stable/8/sys/i386/svr4/svr4_machdep.c   (props changed)
  stable/8/sys/i386/svr4/svr4_machdep.h   (props changed)
  stable/8/sys/i386/xbox/   (props changed)
  stable/8/sys/i386/xbox/pic16l.s   (props changed)
  stable/8/sys/i386/xbox/xbox.c   (props changed)
  stable/8/sys/i386/xbox/xboxfb.c   (props changed)
  stable/8/sys/i386/xen/   (props changed)
  stable/8/sys/i386/xen/clock.c   (props changed)
  stable/8/sys/i386/xen/exception.s   (props changed)
  stable/8/sys/i386/xen/locore.s   (props changed)
  stable/8/sys/i386/xen/mp_machdep.c   (props changed)
  stable/8/sys/i386/xen/mptable.c   (props changed)
  stable/8/sys/i386/xen/pmap.c   (props changed)
  stable/8/sys/i386/xen/xen_clock_util.c   (props changed)
  stable/8/sys/i386/xen/xen_machdep.c   (props changed)
  stable/8/sys/i386/xen/xen_rtc.c   (props changed)
  stable/8/sys/ia64/   (props changed)
  stable/8/sys/ia64/acpica/   (props changed)
  stable/8/sys/ia64/compile/   (props changed)
  stable/8/sys/ia64/conf/   (props changed)
  stable/8/sys/ia64/disasm/   (props changed)
  stable/8/sys/ia64/ia32/   (props changed)
  stable/8/sys/ia64/ia64/   (props changed)
  stable/8/sys/ia64/include/   (props changed)
  stable/8/sys/ia64/isa/   (props changed)
  stable/8/sys/ia64/pci/   (props changed)
  stable/8/sys/isa/   (props changed)
  stable/8/sys/isa/atrtc.c   (props changed)
  stable/8/sys/isa/isa_common.c   (props changed)
  stable/8/sys/isa/isa_common.h   (props changed)
  stable/8/sys/isa/isa_dmareg.h   (props changed)
  stable/8/sys/isa/isa_if.m   (props changed)
  stable/8/sys/isa/isahint.c   (props changed)
  stable/8/sys/isa/isareg.h   (props changed)
  stable/8/sys/isa/isavar.h   (props changed)
  stable/8/sys/isa/orm.c   (props changed)
  stable/8/sys/isa/pnp.c   (props changed)
  stable/8/sys/isa/pnpparse.c   (props changed)
  stable/8/sys/isa/pnpreg.h   (props changed)
  stable/8/sys/isa/pnpvar.h   (props changed)
  stable/8/sys/isa/rtc.h   (props changed)
  stable/8/sys/isa/syscons_isa.c   (props changed)
  stable/8/sys/isa/vga_isa.c   (props changed)
  stable/8/sys/kern/   (props changed)
  stable/8/sys/kern/Make.tags.inc   (props changed)
  stable/8/sys/kern/Makefile   (props changed)
  stable/8/sys/kern/bus_if.m   (props changed)
  stable/8/sys/kern/clock_if.m   (props changed)
  stable/8/sys/kern/cpufreq_if.m   (props changed)
  stable/8/sys/kern/device_if.m   (props changed)
  stable/8/sys/kern/genassym.sh   (props changed)
  stable/8/sys/kern/imgact_aout.c   (props changed)
  stable/8/sys/kern/imgact_elf.c   (props changed)
  stable/8/sys/kern/imgact_elf32.c   (props changed)
  stable/8/sys/kern/imgact_elf64.c   (props changed)
  stable/8/sys/kern/imgact_gzip.c   (props changed)
  stable/8/sys/kern/imgact_shell.c   (props changed)
  stable/8/sys/kern/inflate.c   (props changed)
  stable/8/sys/kern/init_main.c   (props changed)
  stable/8/sys/kern/init_sysent.c   (props changed)
  stable/8/sys/kern/kern_acct.c   (props changed)
  stable/8/sys/kern/kern_alq.c   (props changed)
  stable/8/sys/kern/kern_clock.c   (props changed)
  stable/8/sys/kern/kern_condvar.c   (props changed)
  stable/8/sys/kern/kern_conf.c   (props changed)
  stable/8/sys/kern/kern_cons.c   (props changed)
  stable/8/sys/kern/kern_context.c   (props changed)
  stable/8/sys/kern/kern_cpu.c   (props changed)
  stable/8/sys/kern/kern_cpuset.c   (props changed)
  stable/8/sys/kern/kern_ctf.c   (props changed)
  stable/8/sys/kern/kern_descrip.c   (props changed)
  stable/8/sys/kern/kern_dtrace.c   (props changed)
  stable/8/sys/kern/kern_environment.c   (props changed)
  stable/8/sys/kern/kern_event.c   (props changed)
  stable/8/sys/kern/kern_exec.c   (props changed)
  stable/8/sys/kern/kern_exit.c   (props changed)
  stable/8/sys/kern/kern_fail.c   (props changed)
  stable/8/sys/kern/kern_fork.c   (props changed)
  stable/8/sys/kern/kern_idle.c   (props changed)
  stable/8/sys/kern/kern_intr.c   (props changed)
  stable/8/sys/kern/kern_jail.c   (props changed)
  stable/8/sys/kern/kern_kthread.c   (props changed)
  stable/8/sys/kern/kern_ktr.c   (props changed)
  stable/8/sys/kern/kern_ktrace.c   (props changed)
  stable/8/sys/kern/kern_linker.c   (props changed)
  stable/8/sys/kern/kern_lock.c   (props changed)
  stable/8/sys/kern/kern_lockf.c   (props changed)
  stable/8/sys/kern/kern_lockstat.c   (props changed)
  stable/8/sys/kern/kern_malloc.c   (props changed)
  stable/8/sys/kern/kern_mbuf.c   (props changed)
  stable/8/sys/kern/kern_mib.c   (props changed)
  stable/8/sys/kern/kern_module.c   (props changed)
  stable/8/sys/kern/kern_mtxpool.c   (props changed)
  stable/8/sys/kern/kern_mutex.c   (props changed)
  stable/8/sys/kern/kern_ntptime.c   (props changed)
  stable/8/sys/kern/kern_osd.c   (props changed)
  stable/8/sys/kern/kern_physio.c   (props changed)
  stable/8/sys/kern/kern_pmc.c   (props changed)
  stable/8/sys/kern/kern_poll.c   (props changed)
  stable/8/sys/kern/kern_priv.c   (props changed)
  stable/8/sys/kern/kern_proc.c   (props changed)
  stable/8/sys/kern/kern_prot.c   (props changed)
  stable/8/sys/kern/kern_resource.c   (props changed)
  stable/8/sys/kern/kern_rmlock.c   (props changed)
  stable/8/sys/kern/kern_rwlock.c   (props changed)
  stable/8/sys/kern/kern_sdt.c   (props changed)
  stable/8/sys/kern/kern_sema.c   (props changed)
  stable/8/sys/kern/kern_shutdown.c   (props changed)
  stable/8/sys/kern/kern_sig.c   (props changed)
  stable/8/sys/kern/kern_subr.c   (props changed)
  stable/8/sys/kern/kern_switch.c   (props changed)
  stable/8/sys/kern/kern_sx.c   (props changed)
  stable/8/sys/kern/kern_synch.c   (props changed)
  stable/8/sys/kern/kern_syscalls.c   (props changed)
  stable/8/sys/kern/kern_sysctl.c   (props changed)
  stable/8/sys/kern/kern_tc.c   (props changed)
  stable/8/sys/kern/kern_thr.c   (props changed)
  stable/8/sys/kern/kern_thread.c   (props changed)
  stable/8/sys/kern/kern_time.c   (props changed)
  stable/8/sys/kern/kern_timeout.c   (props changed)
  stable/8/sys/kern/kern_umtx.c   (props changed)
  stable/8/sys/kern/kern_uuid.c   (props changed)
  stable/8/sys/kern/kern_xxx.c   (props changed)
  stable/8/sys/kern/ksched.c   (props changed)
  stable/8/sys/kern/link_elf.c   (props changed)
  stable/8/sys/kern/link_elf_obj.c   (props changed)
  stable/8/sys/kern/linker_if.m   (props changed)
  stable/8/sys/kern/makesyscalls.sh   (props changed)
  stable/8/sys/kern/md4c.c   (props changed)
  stable/8/sys/kern/md5c.c   (props changed)
  stable/8/sys/kern/p1003_1b.c   (props changed)
  stable/8/sys/kern/posix4_mib.c   (props changed)
  stable/8/sys/kern/sched_4bsd.c   (props changed)
  stable/8/sys/kern/sched_ule.c   (props changed)
  stable/8/sys/kern/serdev_if.m   (props changed)
  stable/8/sys/kern/stack_protector.c   (props changed)
  stable/8/sys/kern/subr_acl_nfs4.c   (props changed)
  stable/8/sys/kern/subr_acl_posix1e.c   (props changed)
  stable/8/sys/kern/subr_autoconf.c   (props changed)
  stable/8/sys/kern/subr_blist.c   (props changed)
  stable/8/sys/kern/subr_bufring.c   (props changed)
  stable/8/sys/kern/subr_bus.c   (props changed)
  stable/8/sys/kern/subr_clock.c   (props changed)
  stable/8/sys/kern/subr_devstat.c   (props changed)
  stable/8/sys/kern/subr_disk.c   (props changed)
  stable/8/sys/kern/subr_eventhandler.c   (props changed)
  stable/8/sys/kern/subr_fattime.c   (props changed)
  stable/8/sys/kern/subr_firmware.c   (props changed)
  stable/8/sys/kern/subr_hints.c   (props changed)
  stable/8/sys/kern/subr_kdb.c   (props changed)
  stable/8/sys/kern/subr_kobj.c   (props changed)
  stable/8/sys/kern/subr_lock.c   (props changed)
  stable/8/sys/kern/subr_log.c   (props changed)
  stable/8/sys/kern/subr_mbpool.c   (props changed)
  stable/8/sys/kern/subr_mchain.c   (props changed)
  stable/8/sys/kern/subr_module.c   (props changed)
  stable/8/sys/kern/subr_msgbuf.c   (props changed)
  stable/8/sys/kern/subr_param.c   (props changed)
  stable/8/sys/kern/subr_pcpu.c   (props changed)
  stable/8/sys/kern/subr_power.c   (props changed)
  stable/8/sys/kern/subr_prf.c   (props changed)
  stable/8/sys/kern/subr_prof.c   (props changed)
  stable/8/sys/kern/subr_rman.c   (props changed)
  stable/8/sys/kern/subr_rtc.c   (props changed)
  stable/8/sys/kern/subr_sbuf.c   (props changed)
  stable/8/sys/kern/subr_scanf.c   (props changed)
  stable/8/sys/kern/subr_sglist.c   (props changed)
  stable/8/sys/kern/subr_sleepqueue.c   (props changed)
  stable/8/sys/kern/subr_smp.c   (props changed)
  stable/8/sys/kern/subr_stack.c   (props changed)
  stable/8/sys/kern/subr_taskqueue.c   (props changed)
  stable/8/sys/kern/subr_trap.c   (props changed)
  stable/8/sys/kern/subr_turnstile.c   (props changed)
  stable/8/sys/kern/subr_unit.c   (props changed)
  stable/8/sys/kern/subr_witness.c   (props changed)
  stable/8/sys/kern/sys_generic.c   (props changed)
  stable/8/sys/kern/sys_pipe.c   (props changed)
  stable/8/sys/kern/sys_process.c   (props changed)
  stable/8/sys/kern/sys_socket.c   (props changed)
  stable/8/sys/kern/syscalls.c   (props changed)
  stable/8/sys/kern/syscalls.master   (props changed)
  stable/8/sys/kern/systrace_args.c   (props changed)
  stable/8/sys/kern/sysv_ipc.c   (props changed)
  stable/8/sys/kern/sysv_msg.c   (props changed)
  stable/8/sys/kern/sysv_sem.c   (props changed)
  stable/8/sys/kern/sysv_shm.c   (props changed)
  stable/8/sys/kern/tty.c   (props changed)
  stable/8/sys/kern/tty_compat.c   (props changed)
  stable/8/sys/kern/tty_info.c   (props changed)
  stable/8/sys/kern/tty_inq.c   (props changed)
  stable/8/sys/kern/tty_outq.c   (props changed)
  stable/8/sys/kern/tty_pts.c   (props changed)
  stable/8/sys/kern/tty_pty.c   (props changed)
  stable/8/sys/kern/tty_tty.c   (props changed)
  stable/8/sys/kern/tty_ttydisc.c   (props changed)
  stable/8/sys/kern/uipc_accf.c   (props changed)
  stable/8/sys/kern/uipc_cow.c   (props changed)
  stable/8/sys/kern/uipc_debug.c   (props changed)
  stable/8/sys/kern/uipc_domain.c   (props changed)
  stable/8/sys/kern/uipc_mbuf.c   (props changed)
  stable/8/sys/kern/uipc_mbuf2.c   (props changed)
  stable/8/sys/kern/uipc_mqueue.c   (props changed)
  stable/8/sys/kern/uipc_sem.c   (props changed)
  stable/8/sys/kern/uipc_shm.c   (props changed)
  stable/8/sys/kern/uipc_sockbuf.c   (props changed)
  stable/8/sys/kern/uipc_socket.c   (props changed)
  stable/8/sys/kern/uipc_syscalls.c   (props changed)
  stable/8/sys/kern/uipc_usrreq.c   (props changed)
  stable/8/sys/kern/vfs_acl.c   (props changed)
  stable/8/sys/kern/vfs_aio.c   (props changed)
  stable/8/sys/kern/vfs_bio.c   (props changed)
  stable/8/sys/kern/vfs_cache.c   (props changed)
  stable/8/sys/kern/vfs_cluster.c   (props changed)
  stable/8/sys/kern/vfs_default.c   (props changed)
  stable/8/sys/kern/vfs_export.c   (props changed)
  stable/8/sys/kern/vfs_extattr.c   (props changed)
  stable/8/sys/kern/vfs_hash.c   (props changed)
  stable/8/sys/kern/vfs_init.c   (props changed)
  stable/8/sys/kern/vfs_lookup.c   (props changed)
  stable/8/sys/kern/vfs_mount.c   (props changed)
  stable/8/sys/kern/vfs_subr.c   (props changed)
  stable/8/sys/kern/vfs_syscalls.c   (props changed)
  stable/8/sys/kern/vfs_vnops.c   (props changed)
  stable/8/sys/kern/vnode_if.src   (props changed)
  stable/8/sys/kgssapi/   (props changed)
  stable/8/sys/kgssapi/gss_accept_sec_context.c   (props changed)
  stable/8/sys/kgssapi/gss_acquire_cred.c   (props changed)
  stable/8/sys/kgssapi/gss_add_oid_set_member.c   (props changed)
  stable/8/sys/kgssapi/gss_canonicalize_name.c   (props changed)
  stable/8/sys/kgssapi/gss_create_empty_oid_set.c   (props changed)
  stable/8/sys/kgssapi/gss_delete_sec_context.c   (props changed)
  stable/8/sys/kgssapi/gss_display_status.c   (props changed)
  stable/8/sys/kgssapi/gss_export_name.c   (props changed)
  stable/8/sys/kgssapi/gss_get_mic.c   (props changed)
  stable/8/sys/kgssapi/gss_impl.c   (props changed)
  stable/8/sys/kgssapi/gss_import_name.c   (props changed)
  stable/8/sys/kgssapi/gss_init_sec_context.c   (props changed)
  stable/8/sys/kgssapi/gss_names.c   (props changed)
  stable/8/sys/kgssapi/gss_pname_to_uid.c   (props changed)
  stable/8/sys/kgssapi/gss_release_buffer.c   (props changed)
  stable/8/sys/kgssapi/gss_release_cred.c   (props changed)
  stable/8/sys/kgssapi/gss_release_name.c   (props changed)
  stable/8/sys/kgssapi/gss_release_oid_set.c   (props changed)
  stable/8/sys/kgssapi/gss_set_cred_option.c   (props changed)
  stable/8/sys/kgssapi/gss_test_oid_set_member.c   (props changed)
  stable/8/sys/kgssapi/gss_unwrap.c   (props changed)
  stable/8/sys/kgssapi/gss_verify_mic.c   (props changed)
  stable/8/sys/kgssapi/gss_wrap.c   (props changed)
  stable/8/sys/kgssapi/gss_wrap_size_limit.c   (props changed)
  stable/8/sys/kgssapi/gssapi.h   (props changed)
  stable/8/sys/kgssapi/gssapi_impl.h   (props changed)
  stable/8/sys/kgssapi/gssd.x   (props changed)
  stable/8/sys/kgssapi/gssd_prot.c   (props changed)
  stable/8/sys/kgssapi/gsstest.c   (props changed)
  stable/8/sys/kgssapi/kgss_if.m   (props changed)
  stable/8/sys/kgssapi/krb5/   (props changed)
  stable/8/sys/libkern/   (props changed)
  stable/8/sys/libkern/arc4random.c   (props changed)
  stable/8/sys/libkern/arm/   (props changed)
  stable/8/sys/libkern/ashldi3.c   (props changed)
  stable/8/sys/libkern/ashrdi3.c   (props changed)
  stable/8/sys/libkern/bcd.c   (props changed)
  stable/8/sys/libkern/bcmp.c   (props changed)
  stable/8/sys/libkern/bsearch.c   (props changed)
  stable/8/sys/libkern/cmpdi2.c   (props changed)
  stable/8/sys/libkern/crc32.c   (props changed)
  stable/8/sys/libkern/divdi3.c   (props changed)
  stable/8/sys/libkern/ffs.c   (props changed)
  stable/8/sys/libkern/ffsl.c   (props changed)
  stable/8/sys/libkern/fls.c   (props changed)
  stable/8/sys/libkern/flsl.c   (props changed)
  stable/8/sys/libkern/fnmatch.c   (props changed)
  stable/8/sys/libkern/gets.c   (props changed)
  stable/8/sys/libkern/ia64/   (props changed)
  stable/8/sys/libkern/iconv.c   (props changed)
  stable/8/sys/libkern/iconv_converter_if.m   (props changed)
  stable/8/sys/libkern/iconv_xlat.c   (props changed)
  stable/8/sys/libkern/iconv_xlat16.c   (props changed)
  stable/8/sys/libkern/index.c   (props changed)
  stable/8/sys/libkern/inet_ntoa.c   (props changed)
  stable/8/sys/libkern/jenkins.h   (props changed)
  stable/8/sys/libkern/lshrdi3.c   (props changed)
  stable/8/sys/libkern/mcount.c   (props changed)
  stable/8/sys/libkern/memcmp.c   (props changed)
  stable/8/sys/libkern/memmove.c   (props changed)
  stable/8/sys/libkern/memset.c   (props changed)
  stable/8/sys/libkern/moddi3.c   (props changed)
  stable/8/sys/libkern/qdivrem.c   (props changed)
  stable/8/sys/libkern/qsort.c   (props changed)
  stable/8/sys/libkern/qsort_r.c   (props changed)
  stable/8/sys/libkern/quad.h   (props changed)
  stable/8/sys/libkern/random.c   (props changed)
  stable/8/sys/libkern/rindex.c   (props changed)
  stable/8/sys/libkern/scanc.c   (props changed)
  stable/8/sys/libkern/skpc.c   (props changed)
  stable/8/sys/libkern/strcasecmp.c   (props changed)
  stable/8/sys/libkern/strcat.c   (props changed)
  stable/8/sys/libkern/strcmp.c   (props changed)
  stable/8/sys/libkern/strcpy.c   (props changed)
  stable/8/sys/libkern/strcspn.c   (props changed)
  stable/8/sys/libkern/strdup.c   (props changed)
  stable/8/sys/libkern/strlcat.c   (props changed)
  stable/8/sys/libkern/strlcpy.c   (props changed)
  stable/8/sys/libkern/strlen.c   (props changed)
  stable/8/sys/libkern/strncmp.c   (props changed)
  stable/8/sys/libkern/strncpy.c   (props changed)
  stable/8/sys/libkern/strsep.c   (props changed)
  stable/8/sys/libkern/strspn.c   (props changed)
  stable/8/sys/libkern/strstr.c   (props changed)
  stable/8/sys/libkern/strtol.c   (props changed)
  stable/8/sys/libkern/strtoq.c   (props changed)
  stable/8/sys/libkern/strtoul.c   (props changed)
  stable/8/sys/libkern/strtouq.c   (props changed)
  stable/8/sys/libkern/strvalid.c   (props changed)
  stable/8/sys/libkern/ucmpdi2.c   (props changed)
  stable/8/sys/libkern/udivdi3.c   (props changed)
  stable/8/sys/libkern/umoddi3.c   (props changed)
  stable/8/sys/mips/   (props changed)
  stable/8/sys/mips/adm5120/   (props changed)
  stable/8/sys/mips/compile/   (props changed)
  stable/8/sys/mips/conf/   (props changed)
  stable/8/sys/mips/idt/   (props changed)
  stable/8/sys/mips/include/   (props changed)
  stable/8/sys/mips/malta/   (props changed)
  stable/8/sys/mips/mips/   (props changed)
  stable/8/sys/mips/sentry5/   (props changed)
  stable/8/sys/modules/   (props changed)
  stable/8/sys/modules/3dfx/   (props changed)
  stable/8/sys/modules/3dfx_linux/   (props changed)
  stable/8/sys/modules/Makefile   (props changed)
  stable/8/sys/modules/Makefile.inc   (props changed)
  stable/8/sys/modules/aac/   (props changed)
  stable/8/sys/modules/accf_data/   (props changed)
  stable/8/sys/modules/accf_dns/   (props changed)
  stable/8/sys/modules/accf_http/   (props changed)
  stable/8/sys/modules/acpi/   (props changed)
  stable/8/sys/modules/ae/   (props changed)
  stable/8/sys/modules/age/   (props changed)
  stable/8/sys/modules/agp/   (props changed)
  stable/8/sys/modules/aha/   (props changed)
  stable/8/sys/modules/ahb/   (props changed)
  stable/8/sys/modules/ahci/   (props changed)
  stable/8/sys/modules/aic/   (props changed)
  stable/8/sys/modules/aic7xxx/   (props changed)
  stable/8/sys/modules/aio/   (props changed)
  stable/8/sys/modules/alc/   (props changed)
  stable/8/sys/modules/ale/   (props changed)
  stable/8/sys/modules/amd/   (props changed)
  stable/8/sys/modules/amdtemp/   (props changed)
  stable/8/sys/modules/amr/   (props changed)
  stable/8/sys/modules/an/   (props changed)
  stable/8/sys/modules/aout/   (props changed)
  stable/8/sys/modules/apm/   (props changed)
  stable/8/sys/modules/arcmsr/   (props changed)
  stable/8/sys/modules/arcnet/   (props changed)
  stable/8/sys/modules/asmc/   (props changed)
  stable/8/sys/modules/asr/   (props changed)
  stable/8/sys/modules/ata/   (props changed)
  stable/8/sys/modules/ath/   (props changed)
  stable/8/sys/modules/auxio/   (props changed)
  stable/8/sys/modules/bce/   (props changed)
  stable/8/sys/modules/bfe/   (props changed)
  stable/8/sys/modules/bge/   (props changed)
  stable/8/sys/modules/bios/   (props changed)
  stable/8/sys/modules/bktr/   (props changed)
  stable/8/sys/modules/bm/   (props changed)
  stable/8/sys/modules/bridgestp/   (props changed)
  stable/8/sys/modules/bwi/   (props changed)
  stable/8/sys/modules/cam/   (props changed)
  stable/8/sys/modules/canbepm/   (props changed)
  stable/8/sys/modules/canbus/   (props changed)
  stable/8/sys/modules/cardbus/   (props changed)
  stable/8/sys/modules/cas/   (props changed)
  stable/8/sys/modules/cbb/   (props changed)
  stable/8/sys/modules/cd9660/   (props changed)
  stable/8/sys/modules/cd9660_iconv/   (props changed)
  stable/8/sys/modules/ce/   (props changed)
  stable/8/sys/modules/ciss/   (props changed)
  stable/8/sys/modules/cm/   (props changed)
  stable/8/sys/modules/cmx/   (props changed)
  stable/8/sys/modules/coda/   (props changed)
  stable/8/sys/modules/coda5/   (props changed)
  stable/8/sys/modules/coff/   (props changed)
  stable/8/sys/modules/coretemp/   (props changed)
  stable/8/sys/modules/cp/   (props changed)
  stable/8/sys/modules/cpuctl/   (props changed)
  stable/8/sys/modules/cpufreq/   (props changed)
  stable/8/sys/modules/crypto/   (props changed)
  stable/8/sys/modules/cryptodev/   (props changed)
  stable/8/sys/modules/cs/   (props changed)
  stable/8/sys/modules/ctau/   (props changed)
  stable/8/sys/modules/cx/   (props changed)
  stable/8/sys/modules/cxgb/   (props changed)
  stable/8/sys/modules/cyclic/   (props changed)
  stable/8/sys/modules/dc/   (props changed)
  stable/8/sys/modules/dcons/   (props changed)
  stable/8/sys/modules/dcons_crom/   (props changed)
  stable/8/sys/modules/de/   (props changed)
  stable/8/sys/modules/digi/   (props changed)
  stable/8/sys/modules/dpms/   (props changed)
  stable/8/sys/modules/dpt/   (props changed)
  stable/8/sys/modules/drm/   (props changed)
  stable/8/sys/modules/dtrace/   (props changed)
  stable/8/sys/modules/dummynet/   (props changed)
  stable/8/sys/modules/ed/   (props changed)
  stable/8/sys/modules/elink/   (props changed)
  stable/8/sys/modules/em/   (props changed)
  stable/8/sys/modules/en/   (props changed)
  stable/8/sys/modules/ep/   (props changed)
  stable/8/sys/modules/esp/   (props changed)
  stable/8/sys/modules/et/   (props changed)
  stable/8/sys/modules/ex/   (props changed)
  stable/8/sys/modules/exca/   (props changed)
  stable/8/sys/modules/ext2fs/   (props changed)
  stable/8/sys/modules/fatm/   (props changed)
  stable/8/sys/modules/fdc/   (props changed)
  stable/8/sys/modules/fdescfs/   (props changed)
  stable/8/sys/modules/fe/   (props changed)
  stable/8/sys/modules/firewire/   (props changed)
  stable/8/sys/modules/firmware/   (props changed)
  stable/8/sys/modules/fxp/   (props changed)
  stable/8/sys/modules/gem/   (props changed)
  stable/8/sys/modules/geom/   (props changed)
  stable/8/sys/modules/glxsb/   (props changed)
  stable/8/sys/modules/hatm/   (props changed)
  stable/8/sys/modules/hifn/   (props changed)
  stable/8/sys/modules/hme/   (props changed)
  stable/8/sys/modules/hpfs/   (props changed)
  stable/8/sys/modules/hptiop/   (props changed)
  stable/8/sys/modules/hptmv/   (props changed)
  stable/8/sys/modules/hptrr/   (props changed)
  stable/8/sys/modules/hwpmc/   (props changed)
  stable/8/sys/modules/i2c/   (props changed)
  stable/8/sys/modules/ibcs2/   (props changed)
  stable/8/sys/modules/ichwd/   (props changed)
  stable/8/sys/modules/ida/   (props changed)
  stable/8/sys/modules/ie/   (props changed)
  stable/8/sys/modules/if_bridge/   (props changed)
  stable/8/sys/modules/if_disc/   (props changed)
  stable/8/sys/modules/if_edsc/   (props changed)
  stable/8/sys/modules/if_ef/   (props changed)
  stable/8/sys/modules/if_epair/   (props changed)
  stable/8/sys/modules/if_faith/   (props changed)
  stable/8/sys/modules/if_gif/   (props changed)
  stable/8/sys/modules/if_gre/   (props changed)
  stable/8/sys/modules/if_lagg/   (props changed)
  stable/8/sys/modules/if_ndis/   (props changed)
  stable/8/sys/modules/if_stf/   (props changed)
  stable/8/sys/modules/if_tap/   (props changed)
  stable/8/sys/modules/if_tun/   (props changed)
  stable/8/sys/modules/if_vlan/   (props changed)
  stable/8/sys/modules/igb/   (props changed)
  stable/8/sys/modules/iir/   (props changed)
  stable/8/sys/modules/io/   (props changed)
  stable/8/sys/modules/ip6_mroute_mod/   (props changed)
  stable/8/sys/modules/ip_mroute_mod/   (props changed)
  stable/8/sys/modules/ipdivert/   (props changed)
  stable/8/sys/modules/ipfilter/   (props changed)
  stable/8/sys/modules/ipfw/   (props changed)
  stable/8/sys/modules/ipfw_nat/   (props changed)
  stable/8/sys/modules/ipmi/   (props changed)
  stable/8/sys/modules/ips/   (props changed)
  stable/8/sys/modules/ipw/   (props changed)
  stable/8/sys/modules/ipwfw/   (props changed)
  stable/8/sys/modules/iscsi/   (props changed)
  stable/8/sys/modules/isp/   (props changed)
  stable/8/sys/modules/ispfw/   (props changed)
  stable/8/sys/modules/iwi/   (props changed)
  stable/8/sys/modules/iwifw/   (props changed)
  stable/8/sys/modules/iwn/   (props changed)
  stable/8/sys/modules/iwnfw/   (props changed)
  stable/8/sys/modules/ixgb/   (props changed)
  stable/8/sys/modules/ixgbe/   (props changed)
  stable/8/sys/modules/jme/   (props changed)
  stable/8/sys/modules/joy/   (props changed)
  stable/8/sys/modules/kbdmux/   (props changed)
  stable/8/sys/modules/kgssapi/   (props changed)
  stable/8/sys/modules/kgssapi_krb5/   (props changed)
  stable/8/sys/modules/krpc/   (props changed)
  stable/8/sys/modules/ksyms/   (props changed)
  stable/8/sys/modules/le/   (props changed)
  stable/8/sys/modules/lge/   (props changed)
  stable/8/sys/modules/libalias/   (props changed)
  stable/8/sys/modules/libiconv/   (props changed)
  stable/8/sys/modules/libmbpool/   (props changed)
  stable/8/sys/modules/libmchain/   (props changed)
  stable/8/sys/modules/linprocfs/   (props changed)
  stable/8/sys/modules/linsysfs/   (props changed)
  stable/8/sys/modules/linux/   (props changed)
  stable/8/sys/modules/lmc/   (props changed)
  stable/8/sys/modules/lpt/   (props changed)
  stable/8/sys/modules/mac_biba/   (props changed)
  stable/8/sys/modules/mac_bsdextended/   (props changed)
  stable/8/sys/modules/mac_ifoff/   (props changed)
  stable/8/sys/modules/mac_lomac/   (props changed)
  stable/8/sys/modules/mac_mls/   (props changed)
  stable/8/sys/modules/mac_none/   (props changed)
  stable/8/sys/modules/mac_partition/   (props changed)
  stable/8/sys/modules/mac_portacl/   (props changed)
  stable/8/sys/modules/mac_seeotheruids/   (props changed)
  stable/8/sys/modules/mac_stub/   (props changed)
  stable/8/sys/modules/mac_test/   (props changed)
  stable/8/sys/modules/malo/   (props changed)
  stable/8/sys/modules/mcd/   (props changed)
  stable/8/sys/modules/md/   (props changed)
  stable/8/sys/modules/mem/   (props changed)
  stable/8/sys/modules/mfi/   (props changed)
  stable/8/sys/modules/mii/   (props changed)
  stable/8/sys/modules/mlx/   (props changed)
  stable/8/sys/modules/mly/   (props changed)
  stable/8/sys/modules/mmc/   (props changed)
  stable/8/sys/modules/mmcsd/   (props changed)
  stable/8/sys/modules/mpt/   (props changed)
  stable/8/sys/modules/mqueue/   (props changed)
  stable/8/sys/modules/msdosfs/   (props changed)
  stable/8/sys/modules/msdosfs_iconv/   (props changed)
  stable/8/sys/modules/mse/   (props changed)
  stable/8/sys/modules/msk/   (props changed)
  stable/8/sys/modules/mwl/   (props changed)
  stable/8/sys/modules/mwlfw/   (props changed)
  stable/8/sys/modules/mxge/   (props changed)
  stable/8/sys/modules/my/   (props changed)
  stable/8/sys/modules/ncp/   (props changed)
  stable/8/sys/modules/ncv/   (props changed)
  stable/8/sys/modules/ndis/   (props changed)
  stable/8/sys/modules/netgraph/   (props changed)
  stable/8/sys/modules/nfe/   (props changed)
  stable/8/sys/modules/nfscl/   (props changed)
  stable/8/sys/modules/nfsclient/   (props changed)
  stable/8/sys/modules/nfscommon/   (props changed)
  stable/8/sys/modules/nfsd/   (props changed)
  stable/8/sys/modules/nfslockd/   (props changed)
  stable/8/sys/modules/nfsserver/   (props changed)
  stable/8/sys/modules/nfssvc/   (props changed)
  stable/8/sys/modules/nge/   (props changed)
  stable/8/sys/modules/nmdm/   (props changed)
  stable/8/sys/modules/nsp/   (props changed)
  stable/8/sys/modules/ntfs/   (props changed)
  stable/8/sys/modules/ntfs_iconv/   (props changed)
  stable/8/sys/modules/nullfs/   (props changed)
  stable/8/sys/modules/nve/   (props changed)
  stable/8/sys/modules/nvram/   (props changed)
  stable/8/sys/modules/nwfs/   (props changed)
  stable/8/sys/modules/nxge/   (props changed)
  stable/8/sys/modules/opensolaris/   (props changed)
  stable/8/sys/modules/padlock/   (props changed)
  stable/8/sys/modules/patm/   (props changed)
  stable/8/sys/modules/pccard/   (props changed)
  stable/8/sys/modules/pcfclock/   (props changed)
  stable/8/sys/modules/pcn/   (props changed)
  stable/8/sys/modules/pf/   (props changed)
  stable/8/sys/modules/pflog/   (props changed)
  stable/8/sys/modules/plip/   (props changed)
  stable/8/sys/modules/pmc/   (props changed)
  stable/8/sys/modules/portalfs/   (props changed)
  stable/8/sys/modules/powermac_nvram/   (props changed)
  stable/8/sys/modules/ppbus/   (props changed)
  stable/8/sys/modules/ppc/   (props changed)
  stable/8/sys/modules/ppi/   (props changed)
  stable/8/sys/modules/pps/   (props changed)
  stable/8/sys/modules/procfs/   (props changed)
  stable/8/sys/modules/pseudofs/   (props changed)
  stable/8/sys/modules/pst/   (props changed)
  stable/8/sys/modules/puc/   (props changed)
  stable/8/sys/modules/ral/   (props changed)
  stable/8/sys/modules/ralfw/   (props changed)
  stable/8/sys/modules/random/   (props changed)
  stable/8/sys/modules/rc/   (props changed)
  stable/8/sys/modules/rc4/   (props changed)
  stable/8/sys/modules/rdma/   (props changed)
  stable/8/sys/modules/re/   (props changed)
  stable/8/sys/modules/reiserfs/   (props changed)
  stable/8/sys/modules/rl/   (props changed)
  stable/8/sys/modules/rndtest/   (props changed)
  stable/8/sys/modules/rp/   (props changed)
  stable/8/sys/modules/s3/   (props changed)
  stable/8/sys/modules/safe/   (props changed)
  stable/8/sys/modules/sbni/   (props changed)
  stable/8/sys/modules/scc/   (props changed)
  stable/8/sys/modules/scd/   (props changed)
  stable/8/sys/modules/scsi_low/   (props changed)
  stable/8/sys/modules/sdhci/   (props changed)
  stable/8/sys/modules/sem/   (props changed)
  stable/8/sys/modules/sf/   (props changed)
  stable/8/sys/modules/siis/   (props changed)
  stable/8/sys/modules/sio/   (props changed)
  stable/8/sys/modules/sis/   (props changed)
  stable/8/sys/modules/sk/   (props changed)
  stable/8/sys/modules/smbfs/   (props changed)
  stable/8/sys/modules/sn/   (props changed)
  stable/8/sys/modules/snc/   (props changed)
  stable/8/sys/modules/snp/   (props changed)
  stable/8/sys/modules/sound/   (props changed)
  stable/8/sys/modules/speaker/   (props changed)
  stable/8/sys/modules/splash/   (props changed)
  stable/8/sys/modules/sppp/   (props changed)
  stable/8/sys/modules/ste/   (props changed)
  stable/8/sys/modules/stg/   (props changed)
  stable/8/sys/modules/stge/   (props changed)
  stable/8/sys/modules/streams/   (props changed)
  stable/8/sys/modules/svr4/   (props changed)
  stable/8/sys/modules/sym/   (props changed)
  stable/8/sys/modules/syscons/   (props changed)
  stable/8/sys/modules/sysvipc/   (props changed)
  stable/8/sys/modules/ti/   (props changed)
  stable/8/sys/modules/tl/   (props changed)
  stable/8/sys/modules/tmpfs/   (props changed)
  stable/8/sys/modules/trm/   (props changed)
  stable/8/sys/modules/twa/   (props changed)
  stable/8/sys/modules/twe/   (props changed)
  stable/8/sys/modules/tx/   (props changed)
  stable/8/sys/modules/txp/   (props changed)
  stable/8/sys/modules/uart/   (props changed)
  stable/8/sys/modules/ubsec/   (props changed)
  stable/8/sys/modules/ubser/   (props changed)
  stable/8/sys/modules/uchcom/   (props changed)
  stable/8/sys/modules/ucycom/   (props changed)
  stable/8/sys/modules/udf/   (props changed)
  stable/8/sys/modules/udf_iconv/   (props changed)
  stable/8/sys/modules/ufs/   (props changed)
  stable/8/sys/modules/unionfs/   (props changed)
  stable/8/sys/modules/usb/   (props changed)
  stable/8/sys/modules/utopia/   (props changed)
  stable/8/sys/modules/vesa/   (props changed)
  stable/8/sys/modules/vge/   (props changed)
  stable/8/sys/modules/vkbd/   (props changed)
  stable/8/sys/modules/vpo/   (props changed)
  stable/8/sys/modules/vr/   (props changed)
  stable/8/sys/modules/vx/   (props changed)
  stable/8/sys/modules/wb/   (props changed)
  stable/8/sys/modules/wi/   (props changed)
  stable/8/sys/modules/wlan/   (props changed)
  stable/8/sys/modules/wlan_acl/   (props changed)
  stable/8/sys/modules/wlan_amrr/   (props changed)
  stable/8/sys/modules/wlan_ccmp/   (props changed)
  stable/8/sys/modules/wlan_rssadapt/   (props changed)
  stable/8/sys/modules/wlan_tkip/   (props changed)
  stable/8/sys/modules/wlan_wep/   (props changed)
  stable/8/sys/modules/wlan_xauth/   (props changed)
  stable/8/sys/modules/wpi/   (props changed)
  stable/8/sys/modules/wpifw/   (props changed)
  stable/8/sys/modules/xe/   (props changed)
  stable/8/sys/modules/xfs/   (props changed)
  stable/8/sys/modules/xl/   (props changed)
  stable/8/sys/modules/zfs/   (props changed)
  stable/8/sys/modules/zlib/   (props changed)
  stable/8/sys/net80211/   (props changed)
  stable/8/sys/net80211/_ieee80211.h   (props changed)
  stable/8/sys/net80211/ieee80211.c   (props changed)
  stable/8/sys/net80211/ieee80211.h   (props changed)
  stable/8/sys/net80211/ieee80211_acl.c   (props changed)
  stable/8/sys/net80211/ieee80211_action.c   (props changed)
  stable/8/sys/net80211/ieee80211_action.h   (props changed)
  stable/8/sys/net80211/ieee80211_adhoc.c   (props changed)
  stable/8/sys/net80211/ieee80211_adhoc.h   (props changed)
  stable/8/sys/net80211/ieee80211_ageq.c   (props changed)
  stable/8/sys/net80211/ieee80211_ageq.h   (props changed)
  stable/8/sys/net80211/ieee80211_amrr.c   (props changed)
  stable/8/sys/net80211/ieee80211_amrr.h   (props changed)
  stable/8/sys/net80211/ieee80211_crypto.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto.h   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_ccmp.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_none.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_tkip.c   (props changed)
  stable/8/sys/net80211/ieee80211_crypto_wep.c   (props changed)
  stable/8/sys/net80211/ieee80211_ddb.c   (props changed)
  stable/8/sys/net80211/ieee80211_dfs.c   (props changed)
  stable/8/sys/net80211/ieee80211_dfs.h   (props changed)
  stable/8/sys/net80211/ieee80211_freebsd.c   (props changed)
  stable/8/sys/net80211/ieee80211_freebsd.h   (props changed)
  stable/8/sys/net80211/ieee80211_hostap.c   (props changed)
  stable/8/sys/net80211/ieee80211_hostap.h   (props changed)
  stable/8/sys/net80211/ieee80211_ht.c   (props changed)
  stable/8/sys/net80211/ieee80211_ht.h   (props changed)
  stable/8/sys/net80211/ieee80211_hwmp.c   (props changed)
  stable/8/sys/net80211/ieee80211_input.c   (props changed)
  stable/8/sys/net80211/ieee80211_input.h   (props changed)
  stable/8/sys/net80211/ieee80211_ioctl.c   (props changed)
  stable/8/sys/net80211/ieee80211_ioctl.h   (props changed)
  stable/8/sys/net80211/ieee80211_mesh.c   (props changed)
  stable/8/sys/net80211/ieee80211_mesh.h   (props changed)
  stable/8/sys/net80211/ieee80211_monitor.c   (props changed)
  stable/8/sys/net80211/ieee80211_monitor.h   (props changed)
  stable/8/sys/net80211/ieee80211_node.c   (props changed)
  stable/8/sys/net80211/ieee80211_node.h   (props changed)
  stable/8/sys/net80211/ieee80211_output.c   (props changed)
  stable/8/sys/net80211/ieee80211_phy.c   (props changed)
  stable/8/sys/net80211/ieee80211_phy.h   (props changed)
  stable/8/sys/net80211/ieee80211_power.c   (props changed)
  stable/8/sys/net80211/ieee80211_power.h   (props changed)
  stable/8/sys/net80211/ieee80211_proto.c   (props changed)
  stable/8/sys/net80211/ieee80211_proto.h   (props changed)
  stable/8/sys/net80211/ieee80211_radiotap.c   (props changed)
  stable/8/sys/net80211/ieee80211_radiotap.h   (props changed)
  stable/8/sys/net80211/ieee80211_regdomain.c   (props changed)
  stable/8/sys/net80211/ieee80211_regdomain.h   (props changed)
  stable/8/sys/net80211/ieee80211_rssadapt.c   (props changed)
  stable/8/sys/net80211/ieee80211_rssadapt.h   (props changed)
  stable/8/sys/net80211/ieee80211_scan.c   (props changed)
  stable/8/sys/net80211/ieee80211_scan.h   (props changed)
  stable/8/sys/net80211/ieee80211_scan_sta.c   (props changed)
  stable/8/sys/net80211/ieee80211_sta.c   (props changed)
  stable/8/sys/net80211/ieee80211_sta.h   (props changed)
  stable/8/sys/net80211/ieee80211_superg.c   (props changed)
  stable/8/sys/net80211/ieee80211_superg.h   (props changed)
  stable/8/sys/net80211/ieee80211_tdma.c   (props changed)
  stable/8/sys/net80211/ieee80211_tdma.h   (props changed)
  stable/8/sys/net80211/ieee80211_var.h   (props changed)
  stable/8/sys/net80211/ieee80211_wds.c   (props changed)
  stable/8/sys/net80211/ieee80211_wds.h   (props changed)
  stable/8/sys/net80211/ieee80211_xauth.c   (props changed)
  stable/8/sys/netatalk/   (props changed)
  stable/8/sys/netatalk/COPYRIGHT   (props changed)
  stable/8/sys/netatalk/aarp.c   (props changed)
  stable/8/sys/netatalk/aarp.h   (props changed)
  stable/8/sys/netatalk/at.h   (props changed)
  stable/8/sys/netatalk/at_control.c   (props changed)
  stable/8/sys/netatalk/at_extern.h   (props changed)
  stable/8/sys/netatalk/at_proto.c   (props changed)
  stable/8/sys/netatalk/at_rmx.c   (props changed)
  stable/8/sys/netatalk/at_var.h   (props changed)
  stable/8/sys/netatalk/ddp.h   (props changed)
  stable/8/sys/netatalk/ddp_input.c   (props changed)
  stable/8/sys/netatalk/ddp_output.c   (props changed)
  stable/8/sys/netatalk/ddp_pcb.c   (props changed)
  stable/8/sys/netatalk/ddp_pcb.h   (props changed)
  stable/8/sys/netatalk/ddp_usrreq.c   (props changed)
  stable/8/sys/netatalk/ddp_var.h   (props changed)
  stable/8/sys/netatalk/endian.h   (props changed)
  stable/8/sys/netatalk/phase2.h   (props changed)
  stable/8/sys/netgraph/   (props changed)
  stable/8/sys/netgraph/NOTES   (props changed)
  stable/8/sys/netgraph/atm/   (props changed)
  stable/8/sys/netgraph/bluetooth/   (props changed)
  stable/8/sys/netgraph/netflow/   (props changed)
  stable/8/sys/netgraph/netgraph.h   (props changed)
  stable/8/sys/netgraph/ng_UI.c   (props changed)
  stable/8/sys/netgraph/ng_UI.h   (props changed)
  stable/8/sys/netgraph/ng_async.c   (props changed)
  stable/8/sys/netgraph/ng_async.h   (props changed)
  stable/8/sys/netgraph/ng_atmllc.c   (props changed)
  stable/8/sys/netgraph/ng_atmllc.h   (props changed)
  stable/8/sys/netgraph/ng_base.c   (props changed)
  stable/8/sys/netgraph/ng_bpf.c   (props changed)
  stable/8/sys/netgraph/ng_bpf.h   (props changed)
  stable/8/sys/netgraph/ng_bridge.c   (props changed)
  stable/8/sys/netgraph/ng_bridge.h   (props changed)
  stable/8/sys/netgraph/ng_car.c   (props changed)
  stable/8/sys/netgraph/ng_car.h   (props changed)
  stable/8/sys/netgraph/ng_cisco.c   (props changed)
  stable/8/sys/netgraph/ng_cisco.h   (props changed)
  stable/8/sys/netgraph/ng_deflate.c   (props changed)
  stable/8/sys/netgraph/ng_deflate.h   (props changed)
  stable/8/sys/netgraph/ng_device.c   (props changed)
  stable/8/sys/netgraph/ng_device.h   (props changed)
  stable/8/sys/netgraph/ng_echo.c   (props changed)
  stable/8/sys/netgraph/ng_echo.h   (props changed)
  stable/8/sys/netgraph/ng_eiface.c   (props changed)
  stable/8/sys/netgraph/ng_eiface.h   (props changed)
  stable/8/sys/netgraph/ng_etf.c   (props changed)
  stable/8/sys/netgraph/ng_etf.h   (props changed)
  stable/8/sys/netgraph/ng_ether.c   (props changed)
  stable/8/sys/netgraph/ng_ether.h   (props changed)
  stable/8/sys/netgraph/ng_ether_echo.c   (props changed)
  stable/8/sys/netgraph/ng_ether_echo.h   (props changed)
  stable/8/sys/netgraph/ng_fec.c   (props changed)
  stable/8/sys/netgraph/ng_fec.h   (props changed)
  stable/8/sys/netgraph/ng_frame_relay.c   (props changed)
  stable/8/sys/netgraph/ng_frame_relay.h   (props changed)
  stable/8/sys/netgraph/ng_gif.c   (props changed)
  stable/8/sys/netgraph/ng_gif.h   (props changed)
  stable/8/sys/netgraph/ng_gif_demux.c   (props changed)
  stable/8/sys/netgraph/ng_gif_demux.h   (props changed)
  stable/8/sys/netgraph/ng_hole.c   (props changed)
  stable/8/sys/netgraph/ng_hole.h   (props changed)
  stable/8/sys/netgraph/ng_hub.c   (props changed)
  stable/8/sys/netgraph/ng_hub.h   (props changed)
  stable/8/sys/netgraph/ng_iface.c   (props changed)
  stable/8/sys/netgraph/ng_iface.h   (props changed)
  stable/8/sys/netgraph/ng_ip_input.c   (props changed)
  stable/8/sys/netgraph/ng_ip_input.h   (props changed)
  stable/8/sys/netgraph/ng_ipfw.c   (props changed)
  stable/8/sys/netgraph/ng_ipfw.h   (props changed)
  stable/8/sys/netgraph/ng_ksocket.c   (props changed)
  stable/8/sys/netgraph/ng_ksocket.h   (props changed)
  stable/8/sys/netgraph/ng_l2tp.c   (props changed)
  stable/8/sys/netgraph/ng_l2tp.h   (props changed)
  stable/8/sys/netgraph/ng_lmi.c   (props changed)
  stable/8/sys/netgraph/ng_lmi.h   (props changed)
  stable/8/sys/netgraph/ng_message.h   (props changed)
  stable/8/sys/netgraph/ng_mppc.c   (props changed)
  stable/8/sys/netgraph/ng_mppc.h   (props changed)
  stable/8/sys/netgraph/ng_nat.c   (props changed)
  stable/8/sys/netgraph/ng_nat.h   (props changed)
  stable/8/sys/netgraph/ng_one2many.c   (props changed)
  stable/8/sys/netgraph/ng_one2many.h   (props changed)
  stable/8/sys/netgraph/ng_parse.c   (props changed)
  stable/8/sys/netgraph/ng_parse.h   (props changed)
  stable/8/sys/netgraph/ng_pipe.c   (props changed)
  stable/8/sys/netgraph/ng_pipe.h   (props changed)
  stable/8/sys/netgraph/ng_ppp.c   (props changed)
  stable/8/sys/netgraph/ng_ppp.h   (props changed)
  stable/8/sys/netgraph/ng_pppoe.c   (props changed)
  stable/8/sys/netgraph/ng_pppoe.h   (props changed)
  stable/8/sys/netgraph/ng_pptpgre.c   (props changed)
  stable/8/sys/netgraph/ng_pptpgre.h   (props changed)
  stable/8/sys/netgraph/ng_pred1.c   (props changed)
  stable/8/sys/netgraph/ng_pred1.h   (props changed)
  stable/8/sys/netgraph/ng_rfc1490.c   (props changed)
  stable/8/sys/netgraph/ng_rfc1490.h   (props changed)
  stable/8/sys/netgraph/ng_sample.c   (props changed)
  stable/8/sys/netgraph/ng_sample.h   (props changed)
  stable/8/sys/netgraph/ng_socket.c   (props changed)
  stable/8/sys/netgraph/ng_socket.h   (props changed)
  stable/8/sys/netgraph/ng_socketvar.h   (props changed)
  stable/8/sys/netgraph/ng_source.c   (props changed)
  stable/8/sys/netgraph/ng_source.h   (props changed)
  stable/8/sys/netgraph/ng_split.c   (props changed)
  stable/8/sys/netgraph/ng_split.h   (props changed)
  stable/8/sys/netgraph/ng_sppp.c   (props changed)
  stable/8/sys/netgraph/ng_sppp.h   (props changed)
  stable/8/sys/netgraph/ng_tag.c   (props changed)
  stable/8/sys/netgraph/ng_tag.h   (props changed)
  stable/8/sys/netgraph/ng_tcpmss.c   (props changed)
  stable/8/sys/netgraph/ng_tcpmss.h   (props changed)
  stable/8/sys/netgraph/ng_tee.c   (props changed)
  stable/8/sys/netgraph/ng_tee.h   (props changed)
  stable/8/sys/netgraph/ng_tty.c   (props changed)
  stable/8/sys/netgraph/ng_tty.h   (props changed)
  stable/8/sys/netgraph/ng_vjc.c   (props changed)
  stable/8/sys/netgraph/ng_vjc.h   (props changed)
  stable/8/sys/netgraph/ng_vlan.c   (props changed)
  stable/8/sys/netgraph/ng_vlan.h   (props changed)
  stable/8/sys/netinet/   (props changed)
  stable/8/sys/netinet/accf_data.c   (props changed)
  stable/8/sys/netinet/accf_dns.c   (props changed)
  stable/8/sys/netinet/accf_http.c   (props changed)
  stable/8/sys/netinet/icmp6.h   (props changed)
  stable/8/sys/netinet/icmp_var.h   (props changed)
  stable/8/sys/netinet/if_atm.c   (props changed)
  stable/8/sys/netinet/if_atm.h   (props changed)
  stable/8/sys/netinet/if_ether.c   (props changed)
  stable/8/sys/netinet/if_ether.h   (props changed)
  stable/8/sys/netinet/igmp.c   (props changed)
  stable/8/sys/netinet/igmp.h   (props changed)
  stable/8/sys/netinet/igmp_var.h   (props changed)
  stable/8/sys/netinet/in.c   (props changed)
  stable/8/sys/netinet/in.h   (props changed)
  stable/8/sys/netinet/in_cksum.c   (props changed)
  stable/8/sys/netinet/in_gif.c   (props changed)
  stable/8/sys/netinet/in_gif.h   (props changed)
  stable/8/sys/netinet/in_mcast.c   (props changed)
  stable/8/sys/netinet/in_pcb.c   (props changed)
  stable/8/sys/netinet/in_pcb.h   (props changed)
  stable/8/sys/netinet/in_proto.c   (props changed)
  stable/8/sys/netinet/in_rmx.c   (props changed)
  stable/8/sys/netinet/in_systm.h   (props changed)
  stable/8/sys/netinet/in_var.h   (props changed)
  stable/8/sys/netinet/ip.h   (props changed)
  stable/8/sys/netinet/ip6.h   (props changed)
  stable/8/sys/netinet/ip_carp.c   (props changed)
  stable/8/sys/netinet/ip_carp.h   (props changed)
  stable/8/sys/netinet/ip_divert.c   (props changed)
  stable/8/sys/netinet/ip_divert.h   (props changed)
  stable/8/sys/netinet/ip_dummynet.h   (props changed)
  stable/8/sys/netinet/ip_ecn.c   (props changed)
  stable/8/sys/netinet/ip_ecn.h   (props changed)
  stable/8/sys/netinet/ip_encap.c   (props changed)
  stable/8/sys/netinet/ip_encap.h   (props changed)
  stable/8/sys/netinet/ip_fastfwd.c   (props changed)
  stable/8/sys/netinet/ip_fw.h   (props changed)
  stable/8/sys/netinet/ip_gre.c   (props changed)
  stable/8/sys/netinet/ip_gre.h   (props changed)
  stable/8/sys/netinet/ip_icmp.c   (props changed)
  stable/8/sys/netinet/ip_icmp.h   (props changed)
  stable/8/sys/netinet/ip_id.c   (props changed)
  stable/8/sys/netinet/ip_input.c   (props changed)
  stable/8/sys/netinet/ip_ipsec.c   (props changed)
  stable/8/sys/netinet/ip_ipsec.h   (props changed)
  stable/8/sys/netinet/ip_mroute.c   (props changed)
  stable/8/sys/netinet/ip_mroute.h   (props changed)
  stable/8/sys/netinet/ip_options.c   (props changed)
  stable/8/sys/netinet/ip_options.h   (props changed)
  stable/8/sys/netinet/ip_output.c   (props changed)
  stable/8/sys/netinet/ip_var.h   (props changed)
  stable/8/sys/netinet/ipfw/   (props changed)
  stable/8/sys/netinet/libalias/   (props changed)
  stable/8/sys/netinet/pim.h   (props changed)
  stable/8/sys/netinet/pim_var.h   (props changed)
  stable/8/sys/netinet/raw_ip.c   (props changed)
  stable/8/sys/netinet/sctp.h   (props changed)
  stable/8/sys/netinet/sctp_asconf.c   (props changed)
  stable/8/sys/netinet/sctp_asconf.h   (props changed)
  stable/8/sys/netinet/sctp_auth.c   (props changed)
  stable/8/sys/netinet/sctp_auth.h   (props changed)
  stable/8/sys/netinet/sctp_bsd_addr.c   (props changed)
  stable/8/sys/netinet/sctp_bsd_addr.h   (props changed)
  stable/8/sys/netinet/sctp_cc_functions.c   (props changed)
  stable/8/sys/netinet/sctp_cc_functions.h   (props changed)
  stable/8/sys/netinet/sctp_constants.h   (props changed)
  stable/8/sys/netinet/sctp_crc32.c   (props changed)
  stable/8/sys/netinet/sctp_crc32.h   (props changed)
  stable/8/sys/netinet/sctp_header.h   (props changed)
  stable/8/sys/netinet/sctp_indata.c   (props changed)
  stable/8/sys/netinet/sctp_indata.h   (props changed)
  stable/8/sys/netinet/sctp_input.c   (props changed)
  stable/8/sys/netinet/sctp_input.h   (props changed)
  stable/8/sys/netinet/sctp_lock_bsd.h   (props changed)
  stable/8/sys/netinet/sctp_os.h   (props changed)
  stable/8/sys/netinet/sctp_os_bsd.h   (props changed)
  stable/8/sys/netinet/sctp_output.c   (props changed)
  stable/8/sys/netinet/sctp_output.h   (props changed)
  stable/8/sys/netinet/sctp_pcb.c   (props changed)
  stable/8/sys/netinet/sctp_pcb.h   (props changed)
  stable/8/sys/netinet/sctp_peeloff.c   (props changed)
  stable/8/sys/netinet/sctp_peeloff.h   (props changed)
  stable/8/sys/netinet/sctp_structs.h   (props changed)
  stable/8/sys/netinet/sctp_sysctl.c   (props changed)
  stable/8/sys/netinet/sctp_sysctl.h   (props changed)
  stable/8/sys/netinet/sctp_timer.c   (props changed)
  stable/8/sys/netinet/sctp_timer.h   (props changed)
  stable/8/sys/netinet/sctp_uio.h   (props changed)
  stable/8/sys/netinet/sctp_usrreq.c   (props changed)
  stable/8/sys/netinet/sctp_var.h   (props changed)
  stable/8/sys/netinet/sctputil.c   (props changed)
  stable/8/sys/netinet/sctputil.h   (props changed)
  stable/8/sys/netinet/tcp.h   (props changed)
  stable/8/sys/netinet/tcp_debug.c   (props changed)
  stable/8/sys/netinet/tcp_debug.h   (props changed)
  stable/8/sys/netinet/tcp_fsm.h   (props changed)
  stable/8/sys/netinet/tcp_hostcache.c   (props changed)
  stable/8/sys/netinet/tcp_hostcache.h   (props changed)
  stable/8/sys/netinet/tcp_input.c   (props changed)
  stable/8/sys/netinet/tcp_lro.c   (props changed)
  stable/8/sys/netinet/tcp_lro.h   (props changed)
  stable/8/sys/netinet/tcp_offload.c   (props changed)
  stable/8/sys/netinet/tcp_offload.h   (props changed)
  stable/8/sys/netinet/tcp_output.c   (props changed)
  stable/8/sys/netinet/tcp_reass.c   (props changed)
  stable/8/sys/netinet/tcp_sack.c   (props changed)
  stable/8/sys/netinet/tcp_seq.h   (props changed)
  stable/8/sys/netinet/tcp_subr.c   (props changed)
  stable/8/sys/netinet/tcp_syncache.c   (props changed)
  stable/8/sys/netinet/tcp_syncache.h   (props changed)
  stable/8/sys/netinet/tcp_timer.c   (props changed)
  stable/8/sys/netinet/tcp_timer.h   (props changed)
  stable/8/sys/netinet/tcp_timewait.c   (props changed)
  stable/8/sys/netinet/tcp_usrreq.c   (props changed)
  stable/8/sys/netinet/tcp_var.h   (props changed)
  stable/8/sys/netinet/tcpip.h   (props changed)
  stable/8/sys/netinet/toedev.h   (props changed)
  stable/8/sys/netinet/udp.h   (props changed)
  stable/8/sys/netinet/udp_usrreq.c   (props changed)
  stable/8/sys/netinet/udp_var.h   (props changed)
  stable/8/sys/netipsec/   (props changed)
  stable/8/sys/netipsec/ah.h   (props changed)
  stable/8/sys/netipsec/ah_var.h   (props changed)
  stable/8/sys/netipsec/esp.h   (props changed)
  stable/8/sys/netipsec/esp_var.h   (props changed)
  stable/8/sys/netipsec/ipcomp.h   (props changed)
  stable/8/sys/netipsec/ipcomp_var.h   (props changed)
  stable/8/sys/netipsec/ipip_var.h   (props changed)
  stable/8/sys/netipsec/ipsec.c   (props changed)
  stable/8/sys/netipsec/ipsec.h   (props changed)
  stable/8/sys/netipsec/ipsec6.h   (props changed)
  stable/8/sys/netipsec/ipsec_input.c   (props changed)
  stable/8/sys/netipsec/ipsec_mbuf.c   (props changed)
  stable/8/sys/netipsec/ipsec_output.c   (props changed)
  stable/8/sys/netipsec/key.c   (props changed)
  stable/8/sys/netipsec/key.h   (props changed)
  stable/8/sys/netipsec/key_debug.c   (props changed)
  stable/8/sys/netipsec/key_debug.h   (props changed)
  stable/8/sys/netipsec/key_var.h   (props changed)
  stable/8/sys/netipsec/keydb.h   (props changed)
  stable/8/sys/netipsec/keysock.c   (props changed)
  stable/8/sys/netipsec/keysock.h   (props changed)
  stable/8/sys/netipsec/xform.h   (props changed)
  stable/8/sys/netipsec/xform_ah.c   (props changed)
  stable/8/sys/netipsec/xform_esp.c   (props changed)
  stable/8/sys/netipsec/xform_ipcomp.c   (props changed)
  stable/8/sys/netipsec/xform_ipip.c   (props changed)
  stable/8/sys/netipsec/xform_tcp.c   (props changed)
  stable/8/sys/netipx/   (props changed)
  stable/8/sys/netipx/README   (props changed)
  stable/8/sys/netipx/ipx.c   (props changed)
  stable/8/sys/netipx/ipx.h   (props changed)
  stable/8/sys/netipx/ipx_cksum.c   (props changed)
  stable/8/sys/netipx/ipx_if.h   (props changed)
  stable/8/sys/netipx/ipx_input.c   (props changed)
  stable/8/sys/netipx/ipx_outputfl.c   (props changed)
  stable/8/sys/netipx/ipx_pcb.c   (props changed)
  stable/8/sys/netipx/ipx_pcb.h   (props changed)
  stable/8/sys/netipx/ipx_proto.c   (props changed)
  stable/8/sys/netipx/ipx_usrreq.c   (props changed)
  stable/8/sys/netipx/ipx_var.h   (props changed)
  stable/8/sys/netipx/spx.h   (props changed)
  stable/8/sys/netipx/spx_debug.c   (props changed)
  stable/8/sys/netipx/spx_debug.h   (props changed)
  stable/8/sys/netipx/spx_reass.c   (props changed)
  stable/8/sys/netipx/spx_timer.h   (props changed)
  stable/8/sys/netipx/spx_usrreq.c   (props changed)
  stable/8/sys/netipx/spx_var.h   (props changed)
  stable/8/sys/netnatm/   (props changed)
  stable/8/sys/netnatm/natm.c   (props changed)
  stable/8/sys/netnatm/natm.h   (props changed)
  stable/8/sys/netnatm/natm_pcb.c   (props changed)
  stable/8/sys/netnatm/natm_proto.c   (props changed)
  stable/8/sys/netncp/   (props changed)
  stable/8/sys/netncp/ncp.h   (props changed)
  stable/8/sys/netncp/ncp_cfg.h   (props changed)
  stable/8/sys/netncp/ncp_conn.c   (props changed)
  stable/8/sys/netncp/ncp_conn.h   (props changed)
  stable/8/sys/netncp/ncp_crypt.c   (props changed)
  stable/8/sys/netncp/ncp_file.h   (props changed)
  stable/8/sys/netncp/ncp_lib.h   (props changed)
  stable/8/sys/netncp/ncp_login.c   (props changed)
  stable/8/sys/netncp/ncp_mod.c   (props changed)
  stable/8/sys/netncp/ncp_ncp.c   (props changed)
  stable/8/sys/netncp/ncp_ncp.h   (props changed)
  stable/8/sys/netncp/ncp_nls.c   (props changed)
  stable/8/sys/netncp/ncp_nls.h   (props changed)
  stable/8/sys/netncp/ncp_rcfile.h   (props changed)
  stable/8/sys/netncp/ncp_rq.c   (props changed)
  stable/8/sys/netncp/ncp_rq.h   (props changed)
  stable/8/sys/netncp/ncp_sock.c   (props changed)
  stable/8/sys/netncp/ncp_sock.h   (props changed)
  stable/8/sys/netncp/ncp_subr.c   (props changed)
  stable/8/sys/netncp/ncp_subr.h   (props changed)
  stable/8/sys/netncp/ncp_user.h   (props changed)
  stable/8/sys/netncp/ncpio.h   (props changed)
  stable/8/sys/netncp/nwerror.h   (props changed)
  stable/8/sys/netsmb/   (props changed)
  stable/8/sys/netsmb/netbios.h   (props changed)
  stable/8/sys/netsmb/smb.h   (props changed)
  stable/8/sys/netsmb/smb_conn.c   (props changed)
  stable/8/sys/netsmb/smb_conn.h   (props changed)
  stable/8/sys/netsmb/smb_crypt.c   (props changed)
  stable/8/sys/netsmb/smb_dev.c   (props changed)
  stable/8/sys/netsmb/smb_dev.h   (props changed)
  stable/8/sys/netsmb/smb_iod.c   (props changed)
  stable/8/sys/netsmb/smb_rq.c   (props changed)
  stable/8/sys/netsmb/smb_rq.h   (props changed)
  stable/8/sys/netsmb/smb_smb.c   (props changed)
  stable/8/sys/netsmb/smb_subr.c   (props changed)
  stable/8/sys/netsmb/smb_subr.h   (props changed)
  stable/8/sys/netsmb/smb_tran.h   (props changed)
  stable/8/sys/netsmb/smb_trantcp.c   (props changed)
  stable/8/sys/netsmb/smb_trantcp.h   (props changed)
  stable/8/sys/netsmb/smb_usr.c   (props changed)
  stable/8/sys/nfs/   (props changed)
  stable/8/sys/nfs/nfs_common.c   (props changed)
  stable/8/sys/nfs/nfs_common.h   (props changed)
  stable/8/sys/nfs/nfs_nfssvc.c   (props changed)
  stable/8/sys/nfs/nfsproto.h   (props changed)
  stable/8/sys/nfs/nfssvc.h   (props changed)
  stable/8/sys/nfs/xdr_subs.h   (props changed)
  stable/8/sys/nfsclient/   (props changed)
  stable/8/sys/nfsclient/bootp_subr.c   (props changed)
  stable/8/sys/nfsclient/krpc.h   (props changed)
  stable/8/sys/nfsclient/krpc_subr.c   (props changed)
  stable/8/sys/nfsclient/nfs.h   (props changed)
  stable/8/sys/nfsclient/nfs_bio.c   (props changed)
  stable/8/sys/nfsclient/nfs_diskless.c   (props changed)
  stable/8/sys/nfsclient/nfs_kdtrace.c   (props changed)
  stable/8/sys/nfsclient/nfs_kdtrace.h   (props changed)
  stable/8/sys/nfsclient/nfs_krpc.c   (props changed)
  stable/8/sys/nfsclient/nfs_lock.c   (props changed)
  stable/8/sys/nfsclient/nfs_lock.h   (props changed)
  stable/8/sys/nfsclient/nfs_nfsiod.c   (props changed)
  stable/8/sys/nfsclient/nfs_node.c   (props changed)
  stable/8/sys/nfsclient/nfs_subs.c   (props changed)
  stable/8/sys/nfsclient/nfs_vfsops.c   (props changed)
  stable/8/sys/nfsclient/nfs_vnops.c   (props changed)
  stable/8/sys/nfsclient/nfsargs.h   (props changed)
  stable/8/sys/nfsclient/nfsdiskless.h   (props changed)
  stable/8/sys/nfsclient/nfsm_subs.h   (props changed)
  stable/8/sys/nfsclient/nfsmount.h   (props changed)
  stable/8/sys/nfsclient/nfsnode.h   (props changed)
  stable/8/sys/nfsclient/nfsstats.h   (props changed)
  stable/8/sys/nfsclient/nlminfo.h   (props changed)
  stable/8/sys/nfsserver/   (props changed)
  stable/8/sys/nfsserver/nfs.h   (props changed)
  stable/8/sys/nfsserver/nfs_fha.c   (props changed)
  stable/8/sys/nfsserver/nfs_fha.h   (props changed)
  stable/8/sys/nfsserver/nfs_serv.c   (props changed)
  stable/8/sys/nfsserver/nfs_srvkrpc.c   (props changed)
  stable/8/sys/nfsserver/nfs_srvsubs.c   (props changed)
  stable/8/sys/nfsserver/nfsm_subs.h   (props changed)
  stable/8/sys/nfsserver/nfsrvcache.h   (props changed)
  stable/8/sys/nfsserver/nfsrvstats.h   (props changed)
  stable/8/sys/nlm/   (props changed)
  stable/8/sys/nlm/nlm.h   (props changed)
  stable/8/sys/nlm/nlm_advlock.c   (props changed)
  stable/8/sys/nlm/nlm_prot.h   (props changed)
  stable/8/sys/nlm/nlm_prot_clnt.c   (props changed)
  stable/8/sys/nlm/nlm_prot_impl.c   (props changed)
  stable/8/sys/nlm/nlm_prot_server.c   (props changed)
  stable/8/sys/nlm/nlm_prot_svc.c   (props changed)
  stable/8/sys/nlm/nlm_prot_xdr.c   (props changed)
  stable/8/sys/nlm/sm_inter.h   (props changed)
  stable/8/sys/nlm/sm_inter_xdr.c   (props changed)
  stable/8/sys/opencrypto/   (props changed)
  stable/8/sys/opencrypto/cast.c   (props changed)
  stable/8/sys/opencrypto/cast.h   (props changed)
  stable/8/sys/opencrypto/castsb.h   (props changed)
  stable/8/sys/opencrypto/criov.c   (props changed)
  stable/8/sys/opencrypto/crypto.c   (props changed)
  stable/8/sys/opencrypto/cryptodev.c   (props changed)
  stable/8/sys/opencrypto/cryptodev.h   (props changed)
  stable/8/sys/opencrypto/cryptodev_if.m   (props changed)
  stable/8/sys/opencrypto/cryptosoft.c   (props changed)
  stable/8/sys/opencrypto/cryptosoft.h   (props changed)
  stable/8/sys/opencrypto/deflate.c   (props changed)
  stable/8/sys/opencrypto/deflate.h   (props changed)
  stable/8/sys/opencrypto/rmd160.c   (props changed)
  stable/8/sys/opencrypto/rmd160.h   (props changed)
  stable/8/sys/opencrypto/skipjack.c   (props changed)
  stable/8/sys/opencrypto/skipjack.h   (props changed)
  stable/8/sys/opencrypto/xform.c   (props changed)
  stable/8/sys/opencrypto/xform.h   (props changed)
  stable/8/sys/pc98/   (props changed)
  stable/8/sys/pc98/apm/   (props changed)
  stable/8/sys/pc98/cbus/   (props changed)
  stable/8/sys/pc98/compile/   (props changed)
  stable/8/sys/pc98/conf/   (props changed)
  stable/8/sys/pc98/include/   (props changed)
  stable/8/sys/pc98/linux/   (props changed)
  stable/8/sys/pc98/pc98/   (props changed)
  stable/8/sys/pci/   (props changed)
  stable/8/sys/pci/alpm.c   (props changed)
  stable/8/sys/pci/amdpm.c   (props changed)
  stable/8/sys/pci/amdsmb.c   (props changed)
  stable/8/sys/pci/if_rl.c   (props changed)
  stable/8/sys/pci/if_rlreg.h   (props changed)
  stable/8/sys/pci/intpm.c   (props changed)
  stable/8/sys/pci/intpmreg.h   (props changed)
  stable/8/sys/pci/locate.pl   (props changed)
  stable/8/sys/pci/ncr.c   (props changed)
  stable/8/sys/pci/ncrreg.h   (props changed)
  stable/8/sys/pci/nfsmb.c   (props changed)
  stable/8/sys/pci/viapm.c   (props changed)
  stable/8/sys/powerpc/   (props changed)
  stable/8/sys/powerpc/aim/   (props changed)
  stable/8/sys/powerpc/booke/   (props changed)
  stable/8/sys/powerpc/compile/   (props changed)
  stable/8/sys/powerpc/conf/   (props changed)
  stable/8/sys/powerpc/cpufreq/   (props changed)
  stable/8/sys/powerpc/fpu/   (props changed)
  stable/8/sys/powerpc/include/   (props changed)
  stable/8/sys/powerpc/mpc85xx/   (props changed)
  stable/8/sys/powerpc/ofw/   (props changed)
  stable/8/sys/powerpc/powermac/   (props changed)
  stable/8/sys/powerpc/powerpc/   (props changed)
  stable/8/sys/powerpc/psim/   (props changed)
  stable/8/sys/rpc/   (props changed)
  stable/8/sys/rpc/auth.h   (props changed)
  stable/8/sys/rpc/auth_none.c   (props changed)
  stable/8/sys/rpc/auth_unix.c   (props changed)
  stable/8/sys/rpc/authunix_prot.c   (props changed)
  stable/8/sys/rpc/clnt.h   (props changed)
  stable/8/sys/rpc/clnt_dg.c   (props changed)
  stable/8/sys/rpc/clnt_rc.c   (props changed)
  stable/8/sys/rpc/clnt_stat.h   (props changed)
  stable/8/sys/rpc/clnt_vc.c   (props changed)
  stable/8/sys/rpc/getnetconfig.c   (props changed)
  stable/8/sys/rpc/inet_ntop.c   (props changed)
  stable/8/sys/rpc/inet_pton.c   (props changed)
  stable/8/sys/rpc/netconfig.h   (props changed)
  stable/8/sys/rpc/nettype.h   (props changed)
  stable/8/sys/rpc/pmap_prot.h   (props changed)
  stable/8/sys/rpc/replay.c   (props changed)
  stable/8/sys/rpc/replay.h   (props changed)
  stable/8/sys/rpc/rpc.h   (props changed)
  stable/8/sys/rpc/rpc_callmsg.c   (props changed)
  stable/8/sys/rpc/rpc_com.h   (props changed)
  stable/8/sys/rpc/rpc_generic.c   (props changed)
  stable/8/sys/rpc/rpc_msg.h   (props changed)
  stable/8/sys/rpc/rpc_prot.c   (props changed)
  stable/8/sys/rpc/rpcb_clnt.c   (props changed)
  stable/8/sys/rpc/rpcb_clnt.h   (props changed)
  stable/8/sys/rpc/rpcb_prot.c   (props changed)
  stable/8/sys/rpc/rpcb_prot.h   (props changed)
  stable/8/sys/rpc/rpcm_subs.h   (props changed)
  stable/8/sys/rpc/rpcsec_gss/   (props changed)
  stable/8/sys/rpc/rpcsec_gss.h   (props changed)
  stable/8/sys/rpc/svc.c   (props changed)
  stable/8/sys/rpc/svc.h   (props changed)
  stable/8/sys/rpc/svc_auth.c   (props changed)
  stable/8/sys/rpc/svc_auth.h   (props changed)
  stable/8/sys/rpc/svc_auth_unix.c   (props changed)
  stable/8/sys/rpc/svc_dg.c   (props changed)
  stable/8/sys/rpc/svc_generic.c   (props changed)
  stable/8/sys/rpc/svc_vc.c   (props changed)
  stable/8/sys/rpc/types.h   (props changed)
  stable/8/sys/rpc/xdr.h   (props changed)
  stable/8/sys/security/   (props changed)
  stable/8/sys/security/audit/   (props changed)
  stable/8/sys/security/mac/   (props changed)
  stable/8/sys/security/mac_biba/   (props changed)
  stable/8/sys/security/mac_bsdextended/   (props changed)
  stable/8/sys/security/mac_ifoff/   (props changed)
  stable/8/sys/security/mac_lomac/   (props changed)
  stable/8/sys/security/mac_mls/   (props changed)
  stable/8/sys/security/mac_none/   (props changed)
  stable/8/sys/security/mac_partition/   (props changed)
  stable/8/sys/security/mac_portacl/   (props changed)
  stable/8/sys/security/mac_seeotheruids/   (props changed)
  stable/8/sys/security/mac_stub/   (props changed)
  stable/8/sys/security/mac_test/   (props changed)
  stable/8/sys/sparc64/   (props changed)
  stable/8/sys/sparc64/central/   (props changed)
  stable/8/sys/sparc64/compile/   (props changed)
  stable/8/sys/sparc64/conf/   (props changed)
  stable/8/sys/sparc64/ebus/   (props changed)
  stable/8/sys/sparc64/fhc/   (props changed)
  stable/8/sys/sparc64/include/   (props changed)
  stable/8/sys/sparc64/isa/   (props changed)
  stable/8/sys/sparc64/pci/   (props changed)
  stable/8/sys/sparc64/sbus/   (props changed)
  stable/8/sys/sparc64/sparc64/   (props changed)
  stable/8/sys/sun4v/   (props changed)
  stable/8/sys/sun4v/cddl/   (props changed)
  stable/8/sys/sun4v/compile/   (props changed)
  stable/8/sys/sun4v/conf/   (props changed)
  stable/8/sys/sun4v/include/   (props changed)
  stable/8/sys/sun4v/mdesc/   (props changed)
  stable/8/sys/sun4v/sun4v/   (props changed)
  stable/8/sys/sys/   (props changed)
  stable/8/sys/sys/_bus_dma.h   (props changed)
  stable/8/sys/sys/_iovec.h   (props changed)
  stable/8/sys/sys/_lock.h   (props changed)
  stable/8/sys/sys/_lockmgr.h   (props changed)
  stable/8/sys/sys/_mutex.h   (props changed)
  stable/8/sys/sys/_null.h   (props changed)
  stable/8/sys/sys/_pthreadtypes.h   (props changed)
  stable/8/sys/sys/_rmlock.h   (props changed)
  stable/8/sys/sys/_rwlock.h   (props changed)
  stable/8/sys/sys/_semaphore.h   (props changed)
  stable/8/sys/sys/_sigset.h   (props changed)
  stable/8/sys/sys/_stack.h   (props changed)
  stable/8/sys/sys/_sx.h   (props changed)
  stable/8/sys/sys/_task.h   (props changed)
  stable/8/sys/sys/_timespec.h   (props changed)
  stable/8/sys/sys/_timeval.h   (props changed)
  stable/8/sys/sys/_types.h   (props changed)
  stable/8/sys/sys/aac_ioctl.h   (props changed)
  stable/8/sys/sys/acct.h   (props changed)
  stable/8/sys/sys/acl.h   (props changed)
  stable/8/sys/sys/agpio.h   (props changed)
  stable/8/sys/sys/aio.h   (props changed)
  stable/8/sys/sys/alq.h   (props changed)
  stable/8/sys/sys/apm.h   (props changed)
  stable/8/sys/sys/assym.h   (props changed)
  stable/8/sys/sys/ata.h   (props changed)
  stable/8/sys/sys/bio.h   (props changed)
  stable/8/sys/sys/bitstring.h   (props changed)
  stable/8/sys/sys/blist.h   (props changed)
  stable/8/sys/sys/buf.h   (props changed)
  stable/8/sys/sys/buf_ring.h   (props changed)
  stable/8/sys/sys/bufobj.h   (props changed)
  stable/8/sys/sys/bus.h   (props changed)
  stable/8/sys/sys/bus_dma.h   (props changed)
  stable/8/sys/sys/callout.h   (props changed)
  stable/8/sys/sys/cdefs.h   (props changed)
  stable/8/sys/sys/cdio.h   (props changed)
  stable/8/sys/sys/cdrio.h   (props changed)
  stable/8/sys/sys/cfictl.h   (props changed)
  stable/8/sys/sys/chio.h   (props changed)
  stable/8/sys/sys/clock.h   (props changed)
  stable/8/sys/sys/condvar.h   (props changed)
  stable/8/sys/sys/conf.h   (props changed)
  stable/8/sys/sys/cons.h   (props changed)
  stable/8/sys/sys/consio.h   (props changed)
  stable/8/sys/sys/copyright.h   (props changed)
  stable/8/sys/sys/cpu.h   (props changed)
  stable/8/sys/sys/cpuctl.h   (props changed)
  stable/8/sys/sys/cpuset.h   (props changed)
  stable/8/sys/sys/ctype.h   (props changed)
  stable/8/sys/sys/dataacq.h   (props changed)
  stable/8/sys/sys/device_port.h   (props changed)
  stable/8/sys/sys/devicestat.h   (props changed)
  stable/8/sys/sys/digiio.h   (props changed)
  stable/8/sys/sys/dir.h   (props changed)
  stable/8/sys/sys/dirent.h   (props changed)
  stable/8/sys/sys/disk.h   (props changed)
  stable/8/sys/sys/disklabel.h   (props changed)
  stable/8/sys/sys/diskmbr.h   (props changed)
  stable/8/sys/sys/diskpc98.h   (props changed)
  stable/8/sys/sys/dkstat.h   (props changed)
  stable/8/sys/sys/domain.h   (props changed)
  stable/8/sys/sys/dtrace_bsd.h   (props changed)
  stable/8/sys/sys/dvdio.h   (props changed)
  stable/8/sys/sys/elf.h   (props changed)
  stable/8/sys/sys/elf32.h   (props changed)
  stable/8/sys/sys/elf64.h   (props changed)
  stable/8/sys/sys/elf_common.h   (props changed)
  stable/8/sys/sys/elf_generic.h   (props changed)
  stable/8/sys/sys/endian.h   (props changed)
  stable/8/sys/sys/errno.h   (props changed)
  stable/8/sys/sys/eui64.h   (props changed)
  stable/8/sys/sys/event.h   (props changed)
  stable/8/sys/sys/eventhandler.h   (props changed)
  stable/8/sys/sys/eventvar.h   (props changed)
  stable/8/sys/sys/exec.h   (props changed)
  stable/8/sys/sys/extattr.h   (props changed)
  stable/8/sys/sys/fail.h   (props changed)
  stable/8/sys/sys/fbio.h   (props changed)
  stable/8/sys/sys/fcntl.h   (props changed)
  stable/8/sys/sys/fdcio.h   (props changed)
  stable/8/sys/sys/file.h   (props changed)
  stable/8/sys/sys/filedesc.h   (props changed)
  stable/8/sys/sys/filio.h   (props changed)
  stable/8/sys/sys/firmware.h   (props changed)
  stable/8/sys/sys/fnv_hash.h   (props changed)
  stable/8/sys/sys/gmon.h   (props changed)
  stable/8/sys/sys/gpt.h   (props changed)
  stable/8/sys/sys/hash.h   (props changed)
  stable/8/sys/sys/iconv.h   (props changed)
  stable/8/sys/sys/imgact.h   (props changed)
  stable/8/sys/sys/imgact_aout.h   (props changed)
  stable/8/sys/sys/imgact_elf.h   (props changed)
  stable/8/sys/sys/inflate.h   (props changed)
  stable/8/sys/sys/interrupt.h   (props changed)
  stable/8/sys/sys/ioccom.h   (props changed)
  stable/8/sys/sys/ioctl.h   (props changed)
  stable/8/sys/sys/ioctl_compat.h   (props changed)
  stable/8/sys/sys/ipc.h   (props changed)
  stable/8/sys/sys/ipmi.h   (props changed)
  stable/8/sys/sys/jail.h   (props changed)
  stable/8/sys/sys/joystick.h   (props changed)
  stable/8/sys/sys/kbio.h   (props changed)
  stable/8/sys/sys/kdb.h   (props changed)
  stable/8/sys/sys/kenv.h   (props changed)
  stable/8/sys/sys/kernel.h   (props changed)
  stable/8/sys/sys/kerneldump.h   (props changed)
  stable/8/sys/sys/kobj.h   (props changed)
  stable/8/sys/sys/ksem.h   (props changed)
  stable/8/sys/sys/ksyms.h   (props changed)
  stable/8/sys/sys/kthread.h   (props changed)
  stable/8/sys/sys/ktr.h   (props changed)
  stable/8/sys/sys/ktrace.h   (props changed)
  stable/8/sys/sys/libkern.h   (props changed)
  stable/8/sys/sys/limits.h   (props changed)
  stable/8/sys/sys/link_aout.h   (props changed)
  stable/8/sys/sys/link_elf.h   (props changed)
  stable/8/sys/sys/linker.h   (props changed)
  stable/8/sys/sys/linker_set.h   (props changed)
  stable/8/sys/sys/lock.h   (props changed)
  stable/8/sys/sys/lock_profile.h   (props changed)
  stable/8/sys/sys/lockf.h   (props changed)
  stable/8/sys/sys/lockmgr.h   (props changed)
  stable/8/sys/sys/lockstat.h   (props changed)
  stable/8/sys/sys/mac.h   (props changed)
  stable/8/sys/sys/malloc.h   (props changed)
  stable/8/sys/sys/mbpool.h   (props changed)
  stable/8/sys/sys/mbuf.h   (props changed)
  stable/8/sys/sys/mchain.h   (props changed)
  stable/8/sys/sys/md4.h   (props changed)
  stable/8/sys/sys/md5.h   (props changed)
  stable/8/sys/sys/mdioctl.h   (props changed)
  stable/8/sys/sys/memrange.h   (props changed)
  stable/8/sys/sys/mman.h   (props changed)
  stable/8/sys/sys/module.h   (props changed)
  stable/8/sys/sys/mount.h   (props changed)
  stable/8/sys/sys/mouse.h   (props changed)
  stable/8/sys/sys/mpt_ioctl.h   (props changed)
  stable/8/sys/sys/mqueue.h   (props changed)
  stable/8/sys/sys/msg.h   (props changed)
  stable/8/sys/sys/msgbuf.h   (props changed)
  stable/8/sys/sys/mtio.h   (props changed)
  stable/8/sys/sys/mutex.h   (props changed)
  stable/8/sys/sys/namei.h   (props changed)
  stable/8/sys/sys/nlist_aout.h   (props changed)
  stable/8/sys/sys/osd.h   (props changed)
  stable/8/sys/sys/param.h   (props changed)
  stable/8/sys/sys/pciio.h   (props changed)
  stable/8/sys/sys/pcpu.h   (props changed)
  stable/8/sys/sys/pioctl.h   (props changed)
  stable/8/sys/sys/pipe.h   (props changed)
  stable/8/sys/sys/pmc.h   (props changed)
  stable/8/sys/sys/pmckern.h   (props changed)
  stable/8/sys/sys/pmclog.h   (props changed)
  stable/8/sys/sys/poll.h   (props changed)
  stable/8/sys/sys/posix4.h   (props changed)
  stable/8/sys/sys/power.h   (props changed)
  stable/8/sys/sys/priority.h   (props changed)
  stable/8/sys/sys/priv.h   (props changed)
  stable/8/sys/sys/proc.h   (props changed)
  stable/8/sys/sys/procfs.h   (props changed)
  stable/8/sys/sys/protosw.h   (props changed)
  stable/8/sys/sys/ptio.h   (props changed)
  stable/8/sys/sys/ptrace.h   (props changed)
  stable/8/sys/sys/queue.h   (props changed)
  stable/8/sys/sys/random.h   (props changed)
  stable/8/sys/sys/reboot.h   (props changed)
  stable/8/sys/sys/refcount.h   (props changed)
  stable/8/sys/sys/regression.h   (props changed)
  stable/8/sys/sys/resource.h   (props changed)
  stable/8/sys/sys/resourcevar.h   (props changed)
  stable/8/sys/sys/rman.h   (props changed)
  stable/8/sys/sys/rmlock.h   (props changed)
  stable/8/sys/sys/rtprio.h   (props changed)
  stable/8/sys/sys/runq.h   (props changed)
  stable/8/sys/sys/rwlock.h   (props changed)
  stable/8/sys/sys/sbuf.h   (props changed)
  stable/8/sys/sys/sched.h   (props changed)
  stable/8/sys/sys/sdt.h   (props changed)
  stable/8/sys/sys/select.h   (props changed)
  stable/8/sys/sys/selinfo.h   (props changed)
  stable/8/sys/sys/sem.h   (props changed)
  stable/8/sys/sys/sema.h   (props changed)
  stable/8/sys/sys/semaphore.h   (props changed)
  stable/8/sys/sys/serial.h   (props changed)
  stable/8/sys/sys/sf_buf.h   (props changed)
  stable/8/sys/sys/sglist.h   (props changed)
  stable/8/sys/sys/shm.h   (props changed)
  stable/8/sys/sys/sigio.h   (props changed)
  stable/8/sys/sys/signal.h   (props changed)
  stable/8/sys/sys/signalvar.h   (props changed)
  stable/8/sys/sys/sleepqueue.h   (props changed)
  stable/8/sys/sys/smp.h   (props changed)
  stable/8/sys/sys/snoop.h   (props changed)
  stable/8/sys/sys/sockbuf.h   (props changed)
  stable/8/sys/sys/socket.h   (props changed)
  stable/8/sys/sys/socketvar.h   (props changed)
  stable/8/sys/sys/sockio.h   (props changed)
  stable/8/sys/sys/sockopt.h   (props changed)
  stable/8/sys/sys/sockstate.h   (props changed)
  stable/8/sys/sys/soundcard.h   (props changed)
  stable/8/sys/sys/stack.h   (props changed)
  stable/8/sys/sys/stat.h   (props changed)
  stable/8/sys/sys/statvfs.h   (props changed)
  stable/8/sys/sys/stddef.h   (props changed)
  stable/8/sys/sys/stdint.h   (props changed)
  stable/8/sys/sys/sun_disklabel.h   (props changed)
  stable/8/sys/sys/sx.h   (props changed)
  stable/8/sys/sys/syscall.h   (props changed)
  stable/8/sys/sys/syscall.mk   (props changed)
  stable/8/sys/sys/syscallsubr.h   (props changed)
  stable/8/sys/sys/sysctl.h   (props changed)
  stable/8/sys/sys/sysent.h   (props changed)
  stable/8/sys/sys/syslimits.h   (props changed)
  stable/8/sys/sys/syslog.h   (props changed)
  stable/8/sys/sys/sysproto.h   (props changed)
  stable/8/sys/sys/systm.h   (props changed)
  stable/8/sys/sys/taskqueue.h   (props changed)
  stable/8/sys/sys/termios.h   (props changed)
  stable/8/sys/sys/thr.h   (props changed)
  stable/8/sys/sys/tiio.h   (props changed)
  stable/8/sys/sys/time.h   (props changed)
  stable/8/sys/sys/timeb.h   (props changed)
  stable/8/sys/sys/timepps.h   (props changed)
  stable/8/sys/sys/timers.h   (props changed)
  stable/8/sys/sys/times.h   (props changed)
  stable/8/sys/sys/timespec.h   (props changed)
  stable/8/sys/sys/timetc.h   (props changed)
  stable/8/sys/sys/timex.h   (props changed)
  stable/8/sys/sys/tree.h   (props changed)
  stable/8/sys/sys/tty.h   (props changed)
  stable/8/sys/sys/ttycom.h   (props changed)
  stable/8/sys/sys/ttydefaults.h   (props changed)
  stable/8/sys/sys/ttydevsw.h   (props changed)
  stable/8/sys/sys/ttydisc.h   (props changed)
  stable/8/sys/sys/ttyhook.h   (props changed)
  stable/8/sys/sys/ttyqueue.h   (props changed)
  stable/8/sys/sys/turnstile.h   (props changed)
  stable/8/sys/sys/types.h   (props changed)
  stable/8/sys/sys/ucontext.h   (props changed)
  stable/8/sys/sys/ucred.h   (props changed)
  stable/8/sys/sys/uio.h   (props changed)
  stable/8/sys/sys/umtx.h   (props changed)
  stable/8/sys/sys/un.h   (props changed)
  stable/8/sys/sys/unistd.h   (props changed)
  stable/8/sys/sys/unpcb.h   (props changed)
  stable/8/sys/sys/user.h   (props changed)
  stable/8/sys/sys/utsname.h   (props changed)
  stable/8/sys/sys/uuid.h   (props changed)
  stable/8/sys/sys/vmmeter.h   (props changed)
  stable/8/sys/sys/vnode.h   (props changed)
  stable/8/sys/sys/vtoc.h   (props changed)
  stable/8/sys/sys/wait.h   (props changed)
  stable/8/sys/sys/watchdog.h   (props changed)
  stable/8/sys/tools/   (props changed)
  stable/8/sys/tools/acpi_quirks2h.awk   (props changed)
  stable/8/sys/tools/bus_macro.sh   (props changed)
  stable/8/sys/tools/embed_mfs.sh   (props changed)
  stable/8/sys/tools/fw_stub.awk   (props changed)
  stable/8/sys/tools/makeobjops.awk   (props changed)
  stable/8/sys/tools/miidevs2h.awk   (props changed)
  stable/8/sys/tools/pccarddevs2h.awk   (props changed)
  stable/8/sys/tools/sound/   (props changed)
  stable/8/sys/tools/usbdevs2h.awk   (props changed)
  stable/8/sys/tools/vnode_if.awk   (props changed)
  stable/8/sys/ufs/   (props changed)
  stable/8/sys/ufs/ffs/   (props changed)
  stable/8/sys/ufs/ufs/   (props changed)
  stable/8/sys/vm/   (props changed)
  stable/8/sys/vm/default_pager.c   (props changed)
  stable/8/sys/vm/device_pager.c   (props changed)
  stable/8/sys/vm/memguard.c   (props changed)
  stable/8/sys/vm/memguard.h   (props changed)
  stable/8/sys/vm/phys_pager.c   (props changed)
  stable/8/sys/vm/pmap.h   (props changed)
  stable/8/sys/vm/redzone.c   (props changed)
  stable/8/sys/vm/redzone.h   (props changed)
  stable/8/sys/vm/sg_pager.c   (props changed)
  stable/8/sys/vm/swap_pager.c   (props changed)
  stable/8/sys/vm/swap_pager.h   (props changed)
  stable/8/sys/vm/uma.h   (props changed)
  stable/8/sys/vm/uma_core.c   (props changed)
  stable/8/sys/vm/uma_dbg.c   (props changed)
  stable/8/sys/vm/uma_dbg.h   (props changed)
  stable/8/sys/vm/uma_int.h   (props changed)
  stable/8/sys/vm/vm.h   (props changed)
  stable/8/sys/vm/vm_contig.c   (props changed)
  stable/8/sys/vm/vm_extern.h   (props changed)
  stable/8/sys/vm/vm_fault.c   (props changed)
  stable/8/sys/vm/vm_glue.c   (props changed)
  stable/8/sys/vm/vm_init.c   (props changed)
  stable/8/sys/vm/vm_kern.c   (props changed)
  stable/8/sys/vm/vm_kern.h   (props changed)
  stable/8/sys/vm/vm_map.c   (props changed)
  stable/8/sys/vm/vm_map.h   (props changed)
  stable/8/sys/vm/vm_meter.c   (props changed)
  stable/8/sys/vm/vm_mmap.c   (props changed)
  stable/8/sys/vm/vm_object.c   (props changed)
  stable/8/sys/vm/vm_object.h   (props changed)
  stable/8/sys/vm/vm_page.c   (props changed)
  stable/8/sys/vm/vm_page.h   (props changed)
  stable/8/sys/vm/vm_pageout.c   (props changed)
  stable/8/sys/vm/vm_pageout.h   (props changed)
  stable/8/sys/vm/vm_pager.c   (props changed)
  stable/8/sys/vm/vm_pager.h   (props changed)
  stable/8/sys/vm/vm_param.h   (props changed)
  stable/8/sys/vm/vm_phys.c   (props changed)
  stable/8/sys/vm/vm_phys.h   (props changed)
  stable/8/sys/vm/vm_reserv.c   (props changed)
  stable/8/sys/vm/vm_reserv.h   (props changed)
  stable/8/sys/vm/vm_unix.c   (props changed)
  stable/8/sys/vm/vm_zeroidle.c   (props changed)
  stable/8/sys/vm/vnode_pager.c   (props changed)
  stable/8/sys/vm/vnode_pager.h   (props changed)
  stable/8/sys/xdr/   (props changed)
  stable/8/sys/xdr/xdr.c   (props changed)
  stable/8/sys/xdr/xdr_array.c   (props changed)
  stable/8/sys/xdr/xdr_mbuf.c   (props changed)
  stable/8/sys/xdr/xdr_mem.c   (props changed)
  stable/8/sys/xdr/xdr_reference.c   (props changed)
  stable/8/sys/xdr/xdr_sizeof.c   (props changed)
  stable/8/sys/xen/   (props changed)
  stable/8/sys/xen/evtchn/   (props changed)
  stable/8/sys/xen/evtchn.h   (props changed)
  stable/8/sys/xen/features.c   (props changed)
  stable/8/sys/xen/features.h   (props changed)
  stable/8/sys/xen/gnttab.c   (props changed)
  stable/8/sys/xen/gnttab.h   (props changed)
  stable/8/sys/xen/hypervisor.h   (props changed)
  stable/8/sys/xen/interface/   (props changed)
  stable/8/sys/xen/reboot.c   (props changed)
  stable/8/sys/xen/xen_intr.h   (props changed)
  stable/8/sys/xen/xenbus/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:28:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DAAD2106568D;
	Fri, 20 Nov 2009 15:28:38 +0000 (UTC)
	(envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C96208FC25;
	Fri, 20 Nov 2009 15:28:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFScGt047902;
	Fri, 20 Nov 2009 15:28:38 GMT
	(envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFSco5047900;
	Fri, 20 Nov 2009 15:28:38 GMT
	(envelope-from netchild@svn.freebsd.org)
Message-Id: <200911201528.nAKFSco5047900@svn.freebsd.org>
From: Alexander Leidinger 
Date: Fri, 20 Nov 2009 15:28:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199584 - head/sbin/mount_cd9660
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:28:39 -0000

Author: netchild
Date: Fri Nov 20 15:28:38 2009
New Revision: 199584
URL: http://svn.freebsd.org/changeset/base/199584

Log:
  Fix minor memory leak in a function.
  
  MFC after:	1 week

Modified:
  head/sbin/mount_cd9660/mount_cd9660.c

Modified: head/sbin/mount_cd9660/mount_cd9660.c
==============================================================================
--- head/sbin/mount_cd9660/mount_cd9660.c	Fri Nov 20 15:27:52 2009	(r199583)
+++ head/sbin/mount_cd9660/mount_cd9660.c	Fri Nov 20 15:28:38 2009	(r199584)
@@ -251,8 +251,10 @@ set_charset(struct iovec **iov, int *iov
 
 	if ((cs_disk = malloc(ICONV_CSNMAXLEN)) == NULL)
 		return (-1);
-	if ((cs_local = malloc(ICONV_CSNMAXLEN)) == NULL)
+	if ((cs_local = malloc(ICONV_CSNMAXLEN)) == NULL) {
+		free(cs_disk);
 		return (-1);
+	}
 	strncpy(cs_disk, ENCODING_UNICODE, ICONV_CSNMAXLEN);
 	strncpy(cs_local, kiconv_quirkcs(localcs, KICONV_VENDOR_MICSFT),
 	    ICONV_CSNMAXLEN);

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:48:58 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8AD341065676;
	Fri, 20 Nov 2009 15:48:58 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5FA808FC19;
	Fri, 20 Nov 2009 15:48:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFmwho048421;
	Fri, 20 Nov 2009 15:48:58 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFmwkY048419;
	Fri, 20 Nov 2009 15:48:58 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200911201548.nAKFmwkY048419@svn.freebsd.org>
From: Ken Smith 
Date: Fri, 20 Nov 2009 15:48:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199586 - releng/8.0/release/doc/share/sgml
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:48:58 -0000

Author: kensmith
Date: Fri Nov 20 15:48:58 2009
New Revision: 199586
URL: http://svn.freebsd.org/changeset/base/199586

Log:
  Adjust to reflect 8.0-RELEASE.
  
  Approved by:	re (implicit)

Modified:
  releng/8.0/release/doc/share/sgml/release.ent

Modified: releng/8.0/release/doc/share/sgml/release.ent
==============================================================================
--- releng/8.0/release/doc/share/sgml/release.ent	Fri Nov 20 15:43:27 2009	(r199585)
+++ releng/8.0/release/doc/share/sgml/release.ent	Fri Nov 20 15:48:58 2009	(r199586)
@@ -6,41 +6,35 @@
 
 
-
+
 
 
-
-
-
-
+
 
 
-
+
 
 
-
+
 
 
-
+
 
 
-
-
+
+
 
-
+
 
 
 
-
-
-
+
+
 
-
+
 
 
 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:51:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1A8021065694;
	Fri, 20 Nov 2009 15:51:08 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 08B858FC0C;
	Fri, 20 Nov 2009 15:51:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFp79J048579;
	Fri, 20 Nov 2009 15:51:07 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFp7Lw048577;
	Fri, 20 Nov 2009 15:51:07 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200911201551.nAKFp7Lw048577@svn.freebsd.org>
From: Ken Smith 
Date: Fri, 20 Nov 2009 15:51:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199588 -
	releng/8.0/release/doc/en_US.ISO8859-1/share/sgml
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:51:08 -0000

Author: kensmith
Date: Fri Nov 20 15:51:07 2009
New Revision: 199588
URL: http://svn.freebsd.org/changeset/base/199588

Log:
  Remove the warning that all users should subscribe to -current, it
  only applies to head.
  
  Approved by:	re (implicit)

Modified:
  releng/8.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl

Modified: releng/8.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl
==============================================================================
--- releng/8.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl	Fri Nov 20 15:50:56 2009	(r199587)
+++ releng/8.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl	Fri Nov 20 15:51:07 2009	(r199588)
@@ -38,17 +38,6 @@
             (make element gi: "p"
                   attributes: (list (list "align" "center"))
               (make element gi: "small"  
-                (literal "All users of FreeBSD ")
-		(literal (entity-text "release.branch"))
-		(literal " should subscribe to the ")
-                (literal "<")
-		(create-link (list (list "HREF" "mailto:current@FreeBSD.org"))
-                  (literal "current@FreeBSD.org"))
-                (literal "> mailing list.")))
-
-            (make element gi: "p"
-                  attributes: (list (list "align" "center"))
-              (make element gi: "small"  
 	      (literal "For questions about this documentation, e-mail <")
 	      (create-link (list (list "HREF" "mailto:doc@FreeBSD.org"))
                 (literal "doc@FreeBSD.org"))

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:54:00 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52609106566C;
	Fri, 20 Nov 2009 15:54:00 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3ED458FC16;
	Fri, 20 Nov 2009 15:54:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFrxlf048718;
	Fri, 20 Nov 2009 15:53:59 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFrx2C048716;
	Fri, 20 Nov 2009 15:53:59 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200911201553.nAKFrx2C048716@svn.freebsd.org>
From: Ken Smith 
Date: Fri, 20 Nov 2009 15:53:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199590 -
	releng/8.0/release/doc/en_US.ISO8859-1/relnotes
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:54:00 -0000

Author: kensmith
Date: Fri Nov 20 15:53:59 2009
New Revision: 199590
URL: http://svn.freebsd.org/changeset/base/199590

Log:
  Make a few adjustments to say this is 8.0-RELEASE.  Add a warning that
  the actual release notes were not available at the time of the release
  builds, they are still being assembled.  Remove the existing entries
  which are not accurate for 8.0-RELEASE.
  
  Approved by:	re (implicit)

Modified:
  releng/8.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml

Modified: releng/8.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml
==============================================================================
--- releng/8.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml	Fri Nov 20 15:51:58 2009	(r199589)
+++ releng/8.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml	Fri Nov 20 15:53:59 2009	(r199590)
@@ -50,6 +50,12 @@
       the last release, as well as significant changes to the &os;
       kernel and userland.
       Some brief remarks on upgrading are also presented.
+
+    NOTE: the full release notes were not available at the time
+      the release builds were started.  See the online version of the
+      release notes for the most up to date information.  The online
+      release notes can be found at .
+    
   
 
 
@@ -138,84 +144,16 @@
   
     Kernel Changes
 
-    A new &man.cpuset.2; API has been added
-      for thread to CPU binding and CPU resource grouping and
-      assignment.  The &man.cpuset.1; userland utility has been added
-      to allow manipulation of processor sets.
-
-    The &man.ddb.4; kernel debugger now has an output capture
-      facility.  Input and output from &man.ddb.4; can now be captured
-      to a memory buffer for later inspection using &man.sysctl.8; or
-      a textdump.  The new capture command controls
-      this feature.
-
-    The &man.ddb.4; debugger now supports a simple scripting
-      facility, which supports a set of named scripts consisting of a
-      set of &man.ddb.4; commands.  These commands can be managed from
-      within &man.ddb.4; or with the use of the new &man.ddb.8;
-      utility.  More details can be found in the &man.ddb.4; manual
-      page.
-
-    The kernel now supports a new textdump format of kernel
-      dumps.  A textdump provides higher-level information via
-      mechanically generated/extracted debugging output, rather than a
-      simple memory dump.  This facility can be used to generate brief
-      kernel bug reports that are rich in debugging information, but
-      are not dependent on kernel symbol tables or precisely
-      synchronized source code.  More information can be found in the
-      &man.textdump.4; manual page.
-
-    Kernel support for M:N threading has been removed.  While
-      the KSE (Kernel Scheduled Entities) project was quite successful
-      in bringing threading to FreeBSD, the M:N approach taken by the
-      KSE library was never developed to its full potential.
-      Backwards compatibility for applications using KSE threading
-      will be provided via &man.libmap.conf.5; for dynamically linked
-      binaries.  The &os; Project greatly appreciates the work of
-      &a.julian;, &a.deischen;, and &a.davidxu; on KSE support.
-
-    The &os; kernel now exports information about certain kernel
-      features via the kern.features sysctl tree.
-      The &man.feature.present.3; library call provides a convenient
-      interface for user applications to test the presence of
-      features.
-
-    The &os; kernel now has support for large
-      memory page mappings (superpages).
-
-    The ULE
-      scheduler is now the default process scheduler
-      in GENERIC kernels.
-
     
       Boot Loader Changes
 
-      The BTX kernel used by the boot
-	loader has been changed to invoke BIOS routines from real
-	mode.  This change makes it possible to boot &os; from USB
-	devices.
-
-      A new gptboot boot loader has
-        been added to support booting from a GPT labeled disk.  A
-        new boot command has been added to
-        &man.gpt.8;, which makes a GPT disk bootable by writing the
-        required bits of the boot loader, creating a new boot
-        partition if required.
+      
 
     
 
     
       Hardware Support
 
-      The &man.cmx.4; driver, a driver for Omnikey CardMan 4040
-        PCMCIA smartcard readers, has been added.
-
-      The &man.syscons.4; driver now supports Colemak keyboard layout.
-
-      The &man.uslcom.4; driver, a driver for Silicon
-        Laboratories CP2101/CP2102-based USB serial adapters, has been
-        imported from OpenBSD.
-
       
 	Multimedia Support
 
@@ -226,40 +164,7 @@
       
 	Network Interface Support
 
-	The &man.ale.4; driver has been added to provide support
-	  for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers.
-
-	The &man.em.4; driver has been split into two drivers
-	  with some common parts.  The &man.em.4; driver will continue
-	  to support adapters up to the 82575, as well as new
-	  client/desktop adapters.  A new &man.igb.4; driver
-	  will support new server adapters.
-
-	The &man.jme.4; driver has been added to provide support
-	  for PCIe network adapters based on JMicron JMC250 Gigabit
-	  Ethernet and JMC260 Fast Ethernet controllers.
-
-	The &man.malo.4; driver has been added to provide
-	  support for Marvell Libertas 88W8335 based PCI network
-	  adapters.
-
-	The firmware for the &man.mxge.4; driver has been
-	  updated from 1.4.25 to 1.4.29.
-
-	The &man.sf.4; driver has been overhauled to improve its
-	  performance and to add support for checksum offloading.  It
-	  should also work on all architectures.
-
-	The &man.re.4; driver has been overhauled to fix a
-	  number of issues.  This driver now has Wake On LAN (WOL)
-	  support.
-
-	The &man.vr.4; driver has been overhauled to fix a
-	  number of outstanding issues.  It also now works on all
-	  architectures.
-
-	The &man.wpi.4; driver has
-	  been updated to include a number of stability fixes.
+        
 
       
     
@@ -267,50 +172,21 @@
     
       Network Protocols
 
-      The &man.bpf.4; packet filter and capture facility now
-        supports a zero-copy mode of operation, in which buffers are
-        loaned from a user process to the kernel.  This feature can
-        be enabled by setting
-        the net.bpf.zerocopy_enable sysctl
-        variable to 1.
-
-      ISDN4BSD(I4B), netatm, and all
-        related subsystems have been removed due to lack of
-        multi-processor support.
-
-      A bug in TCP options padding, where the wrong padding
-        bytes were used, has been fixed.
+      
 
     
 
     
       Disks and Storage
 
-      The &man.aac.4; driver now supports volumes larger than
-        2TB in size.
-
-      The &man.ata.4; driver now supports a spindown command for
-        disks; after a configurable amount of time, if no requests
-        have been received for a disk, the disk will be spun down
-        until the next request.  The &man.atacontrol.8; utility now
-        supports a spindown command to configure
-        this feature.
-
-      The &man.hptrr.4; driver has been updated to version 1.2
-        from Highpoint.
+      
 
     
 
     
       File Systems
 
-      A problem with using &man.mmap.2; on ZFS filesystems has
-        been fixed.
-
-      A new kernel-mode NFS lock manager has been added,
-        improving performance and behavior of NFS locking.  A new
-        &man.clear.locks.8; command has been added to clear locks held
-        on behalf of an NFS client.
+      
 
     
   
@@ -318,111 +194,6 @@
   
     Userland Changes
 
-    The &man.adduser.8; utility now supports
-      a  option to set the mode of a new user's
-      home directory.
-
-    BSD-licensed versions of &man.ar.1; and &man.ranlib.1;,
-      based on libarchive, have replaced the GNU
-      Binutils versions of these utilities.
-
-    &man.chflags.1; now supports a  flag for
-      verbose output and a  flag to ignore errors
-      with the same semantics as (for example)
-      &man.chmod.1;.
-
-    For compatiblity with other implementations, &man.cp.1; now
-      supports a  flag, which is equivalent to
-      specifying the  flags.
-
-    BSD-licensed version of &man.cpio.1; based on
-      libarchive, has replaced the GNU cpio.
-      Note that the GNU cpio is still installed as
-      gcpio.
-
-    The &man.env.1; program now supports 
-      which will completely unset the given variable
-      name by removing it from the environment,
-      instead of just setting it to a null value.
-
-    The &man.fdopendir.3; library function has been added.
-
-    The &man.fetch.3; library now support HTTP 1.1
-      If-Modified-Since behavior.  The &man.fetch.1; program now
-      supports 
-      which will only download the specified HTTP URL if the content
-      is newer than filename.
-
-    &man.find.1; has been enhanced by the addition of a number
-      of primaries that were present in GNU find but not &os;
-      &man.find.1;.
-
-    &man.jexec.8; now supports  option to specify the
-      jail where the command will be executed.
-
-    &man.kgdb.1; now supports a new add-kld
-      command to make it easier to debug crash dumps with kernel
-      modules.
-
-    The &man.ls.1; program now supports a 
-      option to specify a date format string to be used with the long
-      format () output.
-
-    &man.nc.1; now supports a  switch to
-      disable the use of TCP options.
-
-    The &man.ping6.8; utility now returns 2
-      when the packet transmission was successful but no responses
-      were received (this is the same behavior as &man.ping.8;).
-      It returned a non-zero value before this change.
-
-    The &man.procstat.1; utility has been added to display
-      detailed information about processes.
-
-    The &man.realpath.1; utility now supports
-      a  flag to suppress warnings; it now also
-      accepts multiple paths on its command line.
-
-    The &man.split.1; utility now supports a 
-      flag to split a file into a certain number of chunks.
-
-    The &man.tar.1; utility now supports a 
-      flag to enable &man.compress.1;-style
-      compression/decompression.
-
-    The &man.tar.1; utility now supports a
-       flag to ignore user/group names
-      on create and extract.
-
-    The &man.tar.1; utility now supports an
-       flag to sparsify files on extraction.
-
-    The &man.tar.1; utility now supports a 
-      flag to substitute filenames based on the specified regular
-      expression.
-
-    The &man.tcgetsid.3; library function has been added to
-      return the process group ID for the session leader for the
-      controlling terminal.  It is defined in IEEE Std 1003.1-2001
-      (POSIX).
-
-    &man.top.1; now supports a  flag to
-      provide per-CPU usage statistics.
-
-    &man.zdump.8; is now working properly on 64 bit architectures.
-      
-
-    &man.traceroute.8; now has the ability to print the AS
-      number for each hop with the new  switch; a
-      new  option allows selecting a particular
-      WHOIS server.
-
-    &man.traceroute6.8; now supports a  flag
-      to send probe packets with no upper-layer protocol, rather than
-      the usual UDP probe packets.
-
     
       <filename>/etc/rc.d</filename> Scripts
 
@@ -434,83 +205,21 @@
   
     Contributed Software
 
-    AMD has been updated from 6.0.10
-      to 6.1.5.
-
-    awk has been updated from 1 May
-      2007 release to the 23 October 2007 release.
-
-    bzip2 has been updated from 1.0.4
-      to 1.0.5.
-
-    CVS has been updated from 1.11.17
-      to a post-1.11.22 snapshot from 10 March 2008.
-
-    FILE has been updated from 4.23
-      to 5.03.
-
-    hostapd has been
-      updated from 0.5.8 to 0.5.10.
-
-    IPFilter has been updated from
-      4.1.23 to 4.1.28.
-
-    less has been updated from
-      v408 to v429.
-
-    ncurses has been updated from
-      5.6-20061217 to 5.6-20080503.
-
-    OpenSSH has been updated
-      from 4.5p1 to 5.1p1.
-
-    OpenPAM has been updated from the
-      Figwort release to the Hydrangea release.
-
-    sendmail has been updated from
-      8.14.1 to 8.14.3.
-
-    The timezone database has been updated from
-      the tzdata2008h release to
-      the tzdata2009j release.
-
-    The stdtime part of libc, &man.zdump.8 and &man.zic.8
-      have been updated from the tzcode2004a
-      release to the tzcode2009h release.
-      If you have upgraded from source or via the &man.freebsd-update.8,
-      then please run &man.tzsetup.8 to install a new /etc/localtime.
-      
-
-    WPA Supplicant has been
-      updated from 0.5.8 to 0.5.10.
+      
 
   
 
   
     Ports/Packages Collection Infrastructure
 
-    The &man.pkg.create.1; utility now supports
-      .  When this option is specified and a
-      package tarball exists, it will not be overwritten.  This is
-      useful when multiple packages are saved with several consecutive
-      runs of &man.pkg.create.1; with the 
-      options.
-
-    The pkg_sign and pkg_check utilities for cryptographically
-      signing &os; packages have been removed.  They were only useful
-      for packages compressed using &man.gzip.1;; however
-      &man.bzip2.1; compression has been the norm for some time
-      now.
+    
 
   
 
   
     Release Engineering and Integration
 
-    The supported version of
-      the GNOME desktop environment
-      (x11/gnome2) has been
-      updated from 2.20.1 to 2.22.
+    
 
   
 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 15:55:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6B79F106566C;
	Fri, 20 Nov 2009 15:55:23 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A6538FC14;
	Fri, 20 Nov 2009 15:55:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKFtNZY048794;
	Fri, 20 Nov 2009 15:55:23 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFtNFl048792;
	Fri, 20 Nov 2009 15:55:23 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200911201555.nAKFtNFl048792@svn.freebsd.org>
From: Ken Smith 
Date: Fri, 20 Nov 2009 15:55:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199591 - releng/8.0/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 15:55:23 -0000

Author: kensmith
Date: Fri Nov 20 15:55:23 2009
New Revision: 199591
URL: http://svn.freebsd.org/changeset/base/199591

Log:
  Prepare for 8.0-RELEASE builds.
  
  Approved by:	re (implicit)

Modified:
  releng/8.0/sys/conf/newvers.sh

Modified: releng/8.0/sys/conf/newvers.sh
==============================================================================
--- releng/8.0/sys/conf/newvers.sh	Fri Nov 20 15:53:59 2009	(r199590)
+++ releng/8.0/sys/conf/newvers.sh	Fri Nov 20 15:55:23 2009	(r199591)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="8.0"
-BRANCH="RC3"
+BRANCH="RELEASE"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
 	BRANCH=${BRANCH_OVERRIDE}
 fi

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 16:00:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BD260106566B;
	Fri, 20 Nov 2009 16:00:40 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AC2148FC1A;
	Fri, 20 Nov 2009 16:00:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKG0e5G049084;
	Fri, 20 Nov 2009 16:00:40 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKG0eb7049082;
	Fri, 20 Nov 2009 16:00:40 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200911201600.nAKG0eb7049082@svn.freebsd.org>
From: Ken Smith 
Date: Fri, 20 Nov 2009 16:00:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199595 - releng/8.0
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 16:00:40 -0000

Author: kensmith
Date: Fri Nov 20 16:00:40 2009
New Revision: 199595
URL: http://svn.freebsd.org/changeset/base/199595

Log:
  Predict when 8.0-RELEASE will be announced.
  
  Approved by:	re (implicit)

Modified:
  releng/8.0/UPDATING

Modified: releng/8.0/UPDATING
==============================================================================
--- releng/8.0/UPDATING	Fri Nov 20 15:59:41 2009	(r199594)
+++ releng/8.0/UPDATING	Fri Nov 20 16:00:40 2009	(r199595)
@@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	debugging tools present in HEAD were left in place because
 	sun4v support still needs work to become production ready.
 
+20091125:
+	8.0-RELEASE.
+
 20090929:
 	802.11s D3.03 support was committed. This is incompatible with
 	the previous code, which was based on D3.0.

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 17:59:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 569EB1065676;
	Fri, 20 Nov 2009 17:59:50 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 460AB8FC19;
	Fri, 20 Nov 2009 17:59:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKHxojU052050;
	Fri, 20 Nov 2009 17:59:50 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKHxo6I052048;
	Fri, 20 Nov 2009 17:59:50 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <200911201759.nAKHxo6I052048@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Fri, 20 Nov 2009 17:59:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199602 - head/sys/powerpc/mpc85xx
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 17:59:50 -0000

Author: marcel
Date: Fri Nov 20 17:59:50 2009
New Revision: 199602
URL: http://svn.freebsd.org/changeset/base/199602

Log:
  Always allocate PCI/ISA interrupts as shareable so that shared
  interrupts don't cause driver attach failures.

Modified:
  head/sys/powerpc/mpc85xx/pci_ocp.c

Modified: head/sys/powerpc/mpc85xx/pci_ocp.c
==============================================================================
--- head/sys/powerpc/mpc85xx/pci_ocp.c	Fri Nov 20 17:17:44 2009	(r199601)
+++ head/sys/powerpc/mpc85xx/pci_ocp.c	Fri Nov 20 17:59:50 2009	(r199602)
@@ -783,6 +783,7 @@ pci_ocp_alloc_resource(device_t dev, dev
 			device_printf(dev, "%s requested ISA interrupt %lu\n",
 			    device_get_nameunit(child), start);
 		}
+		flags |= RF_SHAREABLE;
 		return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child,
 		    type, rid, start, end, count, flags));
 	default:

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 18:49:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E464D1065676;
	Fri, 20 Nov 2009 18:49:20 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D1BBF8FC1F;
	Fri, 20 Nov 2009 18:49:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKInKR5053107;
	Fri, 20 Nov 2009 18:49:20 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKInKt6053100;
	Fri, 20 Nov 2009 18:49:20 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911201849.nAKInKt6053100@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 20 Nov 2009 18:49:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199603 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 18:49:21 -0000

Author: jkim
Date: Fri Nov 20 18:49:20 2009
New Revision: 199603
URL: http://svn.freebsd.org/changeset/base/199603

Log:
  - Allocate scratch memory on stack instead of pre-allocating it with
  the filter as we do from bpf_filter()[1].
  - Revert experimental use of contigmalloc(9)/contigfree(9).  It has no
  performance benefit over malloc(9)/free(9)[2].
  
  Requested by:	rwatson[1]
  Pointed out by:	rwatson, jhb, alc[2]

Modified:
  head/sys/amd64/amd64/bpf_jit_machdep.c
  head/sys/amd64/amd64/bpf_jit_machdep.h
  head/sys/i386/i386/bpf_jit_machdep.c
  head/sys/i386/i386/bpf_jit_machdep.h
  head/sys/net/bpf_jitter.c
  head/sys/net/bpf_jitter.h

Modified: head/sys/amd64/amd64/bpf_jit_machdep.c
==============================================================================
--- head/sys/amd64/amd64/bpf_jit_machdep.c	Fri Nov 20 17:59:50 2009	(r199602)
+++ head/sys/amd64/amd64/bpf_jit_machdep.c	Fri Nov 20 18:49:20 2009	(r199603)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *);
+bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *);
 
 /*
  * emit routine to update the jump table
@@ -97,7 +97,7 @@ emit_code(bpf_bin_stream *stream, u_int 
  * Function that does the real stuff
  */
 bpf_filter_func
-bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size, int *mem)
+bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size)
 {
 	bpf_bin_stream stream;
 	struct bpf_insn *ins;
@@ -111,10 +111,9 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 	/* Allocate the reference table for the jumps */
 #ifdef _KERNEL
-	stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int),
-	    M_BPFJIT, M_NOWAIT);
+	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT);
 #else
-	stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int));
+	stream.refs = malloc((nins + 1) * sizeof(u_int));
 #endif
 	if (stream.refs == NULL)
 		return (NULL);
@@ -137,8 +136,10 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		ins = prog;
 
 		/* create the procedure header */
-		MOVrq2(RBX, R8);
-		MOVrq(RDI, RBX);
+		PUSH(RBP);
+		MOVrq(RSP, RBP);
+		SUBib(BPF_MEMWORDS * sizeof(uint32_t), RSP);
+		MOVrq2(RDI, R8);
 		MOVrd2(ESI, R9D);
 		MOVrd(EDX, EDI);
 
@@ -155,13 +156,11 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 			case BPF_RET|BPF_K:
 				MOVid(ins->k, EAX);
-				MOVrq3(R8, RBX);
-				RET();
+				LEAVE_RET();
 				break;
 
 			case BPF_RET|BPF_A:
-				MOVrq3(R8, RBX);
-				RET();
+				LEAVE_RET();
 				break;
 
 			case BPF_LD|BPF_W|BPF_ABS:
@@ -171,11 +170,11 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int32_t), ECX);
-				JAEb(6);
+				JAEb(4);
 				ZEROrd(EAX);
-				MOVrq3(R8, RBX);
-				RET();
-				MOVobd(RBX, RSI, EAX);
+				LEAVE_RET();
+				MOVrq3(R8, RCX);
+				MOVobd(RCX, RSI, EAX);
 				BSWAP(EAX);
 				break;
 
@@ -187,10 +186,10 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int16_t), ECX);
-				JAEb(4);
-				MOVrq3(R8, RBX);
-				RET();
-				MOVobw(RBX, RSI, AX);
+				JAEb(2);
+				LEAVE_RET();
+				MOVrq3(R8, RCX);
+				MOVobw(RCX, RSI, AX);
 				SWAP_AX();
 				break;
 
@@ -198,10 +197,10 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				ZEROrd(EAX);
 				MOVid(ins->k, ESI);
 				CMPrd(EDI, ESI);
-				JBb(4);
-				MOVrq3(R8, RBX);
-				RET();
-				MOVobb(RBX, RSI, AL);
+				JBb(2);
+				LEAVE_RET();
+				MOVrq3(R8, RCX);
+				MOVobb(RCX, RSI, AL);
 				break;
 
 			case BPF_LD|BPF_W|BPF_LEN:
@@ -224,11 +223,11 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int32_t), ECX);
-				JAEb(6);
+				JAEb(4);
 				ZEROrd(EAX);
-				MOVrq3(R8, RBX);
-				RET();
-				MOVobd(RBX, RSI, EAX);
+				LEAVE_RET();
+				MOVrq3(R8, RCX);
+				MOVobd(RCX, RSI, EAX);
 				BSWAP(EAX);
 				break;
 
@@ -245,10 +244,10 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int16_t), ECX);
-				JAEb(4);
-				MOVrq3(R8, RBX);
-				RET();
-				MOVobw(RBX, RSI, AX);
+				JAEb(2);
+				LEAVE_RET();
+				MOVrq3(R8, RCX);
+				MOVobw(RCX, RSI, AX);
 				SWAP_AX();
 				break;
 
@@ -260,22 +259,22 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(EDX, ECX);
 				CMPrd(ESI, ECX);
-				JAb(4);
-				MOVrq3(R8, RBX);
-				RET();
+				JAb(2);
+				LEAVE_RET();
+				MOVrq3(R8, RCX);
 				ADDrd(EDX, ESI);
-				MOVobb(RBX, RSI, AL);
+				MOVobb(RCX, RSI, AL);
 				break;
 
 			case BPF_LDX|BPF_MSH|BPF_B:
 				MOVid(ins->k, ESI);
 				CMPrd(EDI, ESI);
-				JBb(6);
+				JBb(4);
 				ZEROrd(EAX);
-				MOVrq3(R8, RBX);
-				RET();
+				LEAVE_RET();
 				ZEROrd(EDX);
-				MOVobb(RBX, RSI, DL);
+				MOVrq3(R8, RCX);
+				MOVobb(RCX, RSI, DL);
 				ANDib(0x0f, DL);
 				SHLib(2, EDX);
 				break;
@@ -289,15 +288,13 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				break;
 
 			case BPF_LD|BPF_MEM:
-				MOViq((uintptr_t)mem, RCX);
-				MOVid(ins->k * 4, ESI);
-				MOVobd(RCX, RSI, EAX);
+				MOVid(ins->k * sizeof(uint32_t), ESI);
+				MOVobd(RSP, RSI, EAX);
 				break;
 
 			case BPF_LDX|BPF_MEM:
-				MOViq((uintptr_t)mem, RCX);
-				MOVid(ins->k * 4, ESI);
-				MOVobd(RCX, RSI, EDX);
+				MOVid(ins->k * sizeof(uint32_t), ESI);
+				MOVobd(RSP, RSI, EDX);
 				break;
 
 			case BPF_ST:
@@ -306,15 +303,13 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				 * be optimized if the previous instruction
 				 * was already of this type
 				 */
-				MOViq((uintptr_t)mem, RCX);
-				MOVid(ins->k * 4, ESI);
-				MOVomd(EAX, RCX, RSI);
+				MOVid(ins->k * sizeof(uint32_t), ESI);
+				MOVomd(EAX, RSP, RSI);
 				break;
 
 			case BPF_STX:
-				MOViq((uintptr_t)mem, RCX);
-				MOVid(ins->k * 4, ESI);
-				MOVomd(EDX, RCX, RSI);
+				MOVid(ins->k * sizeof(uint32_t), ESI);
+				MOVomd(EDX, RSP, RSI);
 				break;
 
 			case BPF_JMP|BPF_JA:
@@ -394,10 +389,9 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 			case BPF_ALU|BPF_DIV|BPF_X:
 				TESTrd(EDX, EDX);
-				JNEb(6);
+				JNEb(4);
 				ZEROrd(EAX);
-				MOVrq3(R8, RBX);
-				RET();
+				LEAVE_RET();
 				MOVrd(EDX, ECX);
 				ZEROrd(EDX);
 				DIVrd(ECX);
@@ -490,13 +484,12 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		}
 
 #ifdef _KERNEL
-		stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT,
-		    M_NOWAIT, 0, ~0UL, 16, 0);
+		stream.ibuf = malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT);
 		if (stream.ibuf == NULL)
 			break;
 #else
-		stream.ibuf = (char *)mmap(NULL, stream.cur_ip,
-		    PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);
+		stream.ibuf = mmap(NULL, stream.cur_ip, PROT_READ | PROT_WRITE,
+		    MAP_ANON, -1, 0);
 		if (stream.ibuf == MAP_FAILED) {
 			stream.ibuf = NULL;
 			break;

Modified: head/sys/amd64/amd64/bpf_jit_machdep.h
==============================================================================
--- head/sys/amd64/amd64/bpf_jit_machdep.h	Fri Nov 20 17:59:50 2009	(r199602)
+++ head/sys/amd64/amd64/bpf_jit_machdep.h	Fri Nov 20 18:49:20 2009	(r199603)
@@ -215,9 +215,14 @@ typedef void (*emit_func)(bpf_bin_stream
 	emitm(&stream, 0xc486, 2);					\
 } while (0)
 
-/* ret */
-#define RET() do {						\
-	emitm(&stream, 0xc3, 1);					\
+/* pushq r64 */
+#define PUSH(r64) do {							\
+	emitm(&stream, (5 << 4) | (0 << 3) | (r64 & 0x7), 1);		\
+} while (0)
+
+/* leave/ret */
+#define LEAVE_RET() do {						\
+	emitm(&stream, 0xc3c9, 2);					\
 } while (0)
 
 /* addl sr32,dr32 */
@@ -253,6 +258,13 @@ typedef void (*emit_func)(bpf_bin_stream
 	emitm(&stream, i32, 4);						\
 } while (0)
 
+/* subq i8,r64 */
+#define SUBib(i8, r64) do {						\
+	emitm(&stream, 0x8348, 2);					\
+	emitm(&stream, (29 << 3) | (r64 & 0x7), 1);			\
+	emitm(&stream, i8, 1);						\
+} while (0)
+
 /* mull r32 */
 #define MULrd(r32) do {							\
 	emitm(&stream, 0xf7, 1);					\

Modified: head/sys/i386/i386/bpf_jit_machdep.c
==============================================================================
--- head/sys/i386/i386/bpf_jit_machdep.c	Fri Nov 20 17:59:50 2009	(r199602)
+++ head/sys/i386/i386/bpf_jit_machdep.c	Fri Nov 20 18:49:20 2009	(r199603)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *);
+bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *);
 
 /*
  * emit routine to update the jump table
@@ -97,7 +97,7 @@ emit_code(bpf_bin_stream *stream, u_int 
  * Function that does the real stuff
  */
 bpf_filter_func
-bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size, int *mem)
+bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size)
 {
 	bpf_bin_stream stream;
 	struct bpf_insn *ins;
@@ -111,10 +111,9 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 	/* Allocate the reference table for the jumps */
 #ifdef _KERNEL
-	stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int),
-	    M_BPFJIT, M_NOWAIT);
+	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT);
 #else
-	stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int));
+	stream.refs = malloc((nins + 1) * sizeof(u_int));
 #endif
 	if (stream.refs == NULL)
 		return (NULL);
@@ -139,6 +138,7 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		/* create the procedure header */
 		PUSH(EBP);
 		MOVrd(ESP, EBP);
+		SUBib(BPF_MEMWORDS * sizeof(uint32_t), ESP);
 		PUSH(EDI);
 		PUSH(ESI);
 		PUSH(EBX);
@@ -310,14 +310,16 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				break;
 
 			case BPF_LD|BPF_MEM:
-				MOVid((uintptr_t)mem, ECX);
-				MOVid(ins->k * 4, ESI);
+				MOVrd(EBP, ECX);
+				MOVid(((int)ins->k - BPF_MEMWORDS) *
+				    sizeof(uint32_t), ESI);
 				MOVobd(ECX, ESI, EAX);
 				break;
 
 			case BPF_LDX|BPF_MEM:
-				MOVid((uintptr_t)mem, ECX);
-				MOVid(ins->k * 4, ESI);
+				MOVrd(EBP, ECX);
+				MOVid(((int)ins->k - BPF_MEMWORDS) *
+				    sizeof(uint32_t), ESI);
 				MOVobd(ECX, ESI, EDX);
 				break;
 
@@ -327,14 +329,16 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				 * be optimized if the previous instruction
 				 * was already of this type
 				 */
-				MOVid((uintptr_t)mem, ECX);
-				MOVid(ins->k * 4, ESI);
+				MOVrd(EBP, ECX);
+				MOVid(((int)ins->k - BPF_MEMWORDS) *
+				    sizeof(uint32_t), ESI);
 				MOVomd(EAX, ECX, ESI);
 				break;
 
 			case BPF_STX:
-				MOVid((uintptr_t)mem, ECX);
-				MOVid(ins->k * 4, ESI);
+				MOVrd(EBP, ECX);
+				MOVid(((int)ins->k - BPF_MEMWORDS) *
+				    sizeof(uint32_t), ESI);
 				MOVomd(EDX, ECX, ESI);
 				break;
 
@@ -513,13 +517,12 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		}
 
 #ifdef _KERNEL
-		stream.ibuf = (char *)contigmalloc(stream.cur_ip, M_BPFJIT,
-		    M_NOWAIT, 0, ~0UL, 16, 0);
+		stream.ibuf = malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT);
 		if (stream.ibuf == NULL)
 			break;
 #else
-		stream.ibuf = (char *)mmap(NULL, stream.cur_ip,
-		    PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);
+		stream.ibuf = mmap(NULL, stream.cur_ip, PROT_READ | PROT_WRITE,
+		    MAP_ANON, -1, 0);
 		if (stream.ibuf == MAP_FAILED) {
 			stream.ibuf = NULL;
 			break;

Modified: head/sys/i386/i386/bpf_jit_machdep.h
==============================================================================
--- head/sys/i386/i386/bpf_jit_machdep.h	Fri Nov 20 17:59:50 2009	(r199602)
+++ head/sys/i386/i386/bpf_jit_machdep.h	Fri Nov 20 18:49:20 2009	(r199603)
@@ -203,6 +203,13 @@ typedef void (*emit_func)(bpf_bin_stream
 	emitm(&stream, i32, 4);						\
 } while (0)
 
+/* subl i8,r32 */
+#define SUBib(i8, r32) do {						\
+	emitm(&stream, 0x83, 1);					\
+	emitm(&stream, (29 << 3) | (r32 & 0x7), 1);			\
+	emitm(&stream, i8, 1);						\
+} while (0)
+
 /* mull r32 */
 #define MULrd(r32) do {							\
 	emitm(&stream, 0xf7, 1);					\

Modified: head/sys/net/bpf_jitter.c
==============================================================================
--- head/sys/net/bpf_jitter.c	Fri Nov 20 17:59:50 2009	(r199602)
+++ head/sys/net/bpf_jitter.c	Fri Nov 20 18:49:20 2009	(r199603)
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *, int *);
+bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *);
 
 static u_int	bpf_jit_accept_all(u_char *, u_int, u_int);
 
@@ -70,7 +70,7 @@ bpf_jitter(struct bpf_insn *fp, int nins
 
 	/* Allocate the filter structure */
 	filter = (struct bpf_jit_filter *)malloc(sizeof(*filter),
-	    M_BPFJIT, M_NOWAIT | M_ZERO);
+	    M_BPFJIT, M_NOWAIT);
 	if (filter == NULL)
 		return (NULL);
 
@@ -81,8 +81,7 @@ bpf_jitter(struct bpf_insn *fp, int nins
 	}
 
 	/* Create the binary */
-	if ((filter->func = bpf_jit_compile(fp, nins, &filter->size,
-	    filter->mem)) == NULL) {
+	if ((filter->func = bpf_jit_compile(fp, nins, &filter->size)) == NULL) {
 		free(filter, M_BPFJIT);
 		return (NULL);
 	}
@@ -95,7 +94,7 @@ bpf_destroy_jit_filter(bpf_jit_filter *f
 {
 
 	if (filter->func != bpf_jit_accept_all)
-		contigfree(filter->func, filter->size, M_BPFJIT);
+		free(filter->func, M_BPFJIT);
 	free(filter, M_BPFJIT);
 }
 #else
@@ -108,7 +107,6 @@ bpf_jitter(struct bpf_insn *fp, int nins
 	filter = (struct bpf_jit_filter *)malloc(sizeof(*filter));
 	if (filter == NULL)
 		return (NULL);
-	memset(filter, 0, sizeof(*filter));
 
 	/* No filter means accept all */
 	if (fp == NULL || nins == 0) {
@@ -117,8 +115,7 @@ bpf_jitter(struct bpf_insn *fp, int nins
 	}
 
 	/* Create the binary */
-	if ((filter->func = bpf_jit_compile(fp, nins, &filter->size,
-	    filter->mem)) == NULL) {
+	if ((filter->func = bpf_jit_compile(fp, nins, &filter->size)) == NULL) {
 		free(filter);
 		return (NULL);
 	}

Modified: head/sys/net/bpf_jitter.h
==============================================================================
--- head/sys/net/bpf_jitter.h	Fri Nov 20 17:59:50 2009	(r199602)
+++ head/sys/net/bpf_jitter.h	Fri Nov 20 18:49:20 2009	(r199603)
@@ -54,7 +54,6 @@ typedef struct bpf_jit_filter {
 	/* The native filtering binary, in the form of a bpf_filter_func. */
 	bpf_filter_func	func;
 	size_t		size;
-	int		mem[BPF_MEMWORDS];	/* Scratch memory */
 } bpf_jit_filter;
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 18:53:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8A88106575D;
	Fri, 20 Nov 2009 18:53:38 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A6CC38FC0A;
	Fri, 20 Nov 2009 18:53:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKIrc6G053225;
	Fri, 20 Nov 2009 18:53:38 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKIrcoZ053217;
	Fri, 20 Nov 2009 18:53:38 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911201853.nAKIrcoZ053217@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 20 Nov 2009 18:53:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199604 - in head/tools/regression/bpf/bpf_filter: .
	tests
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 18:53:38 -0000

Author: jkim
Date: Fri Nov 20 18:53:38 2009
New Revision: 199604
URL: http://svn.freebsd.org/changeset/base/199604

Log:
  Adjust BPF JIT compiler regression tests to catch up with r199603.

Modified:
  head/tools/regression/bpf/bpf_filter/Makefile
  head/tools/regression/bpf/bpf_filter/bpf_test.c
  head/tools/regression/bpf/bpf_filter/tests/test0075.h
  head/tools/regression/bpf/bpf_filter/tests/test0076.h
  head/tools/regression/bpf/bpf_filter/tests/test0077.h
  head/tools/regression/bpf/bpf_filter/tests/test0078.h
  head/tools/regression/bpf/bpf_filter/tests/test0080.h

Modified: head/tools/regression/bpf/bpf_filter/Makefile
==============================================================================
--- head/tools/regression/bpf/bpf_filter/Makefile	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/Makefile	Fri Nov 20 18:53:38 2009	(r199604)
@@ -43,6 +43,7 @@ CFLAGS+=	-DBPF_VALIDATE
 SRCS+=		${SYSDIR}/net/bpf_jitter.c	\
 		${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c
 CFLAGS+=	-DBPF_JIT_COMPILER
+LIBS+=		-lutil
 WARNS?=		6
 .else
 SRCS+=		${SYSDIR}/net/bpf_filter.c
@@ -52,7 +53,7 @@ WARNS?=		2
 .for TEST in ${TEST_CASES}
 ${TEST}:	${.CURDIR}/tests/${TEST}.h ${SRCS}
 	@${CC} ${CFLAGS} -DBPF_TEST_H=\"${TEST}.h\"	\
-	    -o ${.CURDIR}/${TEST} ${SRCS}
+	    -o ${.CURDIR}/${TEST} ${SRCS} ${LIBS}
 .endfor
 
 all:		${TEST_CASES}

Modified: head/tools/regression/bpf/bpf_filter/bpf_test.c
==============================================================================
--- head/tools/regression/bpf/bpf_filter/bpf_test.c	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/bpf_test.c	Fri Nov 20 18:53:38 2009	(r199604)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2008 Jung-uk Kim . All rights reserved.
+ * Copyright (C) 2009 Jung-uk Kim . All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -57,6 +57,8 @@ static int	verbose = LOG_LEVEL;
 
 #ifdef BPF_JIT_COMPILER
 
+#include 
+
 #include 
 
 static u_int
@@ -73,6 +75,10 @@ bpf_compile_and_filter(void)
 			printf("FATAL\n");
 		exit(FATAL);
 	}
+	if (verbose > 2) {
+		printf("\n");
+		hexdump(filter->func, filter->size, NULL, HD_OMIT_CHARS);
+	}
 
 	for (i = 0; i < BPF_NRUNS; i++)
 		ret = (*(filter->func))(pkt, wirelen, buflen);
@@ -222,6 +228,14 @@ main(void)
 	for (i = 0; i < BPF_NRUNS; i++)
 		ret = bpf_filter(nins != 0 ? pc : NULL, pkt, wirelen, buflen);
 #endif
+	if (expect_signal != 0) {
+		if (verbose > 1)
+			printf("Expected signal %d but got none:\t",
+			    expect_signal);
+		if (verbose > 0)
+			printf("FAILED\n");
+		return (FAILED);
+	}
 	if (ret != expect) {
 		if (verbose > 1)
 			printf("Expected 0x%x but got 0x%x:\t", expect, ret);

Modified: head/tools/regression/bpf/bpf_filter/tests/test0075.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0075.h	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/tests/test0075.h	Fri Nov 20 18:53:38 2009	(r199604)
@@ -7,7 +7,7 @@
 /* BPF program */
 struct bpf_insn pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
-	BPF_STMT(BPF_LD+BPF_MEM, 0xffffffff),
+	BPF_STMT(BPF_LD+BPF_MEM, 0x8fffffff),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
@@ -29,8 +29,8 @@ int	invalid =	1;
 u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-#ifdef BPF_JIT_COMPILER
-int	expect_signal =	SIGSEGV;
-#else
+#ifdef __amd64__
 int	expect_signal =	SIGBUS;
+#else
+int	expect_signal =	SIGSEGV;
 #endif

Modified: head/tools/regression/bpf/bpf_filter/tests/test0076.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0076.h	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/tests/test0076.h	Fri Nov 20 18:53:38 2009	(r199604)
@@ -7,7 +7,7 @@
 /* BPF program */
 struct bpf_insn pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
-	BPF_STMT(BPF_LDX+BPF_MEM, 0xffffffff),
+	BPF_STMT(BPF_LDX+BPF_MEM, 0x8fffffff),
 	BPF_STMT(BPF_MISC+BPF_TXA, 0),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
@@ -30,8 +30,8 @@ int	invalid =	1;
 u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-#ifdef BPF_JIT_COMPILER
-int	expect_signal =	SIGSEGV;
-#else
+#ifdef __amd64__
 int	expect_signal =	SIGBUS;
+#else
+int	expect_signal =	SIGSEGV;
 #endif

Modified: head/tools/regression/bpf/bpf_filter/tests/test0077.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0077.h	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/tests/test0077.h	Fri Nov 20 18:53:38 2009	(r199604)
@@ -7,7 +7,7 @@
 /* BPF program */
 struct bpf_insn pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
-	BPF_STMT(BPF_ST, 0xffffffff),
+	BPF_STMT(BPF_ST, 0x8fffffff),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
@@ -29,8 +29,8 @@ int	invalid =	1;
 u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-#ifdef BPF_JIT_COMPILER
-int	expect_signal =	SIGSEGV;
-#else
+#ifdef __amd64__
 int	expect_signal =	SIGBUS;
+#else
+int	expect_signal =	SIGSEGV;
 #endif

Modified: head/tools/regression/bpf/bpf_filter/tests/test0078.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0078.h	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/tests/test0078.h	Fri Nov 20 18:53:38 2009	(r199604)
@@ -7,7 +7,7 @@
 /* BPF program */
 struct bpf_insn pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
-	BPF_STMT(BPF_STX, 0xffffffff),
+	BPF_STMT(BPF_STX, 0x8fffffff),
 	BPF_STMT(BPF_MISC+BPF_TXA, 0),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
@@ -30,8 +30,8 @@ int	invalid =	1;
 u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-#ifdef BPF_JIT_COMPILER
-int	expect_signal =	SIGSEGV;
-#else
+#ifdef __amd64__
 int	expect_signal =	SIGBUS;
+#else
+int	expect_signal =	SIGSEGV;
 #endif

Modified: head/tools/regression/bpf/bpf_filter/tests/test0080.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0080.h	Fri Nov 20 18:49:20 2009	(r199603)
+++ head/tools/regression/bpf/bpf_filter/tests/test0080.h	Fri Nov 20 18:53:38 2009	(r199604)
@@ -1,12 +1,12 @@
 /*-
- * Test 0080:	Check uninitialized scratch memory (only for JIT compiler).
+ * Test 0080:	Check uninitialized scratch memory (obsolete).
  *
  * $FreeBSD$
  */
 
 /* BPF program */
 struct bpf_insn pc[] = {
-#ifdef BPF_JIT_COMPILER
+#ifdef BPF_JIT_COMPILER_OBSOLETE
 	BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
 	BPF_STMT(BPF_LD+BPF_MEM, 0),
 	BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 29, 0),

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 19:01:09 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6482A106566B;
	Fri, 20 Nov 2009 19:01:09 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 53AAF8FC14;
	Fri, 20 Nov 2009 19:01:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKJ1928053461;
	Fri, 20 Nov 2009 19:01:09 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKJ199I053459;
	Fri, 20 Nov 2009 19:01:09 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911201901.nAKJ199I053459@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 20 Nov 2009 19:01:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199605 - head/tools/regression/bpf/bpf_filter
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 19:01:09 -0000

Author: jkim
Date: Fri Nov 20 19:01:09 2009
New Revision: 199605
URL: http://svn.freebsd.org/changeset/base/199605

Log:
  Correct copyright date in the BPF regression test.

Modified:
  head/tools/regression/bpf/bpf_filter/bpf_test.c

Modified: head/tools/regression/bpf/bpf_filter/bpf_test.c
==============================================================================
--- head/tools/regression/bpf/bpf_filter/bpf_test.c	Fri Nov 20 18:53:38 2009	(r199604)
+++ head/tools/regression/bpf/bpf_filter/bpf_test.c	Fri Nov 20 19:01:09 2009	(r199605)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2009 Jung-uk Kim . All rights reserved.
+ * Copyright (C) 2008-2009 Jung-uk Kim . All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 19:19:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2AACA106566B;
	Fri, 20 Nov 2009 19:19:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18FD58FC0A;
	Fri, 20 Nov 2009 19:19:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKJJpPH053863;
	Fri, 20 Nov 2009 19:19:51 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKJJpdu053858;
	Fri, 20 Nov 2009 19:19:51 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911201919.nAKJJpdu053858@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 20 Nov 2009 19:19:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199606 - in head/lib/libc: gen include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 19:19:52 -0000

Author: jhb
Date: Fri Nov 20 19:19:51 2009
New Revision: 199606
URL: http://svn.freebsd.org/changeset/base/199606

Log:
  Add an internal _once() method.  This works identical to pthread_once(3)
  with the additional property that it is safe for routines in libc to use
  in both single-threaded and multi-threaded processes.  Multi-threaded
  processes use the pthread_once() implementation from the threading library
  while single-threaded processes use a simplified "stub" version internal
  to libc.  The libc stub-version of pthread_once() now also uses the
  simplified "stub" version as well instead of being a nop.
  
  Reviewed by:	deischen, Matthew Fleming @ Isilon
  Suggested by:	alc
  MFC after:	1 week

Added:
  head/lib/libc/gen/_once_stub.c   (contents, props changed)
Modified:
  head/lib/libc/gen/Makefile.inc
  head/lib/libc/gen/_pthread_stubs.c
  head/lib/libc/include/libc_private.h

Modified: head/lib/libc/gen/Makefile.inc
==============================================================================
--- head/lib/libc/gen/Makefile.inc	Fri Nov 20 19:01:09 2009	(r199605)
+++ head/lib/libc/gen/Makefile.inc	Fri Nov 20 19:19:51 2009	(r199606)
@@ -5,7 +5,8 @@
 .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen
 
 SRCS+=  __getosreldate.c __xuname.c \
-	_pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \
+	_once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \
+	_thread_init.c \
 	alarm.c arc4random.c assert.c basename.c check_utility_compat.c \
 	clock.c closedir.c confstr.c \
 	crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \

Added: head/lib/libc/gen/_once_stub.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/gen/_once_stub.c	Fri Nov 20 19:19:51 2009	(r199606)
@@ -0,0 +1,67 @@
+/*-
+ * Copyright (c) 2009 Advanced Computing Technologies LLC
+ * Written by: John H. Baldwin 
+ * 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include 
+#include "un-namespace.h"
+#include "libc_private.h"
+
+/*
+ * This implements pthread_once() for the single-threaded case.  It is
+ * non-static so that it can be used by _pthread_stubs.c.
+ */
+int
+_libc_once(pthread_once_t *once_control, void (*init_routine)(void))
+{
+
+	if (once_control->state == PTHREAD_DONE_INIT)
+		return (0);
+	init_routine();
+	once_control->state = PTHREAD_DONE_INIT;
+	return (0);
+}
+
+/*
+ * This is the internal interface provided to libc.  It will use
+ * pthread_once() from the threading library in a multi-threaded
+ * process and _libc_once() for a single-threaded library.  Because
+ * _libc_once() uses the same ABI for the values in the pthread_once_t
+ * structure as the threading library, it is safe for a process to
+ * switch from _libc_once() to pthread_once() when threading is
+ * enabled.
+ */
+int
+_once(pthread_once_t *once_control, void (*init_routine)(void))
+{
+
+	if (__isthreaded)
+		return (_pthread_once(once_control, init_routine));
+	return (_libc_once(once_control, init_routine));
+}

Modified: head/lib/libc/gen/_pthread_stubs.c
==============================================================================
--- head/lib/libc/gen/_pthread_stubs.c	Fri Nov 20 19:01:09 2009	(r199605)
+++ head/lib/libc/gen/_pthread_stubs.c	Fri Nov 20 19:19:51 2009	(r199606)
@@ -105,7 +105,7 @@ pthread_func_entry_t __thr_jtable[PJT_MA
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_LOCK */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_TRYLOCK */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_UNLOCK */
-	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_ONCE */
+	{PJT_DUAL_ENTRY(_libc_once)},   /* PJT_ONCE */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_DESTROY */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_INIT */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_RDLOCK */

Modified: head/lib/libc/include/libc_private.h
==============================================================================
--- head/lib/libc/include/libc_private.h	Fri Nov 20 19:01:09 2009	(r199605)
+++ head/lib/libc/include/libc_private.h	Fri Nov 20 19:19:51 2009	(r199606)
@@ -34,6 +34,7 @@
 
 #ifndef _LIBC_PRIVATE_H_
 #define _LIBC_PRIVATE_H_
+#include 
 
 /*
  * This global flag is non-zero when a process has created one
@@ -147,6 +148,13 @@ int _yp_check(char **);
 void _init_tls(void);
 
 /*
+ * Provides pthread_once()-like functionality for both single-threaded
+ * and multi-threaded applications.
+ */
+int _once(pthread_once_t *, void (*)(void));
+int _libc_once(pthread_once_t *, void (*)(void));
+
+/*
  * Set the TLS thread pointer
  */
 void _set_tp(void *tp);

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 19:21:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C11DA106568D;
	Fri, 20 Nov 2009 19:21:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B05518FC16;
	Fri, 20 Nov 2009 19:21:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKJLXcs053933;
	Fri, 20 Nov 2009 19:21:33 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKJLXMl053931;
	Fri, 20 Nov 2009 19:21:33 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911201921.nAKJLXMl053931@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 20 Nov 2009 19:21:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199607 - head/lib/libc/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 19:21:33 -0000

Author: jhb
Date: Fri Nov 20 19:21:33 2009
New Revision: 199607
URL: http://svn.freebsd.org/changeset/base/199607

Log:
  Replace gmt_is_set and the gmt_mutex lock with a pthread_once_t variable and
  an init routine run on the first invocation via _once().
  
  MFC after:	1 week

Modified:
  head/lib/libc/stdtime/localtime.c

Modified: head/lib/libc/stdtime/localtime.c
==============================================================================
--- head/lib/libc/stdtime/localtime.c	Fri Nov 20 19:19:51 2009	(r199606)
+++ head/lib/libc/stdtime/localtime.c	Fri Nov 20 19:21:33 2009	(r199607)
@@ -235,9 +235,8 @@ static struct state	gmtmem;
 
 static char		lcl_TZname[TZ_STRLEN_MAX + 1];
 static int		lcl_is_set;
-static int		gmt_is_set;
+static pthread_once_t	gmt_once = PTHREAD_ONCE_INIT;
 static pthread_rwlock_t	lcl_rwlock = PTHREAD_RWLOCK_INITIALIZER;
-static pthread_mutex_t	gmt_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 char *			tzname[2] = {
 	wildabbr,
@@ -1464,6 +1463,17 @@ struct tm *		tmp;
 	return tmp;
 }
 
+static void
+gmt_init(void)
+{
+
+#ifdef ALL_STATE
+	gmtptr = (struct state *) malloc(sizeof *gmtptr);
+	if (gmtptr != NULL)
+#endif /* defined ALL_STATE */
+		gmtload(gmtptr);
+}
+
 /*
 ** gmtsub is to gmtime as localsub is to localtime.
 */
@@ -1476,16 +1486,7 @@ struct tm * const	tmp;
 {
 	register struct tm *	result;
 
-	_MUTEX_LOCK(&gmt_mutex);
-	if (!gmt_is_set) {
-#ifdef ALL_STATE
-		gmtptr = (struct state *) malloc(sizeof *gmtptr);
-		if (gmtptr != NULL)
-#endif /* defined ALL_STATE */
-			gmtload(gmtptr);
-		gmt_is_set = TRUE;
-	}
-	_MUTEX_UNLOCK(&gmt_mutex);
+	_once(&gmt_once, gmt_init);
 	result = timesub(timep, offset, gmtptr, tmp);
 #ifdef TM_ZONE
 	/*

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 19:55:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B7D7106566B;
	Fri, 20 Nov 2009 19:55:40 +0000 (UTC)
	(envelope-from kabaev@gmail.com)
Received: from mail-qy0-f176.google.com (mail-qy0-f176.google.com
	[209.85.221.176])
	by mx1.freebsd.org (Postfix) with ESMTP id 020DA8FC0C;
	Fri, 20 Nov 2009 19:55:39 +0000 (UTC)
Received: by qyk6 with SMTP id 6so1864503qyk.3
	for ; Fri, 20 Nov 2009 11:55:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:date:from:to:cc:subject
	:message-id:in-reply-to:references:x-mailer:mime-version
	:content-type; bh=mZim0dICu/79k58/z/V1kgsMNg++ikQoZUWKvK5CAs4=;
	b=FuVadMdY9oYNgawg/RWiqqmXwcau4gcWPicIJlSqa8JZnTkWL00Jjea0em8iX+fEhb
	Wat852feZldDOxqdPCUcKqBK8mmgT5e1j1kjVyJLjtMUvizE8iiTez9qKCsRVMO0jwg5
	TCodTkbUjV9yyhQrtowagahg7zwCHVCzylD5k=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer
	:mime-version:content-type;
	b=Nx2U/KOKSDUCC1hKLlqAJQdmlfP8n+mrdEnCQHtlJPpDGOoKgzyO6MEPN0P/TAsoYe
	pGZYWmV5qWqhjTGZnVP2htni4nvylYuqPl/CEtbADfzrDC3/nSfZKv7/r2Z53RXVd/t6
	5Pa0Nj/COKR9j9wauADUOG02nnZIH1GmJ105I=
Received: by 10.224.94.134 with SMTP id z6mr1043568qam.145.1258746939097;
	Fri, 20 Nov 2009 11:55:39 -0800 (PST)
Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net
	[24.91.218.112])
	by mx.google.com with ESMTPS id 7sm5033591qwb.52.2009.11.20.11.55.37
	(version=SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 11:55:38 -0800 (PST)
Date: Fri, 20 Nov 2009 14:55:32 -0500
From: Alexander Kabaev 
To: John Baldwin 
Message-ID: <20091120145532.3892b830@kan.dnsalias.net>
In-Reply-To: <200911201919.nAKJJpdu053858@svn.freebsd.org>
References: <200911201919.nAKJJpdu053858@svn.freebsd.org>
X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; amd64-portbld-freebsd8.0)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/0xFfLNXHAszM=j/hk_j2i3g";
	protocol="application/pgp-signature"
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199606 - in head/lib/libc: gen include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 19:55:40 -0000

--Sig_/0xFfLNXHAszM=j/hk_j2i3g
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Just for the record, this breaks __gthread_active_p() in
GCC and consequently breaks libstdc++ and libgcc_s.so.1 (iirc).

--=20
Alexander Kabaev

--Sig_/0xFfLNXHAszM=j/hk_j2i3g
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (FreeBSD)

iD8DBQFLBvQ4Q6z1jMm+XZYRAl1ZAJ4w+Ruhw/mtAV79QqU1/XcawaX8cQCfS/rC
YGLxOcK000b6Ivxr/QJ6FiE=
=WsvW
-----END PGP SIGNATURE-----

--Sig_/0xFfLNXHAszM=j/hk_j2i3g--

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:12:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4FBEB106566C;
	Fri, 20 Nov 2009 20:12:38 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E6F58FC0A;
	Fri, 20 Nov 2009 20:12:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKCbaE055181;
	Fri, 20 Nov 2009 20:12:37 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKCbuM055180;
	Fri, 20 Nov 2009 20:12:37 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911202012.nAKKCbuM055180@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 20 Nov 2009 20:12:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199608 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:12:38 -0000

Author: yongari
Date: Fri Nov 20 20:12:37 2009
New Revision: 199608
URL: http://svn.freebsd.org/changeset/base/199608

Log:
  Remove unnecessary structure packing.

Modified:
  head/sys/dev/et/if_etvar.h

Modified: head/sys/dev/et/if_etvar.h
==============================================================================
--- head/sys/dev/et/if_etvar.h	Fri Nov 20 19:21:33 2009	(r199607)
+++ head/sys/dev/et/if_etvar.h	Fri Nov 20 20:12:37 2009	(r199608)
@@ -104,7 +104,7 @@ struct et_txdesc {
 	uint32_t	td_addr_lo;
 	uint32_t	td_ctrl1;	/* ET_TDCTRL1_ */
 	uint32_t	td_ctrl2;	/* ET_TDCTRL2_ */
-} __packed;
+};
 
 #define ET_TDCTRL1_LEN_MASK	0x0000FFFF
 
@@ -116,14 +116,14 @@ struct et_rxdesc {
 	uint32_t	rd_addr_lo;
 	uint32_t	rd_addr_hi;
 	uint32_t	rd_ctrl;	/* ET_RDCTRL_ */
-} __packed;
+};
 
 #define ET_RDCTRL_BUFIDX_MASK	0x000003FF
 
 struct et_rxstat {
 	uint32_t	rxst_info1;
 	uint32_t	rxst_info2;	/* ET_RXST_INFO2_ */
-} __packed;
+};
 
 #define ET_RXST_INFO2_LEN_MASK	0x0000FFFF
 #define ET_RXST_INFO2_LEN_SHIFT	0
@@ -135,7 +135,7 @@ struct et_rxstat {
 struct et_rxstatus {
 	uint32_t	rxs_ring;
 	uint32_t	rxs_stat_ring;	/* ET_RXS_STATRING_ */
-} __packed;
+};
 
 #define ET_RXS_STATRING_INDEX_MASK	0x0FFF0000
 #define ET_RXS_STATRING_INDEX_SHIFT	16

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:18:54 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE4D9106566B;
	Fri, 20 Nov 2009 20:18:53 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCA398FC0A;
	Fri, 20 Nov 2009 20:18:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKIrbk055331;
	Fri, 20 Nov 2009 20:18:53 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKIrOl055329;
	Fri, 20 Nov 2009 20:18:53 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911202018.nAKKIrOl055329@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 20 Nov 2009 20:18:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199609 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:18:54 -0000

Author: yongari
Date: Fri Nov 20 20:18:53 2009
New Revision: 199609
URL: http://svn.freebsd.org/changeset/base/199609

Log:
  Add initial endianness support. It seems the controller supports
  both big-endian and little-endian format in descriptors for Rx path
  but I couldn't find equivalent feature in Tx path. So just stick to
  little-endian for now.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Fri Nov 20 20:12:37 2009	(r199608)
+++ head/sys/dev/et/if_et.c	Fri Nov 20 20:18:53 2009	(r199609)
@@ -1913,7 +1913,7 @@ et_rxeof(struct et_softc *sc)
 	struct ifnet *ifp;
 	struct et_rxstatus_data *rxsd;
 	struct et_rxstat_ring *rxst_ring;
-	uint32_t rxs_stat_ring;
+	uint32_t rxs_stat_ring, rxst_info2;
 	int rxst_wrap, rxst_index;
 
 	ET_LOCK_ASSERT(sc);
@@ -1929,7 +1929,7 @@ et_rxeof(struct et_softc *sc)
 	bus_dmamap_sync(rxst_ring->rsr_dtag, rxst_ring->rsr_dmap,
 			BUS_DMASYNC_POSTREAD);
 
-	rxs_stat_ring = rxsd->rxsd_status->rxs_stat_ring;
+	rxs_stat_ring = le32toh(rxsd->rxsd_status->rxs_stat_ring);
 	rxst_wrap = (rxs_stat_ring & ET_RXS_STATRING_WRAP) ? 1 : 0;
 	rxst_index = (rxs_stat_ring & ET_RXS_STATRING_INDEX_MASK) >>
 	    ET_RXS_STATRING_INDEX_SHIFT;
@@ -1945,12 +1945,12 @@ et_rxeof(struct et_softc *sc)
 
 		MPASS(rxst_ring->rsr_index < ET_RX_NSTAT);
 		st = &rxst_ring->rsr_stat[rxst_ring->rsr_index];
-
-		buflen = (st->rxst_info2 & ET_RXST_INFO2_LEN_MASK) >>
+		rxst_info2 = le32toh(st->rxst_info2);
+		buflen = (rxst_info2 & ET_RXST_INFO2_LEN_MASK) >>
 		    ET_RXST_INFO2_LEN_SHIFT;
-		buf_idx = (st->rxst_info2 & ET_RXST_INFO2_BUFIDX_MASK) >>
+		buf_idx = (rxst_info2 & ET_RXST_INFO2_BUFIDX_MASK) >>
 		    ET_RXST_INFO2_BUFIDX_SHIFT;
-		ring_idx = (st->rxst_info2 & ET_RXST_INFO2_RINGIDX_MASK) >>
+		ring_idx = (rxst_info2 & ET_RXST_INFO2_RINGIDX_MASK) >>
 		    ET_RXST_INFO2_RINGIDX_SHIFT;
 
 		if (++rxst_ring->rsr_index == ET_RX_NSTAT) {
@@ -2096,12 +2096,12 @@ et_encap(struct et_softc *sc, struct mbu
 
 		idx = (first_idx + i) % ET_TX_NDESC;
 		td = &tx_ring->tr_desc[idx];
-		td->td_addr_hi = ET_ADDR_HI(segs[i].ds_addr);
-		td->td_addr_lo = ET_ADDR_LO(segs[i].ds_addr);
-		td->td_ctrl1 =  segs[i].ds_len & ET_TDCTRL1_LEN_MASK;
+		td->td_addr_hi = htole32(ET_ADDR_HI(segs[i].ds_addr));
+		td->td_addr_lo = htole32(ET_ADDR_LO(segs[i].ds_addr));
+		td->td_ctrl1 =  htole32(segs[i].ds_len & ET_TDCTRL1_LEN_MASK);
 
 		if (i == ctx.nsegs - 1) {	/* Last frag */
-			td->td_ctrl2 = last_td_ctrl2;
+			td->td_ctrl2 = htole32(last_td_ctrl2);
 			last_idx = idx;
 		}
 
@@ -2112,7 +2112,7 @@ et_encap(struct et_softc *sc, struct mbu
 		}
 	}
 	td = &tx_ring->tr_desc[first_idx];
-	td->td_ctrl2 |= ET_TDCTRL2_FIRST_FRAG;	/* First frag */
+	td->td_ctrl2 |= htole32(ET_TDCTRL2_FIRST_FRAG);	/* First frag */
 
 	MPASS(last_idx >= 0);
 	tbd->tbd_buf[first_idx].tb_dmap = tbd->tbd_buf[last_idx].tb_dmap;
@@ -2424,9 +2424,9 @@ et_setup_rxdesc(struct et_rxbuf_data *rb
 	MPASS(buf_idx < ET_RX_NDESC);
 	desc = &rx_ring->rr_desc[buf_idx];
 
-	desc->rd_addr_hi = ET_ADDR_HI(paddr);
-	desc->rd_addr_lo = ET_ADDR_LO(paddr);
-	desc->rd_ctrl = buf_idx & ET_RDCTRL_BUFIDX_MASK;
+	desc->rd_addr_hi = htole32(ET_ADDR_HI(paddr));
+	desc->rd_addr_lo = htole32(ET_ADDR_LO(paddr));
+	desc->rd_ctrl = htole32(buf_idx & ET_RDCTRL_BUFIDX_MASK);
 
 	bus_dmamap_sync(rx_ring->rr_dtag, rx_ring->rr_dmap,
 			BUS_DMASYNC_PREWRITE);

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:25:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 483FB1065693;
	Fri, 20 Nov 2009 20:25:22 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 36D908FC0A;
	Fri, 20 Nov 2009 20:25:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKPM0K055514;
	Fri, 20 Nov 2009 20:25:22 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKPMDF055512;
	Fri, 20 Nov 2009 20:25:22 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911202025.nAKKPMDF055512@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 20 Nov 2009 20:25:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199610 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:25:22 -0000

Author: yongari
Date: Fri Nov 20 20:25:21 2009
New Revision: 199610
URL: http://svn.freebsd.org/changeset/base/199610

Log:
  Because we know received bytes including CRC there is no reason to
  call m_adj(9). The controller also seems to have a capability to
  strip CRC bytes but I failed to activate this feature except for
  loopback traffic.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Fri Nov 20 20:18:53 2009	(r199609)
+++ head/sys/dev/et/if_et.c	Fri Nov 20 20:25:21 2009	(r199610)
@@ -1982,11 +1982,9 @@ et_rxeof(struct et_softc *sc)
 				m = NULL;
 				ifp->if_ierrors++;
 			} else {
-				m->m_pkthdr.len = m->m_len = buflen;
+				m->m_pkthdr.len = m->m_len =
+				    buflen - ETHER_CRC_LEN;
 				m->m_pkthdr.rcvif = ifp;
-
-				m_adj(m, -ETHER_CRC_LEN);
-
 				ifp->if_ipackets++;
 				ET_UNLOCK(sc);
 				ifp->if_input(ifp, m);

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:29:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A11031065696;
	Fri, 20 Nov 2009 20:29:33 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 7316E8FC17;
	Fri, 20 Nov 2009 20:29:33 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 2850046B1A;
	Fri, 20 Nov 2009 15:29:33 -0500 (EST)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 84A328A01B;
	Fri, 20 Nov 2009 15:29:32 -0500 (EST)
From: John Baldwin 
To: Alexander Kabaev 
Date: Fri, 20 Nov 2009 15:29:14 -0500
User-Agent: KMail/1.9.7
References: <200911201919.nAKJJpdu053858@svn.freebsd.org>
	<20091120145532.3892b830@kan.dnsalias.net>
In-Reply-To: <20091120145532.3892b830@kan.dnsalias.net>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200911201529.14898.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Fri, 20 Nov 2009 15:29:32 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199606 - in head/lib/libc: gen include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:29:33 -0000

On Friday 20 November 2009 2:55:32 pm Alexander Kabaev wrote:
> Just for the record, this breaks __gthread_active_p() in
> GCC and consequently breaks libstdc++ and libgcc_s.so.1 (iirc).

Gah, ok.  I think it mostly pessimizes them rather than outright breaks them?
Still, I'm build-testing a fix now to make the pthread_init() stub back into a
nop.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:34:00 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 26492106566B;
	Fri, 20 Nov 2009 20:34:00 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1420F8FC14;
	Fri, 20 Nov 2009 20:34:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKXxYr055726;
	Fri, 20 Nov 2009 20:33:59 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKXx58055723;
	Fri, 20 Nov 2009 20:33:59 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911202033.nAKKXx58055723@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 20 Nov 2009 20:33:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199611 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:34:00 -0000

Author: yongari
Date: Fri Nov 20 20:33:59 2009
New Revision: 199611
URL: http://svn.freebsd.org/changeset/base/199611

Log:
  Add IPv4/TCP/UDP Tx checksum offloading support. It seems the
  controller also has support for IP/TCP checksum offloading for Rx
  path. But I failed to find to way to enable Rx MAC to compute the
  checksum of received frames.

Modified:
  head/sys/dev/et/if_et.c
  head/sys/dev/et/if_etvar.h

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Fri Nov 20 20:25:21 2009	(r199610)
+++ head/sys/dev/et/if_et.c	Fri Nov 20 20:33:59 2009	(r199611)
@@ -80,6 +80,8 @@ MODULE_DEPEND(et, miibus, 1, 1, 1);
 static int msi_disable = 0;
 TUNABLE_INT("hw.et.msi_disable", &msi_disable);
 
+#define	ET_CSUM_FEATURES	(CSUM_IP | CSUM_TCP | CSUM_UDP)
+
 static int	et_probe(device_t);
 static int	et_attach(device_t);
 static int	et_detach(device_t);
@@ -332,7 +334,7 @@ et_attach(device_t dev)
 	ifp->if_ioctl = et_ioctl;
 	ifp->if_start = et_start;
 	ifp->if_mtu = ETHERMTU;
-	ifp->if_capabilities = IFCAP_VLAN_MTU;
+	ifp->if_capabilities = /*IFCAP_TXCSUM*/IFCAP_HWCSUM | IFCAP_VLAN_MTU;
 	ifp->if_capenable = ifp->if_capabilities;
 	IFQ_SET_MAXLEN(&ifp->if_snd, ET_TX_NDESC);
 	IFQ_SET_READY(&ifp->if_snd);
@@ -1175,7 +1177,7 @@ et_ioctl(struct ifnet *ifp, u_long cmd, 
 	struct et_softc *sc = ifp->if_softc;
 	struct mii_data *mii = device_get_softc(sc->sc_miibus);
 	struct ifreq *ifr = (struct ifreq *)data;
-	int error = 0, max_framelen;
+	int error = 0, mask, max_framelen;
 
 /* XXX LOCKSUSED */
 	switch (cmd) {
@@ -1232,6 +1234,20 @@ et_ioctl(struct ifnet *ifp, u_long cmd, 
 		}
 		break;
 
+	case SIOCSIFCAP:
+		ET_LOCK(sc);
+		mask = ifr->ifr_reqcap ^ ifp->if_capenable;
+		if ((mask & IFCAP_TXCSUM) != 0 &&
+		    (IFCAP_TXCSUM & ifp->if_capabilities) != 0) {
+			ifp->if_capenable ^= IFCAP_TXCSUM;
+			if ((IFCAP_TXCSUM & ifp->if_capenable) != 0)
+				ifp->if_hwassist |= ET_CSUM_FEATURES;
+			else
+				ifp->if_hwassist &= ~ET_CSUM_FEATURES;
+		}
+		ET_UNLOCK(sc);
+		break;
+
 	default:
 		error = ether_ioctl(ifp, cmd, data);
 		break;
@@ -2026,7 +2042,7 @@ et_encap(struct et_softc *sc, struct mbu
 	struct et_txdesc *td;
 	bus_dmamap_t map;
 	int error, maxsegs, first_idx, last_idx, i;
-	uint32_t tx_ready_pos, last_td_ctrl2;
+	uint32_t csum_flags, tx_ready_pos, last_td_ctrl2;
 
 	maxsegs = ET_TX_NDESC - tbd->tbd_used;
 	if (maxsegs > ET_NSEG_MAX)
@@ -2088,6 +2104,15 @@ et_encap(struct et_softc *sc, struct mbu
 		last_td_ctrl2 |= ET_TDCTRL2_INTR;
 	}
 
+	csum_flags = 0;
+	if ((m->m_pkthdr.csum_flags & ET_CSUM_FEATURES) != 0) {
+		if ((m->m_pkthdr.csum_flags & CSUM_IP) != 0)
+			csum_flags |= ET_TDCTRL2_CSUM_IP;
+		if ((m->m_pkthdr.csum_flags & CSUM_UDP) != 0)
+			csum_flags |= ET_TDCTRL2_CSUM_UDP;
+		else if ((m->m_pkthdr.csum_flags & CSUM_TCP) != 0)
+			csum_flags |= ET_TDCTRL2_CSUM_TCP;
+	}
 	last_idx = -1;
 	for (i = 0; i < ctx.nsegs; ++i) {
 		int idx;
@@ -2097,11 +2122,11 @@ et_encap(struct et_softc *sc, struct mbu
 		td->td_addr_hi = htole32(ET_ADDR_HI(segs[i].ds_addr));
 		td->td_addr_lo = htole32(ET_ADDR_LO(segs[i].ds_addr));
 		td->td_ctrl1 =  htole32(segs[i].ds_len & ET_TDCTRL1_LEN_MASK);
-
 		if (i == ctx.nsegs - 1) {	/* Last frag */
-			td->td_ctrl2 = htole32(last_td_ctrl2);
+			td->td_ctrl2 = htole32(last_td_ctrl2 | csum_flags);
 			last_idx = idx;
-		}
+		} else
+			td->td_ctrl2 = htole32(csum_flags);
 
 		MPASS(tx_ring->tr_ready_index < ET_TX_NDESC);
 		if (++tx_ring->tr_ready_index == ET_TX_NDESC) {

Modified: head/sys/dev/et/if_etvar.h
==============================================================================
--- head/sys/dev/et/if_etvar.h	Fri Nov 20 20:25:21 2009	(r199610)
+++ head/sys/dev/et/if_etvar.h	Fri Nov 20 20:33:59 2009	(r199611)
@@ -111,6 +111,18 @@ struct et_txdesc {
 #define ET_TDCTRL2_LAST_FRAG	0x00000001
 #define ET_TDCTRL2_FIRST_FRAG	0x00000002
 #define ET_TDCTRL2_INTR		0x00000004
+#define ET_TDCTRL2_CTRL_WORD	0x00000008
+#define ET_TDCTRL2_HDX_BACKP	0x00000010
+#define ET_TDCTRL2_XMIT_PAUSE	0x00000020
+#define ET_TDCTRL2_FRAME_ERR	0x00000040
+#define ET_TDCTRL2_NO_CRC	0x00000080
+#define ET_TDCTRL2_MAC_OVRRD	0x00000100
+#define ET_TDCTRL2_PAD_PACKET	0x00000200
+#define ET_TDCTRL2_JUMBO_PACKET	0x00000400
+#define ET_TDCTRL2_INS_VLAN	0x00000800
+#define ET_TDCTRL2_CSUM_IP	0x00001000
+#define ET_TDCTRL2_CSUM_TCP	0x00002000
+#define ET_TDCTRL2_CSUM_UDP	0x00004000
 
 struct et_rxdesc {
 	uint32_t	rd_addr_lo;

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:40:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7FF2A106566C;
	Fri, 20 Nov 2009 20:40:34 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6E61D8FC0C;
	Fri, 20 Nov 2009 20:40:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKeYuX055873;
	Fri, 20 Nov 2009 20:40:34 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKeY4c055871;
	Fri, 20 Nov 2009 20:40:34 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911202040.nAKKeY4c055871@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 20 Nov 2009 20:40:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199612 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:40:34 -0000

Author: yongari
Date: Fri Nov 20 20:40:34 2009
New Revision: 199612
URL: http://svn.freebsd.org/changeset/base/199612

Log:
  Add __FBSDID.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Fri Nov 20 20:33:59 2009	(r199611)
+++ head/sys/dev/et/if_et.c	Fri Nov 20 20:40:34 2009	(r199612)
@@ -32,9 +32,11 @@
  * SUCH DAMAGE.
  *
  * $DragonFly: src/sys/dev/netif/et/if_et.c,v 1.10 2008/05/18 07:47:14 sephe Exp $
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:43:16 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98BCF1065694;
	Fri, 20 Nov 2009 20:43:16 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8741D8FC12;
	Fri, 20 Nov 2009 20:43:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKhGoN055964;
	Fri, 20 Nov 2009 20:43:16 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKhGXU055962;
	Fri, 20 Nov 2009 20:43:16 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911202043.nAKKhGXU055962@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 20 Nov 2009 20:43:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199613 - head/sys/dev/et
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:43:16 -0000

Author: yongari
Date: Fri Nov 20 20:43:16 2009
New Revision: 199613
URL: http://svn.freebsd.org/changeset/base/199613

Log:
  Only Tx checksum offloading is supported now. Remove experimental
  code sneaked in r199611.

Modified:
  head/sys/dev/et/if_et.c

Modified: head/sys/dev/et/if_et.c
==============================================================================
--- head/sys/dev/et/if_et.c	Fri Nov 20 20:40:34 2009	(r199612)
+++ head/sys/dev/et/if_et.c	Fri Nov 20 20:43:16 2009	(r199613)
@@ -336,7 +336,7 @@ et_attach(device_t dev)
 	ifp->if_ioctl = et_ioctl;
 	ifp->if_start = et_start;
 	ifp->if_mtu = ETHERMTU;
-	ifp->if_capabilities = /*IFCAP_TXCSUM*/IFCAP_HWCSUM | IFCAP_VLAN_MTU;
+	ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_VLAN_MTU;
 	ifp->if_capenable = ifp->if_capabilities;
 	IFQ_SET_MAXLEN(&ifp->if_snd, ET_TX_NDESC);
 	IFQ_SET_READY(&ifp->if_snd);

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 20:43:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C9A351065672;
	Fri, 20 Nov 2009 20:43:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E4E18FC19;
	Fri, 20 Nov 2009 20:43:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKKhY5Z056007;
	Fri, 20 Nov 2009 20:43:34 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKKhYas056003;
	Fri, 20 Nov 2009 20:43:34 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911202043.nAKKhYas056003@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 20 Nov 2009 20:43:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199614 - in head/lib/libc: gen include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 20:43:34 -0000

Author: jhb
Date: Fri Nov 20 20:43:34 2009
New Revision: 199614
URL: http://svn.freebsd.org/changeset/base/199614

Log:
  Revert the previous change to pthread_once() stub in libc.  It is actually
  a feature that libstdc++ depends on to simulate the behavior of libc's
  internal '__isthreaded' variable.  One benefit of this is that _libc_once()
  is now private to _once_stub.c.
  
  Requested by:	kan

Modified:
  head/lib/libc/gen/_once_stub.c
  head/lib/libc/gen/_pthread_stubs.c
  head/lib/libc/include/libc_private.h

Modified: head/lib/libc/gen/_once_stub.c
==============================================================================
--- head/lib/libc/gen/_once_stub.c	Fri Nov 20 20:43:16 2009	(r199613)
+++ head/lib/libc/gen/_once_stub.c	Fri Nov 20 20:43:34 2009	(r199614)
@@ -33,11 +33,8 @@ __FBSDID("$FreeBSD$");
 #include "un-namespace.h"
 #include "libc_private.h"
 
-/*
- * This implements pthread_once() for the single-threaded case.  It is
- * non-static so that it can be used by _pthread_stubs.c.
- */
-int
+/* This implements pthread_once() for the single-threaded case. */
+static int
 _libc_once(pthread_once_t *once_control, void (*init_routine)(void))
 {
 

Modified: head/lib/libc/gen/_pthread_stubs.c
==============================================================================
--- head/lib/libc/gen/_pthread_stubs.c	Fri Nov 20 20:43:16 2009	(r199613)
+++ head/lib/libc/gen/_pthread_stubs.c	Fri Nov 20 20:43:34 2009	(r199614)
@@ -105,7 +105,7 @@ pthread_func_entry_t __thr_jtable[PJT_MA
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_LOCK */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_TRYLOCK */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_MUTEX_UNLOCK */
-	{PJT_DUAL_ENTRY(_libc_once)},   /* PJT_ONCE */
+	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_ONCE */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_DESTROY */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_INIT */
 	{PJT_DUAL_ENTRY(stub_zero)},    /* PJT_RWLOCK_RDLOCK */

Modified: head/lib/libc/include/libc_private.h
==============================================================================
--- head/lib/libc/include/libc_private.h	Fri Nov 20 20:43:16 2009	(r199613)
+++ head/lib/libc/include/libc_private.h	Fri Nov 20 20:43:34 2009	(r199614)
@@ -152,7 +152,6 @@ void _init_tls(void);
  * and multi-threaded applications.
  */
 int _once(pthread_once_t *, void (*)(void));
-int _libc_once(pthread_once_t *, void (*)(void));
 
 /*
  * Set the TLS thread pointer

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 21:12:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E15CE1065670;
	Fri, 20 Nov 2009 21:12:40 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CE0E88FC0C;
	Fri, 20 Nov 2009 21:12:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKLCexK056657;
	Fri, 20 Nov 2009 21:12:40 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKLCe35056653;
	Fri, 20 Nov 2009 21:12:40 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911202112.nAKLCe35056653@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 20 Nov 2009 21:12:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199615 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 21:12:41 -0000

Author: jkim
Date: Fri Nov 20 21:12:40 2009
New Revision: 199615
URL: http://svn.freebsd.org/changeset/base/199615

Log:
  General style cleanup, no functional change.

Modified:
  head/sys/amd64/amd64/bpf_jit_machdep.c
  head/sys/i386/i386/bpf_jit_machdep.c
  head/sys/net/bpf_jitter.c

Modified: head/sys/amd64/amd64/bpf_jit_machdep.c
==============================================================================
--- head/sys/amd64/amd64/bpf_jit_machdep.c	Fri Nov 20 20:43:34 2009	(r199614)
+++ head/sys/amd64/amd64/bpf_jit_machdep.c	Fri Nov 20 21:12:40 2009	(r199615)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
+#include 
 #include 
 #include 
 #endif
@@ -104,38 +105,38 @@ bpf_jit_compile(struct bpf_insn *prog, u
 	u_int i, pass;
 
 	/*
-	 * NOTE: do not modify the name of this variable, as it's used by
+	 * NOTE: Do not modify the name of this variable, as it's used by
 	 * the macros to emit code.
 	 */
 	emit_func emitm;
 
-	/* Allocate the reference table for the jumps */
+	/* Allocate the reference table for the jumps. */
 #ifdef _KERNEL
-	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT);
+	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
+	    M_NOWAIT | M_ZERO);
 #else
 	stream.refs = malloc((nins + 1) * sizeof(u_int));
 #endif
 	if (stream.refs == NULL)
 		return (NULL);
-
-	/* Reset the reference table */
-	for (i = 0; i < nins + 1; i++)
-		stream.refs[i] = 0;
+#ifndef _KERNEL
+	memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
+#endif
 
 	stream.cur_ip = 0;
 	stream.bpf_pc = 0;
+	stream.ibuf = NULL;
 
 	/*
-	 * the first pass will emit the lengths of the instructions
-	 * to create the reference table
+	 * The first pass will emit the lengths of the instructions
+	 * to create the reference table.
 	 */
 	emitm = emit_length;
 
-	pass = 0;
-	for (;;) {
+	for (pass = 0; pass < 2; pass++) {
 		ins = prog;
 
-		/* create the procedure header */
+		/* Create the procedure header. */
 		PUSH(RBP);
 		MOVrq(RSP, RBP);
 		SUBib(BPF_MEMWORDS * sizeof(uint32_t), RSP);
@@ -470,25 +471,16 @@ bpf_jit_compile(struct bpf_insn *prog, u
 			ins++;
 		}
 
-		pass++;
-		if (pass >= 2) {
-#ifndef _KERNEL
-			if (mprotect(stream.ibuf, stream.cur_ip,
-			    PROT_READ | PROT_EXEC) != 0) {
-				munmap(stream.ibuf, stream.cur_ip);
-				stream.ibuf = NULL;
-			}
-#endif
-			*size = stream.cur_ip;
-			break;
-		}
+		if (pass > 0)
+			continue;
 
+		*size = stream.cur_ip;
 #ifdef _KERNEL
-		stream.ibuf = malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT);
+		stream.ibuf = malloc(*size, M_BPFJIT, M_NOWAIT);
 		if (stream.ibuf == NULL)
 			break;
 #else
-		stream.ibuf = mmap(NULL, stream.cur_ip, PROT_READ | PROT_WRITE,
+		stream.ibuf = mmap(NULL, *size, PROT_READ | PROT_WRITE,
 		    MAP_ANON, -1, 0);
 		if (stream.ibuf == MAP_FAILED) {
 			stream.ibuf = NULL;
@@ -497,28 +489,33 @@ bpf_jit_compile(struct bpf_insn *prog, u
 #endif
 
 		/*
-		 * modify the reference table to contain the offsets and
-		 * not the lengths of the instructions
+		 * Modify the reference table to contain the offsets and
+		 * not the lengths of the instructions.
 		 */
 		for (i = 1; i < nins + 1; i++)
 			stream.refs[i] += stream.refs[i - 1];
 
-		/* Reset the counters */
+		/* Reset the counters. */
 		stream.cur_ip = 0;
 		stream.bpf_pc = 0;
 
-		/* the second pass creates the actual code */
+		/* The second pass creates the actual code. */
 		emitm = emit_code;
 	}
 
 	/*
-	 * the reference table is needed only during compilation,
-	 * now we can free it
+	 * The reference table is needed only during compilation,
+	 * now we can free it.
 	 */
 #ifdef _KERNEL
 	free(stream.refs, M_BPFJIT);
 #else
 	free(stream.refs);
+	if (stream.ibuf != NULL &&
+	    mprotect(stream.ibuf, *size, PROT_READ | PROT_EXEC) != 0) {
+		munmap(stream.ibuf, *size);
+		stream.ibuf = NULL;
+	}
 #endif
 
 	return ((bpf_filter_func)stream.ibuf);

Modified: head/sys/i386/i386/bpf_jit_machdep.c
==============================================================================
--- head/sys/i386/i386/bpf_jit_machdep.c	Fri Nov 20 20:43:34 2009	(r199614)
+++ head/sys/i386/i386/bpf_jit_machdep.c	Fri Nov 20 21:12:40 2009	(r199615)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
+#include 
 #include 
 #include 
 #endif
@@ -104,38 +105,38 @@ bpf_jit_compile(struct bpf_insn *prog, u
 	u_int i, pass;
 
 	/*
-	 * NOTE: do not modify the name of this variable, as it's used by
+	 * NOTE: Do not modify the name of this variable, as it's used by
 	 * the macros to emit code.
 	 */
 	emit_func emitm;
 
-	/* Allocate the reference table for the jumps */
+	/* Allocate the reference table for the jumps. */
 #ifdef _KERNEL
-	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT);
+	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
+	    M_NOWAIT | M_ZERO);
 #else
 	stream.refs = malloc((nins + 1) * sizeof(u_int));
 #endif
 	if (stream.refs == NULL)
 		return (NULL);
-
-	/* Reset the reference table */
-	for (i = 0; i < nins + 1; i++)
-		stream.refs[i] = 0;
+#ifndef _KERNEL
+	memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
+#endif
 
 	stream.cur_ip = 0;
 	stream.bpf_pc = 0;
+	stream.ibuf = NULL;
 
 	/*
-	 * the first pass will emit the lengths of the instructions
-	 * to create the reference table
+	 * The first pass will emit the lengths of the instructions
+	 * to create the reference table.
 	 */
 	emitm = emit_length;
 
-	pass = 0;
-	for (;;) {
+	for (pass = 0; pass < 2; pass++) {
 		ins = prog;
 
-		/* create the procedure header */
+		/* Create the procedure header. */
 		PUSH(EBP);
 		MOVrd(ESP, EBP);
 		SUBib(BPF_MEMWORDS * sizeof(uint32_t), ESP);
@@ -503,25 +504,16 @@ bpf_jit_compile(struct bpf_insn *prog, u
 			ins++;
 		}
 
-		pass++;
-		if (pass >= 2) {
-#ifndef _KERNEL
-			if (mprotect(stream.ibuf, stream.cur_ip,
-			    PROT_READ | PROT_EXEC) != 0) {
-				munmap(stream.ibuf, stream.cur_ip);
-				stream.ibuf = NULL;
-			}
-#endif
-			*size = stream.cur_ip;
-			break;
-		}
+		if (pass > 0)
+			continue;
 
+		*size = stream.cur_ip;
 #ifdef _KERNEL
-		stream.ibuf = malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT);
+		stream.ibuf = malloc(*size, M_BPFJIT, M_NOWAIT);
 		if (stream.ibuf == NULL)
 			break;
 #else
-		stream.ibuf = mmap(NULL, stream.cur_ip, PROT_READ | PROT_WRITE,
+		stream.ibuf = mmap(NULL, *size, PROT_READ | PROT_WRITE,
 		    MAP_ANON, -1, 0);
 		if (stream.ibuf == MAP_FAILED) {
 			stream.ibuf = NULL;
@@ -530,28 +522,33 @@ bpf_jit_compile(struct bpf_insn *prog, u
 #endif
 
 		/*
-		 * modify the reference table to contain the offsets and
-		 * not the lengths of the instructions
+		 * Modify the reference table to contain the offsets and
+		 * not the lengths of the instructions.
 		 */
 		for (i = 1; i < nins + 1; i++)
 			stream.refs[i] += stream.refs[i - 1];
 
-		/* Reset the counters */
+		/* Reset the counters. */
 		stream.cur_ip = 0;
 		stream.bpf_pc = 0;
 
-		/* the second pass creates the actual code */
+		/* The second pass creates the actual code. */
 		emitm = emit_code;
 	}
 
 	/*
-	 * the reference table is needed only during compilation,
-	 * now we can free it
+	 * The reference table is needed only during compilation,
+	 * now we can free it.
 	 */
 #ifdef _KERNEL
 	free(stream.refs, M_BPFJIT);
 #else
 	free(stream.refs);
+	if (stream.ibuf != NULL &&
+	    mprotect(stream.ibuf, *size, PROT_READ | PROT_EXEC) != 0) {
+		munmap(stream.ibuf, *size);
+		stream.ibuf = NULL;
+	}
 #endif
 
 	return ((bpf_filter_func)stream.ibuf);

Modified: head/sys/net/bpf_jitter.c
==============================================================================
--- head/sys/net/bpf_jitter.c	Fri Nov 20 20:43:34 2009	(r199614)
+++ head/sys/net/bpf_jitter.c	Fri Nov 20 21:12:40 2009	(r199615)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -62,27 +61,36 @@ SYSCTL_NODE(_net, OID_AUTO, bpf_jitter, 
 int bpf_jitter_enable = 1;
 SYSCTL_INT(_net_bpf_jitter, OID_AUTO, enable, CTLFLAG_RW,
     &bpf_jitter_enable, 0, "enable BPF JIT compiler");
+#endif
 
 bpf_jit_filter *
 bpf_jitter(struct bpf_insn *fp, int nins)
 {
 	bpf_jit_filter *filter;
 
-	/* Allocate the filter structure */
+	/* Allocate the filter structure. */
+#ifdef _KERNEL
 	filter = (struct bpf_jit_filter *)malloc(sizeof(*filter),
 	    M_BPFJIT, M_NOWAIT);
+#else
+	filter = (struct bpf_jit_filter *)malloc(sizeof(*filter));
+#endif
 	if (filter == NULL)
 		return (NULL);
 
-	/* No filter means accept all */
+	/* No filter means accept all. */
 	if (fp == NULL || nins == 0) {
 		filter->func = bpf_jit_accept_all;
 		return (filter);
 	}
 
-	/* Create the binary */
+	/* Create the binary. */
 	if ((filter->func = bpf_jit_compile(fp, nins, &filter->size)) == NULL) {
+#ifdef _KERNEL
 		free(filter, M_BPFJIT);
+#else
+		free(filter);
+#endif
 		return (NULL);
 	}
 
@@ -93,45 +101,16 @@ void
 bpf_destroy_jit_filter(bpf_jit_filter *filter)
 {
 
+#ifdef _KERNEL
 	if (filter->func != bpf_jit_accept_all)
 		free(filter->func, M_BPFJIT);
 	free(filter, M_BPFJIT);
-}
 #else
-bpf_jit_filter *
-bpf_jitter(struct bpf_insn *fp, int nins)
-{
-	bpf_jit_filter *filter;
-
-	/* Allocate the filter structure */
-	filter = (struct bpf_jit_filter *)malloc(sizeof(*filter));
-	if (filter == NULL)
-		return (NULL);
-
-	/* No filter means accept all */
-	if (fp == NULL || nins == 0) {
-		filter->func = bpf_jit_accept_all;
-		return (filter);
-	}
-
-	/* Create the binary */
-	if ((filter->func = bpf_jit_compile(fp, nins, &filter->size)) == NULL) {
-		free(filter);
-		return (NULL);
-	}
-
-	return (filter);
-}
-
-void
-bpf_destroy_jit_filter(bpf_jit_filter *filter)
-{
-
 	if (filter->func != bpf_jit_accept_all)
 		munmap(filter->func, filter->size);
 	free(filter);
-}
 #endif
+}
 
 static u_int
 bpf_jit_accept_all(__unused u_char *p, __unused u_int wirelen,

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 21:21:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DDF41065694;
	Fri, 20 Nov 2009 21:21:13 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AF728FC18;
	Fri, 20 Nov 2009 21:21:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKLLDtL056857;
	Fri, 20 Nov 2009 21:21:13 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKLLDHJ056853;
	Fri, 20 Nov 2009 21:21:13 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <200911202121.nAKLLDHJ056853@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 20 Nov 2009 21:21:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199616 - in head/sys/fs: nfs nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 21:21:13 -0000

Author: rmacklem
Date: Fri Nov 20 21:21:13 2009
New Revision: 199616
URL: http://svn.freebsd.org/changeset/base/199616

Log:
  Patch the experimental NFS server is a manner analagous to
  r197525, so that the creation verifier is handled correctly
  in va_atime for 64bit architectures. There were two problems.
  One was that the code incorrectly assumed that
  sizeof (struct timespec) == 8 and the other was that the tv_sec
  field needs to be assigned from a signed 32bit integer, so that
  sign extension occurs on 64bit architectures. This is required
  for correct operation when exporting ZFS volumes.
  
  Reviewed by:	pjd
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfsserver/nfs_nfsdport.c
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfs/nfs_var.h
==============================================================================
--- head/sys/fs/nfs/nfs_var.h	Fri Nov 20 21:12:40 2009	(r199615)
+++ head/sys/fs/nfs/nfs_var.h	Fri Nov 20 21:21:13 2009	(r199616)
@@ -529,7 +529,7 @@ int nfsvno_read(vnode_t, off_t, int, str
 int nfsvno_write(vnode_t, off_t, int, int, int, mbuf_t,
     char *, struct ucred *, NFSPROC_T *);
 int nfsvno_createsub(struct nfsrv_descript *, struct nameidata *,
-    vnode_t *, struct nfsvattr *, int *, u_char *, NFSDEV_T, NFSPROC_T *,
+    vnode_t *, struct nfsvattr *, int *, int32_t *, NFSDEV_T, NFSPROC_T *,
     struct nfsexstuff *);
 int nfsvno_mknod(struct nameidata *, struct nfsvattr *, struct ucred *,
     NFSPROC_T *);
@@ -552,7 +552,7 @@ int nfsvno_fsync(vnode_t, u_int64_t, int
 int nfsvno_statfs(vnode_t, struct statfs *);
 void nfsvno_getfs(struct nfsfsinfo *, int);
 void nfsvno_open(struct nfsrv_descript *, struct nameidata *, nfsquad_t,
-    nfsv4stateid_t *, struct nfsstate *, int *, struct nfsvattr *, u_char *,
+    nfsv4stateid_t *, struct nfsstate *, int *, struct nfsvattr *, int32_t *,
     int, NFSACL_T *, nfsattrbit_t *, struct ucred *, NFSPROC_T *,
     struct nfsexstuff *, vnode_t *);
 void nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct ucred *,

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Nov 20 21:12:40 2009	(r199615)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Nov 20 21:21:13 2009	(r199616)
@@ -720,7 +720,7 @@ nfsvno_write(struct vnode *vp, off_t off
 int
 nfsvno_createsub(struct nfsrv_descript *nd, struct nameidata *ndp,
     struct vnode **vpp, struct nfsvattr *nvap, int *exclusive_flagp,
-    u_char *cverf, NFSDEV_T rdev, struct thread *p, struct nfsexstuff *exp)
+    int32_t *cverf, NFSDEV_T rdev, struct thread *p, struct nfsexstuff *exp)
 {
 	u_quad_t tempsize;
 	int error;
@@ -737,8 +737,8 @@ nfsvno_createsub(struct nfsrv_descript *
 				if (*exclusive_flagp) {
 					*exclusive_flagp = 0;
 					NFSVNO_ATTRINIT(nvap);
-					NFSBCOPY(cverf,(caddr_t)&nvap->na_atime,
-					    NFSX_VERF);
+					nvap->na_atime.tv_sec = cverf[0];
+					nvap->na_atime.tv_nsec = cverf[1];
 					error = VOP_SETATTR(ndp->ni_vp,
 					    &nvap->na_vattr, nd->nd_cred);
 				}
@@ -1285,7 +1285,7 @@ nfsvno_statfs(struct vnode *vp, struct s
 void
 nfsvno_open(struct nfsrv_descript *nd, struct nameidata *ndp,
     nfsquad_t clientid, nfsv4stateid_t *stateidp, struct nfsstate *stp,
-    int *exclusive_flagp, struct nfsvattr *nvap, u_char *cverf, int create,
+    int *exclusive_flagp, struct nfsvattr *nvap, int32_t *cverf, int create,
     NFSACL_T *aclp, nfsattrbit_t *attrbitp, struct ucred *cred, struct thread *p,
     struct nfsexstuff *exp, struct vnode **vpp)
 {
@@ -1307,9 +1307,8 @@ nfsvno_open(struct nfsrv_descript *nd, s
 				if (*exclusive_flagp) {
 					*exclusive_flagp = 0;
 					NFSVNO_ATTRINIT(nvap);
-					NFSBCOPY(cverf,
-					    (caddr_t)&nvap->na_atime,
-					    NFSX_VERF);
+					nvap->na_atime.tv_sec = cverf[0];
+					nvap->na_atime.tv_nsec = cverf[1];
 					nd->nd_repstat = VOP_SETATTR(ndp->ni_vp,
 					    &nvap->na_vattr, cred);
 				} else {

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Nov 20 21:12:40 2009	(r199615)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Nov 20 21:21:13 2009	(r199616)
@@ -865,11 +865,11 @@ nfsrvd_create(struct nfsrv_descript *nd,
 	int how = NFSCREATE_UNCHECKED, exclusive_flag = 0;
 	NFSDEV_T rdev = 0;
 	vnode_t vp = NULL, dirp = NULL;
-	u_char cverf[NFSX_VERF], *cp;
 	fhandle_t fh;
 	char *bufp;
 	u_long *hashp;
 	enum vtype vtyp;
+	int32_t cverf[2], tverf[2] = { 0, 0 };
 
 	if (nd->nd_repstat) {
 		nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft);
@@ -920,8 +920,9 @@ nfsrvd_create(struct nfsrv_descript *nd,
 					goto nfsmout;
 				break;
 			case NFSCREATE_EXCLUSIVE:
-				NFSM_DISSECT(cp, u_char *, NFSX_VERF);
-				NFSBCOPY(cp, cverf, NFSX_VERF);
+				NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF);
+				cverf[0] = *tl++;
+				cverf[1] = *tl;
 				exclusive_flag = 1;
 				break;
 			};
@@ -988,6 +989,10 @@ nfsrvd_create(struct nfsrv_descript *nd,
 			nd->nd_repstat = nfsvno_getattr(vp, &nva, nd->nd_cred,
 			    p);
 		vput(vp);
+		if (!nd->nd_repstat) {
+			tverf[0] = nva.na_atime.tv_sec;
+			tverf[1] = nva.na_atime.tv_nsec;
+		}
 	}
 	if (nd->nd_flag & ND_NFSV2) {
 		if (!nd->nd_repstat) {
@@ -995,8 +1000,8 @@ nfsrvd_create(struct nfsrv_descript *nd,
 			nfsrv_fillattr(nd, &nva);
 		}
 	} else {
-		if (exclusive_flag && !nd->nd_repstat &&
-			NFSBCMP(cverf, (caddr_t)&nva.na_atime, NFSX_VERF))
+		if (exclusive_flag && !nd->nd_repstat && (cverf[0] != tverf[0]
+		    || cverf[1] != tverf[1]))
 			nd->nd_repstat = EEXIST;
 		diraft_ret = nfsvno_getattr(dirp, &diraft, nd->nd_cred, p);
 		vrele(dirp);
@@ -2406,7 +2411,7 @@ nfsrvd_open(struct nfsrv_descript *nd, _
 	int error = 0, create, claim, exclusive_flag = 0;
 	u_int32_t rflags = NFSV4OPEN_LOCKTYPEPOSIX, acemask;
 	int how = NFSCREATE_UNCHECKED;
-	u_char cverf[NFSX_VERF];
+	int32_t cverf[2], tverf[2] = { 0, 0 };
 	vnode_t vp = NULL, dirp = NULL;
 	struct nfsvattr nva, dirfor, diraft;
 	struct nameidata named;
@@ -2517,7 +2522,8 @@ nfsrvd_open(struct nfsrv_descript *nd, _
 			break;
 		case NFSCREATE_EXCLUSIVE:
 			NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF);
-			NFSBCOPY((caddr_t)tl, cverf, NFSX_VERF);
+			cverf[0] = *tl++;
+			cverf[1] = *tl;
 			break;
 		default:
 			nd->nd_repstat = NFSERR_BADXDR;
@@ -2677,10 +2683,15 @@ nfsrvd_open(struct nfsrv_descript *nd, _
 		    NFSACCCHK_VPISLOCKED);
 	}
 
-	if (!nd->nd_repstat)
+	if (!nd->nd_repstat) {
 		nd->nd_repstat = nfsvno_getattr(vp, &nva, nd->nd_cred, p);
-	if (!nd->nd_repstat && exclusive_flag &&
-	    NFSBCMP(cverf, (caddr_t)&nva.na_atime, NFSX_VERF))
+		if (!nd->nd_repstat) {
+			tverf[0] = nva.na_atime.tv_sec;
+			tverf[1] = nva.na_atime.tv_nsec;
+		}
+	}
+	if (!nd->nd_repstat && exclusive_flag && (cverf[0] != tverf[0] ||
+	    cverf[1] != tverf[1]))
 		nd->nd_repstat = EEXIST;
 	/*
 	 * Do the open locking/delegation stuff.

From owner-svn-src-all@FreeBSD.ORG  Fri Nov 20 22:22:53 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AC40D106568D;
	Fri, 20 Nov 2009 22:22:53 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9A1D68FC0A;
	Fri, 20 Nov 2009 22:22:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKMMrZH058052;
	Fri, 20 Nov 2009 22:22:53 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKMMr9J058050;
	Fri, 20 Nov 2009 22:22:53 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200911202222.nAKMMr9J058050@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 20 Nov 2009 22:22:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199617 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 20 Nov 2009 22:22:53 -0000

Author: kib
Date: Fri Nov 20 22:22:53 2009
New Revision: 199617
URL: http://svn.freebsd.org/changeset/base/199617

Log:
  On the return path from F_RDAHEAD and F_READAHEAD fcntls, do not
  unlock Giant twice.
  
  While there, bring conditions in the do/while loops closer to style,
  that also makes the lines fit into 80 columns.
  
  Reported and tested by:	dougb

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Fri Nov 20 21:21:13 2009	(r199616)
+++ head/sys/kern/kern_descrip.c	Fri Nov 20 22:22:53 2009	(r199617)
@@ -718,14 +718,15 @@ kern_fcntl(struct thread *td, int fd, in
 			do {
 				new = old = fp->f_flag;
 				new |= FRDAHEAD;
-			} while (atomic_cmpset_rel_int(&fp->f_flag, old, new) == 0);
+			} while (!atomic_cmpset_rel_int(&fp->f_flag, old, new));
 readahead_vnlock_fail:
 			VFS_UNLOCK_GIANT(vfslocked);
+			vfslocked = 0;
 		} else {
 			do {
 				new = old = fp->f_flag;
 				new &= ~FRDAHEAD;
-			} while (atomic_cmpset_rel_int(&fp->f_flag, old, new) == 0);
+			} while (!atomic_cmpset_rel_int(&fp->f_flag, old, new));
 		}
 		fdrop(fp, td);
 		break;

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 00:19:09 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BD23A106566B;
	Sat, 21 Nov 2009 00:19:09 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A9CF28FC21;
	Sat, 21 Nov 2009 00:19:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAL0J9oW060530;
	Sat, 21 Nov 2009 00:19:09 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAL0J91R060525;
	Sat, 21 Nov 2009 00:19:09 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <200911210019.nAL0J91R060525@svn.freebsd.org>
From: Jung-uk Kim 
Date: Sat, 21 Nov 2009 00:19:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199619 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 00:19:09 -0000

Author: jkim
Date: Sat Nov 21 00:19:09 2009
New Revision: 199619
URL: http://svn.freebsd.org/changeset/base/199619

Log:
  Add an experimental and rudimentary JIT optimizer to reduce unncessary
  overhead from short BPF filter programs such as "get the first 96 bytes".

Modified:
  head/sys/amd64/amd64/bpf_jit_machdep.c
  head/sys/amd64/amd64/bpf_jit_machdep.h
  head/sys/i386/i386/bpf_jit_machdep.c
  head/sys/i386/i386/bpf_jit_machdep.h

Modified: head/sys/amd64/amd64/bpf_jit_machdep.c
==============================================================================
--- head/sys/amd64/amd64/bpf_jit_machdep.c	Fri Nov 20 23:14:08 2009	(r199618)
+++ head/sys/amd64/amd64/bpf_jit_machdep.c	Sat Nov 21 00:19:09 2009	(r199619)
@@ -57,18 +57,19 @@ __FBSDID("$FreeBSD$");
 bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *);
 
 /*
- * emit routine to update the jump table
+ * Emit routine to update the jump table.
  */
 static void
 emit_length(bpf_bin_stream *stream, __unused u_int value, u_int len)
 {
 
-	(stream->refs)[stream->bpf_pc] += len;
+	if (stream->refs != NULL)
+		(stream->refs)[stream->bpf_pc] += len;
 	stream->cur_ip += len;
 }
 
 /*
- * emit routine to output the actual binary code
+ * Emit routine to output the actual binary code.
  */
 static void
 emit_code(bpf_bin_stream *stream, u_int value, u_int len)
@@ -95,37 +96,79 @@ emit_code(bpf_bin_stream *stream, u_int 
 }
 
 /*
- * Function that does the real stuff
+ * Scan the filter program and find possible optimization.
+ */
+static int
+bpf_jit_optimize(struct bpf_insn *prog, u_int nins)
+{
+	const struct bpf_insn *p;
+	int flags;
+	u_int i;
+
+	/* Do we return immediately? */
+	if (BPF_CLASS(prog[0].code) == BPF_RET)
+		return (BPF_JIT_FLAG_RET);
+
+	for (flags = 0, i = 0; i < nins; i++) {
+		p = &prog[i];
+
+		/* Do we need reference table? */
+		if ((flags & BPF_JIT_FLAG_JMP) == 0 &&
+		    BPF_CLASS(p->code) == BPF_JMP)
+			flags |= BPF_JIT_FLAG_JMP;
+
+		/* Do we need scratch memory? */
+		if ((flags & BPF_JIT_FLAG_MEM) == 0 &&
+		    (p->code == BPF_ST || p->code == BPF_STX ||
+		    p->code == (BPF_LD|BPF_MEM) ||
+		    p->code == (BPF_LDX|BPF_MEM)))
+			flags |= BPF_JIT_FLAG_MEM;
+
+		if (flags == BPF_JIT_FLAG_ALL)
+			break;
+	}
+
+	return (flags);
+}
+
+/*
+ * Function that does the real stuff.
  */
 bpf_filter_func
 bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size)
 {
 	bpf_bin_stream stream;
 	struct bpf_insn *ins;
+	int flags, flag_ret, flag_jmp, flag_mem;
 	u_int i, pass;
 
+	flags = bpf_jit_optimize(prog, nins);
+	flag_ret = (flags & BPF_JIT_FLAG_RET) != 0;
+	flag_jmp = (flags & BPF_JIT_FLAG_JMP) != 0;
+	flag_mem = (flags & BPF_JIT_FLAG_MEM) != 0;
+
 	/*
 	 * NOTE: Do not modify the name of this variable, as it's used by
 	 * the macros to emit code.
 	 */
 	emit_func emitm;
 
+	memset(&stream, 0, sizeof(stream));
+
 	/* Allocate the reference table for the jumps. */
+	if (flag_jmp) {
 #ifdef _KERNEL
-	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
-	    M_NOWAIT | M_ZERO);
+		stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
+		    M_NOWAIT | M_ZERO);
 #else
-	stream.refs = malloc((nins + 1) * sizeof(u_int));
+		stream.refs = malloc((nins + 1) * sizeof(u_int));
 #endif
-	if (stream.refs == NULL)
-		return (NULL);
+		if (stream.refs == NULL)
+			return (NULL);
 #ifndef _KERNEL
-	memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
+		memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
 #endif
-
-	stream.cur_ip = 0;
-	stream.bpf_pc = 0;
-	stream.ibuf = NULL;
+	}
 
 	/*
 	 * The first pass will emit the lengths of the instructions
@@ -137,12 +180,16 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		ins = prog;
 
 		/* Create the procedure header. */
-		PUSH(RBP);
-		MOVrq(RSP, RBP);
-		SUBib(BPF_MEMWORDS * sizeof(uint32_t), RSP);
-		MOVrq2(RDI, R8);
-		MOVrd2(ESI, R9D);
-		MOVrd(EDX, EDI);
+		if (flag_mem) {
+			PUSH(RBP);
+			MOVrq(RSP, RBP);
+			SUBib(BPF_MEMWORDS * sizeof(uint32_t), RSP);
+		}
+		if (!flag_ret) {
+			MOVrq2(RDI, R8);
+			MOVrd2(ESI, R9D);
+			MOVrd(EDX, EDI);
+		}
 
 		for (i = 0; i < nins; i++) {
 			stream.bpf_pc++;
@@ -157,11 +204,15 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 			case BPF_RET|BPF_K:
 				MOVid(ins->k, EAX);
-				LEAVE_RET();
+				if (flag_mem)
+					LEAVE();
+				RET();
 				break;
 
 			case BPF_RET|BPF_A:
-				LEAVE_RET();
+				if (flag_mem)
+					LEAVE();
+				RET();
 				break;
 
 			case BPF_LD|BPF_W|BPF_ABS:
@@ -171,9 +222,15 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int32_t), ECX);
-				JAEb(4);
-				ZEROrd(EAX);
-				LEAVE_RET();
+				if (flag_mem) {
+					JAEb(4);
+					ZEROrd(EAX);
+					LEAVE();
+				} else {
+					JAEb(3);
+					ZEROrd(EAX);
+				}
+				RET();
 				MOVrq3(R8, RCX);
 				MOVobd(RCX, RSI, EAX);
 				BSWAP(EAX);
@@ -187,8 +244,12 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int16_t), ECX);
-				JAEb(2);
-				LEAVE_RET();
+				if (flag_mem) {
+					JAEb(2);
+					LEAVE();
+				} else
+					JAEb(1);
+				RET();
 				MOVrq3(R8, RCX);
 				MOVobw(RCX, RSI, AX);
 				SWAP_AX();
@@ -198,8 +259,12 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				ZEROrd(EAX);
 				MOVid(ins->k, ESI);
 				CMPrd(EDI, ESI);
-				JBb(2);
-				LEAVE_RET();
+				if (flag_mem) {
+					JBb(2);
+					LEAVE();
+				} else
+					JBb(1);
+				RET();
 				MOVrq3(R8, RCX);
 				MOVobb(RCX, RSI, AL);
 				break;
@@ -224,9 +289,15 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int32_t), ECX);
-				JAEb(4);
-				ZEROrd(EAX);
-				LEAVE_RET();
+				if (flag_mem) {
+					JAEb(4);
+					ZEROrd(EAX);
+					LEAVE();
+				} else {
+					JAEb(3);
+					ZEROrd(EAX);
+				}
+				RET();
 				MOVrq3(R8, RCX);
 				MOVobd(RCX, RSI, EAX);
 				BSWAP(EAX);
@@ -245,8 +316,12 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(ESI, ECX);
 				CMPid(sizeof(int16_t), ECX);
-				JAEb(2);
-				LEAVE_RET();
+				if (flag_mem) {
+					JAEb(2);
+					LEAVE();
+				} else
+					JAEb(1);
+				RET();
 				MOVrq3(R8, RCX);
 				MOVobw(RCX, RSI, AX);
 				SWAP_AX();
@@ -260,8 +335,12 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				MOVrd(EDI, ECX);
 				SUBrd(EDX, ECX);
 				CMPrd(ESI, ECX);
-				JAb(2);
-				LEAVE_RET();
+				if (flag_mem) {
+					JAb(2);
+					LEAVE();
+				} else
+					JAb(1);
+				RET();
 				MOVrq3(R8, RCX);
 				ADDrd(EDX, ESI);
 				MOVobb(RCX, RSI, AL);
@@ -270,9 +349,15 @@ bpf_jit_compile(struct bpf_insn *prog, u
 			case BPF_LDX|BPF_MSH|BPF_B:
 				MOVid(ins->k, ESI);
 				CMPrd(EDI, ESI);
-				JBb(4);
-				ZEROrd(EAX);
-				LEAVE_RET();
+				if (flag_mem) {
+					JBb(4);
+					ZEROrd(EAX);
+					LEAVE();
+				} else {
+					JBb(3);
+					ZEROrd(EAX);
+				}
+				RET();
 				ZEROrd(EDX);
 				MOVrq3(R8, RCX);
 				MOVobb(RCX, RSI, DL);
@@ -390,9 +475,15 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 			case BPF_ALU|BPF_DIV|BPF_X:
 				TESTrd(EDX, EDX);
-				JNEb(4);
-				ZEROrd(EAX);
-				LEAVE_RET();
+				if (flag_mem) {
+					JNEb(4);
+					ZEROrd(EAX);
+					LEAVE();
+				} else {
+					JNEb(3);
+					ZEROrd(EAX);
+				}
+				RET();
 				MOVrd(EDX, ECX);
 				ZEROrd(EDX);
 				DIVrd(ECX);
@@ -492,8 +583,9 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		 * Modify the reference table to contain the offsets and
 		 * not the lengths of the instructions.
 		 */
-		for (i = 1; i < nins + 1; i++)
-			stream.refs[i] += stream.refs[i - 1];
+		if (flag_jmp)
+			for (i = 1; i < nins + 1; i++)
+				stream.refs[i] += stream.refs[i - 1];
 
 		/* Reset the counters. */
 		stream.cur_ip = 0;
@@ -507,10 +599,14 @@ bpf_jit_compile(struct bpf_insn *prog, u
 	 * The reference table is needed only during compilation,
 	 * now we can free it.
 	 */
+	if (flag_jmp)
 #ifdef _KERNEL
-	free(stream.refs, M_BPFJIT);
+		free(stream.refs, M_BPFJIT);
 #else
-	free(stream.refs);
+		free(stream.refs);
+#endif
+
+#ifndef _KERNEL
 	if (stream.ibuf != NULL &&
 	    mprotect(stream.ibuf, *size, PROT_READ | PROT_EXEC) != 0) {
 		munmap(stream.ibuf, *size);

Modified: head/sys/amd64/amd64/bpf_jit_machdep.h
==============================================================================
--- head/sys/amd64/amd64/bpf_jit_machdep.h	Fri Nov 20 23:14:08 2009	(r199618)
+++ head/sys/amd64/amd64/bpf_jit_machdep.h	Sat Nov 21 00:19:09 2009	(r199619)
@@ -85,7 +85,15 @@
 #define DL	2
 #define BL	3
 
-/* A stream of native binary code.*/
+/* Optimization flags */
+#define	BPF_JIT_FLAG_RET	0x01
+#define	BPF_JIT_FLAG_JMP	0x02
+#define	BPF_JIT_FLAG_MEM	0x04
+
+#define	BPF_JIT_FLAG_ALL	\
+    (BPF_JIT_FLAG_JMP | BPF_JIT_FLAG_MEM)
+
+/* A stream of native binary code */
 typedef struct bpf_bin_stream {
 	/* Current native instruction pointer. */
 	int		cur_ip;
@@ -117,7 +125,7 @@ typedef struct bpf_bin_stream {
 typedef void (*emit_func)(bpf_bin_stream *stream, u_int value, u_int n);
 
 /*
- * native Instruction Macros
+ * Native instruction macros
  */
 
 /* movl i32,r32 */
@@ -220,9 +228,14 @@ typedef void (*emit_func)(bpf_bin_stream
 	emitm(&stream, (5 << 4) | (0 << 3) | (r64 & 0x7), 1);		\
 } while (0)
 
-/* leave/ret */
-#define LEAVE_RET() do {						\
-	emitm(&stream, 0xc3c9, 2);					\
+/* leaveq */
+#define LEAVE() do {							\
+	emitm(&stream, 0xc9, 1);					\
+} while (0)
+
+/* retq */
+#define RET() do {							\
+	emitm(&stream, 0xc3, 1);					\
 } while (0)
 
 /* addl sr32,dr32 */

Modified: head/sys/i386/i386/bpf_jit_machdep.c
==============================================================================
--- head/sys/i386/i386/bpf_jit_machdep.c	Fri Nov 20 23:14:08 2009	(r199618)
+++ head/sys/i386/i386/bpf_jit_machdep.c	Sat Nov 21 00:19:09 2009	(r199619)
@@ -57,18 +57,19 @@ __FBSDID("$FreeBSD$");
 bpf_filter_func	bpf_jit_compile(struct bpf_insn *, u_int, size_t *);
 
 /*
- * emit routine to update the jump table
+ * Emit routine to update the jump table.
  */
 static void
 emit_length(bpf_bin_stream *stream, __unused u_int value, u_int len)
 {
 
-	(stream->refs)[stream->bpf_pc] += len;
+	if (stream->refs != NULL)
+		(stream->refs)[stream->bpf_pc] += len;
 	stream->cur_ip += len;
 }
 
 /*
- * emit routine to output the actual binary code
+ * Emit routine to output the actual binary code.
  */
 static void
 emit_code(bpf_bin_stream *stream, u_int value, u_int len)
@@ -95,37 +96,79 @@ emit_code(bpf_bin_stream *stream, u_int 
 }
 
 /*
- * Function that does the real stuff
+ * Scan the filter program and find possible optimization.
+ */
+static int
+bpf_jit_optimize(struct bpf_insn *prog, u_int nins)
+{
+	const struct bpf_insn *p;
+	int flags;
+	u_int i;
+
+	/* Do we return immediately? */
+	if (BPF_CLASS(prog[0].code) == BPF_RET)
+		return (BPF_JIT_FLAG_RET);
+
+	for (flags = 0, i = 0; i < nins; i++) {
+		p = &prog[i];
+
+		/* Do we need reference table? */
+		if ((flags & BPF_JIT_FLAG_JMP) == 0 &&
+		    BPF_CLASS(p->code) == BPF_JMP)
+			flags |= BPF_JIT_FLAG_JMP;
+
+		/* Do we need scratch memory? */
+		if ((flags & BPF_JIT_FLAG_MEM) == 0 &&
+		    (p->code == BPF_ST || p->code == BPF_STX ||
+		    p->code == (BPF_LD|BPF_MEM) ||
+		    p->code == (BPF_LDX|BPF_MEM)))
+			flags |= BPF_JIT_FLAG_MEM;
+
+		if (flags == BPF_JIT_FLAG_ALL)
+			break;
+	}
+
+	return (flags);
+}
+
+/*
+ * Function that does the real stuff.
  */
 bpf_filter_func
 bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size)
 {
 	bpf_bin_stream stream;
 	struct bpf_insn *ins;
+	int flags, flag_ret, flag_jmp, flag_mem;
 	u_int i, pass;
 
+	flags = bpf_jit_optimize(prog, nins);
+	flag_ret = (flags & BPF_JIT_FLAG_RET) != 0;
+	flag_jmp = (flags & BPF_JIT_FLAG_JMP) != 0;
+	flag_mem = (flags & BPF_JIT_FLAG_MEM) != 0;
+
 	/*
 	 * NOTE: Do not modify the name of this variable, as it's used by
 	 * the macros to emit code.
 	 */
 	emit_func emitm;
 
+	memset(&stream, 0, sizeof(stream));
+
 	/* Allocate the reference table for the jumps. */
+	if (flag_jmp) {
 #ifdef _KERNEL
-	stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
-	    M_NOWAIT | M_ZERO);
+		stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
+		    M_NOWAIT | M_ZERO);
 #else
-	stream.refs = malloc((nins + 1) * sizeof(u_int));
+		stream.refs = malloc((nins + 1) * sizeof(u_int));
 #endif
-	if (stream.refs == NULL)
-		return (NULL);
+		if (stream.refs == NULL)
+			return (NULL);
 #ifndef _KERNEL
-	memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
+		memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
 #endif
-
-	stream.cur_ip = 0;
-	stream.bpf_pc = 0;
-	stream.ibuf = NULL;
+	}
 
 	/*
 	 * The first pass will emit the lengths of the instructions
@@ -137,14 +180,19 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		ins = prog;
 
 		/* Create the procedure header. */
-		PUSH(EBP);
-		MOVrd(ESP, EBP);
-		SUBib(BPF_MEMWORDS * sizeof(uint32_t), ESP);
-		PUSH(EDI);
-		PUSH(ESI);
-		PUSH(EBX);
-		MOVodd(8, EBP, EBX);
-		MOVodd(16, EBP, EDI);
+		if (!flag_ret) {
+			PUSH(EBP);
+			MOVrd(ESP, EBP);
+		}
+		if (flag_mem)
+			SUBib(BPF_MEMWORDS * sizeof(uint32_t), ESP);
+		if (!flag_ret) {
+			PUSH(EDI);
+			PUSH(ESI);
+			PUSH(EBX);
+			MOVodd(8, EBP, EBX);
+			MOVodd(16, EBP, EDI);
+		}
 
 		for (i = 0; i < nins; i++) {
 			stream.bpf_pc++;
@@ -159,17 +207,23 @@ bpf_jit_compile(struct bpf_insn *prog, u
 
 			case BPF_RET|BPF_K:
 				MOVid(ins->k, EAX);
-				POP(EBX);
-				POP(ESI);
-				POP(EDI);
-				LEAVE_RET();
+				if (!flag_ret) {
+					POP(EBX);
+					POP(ESI);
+					POP(EDI);
+					LEAVE();
+				}
+				RET();
 				break;
 
 			case BPF_RET|BPF_A:
-				POP(EBX);
-				POP(ESI);
-				POP(EDI);
-				LEAVE_RET();
+				if (!flag_ret) {
+					POP(EBX);
+					POP(ESI);
+					POP(EDI);
+					LEAVE();
+				}
+				RET();
 				break;
 
 			case BPF_LD|BPF_W|BPF_ABS:
@@ -184,7 +238,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				MOVobd(EBX, ESI, EAX);
 				BSWAP(EAX);
 				break;
@@ -201,7 +256,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				MOVobw(EBX, ESI, AX);
 				SWAP_AX();
 				break;
@@ -214,7 +270,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				MOVobb(EBX, ESI, AL);
 				break;
 
@@ -243,7 +300,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				MOVobd(EBX, ESI, EAX);
 				BSWAP(EAX);
 				break;
@@ -265,7 +323,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				MOVobw(EBX, ESI, AX);
 				SWAP_AX();
 				break;
@@ -282,7 +341,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				ADDrd(EDX, ESI);
 				MOVobb(EBX, ESI, AL);
 				break;
@@ -295,7 +355,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				ZEROrd(EDX);
 				MOVobb(EBX, ESI, DL);
 				ANDib(0x0f, DL);
@@ -425,7 +486,8 @@ bpf_jit_compile(struct bpf_insn *prog, u
 				POP(EBX);
 				POP(ESI);
 				POP(EDI);
-				LEAVE_RET();
+				LEAVE();
+				RET();
 				MOVrd(EDX, ECX);
 				ZEROrd(EDX);
 				DIVrd(ECX);
@@ -525,8 +587,9 @@ bpf_jit_compile(struct bpf_insn *prog, u
 		 * Modify the reference table to contain the offsets and
 		 * not the lengths of the instructions.
 		 */
-		for (i = 1; i < nins + 1; i++)
-			stream.refs[i] += stream.refs[i - 1];
+		if (flag_jmp)
+			for (i = 1; i < nins + 1; i++)
+				stream.refs[i] += stream.refs[i - 1];
 
 		/* Reset the counters. */
 		stream.cur_ip = 0;
@@ -540,10 +603,14 @@ bpf_jit_compile(struct bpf_insn *prog, u
 	 * The reference table is needed only during compilation,
 	 * now we can free it.
 	 */
+	if (flag_jmp)
 #ifdef _KERNEL
-	free(stream.refs, M_BPFJIT);
+		free(stream.refs, M_BPFJIT);
 #else
-	free(stream.refs);
+		free(stream.refs);
+#endif
+
+#ifndef _KERNEL
 	if (stream.ibuf != NULL &&
 	    mprotect(stream.ibuf, *size, PROT_READ | PROT_EXEC) != 0) {
 		munmap(stream.ibuf, *size);

Modified: head/sys/i386/i386/bpf_jit_machdep.h
==============================================================================
--- head/sys/i386/i386/bpf_jit_machdep.h	Fri Nov 20 23:14:08 2009	(r199618)
+++ head/sys/i386/i386/bpf_jit_machdep.h	Sat Nov 21 00:19:09 2009	(r199619)
@@ -60,7 +60,15 @@
 #define DL	2
 #define BL	3
 
-/* A stream of native binary code.*/
+/* Optimization flags */
+#define	BPF_JIT_FLAG_RET	0x01
+#define	BPF_JIT_FLAG_JMP	0x02
+#define	BPF_JIT_FLAG_MEM	0x04
+
+#define	BPF_JIT_FLAG_ALL	\
+    (BPF_JIT_FLAG_JMP | BPF_JIT_FLAG_MEM)
+
+/* A stream of native binary code */
 typedef struct bpf_bin_stream {
 	/* Current native instruction pointer. */
 	int		cur_ip;
@@ -92,7 +100,7 @@ typedef struct bpf_bin_stream {
 typedef void (*emit_func)(bpf_bin_stream *stream, u_int value, u_int n);
 
 /*
- * native Instruction Macros
+ * Native instruction macros
  */
 
 /* movl i32,r32 */
@@ -165,9 +173,14 @@ typedef void (*emit_func)(bpf_bin_stream
 	emitm(&stream, (5 << 4) | (1 << 3) | (r32 & 0x7), 1);		\
 } while (0)
 
-/* leave/ret */
-#define LEAVE_RET() do {						\
-	emitm(&stream, 0xc3c9, 2);					\
+/* leave */
+#define LEAVE() do {							\
+	emitm(&stream, 0xc9, 1);					\
+} while (0)
+
+/* ret */
+#define RET() do {							\
+	emitm(&stream, 0xc3, 1);					\
 } while (0)
 
 /* addl sr32,dr32 */

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 01:43:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2BCA106566B;
	Sat, 21 Nov 2009 01:43:22 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C1EE38FC0A;
	Sat, 21 Nov 2009 01:43:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAL1hMHN062262;
	Sat, 21 Nov 2009 01:43:22 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAL1hMx3062260;
	Sat, 21 Nov 2009 01:43:22 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911210143.nAL1hMx3062260@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 21 Nov 2009 01:43:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199621 - head
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 01:43:22 -0000

Author: dougb
Date: Sat Nov 21 01:43:22 2009
New Revision: 199621
URL: http://svn.freebsd.org/changeset/base/199621

Log:
  Add a note that wpa_supplicant(8) may require a full world build to
  sync up with 20091109.

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sat Nov 21 00:34:51 2009	(r199620)
+++ head/UPDATING	Sat Nov 21 01:43:22 2009	(r199621)
@@ -42,6 +42,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	Applications that require wireless scan results (e.g. ifconfig(8))
 	from net80211 need to be recompiled.
 
+	Applications such as wpa_supplicant(8) may require a full world
+	build without using NO_CLEAN in order to get synchronized with the
+	new structure.
+
 20091025:
 	The iwn(4) driver has been updated to support the 5000 and 5150 series.
 	There's one kernel module for each firmware. Adding "device iwnfw"

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 06:13:29 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BAF08106566C;
	Sat, 21 Nov 2009 06:13:29 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 904D18FC21;
	Sat, 21 Nov 2009 06:13:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAL6DTQp067697;
	Sat, 21 Nov 2009 06:13:29 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAL6DT90067696;
	Sat, 21 Nov 2009 06:13:29 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200911210613.nAL6DT90067696@svn.freebsd.org>
From: Ken Smith 
Date: Sat, 21 Nov 2009 06:13:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-release@freebsd.org
X-SVN-Group: release
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199625 - release/8.0.0
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 06:13:29 -0000

Author: kensmith
Date: Sat Nov 21 06:13:29 2009
New Revision: 199625
URL: http://svn.freebsd.org/changeset/base/199625

Log:
  Create release/8.0.0 for the 8.0-RELEASE.
  
  Approved by:	re (implicit)

Added:
     - copied from r199624, releng/8.0/
Directory Properties:
  release/8.0.0/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 10:21:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7D9301065679;
	Sat, 21 Nov 2009 10:21:20 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211])
	by mx1.freebsd.org (Postfix) with ESMTP id 088F08FC12;
	Sat, 21 Nov 2009 10:21:19 +0000 (UTC)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id EDB3B1CCDF; Sat, 21 Nov 2009 11:21:14 +0100 (CET)
Date: Sat, 21 Nov 2009 11:21:14 +0100
From: Ed Schouten 
To: Jung-uk Kim 
Message-ID: <20091121102114.GK64905@hoeg.nl>
References: <200911202112.nAKLCe35056653@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="W9OqCIgVwV7zeaDP"
Content-Disposition: inline
In-Reply-To: <200911202112.nAKLCe35056653@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r199615 - in head/sys: amd64/amd64 i386/i386 net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 10:21:20 -0000


--W9OqCIgVwV7zeaDP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

* Jung-uk Kim  wrote:
>  #ifdef _KERNEL
> -	stream.refs =3D malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT);
> +	stream.refs =3D malloc((nins + 1) * sizeof(u_int), M_BPFJIT,
> +	    M_NOWAIT | M_ZERO);
>  #else
>  	stream.refs =3D malloc((nins + 1) * sizeof(u_int));
>  #endif
>  	if (stream.refs =3D=3D NULL)
>  		return (NULL);
> -
> -	/* Reset the reference table */
> -	for (i =3D 0; i < nins + 1; i++)
> -		stream.refs[i] =3D 0;
> +#ifndef _KERNEL
> +	memset(stream.refs, 0, (nins + 1) * sizeof(u_int));
> +#endif

Can't we avoid the special case here by just calling calloc(3)?

--=20
 Ed Schouten 
 WWW: http://80386.nl/

--W9OqCIgVwV7zeaDP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEUEARECAAYFAksHvxoACgkQ52SDGA2eCwX3AACXbZnEcesb8eGpyWsK170DcrR8
PQCfaJbjZBsrlFnuorOjDvoVAG8pNMM=
=AcwQ
-----END PGP SIGNATURE-----

--W9OqCIgVwV7zeaDP--

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 10:46:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1FDB11065670;
	Sat, 21 Nov 2009 10:46:50 +0000 (UTC)
	(envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0E0B58FC08;
	Sat, 21 Nov 2009 10:46:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALAkncq077649;
	Sat, 21 Nov 2009 10:46:49 GMT
	(envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALAknkT077647;
	Sat, 21 Nov 2009 10:46:49 GMT
	(envelope-from netchild@svn.freebsd.org)
Message-Id: <200911211046.nALAknkT077647@svn.freebsd.org>
From: Alexander Leidinger 
Date: Sat, 21 Nov 2009 10:46:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199626 - head/sbin/ipfw
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 10:46:50 -0000

Author: netchild
Date: Sat Nov 21 10:46:49 2009
New Revision: 199626
URL: http://svn.freebsd.org/changeset/base/199626

Log:
  Fix minor resource leak in a function.
  
  Reviewed by:	luigi
  MFC after:	1 week

Modified:
  head/sbin/ipfw/dummynet.c

Modified: head/sbin/ipfw/dummynet.c
==============================================================================
--- head/sbin/ipfw/dummynet.c	Sat Nov 21 06:13:29 2009	(r199625)
+++ head/sbin/ipfw/dummynet.c	Sat Nov 21 10:46:49 2009	(r199626)
@@ -650,6 +650,8 @@ load_extra_delays(const char *filename, 
 		}
 	}
 
+	fclose (f);
+
 	if (samples == -1) {
 	    warnx("'%s' not found, assuming 100", ED_TOK_SAMPLES);
 	    samples = 100;

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 12:38:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 645EB106566B;
	Sat, 21 Nov 2009 12:38:46 +0000 (UTC)
	(envelope-from sson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5315E8FC08;
	Sat, 21 Nov 2009 12:38:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALCckpB079857;
	Sat, 21 Nov 2009 12:38:46 GMT (envelope-from sson@svn.freebsd.org)
Received: (from sson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALCcksF079856;
	Sat, 21 Nov 2009 12:38:46 GMT (envelope-from sson@svn.freebsd.org)
Message-Id: <200911211238.nALCcksF079856@svn.freebsd.org>
From: Stacey Son 
Date: Sat, 21 Nov 2009 12:38:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199627 - stable/8/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 12:38:46 -0000

Author: sson
Date: Sat Nov 21 12:38:45 2009
New Revision: 199627
URL: http://svn.freebsd.org/changeset/base/199627

Log:
  Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent
  filter has been implemented.
  
  Approved by: rwatson (co-mentor)

Modified:
  stable/8/sys/sys/param.h

Modified: stable/8/sys/sys/param.h
==============================================================================
--- stable/8/sys/sys/param.h	Sat Nov 21 10:46:49 2009	(r199626)
+++ stable/8/sys/sys/param.h	Sat Nov 21 12:38:45 2009	(r199627)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 800107	/* Master, propagated to newvers */
+#define __FreeBSD_version 800108	/* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include 

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 14:12:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5D0E8106566C;
	Sat, 21 Nov 2009 14:12:52 +0000 (UTC)
	(envelope-from stefanf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BEF48FC15;
	Sat, 21 Nov 2009 14:12:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALECp35081558;
	Sat, 21 Nov 2009 14:12:51 GMT (envelope-from stefanf@svn.freebsd.org)
Received: (from stefanf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALECpZ4081556;
	Sat, 21 Nov 2009 14:12:51 GMT (envelope-from stefanf@svn.freebsd.org)
Message-Id: <200911211412.nALECpZ4081556@svn.freebsd.org>
From: Stefan Farfeleder 
Date: Sat, 21 Nov 2009 14:12:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199628 - head/tools/regression/bin/sh/builtins
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 14:12:52 -0000

Author: stefanf
Date: Sat Nov 21 14:12:51 2009
New Revision: 199628
URL: http://svn.freebsd.org/changeset/base/199628

Log:
  Add a few very basic tests for cd -{L,P} and pwd -{L,P}.

Modified:
  head/tools/regression/bin/sh/builtins/cd1.0

Modified: head/tools/regression/bin/sh/builtins/cd1.0
==============================================================================
--- head/tools/regression/bin/sh/builtins/cd1.0	Sat Nov 21 12:38:45 2009	(r199627)
+++ head/tools/regression/bin/sh/builtins/cd1.0	Sat Nov 21 14:12:51 2009	(r199628)
@@ -1,17 +1,27 @@
 # $FreeBSD$
 set -e
 
-PDIR=${TMPDIR:-/tmp}
-cd ${PDIR}
-TMPDIR=$(mktemp -d sh-test.XXXXXX)
-chmod 0 ${TMPDIR}
+P=${TMPDIR:-/tmp}
+cd $P
+T=$(mktemp -d sh-test.XXXXXX)
 
-cd -L ${TMPDIR} 2>/dev/null && exit 1
-[ "${PWD}" = "${PDIR}" ]
-[ "$(pwd)" = "${PDIR}" ]
-cd -P ${TMPDIR} 2>/dev/null && exit 1
-[ "${PWD}" = "${PDIR}" ]
-[ "$(pwd)" = "${PDIR}" ]
+chmod 0 $T
+cd -L $T 2>/dev/null && exit 1
+[ "$PWD" = "$P" ]
+[ "$(pwd)" = "$P" ]
+cd -P $T 2>/dev/null && exit 1
+[ "$PWD" = "$P" ]
+[ "$(pwd)" = "$P" ]
 
-chmod 755 ${TMPDIR}
-rmdir ${TMPDIR}
+chmod 755 $T
+cd $T
+mkdir -p 1/2/3
+ln -s 1/2 link1
+ln -s 2/3 1/link2
+(cd -L 1/../1 && [ "$(pwd -L)" = "$P/$T/1" ])
+(cd -L link1 && [ "$(pwd -L)" = "$P/$T/link1" ])
+(cd -L link1 && [ "$(pwd -P)" = "$P/$T/1/2" ])
+(cd -P link1 && [ "$(pwd -L)" = "$P/$T/1/2" ])
+(cd -P link1 && [ "$(pwd -P)" = "$P/$T/1/2" ])
+
+rm -rf ${P}/${T}

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 14:28:32 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E9BC6106566C;
	Sat, 21 Nov 2009 14:28:32 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CECCF8FC14;
	Sat, 21 Nov 2009 14:28:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALESWOM082010;
	Sat, 21 Nov 2009 14:28:32 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALESWpF082002;
	Sat, 21 Nov 2009 14:28:32 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <200911211428.nALESWpF082002@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 21 Nov 2009 14:28:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199629 - head/bin/sh
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 14:28:33 -0000

Author: jilles
Date: Sat Nov 21 14:28:32 2009
New Revision: 199629
URL: http://svn.freebsd.org/changeset/base/199629

Log:
  sh: Some changes to stderr flushing:
  * increase buffer size from 100 to 256 bytes
  * remove implied flush from out2str(), in particular this avoids unnecessary
    flushing in the middle of a -x tracing line
  * rename dprintf() to out2fmt_flush(), make it flush out2 and use this
    function in various places where flushing is desired after an error
    message

Modified:
  head/bin/sh/histedit.c
  head/bin/sh/input.c
  head/bin/sh/jobs.c
  head/bin/sh/main.c
  head/bin/sh/output.c
  head/bin/sh/output.h
  head/bin/sh/parser.c

Modified: head/bin/sh/histedit.c
==============================================================================
--- head/bin/sh/histedit.c	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/histedit.c	Sat Nov 21 14:28:32 2009	(r199629)
@@ -92,7 +92,7 @@ histedit(void)
 			if (hist != NULL)
 				sethistsize(histsizeval());
 			else
-				out2str("sh: can't initialize history\n");
+				out2fmt_flush("sh: can't initialize history\n");
 		}
 		if (editing && !el && isatty(0)) { /* && isatty(2) ??? */
 			/*
@@ -114,7 +114,7 @@ histedit(void)
 				el_set(el, EL_PROMPT, getprompt);
 			} else {
 bad:
-				out2str("sh: can't initialize editing\n");
+				out2fmt_flush("sh: can't initialize editing\n");
 			}
 			INTON;
 		} else if (!editing && el) {
@@ -336,6 +336,7 @@ histcmd(int argc, char **argv)
 			if (sflg) {
 				if (displayhist) {
 					out2str(s);
+					flushout(out2);
 				}
 				evalstring(s, 0);
 				if (displayhist && hist) {

Modified: head/bin/sh/input.c
==============================================================================
--- head/bin/sh/input.c	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/input.c	Sat Nov 21 14:28:32 2009	(r199629)
@@ -215,7 +215,7 @@ retry:
                                 if (flags >= 0 && flags & O_NONBLOCK) {
                                         flags &=~ O_NONBLOCK;
                                         if (fcntl(0, F_SETFL, flags) >= 0) {
-						out2str("sh: turning off NDELAY mode\n");
+						out2fmt_flush("sh: turning off NDELAY mode\n");
                                                 goto retry;
                                         }
                                 }
@@ -359,7 +359,7 @@ pushstring(char *s, int len, void *ap)
 	struct strpush *sp;
 
 	INTOFF;
-/*dprintf("*** calling pushstring: %s, %d\n", s, len);*/
+/*out2fmt_flush("*** calling pushstring: %s, %d\n", s, len);*/
 	if (parsefile->strpush) {
 		sp = ckmalloc(sizeof (struct strpush));
 		sp->prev = parsefile->strpush;
@@ -386,7 +386,7 @@ popstring(void)
 	parsenextc = sp->prevstring;
 	parsenleft = sp->prevnleft;
 	parselleft = sp->prevlleft;
-/*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/
+/*out2fmt_flush("*** calling popstring: restoring to '%s'\n", parsenextc);*/
 	if (sp->ap)
 		sp->ap->flag &= ~ALIASINUSE;
 	parsefile->strpush = sp->prev;

Modified: head/bin/sh/jobs.c
==============================================================================
--- head/bin/sh/jobs.c	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/jobs.c	Sat Nov 21 14:28:32 2009	(r199629)
@@ -146,7 +146,7 @@ setjobctl(int on)
 		do { /* while we are in the background */
 			initialpgrp = tcgetpgrp(ttyfd);
 			if (initialpgrp < 0) {
-out:				out2str("sh: can't access tty; job control turned off\n");
+out:				out2fmt_flush("sh: can't access tty; job control turned off\n");
 				mflag = 0;
 				return;
 			}
@@ -1046,7 +1046,7 @@ stoppedjobs(void)
 		if (jp->used == 0)
 			continue;
 		if (jp->state == JOBSTOPPED) {
-			out2str("You have stopped jobs.\n");
+			out2fmt_flush("You have stopped jobs.\n");
 			job_warning = 2;
 			return (1);
 		}

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/main.c	Sat Nov 21 14:28:32 2009	(r199629)
@@ -154,7 +154,7 @@ main(int argc, char *argv[])
 	setstackmark(&smark);
 	procargs(argc, argv);
 	if (getpwd() == NULL && iflag)
-		out2str("sh: cannot determine working directory\n");
+		out2fmt_flush("sh: cannot determine working directory\n");
 	if (getpwd() != NULL)
 		setvar ("PWD", getpwd(), VEXPORT);
 	if (argv[0] && argv[0][0] == '-') {
@@ -223,7 +223,7 @@ cmdloop(int top)
 			if (!stoppedjobs()) {
 				if (!Iflag)
 					break;
-				out2str("\nUse \"exit\" to leave shell.\n");
+				out2fmt_flush("\nUse \"exit\" to leave shell.\n");
 			}
 			numeof++;
 		} else if (n != NULL && nflag == 0) {

Modified: head/bin/sh/output.c
==============================================================================
--- head/bin/sh/output.c	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/output.c	Sat Nov 21 14:28:32 2009	(r199629)
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
 static int doformat_wr(void *, const char *, int);
 
 struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
-struct output errout = {NULL, 0, NULL, 100, 2, 0};
+struct output errout = {NULL, 0, NULL, 256, 2, 0};
 struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0};
 struct output *out1 = &output;
 struct output *out2 = &errout;
@@ -124,8 +124,6 @@ outstr(const char *p, struct output *fil
 {
 	while (*p)
 		outc(*p++, file);
-	if (file == out2)
-		flushout(file);
 }
 
 /* Like outstr(), but quote for re-input into the shell. */
@@ -255,7 +253,7 @@ out1fmt(const char *fmt, ...)
 }
 
 void
-dprintf(const char *fmt, ...)
+out2fmt_flush(const char *fmt, ...)
 {
 	va_list ap;
 

Modified: head/bin/sh/output.h
==============================================================================
--- head/bin/sh/output.h	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/output.h	Sat Nov 21 14:28:32 2009	(r199629)
@@ -65,7 +65,7 @@ void flushout(struct output *);
 void freestdout(void);
 void outfmt(struct output *, const char *, ...) __printflike(2, 3);
 void out1fmt(const char *, ...) __printflike(1, 2);
-void dprintf(const char *, ...) __printflike(1, 2);
+void out2fmt_flush(const char *, ...) __printflike(1, 2);
 void fmtstr(char *, int, const char *, ...) __printflike(3, 4);
 void doformat(struct output *, const char *, va_list) __printflike(2, 0);
 int xwrite(int, char *, int);

Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c	Sat Nov 21 14:12:51 2009	(r199628)
+++ head/bin/sh/parser.c	Sat Nov 21 14:28:32 2009	(r199629)
@@ -1563,7 +1563,10 @@ setprompt(int which)
 #ifndef NO_HISTORY
 	if (!el)
 #endif
+	{
 		out2str(getprompt(NULL));
+		flushout(out2);
+	}
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 14:53:09 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 64EE2106566B;
	Sat, 21 Nov 2009 14:53:09 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 524DE8FC19;
	Sat, 21 Nov 2009 14:53:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALEr949082604;
	Sat, 21 Nov 2009 14:53:09 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALEr8XD082602;
	Sat, 21 Nov 2009 14:53:08 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <200911211453.nALEr8XD082602@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 21 Nov 2009 14:53:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199630 - stable/8/sys/geom/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 14:53:09 -0000

Author: rnoland
Date: Sat Nov 21 14:53:08 2009
New Revision: 199630
URL: http://svn.freebsd.org/changeset/base/199630

Log:
  MFC r199017,199228
  
  Fix handling of GPT headers when size is > 92 bytes.
  
  This should address reading GPT headers written by opensolaris.

Modified:
  stable/8/sys/geom/part/g_part_gpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/geom/part/g_part_gpt.c
==============================================================================
--- stable/8/sys/geom/part/g_part_gpt.c	Sat Nov 21 14:28:32 2009	(r199629)
+++ stable/8/sys/geom/part/g_part_gpt.c	Sat Nov 21 14:53:08 2009	(r199630)
@@ -73,7 +73,7 @@ enum gpt_state {
 struct g_part_gpt_table {
 	struct g_part_table	base;
 	u_char			mbr[MBRSIZE];
-	struct gpt_hdr		hdr;
+	struct gpt_hdr		*hdr;
 	quad_t			lba[GPT_ELT_COUNT];
 	enum gpt_state		state[GPT_ELT_COUNT];
 };
@@ -143,13 +143,12 @@ static struct uuid gpt_uuid_linux_swap =
 static struct uuid gpt_uuid_mbr = GPT_ENT_TYPE_MBR;
 static struct uuid gpt_uuid_unused = GPT_ENT_TYPE_UNUSED;
 
-static void
+static struct gpt_hdr *
 gpt_read_hdr(struct g_part_gpt_table *table, struct g_consumer *cp,
-    enum gpt_elt elt, struct gpt_hdr *hdr)
+    enum gpt_elt elt)
 {
-	struct uuid uuid;
+	struct gpt_hdr *buf, *hdr;
 	struct g_provider *pp;
-	char *buf;
 	quad_t lba, last;
 	int error;
 	uint32_t crc, sz;
@@ -161,63 +160,75 @@ gpt_read_hdr(struct g_part_gpt_table *ta
 	buf = g_read_data(cp, table->lba[elt] * pp->sectorsize, pp->sectorsize,
 	    &error);
 	if (buf == NULL)
-		return;
-	bcopy(buf, hdr, sizeof(*hdr));
-	if (memcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0)
-		return;
+		return (NULL);
+	hdr = NULL;
+	if (memcmp(buf->hdr_sig, GPT_HDR_SIG, sizeof(buf->hdr_sig)) != 0)
+		goto fail;
 
 	table->state[elt] = GPT_STATE_CORRUPT;
-	sz = le32toh(hdr->hdr_size);
+	sz = le32toh(buf->hdr_size);
 	if (sz < 92 || sz > pp->sectorsize)
-		return;
-	crc = le32toh(hdr->hdr_crc_self);
-	hdr->hdr_crc_self = 0;
-	if (crc32(hdr, sz) != crc)
-		return;
+		goto fail;
+
+	hdr = g_malloc(sz, M_WAITOK | M_ZERO);
+	bcopy(buf, hdr, sz);
 	hdr->hdr_size = sz;
+
+	crc = le32toh(buf->hdr_crc_self);
+	buf->hdr_crc_self = 0;
+	if (crc32(buf, sz) != crc)
+		goto fail;
 	hdr->hdr_crc_self = crc;
 
 	table->state[elt] = GPT_STATE_INVALID;
-	hdr->hdr_revision = le32toh(hdr->hdr_revision);
+	hdr->hdr_revision = le32toh(buf->hdr_revision);
 	if (hdr->hdr_revision < 0x00010000)
-		return;
-	hdr->hdr_lba_self = le64toh(hdr->hdr_lba_self);
+		goto fail;
+	hdr->hdr_lba_self = le64toh(buf->hdr_lba_self);
 	if (hdr->hdr_lba_self != table->lba[elt])
-		return;
-	hdr->hdr_lba_alt = le64toh(hdr->hdr_lba_alt);
+		goto fail;
+	hdr->hdr_lba_alt = le64toh(buf->hdr_lba_alt);
 
 	/* Check the managed area. */
-	hdr->hdr_lba_start = le64toh(hdr->hdr_lba_start);
+	hdr->hdr_lba_start = le64toh(buf->hdr_lba_start);
 	if (hdr->hdr_lba_start < 2 || hdr->hdr_lba_start >= last)
-		return;
-	hdr->hdr_lba_end = le64toh(hdr->hdr_lba_end);
+		goto fail;
+	hdr->hdr_lba_end = le64toh(buf->hdr_lba_end);
 	if (hdr->hdr_lba_end < hdr->hdr_lba_start || hdr->hdr_lba_end >= last)
-		return;
+		goto fail;
 
 	/* Check the table location and size of the table. */
-	hdr->hdr_entries = le32toh(hdr->hdr_entries);
-	hdr->hdr_entsz = le32toh(hdr->hdr_entsz);
+	hdr->hdr_entries = le32toh(buf->hdr_entries);
+	hdr->hdr_entsz = le32toh(buf->hdr_entsz);
 	if (hdr->hdr_entries == 0 || hdr->hdr_entsz < 128 ||
 	    (hdr->hdr_entsz & 7) != 0)
-		return;
-	hdr->hdr_lba_table = le64toh(hdr->hdr_lba_table);
+		goto fail;
+	hdr->hdr_lba_table = le64toh(buf->hdr_lba_table);
 	if (hdr->hdr_lba_table < 2 || hdr->hdr_lba_table >= last)
-		return;
+		goto fail;
 	if (hdr->hdr_lba_table >= hdr->hdr_lba_start &&
 	    hdr->hdr_lba_table <= hdr->hdr_lba_end)
-		return;
+		goto fail;
 	lba = hdr->hdr_lba_table +
 	    (hdr->hdr_entries * hdr->hdr_entsz + pp->sectorsize - 1) /
 	    pp->sectorsize - 1;
 	if (lba >= last)
-		return;
+		goto fail;
 	if (lba >= hdr->hdr_lba_start && lba <= hdr->hdr_lba_end)
-		return;
+		goto fail;
 
 	table->state[elt] = GPT_STATE_OK;
-	le_uuid_dec(&hdr->hdr_uuid, &uuid);
-	hdr->hdr_uuid = uuid;
-	hdr->hdr_crc_table = le32toh(hdr->hdr_crc_table);
+	le_uuid_dec(&buf->hdr_uuid, &hdr->hdr_uuid);
+	hdr->hdr_crc_table = le32toh(buf->hdr_crc_table);
+
+	g_free(buf);
+	return (hdr);
+
+ fail:
+	if (hdr != NULL)
+		g_free(hdr);
+	g_free(buf);
+	return (NULL);
 }
 
 static struct gpt_ent *
@@ -230,6 +241,9 @@ gpt_read_tbl(struct g_part_gpt_table *ta
 	unsigned int idx, sectors, tblsz;
 	int error;
 
+	if (hdr == NULL)
+		return (NULL);
+
 	pp = cp->provider;
 	table->lba[elt] = hdr->hdr_lba_table;
 
@@ -271,6 +285,9 @@ static int
 gpt_matched_hdrs(struct gpt_hdr *pri, struct gpt_hdr *sec)
 {
 
+	if (pri == NULL || sec == NULL)
+		return (0);
+
 	if (!EQUUID(&pri->hdr_uuid, &sec->hdr_uuid))
 		return (0);
 	return ((pri->hdr_revision == sec->hdr_revision &&
@@ -427,17 +444,20 @@ g_part_gpt_create(struct g_part_table *b
 	table->lba[GPT_ELT_SECHDR] = last;
 	table->lba[GPT_ELT_SECTBL] = last - tblsz;
 
-	bcopy(GPT_HDR_SIG, table->hdr.hdr_sig, sizeof(table->hdr.hdr_sig));
-	table->hdr.hdr_revision = GPT_HDR_REVISION;
-	table->hdr.hdr_size = offsetof(struct gpt_hdr, padding);
-	table->hdr.hdr_lba_start = 2 + tblsz;
-	table->hdr.hdr_lba_end = last - tblsz - 1;
-	kern_uuidgen(&table->hdr.hdr_uuid, 1);
-	table->hdr.hdr_entries = basetable->gpt_entries;
-	table->hdr.hdr_entsz = sizeof(struct gpt_ent);
+	/* Allocate space for the header */
+	table->hdr = g_malloc(sizeof(struct gpt_hdr), M_WAITOK | M_ZERO);
+
+	bcopy(GPT_HDR_SIG, table->hdr->hdr_sig, sizeof(table->hdr->hdr_sig));
+	table->hdr->hdr_revision = GPT_HDR_REVISION;
+	table->hdr->hdr_size = offsetof(struct gpt_hdr, padding);
+	table->hdr->hdr_lba_start = 2 + tblsz;
+	table->hdr->hdr_lba_end = last - tblsz - 1;
+	kern_uuidgen(&table->hdr->hdr_uuid, 1);
+	table->hdr->hdr_entries = basetable->gpt_entries;
+	table->hdr->hdr_entsz = sizeof(struct gpt_ent);
 
-	basetable->gpt_first = table->hdr.hdr_lba_start;
-	basetable->gpt_last = table->hdr.hdr_lba_end;
+	basetable->gpt_first = table->hdr->hdr_lba_start;
+	basetable->gpt_last = table->hdr->hdr_lba_end;
 	return (0);
 }
 
@@ -582,7 +602,7 @@ g_part_gpt_probe(struct g_part_table *ta
 static int
 g_part_gpt_read(struct g_part_table *basetable, struct g_consumer *cp)
 {
-	struct gpt_hdr prihdr, sechdr;
+	struct gpt_hdr *prihdr, *sechdr;
 	struct gpt_ent *tbl, *pritbl, *sectbl;
 	struct g_provider *pp;
 	struct g_part_gpt_table *table;
@@ -601,18 +621,18 @@ g_part_gpt_read(struct g_part_table *bas
 	g_free(buf);
 
 	/* Read the primary header and table. */
-	gpt_read_hdr(table, cp, GPT_ELT_PRIHDR, &prihdr);
+	prihdr = gpt_read_hdr(table, cp, GPT_ELT_PRIHDR);
 	if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK) {
-		pritbl = gpt_read_tbl(table, cp, GPT_ELT_PRITBL, &prihdr);
+		pritbl = gpt_read_tbl(table, cp, GPT_ELT_PRITBL, prihdr);
 	} else {
 		table->state[GPT_ELT_PRITBL] = GPT_STATE_MISSING;
 		pritbl = NULL;
 	}
 
 	/* Read the secondary header and table. */
-	gpt_read_hdr(table, cp, GPT_ELT_SECHDR, &sechdr);
+	sechdr = gpt_read_hdr(table, cp, GPT_ELT_SECHDR);
 	if (table->state[GPT_ELT_SECHDR] == GPT_STATE_OK) {
-		sectbl = gpt_read_tbl(table, cp, GPT_ELT_SECTBL, &sechdr);
+		sectbl = gpt_read_tbl(table, cp, GPT_ELT_SECTBL, sechdr);
 	} else {
 		table->state[GPT_ELT_SECTBL] = GPT_STATE_MISSING;
 		sectbl = NULL;
@@ -635,13 +655,17 @@ g_part_gpt_read(struct g_part_table *bas
 	 */
 	if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK &&
 	    table->state[GPT_ELT_SECHDR] == GPT_STATE_OK &&
-	    !gpt_matched_hdrs(&prihdr, &sechdr)) {
+	    !gpt_matched_hdrs(prihdr, sechdr)) {
 		if (table->state[GPT_ELT_PRITBL] == GPT_STATE_OK) {
 			table->state[GPT_ELT_SECHDR] = GPT_STATE_INVALID;
 			table->state[GPT_ELT_SECTBL] = GPT_STATE_MISSING;
+			g_free(sechdr);
+			sechdr = NULL;
 		} else {
 			table->state[GPT_ELT_PRIHDR] = GPT_STATE_INVALID;
 			table->state[GPT_ELT_PRITBL] = GPT_STATE_MISSING;
+			g_free(prihdr);
+			prihdr = NULL;
 		}
 	}
 
@@ -651,6 +675,8 @@ g_part_gpt_read(struct g_part_table *bas
 		printf("GEOM: %s: using the secondary instead -- recovery "
 		    "strongly advised.\n", pp->name);
 		table->hdr = sechdr;
+		if (prihdr != NULL)
+			g_free(prihdr);
 		tbl = sectbl;
 		if (pritbl != NULL)
 			g_free(pritbl);
@@ -662,14 +688,16 @@ g_part_gpt_read(struct g_part_table *bas
 			    "suggested.\n", pp->name);
 		}
 		table->hdr = prihdr;
+		if (sechdr != NULL)
+			g_free(sechdr);
 		tbl = pritbl;
 		if (sectbl != NULL)
 			g_free(sectbl);
 	}
 
-	basetable->gpt_first = table->hdr.hdr_lba_start;
-	basetable->gpt_last = table->hdr.hdr_lba_end;
-	basetable->gpt_entries = table->hdr.hdr_entries;
+	basetable->gpt_first = table->hdr->hdr_lba_start;
+	basetable->gpt_last = table->hdr->hdr_lba_end;
+	basetable->gpt_entries = table->hdr->hdr_entries;
 
 	for (index = basetable->gpt_entries - 1; index >= 0; index--) {
 		if (EQUUID(&tbl[index].ent_type, &gpt_uuid_unused))
@@ -729,7 +757,7 @@ g_part_gpt_write(struct g_part_table *ba
 
 	pp = cp->provider;
 	table = (struct g_part_gpt_table *)basetable;
-	tlbsz = (table->hdr.hdr_entries * table->hdr.hdr_entsz +
+	tlbsz = (table->hdr->hdr_entries * table->hdr->hdr_entsz +
 	    pp->sectorsize - 1) / pp->sectorsize;
 
 	/* Write the PMBR */
@@ -743,21 +771,21 @@ g_part_gpt_write(struct g_part_table *ba
 	/* Allocate space for the header and entries. */
 	buf = g_malloc((tlbsz + 1) * pp->sectorsize, M_WAITOK | M_ZERO);
 
-	memcpy(buf, table->hdr.hdr_sig, sizeof(table->hdr.hdr_sig));
-	le32enc(buf + 8, table->hdr.hdr_revision);
-	le32enc(buf + 12, table->hdr.hdr_size);
-	le64enc(buf + 40, table->hdr.hdr_lba_start);
-	le64enc(buf + 48, table->hdr.hdr_lba_end);
-	le_uuid_enc(buf + 56, &table->hdr.hdr_uuid);
-	le32enc(buf + 80, table->hdr.hdr_entries);
-	le32enc(buf + 84, table->hdr.hdr_entsz);
+	memcpy(buf, table->hdr->hdr_sig, sizeof(table->hdr->hdr_sig));
+	le32enc(buf + 8, table->hdr->hdr_revision);
+	le32enc(buf + 12, table->hdr->hdr_size);
+	le64enc(buf + 40, table->hdr->hdr_lba_start);
+	le64enc(buf + 48, table->hdr->hdr_lba_end);
+	le_uuid_enc(buf + 56, &table->hdr->hdr_uuid);
+	le32enc(buf + 80, table->hdr->hdr_entries);
+	le32enc(buf + 84, table->hdr->hdr_entsz);
 
 	LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) {
 		if (baseentry->gpe_deleted)
 			continue;
 		entry = (struct g_part_gpt_entry *)baseentry;
 		index = baseentry->gpe_index - 1;
-		bp = buf + pp->sectorsize + table->hdr.hdr_entsz * index;
+		bp = buf + pp->sectorsize + table->hdr->hdr_entsz * index;
 		le_uuid_enc(bp, &entry->ent.ent_type);
 		le_uuid_enc(bp + 16, &entry->ent.ent_uuid);
 		le64enc(bp + 32, entry->ent.ent_lba_start);
@@ -768,7 +796,7 @@ g_part_gpt_write(struct g_part_table *ba
 	}
 
 	crc = crc32(buf + pp->sectorsize,
-	    table->hdr.hdr_entries * table->hdr.hdr_entsz);
+	    table->hdr->hdr_entries * table->hdr->hdr_entsz);
 	le32enc(buf + 88, crc);
 
 	/* Write primary meta-data. */
@@ -776,7 +804,7 @@ g_part_gpt_write(struct g_part_table *ba
 	le64enc(buf + 24, table->lba[GPT_ELT_PRIHDR]);	/* hdr_lba_self. */
 	le64enc(buf + 32, table->lba[GPT_ELT_SECHDR]);	/* hdr_lba_alt. */
 	le64enc(buf + 72, table->lba[GPT_ELT_PRITBL]);	/* hdr_lba_table. */
-	crc = crc32(buf, table->hdr.hdr_size);
+	crc = crc32(buf, table->hdr->hdr_size);
 	le32enc(buf + 16, crc);
 
 	error = g_write_data(cp, table->lba[GPT_ELT_PRITBL] * pp->sectorsize,
@@ -793,7 +821,7 @@ g_part_gpt_write(struct g_part_table *ba
 	le64enc(buf + 24, table->lba[GPT_ELT_SECHDR]);	/* hdr_lba_self. */
 	le64enc(buf + 32, table->lba[GPT_ELT_PRIHDR]);	/* hdr_lba_alt. */
 	le64enc(buf + 72, table->lba[GPT_ELT_SECTBL]);	/* hdr_lba_table. */
-	crc = crc32(buf, table->hdr.hdr_size);
+	crc = crc32(buf, table->hdr->hdr_size);
 	le32enc(buf + 16, crc);
 
 	error = g_write_data(cp, table->lba[GPT_ELT_SECTBL] * pp->sectorsize,

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 14:53:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C5C0910656A3;
	Sat, 21 Nov 2009 14:53:22 +0000 (UTC)
	(envelope-from stefanf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B4EF48FC14;
	Sat, 21 Nov 2009 14:53:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALErMtE082644;
	Sat, 21 Nov 2009 14:53:22 GMT (envelope-from stefanf@svn.freebsd.org)
Received: (from stefanf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALErMPf082642;
	Sat, 21 Nov 2009 14:53:22 GMT (envelope-from stefanf@svn.freebsd.org)
Message-Id: <200911211453.nALErMPf082642@svn.freebsd.org>
From: Stefan Farfeleder 
Date: Sat, 21 Nov 2009 14:53:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199631 - head/bin/sh
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 14:53:22 -0000

Author: stefanf
Date: Sat Nov 21 14:53:22 2009
New Revision: 199631
URL: http://svn.freebsd.org/changeset/base/199631

Log:
  Handle current work directories of arbitrary length.  The argument to cd
  continues to be limited by PATH_MAX (1024).
  
  Obtained from:	NetBSD
  PR:		104456

Modified:
  head/bin/sh/cd.c

Modified: head/bin/sh/cd.c
==============================================================================
--- head/bin/sh/cd.c	Sat Nov 21 14:53:08 2009	(r199630)
+++ head/bin/sh/cd.c	Sat Nov 21 14:53:22 2009	(r199631)
@@ -70,7 +70,7 @@ STATIC int docd(char *, int, int);
 STATIC char *getcomponent(void);
 STATIC char *findcwd(char *);
 STATIC void updatepwd(char *);
-STATIC char *getpwd2(char *, size_t);
+STATIC char *getpwd2(void);
 
 STATIC char *curdir = NULL;	/* current working directory */
 STATIC char *prevdir;		/* previous working directory */
@@ -263,10 +263,8 @@ findcwd(char *dir)
 	 * any more because we traversed a symbolic link or something
 	 * we couldn't stat().
 	 */
-	if (dir == NULL || curdir == NULL)  {
-		p = stalloc(PATH_MAX);
-		return getpwd2(p, PATH_MAX);
-	}
+	if (dir == NULL || curdir == NULL)
+		return getpwd2();
 	cdcomppath = stalloc(strlen(dir) + 1);
 	scopy(dir, cdcomppath);
 	STARTSTACKSTR(new);
@@ -313,7 +311,7 @@ updatepwd(char *dir)
 int
 pwdcmd(int argc, char **argv)
 {
-	char buf[PATH_MAX];
+	char *p;
 	int ch, phys;
 
 	optreset = 1; optind = 1; opterr = 0; /* initialize getopt */
@@ -341,9 +339,9 @@ pwdcmd(int argc, char **argv)
 		out1str(curdir);
 		out1c('\n');
 	} else {
-		if (getcwd(buf, sizeof(buf)) == NULL)
+		if ((p = getpwd2()) == NULL)
 			error(".: %s", strerror(errno));
-		out1str(buf);
+		out1str(p);
 		out1c('\n');
 	}
 
@@ -356,36 +354,45 @@ pwdcmd(int argc, char **argv)
 char *
 getpwd(void)
 {
-	char buf[PATH_MAX];
 	char *p;
 
 	if (curdir)
 		return curdir;
 
-	p = getpwd2(buf, sizeof(buf));
+	p = getpwd2();
 	if (p != NULL)
 		curdir = savestr(p);
 
 	return curdir;
 }
 
+#define MAXPWD 256
+
 /*
  * Return the current directory.
  */
 STATIC char *
-getpwd2(char *buf, size_t size)
+getpwd2(void)
 {
-	if (getcwd(buf, size) == NULL) {
-		char *pwd = getenv("PWD");
-		struct stat stdot, stpwd;
-
-		if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
-		    stat(pwd, &stpwd) != -1 &&
-		    stdot.st_dev == stpwd.st_dev &&
-		    stdot.st_ino == stpwd.st_ino) {
+	struct stat stdot, stpwd;
+	char *pwd;
+	int i;
+
+	for (i = MAXPWD;; i *= 2) {
+		pwd = stalloc(i);
+		if (getcwd(pwd, i) != NULL)
 			return pwd;
-		}
-		return NULL;
+		stunalloc(pwd);
+		if (errno != ERANGE)
+			break;
+	}
+
+	pwd = getenv("PWD");
+	if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
+	    stat(pwd, &stpwd) != -1 &&
+	    stdot.st_dev == stpwd.st_dev &&
+	    stdot.st_ino == stpwd.st_ino) {
+		return pwd;
 	}
-	return buf;
+	return NULL;
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 14:54:36 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B19D1065672;
	Sat, 21 Nov 2009 14:54:36 +0000 (UTC)
	(envelope-from stefanf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EE9278FC14;
	Sat, 21 Nov 2009 14:54:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALEsZCN082722;
	Sat, 21 Nov 2009 14:54:35 GMT (envelope-from stefanf@svn.freebsd.org)
Received: (from stefanf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALEsZd2082720;
	Sat, 21 Nov 2009 14:54:35 GMT (envelope-from stefanf@svn.freebsd.org)
Message-Id: <200911211454.nALEsZd2082720@svn.freebsd.org>
From: Stefan Farfeleder 
Date: Sat, 21 Nov 2009 14:54:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199632 - head/tools/regression/bin/sh/builtins
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 14:54:36 -0000

Author: stefanf
Date: Sat Nov 21 14:54:35 2009
New Revision: 199632
URL: http://svn.freebsd.org/changeset/base/199632

Log:
  Add a test for r199631.

Added:
  head/tools/regression/bin/sh/builtins/cd2.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/cd2.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/cd2.0	Sat Nov 21 14:54:35 2009	(r199632)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+set -e
+
+T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
+cd $T
+D=$T
+for i in 0 1 2 3 4 5 6 7 8 9; do
+	for j in 0 1 2 3 4 5 6 7 8 9; do
+		mkdir veryverylongdirectoryname
+		cd veryverylongdirectoryname
+		D=$D/veryverylongdirectoryname
+	done
+done
+[ $(pwd | wc -c) -eq $((${#D} + 1)) ] # +\n
+rm -rf ${T}

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 14:54:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 31BBC106566C;
	Sat, 21 Nov 2009 14:54:46 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F2A28FC0A;
	Sat, 21 Nov 2009 14:54:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALEskTQ082760;
	Sat, 21 Nov 2009 14:54:46 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALEsk8n082758;
	Sat, 21 Nov 2009 14:54:46 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <200911211454.nALEsk8n082758@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 21 Nov 2009 14:54:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199633 - stable/7/sys/geom/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 14:54:46 -0000

Author: rnoland
Date: Sat Nov 21 14:54:45 2009
New Revision: 199633
URL: http://svn.freebsd.org/changeset/base/199633

Log:
  MFC r199017,199228
  
  Fix handling of GPT headers when size is > 92 bytes.
  
  This should address reading GPT headers written by opensolaris.

Modified:
  stable/7/sys/geom/part/g_part_gpt.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/geom/part/g_part_gpt.c
==============================================================================
--- stable/7/sys/geom/part/g_part_gpt.c	Sat Nov 21 14:54:35 2009	(r199632)
+++ stable/7/sys/geom/part/g_part_gpt.c	Sat Nov 21 14:54:45 2009	(r199633)
@@ -73,7 +73,7 @@ enum gpt_state {
 struct g_part_gpt_table {
 	struct g_part_table	base;
 	u_char			mbr[MBRSIZE];
-	struct gpt_hdr		hdr;
+	struct gpt_hdr		*hdr;
 	quad_t			lba[GPT_ELT_COUNT];
 	enum gpt_state		state[GPT_ELT_COUNT];
 };
@@ -142,13 +142,12 @@ static struct uuid gpt_uuid_linux_swap =
 static struct uuid gpt_uuid_mbr = GPT_ENT_TYPE_MBR;
 static struct uuid gpt_uuid_unused = GPT_ENT_TYPE_UNUSED;
 
-static void
+static struct gpt_hdr *
 gpt_read_hdr(struct g_part_gpt_table *table, struct g_consumer *cp,
-    enum gpt_elt elt, struct gpt_hdr *hdr)
+    enum gpt_elt elt)
 {
-	struct uuid uuid;
+	struct gpt_hdr *buf, *hdr;
 	struct g_provider *pp;
-	char *buf;
 	quad_t lba, last;
 	int error;
 	uint32_t crc, sz;
@@ -160,63 +159,75 @@ gpt_read_hdr(struct g_part_gpt_table *ta
 	buf = g_read_data(cp, table->lba[elt] * pp->sectorsize, pp->sectorsize,
 	    &error);
 	if (buf == NULL)
-		return;
-	bcopy(buf, hdr, sizeof(*hdr));
-	if (memcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0)
-		return;
+		return (NULL);
+	hdr = NULL;
+	if (memcmp(buf->hdr_sig, GPT_HDR_SIG, sizeof(buf->hdr_sig)) != 0)
+		goto fail;
 
 	table->state[elt] = GPT_STATE_CORRUPT;
-	sz = le32toh(hdr->hdr_size);
+	sz = le32toh(buf->hdr_size);
 	if (sz < 92 || sz > pp->sectorsize)
-		return;
-	crc = le32toh(hdr->hdr_crc_self);
-	hdr->hdr_crc_self = 0;
-	if (crc32(hdr, sz) != crc)
-		return;
+		goto fail;
+
+	hdr = g_malloc(sz, M_WAITOK | M_ZERO);
+	bcopy(buf, hdr, sz);
 	hdr->hdr_size = sz;
+
+	crc = le32toh(buf->hdr_crc_self);
+	buf->hdr_crc_self = 0;
+	if (crc32(buf, sz) != crc)
+		goto fail;
 	hdr->hdr_crc_self = crc;
 
 	table->state[elt] = GPT_STATE_INVALID;
-	hdr->hdr_revision = le32toh(hdr->hdr_revision);
+	hdr->hdr_revision = le32toh(buf->hdr_revision);
 	if (hdr->hdr_revision < 0x00010000)
-		return;
-	hdr->hdr_lba_self = le64toh(hdr->hdr_lba_self);
+		goto fail;
+	hdr->hdr_lba_self = le64toh(buf->hdr_lba_self);
 	if (hdr->hdr_lba_self != table->lba[elt])
-		return;
-	hdr->hdr_lba_alt = le64toh(hdr->hdr_lba_alt);
+		goto fail;
+	hdr->hdr_lba_alt = le64toh(buf->hdr_lba_alt);
 
 	/* Check the managed area. */
-	hdr->hdr_lba_start = le64toh(hdr->hdr_lba_start);
+	hdr->hdr_lba_start = le64toh(buf->hdr_lba_start);
 	if (hdr->hdr_lba_start < 2 || hdr->hdr_lba_start >= last)
-		return;
-	hdr->hdr_lba_end = le64toh(hdr->hdr_lba_end);
+		goto fail;
+	hdr->hdr_lba_end = le64toh(buf->hdr_lba_end);
 	if (hdr->hdr_lba_end < hdr->hdr_lba_start || hdr->hdr_lba_end >= last)
-		return;
+		goto fail;
 
 	/* Check the table location and size of the table. */
-	hdr->hdr_entries = le32toh(hdr->hdr_entries);
-	hdr->hdr_entsz = le32toh(hdr->hdr_entsz);
+	hdr->hdr_entries = le32toh(buf->hdr_entries);
+	hdr->hdr_entsz = le32toh(buf->hdr_entsz);
 	if (hdr->hdr_entries == 0 || hdr->hdr_entsz < 128 ||
 	    (hdr->hdr_entsz & 7) != 0)
-		return;
-	hdr->hdr_lba_table = le64toh(hdr->hdr_lba_table);
+		goto fail;
+	hdr->hdr_lba_table = le64toh(buf->hdr_lba_table);
 	if (hdr->hdr_lba_table < 2 || hdr->hdr_lba_table >= last)
-		return;
+		goto fail;
 	if (hdr->hdr_lba_table >= hdr->hdr_lba_start &&
 	    hdr->hdr_lba_table <= hdr->hdr_lba_end)
-		return;
+		goto fail;
 	lba = hdr->hdr_lba_table +
 	    (hdr->hdr_entries * hdr->hdr_entsz + pp->sectorsize - 1) /
 	    pp->sectorsize - 1;
 	if (lba >= last)
-		return;
+		goto fail;
 	if (lba >= hdr->hdr_lba_start && lba <= hdr->hdr_lba_end)
-		return;
+		goto fail;
 
 	table->state[elt] = GPT_STATE_OK;
-	le_uuid_dec(&hdr->hdr_uuid, &uuid);
-	hdr->hdr_uuid = uuid;
-	hdr->hdr_crc_table = le32toh(hdr->hdr_crc_table);
+	le_uuid_dec(&buf->hdr_uuid, &hdr->hdr_uuid);
+	hdr->hdr_crc_table = le32toh(buf->hdr_crc_table);
+
+	g_free(buf);
+	return (hdr);
+
+ fail:
+	if (hdr != NULL)
+		g_free(hdr);
+	g_free(buf);
+	return (NULL);
 }
 
 static struct gpt_ent *
@@ -229,6 +240,9 @@ gpt_read_tbl(struct g_part_gpt_table *ta
 	unsigned int idx, sectors, tblsz;
 	int error;
 
+	if (hdr == NULL)
+		return (NULL);
+
 	pp = cp->provider;
 	table->lba[elt] = hdr->hdr_lba_table;
 
@@ -270,6 +284,9 @@ static int
 gpt_matched_hdrs(struct gpt_hdr *pri, struct gpt_hdr *sec)
 {
 
+	if (pri == NULL || sec == NULL)
+		return (0);
+
 	if (!EQUUID(&pri->hdr_uuid, &sec->hdr_uuid))
 		return (0);
 	return ((pri->hdr_revision == sec->hdr_revision &&
@@ -417,17 +434,20 @@ g_part_gpt_create(struct g_part_table *b
 	table->lba[GPT_ELT_SECHDR] = last;
 	table->lba[GPT_ELT_SECTBL] = last - tblsz;
 
-	bcopy(GPT_HDR_SIG, table->hdr.hdr_sig, sizeof(table->hdr.hdr_sig));
-	table->hdr.hdr_revision = GPT_HDR_REVISION;
-	table->hdr.hdr_size = offsetof(struct gpt_hdr, padding);
-	table->hdr.hdr_lba_start = 2 + tblsz;
-	table->hdr.hdr_lba_end = last - tblsz - 1;
-	kern_uuidgen(&table->hdr.hdr_uuid, 1);
-	table->hdr.hdr_entries = basetable->gpt_entries;
-	table->hdr.hdr_entsz = sizeof(struct gpt_ent);
+	/* Allocate space for the header */
+	table->hdr = g_malloc(sizeof(struct gpt_hdr), M_WAITOK | M_ZERO);
+
+	bcopy(GPT_HDR_SIG, table->hdr->hdr_sig, sizeof(table->hdr->hdr_sig));
+	table->hdr->hdr_revision = GPT_HDR_REVISION;
+	table->hdr->hdr_size = offsetof(struct gpt_hdr, padding);
+	table->hdr->hdr_lba_start = 2 + tblsz;
+	table->hdr->hdr_lba_end = last - tblsz - 1;
+	kern_uuidgen(&table->hdr->hdr_uuid, 1);
+	table->hdr->hdr_entries = basetable->gpt_entries;
+	table->hdr->hdr_entsz = sizeof(struct gpt_ent);
 
-	basetable->gpt_first = table->hdr.hdr_lba_start;
-	basetable->gpt_last = table->hdr.hdr_lba_end;
+	basetable->gpt_first = table->hdr->hdr_lba_start;
+	basetable->gpt_last = table->hdr->hdr_lba_end;
 	return (0);
 }
 
@@ -572,7 +592,7 @@ g_part_gpt_probe(struct g_part_table *ta
 static int
 g_part_gpt_read(struct g_part_table *basetable, struct g_consumer *cp)
 {
-	struct gpt_hdr prihdr, sechdr;
+	struct gpt_hdr *prihdr, *sechdr;
 	struct gpt_ent *tbl, *pritbl, *sectbl;
 	struct g_provider *pp;
 	struct g_part_gpt_table *table;
@@ -591,18 +611,18 @@ g_part_gpt_read(struct g_part_table *bas
 	g_free(buf);
 
 	/* Read the primary header and table. */
-	gpt_read_hdr(table, cp, GPT_ELT_PRIHDR, &prihdr);
+	prihdr = gpt_read_hdr(table, cp, GPT_ELT_PRIHDR);
 	if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK) {
-		pritbl = gpt_read_tbl(table, cp, GPT_ELT_PRITBL, &prihdr);
+		pritbl = gpt_read_tbl(table, cp, GPT_ELT_PRITBL, prihdr);
 	} else {
 		table->state[GPT_ELT_PRITBL] = GPT_STATE_MISSING;
 		pritbl = NULL;
 	}
 
 	/* Read the secondary header and table. */
-	gpt_read_hdr(table, cp, GPT_ELT_SECHDR, &sechdr);
+	sechdr = gpt_read_hdr(table, cp, GPT_ELT_SECHDR);
 	if (table->state[GPT_ELT_SECHDR] == GPT_STATE_OK) {
-		sectbl = gpt_read_tbl(table, cp, GPT_ELT_SECTBL, &sechdr);
+		sectbl = gpt_read_tbl(table, cp, GPT_ELT_SECTBL, sechdr);
 	} else {
 		table->state[GPT_ELT_SECTBL] = GPT_STATE_MISSING;
 		sectbl = NULL;
@@ -625,13 +645,17 @@ g_part_gpt_read(struct g_part_table *bas
 	 */
 	if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK &&
 	    table->state[GPT_ELT_SECHDR] == GPT_STATE_OK &&
-	    !gpt_matched_hdrs(&prihdr, &sechdr)) {
+	    !gpt_matched_hdrs(prihdr, sechdr)) {
 		if (table->state[GPT_ELT_PRITBL] == GPT_STATE_OK) {
 			table->state[GPT_ELT_SECHDR] = GPT_STATE_INVALID;
 			table->state[GPT_ELT_SECTBL] = GPT_STATE_MISSING;
+			g_free(sechdr);
+			sechdr = NULL;
 		} else {
 			table->state[GPT_ELT_PRIHDR] = GPT_STATE_INVALID;
 			table->state[GPT_ELT_PRITBL] = GPT_STATE_MISSING;
+			g_free(prihdr);
+			prihdr = NULL;
 		}
 	}
 
@@ -641,6 +665,8 @@ g_part_gpt_read(struct g_part_table *bas
 		printf("GEOM: %s: using the secondary instead -- recovery "
 		    "strongly advised.\n", pp->name);
 		table->hdr = sechdr;
+		if (prihdr != NULL)
+			g_free(prihdr);
 		tbl = sectbl;
 		if (pritbl != NULL)
 			g_free(pritbl);
@@ -652,14 +678,16 @@ g_part_gpt_read(struct g_part_table *bas
 			    "suggested.\n", pp->name);
 		}
 		table->hdr = prihdr;
+		if (sechdr != NULL)
+			g_free(sechdr);
 		tbl = pritbl;
 		if (sectbl != NULL)
 			g_free(sectbl);
 	}
 
-	basetable->gpt_first = table->hdr.hdr_lba_start;
-	basetable->gpt_last = table->hdr.hdr_lba_end;
-	basetable->gpt_entries = table->hdr.hdr_entries;
+	basetable->gpt_first = table->hdr->hdr_lba_start;
+	basetable->gpt_last = table->hdr->hdr_lba_end;
+	basetable->gpt_entries = table->hdr->hdr_entries;
 
 	for (index = basetable->gpt_entries - 1; index >= 0; index--) {
 		if (EQUUID(&tbl[index].ent_type, &gpt_uuid_unused))
@@ -717,7 +745,7 @@ g_part_gpt_write(struct g_part_table *ba
 
 	pp = cp->provider;
 	table = (struct g_part_gpt_table *)basetable;
-	tlbsz = (table->hdr.hdr_entries * table->hdr.hdr_entsz +
+	tlbsz = (table->hdr->hdr_entries * table->hdr->hdr_entsz +
 	    pp->sectorsize - 1) / pp->sectorsize;
 
 	/* Write the PMBR */
@@ -731,21 +759,21 @@ g_part_gpt_write(struct g_part_table *ba
 	/* Allocate space for the header and entries. */
 	buf = g_malloc((tlbsz + 1) * pp->sectorsize, M_WAITOK | M_ZERO);
 
-	memcpy(buf, table->hdr.hdr_sig, sizeof(table->hdr.hdr_sig));
-	le32enc(buf + 8, table->hdr.hdr_revision);
-	le32enc(buf + 12, table->hdr.hdr_size);
-	le64enc(buf + 40, table->hdr.hdr_lba_start);
-	le64enc(buf + 48, table->hdr.hdr_lba_end);
-	le_uuid_enc(buf + 56, &table->hdr.hdr_uuid);
-	le32enc(buf + 80, table->hdr.hdr_entries);
-	le32enc(buf + 84, table->hdr.hdr_entsz);
+	memcpy(buf, table->hdr->hdr_sig, sizeof(table->hdr->hdr_sig));
+	le32enc(buf + 8, table->hdr->hdr_revision);
+	le32enc(buf + 12, table->hdr->hdr_size);
+	le64enc(buf + 40, table->hdr->hdr_lba_start);
+	le64enc(buf + 48, table->hdr->hdr_lba_end);
+	le_uuid_enc(buf + 56, &table->hdr->hdr_uuid);
+	le32enc(buf + 80, table->hdr->hdr_entries);
+	le32enc(buf + 84, table->hdr->hdr_entsz);
 
 	LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) {
 		if (baseentry->gpe_deleted)
 			continue;
 		entry = (struct g_part_gpt_entry *)baseentry;
 		index = baseentry->gpe_index - 1;
-		bp = buf + pp->sectorsize + table->hdr.hdr_entsz * index;
+		bp = buf + pp->sectorsize + table->hdr->hdr_entsz * index;
 		le_uuid_enc(bp, &entry->ent.ent_type);
 		le_uuid_enc(bp + 16, &entry->ent.ent_uuid);
 		le64enc(bp + 32, entry->ent.ent_lba_start);
@@ -756,7 +784,7 @@ g_part_gpt_write(struct g_part_table *ba
 	}
 
 	crc = crc32(buf + pp->sectorsize,
-	    table->hdr.hdr_entries * table->hdr.hdr_entsz);
+	    table->hdr->hdr_entries * table->hdr->hdr_entsz);
 	le32enc(buf + 88, crc);
 
 	/* Write primary meta-data. */
@@ -764,7 +792,7 @@ g_part_gpt_write(struct g_part_table *ba
 	le64enc(buf + 24, table->lba[GPT_ELT_PRIHDR]);	/* hdr_lba_self. */
 	le64enc(buf + 32, table->lba[GPT_ELT_SECHDR]);	/* hdr_lba_alt. */
 	le64enc(buf + 72, table->lba[GPT_ELT_PRITBL]);	/* hdr_lba_table. */
-	crc = crc32(buf, table->hdr.hdr_size);
+	crc = crc32(buf, table->hdr->hdr_size);
 	le32enc(buf + 16, crc);
 
 	error = g_write_data(cp, table->lba[GPT_ELT_PRITBL] * pp->sectorsize,
@@ -781,7 +809,7 @@ g_part_gpt_write(struct g_part_table *ba
 	le64enc(buf + 24, table->lba[GPT_ELT_SECHDR]);	/* hdr_lba_self. */
 	le64enc(buf + 32, table->lba[GPT_ELT_PRIHDR]);	/* hdr_lba_alt. */
 	le64enc(buf + 72, table->lba[GPT_ELT_SECTBL]);	/* hdr_lba_table. */
-	crc = crc32(buf, table->hdr.hdr_size);
+	crc = crc32(buf, table->hdr->hdr_size);
 	le32enc(buf + 16, crc);
 
 	error = g_write_data(cp, table->lba[GPT_ELT_SECTBL] * pp->sectorsize,

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 15:02:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 72BCA10656A4;
	Sat, 21 Nov 2009 15:02:35 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5FD558FC18;
	Sat, 21 Nov 2009 15:02:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALF2ZY8083045;
	Sat, 21 Nov 2009 15:02:35 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALF2ZZA083040;
	Sat, 21 Nov 2009 15:02:35 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <200911211502.nALF2ZZA083040@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 21 Nov 2009 15:02:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199634 - in stable/8/sys: boot/i386/zfsboot boot/zfs
	cddl/boot/zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 15:02:35 -0000

Author: rnoland
Date: Sat Nov 21 15:02:35 2009
New Revision: 199634
URL: http://svn.freebsd.org/changeset/base/199634

Log:
  MFC 198420
  
    Correct some issues with zfs boot.
  
     - Teach it to read gang blocks. (essentially untested)
       If you see "ZFS: gang block detected!", please let
       me know, so we can either remove the printf if it
       works, or fix it if it doesn't.
  
     - If multiple partitions exist on a disk, probe them all.
       We also need to reset dsk->start to 0 to read the right
       sector here.
  
     - With GPT, we can have 128 partitions.
  
     - If the bootfs property has ever been set on a pool
       it seems that it never goes away.  zpool won't allow
       you to add to the pool with the bootfs property set.
       However, if you clear the property back to default
       we end up getting 0 for the object number and read
       a bogus block pointer and fail to boot.
  
     - Fix some error printfs. The printf in the loader is
       only capable of c,s and u formats.
  
     - Teach printf how to display %llu

Modified:
  stable/8/sys/boot/i386/zfsboot/zfsboot.c
  stable/8/sys/boot/zfs/zfs.c
  stable/8/sys/boot/zfs/zfsimpl.c
  stable/8/sys/cddl/boot/zfs/zfsimpl.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c
==============================================================================
--- stable/8/sys/boot/i386/zfsboot/zfsboot.c	Sat Nov 21 14:54:45 2009	(r199633)
+++ stable/8/sys/boot/i386/zfsboot/zfsboot.c	Sat Nov 21 15:02:35 2009	(r199634)
@@ -474,6 +474,7 @@ probe_drive(struct dsk *dsk, spa_t **spa
     slba = hdr.hdr_lba_table;
     elba = slba + hdr.hdr_entries / entries_per_sec;
     while (slba < elba) {
+	dsk->start = 0;
 	if (drvread(dsk, sec, slba, 1))
 	    return;
 	for (part = 0; part < entries_per_sec; part++) {
@@ -494,7 +495,6 @@ probe_drive(struct dsk *dsk, spa_t **spa
 		     */
 		    dsk = copy_dsk(dsk);
 		}
-		break;
 	    }
 	}
 	slba++;
@@ -857,12 +857,13 @@ static void
 printf(const char *fmt,...)
 {
     va_list ap;
-    char buf[10];
+    char buf[20];
     char *s;
-    unsigned u;
+    unsigned long long u;
     int c;
     int minus;
     int prec;
+    int l;
     int len;
     int pad;
 
@@ -871,6 +872,7 @@ printf(const char *fmt,...)
 	if (c == '%') {
 	    minus = 0;
 	    prec = 0;
+	    l = 0;
 	nextfmt:
 	    c = *fmt++;
 	    switch (c) {
@@ -892,6 +894,9 @@ printf(const char *fmt,...)
 	    case 'c':
 		putchar(va_arg(ap, int));
 		continue;
+	    case 'l':
+		l++;
+		goto nextfmt;
 	    case 's':
 		s = va_arg(ap, char *);
 		if (prec) {
@@ -914,7 +919,17 @@ printf(const char *fmt,...)
 		}
 		continue;
 	    case 'u':
-		u = va_arg(ap, unsigned);
+		switch (l) {
+		case 2:
+		    u = va_arg(ap, unsigned long long);
+		    break;
+		case 1:
+		    u = va_arg(ap, unsigned long);
+		    break;
+		default:
+		    u = va_arg(ap, unsigned);
+		    break;
+		}
 		s = buf;
 		do
 		    *s++ = '0' + u % 10U;

Modified: stable/8/sys/boot/zfs/zfs.c
==============================================================================
--- stable/8/sys/boot/zfs/zfs.c	Sat Nov 21 14:54:45 2009	(r199633)
+++ stable/8/sys/boot/zfs/zfs.c	Sat Nov 21 15:02:35 2009	(r199634)
@@ -100,7 +100,7 @@ zfs_open(const char *upath, struct open_
 	f->f_fsdata = (void *)fp;
 
 	if (spa->spa_root_objset.os_type != DMU_OST_ZFS) {
-		printf("Unexpected object set type %lld\n",
+		printf("Unexpected object set type %llu\n",
 		    spa->spa_root_objset.os_type);
 		rc = EIO;
 		goto out;
@@ -413,7 +413,7 @@ zfs_dev_init(void) 
 		if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0))
 			close(fd);
 
-		for (slice = 1; slice <= 4; slice++) {
+		for (slice = 1; slice <= 128; slice++) {
 			sprintf(devname, "disk%dp%d:", unit, slice);
 			fd = open(devname, O_RDONLY);
 			if (fd == -1) {

Modified: stable/8/sys/boot/zfs/zfsimpl.c
==============================================================================
--- stable/8/sys/boot/zfs/zfsimpl.c	Sat Nov 21 14:54:45 2009	(r199633)
+++ stable/8/sys/boot/zfs/zfsimpl.c	Sat Nov 21 15:02:35 2009	(r199634)
@@ -53,6 +53,8 @@ static char *zfs_temp_buf, *zfs_temp_end
 
 #define TEMP_SIZE	(1*SPA_MAXBLOCKSIZE)
 
+static int zio_read(spa_t *spa, const blkptr_t *bp, void *buf);
+
 static void
 zfs_init(void)
 {
@@ -897,6 +899,33 @@ ilog2(int n)
 }
 
 static int
+zio_read_gang(spa_t *spa, const blkptr_t *bp, const dva_t *dva, void *buf)
+{
+	zio_gbh_phys_t zio_gb;
+	vdev_t *vdev;
+	int vdevid;
+	off_t offset;
+	int i;
+
+	vdevid = DVA_GET_VDEV(dva);
+	offset = DVA_GET_OFFSET(dva);
+	STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink)
+		if (vdev->v_id == vdevid)
+			break;
+	if (!vdev || !vdev->v_read)
+		return (EIO);
+	if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE))
+		return (EIO);
+
+	for (i = 0; i < SPA_GBH_NBLKPTRS; i++) {
+		if (zio_read(spa, &zio_gb.zg_blkptr[i], buf))
+			return (EIO);
+	}
+ 
+	return (0);
+}
+
+static int
 zio_read(spa_t *spa, const blkptr_t *bp, void *buf)
 {
 	int cpfunc = BP_GET_COMPRESS(bp);
@@ -920,20 +949,27 @@ zio_read(spa_t *spa, const blkptr_t *bp,
 		if (!dva->dva_word[0] && !dva->dva_word[1])
 			continue;
 
-		vdevid = DVA_GET_VDEV(dva);
-		offset = DVA_GET_OFFSET(dva);
-		STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink)
-			if (vdev->v_id == vdevid)
-				break;
-		if (!vdev || !vdev->v_read)
-			continue;
-		if (vdev->v_read(vdev, bp, pbuf, offset, psize))
-			continue;
+		if (DVA_GET_GANG(dva)) {
+			printf("ZFS: gang block detected!\n");
+			if (zio_read_gang(spa, bp, dva, buf))
+				return (EIO); 
+		} else {
+			vdevid = DVA_GET_VDEV(dva);
+			offset = DVA_GET_OFFSET(dva);
+			STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink)
+				if (vdev->v_id == vdevid)
+					break;
+			if (!vdev || !vdev->v_read) {
+				continue;
+			}
+			if (vdev->v_read(vdev, bp, pbuf, offset, psize))
+				continue;
 
-		if (cpfunc != ZIO_COMPRESS_OFF) {
-			if (zio_decompress_data(cpfunc, pbuf, psize,
-				buf, lsize))
-				return (EIO);
+			if (cpfunc != ZIO_COMPRESS_OFF) {
+				if (zio_decompress_data(cpfunc, pbuf, psize,
+				    buf, lsize))
+					return (EIO);
+			}
 		}
 
 		return (0);
@@ -1331,13 +1367,13 @@ zfs_mount_dataset(spa_t *spa, uint64_t o
 	dsl_dataset_phys_t *ds;
 
 	if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) {
-		printf("ZFS: can't find dataset %lld\n", objnum);
+		printf("ZFS: can't find dataset %llu\n", objnum);
 		return (EIO);
 	}
 
 	ds = (dsl_dataset_phys_t *) &dataset.dn_bonus;
 	if (zio_read(spa, &ds->ds_bp, objset)) {
-		printf("ZFS: can't read object set for dataset %lld\n", objnum);
+		printf("ZFS: can't read object set for dataset %llu\n", objnum);
 		return (EIO);
 	}
 
@@ -1367,7 +1403,8 @@ zfs_mount_root(spa_t *spa, objset_phys_t
 	 */
 	if (zap_lookup(spa, &dir, DMU_POOL_PROPS, &props) == 0
 	     && objset_get_dnode(spa, &spa->spa_mos, props, &propdir) == 0
-	     && zap_lookup(spa, &propdir, "bootfs", &bootfs) == 0)
+	     && zap_lookup(spa, &propdir, "bootfs", &bootfs) == 0
+	     && bootfs != 0)
 		return zfs_mount_dataset(spa, bootfs, objset);
 
 	/*
@@ -1425,7 +1462,7 @@ zfs_lookup(spa_t *spa, const char *upath
 	int symlinks_followed = 0;
 
 	if (spa->spa_root_objset.os_type != DMU_OST_ZFS) {
-		printf("ZFS: unexpected object set type %lld\n",
+		printf("ZFS: unexpected object set type %llu\n",
 		       spa->spa_root_objset.os_type);
 		return (EIO);
 	}

Modified: stable/8/sys/cddl/boot/zfs/zfsimpl.h
==============================================================================
--- stable/8/sys/cddl/boot/zfs/zfsimpl.h	Sat Nov 21 14:54:45 2009	(r199633)
+++ stable/8/sys/cddl/boot/zfs/zfsimpl.h	Sat Nov 21 15:02:35 2009	(r199634)
@@ -374,6 +374,24 @@ typedef struct vdev_label {
 #define	VDEV_LABEL_END_SIZE	(2 * sizeof (vdev_label_t))
 #define	VDEV_LABELS		4
 
+/*
+ * Gang block headers are self-checksumming and contain an array
+ * of block pointers.
+ */
+#define SPA_GANGBLOCKSIZE	SPA_MINBLOCKSIZE
+#define SPA_GBH_NBLKPTRS	((SPA_GANGBLOCKSIZE - \
+	sizeof (zio_block_tail_t)) / sizeof (blkptr_t))
+#define SPA_GBH_FILLER		((SPA_GANGBLOCKSIZE - \
+	sizeof (zio_block_tail_t) - \
+	(SPA_GBH_NBLKPTRS * sizeof (blkptr_t))) /\
+	sizeof (uint64_t))
+
+typedef struct zio_gbh {
+	blkptr_t		zg_blkptr[SPA_GBH_NBLKPTRS];
+	uint64_t		zg_filler[SPA_GBH_FILLER];
+	zio_block_tail_t	zg_tail;
+} zio_gbh_phys_t;
+
 enum zio_checksum {
 	ZIO_CHECKSUM_INHERIT = 0,
 	ZIO_CHECKSUM_ON,

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 15:04:02 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F0358106566B;
	Sat, 21 Nov 2009 15:04:01 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DD6258FC1A;
	Sat, 21 Nov 2009 15:04:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALF41mb083153;
	Sat, 21 Nov 2009 15:04:01 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALF41Xa083148;
	Sat, 21 Nov 2009 15:04:01 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <200911211504.nALF41Xa083148@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 21 Nov 2009 15:04:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199635 - in stable/7/sys: boot/i386/zfsboot boot/zfs
	cddl/boot/zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 15:04:02 -0000

Author: rnoland
Date: Sat Nov 21 15:04:01 2009
New Revision: 199635
URL: http://svn.freebsd.org/changeset/base/199635

Log:
  MFC 198420
  
    Correct some issues with zfs boot.
  
     - Teach it to read gang blocks. (essentially untested)
       If you see "ZFS: gang block detected!", please let
       me know, so we can either remove the printf if it
       works, or fix it if it doesn't.
  
     - If multiple partitions exist on a disk, probe them all.
       We also need to reset dsk->start to 0 to read the right
       sector here.
  
     - With GPT, we can have 128 partitions.
  
     - If the bootfs property has ever been set on a pool
       it seems that it never goes away.  zpool won't allow
       you to add to the pool with the bootfs property set.
       However, if you clear the property back to default
       we end up getting 0 for the object number and read
       a bogus block pointer and fail to boot.
  
     - Fix some error printfs. The printf in the loader is
       only capable of c,s and u formats.
  
     - Teach printf how to display %llu

Modified:
  stable/7/sys/boot/i386/zfsboot/zfsboot.c
  stable/7/sys/boot/zfs/zfs.c
  stable/7/sys/boot/zfs/zfsimpl.c
  stable/7/sys/cddl/boot/zfs/zfsimpl.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/boot/i386/zfsboot/zfsboot.c
==============================================================================
--- stable/7/sys/boot/i386/zfsboot/zfsboot.c	Sat Nov 21 15:02:35 2009	(r199634)
+++ stable/7/sys/boot/i386/zfsboot/zfsboot.c	Sat Nov 21 15:04:01 2009	(r199635)
@@ -474,6 +474,7 @@ probe_drive(struct dsk *dsk, spa_t **spa
     slba = hdr.hdr_lba_table;
     elba = slba + hdr.hdr_entries / entries_per_sec;
     while (slba < elba) {
+	dsk->start = 0;
 	if (drvread(dsk, sec, slba, 1))
 	    return;
 	for (part = 0; part < entries_per_sec; part++) {
@@ -494,7 +495,6 @@ probe_drive(struct dsk *dsk, spa_t **spa
 		     */
 		    dsk = copy_dsk(dsk);
 		}
-		break;
 	    }
 	}
 	slba++;
@@ -857,12 +857,13 @@ static void
 printf(const char *fmt,...)
 {
     va_list ap;
-    char buf[10];
+    char buf[20];
     char *s;
-    unsigned u;
+    unsigned long long u;
     int c;
     int minus;
     int prec;
+    int l;
     int len;
     int pad;
 
@@ -871,6 +872,7 @@ printf(const char *fmt,...)
 	if (c == '%') {
 	    minus = 0;
 	    prec = 0;
+	    l = 0;
 	nextfmt:
 	    c = *fmt++;
 	    switch (c) {
@@ -892,6 +894,9 @@ printf(const char *fmt,...)
 	    case 'c':
 		putchar(va_arg(ap, int));
 		continue;
+	    case 'l':
+		l++;
+		goto nextfmt;
 	    case 's':
 		s = va_arg(ap, char *);
 		if (prec) {
@@ -914,7 +919,17 @@ printf(const char *fmt,...)
 		}
 		continue;
 	    case 'u':
-		u = va_arg(ap, unsigned);
+		switch (l) {
+		case 2:
+		    u = va_arg(ap, unsigned long long);
+		    break;
+		case 1:
+		    u = va_arg(ap, unsigned long);
+		    break;
+		default:
+		    u = va_arg(ap, unsigned);
+		    break;
+		}
 		s = buf;
 		do
 		    *s++ = '0' + u % 10U;

Modified: stable/7/sys/boot/zfs/zfs.c
==============================================================================
--- stable/7/sys/boot/zfs/zfs.c	Sat Nov 21 15:02:35 2009	(r199634)
+++ stable/7/sys/boot/zfs/zfs.c	Sat Nov 21 15:04:01 2009	(r199635)
@@ -100,7 +100,7 @@ zfs_open(const char *upath, struct open_
 	f->f_fsdata = (void *)fp;
 
 	if (spa->spa_root_objset.os_type != DMU_OST_ZFS) {
-		printf("Unexpected object set type %lld\n",
+		printf("Unexpected object set type %llu\n",
 		    spa->spa_root_objset.os_type);
 		rc = EIO;
 		goto out;
@@ -413,7 +413,7 @@ zfs_dev_init(void) 
 		if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0))
 			close(fd);
 
-		for (slice = 1; slice <= 4; slice++) {
+		for (slice = 1; slice <= 128; slice++) {
 			sprintf(devname, "disk%dp%d:", unit, slice);
 			fd = open(devname, O_RDONLY);
 			if (fd == -1) {

Modified: stable/7/sys/boot/zfs/zfsimpl.c
==============================================================================
--- stable/7/sys/boot/zfs/zfsimpl.c	Sat Nov 21 15:02:35 2009	(r199634)
+++ stable/7/sys/boot/zfs/zfsimpl.c	Sat Nov 21 15:04:01 2009	(r199635)
@@ -53,6 +53,8 @@ static char *zfs_temp_buf, *zfs_temp_end
 
 #define TEMP_SIZE	(1*SPA_MAXBLOCKSIZE)
 
+static int zio_read(spa_t *spa, const blkptr_t *bp, void *buf);
+
 static void
 zfs_init(void)
 {
@@ -897,6 +899,33 @@ ilog2(int n)
 }
 
 static int
+zio_read_gang(spa_t *spa, const blkptr_t *bp, const dva_t *dva, void *buf)
+{
+	zio_gbh_phys_t zio_gb;
+	vdev_t *vdev;
+	int vdevid;
+	off_t offset;
+	int i;
+
+	vdevid = DVA_GET_VDEV(dva);
+	offset = DVA_GET_OFFSET(dva);
+	STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink)
+		if (vdev->v_id == vdevid)
+			break;
+	if (!vdev || !vdev->v_read)
+		return (EIO);
+	if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE))
+		return (EIO);
+
+	for (i = 0; i < SPA_GBH_NBLKPTRS; i++) {
+		if (zio_read(spa, &zio_gb.zg_blkptr[i], buf))
+			return (EIO);
+	}
+ 
+	return (0);
+}
+
+static int
 zio_read(spa_t *spa, const blkptr_t *bp, void *buf)
 {
 	int cpfunc = BP_GET_COMPRESS(bp);
@@ -920,20 +949,27 @@ zio_read(spa_t *spa, const blkptr_t *bp,
 		if (!dva->dva_word[0] && !dva->dva_word[1])
 			continue;
 
-		vdevid = DVA_GET_VDEV(dva);
-		offset = DVA_GET_OFFSET(dva);
-		STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink)
-			if (vdev->v_id == vdevid)
-				break;
-		if (!vdev || !vdev->v_read)
-			continue;
-		if (vdev->v_read(vdev, bp, pbuf, offset, psize))
-			continue;
+		if (DVA_GET_GANG(dva)) {
+			printf("ZFS: gang block detected!\n");
+			if (zio_read_gang(spa, bp, dva, buf))
+				return (EIO); 
+		} else {
+			vdevid = DVA_GET_VDEV(dva);
+			offset = DVA_GET_OFFSET(dva);
+			STAILQ_FOREACH(vdev, &spa->spa_vdevs, v_childlink)
+				if (vdev->v_id == vdevid)
+					break;
+			if (!vdev || !vdev->v_read) {
+				continue;
+			}
+			if (vdev->v_read(vdev, bp, pbuf, offset, psize))
+				continue;
 
-		if (cpfunc != ZIO_COMPRESS_OFF) {
-			if (zio_decompress_data(cpfunc, pbuf, psize,
-				buf, lsize))
-				return (EIO);
+			if (cpfunc != ZIO_COMPRESS_OFF) {
+				if (zio_decompress_data(cpfunc, pbuf, psize,
+				    buf, lsize))
+					return (EIO);
+			}
 		}
 
 		return (0);
@@ -1331,13 +1367,13 @@ zfs_mount_dataset(spa_t *spa, uint64_t o
 	dsl_dataset_phys_t *ds;
 
 	if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) {
-		printf("ZFS: can't find dataset %lld\n", objnum);
+		printf("ZFS: can't find dataset %llu\n", objnum);
 		return (EIO);
 	}
 
 	ds = (dsl_dataset_phys_t *) &dataset.dn_bonus;
 	if (zio_read(spa, &ds->ds_bp, objset)) {
-		printf("ZFS: can't read object set for dataset %lld\n", objnum);
+		printf("ZFS: can't read object set for dataset %llu\n", objnum);
 		return (EIO);
 	}
 
@@ -1367,7 +1403,8 @@ zfs_mount_root(spa_t *spa, objset_phys_t
 	 */
 	if (zap_lookup(spa, &dir, DMU_POOL_PROPS, &props) == 0
 	     && objset_get_dnode(spa, &spa->spa_mos, props, &propdir) == 0
-	     && zap_lookup(spa, &propdir, "bootfs", &bootfs) == 0)
+	     && zap_lookup(spa, &propdir, "bootfs", &bootfs) == 0
+	     && bootfs != 0)
 		return zfs_mount_dataset(spa, bootfs, objset);
 
 	/*
@@ -1425,7 +1462,7 @@ zfs_lookup(spa_t *spa, const char *upath
 	int symlinks_followed = 0;
 
 	if (spa->spa_root_objset.os_type != DMU_OST_ZFS) {
-		printf("ZFS: unexpected object set type %lld\n",
+		printf("ZFS: unexpected object set type %llu\n",
 		       spa->spa_root_objset.os_type);
 		return (EIO);
 	}

Modified: stable/7/sys/cddl/boot/zfs/zfsimpl.h
==============================================================================
--- stable/7/sys/cddl/boot/zfs/zfsimpl.h	Sat Nov 21 15:02:35 2009	(r199634)
+++ stable/7/sys/cddl/boot/zfs/zfsimpl.h	Sat Nov 21 15:04:01 2009	(r199635)
@@ -374,6 +374,24 @@ typedef struct vdev_label {
 #define	VDEV_LABEL_END_SIZE	(2 * sizeof (vdev_label_t))
 #define	VDEV_LABELS		4
 
+/*
+ * Gang block headers are self-checksumming and contain an array
+ * of block pointers.
+ */
+#define SPA_GANGBLOCKSIZE	SPA_MINBLOCKSIZE
+#define SPA_GBH_NBLKPTRS	((SPA_GANGBLOCKSIZE - \
+	sizeof (zio_block_tail_t)) / sizeof (blkptr_t))
+#define SPA_GBH_FILLER		((SPA_GANGBLOCKSIZE - \
+	sizeof (zio_block_tail_t) - \
+	(SPA_GBH_NBLKPTRS * sizeof (blkptr_t))) /\
+	sizeof (uint64_t))
+
+typedef struct zio_gbh {
+	blkptr_t		zg_blkptr[SPA_GBH_NBLKPTRS];
+	uint64_t		zg_filler[SPA_GBH_FILLER];
+	zio_block_tail_t	zg_tail;
+} zio_gbh_phys_t;
+
 enum zio_checksum {
 	ZIO_CHECKSUM_INHERIT = 0,
 	ZIO_CHECKSUM_ON,

From owner-svn-src-all@FreeBSD.ORG  Sat Nov 21 20:44:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DAA811065670;
	Sat, 21 Nov 2009 20:44:34 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C96DB8FC08;
	Sat, 21 Nov 2009 20:44:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nALKiY0o096986;
	Sat, 21 Nov 2009 20:44:34 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nALKiYhH096983;
	Sat, 21 Nov 2009 20:44:34 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <200911212044.nALKiYhH096983@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 21 Nov 2009 20:44:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199641 - in head: bin/sh
	tools/regression/bin/sh/builtins
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 21 Nov 2009 20:44:35 -0000

Author: jilles
Date: Sat Nov 21 20:44:34 2009
New Revision: 199641
URL: http://svn.freebsd.org/changeset/base/199641

Log:
  trap: do not consider a bad signal name a fatal error.
  POSIX explicitly prescribes this.
  Continue processing any other signals and return status 1.

Added:
  head/tools/regression/bin/sh/builtins/trap3.0   (contents, props changed)
Modified:
  head/bin/sh/trap.c

Modified: head/bin/sh/trap.c
==============================================================================
--- head/bin/sh/trap.c	Sat Nov 21 17:11:51 2009	(r199640)
+++ head/bin/sh/trap.c	Sat Nov 21 20:44:34 2009	(r199641)
@@ -149,6 +149,7 @@ trapcmd(int argc, char **argv)
 {
 	char *action;
 	int signo;
+	int errors = 0;
 
 	if (argc <= 1) {
 		for (signo = 0 ; signo < sys_nsig ; signo++) {
@@ -183,8 +184,10 @@ trapcmd(int argc, char **argv)
 		}
 	}
 	while (*argv) {
-		if ((signo = sigstring_to_signum(*argv)) == -1)
-			error("bad signal %s", *argv);
+		if ((signo = sigstring_to_signum(*argv)) == -1) {
+			out2fmt_flush("trap: bad signal %s\n", *argv);
+			errors = 1;
+		}
 		INTOFF;
 		if (action)
 			action = savestr(action);
@@ -196,7 +199,7 @@ trapcmd(int argc, char **argv)
 		INTON;
 		argv++;
 	}
-	return 0;
+	return errors;
 }
 
 

Added: head/tools/regression/bin/sh/builtins/trap3.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/trap3.0	Sat Nov 21 20:44:34 2009	(r199641)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+{
+	trap '' garbage && exit 3
+	trap - garbage && exit 3
+	trap true garbage && exit 3
+	trap '' 99999 && exit 3
+	trap - 99999 && exit 3
+	trap true 99999 && exit 3
+} 2>/dev/null
+test -n "$(trap true garbage TERM 2>/dev/null || trap)" || exit 3
+exit 0