From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 5 01:54:13 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 112773A6; Sun, 5 Jan 2014 01:54:13 +0000 (UTC) Received: from mail-ea0-x22f.google.com (mail-ea0-x22f.google.com [IPv6:2a00:1450:4013:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0700314F8; Sun, 5 Jan 2014 01:54:11 +0000 (UTC) Received: by mail-ea0-f175.google.com with SMTP id z10so7248437ead.6 for ; Sat, 04 Jan 2014 17:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=LDgN3yEwYupxc0zkuMscE63oq1MrTD7cj91YnjrP+8M=; b=DrcBj6UVXblfB7aTRgYm5qlHHiyW+DC4mAesvKpWux/Xu8ZZNAxMSaxnX1TJ/blAtZ xDJidf1DsPHygtzj6JDvae/X4FnyQxjqzElnrG6oWnVFbQJ4wZXR0AgdfbT63cjKM9jC +2R10VgnUdro0GdaM6OBHlbca977C8+/MjhcgDoVnJcBIZJKAV9M2N34WPihOCpBPOIi CPGfX+BheXUVH5UCVB/GFX8+r0CNGq8TwsJ9Y9+dS/xop3Mj8S5pzsaG9iE8s8mqqEbc MyJrZRtpVUWJPgh5HLUp0DAUTVrhxnc7F/7r67EXGpHiCvCGi7ubUPaR+USkjRsRbwwU eTDg== MIME-Version: 1.0 X-Received: by 10.15.54.130 with SMTP id t2mr9327929eew.72.1388886850363; Sat, 04 Jan 2014 17:54:10 -0800 (PST) Sender: hiren.panchasara@gmail.com Received: by 10.14.2.66 with HTTP; Sat, 4 Jan 2014 17:54:10 -0800 (PST) In-Reply-To: <201401040448.s044mwsF026117@svn.freebsd.org> References: <201401040448.s044mwsF026117@svn.freebsd.org> Date: Sat, 4 Jan 2014 17:54:10 -0800 X-Google-Sender-Auth: oiqls0A2-89CH9fX8X-iLTSj-Zg Message-ID: Subject: Re: svn commit: r260252 - in stable/9: share/man/man4 sys/amd64/conf sys/conf sys/dev/bxe sys/i386/conf sys/modules/bxe From: hiren panchasara To: Eric Davis Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, svn-src-all , src-committers , svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 01:54:13 -0000 On Fri, Jan 3, 2014 at 8:48 PM, Eric Davis wrote: > Author: edavis > Date: Sat Jan 4 04:48:58 2014 > New Revision: 260252 > URL: http://svnweb.freebsd.org/changeset/base/260252 > > Log: > MFC Broadcom 10Gb bxe driver Thanks a lot! cheers, Hiren From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 5 10:49:57 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6D81545; Sun, 5 Jan 2014 10:49:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B213A1488; Sun, 5 Jan 2014 10:49:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s05AnvAx020045; Sun, 5 Jan 2014 10:49:57 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s05AnuSc020041; Sun, 5 Jan 2014 10:49:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401051049.s05AnuSc020041@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 5 Jan 2014 10:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260316 - stable/9/lib/libusb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 10:49:58 -0000 Author: hselasky Date: Sun Jan 5 10:49:56 2014 New Revision: 260316 URL: http://svnweb.freebsd.org/changeset/base/260316 Log: MFC r235128: Add missing LibUSB 1.0 API function: libusb_get_string_descriptor(). Modified: stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10_desc.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/Makefile ============================================================================== --- stable/9/lib/libusb/Makefile Sun Jan 5 10:41:43 2014 (r260315) +++ stable/9/lib/libusb/Makefile Sun Jan 5 10:49:56 2014 (r260316) @@ -77,6 +77,7 @@ MLINKS += libusb.3 libusb_get_active_con MLINKS += libusb.3 libusb_get_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 +MLINKS += libusb.3 libusb_get_string_descriptor.3 MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 MLINKS += libusb.3 libusb_parse_ss_endpoint_comp.3 MLINKS += libusb.3 libusb_free_ss_endpoint_comp.3 Modified: stable/9/lib/libusb/libusb.3 ============================================================================== --- stable/9/lib/libusb/libusb.3 Sun Jan 5 10:41:43 2014 (r260315) +++ stable/9/lib/libusb/libusb.3 Sun Jan 5 10:49:56 2014 (r260316) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2013 +.Dd January 5, 2014 .Dt LIBUSB 3 .Os .Sh NAME @@ -327,6 +327,12 @@ LIBUSB_ERROR code on failure. Free a configuration descriptor. .Pp .Ft int +.Fn libusb_get_string_descriptor "libusb_device_handle *devh" "uint8_t desc_idx" "uint16_t langid" "unsigned char *data" "int length" +Retrieve a string descriptor in raw format. +Returns the number of bytes actually transferred on success +or a negative LIBUSB_ERROR code on failure. +.Pp +.Ft int .Fn libusb_get_string_descriptor_ascii "libusb_device_handle *devh" "uint8_t desc_idx" "unsigned char *data" "int length" Retrieve a string descriptor in C style ASCII. Returns the positive number of bytes in the resulting ASCII string Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Sun Jan 5 10:41:43 2014 (r260315) +++ stable/9/lib/libusb/libusb.h Sun Jan 5 10:49:56 2014 (r260316) @@ -401,6 +401,7 @@ int libusb_get_active_config_descriptor( int libusb_get_config_descriptor(libusb_device * dev, uint8_t config_index, struct libusb_config_descriptor **config); int libusb_get_config_descriptor_by_value(libusb_device * dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config); void libusb_free_config_descriptor(struct libusb_config_descriptor *config); +int libusb_get_string_descriptor(libusb_device_handle * devh, uint8_t desc_index, uint16_t langid, unsigned char *data, int length); int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); int libusb_parse_ss_endpoint_comp(const void *buf, int len, struct libusb_ss_endpoint_companion_descriptor **ep_comp); Modified: stable/9/lib/libusb/libusb10_desc.c ============================================================================== --- stable/9/lib/libusb/libusb10_desc.c Sun Jan 5 10:41:43 2014 (r260315) +++ stable/9/lib/libusb/libusb10_desc.c Sun Jan 5 10:49:56 2014 (r260316) @@ -294,6 +294,25 @@ libusb_free_config_descriptor(struct lib } int +libusb_get_string_descriptor(libusb_device_handle *pdev, + uint8_t desc_index, uint16_t langid, unsigned char *data, + int length) +{ + if (pdev == NULL || data == NULL || length < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (length > 65535) + length = 65535; + + /* put some default data into the destination buffer */ + data[0] = 0; + + return (libusb_control_transfer(pdev, LIBUSB_ENDPOINT_IN, + LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | desc_index, + langid, data, length, 1000)); +} + +int libusb_get_string_descriptor_ascii(libusb_device_handle *pdev, uint8_t desc_index, unsigned char *data, int length) { From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 5 11:58:08 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C0422C9; Sun, 5 Jan 2014 11:58:08 +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 2799918C4; Sun, 5 Jan 2014 11:58:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s05Bw7L1045970; Sun, 5 Jan 2014 11:58:07 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s05Bw7nq045969; Sun, 5 Jan 2014 11:58:07 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201401051158.s05Bw7nq045969@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 5 Jan 2014 11:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260318 - stable/9/sys/dev/e1000 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 11:58:08 -0000 Author: luigi Date: Sun Jan 5 11:58:07 2014 New Revision: 260318 URL: http://svnweb.freebsd.org/changeset/base/260318 Log: MFC revision 259907 use the correct netmap <-> nic slot mapping on the transmit ring for 'lem'. This bug would manifest only in netmap mode and on packets transmitted after a NIC reset while netmap mode is active. Modified: stable/9/sys/dev/e1000/if_lem.c Modified: stable/9/sys/dev/e1000/if_lem.c ============================================================================== --- stable/9/sys/dev/e1000/if_lem.c Sun Jan 5 10:52:57 2014 (r260317) +++ stable/9/sys/dev/e1000/if_lem.c Sun Jan 5 11:58:07 2014 (r260318) @@ -2678,7 +2678,7 @@ lem_setup_transmit_structures(struct ada void *addr; addr = PNMB(slot + si, &paddr); - adapter->tx_desc_base[si].buffer_addr = htole64(paddr); + adapter->tx_desc_base[i].buffer_addr = htole64(paddr); /* reload the map for netmap mode */ netmap_load_map(adapter->txtag, tx_buffer->map, addr); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 5 15:39:39 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9FCCD54; Sun, 5 Jan 2014 15:39:38 +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 D367319F2; Sun, 5 Jan 2014 15:39:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s05Fdcqx043540; Sun, 5 Jan 2014 15:39:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s05FdbTC043533; Sun, 5 Jan 2014 15:39:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201401051539.s05FdbTC043533@svn.freebsd.org> From: Dimitry Andric Date: Sun, 5 Jan 2014 15:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260321 - in stable: 10/sys/conf 10/sys/modules/drm2/radeonkms 10/sys/modules/ibcore 10/sys/modules/ipoib 10/sys/modules/mlx4 10/sys/modules/mlx4ib 10/sys/modules/mlxen 10/sys/modules/m... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 15:39:39 -0000 Author: dim Date: Sun Jan 5 15:39:37 2014 New Revision: 260321 URL: http://svnweb.freebsd.org/changeset/base/260321 Log: Revert MFC of r260102 for now, until I can merge the required fix from head. This should fix building modules which require -fms-extensions to compile them with gcc. Modified: stable/9/sys/conf/kern.pre.mk stable/9/sys/modules/mlx4/Makefile stable/9/sys/modules/mlx4ib/Makefile stable/9/sys/modules/mlxen/Makefile stable/9/sys/modules/mthca/Makefile Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/conf/kern.pre.mk stable/10/sys/modules/drm2/radeonkms/Makefile stable/10/sys/modules/ibcore/Makefile stable/10/sys/modules/ipoib/Makefile stable/10/sys/modules/mlx4/Makefile stable/10/sys/modules/mlx4ib/Makefile stable/10/sys/modules/mlxen/Makefile stable/10/sys/modules/mthca/Makefile stable/10/sys/ofed/drivers/infiniband/hw/mlx4/Makefile stable/10/sys/ofed/drivers/net/mlx4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Sun Jan 5 15:33:33 2014 (r260320) +++ stable/9/sys/conf/kern.pre.mk Sun Jan 5 15:39:37 2014 (r260321) @@ -106,8 +106,6 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCO .if ${COMPILER_TYPE} == "clang" CLANG_NO_IAS= -no-integrated-as -.else -GCC_MS_EXTENSIONS= -fms-extensions .endif .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 @@ -159,7 +157,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLA # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. OFEDINCLUDES= -I$S/ofed/include/ -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} Modified: stable/9/sys/modules/mlx4/Makefile ============================================================================== --- stable/9/sys/modules/mlx4/Makefile Sun Jan 5 15:33:33 2014 (r260320) +++ stable/9/sys/modules/mlx4/Makefile Sun Jan 5 15:39:37 2014 (r260321) @@ -26,4 +26,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions Modified: stable/9/sys/modules/mlx4ib/Makefile ============================================================================== --- stable/9/sys/modules/mlx4ib/Makefile Sun Jan 5 15:33:33 2014 (r260320) +++ stable/9/sys/modules/mlx4ib/Makefile Sun Jan 5 15:39:37 2014 (r260321) @@ -24,4 +24,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions Modified: stable/9/sys/modules/mlxen/Makefile ============================================================================== --- stable/9/sys/modules/mlxen/Makefile Sun Jan 5 15:33:33 2014 (r260320) +++ stable/9/sys/modules/mlxen/Makefile Sun Jan 5 15:39:37 2014 (r260321) @@ -25,4 +25,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions Modified: stable/9/sys/modules/mthca/Makefile ============================================================================== --- stable/9/sys/modules/mthca/Makefile Sun Jan 5 15:33:33 2014 (r260320) +++ stable/9/sys/modules/mthca/Makefile Sun Jan 5 15:39:37 2014 (r260321) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 5 17:33:11 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DE92C5E; Sun, 5 Jan 2014 17:33:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A4471462; Sun, 5 Jan 2014 17:33:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s05HXBo9093043; Sun, 5 Jan 2014 17:33:11 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s05HXBbD093042; Sun, 5 Jan 2014 17:33:11 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201401051733.s05HXBbD093042@svn.freebsd.org> From: Sean Bruno Date: Sun, 5 Jan 2014 17:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260325 - stable/9/usr.sbin/mfiutil X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 17:33:11 -0000 Author: sbruno Date: Sun Jan 5 17:33:10 2014 New Revision: 260325 URL: http://svnweb.freebsd.org/changeset/base/260325 Log: MFC r258901: svn r251516 resized the buf argument a bit too much. Pass a hardcoded size of 6 to humanize_number() to resolve this. PR: bin/184405 Submitted by: jhb Modified: stable/9/usr.sbin/mfiutil/mfi_show.c Directory Properties: stable/9/usr.sbin/mfiutil/ (props changed) Modified: stable/9/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/9/usr.sbin/mfiutil/mfi_show.c Sun Jan 5 17:29:53 2014 (r260324) +++ stable/9/usr.sbin/mfiutil/mfi_show.c Sun Jan 5 17:33:10 2014 (r260325) @@ -320,7 +320,7 @@ print_pd(struct mfi_pd_info *info, int s const char *s; char buf[256]; - humanize_number(buf, sizeof(buf), info->raw_size * 512, "", + humanize_number(buf, 6, info->raw_size * 512, "", HN_AUTOSCALE, HN_B | HN_NOSPACE |HN_DECIMAL); printf("(%6s) ", buf); if (info->state.ddf.v.pd_type.is_foreign) { From owner-svn-src-stable-9@FreeBSD.ORG Tue Jan 7 18:34:03 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE5B03D2; Tue, 7 Jan 2014 18:34:03 +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 D8AE9121F; Tue, 7 Jan 2014 18:34:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07IY3Tw036030; Tue, 7 Jan 2014 18:34:03 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07IY3L3036025; Tue, 7 Jan 2014 18:34:03 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401071834.s07IY3L3036025@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 7 Jan 2014 18:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260396 - in stable/9/contrib/gcc: . config X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 18:34:04 -0000 Author: pfg Date: Tue Jan 7 18:34:02 2014 New Revision: 260396 URL: http://svnweb.freebsd.org/changeset/base/260396 Log: MFC r259841 gcc: Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined. Obtained from: gcc 4.3 (rev. 118826; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/config/darwin.c stable/9/contrib/gcc/config/darwin.h stable/9/contrib/gcc/dwarf2out.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Tue Jan 7 18:32:31 2014 (r260395) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Tue Jan 7 18:34:02 2014 (r260396) @@ -526,6 +526,37 @@ (override_options): Add entries for Core2. (ix86_issue_rate): Add case for Core2. +2006-11-14 Caroline Tice (r118826) + + * dwarf2out.c (debug_pubtypes_section): New static global variable. + (pubname_entry): Add DEF_VEC_O and DEF_VEC_ALLOC_O statements for + this type. + (pubname_table): Redefine as a vector. + (pubtype_table): New static global variable, defined as a vector. + (pubname_table_allocated): Remove static global variable. + (pubname_table_in_use): Remove static global variable. + (PUBNAME_TABLE_INCREMENT): Remove constant. + (size_of_pubnames): Add parameter to deal with either pubnames or + pubtypes, and change code to deal with table being a vector. + (add_pubname): Change to deal with table being a vector. + (add_pubtype): New function. + (output_pubnames): Add parameter to deal with either pubnames or + pubtypes, and change code to deal with table being a vector. + (gen_array_type_die): Add call to add_pubtype. + (gen_enumeration_type_die): Add call to add_pubtype. + (gen_struct_or_union_type_die): Add call to add_pubtype. + (gen_subroutine_type_die): Add call to add_pubtype. + (gen_typedef_die): Add call to add_pubtype. + (dwarf2out_init): Add code to initialize pubname_table and + pubtype_table vectors; also initialize debug_pubtypes_section. + (prune_unused_types): Change to deal with pubnames being a vector. + (dwarf2out_finish): Change to deal with pubnames being a vector; add + pubnames table to call to output_pubnames; Add code to output pubtypes + table if DEBUG_PUBTYPES_SECTION is defined. + * config/darwin.c (darwin_file_start): Add DEBUG_PUBTYPES_SECTION to + debugnames. + * config/darwin.h (DEBUG_PUBTYPES_SECTION): Define new global variable. + 2006-10-31 Geoffrey Keating (r118356) * c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on Modified: stable/9/contrib/gcc/config/darwin.c ============================================================================== --- stable/9/contrib/gcc/config/darwin.c Tue Jan 7 18:32:31 2014 (r260395) +++ stable/9/contrib/gcc/config/darwin.c Tue Jan 7 18:34:02 2014 (r260396) @@ -1517,6 +1517,7 @@ darwin_file_start (void) DEBUG_LINE_SECTION, DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, + DEBUG_PUBTYPES_SECTION, DEBUG_STR_SECTION, DEBUG_RANGES_SECTION }; Modified: stable/9/contrib/gcc/config/darwin.h ============================================================================== --- stable/9/contrib/gcc/config/darwin.h Tue Jan 7 18:32:31 2014 (r260395) +++ stable/9/contrib/gcc/config/darwin.h Tue Jan 7 18:34:02 2014 (r260396) @@ -401,6 +401,7 @@ extern GTY(()) int darwin_ms_struct; #define DEBUG_LINE_SECTION "__DWARF,__debug_line,regular,debug" #define DEBUG_LOC_SECTION "__DWARF,__debug_loc,regular,debug" #define DEBUG_PUBNAMES_SECTION "__DWARF,__debug_pubnames,regular,debug" +#define DEBUG_PUBTYPES_SECTION "__DWARF,__debug_pubtypes,regular,debug" #define DEBUG_STR_SECTION "__DWARF,__debug_str,regular,debug" #define DEBUG_RANGES_SECTION "__DWARF,__debug_ranges,regular,debug" Modified: stable/9/contrib/gcc/dwarf2out.c ============================================================================== --- stable/9/contrib/gcc/dwarf2out.c Tue Jan 7 18:32:31 2014 (r260395) +++ stable/9/contrib/gcc/dwarf2out.c Tue Jan 7 18:34:02 2014 (r260396) @@ -156,6 +156,7 @@ static GTY(()) section *debug_macinfo_se static GTY(()) section *debug_line_section; static GTY(()) section *debug_loc_section; static GTY(()) section *debug_pubnames_section; +static GTY(()) section *debug_pubtypes_section; static GTY(()) section *debug_str_section; static GTY(()) section *debug_ranges_section; static GTY(()) section *debug_frame_section; @@ -3759,6 +3760,9 @@ typedef struct pubname_struct GTY(()) } pubname_entry; +DEF_VEC_O(pubname_entry); +DEF_VEC_ALLOC_O(pubname_entry, gc); + struct dw_ranges_struct GTY(()) { int block_num; @@ -3940,17 +3944,11 @@ static GTY(()) unsigned separate_line_in /* A pointer to the base of a table that contains a list of publicly accessible names. */ -static GTY ((length ("pubname_table_allocated"))) pubname_ref pubname_table; - -/* Number of elements currently allocated for pubname_table. */ -static GTY(()) unsigned pubname_table_allocated; - -/* Number of elements in pubname_table currently in use. */ -static GTY(()) unsigned pubname_table_in_use; +static GTY (()) VEC (pubname_entry, gc) * pubname_table; -/* Size (in elements) of increments by which we may expand the - pubname_table. */ -#define PUBNAME_TABLE_INCREMENT 64 +/* A pointer to the base of a table that contains a list of publicly + accessible types. */ +static GTY (()) VEC (pubname_entry, gc) * pubtype_table; /* Array of dies for which we should generate .debug_arange info. */ static GTY((length ("arange_table_allocated"))) dw_die_ref *arange_table; @@ -4115,7 +4113,7 @@ static void calc_die_sizes (dw_die_ref); static void mark_dies (dw_die_ref); static void unmark_dies (dw_die_ref); static void unmark_all_dies (dw_die_ref); -static unsigned long size_of_pubnames (void); +static unsigned long size_of_pubnames (VEC (pubname_entry,gc) *); static unsigned long size_of_aranges (void); static enum dwarf_form value_format (dw_attr_ref); static void output_value_format (dw_attr_ref); @@ -4126,7 +4124,8 @@ static void output_compilation_unit_head static void output_comp_unit (dw_die_ref, int); static const char *dwarf2_name (tree, int); static void add_pubname (tree, dw_die_ref); -static void output_pubnames (void); +static void add_pubtype (tree, dw_die_ref); +static void output_pubnames (VEC (pubname_entry,gc) *); static void add_arange (tree, dw_die_ref); static void output_aranges (void); static unsigned int add_ranges (tree); @@ -6750,21 +6749,22 @@ unmark_all_dies (dw_die_ref die) unmark_all_dies (AT_ref (a)); } -/* Return the size of the .debug_pubnames table generated for the - compilation unit. */ +/* Return the size of the .debug_pubnames or .debug_pubtypes table + generated for the compilation unit. */ static unsigned long -size_of_pubnames (void) +size_of_pubnames (VEC (pubname_entry, gc) * names) { unsigned long size; unsigned i; + pubname_ref p; size = DWARF_PUBNAMES_HEADER_SIZE; - for (i = 0; i < pubname_table_in_use; i++) - { - pubname_ref p = &pubname_table[i]; - size += DWARF_OFFSET_SIZE + strlen (p->name) + 1; - } + for (i = 0; VEC_iterate (pubname_entry, names, i, p); i++) + if (names != pubtype_table + || p->die->die_offset != 0 + || !flag_eliminate_unused_debug_types) + size += strlen (p->name) + DWARF_OFFSET_SIZE + 1; size += DWARF_OFFSET_SIZE; return size; @@ -7332,41 +7332,73 @@ dwarf2_name (tree decl, int scope) static void add_pubname (tree decl, dw_die_ref die) { - pubname_ref p; + pubname_entry e; if (! TREE_PUBLIC (decl)) return; - if (pubname_table_in_use == pubname_table_allocated) + e.die = die; + e.name = xstrdup (dwarf2_name (decl, 1)); + VEC_safe_push (pubname_entry, gc, pubname_table, &e); +} + +/* Add a new entry to .debug_pubtypes if appropriate. */ + +static void +add_pubtype (tree decl, dw_die_ref die) +{ + pubname_entry e; + + e.name = NULL; + if ((TREE_PUBLIC (decl) + || die->die_parent == comp_unit_die) + && (die->die_tag == DW_TAG_typedef || COMPLETE_TYPE_P (decl))) { - pubname_table_allocated += PUBNAME_TABLE_INCREMENT; - pubname_table - = ggc_realloc (pubname_table, - (pubname_table_allocated * sizeof (pubname_entry))); - memset (pubname_table + pubname_table_in_use, 0, - PUBNAME_TABLE_INCREMENT * sizeof (pubname_entry)); - } + e.die = die; + if (TYPE_P (decl)) + { + if (TYPE_NAME (decl)) + { + if (TREE_CODE (TYPE_NAME (decl)) == IDENTIFIER_NODE) + e.name = xstrdup ((const char *) IDENTIFIER_POINTER + (TYPE_NAME (decl))); + else if (TREE_CODE (TYPE_NAME (decl)) == TYPE_DECL + && DECL_NAME (TYPE_NAME (decl))) + e.name = xstrdup ((const char *) IDENTIFIER_POINTER + (DECL_NAME (TYPE_NAME (decl)))); + else + e.name = xstrdup ((const char *) get_AT_string (die, DW_AT_name)); + } + } + else + e.name = xstrdup (dwarf2_name (decl, 1)); - p = &pubname_table[pubname_table_in_use++]; - p->die = die; - p->name = xstrdup (dwarf2_name (decl, 1)); + /* If we don't have a name for the type, there's no point in adding + it to the table. */ + if (e.name && e.name[0] != '\0') + VEC_safe_push (pubname_entry, gc, pubtype_table, &e); + } } /* Output the public names table used to speed up access to externally - visible names. For now, only generate entries for externally - visible procedures. */ + visible names; or the public types table used to find type definitions. */ static void -output_pubnames (void) +output_pubnames (VEC (pubname_entry, gc) * names) { unsigned i; - unsigned long pubnames_length = size_of_pubnames (); + unsigned long pubnames_length = size_of_pubnames (names); + pubname_ref pub; if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4) dw2_asm_output_data (4, 0xffffffff, "Initial length escape value indicating 64-bit DWARF extension"); - dw2_asm_output_data (DWARF_OFFSET_SIZE, pubnames_length, - "Length of Public Names Info"); + if (names == pubname_table) + dw2_asm_output_data (DWARF_OFFSET_SIZE, pubnames_length, + "Length of Public Names Info"); + else + dw2_asm_output_data (DWARF_OFFSET_SIZE, pubnames_length, + "Length of Public Type Names Info"); dw2_asm_output_data (2, DWARF_VERSION, "DWARF Version"); dw2_asm_output_offset (DWARF_OFFSET_SIZE, debug_info_section_label, debug_info_section, @@ -7374,17 +7406,21 @@ output_pubnames (void) dw2_asm_output_data (DWARF_OFFSET_SIZE, next_die_offset, "Compilation Unit Length"); - for (i = 0; i < pubname_table_in_use; i++) + for (i = 0; VEC_iterate (pubname_entry, names, i, pub); i++) { - pubname_ref pub = &pubname_table[i]; - - /* We shouldn't see pubnames for DIEs outside of the main CU. */ - gcc_assert (pub->die->die_mark); + /* We shouldn't see pubnames for DIEs outside of the main CU. */ + if (names == pubname_table) + gcc_assert (pub->die->die_mark); - dw2_asm_output_data (DWARF_OFFSET_SIZE, pub->die->die_offset, - "DIE offset"); + if (names != pubtype_table + || pub->die->die_offset != 0 + || !flag_eliminate_unused_debug_types) + { + dw2_asm_output_data (DWARF_OFFSET_SIZE, pub->die->die_offset, + "DIE offset"); - dw2_asm_output_nstring (pub->name, -1, "external name"); + dw2_asm_output_nstring (pub->name, -1, "external name"); + } } dw2_asm_output_data (DWARF_OFFSET_SIZE, 0, NULL); @@ -11298,6 +11334,9 @@ gen_array_type_die (tree type, dw_die_re #endif add_type_attribute (array_die, element_type, 0, 0, context_die); + + if (get_AT (array_die, DW_AT_name)) + add_pubtype (type, array_die); } #if 0 @@ -11433,6 +11472,9 @@ gen_enumeration_type_die (tree type, dw_ else add_AT_flag (type_die, DW_AT_declaration, 1); + if (get_AT (type_die, DW_AT_name)) + add_pubtype (type, type_die); + return type_die; } @@ -12553,6 +12595,9 @@ gen_struct_or_union_type_die (tree type, && ! decl_function_context (TYPE_STUB_DECL (type))) VEC_safe_push (tree, gc, incomplete_types, type); } + + if (get_AT (type_die, DW_AT_name)) + add_pubtype (type, type_die); } /* Generate a DIE for a subroutine _type_. */ @@ -12569,6 +12614,9 @@ gen_subroutine_type_die (tree type, dw_d add_prototyped_attribute (subr_die, type); add_type_attribute (subr_die, return_type, 0, 0, context_die); gen_formal_types_die (type, subr_die); + + if (get_AT (subr_die, DW_AT_name)) + add_pubtype (type, subr_die); } /* Generate a DIE for a type definition. */ @@ -12608,6 +12656,9 @@ gen_typedef_die (tree decl, dw_die_ref c if (DECL_ABSTRACT (decl)) equate_decl_number_to_die (decl, type_die); + + if (get_AT (type_die, DW_AT_name)) + add_pubtype (decl, type_die); } /* Generate a type description DIE. */ @@ -13932,6 +13983,10 @@ dwarf2out_init (const char *filename ATT /* Zero-th entry is allocated, but unused. */ line_info_table_in_use = 1; + /* Allocate the pubtypes and pubnames vectors. */ + pubname_table = VEC_alloc (pubname_entry, gc, 32); + pubtype_table = VEC_alloc (pubname_entry, gc, 32); + /* Generate the initial DIE for the .debug section. Note that the (string) value given in the DW_AT_name attribute of the DW_TAG_compile_unit DIE will (typically) be a relative pathname and that this pathname should be @@ -13958,6 +14013,10 @@ dwarf2out_init (const char *filename ATT SECTION_DEBUG, NULL); debug_pubnames_section = get_section (DEBUG_PUBNAMES_SECTION, SECTION_DEBUG, NULL); +#ifdef DEBUG_PUBTYPES_SECTION + debug_pubtypes_section = get_section (DEBUG_PUBTYPES_SECTION, + SECTION_DEBUG, NULL); +#endif debug_str_section = get_section (DEBUG_STR_SECTION, DEBUG_STR_SECTION_FLAGS, NULL); debug_ranges_section = get_section (DEBUG_RANGES_SECTION, @@ -14240,6 +14299,7 @@ prune_unused_types (void) { unsigned int i; limbo_die_node *node; + pubname_ref pub; #if ENABLE_ASSERT_CHECKING /* All the marks should already be clear. */ @@ -14255,8 +14315,8 @@ prune_unused_types (void) /* Also set the mark on nodes referenced from the pubname_table or arange_table. */ - for (i = 0; i < pubname_table_in_use; i++) - prune_unused_types_mark (pubname_table[i].die, 1); + for (i = 0; VEC_iterate (pubname_entry, pubname_table, i, pub); i++) + prune_unused_types_mark (pub->die, 1); for (i = 0; i < arange_table_in_use; i++) prune_unused_types_mark (arange_table[i], 1); @@ -14437,12 +14497,21 @@ dwarf2out_finish (const char *filename) output_abbrev_section (); /* Output public names table if necessary. */ - if (pubname_table_in_use) + if (!VEC_empty (pubname_entry, pubname_table)) { switch_to_section (debug_pubnames_section); - output_pubnames (); + output_pubnames (pubname_table); } +#ifdef DEBUG_PUBTYPES_SECTION + /* Output public types table if necessary. */ + if (!VEC_empty (pubname_entry, pubtype_table)) + { + switch_to_section (debug_pubtypes_section); + output_pubnames (pubtype_table); + } +#endif + /* Output the address range information. We only put functions in the arange table, so don't write it out if we don't have any. */ if (fde_table_in_use) From owner-svn-src-stable-9@FreeBSD.ORG Tue Jan 7 21:24:35 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C78A4D0; Tue, 7 Jan 2014 21:24: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 2C18F1FEF; Tue, 7 Jan 2014 21:24: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 s07LOZBj003510; Tue, 7 Jan 2014 21:24:35 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07LOYL9003505; Tue, 7 Jan 2014 21:24:34 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201401072124.s07LOYL9003505@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 7 Jan 2014 21:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260413 - stable/9/usr.sbin/bsnmpd/modules/snmp_hast X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 21:24:35 -0000 Author: trociny Date: Tue Jan 7 21:24:34 2014 New Revision: 260413 URL: http://svnweb.freebsd.org/changeset/base/260413 Log: MFC r260049: Add mibs for hastd(1) queue stats. Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Directory Properties: stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jan 7 21:23:41 2014 (r260412) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Tue Jan 7 21:24:34 2014 (r260413) @@ -60,6 +60,11 @@ begemotHast MODULE-IDENTITY REVISION "201307010000Z" DESCRIPTION "Added hastResourceWorkerPid." + REVISION "201312290000Z" + DESCRIPTION + "Added hastResourceLocalQueue, hastResourceSendQueue, + hastResourceRecvQueue, hastResourceDoneQueue, + hastResourceIdleQueue." ::= { begemot 220 } begemotHastObjects OBJECT IDENTIFIER ::= { begemotHast 1 } @@ -120,7 +125,12 @@ HastResourceEntry ::= SEQUENCE { hastResourceWriteErrors Counter64, hastResourceDeleteErrors Counter64, hastResourceFlushErrors Counter64, - hastResourceWorkerPid INTEGER + hastResourceWorkerPid INTEGER, + hastResourceLocalQueue UNSIGNED32, + hastResourceSendQueue UNSIGNED32, + hastResourceRecvQueue UNSIGNED32, + hastResourceDoneQueue UNSIGNED32, + hastResourceIdleQueue UNSIGNED32 } hastResourceIndex OBJECT-TYPE @@ -307,4 +317,46 @@ hastResourceWorkerPid OBJECT-TYPE "Worker process ID." ::= { hastResourceEntry 22 } +hastResourceLocalQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of outstanding I/O requests to the local component." + ::= { hastResourceEntry 23 } + +hastResourceSendQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of outstanding I/O requests to send to the remote + component." + ::= { hastResourceEntry 24 } + +hastResourceRecvQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of outstanding I/O requests waiting for response + from the remote component." + ::= { hastResourceEntry 25 } + +hastResourceDoneQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of processed I/O requests to return to the kernel." + ::= { hastResourceEntry 26 } + +hastResourceIdleQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of request objects in the free bucket." + ::= { hastResourceEntry 27 } + END Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jan 7 21:23:41 2014 (r260412) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Tue Jan 7 21:24:34 2014 (r260413) @@ -79,6 +79,11 @@ struct hast_snmp_resource { uint64_t delete_errors; uint64_t flush_errors; pid_t workerpid; + uint32_t local_queue; + uint32_t send_queue; + uint32_t recv_queue; + uint32_t done_queue; + uint32_t idle_queue; }; static TAILQ_HEAD(, hast_snmp_resource) resources = @@ -345,6 +350,16 @@ update_resources(void) res->flush_errors = nv_get_uint64(nvout, "stat_flush_error%u", i); res->workerpid = nv_get_int32(nvout, "workerpid%u", i); + res->local_queue = + nv_get_uint64(nvout, "local_queue_size%u", i); + res->send_queue = + nv_get_uint64(nvout, "send_queue_size%u", i); + res->recv_queue = + nv_get_uint64(nvout, "recv_queue_size%u", i); + res->done_queue = + nv_get_uint64(nvout, "done_queue_size%u", i); + res->idle_queue = + nv_get_uint64(nvout, "idle_queue_size%u", i); TAILQ_INSERT_TAIL(&resources, res, link); } nv_free(nvout); @@ -503,6 +518,21 @@ op_hastResourceTable(struct snmp_context case LEAF_hastResourceWorkerPid: value->v.integer = res->workerpid; break; + case LEAF_hastResourceLocalQueue: + value->v.uint32 = res->local_queue; + break; + case LEAF_hastResourceSendQueue: + value->v.uint32 = res->send_queue; + break; + case LEAF_hastResourceRecvQueue: + value->v.uint32 = res->recv_queue; + break; + case LEAF_hastResourceDoneQueue: + value->v.uint32 = res->done_queue; + break; + case LEAF_hastResourceIdleQueue: + value->v.uint32 = res->idle_queue; + break; default: ret = SNMP_ERR_RES_UNAVAIL; break; Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jan 7 21:23:41 2014 (r260412) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Tue Jan 7 21:24:34 2014 (r260413) @@ -60,6 +60,11 @@ (20 hastResourceDeleteErrors COUNTER64 GET) (21 hastResourceFlushErrors COUNTER64 GET) (22 hastResourceWorkerPid INTEGER GET) + (23 hastResourceLocalQueue UNSIGNED32 GET) + (24 hastResourceSendQueue UNSIGNED32 GET) + (25 hastResourceRecvQueue UNSIGNED32 GET) + (26 hastResourceDoneQueue UNSIGNED32 GET) + (27 hastResourceIdleQueue UNSIGNED32 GET) ) ) ) From owner-svn-src-stable-9@FreeBSD.ORG Tue Jan 7 23:01:34 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E189A5; Tue, 7 Jan 2014 23:01:34 +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 73C17186B; Tue, 7 Jan 2014 23:01:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07N1YjM041921; Tue, 7 Jan 2014 23:01:34 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07N1Yl3041920; Tue, 7 Jan 2014 23:01:34 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201401072301.s07N1Yl3041920@svn.freebsd.org> From: Peter Wemm Date: Tue, 7 Jan 2014 23:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260419 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 23:01:34 -0000 Author: peter Date: Tue Jan 7 23:01:33 2014 New Revision: 260419 URL: http://svnweb.freebsd.org/changeset/base/260419 Log: MFC r258821 - fix tcp simultaneous close PR: kern/99188 Modified: stable/9/sys/netinet/tcp_input.c Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Tue Jan 7 23:01:05 2014 (r260418) +++ stable/9/sys/netinet/tcp_input.c Tue Jan 7 23:01:33 2014 (r260419) @@ -2407,13 +2407,15 @@ tcp_do_segment(struct mbuf *m, struct tc hhook_run_tcp_est_in(tp, th, &to); if (SEQ_LEQ(th->th_ack, tp->snd_una)) { - if (tlen == 0 && tiwin == tp->snd_wnd) { + if (tlen == 0 && tiwin == tp->snd_wnd && + !(thflags & TH_FIN)) { TCPSTAT_INC(tcps_rcvdupack); /* * If we have outstanding data (other than * a window probe), this is a completely * duplicate ack (ie, window info didn't - * change), the ack is the biggest we've + * change and FIN isn't set), + * the ack is the biggest we've * seen and we've seen exactly our rexmt * threshhold of them, assume a packet * has been dropped and retransmit it. From owner-svn-src-stable-9@FreeBSD.ORG Tue Jan 7 23:20:22 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 329614A0; Tue, 7 Jan 2014 23:20:22 +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 1390A199A; Tue, 7 Jan 2014 23:20:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07NKLin049176; Tue, 7 Jan 2014 23:20:21 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07NKL8Z049171; Tue, 7 Jan 2014 23:20:21 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201401072320.s07NKL8Z049171@svn.freebsd.org> From: Eric Davis Date: Tue, 7 Jan 2014 23:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260425 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 23:20:22 -0000 Author: edavis Date: Tue Jan 7 23:20:21 2014 New Revision: 260425 URL: http://svnweb.freebsd.org/changeset/base/260425 Log: Merged r260415 from head. Approved by: davidcd Modified: stable/9/sys/dev/bxe/bxe.c stable/9/sys/dev/bxe/ecore_hsi.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Tue Jan 7 23:14:55 2014 (r260424) +++ stable/9/sys/dev/bxe/bxe.c Tue Jan 7 23:20:21 2014 (r260425) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.76" +#define BXE_DRIVER_VERSION "1.78.77" #include "bxe.h" #include "ecore_sp.h" @@ -5509,10 +5509,31 @@ bxe_tx_encap(struct bxe_fastpath *fp, st fp->eth_q_stats.tx_window_violation_std++; } - /* XXX I don't like this, change to double copy packet */ + /* lets try to defragment this mbuf */ + fp->eth_q_stats.mbuf_defrag_attempts++; - /* no sense trying to defrag again, just drop the frame */ - rc = ENODEV; + m0 = m_defrag(*m_head, M_DONTWAIT); + if (m0 == NULL) { + fp->eth_q_stats.mbuf_defrag_failures++; + /* Ugh, just drop the frame... :( */ + rc = ENOBUFS; + } else { + /* defrag successful, try mapping again */ + *m_head = m0; + error = bus_dmamap_load_mbuf_sg(fp->tx_mbuf_tag, + tx_buf->m_map, m0, + segs, &nsegs, BUS_DMA_NOWAIT); + if (error) { + fp->eth_q_stats.tx_dma_mapping_failure++; + /* No sense in trying to defrag/copy chain, drop it. :( */ + rc = error; + } + + /* if the chain is still too long then drop it */ + if (__predict_false(nsegs > 12)) { + rc = ENODEV; + } + } } bxe_tx_encap_continue: Modified: stable/9/sys/dev/bxe/ecore_hsi.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_hsi.h Tue Jan 7 23:14:55 2014 (r260424) +++ stable/9/sys/dev/bxe/ecore_hsi.h Tue Jan 7 23:20:21 2014 (r260425) @@ -1305,6 +1305,13 @@ struct extended_dev_info_shared_cfg { #define EXTENDED_DEV_INFO_SHARED_CFG_SRIOV_SHOW_MENU 0x00000000 #define EXTENDED_DEV_INFO_SHARED_CFG_SRIOV_HIDE_MENU 0x00000200 + /* Overide PCIE revision ID when enabled the, + revision ID will set to B1=='0x11' */ + #define EXTENDED_DEV_INFO_SHARED_CFG_OVR_REV_ID_MASK 0x00000400 + #define EXTENDED_DEV_INFO_SHARED_CFG_OVR_REV_ID_SHIFT 10 + #define EXTENDED_DEV_INFO_SHARED_CFG_OVR_REV_ID_DISABLED 0x00000000 + #define EXTENDED_DEV_INFO_SHARED_CFG_OVR_REV_ID_ENABLED 0x00000400 + /* Threshold in celcius for max continuous operation */ uint32_t temperature_report; /* 0x4014 */ #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_MCOT_MASK 0x0000007F From owner-svn-src-stable-9@FreeBSD.ORG Wed Jan 8 02:30:25 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DAFAB2E; Wed, 8 Jan 2014 02:30:25 +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 476DA1F9B; Wed, 8 Jan 2014 02:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s082UPaV026737; Wed, 8 Jan 2014 02:30:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s082UPrk026736; Wed, 8 Jan 2014 02:30:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201401080230.s082UPrk026736@svn.freebsd.org> From: Colin Percival Date: Wed, 8 Jan 2014 02:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260432 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 02:30:25 -0000 Author: cperciva Date: Wed Jan 8 02:30:24 2014 New Revision: 260432 URL: http://svnweb.freebsd.org/changeset/base/260432 Log: MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM. The rc system aggressively caches the contents of /etc/rc.conf in order to improve boot performance; this produces arguably astonishing (non-)results if /etc/rc.conf is modified during the boot process. This commit provides a mechanism for explicitly requesting that rc.conf be reloaded. Modified: stable/9/etc/rc Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc ============================================================================== --- stable/9/etc/rc Wed Jan 8 02:19:39 2014 (r260431) +++ stable/9/etc/rc Wed Jan 8 02:30:24 2014 (r260432) @@ -71,6 +71,11 @@ fi . /etc/rc.subr load_rc_config 'XXX' +# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d +# scripts to perform "boot-time configuration" including enabling and +# disabling rc.d scripts which appear later in the boot order. +trap "_rc_conf_loaded=false; load_rc_config 'XXX'" ALRM + skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" From owner-svn-src-stable-9@FreeBSD.ORG Wed Jan 8 02:31:36 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 062D4C85; Wed, 8 Jan 2014 02:31:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E61CD1FF4; Wed, 8 Jan 2014 02: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 s082VZar029178; Wed, 8 Jan 2014 02:31:35 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s082VZv6029177; Wed, 8 Jan 2014 02:31:35 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201401080231.s082VZv6029177@svn.freebsd.org> From: Colin Percival Date: Wed, 8 Jan 2014 02:31:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260433 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 02:31:36 -0000 Author: cperciva Date: Wed Jan 8 02:31:35 2014 New Revision: 260433 URL: http://svnweb.freebsd.org/changeset/base/260433 Log: MFC r258893, r258956: Add a new sysctl / loader tunable kern.panic_reboot_wait_time which defaults to PANIC_REBOOT_WAIT_TIME (a long-existing kernel config setting). Use this now-variable value in place of the defined constant to control how long the system waits after a panic before rebooting. Modified: stable/9/sys/kern/kern_shutdown.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Wed Jan 8 02:30:24 2014 (r260432) +++ stable/9/sys/kern/kern_shutdown.c Wed Jan 8 02:31:35 2014 (r260433) @@ -87,6 +87,11 @@ __FBSDID("$FreeBSD$"); #ifndef PANIC_REBOOT_WAIT_TIME #define PANIC_REBOOT_WAIT_TIME 15 /* default to 15 seconds */ #endif +static int panic_reboot_wait_time = PANIC_REBOOT_WAIT_TIME; +SYSCTL_INT(_kern, OID_AUTO, panic_reboot_wait_time, CTLFLAG_RW | CTLFLAG_TUN, + &panic_reboot_wait_time, 0, + "Seconds to wait before rebooting after a panic"); +TUNABLE_INT("kern.panic_reboot_wait_time", &panic_reboot_wait_time); /* * Note that stdarg.h and the ANSI style va_start macro is used for both @@ -487,12 +492,12 @@ shutdown_panic(void *junk, int howto) int loop; if (howto & RB_DUMP) { - if (PANIC_REBOOT_WAIT_TIME != 0) { - if (PANIC_REBOOT_WAIT_TIME != -1) { + if (panic_reboot_wait_time != 0) { + if (panic_reboot_wait_time != -1) { printf("Automatic reboot in %d seconds - " "press a key on the console to abort\n", - PANIC_REBOOT_WAIT_TIME); - for (loop = PANIC_REBOOT_WAIT_TIME * 10; + panic_reboot_wait_time); + for (loop = panic_reboot_wait_time * 10; loop > 0; --loop) { DELAY(1000 * 100); /* 1/10th second */ /* Did user type a key? */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Jan 8 03:16:36 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7C954A8; Wed, 8 Jan 2014 03:16:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4083136A; Wed, 8 Jan 2014 03:16:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s083GaLh046326; Wed, 8 Jan 2014 03:16:36 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s083Ga0U046324; Wed, 8 Jan 2014 03:16:36 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201401080316.s083Ga0U046324@svn.freebsd.org> From: Peter Wemm Date: Wed, 8 Jan 2014 03:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260435 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 03:16:36 -0000 Author: peter Date: Wed Jan 8 03:16:36 2014 New Revision: 260435 URL: http://svnweb.freebsd.org/changeset/base/260435 Log: Revert MFC of r258821 - it was already handled by MFC of r239672. Pointy hat to: peter Modified: stable/9/sys/netinet/tcp_input.c Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Wed Jan 8 03:16:21 2014 (r260434) +++ stable/9/sys/netinet/tcp_input.c Wed Jan 8 03:16:36 2014 (r260435) @@ -2407,15 +2407,13 @@ tcp_do_segment(struct mbuf *m, struct tc hhook_run_tcp_est_in(tp, th, &to); if (SEQ_LEQ(th->th_ack, tp->snd_una)) { - if (tlen == 0 && tiwin == tp->snd_wnd && - !(thflags & TH_FIN)) { + if (tlen == 0 && tiwin == tp->snd_wnd) { TCPSTAT_INC(tcps_rcvdupack); /* * If we have outstanding data (other than * a window probe), this is a completely * duplicate ack (ie, window info didn't - * change and FIN isn't set), - * the ack is the biggest we've + * change), the ack is the biggest we've * seen and we've seen exactly our rexmt * threshhold of them, assume a packet * has been dropped and retransmit it. From owner-svn-src-stable-9@FreeBSD.ORG Wed Jan 8 19:34:25 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FB07527; Wed, 8 Jan 2014 19:34:25 +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 EDF8419C8; Wed, 8 Jan 2014 19:34:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s08JYO5J031623; Wed, 8 Jan 2014 19:34:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s08JYOnb031620; Wed, 8 Jan 2014 19:34:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401081934.s08JYOnb031620@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 8 Jan 2014 19:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260456 - in stable/9/contrib/gcc: . config/arm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 19:34:25 -0000 Author: pfg Date: Wed Jan 8 19:34:23 2014 New Revision: 260456 URL: http://svnweb.freebsd.org/changeset/base/260456 Log: MFC r259873: gcc: small enhancements for the arm support. fixes GCC-PR target/31152 Obtained from: gcc 4.3 (rev. r118461, 125973: GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/config/arm/arm.c stable/9/contrib/gcc/config/arm/arm.md Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Wed Jan 8 19:33:16 2014 (r260455) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Wed Jan 8 19:34:23 2014 (r260456) @@ -65,6 +65,12 @@ fvisibility-ms-compat. * c.opt (fvisibility-ms-compat): New. +2007-06-23 Richard Earnshaw (r125973) + + PR target/31152 + * arm.md (negscc): Match the correct operand for optimized LT0 test. + Remove optimization for GT. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 @@ -557,6 +563,14 @@ debugnames. * config/darwin.h (DEBUG_PUBTYPES_SECTION): Define new global variable. +2006-11-03 Paul Brook (r118461) + + gcc/ + * config/arm/arm.c (arm_file_start): New function. + (TARGET_ASM_FILE_START): Define. + (arm_default_cpu): New variable. + (arm_override_options): Set arm_default_cpu. + 2006-10-31 Geoffrey Keating (r118356) * c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on Modified: stable/9/contrib/gcc/config/arm/arm.c ============================================================================== --- stable/9/contrib/gcc/config/arm/arm.c Wed Jan 8 19:33:16 2014 (r260455) +++ stable/9/contrib/gcc/config/arm/arm.c Wed Jan 8 19:34:23 2014 (r260456) @@ -154,6 +154,7 @@ static void arm_encode_section_info (tre #endif static void arm_file_end (void); +static void arm_file_start (void); #ifdef AOF_ASSEMBLER static void aof_globalize_label (FILE *, const char *); @@ -202,6 +203,9 @@ static bool arm_tls_symbol_p (rtx x); #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE arm_attribute_table +#undef TARGET_ASM_FILE_START +#define TARGET_ASM_FILE_START arm_file_start + #undef TARGET_ASM_FILE_END #define TARGET_ASM_FILE_END arm_file_end @@ -390,6 +394,9 @@ rtx arm_compare_op0, arm_compare_op1; /* The processor for which instructions should be scheduled. */ enum processor_type arm_tune = arm_none; +/* The default processor used if not overriden by commandline. */ +static enum processor_type arm_default_cpu = arm_none; + /* Which floating point model to use. */ enum arm_fp_model arm_fp_model; @@ -1020,8 +1027,9 @@ arm_override_options (void) insn_flags = sel->flags; } sprintf (arm_arch_name, "__ARM_ARCH_%s__", sel->arch); + arm_default_cpu = (enum processor_type) (sel - all_cores); if (arm_tune == arm_none) - arm_tune = (enum processor_type) (sel - all_cores); + arm_tune = arm_default_cpu; } /* The processor for which we should tune should now have been @@ -14458,6 +14466,105 @@ arm_asm_output_labelref (FILE *stream, c } static void +arm_file_start (void) +{ + int val; + + if (TARGET_BPABI) + { + const char *fpu_name; + if (arm_select[0].string) + asm_fprintf (asm_out_file, "\t.cpu %s\n", arm_select[0].string); + else if (arm_select[1].string) + asm_fprintf (asm_out_file, "\t.arch %s\n", arm_select[1].string); + else + asm_fprintf (asm_out_file, "\t.cpu %s\n", + all_cores[arm_default_cpu].name); + + if (TARGET_SOFT_FLOAT) + { + if (TARGET_VFP) + fpu_name = "softvfp"; + else + fpu_name = "softfpa"; + } + else + { + switch (arm_fpu_arch) + { + case FPUTYPE_FPA: + fpu_name = "fpa"; + break; + case FPUTYPE_FPA_EMU2: + fpu_name = "fpe2"; + break; + case FPUTYPE_FPA_EMU3: + fpu_name = "fpe3"; + break; + case FPUTYPE_MAVERICK: + fpu_name = "maverick"; + break; + case FPUTYPE_VFP: + if (TARGET_HARD_FLOAT) + asm_fprintf (asm_out_file, "\t.eabi_attribute 27, 3\n"); + if (TARGET_HARD_FLOAT_ABI) + asm_fprintf (asm_out_file, "\t.eabi_attribute 28, 1\n"); + fpu_name = "vfp"; + break; + default: + abort(); + } + } + asm_fprintf (asm_out_file, "\t.fpu %s\n", fpu_name); + + /* Some of these attributes only apply when the corresponding features + are used. However we don't have any easy way of figuring this out. + Conservatively record the setting that would have been used. */ + + /* Tag_ABI_PCS_wchar_t. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 18, %d\n", + (int)WCHAR_TYPE_SIZE / BITS_PER_UNIT); + + /* Tag_ABI_FP_rounding. */ + if (flag_rounding_math) + asm_fprintf (asm_out_file, "\t.eabi_attribute 19, 1\n"); + if (!flag_unsafe_math_optimizations) + { + /* Tag_ABI_FP_denomal. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 20, 1\n"); + /* Tag_ABI_FP_exceptions. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 21, 1\n"); + } + /* Tag_ABI_FP_user_exceptions. */ + if (flag_signaling_nans) + asm_fprintf (asm_out_file, "\t.eabi_attribute 22, 1\n"); + /* Tag_ABI_FP_number_model. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 23, %d\n", + flag_finite_math_only ? 1 : 3); + + /* Tag_ABI_align8_needed. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 24, 1\n"); + /* Tag_ABI_align8_preserved. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 25, 1\n"); + /* Tag_ABI_enum_size. */ + asm_fprintf (asm_out_file, "\t.eabi_attribute 26, %d\n", + flag_short_enums ? 1 : 2); + + /* Tag_ABI_optimization_goals. */ + if (optimize_size) + val = 4; + else if (optimize >= 2) + val = 2; + else if (optimize) + val = 1; + else + val = 6; + asm_fprintf (asm_out_file, "\t.eabi_attribute 30, %d\n", val); + } + default_file_start(); +} + +static void arm_file_end (void) { int regno; Modified: stable/9/contrib/gcc/config/arm/arm.md ============================================================================== --- stable/9/contrib/gcc/config/arm/arm.md Wed Jan 8 19:33:16 2014 (r260455) +++ stable/9/contrib/gcc/config/arm/arm.md Wed Jan 8 19:34:23 2014 (r260456) @@ -8841,15 +8841,12 @@ (clobber (reg:CC CC_REGNUM))] "TARGET_ARM" "* - if (GET_CODE (operands[3]) == LT && operands[3] == const0_rtx) + if (GET_CODE (operands[3]) == LT && operands[2] == const0_rtx) return \"mov\\t%0, %1, asr #31\"; if (GET_CODE (operands[3]) == NE) return \"subs\\t%0, %1, %2\;mvnne\\t%0, #0\"; - if (GET_CODE (operands[3]) == GT) - return \"subs\\t%0, %1, %2\;mvnne\\t%0, %0, asr #31\"; - output_asm_insn (\"cmp\\t%1, %2\", operands); output_asm_insn (\"mov%D3\\t%0, #0\", operands); return \"mvn%d3\\t%0, #0\"; From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 03:25:08 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F7BE9A0; Thu, 9 Jan 2014 03:25:08 +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 8B2F210E9; Thu, 9 Jan 2014 03:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s093P8JO013806; Thu, 9 Jan 2014 03:25:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s093P89G013805; Thu, 9 Jan 2014 03:25:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201401090325.s093P89G013805@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 9 Jan 2014 03:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260465 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 03:25:08 -0000 Author: kib Date: Thu Jan 9 03:25:08 2014 New Revision: 260465 URL: http://svnweb.freebsd.org/changeset/base/260465 Log: MFC r260204: Assert that accounting for the pmap resident pages does not underflow. Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Thu Jan 9 03:24:36 2014 (r260464) +++ stable/9/sys/amd64/amd64/pmap.c Thu Jan 9 03:25:08 2014 (r260465) @@ -479,6 +479,9 @@ pmap_resident_count_dec(pmap_t pmap, int { PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(pmap->pm_stats.resident_count >= count, + ("pmap %p resident count underflow %ld %d", pmap, + pmap->pm_stats.resident_count, count)); pmap->pm_stats.resident_count -= count; } From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 03:33:12 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5BD3DEB; Thu, 9 Jan 2014 03:33:12 +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 A7AFD117C; Thu, 9 Jan 2014 03:33:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s093XCkv017408; Thu, 9 Jan 2014 03:33:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s093XCXr017407; Thu, 9 Jan 2014 03:33:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201401090333.s093XCXr017407@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 9 Jan 2014 03:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260468 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 03:33:12 -0000 Author: kib Date: Thu Jan 9 03:33:12 2014 New Revision: 260468 URL: http://svnweb.freebsd.org/changeset/base/260468 Log: MFC r260205: Update the description for pmap_remove_pages() to match the modern times. Assert that the pmap passed to pmap_remove_pages() is only active on current CPU. Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Thu Jan 9 03:32:03 2014 (r260467) +++ stable/9/sys/amd64/amd64/pmap.c Thu Jan 9 03:33:12 2014 (r260468) @@ -4386,12 +4386,20 @@ pmap_page_is_mapped(vm_page_t m) } /* - * Remove all pages from specified address space - * this aids process exit speeds. Also, this code - * is special cased for current process only, but - * can have the more generic (and slightly slower) - * mode enabled. This is much faster than pmap_remove - * in the case of running down an entire address space. + * Destroy all managed, non-wired mappings in the given user-space + * pmap. This pmap cannot be active on any processor besides the + * caller. + * + * This function cannot be applied to the kernel pmap. Moreover, it + * is not intended for general use. It is only to be used during + * process termination. Consequently, it can be implemented in ways + * that make it faster than pmap_remove(). First, it can more quickly + * destroy mappings by iterating over the pmap's collection of PV + * entries, rather than searching the page table. Second, it doesn't + * have to test and clear the page table entries atomically, because + * no processor is currently accessing the user address space. In + * particular, a page table entry's dirty bit won't change state once + * this function starts. */ void pmap_remove_pages(pmap_t pmap) @@ -4408,10 +4416,25 @@ pmap_remove_pages(pmap_t pmap) uint64_t inuse, bitmask; int allfree, field, freed, idx; - if (pmap != PCPU_GET(curpmap)) { - printf("warning: pmap_remove_pages called with non-current pmap\n"); - return; + /* + * Assert that the given pmap is only active on the current + * CPU. Unfortunately, we cannot block another CPU from + * activating the pmap while this function is executing. + */ + KASSERT(pmap == PCPU_GET(curpmap), ("non-current pmap %p", pmap)); +#ifdef INVARIANTS + { + cpuset_t other_cpus; + + other_cpus = all_cpus; + critical_enter(); + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + CPU_AND(&other_cpus, &pmap->pm_active); + critical_exit(); + KASSERT(CPU_EMPTY(&other_cpus), ("pmap active %p", pmap)); } +#endif + lock = NULL; rw_rlock(&pvh_global_lock); PMAP_LOCK(pmap); From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 10:45:38 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77E06453; Thu, 9 Jan 2014 10:45:38 +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 618CA1624; Thu, 9 Jan 2014 10:45:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09AjcVD083702; Thu, 9 Jan 2014 10:45:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09AjcFi083701; Thu, 9 Jan 2014 10:45:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401091045.s09AjcFi083701@svn.freebsd.org> From: Alexander Motin Date: Thu, 9 Jan 2014 10:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260474 - stable/9/sys/x86/cpufreq X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 10:45:38 -0000 Author: mav Date: Thu Jan 9 10:45:37 2014 New Revision: 260474 URL: http://svnweb.freebsd.org/changeset/base/260474 Log: MFC r259197: Do not DELAY() for P-state transition unless we want to see the result. Intel manual says: "If a transition is already in progress, transition to a new value will subsequently take effect. Reads of IA32_PERF_CTL determine the last targeted operating point." So seems it should be fine to just trigger wanted transition and go. Linux does the same. Modified: stable/9/sys/x86/cpufreq/est.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/x86/cpufreq/est.c ============================================================================== --- stable/9/sys/x86/cpufreq/est.c Thu Jan 9 10:44:27 2014 (r260473) +++ stable/9/sys/x86/cpufreq/est.c Thu Jan 9 10:45:37 2014 (r260474) @@ -1288,10 +1288,9 @@ est_set_id16(device_t dev, uint16_t id16 msr = (msr & ~0xffff) | id16; wrmsr(MSR_PERF_CTL, msr); - /* Wait a short while for the new setting. XXX Is this necessary? */ - DELAY(EST_TRANS_LAT); - if (need_check) { + /* Wait a short while and read the new status. */ + DELAY(EST_TRANS_LAT); est_get_id16(&new_id16); if (new_id16 != id16) { if (bootverbose) From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 11:15:06 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25C653A6; Thu, 9 Jan 2014 11:15: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 EDCDB18DC; Thu, 9 Jan 2014 11:15:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09BF55t095642; Thu, 9 Jan 2014 11:15:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09BF5WO095637; Thu, 9 Jan 2014 11:15:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401091115.s09BF5WO095637@svn.freebsd.org> From: Alexander Motin Date: Thu, 9 Jan 2014 11:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260480 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 11:15:06 -0000 Author: mav Date: Thu Jan 9 11:15:05 2014 New Revision: 260480 URL: http://svnweb.freebsd.org/changeset/base/260480 Log: MFC r258683: Escape special XML chars, returned by some devices, confusing XML parsers. Modified: stable/9/sys/geom/geom_disk.c stable/9/sys/geom/geom_dump.c stable/9/sys/geom/geom_int.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Thu Jan 9 11:13:03 2014 (r260479) +++ stable/9/sys/geom/geom_disk.c Thu Jan 9 11:15:05 2014 (r260480) @@ -458,26 +458,36 @@ g_disk_dumpconf(struct sbuf *sb, const c bp->bio_length = DISK_IDENT_SIZE; bp->bio_data = buf; res = dp->d_getattr(bp); - sbuf_printf(sb, "%s%s\n", indent, + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", res == 0 ? buf: dp->d_ident); + sbuf_printf(sb, "\n"); bp->bio_attribute = "GEOM::lunid"; bp->bio_length = DISK_IDENT_SIZE; bp->bio_data = buf; - if (dp->d_getattr(bp) == 0) - sbuf_printf(sb, "%s%s\n", - indent, buf); + if (dp->d_getattr(bp) == 0) { + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", buf); + sbuf_printf(sb, "\n"); + } bp->bio_attribute = "GEOM::lunname"; bp->bio_length = DISK_IDENT_SIZE; bp->bio_data = buf; - if (dp->d_getattr(bp) == 0) - sbuf_printf(sb, "%s%s\n", - indent, buf); + if (dp->d_getattr(bp) == 0) { + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", buf); + sbuf_printf(sb, "\n"); + } g_destroy_bio(bp); g_free(buf); - } else - sbuf_printf(sb, "%s%s\n", indent, - dp->d_ident); - sbuf_printf(sb, "%s%s\n", indent, dp->d_descr); + } else { + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", dp->d_ident); + sbuf_printf(sb, "\n"); + } + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", dp->d_descr); + sbuf_printf(sb, "\n"); } } Modified: stable/9/sys/geom/geom_dump.c ============================================================================== --- stable/9/sys/geom/geom_dump.c Thu Jan 9 11:13:03 2014 (r260479) +++ stable/9/sys/geom/geom_dump.c Thu Jan 9 11:15:05 2014 (r260480) @@ -153,25 +153,28 @@ g_conftxt(void *p, int flag) } -static void -g_conf_print_escaped(struct sbuf *sb, const char *fmt, const char *str) +void +g_conf_printf_escaped(struct sbuf *sb, const char *fmt, ...) { struct sbuf *s; const u_char *c; + va_list ap; s = sbuf_new_auto(); + va_start(ap, fmt); + sbuf_vprintf(s, fmt, ap); + va_end(ap); + sbuf_finish(s); - for (c = str; *c != '\0'; c++) { + for (c = sbuf_data(s); *c != '\0'; c++) { if (*c == '&' || *c == '<' || *c == '>' || *c == '\'' || *c == '"' || *c > 0x7e) - sbuf_printf(s, "&#x%X;", *c); + sbuf_printf(sb, "&#x%X;", *c); else if (*c == '\t' || *c == '\n' || *c == '\r' || *c > 0x1f) - sbuf_putc(s, *c); + sbuf_putc(sb, *c); else - sbuf_putc(s, '?'); + sbuf_putc(sb, '?'); } - sbuf_finish(s); - sbuf_printf(sb, fmt, sbuf_data(s)); sbuf_delete(s); } @@ -203,7 +206,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t \n", pp->geom); sbuf_printf(sb, "\t r%dw%de%d\n", pp->acr, pp->acw, pp->ace); - g_conf_print_escaped(sb, "\t %s\n", pp->name); + sbuf_printf(sb, "\t "); + g_conf_printf_escaped(sb, "%s", pp->name); + sbuf_printf(sb, "\n"); sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); @@ -228,7 +233,9 @@ g_conf_geom(struct sbuf *sb, struct g_ge sbuf_printf(sb, " \n", gp); sbuf_printf(sb, " \n", gp->class); - g_conf_print_escaped(sb, " %s\n", gp->name); + sbuf_printf(sb, " "); + g_conf_printf_escaped(sb, "%s", gp->name); + sbuf_printf(sb, "\n"); sbuf_printf(sb, " %d\n", gp->rank); if (gp->flags & G_GEOM_WITHER) sbuf_printf(sb, " \n"); @@ -257,7 +264,9 @@ g_conf_class(struct sbuf *sb, struct g_c struct g_geom *gp2; sbuf_printf(sb, " \n", mp); - g_conf_print_escaped(sb, " %s\n", mp->name); + sbuf_printf(sb, " "); + g_conf_printf_escaped(sb, "%s", mp->name); + sbuf_printf(sb, "\n"); LIST_FOREACH(gp2, &mp->geom, geom) { if (gp != NULL && gp != gp2) continue; Modified: stable/9/sys/geom/geom_int.h ============================================================================== --- stable/9/sys/geom/geom_int.h Thu Jan 9 11:13:03 2014 (r260479) +++ stable/9/sys/geom/geom_int.h Thu Jan 9 11:15:05 2014 (r260480) @@ -54,6 +54,7 @@ extern int g_debugflags; /* geom_dump.c */ void g_confxml(void *, int flag); void g_conf_specific(struct sbuf *sb, struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); +void g_conf_printf_escaped(struct sbuf *sb, const char *fmt, ...); void g_confdot(void *, int flag); void g_conftxt(void *, int flag); From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 22:40:53 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 830BF7ED; Thu, 9 Jan 2014 22:40: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 6330A1700; Thu, 9 Jan 2014 22:40:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09Merfw073871; Thu, 9 Jan 2014 22:40:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09MeqJE073865; Thu, 9 Jan 2014 22:40:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201401092240.s09MeqJE073865@svn.freebsd.org> From: Dimitry Andric Date: Thu, 9 Jan 2014 22:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260495 - in stable: 10/share/mk 10/sys/conf 10/sys/modules/drm2/radeonkms 10/sys/modules/ibcore 10/sys/modules/ipoib 10/sys/modules/mlx4 10/sys/modules/mlx4ib 10/sys/modules/mlxen 10/s... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 22:40:53 -0000 Author: dim Date: Thu Jan 9 22:40:51 2014 New Revision: 260495 URL: http://svnweb.freebsd.org/changeset/base/260495 Log: MFC r260102: Similar to r260020, only use -fms-extensions with gcc, for all other modules which require this flag to compile. Use a GCC_MS_EXTENSIONS variable, defined in kern.pre.mk, which can be used to easily supply the flag (or not), depending on the compiler type. MFC r260322: In addition to r260102, also define GCC_MS_EXTENSIONS in bsd.sys.mk, since kernel module builds do not use kern.pre.mk. Modified: stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/sys/conf/kern.pre.mk stable/9/sys/modules/mlx4/Makefile stable/9/sys/modules/mlx4ib/Makefile stable/9/sys/modules/mlxen/Makefile stable/9/sys/modules/mthca/Makefile Directory Properties: stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/mk/bsd.sys.mk stable/10/sys/conf/kern.pre.mk stable/10/sys/modules/drm2/radeonkms/Makefile stable/10/sys/modules/ibcore/Makefile stable/10/sys/modules/ipoib/Makefile stable/10/sys/modules/mlx4/Makefile stable/10/sys/modules/mlx4ib/Makefile stable/10/sys/modules/mlxen/Makefile stable/10/sys/modules/mthca/Makefile stable/10/sys/ofed/drivers/infiniband/hw/mlx4/Makefile stable/10/sys/ofed/drivers/net/mlx4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Thu Jan 9 22:16:30 2014 (r260494) +++ stable/9/share/mk/bsd.sys.mk Thu Jan 9 22:40:51 2014 (r260495) @@ -119,6 +119,7 @@ CFLAGS+= -Qunused-arguments CFLAGS+= ${CFLAGS.clang} CXXFLAGS+= ${CXXFLAGS.clang} .else # !CLANG +GCC_MS_EXTENSIONS= -fms-extensions CFLAGS+= ${CFLAGS.gcc} CXXFLAGS+= ${CXXFLAGS.gcc} .endif # CLANG Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Thu Jan 9 22:16:30 2014 (r260494) +++ stable/9/sys/conf/kern.pre.mk Thu Jan 9 22:40:51 2014 (r260495) @@ -106,6 +106,8 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCO .if ${COMPILER_TYPE} == "clang" CLANG_NO_IAS= -no-integrated-as +.else +GCC_MS_EXTENSIONS= -fms-extensions .endif .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 @@ -157,7 +159,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLA # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. OFEDINCLUDES= -I$S/ofed/include/ -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} Modified: stable/9/sys/modules/mlx4/Makefile ============================================================================== --- stable/9/sys/modules/mlx4/Makefile Thu Jan 9 22:16:30 2014 (r260494) +++ stable/9/sys/modules/mlx4/Makefile Thu Jan 9 22:40:51 2014 (r260495) @@ -26,4 +26,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: stable/9/sys/modules/mlx4ib/Makefile ============================================================================== --- stable/9/sys/modules/mlx4ib/Makefile Thu Jan 9 22:16:30 2014 (r260494) +++ stable/9/sys/modules/mlx4ib/Makefile Thu Jan 9 22:40:51 2014 (r260495) @@ -24,4 +24,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: stable/9/sys/modules/mlxen/Makefile ============================================================================== --- stable/9/sys/modules/mlxen/Makefile Thu Jan 9 22:16:30 2014 (r260494) +++ stable/9/sys/modules/mlxen/Makefile Thu Jan 9 22:40:51 2014 (r260495) @@ -25,4 +25,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: stable/9/sys/modules/mthca/Makefile ============================================================================== --- stable/9/sys/modules/mthca/Makefile Thu Jan 9 22:16:30 2014 (r260494) +++ stable/9/sys/modules/mthca/Makefile Thu Jan 9 22:40:51 2014 (r260495) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 23:09:02 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 002B34F3; Thu, 9 Jan 2014 23:09:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C509B18D2; Thu, 9 Jan 2014 23:09:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09N91gj082944; Thu, 9 Jan 2014 23:09:01 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09N8vQb082899; Thu, 9 Jan 2014 23:08:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201401092308.s09N8vQb082899@svn.freebsd.org> From: Dimitry Andric Date: Thu, 9 Jan 2014 23:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260497 - in stable: 10/lib/libiconv 10/lib/libiconv_modules/BIG5 10/lib/libiconv_modules/EUC 10/lib/libiconv_modules/EUCTW 10/lib/libiconv_modules/GBK2K 10/lib/libiconv_modules/ISO2022... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 23:09:02 -0000 Author: dim Date: Thu Jan 9 23:08:56 2014 New Revision: 260497 URL: http://svnweb.freebsd.org/changeset/base/260497 Log: MFC r260334: Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree. MFC r260369: Apply band-aid for 32-bit compat libs failures after r260334: put back -Qunused-arguments for clang for now, until I can figure out a way to make it unneeded in all scenarios. Sorry about the breakage. Modified: stable/9/lib/libiconv/Makefile stable/9/lib/libiconv_modules/BIG5/Makefile stable/9/lib/libiconv_modules/EUC/Makefile stable/9/lib/libiconv_modules/EUCTW/Makefile stable/9/lib/libiconv_modules/GBK2K/Makefile stable/9/lib/libiconv_modules/ISO2022/Makefile stable/9/lib/libiconv_modules/JOHAB/Makefile stable/9/lib/libiconv_modules/UES/Makefile stable/9/lib/libiconv_modules/UTF1632/Makefile stable/9/lib/libiconv_modules/UTF7/Makefile stable/9/lib/libiconv_modules/iconv_std/Makefile stable/9/lib/libiconv_modules/mapper_parallel/Makefile stable/9/lib/libiconv_modules/mapper_serial/Makefile stable/9/lib/libiconv_modules/mapper_std/Makefile stable/9/lib/libiconv_modules/mapper_zone/Makefile stable/9/sys/boot/i386/boot2/Makefile stable/9/sys/boot/i386/gptboot/Makefile stable/9/sys/boot/i386/gptzfsboot/Makefile stable/9/sys/boot/i386/zfsboot/Makefile stable/9/sys/boot/pc98/boot2/Makefile stable/9/usr.sbin/mfiutil/Makefile Directory Properties: stable/9/lib/libiconv_modules/ (props changed) stable/9/share/mk/ (props changed) stable/9/share/mk/bsd.sys.mk (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/usr.sbin/mfiutil/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libiconv/Makefile stable/10/lib/libiconv_modules/BIG5/Makefile stable/10/lib/libiconv_modules/EUC/Makefile stable/10/lib/libiconv_modules/EUCTW/Makefile stable/10/lib/libiconv_modules/GBK2K/Makefile stable/10/lib/libiconv_modules/ISO2022/Makefile stable/10/lib/libiconv_modules/JOHAB/Makefile stable/10/lib/libiconv_modules/UES/Makefile stable/10/lib/libiconv_modules/UTF1632/Makefile stable/10/lib/libiconv_modules/UTF7/Makefile stable/10/lib/libiconv_modules/iconv_std/Makefile stable/10/lib/libiconv_modules/mapper_parallel/Makefile stable/10/lib/libiconv_modules/mapper_serial/Makefile stable/10/lib/libiconv_modules/mapper_std/Makefile stable/10/lib/libiconv_modules/mapper_zone/Makefile stable/10/sys/boot/i386/boot2/Makefile stable/10/sys/boot/i386/gptboot/Makefile stable/10/sys/boot/i386/gptzfsboot/Makefile stable/10/sys/boot/i386/zfsboot/Makefile stable/10/sys/boot/pc98/boot2/Makefile stable/10/usr.sbin/mfiutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libiconv/Makefile ============================================================================== --- stable/9/lib/libiconv/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -19,6 +19,7 @@ SRCS= citrus_bcs.c citrus_bcs_strtol.c c citrus_module.c citrus_none.c citrus_pivot_factory.c \ citrus_prop.c citrus_stdenc.c iconv.c -CFLAGS+= --param max-inline-insns-single=128 -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include +CFLAGS.gcc+= --param max-inline-insns-single=128 +CFLAGS+= -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include .include Modified: stable/9/lib/libiconv_modules/BIG5/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/BIG5/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/BIG5/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= BIG5 SRCS+= citrus_big5.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/EUC/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/EUC/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/EUC/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= EUC SRCS+= citrus_euc.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/EUCTW/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/EUCTW/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/EUCTW/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= EUCTW SRCS+= citrus_euctw.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/GBK2K/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/GBK2K/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/GBK2K/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= GBK2K SRCS+= citrus_gbk2k.c -CFLAGS+= --param max-inline-insns-single=16 +CFLAGS.gcc+= --param max-inline-insns-single=16 .include Modified: stable/9/lib/libiconv_modules/ISO2022/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/ISO2022/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/ISO2022/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= ISO2022 SRCS+= citrus_iso2022.c -CFLAGS+= --param max-inline-insns-single=128 +CFLAGS.gcc+= --param max-inline-insns-single=128 .include Modified: stable/9/lib/libiconv_modules/JOHAB/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/JOHAB/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/JOHAB/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= JOHAB SRCS+= citrus_johab.c -CFLAGS+= --param max-inline-insns-single=16 +CFLAGS.gcc+= --param max-inline-insns-single=16 .include Modified: stable/9/lib/libiconv_modules/UES/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/UES/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/UES/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= UES SRCS+= citrus_ues.c -CFLAGS+= --param max-inline-insns-single=64 +CFLAGS.gcc+= --param max-inline-insns-single=64 .include Modified: stable/9/lib/libiconv_modules/UTF1632/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/UTF1632/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/UTF1632/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= UTF1632 SRCS+= citrus_utf1632.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/UTF7/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/UTF7/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/UTF7/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= UTF7 SRCS+= citrus_utf7.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/iconv_std/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/iconv_std/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/iconv_std/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= iconv_std SRCS+= citrus_iconv_std.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/mapper_parallel/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/mapper_parallel/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/mapper_parallel/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -4,6 +4,6 @@ SHLIB= mapper_parallel SRCS+= citrus_mapper_serial.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/mapper_serial/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/mapper_serial/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/mapper_serial/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= mapper_serial SRCS+= citrus_mapper_serial.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include Modified: stable/9/lib/libiconv_modules/mapper_std/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/mapper_std/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/mapper_std/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= mapper_std SRCS+= citrus_mapper_std.c -CFLAGS+= --param max-inline-insns-single=8 +CFLAGS.gcc+= --param max-inline-insns-single=8 .include Modified: stable/9/lib/libiconv_modules/mapper_zone/Makefile ============================================================================== --- stable/9/lib/libiconv_modules/mapper_zone/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/lib/libiconv_modules/mapper_zone/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -2,6 +2,6 @@ SHLIB= mapper_zone SRCS+= citrus_mapper_zone.c -CFLAGS+= --param max-inline-insns-single=8 +CFLAGS.gcc+= --param max-inline-insns-single=8 .include Modified: stable/9/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/9/sys/boot/i386/boot2/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/sys/boot/i386/boot2/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -37,12 +37,13 @@ CFLAGS= -Os \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline --param max-inline-insns-single=100 \ + -Winline \ ${CLANG_OPT_SMALL} CFLAGS.gcc+= -fno-guess-branch-probability \ -fno-unit-at-a-time \ -mno-align-long-strings \ + --param max-inline-insns-single=100 LD_FLAGS=-static -N --gc-sections Modified: stable/9/sys/boot/i386/gptboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/gptboot/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/sys/boot/i386/gptboot/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -35,7 +35,9 @@ CFLAGS= -DBOOTPROG=\"gptboot\" \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline --param max-inline-insns-single=100 + -Winline + +CFLAGS.gcc+= --param max-inline-insns-single=100 LD_FLAGS=-static -N --gc-sections Modified: stable/9/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/gptzfsboot/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/sys/boot/i386/gptzfsboot/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -32,7 +32,9 @@ CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline --param max-inline-insns-single=100 + -Winline + +CFLAGS.gcc+= --param max-inline-insns-single=100 LD_FLAGS=-static -N --gc-sections Modified: stable/9/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/zfsboot/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/sys/boot/i386/zfsboot/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -29,7 +29,9 @@ CFLAGS= -DBOOTPROG=\"zfsboot\" \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline --param max-inline-insns-single=100 + -Winline + +CFLAGS.gcc+= --param max-inline-insns-single=100 LD_FLAGS=-static -N --gc-sections Modified: stable/9/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/9/sys/boot/pc98/boot2/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/sys/boot/pc98/boot2/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -42,7 +42,9 @@ CFLAGS= -Os \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline --param max-inline-insns-single=100 + -Winline + +CFLAGS.gcc+= --param max-inline-insns-single=100 # Set machine type to PC98_SYSTEM_PARAMETER #CFLAGS+= -DSET_MACHINE_TYPE Modified: stable/9/usr.sbin/mfiutil/Makefile ============================================================================== --- stable/9/usr.sbin/mfiutil/Makefile Thu Jan 9 22:41:18 2014 (r260496) +++ stable/9/usr.sbin/mfiutil/Makefile Thu Jan 9 23:08:56 2014 (r260497) @@ -5,7 +5,7 @@ SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_ mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c MAN8= mfiutil.8 -CFLAGS+= -fno-builtin-strftime +CFLAGS.gcc+= -fno-builtin-strftime DPADD= ${LIBUTIL} LDADD= -lutil From owner-svn-src-stable-9@FreeBSD.ORG Thu Jan 9 23:52:56 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20CF4BB6; Thu, 9 Jan 2014 23:52: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 0A6791D79; Thu, 9 Jan 2014 23:52:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09NqtSZ001290; Thu, 9 Jan 2014 23:52:55 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09NqtTb001289; Thu, 9 Jan 2014 23:52:55 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201401092352.s09NqtTb001289@svn.freebsd.org> From: Warren Block Date: Thu, 9 Jan 2014 23:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260499 - stable/9/contrib/diff/man X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 23:52:56 -0000 Author: wblock (doc committer) Date: Thu Jan 9 23:52:55 2014 New Revision: 260499 URL: http://svnweb.freebsd.org/changeset/base/260499 Log: MFC r260358 Fix a cut and paste error. Modified: stable/9/contrib/diff/man/diff3.1 Directory Properties: stable/9/contrib/diff/ (props changed) Modified: stable/9/contrib/diff/man/diff3.1 ============================================================================== --- stable/9/contrib/diff/man/diff3.1 Thu Jan 9 23:51:47 2014 (r260498) +++ stable/9/contrib/diff/man/diff3.1 Thu Jan 9 23:52:55 2014 (r260499) @@ -73,6 +73,6 @@ and .B diff3 programs are properly installed at your site, the command .IP -.B info diff +.B info diff3 .PP should give you access to the complete manual. From owner-svn-src-stable-9@FreeBSD.ORG Fri Jan 10 12:09:39 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD055173; Fri, 10 Jan 2014 12:09:39 +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 B741A15F8; Fri, 10 Jan 2014 12:09:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0AC9d4w082049; Fri, 10 Jan 2014 12:09:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0AC9cwJ082044; Fri, 10 Jan 2014 12:09:38 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401101209.s0AC9cwJ082044@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 10 Jan 2014 12:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260507 - in stable/9: sbin/geom/class/mirror sys/geom/mirror X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2014 12:09:40 -0000 Author: ae Date: Fri Jan 10 12:09:38 2014 New Revision: 260507 URL: http://svnweb.freebsd.org/changeset/base/260507 Log: MFC r259634: Prevent users from deactivating the last component of a mirror. MFC r259929: Add an ability to stop gmirror and clear its metadata in one command. This fixes the problem, when gmirror starts again just after stop. The problem occurs when gmirror's component has geom label with equal size. E.g. gpt and gptid have the same size as partition, diskid has the same size as entire disk. When gmirror's geom has been destroyed, glabel creates its providers and this initiate retaste. Now "gmirror destroy" command is available. It destroys geom and also erases gmirror's metadata. PR: 184985 Modified: stable/9/sbin/geom/class/mirror/geom_mirror.c stable/9/sbin/geom/class/mirror/gmirror.8 stable/9/sys/geom/mirror/g_mirror.c stable/9/sys/geom/mirror/g_mirror.h stable/9/sys/geom/mirror/g_mirror_ctl.c Directory Properties: stable/9/sbin/geom/class/mirror/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/9/sbin/geom/class/mirror/geom_mirror.c Fri Jan 10 10:39:01 2014 (r260506) +++ stable/9/sbin/geom/class/mirror/geom_mirror.c Fri Jan 10 12:09:38 2014 (r260507) @@ -80,6 +80,13 @@ struct g_command class_commands[] = { { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov ..." }, + { "destroy", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + "[-fv] name ..." + }, { "dump", 0, mirror_main, G_NULL_OPTS, "prov ..." }, Modified: stable/9/sbin/geom/class/mirror/gmirror.8 ============================================================================== --- stable/9/sbin/geom/class/mirror/gmirror.8 Fri Jan 10 10:39:01 2014 (r260506) +++ stable/9/sbin/geom/class/mirror/gmirror.8 Fri Jan 10 12:09:38 2014 (r260507) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2009 +.Dd December 27, 2013 .Dt GMIRROR 8 .Os .Sh NAME @@ -81,6 +81,10 @@ .Ar name .Ar prov ... .Nm +.Cm destroy +.Op Fl fv +.Ar name ... +.Nm .Cm forget .Op Fl v .Ar name ... @@ -212,6 +216,14 @@ Activate the given component(s), which w .It Cm deactivate Mark the given component(s) as inactive, so it will not be automatically connected to the mirror. +.It Cm destroy +Stop the given mirror and clear metadata on all its components. +.Pp +Additional options include: +.Bl -tag -width ".Fl f" +.It Fl f +Stop the given mirror even if it is opened. +.El .It Cm forget Forget about components which are not connected. This command is useful when a disk has failed and cannot be reconnected, preventing the Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Fri Jan 10 10:39:01 2014 (r260506) +++ stable/9/sys/geom/mirror/g_mirror.c Fri Jan 10 12:09:38 2014 (r260507) @@ -638,7 +638,8 @@ g_mirror_write_metadata(struct g_mirror_ length = cp->provider->sectorsize; offset = cp->provider->mediasize - length; sector = malloc((size_t)length, M_MIRROR, M_WAITOK | M_ZERO); - if (md != NULL) + if (md != NULL && + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_WIPE) == 0) mirror_metadata_encode(md, sector); error = g_write_data(cp, offset, sector, length); free(sector, M_MIRROR); @@ -737,7 +738,8 @@ g_mirror_update_metadata(struct g_mirror sc = disk->d_softc; sx_assert(&sc->sc_lock, SX_LOCKED); - g_mirror_fill_metadata(sc, disk, &md); + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_WIPE) == 0) + g_mirror_fill_metadata(sc, disk, &md); error = g_mirror_write_metadata(disk, &md); if (error == 0) { G_MIRROR_DEBUG(2, "Metadata on %s updated.", Modified: stable/9/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.h Fri Jan 10 10:39:01 2014 (r260506) +++ stable/9/sys/geom/mirror/g_mirror.h Fri Jan 10 12:09:38 2014 (r260507) @@ -160,6 +160,7 @@ struct g_mirror_event { #define G_MIRROR_DEVICE_FLAG_WAIT 0x0200000000000000ULL #define G_MIRROR_DEVICE_FLAG_DESTROYING 0x0400000000000000ULL #define G_MIRROR_DEVICE_FLAG_TASTING 0x0800000000000000ULL +#define G_MIRROR_DEVICE_FLAG_WIPE 0x1000000000000000ULL #define G_MIRROR_DEVICE_STATE_STARTING 0 #define G_MIRROR_DEVICE_STATE_RUNNING 1 Modified: stable/9/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror_ctl.c Fri Jan 10 10:39:01 2014 (r260506) +++ stable/9/sys/geom/mirror/g_mirror_ctl.c Fri Jan 10 12:09:38 2014 (r260507) @@ -624,7 +624,7 @@ g_mirror_ctl_deactivate(struct gctl_req const char *name; char param[16]; int *nargs; - u_int i; + u_int i, active; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -645,6 +645,7 @@ g_mirror_ctl_deactivate(struct gctl_req gctl_error(req, "No such device: %s.", name); return; } + active = g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE); for (i = 1; i < (u_int)*nargs; i++) { snprintf(param, sizeof(param), "arg%u", i); name = gctl_get_asciiparam(req, param); @@ -657,6 +658,16 @@ g_mirror_ctl_deactivate(struct gctl_req gctl_error(req, "No such provider: %s.", name); continue; } + if (disk->d_state == G_MIRROR_DISK_STATE_ACTIVE) { + if (active > 1) + active--; + else { + gctl_error(req, "%s: Can't deactivate the " + "last ACTIVE component %s.", + sc->sc_geom->name, name); + continue; + } + } disk->d_flags |= G_MIRROR_DISK_FLAG_INACTIVE; disk->d_flags &= ~G_MIRROR_DISK_FLAG_FORCE_SYNC; g_mirror_update_metadata(disk); @@ -715,7 +726,7 @@ g_mirror_ctl_forget(struct gctl_req *req } static void -g_mirror_ctl_stop(struct gctl_req *req, struct g_class *mp) +g_mirror_ctl_stop(struct gctl_req *req, struct g_class *mp, int wipe) { struct g_mirror_softc *sc; int *force, *nargs, error; @@ -756,10 +767,14 @@ g_mirror_ctl_stop(struct gctl_req *req, return; } g_cancel_event(sc); + if (wipe) + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_WIPE; error = g_mirror_destroy(sc, how); if (error != 0) { gctl_error(req, "Cannot destroy device %s (error=%d).", sc->sc_geom->name, error); + if (wipe) + sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_WIPE; sx_xunlock(&sc->sc_lock); return; } @@ -798,7 +813,9 @@ g_mirror_config(struct gctl_req *req, st else if (strcmp(verb, "forget") == 0) g_mirror_ctl_forget(req, mp); else if (strcmp(verb, "stop") == 0) - g_mirror_ctl_stop(req, mp); + g_mirror_ctl_stop(req, mp, 0); + else if (strcmp(verb, "destroy") == 0) + g_mirror_ctl_stop(req, mp, 1); else gctl_error(req, "Unknown verb."); g_topology_lock(); From owner-svn-src-stable-9@FreeBSD.ORG Fri Jan 10 12:22:51 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53D5FA17; Fri, 10 Jan 2014 12:22:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 348491733; Fri, 10 Jan 2014 12:22:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0ACMpKJ089234; Fri, 10 Jan 2014 12:22:51 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0ACMo27089229; Fri, 10 Jan 2014 12:22:50 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201401101222.s0ACMo27089229@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 10 Jan 2014 12:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260510 - in stable/9/sys: netinet netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2014 12:22:51 -0000 Author: ae Date: Fri Jan 10 12:22:49 2014 New Revision: 260510 URL: http://svnweb.freebsd.org/changeset/base/260510 Log: MFC r260151 (by adrian): Use an RLOCK here instead of an RWLOCK - matching all the other calls to lla_lookup(). This drastically reduces the very high lock contention when doing parallel TCP throughput tests (> 1024 sockets) with IPv6. MFC r260187: lla_lookup() does modification only when LLE_CREATE is specified. Thus we can use IF_AFDATA_RLOCK() instead of IF_AFDATA_LOCK() when doing lla_lookup() without LLE_CREATE flag. MFC r260217: Add IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with LLE_CREATE flag. Modified: stable/9/sys/netinet/if_ether.c stable/9/sys/netinet/in.c stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/nd6.c stable/9/sys/netinet6/nd6_nbr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/if_ether.c ============================================================================== --- stable/9/sys/netinet/if_ether.c Fri Jan 10 12:18:05 2014 (r260509) +++ stable/9/sys/netinet/if_ether.c Fri Jan 10 12:22:49 2014 (r260510) @@ -154,10 +154,10 @@ arp_ifscrub(struct ifnet *ifp, uint32_t addr4.sin_len = sizeof(addr4); addr4.sin_family = AF_INET; addr4.sin_addr.s_addr = addr; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); lla_lookup(LLTABLE(ifp), (LLE_DELETE | LLE_IFADDR), (struct sockaddr *)&addr4); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); } #endif @@ -790,9 +790,9 @@ reply: struct llentry *lle = NULL; sin.sin_addr = itaddr; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); lle = lla_lookup(LLTABLE(ifp), 0, (struct sockaddr *)&sin); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if ((lle != NULL) && (lle->la_flags & LLE_PUB)) { (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Fri Jan 10 12:18:05 2014 (r260509) +++ stable/9/sys/netinet/in.c Fri Jan 10 12:22:49 2014 (r260510) @@ -1499,6 +1499,7 @@ in_lltable_lookup(struct lltable *llt, u #endif if (!(flags & LLE_CREATE)) return (NULL); + IF_AFDATA_WLOCK_ASSERT(ifp); /* * A route that covers the given address must have * been installed 1st because we are doing a resolution, Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Jan 10 12:18:05 2014 (r260509) +++ stable/9/sys/netinet6/in6.c Fri Jan 10 12:22:49 2014 (r260510) @@ -2603,6 +2603,7 @@ in6_lltable_lookup(struct lltable *llt, if (lle == NULL) { if (!(flags & LLE_CREATE)) return (NULL); + IF_AFDATA_WLOCK_ASSERT(ifp); /* * A route that covers the given address must have * been installed 1st because we are doing a resolution, Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Fri Jan 10 12:18:05 2014 (r260509) +++ stable/9/sys/netinet6/nd6.c Fri Jan 10 12:22:49 2014 (r260510) @@ -1154,9 +1154,9 @@ nd6_nud_hint(struct rtentry *rt, struct return; ifp = rt->rt_ifp; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = nd6_lookup(dst6, ND6_EXCLUSIVE, NULL); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if (ln == NULL) return; @@ -1583,16 +1583,16 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * description on it in NS section (RFC 2461 7.2.3). */ flags = lladdr ? ND6_EXCLUSIVE : 0; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = nd6_lookup(from, flags, ifp); - + IF_AFDATA_RUNLOCK(ifp); if (ln == NULL) { flags |= ND6_EXCLUSIVE; + IF_AFDATA_LOCK(ifp); ln = nd6_lookup(from, flags | ND6_CREATE, ifp); IF_AFDATA_UNLOCK(ifp); is_newentry = 1; } else { - IF_AFDATA_UNLOCK(ifp); /* do nothing if static ndp is set */ if (ln->la_flags & LLE_STATIC) { static_route = 1; @@ -1898,9 +1898,9 @@ nd6_output_lle(struct ifnet *ifp, struct flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0; if (ln == NULL) { retry: - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)dst); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if ((ln == NULL) && nd6_is_addr_neighbor(dst, ifp)) { /* * Since nd6_is_addr_neighbor() internally calls nd6_lookup(), Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Fri Jan 10 12:18:05 2014 (r260509) +++ stable/9/sys/netinet6/nd6_nbr.c Fri Jan 10 12:22:49 2014 (r260510) @@ -734,9 +734,9 @@ nd6_na_input(struct mbuf *m, int off, in * If no neighbor cache entry is found, NA SHOULD silently be * discarded. */ - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = nd6_lookup(&taddr6, LLE_EXCLUSIVE, ifp); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if (ln == NULL) { goto freeit; } From owner-svn-src-stable-9@FreeBSD.ORG Fri Jan 10 17:40:30 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA3F4F85; Fri, 10 Jan 2014 17:40: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 7C6881F9A; Fri, 10 Jan 2014 17:40:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0AHeUVX010182; Fri, 10 Jan 2014 17:40:30 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0AHeUmL010180; Fri, 10 Jan 2014 17:40:30 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201401101740.s0AHeUmL010180@svn.freebsd.org> From: Alan Somers Date: Fri, 10 Jan 2014 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260518 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2014 17:40:30 -0000 Author: asomers Date: Fri Jan 10 17:40:29 2014 New Revision: 260518 URL: http://svnweb.freebsd.org/changeset/base/260518 Log: MFC 259240 sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c When a da or ada device dissappears, outstanding IOs fail with ENXIO, not EIO. The check for EIO was probably copied from Illumos, where that is indeed the correct errno. Without this change, pulling a busy drive from a zpool would usually turn it into UNAVAIL, even though pulling an idle drive would turn it into REMOVED. With this change, it is REMOVED every time. Also, vdev_geom_io_intr shouldn't do zfs_post_remove, because that results in devd getting two resource.fs.zfs.removed events. The comment said that the event had to be sent directly instead of through the async removal thread because "the DE engine is using this information to discard prevoius I/O errors". However, the fact that vdev_geom_io_intr was never actually sending the events until now, and that vdev_geom_orphan never sent them at all, and that vdev_geom_orphan usually gets called about 2 seconds after the actual removal, means that FreeBSD's userland can cope with a late event just fine. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Jan 10 16:56:59 2014 (r260517) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Jan 10 17:40:29 2014 (r260518) @@ -724,20 +724,12 @@ vdev_geom_io_intr(struct bio *bp) */ vd->vdev_notrim = B_TRUE; } - if (zio->io_error == EIO && !vd->vdev_remove_wanted) { + if (zio->io_error == ENXIO && !vd->vdev_remove_wanted) { /* * If provider's error is set we assume it is being * removed. */ if (bp->bio_to->error != 0) { - /* - * We post the resource as soon as possible, instead of - * when the async removal actually happens, because the - * DE is using this information to discard previous I/O - * errors. - */ - /* XXX: zfs_post_remove() can sleep. */ - zfs_post_remove(zio->io_spa, vd); vd->vdev_remove_wanted = B_TRUE; spa_async_request(zio->io_spa, SPA_ASYNC_REMOVE); } else if (!vd->vdev_delayed_close) { From owner-svn-src-stable-9@FreeBSD.ORG Fri Jan 10 18:14:16 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6307B77C; Fri, 10 Jan 2014 18:14: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 34A56121B; Fri, 10 Jan 2014 18:14:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0AIEGUj025082; Fri, 10 Jan 2014 18:14:16 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0AIEGYC025081; Fri, 10 Jan 2014 18:14:16 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201401101814.s0AIEGYC025081@svn.freebsd.org> From: Alan Somers Date: Fri, 10 Jan 2014 18:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260520 - stable/9/sbin/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2014 18:14:16 -0000 Author: asomers Date: Fri Jan 10 18:14:15 2014 New Revision: 260520 URL: http://svnweb.freebsd.org/changeset/base/260520 Log: MFC 259339 sbin/devd/devd.cc Increase the size of devd's client socket's send buffer from the default (8k) to 128k. This prevents clients from getting POLLHUPped during event storms. For example, during zpool creation, the kernel emits a resource.fs.zfs.statechange event for every vdev in the pool. A 128k buffer is large enough to hold the statechange events for a pool with nearly 800 drives. Modified: stable/9/sbin/devd/devd.cc Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/devd/ (props changed) Modified: stable/9/sbin/devd/devd.cc ============================================================================== --- stable/9/sbin/devd/devd.cc Fri Jan 10 17:56:23 2014 (r260519) +++ stable/9/sbin/devd/devd.cc Fri Jan 10 18:14:15 2014 (r260520) @@ -101,6 +101,19 @@ __FBSDID("$FreeBSD$"); #define CF "/etc/devd.conf" #define SYSCTL "hw.bus.devctl_disable" +/* + * Since the client socket is nonblocking, we must increase its send buffer to + * handle brief event storms. On FreeBSD, AF_UNIX sockets don't have a receive + * buffer, so the client can't increate the buffersize by itself. + * + * For example, when creating a ZFS pool, devd emits one 165 character + * resource.fs.zfs.statechange message for each vdev in the pool. A 64k + * buffer has enough space for almost 400 drives, which would be very large but + * not impossibly large pool. A 128k buffer has enough space for 794 drives, + * which is more than can fit in a rack with modern technology. + */ +#define CLIENT_BUFSIZE 131072 + using namespace std; extern FILE *yyin; @@ -880,6 +893,7 @@ void new_client(int fd) { int s; + int sndbuf_size; /* * First go reap any zombie clients, then accept the connection, and @@ -889,10 +903,15 @@ new_client(int fd) check_clients(); s = accept(fd, NULL, NULL); if (s != -1) { + sndbuf_size = CLIENT_BUFSIZE; + if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, + sizeof(sndbuf_size))) + err(1, "setsockopt"); shutdown(s, SHUT_RD); clients.push_back(s); ++num_clients; - } + } else + err(1, "accept"); } static void From owner-svn-src-stable-9@FreeBSD.ORG Sat Jan 11 01:45:20 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 990D5F15; Sat, 11 Jan 2014 01:45:20 +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 8381C137C; Sat, 11 Jan 2014 01:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0B1jKN8097722; Sat, 11 Jan 2014 01:45:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0B1jKKR097721; Sat, 11 Jan 2014 01:45:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401110145.s0B1jKKR097721@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 11 Jan 2014 01:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260529 - stable/9/contrib/gcc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jan 2014 01:45:20 -0000 Author: pfg Date: Sat Jan 11 01:45:20 2014 New Revision: 260529 URL: http://svnweb.freebsd.org/changeset/base/260529 Log: MFC r260361: gcc: Fix optimization bug. GCC-PR rtl-optimization/34628 * combine.c (try_combine): Stop and undo after the first combination if an autoincrement side-effect on the first insn has effectively been lost. Modified: stable/9/contrib/gcc/combine.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/combine.c ============================================================================== --- stable/9/contrib/gcc/combine.c Sat Jan 11 01:44:22 2014 (r260528) +++ stable/9/contrib/gcc/combine.c Sat Jan 11 01:45:20 2014 (r260529) @@ -2370,12 +2370,17 @@ try_combine (rtx i3, rtx i2, rtx i1, int if (i1 && GET_CODE (newpat) != CLOBBER) { - /* Before we can do this substitution, we must redo the test done - above (see detailed comments there) that ensures that I1DEST - isn't mentioned in any SETs in NEWPAT that are field assignments. */ - - if (! combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX, - 0, (rtx*) 0)) + /* Check that an autoincrement side-effect on I1 has not been lost. + This happens if I1DEST is mentioned in I2 and dies there, and + has disappeared from the new pattern. */ + if ((FIND_REG_INC_NOTE (i1, NULL_RTX) != 0 + && !i1_feeds_i3 + && dead_or_set_p (i2, i1dest) + && !reg_overlap_mentioned_p (i1dest, newpat)) + /* Before we can do this substitution, we must redo the test done + above (see detailed comments there) that ensures that I1DEST + isn't mentioned in any SETs in NEWPAT that are field assignments. */ + || !combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX, 0, 0)) { undo_all (); return 0; From owner-svn-src-stable-9@FreeBSD.ORG Sat Jan 11 08:23:02 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2E5A9DC; Sat, 11 Jan 2014 08:23:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD9D1D7C; Sat, 11 Jan 2014 08:23:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0B8N2Yd050211; Sat, 11 Jan 2014 08:23:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0B8N2jM050209; Sat, 11 Jan 2014 08:23:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401110823.s0B8N2jM050209@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 11 Jan 2014 08:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260538 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jan 2014 08:23:02 -0000 Author: hselasky Date: Sat Jan 11 08:23:02 2014 New Revision: 260538 URL: http://svnweb.freebsd.org/changeset/base/260538 Log: MFC r260184: Minor correction for the XHCI reset logic. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Sat Jan 11 08:21:13 2014 (r260537) +++ stable/9/sys/dev/usb/controller/xhci.c Sat Jan 11 08:23:02 2014 (r260538) @@ -361,8 +361,8 @@ xhci_start_controller(struct xhci_softc for (i = 0; i != 100; i++) { usb_pause_mtx(NULL, hz / 100); - temp = XREAD4(sc, oper, XHCI_USBCMD) & - (XHCI_CMD_HCRST | XHCI_STS_CNR); + temp = (XREAD4(sc, oper, XHCI_USBCMD) & XHCI_CMD_HCRST) | + (XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_CNR); if (!temp) break; }