From owner-svn-src-stable-9@FreeBSD.ORG Mon Nov 11 10:09:53 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CE52D418; Mon, 11 Nov 2013 10:09:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A068028E0; Mon, 11 Nov 2013 10:09:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rABA9r02091134; Mon, 11 Nov 2013 10:09:53 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rABA9rae091131; Mon, 11 Nov 2013 10:09:53 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201311111009.rABA9rae091131@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 11 Nov 2013 10:09:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r257959 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 10:09:53 -0000 Author: ae Date: Mon Nov 11 10:09:52 2013 New Revision: 257959 URL: http://svnweb.freebsd.org/changeset/base/257959 Log: MFC r256689: Use the same actor key for media types of the same speed. PR: 176097 MFC r256832: Add a note that lacp_compose_key() should be updated, when new media types will be added. Submitted by: melifaro Modified: stable/9/sys/net/ieee8023ad_lacp.c stable/9/sys/net/if_media.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/9/sys/net/ieee8023ad_lacp.c Mon Nov 11 10:00:19 2013 (r257958) +++ stable/9/sys/net/ieee8023ad_lacp.c Mon Nov 11 10:09:52 2013 (r257959) @@ -1028,8 +1028,45 @@ lacp_compose_key(struct lacp_port *lp) KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type")); KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface")); - /* bit 0..4: IFM_SUBTYPE */ - key = subtype; + /* bit 0..4: IFM_SUBTYPE modulo speed */ + switch (subtype) { + case IFM_10_T: + case IFM_10_2: + case IFM_10_5: + case IFM_10_STP: + case IFM_10_FL: + key = IFM_10_T; + break; + case IFM_100_TX: + case IFM_100_FX: + case IFM_100_T4: + case IFM_100_VG: + case IFM_100_T2: + key = IFM_100_TX; + break; + case IFM_1000_SX: + case IFM_1000_LX: + case IFM_1000_CX: + case IFM_1000_T: + key = IFM_1000_SX; + break; + case IFM_10G_LR: + case IFM_10G_SR: + case IFM_10G_CX4: + case IFM_10G_TWINAX: + case IFM_10G_TWINAX_LONG: + case IFM_10G_LRM: + case IFM_10G_T: + key = IFM_10G_LR; + break; + case IFM_40G_CR4: + case IFM_40G_SR4: + case IFM_40G_LR4: + key = IFM_40G_CR4; + break; + default: + key = subtype; + } /* bit 5..14: (some bits of) if_index of lagg device */ key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5); /* bit 15: 0 */ Modified: stable/9/sys/net/if_media.h ============================================================================== --- stable/9/sys/net/if_media.h Mon Nov 11 10:00:19 2013 (r257958) +++ stable/9/sys/net/if_media.h Mon Nov 11 10:09:52 2013 (r257959) @@ -153,7 +153,10 @@ uint64_t ifmedia_baudrate(int); #define IFM_40G_CR4 27 /* 40GBase-CR4 */ #define IFM_40G_SR4 28 /* 40GBase-SR4 */ #define IFM_40G_LR4 29 /* 40GBase-LR4 */ - +/* + * Please update ieee8023ad_lacp.c:lacp_compose_key() + * after adding new Ethernet media types. + */ /* note 31 is the max! */ #define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Nov 11 10:43:55 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C71D8CE0; Mon, 11 Nov 2013 10:43:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4D802AE0; Mon, 11 Nov 2013 10:43:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rABAhtEh004159; Mon, 11 Nov 2013 10:43:55 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rABAhtNh004158; Mon, 11 Nov 2013 10:43:55 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201311111043.rABAhtNh004158@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 11 Nov 2013 10:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r257962 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 10:43:55 -0000 Author: ae Date: Mon Nov 11 10:43:55 2013 New Revision: 257962 URL: http://svnweb.freebsd.org/changeset/base/257962 Log: MFC r257084: Initialize inc_fibnum for properly handling ICMP6_PACKET_TOO_BIG errors in multifib environment. PR: 183265 Modified: stable/9/sys/netinet6/icmp6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/icmp6.c ============================================================================== --- stable/9/sys/netinet6/icmp6.c Mon Nov 11 10:43:39 2013 (r257961) +++ stable/9/sys/netinet6/icmp6.c Mon Nov 11 10:43:55 2013 (r257962) @@ -1242,6 +1242,7 @@ icmp6_mtudisc_update(struct ip6ctlparam mtu = IPV6_MMTU - 8; bzero(&inc, sizeof(inc)); + inc.inc_fibnum = M_GETFIB(m); inc.inc_flags |= INC_ISIPV6; inc.inc6_faddr = *dst; if (in6_setscope(&inc.inc6_faddr, m->m_pkthdr.rcvif, NULL)) From owner-svn-src-stable-9@FreeBSD.ORG Mon Nov 11 20:51:02 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2CF7FBE9; Mon, 11 Nov 2013 20:51:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19B462671; Mon, 11 Nov 2013 20:51:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rABKp1tq012829; Mon, 11 Nov 2013 20:51:01 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rABKp1jC012828; Mon, 11 Nov 2013 20:51:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311112051.rABKp1jC012828@svn.freebsd.org> From: Dimitry Andric Date: Mon, 11 Nov 2013 20:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258010 - stable/9/lib/libc/iconv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 20:51:02 -0000 Author: dim Date: Mon Nov 11 20:51:01 2013 New Revision: 258010 URL: http://svnweb.freebsd.org/changeset/base/258010 Log: MFC r257859: Fix typo in include guard, found by clang 3.4. Modified: stable/9/lib/libc/iconv/citrus_csmapper.h Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/iconv/citrus_csmapper.h ============================================================================== --- stable/9/lib/libc/iconv/citrus_csmapper.h Mon Nov 11 20:47:22 2013 (r258009) +++ stable/9/lib/libc/iconv/citrus_csmapper.h Mon Nov 11 20:51:01 2013 (r258010) @@ -28,7 +28,7 @@ */ #ifndef _CITRUS_CSMAPPER_H_ -#define _CITRUS_CSMAPPER_H +#define _CITRUS_CSMAPPER_H_ #define _citrus_csmapper _citrus_mapper #define _citrus_csmapper_close _citrus_mapper_close From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 12 18:43:36 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BB87D00; Tue, 12 Nov 2013 18:43:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EEA1E2C34; Tue, 12 Nov 2013 18:43:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rACIhZOh058486; Tue, 12 Nov 2013 18:43:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rACIhZ2L058484; Tue, 12 Nov 2013 18:43:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311121843.rACIhZ2L058484@svn.freebsd.org> From: Dimitry Andric Date: Tue, 12 Nov 2013 18:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258060 - stable/9/lib/libc++ X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 18:43:36 -0000 Author: dim Date: Tue Nov 12 18:43:35 2013 New Revision: 258060 URL: http://svnweb.freebsd.org/changeset/base/258060 Log: MFC r253917: After r253839, which modifies ld's behaviour to not automatically pull in needed libraries, change libc++.so into a linker script, so it can automatically pull in libcxxrt.so. [Note to stable/9 users: the above statement about ld's behaviour is not (yet) applicable to the version of ld in 9.x, but this change will help when building C++ programs with libc++, in combination with the ports version of ld.] Added: stable/9/lib/libc++/libc++.ldscript - copied unchanged from r253917, head/lib/libc++/libc++.ldscript Modified: stable/9/lib/libc++/Makefile Directory Properties: stable/9/lib/libc++/ (props changed) Modified: stable/9/lib/libc++/Makefile ============================================================================== --- stable/9/lib/libc++/Makefile Tue Nov 12 18:37:07 2013 (r258059) +++ stable/9/lib/libc++/Makefile Tue Nov 12 18:43:35 2013 (r258060) @@ -9,6 +9,7 @@ CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLI LIB= c++ SHLIB_MAJOR= 1 +SHLIB_LDSCRIPT= libc++.ldscript SRCS+= algorithm.cpp\ bind.cpp\ Copied: stable/9/lib/libc++/libc++.ldscript (from r253917, head/lib/libc++/libc++.ldscript) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc++/libc++.ldscript Tue Nov 12 18:43:35 2013 (r258060, copy of r253917, head/lib/libc++/libc++.ldscript) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +GROUP ( @@SHLIB@@ @@LIBDIR@@/libcxxrt.so ) From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 12 21:33:02 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F418E4; Tue, 12 Nov 2013 21:33:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2BE528C1; Tue, 12 Nov 2013 21:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rACLX1lq016825; Tue, 12 Nov 2013 21:33:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rACLX1YJ016824; Tue, 12 Nov 2013 21:33:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311122133.rACLX1YJ016824@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Nov 2013 21:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258072 - stable/9/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 21:33:02 -0000 Author: jhb Date: Tue Nov 12 21:33:01 2013 New Revision: 258072 URL: http://svnweb.freebsd.org/changeset/base/258072 Log: MFC 254576: Stop an ipoib interface before detaching it. PR: kern/181225 Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue Nov 12 21:14:19 2013 (r258071) +++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue Nov 12 21:33:01 2013 (r258072) @@ -1073,6 +1073,8 @@ ipoib_remove_one(struct ib_device *devic if (rdma_port_get_link_layer(device, priv->port) != IB_LINK_LAYER_INFINIBAND) continue; + ipoib_stop(priv); + ib_unregister_event_handler(&priv->event_handler); /* dev_change_flags(priv->dev, priv->dev->flags & ~IFF_UP); */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 13 17:08:37 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D53E715E; Wed, 13 Nov 2013 17:08:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4C6B2FFF; Wed, 13 Nov 2013 17:08:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rADH8b0r014262; Wed, 13 Nov 2013 17:08:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rADH8bcc014261; Wed, 13 Nov 2013 17:08:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311131708.rADH8bcc014261@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Nov 2013 17:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258099 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 17:08:37 -0000 Author: jhb Date: Wed Nov 13 17:08:37 2013 New Revision: 258099 URL: http://svnweb.freebsd.org/changeset/base/258099 Log: MFC 254699,255030: Use tvtohz() to convert a socket buffer timeout to a tick value rather than using a home-rolled version. The home-rolled version could result in shorter-than-requested sleeps. PR: kern/181416 Modified: stable/9/sys/kern/uipc_socket.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Wed Nov 13 17:06:26 2013 (r258098) +++ stable/9/sys/kern/uipc_socket.c Wed Nov 13 17:08:37 2013 (r258099) @@ -2654,22 +2654,12 @@ sosetopt(struct socket *so, struct socko sizeof tv); if (error) goto bad; - - /* assert(hz > 0); */ - if (tv.tv_sec < 0 || tv.tv_sec > INT_MAX / hz || - tv.tv_usec < 0 || tv.tv_usec >= 1000000) { - error = EDOM; - goto bad; - } - /* assert(tick > 0); */ - /* assert(ULONG_MAX - INT_MAX >= 1000000); */ - val = (u_long)(tv.tv_sec * hz) + tv.tv_usec / tick; - if (val > INT_MAX) { + if (tv.tv_sec < 0 || tv.tv_usec < 0 || + tv.tv_usec >= 1000000) { error = EDOM; goto bad; } - if (val == 0 && tv.tv_usec != 0) - val = 1; + val = tvtohz(&tv); switch (sopt->sopt_name) { case SO_SNDTIMEO: From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 13 18:33:15 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70C9ADE6; Wed, 13 Nov 2013 18:33:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4577E263F; Wed, 13 Nov 2013 18:33:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rADIXFV9044116; Wed, 13 Nov 2013 18:33:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rADIXEFR044114; Wed, 13 Nov 2013 18:33:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311131833.rADIXEFR044114@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Nov 2013 18:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258102 - in stable/9/sys: netinet netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 18:33:15 -0000 Author: jhb Date: Wed Nov 13 18:33:14 2013 New Revision: 258102 URL: http://svnweb.freebsd.org/changeset/base/258102 Log: MFC 255248: Use an unsigned long when indexing into mfchashtbl[] and mf6ctable[]. This matches the types used when computing hash indices and the type of the maximum size of mfchashtbl[]. PR: kern/181821 Modified: stable/9/sys/netinet/ip_mroute.c stable/9/sys/netinet6/ip6_mroute.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_mroute.c ============================================================================== --- stable/9/sys/netinet/ip_mroute.c Wed Nov 13 17:49:07 2013 (r258101) +++ stable/9/sys/netinet/ip_mroute.c Wed Nov 13 18:33:14 2013 (r258102) @@ -608,7 +608,7 @@ static void if_detached_event(void *arg __unused, struct ifnet *ifp) { vifi_t vifi; - int i; + u_long i; MROUTER_LOCK(); @@ -704,7 +704,7 @@ static int X_ip_mrouter_done(void) { struct ifnet *ifp; - int i; + u_long i; vifi_t vifi; MROUTER_LOCK(); @@ -796,7 +796,7 @@ set_assert(int i) int set_api_config(uint32_t *apival) { - int i; + u_long i; /* * We can set the API capabilities only if it is the first operation @@ -1431,7 +1431,7 @@ non_fatal: static void expire_upcalls(void *arg) { - int i; + u_long i; CURVNET_SET((struct vnet *) arg); Modified: stable/9/sys/netinet6/ip6_mroute.c ============================================================================== --- stable/9/sys/netinet6/ip6_mroute.c Wed Nov 13 17:49:07 2013 (r258101) +++ stable/9/sys/netinet6/ip6_mroute.c Wed Nov 13 18:33:14 2013 (r258102) @@ -573,7 +573,7 @@ int X_ip6_mrouter_done(void) { mifi_t mifi; - int i; + u_long i; struct mf6c *rt; struct rtdetq *rte; @@ -1338,7 +1338,7 @@ expire_upcalls(void *unused) { struct rtdetq *rte; struct mf6c *mfc, **nptr; - int i; + u_long i; MFC6_LOCK(); for (i = 0; i < MF6CTBLSIZ; i++) { From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 13 22:31:57 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A4AF265; Wed, 13 Nov 2013 22:31:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1980C25BC; Wed, 13 Nov 2013 22:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rADMVuIu024828; Wed, 13 Nov 2013 22:31:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rADMVu0J024826; Wed, 13 Nov 2013 22:31:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311132231.rADMVu0J024826@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Nov 2013 22:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258106 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 22:31:57 -0000 Author: jhb Date: Wed Nov 13 22:31:56 2013 New Revision: 258106 URL: http://svnweb.freebsd.org/changeset/base/258106 Log: MFC 255490,255491: Fix the type of the idtype argument to wait6() in syscalls.master. Modified: stable/9/sys/kern/makesyscalls.sh stable/9/sys/kern/syscalls.master Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/makesyscalls.sh ============================================================================== --- stable/9/sys/kern/makesyscalls.sh Wed Nov 13 20:35:10 2013 (r258105) +++ stable/9/sys/kern/makesyscalls.sh Wed Nov 13 22:31:56 2013 (r258106) @@ -153,7 +153,8 @@ s/\$//g printf "#include \n" > sysarg printf "#include \n" > sysarg printf "#include \n" > sysarg - printf "#include \n\n" > sysarg + printf "#include \n" > sysarg + printf "#include \n\n" > sysarg printf "#include \n\n" > sysarg printf "struct proc;\n\n" > sysarg printf "struct thread;\n\n" > sysarg Modified: stable/9/sys/kern/syscalls.master ============================================================================== --- stable/9/sys/kern/syscalls.master Wed Nov 13 20:35:10 2013 (r258105) +++ stable/9/sys/kern/syscalls.master Wed Nov 13 22:31:56 2013 (r258106) @@ -949,7 +949,7 @@ off_t offset, off_t len); } 531 AUE_NULL STD { int posix_fadvise(int fd, off_t offset, \ off_t len, int advice); } -532 AUE_WAIT6 STD { int wait6(int idtype, id_t id, \ +532 AUE_WAIT6 STD { int wait6(idtype_t idtype, id_t id, \ int *status, int options, \ struct __wrusage *wrusage, \ siginfo_t *info); } From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 13 22:32:37 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78C883DD; Wed, 13 Nov 2013 22:32:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6792925C7; Wed, 13 Nov 2013 22:32:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rADMWb4m024962; Wed, 13 Nov 2013 22:32:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rADMWaF6024955; Wed, 13 Nov 2013 22:32:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311132232.rADMWaF6024955@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Nov 2013 22:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258107 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 22:32:37 -0000 Author: jhb Date: Wed Nov 13 22:32:35 2013 New Revision: 258107 URL: http://svnweb.freebsd.org/changeset/base/258107 Log: Regen. Modified: stable/9/sys/kern/init_sysent.c stable/9/sys/kern/syscalls.c stable/9/sys/kern/systrace_args.c stable/9/sys/sys/syscall.h stable/9/sys/sys/syscall.mk stable/9/sys/sys/sysproto.h Modified: stable/9/sys/kern/init_sysent.c ============================================================================== --- stable/9/sys/kern/init_sysent.c Wed Nov 13 22:31:56 2013 (r258106) +++ stable/9/sys/kern/init_sysent.c Wed Nov 13 22:32:35 2013 (r258107) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu + * created from FreeBSD: stable/9/sys/kern/syscalls.master 258106 2013-11-13 22:31:56Z jhb */ #include "opt_compat.h" Modified: stable/9/sys/kern/syscalls.c ============================================================================== --- stable/9/sys/kern/syscalls.c Wed Nov 13 22:31:56 2013 (r258106) +++ stable/9/sys/kern/syscalls.c Wed Nov 13 22:32:35 2013 (r258107) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu + * created from FreeBSD: stable/9/sys/kern/syscalls.master 258106 2013-11-13 22:31:56Z jhb */ const char *syscallnames[] = { Modified: stable/9/sys/kern/systrace_args.c ============================================================================== --- stable/9/sys/kern/systrace_args.c Wed Nov 13 22:31:56 2013 (r258106) +++ stable/9/sys/kern/systrace_args.c Wed Nov 13 22:32:35 2013 (r258107) @@ -3256,7 +3256,7 @@ systrace_args(int sysnum, void *params, /* wait6 */ case 532: { struct wait6_args *p = params; - iarg[0] = p->idtype; /* int */ + iarg[0] = p->idtype; /* idtype_t */ iarg[1] = p->id; /* id_t */ uarg[2] = (intptr_t) p->status; /* int * */ iarg[3] = p->options; /* int */ @@ -8673,7 +8673,7 @@ systrace_setargdesc(int sysnum, int ndx, case 532: switch(ndx) { case 0: - p = "int"; + p = "idtype_t"; break; case 1: p = "id_t"; Modified: stable/9/sys/sys/syscall.h ============================================================================== --- stable/9/sys/sys/syscall.h Wed Nov 13 22:31:56 2013 (r258106) +++ stable/9/sys/sys/syscall.h Wed Nov 13 22:32:35 2013 (r258107) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu + * created from FreeBSD: stable/9/sys/kern/syscalls.master 258106 2013-11-13 22:31:56Z jhb */ #define SYS_syscall 0 Modified: stable/9/sys/sys/syscall.mk ============================================================================== --- stable/9/sys/sys/syscall.mk Wed Nov 13 22:31:56 2013 (r258106) +++ stable/9/sys/sys/syscall.mk Wed Nov 13 22:32:35 2013 (r258107) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu +# created from FreeBSD: stable/9/sys/kern/syscalls.master 258106 2013-11-13 22:31:56Z jhb MIASM = \ syscall.o \ exit.o \ Modified: stable/9/sys/sys/sysproto.h ============================================================================== --- stable/9/sys/sys/sysproto.h Wed Nov 13 22:31:56 2013 (r258106) +++ stable/9/sys/sys/sysproto.h Wed Nov 13 22:32:35 2013 (r258107) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu + * created from FreeBSD: stable/9/sys/kern/syscalls.master 258106 2013-11-13 22:31:56Z jhb */ #ifndef _SYS_SYSPROTO_H_ @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -1745,7 +1746,7 @@ struct posix_fadvise_args { char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct wait6_args { - char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; char id_l_[PADL_(id_t)]; id_t id; char id_r_[PADR_(id_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 14 21:27:14 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1EEAD7; Thu, 14 Nov 2013 21:27:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E09C32F5E; Thu, 14 Nov 2013 21:27:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAELRDOX095684; Thu, 14 Nov 2013 21:27:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAELRDhp095683; Thu, 14 Nov 2013 21:27:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311142127.rAELRDhp095683@svn.freebsd.org> From: John Baldwin Date: Thu, 14 Nov 2013 21:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258144 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 21:27:14 -0000 Author: jhb Date: Thu Nov 14 21:27:13 2013 New Revision: 258144 URL: http://svnweb.freebsd.org/changeset/base/258144 Log: MFC 255497: Fix an off-by-one error when populating mincore(2) entries for skipped entries. lastvecindex references the last valid byte, so the new bytes should come after it. Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Thu Nov 14 20:21:05 2013 (r258143) +++ stable/9/sys/vm/vm_mmap.c Thu Nov 14 21:27:13 2013 (r258144) @@ -963,12 +963,12 @@ RestartScan: * the byte vector is zeroed for those skipped entries. */ while ((lastvecindex + 1) < vecindex) { + ++lastvecindex; error = subyte(vec + lastvecindex, 0); if (error) { error = EFAULT; goto done2; } - ++lastvecindex; } /* @@ -1004,12 +1004,12 @@ RestartScan: */ vecindex = OFF_TO_IDX(end - first_addr); while ((lastvecindex + 1) < vecindex) { + ++lastvecindex; error = subyte(vec + lastvecindex, 0); if (error) { error = EFAULT; goto done2; } - ++lastvecindex; } /* From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 14 21:31:59 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 458433F6; Thu, 14 Nov 2013 21:31:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 249C62FBC; Thu, 14 Nov 2013 21:31:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAELVwBu098458; Thu, 14 Nov 2013 21:31:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAELVwhj098453; Thu, 14 Nov 2013 21:31:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311142131.rAELVwhj098453@svn.freebsd.org> From: John Baldwin Date: Thu, 14 Nov 2013 21:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258146 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 21:31:59 -0000 Author: jhb Date: Thu Nov 14 21:31:58 2013 New Revision: 258146 URL: http://svnweb.freebsd.org/changeset/base/258146 Log: MFC 255498: - Document the UQUAD sysctl variants. - Clarify that exactly one of the "access" flags is required and list the optional flags in a separate list. Prefer bundling CTLFLAG_TUN into the access flag by not documenting it as an optional flag to set. Modified: stable/9/share/man/man9/Makefile stable/9/share/man/man9/sysctl.9 stable/9/share/man/man9/sysctl_add_oid.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Thu Nov 14 21:27:19 2013 (r258145) +++ stable/9/share/man/man9/Makefile Thu Nov 14 21:31:58 2013 (r258146) @@ -1273,22 +1273,24 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_NODE.9 \ sysctl.9 SYSCTL_OPAQUE.9 \ sysctl.9 SYSCTL_PROC.9 \ + sysctl.9 SYSCTL_QUAD.9 \ sysctl.9 SYSCTL_STRING.9 \ sysctl.9 SYSCTL_STRUCT.9 \ sysctl.9 SYSCTL_UINT.9 \ sysctl.9 SYSCTL_ULONG.9 \ - sysctl.9 SYSCTL_QUAD.9 + sysctl.9 SYSCTL_UQUAD.9 MLINKS+=sysctl_add_oid.9 SYSCTL_ADD_INT.9 \ sysctl_add_oid.9 SYSCTL_ADD_LONG.9 \ sysctl_add_oid.9 SYSCTL_ADD_NODE.9 \ sysctl_add_oid.9 SYSCTL_ADD_OID.9 \ sysctl_add_oid.9 SYSCTL_ADD_OPAQUE.9 \ sysctl_add_oid.9 SYSCTL_ADD_PROC.9 \ + sysctl_add_oid.9 SYSCTL_ADD_QUAD.9 \ sysctl_add_oid.9 SYSCTL_ADD_STRING.9 \ sysctl_add_oid.9 SYSCTL_ADD_STRUCT.9 \ sysctl_add_oid.9 SYSCTL_ADD_UINT.9 \ sysctl_add_oid.9 SYSCTL_ADD_ULONG.9 \ - sysctl_add_oid.9 SYSCTL_ADD_QUAD.9 \ + sysctl_add_oid.9 SYSCTL_ADD_UQUAD.9 \ sysctl_add_oid.9 SYSCTL_CHILDREN.9 \ sysctl_add_oid.9 sysctl_move_oid.9 \ sysctl_add_oid.9 sysctl_remove_oid.9 \ Modified: stable/9/share/man/man9/sysctl.9 ============================================================================== --- stable/9/share/man/man9/sysctl.9 Thu Nov 14 21:27:19 2013 (r258145) +++ stable/9/share/man/man9/sysctl.9 Thu Nov 14 21:31:58 2013 (r258146) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2010 +.Dd September 12, 2013 .Dt SYSCTL 9 .Os .Sh NAME @@ -35,11 +35,12 @@ .Nm SYSCTL_NODE , .Nm SYSCTL_OPAQUE , .Nm SYSCTL_PROC , +.Nm SYSCTL_QUAD , .Nm SYSCTL_STRING , .Nm SYSCTL_STRUCT , .Nm SYSCTL_UINT , .Nm SYSCTL_ULONG , -.Nm SYSCTL_QUAD +.Nm SYSCTL_UQUAD .Nd Static sysctl declaration functions .Sh SYNOPSIS .In sys/types.h @@ -50,11 +51,12 @@ .Fn SYSCTL_NODE parent nbr name access handler descr .Fn SYSCTL_OPAQUE parent nbr name access ptr len fmt descr .Fn SYSCTL_PROC parent nbr name access ptr arg handler fmt descr +.Fn SYSCTL_QUAD parent nbr name access ptr val descr .Fn SYSCTL_STRING parent nbr name access arg len descr .Fn SYSCTL_STRUCT parent nbr name access ptr type descr .Fn SYSCTL_UINT parent nbr name access ptr val descr .Fn SYSCTL_ULONG parent nbr name access ptr val descr -.Fn SYSCTL_QUAD parent nbr name access ptr val descr +.Fn SYSCTL_UQUAD parent nbr name access ptr val descr .Sh DESCRIPTION The .Nm SYSCTL @@ -76,12 +78,13 @@ New nodes are declared using one of .Fn SYSCTL_NODE , .Fn SYSCTL_OPAQUE , .Fn SYSCTL_PROC , +.Fn SYSCTL_QUAD , .Fn SYSCTL_STRING , .Fn SYSCTL_STRUCT , .Fn SYSCTL_UINT , .Fn SYSCTL_ULONG , and -.Fn SYSCTL_QUAD . +.Fn SYSCTL_UQUAD . Each macro accepts a parent name, as declared using .Fn SYSCTL_DECL , an OID number, typically @@ -118,15 +121,23 @@ This is an unsigned long. This is a 64-bit unsigned integer. .El .Pp -All sysctl types except for new node declarations require one or more flags -to be set indicating the read and write disposition of the sysctl: +All sysctl types except for new node declarations require one of the following +flags to be set indicating the read and write disposition of the sysctl: .Bl -tag -width ".Dv CTLFLAG_ANYBODY" .It Dv CTLFLAG_RD This is a read-only sysctl. +.It Dv CTLFLAG_RDTUN +This is a read-only sysctl which can be set by a system tunable. .It Dv CTLFLAG_WR This is a writable sysctl. .It Dv CTLFLAG_RW This sysctl is readable and writable. +.It Dv CTLFLAG_RWTUN +This sysctl is readable and writable and can also be set by a system tunable. +.El +.Pp +Additionally, any of the following optional flags may also be specified: +.Bl -tag -width ".Dv CTLFLAG_ANYBODY" .It Dv CTLFLAG_ANYBODY Any user or process can write to this sysctl. .It Dv CTLFLAG_SECURE @@ -139,9 +150,6 @@ This sysctl can be written to by process When iterating the sysctl name space, do not list this sysctl. .It Dv CTLFLAG_TUN Advisory flag that a system tunable also exists for this variable. -.It Dv CTLFLAG_RDTUN -Advisory flag that a system tunable also exists for this variable; -however, the run-time variable is read-only. .El .Pp When creating new sysctls, careful attention should be paid to the security Modified: stable/9/share/man/man9/sysctl_add_oid.9 ============================================================================== --- stable/9/share/man/man9/sysctl_add_oid.9 Thu Nov 14 21:27:19 2013 (r258145) +++ stable/9/share/man/man9/sysctl_add_oid.9 Thu Nov 14 21:31:58 2013 (r258146) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2000 +.Dd September 12, 2013 .Dt SYSCTL_ADD_OID 9 .Os .Sh NAME @@ -157,6 +157,16 @@ .Fa "const char *descr" .Fc .Ft struct sysctl_oid * +.Fo SYSCTL_ADD_UQUAD +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int access" +.Fa "uint64_t *arg" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * .Fo SYSCTL_ADD_OPAQUE .Fa "struct sysctl_ctx_list *ctx" .Fa "struct sysctl_oid_list *parent" From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 15 07:14:02 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FE3AB11; Fri, 15 Nov 2013 07:14:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F13F227E; Fri, 15 Nov 2013 07:14:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAF7E2kV094165; Fri, 15 Nov 2013 07:14:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAF7E2ta094163; Fri, 15 Nov 2013 07:14:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311150714.rAF7E2ta094163@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 15 Nov 2013 07:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258160 - stable/9/sys/i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 07:14:02 -0000 Author: kib Date: Fri Nov 15 07:14:01 2013 New Revision: 258160 URL: http://svnweb.freebsd.org/changeset/base/258160 Log: MFC r257858: Fix signal delivery for the iBCS2 binaries. Modified: stable/9/sys/i386/i386/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/machdep.c ============================================================================== --- stable/9/sys/i386/i386/machdep.c Fri Nov 15 07:10:42 2013 (r258159) +++ stable/9/sys/i386/i386/machdep.c Fri Nov 15 07:14:01 2013 (r258160) @@ -758,6 +758,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs->tf_esp = (int)sfp; regs->tf_eip = p->p_sysent->sv_sigcode_base; + if (regs->tf_eip == 0) + regs->tf_eip = p->p_sysent->sv_psstrings - szsigcode; regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 15 07:26:51 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6959313; Fri, 15 Nov 2013 07:26:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B567E2378; Fri, 15 Nov 2013 07:26:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAF7QpCq097895; Fri, 15 Nov 2013 07:26:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAF7Qojh097890; Fri, 15 Nov 2013 07:26:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311150726.rAF7Qojh097890@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 15 Nov 2013 07:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258161 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 07:26:52 -0000 Author: kib Date: Fri Nov 15 07:26:50 2013 New Revision: 258161 URL: http://svnweb.freebsd.org/changeset/base/258161 Log: MFC r257856: Add bits for the AMD features from CPUID function 0x80000001 ECX, described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf. Modified: stable/9/sys/amd64/amd64/identcpu.c stable/9/sys/amd64/include/specialreg.h stable/9/sys/i386/i386/identcpu.c stable/9/sys/i386/include/specialreg.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/9/sys/amd64/amd64/identcpu.c Fri Nov 15 07:14:01 2013 (r258160) +++ stable/9/sys/amd64/amd64/identcpu.c Fri Nov 15 07:26:50 2013 (r258161) @@ -366,18 +366,18 @@ printcpuinfo(void) "\017" "\020LWP" /* Lightweight Profiling */ "\021FMA4" /* 4-operand FMA instructions */ - "\022" + "\022TCE" /* Translation Cache Extension */ "\023" "\024NodeId" /* NodeId MSR support */ "\025" "\026TBM" /* Trailing Bit Manipulation */ "\027Topology" /* Topology Extensions */ - "\030" - "\031" + "\030PCXC" /* Core perf count */ + "\031PNXC" /* NB perf count */ "\032" - "\033" - "\034" - "\035" + "\033DBE" /* Data Breakpoint extension */ + "\034PTSC" /* Performance TSC */ + "\035PL2I" /* L2I perf count */ "\036" "\037" "\040" Modified: stable/9/sys/amd64/include/specialreg.h ============================================================================== --- stable/9/sys/amd64/include/specialreg.h Fri Nov 15 07:14:01 2013 (r258160) +++ stable/9/sys/amd64/include/specialreg.h Fri Nov 15 07:26:50 2013 (r258161) @@ -201,9 +201,15 @@ #define AMDID2_WDT 0x00002000 #define AMDID2_LWP 0x00008000 #define AMDID2_FMA4 0x00010000 +#define AMDID2_TCE 0x00020000 #define AMDID2_NODE_ID 0x00080000 #define AMDID2_TBM 0x00200000 #define AMDID2_TOPOLOGY 0x00400000 +#define AMDID2_PCXC 0x00800000 +#define AMDID2_PNXC 0x01000000 +#define AMDID2_DBE 0x04000000 +#define AMDID2_PTSC 0x08000000 +#define AMDID2_PTSCEL2I 0x10000000 /* * CPUID instruction 1 eax info Modified: stable/9/sys/i386/i386/identcpu.c ============================================================================== --- stable/9/sys/i386/i386/identcpu.c Fri Nov 15 07:14:01 2013 (r258160) +++ stable/9/sys/i386/i386/identcpu.c Fri Nov 15 07:26:50 2013 (r258161) @@ -842,18 +842,18 @@ printcpuinfo(void) "\017" "\020LWP" /* Lightweight Profiling */ "\021FMA4" /* 4-operand FMA instructions */ - "\022" + "\022TCE" /* Translation Cache Extension */ "\023" "\024NodeId" /* NodeId MSR support */ "\025" "\026TBM" /* Trailing Bit Manipulation */ "\027Topology" /* Topology Extensions */ - "\030" - "\031" + "\030PCXC" /* Core perf count */ + "\031PNXC" /* NB perf count */ "\032" - "\033" - "\034" - "\035" + "\033DBE" /* Data Breakpoint extension */ + "\034PTSC" /* Performance TSC */ + "\035PL2I" /* L2I perf count */ "\036" "\037" "\040" Modified: stable/9/sys/i386/include/specialreg.h ============================================================================== --- stable/9/sys/i386/include/specialreg.h Fri Nov 15 07:14:01 2013 (r258160) +++ stable/9/sys/i386/include/specialreg.h Fri Nov 15 07:26:50 2013 (r258161) @@ -180,9 +180,15 @@ #define AMDID2_WDT 0x00002000 #define AMDID2_LWP 0x00008000 #define AMDID2_FMA4 0x00010000 +#define AMDID2_TCE 0x00020000 #define AMDID2_NODE_ID 0x00080000 #define AMDID2_TBM 0x00200000 #define AMDID2_TOPOLOGY 0x00400000 +#define AMDID2_PCXC 0x00800000 +#define AMDID2_PNXC 0x01000000 +#define AMDID2_DBE 0x04000000 +#define AMDID2_PTSC 0x08000000 +#define AMDID2_PTSCEL2I 0x10000000 /* * CPUID instruction 1 eax info From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 15 15:08:54 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C9544F7; Fri, 15 Nov 2013 15:08:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EFD602F20; Fri, 15 Nov 2013 15:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAFF8rvw055204; Fri, 15 Nov 2013 15:08:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAFF8rDt055203; Fri, 15 Nov 2013 15:08:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311151508.rAFF8rDt055203@svn.freebsd.org> From: John Baldwin Date: Fri, 15 Nov 2013 15:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258171 - stable/9/sys/boot/i386/btx/btx X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 15:08:54 -0000 Author: jhb Date: Fri Nov 15 15:08:53 2013 New Revision: 258171 URL: http://svnweb.freebsd.org/changeset/base/258171 Log: MFC 256293: Sanitize the %eflags returned by BIOS routines. Some BIOS routines enter protected mode and may leave protected-mode-specific flags like PSL_NT set when they return to real mode. This can cause a fault when BTX re-enters protected mode after the BIOS mode returns. PR: amd64/182740 Modified: stable/9/sys/boot/i386/btx/btx/btx.S Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/btx/btx/btx.S ============================================================================== --- stable/9/sys/boot/i386/btx/btx/btx.S Fri Nov 15 13:55:55 2013 (r258170) +++ stable/9/sys/boot/i386/btx/btx/btx.S Fri Nov 15 15:08:53 2013 (r258171) @@ -41,6 +41,8 @@ .set PSL_RESERVED_DEFAULT,0x00000002 .set PSL_T,0x00000100 # Trap flag .set PSL_I,0x00000200 # Interrupt enable flag + .set PSL_D,0x00000400 # String instruction direction + .set PSL_NT,0x00004000 # Nested task flag .set PSL_VM,0x00020000 # Virtual 8086 mode flag .set PSL_AC,0x00040000 # Alignment check flag /* @@ -611,8 +613,8 @@ rret_tramp: movw $MEM_ESPR-0x08,%sp # R pushl %ds # regs pushl %es pushfl # Save %eflags - cli # Disable interrupts - std # String ops dec + pushl $PSL_RESERVED_DEFAULT|PSL_D # Use clean %eflags with + popfl # string ops dec xorw %ax,%ax # Reset seg movw %ax,%ds # regs movw %ax,%es # (%ss is already 0) @@ -675,6 +677,7 @@ rret_tramp.1: xorl %ecx,%ecx # Zero testl $V86F_FLAGS,%edx # User wants flags? jz rret_tramp.3 # No movl MEM_ESPR-0x3c,%eax # Read real mode flags + andl $~(PSL_T|PSL_NT),%eax # Clear unsafe flags movw %ax,-0x08(%esi) # Update user flags (low 16) /* * Return to the user task From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 15 19:58:26 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB181C47; Fri, 15 Nov 2013 19:58:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FED221B5; Fri, 15 Nov 2013 19:58:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAFJwQEC055649; Fri, 15 Nov 2013 19:58:26 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAFJwQHL055647; Fri, 15 Nov 2013 19:58:26 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311151958.rAFJwQHL055647@svn.freebsd.org> From: John Baldwin Date: Fri, 15 Nov 2013 19:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258183 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 19:58:26 -0000 Author: jhb Date: Fri Nov 15 19:58:26 2013 New Revision: 258183 URL: http://svnweb.freebsd.org/changeset/base/258183 Log: MFC 256274: Ignore attempts to set the nmbcluster sysctls to their current value rather than failing with an error. Modified: stable/9/sys/kern/kern_mbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_mbuf.c ============================================================================== --- stable/9/sys/kern/kern_mbuf.c Fri Nov 15 19:56:28 2013 (r258182) +++ stable/9/sys/kern/kern_mbuf.c Fri Nov 15 19:58:26 2013 (r258183) @@ -163,7 +163,7 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) newnmbclusters = nmbclusters; error = sysctl_handle_int(oidp, &newnmbclusters, 0, req); - if (error == 0 && req->newptr) { + if (error == 0 && req->newptr && newnmbclusters != nmbclusters) { if (newnmbclusters > nmbclusters && nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) { nmbclusters = newnmbclusters; @@ -185,7 +185,7 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS) newnmbjumbop = nmbjumbop; error = sysctl_handle_int(oidp, &newnmbjumbop, 0, req); - if (error == 0 && req->newptr) { + if (error == 0 && req->newptr && newnmbjumbop != nmbjumbop) { if (newnmbjumbop > nmbjumbop && nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) { nmbjumbop = newnmbjumbop; @@ -206,7 +206,7 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS) newnmbjumbo9 = nmbjumbo9; error = sysctl_handle_int(oidp, &newnmbjumbo9, 0, req); - if (error == 0 && req->newptr) { + if (error == 0 && req->newptr && newnmbjumbo9 != nmbjumbo9) { if (newnmbjumbo9 > nmbjumbo9 && nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) { nmbjumbo9 = newnmbjumbo9; @@ -227,7 +227,7 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS) newnmbjumbo16 = nmbjumbo16; error = sysctl_handle_int(oidp, &newnmbjumbo16, 0, req); - if (error == 0 && req->newptr) { + if (error == 0 && req->newptr && newnmbjumbo16 != nmbjumbo16) { if (newnmbjumbo16 > nmbjumbo16 && nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) { nmbjumbo16 = newnmbjumbo16; @@ -248,7 +248,7 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS) newnmbufs = nmbufs; error = sysctl_handle_int(oidp, &newnmbufs, 0, req); - if (error == 0 && req->newptr) { + if (error == 0 && req->newptr && newnmbufs != nmbufs) { if (newnmbufs > nmbufs) { nmbufs = newnmbufs; nmbufs = uma_zone_set_max(zone_mbuf, nmbufs); From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 15 20:23:53 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19C7F636; Fri, 15 Nov 2013 20:23:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08CCB2303; Fri, 15 Nov 2013 20:23:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAFKNqtN065822; Fri, 15 Nov 2013 20:23:52 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAFKNqhh065821; Fri, 15 Nov 2013 20:23:52 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201311152023.rAFKNqhh065821@svn.freebsd.org> From: Alan Somers Date: Fri, 15 Nov 2013 20:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258186 - stable/9/sbin/geom/class/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 20:23:53 -0000 Author: asomers Date: Fri Nov 15 20:23:52 2013 New Revision: 258186 URL: http://svnweb.freebsd.org/changeset/base/258186 Log: MFC 257006 sbin/geom/class/part/geom_part.c Always validate the return of find_geomcfg(). It could be NULL, for example when the geom is withering. Approved by: ken(mentor) Sponsored by: Spectra Logic Corporation Modified: stable/9/sbin/geom/class/part/geom_part.c Directory Properties: stable/9/sbin/geom/class/part/ (props changed) Modified: stable/9/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/9/sbin/geom/class/part/geom_part.c Fri Nov 15 20:01:07 2013 (r258185) +++ stable/9/sbin/geom/class/part/geom_part.c Fri Nov 15 20:23:52 2013 (r258186) @@ -364,7 +364,11 @@ gpart_autofill_resize(struct gctl_req *r } offset = (pp->lg_stripeoffset / pp->lg_sectorsize) % alignment; - last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); + s = find_geomcfg(gp, "last"); + if (s == NULL) + errx(EXIT_FAILURE, "Final block not found for geom %s", + gp->lg_name); + last = (off_t)strtoimax(s, NULL, 0); LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { s = find_provcfg(pp, "index"); if (s == NULL) @@ -502,8 +506,16 @@ gpart_autofill(struct gctl_req *req) if (size > alignment) size = ALIGNDOWN(size, alignment); - first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0); - last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); + s = find_geomcfg(gp, "first"); + if (s == NULL) + errx(EXIT_FAILURE, "Starting block not found for geom %s", + gp->lg_name); + first = (off_t)strtoimax(s, NULL, 0); + s = find_geomcfg(gp, "last"); + if (s == NULL) + errx(EXIT_FAILURE, "Final block not found for geom %s", + gp->lg_name); + last = (off_t)strtoimax(s, NULL, 0); grade = ~0ULL; a_first = ALIGNUP(first + offset, alignment); last = ALIGNDOWN(last + offset, alignment); @@ -587,12 +599,22 @@ gpart_show_geom(struct ggeom *gp, const int idx, wblocks, wname, wmax; scheme = find_geomcfg(gp, "scheme"); + if (scheme == NULL) + errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); s = find_geomcfg(gp, "first"); + if (s == NULL) + errx(EXIT_FAILURE, "Starting block not found for geom %s", + gp->lg_name); first = (off_t)strtoimax(s, NULL, 0); s = find_geomcfg(gp, "last"); + if (s == NULL) + errx(EXIT_FAILURE, "Final block not found for geom %s", + gp->lg_name); last = (off_t)strtoimax(s, NULL, 0); wblocks = strlen(s); s = find_geomcfg(gp, "state"); + if (s == NULL) + errx(EXIT_FAILURE, "State not found for geom %s", gp->lg_name); if (s != NULL && *s != 'C') s = NULL; wmax = strlen(gp->lg_name); @@ -748,6 +770,8 @@ gpart_backup(struct gctl_req *req, unsig abort(); pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; s = find_geomcfg(gp, "last"); + if (s == NULL) + abort(); wblocks = strlen(s); wtype = 0; LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { @@ -757,6 +781,8 @@ gpart_backup(struct gctl_req *req, unsig wtype = i; } s = find_geomcfg(gp, "entries"); + if (s == NULL) + abort(); windex = strlen(s); printf("%s %s\n", scheme, s); LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { @@ -1177,6 +1203,8 @@ gpart_bootcode(struct gctl_req *req, uns if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", s); s = find_geomcfg(gp, "scheme"); + if (s == NULL) + errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); vtoc8 = 0; if (strcmp(s, "VTOC8") == 0) vtoc8 = 1; From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:34:17 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F3BF1B1; Sat, 16 Nov 2013 10:34:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F66C295D; Sat, 16 Nov 2013 10:34:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAYHvW055680; Sat, 16 Nov 2013 10:34:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAYGTX055677; Sat, 16 Nov 2013 10:34:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161034.rAGAYGTX055677@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258213 - in stable/9/sys/dev: mvs siis X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:34:17 -0000 Author: mav Date: Sat Nov 16 10:34:16 2013 New Revision: 258213 URL: http://svnweb.freebsd.org/changeset/base/258213 Log: MFC r249622: Make siis(4) and mvs(4) send bus_get_dma_tag() requests to parent buses passing real bus' child pointers instead of grandchilds. Modified: stable/9/sys/dev/mvs/mvs_pci.c stable/9/sys/dev/mvs/mvs_soc.c stable/9/sys/dev/siis/siis.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_pci.c Sat Nov 16 09:01:24 2013 (r258212) +++ stable/9/sys/dev/mvs/mvs_pci.c Sat Nov 16 10:34:16 2013 (r258213) @@ -488,6 +488,13 @@ mvs_child_location_str(device_t dev, dev return (0); } +static bus_dma_tag_t +mvs_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + static device_method_t mvs_methods[] = { DEVMETHOD(device_probe, mvs_probe), DEVMETHOD(device_attach, mvs_attach), @@ -500,6 +507,7 @@ static device_method_t mvs_methods[] = { DEVMETHOD(bus_setup_intr, mvs_setup_intr), DEVMETHOD(bus_teardown_intr,mvs_teardown_intr), DEVMETHOD(bus_child_location_str, mvs_child_location_str), + DEVMETHOD(bus_get_dma_tag, mvs_get_dma_tag), DEVMETHOD(mvs_edma, mvs_edma), { 0, 0 } }; Modified: stable/9/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_soc.c Sat Nov 16 09:01:24 2013 (r258212) +++ stable/9/sys/dev/mvs/mvs_soc.c Sat Nov 16 10:34:16 2013 (r258213) @@ -429,6 +429,13 @@ mvs_child_location_str(device_t dev, dev return (0); } +static bus_dma_tag_t +mvs_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + static device_method_t mvs_methods[] = { DEVMETHOD(device_probe, mvs_probe), DEVMETHOD(device_attach, mvs_attach), @@ -440,8 +447,9 @@ static device_method_t mvs_methods[] = { DEVMETHOD(bus_release_resource, mvs_release_resource), DEVMETHOD(bus_setup_intr, mvs_setup_intr), DEVMETHOD(bus_teardown_intr,mvs_teardown_intr), - DEVMETHOD(mvs_edma, mvs_edma), DEVMETHOD(bus_child_location_str, mvs_child_location_str), + DEVMETHOD(bus_get_dma_tag, mvs_get_dma_tag), + DEVMETHOD(mvs_edma, mvs_edma), { 0, 0 } }; static driver_t mvs_driver = { Modified: stable/9/sys/dev/siis/siis.c ============================================================================== --- stable/9/sys/dev/siis/siis.c Sat Nov 16 09:01:24 2013 (r258212) +++ stable/9/sys/dev/siis/siis.c Sat Nov 16 10:34:16 2013 (r258213) @@ -414,6 +414,13 @@ siis_child_location_str(device_t dev, de return (0); } +static bus_dma_tag_t +siis_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + devclass_t siis_devclass; static device_method_t siis_methods[] = { DEVMETHOD(device_probe, siis_probe), @@ -427,6 +434,7 @@ static device_method_t siis_methods[] = DEVMETHOD(bus_setup_intr, siis_setup_intr), DEVMETHOD(bus_teardown_intr,siis_teardown_intr), DEVMETHOD(bus_child_location_str, siis_child_location_str), + DEVMETHOD(bus_get_dma_tag, siis_get_dma_tag), { 0, 0 } }; static driver_t siis_driver = { From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:40:43 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0A593F6; Sat, 16 Nov 2013 10:40:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 902C2299B; Sat, 16 Nov 2013 10:40:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAeh3q058502; Sat, 16 Nov 2013 10:40:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAehx7058501; Sat, 16 Nov 2013 10:40:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161040.rAGAehx7058501@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258214 - stable/9/sys/dev/ichsmb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:40:43 -0000 Author: mav Date: Sat Nov 16 10:40:43 2013 New Revision: 258214 URL: http://svnweb.freebsd.org/changeset/base/258214 Log: MFC r244981 (by jfv) Add Intel Lynx Point PCH SMBus Device IDs Modified: stable/9/sys/dev/ichsmb/ichsmb_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Nov 16 10:34:16 2013 (r258213) +++ stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Nov 16 10:40:43 2013 (r258214) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #define ID_PATSBURG 0x1d228086 #define ID_CPT 0x1c228086 #define ID_PPT 0x1e228086 +#define ID_LPT 0x8c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -188,6 +189,9 @@ ichsmb_pci_probe(device_t dev) case ID_PPT: device_set_desc(dev, "Intel Panther Point SMBus controller"); break; + case ID_LPT: + device_set_desc(dev, "Intel Lynx Point SMBus controller"); + break; default: return (ENXIO); } From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:41:51 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1746F53A; Sat, 16 Nov 2013 10:41:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0610029CB; Sat, 16 Nov 2013 10:41:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAfoeP058830; Sat, 16 Nov 2013 10:41:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAfnTO058822; Sat, 16 Nov 2013 10:41:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161041.rAGAfnTO058822@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258215 - in stable/9/sys/dev: ahci ata ata/chipsets ichsmb ichwd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:41:51 -0000 Author: mav Date: Sat Nov 16 10:41:49 2013 New Revision: 258215 URL: http://svnweb.freebsd.org/changeset/base/258215 Log: MFC r253475 (by jfv): Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices. Modified: stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ata/ata-pci.h stable/9/sys/dev/ata/chipsets/ata-intel.c stable/9/sys/dev/ichsmb/ichsmb_pci.c stable/9/sys/dev/ichwd/ichwd.c stable/9/sys/dev/ichwd/ichwd.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Nov 16 10:40:43 2013 (r258214) +++ stable/9/sys/dev/ahci/ahci.c Sat Nov 16 10:41:49 2013 (r258215) @@ -202,6 +202,7 @@ static struct { {0x1e078086, 0x00, "Intel Panther Point", 0}, {0x1e0e8086, 0x00, "Intel Panther Point", 0}, {0x1e0f8086, 0x00, "Intel Panther Point", 0}, + {0x23a38086, 0x00, "Intel Coleto Creek", 0}, {0x8c028086, 0x00, "Intel Lynx Point", 0}, {0x8c038086, 0x00, "Intel Lynx Point", 0}, {0x8c048086, 0x00, "Intel Lynx Point", 0}, Modified: stable/9/sys/dev/ata/ata-pci.h ============================================================================== --- stable/9/sys/dev/ata/ata-pci.h Sat Nov 16 10:40:43 2013 (r258214) +++ stable/9/sys/dev/ata/ata-pci.h Sat Nov 16 10:41:49 2013 (r258215) @@ -277,6 +277,10 @@ struct ata_pci_controller { #define ATA_ISCH 0x811a8086 #define ATA_DH89XXCC 0x23238086 +#define ATA_COLETOCRK_AH1 0x23a38086 +#define ATA_COLETOCRK_S1 0x23a18086 +#define ATA_COLETOCRK_S2 0x23a68086 + #define ATA_ITE_ID 0x1283 #define ATA_IT8211F 0x82111283 #define ATA_IT8212F 0x82121283 Modified: stable/9/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-intel.c Sat Nov 16 10:40:43 2013 (r258214) +++ stable/9/sys/dev/ata/chipsets/ata-intel.c Sat Nov 16 10:41:49 2013 (r258215) @@ -227,6 +227,9 @@ ata_intel_probe(device_t dev) { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, + { ATA_COLETOCRK_S1, 0, INTEL_6CH2, 0, ATA_SA300, "COLETOCRK" }, + { ATA_COLETOCRK_S2, 0, INTEL_6CH2, 0, ATA_SA300, "COLETOCRK" }, + { ATA_COLETOCRK_AH1,0, INTEL_AHCI, 0, ATA_SA300, "COLETOCRK" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_INTEL_ID) Modified: stable/9/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Nov 16 10:40:43 2013 (r258214) +++ stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Nov 16 10:41:49 2013 (r258215) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #define ID_PATSBURG 0x1d228086 #define ID_CPT 0x1c228086 #define ID_PPT 0x1e228086 +#define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -192,6 +193,9 @@ ichsmb_pci_probe(device_t dev) case ID_LPT: device_set_desc(dev, "Intel Lynx Point SMBus controller"); break; + case ID_COLETOCRK: + device_set_desc(dev, "Intel Coleto Creek SMBus controller"); + break; default: return (ENXIO); } Modified: stable/9/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/9/sys/dev/ichwd/ichwd.c Sat Nov 16 10:40:43 2013 (r258214) +++ stable/9/sys/dev/ichwd/ichwd.c Sat Nov 16 10:41:49 2013 (r258215) @@ -192,6 +192,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_PPT30, "Intel Panther Point watchdog timer", 10 }, { DEVICEID_PPT31, "Intel Panther Point watchdog timer", 10 }, { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, + { DEVICEID_COLETOCRK_LPC, "Intel Coleto Creek watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: stable/9/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/9/sys/dev/ichwd/ichwd.h Sat Nov 16 10:40:43 2013 (r258214) +++ stable/9/sys/dev/ichwd/ichwd.h Sat Nov 16 10:41:49 2013 (r258215) @@ -126,6 +126,7 @@ struct ichwd_softc { #define DEVICEID_PPT30 0x1e5e #define DEVICEID_PPT31 0x1e5f #define DEVICEID_DH89XXCC_LPC 0x2310 +#define DEVICEID_COLETOCRK_LPC 0x2390 #define DEVICEID_82801AA 0x2410 #define DEVICEID_82801AB 0x2420 #define DEVICEID_82801BA 0x2440 From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:43:02 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E58AB680; Sat, 16 Nov 2013 10:43:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB9A529DA; Sat, 16 Nov 2013 10:43:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAh2gO059020; Sat, 16 Nov 2013 10:43:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAh2Z2059018; Sat, 16 Nov 2013 10:43:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161043.rAGAh2Z2059018@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258216 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:43:03 -0000 Author: mav Date: Sat Nov 16 10:43:02 2013 New Revision: 258216 URL: http://svnweb.freebsd.org/changeset/base/258216 Log: MFC r253647: Decode some bits defined in AHCI 1.3.1 Device Sleep Technical Proposal. For now this is only conmetics to report HBA capabilities (Haswell?). Modified: stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ahci/ahci.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Nov 16 10:41:49 2013 (r258215) +++ stable/9/sys/dev/ahci/ahci.c Sat Nov 16 10:43:02 2013 (r258216) @@ -545,7 +545,10 @@ ahci_attach(device_t dev) (ctlr->caps & AHCI_CAP_NPMASK) + 1); } if (bootverbose && version >= 0x00010200) { - device_printf(dev, "Caps2:%s%s%s\n", + device_printf(dev, "Caps2:%s%s%s%s%s%s\n", + (ctlr->caps2 & AHCI_CAP2_DESO) ? " DESO":"", + (ctlr->caps2 & AHCI_CAP2_SADM) ? " SADM":"", + (ctlr->caps2 & AHCI_CAP2_SDS) ? " SDS":"", (ctlr->caps2 & AHCI_CAP2_APST) ? " APST":"", (ctlr->caps2 & AHCI_CAP2_NVMP) ? " NVMP":"", (ctlr->caps2 & AHCI_CAP2_BOH) ? " BOH":""); Modified: stable/9/sys/dev/ahci/ahci.h ============================================================================== --- stable/9/sys/dev/ahci/ahci.h Sat Nov 16 10:41:49 2013 (r258215) +++ stable/9/sys/dev/ahci/ahci.h Sat Nov 16 10:43:02 2013 (r258216) @@ -100,6 +100,7 @@ #define ATA_SS_IPM_ACTIVE 0x00000100 #define ATA_SS_IPM_PARTIAL 0x00000200 #define ATA_SS_IPM_SLUMBER 0x00000600 +#define ATA_SS_IPM_DEVSLEEP 0x00000800 #define ATA_SERROR 14 #define ATA_SE_DATA_CORRECTED 0x00000001 @@ -205,6 +206,9 @@ #define AHCI_CAP2_BOH 0x00000001 #define AHCI_CAP2_NVMP 0x00000002 #define AHCI_CAP2_APST 0x00000004 +#define AHCI_CAP2_SDS 0x00000008 +#define AHCI_CAP2_SADM 0x00000010 +#define AHCI_CAP2_DESO 0x00000020 #define AHCI_OFFSET 0x100 #define AHCI_STEP 0x80 @@ -262,6 +266,7 @@ #define AHCI_P_CMD_ACTIVE 0x10000000 #define AHCI_P_CMD_PARTIAL 0x20000000 #define AHCI_P_CMD_SLUMBER 0x60000000 +#define AHCI_P_CMD_DEVSLEEP 0x80000000 #define AHCI_P_TFD 0x20 #define AHCI_P_SIG 0x24 From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:44:18 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C7A87C1; Sat, 16 Nov 2013 10:44:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7BCC029E5; Sat, 16 Nov 2013 10:44:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAiIYJ059246; Sat, 16 Nov 2013 10:44:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAiI7h059244; Sat, 16 Nov 2013 10:44:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161044.rAGAiI7h059244@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258217 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:44:18 -0000 Author: mav Date: Sat Nov 16 10:44:17 2013 New Revision: 258217 URL: http://svnweb.freebsd.org/changeset/base/258217 Log: MFC r254987 (by gavin): Support the PCI-Express SSD in the new MacBook Air (model A1465) Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Nov 16 10:43:02 2013 (r258216) +++ stable/9/sys/dev/ahci/ahci.c Sat Nov 16 10:44:17 2013 (r258217) @@ -235,6 +235,7 @@ static struct { {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, + {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:48:00 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C448593E; Sat, 16 Nov 2013 10:48:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B23322A00; Sat, 16 Nov 2013 10:48:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAm0UC059774; Sat, 16 Nov 2013 10:48:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAlwIj059755; Sat, 16 Nov 2013 10:47:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161047.rAGAlwIj059755@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258218 - in stable/9/sys: dev/ata dev/uart dev/usb/serial fs/fdescfs mips/mips netgraph/bluetooth/hci ufs/ffs x86/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:48:00 -0000 Author: mav Date: Sat Nov 16 10:47:58 2013 New Revision: 258218 URL: http://svnweb.freebsd.org/changeset/base/258218 Log: MFC r250576 (by eadler): Fix several typos PR: kern/176054 Modified: stable/9/sys/dev/ata/ata-lowlevel.c stable/9/sys/dev/uart/uart_core.c stable/9/sys/dev/usb/serial/usb_serial.c stable/9/sys/dev/usb/serial/usb_serial.h stable/9/sys/fs/fdescfs/fdesc_vnops.c stable/9/sys/mips/mips/stack_machdep.c stable/9/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c stable/9/sys/ufs/ffs/ffs_balloc.c stable/9/sys/x86/x86/local_apic.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/dev/ata/ata-lowlevel.c ============================================================================== --- stable/9/sys/dev/ata/ata-lowlevel.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/dev/ata/ata-lowlevel.c Sat Nov 16 10:47:58 2013 (r258218) @@ -505,7 +505,7 @@ ata_generic_reset(device_t dev) mask, ostat0, ostat1); /* if nothing showed up there is no need to get any further */ - /* XXX SOS is that too strong?, we just might loose devices here */ + /* XXX SOS is that too strong?, we just might lose devices here */ ch->devices = 0; if (!mask) return; Modified: stable/9/sys/dev/uart/uart_core.c ============================================================================== --- stable/9/sys/dev/uart/uart_core.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/dev/uart/uart_core.c Sat Nov 16 10:47:58 2013 (r258218) @@ -131,7 +131,7 @@ uart_intr_break(void *arg) * much of the data we can, but otherwise flush the receiver FIFO to * create some breathing room. The net effect is that we avoid the * overrun condition to happen for the next X characters, where X is - * related to the FIFO size at the cost of loosing data right away. + * related to the FIFO size at the cost of losing data right away. * So, instead of having multiple overrun interrupts in close proximity * to each other and possibly pessimizing UART interrupt latency for * other UARTs in a multiport configuration, we create a longer segment @@ -186,7 +186,7 @@ uart_intr_rxready(void *arg) * Line or modem status change (OOB signalling). * We pass the signals to the software interrupt handler for further * processing. Note that we merge the delta bits, but set the state - * bits. This is to avoid loosing state transitions due to having more + * bits. This is to avoid losing state transitions due to having more * than 1 hardware interrupt between software interrupts. */ static __inline int Modified: stable/9/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/dev/usb/serial/usb_serial.c Sat Nov 16 10:47:58 2013 (r258218) @@ -965,7 +965,7 @@ ucom_cfg_line_state(struct usb_proc_msg sc->sc_pls_set = 0; sc->sc_pls_clr = 0; - /* ensure that we don't loose any levels */ + /* ensure that we don't lose any levels */ if (notch_bits & UCOM_LS_DTR) sc->sc_callback->ucom_cfg_set_dtr(sc, (prev_value & UCOM_LS_DTR) ? 1 : 0); Modified: stable/9/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/9/sys/dev/usb/serial/usb_serial.h Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/dev/usb/serial/usb_serial.h Sat Nov 16 10:47:58 2013 (r258218) @@ -146,7 +146,7 @@ struct ucom_super_softc { struct ucom_softc { /* - * NOTE: To avoid loosing level change information we use two + * NOTE: To avoid losing level change information we use two * tasks instead of one for all commands. * * Level changes are transitions like: Modified: stable/9/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- stable/9/sys/fs/fdescfs/fdesc_vnops.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/fs/fdescfs/fdesc_vnops.c Sat Nov 16 10:47:58 2013 (r258218) @@ -333,7 +333,7 @@ fdesc_lookup(ap) * and the root vnode lock will be obtained afterwards (in case * we're looking up the fd of the root vnode), which will be the * opposite lock order. Vhold the root vnode first so we don't - * loose it. + * lose it. */ vhold(dvp); VOP_UNLOCK(dvp, 0); Modified: stable/9/sys/mips/mips/stack_machdep.c ============================================================================== --- stable/9/sys/mips/mips/stack_machdep.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/mips/mips/stack_machdep.c Sat Nov 16 10:47:58 2013 (r258218) @@ -148,7 +148,7 @@ stack_save(struct stack *st) u_register_t pc, sp; if (curthread == NULL) - panic("stack_save: curthread == NULL)"); + panic("stack_save: curthread == NULL"); pc = curthread->td_pcb->pcb_regs.pc; sp = curthread->td_pcb->pcb_regs.sp; Modified: stable/9/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c ============================================================================== --- stable/9/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c Sat Nov 16 10:47:58 2013 (r258218) @@ -391,7 +391,7 @@ ng_hci_lp_sco_con_req(ng_hci_unit_p unit default: panic( -"%s: %s - Inavalid connection state=%d\n", +"%s: %s - Invalid connection state=%d\n", __func__, NG_NODE_NAME(unit->node), sco_con->state); break; Modified: stable/9/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_balloc.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/ufs/ffs/ffs_balloc.c Sat Nov 16 10:47:58 2013 (r258218) @@ -1033,7 +1033,7 @@ fail: * We have to sync it at the end so that the soft updates code * does not find any untracked changes. Although this is really * slow, running out of disk space is not expected to be a common - * occurence. The error return from fsync is ignored as we already + * occurrence. The error return from fsync is ignored as we already * have an error to return to the user. * * XXX Still have to journal the free below Modified: stable/9/sys/x86/x86/local_apic.c ============================================================================== --- stable/9/sys/x86/x86/local_apic.c Sat Nov 16 10:44:17 2013 (r258217) +++ stable/9/sys/x86/x86/local_apic.c Sat Nov 16 10:47:58 2013 (r258218) @@ -795,7 +795,7 @@ lapic_handle_timer(struct trapframe *fra * Don't do any accounting for the disabled HTT cores, since it * will provide misleading numbers for the userland. * - * No locking is necessary here, since even if we loose the race + * No locking is necessary here, since even if we lose the race * when hlt_cpus_mask changes it is not a big deal, really. * * Don't do that for ULE, since ULE doesn't consider hlt_cpus_mask From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 10:49:02 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9E91A89; Sat, 16 Nov 2013 10:49:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D95912A0D; Sat, 16 Nov 2013 10:49:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGAn2fv059949; Sat, 16 Nov 2013 10:49:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGAn2ct059948; Sat, 16 Nov 2013 10:49:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161049.rAGAn2ct059948@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 10:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258219 - stable/9/sys/dev/ata/chipsets X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 10:49:03 -0000 Author: mav Date: Sat Nov 16 10:49:02 2013 New Revision: 258219 URL: http://svnweb.freebsd.org/changeset/base/258219 Log: MFC r253644: Add missing NULL check after malloc(M_NOWAIT). Modified: stable/9/sys/dev/ata/chipsets/ata-promise.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-promise.c Sat Nov 16 10:47:58 2013 (r258218) +++ stable/9/sys/dev/ata/chipsets/ata-promise.c Sat Nov 16 10:49:02 2013 (r258219) @@ -288,6 +288,10 @@ ata_promise_chipinit(device_t dev) /* setup host packet controls */ hpkt = malloc(sizeof(struct ata_promise_sx4), M_ATAPCI, M_NOWAIT | M_ZERO); + if (hpkt == NULL) { + device_printf(dev, "Cannot allocate HPKT\n"); + goto failnfree; + } mtx_init(&hpkt->mtx, "ATA promise HPKT lock", NULL, MTX_DEF); TAILQ_INIT(&hpkt->queue); hpkt->busy = 0; From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 15:26:56 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B33A9547; Sat, 16 Nov 2013 15:26:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 882992615; Sat, 16 Nov 2013 15:26:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGFQuHi055317; Sat, 16 Nov 2013 15:26:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGFQu5Z055316; Sat, 16 Nov 2013 15:26:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161526.rAGFQu5Z055316@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 15:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258222 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 15:26:56 -0000 Author: mav Date: Sat Nov 16 15:26:56 2013 New Revision: 258222 URL: http://svnweb.freebsd.org/changeset/base/258222 Log: MFC r249065 (by trasz): Fix locking problem in ctl_maintenance_in() - one cannot use M_WAITOK or call ctl_done() with mutex held. Modified: stable/9/sys/cam/ctl/ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Sat Nov 16 15:04:49 2013 (r258221) +++ stable/9/sys/cam/ctl/ctl.c Sat Nov 16 15:26:56 2013 (r258222) @@ -6924,7 +6924,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct struct scsi_maintenance_in *cdb; int retval; int alloc_len, total_len = 0; - int num_target_port_groups; + int num_target_port_groups, single; struct ctl_lun *lun; struct ctl_softc *softc; struct scsi_target_group_data *rtg_ptr; @@ -6939,7 +6939,6 @@ ctl_maintenance_in(struct ctl_scsiio *ct lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; retval = CTL_RETVAL_COMPLETE; - mtx_lock(&softc->ctl_lock); if ((cdb->byte2 & SERVICE_ACTION_MASK) != SA_RPRT_TRGT_GRP) { ctl_set_invalid_field(/*ctsio*/ ctsio, @@ -6952,7 +6951,11 @@ ctl_maintenance_in(struct ctl_scsiio *ct return(retval); } - if (ctl_is_single) + mtx_lock(&softc->ctl_lock); + single = ctl_is_single; + mtx_unlock(&softc->ctl_lock); + + if (single) num_target_port_groups = NUM_TARGET_PORT_GROUPS - 1; else num_target_port_groups = NUM_TARGET_PORT_GROUPS; @@ -6988,9 +6991,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct tp_desc_ptr1_2 = (struct scsi_target_port_descriptor *) &tp_desc_ptr1_1->desc_list[0]; - - - if (ctl_is_single == 0) { + if (single == 0) { tpg_desc_ptr2 = (struct scsi_target_port_group_descriptor *) &tp_desc_ptr1_2->desc_list[0]; tp_desc_ptr2_1 = &tpg_desc_ptr2->descriptors[0]; @@ -7003,7 +7004,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct } scsi_ulto4b(total_len - 4, rtg_ptr->length); - if (ctl_is_single == 0) { + if (single == 0) { if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS) { if (lun->flags & CTL_LUN_PRIMARY_SC) { tpg_desc_ptr1->pref_state = TPG_PRIMARY; @@ -7033,7 +7034,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct tpg_desc_ptr1->status = TPG_IMPLICIT; tpg_desc_ptr1->target_port_count= NUM_PORTS_PER_GRP; - if (ctl_is_single == 0) { + if (single == 0) { tpg_desc_ptr2->support = 0; tpg_desc_ptr2->target_port_group[1] = 2; tpg_desc_ptr2->status = TPG_IMPLICIT; @@ -7054,8 +7055,6 @@ ctl_maintenance_in(struct ctl_scsiio *ct } } - mtx_unlock(&softc->ctl_lock); - ctsio->be_move_done = ctl_config_move_done; CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n", From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 15:34:11 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E54AE7F1; Sat, 16 Nov 2013 15:34:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C55D4267A; Sat, 16 Nov 2013 15:34:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGFYBhB058383; Sat, 16 Nov 2013 15:34:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGFYBFu058382; Sat, 16 Nov 2013 15:34:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161534.rAGFYBFu058382@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 15:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258223 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 15:34:12 -0000 Author: mav Date: Sat Nov 16 15:34:11 2013 New Revision: 258223 URL: http://svnweb.freebsd.org/changeset/base/258223 Log: MFC r254378 (by trasz): Turn comments about locking into actual lock assertions. Modified: stable/9/sys/cam/ctl/ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Sat Nov 16 15:26:56 2013 (r258222) +++ stable/9/sys/cam/ctl/ctl.c Sat Nov 16 15:34:11 2013 (r258223) @@ -1078,9 +1078,11 @@ ctl_init(void) softc->emergency_pool = emergency_pool; softc->othersc_pool = other_pool; + mtx_lock(&softc->ctl_lock); ctl_pool_acquire(internal_pool); ctl_pool_acquire(emergency_pool); ctl_pool_acquire(other_pool); + mtx_unlock(&softc->ctl_lock); /* * We used to allocate a processor LUN here. The new scheme is to @@ -1096,10 +1098,12 @@ ctl_init(void) "ctl_thrd"); if (error != 0) { printf("error creating CTL work thread!\n"); + mtx_lock(&softc->ctl_lock); ctl_free_lun(lun); ctl_pool_free(softc, internal_pool); ctl_pool_free(softc, emergency_pool); ctl_pool_free(softc, other_pool); + mtx_unlock(&softc->ctl_lock); return (error); } printf("ctl: CAM Target Layer loaded\n"); @@ -1380,7 +1384,6 @@ ctl_ioctl_offline(void *arg) /* * Remove an initiator by port number and initiator ID. * Returns 0 for success, 1 for failure. - * Assumes the caller does NOT hold the CTL lock. */ int ctl_remove_initiator(int32_t targ_port, uint32_t iid) @@ -1389,6 +1392,8 @@ ctl_remove_initiator(int32_t targ_port, softc = control_softc; + mtx_assert(&softc->ctl_lock, MA_NOTOWNED); + if ((targ_port < 0) || (targ_port > CTL_MAX_PORTS)) { printf("%s: invalid port number %d\n", __func__, targ_port); @@ -1412,7 +1417,6 @@ ctl_remove_initiator(int32_t targ_port, /* * Add an initiator to the initiator map. * Returns 0 for success, 1 for failure. - * Assumes the caller does NOT hold the CTL lock. */ int ctl_add_initiator(uint64_t wwpn, int32_t targ_port, uint32_t iid) @@ -1422,6 +1426,8 @@ ctl_add_initiator(uint64_t wwpn, int32_t softc = control_softc; + mtx_assert(&softc->ctl_lock, MA_NOTOWNED); + retval = 0; if ((targ_port < 0) @@ -1978,7 +1984,6 @@ ctl_ioctl_bbrread_callback(void *arg, st } /* - * Must be called with the ctl_lock held. * Returns 0 for success, errno for failure. */ static int @@ -1990,6 +1995,8 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, retval = 0; + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL); (*cur_fill_num)++, io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, ooa_links)) { @@ -3403,12 +3410,12 @@ bailout: return (retval); } -/* - * Caller must hold ctl_softc->ctl_lock. - */ int ctl_pool_acquire(struct ctl_io_pool *pool) { + + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + if (pool == NULL) return (-EINVAL); @@ -3420,12 +3427,12 @@ ctl_pool_acquire(struct ctl_io_pool *poo return (0); } -/* - * Caller must hold ctl_softc->ctl_lock. - */ int ctl_pool_invalidate(struct ctl_io_pool *pool) { + + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + if (pool == NULL) return (-EINVAL); @@ -3434,12 +3441,12 @@ ctl_pool_invalidate(struct ctl_io_pool * return (0); } -/* - * Caller must hold ctl_softc->ctl_lock. - */ int ctl_pool_release(struct ctl_io_pool *pool) { + + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + if (pool == NULL) return (-EINVAL); @@ -3451,14 +3458,13 @@ ctl_pool_release(struct ctl_io_pool *poo return (0); } -/* - * Must be called with ctl_softc->ctl_lock held. - */ void ctl_pool_free(struct ctl_softc *ctl_softc, struct ctl_io_pool *pool) { union ctl_io *cur_io, *next_io; + mtx_assert(&ctl_softc->ctl_lock, MA_OWNED); + for (cur_io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue); cur_io != NULL; cur_io = next_io) { next_io = (union ctl_io *)STAILQ_NEXT(&cur_io->io_hdr, @@ -4400,7 +4406,6 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft /* * Delete a LUN. * Assumptions: - * - caller holds ctl_softc->ctl_lock. * - LUN has already been marked invalid and any pending I/O has been taken * care of. */ @@ -4417,6 +4422,8 @@ ctl_free_lun(struct ctl_lun *lun) softc = lun->ctl_softc; + mtx_assert(&softc->ctl_lock, MA_OWNED); + STAILQ_REMOVE(&softc->lun_list, lun, ctl_lun, links); ctl_clear_mask(softc->ctl_lun_mask, lun->lun); @@ -9780,7 +9787,6 @@ ctl_check_for_blockage(union ctl_io *pen /* * Check for blockage or overlaps against the OOA (Order Of Arrival) queue. * Assumptions: - * - caller holds ctl_lock * - pending_io is generally either incoming, or on the blocked queue * - starting I/O is the I/O we want to start the check with. */ @@ -9791,6 +9797,8 @@ ctl_check_ooa(struct ctl_lun *lun, union union ctl_io *ooa_io; ctl_action action; + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + /* * Run back along the OOA queue, starting with the current * blocked I/O and going through every I/O before it on the @@ -9831,13 +9839,14 @@ ctl_check_ooa(struct ctl_lun *lun, union * Assumptions: * - An I/O has just completed, and has been removed from the per-LUN OOA * queue, so some items on the blocked queue may now be unblocked. - * - The caller holds ctl_softc->ctl_lock */ static int ctl_check_blocked(struct ctl_lun *lun) { union ctl_io *cur_blocked, *next_blocked; + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + /* * Run forward from the head of the blocked queue, checking each * entry against the I/Os prior to it on the OOA queue to see if @@ -10901,8 +10910,6 @@ bailout: } /* - * Assumptions: caller holds ctl_softc->ctl_lock - * * This routine cannot block! It must be callable from an interrupt * handler as well as from the work thread. */ @@ -10911,6 +10918,8 @@ ctl_run_task_queue(struct ctl_softc *ctl { union ctl_io *io, *next_io; + mtx_assert(&ctl_softc->ctl_lock, MA_OWNED); + CTL_DEBUG_PRINT(("ctl_run_task_queue\n")); for (io = (union ctl_io *)STAILQ_FIRST(&ctl_softc->task_queue); @@ -11212,14 +11221,13 @@ ctl_cmd_pattern_match(struct ctl_scsiio return (filtered_pattern); } -/* - * Called with the CTL lock held. - */ static void ctl_inject_error(struct ctl_lun *lun, union ctl_io *io) { struct ctl_error_desc *desc, *desc2; + mtx_assert(&control_softc->ctl_lock, MA_OWNED); + STAILQ_FOREACH_SAFE(desc, &lun->error_list, links, desc2) { ctl_lun_error_pattern pattern; /* @@ -11289,14 +11297,13 @@ ctl_datamove_timer_wakeup(void *arg) } #endif /* CTL_IO_DELAY */ -/* - * Assumption: caller does NOT hold ctl_lock - */ void ctl_datamove(union ctl_io *io) { void (*fe_datamove)(union ctl_io *io); + mtx_assert(&control_softc->ctl_lock, MA_NOTOWNED); + CTL_DEBUG_PRINT(("ctl_datamove\n")); #ifdef CTL_TIME_IO @@ -12142,8 +12149,6 @@ ctl_datamove_remote_read(union ctl_io *i * first. Once that is complete, the data gets DMAed into the remote * controller's memory. For reads, we DMA from the remote controller's * memory into our memory first, and then move it out to the FETD. - * - * Should be called without the ctl_lock held. */ static void ctl_datamove_remote(union ctl_io *io) @@ -12152,6 +12157,8 @@ ctl_datamove_remote(union ctl_io *io) softc = control_softc; + mtx_assert(&softc->ctl_lock, MA_NOTOWNED); + /* * Note that we look for an aborted I/O here, but don't do some of * the other checks that ctl_datamove() normally does. We don't From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 16 15:41:55 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D471E06; Sat, 16 Nov 2013 15:41:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3BFAE26D2; Sat, 16 Nov 2013 15:41:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAGFftbk061569; Sat, 16 Nov 2013 15:41:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAGFfthQ061568; Sat, 16 Nov 2013 15:41:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311161541.rAGFfthQ061568@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Nov 2013 15:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258225 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 15:41:55 -0000 Author: mav Date: Sat Nov 16 15:41:54 2013 New Revision: 258225 URL: http://svnweb.freebsd.org/changeset/base/258225 Log: MFC r254787: Remove locking from taskqueue_member(). The list of threads is static during the taskqueue life cycle, so there is no need to protect it, taking quite congested lock several more times for each ZFS I/O. Modified: stable/9/sys/kern/subr_taskqueue.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_taskqueue.c ============================================================================== --- stable/9/sys/kern/subr_taskqueue.c Sat Nov 16 15:34:14 2013 (r258224) +++ stable/9/sys/kern/subr_taskqueue.c Sat Nov 16 15:41:54 2013 (r258225) @@ -577,7 +577,6 @@ taskqueue_member(struct taskqueue *queue { int i, j, ret = 0; - TQ_LOCK(queue); for (i = 0, j = 0; ; i++) { if (queue->tq_threads[i] == NULL) continue; @@ -588,6 +587,5 @@ taskqueue_member(struct taskqueue *queue if (++j >= queue->tq_tcount) break; } - TQ_UNLOCK(queue); return (ret); }