From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 09:07:30 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81EDC106566B; Sun, 4 Oct 2009 09:07:30 +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 6FA728FC19; Sun, 4 Oct 2009 09:07:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9497Usp068279; Sun, 4 Oct 2009 09:07:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9497UuL068278; Sun, 4 Oct 2009 09:07:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200910040907.n9497UuL068278@svn.freebsd.org> From: Xin LI Date: Sun, 4 Oct 2009 09:07:30 +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: r197738 - in stable/8/sys: . cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 09:07:30 -0000 Author: delphij Date: Sun Oct 4 09:07:29 2009 New Revision: 197738 URL: http://svn.freebsd.org/changeset/base/197738 Log: MFC revision 197683: Return EOPNOTSUPP instead of EINVAL when doing chflags(2) over an old format ZFS, as defined in the manual page. Submitted by: pjd (response of my original patch but bugs are mine) Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Oct 3 17:49:44 2009 (r197737) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Oct 4 09:07:29 2009 (r197738) @@ -4172,8 +4172,12 @@ zfs_freebsd_setattr(ap) zflags = VTOZ(vp)->z_phys->zp_flags; if (vap->va_flags != VNOVAL) { + zfsvfs_t *zfsvfs = VTOZ(vp)->z_zfsvfs; int error; + if (zfsvfs->z_use_fuids == B_FALSE) + return (EOPNOTSUPP); + fflags = vap->va_flags; if ((fflags & ~(SF_IMMUTABLE|SF_APPEND|SF_NOUNLINK|UF_NODUMP)) != 0) return (EOPNOTSUPP); From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 09:57:40 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41411106568F; Sun, 4 Oct 2009 09:57:40 +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 2E75D8FC14; Sun, 4 Oct 2009 09:57: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 n949veGQ069458; Sun, 4 Oct 2009 09:57:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n949veVx069457; Sun, 4 Oct 2009 09:57:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200910040957.n949veVx069457@svn.freebsd.org> From: Xin LI Date: Sun, 4 Oct 2009 09:57: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: r197739 - in stable/8/sys: amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 09:57:40 -0000 Author: delphij Date: Sun Oct 4 09:57:39 2009 New Revision: 197739 URL: http://svn.freebsd.org/changeset/base/197739 Log: This commit adds subdirectory mergeinfo which was intentionally ommitted from previous changeset. Requested by: kib Approved by: re (kib) Modified: 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) From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 12:11:44 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D52421065693; Sun, 4 Oct 2009 12:11:44 +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 C14EC8FC0C; Sun, 4 Oct 2009 12:11: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 n94CBiwj073360; Sun, 4 Oct 2009 12:11:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94CBiNF073358; Sun, 4 Oct 2009 12:11:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910041211.n94CBiNF073358@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Oct 2009 12:11:44 +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: r197742 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 12:11:45 -0000 Author: kib Date: Sun Oct 4 12:11:44 2009 New Revision: 197742 URL: http://svn.freebsd.org/changeset/base/197742 Log: MFC r197660: Fix typo. Approved by: re (bz, kensmith) Modified: 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/kern/kern_sig.c Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Sun Oct 4 10:54:20 2009 (r197741) +++ stable/8/sys/kern/kern_sig.c Sun Oct 4 12:11:44 2009 (r197742) @@ -1888,7 +1888,7 @@ sigtd(struct proc *p, int sig, int prop) /* * Check if current thread can handle the signal without - * switching conetxt to another thread. + * switching context to another thread. */ if (curproc == p && !SIGISMEMBER(curthread->td_sigmask, sig)) return (curthread); From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 12:14:49 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46D61065670; Sun, 4 Oct 2009 12:14:49 +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 A7B758FC23; Sun, 4 Oct 2009 12:14: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 n94CEnjt073468; Sun, 4 Oct 2009 12:14:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94CEnMA073466; Sun, 4 Oct 2009 12:14:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910041214.n94CEnMA073466@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Oct 2009 12:14: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: r197743 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 12:14:49 -0000 Author: kib Date: Sun Oct 4 12:14:49 2009 New Revision: 197743 URL: http://svn.freebsd.org/changeset/base/197743 Log: MFC r197661: Move the annotation for vm_map_startup() immediately before the function. Approved by: re (bz, kensmith) Modified: 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/vm/vm_map.c Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Sun Oct 4 12:11:44 2009 (r197742) +++ stable/8/sys/vm/vm_map.c Sun Oct 4 12:14:49 2009 (r197743) @@ -116,22 +116,6 @@ __FBSDID("$FreeBSD$"); * another, and then marking both regions as copy-on-write. */ -/* - * vm_map_startup: - * - * Initialize the vm_map module. Must be called before - * any other vm_map routines. - * - * Map and entry structures are allocated from the general - * purpose memory pool with some exceptions: - * - * - The kernel map and kmem submap are allocated statically. - * - Kernel map entries are allocated out of a static pool. - * - * These restrictions are necessary since malloc() uses the - * maps and requires map entries. - */ - static struct mtx map_sleep_mtx; static uma_zone_t mapentzone; static uma_zone_t kmapentzone; @@ -176,6 +160,22 @@ static void vmspace_zdtor(void *mem, int start = end; \ } +/* + * vm_map_startup: + * + * Initialize the vm_map module. Must be called before + * any other vm_map routines. + * + * Map and entry structures are allocated from the general + * purpose memory pool with some exceptions: + * + * - The kernel map and kmem submap are allocated statically. + * - Kernel map entries are allocated out of a static pool. + * + * These restrictions are necessary since malloc() uses the + * maps and requires map entries. + */ + void vm_map_startup(void) { From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 12:21:00 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D6931065670; Sun, 4 Oct 2009 12:21:00 +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 0EDDE8FC1A; Sun, 4 Oct 2009 12:21: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 n94CKxe2073642; Sun, 4 Oct 2009 12:20:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94CKxTH073639; Sun, 4 Oct 2009 12:20:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910041220.n94CKxTH073639@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Oct 2009 12:20: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: r197744 - in stable/8/sys: . amd64/amd64 amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 12:21:00 -0000 Author: kib Date: Sun Oct 4 12:20:59 2009 New Revision: 197744 URL: http://svn.freebsd.org/changeset/base/197744 Log: MFC r197663: As a workaround, for Intel CPUs, do not use CLFLUSH in pmap_invalidate_cache_range() when self-snoop is apparently not reported in cpu features. Approved by: re (bz, kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/amd64/initcpu.c 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/i386/i386/initcpu.c Modified: stable/8/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/initcpu.c Sun Oct 4 12:14:49 2009 (r197743) +++ stable/8/sys/amd64/amd64/initcpu.c Sun Oct 4 12:20:59 2009 (r197744) @@ -165,4 +165,10 @@ initializecpu(void) */ if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; + /* + * XXXKIB: (temporary) hack to work around traps generated when + * CLFLUSHing APIC registers window. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS)) + cpu_feature &= ~CPUID_CLFSH; } Modified: stable/8/sys/i386/i386/initcpu.c ============================================================================== --- stable/8/sys/i386/i386/initcpu.c Sun Oct 4 12:14:49 2009 (r197743) +++ stable/8/sys/i386/i386/initcpu.c Sun Oct 4 12:20:59 2009 (r197744) @@ -717,6 +717,12 @@ initializecpu(void) */ if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; + /* + * XXXKIB: (temporary) hack to work around traps generated when + * CLFLUSHing APIC registers window. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS)) + cpu_feature &= ~CPUID_CLFSH; #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE) /* From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 19:03:33 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25A2F1065694; Sun, 4 Oct 2009 19:03:33 +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 1297C8FC0C; Sun, 4 Oct 2009 19:03: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 n94J3WZ2082687; Sun, 4 Oct 2009 19:03:32 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94J3Wq8082685; Sun, 4 Oct 2009 19:03:32 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910041903.n94J3Wq8082685@svn.freebsd.org> From: Andrew Thompson Date: Sun, 4 Oct 2009 19:03:32 +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: r197751 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/usb/controller dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 19:03:33 -0000 Author: thompsa Date: Sun Oct 4 19:03:32 2009 New Revision: 197751 URL: http://svn.freebsd.org/changeset/base/197751 Log: MFC r197682 EHCI Hardware BUG workaround The EHCI HW can use the qtd_next field instead of qtd_altnext when a short packet is received. This contradicts what is stated in the EHCI datasheet. Also the total-bytes field in the status field of the following TD gets corrupted upon reception of a short packet! We work this around in software by not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been seen on multiple INTEL based EHCI chips. Other vendors have not been tested yet. - Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not applications using LibUSB v0.1, v1.2 and v2.0. - Mass Storage (umass) is affected. Approved by: re (kib) Modified: 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/usb/controller/ehci.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Sun Oct 4 18:53:10 2009 (r197750) +++ stable/8/sys/dev/usb/controller/ehci.c Sun Oct 4 19:03:32 2009 (r197751) @@ -131,6 +131,7 @@ struct ehci_std_temp { uint8_t auto_data_toggle; uint8_t setup_alt_next; uint8_t last_frame; + uint8_t can_use_next; }; void @@ -1207,11 +1208,6 @@ ehci_non_isoc_done_sub(struct usb_xfer * xfer->td_transfer_cache = td; - /* update data toggle */ - - xfer->endpoint->toggle_next = - (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0; - #if USB_DEBUG if (status & EHCI_QTD_STATERRS) { DPRINTFN(11, "error, addr=%d, endpt=0x%02x, frame=0x%02x" @@ -1235,6 +1231,9 @@ ehci_non_isoc_done_sub(struct usb_xfer * static void ehci_non_isoc_done(struct usb_xfer *xfer) { + ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); + ehci_qh_t *qh; + uint32_t status; usb_error_t err = 0; DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", @@ -1248,6 +1247,17 @@ ehci_non_isoc_done(struct usb_xfer *xfer } #endif + /* extract data toggle directly from the QH's overlay area */ + + qh = xfer->qh_start[xfer->flags_int.curr_dma_set]; + + usb_pc_cpu_invalidate(qh->page_cache); + + status = hc32toh(sc, qh->qh_qtd.qtd_status); + + xfer->endpoint->toggle_next = + (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0; + /* reset scanner */ xfer->td_transfer_cache = xfer->td_transfer_first; @@ -1348,6 +1358,7 @@ ehci_check_transfer(struct usb_xfer *xfe } } else { ehci_qtd_t *td; + ehci_qh_t *qh; /* non-isochronous transfer */ @@ -1357,16 +1368,35 @@ ehci_check_transfer(struct usb_xfer *xfe */ td = xfer->td_transfer_cache; + qh = xfer->qh_start[xfer->flags_int.curr_dma_set]; + + usb_pc_cpu_invalidate(qh->page_cache); + + status = hc32toh(sc, qh->qh_qtd.qtd_status); + if (status & EHCI_QTD_ACTIVE) { + /* transfer is pending */ + goto done; + } + while (1) { usb_pc_cpu_invalidate(td->page_cache); status = hc32toh(sc, td->qtd_status); /* - * if there is an active TD the transfer isn't done + * Check if there is an active TD which + * indicates that the transfer isn't done. */ if (status & EHCI_QTD_ACTIVE) { /* update cache */ - xfer->td_transfer_cache = td; + if (xfer->td_transfer_cache != td) { + xfer->td_transfer_cache = td; + if (qh->qh_qtd.qtd_next & + htohc32(sc, EHCI_LINK_TERMINATE)) { + /* XXX - manually advance to next frame */ + qh->qh_qtd.qtd_next = td->qtd_self; + usb_pc_cpu_flush(td->page_cache); + } + } goto done; } /* @@ -1545,7 +1575,6 @@ ehci_setup_standard_chain_sub(struct ehc ehci_qtd_t *td; ehci_qtd_t *td_next; ehci_qtd_t *td_alt_next; - uint32_t qtd_altnext; uint32_t buf_offset; uint32_t average; uint32_t len_old; @@ -1554,7 +1583,6 @@ ehci_setup_standard_chain_sub(struct ehc uint8_t precompute; terminate = htohc32(temp->sc, EHCI_LINK_TERMINATE); - qtd_altnext = terminate; td_alt_next = NULL; buf_offset = 0; shortpkt_old = temp->shortpkt; @@ -1612,7 +1640,8 @@ restart: td->qtd_status = temp->qtd_status | - htohc32(temp->sc, EHCI_QTD_SET_BYTES(average)); + htohc32(temp->sc, EHCI_QTD_IOC | + EHCI_QTD_SET_BYTES(average)); if (average == 0) { @@ -1687,11 +1716,23 @@ restart: td->qtd_buffer_hi[x] = 0; } - if (td_next) { - /* link the current TD with the next one */ - td->qtd_next = td_next->qtd_self; + if (temp->can_use_next) { + if (td_next) { + /* link the current TD with the next one */ + td->qtd_next = td_next->qtd_self; + } + } else { + /* + * BUG WARNING: The EHCI HW can use the + * qtd_next field instead of qtd_altnext when + * a short packet is received! We work this + * around in software by not queueing more + * than one job/TD at a time! + */ + td->qtd_next = terminate; } - td->qtd_altnext = qtd_altnext; + + td->qtd_altnext = terminate; td->alt_next = td_alt_next; usb_pc_cpu_flush(td->page_cache); @@ -1703,15 +1744,9 @@ restart: /* setup alt next pointer, if any */ if (temp->last_frame) { td_alt_next = NULL; - qtd_altnext = terminate; } else { /* we use this field internally */ td_alt_next = td_next; - if (temp->setup_alt_next) { - qtd_altnext = td_next->qtd_self; - } else { - qtd_altnext = terminate; - } } /* restore */ @@ -1756,6 +1791,8 @@ ehci_setup_standard_chain(struct usb_xfe temp.qtd_status = 0; temp.last_frame = 0; temp.setup_alt_next = xfer->flags_int.short_frames_ok; + temp.can_use_next = (xfer->flags_int.control_xfr || + (UE_GET_DIR(xfer->endpointno) == UE_DIR_OUT)); if (xfer->flags_int.control_xfr) { if (xfer->endpoint->toggle_next) { @@ -1889,7 +1926,6 @@ ehci_setup_standard_chain(struct usb_xfe /* the last TD terminates the transfer: */ td->qtd_next = htohc32(temp.sc, EHCI_LINK_TERMINATE); td->qtd_altnext = htohc32(temp.sc, EHCI_LINK_TERMINATE); - td->qtd_status |= htohc32(temp.sc, EHCI_QTD_IOC); usb_pc_cpu_flush(td->page_cache); From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 4 21:46:44 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69AF41065672; Sun, 4 Oct 2009 21:46:44 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57EA58FC17; Sun, 4 Oct 2009 21:46: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 n94LkiHo086319; Sun, 4 Oct 2009 21:46:44 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94LkiAH086317; Sun, 4 Oct 2009 21:46:44 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200910042146.n94LkiAH086317@svn.freebsd.org> From: Joe Marcus Clarke Date: Sun, 4 Oct 2009 21:46:44 +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: r197758 - stable/8/lib/libc/gen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 21:46:44 -0000 Author: marcus (doc,ports committer) Date: Sun Oct 4 21:46:43 2009 New Revision: 197758 URL: http://svn.freebsd.org/changeset/base/197758 Log: MFC: rev. 197681 Correct the pthread stub prototype for pthread_mutexattr_settype to allow for the type argument. This is known to fix some pthread_mutexattr_settype() invocations, especially when it comes to pulseaudio. Approved by: re (kib) Modified: stable/8/lib/libc/gen/_pthread_stubs.c Modified: stable/8/lib/libc/gen/_pthread_stubs.c ============================================================================== --- stable/8/lib/libc/gen/_pthread_stubs.c Sun Oct 4 21:22:19 2009 (r197757) +++ stable/8/lib/libc/gen/_pthread_stubs.c Sun Oct 4 21:46:43 2009 (r197758) @@ -222,7 +222,7 @@ STUB_FUNC1(pthread_mutex_trylock, PJT_MU STUB_FUNC1(pthread_mutex_unlock, PJT_MUTEX_UNLOCK, int, void *) STUB_FUNC1(pthread_mutexattr_destroy, PJT_MUTEXATTR_DESTROY, int, void *) STUB_FUNC1(pthread_mutexattr_init, PJT_MUTEXATTR_INIT, int, void *) -STUB_FUNC1(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *) +STUB_FUNC2(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *, int) STUB_FUNC2(pthread_once, PJT_ONCE, int, void *, void *) STUB_FUNC1(pthread_rwlock_destroy, PJT_RWLOCK_DESTROY, int, void *) STUB_FUNC2(pthread_rwlock_init, PJT_RWLOCK_INIT, int, void *, void *) From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 5 12:01:43 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5466A1065697; Mon, 5 Oct 2009 12:01:43 +0000 (UTC) (envelope-from michio.jinbo@gmail.com) Received: from mail-px0-f192.google.com (mail-px0-f192.google.com [209.85.216.192]) by mx1.freebsd.org (Postfix) with ESMTP id 157CD8FC18; Mon, 5 Oct 2009 12:01:42 +0000 (UTC) Received: by pxi30 with SMTP id 30so270231pxi.7 for ; Mon, 05 Oct 2009 05:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:cc :in-reply-to:references:message-id:mime-version:content-type :content-transfer-encoding:x-mailer; bh=61EaWSTH8BcxFKJ8T3sO4fC2OMYKqHj05IJ+BvEbavc=; b=eKKM8kh2wsvSTnP68CjPSXP6JGzJ6D/+GXDqHDGUi1DvdDPtHMSQ8SdLUQQBl2yEnC Gl5RB/EIPdRPbX8wv9Ei/deDVgVcenPG0tQjrprBqxqsBT2BmfHmuSy9qQGm+TgZvCiy K3CrMqF+lmqAxeUshEc1uw1rRugIVD3/a/SLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:cc:in-reply-to:references:message-id :mime-version:content-type:content-transfer-encoding:x-mailer; b=TDXYVFLZ0RvOWXVEa6B8TMM2p6bYI3wy+GCYinO0Os3IaPbae/KcFyKPPo1d7dxeID QRyYAIduVKD9FpV4k6+yA98M/fUDjXlWnWOYp6l/xESOltY1AKjjnxNpx289Ii/TT8uq pAe+c7Iz8i5uKRSA/IXpGGtO6NXy1xo2Q5MGs= Received: by 10.115.85.6 with SMTP id n6mr8890167wal.74.1254742763257; Mon, 05 Oct 2009 04:39:23 -0700 (PDT) Received: from ?192.168.4.100? (router.jinbo.jp [210.229.61.161]) by mx.google.com with ESMTPS id 22sm712946pzk.6.2009.10.05.04.39.21 (version=SSLv3 cipher=RC4-MD5); Mon, 05 Oct 2009 04:39:22 -0700 (PDT) Date: Mon, 05 Oct 2009 20:39:23 +0900 From: "Michio \"Karl\" Jinbo" To: Konstantin Belousov In-Reply-To: <200910041220.n94CKxTH073639@svn.freebsd.org> References: <200910041220.n94CKxTH073639@svn.freebsd.org> Message-Id: <20091005203920.1278.22FF24F1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.51.07 [ja] Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, freebsd-current@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r197744 - in stable/8/sys: . amd64/amd64 amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 12:01:43 -0000 On Sun, 4 Oct 2009 12:20:59 +0000 (UTC) Konstantin Belousov wrote: > Log: > MFC r197663: > As a workaround, for Intel CPUs, do not use CLFLUSH in > pmap_invalidate_cache_range() when self-snoop is apparently not reported > in cpu features. > > Approved by: re (bz, kensmith) I was tested r197663/r197744, but kernel panic again on Citrix Xen Server. using 8.0-RC1 install cd, results are 1. INTEL SU9400+HYPER-V(Windows2008 R2) -> boot OK. 2. AMD Athlon X2 TK-55+HYPER-V(Windows2008 R2) -> boot NG. 3. AMD PhenomII 940BK+Citrix Xen Server -> boot NG. I think INTEL CPUs are no problem, but AMD CPUs appear the problem. So I tested the following patch, kernel boot was successed on recent 9-CURRENT and environment 3. sorry, poor English. --- sys/i386/i386/initcpu.c.original 2009-10-01 21:52:48.000000000 +0900 +++ sys/i386/i386/initcpu.c 2009-10-05 08:29:45.000000000 +0900 @@ -721,7 +721,7 @@ * XXXKIB: (temporary) hack to work around traps generated when * CLFLUSHing APIC registers window. */ - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS)) + if (cpu_vendor_id == CPU_VENDOR_AMD && !(cpu_feature & CPUID_SS)) cpu_feature &= ~CPUID_CLFSH; #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE) -- Michio "Karl" Jinbo From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 5 14:03:26 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4BD31065693; Mon, 5 Oct 2009 14:03:26 +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 B80208FC0C; Mon, 5 Oct 2009 14:03: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 n95E3Qcx014414; Mon, 5 Oct 2009 14:03:26 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n95E3QSJ014412; Mon, 5 Oct 2009 14:03:26 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200910051403.n95E3QSJ014412@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 5 Oct 2009 14:03: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: r197771 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris conf contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 14:03:27 -0000 Author: nyan Date: Mon Oct 5 14:03:26 2009 New Revision: 197771 URL: http://svn.freebsd.org/changeset/base/197771 Log: MFC: revision 197709 Fix build nfscl and/or nfsd. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/files 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/conf/files ============================================================================== --- stable/8/sys/conf/files Mon Oct 5 10:08:58 2009 (r197770) +++ stable/8/sys/conf/files Mon Oct 5 14:03:26 2009 (r197771) @@ -2660,12 +2660,12 @@ vm/vm_reserv.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard -xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver -xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver -xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver -xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver -xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver -xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver +xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd # gnu/fs/xfs/xfs_alloc.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 5 14:28:24 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 420BE1065670; Mon, 5 Oct 2009 14:28:24 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13A788FC0C; Mon, 5 Oct 2009 14:28: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 n95ESNH0015044; Mon, 5 Oct 2009 14:28:23 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n95ESNhM015041; Mon, 5 Oct 2009 14:28:23 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200910051428.n95ESNhM015041@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 5 Oct 2009 14:28:23 +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: r197773 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/mxge dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 14:28:24 -0000 Author: gallatin Date: Mon Oct 5 14:28:23 2009 New Revision: 197773 URL: http://svn.freebsd.org/changeset/base/197773 Log: MFC:197645 Two more mxge watchdog fixes 1) Restore the PCI Express control register after a watchdog reset. This is required because the device will come out of watchdog reset with the pectl reg at its default state, and important BIOS configuration (like max payload size) could be lost. 2) Call mxge_start_locked() for every tx queue before dropping the lock in the watchdog handler. This is required, as the queue's buf ring may have filled during the reset. Approved by: re (kib) Modified: 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/mxge/if_mxge.c stable/8/sys/dev/mxge/if_mxge_var.h stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Mon Oct 5 14:13:16 2009 (r197772) +++ stable/8/sys/dev/mxge/if_mxge.c Mon Oct 5 14:28:23 2009 (r197773) @@ -3653,10 +3653,16 @@ mxge_setup_cfg_space(mxge_softc_t *sc) if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { lnk = pci_read_config(dev, reg + 0x12, 2); sc->link_width = (lnk >> 4) & 0x3f; - - pectl = pci_read_config(dev, reg + 0x8, 2); - pectl = (pectl & ~0x7000) | (5 << 12); - pci_write_config(dev, reg + 0x8, pectl, 2); + + if (sc->pectl == 0) { + pectl = pci_read_config(dev, reg + 0x8, 2); + pectl = (pectl & ~0x7000) | (5 << 12); + pci_write_config(dev, reg + 0x8, pectl, 2); + sc->pectl = pectl; + } else { + /* restore saved pectl after watchdog reset */ + pci_write_config(dev, reg + 0x8, sc->pectl, 2); + } } /* Enable DMA and Memory space access */ @@ -3768,6 +3774,9 @@ mxge_watchdog_reset(mxge_softc_t *sc, in /* release all TX locks */ for (s = 0; s < num_tx_slices; s++) { ss = &sc->ss[s]; +#ifdef IFNET_BUF_RING + mxge_start_locked(ss); +#endif mtx_unlock(&ss->tx.mtx); } } Modified: stable/8/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/8/sys/dev/mxge/if_mxge_var.h Mon Oct 5 14:13:16 2009 (r197772) +++ stable/8/sys/dev/mxge/if_mxge_var.h Mon Oct 5 14:28:23 2009 (r197773) @@ -273,6 +273,7 @@ struct mxge_softc { struct sysctl_ctx_list slice_sysctl_ctx; char *mac_addr_string; uint8_t mac_addr[6]; /* eeprom mac address */ + uint16_t pectl; /* save PCIe CTL state */ char product_code_string[64]; char serial_number_string[64]; char cmd_mtx_name[16]; From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 5 19:29:25 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF8201065679; Mon, 5 Oct 2009 19:29:25 +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 CB4548FC08; Mon, 5 Oct 2009 19:29: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 n95JTPI7022872; Mon, 5 Oct 2009 19:29:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n95JTPDg022869; Mon, 5 Oct 2009 19:29:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200910051929.n95JTPDg022869@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 5 Oct 2009 19:29:25 +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: r197787 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/de dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 19:29:26 -0000 Author: yongari Date: Mon Oct 5 19:29:25 2009 New Revision: 197787 URL: http://svn.freebsd.org/changeset/base/197787 Log: MFC r197461: Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply alignment fixup code for received frames on strict alignment architectures. MFC r197463: Consistently use bus_addr_t. MFC r197464: Destroy dmamap in dma cleanup. MFC r197465: Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE. Also align setup descriptor on 32 bytes boundary. Tx buffer have no alignment limitation so create dmamap without alignment restriction[1]. Rx buffer still seems to require 4 bytes alignment limitation but we can simply use MCLBYTES for size to map the buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated with m_getcl(9). de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers, increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES. While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore. This should fix de(4) breakage introduced after r176206. Submitted by: jhb [1] Reported by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp > Tested by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >, Takahashi Yoshihiro < nyan <> jp dot freebsd dot org > Approved by: re (kib) Modified: 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/de/if_de.c stable/8/sys/dev/de/if_devar.h stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/de/if_de.c ============================================================================== --- stable/8/sys/dev/de/if_de.c Mon Oct 5 18:56:18 2009 (r197786) +++ stable/8/sys/dev/de/if_de.c Mon Oct 5 19:29:25 2009 (r197787) @@ -160,7 +160,7 @@ static void tulip_dma_map_rxbuf(void *, static void tulip_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) { - u_int32_t *paddr; + bus_addr_t *paddr; if (error) return; @@ -182,7 +182,7 @@ tulip_dma_map_rxbuf(void *arg, bus_dma_s KASSERT(nseg == 1, ("too many DMA segments")); KASSERT(segs[0].ds_len >= TULIP_RX_BUFLEN, ("receive buffer too small")); - desc->d_addr1 = segs[0].ds_addr; + desc->d_addr1 = segs[0].ds_addr & 0xffffffff; desc->d_length1 = TULIP_RX_BUFLEN; #ifdef not_needed /* These should already always be zero. */ @@ -3171,8 +3171,8 @@ tulip_reset(tulip_softc_t * const sc) sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } - TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr); - TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr); + TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr & 0xffffffff); + TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr & 0xffffffff); TULIP_CSR_WRITE(sc, csr_busmode, (1 << (3 /*pci_max_burst_len*/ + 8)) |TULIP_BUSMODE_CACHE_ALIGN8 @@ -3488,7 +3488,7 @@ tulip_rx_intr(tulip_softc_t * const sc) struct mbuf *m0; KASSERT(ms != NULL, ("no packet to accept")); -#if defined(TULIP_COPY_RXDATA) +#ifndef __NO_STRICT_ALIGNMENT /* * Copy the data into a new mbuf that is properly aligned. If * we fail to allocate a new mbuf, then drop the packet. We will @@ -3527,7 +3527,7 @@ tulip_rx_intr(tulip_softc_t * const sc) */ ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); -#if defined(TULIP_COPY_RXDATA) +#ifndef __NO_STRICT_ALIGNMENT skip_input: #endif if (ms == NULL) { @@ -4016,9 +4016,9 @@ tulip_txput(tulip_softc_t * const sc, st eop = nextout; eop->di_desc->d_flag &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN; eop->di_desc->d_status = d_status; - eop->di_desc->d_addr1 = segs[segcnt].ds_addr; + eop->di_desc->d_addr1 = segs[segcnt].ds_addr & 0xffffffff; eop->di_desc->d_length1 = segs[segcnt].ds_len; - eop->di_desc->d_addr2 = segs[segcnt+1].ds_addr; + eop->di_desc->d_addr2 = segs[segcnt+1].ds_addr & 0xffffffff; eop->di_desc->d_length2 = segs[segcnt+1].ds_len; d_status = TULIP_DSTS_OWNER; if (++nextout == ri->ri_last) @@ -4028,7 +4028,7 @@ tulip_txput(tulip_softc_t * const sc, st eop = nextout; eop->di_desc->d_flag &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN; eop->di_desc->d_status = d_status; - eop->di_desc->d_addr1 = segs[segcnt].ds_addr; + eop->di_desc->d_addr1 = segs[segcnt].ds_addr & 0xffffffff; eop->di_desc->d_length1 = segs[segcnt].ds_len; eop->di_desc->d_addr2 = 0; eop->di_desc->d_length2 = 0; @@ -4194,7 +4194,7 @@ tulip_txput_setup(tulip_softc_t * const nextout->d_length2 = 0; nextout->d_addr2 = 0; nextout->d_length1 = sizeof(sc->tulip_setupdata); - nextout->d_addr1 = sc->tulip_setup_dma_addr; + nextout->d_addr1 = sc->tulip_setup_dma_addr & 0xffffffff; bus_dmamap_sync(sc->tulip_setup_tag, sc->tulip_setup_map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); TULIP_TXDESC_PRESYNC(ri); @@ -4491,7 +4491,7 @@ tulip_busdma_freering(tulip_ringinfo_t * /* Allocate memory for a single descriptor ring. */ static int tulip_busdma_allocring(device_t dev, tulip_softc_t * const sc, size_t count, - bus_size_t maxsize, int nsegs, tulip_ringinfo_t *ri, const char *name) + bus_size_t align, int nsegs, tulip_ringinfo_t *ri, const char *name) { size_t size; int error, i; @@ -4499,7 +4499,7 @@ tulip_busdma_allocring(device_t dev, tul /* First, setup a tag. */ ri->ri_max = count; size = count * sizeof(tulip_desc_t); - error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &ri->ri_ring_tag); if (error) { @@ -4527,9 +4527,9 @@ tulip_busdma_allocring(device_t dev, tul } /* Allocate a tag for the data buffers. */ - error = bus_dma_tag_create(NULL, 4, 0, + error = bus_dma_tag_create(NULL, align, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - maxsize, nsegs, TULIP_DATA_PER_DESC, 0, NULL, NULL, &ri->ri_data_tag); + MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag); if (error) { device_printf(dev, "failed to allocate %s buffer dma tag\n", name); return (error); @@ -4563,6 +4563,7 @@ tulip_busdma_cleanup(tulip_softc_t * con if (sc->tulip_setupbuf != NULL) { bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupbuf, sc->tulip_setup_map); + bus_dmamap_destroy(sc->tulip_setup_tag, sc->tulip_setup_map); sc->tulip_setup_map = NULL; sc->tulip_setupbuf = NULL; } @@ -4586,8 +4587,8 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate space and dmamap for transmit ring. */ - error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, TULIP_DATA_PER_DESC, - TULIP_MAX_TXSEG, &sc->tulip_txinfo, "transmit"); + error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, 1, TULIP_MAX_TXSEG, + &sc->tulip_txinfo, "transmit"); if (error) return (error); @@ -4598,7 +4599,7 @@ tulip_busdma_init(device_t dev, tulip_so * a waste in practice though as an ethernet frame can easily fit * in TULIP_RX_BUFLEN bytes. */ - error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, MCLBYTES, 1, + error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, 4, 1, &sc->tulip_rxinfo, "receive"); if (error) return (error); @@ -4606,7 +4607,7 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate a DMA tag, memory, and map for setup descriptor */ - error = bus_dma_tag_create(NULL, 4, 0, + error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0, NULL, NULL, &sc->tulip_setup_tag); Modified: stable/8/sys/dev/de/if_devar.h ============================================================================== --- stable/8/sys/dev/de/if_devar.h Mon Oct 5 18:56:18 2009 (r197786) +++ stable/8/sys/dev/de/if_devar.h Mon Oct 5 19:29:25 2009 (r197787) @@ -104,7 +104,7 @@ typedef struct { tulip_descinfo_t *ri_descinfo; bus_dma_tag_t ri_ring_tag; bus_dmamap_t ri_ring_map; - uint32_t ri_dma_addr; + bus_addr_t ri_dma_addr; bus_dma_tag_t ri_data_tag; bus_dmamap_t *ri_data_maps; } tulip_ringinfo_t; @@ -134,11 +134,7 @@ typedef struct { * architecture which can't handle unaligned accesses) because with * 100Mb/s cards the copying is just too much of a hit. */ -#if !defined(__i386__) -#define TULIP_COPY_RXDATA 1 -#endif -#define TULIP_DATA_PER_DESC 2032 #define TULIP_TXTIMER 4 #define TULIP_RXDESCS 48 #define TULIP_TXDESCS 128 @@ -560,7 +556,7 @@ struct tulip_softc { */ bus_dma_tag_t tulip_setup_tag; bus_dmamap_t tulip_setup_map; - uint32_t tulip_setup_dma_addr; + bus_addr_t tulip_setup_dma_addr; u_int32_t *tulip_setupbuf; u_int32_t tulip_setupdata[192 / sizeof(u_int32_t)]; char tulip_boardid[24]; From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 5 20:38:37 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59CF1106568D; Mon, 5 Oct 2009 20:38:37 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F09F8FC1A; Mon, 5 Oct 2009 20:38: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 n95KcbsS024888; Mon, 5 Oct 2009 20:38:37 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n95KcbM9024887; Mon, 5 Oct 2009 20:38:37 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200910052038.n95KcbM9024887@svn.freebsd.org> From: Joe Marcus Clarke Date: Mon, 5 Oct 2009 20:38:37 +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: r197792 - stable/8/lib/libc/gen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 20:38:37 -0000 Author: marcus (doc,ports committer) Date: Mon Oct 5 20:38:36 2009 New Revision: 197792 URL: http://svn.freebsd.org/changeset/base/197792 Log: Add merginfo for the _pthread_stubs.c commit which merged r197681 to stable/8. Requested by: kib Approved by: re (kib) Modified: stable/8/lib/libc/gen/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 16:05:07 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35EA9106568F; Tue, 6 Oct 2009 16:05:07 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 091518FC0C; Tue, 6 Oct 2009 16:05: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 n96G56bT051646; Tue, 6 Oct 2009 16:05:06 GMT (envelope-from cokane@svn.freebsd.org) Received: (from cokane@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96G56kA051644; Tue, 6 Oct 2009 16:05:06 GMT (envelope-from cokane@svn.freebsd.org) Message-Id: <200910061605.n96G56kA051644@svn.freebsd.org> From: Coleman Kane Date: Tue, 6 Oct 2009 16:05: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: r197806 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/if_ndis dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 16:05:07 -0000 Author: cokane Date: Tue Oct 6 16:05:06 2009 New Revision: 197806 URL: http://svn.freebsd.org/changeset/base/197806 Log: MFC: r197403, r197644, r197654, and r197659 Fix some unexpected potential NULL de-references in kernel mode due to usage of pre-8.0 wifi operations with the ndis driver wrapping a Win32/64 wifi driver. Submitted by: Paul B Mahol Approved by: re Modified: 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/if_ndis/if_ndis.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/8/sys/dev/if_ndis/if_ndis.c Tue Oct 6 15:44:08 2009 (r197805) +++ stable/8/sys/dev/if_ndis/if_ndis.c Tue Oct 6 16:05:06 2009 (r197806) @@ -1012,7 +1012,12 @@ static void ndis_vap_delete(struct ieee80211vap *vap) { struct ndis_vap *nvp = NDIS_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct ndis_softc *sc = ifp->if_softc; + ndis_stop(sc); + callout_drain(&sc->ndis_scan_callout); ieee80211_vap_detach(vap); free(nvp, M_80211_VAP); } @@ -1529,7 +1534,7 @@ ndis_inputtask(dobj, arg) if (m == NULL) break; KeReleaseSpinLock(&sc->ndis_rxlock, irql); - if (sc->ndis_80211) + if ((sc->ndis_80211 != 0) && (vap != NULL)) vap->iv_deliver_data(vap, vap->iv_bss, m); else (*ifp->if_input)(ifp, m); @@ -1741,7 +1746,7 @@ ndis_ticktask(d, xsc) sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) { sc->ndis_link = 1; NDIS_UNLOCK(sc); - if (sc->ndis_80211) { + if ((sc->ndis_80211 != 0) && (vap != NULL)) { ndis_getstate_80211(sc); ieee80211_new_state(vap, IEEE80211_S_RUN, -1); } @@ -1753,7 +1758,7 @@ ndis_ticktask(d, xsc) sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) { sc->ndis_link = 0; NDIS_UNLOCK(sc); - if (sc->ndis_80211) + if ((sc->ndis_80211 != 0) && (vap != NULL)) ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); NDIS_LOCK(sc); if_link_state_change(sc->ifp, LINK_STATE_DOWN); @@ -2042,9 +2047,6 @@ ndis_init(xsc) /* Setup task offload. */ ndis_set_offload(sc); - if (sc->ndis_80211) - ndis_setstate_80211(sc); - NDIS_LOCK(sc); sc->ndis_txidx = 0; @@ -2292,8 +2294,6 @@ ndis_setstate_80211(sc) ifp = sc->ifp; ic = ifp->if_l2com; vap = TAILQ_FIRST(&ic->ic_vaps); - if (vap == NULL) - return; if (!NDIS_INITIALIZED(sc)) { DPRINTF(("%s: NDIS not initialized\n", __func__)); @@ -2725,8 +2725,6 @@ ndis_getstate_80211(sc) ifp = sc->ifp; ic = ifp->if_l2com; vap = TAILQ_FIRST(&ic->ic_vaps); - if (vap == NULL) - return; ni = vap->iv_bss; if (!NDIS_INITIALIZED(sc)) From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 17:10:38 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6995910656A5; Tue, 6 Oct 2009 17:10:38 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5821A8FC1B; Tue, 6 Oct 2009 17:10: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 n96HAcu0053054; Tue, 6 Oct 2009 17:10:38 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96HAcrw053053; Tue, 6 Oct 2009 17:10:38 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200910061710.n96HAcrw053053@svn.freebsd.org> From: Joe Marcus Clarke Date: Tue, 6 Oct 2009 17:10:38 +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: r197807 - in stable/8/lib/libc: . stdio stdtime string X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 17:10:38 -0000 Author: marcus (doc,ports committer) Date: Tue Oct 6 17:10:38 2009 New Revision: 197807 URL: http://svn.freebsd.org/changeset/base/197807 Log: Properly record merginfo for r197681 into lib/libc instead of lib/libc/gen. Kib didn't see the previous commit before I committed it. I had assumed implicit approval when he requested the merginfo. So pointhats to me all around. This commit was reviewed by kib. Approved by: re (kib) Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 18:47:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0285C106566B; Tue, 6 Oct 2009 18:47:03 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E32AC8FC18; Tue, 6 Oct 2009 18:47: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 n96Il2Ll060979; Tue, 6 Oct 2009 18:47:02 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96Il2Dm060975; Tue, 6 Oct 2009 18:47:02 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200910061847.n96Il2Dm060975@svn.freebsd.org> From: Qing Li Date: Tue, 6 Oct 2009 18:47: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: r197810 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 18:47:03 -0000 Author: qingli Date: Tue Oct 6 18:47:02 2009 New Revision: 197810 URL: http://svn.freebsd.org/changeset/base/197810 Log: MFC r197687 The flow-table associates TCP/UDP flows and IP destinations with specific routes. When the routing table changes, for example, when a new route with a more specific prefix is inserted into the routing table, the flow-table is not updated to reflect that change. As such existing connections cannot take advantage of the new path. In some cases the path is broken. This patch will update the affected flow-table entries when a more specific route is added. The route entry is properly marked when a route is deleted from the table. In this case, when the flow-table performs a search, the stale entry is updated automatically. Therefore this patch is not necessary for route deletion. Reviewed by: bz, kmacy Approved by: re Modified: 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/flowtable.c stable/8/sys/net/flowtable.h stable/8/sys/net/route.c Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Tue Oct 6 17:33:00 2009 (r197809) +++ stable/8/sys/net/flowtable.c Tue Oct 6 18:47:02 2009 (r197810) @@ -830,7 +830,7 @@ fle_free(struct flentry *fle) } static void -flowtable_free_stale(struct flowtable *ft) +flowtable_free_stale(struct flowtable *ft, struct rtentry *rt) { int curbit = 0, count; struct flentry *fle, **flehead, *fleprev; @@ -866,8 +866,14 @@ flowtable_free_stale(struct flowtable *f curbit); } #endif - while (fle != NULL) { - if (!flow_stale(ft, fle)) { + while (fle != NULL) { + if (rt != NULL) { + if (__DEVOLATILE(struct rtentry *, fle->f_rt) != rt) { + fleprev = fle; + fle = fle->f_next; + continue; + } + } else if (!flow_stale(ft, fle)) { fleprev = fle; fle = fle->f_next; continue; @@ -916,6 +922,30 @@ flowtable_free_stale(struct flowtable *f log(LOG_DEBUG, "freed %d flow entries\n", count); } +void +flowtable_route_flush(struct flowtable *ft, struct rtentry *rt) +{ + int i; + if (ft->ft_flags & FL_PCPU) { + for (i = 0; i <= mp_maxid; i++) { + if (CPU_ABSENT(i)) + continue; + + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); + + flowtable_free_stale(ft, rt); + + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } + } else { + flowtable_free_stale(ft, rt); + } +} + static void flowtable_clean_vnet(void) { @@ -933,14 +963,14 @@ flowtable_clean_vnet(void) sched_bind(curthread, i); thread_unlock(curthread); - flowtable_free_stale(ft); + flowtable_free_stale(ft, NULL); thread_lock(curthread); sched_unbind(curthread); thread_unlock(curthread); } } else { - flowtable_free_stale(ft); + flowtable_free_stale(ft, NULL); } ft = ft->ft_next; } Modified: stable/8/sys/net/flowtable.h ============================================================================== --- stable/8/sys/net/flowtable.h Tue Oct 6 17:33:00 2009 (r197809) +++ stable/8/sys/net/flowtable.h Tue Oct 6 18:47:02 2009 (r197810) @@ -51,5 +51,7 @@ struct flowtable *flowtable_alloc(int ne int flowtable_lookup(struct flowtable *ft, struct mbuf *m, struct route *ro, uint32_t fibnum); +void flowtable_route_flush(struct flowtable *ft, struct rtentry *rt); + #endif /* _KERNEL */ #endif Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Tue Oct 6 17:33:00 2009 (r197809) +++ stable/8/sys/net/route.c Tue Oct 6 18:47:02 2009 (r197810) @@ -56,6 +56,7 @@ #include #include #include +#include #ifdef RADIX_MPATH #include @@ -996,6 +997,9 @@ rtrequest1_fib(int req, struct rt_addrin { int error = 0, needlock = 0; register struct rtentry *rt; +#ifdef FLOWTABLE + register struct rtentry *rt0; +#endif register struct radix_node *rn; register struct radix_node_head *rnh; struct ifaddr *ifa; @@ -1153,6 +1157,53 @@ rtrequest1_fib(int req, struct rt_addrin } #endif +#ifdef FLOWTABLE + rt0 = NULL; + /* XXX + * "flow-table" only support IPv4 at the moment. + */ + if (dst->sa_family == AF_INET) { + rn = rnh->rnh_matchaddr(dst, rnh); + if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { + struct sockaddr *mask; + u_char *m, *n; + int len; + + /* + * compare mask to see if the new route is + * more specific than the existing one + */ + rt0 = RNTORT(rn); + RT_LOCK(rt0); + RT_ADDREF(rt0); + RT_UNLOCK(rt0); + /* + * A host route is already present, so + * leave the flow-table entries as is. + */ + if (rt0->rt_flags & RTF_HOST) { + RTFREE(rt0); + rt0 = NULL; + } else if (!(flags & RTF_HOST) && netmask) { + mask = rt_mask(rt0); + len = mask->sa_len; + m = (u_char *)mask; + n = (u_char *)netmask; + while (len-- > 0) { + if (*n != *m) + break; + n++; + m++; + } + if (len == 0 || (*n < *m)) { + RTFREE(rt0); + rt0 = NULL; + } + } + } + } +#endif + /* XXX mtu manipulation will be done in rnh_addaddr -- itojun */ rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes); /* @@ -1165,8 +1216,18 @@ rtrequest1_fib(int req, struct rt_addrin Free(rt_key(rt)); RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); +#ifdef FLOWTABLE + if (rt0 != NULL) + RTFREE(rt0); +#endif senderr(EEXIST); + } +#ifdef FLOWTABLE + else if (rt0 != NULL) { + flowtable_route_flush(V_ip_ft, rt0); + RTFREE(rt0); } +#endif /* * If this protocol has something to add to this then From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 19:44:45 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51E701065676; Tue, 6 Oct 2009 19:44:45 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EEDA8FC12; Tue, 6 Oct 2009 19:44: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 n96JijoI062099; Tue, 6 Oct 2009 19:44:45 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96JijDv062097; Tue, 6 Oct 2009 19:44:45 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200910061944.n96JijDv062097@svn.freebsd.org> From: Qing Li Date: Tue, 6 Oct 2009 19:44: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: r197811 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 19:44:45 -0000 Author: qingli Date: Tue Oct 6 19:44:44 2009 New Revision: 197811 URL: http://svn.freebsd.org/changeset/base/197811 Log: MFC 197695 Previously, if an address alias is configured on an interface, and this address alias has a prefix matching that of another address configured on the same interface, then the ARP entry for the alias is not deleted from the ARP table when that address alias is removed. This patch fixes the aforementioned issue. PR: kern/139113 Reviewed by: bz Approved by: re Modified: 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/netinet/in.c Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Tue Oct 6 18:47:02 2009 (r197810) +++ stable/8/sys/netinet/in.c Tue Oct 6 19:44:44 2009 (r197811) @@ -1060,6 +1060,8 @@ in_scrubprefix(struct in_ifaddr *target) !(target->ia_ifp->if_flags & IFF_LOOPBACK)) { error = ifa_del_loopback_route((struct ifaddr *)target, (struct sockaddr *)&target->ia_addr); + /* remove arp cache */ + arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr); } if ((target->ia_flags & IFA_ROUTE) == 0) { @@ -1082,8 +1084,6 @@ in_scrubprefix(struct in_ifaddr *target) prefix = target->ia_addr.sin_addr; mask = target->ia_sockmask.sin_addr; prefix.s_addr &= mask.s_addr; - /* remove arp cache */ - arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr); } IN_IFADDR_RLOCK(); From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 20:33:02 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D5A71065676; Tue, 6 Oct 2009 20:33:02 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0FC8FC1D; Tue, 6 Oct 2009 20:33: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 n96KX2No063172; Tue, 6 Oct 2009 20:33:02 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96KX2iw063170; Tue, 6 Oct 2009 20:33:02 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200910062033.n96KX2iw063170@svn.freebsd.org> From: Qing Li Date: Tue, 6 Oct 2009 20:33: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: r197813 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 20:33:02 -0000 Author: qingli Date: Tue Oct 6 20:33:02 2009 New Revision: 197813 URL: http://svn.freebsd.org/changeset/base/197813 Log: MFC r197696 Remove a log message from production code. This log message can be triggered by a misconfigured host that is sending out gratuious ARPs. This log message can also be triggered during a network renumbering event when multiple prefixes co-exist on a single network segment. Approved by: re Modified: 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/netinet/in.c Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Tue Oct 6 20:19:16 2009 (r197812) +++ stable/8/sys/netinet/in.c Tue Oct 6 20:33:02 2009 (r197813) @@ -1327,8 +1327,10 @@ in_lltable_rtcheck(struct ifnet *ifp, co /* XXX rtalloc1 should take a const param */ rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0); if (rt == NULL || (rt->rt_flags & RTF_GATEWAY) || rt->rt_ifp != ifp) { +#ifdef DIAGNOSTICS log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); +#endif if (rt != NULL) RTFREE_LOCKED(rt); return (EINVAL); From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 21:23:51 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7310A1065676; Tue, 6 Oct 2009 21:23:51 +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 611658FC08; Tue, 6 Oct 2009 21:23: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 n96LNoIA064348; Tue, 6 Oct 2009 21:23:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96LNo2R064347; Tue, 6 Oct 2009 21:23:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910062123.n96LNo2R064347@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 6 Oct 2009 21:23: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: r197815 - in stable/8/usr.sbin/lpr: . lp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 21:23:51 -0000 Author: jilles Date: Tue Oct 6 21:23:49 2009 New Revision: 197815 URL: http://svn.freebsd.org/changeset/base/197815 Log: MFC r197625: Fix using lp(1) without the new -t option after r194171. Approved by: re (kib) Modified: stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/lpr/lp/lp.sh Modified: stable/8/usr.sbin/lpr/lp/lp.sh ============================================================================== --- stable/8/usr.sbin/lpr/lp/lp.sh Tue Oct 6 20:35:41 2009 (r197814) +++ stable/8/usr.sbin/lpr/lp/lp.sh Tue Oct 6 21:23:49 2009 (r197815) @@ -70,7 +70,7 @@ do s) # (silent option) : ;; t) # title for banner page - title="-J${OPTARG}";; + title="${OPTARG}";; *) # (error msg printed by getopts) exit 2;; esac @@ -78,4 +78,4 @@ done shift $(($OPTIND - 1)) -exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} "${title}" "$@" +exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} ${title:+-J"${title}"} "$@" From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 6 22:15:12 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7DCD106566B; Tue, 6 Oct 2009 22:15:12 +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 8C3728FC0A; Tue, 6 Oct 2009 22:15: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 n96MFC1l065660; Tue, 6 Oct 2009 22:15:12 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96MFCgE065657; Tue, 6 Oct 2009 22:15:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200910062215.n96MFCgE065657@svn.freebsd.org> From: Doug Barton Date: Tue, 6 Oct 2009 22:15: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: r197821 - stable/8/usr.bin/whois X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 22:15:12 -0000 Author: dougb Date: Tue Oct 6 22:15:12 2009 New Revision: 197821 URL: http://svn.freebsd.org/changeset/base/197821 Log: MFC r197725: The 6bone was decommissioned on 6/6/06, so remove references to it. Approved by: re (kib) Modified: stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/whois/whois.1 stable/8/usr.bin/whois/whois.c Modified: stable/8/usr.bin/whois/whois.1 ============================================================================== --- stable/8/usr.bin/whois/whois.1 Tue Oct 6 22:00:14 2009 (r197820) +++ stable/8/usr.bin/whois/whois.1 Tue Oct 6 22:15:12 2009 (r197821) @@ -32,7 +32,7 @@ .\" From: @(#)whois.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 23, 2006 +.Dd October 2, 2009 .Dt WHOIS 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd "Internet domain name and network number directory service" .Sh SYNOPSIS .Nm -.Op Fl aAbdfgiIklmQrR6 +.Op Fl aAbdfgiIklmQrR .Op Fl c Ar country-code | Fl h Ar host .Op Fl p Ar port .Ar name ... @@ -212,17 +212,14 @@ This option is deprecated; use the option with an argument of .Qq Li RU instead. -.It Fl 6 -Use the IPv6 Resource Center -.Pq Tn 6bone -database. -It contains network names and addresses for the IPv6 network. -.El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. +.El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Most types of data, such as domain names and .Tn IP @@ -255,15 +252,6 @@ but other .Tn TLDs can be queried by using a similar syntax.) .Pp -The following example demonstrates how to obtain information about an -.Tn IPv6 -address or hostname using the -.Fl 6 -option, which directs the query to -.Tn 6bone . -.Pp -.Dl "whois -6 IPv6-IP-Address" -.Pp The following example demonstrates how to query a whois server using a non-standard port, where .Dq Li query-data Modified: stable/8/usr.bin/whois/whois.c ============================================================================== --- stable/8/usr.bin/whois/whois.c Tue Oct 6 22:00:14 2009 (r197820) +++ stable/8/usr.bin/whois/whois.c Tue Oct 6 22:15:12 2009 (r197821) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #define PNICHOST "whois.apnic.net" #define MNICHOST "whois.ra.net" #define QNICHOST_TAIL ".whois-servers.net" -#define SNICHOST "whois.6bone.net" #define BNICHOST "whois.registro.br" #define NORIDHOST "whois.norid.no" #define IANAHOST "whois.iana.org" @@ -164,8 +163,10 @@ main(int argc, char *argv[]) warnx("-R is deprecated; use '-c ru' instead"); country = "ru"; break; + /* Remove in FreeBSD 10 */ case '6': - host = SNICHOST; + errx(EX_USAGE, + "-6 is deprecated; use -[aAflr] instead"); break; case '?': default: From owner-svn-src-stable-8@FreeBSD.ORG Wed Oct 7 14:14:06 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E007C106566B; Wed, 7 Oct 2009 14:14:05 +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 CC6708FC14; Wed, 7 Oct 2009 14:14: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 n97EE53a086512; Wed, 7 Oct 2009 14:14:05 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n97EE5B3086509; Wed, 7 Oct 2009 14:14:05 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200910071414.n97EE5B3086509@svn.freebsd.org> From: Takahashi Yoshihiro Date: Wed, 7 Oct 2009 14:14: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: r197836 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci modules/nfslockd nlm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 14:14:06 -0000 Author: nyan Date: Wed Oct 7 14:14:05 2009 New Revision: 197836 URL: http://svn.freebsd.org/changeset/base/197836 Log: MFC: revision 197730 unifdef NFSCLIENT because the nlm depends on the nfsclient even if NFSCLIENT is not defined. Now the nfslockd module works with the nfsclient module. Reviewed by: kib Approved by: re (kensmith) Modified: 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/modules/nfslockd/Makefile stable/8/sys/nlm/nlm_prot_impl.c Modified: stable/8/sys/modules/nfslockd/Makefile ============================================================================== --- stable/8/sys/modules/nfslockd/Makefile Wed Oct 7 13:45:12 2009 (r197835) +++ stable/8/sys/modules/nfslockd/Makefile Wed Oct 7 14:14:05 2009 (r197836) @@ -14,18 +14,12 @@ SRCS+= opt_inet6.h opt_nfs.h .if !defined(KERNBUILDDIR) NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel -NFSCLIENT?= 1 # 0/1 - requires NFSCLIENT to be configured in kernel .if ${NFS_INET6} > 0 opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif -.if ${NFSCLIENT} > 0 -opt_nfs.h: - echo "#define NFSCLIENT 1" > ${.TARGET} -.endif - .endif .include Modified: stable/8/sys/nlm/nlm_prot_impl.c ============================================================================== --- stable/8/sys/nlm/nlm_prot_impl.c Wed Oct 7 13:45:12 2009 (r197835) +++ stable/8/sys/nlm/nlm_prot_impl.c Wed Oct 7 14:14:05 2009 (r197836) @@ -26,7 +26,6 @@ */ #include "opt_inet6.h" -#include "opt_nfs.h" #include __FBSDID("$FreeBSD$"); @@ -671,8 +670,6 @@ nlm_host_destroy(struct nlm_host *host) free(host, M_NLM); } -#ifdef NFSCLIENT - /* * Thread start callback for client lock recovery */ @@ -695,8 +692,6 @@ nlm_client_recovery_start(void *arg) kthread_exit(); } -#endif - /* * This is called when we receive a host state change notification. We * unlock any active locks owned by the host. When rpc.lockd is @@ -735,7 +730,6 @@ nlm_host_notify(struct nlm_host *host, i lf_clearremotesys(host->nh_sysid); host->nh_state = newstate; -#ifdef NFSCLIENT /* * If we have any remote locks for this host (i.e. it * represents a remote NFS server that our local NFS client @@ -750,7 +744,6 @@ nlm_host_notify(struct nlm_host *host, i kthread_add(nlm_client_recovery_start, host, curproc, &td, 0, 0, "NFS lock recovery for %s", host->nh_caller_name); } -#endif } /* @@ -1479,10 +1472,8 @@ nlm_server_main(int addr_count, char **a enum clnt_stat stat; struct nlm_host *host, *nhost; struct nlm_waiting_lock *nw; -#ifdef NFSCLIENT vop_advlock_t *old_nfs_advlock; vop_reclaim_t *old_nfs_reclaim; -#endif int v4_used; #ifdef INET6 int v6_used; @@ -1583,20 +1574,16 @@ nlm_server_main(int addr_count, char **a NLM_DEBUG(1, "NLM: local NSM state is %d\n", smstat.state); nlm_nsm_state = smstat.state; -#ifdef NFSCLIENT old_nfs_advlock = nfs_advlock_p; nfs_advlock_p = nlm_advlock; old_nfs_reclaim = nfs_reclaim_p; nfs_reclaim_p = nlm_reclaim; -#endif svc_run(pool); error = 0; -#ifdef NFSCLIENT nfs_advlock_p = old_nfs_advlock; nfs_reclaim_p = old_nfs_reclaim; -#endif out: if (pool) From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 8 11:07:15 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E27E8106566B; Thu, 8 Oct 2009 11:07:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B60248FC08; Thu, 8 Oct 2009 11:07: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 n98B7FTE021079; Thu, 8 Oct 2009 11:07:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n98B7FZ9021077; Thu, 8 Oct 2009 11:07:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910081107.n98B7FZ9021077@svn.freebsd.org> From: Robert Watson Date: Thu, 8 Oct 2009 11:07: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: r197854 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 11:07:16 -0000 Author: rwatson Date: Thu Oct 8 11:07:15 2009 New Revision: 197854 URL: http://svn.freebsd.org/changeset/base/197854 Log: Merge r197795 from head to stable/8: In tcp_input(), we acquire a global write lock at first only if a segment is likely to trigger a TCP state change (i.e., FIN/RST/SYN). If we later have to upgrade the lock, we acquire an inpcb reference and drop both global/inpcb locks before reacquiring in-order. In that gap, the connection may transition into TIMEWAIT, so we need to loop back and reevaluate the inpcb after relocking. Reported by: Kamigishi Rei Reviewed by: bz Approved by: re (kib) Modified: 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/netinet/tcp_input.c Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Thu Oct 8 10:26:49 2009 (r197853) +++ stable/8/sys/netinet/tcp_input.c Thu Oct 8 11:07:15 2009 (r197854) @@ -648,6 +648,7 @@ findpcb: * tried to free the inpcb, in which case we need to loop back and * try to find a new inpcb to deliver to. */ +relocked: if (inp->inp_flags & INP_TIMEWAIT) { KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, ("%s: INP_TIMEWAIT ti_locked %d", __func__, ti_locked)); @@ -698,7 +699,8 @@ findpcb: * We've identified a valid inpcb, but it could be that we need an * inpcbinfo write lock and have only a read lock. In this case, * attempt to upgrade/relock using the same strategy as the TIMEWAIT - * case above. + * case above. If we relock, we have to jump back to 'relocked' as + * the connection might now be in TIMEWAIT. */ if (tp->t_state != TCPS_ESTABLISHED || (thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 || @@ -720,6 +722,7 @@ findpcb: goto findpcb; } tcp_wlock_relocked++; + goto relocked; } else { ti_locked = TI_WLOCKED; tcp_wlock_upgraded++; From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 8 11:28:33 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687C8106566B; Thu, 8 Oct 2009 11:28:33 +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 55C008FC17; Thu, 8 Oct 2009 11:28: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 n98BSXio021502; Thu, 8 Oct 2009 11:28:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n98BSWCd021500; Thu, 8 Oct 2009 11:28:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910081128.n98BSWCd021500@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Oct 2009 11:28:32 +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: r197855 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 11:28:33 -0000 Author: kib Date: Thu Oct 8 11:28:32 2009 New Revision: 197855 URL: http://svn.freebsd.org/changeset/base/197855 Log: MFC r197662: Do not dereference vp->v_mount without holding vnode lock and checking that the vnode is not reclaimed. Approved by: re (bz) Modified: 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/kern/uipc_syscalls.c Modified: stable/8/sys/kern/uipc_syscalls.c ============================================================================== --- stable/8/sys/kern/uipc_syscalls.c Thu Oct 8 11:07:15 2009 (r197854) +++ stable/8/sys/kern/uipc_syscalls.c Thu Oct 8 11:28:32 2009 (r197855) @@ -2085,9 +2085,11 @@ retry_space: /* * Get the page from backing store. */ - bsize = vp->v_mount->mnt_stat.f_iosize; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_SHARED | LK_RETRY); + error = vn_lock(vp, LK_SHARED); + if (error != 0) + goto after_read; + bsize = vp->v_mount->mnt_stat.f_iosize; /* * XXXMAC: Because we don't have fp->f_cred @@ -2100,6 +2102,7 @@ retry_space: IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); VOP_UNLOCK(vp, 0); + after_read: VFS_UNLOCK_GIANT(vfslocked); VM_OBJECT_LOCK(obj); vm_page_io_finish(pg); From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 8 20:58:10 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 412401065693; Thu, 8 Oct 2009 20:58: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 2F3D28FC08; Thu, 8 Oct 2009 20:58: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 n98KwASI032854; Thu, 8 Oct 2009 20:58:10 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n98KwA2W032852; Thu, 8 Oct 2009 20:58:10 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200910082058.n98KwA2W032852@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 8 Oct 2009 20:58: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: r197869 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 20:58:10 -0000 Author: bz Date: Thu Oct 8 20:58:09 2009 New Revision: 197869 URL: http://svn.freebsd.org/changeset/base/197869 Log: MFC r197727: Put #ifdef INET around parts of the FLOWTABLE code, to unbreak nooptions INET kernel builds. Approved by: re (kib) Modified: 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/route.c Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Thu Oct 8 20:33:12 2009 (r197868) +++ stable/8/sys/net/route.c Thu Oct 8 20:58:09 2009 (r197869) @@ -1162,6 +1162,7 @@ rtrequest1_fib(int req, struct rt_addrin /* XXX * "flow-table" only support IPv4 at the moment. */ +#ifdef INET if (dst->sa_family == AF_INET) { rn = rnh->rnh_matchaddr(dst, rnh); if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { @@ -1203,6 +1204,7 @@ rtrequest1_fib(int req, struct rt_addrin } } #endif +#endif /* XXX mtu manipulation will be done in rnh_addaddr -- itojun */ rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes); @@ -1224,7 +1226,9 @@ rtrequest1_fib(int req, struct rt_addrin } #ifdef FLOWTABLE else if (rt0 != NULL) { +#ifdef INET flowtable_route_flush(V_ip_ft, rt0); +#endif RTFREE(rt0); } #endif From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 09:18:23 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C83E1065670; Fri, 9 Oct 2009 09:18:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3008B8FC1A; Fri, 9 Oct 2009 09:18: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 n999INYp048146; Fri, 9 Oct 2009 09:18:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n999IN5o048144; Fri, 9 Oct 2009 09:18:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910090918.n999IN5o048144@svn.freebsd.org> From: Robert Watson Date: Fri, 9 Oct 2009 09:18:23 +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: r197895 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 09:18:23 -0000 Author: rwatson Date: Fri Oct 9 09:18:22 2009 New Revision: 197895 URL: http://svn.freebsd.org/changeset/base/197895 Log: Merge r197814 from head to stable/8: Remove tcp_input lock statistics; these are intended for debugging only and are not intended to ship in 8.0 as they dirty additional cache lines in a performance-critical per-packet path. Approved by: re (kib, bz) Modified: 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/netinet/tcp_input.c Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Fri Oct 9 09:12:19 2009 (r197894) +++ stable/8/sys/netinet/tcp_input.c Fri Oct 9 09:18:22 2009 (r197895) @@ -180,26 +180,6 @@ int tcp_read_locking = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, read_locking, CTLFLAG_RW, &tcp_read_locking, 0, "Enable read locking strategy"); -int tcp_rlock_atfirst; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, rlock_atfirst, CTLFLAG_RD, - &tcp_rlock_atfirst, 0, ""); - -int tcp_wlock_atfirst; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_wlock_atfirst, CTLFLAG_RD, - &tcp_wlock_atfirst, 0, ""); - -int tcp_wlock_upgraded; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, wlock_upgraded, CTLFLAG_RD, - &tcp_wlock_upgraded, 0, ""); - -int tcp_wlock_relocked; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, wlock_relocked, CTLFLAG_RD, - &tcp_wlock_relocked, 0, ""); - -int tcp_wlock_looped; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, wlock_looped, CTLFLAG_RD, - &tcp_wlock_looped, 0, ""); - VNET_DEFINE(struct inpcbhead, tcb); VNET_DEFINE(struct inpcbinfo, tcbinfo); #define tcb6 tcb /* for KAME src sync over BSD*'s */ @@ -505,11 +485,9 @@ tcp_input(struct mbuf *m, int off0) tcp_read_locking == 0) { INP_INFO_WLOCK(&V_tcbinfo); ti_locked = TI_WLOCKED; - tcp_wlock_atfirst++; } else { INP_INFO_RLOCK(&V_tcbinfo); ti_locked = TI_RLOCKED; - tcp_rlock_atfirst++; } findpcb: @@ -662,15 +640,11 @@ relocked: ti_locked = TI_WLOCKED; INP_WLOCK(inp); if (in_pcbrele(inp)) { - tcp_wlock_looped++; inp = NULL; goto findpcb; } - tcp_wlock_relocked++; - } else { + } else ti_locked = TI_WLOCKED; - tcp_wlock_upgraded++; - } } INP_INFO_WLOCK_ASSERT(&V_tcbinfo); @@ -717,16 +691,12 @@ relocked: ti_locked = TI_WLOCKED; INP_WLOCK(inp); if (in_pcbrele(inp)) { - tcp_wlock_looped++; inp = NULL; goto findpcb; } - tcp_wlock_relocked++; goto relocked; - } else { + } else ti_locked = TI_WLOCKED; - tcp_wlock_upgraded++; - } } INP_INFO_WLOCK_ASSERT(&V_tcbinfo); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 13:25:46 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47EA51065679; Fri, 9 Oct 2009 13:25: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 361208FC13; Fri, 9 Oct 2009 13:25: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 n99DPkvb054063; Fri, 9 Oct 2009 13:25:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n99DPkRS054062; Fri, 9 Oct 2009 13:25:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910091325.n99DPkRS054062@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Oct 2009 13:25: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: r197902 - in stable/8/sbin/geom: . class/nop X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 13:25:46 -0000 Author: brueffer Date: Fri Oct 9 13:25:45 2009 New Revision: 197902 URL: http://svn.freebsd.org/changeset/base/197902 Log: MFC: r197274 Fix the example, -w is the right switch for write failure probability. Approved by: re (kib) Modified: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/nop/gnop.8 Modified: stable/8/sbin/geom/class/nop/gnop.8 ============================================================================== --- stable/8/sbin/geom/class/nop/gnop.8 Fri Oct 9 10:13:18 2009 (r197901) +++ stable/8/sbin/geom/class/nop/gnop.8 Fri Oct 9 13:25:45 2009 (r197902) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2006 +.Dd September 17, 2009 .Dt GNOP 8 .Os .Sh NAME @@ -147,9 +147,9 @@ Exit status is 0 on success, and 1 if th .Sh EXAMPLES The following example shows how to create a transparent provider for disk .Pa /dev/da0 -with 50% failure probability, and how to destroy it. +with 50% write failure probability, and how to destroy it. .Bd -literal -offset indent -gnop create -v -f 50 da0 +gnop create -v -w 50 da0 gnop destroy -v da0.nop .Ed .Pp From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 13:31:37 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469EC1065672; Fri, 9 Oct 2009 13:31:37 +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 351CF8FC19; Fri, 9 Oct 2009 13:31: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 n99DVbII054205; Fri, 9 Oct 2009 13:31:37 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n99DVbhL054203; Fri, 9 Oct 2009 13:31:37 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910091331.n99DVbhL054203@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Oct 2009 13:31:37 +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: r197903 - stable/8/sbin/mksnap_ffs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 13:31:37 -0000 Author: brueffer Date: Fri Oct 9 13:31:36 2009 New Revision: 197903 URL: http://svn.freebsd.org/changeset/base/197903 Log: MFC: r197275 Fix an xref. Approved by: re (kib) Modified: stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mksnap_ffs/mksnap_ffs.8 Modified: stable/8/sbin/mksnap_ffs/mksnap_ffs.8 ============================================================================== --- stable/8/sbin/mksnap_ffs/mksnap_ffs.8 Fri Oct 9 13:25:45 2009 (r197902) +++ stable/8/sbin/mksnap_ffs/mksnap_ffs.8 Fri Oct 9 13:31:36 2009 (r197903) @@ -69,7 +69,7 @@ mount -o ro /dev/md0 /mnt/ .Sh SEE ALSO .Xr chmod 2 , .Xr chown 8 , -.Xr mdconfig 8, +.Xr mdconfig 8 , .Xr mount 8 .Sh CAVEATS The disk full situation is not handled gracefully and may From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 13:36:16 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F2FD10656C4; Fri, 9 Oct 2009 13:36:16 +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 2D5478FC21; Fri, 9 Oct 2009 13:36: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 n99DaE6u054347; Fri, 9 Oct 2009 13:36:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n99DaEdb054345; Fri, 9 Oct 2009 13:36:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910091336.n99DaEdb054345@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Oct 2009 13:36: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: r197904 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 13:36:16 -0000 Author: brueffer Date: Fri Oct 9 13:36:14 2009 New Revision: 197904 URL: http://svn.freebsd.org/changeset/base/197904 Log: MFC: r197276 Correct a sysctl name. Approved by: re (kib) Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/acpi_panasonic.4 Modified: stable/8/share/man/man4/acpi_panasonic.4 ============================================================================== --- stable/8/share/man/man4/acpi_panasonic.4 Fri Oct 9 13:31:36 2009 (r197903) +++ stable/8/share/man/man4/acpi_panasonic.4 Fri Oct 9 13:36:14 2009 (r197904) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 11, 2004 +.Dd September 17, 2009 .Dt ACPI_PANASONIC 4 i386 .Os .Sh NAME @@ -144,7 +144,7 @@ The following MIBs are available: The maximum level of brightness. The value is read only and automatically set according to hardware model. -.It Va hw.acpi.panasonic.lcd_brightness_max +.It Va hw.acpi.panasonic.lcd_brightness_min The minimum level of brightness. The value is read only and automatically set according to hardware model. From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 13:41:54 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D47B106568D; Fri, 9 Oct 2009 13:41:54 +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 023A18FC0A; Fri, 9 Oct 2009 13:41: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 n99DfrKT054518; Fri, 9 Oct 2009 13:41:53 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n99DfrNE054503; Fri, 9 Oct 2009 13:41:53 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910091341.n99DfrNE054503@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Oct 2009 13:41: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: r197905 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 13:41:54 -0000 Author: brueffer Date: Fri Oct 9 13:41:53 2009 New Revision: 197905 URL: http://svn.freebsd.org/changeset/base/197905 Log: MFC: r197300 Various mdoc, spelling etc fixes. Approved by: re (kib) Modified: stable/8/share/man/man9/ (props changed) stable/8/share/man/man9/ieee80211.9 stable/8/share/man/man9/ieee80211_amrr.9 stable/8/share/man/man9/ieee80211_beacon.9 stable/8/share/man/man9/ieee80211_bmiss.9 stable/8/share/man/man9/ieee80211_crypto.9 stable/8/share/man/man9/ieee80211_ddb.9 stable/8/share/man/man9/ieee80211_input.9 stable/8/share/man/man9/ieee80211_node.9 stable/8/share/man/man9/ieee80211_output.9 stable/8/share/man/man9/ieee80211_proto.9 stable/8/share/man/man9/ieee80211_radiotap.9 stable/8/share/man/man9/ieee80211_regdomain.9 stable/8/share/man/man9/ieee80211_scan.9 stable/8/share/man/man9/ieee80211_vap.9 Modified: stable/8/share/man/man9/ieee80211.9 ============================================================================== --- stable/8/share/man/man9/ieee80211.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -225,7 +225,7 @@ Allocate and initialize a structure. This method cannot sleep. The default method allocates zero'd memory using -.Xr malloc 9. +.Xr malloc 9 . Drivers should override this method to allocate extended storage for their own needs. Memory allocated by the driver must be tagged with @@ -301,7 +301,7 @@ This method is called immediately after and must initiate the work to scan a channel and schedule a timer to advance to the next channel in the scan list. This callback is done in a sleepable context. -The default method handles active scan work (e.g. sending ProbRequest +The default method handles active scan work (e.g. sending ProbeRequest frames), and schedules a call to .Xr ieee80211_scan_next 9 according to the maximum dwell time for the channel. @@ -558,4 +558,4 @@ Device supports Reduced Inter Frame Spac .Xr ieee80211_send_action 9 , .Xr ieee80211_radiotap_attach 9 , .Xr ifnet 9 , -.Xr malloc 9 . +.Xr malloc 9 Modified: stable/8/share/man/man9/ieee80211_amrr.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_amrr.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_amrr.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -191,4 +191,4 @@ Drivers that poll a device to retrieve s (instead or in addition). .Sh SEE ALSO .Xr ieee80211 9 , -.Xr ieee80211_output 9 , +.Xr ieee80211_output 9 Modified: stable/8/share/man/man9/ieee80211_beacon.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_beacon.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_beacon.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -112,4 +112,4 @@ Staggering beacon frames is usually supe about eight vaps, at which point the overhead becomes significant and the channel becomes noticeably busy anyway. .Sh SEE ALSO -.Xr ieee80211 9 . +.Xr ieee80211 9 Modified: stable/8/share/man/man9/ieee80211_bmiss.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_bmiss.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_bmiss.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -86,6 +86,6 @@ Note that software beacon miss handling it can be used in any operating mode where beacons from a peer station are received. .Sh SEE ALSO -.Xr ieee80211 9 , -.Xr ieee80211_vap 9 , .Xr wpa_supplicant 8 , +.Xr ieee80211 9 , +.Xr ieee80211_vap 9 Modified: stable/8/share/man/man9/ieee80211_crypto.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_crypto.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_crypto.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -65,10 +65,10 @@ .\" .Ft int .Fo ieee80211_crypto_newkey -.Fa "struct ieee80211vap * -.Fa "int cipher -.Fa "int flags -.Fa "struct ieee80211_key * +.Fa "struct ieee80211vap *" +.Fa "int cipher" +.Fa "int flags" +.Fa "struct ieee80211_key *" .Fc .\" .Ft int @@ -141,7 +141,7 @@ so it can reclaim resources. .Pp Crypto modules can notify the system of two events. When a packet replay event is recognized -.Fn ieee80111_notify_replay_failure +.Fn ieee80211_notify_replay_failure can be used to signal the event. When a .Dv TKIP @@ -256,4 +256,4 @@ when receive traffic is active. .Xr ioctl 2 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , -.Xr wlan_wep 4 . +.Xr wlan_wep 4 Modified: stable/8/share/man/man9/ieee80211_ddb.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_ddb.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_ddb.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -54,7 +54,7 @@ This is especially important because wir built for embedded environments where cross-machine or post-mortem debugging facilities like .Xr kgdb 1 -infeasible. +are infeasible. .Pp The most commonly used command is .Bd -literal -offset indent @@ -69,4 +69,4 @@ and data structures in the system. .Sh SEE ALSO .Xr ddb 4 , -.Xr ieee80211 9 . +.Xr ieee80211 9 Modified: stable/8/share/man/man9/ieee80211_input.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_input.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_input.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -113,4 +113,4 @@ Otherwise the values are made available (with the rssi presented as a filtered average over the last ten values and the noise floor the last reported value). .Sh SEE ALSO -.Xr ieee80211 9 . +.Xr ieee80211 9 Modified: stable/8/share/man/man9/ieee80211_node.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_node.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_node.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -248,4 +248,4 @@ then a normal lookup is done without a t .Sh SEE ALSO .Xr ddb 9 .Xr ieee80211 9 , -.Xr ieee80211_proto 9 , +.Xr ieee80211_proto 9 Modified: stable/8/share/man/man9/ieee80211_output.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_output.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_output.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -47,9 +47,9 @@ .\" .Ft void .Fo ieee80211_process_callback -.Fa struct ieee80211_node * -.Fa struct mbuf * -.Fa int +.Fa "struct ieee80211_node *" +.Fa "struct mbuf *" +.Fa "int" .Fc .Sh DESCRIPTION The @@ -101,7 +101,7 @@ Similarly, .Nm net80211 handles activities such as background scanning and power save mode, frames will not be sent to a driver unless it is operating on the -BSS channel will +BSS channel with .Dq full power . .Pp All frames passed to a driver for transmit hold a reference to a Modified: stable/8/share/man/man9/ieee80211_proto.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_proto.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_proto.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -119,7 +119,7 @@ and .Vt ic_bsschan are guaranteed to be usable. .It Dv IEEE80211_S_CSA -Channel Switch Annoucememnt (CSA) is pending. +Channel Switch Announcement (CSA) is pending. This state is reached only from .Dv IEEE80211_S_RUN when either a CSA is received from an access point (in station mode) @@ -229,11 +229,11 @@ handled by or, in the case of card eject or vap destroy, work will be initiated outside the driver. .Sh SEE ALSO -.Xr ioctl 2 +.Xr ioctl 2 , +.Xr wpa_supplicant 8 , .Xr ieee80211 9 , -.Xr ifnet 9 +.Xr ifnet 9 , .Xr taskqueue 9 -.Xr wpa_supplicant 8 .Sh HISTORY The state machine concept was part of the original .Nm ieee80211 Modified: stable/8/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_radiotap.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_radiotap.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -198,11 +198,11 @@ RF noise power at the antenna, in decibe .\"power as unitless distance from maximum power set at factory calibration. .\"0 indicates maximum transmit power. .\"Monotonically nondecreasing with lower power levels. -\.".It Dv IEEE80211_RADIOTAP_DB_TX_ATTENUATION -\."This field contains a single unsigned 16-bit value, expressing transmit -\."power as decibel distance from maximum power set at factory calibration. -\."0 indicates maximum transmit power. -\."Monotonically nondecreasing with lower power levels. +.\".It Dv IEEE80211_RADIOTAP_DB_TX_ATTENUATION +.\"This field contains a single unsigned 16-bit value, expressing transmit +.\"power as decibel distance from maximum power set at factory calibration. +.\"0 indicates maximum transmit power. +.\"Monotonically nondecreasing with lower power levels. .It Dv IEEE80211_RADIOTAP_DBM_TX_POWER Transmit power expressed as decibels from a 1mW reference. This field is a single signed 8-bit value. @@ -223,9 +223,9 @@ This field contains a single unsigned 8- RF noise power at the antenna, in decibels difference from an arbitrary, fixed reference. .It Dv IEEE80211_RADIOTAP_XCHANNEL -This field containts four values: a 32-bit unsigned bitmap of +This field contains four values: a 32-bit unsigned bitmap of flags that describe the channel attributes, a 16-bit unsigned -freqeuncy in MHz (typically the channel center), an 8-bit +frequency in MHz (typically the channel center), an 8-bit unsigned IEEE channel number, and a signed 8-bit value that holds the maximum regulatory transmit power cap in .5 dBm (8 bytes total). @@ -237,10 +237,10 @@ This property supersedes .Dv IEEE80211_RADIOTAP_CHANNEL and is the only way to completely express all channel attributes and the -mapping between channel freqeuncy and IEEE channel number. +mapping between channel frequency and IEEE channel number. .El .Sh EXAMPLES -Radiotap receive definitions for the Intersil Prims driver: +Radiotap receive definitions for the Intersil Prism driver: .Bd -literal -offset indent #define WI_RX_RADIOTAP_PRESENT \\ ((1 << IEEE80211_RADIOTAP_TSFT) \\ @@ -298,7 +298,6 @@ definitions first appeared in .\" .Sh AUTHORS .An -nosplit -.Pp The original version of this manual page was written by .An Bruce M. Simpson Aq bms@FreeBSD.org and Modified: stable/8/share/man/man9/ieee80211_regdomain.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_regdomain.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_regdomain.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -112,7 +112,7 @@ routine. This should be done whenever the channel table contents are modified. .Pp The -.Fn ieee80211_alloc_countrie +.Fn ieee80211_alloc_countryie function allocates an information element as specified by 802.11h. Because this is expensive to generate it is cached in .Vt ic_countryie @@ -140,4 +140,4 @@ The exact rules by which to operate are .Sh SEE ALSO .Xr regdomain 5 , .Xr ifconfig 8 , -.Xr ieee80211 9 . +.Xr ieee80211 9 Modified: stable/8/share/man/man9/ieee80211_scan.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_scan.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_scan.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -347,4 +347,4 @@ request. .Sh SEE ALSO .Xr ioctl 2 , .Xr ieee80211 9 . -.Xr ieee80211_proto 9 . +.Xr ieee80211_proto 9 Modified: stable/8/share/man/man9/ieee80211_vap.9 ============================================================================== --- stable/8/share/man/man9/ieee80211_vap.9 Fri Oct 9 13:36:14 2009 (r197904) +++ stable/8/share/man/man9/ieee80211_vap.9 Fri Oct 9 13:41:53 2009 (r197905) @@ -151,4 +151,4 @@ that beacon are stopped before stopping .Sh SEE ALSO .Xr ieee80211 9 , .Xr ifnet 9 , -.Xr malloc 9 . +.Xr malloc 9 From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 13:46:55 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC2B1065676; Fri, 9 Oct 2009 13:46: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 7A9E48FC16; Fri, 9 Oct 2009 13: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 n99Dktu1054668; Fri, 9 Oct 2009 13:46:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n99Dktnl054666; Fri, 9 Oct 2009 13:46:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910091346.n99Dktnl054666@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Oct 2009 13: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: r197906 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 13:46:55 -0000 Author: brueffer Date: Fri Oct 9 13:46:55 2009 New Revision: 197906 URL: http://svn.freebsd.org/changeset/base/197906 Log: MFC: r197310 Fix mdoc, typos, contractions. Approved by: re (kib) Modified: stable/8/share/man/man9/ (props changed) stable/8/share/man/man9/fail.9 Modified: stable/8/share/man/man9/fail.9 ============================================================================== --- stable/8/share/man/man9/fail.9 Fri Oct 9 13:41:53 2009 (r197905) +++ stable/8/share/man/man9/fail.9 Fri Oct 9 13:46:55 2009 (r197906) @@ -37,7 +37,6 @@ .Nm KFAIL_POINT_GOTO , .Nm fail_point , .Nm DEBUG_FP -. .Nd fail points .Sh SYNOPSIS .In sys/fail.h @@ -79,7 +78,7 @@ is derived from the .Fn return value set in the sysctl MIB. See -.Sx SYSCTL SETTINGS +.Sx SYSCTL VARIABLES below. .Pp The remaining @@ -100,7 +99,6 @@ is the equivalent of .Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;}) .El -.Pp .Sh SYSCTL VARIABLES The .Fn KFAIL_POINT_* @@ -108,28 +106,28 @@ macros add sysctl MIBs where specified. Many base kernel MIBs can be found in the .Sy debug.fail_point tree (referenced in code by -.Sy DEBUG_FP -). +.Sy DEBUG_FP ) . .Pp The sysctl variable may be set using the following grammar: .Pp +.Bd -literal :: ( "->" )* -.Pp + :: ( ( "%") | ( "*" ) )* [ "(" ")" ] -.Pp + :: [ "." ] | "." -.Pp + :: "off" | "return" | "sleep" | "panic" | "break" | "print" +.Ed .Pp -The -argument specifies which action to take: +The argument specifies which action to take: .Bl -tag -width ".Dv return" .It Sy off Take no action (does not trigger fail point code) @@ -158,13 +156,13 @@ is evaluated before the count, i.e. "2%5 but only 5 times total". .Pp The operator -> can be used to express cascading terms. -If you specify ->, it means that if doesn't -'execute', is evaluated. +If you specify ->, it means that if does not +.Ql execute , + is evaluated. For the purpose of this operator, the return() and print() operators are the only types that cascade. A return() term only cascades if the code executes, and a print() term only cascades when passed a non-zero argument. -.Pp .Sh EXAMPLES .Bl -tag .It Sy sysctl debug.fail_point.foobar="2.1%return(5)" @@ -175,7 +173,7 @@ with RETURN_VALUE set to 5. 2/100ths of the time, execute .Fa code with RETURN_VALUE set to 5. -If that doesn't happen, 5% of the time execute +If that does not happen, 5% of the time execute .Fa code with RETURN_VALUE set to 22. .It Sy sysctl debug.fail_point.foobar="5*return(5)->0.1%return(22)" @@ -186,9 +184,8 @@ Return 5 for 1 in 1000 executions, but o .It Sy sysctl debug.fail_point.foobar="1%*sleep(50)" 1/100th of the time, sleep 50ms. .El -.Pp .Sh CAVEATS -It's easy to shoot yourself in the foot by setting fail points too +It is easy to shoot yourself in the foot by setting fail points too aggressively or setting too many in combination. For example, forcing .Fn malloc @@ -201,7 +198,6 @@ Currently, .Fn fail_point_eval does not verify whether the context is appropriate for calling .Fn msleep . -.Pp .Sh AUTHORS .An -nosplit This manual page was written by From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 9 13:52:49 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A33D21065670; Fri, 9 Oct 2009 13:52: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 901968FC26; Fri, 9 Oct 2009 13:52: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 n99DqnLb054850; Fri, 9 Oct 2009 13:52:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n99DqnGF054847; Fri, 9 Oct 2009 13:52:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910091352.n99DqnGF054847@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Oct 2009 13:52: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: r197907 - in stable/8: lib/libc lib/libc/gen lib/libc/stdio lib/libc/stdtime lib/libc/string lib/libc/sys sbin/ipfw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 13:52:49 -0000 Author: brueffer Date: Fri Oct 9 13:52:49 2009 New Revision: 197907 URL: http://svn.freebsd.org/changeset/base/197907 Log: MFC: r197312 Fix setfib(1) section number. Approved by: re (kib) Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/gen/ (props changed) stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) stable/8/lib/libc/sys/setfib.2 stable/8/sbin/ipfw/ (props changed) stable/8/sbin/ipfw/ipfw.8 Modified: stable/8/lib/libc/sys/setfib.2 ============================================================================== --- stable/8/lib/libc/sys/setfib.2 Fri Oct 9 13:46:55 2009 (r197906) +++ stable/8/lib/libc/sys/setfib.2 Fri Oct 9 13:52:49 2009 (r197907) @@ -67,8 +67,8 @@ if the .Fa fib argument is greater than the current system maximum. .Sh SEE ALSO -.Xr setsockopt 2 , -.Xr setfib 8 +.Xr setfib 1 , +.Xr setsockopt 2 .Sh STANDARDS The .Fn setfib Modified: stable/8/sbin/ipfw/ipfw.8 ============================================================================== --- stable/8/sbin/ipfw/ipfw.8 Fri Oct 9 13:46:55 2009 (r197906) +++ stable/8/sbin/ipfw/ipfw.8 Fri Oct 9 13:52:49 2009 (r197907) @@ -869,7 +869,7 @@ The packet is tagged so as to use the FI .Ar fibnum in any subsequent forwarding decisions. Initially this is limited to the values 0 through 15, see -.Xr setfib 8 . +.Xr setfib 1 . Processing continues at the next rule. .It Cm reass Queue and reassemble ip fragments. From owner-svn-src-stable-8@FreeBSD.ORG Sat Oct 10 18:24:54 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73CCB1065672; Sat, 10 Oct 2009 18:24:54 +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 5FBB38FC08; Sat, 10 Oct 2009 18:24: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 n9AIOs34089152; Sat, 10 Oct 2009 18:24:54 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9AIOscH089148; Sat, 10 Oct 2009 18:24:54 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200910101824.n9AIOscH089148@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 10 Oct 2009 18:24:54 +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: r197938 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/uart dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2009 18:24:54 -0000 Author: marcel Date: Sat Oct 10 18:24:54 2009 New Revision: 197938 URL: http://svn.freebsd.org/changeset/base/197938 Log: MFC change 197721: Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY interface is fairly simple WRT dealing with flow control, but needed 2 new RX buffer functions with "get-char-from-buf" separated from "advance-buf-pointer" so that the pointer could be advanced only when ttydisc_rint() succeeded. Approved by: re (kib) Modified: 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/uart/uart_bus.h stable/8/sys/dev/uart/uart_core.c stable/8/sys/dev/uart/uart_tty.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus.h ============================================================================== --- stable/8/sys/dev/uart/uart_bus.h Sat Oct 10 17:56:18 2009 (r197937) +++ stable/8/sys/dev/uart/uart_bus.h Sat Oct 10 18:24:54 2009 (r197938) @@ -96,6 +96,7 @@ struct uart_softc { int sc_opened:1; /* This UART is open for business. */ int sc_polled:1; /* This UART has no interrupts. */ int sc_txbusy:1; /* This UART is transmitting. */ + int sc_isquelch:1; /* This UART has input squelched. */ struct uart_devinfo *sc_sysdev; /* System device (or NULL). */ @@ -141,6 +142,8 @@ int uart_bus_ipend(device_t dev); int uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan); int uart_bus_sysdev(device_t dev); +void uart_sched_softih(struct uart_softc *, uint32_t); + int uart_tty_attach(struct uart_softc *); int uart_tty_detach(struct uart_softc *); void uart_tty_intr(void *arg); @@ -175,6 +178,28 @@ uart_rx_get(struct uart_softc *sc) } static __inline int +uart_rx_next(struct uart_softc *sc) +{ + int ptr; + + ptr = sc->sc_rxget; + if (ptr == sc->sc_rxput) + return (-1); + ptr += 1; + sc->sc_rxget = (ptr < sc->sc_rxbufsz) ? ptr : 0; + return (0); +} + +static __inline int +uart_rx_peek(struct uart_softc *sc) +{ + int ptr; + + ptr = sc->sc_rxget; + return ((ptr == sc->sc_rxput) ? -1 : sc->sc_rxbuf[ptr]); +} + +static __inline int uart_rx_put(struct uart_softc *sc, int xc) { int ptr; Modified: stable/8/sys/dev/uart/uart_core.c ============================================================================== --- stable/8/sys/dev/uart/uart_core.c Sat Oct 10 17:56:18 2009 (r197937) +++ stable/8/sys/dev/uart/uart_core.c Sat Oct 10 18:24:54 2009 (r197938) @@ -91,7 +91,7 @@ uart_getrange(struct uart_class *uc) * Schedule a soft interrupt. We do this on the 0 to !0 transition * of the TTY pending interrupt status. */ -static void +void uart_sched_softih(struct uart_softc *sc, uint32_t ipend) { uint32_t new, old; Modified: stable/8/sys/dev/uart/uart_tty.c ============================================================================== --- stable/8/sys/dev/uart/uart_tty.c Sat Oct 10 17:56:18 2009 (r197937) +++ stable/8/sys/dev/uart/uart_tty.c Sat Oct 10 18:24:54 2009 (r197938) @@ -166,27 +166,6 @@ uart_tty_outwakeup(struct tty *tp) if (sc == NULL || sc->sc_leaving) return; - /* - * Handle input flow control. Note that if we have hardware support, - * we don't do anything here. We continue to receive until our buffer - * is full. At that time we cannot empty the UART itself and it will - * de-assert RTS for us. In that situation we're completely stuffed. - * Without hardware support, we need to toggle RTS ourselves. - */ - if ((tp->t_termios.c_cflag & CRTS_IFLOW) && !sc->sc_hwiflow) { -#if 0 - /*if ((tp->t_state & TS_TBLOCK) && - (sc->sc_hwsig & SER_RTS)) - UART_SETSIG(sc, SER_DRTS); - else */ if (/*!(tp->t_state & TS_TBLOCK) &&*/ - !(sc->sc_hwsig & SER_RTS)) - UART_SETSIG(sc, SER_DRTS|SER_RTS); -#endif - /* XXX: we should use inwakeup to implement this! */ - if (!(sc->sc_hwsig & SER_RTS)) - UART_SETSIG(sc, SER_DRTS|SER_RTS); - } - if (sc->sc_txbusy) return; @@ -195,6 +174,23 @@ uart_tty_outwakeup(struct tty *tp) UART_TRANSMIT(sc); } +static void +uart_tty_inwakeup(struct tty *tp) +{ + struct uart_softc *sc; + + sc = tty_softc(tp); + if (sc == NULL || sc->sc_leaving) + return; + + if (sc->sc_isquelch) { + if ((tp->t_termios.c_cflag & CRTS_IFLOW) && !sc->sc_hwiflow) + UART_SETSIG(sc, SER_DRTS|SER_RTS); + sc->sc_isquelch = 0; + uart_sched_softih(sc, SER_INT_RXREADY); + } +} + static int uart_tty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) { @@ -252,9 +248,9 @@ uart_tty_param(struct tty *tp, struct te UART_SETSIG(sc, SER_DDTR | SER_DTR); /* Set input flow control state. */ if (!sc->sc_hwiflow) { - /* if ((t->c_cflag & CRTS_IFLOW) && (tp->t_state & TS_TBLOCK)) + if ((t->c_cflag & CRTS_IFLOW) && sc->sc_isquelch) UART_SETSIG(sc, SER_DRTS); - else */ + else UART_SETSIG(sc, SER_DRTS | SER_RTS); } else UART_IOCTL(sc, UART_IOCTL_IFLOW, (t->c_cflag & CRTS_IFLOW)); @@ -294,8 +290,8 @@ uart_tty_intr(void *arg) tty_lock(tp); if (pend & SER_INT_RXREADY) { - while (!uart_rx_empty(sc) /* && !(tp->t_state & TS_TBLOCK)*/) { - xc = uart_rx_get(sc); + while (!uart_rx_empty(sc) && !sc->sc_isquelch) { + xc = uart_rx_peek(sc); c = xc & 0xff; if (xc & UART_STAT_FRAMERR) err |= TRE_FRAMING; @@ -303,7 +299,13 @@ uart_tty_intr(void *arg) err |= TRE_OVERRUN; if (xc & UART_STAT_PARERR) err |= TRE_PARITY; - ttydisc_rint(tp, c, err); + if (ttydisc_rint(tp, c, err) != 0) { + sc->sc_isquelch = 1; + if ((tp->t_termios.c_cflag & CRTS_IFLOW) && + !sc->sc_hwiflow) + UART_SETSIG(sc, SER_DRTS); + } else + uart_rx_next(sc); } } @@ -344,6 +346,7 @@ static struct ttydevsw uart_tty_class = .tsw_open = uart_tty_open, .tsw_close = uart_tty_close, .tsw_outwakeup = uart_tty_outwakeup, + .tsw_inwakeup = uart_tty_inwakeup, .tsw_ioctl = uart_tty_ioctl, .tsw_param = uart_tty_param, .tsw_modem = uart_tty_modem, From owner-svn-src-stable-8@FreeBSD.ORG Sat Oct 10 21:10:49 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBBE91065676; Sat, 10 Oct 2009 21:10:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8F008FC0C; Sat, 10 Oct 2009 21:10: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 n9ALAnoI092459; Sat, 10 Oct 2009 21:10:49 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9ALAnSF092458; Sat, 10 Oct 2009 21:10:49 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200910102110.n9ALAnSF092458@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 10 Oct 2009 21:10: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: r197941 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2009 21:10:49 -0000 Author: des Date: Sat Oct 10 21:10:49 2009 New Revision: 197941 URL: http://svn.freebsd.org/changeset/base/197941 Log: Fix mergeinfo for r196843 (r196518) and r196997 (r196519). Folks, *please* use 'svn merge' instead of applying patches manually! Approved by: re (kib) Modified: 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)