Re: svn commit: r239356 - head/sbin/dhclient
Hi, On Thu, 23 Aug 2012 08:41:37 +0400 Andrey Chernov a...@freebsd.org said: ache On Thu, Aug 23, 2012 at 12:27:46AM +0900, Hajimu UMEMOTO wrote: A link-local address has a scope; an interface here. You cannot omit it on FreeBSD by default. To be able to omit it, specify something like ipv6_default_interface=em0 in your /etc/rc.conf. ache Please enlighten me a bit. ache RFC 4007 11.6. Omitting Zone Indices states: ache The format defined in this document does not intend to invalidate the acheoriginal format for non-global addresses; that is, the format without achethe zone index portion. As described in Section 6, in some common achecases with the notion of the default zone index, there can be no acheambiguity about scope zones. In such an environment, the acheimplementation can omit the %zone_id part. ache Does absolutely trusted IPv6 local net using link-local addresses only ache falls in that case? If yes, is there a way to make address scope optional ache for all link-local addresses in FreeBSD? FreeBSD doesn't have a feature to define a zone manually. If a node has more than one interfaces, a link-local address without zone identifer has ambiguity. If you mean `all link-local addresses' are within one interface, yes, you can omit zone identifer by setting ipv6_default_interface' ache Are link-local addresses ever usable for DNS or not due to their ache %zone_id part? F.e. for the case there is no global IPv6 net assigned at ache all but pure isolated IPv6 local network. In anyway, I don't recommend to use a link-local address for DNS. ache Is it only due to their scope part or other reasons exists too? As you saw, dig(1) and host(1) doesn't work well with a link-local address. Not only a zone identifier, but also some implementation may handle a link-local address (fe80:: prefix) as special. Sincerely, -- Hajimu UMEMOTO u...@mahoroba.org ume@{,jp.}FreeBSD.org http://www.mahoroba.org/~ume/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r239584 - head/sys/kern
On Wed, 22 Aug 2012, John Baldwin wrote: Author: jhb Date: Wed Aug 22 20:00:41 2012 New Revision: 239584 URL: http://svn.freebsd.org/changeset/base/239584 Log: Fix the 'show witness' DDB command to honor db_pager_quit. Thanks! -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239611 - head/usr.bin/truss
Author: zont Date: Thu Aug 23 12:20:29 2012 New Revision: 239611 URL: http://svn.freebsd.org/changeset/base/239611 Log: - Put arguments for print_syscall_ret() function in proper order. Bug was introduced in r192025. Approved by: kib (mentor) Modified: head/usr.bin/truss/ia64-fbsd.c Modified: head/usr.bin/truss/ia64-fbsd.c == --- head/usr.bin/truss/ia64-fbsd.c Thu Aug 23 09:18:52 2012 (r239610) +++ head/usr.bin/truss/ia64-fbsd.c Thu Aug 23 12:20:29 2012 (r239611) @@ -294,7 +294,7 @@ ia64_syscall_exit(struct trussinfo *trus */ print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, - fsc.sc, retval); + retval, fsc.sc); clear_fsc(); return (retval); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r239597 - head/sys/arm/arm
On Wednesday, August 22, 2012 6:48:50 pm Oleksandr Tymoshenko wrote: Author: gonzo Date: Wed Aug 22 22:48:50 2012 New Revision: 239597 URL: http://svn.freebsd.org/changeset/base/239597 Log: Do not change cachable attribute for DMA memory allocated with BUS_DMA_COHERENT attribute The minimum unit for changing cachable attribute is page, so call to pmap_change_attr effectively disable cache for all pages that newly allocated DMA memory region spans on. The problem is that general-purpose memory could reside on these pages too and disabling cache might affect performance. Moreover ldrex/strex operators raise Data Abort exception when accessing memory on page with cachable attribute off. BUS_DMA_COHERENT does nto require memory to be coherent. It just suggests to do best effort for reducing synchronization overhead. Alternatively you could force an allocation with BUS_DMA_COHERENT to always allocate at least one page. Also, it is probably better to match what I recently did in x86 and use kmem_alloc_contig() or kmem_alloc_attr() for allocations with a custom memory attribute rather than using pmap_change_attr() directly. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r227687 - head/sys/dev/mii
On Friday, November 18, 2011 5:39:46 pm Marius Strobl wrote: Author: marius Date: Fri Nov 18 22:39:46 2011 New Revision: 227687 URL: http://svn.freebsd.org/changeset/base/227687 Log: - Add a hint.miibus.X.phymask hint, allowing do individually exclude PHY addresses from being probed and attaching something including ukphy(4) to it. This is mainly necessarily for PHY switches that create duplicate or fake PHYs on the bus that can corrupt the PHY state when accessed or simply cause problems when ukphy(4) isolates the additional instances. - Change miibus(4) to be a hinted bus, allowing to add child devices via hints and to set their attach arguments (including for automatically probed PHYs). This is mainly needed for PHY switches that violate IEEE 802.3 and don't even implement the basic register set so we can't probe them automatically. However, the ability to alter the attach arguments for automatically probed PHYs is also useful as for example it allows to test (or tell a user to test) new variant of a PHY with a specific driver by letting an existing driver attach to it via manipulating the IDs without the need to touch the source code or to limit a Gigabit Ethernet PHY to only announce up to Fast Ethernet in order to save energy by limiting the capability mask. Generally, a driver has to be hinted via hint.phydrv.X.at=miibusY and hint.phydrv.X.phyno=Z (which already is sufficient to add phydrvX at miibusY at PHY address Z). Then optionally the following attach arguments additionally can be configured: hint.phydrv.X.id1 hint.phydrv.X.id2 hint.phydrv.X.capmask - Some minor cleanup. I was looking at this today with bz to try to figure out how to use this. It strikes me that in a case of a bus with devices that have IDs it can be useful to not hardcode the driver name and unit number, but to be able to create a device and let the normal driver probe mechanics work. The existing miibus_hinted_child() routine already largely enforces that by ensuring that any new child has a unique phyno address. Two approaches I can think of are: 1) Never hardcode the name and unit number. 2) Don't hardcode the name and unit number if the name is phy. This would let you do something like: hint.phy.0.at=miibus0 hint.phy.0.phyno=1 hint.phy.0.id1=xxx hint.phy.0.id2=yyy And then 'e1000phy' or 'brphy' or whoever could manage the phy. Though perhaps in the case of hinted children you want to always force the phy driver? -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239612 - head/sbin/camcontrol
Author: jh Date: Thu Aug 23 16:25:36 2012 New Revision: 239612 URL: http://svn.freebsd.org/changeset/base/239612 Log: Check the return value of sbuf_finish(). Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c == --- head/sbin/camcontrol/camcontrol.c Thu Aug 23 12:20:29 2012 (r239611) +++ head/sbin/camcontrol/camcontrol.c Thu Aug 23 16:25:36 2012 (r239612) @@ -4758,7 +4758,10 @@ try_long: smp_report_general_sbuf(response, sizeof(*response), sb); - sbuf_finish(sb); + if (sbuf_finish(sb) != 0) { + warnx(%s: sbuf_finish, __func__); + goto bailout; + } printf(%s, sbuf_data(sb)); @@ -5129,7 +5132,10 @@ smpmaninfo(struct cam_device *device, in smp_report_manuf_info_sbuf(response, sizeof(response), sb); - sbuf_finish(sb); + if (sbuf_finish(sb) != 0) { + warnx(%s: sbuf_finish, __func__); + goto bailout; + } printf(%s, sbuf_data(sb)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239613 - head/share/mk
Author: dim Date: Thu Aug 23 17:03:33 2012 New Revision: 239613 URL: http://svn.freebsd.org/changeset/base/239613 Log: Make sure bsd.dep.mk does not filter out -stdlib=xxx from CXXFLAGS, since this determines parts of the C++ include path. MFC after:1 week Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkThu Aug 23 16:25:36 2012(r239612) +++ head/share/mk/bsd.dep.mkThu Aug 23 17:03:33 2012(r239613) @@ -125,8 +125,10 @@ depend: beforedepend ${DEPENDFILE} after # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. -MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} ${CFLAGS:M-ansi} -MKDEP_CXXFLAGS=${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} +MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \ + ${CFLAGS:M-ansi} +MKDEP_CXXFLAGS=${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \ + ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239614 - in head: lib/clang usr.bin/clang
Author: dim Date: Thu Aug 23 17:08:07 2012 New Revision: 239614 URL: http://svn.freebsd.org/changeset/base/239614 Log: Sprinkle a bit of style.Makefile(5) across various clang Makefiles. No functional changes. MFC after:3 days Modified: head/lib/clang/clang.build.mk head/lib/clang/clang.lib.mk head/usr.bin/clang/clang.prog.mk Modified: head/lib/clang/clang.build.mk == --- head/lib/clang/clang.build.mk Thu Aug 23 17:03:33 2012 (r239613) +++ head/lib/clang/clang.build.mk Thu Aug 23 17:08:07 2012 (r239614) @@ -1,15 +1,15 @@ # $FreeBSD$ -CLANG_SRCS=${LLVM_SRCS}/tools/clang +CLANG_SRCS=${LLVM_SRCS}/tools/clang -CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ - -I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \ - -I${LLVM_SRCS}/../../lib/clang/include \ - -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \ - -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG +CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ + -I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \ + -I${LLVM_SRCS}/../../lib/clang/include \ + -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \ + -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG # LLVM is not strict aliasing safe as of 12/31/2011 -CFLAGS+= -fno-strict-aliasing +CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} @@ -19,23 +19,23 @@ CFLAGS+=-DLLVM_DEFAULT_TARGET_TRIPLE=\ -DLLVM_HOSTTRIPLE=\${BUILD_TRIPLE}\ .ifndef LLVM_REQUIRES_EH -CXXFLAGS+=-fno-exceptions +CXXFLAGS+= -fno-exceptions .else # If the library or program requires EH, it also requires RTTI. LLVM_REQUIRES_RTTI= .endif .ifndef LLVM_REQUIRES_RTTI -CXXFLAGS+=-fno-rtti +CXXFLAGS+= -fno-rtti .endif -CFLAGS+=-DDEFAULT_SYSROOT=\${TOOLS_PREFIX}\ +CFLAGS+= -DDEFAULT_SYSROOT=\${TOOLS_PREFIX}\ .PATH: ${LLVM_SRCS}/${SRCDIR} -TBLGEN?=tblgen -CLANG_TBLGEN?=clang-tblgen -TBLINC+=-I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target +TBLGEN?= tblgen +CLANG_TBLGEN?= clang-tblgen +TBLINC+= -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/Intrinsics.td ${TBLGEN} -I ${LLVM_SRCS}/lib/VMCore ${TBLINC} -gen-intrinsic \ Modified: head/lib/clang/clang.lib.mk == --- head/lib/clang/clang.lib.mk Thu Aug 23 17:03:33 2012(r239613) +++ head/lib/clang/clang.lib.mk Thu Aug 23 17:08:07 2012(r239614) @@ -1,6 +1,6 @@ # $FreeBSD$ -LLVM_SRCS=${.CURDIR}/../../../contrib/llvm +LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm .include clang.build.mk Modified: head/usr.bin/clang/clang.prog.mk == --- head/usr.bin/clang/clang.prog.mkThu Aug 23 17:03:33 2012 (r239613) +++ head/usr.bin/clang/clang.prog.mkThu Aug 23 17:08:07 2012 (r239614) @@ -1,14 +1,14 @@ # $FreeBSD$ -LLVM_SRCS=${.CURDIR}/../../../contrib/llvm +LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm .include ../../lib/clang/clang.build.mk .for lib in ${LIBDEPS} -DPADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a -LDADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a +DPADD+=${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a +LDADD+=${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a .endfor -BINDIR?=/usr/bin +BINDIR?= /usr/bin .include bsd.prog.mk ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239617 - head/sys/dev/usb/controller
Author: hselasky Date: Thu Aug 23 17:40:20 2012 New Revision: 239617 URL: http://svn.freebsd.org/changeset/base/239617 Log: Add tunable for XHCI port routing. MFC after:1 week Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Thu Aug 23 17:09:58 2012 (r239616) +++ head/sys/dev/usb/controller/xhci.c Thu Aug 23 17:40:20 2012 (r239617) @@ -84,14 +84,17 @@ __FBSDID($FreeBSD$); ((uint8_t *)(((struct xhci_softc *)0)-sc_bus #ifdef USB_DEBUG -static int xhcidebug = 0; +static int xhcidebug; +static int xhciroute; static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, USB XHCI); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW, xhcidebug, 0, Debug level); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW, +xhciroute, 0, Routing bitmap for switching EHCI ports to XHCI controller); TUNABLE_INT(hw.usb.xhci.debug, xhcidebug); - +TUNABLE_INT(hw.usb.xhci.xhci_port_route, xhciroute); #endif #defineXHCI_INTR_ENDPT 1 @@ -177,6 +180,16 @@ xhci_dump_device(struct xhci_softc *sc, } #endif +uint32_t +xhci_get_port_route(void) +{ +#ifdef USB_DEBUG + return (0xU ^ ((uint32_t)xhciroute)); +#else + return (0xU); +#endif +} + static void xhci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb) { Modified: head/sys/dev/usb/controller/xhci.h == --- head/sys/dev/usb/controller/xhci.h Thu Aug 23 17:09:58 2012 (r239616) +++ head/sys/dev/usb/controller/xhci.h Thu Aug 23 17:40:20 2012 (r239617) @@ -499,6 +499,7 @@ struct xhci_softc { /* prototypes */ +uint32_t xhci_get_port_route(void); usb_error_t xhci_halt_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t); usb_error_t xhci_start_controller(struct xhci_softc *); Modified: head/sys/dev/usb/controller/xhci_pci.c == --- head/sys/dev/usb/controller/xhci_pci.c Thu Aug 23 17:09:58 2012 (r239616) +++ head/sys/dev/usb/controller/xhci_pci.c Thu Aug 23 17:40:20 2012 (r239617) @@ -292,9 +292,9 @@ xhci_pci_take_controller(device_t self) /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ if (device_id == 0x1e318086 /* Panther Point */ || device_id == 0x8c318086 /* Lynx Point */) { - pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, 0x, 4); - pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, 0x, 4); + uint32_t temp = xhci_get_port_route(); + pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); + pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); } - return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r239214 - in head/sys: dev/usb dev/usb/controller sys
On Monday 20 August 2012 23:09:37 Ian Lepore wrote: On Mon, 2012-08-20 at 13:55 -0700, Adrian Chadd wrote: I have a report that AR71XX (MIPS) USB broke with this change. Thanks, Adrian Hi Ian, Have you figured out the root cause for this? --HPS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239618 - in head/contrib/jemalloc: . include/jemalloc
Author: dim Date: Thu Aug 23 17:58:22 2012 New Revision: 239618 URL: http://svn.freebsd.org/changeset/base/239618 Log: Since our clang now supports the tls_model attribute, remove the workaround for it in jemalloc_FreeBSD.h. Reviewed by: jasone Modified: head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/FREEBSD-diffs == --- head/contrib/jemalloc/FREEBSD-diffs Thu Aug 23 17:40:20 2012 (r239617) +++ head/contrib/jemalloc/FREEBSD-diffs Thu Aug 23 17:58:22 2012 (r239618) @@ -125,7 +125,7 @@ new file mode 100644 index 000..9efab93 --- /dev/null +++ b/include/jemalloc/jemalloc_FreeBSD.h -@@ -0,0 +1,80 @@ +@@ -0,0 +1,76 @@ +/* + * Override settings that were generated in jemalloc_defs.h as necessary. + */ @@ -184,10 +184,6 @@ index 000..9efab93 +#ifndef JEMALLOC_TLS_MODEL +# define JEMALLOC_TLS_MODEL /* Default. */ +#endif -+#ifdef __clang__ -+# undef JEMALLOC_TLS_MODEL -+# define JEMALLOC_TLS_MODEL /* clang does not support tls_model yet. */ -+#endif + +#define STATIC_PAGE_SHIFT PAGE_SHIFT +#define LG_SIZEOF_INT 2 Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h == --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Thu Aug 23 17:40:20 2012(r239617) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Thu Aug 23 17:58:22 2012(r239618) @@ -56,10 +56,6 @@ #ifndef JEMALLOC_TLS_MODEL # define JEMALLOC_TLS_MODEL /* Default. */ #endif -#ifdef __clang__ -# undef JEMALLOC_TLS_MODEL -# define JEMALLOC_TLS_MODEL /* clang does not support tls_model yet. */ -#endif #defineSTATIC_PAGE_SHIFT PAGE_SHIFT #defineLG_SIZEOF_INT 2 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239619 - head/contrib/llvm/tools/clang/lib/Sema
Author: dim Date: Thu Aug 23 18:14:59 2012 New Revision: 239619 URL: http://svn.freebsd.org/changeset/base/239619 Log: Pull in r162360 from upstream clang trunk: Merge existing attributes before processing pragmas in friend template declarations. Fixes pr13662. This should help when building Firefox with libc++. Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp == --- head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp Thu Aug 23 17:58:22 2012(r239618) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp Thu Aug 23 18:14:59 2012(r239619) @@ -1104,6 +1104,9 @@ Sema::CheckClassTemplate(Scope *S, unsig if (Attr) ProcessDeclAttributeList(S, NewClass, Attr); + if (PrevClassTemplate) +mergeDeclAttributes(NewClass, PrevClassTemplate-getTemplatedDecl()); + AddPushedVisibilityAttribute(NewClass); if (TUK != TUK_Friend) @@ -1138,8 +1141,6 @@ Sema::CheckClassTemplate(Scope *S, unsig NewTemplate-setInvalidDecl(); NewClass-setInvalidDecl(); } - if (PrevClassTemplate) -mergeDeclAttributes(NewClass, PrevClassTemplate-getTemplatedDecl()); ActOnDocumentableDecl(NewTemplate); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239620 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/f...
Author: mm Date: Thu Aug 23 19:32:57 2012 New Revision: 239620 URL: http://svn.freebsd.org/changeset/base/239620 Log: Merge recent vendor changes: 3086 unnecessarily setting DS_FLAG_INCONSISTENT on async destroyed datasets 3090 vdev_reopen() during reguid causes vdev to be treated as corrupt 3102 vdev_uberblock_load() and vdev_validate() may read the wrong label Referenes: https://www.illumos.org/issues/3086 https://www.illumos.org/issues/3090 https://www.illumos.org/issues/3102 PR: kern/170912, kern/170914 Obtained from:illumos (changeset #13776, #13777) MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c == --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 23 18:14:59 2012(r239619) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 23 19:32:57 2012(r239620) @@ -364,7 +364,7 @@ ztest_info_t ztest_info[] = { { ztest_spa_rename, 1, zopt_rarely}, { ztest_scrub, 1, zopt_rarely}, { ztest_dsl_dataset_promote_busy, 1, zopt_rarely}, - { ztest_vdev_attach_detach, 1, zopt_rarely }, + { ztest_vdev_attach_detach, 1, zopt_rarely}, { ztest_vdev_LUN_growth,1, zopt_rarely}, { ztest_vdev_add_remove,1, ztest_opts.zo_vdevtime }, @@ -415,6 +415,13 @@ static spa_t *ztest_spa = NULL; static ztest_ds_t *ztest_ds; static mutex_t ztest_vdev_lock; + +/* + * The ztest_name_lock protects the pool and dataset namespace used by + * the individual tests. To modify the namespace, consumers must grab + * this lock as writer. Grabbing the lock as reader will ensure that the + * namespace does not change while the lock is held. + */ static rwlock_t ztest_name_lock; static boolean_t ztest_dump_core = B_TRUE; @@ -2225,6 +2232,7 @@ ztest_zil_remount(ztest_ds_t *zd, uint64 { objset_t *os = zd-zd_os; + VERIFY(mutex_lock(zd-zd_dirobj_lock) == 0); (void) rw_wrlock(zd-zd_zilog_lock); /* zfsvfs_teardown() */ @@ -2235,6 +2243,7 @@ ztest_zil_remount(ztest_ds_t *zd, uint64 zil_replay(os, zd, ztest_replay_vector); (void) rw_unlock(zd-zd_zilog_lock); + VERIFY(mutex_unlock(zd-zd_dirobj_lock) == 0); } /* @@ -4860,10 +4869,16 @@ ztest_reguid(ztest_ds_t *zd, uint64_t id { spa_t *spa = ztest_spa; uint64_t orig, load; + int error; orig = spa_guid(spa); load = spa_load_guid(spa); - if (spa_change_guid(spa) != 0) + + (void) rw_wrlock(ztest_name_lock); + error = spa_change_guid(spa); + (void) rw_unlock(ztest_name_lock); + + if (error != 0) return; if (ztest_opts.zo_verbose = 3) { @@ -5540,8 +,15 @@ ztest_freeze(void) */ kernel_init(FREAD | FWRITE); VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, spa, FTAG)); + ASSERT(spa_freeze_txg(spa) == UINT64_MAX); VERIFY3U(0, ==, ztest_dataset_open(0)); ztest_dataset_close(0); + + spa-spa_debug = B_TRUE; + ztest_spa = spa; + txg_wait_synced(spa_get_dsl(spa), 0); + ztest_reguid(NULL, 0); + spa_close(spa, FTAG); kernel_fini(); } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
svn commit: r239621 - head/usr.sbin/jail
Author: jamie Date: Thu Aug 23 19:39:23 2012 New Revision: 239621 URL: http://svn.freebsd.org/changeset/base/239621 Log: Partially roll back r239601 - keep parameter strings both length-delimited and null-terminated at the same time, because they're later passed to libjail as null-terminated. That means I also need to add a nul byte when comma-combining array parameters. MFC after:6 days Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c == --- head/usr.sbin/jail/config.c Thu Aug 23 19:32:57 2012(r239620) +++ head/usr.sbin/jail/config.c Thu Aug 23 19:39:23 2012(r239621) @@ -597,6 +597,7 @@ check_intparams(struct cfjail *j) ip4.addr: bad netmask \%s\, cs); error = -1; } + *cs = '\0'; s-len = cs - s-s; } } @@ -620,6 +621,7 @@ check_intparams(struct cfjail *j) cs); error = -1; } + *cs = '\0'; s-len = cs - s-s; } } @@ -713,11 +715,10 @@ import_params(struct cfjail *j) cs = value; TAILQ_FOREACH_SAFE(s, p-val, tq, ts) { memcpy(cs, s-s, s-len); - if (ts != NULL) { - cs += s-len + 1; - cs[-1] = ','; - } + cs += s-len + 1; + cs[-1] = ','; } + value[vallen - 1] = '\0'; } if (jailparam_import(jp, value) 0) { error = -1; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239622 - head/contrib/libarchive/tar
Author: mm Date: Thu Aug 23 19:40:28 2012 New Revision: 239622 URL: http://svn.freebsd.org/changeset/base/239622 Log: Apply fix for vendor pull request #17: Support appending to empty archives References: https://github.com/libarchive/libarchive/pull/17 Submitted by: myself Obtained from:libarchive master branch on github Modified: head/contrib/libarchive/tar/write.c Modified: head/contrib/libarchive/tar/write.c == --- head/contrib/libarchive/tar/write.c Thu Aug 23 19:39:23 2012 (r239621) +++ head/contrib/libarchive/tar/write.c Thu Aug 23 19:40:28 2012 (r239622) @@ -235,6 +235,7 @@ tar_mode_r(struct bsdtar *bsdtar) a = archive_read_new(); archive_read_support_filter_all(a); + archive_read_support_format_empty(a); archive_read_support_format_tar(a); archive_read_support_format_gnutar(a); r = archive_read_open_fd(a, bsdtar-fd, 10240); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r239568 - head/etc/rc.d
On 8/22/2012 3:25 PM, David O'Brien wrote: On Wed, Aug 22, 2012 at 02:37:37PM -0700, Doug Barton wrote: Were these changes discussed somewhere and I missed it? They were not discussed. I did not see the need. This is simple functionality. If securelevel is raised 0, one cannot start up a firewall nor make major changes to time. Thus these components are required to be done before raising securelevel. I'm not opposed per se, but the security aspects should be discussed on freebsd-security@, I'm sorry, I didn't feel that ensuring the software follows the published specification of its functionality to have such a security aspect. and it's preferable that significant changes to rcorder be looked at on freebsd-rc@ as well. I don't consider this to be a significant change. I do have some significant changes that I do want freebsd-rc@ to review I will be sending soon. Can you hold off on MFC'ing any of this until it's been reviewed more thoroughly? Yes. Thanks. Just to reiterate, I'm not saying that either your changes or your methodology were wrong ... I personally would just like a little time to review them before we move forward. Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239623 - head/sys/arm/at91
Author: imp Date: Thu Aug 23 21:31:52 2012 New Revision: 239623 URL: http://svn.freebsd.org/changeset/base/239623 Log: Use proper resource type when freeing. Submitted by: Ian Lapore (indirectly in a larger patch) Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c == --- head/sys/arm/at91/at91_mci.cThu Aug 23 19:40:28 2012 (r239622) +++ head/sys/arm/at91/at91_mci.cThu Aug 23 21:31:52 2012 (r239623) @@ -299,7 +299,7 @@ at91_mci_deactivate(device_t dev) sc-intrhand = 0; bus_generic_detach(sc-dev); if (sc-mem_res) - bus_release_resource(dev, SYS_RES_IOPORT, + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc-mem_res), sc-mem_res); sc-mem_res = 0; if (sc-irq_res) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239624 - head/sys/kern
Author: np Date: Thu Aug 23 21:32:02 2012 New Revision: 239624 URL: http://svn.freebsd.org/changeset/base/239624 Log: Allow nmbjumbop, nmbjumbo9, and nmbjumbo16 to be set directly via loader tunables. MFC after:1 month Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c == --- head/sys/kern/kern_mbuf.c Thu Aug 23 21:31:52 2012(r239623) +++ head/sys/kern/kern_mbuf.c Thu Aug 23 21:32:02 2012(r239624) @@ -110,14 +110,23 @@ struct mbstat mbstat; static void tunable_mbinit(void *dummy) { - TUNABLE_INT_FETCH(kern.ipc.nmbclusters, nmbclusters); /* This has to be done before VM init. */ + TUNABLE_INT_FETCH(kern.ipc.nmbclusters, nmbclusters); if (nmbclusters == 0) nmbclusters = 1024 + maxusers * 64; - nmbjumbop = nmbclusters / 2; - nmbjumbo9 = nmbjumbop / 2; - nmbjumbo16 = nmbjumbo9 / 2; + + TUNABLE_INT_FETCH(kern.ipc.nmbjumbop, nmbjumbop); + if (nmbjumbop == 0) + nmbjumbop = nmbclusters / 2; + + TUNABLE_INT_FETCH(kern.ipc.nmbjumbo9, nmbjumbo9); + if (nmbjumbo9 == 0) + nmbjumbo9 = nmbclusters / 4; + + TUNABLE_INT_FETCH(kern.ipc.nmbjumbo16, nmbjumbo16); + if (nmbjumbo16 == 0) + nmbjumbo16 = nmbclusters / 8; } SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239625 - head/sys/mips/conf
Author: ray Date: Thu Aug 23 22:23:56 2012 New Revision: 239625 URL: http://svn.freebsd.org/changeset/base/239625 Log: Remove duplicated GEOM_PART_* options. PR: 170931 Approved by: adrian Modified: head/sys/mips/conf/AP93 head/sys/mips/conf/AP96 head/sys/mips/conf/PB47 head/sys/mips/conf/PB92 head/sys/mips/conf/ROUTERSTATION head/sys/mips/conf/RSPRO head/sys/mips/conf/RSPRO_STANDALONE head/sys/mips/conf/TP-WN1043ND Modified: head/sys/mips/conf/AP93 == --- head/sys/mips/conf/AP93 Thu Aug 23 21:32:02 2012(r239624) +++ head/sys/mips/conf/AP93 Thu Aug 23 22:23:56 2012(r239625) @@ -108,8 +108,6 @@ options USB_HOST_ALIGN=32 #deviceda # Read MSDOS formatted disks -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR #options MSDOSFS # GPIO Bus Modified: head/sys/mips/conf/AP96 == --- head/sys/mips/conf/AP96 Thu Aug 23 21:32:02 2012(r239624) +++ head/sys/mips/conf/AP96 Thu Aug 23 22:23:56 2012(r239625) @@ -22,8 +22,6 @@ options AR71XX_REALMEM=64*1024*1024 optionsAR71XX_ENV_UBOOT # For DOS - enable if required -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR optionsMSDOSFS # uncompress - to boot read-only lzma natively from flash Modified: head/sys/mips/conf/PB47 == --- head/sys/mips/conf/PB47 Thu Aug 23 21:32:02 2012(r239624) +++ head/sys/mips/conf/PB47 Thu Aug 23 22:23:56 2012(r239625) @@ -27,8 +27,6 @@ options AR71XX_ENV_UBOOT optionsAR71XX_REALMEM=64*1024*1024 # For DOS - enable if required -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR optionsMSDOSFS # uncompress - to boot read-only lzma natively from flash Modified: head/sys/mips/conf/PB92 == --- head/sys/mips/conf/PB92 Thu Aug 23 21:32:02 2012(r239624) +++ head/sys/mips/conf/PB92 Thu Aug 23 22:23:56 2012(r239625) @@ -106,8 +106,6 @@ options USB_HOST_ALIGN=32 #deviceda # Read MSDOS formatted disks -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR # options MSDOSFS # GPIO Bus Modified: head/sys/mips/conf/ROUTERSTATION == --- head/sys/mips/conf/ROUTERSTATIONThu Aug 23 21:32:02 2012 (r239624) +++ head/sys/mips/conf/ROUTERSTATIONThu Aug 23 22:23:56 2012 (r239625) @@ -16,8 +16,6 @@ devicegeom_uzip # compressed in-memory optionsGEOM_UZIP # For DOS -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR optionsMSDOSFS # Boot path - redboot MFS Modified: head/sys/mips/conf/RSPRO == --- head/sys/mips/conf/RSPROThu Aug 23 21:32:02 2012(r239624) +++ head/sys/mips/conf/RSPROThu Aug 23 22:23:56 2012(r239625) @@ -17,8 +17,6 @@ devicegeom_uzip # compressed in-memory optionsGEOM_UZIP # For DOS -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR optionsMSDOSFS # For etherswitch support Modified: head/sys/mips/conf/RSPRO_STANDALONE == --- head/sys/mips/conf/RSPRO_STANDALONE Thu Aug 23 21:32:02 2012 (r239624) +++ head/sys/mips/conf/RSPRO_STANDALONE Thu Aug 23 22:23:56 2012 (r239625) @@ -18,8 +18,6 @@ devicegeom_uzip # compressed in-memory optionsGEOM_UZIP # For DOS -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR optionsMSDOSFS # .. first DOS-partitioned, BSD sliced flash disk Modified: head/sys/mips/conf/TP-WN1043ND == --- head/sys/mips/conf/TP-WN1043ND Thu Aug 23 21:32:02 2012 (r239624) +++ head/sys/mips/conf/TP-WN1043ND Thu Aug 23 22:23:56 2012 (r239625) @@ -29,8 +29,6 @@ devicertl8366rb # read MSDOS formatted disks - USB optionsMSDOSFS -optionsGEOM_PART_BSD -optionsGEOM_PART_MBR # Enable the uboot environment stuff rather then the # redboot stuff. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to
svn commit: r239626 - in head/sys: arm/at91 dev/spibus
Author: imp Date: Thu Aug 23 22:38:37 2012 New Revision: 239626 URL: http://svn.freebsd.org/changeset/base/239626 Log: Fetch the chip select in the bridge driver, like all the other spi bridges do. Modified: head/sys/arm/at91/at91_spi.c head/sys/dev/spibus/spi.h head/sys/dev/spibus/spibus.c Modified: head/sys/arm/at91/at91_spi.c == --- head/sys/arm/at91/at91_spi.cThu Aug 23 22:23:56 2012 (r239625) +++ head/sys/arm/at91/at91_spi.cThu Aug 23 22:38:37 2012 (r239626) @@ -47,6 +47,7 @@ __FBSDID($FreeBSD$); #include arm/at91/at91_pdcreg.h #include dev/spibus/spi.h +#include dev/spibus/spibusvar.h #include spibus_if.h @@ -270,13 +271,16 @@ at91_spi_transfer(device_t dev, device_t { struct at91_spi_softc *sc; bus_addr_t addr; - int err, i, j, mode[4]; + int err, i, j, mode[4], cs; KASSERT(cmd-tx_cmd_sz == cmd-rx_cmd_sz, (%s: TX/RX command sizes should be equal, __func__)); KASSERT(cmd-tx_data_sz == cmd-rx_data_sz, (%s: TX/RX data sizes should be equal, __func__)); + /* get the proper chip select */ + spibus_get_cs(child, cs); + sc = device_get_softc(dev); i = 0; @@ -291,9 +295,9 @@ at91_spi_transfer(device_t dev, device_t * PSCDEC = 0 has a range of 0..3 for chip select. We * don't support PSCDEC = 1 which has a range of 0..15. */ - if (cmd-cs 0 || cmd-cs 3) { + if (cs 0 || cs 3) { device_printf(dev, - Invalid chip select %d requested by %s\n, cmd-cs, + Invalid chip select %d requested by %s\n, cs, device_get_nameunit(child)); err = EINVAL; goto out; @@ -304,7 +308,7 @@ at91_spi_transfer(device_t dev, device_t * The AT91RM9200 couldn't do CS high for CS 0. Other chips can, but we * don't support that yet, or other spi modes. */ - if (at91_is_rm92() cmd-cs == 0 + if (at91_is_rm92() cs == 0 (cmd-flags SPI_CHIP_SELECT_HIGH) != 0) { device_printf(dev, Invalid chip select high requested by %s for cs 0.\n, @@ -313,7 +317,7 @@ at91_spi_transfer(device_t dev, device_t goto out; } #endif - err = (RD4(sc, SPI_MR) ~0x000f) | CS_TO_MR(cmd-cs); + err = (RD4(sc, SPI_MR) ~0x000f) | CS_TO_MR(cs); WR4(sc, SPI_MR, err); /* Modified: head/sys/dev/spibus/spi.h == --- head/sys/dev/spibus/spi.h Thu Aug 23 22:23:56 2012(r239625) +++ head/sys/dev/spibus/spi.h Thu Aug 23 22:38:37 2012(r239626) @@ -1,7 +1,6 @@ /* $FreeBSD$ */ struct spi_command { - int cs; void*tx_cmd; uint32_t tx_cmd_sz; void*rx_cmd; Modified: head/sys/dev/spibus/spibus.c == --- head/sys/dev/spibus/spibus.cThu Aug 23 22:23:56 2012 (r239625) +++ head/sys/dev/spibus/spibus.cThu Aug 23 22:38:37 2012 (r239626) @@ -158,9 +158,6 @@ spibus_hinted_child(device_t bus, const static int spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd) { - /* Maybe set flags too? spi mode? */ - spibus_get_cs(dev, cmd-cs); - return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239627 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:09:49 2012 New Revision: 239627 URL: http://svn.freebsd.org/changeset/base/239627 Log: Add some new flags: * mfp support; * 4.9ghz support in the HAL; * device type - specifically, the bus type and whether it's a HB63 NIC (which requires some subtle chainmask handling differences in the AR5416 HAL.) Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Thu Aug 23 22:38:37 2012 (r239626) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Aug 24 00:09:49 2012 (r239627) @@ -228,7 +228,8 @@ typedef struct { halEnhancedDmaSupport : 1; uint32_thalIsrRacSupport: 1, halApmEnable: 1, - halIntrMitigation : 1; + halIntrMitigation : 1, + hal49GhzSupport : 1; uint32_thalWirelessModes; uint16_thalTotalQueues; @@ -245,7 +246,7 @@ typedef struct { uint32_thalIntrMask; uint8_t halTxStreams; uint8_t halRxStreams; - + HAL_MFP_OPT_T halMfpSupport; int halNumTxMaps; int halTxDescLen; int halTxStatusLen; @@ -258,6 +259,12 @@ typedef struct { struct regDomain; /* + * Definitions for ah_flags in ath_hal_private + */ +#defineAH_USE_EEPROM 0x1 +#defineAH_IS_HB63 0x2 + +/* * The ``private area'' follows immediately after the ``public area'' * in the data structure returned by ath_hal_attach. Private data are * used by device-independent code such as the regulatory domain support. @@ -316,7 +323,9 @@ struct ath_hal_private { uint16_tah_phyRev; /* PHY revision */ uint16_tah_analog5GhzRev; /* 2GHz radio revision */ uint16_tah_analog2GhzRev; /* 5GHz radio revision */ + uint32_tah_flags; /* misc flags */ uint8_t ah_ispcie; /* PCIE, special treatment */ + uint8_t ah_devType; /* card type - CB, PCI, PCIe */ HAL_OPMODE ah_opmode; /* operating mode from reset */ const struct ieee80211_channel *ah_curchan;/* operating channel */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239628 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:15:26 2012 New Revision: 239628 URL: http://svn.freebsd.org/changeset/base/239628 Log: Wrap this a little so it's slightly easier on the eyes. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Fri Aug 24 00:09:49 2012 (r239627) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Aug 24 00:15:26 2012 (r239628) @@ -514,7 +514,8 @@ isBigEndian(void) /* Analog register writes may require a delay between each one (eg Merlin?) */ #defineOS_A_REG_RMW_FIELD(_a, _r, _f, _v) \ - do { OS_REG_WRITE(_a, _r, (OS_REG_READ(_a, _r) ~ (_f)) | (((_v) _f##_S) (_f))) ; OS_DELAY(100); } while (0) + do { OS_REG_WRITE(_a, _r, (OS_REG_READ(_a, _r) ~ (_f)) | \ + (((_v) _f##_S) (_f))) ; OS_DELAY(100); } while (0) #defineOS_A_REG_WRITE(_a, _r, _v) \ do { OS_REG_WRITE(_a, _r, _v); OS_DELAY(100); } while (0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239629 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:17:39 2012 New Revision: 239629 URL: http://svn.freebsd.org/changeset/base/239629 Log: Add some more diagnostic codes. Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah_diagcodes.h Modified: head/sys/dev/ath/ath_hal/ah_diagcodes.h == --- head/sys/dev/ath/ath_hal/ah_diagcodes.h Fri Aug 24 00:15:26 2012 (r239628) +++ head/sys/dev/ath/ath_hal/ah_diagcodes.h Fri Aug 24 00:17:39 2012 (r239629) @@ -63,6 +63,10 @@ enum { HAL_DIAG_CHECK_HANGS= 32, /* check h/w hangs */ HAL_DIAG_SETREGS= 33, /* write registers */ HAL_DIAG_CHANSURVEY = 34, /* channel survey */ + HAL_DIAG_PRINT_REG = 35, + HAL_DIAG_PRINT_REG_ALL = 36, + HAL_DIAG_CHANNELS = 37, + HAL_DIAG_PRINT_REG_COUNTER = 38, }; #endif /* _ATH_AH_DIAGCODES_H_ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239630 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:33:25 2012 New Revision: 239630 URL: http://svn.freebsd.org/changeset/base/239630 Log: Add the MFP capability to ath_hal_getcapability(). Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Fri Aug 24 00:17:39 2012 (r239629) +++ head/sys/dev/ath/ath_hal/ah.c Fri Aug 24 00:33:25 2012 (r239630) @@ -718,7 +718,9 @@ ath_hal_getcapability(struct ath_hal *ah return pCap-halHasBBReadWar? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_SERIALISE_WAR: /* PCI register serialisation */ return pCap-halSerialiseRegWar ? HAL_OK : HAL_ENOTSUPP; - + case HAL_CAP_MFP: /* Management frame protection setting */ + *result = pCap-halMfpSupport; + return HAL_OK; default: return HAL_EINVAL; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239631 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:36:47 2012 New Revision: 239631 URL: http://svn.freebsd.org/changeset/base/239631 Log: Add some more capabilities (unused at the present.) Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:33:25 2012 (r239630) +++ head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:36:47 2012 (r239631) @@ -163,8 +163,24 @@ typedef enum { HAL_CAP_HT20_SGI= 96, /* hardware supports HT20 short GI */ + HAL_CAP_LDPC= 99, + HAL_CAP_RXTSTAMP_PREC = 100, /* rx desc tstamp precision (bits) */ + + HAL_CAP_PHYRESTART_CLR_WAR = 106, /* in some cases, clear phy restart to fix bb hang */ + HAL_CAP_ENTERPRISE_MODE = 107, /* Enterprise mode features */ + HAL_CAP_LDPCWAR = 108, + HAL_CAP_CHANNEL_SWITCH_TIME_USEC= 109, /* Channel change time, usec */ + HAL_CAP_ENABLE_APM = 110, /* APM enabled */ + HAL_CAP_PCIE_LCR_EXTSYNC_EN = 111, + HAL_CAP_PCIE_LCR_OFFSET = 112, + HAL_CAP_ENHANCED_DFS_SUPPORT= 117, /* hardware supports enhanced DFS */ + HAL_CAP_MCI = 118, + HAL_CAP_SMARTANTENNA= 119, + HAL_CAP_TRAFFIC_FAST_RECOVER= 120, + HAL_CAP_TX_DIVERSITY= 121, + HAL_CAP_CRDC= 122, /* The following are private to the FreeBSD HAL (224 onward) */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239632 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:40:01 2012 New Revision: 239632 URL: http://svn.freebsd.org/changeset/base/239632 Log: Oops, fix copy/paste silliness. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:36:47 2012 (r239631) +++ head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:40:01 2012 (r239632) @@ -176,11 +176,11 @@ typedef enum { HAL_CAP_PCIE_LCR_OFFSET = 112, HAL_CAP_ENHANCED_DFS_SUPPORT= 117, /* hardware supports enhanced DFS */ - HAL_CAP_MCI = 118, - HAL_CAP_SMARTANTENNA= 119, - HAL_CAP_TRAFFIC_FAST_RECOVER= 120, - HAL_CAP_TX_DIVERSITY= 121, - HAL_CAP_CRDC= 122, + HAL_CAP_MCI = 118, + HAL_CAP_SMARTANTENNA= 119, + HAL_CAP_TRAFFIC_FAST_RECOVER= 120, + HAL_CAP_TX_DIVERSITY= 121, + HAL_CAP_CRDC= 122, /* The following are private to the FreeBSD HAL (224 onward) */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239633 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:43:10 2012 New Revision: 239633 URL: http://svn.freebsd.org/changeset/base/239633 Log: Add rfkill HAL accessor methods. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Fri Aug 24 00:40:01 2012 (r239632) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Aug 24 00:43:10 2012 (r239633) @@ -393,6 +393,13 @@ struct ath_hal_private { #defineath_hal_setInterrupts(_ah, _mask) \ (_ah)-ah_setInterrupts(_ah, _mask) +#define ath_hal_isrfkillenabled(_ah) \ +(ath_hal_getcapability(_ah, HAL_CAP_RFSILENT, 1, AH_NULL) == HAL_OK) +#define ath_hal_enable_rfkill(_ah, _v) \ +ath_hal_setcapability(_ah, HAL_CAP_RFSILENT, 1, _v, AH_NULL) +#define ath_hal_hasrfkill_int(_ah) \ +(ath_hal_getcapability(_ah, HAL_CAP_RFSILENT, 3, AH_NULL) == HAL_OK) + #defineath_hal_eepromDetach(_ah) do { \ if (AH_PRIVATE(_ah)-ah_eepromDetach != AH_NULL)\ AH_PRIVATE(_ah)-ah_eepromDetach(_ah); \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239634 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:52:37 2012 New Revision: 239634 URL: http://svn.freebsd.org/changeset/base/239634 Log: Add ath_hal_get_curmode() - this is used by the Osprey HAL. Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Fri Aug 24 00:43:10 2012 (r239633) +++ head/sys/dev/ath/ath_hal/ah.c Fri Aug 24 00:52:37 2012 (r239634) @@ -420,6 +420,50 @@ ath_hal_computetxtime(struct ath_hal *ah return txTime; } +int +ath_hal_get_curmode(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ + /* +* Pick a default mode at bootup. A channel change is inevitable. +*/ + if (!chan) + return HAL_MODE_11NG_HT20; + + if (IEEE80211_IS_CHAN_TURBO(chan)) + return HAL_MODE_TURBO; + + /* check for NA_HT before plain A, since IS_CHAN_A includes NA_HT */ + if (IEEE80211_IS_CHAN_5GHZ(chan) IEEE80211_IS_CHAN_HT20(chan)) + return HAL_MODE_11NA_HT20; + if (IEEE80211_IS_CHAN_5GHZ(chan) IEEE80211_IS_CHAN_HT40U(chan)) + return HAL_MODE_11NA_HT40PLUS; + if (IEEE80211_IS_CHAN_5GHZ(chan) IEEE80211_IS_CHAN_HT40D(chan)) + return HAL_MODE_11NA_HT40MINUS; + if (IEEE80211_IS_CHAN_A(chan)) + return HAL_MODE_11A; + + /* check for NG_HT before plain G, since IS_CHAN_G includes NG_HT */ + if (IEEE80211_IS_CHAN_2GHZ(chan) IEEE80211_IS_CHAN_HT20(chan)) + return HAL_MODE_11NG_HT20; + if (IEEE80211_IS_CHAN_2GHZ(chan) IEEE80211_IS_CHAN_HT40U(chan)) + return HAL_MODE_11NG_HT40PLUS; + if (IEEE80211_IS_CHAN_2GHZ(chan) IEEE80211_IS_CHAN_HT40D(chan)) + return HAL_MODE_11NG_HT40MINUS; + + /* +* XXX For FreeBSD, will this work correctly given the DYN +* chan mode (OFDM+CCK dynamic) ? We have pure-G versions DYN-BG.. +*/ + if (IEEE80211_IS_CHAN_G(chan)) + return HAL_MODE_11G; + if (IEEE80211_IS_CHAN_B(chan)) + return HAL_MODE_11B; + + HALASSERT(0); + return HAL_MODE_11NG_HT20; +} + + typedef enum { WIRELESS_MODE_11a = 0, WIRELESS_MODE_TURBO = 1, Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:43:10 2012 (r239633) +++ head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:52:37 2012 (r239634) @@ -1390,6 +1390,12 @@ extern void __ahdecl ath_hal_process_noi extern u_int __ahdecl ath_hal_getwirelessmodes(struct ath_hal*); /* + * Get the HAL wireless mode for the given channel. + */ +extern int ath_hal_get_curmode(struct ath_hal *ah, +const struct ieee80211_channel *chan); + +/* * Calculate the packet TX time for a legacy or 11n frame */ extern uint32_t __ahdecl ath_hal_pkt_txtime(struct ath_hal *ah, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239635 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 00:54:31 2012 New Revision: 239635 URL: http://svn.freebsd.org/changeset/base/239635 Log: Oops, another copy/paste issue. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:52:37 2012 (r239634) +++ head/sys/dev/ath/ath_hal/ah.h Fri Aug 24 00:54:31 2012 (r239635) @@ -1392,7 +1392,7 @@ externu_int __ahdecl ath_hal_getwireles /* * Get the HAL wireless mode for the given channel. */ -extern int ath_hal_get_curmode(struct ath_hal *ah, +extern int ath_hal_get_curmode(struct ath_hal *ah, const struct ieee80211_channel *chan); /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r239637 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Aug 24 01:14:00 2012 New Revision: 239637 URL: http://svn.freebsd.org/changeset/base/239637 Log: Bring over some new EEPROM regulatory domain flags. Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah_eeprom.h Modified: head/sys/dev/ath/ath_hal/ah_eeprom.h == --- head/sys/dev/ath/ath_hal/ah_eeprom.hFri Aug 24 01:12:07 2012 (r239636) +++ head/sys/dev/ath/ath_hal/ah_eeprom.hFri Aug 24 01:14:00 2012 (r239637) @@ -105,6 +105,10 @@ enum { AR_EEP_TEMPSENSE_SLOPE, /* int8_t* */ AR_EEP_TEMPSENSE_SLOPE_PAL_ON, /* int8_t* */ AR_EEP_FRAC_N_5G, /* uint8_t* */ + + /* New fields for AR9300 and later */ + AR_EEP_DRIVE_STRENGTH, + AR_EEP_PAPRD_ENABLED, }; typedef struct { @@ -127,6 +131,30 @@ typedef struct { #defineCTL_2GHT40 7 #defineCTL_5GHT40 8 +/* XXX must match what FCC/MKK/ETSI are defined as in ah_regdomain.h */ +#defineHAL_REG_DMN_MASK0xf0 +#defineHAL_REGDMN_FCC 0x10 +#defineHAL_REGDMN_MKK 0x40 +#defineHAL_REGDMN_ETSI 0x30 + +#defineis_reg_dmn_fcc(reg_dmn) \ + (((reg_dmn HAL_REG_DMN_MASK) == HAL_REGDMN_FCC) ? 1 : 0) +#defineis_reg_dmn_etsi(reg_dmn)\ + (((reg_dmn HAL_REG_DMN_MASK) == HAL_REGDMN_ETSI) ? 1 : 0) +#defineis_reg_dmn_mkk(reg_dmn) \ + (((reg_dmn HAL_REG_DMN_MASK) == HAL_REGDMN_MKK) ? 1 : 0) + +#defineAR_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040 +#defineAR_EEPROM_EEREGCAP_EN_KK_U1_EVEN0x0080 +#defineAR_EEPROM_EEREGCAP_EN_KK_U2 0x0100 +#defineAR_EEPROM_EEREGCAP_EN_KK_MIDBAND0x0200 +#defineAR_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400 +#defineAR_EEPROM_EEREGCAP_EN_KK_NEW_11A0x0800 + +/* regulatory capabilities prior to eeprom version 4.0 */ +#defineAR_EEPROM_EEREGCAP_EN_KK_U1_ODD_PRE4_0 0x4000 +#defineAR_EEPROM_EEREGCAP_EN_KK_NEW_11A_PRE4_0 0x8000 + #defineAR_NO_SPUR 0x8000 /* XXX exposed to chip code */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org