svn commit: r264721 - head/lib/libc/arm/gen
Author: andrew Date: Mon Apr 21 09:43:22 2014 New Revision: 264721 URL: http://svnweb.freebsd.org/changeset/base/264721 Log: Rename the fp{get,set}* files so they no longer conflict with the softfloat version of these files. Keep them within this directory so they can be used to implement the armv6 version of these functions. Added: head/lib/libc/arm/gen/fpgetmask_vfp.c - copied unchanged from r264696, head/lib/libc/arm/gen/fpgetmask.c head/lib/libc/arm/gen/fpgetround_vfp.c - copied unchanged from r264696, head/lib/libc/arm/gen/fpgetround.c head/lib/libc/arm/gen/fpgetsticky_vfp.c - copied unchanged from r264696, head/lib/libc/arm/gen/fpgetsticky.c head/lib/libc/arm/gen/fpsetmask_vfp.c - copied unchanged from r264696, head/lib/libc/arm/gen/fpsetmask.c head/lib/libc/arm/gen/fpsetround_vfp.c - copied unchanged from r264696, head/lib/libc/arm/gen/fpsetround.c head/lib/libc/arm/gen/fpsetsticky_vfp.c - copied unchanged from r264696, head/lib/libc/arm/gen/fpsetsticky.c Deleted: head/lib/libc/arm/gen/fpgetmask.c head/lib/libc/arm/gen/fpgetround.c head/lib/libc/arm/gen/fpgetsticky.c head/lib/libc/arm/gen/fpsetmask.c head/lib/libc/arm/gen/fpsetround.c head/lib/libc/arm/gen/fpsetsticky.c Modified: head/lib/libc/arm/gen/Makefile.inc Modified: head/lib/libc/arm/gen/Makefile.inc == --- head/lib/libc/arm/gen/Makefile.inc Mon Apr 21 06:07:08 2014 (r264720) +++ head/lib/libc/arm/gen/Makefile.inc Mon Apr 21 09:43:22 2014 (r264721) @@ -11,6 +11,6 @@ SRCS+=divsi3.S .endif .if ${MACHINE_ARCH} == "armv6hf" -SRCS+= fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c \ - fpsetsticky.c +SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ + fpsetround_vfp.c fpsetsticky_vfp.c .endif Copied: head/lib/libc/arm/gen/fpgetmask_vfp.c (from r264696, head/lib/libc/arm/gen/fpgetmask.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/gen/fpgetmask_vfp.c Mon Apr 21 09:43:22 2014 (r264721, copy of r264696, head/lib/libc/arm/gen/fpgetmask.c) @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef __weak_alias +__weak_alias(fpgetmask,_fpgetmask) +#endif + +#define FP_X_MASK (FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP) + +fp_except_t +fpgetmask(void) +{ + fp_except mask; + + __asm __volatile("vmrs %0, fpscr" : "=&r"(mask)); + + return ((mask >> 8) & FP_X_MASK); +} + Copied: head/lib/libc/arm/gen/fpgetround_vfp.c (from r264696, head/lib/libc/arm/gen/fpgetround.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/gen/fpgetround_vfp.c Mon Apr 21 09:43:22 2014 (r264721, copy of r264696, head/lib/libc/arm/gen/fpgetround.c) @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *d
svn commit: r264722 - stable/10/sys/netinet6
Author: ae Date: Mon Apr 21 11:17:29 2014 New Revision: 264722 URL: http://svnweb.freebsd.org/changeset/base/264722 Log: MFC r264364: Properly release the in6_multi lock. Sponsored by: Yandex LLC Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_mcast.c == --- stable/10/sys/netinet6/in6_mcast.c Mon Apr 21 09:43:22 2014 (r264721) +++ stable/10/sys/netinet6/in6_mcast.c Mon Apr 21 11:17:29 2014 (r264722) @@ -1449,16 +1449,15 @@ in6p_block_unblock_source(struct inpcb * CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: @@ -2046,29 +2045,27 @@ in6p_join_group(struct inpcb *inp, struc if (is_new) { error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf, &inm, 0); - if (error) + if (error) { + IN6_MULTI_UNLOCK(); goto out_im6o_free; + } imo->im6o_membership[idx] = inm; } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); - -out_im6f_rollback: INP_WLOCK_ASSERT(inp); if (error) { im6f_rollback(imf); @@ -2295,23 +2292,20 @@ in6p_leave_group(struct inpcb *inp, stru } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); -out_im6f_rollback: if (error) im6f_rollback(imf); else @@ -2520,16 +2514,15 @@ in6p_set_source_filters(struct inpcb *in */ CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/m
svn commit: r264723 - stable/9/sys/netinet6
Author: ae Date: Mon Apr 21 11:24:01 2014 New Revision: 264723 URL: http://svnweb.freebsd.org/changeset/base/264723 Log: MFC r264364: Properly release the in6_multi lock. Sponsored by: Yandex LLC Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6_mcast.c == --- stable/9/sys/netinet6/in6_mcast.c Mon Apr 21 11:17:29 2014 (r264722) +++ stable/9/sys/netinet6/in6_mcast.c Mon Apr 21 11:24:01 2014 (r264723) @@ -1449,16 +1449,15 @@ in6p_block_unblock_source(struct inpcb * CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: @@ -2046,29 +2045,27 @@ in6p_join_group(struct inpcb *inp, struc if (is_new) { error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf, &inm, 0); - if (error) + if (error) { + IN6_MULTI_UNLOCK(); goto out_im6o_free; + } imo->im6o_membership[idx] = inm; } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); - -out_im6f_rollback: INP_WLOCK_ASSERT(inp); if (error) { im6f_rollback(imf); @@ -2295,23 +2292,20 @@ in6p_leave_group(struct inpcb *inp, stru } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); -out_im6f_rollback: if (error) im6f_rollback(imf); else @@ -2520,16 +2514,15 @@ in6p_set_source_filters(struct inpcb *in */ CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/
svn commit: r264724 - stable/8/sys/netinet6
Author: ae Date: Mon Apr 21 11:26:46 2014 New Revision: 264724 URL: http://svnweb.freebsd.org/changeset/base/264724 Log: MFC r264364: Properly release the in6_multi lock. Sponsored by: Yandex LLC Modified: stable/8/sys/netinet6/in6_mcast.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/netinet6/in6_mcast.c == --- stable/8/sys/netinet6/in6_mcast.c Mon Apr 21 11:24:01 2014 (r264723) +++ stable/8/sys/netinet6/in6_mcast.c Mon Apr 21 11:26:46 2014 (r264724) @@ -1444,16 +1444,15 @@ in6p_block_unblock_source(struct inpcb * CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: @@ -2041,29 +2040,27 @@ in6p_join_group(struct inpcb *inp, struc if (is_new) { error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf, &inm, 0); - if (error) + if (error) { + IN6_MULTI_UNLOCK(); goto out_im6o_free; + } imo->im6o_membership[idx] = inm; } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); - -out_im6f_rollback: INP_WLOCK_ASSERT(inp); if (error) { im6f_rollback(imf); @@ -2290,23 +2287,20 @@ in6p_leave_group(struct inpcb *inp, stru } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; - } - - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) { - CTR1(KTR_MLD, "%s: failed mld downcall", - __func__); + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", + __func__); } } IN6_MULTI_UNLOCK(); -out_im6f_rollback: if (error) im6f_rollback(imf); else @@ -2515,16 +2509,15 @@ in6p_set_source_filters(struct inpcb *in */ CTR1(KTR_MLD, "%s: merge inm state", __func__); error = in6m_merge(inm, imf); - if (error) { + if (error) CTR1(KTR_MLD, "%s: failed to merge inm state", __func__); - goto out_im6f_rollback; + else { + CTR1(KTR_MLD, "%s: doing mld downcall", __func__); + error = mld_change_state(inm, 0); + if (error) + CTR1(KTR_MLD, "%s: failed mld downcall", __func__); } - CTR1(KTR_MLD, "%s: doing mld downcall", __func__); - error = mld_change_state(inm, 0); - if (error) - CTR1(KTR_MLD, "%s: failed mld downcall", __func__); - IN6_MULTI_UNLOCK(); out_im6f_rollback: ___ svn-src-all@freebsd
svn commit: r264725 - head/tools/regression/lib/libc/stdio
Author: jilles Date: Mon Apr 21 12:39:35 2014 New Revision: 264725 URL: http://svnweb.freebsd.org/changeset/base/264725 Log: libc: Add fopen() test to regression Makefile. Modified: head/tools/regression/lib/libc/stdio/Makefile Modified: head/tools/regression/lib/libc/stdio/Makefile == --- head/tools/regression/lib/libc/stdio/Makefile Mon Apr 21 11:26:46 2014(r264724) +++ head/tools/regression/lib/libc/stdio/Makefile Mon Apr 21 12:39:35 2014(r264725) @@ -1,8 +1,16 @@ # $FreeBSD$ -TESTS= test-fmemopen test-getdelim test-mkostemp test-open_memstream \ - test-open_wmemstream test-perror test-print-positional test-printbasic \ - test-printfloat test-scanfloat +TESTS= test-fmemopen \ + test-fopen \ + test-getdelim \ + test-mkostemp \ + test-open_memstream \ + test-open_wmemstream \ + test-perror \ + test-print-positional \ + test-printbasic \ + test-printfloat \ + test-scanfloat CFLAGS+= -lm .PHONY: tests ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r263778 - in head: bin lib lib/clang sbin share/mk usr.bin usr.sbin
On Thu, 2014-03-27 at 20:44 +0100, Dimitry Andric wrote: > On 27 Mar 2014, at 19:12, Jilles Tjoelker wrote: > > On Thu, Mar 27, 2014 at 11:05:00AM -0600, Warner Losh wrote: > >> On Mar 26, 2014, at 4:30 PM, Dimitry Andric wrote: > >>> Author: dim > >>> Date: Wed Mar 26 22:30:38 2014 > >>> New Revision: 263778 > >>> URL: http://svnweb.freebsd.org/changeset/base/263778 > > > >>> Log: > >>> Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process > >>> all the SUBDIR entries in parallel, instead of serially. Apply this > >>> option to a selected number of Makefiles, which can greatly speed up the > >>> build on multi-core machines, when using make -j. > > > >>> This can be extended to more Makefiles later on, whenever they are > >>> verified to work correctly with parallel building. > > > >> Why not have this ‘opt out’ rather than ‘opt in’ like it is now? Are > >> there any known bad dependencies this introduces? > > > > I'm paranoid about build systems ;) It is easy to add dependencies > > across directories and as long as directories are built in sequence, > > nothing goes wrong. > > > > In fact, I had enabled SUBDIR_PARALLEL in sys/modules/Makefile as well, > > but this caused mysterious failures with some kernels such as mips > > ADM5120. > > There are a bunch of other parts that don't really like parallel builds > at the moment. For example, gnu/usr.bin/binutils needs its libraries > (libbfd.a, etc) built first, before it can link the programs. Similar > for gnu/usr.bin/cc, which needs libiberty, libcpp, etc before being able > to build the rest of gcc. > > Most of these cases can hopefully be solved by adding .WAIT targets at > strategic points in the SUBDIR lists, but this also needs a bit of extra > logic in bsd.subdir.mk. > > -Dimitry > It turns out I needed the .WAIT functionality to use SUBDIR_PARALLEL for $work, so I came up with the attached, does this look okay to commit? -- Ian diff -r 67802e319fc6 share/mk/bsd.subdir.mk --- a/share/mk/bsd.subdir.mk Sun Apr 20 21:01:07 2014 -0600 +++ b/share/mk/bsd.subdir.mk Mon Apr 21 06:59:37 2014 -0600 @@ -4,10 +4,10 @@ # The include file contains the default targets # for building subdirectories. # -# For all of the directories listed in the variable SUBDIRS, the +# For all of the directories listed in the variable SUBDIR, the # specified directory will be visited and the target made. There is # also a default target which allows the command "make subdir" where -# subdir is any directory listed in the variable SUBDIRS. +# subdir is any directory listed in the variable SUBDIR. # # # +++ variables +++ @@ -42,7 +42,7 @@ distribute: _SUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR}; do \ + @${_+_}for entry in ${SUBDIR:N.WAIT}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ edir=$${entry}.${MACHINE_ARCH}; \ @@ -57,7 +57,7 @@ distribute: done .endif -${SUBDIR}: .PHONY +${SUBDIR:N.WAIT}: .PHONY ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ else \ @@ -65,13 +65,18 @@ distribute: fi; \ ${MAKE} all +__wait=.WAIT .for __target in all all-man checkdpadd clean cleandepend cleandir \ depend distribute lint maninstall manlint \ obj objlink realinstall regress tags \ ${SUBDIR_TARGETS} .ifdef SUBDIR_PARALLEL +__subdir_targets= .for __dir in ${SUBDIR} -${__target}: ${__target}_subdir_${__dir} +.if ${__wait} == ${__dir} +__subdir_targets+= .WAIT +.else +__subdir_targets+= ${__target}_subdir_${__dir} ${__target}_subdir_${__dir}: .MAKE @${_+_}set -e; \ if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ @@ -85,7 +90,9 @@ distribute: fi; \ ${MAKE} ${__target:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/ +.endif .endfor +${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r263778 - in head: bin lib lib/clang sbin share/mk usr.bin usr.sbin
(sorry for the top post) This looks good to my eye. I’d be tempted to toss in a comment about the __wait=.WAIT construct is due to the primitive nature of bmake’s parser so it runs afoul of the .for/.if construction rules and this is needed to expand the for variable. It tripped me up when I looked at it, until I recalled a comment from similar code in NetBSD. Warner On Apr 21, 2014, at 7:15 AM, Ian Lepore wrote: > On Thu, 2014-03-27 at 20:44 +0100, Dimitry Andric wrote: >> On 27 Mar 2014, at 19:12, Jilles Tjoelker wrote: >>> On Thu, Mar 27, 2014 at 11:05:00AM -0600, Warner Losh wrote: On Mar 26, 2014, at 4:30 PM, Dimitry Andric wrote: > Author: dim > Date: Wed Mar 26 22:30:38 2014 > New Revision: 263778 > URL: http://svnweb.freebsd.org/changeset/base/263778 >>> > Log: > Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process > all the SUBDIR entries in parallel, instead of serially. Apply this > option to a selected number of Makefiles, which can greatly speed up the > build on multi-core machines, when using make -j. >>> > This can be extended to more Makefiles later on, whenever they are > verified to work correctly with parallel building. >>> Why not have this ‘opt out’ rather than ‘opt in’ like it is now? Are there any known bad dependencies this introduces? >>> >>> I'm paranoid about build systems ;) It is easy to add dependencies >>> across directories and as long as directories are built in sequence, >>> nothing goes wrong. >>> >>> In fact, I had enabled SUBDIR_PARALLEL in sys/modules/Makefile as well, >>> but this caused mysterious failures with some kernels such as mips >>> ADM5120. >> >> There are a bunch of other parts that don't really like parallel builds >> at the moment. For example, gnu/usr.bin/binutils needs its libraries >> (libbfd.a, etc) built first, before it can link the programs. Similar >> for gnu/usr.bin/cc, which needs libiberty, libcpp, etc before being able >> to build the rest of gcc. >> >> Most of these cases can hopefully be solved by adding .WAIT targets at >> strategic points in the SUBDIR lists, but this also needs a bit of extra >> logic in bsd.subdir.mk. >> >> -Dimitry >> > > It turns out I needed the .WAIT functionality to use SUBDIR_PARALLEL for > $work, so I came up with the attached, does this look okay to commit? > > -- Ian > > diff -r 67802e319fc6 share/mk/bsd.subdir.mk > --- a/share/mk/bsd.subdir.mk Sun Apr 20 21:01:07 2014 -0600 > +++ b/share/mk/bsd.subdir.mk Mon Apr 21 06:59:37 2014 -0600 > @@ -4,10 +4,10 @@ > # The include file contains the default targets > # for building subdirectories. > # > -# For all of the directories listed in the variable SUBDIRS, the > +# For all of the directories listed in the variable SUBDIR, the > # specified directory will be visited and the target made. There is > # also a default target which allows the command "make subdir" where > -# subdir is any directory listed in the variable SUBDIRS. > +# subdir is any directory listed in the variable SUBDIR. > # > # > # +++ variables +++ > @@ -42,7 +42,7 @@ distribute: > > _SUBDIR: .USE > .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) > - @${_+_}for entry in ${SUBDIR}; do \ > + @${_+_}for entry in ${SUBDIR:N.WAIT}; do \ > if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ > ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} > (${.TARGET:realinstall=install})"; \ > edir=$${entry}.${MACHINE_ARCH}; \ > @@ -57,7 +57,7 @@ distribute: > done > .endif > > -${SUBDIR}: .PHONY > +${SUBDIR:N.WAIT}: .PHONY > ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ > cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ > else \ > @@ -65,13 +65,18 @@ distribute: > fi; \ > ${MAKE} all > > +__wait=.WAIT > .for __target in all all-man checkdpadd clean cleandepend cleandir \ > depend distribute lint maninstall manlint \ > obj objlink realinstall regress tags \ > ${SUBDIR_TARGETS} > .ifdef SUBDIR_PARALLEL > +__subdir_targets= > .for __dir in ${SUBDIR} > -${__target}: ${__target}_subdir_${__dir} > +.if ${__wait} == ${__dir} > +__subdir_targets+= .WAIT > +.else > +__subdir_targets+= ${__target}_subdir_${__dir} > ${__target}_subdir_${__dir}: .MAKE > @${_+_}set -e; \ > if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ > @@ -85,7 +90,9 @@ distribute: > fi; \ > ${MAKE} ${__target:realinstall=install} \ > DIRPRFX=${DIRPRFX}$$edir/ > +.endif > .endfor > +${__target}: ${__subdir_targets} > .else > ${__target}: _SUBDIR > .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264727 - stable/10/sys/cam/ctl
Author: mav Date: Mon Apr 21 16:26:24 2014 New Revision: 264727 URL: http://svnweb.freebsd.org/changeset/base/264727 Log: MFC r264191: Report stripe size and offset of the backing device in READ CAPACITY (16) as physical sector size and offset. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c == --- stable/10/sys/cam/ctl/ctl.c Mon Apr 21 15:36:28 2014(r264726) +++ stable/10/sys/cam/ctl/ctl.c Mon Apr 21 16:26:24 2014(r264727) @@ -6883,6 +6883,8 @@ ctl_read_capacity_16(struct ctl_scsiio * scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ scsi_ulto4b(lun->be_lun->blocksize, data->length); + data->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; + scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, data->lalba_lbp); ctsio->scsi_status = SCSI_STATUS_OK; Modified: stable/10/sys/cam/ctl/ctl_backend.h == --- stable/10/sys/cam/ctl/ctl_backend.h Mon Apr 21 15:36:28 2014 (r264726) +++ stable/10/sys/cam/ctl/ctl_backend.h Mon Apr 21 16:26:24 2014 (r264727) @@ -137,6 +137,10 @@ typedef void (*be_lun_config_t)(void *be * this should be 512. In theory CTL should be able to handle other block * sizes. Host application software may not deal with it very well, though. * + * pblockexp is the log2() of number of LBAs on the LUN per physical sector. + * + * pblockoff is the lowest LBA on the LUN aligned ot physical sector. + * * req_lun_id is the requested LUN ID. CTL only pays attention to this * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is * not available, the LUN addition will fail. If a particular LUN ID isn't @@ -185,6 +189,8 @@ struct ctl_be_lun { void*be_lun;/* passed to CTL */ uint64_tmaxlba; /* passed to CTL */ uint32_tblocksize; /* passed to CTL */ + uint16_tpblockexp; /* passed to CTL */ + uint16_tpblockoff; /* passed to CTL */ uint32_treq_lun_id; /* passed to CTL */ uint32_tlun_id; /* returned from CTL */ uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c == --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Apr 21 15:36:28 2014 (r264726) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Apr 21 16:26:24 2014 (r264727) @@ -158,6 +158,8 @@ struct ctl_be_block_lun { uint64_t size_bytes; uint32_t blocksize; int blocksize_shift; + uint16_t pblockexp; + uint16_t pblockoff; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1370,6 +1372,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw*devsw; int error; + off_t ps, pss, po, pos; params = &req->reqdata.create; @@ -1467,6 +1470,24 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->size_bytes = params->lun_size_bytes; } + error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, + (caddr_t)&ps, FREAD, curthread); + if (error) + ps = po = 0; + else { + error = devsw->d_ioctl(dev, DIOCGSTRIPEOFFSET, + (caddr_t)&po, FREAD, curthread); + if (error) + po = 0; + } + pss = ps / be_lun->blocksize; + pos = po / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { + be_lun->pblockexp = fls(pss) - 1; + be_lun->pblockoff = (pss - pos) % pss; + } + return (0); } @@ -1691,6 +1712,8 @@ ctl_be_block_create(struct ctl_be_block_ * For processor devices, we don't have any size. */ be_lun->blocksize = 0; + be_lun->pblockexp = 0; + be_lun->pblockoff = 0; be_lun->size_blocks = 0; be_lun->size_bytes = 0; be_lun->ctl_be_lun.maxlba = 0; @@ -1751,6 +1774,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; be_lun->ctl_be_lun.be_lun = be_lun; be_lun->ctl_be_lun.b
svn commit: r264728 - stable/9/sys/cam/ctl
Author: mav Date: Mon Apr 21 16:29:54 2014 New Revision: 264728 URL: http://svnweb.freebsd.org/changeset/base/264728 Log: MFC r264191: Report stripe size and offset of the backing device in READ CAPACITY (16) as physical sector size and offset. Modified: stable/9/sys/cam/ctl/ctl.c stable/9/sys/cam/ctl/ctl_backend.h stable/9/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c == --- stable/9/sys/cam/ctl/ctl.c Mon Apr 21 16:26:24 2014(r264727) +++ stable/9/sys/cam/ctl/ctl.c Mon Apr 21 16:29:54 2014(r264728) @@ -6886,6 +6886,8 @@ ctl_read_capacity_16(struct ctl_scsiio * scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ scsi_ulto4b(lun->be_lun->blocksize, data->length); + data->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; + scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, data->lalba_lbp); ctsio->scsi_status = SCSI_STATUS_OK; Modified: stable/9/sys/cam/ctl/ctl_backend.h == --- stable/9/sys/cam/ctl/ctl_backend.h Mon Apr 21 16:26:24 2014 (r264727) +++ stable/9/sys/cam/ctl/ctl_backend.h Mon Apr 21 16:29:54 2014 (r264728) @@ -137,6 +137,10 @@ typedef void (*be_lun_config_t)(void *be * this should be 512. In theory CTL should be able to handle other block * sizes. Host application software may not deal with it very well, though. * + * pblockexp is the log2() of number of LBAs on the LUN per physical sector. + * + * pblockoff is the lowest LBA on the LUN aligned ot physical sector. + * * req_lun_id is the requested LUN ID. CTL only pays attention to this * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is * not available, the LUN addition will fail. If a particular LUN ID isn't @@ -179,6 +183,8 @@ struct ctl_be_lun { void*be_lun;/* passed to CTL */ uint64_tmaxlba; /* passed to CTL */ uint32_tblocksize; /* passed to CTL */ + uint16_tpblockexp; /* passed to CTL */ + uint16_tpblockoff; /* passed to CTL */ uint32_treq_lun_id; /* passed to CTL */ uint32_tlun_id; /* returned from CTL */ uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ Modified: stable/9/sys/cam/ctl/ctl_backend_block.c == --- stable/9/sys/cam/ctl/ctl_backend_block.cMon Apr 21 16:26:24 2014 (r264727) +++ stable/9/sys/cam/ctl/ctl_backend_block.cMon Apr 21 16:29:54 2014 (r264728) @@ -158,6 +158,8 @@ struct ctl_be_block_lun { uint64_t size_bytes; uint32_t blocksize; int blocksize_shift; + uint16_t pblockexp; + uint16_t pblockoff; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1376,6 +1378,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw*devsw; int error; + off_t ps, pss, po, pos; params = &req->reqdata.create; @@ -1473,6 +1476,24 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->size_bytes = params->lun_size_bytes; } + error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, + (caddr_t)&ps, FREAD, curthread); + if (error) + ps = po = 0; + else { + error = devsw->d_ioctl(dev, DIOCGSTRIPEOFFSET, + (caddr_t)&po, FREAD, curthread); + if (error) + po = 0; + } + pss = ps / be_lun->blocksize; + pos = po / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { + be_lun->pblockexp = fls(pss) - 1; + be_lun->pblockoff = (pss - pos) % pss; + } + return (0); } @@ -1701,6 +1722,8 @@ ctl_be_block_create(struct ctl_be_block_ * For processor devices, we don't have any size. */ be_lun->blocksize = 0; + be_lun->pblockexp = 0; + be_lun->pblockoff = 0; be_lun->size_blocks = 0; be_lun->size_bytes = 0; be_lun->ctl_be_lun.maxlba = 0; @@ -1751,6 +1774,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; be_lun->ctl_be_lun.be_lun = be_lun;
svn commit: r264729 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Mon Apr 21 16:33:49 2014 New Revision: 264729 URL: http://svnweb.freebsd.org/changeset/base/264729 Log: MFC r264341: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:29:54 2014(r264728) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:33:49 2014(r264729) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264730 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Mon Apr 21 16:35:14 2014 New Revision: 264730 URL: http://svnweb.freebsd.org/changeset/base/264730 Log: MFC r264341: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.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/zfs_ioctl.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:33:49 2014(r264729) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:35:14 2014(r264730) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264731 - head/share/man/man4
Author: gjb Date: Mon Apr 21 16:35:19 2014 New Revision: 264731 URL: http://svnweb.freebsd.org/changeset/base/264731 Log: urndis(4) will first appear in 9.3-RELEASE. MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/urndis.4 Modified: head/share/man/man4/urndis.4 == --- head/share/man/man4/urndis.4Mon Apr 21 16:35:14 2014 (r264730) +++ head/share/man/man4/urndis.4Mon Apr 21 16:35:19 2014 (r264731) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2014 +.Dd April 21, 2014 .Dt URNDIS 4 .Os .Sh NAME @@ -81,7 +81,7 @@ device driver first appeared in The first .Fx release to include it was -.Fx 10.1 . +.Fx 9.3 . .Sh AUTHORS .An -nosplit The ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264732 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Mon Apr 21 16:42:15 2014 New Revision: 264732 URL: http://svnweb.freebsd.org/changeset/base/264732 Log: MFC r264077: Add BIO_DELETE support to ZVOL. It is an adapted merge from the vendor branch of: 701 UNMAP support for COMSTAR (in part related to ZFS) 2130 zvol DKIOCFREE uses nested DMU transactions Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:35:19 2014(r264731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:42:15 2014(r264732) @@ -25,9 +25,12 @@ * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * + * Portions Copyright 2010 Robert Milkowski + * + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ -/* Portions Copyright 2010 Robert Milkowski */ /* Portions Copyright 2011 Martin Matuska */ /* @@ -153,6 +156,8 @@ int zvol_maxphys = DMU_MAX_ACCESS/2; extern int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); +static void zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, +uint64_t len, boolean_t sync); static int zvol_remove_zv(zvol_state_t *); static int zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio); static int zvol_dumpify(zvol_state_t *zv); @@ -386,6 +391,24 @@ zvol_create_cb(objset_t *os, void *arg, } /* + * Replay a TX_TRUNCATE ZIL transaction if asked. TX_TRUNCATE is how we + * implement DKIOCFREE/free-long-range. + */ +static int +zvol_replay_truncate(zvol_state_t *zv, lr_truncate_t *lr, boolean_t byteswap) +{ + uint64_t offset, length; + + if (byteswap) + byteswap_uint64_array(lr, sizeof (*lr)); + + offset = lr->lr_offset; + length = lr->lr_length; + + return (dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, offset, length)); +} + +/* * Replay a TX_WRITE ZIL transaction that didn't get committed * after a system failure */ @@ -435,7 +458,7 @@ zvol_replay_err(zvol_state_t *zv, lr_t * /* * Callback vectors for replaying records. - * Only TX_WRITE is needed for zvol. + * Only TX_WRITE and TX_TRUNCATE are needed for zvol. */ zil_replay_func_t *zvol_replay_vector[TX_MAX_TYPE] = { zvol_replay_err,/* 0 no such transaction type */ @@ -448,7 +471,7 @@ zil_replay_func_t *zvol_replay_vector[TX zvol_replay_err,/* TX_LINK */ zvol_replay_err,/* TX_RENAME */ zvol_replay_write, /* TX_WRITE */ - zvol_replay_err,/* TX_TRUNCATE */ + zvol_replay_truncate, /* TX_TRUNCATE */ zvol_replay_err,/* TX_SETATTR */ zvol_replay_err,/* TX_ACL */ zvol_replay_err,/* TX_CREATE_ACL */ @@ -1316,6 +1339,21 @@ zvol_strategy(struct bio *bp) rl = zfs_range_lock(&zv->zv_znode, off, resid, doread ? RL_READER : RL_WRITER); + if (bp->bio_cmd == BIO_DELETE) { + dmu_tx_t *tx = dmu_tx_create(zv->zv_objset); + error = dmu_tx_assign(tx, TXG_WAIT); + if (error != 0) { + dmu_tx_abort(tx); + } else { + zvol_log_truncate(zv, tx, off, resid, B_TRUE); + dmu_tx_commit(tx); + error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, + off, resid); + resid = 0; + } + goto unlock; + } + while (resid != 0 && off < volsize) { size_t size = MIN(resid, zvol_maxphys); #ifdef illumos @@ -1351,6 +1389,7 @@ zvol_strategy(struct bio *bp) addr += size; resid -= size; } +unlock: zfs_range_unlock(rl); bp->bio_completed = bp->bio_length - resid; @@ -1648,9 +1687,36 @@ zvol_log_write_minor(void *minor_hdl, dm /* * END entry points to allow external callers access to the volume. */ +#endif /* sun */ /* + * Log a DKIOCFREE/free-long-range to the ZIL with TX_TRUNCATE. + */ +static void +zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, uint64_t len, +boolean_t sync) +{ + itx_t *itx; + lr_truncate_t *lr; + zilog_t *zilog = zv->zv_zilog; + + if (zil_replaying(zilog, tx)) + return; + + itx = zil_itx_create(TX_TRUNCATE, sizeof (*lr)); + lr = (lr_truncate_t *)&itx->itx_lr; + lr->lr_foid = ZVOL_OBJ; + lr->lr_offset = off; + lr->lr_length = len; + + itx->itx_sync = sync; + zil_itx_assign(zilog, itx, tx); +} + +#ifdef sun +/* * Dirtbag ioctls to support mkfs(1M) for
svn commit: r264733 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Mon Apr 21 16:46:44 2014 New Revision: 264733 URL: http://svnweb.freebsd.org/changeset/base/264733 Log: MFC r264193: In addition to r264077, tell GEOM that we do support BIO_DELETE now. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:42:15 2014(r264732) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 21 16:46:44 2014(r264733) @@ -2343,6 +2343,9 @@ zvol_geom_start(struct bio *bp) zvol_strategy(bp); break; case BIO_GETATTR: + if (g_handleattr_int(bp, "GEOM::candelete", 1)) + return; + /* FALLTHROUGH */ default: g_io_deliver(bp, EOPNOTSUPP); break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264735 - stable/9/sys/dev/ciss
Author: sbruno Date: Mon Apr 21 16:55:02 2014 New Revision: 264735 URL: http://svnweb.freebsd.org/changeset/base/264735 Log: MFC r264127 Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4) Submitted by: Benesh, Scott Sponsored by: Yahoo! Inc. Modified: stable/9/sys/dev/ciss/ciss.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ciss/ciss.c == --- stable/9/sys/dev/ciss/ciss.cMon Apr 21 16:54:38 2014 (r264734) +++ stable/9/sys/dev/ciss/ciss.cMon Apr 21 16:55:02 2014 (r264735) @@ -345,6 +345,21 @@ static struct { 0x103C, 0x1928, CISS_BOARD_SA5, "HP Smart Array P230i" }, { 0x103C, 0x1929, CISS_BOARD_SA5, "HP Smart Array P530" }, { 0x103C, 0x192A, CISS_BOARD_SA5, "HP Smart Array P531" }, +{ 0x103C, 0x21BD, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21BE, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21BF, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C0, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C2, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C3, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C5, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C6, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C7, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C8, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CA, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CB, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CC, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CD, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CE, CISS_BOARD_SA5, "HP Smart Array TBD" }, { 0, 0, 0, NULL } }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264734 - stable/10/sys/dev/ciss
Author: sbruno Date: Mon Apr 21 16:54:38 2014 New Revision: 264734 URL: http://svnweb.freebsd.org/changeset/base/264734 Log: MFC r264127 Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4) Submitted by: Benesh, Scott Sponsored by: Yahoo! Inc. Modified: stable/10/sys/dev/ciss/ciss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ciss/ciss.c == --- stable/10/sys/dev/ciss/ciss.c Mon Apr 21 16:46:44 2014 (r264733) +++ stable/10/sys/dev/ciss/ciss.c Mon Apr 21 16:54:38 2014 (r264734) @@ -345,6 +345,21 @@ static struct { 0x103C, 0x1928, CISS_BOARD_SA5, "HP Smart Array P230i" }, { 0x103C, 0x1929, CISS_BOARD_SA5, "HP Smart Array P530" }, { 0x103C, 0x192A, CISS_BOARD_SA5, "HP Smart Array P531" }, +{ 0x103C, 0x21BD, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21BE, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21BF, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C0, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C2, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C3, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C5, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C6, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C7, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21C8, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CA, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CB, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CC, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CD, CISS_BOARD_SA5, "HP Smart Array TBD" }, +{ 0x103C, 0x21CE, CISS_BOARD_SA5, "HP Smart Array TBD" }, { 0, 0, 0, NULL } }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264736 - stable/10/sys/dev/cxgbe
Author: emax Date: Mon Apr 21 17:17:23 2014 New Revision: 264736 URL: http://svnweb.freebsd.org/changeset/base/264736 Log: MFC r264621 use correct (integer) type for the temperature sysctl Reviewed by: np, scottl Obtained from:Netflix Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Mon Apr 21 16:55:02 2014 (r264735) +++ stable/10/sys/dev/cxgbe/t4_main.c Mon Apr 21 17:17:23 2014 (r264736) @@ -4266,7 +4266,7 @@ t4_sysctls(struct adapter *sc) NULL, sc->tids.nftids, "number of filters"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | - CTLFLAG_RD, sc, 0, sysctl_temperature, "A", + CTLFLAG_RD, sc, 0, sysctl_temperature, "I", "chip temperature (in Celsius)"); t4_sge_sysctls(sc, ctx, children); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264737 - in head: lib/libc/stdio tools/regression/lib/libc/stdio
Author: jilles Date: Mon Apr 21 17:40:23 2014 New Revision: 264737 URL: http://svnweb.freebsd.org/changeset/base/264737 Log: libc/stdio: Fail fdopen() on an execute-only fd. An execute-only fd (opened with O_EXEC) allows neither read() nor write() and is therefore incompatible with all stdio modes. Therefore, the [EINVAL] error applies. Also adjust the similar check in freopen() with a NULL path, even though this checks an fd which is already from a FILE. Added: head/tools/regression/lib/libc/stdio/test-fdopen.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-fdopen.t (contents, props changed) head/tools/regression/lib/libc/stdio/test-freopen.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-freopen.t (contents, props changed) Modified: head/lib/libc/stdio/fdopen.c head/lib/libc/stdio/freopen.c head/tools/regression/lib/libc/stdio/Makefile Modified: head/lib/libc/stdio/fdopen.c == --- head/lib/libc/stdio/fdopen.cMon Apr 21 17:17:23 2014 (r264736) +++ head/lib/libc/stdio/fdopen.cMon Apr 21 17:40:23 2014 (r264737) @@ -70,7 +70,8 @@ fdopen(int fd, const char *mode) /* Make sure the mode the user wants is a subset of the actual mode. */ if ((fdflags = _fcntl(fd, F_GETFL, 0)) < 0) return (NULL); - tmp = fdflags & O_ACCMODE; + /* Work around incorrect O_ACCMODE. */ + tmp = fdflags & (O_ACCMODE | O_EXEC); if (tmp != O_RDWR && (tmp != (oflags & O_ACCMODE))) { errno = EINVAL; return (NULL); Modified: head/lib/libc/stdio/freopen.c == --- head/lib/libc/stdio/freopen.c Mon Apr 21 17:17:23 2014 (r264736) +++ head/lib/libc/stdio/freopen.c Mon Apr 21 17:40:23 2014 (r264737) @@ -92,8 +92,9 @@ freopen(const char * __restrict file, co errno = sverrno; return (NULL); } - if ((dflags & O_ACCMODE) != O_RDWR && (dflags & O_ACCMODE) != - (oflags & O_ACCMODE)) { + /* Work around incorrect O_ACCMODE. */ + if ((dflags & O_ACCMODE) != O_RDWR && + (dflags & (O_ACCMODE | O_EXEC)) != (oflags & O_ACCMODE)) { fclose(fp); FUNLOCKFILE(fp); errno = EINVAL; Modified: head/tools/regression/lib/libc/stdio/Makefile == --- head/tools/regression/lib/libc/stdio/Makefile Mon Apr 21 17:17:23 2014(r264736) +++ head/tools/regression/lib/libc/stdio/Makefile Mon Apr 21 17:40:23 2014(r264737) @@ -1,7 +1,9 @@ # $FreeBSD$ -TESTS= test-fmemopen \ +TESTS= test-fdopen \ + test-fmemopen \ test-fopen \ + test-freopen \ test-getdelim \ test-mkostemp \ test-open_memstream \ Added: head/tools/regression/lib/libc/stdio/test-fdopen.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-fdopen.c Mon Apr 21 17:40:23 2014(r264737) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Jilles Tjoelker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +static int testnum = 1; + +static void +runtest(con
svn commit: r264738 - head/sys/fs/nfsclient
Author: rmacklem Date: Mon Apr 21 19:10:23 2014 New Revision: 264738 URL: http://svnweb.freebsd.org/changeset/base/264738 Log: For an NFSv4 mount with the "nocto" option, don't get the up to date file attributes upon close. This reduces the Getattr RPC count by about 65% for software builds. MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 21 17:40:23 2014 (r264737) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 21 19:10:23 2014 (r264738) @@ -767,7 +767,9 @@ nfs_close(struct vop_close_args *ap) /* * Get attributes so "change" is up to date. */ - if (error == 0 && nfscl_mustflush(vp) != 0) { + if (error == 0 && nfscl_mustflush(vp) != 0 && + vp->v_type == VREG && + (VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOCTO) == 0) { ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva, NULL); if (!ret) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264739 - head/sys/netinet
Author: rmacklem Date: Mon Apr 21 19:17:19 2014 New Revision: 264739 URL: http://svnweb.freebsd.org/changeset/base/264739 Log: Add {} braces so that the code conforms to the indentation. Fortunately, I don't think doing the assignment of cap->tsomax unconditionally causes any problem. Reviewed by: glebius MFC after:2 weeks Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Mon Apr 21 19:10:23 2014(r264738) +++ head/sys/netinet/tcp_subr.c Mon Apr 21 19:17:19 2014(r264739) @@ -1819,9 +1819,10 @@ tcp_maxmtu(struct in_conninfo *inc, stru /* Report additional interface capabilities. */ if (cap != NULL) { if (ifp->if_capenable & IFCAP_TSO4 && - ifp->if_hwassist & CSUM_TSO) + ifp->if_hwassist & CSUM_TSO) { cap->ifcap |= CSUM_TSO; cap->tsomax = ifp->if_hw_tsomax; + } } RTFREE(sro.ro_rt); } @@ -1857,9 +1858,10 @@ tcp_maxmtu6(struct in_conninfo *inc, str /* Report additional interface capabilities. */ if (cap != NULL) { if (ifp->if_capenable & IFCAP_TSO6 && - ifp->if_hwassist & CSUM_TSO) + ifp->if_hwassist & CSUM_TSO) { cap->ifcap |= CSUM_TSO; cap->tsomax = ifp->if_hw_tsomax; + } } RTFREE(sro6.ro_rt); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264740 - head/usr.sbin/portsnap/portsnap
Author: delphij Date: Mon Apr 21 19:33:27 2014 New Revision: 264740 URL: http://svnweb.freebsd.org/changeset/base/264740 Log: Use case insensitive match in portsnap. PR: bin/186510 Submitted by: olli MFC after:2 weeks Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh == --- head/usr.sbin/portsnap/portsnap/portsnap.sh Mon Apr 21 19:17:19 2014 (r264739) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Mon Apr 21 19:33:27 2014 (r264740) @@ -367,7 +367,7 @@ fetch_pick_server_init() { # "$name server selection ..."; we allow either format. MLIST="_http._tcp.${SERVERNAME}" host -t srv "${MLIST}" | - sed -nE "s/${MLIST} (has SRV record|server selection) //p" | + sed -nE "s/${MLIST} (has SRV record|server selection) //Ip" | cut -f 1,2,4 -d ' ' | sed -e 's/\.$//' | sort > serverlist_full ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264741 - in head: cddl cddl/lib cddl/lib/tests cddl/sbin cddl/sbin/tests cddl/tests cddl/usr.bin cddl/usr.bin/tests cddl/usr.sbin cddl/usr.sbin/tests etc etc/mtree etc/tests games game...
Author: jmmv Date: Mon Apr 21 21:39:25 2014 New Revision: 264741 URL: http://svnweb.freebsd.org/changeset/base/264741 Log: Add placeholder Kyuafiles for various top-level hierarchies. This change adds tests/ directories in the source tree to create various subdirectories in /usr/tests/ and to install placeholder Kyuafiles for them. the relevant hierarchies are: cddl, etc, games, gnu and secure. The reason for this is to simplify the addition of new test programs for utilities or libraries under any of these directories. Doing so on a case by case basis is unnecessary and is quite an obscure process. Added: head/cddl/lib/tests/ head/cddl/lib/tests/Makefile (contents, props changed) head/cddl/sbin/tests/ head/cddl/sbin/tests/Makefile (contents, props changed) head/cddl/tests/ head/cddl/tests/Makefile (contents, props changed) head/cddl/usr.bin/tests/ head/cddl/usr.bin/tests/Makefile (contents, props changed) head/cddl/usr.sbin/tests/ head/cddl/usr.sbin/tests/Makefile (contents, props changed) head/etc/tests/ head/etc/tests/Makefile (contents, props changed) head/games/tests/ head/games/tests/Makefile (contents, props changed) head/gnu/lib/tests/ head/gnu/lib/tests/Makefile (contents, props changed) head/gnu/tests/ head/gnu/tests/Makefile (contents, props changed) head/gnu/usr.bin/tests/ head/gnu/usr.bin/tests/Makefile (contents, props changed) head/secure/lib/tests/ head/secure/lib/tests/Makefile (contents, props changed) head/secure/libexec/tests/ head/secure/libexec/tests/Makefile (contents, props changed) head/secure/tests/ head/secure/tests/Makefile (contents, props changed) head/secure/usr.bin/tests/ head/secure/usr.bin/tests/Makefile (contents, props changed) head/secure/usr.sbin/tests/ head/secure/usr.sbin/tests/Makefile (contents, props changed) Modified: head/cddl/Makefile head/cddl/lib/Makefile head/cddl/sbin/Makefile head/cddl/usr.bin/Makefile head/cddl/usr.sbin/Makefile head/etc/Makefile head/etc/mtree/BSD.tests.dist head/games/Makefile head/gnu/Makefile head/gnu/lib/Makefile head/gnu/usr.bin/Makefile head/secure/Makefile head/secure/lib/Makefile head/secure/libexec/Makefile head/secure/usr.bin/Makefile head/secure/usr.sbin/Makefile Modified: head/cddl/Makefile == --- head/cddl/Makefile Mon Apr 21 19:33:27 2014(r264740) +++ head/cddl/Makefile Mon Apr 21 21:39:25 2014(r264741) @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + SUBDIR=lib sbin usr.bin usr.sbin +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include Modified: head/cddl/lib/Makefile == --- head/cddl/lib/Makefile Mon Apr 21 19:33:27 2014(r264740) +++ head/cddl/lib/Makefile Mon Apr 21 21:39:25 2014(r264741) @@ -11,7 +11,12 @@ SUBDIR= ${_drti} \ libuutil \ ${_libzfs_core} \ ${_libzfs} \ - ${_libzpool} + ${_libzpool} \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests=tests +.endif .if ${MK_ZFS} != "no" _libzfs_core= libzfs_core Added: head/cddl/lib/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/tests/MakefileMon Apr 21 21:39:25 2014 (r264741) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl/lib + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include Modified: head/cddl/sbin/Makefile == --- head/cddl/sbin/Makefile Mon Apr 21 19:33:27 2014(r264740) +++ head/cddl/sbin/Makefile Mon Apr 21 21:39:25 2014(r264741) @@ -2,7 +2,11 @@ .include -SUBDIR=${_zfs} ${_zpool} +SUBDIR=${_tests} ${_zfs} ${_zpool} + +.if ${MK_TESTS} != "no" +_tests=tests +.endif .if ${MK_ZFS} != "no" _zfs= zfs Added: head/cddl/sbin/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/sbin/tests/Makefile Mon Apr 21 21:39:25 2014 (r264741) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl/sbin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include Added: head/cddl/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/tests/MakefileMon Apr 21 21:39:25 2014(r264741) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include Mo
svn commit: r264742 - head
Author: jmmv Date: Mon Apr 21 22:36:31 2014 New Revision: 264742 URL: http://svnweb.freebsd.org/changeset/base/264742 Log: Prevent building tests when bootstrapping make. Should fix the breakage reported by tinderbox when WITHOUT_BMAKE is set, which was probably introduced in r263346.. Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Mon Apr 21 21:39:25 2014(r264741) +++ head/Makefile Mon Apr 21 22:36:31 2014(r264742) @@ -330,7 +330,8 @@ MMAKEENV= MAKEOBJDIRPREFIX=${MYMAKE:H} \ INSTALL="sh ${.CURDIR}/tools/install.sh" MMAKE= ${MMAKEENV} ${MAKE} \ -D_UPGRADING -DNO_MAN -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WERROR DESTDIR= PROGNAME=${MYMAKE:T} + -DNO_CPU_CFLAGS -DNO_WERROR \ + DESTDIR= MK_TESTS=no PROGNAME=${MYMAKE:T} make bmake: .PHONY @echo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264743 - head/usr.bin/printf
Author: pfg Date: Mon Apr 21 22:47:18 2014 New Revision: 264743 URL: http://svnweb.freebsd.org/changeset/base/264743 Log: Add parameterized position handling to printf(1). Add a new %n$ option to change the order of the parameters as done in the ksh93 builtin printf (among others). For example: %printf '%2$1d %1$s\n' one 2 three 4 2 one 4 three The feature was written by Garret D'Amore under a BSD license for Nexenta/illumos. Reference: http://garrett.damore.org/2010/10/new-implementation-of-printf.html PR: bin/152934 Obtained from:Illumos MFC after:2 weeks Modified: head/usr.bin/printf/printf.1 head/usr.bin/printf/printf.c Modified: head/usr.bin/printf/printf.1 == --- head/usr.bin/printf/printf.1Mon Apr 21 22:36:31 2014 (r264742) +++ head/usr.bin/printf/printf.1Mon Apr 21 22:47:18 2014 (r264743) @@ -31,7 +31,7 @@ .\"@(#)printf.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 28, 2011 +.Dd April 21, 2014 .Dt PRINTF 1 .Os .Sh NAME @@ -290,6 +290,9 @@ octal escapes are .Cm \e0 Ns Ar num instead of .Cm \e Ns Ar num . +.It Cm n$ +Allows reordering of the output according to +.Ar argument . .It Cm \&% Print a `%'; no argument is used. .El Modified: head/usr.bin/printf/printf.c == --- head/usr.bin/printf/printf.cMon Apr 21 22:36:31 2014 (r264742) +++ head/usr.bin/printf/printf.cMon Apr 21 22:47:18 2014 (r264743) @@ -1,4 +1,5 @@ /*- + * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * @@ -69,6 +70,11 @@ static const char rcsid[] = #definePF(f, func) do { \ char *b = NULL; \ + int dollar = 0; \ + if (*f == '$') { \ + dollar++; \ + *f = '%'; \ + } \ if (havewidth) \ if (haveprec) \ (void)asprintf(&b, f, fieldwidth, precision, func); \ @@ -82,6 +88,8 @@ static const char rcsid[] = (void)fputs(b, stdout); \ free(b);\ } \ + if (dollar) \ + *f = '$'; \ } while (0) static int asciicode(void); @@ -96,6 +104,8 @@ static const char static char*mknum(char *, char); static void usage(void); +static int myargc; +static char **myargv; static char **gargv; int @@ -146,7 +156,13 @@ main(int argc, char *argv[]) chopped = escape(fmt, 1, &len); /* backslash interpretation */ rval = end = 0; gargv = ++argv; + for (;;) { + char **maxargv = gargv; + + myargv = gargv; + for (myargc = 0; gargv[myargc]; myargc++) + /* nop */; start = fmt; while (fmt < format + len) { if (fmt[0] == '%') { @@ -168,7 +184,10 @@ main(int argc, char *argv[]) start = fmt; } else fmt++; + if (gargv > maxargv) + maxargv = gargv; } + gargv = maxargv; if (end == 1) { warnx("missing format character"); @@ -202,6 +221,22 @@ printf_doformat(char *start, int *rval) char convch, nextch; fmt = start + 1; + + /* look for "n$" field index specifier */ + fmt += strspn(fmt, skip2); + if ((*fmt == '$') && (fmt != (start + 1))) { + int idx = atoi(start + 1); + if (idx <= myargc) { + gargv = &myargv[idx - 1]; + } else { + gargv = &myargv[myargc]; + } + start = fmt; + fmt++; + } else { + fmt = start + 1; + } + /* skip to field width */ fmt += strspn(fmt, skip1); if (*fmt == '*') { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsu
Re: svn commit: r263346 - in head: etc/mtree tools/build/mk tools/regression/usr.bin/make usr.bin/make usr.bin/make/tests usr.bin/make/tests/archives/fmt_44bsd usr.bin/make/tests/archives/fmt_44bsd_mo
On Fri, Mar 28, 2014 at 1:32 AM, Julio Merino wrote: > On Wed, Mar 26, 2014 at 12:25 AM, Dag-Erling Smørgrav wrote: >> Julio Merino writes: >>> Log: >>> Migrate tools/regression/usr.bin/make/ to the new tests layout. >>> >>> Note that these tests are for fmake, not bmake, and thus they are not >>> installed nor run when bmake is selected (the default). Yes, I have >>> wasted a *ton* of time on moving tests for no real reason other than >>> ensuring they are not left behind. >>> >>> But maybe, just maybe, it was not work in vain: the majority of these >>> tests also work with bmake and the few that don't may point at broken >>> stuff. For example, the tests for the "archive" feature do not work >>> with bmake, but bmake's manpage and source tree seem to imply that they >>> should. So... to be investigated later; need to poke sjg@. >> >> This, or a subsequent but related commit, broke the WITHOUT_BMAKE build: > > Apologies for not having gotten to this yet. Will try to deal with it > during the weekend or next week when I'm back home. (Still traveling > after AsiaBSDCon and been focusing on fixing some other issues in the > testing cluster.) Finally got to this. Just committed r264742 which will hopefully fix it. > In the meantime: could someone enlighten me as to why !bmake is still > supported? Question still stands. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264744 - in head/usr.bin: grep grep/regex patch sort
Author: pfg Date: Mon Apr 21 22:52:18 2014 New Revision: 264744 URL: http://svnweb.freebsd.org/changeset/base/264744 Log: Various style(9) fixes and typos in grep, sort and patch. MFC after:3 days Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/regex/tre-fastmatch.c head/usr.bin/patch/common.h head/usr.bin/patch/pch.h head/usr.bin/sort/bwstring.h head/usr.bin/sort/coll.h head/usr.bin/sort/file.h head/usr.bin/sort/mem.h head/usr.bin/sort/radixsort.h head/usr.bin/sort/sort.1.in head/usr.bin/sort/sort.h head/usr.bin/sort/vsort.h Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cMon Apr 21 22:47:18 2014(r264743) +++ head/usr.bin/grep/grep.cMon Apr 21 22:52:18 2014(r264744) @@ -311,7 +311,7 @@ read_patterns(const char *fn) fclose(f); return; } -while ((line = fgetln(f, &len)) != NULL) + while ((line = fgetln(f, &len)) != NULL) add_pattern(line, line[0] == '\n' ? 0 : len); if (ferror(f)) err(2, "%s", fn); Modified: head/usr.bin/grep/grep.h == --- head/usr.bin/grep/grep.hMon Apr 21 22:47:18 2014(r264743) +++ head/usr.bin/grep/grep.hMon Apr 21 22:52:18 2014(r264744) @@ -39,48 +39,48 @@ #include "fastmatch.h" #ifdef WITHOUT_NLS -#define getstr(n) errstr[n] +#definegetstr(n)errstr[n] #else #include extern nl_catd catalog; -#define getstr(n) catgets(catalog, 1, n, errstr[n]) +#definegetstr(n)catgets(catalog, 1, n, errstr[n]) #endif extern const char *errstr[]; -#define VERSION"2.5.1-FreeBSD" +#defineVERSION "2.5.1-FreeBSD" -#define GREP_FIXED 0 -#define GREP_BASIC 1 -#define GREP_EXTENDED 2 - -#define BINFILE_BIN0 -#define BINFILE_SKIP 1 -#define BINFILE_TEXT 2 - -#define FILE_STDIO 0 -#define FILE_MMAP 1 -#define FILE_GZIP 2 -#define FILE_BZIP 3 -#define FILE_XZ4 -#define FILE_LZMA 5 - -#define DIR_READ 0 -#define DIR_SKIP 1 -#define DIR_RECURSE2 - -#define DEV_READ 0 -#define DEV_SKIP 1 - -#define LINK_READ 0 -#define LINK_EXPLICIT 1 -#define LINK_SKIP 2 +#defineGREP_FIXED 0 +#defineGREP_BASIC 1 +#defineGREP_EXTENDED 2 + +#defineBINFILE_BIN 0 +#defineBINFILE_SKIP1 +#defineBINFILE_TEXT2 + +#defineFILE_STDIO 0 +#defineFILE_MMAP 1 +#defineFILE_GZIP 2 +#defineFILE_BZIP 3 +#defineFILE_XZ 4 +#defineFILE_LZMA 5 + +#defineDIR_READ0 +#defineDIR_SKIP1 +#defineDIR_RECURSE 2 + +#defineDEV_READ0 +#defineDEV_SKIP1 + +#defineLINK_READ 0 +#defineLINK_EXPLICIT 1 +#defineLINK_SKIP 2 -#define EXCL_PAT 0 -#define INCL_PAT 1 +#defineEXCL_PAT0 +#defineINCL_PAT1 -#define MAX_LINE_MATCHES 32 +#defineMAX_LINE_MATCHES32 struct file { int fd; @@ -129,7 +129,7 @@ extern regex_t *er_pattern, *r_pattern; extern fastmatch_t *fg_pattern; /* For regex errors */ -#define RE_ERROR_BUF 512 +#defineRE_ERROR_BUF512 extern char re_error[RE_ERROR_BUF + 1];/* Seems big enough */ /* util.c */ Modified: head/usr.bin/grep/regex/tre-fastmatch.c == --- head/usr.bin/grep/regex/tre-fastmatch.c Mon Apr 21 22:47:18 2014 (r264743) +++ head/usr.bin/grep/regex/tre-fastmatch.c Mon Apr 21 22:52:18 2014 (r264744) @@ -444,7 +444,7 @@ static int fastcmp(const fastmatch_t *fg } /* - * Copies the pattern pat having lenght n to p and stores + * Copies the pattern pat having length n to p and stores * the size in l. */ #define SAVE_PATTERN(src, srclen, dst, dstlen) \ Modified: head/usr.bin/patch/common.h == --- head/usr.bin/patch/common.h Mon Apr 21 22:47:18 2014(r264743) +++ head/usr.bin/patch/common.h Mon Apr 21 22:52:18 2014(r264744) @@ -32,32 +32,32 @@ #include #include -#define DEBUGGING +#defineDEBUGGING /* constants */ -#define MAXHUNKSIZE 20 /* is this enough lines? */ -#define INITHUNKMAX 125/* initial dynamic allocation size */ -#define INITLINELEN 4096 -#define BUFFERSIZE 4096 - -#define SCCSPREFIX "s." -#define GET "get -e %s" -#define SCCSDIFF "get -p %s | diff - %s >/dev/null" - -#define RCSSUFFIX ",v" -#define CHECKOUT
svn commit: r264745 - stable/10/sys/dev/usb/net
Author: yongari Date: Tue Apr 22 04:30:24 2014 New Revision: 264745 URL: http://svnweb.freebsd.org/changeset/base/264745 Log: MFC r264062: Correct endianness handling in getting station address from EEPROM. While I'm here, remove aue_eeprom_getword() as its only usage is to read station address and make it more readable. This change is inspired by NetBSD. With this change, aue(4) should work on big endian architectures. PR: 188177 Modified: stable/10/sys/dev/usb/net/if_aue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_aue.c == --- stable/10/sys/dev/usb/net/if_aue.c Mon Apr 21 22:52:18 2014 (r264744) +++ stable/10/sys/dev/usb/net/if_aue.c Tue Apr 22 04:30:24 2014 (r264745) @@ -208,9 +208,7 @@ static uint8_t aue_csr_read_1(struct aue static uint16_taue_csr_read_2(struct aue_softc *, uint16_t); static voidaue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); static voidaue_csr_write_2(struct aue_softc *, uint16_t, uint16_t); -static voidaue_eeprom_getword(struct aue_softc *, int, uint16_t *); -static voidaue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, - uint16_t); +static uint16_taue_eeprom_getword(struct aue_softc *, int); static voidaue_reset(struct aue_softc *); static voidaue_reset_pegasus_II(struct aue_softc *); @@ -372,11 +370,10 @@ aue_csr_write_2(struct aue_softc *sc, ui /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void -aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) +static uint16_t +aue_eeprom_getword(struct aue_softc *sc, int addr) { int i; - uint16_t word = 0; aue_csr_write_1(sc, AUE_EE_REG, addr); aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); @@ -391,22 +388,23 @@ aue_eeprom_getword(struct aue_softc *sc, if (i == AUE_TIMEOUT) device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); - word = aue_csr_read_2(sc, AUE_EE_DATA); - *dest = word; + return (aue_csr_read_2(sc, AUE_EE_DATA)); } /* - * Read a sequence of words from the EEPROM. + * Read station address(offset 0) from the EEPROM. */ static void -aue_read_eeprom(struct aue_softc *sc, uint8_t *dest, -uint16_t off, uint16_t len) +aue_read_mac(struct aue_softc *sc, uint8_t *eaddr) { - uint16_t *ptr = (uint16_t *)dest; - int i; + int i, offset; + uint16_t word; - for (i = 0; i != len; i++, ptr++) - aue_eeprom_getword(sc, off + i, ptr); + for (i = 0, offset = 0; i < ETHER_ADDR_LEN / 2; i++) { + word = aue_eeprom_getword(sc, offset + i); + eaddr[i * 2] = (uint8_t)word; + eaddr[i * 2 + 1] = (uint8_t)(word >> 8); + } } static int @@ -632,7 +630,7 @@ aue_attach_post(struct usb_ether *ue) aue_reset(sc); /* get station address from the EEPROM */ - aue_read_eeprom(sc, ue->ue_eaddr, 0, 3); + aue_read_mac(sc, ue->ue_eaddr); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264746 - stable/9/sys/dev/usb/net
Author: yongari Date: Tue Apr 22 04:31:07 2014 New Revision: 264746 URL: http://svnweb.freebsd.org/changeset/base/264746 Log: MFC r264062: Correct endianness handling in getting station address from EEPROM. While I'm here, remove aue_eeprom_getword() as its only usage is to read station address and make it more readable. This change is inspired by NetBSD. With this change, aue(4) should work on big endian architectures. PR: 188177 Modified: stable/9/sys/dev/usb/net/if_aue.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_aue.c == --- stable/9/sys/dev/usb/net/if_aue.c Tue Apr 22 04:30:24 2014 (r264745) +++ stable/9/sys/dev/usb/net/if_aue.c Tue Apr 22 04:31:07 2014 (r264746) @@ -208,9 +208,7 @@ static uint8_t aue_csr_read_1(struct aue static uint16_taue_csr_read_2(struct aue_softc *, uint16_t); static voidaue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); static voidaue_csr_write_2(struct aue_softc *, uint16_t, uint16_t); -static voidaue_eeprom_getword(struct aue_softc *, int, uint16_t *); -static voidaue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, - uint16_t); +static uint16_taue_eeprom_getword(struct aue_softc *, int); static voidaue_reset(struct aue_softc *); static voidaue_reset_pegasus_II(struct aue_softc *); @@ -372,11 +370,10 @@ aue_csr_write_2(struct aue_softc *sc, ui /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void -aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) +static uint16_t +aue_eeprom_getword(struct aue_softc *sc, int addr) { int i; - uint16_t word = 0; aue_csr_write_1(sc, AUE_EE_REG, addr); aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); @@ -391,22 +388,23 @@ aue_eeprom_getword(struct aue_softc *sc, if (i == AUE_TIMEOUT) device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); - word = aue_csr_read_2(sc, AUE_EE_DATA); - *dest = word; + return (aue_csr_read_2(sc, AUE_EE_DATA)); } /* - * Read a sequence of words from the EEPROM. + * Read station address(offset 0) from the EEPROM. */ static void -aue_read_eeprom(struct aue_softc *sc, uint8_t *dest, -uint16_t off, uint16_t len) +aue_read_mac(struct aue_softc *sc, uint8_t *eaddr) { - uint16_t *ptr = (uint16_t *)dest; - int i; + int i, offset; + uint16_t word; - for (i = 0; i != len; i++, ptr++) - aue_eeprom_getword(sc, off + i, ptr); + for (i = 0, offset = 0; i < ETHER_ADDR_LEN / 2; i++) { + word = aue_eeprom_getword(sc, offset + i); + eaddr[i * 2] = (uint8_t)word; + eaddr[i * 2 + 1] = (uint8_t)(word >> 8); + } } static int @@ -632,7 +630,7 @@ aue_attach_post(struct usb_ether *ue) aue_reset(sc); /* get station address from the EEPROM */ - aue_read_eeprom(sc, ue->ue_eaddr, 0, 3); + aue_read_mac(sc, ue->ue_eaddr); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264747 - stable/10/sys/dev/nfe
Author: yongari Date: Tue Apr 22 04:35:07 2014 New Revision: 264747 URL: http://svnweb.freebsd.org/changeset/base/264747 Log: MFC r264293: Add workaround for MCP61 Ethernet controller found on MSI K9 motherboard. PHY hardware used for the controller responded at all possible addresses which in turn resulted in having 32 PHYs for the controller. If driver detects "MSI K9N6PGM2-V2 (MS-7309)" motherboard, tell miibus(4) PHY is located at 0. Modified: stable/10/sys/dev/nfe/if_nfe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nfe/if_nfe.c == --- stable/10/sys/dev/nfe/if_nfe.c Tue Apr 22 04:31:07 2014 (r264746) +++ stable/10/sys/dev/nfe/if_nfe.c Tue Apr 22 04:35:07 2014 (r264747) @@ -78,6 +78,7 @@ static int nfe_suspend(device_t); static int nfe_resume(device_t); static int nfe_shutdown(device_t); static int nfe_can_use_msix(struct nfe_softc *); +static int nfe_detect_msik9(struct nfe_softc *); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -333,13 +334,38 @@ nfe_alloc_msix(struct nfe_softc *sc, int } } + +static int +nfe_detect_msik9(struct nfe_softc *sc) +{ + static const char *maker = "MSI"; + static const char *product = "K9N6PGM2-V2 (MS-7309)"; + char *m, *p; + int found; + + found = 0; + m = getenv("smbios.planar.maker"); + p = getenv("smbios.planar.product"); + if (m != NULL && p != NULL) { + if (strcmp(m, maker) == 0 && strcmp(p, product) == 0) + found = 1; + } + if (m != NULL) + freeenv(m); + if (p != NULL) + freeenv(p); + + return (found); +} + + static int nfe_attach(device_t dev) { struct nfe_softc *sc; struct ifnet *ifp; bus_addr_t dma_addr_max; - int error = 0, i, msic, reg, rid; + int error = 0, i, msic, phyloc, reg, rid; sc = device_get_softc(dev); sc->nfe_dev = dev; @@ -607,8 +633,16 @@ nfe_attach(device_t dev) #endif /* Do MII setup */ + phyloc = MII_PHY_ANY; + if (sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN1 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN2 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN3 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN4) { + if (nfe_detect_msik9(sc) != 0) + phyloc = 0; + } error = mii_attach(dev, &sc->nfe_miibus, ifp, nfe_ifmedia_upd, - nfe_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, + nfe_ifmedia_sts, BMSR_DEFCAPMASK, phyloc, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264748 - stable/9/sys/dev/nfe
Author: yongari Date: Tue Apr 22 04:36:53 2014 New Revision: 264748 URL: http://svnweb.freebsd.org/changeset/base/264748 Log: MFC r264293: Add workaround for MCP61 Ethernet controller found on MSI K9 motherboard. PHY hardware used for the controller responded at all possible addresses which in turn resulted in having 32 PHYs for the controller. If driver detects "MSI K9N6PGM2-V2 (MS-7309)" motherboard, tell miibus(4) PHY is located at 0. Modified: stable/9/sys/dev/nfe/if_nfe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nfe/if_nfe.c == --- stable/9/sys/dev/nfe/if_nfe.c Tue Apr 22 04:35:07 2014 (r264747) +++ stable/9/sys/dev/nfe/if_nfe.c Tue Apr 22 04:36:53 2014 (r264748) @@ -78,6 +78,7 @@ static int nfe_suspend(device_t); static int nfe_resume(device_t); static int nfe_shutdown(device_t); static int nfe_can_use_msix(struct nfe_softc *); +static int nfe_detect_msik9(struct nfe_softc *); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -333,13 +334,38 @@ nfe_alloc_msix(struct nfe_softc *sc, int } } + +static int +nfe_detect_msik9(struct nfe_softc *sc) +{ + static const char *maker = "MSI"; + static const char *product = "K9N6PGM2-V2 (MS-7309)"; + char *m, *p; + int found; + + found = 0; + m = getenv("smbios.planar.maker"); + p = getenv("smbios.planar.product"); + if (m != NULL && p != NULL) { + if (strcmp(m, maker) == 0 && strcmp(p, product) == 0) + found = 1; + } + if (m != NULL) + freeenv(m); + if (p != NULL) + freeenv(p); + + return (found); +} + + static int nfe_attach(device_t dev) { struct nfe_softc *sc; struct ifnet *ifp; bus_addr_t dma_addr_max; - int error = 0, i, msic, reg, rid; + int error = 0, i, msic, phyloc, reg, rid; sc = device_get_softc(dev); sc->nfe_dev = dev; @@ -608,8 +634,16 @@ nfe_attach(device_t dev) #endif /* Do MII setup */ + phyloc = MII_PHY_ANY; + if (sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN1 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN2 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN3 || + sc->nfe_devid == PCI_PRODUCT_NVIDIA_MCP61_LAN4) { + if (nfe_detect_msik9(sc) != 0) + phyloc = 0; + } error = mii_attach(dev, &sc->nfe_miibus, ifp, nfe_ifmedia_upd, - nfe_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, + nfe_ifmedia_sts, BMSR_DEFCAPMASK, phyloc, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r264749 - head/sys/fs/nfsclient
Author: rmacklem Date: Tue Apr 22 04:42:46 2014 New Revision: 264749 URL: http://svnweb.freebsd.org/changeset/base/264749 Log: Fixes mkdir for the NFSv2 client that was broken by r264705. Reported by: bdrewery MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cTue Apr 22 04:36:53 2014 (r264748) +++ head/sys/fs/nfsclient/nfs_clrpcops.cTue Apr 22 04:42:46 2014 (r264749) @@ -2585,7 +2585,7 @@ nfsrpc_mkdir(vnode_t dvp, char *name, in } if (!error) error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); - if (!error) { + if (error == 0 && (nd->nd_flag & ND_NFSV4) != 0) { /* Get rid of the PutFH and Getattr status values. */ NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); /* Load the directory attributes. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"