From owner-svn-src-stable-10@FreeBSD.ORG Sun Feb 2 00:33:18 2014 Return-Path: Delivered-To: svn-src-stable-10@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 946DAEA8; Sun, 2 Feb 2014 00:33: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 802981CC5; Sun, 2 Feb 2014 00:33: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 s120XIjl052630; Sun, 2 Feb 2014 00:33:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s120XICo052629; Sun, 2 Feb 2014 00:33:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402020033.s120XICo052629@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 Feb 2014 00:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261391 - stable/10/sys/geom/multipath X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2014 00:33:18 -0000 Author: mav Date: Sun Feb 2 00:33:17 2014 New Revision: 261391 URL: http://svnweb.freebsd.org/changeset/base/261391 Log: MFC r260883: Remove unneeded and dangerous assignment. It would probably cause NULL refererence panic if compiler not optimize it out. Modified: stable/10/sys/geom/multipath/g_multipath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/10/sys/geom/multipath/g_multipath.c Sun Feb 2 00:30:29 2014 (r261390) +++ stable/10/sys/geom/multipath/g_multipath.c Sun Feb 2 00:33:17 2014 (r261391) @@ -1089,7 +1089,6 @@ g_multipath_ctl_create(struct gctl_req * gctl_error(req, "Device %s already exist", mpname); return; } - sc = gp->softc; memset(&md, 0, sizeof(md)); strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); From owner-svn-src-stable-10@FreeBSD.ORG Mon Feb 3 03:31:36 2014 Return-Path: Delivered-To: svn-src-stable-10@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 EC48A279; Mon, 3 Feb 2014 03:31:35 +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 CD99D1606; Mon, 3 Feb 2014 03:31: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 s133VZ8Z003079; Mon, 3 Feb 2014 03:31:35 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s133VZp1003078; Mon, 3 Feb 2014 03:31:35 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201402030331.s133VZp1003078@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 3 Feb 2014 03:31:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261425 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 03:31:36 -0000 Author: gnn Date: Mon Feb 3 03:31:35 2014 New Revision: 261425 URL: http://svnweb.freebsd.org/changeset/base/261425 Log: MFC 260796 Fix various places where we don't properly release a lock PR: 185043 Submitted by: Michael Bentkofsky Modified: stable/10/sys/netinet/in_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_mcast.c ============================================================================== --- stable/10/sys/netinet/in_mcast.c Mon Feb 3 02:56:23 2014 (r261424) +++ stable/10/sys/netinet/in_mcast.c Mon Feb 3 03:31:35 2014 (r261425) @@ -1452,7 +1452,7 @@ inp_block_unblock_source(struct inpcb *i error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -1460,6 +1460,8 @@ inp_block_unblock_source(struct inpcb *i if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); +out_in_multi_locked: + IN_MULTI_UNLOCK(); out_imf_rollback: @@ -2128,8 +2130,12 @@ inp_join_group(struct inpcb *inp, struct if (is_new) { error = in_joingroup_locked(ifp, &gsa->sin.sin_addr, imf, &inm); - if (error) + if (error) { + CTR1(KTR_IGMPV3, "%s: in_joingroup_locked failed", + __func__); + IN_MULTI_UNLOCK(); goto out_imo_free; + } imo->imo_membership[idx] = inm; } else { CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); @@ -2137,20 +2143,21 @@ inp_join_group(struct inpcb *inp, struct if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); error = igmp_change_state(inm); if (error) { CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } } +out_in_multi_locked: + IN_MULTI_UNLOCK(); -out_imf_rollback: INP_WLOCK_ASSERT(inp); if (error) { imf_rollback(imf); @@ -2354,7 +2361,7 @@ inp_leave_group(struct inpcb *inp, struc if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -2365,9 +2372,10 @@ inp_leave_group(struct inpcb *inp, struc } } +out_in_multi_locked: + IN_MULTI_UNLOCK(); -out_imf_rollback: if (error) imf_rollback(imf); else @@ -2601,7 +2609,7 @@ inp_set_source_filters(struct inpcb *inp error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -2609,6 +2617,8 @@ inp_set_source_filters(struct inpcb *inp if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); +out_in_multi_locked: + IN_MULTI_UNLOCK(); out_imf_rollback: From owner-svn-src-stable-10@FreeBSD.ORG Mon Feb 3 03:34:37 2014 Return-Path: Delivered-To: svn-src-stable-10@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 3C9F5515; Mon, 3 Feb 2014 03:34: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 0EA3F162B; Mon, 3 Feb 2014 03:34: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 s133YaVJ003467; Mon, 3 Feb 2014 03:34:36 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s133Ya5p003466; Mon, 3 Feb 2014 03:34:36 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201402030334.s133Ya5p003466@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 3 Feb 2014 03:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261426 - stable/10/tools/tools/mcgrab X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 03:34:37 -0000 Author: gnn Date: Mon Feb 3 03:34:36 2014 New Revision: 261426 URL: http://svnweb.freebsd.org/changeset/base/261426 Log: MFC: 260791 Add a command line argument to turn off blocking waiting for the user to press Ctrl-C (-b). This allows tests with tight loops of mcgrabs that can stress the multicast tables. Modified: stable/10/tools/tools/mcgrab/mcgrab.cc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/mcgrab/mcgrab.cc ============================================================================== --- stable/10/tools/tools/mcgrab/mcgrab.cc Mon Feb 3 03:31:35 2014 (r261425) +++ stable/10/tools/tools/mcgrab/mcgrab.cc Mon Feb 3 03:34:36 2014 (r261426) @@ -88,7 +88,7 @@ void usage(string message) // // @return 0 for 0K, -1 for error, sets errno // -void grab(char *interface, struct in_addr *group, int number) { +void grab(char *interface, struct in_addr *group, int number, int block) { int sock; @@ -138,8 +138,10 @@ void grab(char *interface, struct in_add group->s_addr = htonl(ntohl(group->s_addr) + 1); } - printf("Press Control-C to exit.\n"); - sleep(INT_MAX); + if (block > 0) { + printf("Press Control-C to exit.\n"); + sleep(INT_MAX); + } } @@ -160,11 +162,12 @@ int main(int argc, char**argv) char* interface = 0; ///< Name of the interface struct in_addr *group = NULL; ///< the multicast group address int number = 0; ///< Number of addresses to grab + int block = 1; ///< Do we block or just return? - if (argc != 7) + if ((argc < 7) || (argc > 8)) usage(); - while ((ch = getopt(argc, argv, "g:i:n:h")) != -1) { + while ((ch = getopt(argc, argv, "g:i:n:bh")) != -1) { switch (ch) { case 'g': group = new (struct in_addr ); @@ -178,12 +181,15 @@ int main(int argc, char**argv) case 'n': number = atoi(optarg); break; + case 'b': + block = 0; + break; case 'h': usage(string("Help\n")); break; } } - grab(interface, group, number); + grab(interface, group, number, block); } From owner-svn-src-stable-10@FreeBSD.ORG Mon Feb 3 08:04:10 2014 Return-Path: Delivered-To: svn-src-stable-10@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 5ACC074E; Mon, 3 Feb 2014 08:04:10 +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 476C6197F; Mon, 3 Feb 2014 08:04:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s1384AtN072379; Mon, 3 Feb 2014 08:04:10 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1384AZs072378; Mon, 3 Feb 2014 08:04:10 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201402030804.s1384AZs072378@svn.freebsd.org> From: Rui Paulo Date: Mon, 3 Feb 2014 08:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261430 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 08:04:10 -0000 Author: rpaulo Date: Mon Feb 3 08:04:09 2014 New Revision: 261430 URL: http://svnweb.freebsd.org/changeset/base/261430 Log: MFC r256499: Add support for Mercurial repositories. Modified: stable/10/sys/conf/newvers.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Mon Feb 3 08:00:45 2014 (r261429) +++ stable/10/sys/conf/newvers.sh Mon Feb 3 08:04:09 2014 (r261430) @@ -130,6 +130,15 @@ if [ -d "${SYSDIR}/../.git" ] ; then done fi +if [ -d "${SYSDIR}/../.hg" ] ; then + for dir in /usr/bin /usr/local/bin; do + if [ -x "${dir}/hg" ] ; then + hg_cmd="${dir}/hg -R ${SYSDIR}/../.hg" + break + fi + done +fi + if [ -n "$svnversion" ] ; then svn=`cd ${SYSDIR} && $svnversion 2>/dev/null` case "$svn" in @@ -184,12 +193,23 @@ if [ -n "$p4_cmd" ] ; then *) unset p4version ;; esac fi - + +if [ -n "$hg_cmd" ] ; then + hg=`$hg_cmd id 2>/dev/null` + svn=`$hg_cmd svn info 2>/dev/null | \ + awk -F': ' '/Revision/ { print $2 }'` + if [ -n "$svn" ] ; then + svn=" r${svn}" + fi + if [ -n "$hg" ] ; then + hg=" ${hg}" + fi +fi cat << EOF > vers.c $COPYRIGHT -#define SCCSSTR "@(#)${VERSION} #${v}${svn}${git}${p4version}: ${t}" -#define VERSTR "${VERSION} #${v}${svn}${git}${p4version}: ${t}\\n ${u}@${h}:${d}\\n" +#define SCCSSTR "@(#)${VERSION} #${v}${svn}${git}${hg}${p4version}: ${t}" +#define VERSTR "${VERSION} #${v}${svn}${git}${hg}${p4version}: ${t}\\n ${u}@${h}:${d}\\n" #define RELSTR "${RELEASE}" char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 00:51:06 2014 Return-Path: Delivered-To: svn-src-stable-10@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 AC5EAA2E; Tue, 4 Feb 2014 00:51:06 +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 98ACD1A3D; Tue, 4 Feb 2014 00:51:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s140p6up075069; Tue, 4 Feb 2014 00:51:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s140p6i0075068; Tue, 4 Feb 2014 00:51:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402040051.s140p6i0075068@svn.freebsd.org> From: Alexander Motin Date: Tue, 4 Feb 2014 00:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261450 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 00:51:06 -0000 Author: mav Date: Tue Feb 4 00:51:06 2014 New Revision: 261450 URL: http://svnweb.freebsd.org/changeset/base/261450 Log: MFC r260996: Fix memory and references leak due to unfreed path in case we can't allocate bus scan CCB. Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Tue Feb 4 00:00:01 2014 (r261449) +++ stable/10/sys/cam/cam_xpt.c Tue Feb 4 00:51:06 2014 (r261450) @@ -3917,9 +3917,11 @@ xpt_bus_register(struct cam_sim *sim, de scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; scan_ccb->crcn.flags = 0; xpt_rescan(scan_ccb); - } else + } else { xpt_print(path, "Can't allocate CCB to scan bus\n"); + xpt_free_path(path); + } } else xpt_free_path(path); } else From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 03:36:52 2014 Return-Path: Delivered-To: svn-src-stable-10@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 66767B0D; Tue, 4 Feb 2014 03:36:52 +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 4E00C1B67; Tue, 4 Feb 2014 03:36:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s143aqa2039831; Tue, 4 Feb 2014 03:36:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s143ah3l039786; Tue, 4 Feb 2014 03:36:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402040336.s143ah3l039786@svn.freebsd.org> From: Eitan Adler Date: Tue, 4 Feb 2014 03:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261455 - in stable/10: lib/libc/sparc64/fpu lib/libc/xdr sys/amd64/pci sys/amd64/vmm/intel sys/arm/arm sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/econa sys/arm/freescale/imx sys/arm... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 03:36:52 -0000 Author: eadler Date: Tue Feb 4 03:36:42 2014 New Revision: 261455 URL: http://svnweb.freebsd.org/changeset/base/261455 Log: MFC r258779,r258780,r258787,r258822: Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Modified: stable/10/lib/libc/sparc64/fpu/fpu.c stable/10/lib/libc/sparc64/fpu/fpu_sqrt.c stable/10/lib/libc/xdr/xdr_rec.c stable/10/sys/amd64/pci/pci_cfgreg.c stable/10/sys/amd64/vmm/intel/vmcs.h stable/10/sys/amd64/vmm/intel/vmx_controls.h stable/10/sys/amd64/vmm/intel/vtd.c stable/10/sys/arm/arm/cpufunc_asm_pj4b.S stable/10/sys/arm/arm/db_trace.c stable/10/sys/arm/arm/pl190.c stable/10/sys/arm/at91/if_macbvar.h stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c stable/10/sys/arm/econa/if_ece.c stable/10/sys/arm/freescale/imx/imx6_anatopreg.h stable/10/sys/arm/freescale/imx/imx6_usbphy.c stable/10/sys/arm/freescale/imx/imx_gptreg.h stable/10/sys/arm/include/armreg.h stable/10/sys/arm/lpc/if_lpereg.h stable/10/sys/arm/lpc/lpcreg.h stable/10/sys/arm/mv/mv_pci.c stable/10/sys/arm/samsung/exynos/ehci_exynos5.c stable/10/sys/arm/xscale/i8134x/i81342reg.h stable/10/sys/arm/xscale/ixp425/ixp425reg.h stable/10/sys/boot/arm/at91/libat91/mci_device.h stable/10/sys/boot/i386/libfirewire/fwohci.h stable/10/sys/boot/i386/libfirewire/fwohcireg.h stable/10/sys/dev/aac/aacvar.h stable/10/sys/dev/acpica/acpi_video.c stable/10/sys/dev/agp/agp_i810.c stable/10/sys/dev/ahci/ahci.h stable/10/sys/dev/bktr/bktr_core.c stable/10/sys/dev/cesa/cesa.h stable/10/sys/dev/drm/i915_reg.h stable/10/sys/dev/drm/mach64_drv.h stable/10/sys/dev/drm/mga_drv.h stable/10/sys/dev/drm/r128_drv.h stable/10/sys/dev/drm/r300_reg.h stable/10/sys/dev/drm/r600_blit.c stable/10/sys/dev/drm/radeon_cp.c stable/10/sys/dev/drm/radeon_drv.h stable/10/sys/dev/drm/via_irq.c stable/10/sys/dev/drm2/i915/i915_reg.h stable/10/sys/dev/drm2/radeon/evergreen_blit_kms.c stable/10/sys/dev/drm2/radeon/evergreen_cs.c stable/10/sys/dev/drm2/radeon/evergreend.h stable/10/sys/dev/drm2/radeon/nid.h stable/10/sys/dev/drm2/radeon/r200.c stable/10/sys/dev/drm2/radeon/r300.c stable/10/sys/dev/drm2/radeon/r300_reg.h stable/10/sys/dev/drm2/radeon/r500_reg.h stable/10/sys/dev/drm2/radeon/r600_blit.c stable/10/sys/dev/drm2/radeon/r600_blit_kms.c stable/10/sys/dev/drm2/radeon/r600_cs.c stable/10/sys/dev/drm2/radeon/r600d.h stable/10/sys/dev/drm2/radeon/radeon_cp.c stable/10/sys/dev/drm2/radeon/radeon_drv.h stable/10/sys/dev/drm2/radeon/radeon_reg.h stable/10/sys/dev/drm2/radeon/rv770d.h stable/10/sys/dev/drm2/radeon/sid.h stable/10/sys/dev/drm2/ttm/ttm_bo.c stable/10/sys/dev/e1000/e1000_82575.h stable/10/sys/dev/e1000/e1000_ich8lan.c stable/10/sys/dev/e1000/e1000_regs.h stable/10/sys/dev/etherswitch/arswitch/arswitchreg.h stable/10/sys/dev/ffec/if_ffecreg.h stable/10/sys/dev/firewire/firewire.c stable/10/sys/dev/firewire/fwohci.c stable/10/sys/dev/firewire/fwohcireg.h stable/10/sys/dev/firewire/sbp.c stable/10/sys/dev/firewire/sbp.h stable/10/sys/dev/firewire/sbp_targ.c stable/10/sys/dev/hatm/if_hatmreg.h stable/10/sys/dev/hwpmc/hwpmc_piv.h stable/10/sys/dev/iwn/if_iwnreg.h stable/10/sys/dev/mge/if_mgevar.h stable/10/sys/dev/mpt/mpt_cam.c stable/10/sys/dev/msk/if_mskreg.h stable/10/sys/dev/mvs/mvs.h stable/10/sys/dev/mxge/mxge_mcp.h stable/10/sys/dev/qlxge/qls_dump.c stable/10/sys/dev/ral/rt2560reg.h stable/10/sys/dev/ral/rt2661reg.h stable/10/sys/dev/ral/rt2860reg.h stable/10/sys/dev/sound/pci/hda/hdaa.h stable/10/sys/dev/usb/controller/ehci.h stable/10/sys/dev/usb/wlan/if_rumreg.h stable/10/sys/dev/usb/wlan/if_runreg.h stable/10/sys/dev/usb/wlan/if_uralreg.h stable/10/sys/dev/usb/wlan/if_urtwreg.h stable/10/sys/dev/usb/wlan/if_zydreg.h stable/10/sys/dev/wpi/if_wpireg.h stable/10/sys/geom/raid/tr_raid1e.c stable/10/sys/i386/pci/pci_cfgreg.c stable/10/sys/mips/atheros/ar71xxreg.h stable/10/sys/mips/atheros/ar934xreg.h stable/10/sys/mips/atheros/if_argevar.h stable/10/sys/mips/malta/gt_pci.c stable/10/sys/mips/nlm/dev/net/nae.c stable/10/sys/mips/nlm/xlp_machdep.c stable/10/sys/mips/rmi/pic.h stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_mcg.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c stable/10/sys/ofed/drivers/net/mlx4/mcg.c stable/10/sys/powerpc/fpu/fpu_emu.c stable/10/sys/powerpc/fpu/fpu_sqrt.c stable/10/sys/powerpc/powermac/nvbl.c stable/10/sys/sys/consio.h stable/10/sys/x86/iommu/intel_reg.h stable/10/usr.sbin/bluetooth/bthidd/kbd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/10/lib/libc/sparc64/fpu/fpu.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/lib/libc/sparc64/fpu/fpu.c Tue Feb 4 03:36:42 2014 (r261455) @@ -202,7 +202,7 @@ static const int opmask[] = {0, 0, 1, 3, * Implement a move operation for all supported operand types. The additional * nand and xor parameters will be applied to the upper 32 bit word of the * source operand. This allows to implement fabs and fneg (for fp operands - * only!) using this functions, too, by passing (1 << 31) for one of the + * only!) using this functions, too, by passing (1U << 31) for one of the * parameters, and 0 for the other. */ static void @@ -358,10 +358,10 @@ __fpu_execute(struct utrapframe *uf, str __fpu_mov(fe, type, rd, rs2, 0, 0); return (0); case FOP(INS2_FPop1, INSFP1_FNEG): - __fpu_mov(fe, type, rd, rs2, 0, (1 << 31)); + __fpu_mov(fe, type, rd, rs2, 0, (1U << 31)); return (0); case FOP(INS2_FPop1, INSFP1_FABS): - __fpu_mov(fe, type, rd, rs2, (1 << 31), 0); + __fpu_mov(fe, type, rd, rs2, (1U << 31), 0); return (0); case FOP(INS2_FPop1, INSFP1_FSQRT): __fpu_explode(fe, &fe->fe_f1, type, rs2); Modified: stable/10/lib/libc/sparc64/fpu/fpu_sqrt.c ============================================================================== --- stable/10/lib/libc/sparc64/fpu/fpu_sqrt.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/lib/libc/sparc64/fpu/fpu_sqrt.c Tue Feb 4 03:36:42 2014 (r261455) @@ -257,7 +257,7 @@ __fpu_sqrt(fe) * double x correctly while doing the `known q=1.0'. * * We do this one mantissa-word at a time, as noted above, to - * save work. To avoid `(1 << 31) << 1', we also do the top bit + * save work. To avoid `(1U << 31) << 1', we also do the top bit * outside of each per-word loop. * * The calculation `t = y + bit' breaks down into `t0 = y0, ..., Modified: stable/10/lib/libc/xdr/xdr_rec.c ============================================================================== --- stable/10/lib/libc/xdr/xdr_rec.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/lib/libc/xdr/xdr_rec.c Tue Feb 4 03:36:42 2014 (r261455) @@ -106,7 +106,7 @@ static const struct xdr_ops xdrrec_ops * meet the needs of xdr and rpc based on tcp. */ -#define LAST_FRAG ((u_int32_t)(1 << 31)) +#define LAST_FRAG ((u_int32_t)(1U << 31)) typedef struct rec_strm { char *tcp_handle; Modified: stable/10/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/10/sys/amd64/pci/pci_cfgreg.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/amd64/pci/pci_cfgreg.c Tue Feb 4 03:36:42 2014 (r261455) @@ -184,7 +184,7 @@ pci_cfgenable(unsigned bus, unsigned slo if (bus <= PCI_BUSMAX && slot <= PCI_SLOTMAX && func <= PCI_FUNCMAX && (unsigned)reg <= PCI_REGMAX && bytes != 3 && (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { - outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) + outl(CONF1_ADDR_PORT, (1U << 31) | (bus << 16) | (slot << 11) | (func << 8) | (reg & ~0x03)); dataport = CONF1_DATA_PORT + (reg & 0x03); } Modified: stable/10/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/amd64/vmm/intel/vmcs.h Tue Feb 4 03:36:42 2014 (r261455) @@ -318,7 +318,7 @@ uint64_t vmcs_read(uint32_t encoding); /* * VMCS IDT-Vectoring information fields */ -#define VMCS_IDT_VEC_VALID (1 << 31) +#define VMCS_IDT_VEC_VALID (1U << 31) #define VMCS_IDT_VEC_ERRCODE_VALID (1 << 11) /* Modified: stable/10/sys/amd64/vmm/intel/vmx_controls.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx_controls.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/amd64/vmm/intel/vmx_controls.h Tue Feb 4 03:36:42 2014 (r261455) @@ -56,7 +56,7 @@ #define PROCBASED_MSR_BITMAPS (1 << 28) #define PROCBASED_MONITOR_EXITING (1 << 29) #define PROCBASED_PAUSE_EXITING (1 << 30) -#define PROCBASED_SECONDARY_CONTROLS (1 << 31) +#define PROCBASED_SECONDARY_CONTROLS (1U << 31) /* Secondary Processor-Based VM-Execution Controls */ #define PROCBASED2_VIRTUALIZE_APIC (1 << 0) Modified: stable/10/sys/amd64/vmm/intel/vtd.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vtd.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/amd64/vmm/intel/vtd.c Tue Feb 4 03:36:42 2014 (r261455) @@ -74,11 +74,11 @@ struct vtdmap { #define VTD_GCR_WBF (1 << 27) #define VTD_GCR_SRTP (1 << 30) -#define VTD_GCR_TE (1 << 31) +#define VTD_GCR_TE (1U << 31) #define VTD_GSR_WBFS (1 << 27) #define VTD_GSR_RTPS (1 << 30) -#define VTD_GSR_TES (1 << 31) +#define VTD_GSR_TES (1U << 31) #define VTD_CCR_ICC (1UL << 63) /* invalidate context cache */ #define VTD_CCR_CIRG_GLOBAL (1UL << 61) /* global invalidation */ Modified: stable/10/sys/arm/arm/cpufunc_asm_pj4b.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Tue Feb 4 03:36:42 2014 (r261455) @@ -237,7 +237,7 @@ ENTRY(pj4b_config) orr r0, r0, #(1 << 27) /* Critical word first sequencing disable */ orr r0, r0, #(1 << 29) /* Disable MO device read / write */ orr r0, r0, #(1 << 30) /* L1 cache strict round-robin replacement policy*/ - orr r0, r0, #(1 << 31) /* Enable write evict */ + orr r0, r0, #(1U << 31) /* Enable write evict */ mcr p15, 1, r0, c15, c1, 2 #if defined(SMP) /* Set SMP mode in Auxiliary Control Register */ Modified: stable/10/sys/arm/arm/db_trace.c ============================================================================== --- stable/10/sys/arm/arm/db_trace.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/arm/db_trace.c Tue Feb 4 03:36:42 2014 (r261455) @@ -376,7 +376,7 @@ db_stack_trace_cmd(struct unwind_state * index = db_find_index(state->start_pc); if (index->insn != EXIDX_CANTUNWIND) { - if (index->insn & (1 << 31)) { + if (index->insn & (1U << 31)) { /* The data is within the instruction */ state->insn = &index->insn; } else { Modified: stable/10/sys/arm/arm/pl190.c ============================================================================== --- stable/10/sys/arm/arm/pl190.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/arm/pl190.c Tue Feb 4 03:36:42 2014 (r261455) @@ -113,7 +113,7 @@ pl190_intc_attach(device_t dev) /* Disable all interrupts */ intc_vic_write_4(VICINTENCLEAR, 0xffffffff); /* Enable INT31, SIC IRQ */ - intc_vic_write_4(VICINTENABLE, (1 << 31)); + intc_vic_write_4(VICINTENABLE, (1U << 31)); id = 0; for (i = 3; i >= 0; i--) { Modified: stable/10/sys/arm/at91/if_macbvar.h ============================================================================== --- stable/10/sys/arm/at91/if_macbvar.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/at91/if_macbvar.h Tue Feb 4 03:36:42 2014 (r261455) @@ -18,7 +18,7 @@ struct eth_tx_desc { uint32_t addr; uint32_t flags; -#define TD_OWN (1 << 31) +#define TD_OWN (1U << 31) #define TD_LAST (1 << 15) #define TD_WRAP_MASK (1 << 30) }; @@ -30,7 +30,7 @@ struct eth_rx_desc { #define RD_OWN 0x00000001 uint32_t flags; -#define RD_BROADCAST (1 << 31) +#define RD_BROADCAST (1U << 31) #define RD_MULTICAST (1 << 30) #define RD_UNICAST (1 << 29) #define RD_EXTERNAL (1 << 28) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c Tue Feb 4 03:36:42 2014 (r261455) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); #define CS_WAITWRT (1 << 28) #define CS_DISDBG (1 << 29) #define CS_ABORT (1 << 30) -#define CS_RESET (1 << 31) +#define CS_RESET (1U << 31) #define BCM_DMA_CBADDR(n) (0x100*(n) + 0x04) #define BCM_DMA_INFO(n) (0x100*(n) + 0x08) #define INFO_INT_EN (1 << 0) Modified: stable/10/sys/arm/econa/if_ece.c ============================================================================== --- stable/10/sys/arm/econa/if_ece.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/econa/if_ece.c Tue Feb 4 03:36:42 2014 (r261455) @@ -1243,7 +1243,7 @@ configure_cpu_port(struct ece_softc *sc) /* SA learning Disable */ cpu_port_config |= (SA_LEARNING_DISABLE); /* set data offset + 2 */ - cpu_port_config &= ~(1 << 31); + cpu_port_config &= ~(1U << 31); write_4(sc, CPU_PORT_CONFIG, cpu_port_config); Modified: stable/10/sys/arm/freescale/imx/imx6_anatopreg.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatopreg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/freescale/imx/imx6_anatopreg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -37,7 +37,7 @@ #define IMX6_ANALOG_CCM_PLL_USB1_SET 0x014 #define IMX6_ANALOG_CCM_PLL_USB1_CLR 0x018 #define IMX6_ANALOG_CCM_PLL_USB1_TOG 0x01C -#define IMX6_ANALOG_CCM_PLL_USB_LOCK (1 << 31) +#define IMX6_ANALOG_CCM_PLL_USB_LOCK (1U << 31) #define IMX6_ANALOG_CCM_PLL_USB_BYPASS (1 << 16) #define IMX6_ANALOG_CCM_PLL_USB_ENABLE (1 << 13) #define IMX6_ANALOG_CCM_PLL_USB_POWER (1 << 12) Modified: stable/10/sys/arm/freescale/imx/imx6_usbphy.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_usbphy.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/freescale/imx/imx6_usbphy.c Tue Feb 4 03:36:42 2014 (r261455) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #define CTRL_SET_REG 0x0034 #define CTRL_CLR_REG 0x0038 #define CTRL_TOGGLE_REG 0x003c -#define CTRL_SFTRST (1 << 31) +#define CTRL_SFTRST (1U << 31) #define CTRL_CLKGATE (1 << 30) #define CTRL_ENUTMILEVEL3 (1 << 15) #define CTRL_ENUTMILEVEL2 (1 << 14) Modified: stable/10/sys/arm/freescale/imx/imx_gptreg.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gptreg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/freescale/imx/imx_gptreg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -32,7 +32,7 @@ /* Registers definition for Freescale i.MX515 Generic Periodic Timer */ #define IMX_GPT_CR 0x0000 /* Control Register R/W */ -#define GPT_CR_FO3 (1 << 31) +#define GPT_CR_FO3 (1U << 31) #define GPT_CR_FO2 (1 << 30) #define GPT_CR_FO1 (1 << 29) #define GPT_CR_OM3_SHIFT 26 Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/include/armreg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -363,7 +363,7 @@ #define CPU_CT_ARMV7 0x4 /* ARM v7 Cache type definitions */ -#define CPUV7_CT_CTYPE_WT (1 << 31) +#define CPUV7_CT_CTYPE_WT (1U << 31) #define CPUV7_CT_CTYPE_WB (1 << 30) #define CPUV7_CT_CTYPE_RA (1 << 29) #define CPUV7_CT_CTYPE_WA (1 << 28) Modified: stable/10/sys/arm/lpc/if_lpereg.h ============================================================================== --- stable/10/sys/arm/lpc/if_lpereg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/lpc/if_lpereg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -169,7 +169,7 @@ struct lpe_hwstatus { /* These are valid for both Rx and Tx descriptors */ #define LPE_HWDESC_SIZE_MASK (1 << 10) -#define LPE_HWDESC_INTERRUPT (1 << 31) +#define LPE_HWDESC_INTERRUPT (1U << 31) /* These are valid for Tx descriptors */ #define LPE_HWDESC_LAST (1 << 30) @@ -186,7 +186,7 @@ struct lpe_hwstatus { #define LPE_HWDESC_LATECOLL (1 << 28) #define LPE_HWDESC_UNDERRUN (1 << 29) #define LPE_HWDESC_TXNODESCR (1 << 30) -#define LPE_HWDESC_ERROR (1 << 31) +#define LPE_HWDESC_ERROR (1U << 31) /* These are valid for Rx status descriptors */ #define LPE_HWDESC_CONTROL (1 << 18) @@ -202,7 +202,7 @@ struct lpe_hwstatus { #define LPE_HWDESC_OVERRUN (1 << 28) #define LPE_HWDESC_RXNODESCR (1 << 29) #define LPE_HWDESC_LASTFLAG (1 << 30) -#define LPE_HWDESC_ERROR (1 << 31) +#define LPE_HWDESC_ERROR (1U << 31) #endif /* _ARM_LPC_IF_LPEREG_H */ Modified: stable/10/sys/arm/lpc/lpcreg.h ============================================================================== --- stable/10/sys/arm/lpc/lpcreg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/lpc/lpcreg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -604,7 +604,7 @@ #define LPC_DMAC_CH_LLI 0x08 #define LPC_DMAC_CH_LLI_AHB1 (1 << 0) #define LPC_DMAC_CH_CONTROL 0x0c -#define LPC_DMAC_CH_CONTROL_I (1 << 31) +#define LPC_DMAC_CH_CONTROL_I (1U << 31) #define LPC_DMAC_CH_CONTROL_DI (1 << 27) #define LPC_DMAC_CH_CONTROL_SI (1 << 26) #define LPC_DMAC_CH_CONTROL_D (1 << 25) Modified: stable/10/sys/arm/mv/mv_pci.c ============================================================================== --- stable/10/sys/arm/mv/mv_pci.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/mv/mv_pci.c Tue Feb 4 03:36:42 2014 (r261455) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -#define PCI_CFG_ENA (1 << 31) +#define PCI_CFG_ENA (1U << 31) #define PCI_CFG_BUS(bus) (((bus) & 0xff) << 16) #define PCI_CFG_DEV(dev) (((dev) & 0x1f) << 11) #define PCI_CFG_FUN(fun) (((fun) & 0x7) << 8) Modified: stable/10/sys/arm/samsung/exynos/ehci_exynos5.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/ehci_exynos5.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/samsung/exynos/ehci_exynos5.c Tue Feb 4 03:36:42 2014 (r261455) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); #define HOST_CTRL_SUSPEND (1 << 4) #define HOST_CTRL_RESET_LINK (1 << 1) #define HOST_CTRL_RESET_PHY (1 << 0) -#define HOST_CTRL_RESET_PHY_ALL (1 << 31) +#define HOST_CTRL_RESET_PHY_ALL (1U << 31) /* Forward declarations */ static int exynos_ehci_attach(device_t dev); Modified: stable/10/sys/arm/xscale/i8134x/i81342reg.h ============================================================================== --- stable/10/sys/arm/xscale/i8134x/i81342reg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/xscale/i8134x/i81342reg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -83,7 +83,7 @@ #define IOP34X_ADMA_PQTE (1 << 18) /* P+Q Transfer Enable */ #define IOP34X_ADMA_PTD (1 << 19) /* P Transfer Disable */ #define IOP34X_ADMA_ROE (1 << 30) /* Relaxed Ordering Enable */ -#define IOP34X_ADMA_NSE (1 << 31) /* No Snoop Enable */ +#define IOP34X_ADMA_NSE (1U << 31) /* No Snoop Enable */ #define IOP34X_PBBAR0 0x81588 /* PBI Base Address Register 0 */ #define IOP34X_PBBAR0_ADDRMASK 0xfffff000 @@ -113,7 +113,7 @@ #define SMC_SDBR 0x8180c /* Base Register */ #define SMC_SDBR_BASEADDR (1 << 27) #define SMC_SDBR_BASEADDR_MASK ((1 << 27) | (1 << 28) | (1 << 29) | (1 << 30) \ - | (1 << 31)) + | (1U << 31)) #define SMC_SDUBR 0x81810 /* Upper Base Register */ #define SMC_SBSR 0x81814 /* SDRAM Bank Size Register */ #define SMC_SBSR_BANK_NB (1 << 2) /* Number of DDR Banks @@ -128,7 +128,7 @@ 0x01000 1GB */ #define SMC_SBSR_BANK_SZ_MASK ((1 << 27) | (1 << 28) | (1 << 29) | (1 << 30) \ - | (1 << 31)) + | (1U << 31)) /* Two possible addresses for ATUe depending on configuration. */ @@ -190,7 +190,7 @@ #define ATU_CR_OUT_EN (1 << 1) #define ATU_PCSR 0x0074 /* PCI Configuration and Status Register */ #define PCIE_BUSNO(x) ((x & 0xff000000) >> 24) -#define ATUX_CORE_RST ((1 << 30) | (1 << 31)) /* Core Processor Reset */ +#define ATUX_CORE_RST ((1 << 30) | (1U << 31)) /* Core Processor Reset */ #define ATUX_P_RSTOUT (1 << 21) /* Central Resource PCI Bus Reset */ #define ATUE_CORE_RST ((1 << 9) | (1 << 8)) /* Core Processor Reset */ #define ATU_ISR 0x0078 /* ATU Interrupt Status Register */ @@ -250,7 +250,7 @@ #define ATU_OIOWTVR 0x0304 /* Outbound I/O Window Translate Value Reg */ #define ATU_OUMBAR0 0x0308 /* Outbound Upper Memory Window base addr reg 0*/ #define ATU_OUMBAR_FUNC (28) -#define ATU_OUMBAR_EN (1 << 31) +#define ATU_OUMBAR_EN (1U << 31) #define ATU_OUMWTVR0 0x030c /* Outbound Upper 32bit Memory Window Translate Value Register 0 */ #define ATU_OUMBAR1 0x0310 /* Outbound Upper Memory Window base addr reg1*/ #define ATU_OUMWTVR1 0x0314 /* Outbound Upper 32bit Memory Window Translate Value Register 1 */ Modified: stable/10/sys/arm/xscale/ixp425/ixp425reg.h ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425reg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/arm/xscale/ixp425/ixp425reg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -400,7 +400,7 @@ #define EXP_CNFG0_PCI_HOST (1 << 1) #define EXP_CNFG0_PCI_ARB (1 << 2) #define EXP_CNFG0_PCI_66MHZ (1 << 4) -#define EXP_CNFG0_MEM_MAP (1 << 31) +#define EXP_CNFG0_MEM_MAP (1U << 31) /* EXP_CNFG1 bits */ #define EXP_CNFG1_SW_INT0 (1 << 0) Modified: stable/10/sys/boot/arm/at91/libat91/mci_device.h ============================================================================== --- stable/10/sys/boot/arm/at91/libat91/mci_device.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/boot/arm/at91/libat91/mci_device.h Tue Feb 4 03:36:42 2014 (r261455) @@ -306,7 +306,7 @@ typedef struct _AT91S_MciDevice #define AT91C_VDD_33_34 (1 << 21) #define AT91C_VDD_34_35 (1 << 22) #define AT91C_VDD_35_36 (1 << 23) -#define AT91C_CARD_POWER_UP_BUSY (1 << 31) +#define AT91C_CARD_POWER_UP_BUSY (1U << 31) #define AT91C_MMC_HOST_VOLTAGE_RANGE (AT91C_VDD_27_28 | AT91C_VDD_28_29 | \ AT91C_VDD_29_30 | AT91C_VDD_30_31 | AT91C_VDD_31_32 | AT91C_VDD_32_33) Modified: stable/10/sys/boot/i386/libfirewire/fwohci.h ============================================================================== --- stable/10/sys/boot/i386/libfirewire/fwohci.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/boot/i386/libfirewire/fwohci.h Tue Feb 4 03:36:42 2014 (r261455) @@ -76,7 +76,7 @@ void fwohci_poll(struct fwohci_softc *); #define OHCI_CROMHDR 0x18 #define OHCI_BUS_ID 0x1c #define OHCI_BUS_OPT 0x20 -#define OHCI_BUSIRMC (1 << 31) +#define OHCI_BUSIRMC (1U << 31) #define OHCI_BUSCMC (1 << 30) #define OHCI_BUSISC (1 << 29) #define OHCI_BUSBMC (1 << 28) @@ -102,7 +102,7 @@ void fwohci_poll(struct fwohci_softc *); #define OHCI_SID_BUF 0x64 #define OHCI_SID_CNT 0x68 -#define OHCI_SID_ERR (1 << 31) +#define OHCI_SID_ERR (1U << 31) #define OHCI_SID_CNT_MASK 0xffc #define OHCI_IT_STAT 0x90 Modified: stable/10/sys/boot/i386/libfirewire/fwohcireg.h ============================================================================== --- stable/10/sys/boot/i386/libfirewire/fwohcireg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/boot/i386/libfirewire/fwohcireg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -239,7 +239,7 @@ struct ohci_registers { fwohcireg_t dummy1[3]; /* dummy 0x44-0x4c */ fwohcireg_t hcc_cntl_set; /* HCC control set 0x50 */ fwohcireg_t hcc_cntl_clr; /* HCC control clr 0x54 */ -#define OHCI_HCC_BIBIV (1 << 31) /* BIBimage Valid */ +#define OHCI_HCC_BIBIV (1U << 31) /* BIBimage Valid */ #define OHCI_HCC_BIGEND (1 << 30) /* noByteSwapData */ #define OHCI_HCC_PRPHY (1 << 23) /* programPhyEnable */ #define OHCI_HCC_PHYEN (1 << 22) /* aPhyEnhanceEnable */ @@ -278,7 +278,7 @@ struct ohci_registers { fwohcireg_t link_cntl_clr; /* Chip control clear 0xe4*/ #define FWOHCI_NODEID 0xe8 fwohcireg_t node; /* Node ID 0xe8 */ -#define OHCI_NODE_VALID (1 << 31) +#define OHCI_NODE_VALID (1U << 31) #define OHCI_NODE_ROOT (1 << 30) #define OHCI_ASYSRCBUS 1 Modified: stable/10/sys/dev/aac/aacvar.h ============================================================================== --- stable/10/sys/dev/aac/aacvar.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/aac/aacvar.h Tue Feb 4 03:36:42 2014 (r261455) @@ -412,7 +412,7 @@ struct aac_softc #define AAC_FLAGS_RAW_IO (1 << 12) /* Raw I/O interface */ #define AAC_FLAGS_ARRAY_64BIT (1 << 13) /* 64-bit array size */ #define AAC_FLAGS_LBA_64BIT (1 << 14) /* 64-bit LBA support */ -#define AAC_FLAGS_NOMSI (1 << 31) /* Broken MSI */ +#define AAC_FLAGS_NOMSI (1U << 31) /* Broken MSI */ u_int32_t supported_options; u_int32_t scsi_method_id; Modified: stable/10/sys/dev/acpica/acpi_video.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_video.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/acpica/acpi_video.c Tue Feb 4 03:36:42 2014 (r261455) @@ -132,7 +132,7 @@ static void vo_set_device_state(ACPI_HAN #define DOD_HEAD_ID_BITS 3 #define DOD_HEAD_ID_MASK \ (((1 << DOD_HEAD_ID_BITS) - 1) << DOD_HEAD_ID_SHIFT) -#define DOD_DEVID_SCHEME_STD (1 << 31) +#define DOD_DEVID_SCHEME_STD (1U << 31) /* _BCL related constants */ #define BCL_FULLPOWER 0 @@ -149,7 +149,7 @@ static void vo_set_device_state(ACPI_HAN #define DSS_INACTIVE 0 #define DSS_ACTIVE (1 << 0) #define DSS_SETNEXT (1 << 30) -#define DSS_COMMIT (1 << 31) +#define DSS_COMMIT (1U << 31) static device_method_t acpi_video_methods[] = { DEVMETHOD(device_identify, acpi_video_identify), Modified: stable/10/sys/dev/agp/agp_i810.c ============================================================================== --- stable/10/sys/dev/agp/agp_i810.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/agp/agp_i810.c Tue Feb 4 03:36:42 2014 (r261455) @@ -2226,10 +2226,10 @@ agp_i830_chipset_flush(device_t dev) sc = device_get_softc(dev); pmap_invalidate_cache(); hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC); - bus_write_4(sc->sc_res[0], AGP_I830_HIC, hic | (1 << 31)); + bus_write_4(sc->sc_res[0], AGP_I830_HIC, hic | (1U << 31)); for (i = 0; i < 20000 /* 1 sec */; i++) { hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC); - if ((hic & (1 << 31)) == 0) + if ((hic & (1U << 31)) == 0) break; DELAY(50); } Modified: stable/10/sys/dev/ahci/ahci.h ============================================================================== --- stable/10/sys/dev/ahci/ahci.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/ahci/ahci.h Tue Feb 4 03:36:42 2014 (r261455) @@ -321,7 +321,7 @@ struct ahci_dma_prd { u_int32_t dbc; /* 0 based */ #define AHCI_PRD_MASK 0x003fffff /* max 4MB */ #define AHCI_PRD_MAX (AHCI_PRD_MASK + 1) -#define AHCI_PRD_IPC (1 << 31) +#define AHCI_PRD_IPC (1U << 31) } __packed; struct ahci_cmd_tab { Modified: stable/10/sys/dev/bktr/bktr_core.c ============================================================================== --- stable/10/sys/dev/bktr/bktr_core.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/bktr/bktr_core.c Tue Feb 4 03:36:42 2014 (r261455) @@ -2599,7 +2599,7 @@ dump_bt848( bktr_ptr_t bktr ) #define BKTR_TEST_RISC_STATUS_BIT0 (1 << 28) #define BKTR_TEST_RISC_STATUS_BIT1 (1 << 29) #define BKTR_TEST_RISC_STATUS_BIT2 (1 << 30) -#define BKTR_TEST_RISC_STATUS_BIT3 (1 << 31) +#define BKTR_TEST_RISC_STATUS_BIT3 (1U << 31) static bool_t notclipped (bktr_reg_t * bktr, int x, int width) { int i; Modified: stable/10/sys/dev/cesa/cesa.h ============================================================================== --- stable/10/sys/dev/cesa/cesa.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/cesa/cesa.h Tue Feb 4 03:36:42 2014 (r261455) @@ -297,8 +297,8 @@ struct cesa_chain_info { #define CESA_CSH_AES_KLEN_MASK (3 << 24) #define CESA_CSHD_FRAG_FIRST (1 << 30) -#define CESA_CSHD_FRAG_LAST (2 << 30) -#define CESA_CSHD_FRAG_MIDDLE (3 << 30) +#define CESA_CSHD_FRAG_LAST (2U << 30) +#define CESA_CSHD_FRAG_MIDDLE (3U << 30) /* CESA registers definitions */ #define CESA_ICR 0xDE20 Modified: stable/10/sys/dev/drm/i915_reg.h ============================================================================== --- stable/10/sys/dev/drm/i915_reg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/i915_reg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -349,7 +349,7 @@ __FBSDID("$FreeBSD$"); #define VGA1_PD_P1_MASK (0x1f << 8) #define DPLL_A 0x06014 #define DPLL_B 0x06018 -#define DPLL_VCO_ENABLE (1 << 31) +#define DPLL_VCO_ENABLE (1U << 31) #define DPLL_DVO_HIGH_SPEED (1 << 30) #define DPLL_SYNCLOCK_ENABLE (1 << 29) #define DPLL_VGA_MODE_DIS (1 << 28) @@ -653,7 +653,7 @@ __FBSDID("$FreeBSD$"); /* SDVO port control */ #define SDVOB 0x61140 #define SDVOC 0x61160 -#define SDVO_ENABLE (1 << 31) +#define SDVO_ENABLE (1U << 31) #define SDVO_PIPE_B_SELECT (1 << 30) #define SDVO_STALL_SELECT (1 << 29) #define SDVO_INTERRUPT_ENABLE (1 << 26) @@ -690,7 +690,7 @@ __FBSDID("$FreeBSD$"); #define DVOA 0x61120 #define DVOB 0x61140 #define DVOC 0x61160 -#define DVO_ENABLE (1 << 31) +#define DVO_ENABLE (1U << 31) #define DVO_PIPE_B_SELECT (1 << 30) #define DVO_PIPE_STALL_UNUSED (0 << 28) #define DVO_PIPE_STALL (1 << 28) @@ -726,7 +726,7 @@ __FBSDID("$FreeBSD$"); * Enables the LVDS port. This bit must be set before DPLLs are enabled, as * the DPLL semantics change when the LVDS is assigned to that pipe. */ -#define LVDS_PORT_EN (1 << 31) +#define LVDS_PORT_EN (1U << 31) /* Selects pipe B for LVDS data. Must be set on pre-965. */ #define LVDS_PIPEB_SELECT (1 << 30) /* @@ -762,7 +762,7 @@ __FBSDID("$FreeBSD$"); /* Panel power sequencing */ #define PP_STATUS 0x61200 -#define PP_ON (1 << 31) +#define PP_ON (1U << 31) /* * Indicates that all dependencies of the panel are on: * @@ -783,7 +783,7 @@ __FBSDID("$FreeBSD$"); /* Panel fitting */ #define PFIT_CONTROL 0x61230 -#define PFIT_ENABLE (1 << 31) +#define PFIT_ENABLE (1U << 31) #define PFIT_PIPE_MASK (3 << 29) #define PFIT_PIPE_SHIFT 29 #define VERT_INTERP_DISABLE (0 << 10) @@ -826,7 +826,7 @@ __FBSDID("$FreeBSD$"); /* TV port control */ #define TV_CTL 0x68000 /** Enables the TV encoder */ -# define TV_ENC_ENABLE (1 << 31) +# define TV_ENC_ENABLE (1U << 31) /** Sources the TV encoder input from pipe B instead of A. */ # define TV_ENC_PIPEB_SELECT (1 << 30) /** Outputs composite video (DAC A only) */ @@ -897,7 +897,7 @@ __FBSDID("$FreeBSD$"); * * This gets cleared when TV_DAC_STATE_EN is cleared */ -# define TVDAC_STATE_CHG (1 << 31) +# define TVDAC_STATE_CHG (1U << 31) # define TVDAC_SENSE_MASK (7 << 28) /** Reports that DAC A voltage is above the detect threshold */ # define TVDAC_A_SENSE (1 << 30) @@ -1024,7 +1024,7 @@ __FBSDID("$FreeBSD$"); #define TV_H_CTL_2 0x68034 /** Enables the colorburst (needed for non-component color) */ -# define TV_BURST_ENA (1 << 31) +# define TV_BURST_ENA (1U << 31) /** Offset of the colorburst from the start of hsync, in pixels minus one. */ # define TV_HBURST_START_SHIFT 16 # define TV_HBURST_START_MASK 0x1fff0000 @@ -1069,7 +1069,7 @@ __FBSDID("$FreeBSD$"); #define TV_V_CTL_3 0x68044 /** Enables generation of the equalization signal */ -# define TV_EQUAL_ENA (1 << 31) +# define TV_EQUAL_ENA (1U << 31) /** Length of vsync, in half lines */ # define TV_VEQ_LEN_MASK 0x007f0000 # define TV_VEQ_LEN_SHIFT 16 @@ -1143,7 +1143,7 @@ __FBSDID("$FreeBSD$"); #define TV_SC_CTL_1 0x68060 /** Turns on the first subcarrier phase generation DDA */ -# define TV_SC_DDA1_EN (1 << 31) +# define TV_SC_DDA1_EN (1U << 31) /** Turns on the first subcarrier phase generation DDA */ # define TV_SC_DDA2_EN (1 << 30) /** Turns on the first subcarrier phase generation DDA */ @@ -1206,7 +1206,7 @@ __FBSDID("$FreeBSD$"); * If set, the rest of the registers are ignored, and the calculated values can * be read back from the register. */ -# define TV_AUTO_SCALE (1 << 31) +# define TV_AUTO_SCALE (1U << 31) /** * Disables the vertical filter. * @@ -1269,7 +1269,7 @@ __FBSDID("$FreeBSD$"); # define TV_VSCALE_IP_FRAC_SHIFT 0 #define TV_CC_CONTROL 0x68090 -# define TV_CC_ENABLE (1 << 31) +# define TV_CC_ENABLE (1U << 31) /** * Specifies which field to send the CC data in. * @@ -1285,7 +1285,7 @@ __FBSDID("$FreeBSD$"); # define TV_CC_LINE_SHIFT 0 #define TV_CC_DATA 0x68094 -# define TV_CC_RDY (1 << 31) +# define TV_CC_RDY (1U << 31) /** Second word of CC data to be transmitted. */ # define TV_CC_DATA_2_MASK 0x007f0000 # define TV_CC_DATA_2_SHIFT 16 @@ -1469,7 +1469,7 @@ __FBSDID("$FreeBSD$"); /* VBIOS regs */ #define VGACNTRL 0x71400 -# define VGA_DISP_DISABLE (1 << 31) +# define VGA_DISP_DISABLE (1U << 31) # define VGA_2X_MODE (1 << 30) # define VGA_PIPE_B_SELECT (1 << 29) Modified: stable/10/sys/dev/drm/mach64_drv.h ============================================================================== --- stable/10/sys/dev/drm/mach64_drv.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/mach64_drv.h Tue Feb 4 03:36:42 2014 (r261455) @@ -202,7 +202,7 @@ extern void mach64_driver_irq_uninstall( # define MACH64_CIRCULAR_BUF_SIZE_32KB (1 << 0) # define MACH64_CIRCULAR_BUF_SIZE_64KB (2 << 0) # define MACH64_CIRCULAR_BUF_SIZE_128KB (3 << 0) -# define MACH64_LAST_DESCRIPTOR (1 << 31) +# define MACH64_LAST_DESCRIPTOR (1U << 31) #define MACH64_BM_HOSTDATA 0x0644 #define MACH64_BM_STATUS 0x018c #define MACH64_BM_SYSTEM_MEM_ADDR 0x0184 @@ -316,7 +316,7 @@ extern void mach64_driver_irq_uninstall( #define MACH64_FIFO_STAT 0x0710 # define MACH64_FIFO_SLOT_MASK 0x0000ffff -# define MACH64_FIFO_ERR (1 << 31) +# define MACH64_FIFO_ERR (1U << 31) #define MACH64_GEN_TEST_CNTL 0x04d0 # define MACH64_GUI_ENGINE_ENABLE (1 << 8) @@ -442,7 +442,7 @@ extern void mach64_driver_irq_uninstall( # define MACH64_CRTC2_VLINE_SYNC (1 << 28) /* LT Pro */ /* 0=even, 1=odd */ # define MACH64_CRTC_SNAPSHOT2_INT_EN (1 << 29) /* LT Pro */ # define MACH64_CRTC_SNAPSHOT2_INT (1 << 30) /* LT Pro */ -# define MACH64_CRTC_VBLANK2_INT (1 << 31) +# define MACH64_CRTC_VBLANK2_INT (1U << 31) # define MACH64_CRTC_INT_ENS \ ( \ MACH64_CRTC_VBLANK_INT_EN | \ Modified: stable/10/sys/dev/drm/mga_drv.h ============================================================================== --- stable/10/sys/dev/drm/mga_drv.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/mga_drv.h Tue Feb 4 03:36:42 2014 (r261455) @@ -458,7 +458,7 @@ do { \ # define MGA_BLTMOD_BU24RGB (15 << 25) # define MGA_PATTERN (1 << 29) # define MGA_TRANSC (1 << 30) -# define MGA_CLIPDIS (1 << 31) +# define MGA_CLIPDIS (1U << 31) #define MGA_DWGSYNC 0x2c4c #define MGA_FCOL 0x1c24 @@ -526,7 +526,7 @@ do { \ #define MGA_TEXCTL2 0x2c3c # define MGA_DUALTEX (1 << 7) # define MGA_G400_TC2_MAGIC (1 << 15) -# define MGA_MAP1_ENABLE (1 << 31) +# define MGA_MAP1_ENABLE (1U << 31) #define MGA_TEXFILTER 0x2c58 #define MGA_TEXHEIGHT 0x2c2c #define MGA_TEXORG 0x2c24 Modified: stable/10/sys/dev/drm/r128_drv.h ============================================================================== --- stable/10/sys/dev/drm/r128_drv.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/r128_drv.h Tue Feb 4 03:36:42 2014 (r261455) @@ -227,7 +227,7 @@ extern long r128_compat_ioctl(struct fil # define R128_ROP3_P 0x00f00000 #define R128_DP_WRITE_MASK 0x16cc #define R128_DST_PITCH_OFFSET_C 0x1c80 -# define R128_DST_TILE (1 << 31) +# define R128_DST_TILE (1U << 31) #define R128_GEN_INT_CNTL 0x0040 # define R128_CRTC_VBLANK_INT_EN (1 << 0) @@ -246,7 +246,7 @@ extern long r128_compat_ioctl(struct fil #define R128_GUI_STAT 0x1740 # define R128_GUI_FIFOCNT_MASK 0x0fff -# define R128_GUI_ACTIVE (1 << 31) +# define R128_GUI_ACTIVE (1U << 31) #define R128_MCLK_CNTL 0x000f # define R128_FORCE_GCP (1 << 16) @@ -258,7 +258,7 @@ extern long r128_compat_ioctl(struct fil # define R128_PC_FLUSH_GUI (3 << 0) # define R128_PC_RI_GUI (1 << 2) # define R128_PC_FLUSH_ALL 0x00ff -# define R128_PC_BUSY (1 << 31) +# define R128_PC_BUSY (1U << 31) #define R128_PCI_GART_PAGE 0x017c #define R128_PRIM_TEX_CNTL_C 0x1cb0 @@ -302,7 +302,7 @@ extern long r128_compat_ioctl(struct fil #define R128_PM4_BUFFER_DL_RPTR_ADDR 0x070c #define R128_PM4_BUFFER_DL_RPTR 0x0710 #define R128_PM4_BUFFER_DL_WPTR 0x0714 -# define R128_PM4_BUFFER_DL_DONE (1 << 31) +# define R128_PM4_BUFFER_DL_DONE (1U << 31) #define R128_PM4_VC_FPU_SETUP 0x071c @@ -312,7 +312,7 @@ extern long r128_compat_ioctl(struct fil #define R128_PM4_STAT 0x07b8 # define R128_PM4_FIFOCNT_MASK 0x0fff # define R128_PM4_BUSY (1 << 16) -# define R128_PM4_GUI_ACTIVE (1 << 31) +# define R128_PM4_GUI_ACTIVE (1U << 31) #define R128_PM4_MICROCODE_ADDR 0x07d4 #define R128_PM4_MICROCODE_RADDR 0x07d8 Modified: stable/10/sys/dev/drm/r300_reg.h ============================================================================== --- stable/10/sys/dev/drm/r300_reg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/r300_reg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -1205,7 +1205,7 @@ __FBSDID("$FreeBSD$"); # define R300_FPI0_OUTC_FRC (9 << 23) # define R300_FPI0_OUTC_REPL_ALPHA (10 << 23) # define R300_FPI0_OUTC_SAT (1 << 30) -# define R300_FPI0_INSERT_NOP (1 << 31) +# define R300_FPI0_INSERT_NOP (1U << 31) #define R300_PFS_INSTR2_0 0x49C0 # define R300_FPI2_ARGA_SRC0C_X 0 @@ -1252,7 +1252,7 @@ __FBSDID("$FreeBSD$"); # define R300_FPI2_OUTA_RCP (10 << 23) # define R300_FPI2_OUTA_RSQ (11 << 23) # define R300_FPI2_OUTA_SAT (1 << 30) -# define R300_FPI2_UNKNOWN_31 (1 << 31) +# define R300_FPI2_UNKNOWN_31 (1U << 31) /* END: Fragment program instruction set */ /* Fog state and color */ @@ -1452,7 +1452,7 @@ __FBSDID("$FreeBSD$"); # define R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_NO_EFFECT (0 << 1) # define R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE (1 << 1) # define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_IDLE (0 << 31) -# define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1 << 31) +# define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1U << 31) #define R300_ZB_BW_CNTL 0x4f1c # define R300_HIZ_DISABLE (0 << 0) Modified: stable/10/sys/dev/drm/r600_blit.c ============================================================================== --- stable/10/sys/dev/drm/r600_blit.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/r600_blit.c Tue Feb 4 03:36:42 2014 (r261455) @@ -1428,12 +1428,12 @@ set_scissors(drm_radeon_private_t *dev_p OUT_RING(CP_PACKET3(R600_IT_SET_CONTEXT_REG, 2)); OUT_RING((R600_PA_SC_GENERIC_SCISSOR_TL - R600_SET_CONTEXT_REG_OFFSET) >> 2); - OUT_RING((x1 << 0) | (y1 << 16) | (1 << 31)); + OUT_RING((x1 << 0) | (y1 << 16) | (1U << 31)); OUT_RING((x2 << 0) | (y2 << 16)); OUT_RING(CP_PACKET3(R600_IT_SET_CONTEXT_REG, 2)); OUT_RING((R600_PA_SC_WINDOW_SCISSOR_TL - R600_SET_CONTEXT_REG_OFFSET) >> 2); - OUT_RING((x1 << 0) | (y1 << 16) | (1 << 31)); + OUT_RING((x1 << 0) | (y1 << 16) | (1U << 31)); OUT_RING((x2 << 0) | (y2 << 16)); ADVANCE_RING(); } Modified: stable/10/sys/dev/drm/radeon_cp.c ============================================================================== --- stable/10/sys/dev/drm/radeon_cp.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/radeon_cp.c Tue Feb 4 03:36:42 2014 (r261455) @@ -542,7 +542,7 @@ static void radeon_do_cp_flush(drm_radeo #if 0 u32 tmp; - tmp = RADEON_READ(RADEON_CP_RB_WPTR) | (1 << 31); + tmp = RADEON_READ(RADEON_CP_RB_WPTR) | (1U << 31); RADEON_WRITE(RADEON_CP_RB_WPTR, tmp); #endif } Modified: stable/10/sys/dev/drm/radeon_drv.h ============================================================================== --- stable/10/sys/dev/drm/radeon_drv.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/radeon_drv.h Tue Feb 4 03:36:42 2014 (r261455) @@ -659,7 +659,7 @@ extern int r600_cs_init(struct drm_devic # define RS480_GTW_LAC_EN (1 << 25) # define RS480_2LEVEL_GART (0 << 30) # define RS480_1LEVEL_GART (1 << 30) -# define RS480_PDC_EN (1 << 31) +# define RS480_PDC_EN (1U << 31) #define RS480_GART_BASE 0x2c #define RS480_GART_CACHE_CNTRL 0x2e # define RS480_GART_CACHE_INVALIDATE (1 << 0) /* wait for it to clear */ @@ -775,7 +775,7 @@ extern int r600_cs_init(struct drm_devic # define R300_SUBPIXEL_1_12 (0 << 16) # define R300_SUBPIXEL_1_16 (1 << 16) #define R300_DST_PIPE_CONFIG 0x170c -# define R300_PIPE_AUTO_CONFIG (1 << 31) +# define R300_PIPE_AUTO_CONFIG (1U << 31) #define R300_RB2D_DSTCACHE_MODE 0x3428 # define R300_DC_AUTOFLUSH_ENABLE (1 << 8) # define R300_DC_DC_DISABLE_IGNORE_PE (1 << 17) @@ -807,8 +807,8 @@ extern int r600_cs_init(struct drm_devic #define RADEON_DST_PITCH_OFFSET_C 0x1c80 # define RADEON_DST_TILE_LINEAR (0 << 30) # define RADEON_DST_TILE_MACRO (1 << 30) -# define RADEON_DST_TILE_MICRO (2 << 30) -# define RADEON_DST_TILE_BOTH (3 << 30) +# define RADEON_DST_TILE_MICRO (2U << 30) +# define RADEON_DST_TILE_BOTH (3U << 30) #define RADEON_SCRATCH_REG0 0x15e0 #define RADEON_SCRATCH_REG1 0x15e4 @@ -902,7 +902,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R300_RB2D_DC_FLUSH (3 << 0) # define R300_RB2D_DC_FREE (3 << 2) # define R300_RB2D_DC_FLUSH_ALL 0xf -# define R300_RB2D_DC_BUSY (1 << 31) +# define R300_RB2D_DC_BUSY (1U << 31) #define RADEON_RB3D_CNTL 0x1c3c # define RADEON_ALPHA_BLEND_ENABLE (1 << 0) # define RADEON_PLANE_MASK_ENABLE (1 << 1) @@ -924,16 +924,16 @@ extern u32 radeon_get_scratch(drm_radeon # define RADEON_RB3D_ZC_FLUSH (1 << 0) # define RADEON_RB3D_ZC_FREE (1 << 2) # define RADEON_RB3D_ZC_FLUSH_ALL 0x5 -# define RADEON_RB3D_ZC_BUSY (1 << 31) +# define RADEON_RB3D_ZC_BUSY (1U << 31) #define R300_ZB_ZCACHE_CTLSTAT 0x4f18 # define R300_ZC_FLUSH (1 << 0) # define R300_ZC_FREE (1 << 1) -# define R300_ZC_BUSY (1 << 31) +# define R300_ZC_BUSY (1U << 31) #define RADEON_RB3D_DSTCACHE_CTLSTAT 0x325c # define RADEON_RB3D_DC_FLUSH (3 << 0) # define RADEON_RB3D_DC_FREE (3 << 2) # define RADEON_RB3D_DC_FLUSH_ALL 0xf -# define RADEON_RB3D_DC_BUSY (1 << 31) +# define RADEON_RB3D_DC_BUSY (1U << 31) #define R300_RB3D_DSTCACHE_CTLSTAT 0x4e4c # define R300_RB3D_DC_FLUSH (2 << 0) # define R300_RB3D_DC_FREE (2 << 2) @@ -949,7 +949,7 @@ extern u32 radeon_get_scratch(drm_radeon # define RADEON_Z_COMPRESSION_ENABLE (1 << 28) # define RADEON_FORCE_Z_DIRTY (1 << 29) # define RADEON_Z_WRITE_ENABLE (1 << 30) -# define RADEON_Z_DECOMPRESSION_ENABLE (1 << 31) +# define RADEON_Z_DECOMPRESSION_ENABLE (1U << 31) #define RADEON_RBBM_SOFT_RESET 0x00f0 # define RADEON_SOFT_RESET_CP (1 << 0) # define RADEON_SOFT_RESET_HI (1 << 1) @@ -1003,7 +1003,7 @@ extern u32 radeon_get_scratch(drm_radeon # define RADEON_TIM_BUSY (1 << 25) /* not used on r300 */ # define RADEON_GA_BUSY (1 << 26) # define RADEON_CBA2D_BUSY (1 << 27) -# define RADEON_RBBM_ACTIVE (1 << 31) +# define RADEON_RBBM_ACTIVE (1U << 31) #define RADEON_RE_LINE_PATTERN 0x1cd0 #define RADEON_RE_MISC 0x26c4 #define RADEON_RE_TOP_LEFT 0x26c0 @@ -1117,7 +1117,7 @@ extern u32 radeon_get_scratch(drm_radeon #define RADEON_CP_RB_CNTL 0x0704 # define RADEON_BUF_SWAP_32BIT (2 << 16) # define RADEON_RB_NO_UPDATE (1 << 27) -# define RADEON_RB_RPTR_WR_ENA (1 << 31) +# define RADEON_RB_RPTR_WR_ENA (1U << 31) #define RADEON_CP_RB_RPTR_ADDR 0x070c #define RADEON_CP_RB_RPTR 0x0710 #define RADEON_CP_RB_WPTR 0x0714 @@ -1193,7 +1193,7 @@ extern u32 radeon_get_scratch(drm_radeon #define RADEON_CP_PACKET1_REG0_MASK 0x000007ff #define RADEON_CP_PACKET1_REG1_MASK 0x003ff800 -#define RADEON_VTX_Z_PRESENT (1 << 31) +#define RADEON_VTX_Z_PRESENT (1U << 31) #define RADEON_VTX_PKCOLOR_PRESENT (1 << 3) #define RADEON_PRIM_TYPE_NONE (0 << 0) @@ -1524,7 +1524,7 @@ extern u32 radeon_get_scratch(drm_radeon #define R600_GRBM_STATUS 0x8010 # define R600_CMDFIFO_AVAIL_MASK 0x1f # define R700_CMDFIFO_AVAIL_MASK 0xf -# define R600_GUI_ACTIVE (1 << 31) +# define R600_GUI_ACTIVE (1U << 31) #define R600_GRBM_STATUS2 0x8014 #define R600_GRBM_SOFT_RESET 0x8020 # define R600_SOFT_RESET_CP (1 << 0) @@ -1546,7 +1546,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R600_RB_BUFSZ(x) ((x) << 0) # define R600_RB_BLKSZ(x) ((x) << 8) # define R600_RB_NO_UPDATE (1 << 27) -# define R600_RB_RPTR_WR_ENA (1 << 31) +# define R600_RB_RPTR_WR_ENA (1U << 31) #define R600_CP_RB_RPTR_WR 0xc108 #define R600_CP_RB_RPTR_ADDR 0xc10c #define R600_CP_RB_RPTR_ADDR_HI 0xc110 @@ -1619,7 +1619,7 @@ extern u32 radeon_get_scratch(drm_radeon #define R600_SX_MISC 0x28350 #define R600_DB_DEBUG 0x9830 -# define R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE (1 << 31) +# define R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE (1U << 31) #define R600_DB_WATERMARKS 0x9838 # define R600_DEPTH_FREE(x) ((x) << 0) # define R600_DEPTH_FLUSH(x) ((x) << 5) @@ -1679,7 +1679,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R600_SYNC_WALKER (1 << 25) # define R600_SYNC_ALIGNER (1 << 26) # define R600_BILINEAR_PRECISION_6_BIT (0 << 31) -# define R600_BILINEAR_PRECISION_8_BIT (1 << 31) +# define R600_BILINEAR_PRECISION_8_BIT (1U << 31) #define R700_TCP_CNTL 0x9610 @@ -1753,7 +1753,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R600_PERSP_GRADIENT_ENA (1 << 28) # define R600_LINEAR_GRADIENT_ENA (1 << 29) # define R600_POSITION_SAMPLE (1 << 30) -# define R600_BARYC_AT_SAMPLE_ENA (1 << 31) +# define R600_BARYC_AT_SAMPLE_ENA (1U << 31) #define R600_SPI_PS_IN_CONTROL_1 0x286d0 # define R600_GEN_INDEX_PIX (1 << 0) # define R600_GEN_INDEX_PIX_ADDR(x) ((x) << 1) Modified: stable/10/sys/dev/drm/via_irq.c ============================================================================== --- stable/10/sys/dev/drm/via_irq.c Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm/via_irq.c Tue Feb 4 03:36:42 2014 (r261455) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #define VIA_REG_INTERRUPT 0x200 /* VIA_REG_INTERRUPT */ -#define VIA_IRQ_GLOBAL (1 << 31) +#define VIA_IRQ_GLOBAL (1U << 31) #define VIA_IRQ_VBLANK_ENABLE (1 << 19) #define VIA_IRQ_VBLANK_PENDING (1 << 3) #define VIA_IRQ_HQV0_ENABLE (1 << 11) Modified: stable/10/sys/dev/drm2/i915/i915_reg.h ============================================================================== --- stable/10/sys/dev/drm2/i915/i915_reg.h Tue Feb 4 03:01:33 2014 (r261454) +++ stable/10/sys/dev/drm2/i915/i915_reg.h Tue Feb 4 03:36:42 2014 (r261455) @@ -798,7 +798,7 @@ __FBSDID("$FreeBSD$"); #define _DPLL_A 0x06014 #define _DPLL_B 0x06018 #define DPLL(pipe) _PIPE(pipe, _DPLL_A, _DPLL_B) -#define DPLL_VCO_ENABLE (1 << 31) +#define DPLL_VCO_ENABLE (1U << 31) #define DPLL_DVO_HIGH_SPEED (1 << 30) #define DPLL_SYNCLOCK_ENABLE (1 << 29) #define DPLL_VGA_MODE_DIS (1 << 28) @@ -1483,7 +1483,7 @@ __FBSDID("$FreeBSD$"); /* SDVO port control */ #define SDVOB 0x61140 #define SDVOC 0x61160 -#define SDVO_ENABLE (1 << 31) +#define SDVO_ENABLE (1U << 31) #define SDVO_PIPE_B_SELECT (1 << 30) #define SDVO_STALL_SELECT (1 << 29) #define SDVO_INTERRUPT_ENABLE (1 << 26) @@ -1521,7 +1521,7 @@ __FBSDID("$FreeBSD$"); #define DVOA 0x61120 #define DVOB 0x61140 #define DVOC 0x61160 -#define DVO_ENABLE (1 << 31) +#define DVO_ENABLE (1U << 31) #define DVO_PIPE_B_SELECT (1 << 30) #define DVO_PIPE_STALL_UNUSED (0 << 28) #define DVO_PIPE_STALL (1 << 28) @@ -1557,7 +1557,7 @@ __FBSDID("$FreeBSD$"); * Enables the LVDS port. This bit must be set before DPLLs are enabled, as * the DPLL semantics change when the LVDS is assigned to that pipe. */ -#define LVDS_PORT_EN (1 << 31) +#define LVDS_PORT_EN (1U << 31) /* Selects pipe B for LVDS data. Must be set on pre-965. */ #define LVDS_PIPEB_SELECT (1 << 30) #define LVDS_PIPE_MASK (1 << 30) @@ -1604,7 +1604,7 @@ __FBSDID("$FreeBSD$"); /* Video Data Island Packet control */ #define VIDEO_DIP_DATA 0x61178 #define VIDEO_DIP_CTL 0x61170 -#define VIDEO_DIP_ENABLE (1 << 31) +#define VIDEO_DIP_ENABLE (1U << 31) #define VIDEO_DIP_PORT_B (1 << 29) #define VIDEO_DIP_PORT_C (2 << 29) #define VIDEO_DIP_ENABLE_AVI (1 << 21) @@ -1620,7 +1620,7 @@ __FBSDID("$FreeBSD$"); /* Panel power sequencing */ #define PP_STATUS 0x61200 -#define PP_ON (1 << 31) +#define PP_ON (1U << 31) /* * Indicates that all dependencies of the panel are on: * @@ -1653,7 +1653,7 @@ __FBSDID("$FreeBSD$"); /* Panel fitting */ #define PFIT_CONTROL 0x61230 -#define PFIT_ENABLE (1 << 31) +#define PFIT_ENABLE (1U << 31) #define PFIT_PIPE_MASK (3 << 29) #define PFIT_PIPE_SHIFT 29 #define VERT_INTERP_DISABLE (0 << 10) @@ -1714,7 +1714,7 @@ __FBSDID("$FreeBSD$"); /* TV port control */ #define TV_CTL 0x68000 /** Enables the TV encoder */ -# define TV_ENC_ENABLE (1 << 31) +# define TV_ENC_ENABLE (1U << 31) /** Sources the TV encoder input from pipe B instead of A. */ # define TV_ENC_PIPEB_SELECT (1 << 30) /** Outputs composite video (DAC A only) */ @@ -1786,7 +1786,7 @@ __FBSDID("$FreeBSD$"); * * This gets cleared when TV_DAC_STATE_EN is cleared */ -# define TVDAC_STATE_CHG (1 << 31) +# define TVDAC_STATE_CHG (1U << 31) # define TVDAC_SENSE_MASK (7 << 28) /** Reports that DAC A voltage is above the detect threshold */ # define TVDAC_A_SENSE (1 << 30) @@ -1913,7 +1913,7 @@ __FBSDID("$FreeBSD$"); #define TV_H_CTL_2 0x68034 /** Enables the colorburst (needed for non-component color) */ -# define TV_BURST_ENA (1 << 31) +# define TV_BURST_ENA (1U << 31) /** Offset of the colorburst from the start of hsync, in pixels minus one. */ # define TV_HBURST_START_SHIFT 16 # define TV_HBURST_START_MASK 0x1fff0000 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 08:37:40 2014 Return-Path: Delivered-To: svn-src-stable-10@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 387F3797; Tue, 4 Feb 2014 08:37:40 +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 226F71173; Tue, 4 Feb 2014 08:37:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s148bdph054684; Tue, 4 Feb 2014 08:37:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s148bd4e054682; Tue, 4 Feb 2014 08:37:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402040837.s148bd4e054682@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 08:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261463 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 08:37:40 -0000 Author: hselasky Date: Tue Feb 4 08:37:39 2014 New Revision: 261463 URL: http://svnweb.freebsd.org/changeset/base/261463 Log: MFC r261003: Add new quirk. PR: usb/185968 Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Feb 4 07:13:56 2014 (r261462) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Feb 4 08:37:39 2014 (r261463) @@ -286,6 +286,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(NETCHIP, CLIK_40, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(NETCHIP, POCKETBOOK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(NIKON, D300, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(OLYMPUS, C1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Feb 4 07:13:56 2014 (r261462) +++ stable/10/sys/dev/usb/usbdevs Tue Feb 4 08:37:39 2014 (r261463) @@ -3083,6 +3083,7 @@ product NETCHIP TURBOCONNECT 0x1080 Turb product NETCHIP CLIK_40 0xa140 USB Clik! 40 product NETCHIP GADGETZERO 0xa4a0 Linux Gadget Zero product NETCHIP ETHERNETGADGET 0xa4a2 Linux Ethernet/RNDIS gadget on pxa210/25x/26x +product NETCHIP POCKETBOOK 0xa4a5 PocketBook /* Netgear products */ product NETGEAR EA101 0x1001 Ethernet From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 08:44:14 2014 Return-Path: Delivered-To: svn-src-stable-10@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 F15D5B1D; Tue, 4 Feb 2014 08:44: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 C0641120B; Tue, 4 Feb 2014 08:44:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s148iDxe058218; Tue, 4 Feb 2014 08:44:13 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s148iC8V058214; Tue, 4 Feb 2014 08:44:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402040844.s148iC8V058214@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 08:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261465 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 08:44:14 -0000 Author: hselasky Date: Tue Feb 4 08:44:12 2014 New Revision: 261465 URL: http://svnweb.freebsd.org/changeset/base/261465 Log: MFC r261004, r261005 and r261033: Adjust the DMA delay logic so that the DMA delay does not become too small. Modified: stable/10/sys/dev/usb/controller/ehci.c stable/10/sys/dev/usb/usb_freebsd.h stable/10/sys/dev/usb/usb_freebsd_loader.h stable/10/sys/dev/usb/usb_transfer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci.c Tue Feb 4 08:37:47 2014 (r261464) +++ stable/10/sys/dev/usb/controller/ehci.c Tue Feb 4 08:44:12 2014 (r261465) @@ -3781,7 +3781,7 @@ ehci_get_dma_delay(struct usb_device *ud * Wait until the hardware has finished any possible use of * the transfer descriptor(s) and QH */ - *pus = (188); /* microseconds */ + *pus = (1125); /* microseconds */ } static void Modified: stable/10/sys/dev/usb/usb_freebsd.h ============================================================================== --- stable/10/sys/dev/usb/usb_freebsd.h Tue Feb 4 08:37:47 2014 (r261464) +++ stable/10/sys/dev/usb/usb_freebsd.h Tue Feb 4 08:44:12 2014 (r261465) @@ -50,6 +50,9 @@ #define USB_HAVE_FIXED_CONFIG 0 #define USB_HAVE_FIXED_PORT 0 +/* define zero ticks callout value */ +#define USB_CALLOUT_ZERO_TICKS 1 + #define USB_TD_GET_PROC(td) (td)->td_proc #define USB_PROC_GET_GID(td) (td)->p_pgid Modified: stable/10/sys/dev/usb/usb_freebsd_loader.h ============================================================================== --- stable/10/sys/dev/usb/usb_freebsd_loader.h Tue Feb 4 08:37:47 2014 (r261464) +++ stable/10/sys/dev/usb/usb_freebsd_loader.h Tue Feb 4 08:44:12 2014 (r261465) @@ -50,6 +50,8 @@ #define USB_HAVE_FIXED_CONFIG 0 #define USB_HAVE_FIXED_PORT 0 +#define USB_CALLOUT_ZERO_TICKS 1 + #define USB_TD_GET_PROC(td) (td)->td_proc #define USB_PROC_GET_GID(td) (td)->p_pgid Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Tue Feb 4 08:37:47 2014 (r261464) +++ stable/10/sys/dev/usb/usb_transfer.c Tue Feb 4 08:44:12 2014 (r261465) @@ -2723,7 +2723,7 @@ usbd_transfer_timeout_ms(struct usb_xfer /* defer delay */ usb_callout_reset(&xfer->timeout_handle, - USB_MS_TO_TICKS(ms), cb, xfer); + USB_MS_TO_TICKS(ms) + USB_CALLOUT_ZERO_TICKS, cb, xfer); } /*------------------------------------------------------------------------* From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 08:47:43 2014 Return-Path: Delivered-To: svn-src-stable-10@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 AF9CE465; Tue, 4 Feb 2014 08:47: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 9A2F41243; Tue, 4 Feb 2014 08:47:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s148lhWg058782; Tue, 4 Feb 2014 08:47:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s148lhh6058781; Tue, 4 Feb 2014 08:47:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402040847.s148lhh6058781@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 08:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261468 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 08:47:43 -0000 Author: hselasky Date: Tue Feb 4 08:47:43 2014 New Revision: 261468 URL: http://svnweb.freebsd.org/changeset/base/261468 Log: MFC r261123: Reduce dmesg verbosity. Modified: stable/10/sys/dev/usb/usb_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_dev.c ============================================================================== --- stable/10/sys/dev/usb/usb_dev.c Tue Feb 4 08:47:08 2014 (r261467) +++ stable/10/sys/dev/usb/usb_dev.c Tue Feb 4 08:47:43 2014 (r261468) @@ -930,7 +930,7 @@ usb_close(void *arg) err = usb_ref_device(cpd, &refs, 2 /* uref and allow detached state */); if (err) { - DPRINTFN(0, "Cannot grab USB reference when " + DPRINTFN(2, "Cannot grab USB reference when " "closing USB file handle\n"); goto done; } From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 08:54:59 2014 Return-Path: Delivered-To: svn-src-stable-10@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 E746CAB0; Tue, 4 Feb 2014 08:54: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 B6F6C1313; Tue, 4 Feb 2014 08:54:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s148sxs7062368; Tue, 4 Feb 2014 08:54:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s148sxCK062366; Tue, 4 Feb 2014 08:54:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402040854.s148sxCK062366@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 08:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261471 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 08:55:00 -0000 Author: hselasky Date: Tue Feb 4 08:54:59 2014 New Revision: 261471 URL: http://svnweb.freebsd.org/changeset/base/261471 Log: MFC r261134: Add more USB quirks. Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Feb 4 08:52:08 2014 (r261470) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Tue Feb 4 08:54:59 2014 (r261471) @@ -164,6 +164,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(ATP, EUSB, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(BELKIN, USB2SCSI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(CASIO, QV_DIGICAM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Feb 4 08:52:08 2014 (r261470) +++ stable/10/sys/dev/usb/usbdevs Tue Feb 4 08:54:59 2014 (r261471) @@ -642,6 +642,7 @@ vendor ABOCOM2 0x1482 AboCom Systems vendor SILICOM 0x1485 Silicom vendor RALINK 0x148f Ralink Technology vendor IMAGINATION 0x149a Imagination Technologies +vendor ATP 0x14af ATP Electronics vendor CONCEPTRONIC2 0x14b2 Conceptronic vendor SUPERTOP 0x14cd Super Top vendor PLANEX3 0x14ea Planex Communications @@ -1155,6 +1156,9 @@ product ATEN UC232A 0x2008 Serial product ATEN UC210T 0x2009 UC-210T Ethernet product ATEN DSB650C 0x4000 DSB-650C +/* ATP Electronics products */ +product ATP EUSB 0xaf01 ATP IG eUSB SSD + /* Atheros Communications products */ product ATHEROS AR5523 0x0001 AR5523 product ATHEROS AR5523_NF 0x0002 AR5523 (no firmware) From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 08:59:42 2014 Return-Path: Delivered-To: svn-src-stable-10@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 CE2DAFFC; Tue, 4 Feb 2014 08:59:42 +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 B798F1347; Tue, 4 Feb 2014 08:59:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s148xg1a063145; Tue, 4 Feb 2014 08:59:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s148xgRE063144; Tue, 4 Feb 2014 08:59:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402040859.s148xgRE063144@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 08:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261475 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 08:59:42 -0000 Author: hselasky Date: Tue Feb 4 08:59:42 2014 New Revision: 261475 URL: http://svnweb.freebsd.org/changeset/base/261475 Log: MFC r261224: Comply to the official LibUSB v1.0 API: "It is legal to attempt to claim an already-claimed interface." Modified: stable/10/lib/libusb/libusb10.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb10.c ============================================================================== --- stable/10/lib/libusb/libusb10.c Tue Feb 4 08:59:02 2014 (r261474) +++ stable/10/lib/libusb/libusb10.c Tue Feb 4 08:59:42 2014 (r261475) @@ -611,7 +611,6 @@ int libusb_claim_interface(struct libusb20_device *pdev, int interface_number) { libusb_device *dev; - int err = 0; dev = libusb_get_device(pdev); if (dev == NULL) @@ -621,13 +620,10 @@ libusb_claim_interface(struct libusb20_d return (LIBUSB_ERROR_INVALID_PARAM); CTX_LOCK(dev->ctx); - if (dev->claimed_interfaces & (1 << interface_number)) - err = LIBUSB_ERROR_BUSY; - - if (!err) - dev->claimed_interfaces |= (1 << interface_number); + dev->claimed_interfaces |= (1 << interface_number); CTX_UNLOCK(dev->ctx); - return (err); + + return (0); } int From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 09:06:28 2014 Return-Path: Delivered-To: svn-src-stable-10@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 AE7645AA; Tue, 4 Feb 2014 09:06:28 +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 980D1143B; Tue, 4 Feb 2014 09:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1496SvP067224; Tue, 4 Feb 2014 09:06:28 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1496S6J067223; Tue, 4 Feb 2014 09:06:28 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402040906.s1496S6J067223@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 09:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261478 - stable/10/sys/dev/usb/input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 09:06:28 -0000 Author: hselasky Date: Tue Feb 4 09:06:28 2014 New Revision: 261478 URL: http://svnweb.freebsd.org/changeset/base/261478 Log: MFC r261228: When detaching a [USB] keyboard, keys might still be pressed. Ensure that all pressed keys are released before completing the USB keyboard detach. This will prevent so-called "ghost-keys" from appearing after that the USB device generating the key event(s) has been detached. Modified: stable/10/sys/dev/usb/input/ukbd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/10/sys/dev/usb/input/ukbd.c Tue Feb 4 09:06:07 2014 (r261477) +++ stable/10/sys/dev/usb/input/ukbd.c Tue Feb 4 09:06:28 2014 (r261478) @@ -473,7 +473,8 @@ ukbd_get_key(struct ukbd_softc *sc, uint || (sc->sc_flags & UKBD_FLAG_POLLING) != 0, ("not polling in kdb or panic\n")); - if (sc->sc_inputs == 0) { + if (sc->sc_inputs == 0 && + (sc->sc_flags & UKBD_FLAG_GONE) == 0) { /* start transfer, if not already started */ usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); } @@ -1319,6 +1320,18 @@ ukbd_detach(device_t dev) usb_callout_stop(&sc->sc_callout); + /* kill any stuck keys */ + if (sc->sc_flags & UKBD_FLAG_ATTACHED) { + /* stop receiving events from the USB keyboard */ + usbd_transfer_stop(sc->sc_xfer[UKBD_INTR_DT]); + + /* release all leftover keys, if any */ + memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); + + /* process releasing of all keys */ + ukbd_interrupt(sc); + } + ukbd_disable(&sc->sc_kbd); #ifdef KBD_INSTALL_CDEV From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 10:18:30 2014 Return-Path: Delivered-To: svn-src-stable-10@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 A9769EE7; Tue, 4 Feb 2014 10:18:30 +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 924101A37; Tue, 4 Feb 2014 10:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s14AIUXV095697; Tue, 4 Feb 2014 10:18:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s14AIT9c095692; Tue, 4 Feb 2014 10:18:29 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402041018.s14AIT9c095692@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 10:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261482 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 10:18:30 -0000 Author: hselasky Date: Tue Feb 4 10:18:29 2014 New Revision: 261482 URL: http://svnweb.freebsd.org/changeset/base/261482 Log: MFC r260315: Implement two new libusb API functions. PR: usb/185454 Modified: stable/10/lib/libusb/Makefile stable/10/lib/libusb/libusb.3 stable/10/lib/libusb/libusb.h stable/10/lib/libusb/libusb10_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/Makefile ============================================================================== --- stable/10/lib/libusb/Makefile Tue Feb 4 09:47:14 2014 (r261481) +++ stable/10/lib/libusb/Makefile Tue Feb 4 10:18:29 2014 (r261482) @@ -130,6 +130,8 @@ MLINKS += libusb.3 libusb_event_handler_ MLINKS += libusb.3 libusb_lock_event_waiters.3 MLINKS += libusb.3 libusb_unlock_event_waiters.3 MLINKS += libusb.3 libusb_wait_for_event.3 +MLINKS += libusb.3 libusb_handle_events_timeout_completed.3 +MLINKS += libusb.3 libusb_handle_events_completed.3 MLINKS += libusb.3 libusb_handle_events_timeout.3 MLINKS += libusb.3 libusb_handle_events.3 MLINKS += libusb.3 libusb_handle_events_locked.3 Modified: stable/10/lib/libusb/libusb.3 ============================================================================== --- stable/10/lib/libusb/libusb.3 Tue Feb 4 09:47:14 2014 (r261481) +++ stable/10/lib/libusb/libusb.3 Tue Feb 4 10:18:29 2014 (r261482) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 7, 2013 +.Dd January 5, 2014 .Dt LIBUSB 3 .Os .Sh NAME @@ -485,11 +485,40 @@ transfer completes or another thread sto timeout expired. .Pp .Ft int +.Fn libusb_handle_events_timeout_completed "libusb_context *ctx" "struct timeval *tv" "int *completed" +Handle any pending events by checking if timeouts have expired and by +checking the set of file descriptors for activity. +If the +.Fa completed +argument is not equal to NULL, this function will +loop until a transfer completion callback sets the variable pointed to +by the +.Fa completed +argument to non-zero. +If the +.Fa tv +argument is not equal to NULL, this function will return +LIBUSB_ERROR_TIMEOUT after the given timeout. +Returns 0 on success, or a LIBUSB_ERROR code on failure or timeout. +.Pp +.Ft int +.Fn libusb_handle_events_completed "libusb_context *ctx" "int *completed" +Handle any pending events by checking the set of file descriptors for activity. +If the +.Fa completed +argument is not equal to NULL, this function will +loop until a transfer completion callback sets the variable pointed to +by the +.Fa completed +argument to non-zero. +Returns 0 on success, or a LIBUSB_ERROR code on failure. +.Pp +.Ft int .Fn libusb_handle_events_timeout "libusb_context *ctx" "struct timeval *tv" Handle any pending events by checking if timeouts have expired and by checking the set of file descriptors for activity. Returns 0 on success, or a -LIBUSB_ERROR code on failure. +LIBUSB_ERROR code on failure or timeout. .Pp .Ft int .Fn libusb_handle_events "libusb_context *ctx" @@ -508,7 +537,7 @@ Must be called with the event lock held. Determine the next internal timeout that libusb needs to handle. Returns 0 if there are no pending timeouts, 1 if a timeout was returned, or a LIBUSB_ERROR -code on failure. +code on failure or timeout. .Pp .Ft void .Fn libusb_set_pollfd_notifiers "libusb_context *ctx" "libusb_pollfd_added_cb added_cb" "libusb_pollfd_removed_cb remove_cb" "void *user_data" Modified: stable/10/lib/libusb/libusb.h ============================================================================== --- stable/10/lib/libusb/libusb.h Tue Feb 4 09:47:14 2014 (r261481) +++ stable/10/lib/libusb/libusb.h Tue Feb 4 10:18:29 2014 (r261482) @@ -438,6 +438,8 @@ int libusb_event_handler_active(libusb_c void libusb_lock_event_waiters(libusb_context * ctx); void libusb_unlock_event_waiters(libusb_context * ctx); int libusb_wait_for_event(libusb_context * ctx, struct timeval *tv); +int libusb_handle_events_timeout_completed(libusb_context * ctx, struct timeval *tv, int *completed); +int libusb_handle_events_completed(libusb_context * ctx, int *completed); int libusb_handle_events_timeout(libusb_context * ctx, struct timeval *tv); int libusb_handle_events(libusb_context * ctx); int libusb_handle_events_locked(libusb_context * ctx, struct timeval *tv); Modified: stable/10/lib/libusb/libusb10_io.c ============================================================================== --- stable/10/lib/libusb/libusb10_io.c Tue Feb 4 09:47:14 2014 (r261481) +++ stable/10/lib/libusb/libusb10_io.c Tue Feb 4 10:18:29 2014 (r261482) @@ -336,29 +336,50 @@ libusb_wait_for_event(libusb_context *ct } int -libusb_handle_events_timeout(libusb_context *ctx, struct timeval *tv) +libusb_handle_events_timeout_completed(libusb_context *ctx, + struct timeval *tv, int *completed) { - int err; + int err = 0; ctx = GET_CONTEXT(ctx); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_handle_events_timeout enter"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_handle_events_timeout_completed enter"); libusb_lock_events(ctx); - err = libusb_handle_events_locked(ctx, tv); + while (1) { + if (completed != NULL) { + if (*completed != 0 || err != 0) + break; + } + err = libusb_handle_events_locked(ctx, tv); + if (completed == NULL) + break; + } libusb_unlock_events(ctx); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_handle_events_timeout leave"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_handle_events_timeout_completed exit"); return (err); } int +libusb_handle_events_completed(libusb_context *ctx, int *completed) +{ + return (libusb_handle_events_timeout_completed(ctx, NULL, completed)); +} + +int +libusb_handle_events_timeout(libusb_context *ctx, struct timeval *tv) +{ + return (libusb_handle_events_timeout_completed(ctx, tv, NULL)); +} + +int libusb_handle_events(libusb_context *ctx) { - return (libusb_handle_events_timeout(ctx, NULL)); + return (libusb_handle_events_timeout_completed(ctx, NULL, NULL)); } int @@ -371,8 +392,9 @@ libusb_handle_events_locked(libusb_conte if (libusb_event_handling_ok(ctx)) { err = libusb10_handle_events_sub(ctx, tv); } else { - libusb_wait_for_event(ctx, tv); - err = 0; + err = libusb_wait_for_event(ctx, tv); + if (err != 0) + err = LIBUSB_ERROR_TIMEOUT; } return (err); } From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 10:29:24 2014 Return-Path: Delivered-To: svn-src-stable-10@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 3BDD5781; Tue, 4 Feb 2014 10:29:24 +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 D7A591B1F; Tue, 4 Feb 2014 10:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s14ATNYF099771; Tue, 4 Feb 2014 10:29:23 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s14ATNdY099770; Tue, 4 Feb 2014 10:29:23 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402041029.s14ATNdY099770@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 4 Feb 2014 10:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261486 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 10:29:24 -0000 Author: hselasky Date: Tue Feb 4 10:29:23 2014 New Revision: 261486 URL: http://svnweb.freebsd.org/changeset/base/261486 Log: MFC r260903: Add support for GPS ports to UHSO driver. Modified: stable/10/sys/dev/usb/net/uhso.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/uhso.c ============================================================================== --- stable/10/sys/dev/usb/net/uhso.c Tue Feb 4 10:27:39 2014 (r261485) +++ stable/10/sys/dev/usb/net/uhso.c Tue Feb 4 10:29:23 2014 (r261486) @@ -816,6 +816,8 @@ uhso_probe_iface_auto(struct usb_device UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); case UHSO_PORT_TYPE_DIAG: case UHSO_PORT_TYPE_DIAG2: + case UHSO_PORT_TYPE_GPS: + case UHSO_PORT_TYPE_GPSCTL: case UHSO_PORT_TYPE_CTL: case UHSO_PORT_TYPE_APP: case UHSO_PORT_TYPE_APP2: From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 14:59:16 2014 Return-Path: Delivered-To: svn-src-stable-10@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 7BD49C2F; Tue, 4 Feb 2014 14:59:16 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A14B1647; Tue, 4 Feb 2014 14:59:15 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WAhSv-0000Rw-45; Tue, 04 Feb 2014 14:59:09 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s14Ex66p064629; Tue, 4 Feb 2014 07:59:06 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/L5x4ubEUtmzO7QV8SRXcj Subject: Re: svn commit: r261455 - in stable/10: lib/libc/sparc64/fpu lib/libc/xdr sys/amd64/pci sys/amd64/vmm/intel sys/arm/arm sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/econa sys/arm/freescale/imx sys/arm... From: Ian Lepore To: Eitan Adler In-Reply-To: <201402040336.s143ah3l039786@svn.freebsd.org> References: <201402040336.s143ah3l039786@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Tue, 04 Feb 2014 07:59:06 -0700 Message-ID: <1391525946.13026.106.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-10@FreeBSD.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 14:59:16 -0000 On Tue, 2014-02-04 at 03:36 +0000, Eitan Adler wrote: > Author: eadler > Date: Tue Feb 4 03:36:42 2014 > New Revision: 261455 > URL: http://svnweb.freebsd.org/changeset/base/261455 > > Log: > MFC r258779,r258780,r258787,r258822: > > Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this > shifts into the sign bit. Instead use (1U << 31) which gets the > expected result. > > Similar to the (1 << 31) case it is not defined to do (2 << 30). > > This fix is not ideal as it assumes a 32 bit int, but does fix the issue > for most cases. > > A similar change was made in OpenBSD. > This is causing arm breakage, I think r258787 needs to be mfc'd to fix. -- Ian From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 16:29:31 2014 Return-Path: Delivered-To: svn-src-stable-10@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 56F795C8; Tue, 4 Feb 2014 16:29:31 +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 3EE201E0D; Tue, 4 Feb 2014 16:29:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s14GTVti045751; Tue, 4 Feb 2014 16:29:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s14GTV0Y045750; Tue, 4 Feb 2014 16:29:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402041629.s14GTV0Y045750@svn.freebsd.org> From: Eitan Adler Date: Tue, 4 Feb 2014 16:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261490 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 16:29:31 -0000 Author: eadler Date: Tue Feb 4 16:29:30 2014 New Revision: 261490 URL: http://svnweb.freebsd.org/changeset/base/261490 Log: MFC r258787: r258780 should not have applied to .S files. Modified: stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_pj4b.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Tue Feb 4 16:18:38 2014 (r261489) +++ stable/10/sys/arm/arm/cpufunc_asm_pj4b.S Tue Feb 4 16:29:30 2014 (r261490) @@ -237,7 +237,7 @@ ENTRY(pj4b_config) orr r0, r0, #(1 << 27) /* Critical word first sequencing disable */ orr r0, r0, #(1 << 29) /* Disable MO device read / write */ orr r0, r0, #(1 << 30) /* L1 cache strict round-robin replacement policy*/ - orr r0, r0, #(1U << 31) /* Enable write evict */ + orr r0, r0, #(1 << 31) /* Enable write evict */ mcr p15, 1, r0, c15, c1, 2 #if defined(SMP) /* Set SMP mode in Auxiliary Control Register */ From owner-svn-src-stable-10@FreeBSD.ORG Tue Feb 4 16:30:36 2014 Return-Path: Delivered-To: svn-src-stable-10@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 0E3E380B for ; Tue, 4 Feb 2014 16:30:36 +0000 (UTC) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6F221E2B for ; Tue, 4 Feb 2014 16:30:35 +0000 (UTC) Received: by mail-qc0-f174.google.com with SMTP id x13so13942535qcv.33 for ; Tue, 04 Feb 2014 08:30:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=6gaJ6IqVeKQ8A3U4JaiVxxKlATsAmbUMo0gDgVdschI=; b=e6nXiVKXEr/cwefIiVfGKupcUSH6toNaTe74+7cTTBu6ukpzngsSNSobLYnvUo/57s 4oR1eg58Wsk3JdMl00Kc2pftNgGaNZipdyH7plGAm9zLgwN3ISlC0qMUti3wUaXMGAnl 6kMl2spr5BZQVFEedZI1yrRGwiPtxEIBFac4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=6gaJ6IqVeKQ8A3U4JaiVxxKlATsAmbUMo0gDgVdschI=; b=g54nJhYDIonpTjEy5uom2NsdHc7uWiNxTXya2OdmbRkAj078fcXHTFTUbZT51fXVjp /vd48wvWb5IbCmNz7g5r07aO0vXcai79YBN7p2n6aphs9mSx4XoehYjZRgYud48o+ROj MNdGqXyaw903TdqyRvrmdPBpzOTP01fbHLI+oJIeHQ2JDWzdEoO5Bfx5IGVobc28VzVp DIYWS/DOcYh6eiLKZA5XhbhKivigdEYMO5nv1rjA9A3mxIzl3ukAFSzBrOuN6L3bzbvp 1q2PO/aucc8eY+NuXhqscF2vlt0E3rK1JLmLmBwVcNVCJ83YNMSnVzCYZvuWxihXBRP3 ij0g== X-Gm-Message-State: ALoCoQk6Kz+w+ozUmiqugJrk5Eg9YlnA5373gjFWs0exw9ukwwBmt39CgK7Kis8eFbnK/WU7esg4 X-Received: by 10.224.8.70 with SMTP id g6mr3879220qag.45.1391531434821; Tue, 04 Feb 2014 08:30:34 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.30.229 with HTTP; Tue, 4 Feb 2014 08:30:04 -0800 (PST) In-Reply-To: <1391525946.13026.106.camel@revolution.hippie.lan> References: <201402040336.s143ah3l039786@svn.freebsd.org> <1391525946.13026.106.camel@revolution.hippie.lan> From: Eitan Adler Date: Tue, 4 Feb 2014 11:30:04 -0500 X-Google-Sender-Auth: nT3yYnTuprcWPV0Z098J6W0WAPY Message-ID: Subject: Re: svn commit: r261455 - in stable/10: lib/libc/sparc64/fpu lib/libc/xdr sys/amd64/pci sys/amd64/vmm/intel sys/arm/arm sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/econa sys/arm/freescale/imx sys/arm... To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 16:30:36 -0000 On Tue, Feb 4, 2014 at 9:59 AM, Ian Lepore wrote: > On Tue, 2014-02-04 at 03:36 +0000, Eitan Adler wrote: >> Author: eadler >> Date: Tue Feb 4 03:36:42 2014 >> New Revision: 261455 >> URL: http://svnweb.freebsd.org/changeset/base/261455 >> >> Log: >> MFC r258779,r258780,r258787,r258822: >> >> Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this >> shifts into the sign bit. Instead use (1U << 31) which gets the >> expected result. >> >> Similar to the (1 << 31) case it is not defined to do (2 << 30). >> >> This fix is not ideal as it assumes a 32 bit int, but does fix the issue >> for most cases. >> >> A similar change was made in OpenBSD. >> > > This is causing arm breakage, I think r258787 needs to be mfc'd to fix. As the commit log says, I included r258787 in the original svn merge line. I'm not sure why it didn't work. In any case it should be fixed now and sorry for the breakage. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable-10@FreeBSD.ORG Wed Feb 5 08:40:04 2014 Return-Path: Delivered-To: svn-src-stable-10@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 7965C40D; Wed, 5 Feb 2014 08:40:04 +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 624641DCF; Wed, 5 Feb 2014 08:40:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s158e4MB033869; Wed, 5 Feb 2014 08:40:04 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s158e3FI033851; Wed, 5 Feb 2014 08:40:03 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402050840.s158e3FI033851@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 5 Feb 2014 08:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261509 - in stable/10: etc sys/conf sys/dev/usb sys/dev/usb/input sys/modules/usb sys/modules/usb/wsp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 08:40:04 -0000 Author: hselasky Date: Wed Feb 5 08:40:02 2014 New Revision: 261509 URL: http://svnweb.freebsd.org/changeset/base/261509 Log: MFC r261260, r261262, r261315 and r261343: Add support for trackpads found in Apple MacBook products. While at it add some missing devd entries. Added: stable/10/sys/dev/usb/input/wsp.c - copied, changed from r261260, head/sys/dev/usb/input/wsp.c stable/10/sys/modules/usb/wsp/ - copied from r261260, head/sys/modules/usb/wsp/ Modified: stable/10/etc/devd.conf stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/dev/usb/usbdevs stable/10/sys/modules/usb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd.conf ============================================================================== --- stable/10/etc/devd.conf Wed Feb 5 08:29:24 2014 (r261508) +++ stable/10/etc/devd.conf Wed Feb 5 08:40:02 2014 (r261509) @@ -119,6 +119,15 @@ notify 100 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; + match "cdev" "atp[0-9]+"; + + action "/etc/rc.d/moused quietstart $cdev"; +}; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; match "cdev" "ums[0-9]+"; action "/etc/rc.d/moused quietstart $cdev"; @@ -127,6 +136,15 @@ notify 100 { notify 100 { match "system" "DEVFS"; match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "wsp[0-9]+"; + + action "/etc/rc.d/moused quietstart $cdev"; +}; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; match "type" "DESTROY"; match "cdev" "ums[0-9]+"; Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Wed Feb 5 08:29:24 2014 (r261508) +++ stable/10/sys/conf/NOTES Wed Feb 5 08:40:02 2014 (r261509) @@ -2656,6 +2656,9 @@ device umct device umodem # USB mouse device ums +# USB touchpad(s) +device atp +device wsp # eGalax USB touch screen device uep # Diamond Rio 500 MP3 player Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed Feb 5 08:29:24 2014 (r261508) +++ stable/10/sys/conf/files Wed Feb 5 08:40:02 2014 (r261509) @@ -2434,6 +2434,7 @@ dev/usb/input/uep.c optional uep dev/usb/input/uhid.c optional uhid dev/usb/input/ukbd.c optional ukbd dev/usb/input/ums.c optional ums +dev/usb/input/wsp.c optional wsp # # USB quirks # Copied and modified: stable/10/sys/dev/usb/input/wsp.c (from r261260, head/sys/dev/usb/input/wsp.c) ============================================================================== --- head/sys/dev/usb/input/wsp.c Wed Jan 29 10:42:01 2014 (r261260, copy source) +++ stable/10/sys/dev/usb/input/wsp.c Wed Feb 5 08:40:02 2014 (r261509) @@ -123,6 +123,25 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_ho #define WSP_IFACE_INDEX 1 +/* + * Some tables, structures, definitions and initialisation values for + * the touchpad protocol has been copied from Linux's + * "drivers/input/mouse/bcm5974.c" which has the following copyright + * holders under GPLv2. All device specific code in this driver has + * been written from scratch. The decoding algorithm is based on + * output from usbdump. + * + * Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) + * Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) + * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com) + * Copyright (C) 2005 Johannes Berg (johannes@sipsolutions.net) + * Copyright (C) 2005 Stelian Pop (stelian@popies.net) + * Copyright (C) 2005 Frank Arnold (frank@scirocco-5v-turbo.de) + * Copyright (C) 2005 Peter Osterlund (petero2@telia.com) + * Copyright (C) 2005 Michael Hanselmann (linux-kernel@hansmi.ch) + * Copyright (C) 2006 Nicolas Boichat (nicolas@boichat.ch) + */ + /* button data structure */ struct bt_data { uint8_t unknown1; /* constant */ @@ -569,15 +588,11 @@ static const STRUCT_USB_HOST_ID wsp_devs enum { WSP_INTR_DT, - WSP_RESET, WSP_N_TRANSFER, }; struct wsp_softc { - device_t sc_dev; struct usb_device *sc_usb_device; -#define MODE_LENGTH 8 - uint8_t sc_mode_bytes[MODE_LENGTH]; /* device mode */ struct mtx sc_mutex; /* for synchronization */ struct usb_xfer *sc_xfer[WSP_N_TRANSFER]; struct usb_fifo_sc sc_fifo; @@ -609,7 +624,8 @@ struct wsp_softc { int dz_count; #define WSP_DZ_MAX_COUNT 32 int dt_sum; /* T-axis cumulative movement */ - + + uint8_t o_ntouch; /* old touch finger status */ uint8_t finger; /* 0 or 1 *, check which finger moving */ uint16_t intr_count; #define WSP_TAP_THRESHOLD 3 @@ -648,8 +664,6 @@ static struct usb_fifo_methods wsp_fifo_ }; /* device initialization and shutdown */ -static usb_error_t wsp_req_get_report(struct usb_device *udev, void *data); -static int wsp_set_device_mode(device_t dev, interface_mode mode); static int wsp_enable(struct wsp_softc *sc); static void wsp_disable(struct wsp_softc *sc); @@ -662,7 +676,6 @@ static device_probe_t wsp_probe; static device_attach_t wsp_attach; static device_detach_t wsp_detach; static usb_callback_t wsp_intr_callback; -static usb_callback_t wsp_reset_callback; static struct usb_config wsp_config[WSP_N_TRANSFER] = { [WSP_INTR_DT] = { @@ -676,87 +689,36 @@ static struct usb_config wsp_config[WSP_ .bufsize = 0, /* use wMaxPacketSize */ .callback = &wsp_intr_callback, }, - [WSP_RESET] = { - .type = UE_CONTROL, - .endpoint = 0, /* Control pipe */ - .direction = UE_DIR_ANY, - .bufsize = sizeof(struct usb_device_request) + MODE_LENGTH, - .callback = &wsp_reset_callback, - .interval = 0, /* no pre-delay */ - }, }; -usb_error_t -wsp_req_get_report(struct usb_device *udev, void *data) -{ - struct usb_device_request req; - - req.bmRequestType = UT_READ_CLASS_INTERFACE; - req.bRequest = UR_GET_REPORT; - USETW2(req.wValue, (uint8_t)0x03 /* type */ , (uint8_t)0x00 /* id */ ); - USETW(req.wIndex, 0); - USETW(req.wLength, MODE_LENGTH); - - return (usbd_do_request(udev, NULL /* mutex */ , &req, data)); -} - -static int -wsp_set_device_mode(device_t dev, interface_mode mode) +static usb_error_t +wsp_set_device_mode(struct wsp_softc *sc, interface_mode mode) { - struct wsp_softc *sc; - usb_device_request_t req; + uint8_t mode_bytes[8]; usb_error_t err; - if ((mode != RAW_SENSOR_MODE) && (mode != HID_MODE)) - return (ENXIO); + err = usbd_req_get_report(sc->sc_usb_device, NULL, + mode_bytes, sizeof(mode_bytes), 0, + 0x03, 0x00); - sc = device_get_softc(dev); - - sc->sc_mode_bytes[0] = mode; - req.bmRequestType = UT_WRITE_CLASS_INTERFACE; - req.bRequest = UR_SET_REPORT; - USETW2(req.wValue, (uint8_t)0x03 /* type */ , (uint8_t)0x00 /* id */ ); - USETW(req.wIndex, 0); - USETW(req.wLength, MODE_LENGTH); - err = usbd_do_request(sc->sc_usb_device, NULL, &req, sc->sc_mode_bytes); - if (err != USB_ERR_NORMAL_COMPLETION) - return (ENXIO); - - return (0); -} - -static void -wsp_reset_callback(struct usb_xfer *xfer, usb_error_t error) -{ - usb_device_request_t req; - struct usb_page_cache *pc; - struct wsp_softc *sc = usbd_xfer_softc(xfer); + if (err != USB_ERR_NORMAL_COMPLETION) { + DPRINTF("Failed to read device mode (%d)\n", err); + return (err); + } - switch (USB_GET_STATE(xfer)) { - case USB_ST_SETUP: - sc->sc_mode_bytes[0] = RAW_SENSOR_MODE; - req.bmRequestType = UT_WRITE_CLASS_INTERFACE; - req.bRequest = UR_SET_REPORT; - USETW2(req.wValue, - (uint8_t)0x03 /* type */ , (uint8_t)0x00 /* id */ ); - USETW(req.wIndex, 0); - USETW(req.wLength, MODE_LENGTH); + /* + * XXX Need to wait at least 250ms for hardware to get + * ready. The device mode handling appears to be handled + * asynchronously and we should not issue these commands too + * quickly. + */ + pause("WHW", hz / 4); - pc = usbd_xfer_get_frame(xfer, 0); - usbd_copy_in(pc, 0, &req, sizeof(req)); - pc = usbd_xfer_get_frame(xfer, 1); - usbd_copy_in(pc, 0, sc->sc_mode_bytes, MODE_LENGTH); - - usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); - usbd_xfer_set_frame_len(xfer, 1, MODE_LENGTH); - usbd_xfer_set_frames(xfer, 2); - usbd_transfer_submit(xfer); - break; + mode_bytes[0] = mode; - case USB_ST_TRANSFERRED: - default: - break; - } + return (usbd_req_set_report(sc->sc_usb_device, NULL, + mode_bytes, sizeof(mode_bytes), 0, + 0x03, 0x00)); } static int @@ -820,27 +782,35 @@ wsp_attach(device_t dev) DPRINTFN(WSP_LLEVEL_INFO, "sc=%p\n", sc); - sc->sc_dev = dev; sc->sc_usb_device = uaa->device; /* - * By default the touchpad behaves like an HID device, sending + * By default the touchpad behaves like a HID device, sending * packets with reportID = 8. Such reports contain only * limited information. They encode movement deltas and button * events, but do not include data from the pressure * sensors. The device input mode can be switched from HID * reports to raw sensor data using vendor-specific USB - * control commands; but first the mode must be read. + * control commands: */ - err = wsp_req_get_report(sc->sc_usb_device, sc->sc_mode_bytes); + + /* + * During re-enumeration of the device we need to force the + * device back into HID mode before switching it to RAW + * mode. Else the device does not work like expected. + */ + err = wsp_set_device_mode(sc, HID_MODE); if (err != USB_ERR_NORMAL_COMPLETION) { - DPRINTF("failed to read device mode (%d)\n", err); + DPRINTF("Failed to set mode to HID MODE (%d)\n", err); return (ENXIO); } - if (wsp_set_device_mode(dev, RAW_SENSOR_MODE) != 0) { - DPRINTF("failed to set mode to 'RAW_SENSOR' (%d)\n", err); + + err = wsp_set_device_mode(sc, RAW_SENSOR_MODE); + if (err != USB_ERR_NORMAL_COMPLETION) { + DPRINTF("failed to set mode to RAW MODE (%d)\n", err); return (ENXIO); } + mtx_init(&sc->sc_mutex, "wspmtx", NULL, MTX_DEF | MTX_RECURSE); /* get device specific configuration */ @@ -891,7 +861,7 @@ wsp_detach(device_t dev) { struct wsp_softc *sc = device_get_softc(dev); - wsp_set_device_mode(dev, HID_MODE); + (void) wsp_set_device_mode(sc, HID_MODE); mtx_lock(&sc->sc_mutex); if (sc->sc_state & WSP_ENABLED) @@ -921,7 +891,6 @@ wsp_intr_callback(struct usb_xfer *xfer, int dx = 0; int dy = 0; int dz = 0; - int n = 0; int len; int i; @@ -986,13 +955,9 @@ wsp_intr_callback(struct usb_xfer *xfer, f[i].tool_major, f[i].tool_minor, f[i].orientation, f[i].touch_major, f[i].touch_minor, f[i].multi); - if (f[i].touch_major < tun.pressure_untouch_threshold) - continue; - - sc->pos_x[n] = f[i].abs_x; - sc->pos_y[n] = params->y.min + params->y.max - f[i].abs_y; - sc->index[n] = &f[i]; - n++; + sc->pos_x[i] = f[i].abs_x; + sc->pos_y[i] = params->y.min + params->y.max - f[i].abs_y; + sc->index[i] = &f[i]; } sc->sc_status.flags &= ~MOUSE_POSCHANGED; @@ -1007,8 +972,8 @@ wsp_intr_callback(struct usb_xfer *xfer, if (h->q2 == 4) sc->intr_count++; - if (sc->ntaps < n) { - switch (n) { + if (sc->ntaps < ntouch) { + switch (ntouch) { case 1: if (f[0].touch_major > tun.pressure_tap_threshold) sc->ntaps = 1; @@ -1028,7 +993,7 @@ wsp_intr_callback(struct usb_xfer *xfer, break; } } - if (n == 2) { + if (ntouch == 2) { sc->distance = max(sc->distance, max( abs(sc->pos_x[0] - sc->pos_x[1]), abs(sc->pos_y[0] - sc->pos_y[1]))); @@ -1100,15 +1065,34 @@ wsp_intr_callback(struct usb_xfer *xfer, if (sc->sc_touch == WSP_SECOND_TOUCH) sc->sc_touch = WSP_TOUCHING; - if (n != 0 && + if (ntouch != 0 && h->q2 == 4 && f[0].touch_major >= tun.pressure_touch_threshold) { dx = sc->pos_x[0] - sc->pre_pos_x; dy = sc->pos_y[0] - sc->pre_pos_y; - if (n == 2 && sc->sc_status.button != 0) { + + /* Ignore movement from ibt=1 to ibt=0 */ + if (sc->sc_status.obutton != 0 && + sc->sc_status.button == 0) { + dx = 0; + dy = 0; + } + /* Ignore movement if ntouch changed */ + if (sc->o_ntouch != ntouch) { + dx = 0; + dy = 0; + } + + if (ntouch == 2 && sc->sc_status.button != 0) { dx = sc->pos_x[sc->finger] - sc->pre_pos_x; dy = sc->pos_y[sc->finger] - sc->pre_pos_y; - if (f[0].origin == 0 || f[1].origin == 0) { + + /* + * Ignore movement of switch finger or + * movement from ibt=0 to ibt=1 + */ + if (f[0].origin == 0 || f[1].origin == 0 || + sc->sc_status.obutton != sc->sc_status.button) { dx = 0; dy = 0; sc->finger = 0; @@ -1142,7 +1126,7 @@ wsp_intr_callback(struct usb_xfer *xfer, sc->dx_sum += dx; sc->dy_sum += dy; - if (n == 2 && sc->sc_status.button == 0) { + if (ntouch == 2 && sc->sc_status.button == 0) { if (sc->scr_mode == WSP_SCR_NONE && abs(sc->dx_sum) + abs(sc->dy_sum) > 50) sc->scr_mode = abs(sc->dx_sum) > @@ -1184,10 +1168,12 @@ wsp_intr_callback(struct usb_xfer *xfer, sc->pre_pos_x = sc->pos_x[0]; sc->pre_pos_y = sc->pos_y[0]; - if (n == 2 && sc->sc_status.button != 0) { + if (ntouch == 2 && sc->sc_status.button != 0) { sc->pre_pos_x = sc->pos_x[sc->finger]; sc->pre_pos_y = sc->pos_y[sc->finger]; } + sc->o_ntouch = ntouch; + case USB_ST_SETUP: tr_setup: /* check if we can put more data into the FIFO */ Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed Feb 5 08:29:24 2014 (r261508) +++ stable/10/sys/dev/usb/usbdevs Wed Feb 5 08:40:02 2014 (r261509) @@ -1073,12 +1073,54 @@ product APPLE DUMMY 0x0000 Dummy produc product APPLE IMAC_KBD 0x0201 USB iMac Keyboard product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard -product APPLE KBD_TP_ANSI 0x0223 Apple Internal Keyboard/Trackpad (Wellspring/ANSI) -product APPLE KBD_TP_ISO 0x0224 Apple Internal Keyboard/Trackpad (Wellspring/ISO) -product APPLE KBD_TP_JIS 0x0225 Apple Internal Keyboard/Trackpad (Wellspring/JIS) -product APPLE KBD_TP_ANSI2 0x0230 Apple Internal Keyboard/Trackpad (Wellspring2/ANSI) -product APPLE KBD_TP_ISO2 0x0231 Apple Internal Keyboard/Trackpad (Wellspring2/ISO) -product APPLE KBD_TP_JIS2 0x0232 Apple Internal Keyboard/Trackpad (Wellspring2/JIS) +/* MacbookAir, aka wellspring */ +product APPLE WELLSPRING_ANSI 0x0223 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING_ISO 0x0224 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING_JIS 0x0225 Apple Internal Keyboard/Trackpad +/* MacbookProPenryn, aka wellspring2 */ +product APPLE WELLSPRING2_ANSI 0x0230 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING2_ISO 0x0231 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING2_JIS 0x0232 Apple Internal Keyboard/Trackpad +/* Macbook5,1 (unibody), aka wellspring3 */ +product APPLE WELLSPRING3_ANSI 0x0236 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING3_ISO 0x0237 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING3_JIS 0x0238 Apple Internal Keyboard/Trackpad +/* MacbookAir3,2 (unibody), aka wellspring4 */ +product APPLE WELLSPRING4_ANSI 0x023f Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING4_ISO 0x0240 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING4_JIS 0x0241 Apple Internal Keyboard/Trackpad +/* MacbookAir3,1 (unibody), aka wellspring4 */ +product APPLE WELLSPRING4A_ANSI 0x0242 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING4A_ISO 0x0243 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING4A_JIS 0x0244 Apple Internal Keyboard/Trackpad +/* Macbook8 (unibody, March 2011) */ +product APPLE WELLSPRING5_ANSI 0x0245 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING5_ISO 0x0246 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING5_JIS 0x0247 Apple Internal Keyboard/Trackpad +/* MacbookAir4,1 (unibody, July 2011) */ +product APPLE WELLSPRING6A_ANSI 0x0249 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING6A_ISO 0x024a Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING6A_JIS 0x024b Apple Internal Keyboard/Trackpad +/* MacbookAir4,2 (unibody, July 2011) */ +product APPLE WELLSPRING6_ANSI 0x024c Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING6_ISO 0x024d Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING6_JIS 0x024e Apple Internal Keyboard/Trackpad +/* Macbook8,2 (unibody) */ +product APPLE WELLSPRING5A_ANSI 0x0252 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING5A_ISO 0x0253 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING5A_JIS 0x0254 Apple Internal Keyboard/Trackpad +/* MacbookPro10,1 (unibody, June 2012) */ +product APPLE WELLSPRING7_ANSI 0x0262 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING7_ISO 0x0263 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING7_JIS 0x0264 Apple Internal Keyboard/Trackpad +/* MacbookPro10,2 (unibody, October 2012) */ +product APPLE WELLSPRING7A_ANSI 0x0259 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING7A_ISO 0x025a Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING7A_JIS 0x025b Apple Internal Keyboard/Trackpad +/* MacbookAir6,2 (unibody, June 2013) */ +product APPLE WELLSPRING8_ANSI 0x0290 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING8_ISO 0x0291 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRING8_JIS 0x0292 Apple Internal Keyboard/Trackpad product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse Modified: stable/10/sys/modules/usb/Makefile ============================================================================== --- stable/10/sys/modules/usb/Makefile Wed Feb 5 08:29:24 2014 (r261508) +++ stable/10/sys/modules/usb/Makefile Wed Feb 5 08:40:02 2014 (r261509) @@ -35,7 +35,7 @@ SUBDIR += ${_dwc_otg} ehci ${_musb} ohci ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += ${_urtwn} ${_urtwnfw} -SUBDIR += atp uhid ukbd ums udbp ufm uep +SUBDIR += atp uhid ukbd ums udbp ufm uep wsp SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += uether aue axe cdce cue ${_kue} mos rue smsc udav uhso ipheth From owner-svn-src-stable-10@FreeBSD.ORG Thu Feb 6 02:12:40 2014 Return-Path: Delivered-To: svn-src-stable-10@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 259B2FE7; Thu, 6 Feb 2014 02:12:40 +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 101AD148F; Thu, 6 Feb 2014 02:12:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s162Cd9e069138; Thu, 6 Feb 2014 02:12:39 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s162CdaM069137; Thu, 6 Feb 2014 02:12:39 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201402060212.s162CdaM069137@svn.freebsd.org> From: Rui Paulo Date: Thu, 6 Feb 2014 02:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261532 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 02:12:40 -0000 Author: rpaulo Date: Thu Feb 6 02:12:39 2014 New Revision: 261532 URL: http://svnweb.freebsd.org/changeset/base/261532 Log: MFC r261432 Fix the definition of hg_cmd. Modified: stable/10/sys/conf/newvers.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Wed Feb 5 23:13:40 2014 (r261531) +++ stable/10/sys/conf/newvers.sh Thu Feb 6 02:12:39 2014 (r261532) @@ -133,7 +133,7 @@ fi if [ -d "${SYSDIR}/../.hg" ] ; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/hg" ] ; then - hg_cmd="${dir}/hg -R ${SYSDIR}/../.hg" + hg_cmd="${dir}/hg -R ${SYSDIR}/.." break fi done From owner-svn-src-stable-10@FreeBSD.ORG Thu Feb 6 10:48:56 2014 Return-Path: Delivered-To: svn-src-stable-10@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 85E4BC9A; Thu, 6 Feb 2014 10:48: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 6EF6B129A; Thu, 6 Feb 2014 10:48:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s16AmuKL075718; Thu, 6 Feb 2014 10:48:56 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s16Amuqc075717; Thu, 6 Feb 2014 10:48:56 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201402061048.s16Amuqc075717@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 6 Feb 2014 10:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261545 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 10:48:56 -0000 Author: ae Date: Thu Feb 6 10:48:55 2014 New Revision: 261545 URL: http://svnweb.freebsd.org/changeset/base/261545 Log: MFC r260702 (by melifaro): Fix ipfw fwd for IPv4 traffic broken by r249894. Problem case: Original lookup returns route with GW set, so gw points to rte->rt_gateway. After that we're changing dst and performing lookup another time. Since fwd host is most probably directly reachable, resulting rte does not contain rt_gateway, so gw is not set. Finally, we end with packet transmitted to proper interface but wrong link-layer address. Modified: stable/10/sys/netinet/ip_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Thu Feb 6 10:47:47 2014 (r261544) +++ stable/10/sys/netinet/ip_output.c Thu Feb 6 10:48:55 2014 (r261545) @@ -200,6 +200,13 @@ ip_output(struct mbuf *m, struct mbuf *o hlen = ip->ip_hl << 2; } + /* + * dst/gw handling: + * + * dst can be rewritten but always point to &ro->ro_dst + * gw is readonly but can be pointed either to dst OR rt_gatewy + * therefore we need restore GW if we're re-doing lookup + */ gw = dst = (struct sockaddr_in *)&ro->ro_dst; again: ia = NULL; @@ -219,6 +226,7 @@ again: RO_RTFREE(ro); ro->ro_lle = NULL; rte = NULL; + gw = dst; } if (rte == NULL && fwd_tag == NULL) { bzero(dst, sizeof(*dst)); From owner-svn-src-stable-10@FreeBSD.ORG Thu Feb 6 19:47:18 2014 Return-Path: Delivered-To: svn-src-stable-10@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 C35F253B; Thu, 6 Feb 2014 19:47: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 A27F71D41; Thu, 6 Feb 2014 19:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s16JlIUL095837; Thu, 6 Feb 2014 19:47:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s16JlHST095831; Thu, 6 Feb 2014 19:47:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201402061947.s16JlHST095831@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 6 Feb 2014 19:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261560 - in stable/10: lib/libc/gen lib/libc/sys sys/compat/freebsd32 sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 19:47:18 -0000 Author: kib Date: Thu Feb 6 19:47:17 2014 New Revision: 261560 URL: http://svnweb.freebsd.org/changeset/base/261560 Log: MFC r261080: The posix_fallocate(2) syscall should return error number on error, without modifying errno. MFC r261290: The posix_madvise(3) and posix_fadvise(2) should return error on failure, same as posix_fallocate(2). Modified: stable/10/lib/libc/gen/pmadvise.c stable/10/lib/libc/sys/madvise.2 stable/10/lib/libc/sys/posix_fadvise.2 stable/10/lib/libc/sys/posix_fallocate.2 stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/vfs_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/pmadvise.c ============================================================================== --- stable/10/lib/libc/gen/pmadvise.c Thu Feb 6 18:41:20 2014 (r261559) +++ stable/10/lib/libc/gen/pmadvise.c Thu Feb 6 19:47:17 2014 (r261560) @@ -8,9 +8,19 @@ __FBSDID("$FreeBSD$"); #include +#include int posix_madvise(void *address, size_t size, int how) { - return madvise(address, size, how); + int ret, saved_errno; + + saved_errno = errno; + if (madvise(address, size, how) == -1) { + ret = errno; + errno = saved_errno; + } else { + ret = 0; + } + return (ret); } Modified: stable/10/lib/libc/sys/madvise.2 ============================================================================== --- stable/10/lib/libc/sys/madvise.2 Thu Feb 6 18:41:20 2014 (r261559) +++ stable/10/lib/libc/sys/madvise.2 Thu Feb 6 19:47:17 2014 (r261560) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd July 19, 1996 +.Dd January 30, 2014 .Dt MADVISE 2 .Os .Sh NAME @@ -50,7 +50,10 @@ allows a process that has knowledge of i to describe it to the system. The .Fn posix_madvise -interface is identical and is provided for standards conformance. +interface is identical, except it returns an error number on error and does +not modify +.Va errno , +and is provided for standards conformance. .Pp The known behaviors are: .Bl -tag -width MADV_SEQUENTIAL Modified: stable/10/lib/libc/sys/posix_fadvise.2 ============================================================================== --- stable/10/lib/libc/sys/posix_fadvise.2 Thu Feb 6 18:41:20 2014 (r261559) +++ stable/10/lib/libc/sys/posix_fadvise.2 Thu Feb 6 19:47:17 2014 (r261560) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 19, 2012 +.Dd January 30, 2014 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -93,7 +93,7 @@ Future access to this data may require a .Sh ERRORS The .Fn posix_fadvise -system call will fail if: +system call returns zero on success, and an error on failure: .Bl -tag -width Er .It Bq Er EBADF The Modified: stable/10/lib/libc/sys/posix_fallocate.2 ============================================================================== --- stable/10/lib/libc/sys/posix_fallocate.2 Thu Feb 6 18:41:20 2014 (r261559) +++ stable/10/lib/libc/sys/posix_fallocate.2 Thu Feb 6 19:47:17 2014 (r261560) @@ -83,9 +83,8 @@ that reduces the file size to a size sma If successful, .Fn posix_fallocate returns zero. -It returns -1 on failure, and sets -.Va errno -to indicate the error. +It returns an error on failure, without setting +.Va errno . .Sh ERRORS Possible failure conditions: .Bl -tag -width Er Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Thu Feb 6 18:41:20 2014 (r261559) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Thu Feb 6 19:47:17 2014 (r261560) @@ -2963,8 +2963,9 @@ freebsd32_posix_fallocate(struct thread struct freebsd32_posix_fallocate_args *uap) { - return (kern_posix_fallocate(td, uap->fd, - PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len))); + td->td_retval[0] = kern_posix_fallocate(td, uap->fd, + PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len)); + return (0); } int @@ -2972,8 +2973,10 @@ freebsd32_posix_fadvise(struct thread *t struct freebsd32_posix_fadvise_args *uap) { - return (kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset), - PAIR32TO64(off_t, uap->len), uap->advice)); + td->td_retval[0] = kern_posix_fadvise(td, uap->fd, + PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len), + uap->advice); + return (0); } int Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Thu Feb 6 18:41:20 2014 (r261559) +++ stable/10/sys/kern/vfs_syscalls.c Thu Feb 6 19:47:17 2014 (r261560) @@ -4585,7 +4585,9 @@ int sys_posix_fallocate(struct thread *td, struct posix_fallocate_args *uap) { - return (kern_posix_fallocate(td, uap->fd, uap->offset, uap->len)); + td->td_retval[0] = kern_posix_fallocate(td, uap->fd, uap->offset, + uap->len); + return (0); } /* @@ -4724,6 +4726,7 @@ int sys_posix_fadvise(struct thread *td, struct posix_fadvise_args *uap) { - return (kern_posix_fadvise(td, uap->fd, uap->offset, uap->len, - uap->advice)); + td->td_retval[0] = kern_posix_fadvise(td, uap->fd, uap->offset, + uap->len, uap->advice); + return (0); } From owner-svn-src-stable-10@FreeBSD.ORG Fri Feb 7 04:02:15 2014 Return-Path: Delivered-To: svn-src-stable-10@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 3E932989; Fri, 7 Feb 2014 04:02: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 2B31E1AE0; Fri, 7 Feb 2014 04:02:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1742Fwc001200; Fri, 7 Feb 2014 04:02:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1742FSa001199; Fri, 7 Feb 2014 04:02:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402070402.s1742FSa001199@svn.freebsd.org> From: Alexander Motin Date: Fri, 7 Feb 2014 04:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261571 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 04:02:15 -0000 Author: mav Date: Fri Feb 7 04:02:14 2014 New Revision: 261571 URL: http://svnweb.freebsd.org/changeset/base/261571 Log: MFC r261449: Fix lock acquisition in case no request space available, missed in r260097. Modified: stable/10/sys/rpc/svc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Fri Feb 7 03:30:16 2014 (r261570) +++ stable/10/sys/rpc/svc.c Fri Feb 7 04:02:14 2014 (r261571) @@ -1178,9 +1178,9 @@ svc_run_internal(SVCPOOL *pool, bool_t i */ xprt->xp_lastactive = time_uptime; do { - mtx_unlock(&pool->sp_lock); if (!svc_request_space_available(pool)) break; + mtx_unlock(&pool->sp_lock); rqstp = NULL; stat = svc_getreq(xprt, &rqstp); if (rqstp) { From owner-svn-src-stable-10@FreeBSD.ORG Fri Feb 7 04:09:16 2014 Return-Path: Delivered-To: svn-src-stable-10@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 9896EC47; Fri, 7 Feb 2014 04:09:16 +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 681D91B07; Fri, 7 Feb 2014 04:09:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1749G1M002380; Fri, 7 Feb 2014 04:09:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1749GK4002377; Fri, 7 Feb 2014 04:09:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402070409.s1749GK4002377@svn.freebsd.org> From: Alexander Motin Date: Fri, 7 Feb 2014 04:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261573 - in stable/10/sys/boot: i386/libi386 pc98/libpc98 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 04:09:16 -0000 Author: mav Date: Fri Feb 7 04:09:15 2014 New Revision: 261573 URL: http://svnweb.freebsd.org/changeset/base/261573 Log: MFC r260949: Make comconsole options set before its activation to be remembered. Modified: stable/10/sys/boot/i386/libi386/comconsole.c stable/10/sys/boot/pc98/libpc98/comconsole.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/libi386/comconsole.c ============================================================================== --- stable/10/sys/boot/i386/libi386/comconsole.c Fri Feb 7 04:05:08 2014 (r261572) +++ stable/10/sys/boot/i386/libi386/comconsole.c Fri Feb 7 04:09:15 2014 (r261573) @@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_curspeed != speed) + if (comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_port != port) + if (comc_port != port) comc_setup(comc_curspeed, port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -309,6 +307,8 @@ comc_setup(int speed, int port) unsetenv("hw.uart.console"); comc_curspeed = speed; comc_port = port; + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0) + return; outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT); outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); Modified: stable/10/sys/boot/pc98/libpc98/comconsole.c ============================================================================== --- stable/10/sys/boot/pc98/libpc98/comconsole.c Fri Feb 7 04:05:08 2014 (r261572) +++ stable/10/sys/boot/pc98/libpc98/comconsole.c Fri Feb 7 04:09:15 2014 (r261573) @@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_curspeed != speed) + if (comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && - comc_port != port) + if (comc_port != port) comc_setup(comc_curspeed, port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -309,6 +307,8 @@ comc_setup(int speed, int port) unsetenv("hw.uart.console"); comc_curspeed = speed; comc_port = port; + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0) + return; outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT); outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); From owner-svn-src-stable-10@FreeBSD.ORG Fri Feb 7 04:34:04 2014 Return-Path: Delivered-To: svn-src-stable-10@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 AD55317C; Fri, 7 Feb 2014 04:34:04 +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 97C1D1CD8; Fri, 7 Feb 2014 04:34:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s174Y4hA013454; Fri, 7 Feb 2014 04:34:04 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s174Y4GA013453; Fri, 7 Feb 2014 04:34:04 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201402070434.s174Y4GA013453@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 7 Feb 2014 04:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261575 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 04:34:04 -0000 Author: gnn Date: Fri Feb 7 04:34:04 2014 New Revision: 261575 URL: http://svnweb.freebsd.org/changeset/base/261575 Log: MFC: 261291 The timestamp bit is number 17, and not number 9, in the stat error field of the receive descriptor. Modified: stable/10/sys/dev/e1000/e1000_defines.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/e1000_defines.h ============================================================================== --- stable/10/sys/dev/e1000/e1000_defines.h Fri Feb 7 04:10:30 2014 (r261574) +++ stable/10/sys/dev/e1000/e1000_defines.h Fri Feb 7 04:34:04 2014 (r261575) @@ -131,7 +131,7 @@ #define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */ #define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */ -#define E1000_RXDEXT_STATERR_TST 0x00000100 /* Time Stamp taken */ +#define E1000_RXDEXT_STATERR_TST 0x00010000 /* Time Stamp taken */ #define E1000_RXDEXT_STATERR_LB 0x00040000 #define E1000_RXDEXT_STATERR_CE 0x01000000 #define E1000_RXDEXT_STATERR_SE 0x02000000 From owner-svn-src-stable-10@FreeBSD.ORG Fri Feb 7 07:18:53 2014 Return-Path: Delivered-To: svn-src-stable-10@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 4740D6FB; Fri, 7 Feb 2014 07:18: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 30D3F1983; Fri, 7 Feb 2014 07:18:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s177Ir3K077681; Fri, 7 Feb 2014 07:18:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s177IrCb077680; Fri, 7 Feb 2014 07:18:53 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402070718.s177IrCb077680@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 7 Feb 2014 07:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261579 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 07:18:53 -0000 Author: hselasky Date: Fri Feb 7 07:18:52 2014 New Revision: 261579 URL: http://svnweb.freebsd.org/changeset/base/261579 Log: MFC r261505: Fix a regression issue. Contiguous single segment allocations above PAGE_SIZE bytes should only use one USB page structure. Fixes a problem with some external drivers. Modified: stable/10/sys/dev/usb/usb_busdma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/10/sys/dev/usb/usb_busdma.c Fri Feb 7 05:23:04 2014 (r261578) +++ stable/10/sys/dev/usb/usb_busdma.c Fri Feb 7 07:18:52 2014 (r261579) @@ -454,7 +454,7 @@ usb_pc_common_mem_cb(void *arg, bus_dma_ goto done; } #endif - while (1) { + while (pc->ismultiseg) { off += USB_PAGE_SIZE; if (off >= (segs->ds_len + rem)) { /* page crossing */ From owner-svn-src-stable-10@FreeBSD.ORG Sat Feb 8 15:51:24 2014 Return-Path: Delivered-To: svn-src-stable-10@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 E5EABBB0; Sat, 8 Feb 2014 15:51:24 +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 CFE8B166D; Sat, 8 Feb 2014 15:51:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s18FpO9Q055489; Sat, 8 Feb 2014 15:51:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s18FpOhP055488; Sat, 8 Feb 2014 15:51:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201402081551.s18FpOhP055488@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 Feb 2014 15:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261636 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 15:51:25 -0000 Author: kib Date: Sat Feb 8 15:51:24 2014 New Revision: 261636 URL: http://svnweb.freebsd.org/changeset/base/261636 Log: MFC r261354: In _pthread_kill(), if passed pthread is current thread, do not send the signal second time, by adding the missed else before if statement. PR: threads/186309 Modified: stable/10/lib/libthr/thread/thr_kill.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_kill.c ============================================================================== --- stable/10/lib/libthr/thread/thr_kill.c Sat Feb 8 13:51:15 2014 (r261635) +++ stable/10/lib/libthr/thread/thr_kill.c Sat Feb 8 15:51:24 2014 (r261636) @@ -42,24 +42,27 @@ __weak_reference(_pthread_kill, pthread_ int _pthread_kill(pthread_t pthread, int sig) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; int ret; /* Check for invalid signal numbers: */ if (sig < 0 || sig > _SIG_MAXSIG) /* Invalid signal: */ - ret = EINVAL; + return (EINVAL); + + curthread = _get_curthread(); + /* * Ensure the thread is in the list of active threads, and the * signal is valid (signal 0 specifies error checking only) and * not being ignored: */ - else if (curthread == pthread) { + if (curthread == pthread) { if (sig > 0) _thr_send_sig(pthread, sig); ret = 0; - } if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) - == 0) { + } else if ((ret = _thr_find_thread(curthread, pthread, + /*include dead*/0)) == 0) { if (sig > 0) _thr_send_sig(pthread, sig); THR_THREAD_UNLOCK(curthread, pthread);