svn commit: r195183 - in projects/clangbsd: .
cddl/contrib/opensolaris contrib/llvm
contrib/llvm/lib/Support contrib/llvm/tools/clang lib/libusb
release release/amd64 release/i386 release/ia64 rele...
Ed Schouten
ed at FreeBSD.org
Tue Jun 30 09:14:11 UTC 2009
Author: ed
Date: Tue Jun 30 09:14:09 2009
New Revision: 195183
URL: http://svn.freebsd.org/changeset/base/195183
Log:
Integrate newer FreeBSD sources. Also revert local Clang hack.
Reported by: Howard Su <howard0su gmail com>
Modified:
projects/clangbsd/ (props changed)
projects/clangbsd/UPDATING
projects/clangbsd/cddl/contrib/opensolaris/ (props changed)
projects/clangbsd/contrib/llvm/ (props changed)
projects/clangbsd/contrib/llvm/lib/Support/Timer.cpp
projects/clangbsd/contrib/llvm/tools/clang/ (props changed)
projects/clangbsd/lib/libusb/ (props changed)
projects/clangbsd/lib/libusb/libusb20.3 (props changed)
projects/clangbsd/release/Makefile
projects/clangbsd/release/amd64/boot_crunch.conf
projects/clangbsd/release/i386/boot_crunch.conf
projects/clangbsd/release/ia64/boot_crunch.conf
projects/clangbsd/release/pc98/boot_crunch.conf
projects/clangbsd/release/powerpc/boot_crunch.conf
projects/clangbsd/release/scripts/package-split.py
projects/clangbsd/release/sparc64/boot_crunch.conf
projects/clangbsd/release/sun4v/boot_crunch.conf
projects/clangbsd/sys/amd64/amd64/sys_machdep.c
projects/clangbsd/sys/cddl/contrib/opensolaris/ (props changed)
projects/clangbsd/sys/compat/freebsd32/freebsd32_misc.c
projects/clangbsd/sys/compat/linux/linux_signal.c
projects/clangbsd/sys/dev/ale/if_ale.c
projects/clangbsd/sys/dev/ath/ath_hal/ah.c
projects/clangbsd/sys/dev/ath/ath_hal/ah.h
projects/clangbsd/sys/dev/ath/ath_hal/ah_internal.h
projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
projects/clangbsd/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
projects/clangbsd/sys/dev/ath/if_athvar.h
projects/clangbsd/sys/dev/sound/usb/uaudio.c
projects/clangbsd/sys/dev/usb/controller/at91dci.c
projects/clangbsd/sys/dev/usb/controller/atmegadci.c
projects/clangbsd/sys/dev/usb/controller/avr32dci.c
projects/clangbsd/sys/dev/usb/controller/musb_otg.c
projects/clangbsd/sys/dev/usb/controller/uss820dci.c
projects/clangbsd/sys/dev/usb/net/if_cdce.c
projects/clangbsd/sys/dev/usb/serial/usb_serial.c
projects/clangbsd/sys/dev/usb/storage/ustorage_fs.c
projects/clangbsd/sys/dev/usb/usb_controller.h
projects/clangbsd/sys/dev/usb/usb_device.c
projects/clangbsd/sys/dev/usb/usb_handle_request.c
projects/clangbsd/sys/dev/usb/usb_if.m
projects/clangbsd/sys/dev/usb/usb_transfer.c
projects/clangbsd/sys/dev/usb/usbdi.h
projects/clangbsd/sys/dev/usb/wlan/if_urtw.c
projects/clangbsd/sys/dev/xen/netfront/ (props changed)
projects/clangbsd/sys/dev/xen/xenpci/ (props changed)
projects/clangbsd/sys/i386/i386/sys_machdep.c
projects/clangbsd/sys/kern/kern_descrip.c
projects/clangbsd/sys/kern/kern_event.c
projects/clangbsd/sys/kern/kern_exec.c
projects/clangbsd/sys/kern/kern_exit.c
projects/clangbsd/sys/kern/kern_fork.c
projects/clangbsd/sys/kern/kern_prot.c
projects/clangbsd/sys/kern/kern_sig.c
projects/clangbsd/sys/kern/kern_thr.c
projects/clangbsd/sys/kern/sys_generic.c
projects/clangbsd/sys/kern/sys_process.c
projects/clangbsd/sys/kern/sys_socket.c
projects/clangbsd/sys/kern/tty.c
projects/clangbsd/sys/kern/vfs_cluster.c
projects/clangbsd/sys/kern/vfs_extattr.c
projects/clangbsd/sys/kern/vfs_lookup.c
projects/clangbsd/sys/kern/vfs_mount.c
projects/clangbsd/sys/kern/vfs_syscalls.c
projects/clangbsd/sys/modules/dtrace/dtnfsclient/ (props changed)
projects/clangbsd/sys/modules/ip6_mroute_mod/ (props changed)
projects/clangbsd/sys/modules/ipmi/ipmi_linux/ (props changed)
projects/clangbsd/sys/netgraph/ng_ksocket.c
projects/clangbsd/sys/netinet/ipfw/ip_dummynet.c (props changed)
projects/clangbsd/sys/netinet/ipfw/ip_fw2.c (props changed)
projects/clangbsd/sys/netinet/ipfw/ip_fw_pfil.c (props changed)
projects/clangbsd/sys/netinet6/in6.c
projects/clangbsd/sys/nfs/nfs_nfssvc.c
projects/clangbsd/sys/security/audit/audit.h
projects/clangbsd/sys/security/audit/audit_syscalls.c
projects/clangbsd/sys/sparc64/include/pmap.h
projects/clangbsd/sys/sparc64/sparc64/machdep.c
projects/clangbsd/sys/sparc64/sparc64/pmap.c
projects/clangbsd/sys/sys/event.h
projects/clangbsd/sys/sys/filio.h
projects/clangbsd/sys/sys/mount.h
projects/clangbsd/sys/sys/vnode.h
projects/clangbsd/sys/vm/vm_object.c
projects/clangbsd/tools/regression/lib/msun/test-conj.t (props changed)
projects/clangbsd/tools/tools/ath/common/dumpregs.h (props changed)
projects/clangbsd/tools/tools/ath/common/dumpregs_5210.c (props changed)
projects/clangbsd/tools/tools/ath/common/dumpregs_5211.c (props changed)
projects/clangbsd/tools/tools/ath/common/dumpregs_5212.c (props changed)
projects/clangbsd/tools/tools/ath/common/dumpregs_5416.c (props changed)
projects/clangbsd/usr.sbin/makefs/ffs/ffs_bswap.c (props changed)
projects/clangbsd/usr.sbin/makefs/ffs/ffs_subr.c (props changed)
projects/clangbsd/usr.sbin/makefs/ffs/ufs_bswap.h (props changed)
projects/clangbsd/usr.sbin/makefs/getid.c (props changed)
projects/clangbsd/usr.sbin/sysinstall/dist.c
projects/clangbsd/usr.sbin/sysinstall/dist.h
projects/clangbsd/usr.sbin/sysinstall/doc.c
projects/clangbsd/usr.sbin/sysinstall/menus.c
projects/clangbsd/usr.sbin/sysinstall/sysinstall.h
Modified: projects/clangbsd/UPDATING
==============================================================================
--- projects/clangbsd/UPDATING Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/UPDATING Tue Jun 30 09:14:09 2009 (r195183)
@@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20090628:
+ The documentation from the FreeBSD Documentation Project
+ (Handbook, FAQ, etc.) is now installed via packages by
+ sysinstall(8) and under the /usr/local/share/doc/freebsd
+ directory instead of /usr/share/doc.
+
20090624:
The ABI of various structures related to the SYSV IPC API have
been changed. As a result, the COMPAT_FREEBSD[456] kernel
Modified: projects/clangbsd/contrib/llvm/lib/Support/Timer.cpp
==============================================================================
--- projects/clangbsd/contrib/llvm/lib/Support/Timer.cpp Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/contrib/llvm/lib/Support/Timer.cpp Tue Jun 30 09:14:09 2009 (r195183)
@@ -203,12 +203,12 @@ void Timer::sum(const Timer &T) {
/// currently active timers, which will be printed when the timer group prints
///
void Timer::addPeakMemoryMeasurement() {
- int64_t MemUsed = getMemUsage();
+ size_t MemUsed = getMemUsage();
for (std::vector<Timer*>::iterator I = ActiveTimers->begin(),
E = ActiveTimers->end(); I != E; ++I) {
(*I)->Lock.acquire();
- (*I)->PeakMem = std::max((*I)->PeakMem, (int64_t)MemUsed-(*I)->PeakMemBase);
+ (*I)->PeakMem = std::max((*I)->PeakMem, MemUsed-(*I)->PeakMemBase);
(*I)->Lock.release();
}
}
Modified: projects/clangbsd/release/Makefile
==============================================================================
--- projects/clangbsd/release/Makefile Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/Makefile Tue Jun 30 09:14:09 2009 (r195183)
@@ -39,6 +39,10 @@ BUILDNAME?=${BASE}-${DATE}-SNAP
# checking out from a local CVS repository, set this option.
#EXTPORTSDIR=/usr/ports
#
+# To use a checked-out doc/ directory instead of
+# checking out from a local CVS repository, set this option.
+#EXTDOCDIR=/usr/doc
+#
# To add other options to the CVS subcommands (co,up), set
#CVSCMDARGS="-D '01/01/2002 00:00:00 UTC'"
#
@@ -91,15 +95,13 @@ RELEASEPORTSMODULE?= ports
# the ports tree, so NOPORTS can be set together with NODOC in order
# to have neither ports or docs. If only NOPORTS is set to YES, but
# docs are still desired, the DOMINIMALDOCPORTS logic below will only
-# install the ports that are minimally required for the docs. This is
+# install the ports that are minimally required for the release note documentation. This is
# intended as a compromise, less disk space is required than for using
# the entire ports collection (and much less time due to the huge number
# of directories it would create), but still quite a bit as well as some
# CPU cycles (some of the programs are C++, and things like ghostscript
# belong to the required ports nevertheless).
#
-# Setting this also disables building of release note documentation
-# (RELNOTESng).
#NODOC= YES
#NOPORTS= YES
@@ -141,11 +143,6 @@ NOPORTSATALL= YES
#
# Doing 'make index' in /usr/ports requires Perl.
MAKEINDEXPORTS= lang/perl5.8
-# By default, documentation (Handbook, FAQ, etc.) is built for all
-# the languages. To speed up building, set the DOC_LANG to just
-# the languages you need. (The language for the release notes is
-# controlled by the RELNOTES_LANG variable above.)
-#DOC_LANG= en_US.ISO8859-1
DOCPORTS= textproc/docproj
# Set this to wherever the distfiles required by release procedures.
.if defined(DOCDISTFILES)
@@ -348,7 +345,7 @@ release rerelease:
@echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
.endif
.if defined(NOPORTSATALL) && !defined(NODOC)
- @echo "Ports are required for building the docs. Either set NODOC or"
+ @echo "Ports are required for building the release docs. Either set NODOC or"
@echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
@exit 1
.endif
@@ -477,7 +474,6 @@ release rerelease:
BUILDNAME \
CD_PACKAGE_TREE \
DISTRIBUTIONS \
- DOC_LANG \
DOMINIMALDOCPORTS \
EXTRA_SRC \
FTP_PASSIVE_MODE \
@@ -1037,21 +1033,7 @@ cdrom.2:
@echo "Building CDROM docs filesystem image"
@mkdir -p ${CD_DOCS}
@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DOCS}/cdrom.inf
- @mkdir -p ${CD_DOCS}/usr/share/doc
-.if defined(MAKE_DVD)
- @mkdir -p ${CD_DVD1}/usr/share/doc
-.endif
- @for i in `ls ${CD_LIVEFS}/usr/share/doc`; do \
- if [ -L ${CD_LIVEFS}/usr/share/doc/$$i -o \
- -d /usr/doc/$$i ]; then \
- mv ${CD_LIVEFS}/usr/share/doc/$$i \
- ${CD_DOCS}/usr/share/doc; \
- fi \
- done
-.if defined(MAKE_DVD)
- @cd ${CD_DOCS}/usr/share/doc && find . -print | \
- cpio -dumpl ${CD_DVD1}/usr/share/doc
-.endif
+ @echo "CD_VOLUME = 3" >> ${CD_DOCS}/cdrom.inf
.endif
touch ${.TARGET}
@@ -1082,6 +1064,11 @@ CD_DISC1_PKGS= ${CD_PACKAGE_TREE}/disc1
.if exists(${CD_PACKAGE_TREE}/disc2)
CD_DISC2_PKGS= ${CD_PACKAGE_TREE}/disc2
.endif
+# scripts/package-trees.sh names all discs according to the "discX"
+# scheme where X is the number of the disc
+.if exists(${CD_PACKAGE_TREE}/disc3)
+CD_DOCS_PKGS= ${CD_PACKAGE_TREE}/disc3
+.endif
.if exists(${CD_PACKAGE_TREE}/dvd1)
CD_DVD1_PKGS= ${CD_PACKAGE_TREE}/dvd1
.endif
@@ -1113,7 +1100,8 @@ iso.1:
.if !defined(NODOC)
@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
FreeBSD_Documentation \
- ${CD}/${BUILDNAME}-${TARGET}-docs.iso ${CD_DOCS}
+ ${CD}/${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \
+ ${CD_DOCS_PKGS}
.endif
.if defined(SEPARATE_LIVEFS)
@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
@@ -1139,9 +1127,6 @@ doc.1:
make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \
WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \
done
- @cd /usr/doc && make all install 'FORMATS=html html-split txt' \
- INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc \
- URLS_ABSOLUTE=YES
touch ${.TARGET}
#
Modified: projects/clangbsd/release/amd64/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/amd64/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/amd64/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -42,4 +42,4 @@ progs usbconfig
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo
-libs -lbsdxml -larchive -lbz2 -lusb
+libs -lbsdxml -larchive -lbz2 -lusb -ljail
Modified: projects/clangbsd/release/i386/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/i386/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/i386/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -42,4 +42,4 @@ progs usbconfig
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo
-libs -lbsdxml -larchive -lbz2 -lusb
+libs -lbsdxml -larchive -lbz2 -lusb -ljail
Modified: projects/clangbsd/release/ia64/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/ia64/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/ia64/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -46,4 +46,4 @@ progs usbconfig
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -ldevinfo
-libs -lgeom -lbsdxml -larchive -lbz2 -lusb
+libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail
Modified: projects/clangbsd/release/pc98/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/pc98/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/pc98/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -41,4 +41,4 @@ progs sysinstall
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml
-libs -larchive -lbz2
+libs -larchive -lbz2 -ljail
Modified: projects/clangbsd/release/powerpc/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/powerpc/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/powerpc/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -44,4 +44,4 @@ progs usbconfig
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs
-libs -lbsdxml -larchive -lbz2 -lusb
+libs -lbsdxml -larchive -lbz2 -lusb -ljail
Modified: projects/clangbsd/release/scripts/package-split.py
==============================================================================
--- projects/clangbsd/release/scripts/package-split.py Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/scripts/package-split.py Tue Jun 30 09:14:09 2009 (r195183)
@@ -86,11 +86,34 @@ def disc2_packages():
'ports-mgmt/portaudit'])
return pkgs
+def docs_packages():
+ pkgs = ['misc/freebsd-doc-bn',
+ 'misc/freebsd-doc-da',
+ 'misc/freebsd-doc-de',
+ 'misc/freebsd-doc-el',
+ 'misc/freebsd-doc-en',
+ 'misc/freebsd-doc-es',
+ 'misc/freebsd-doc-fr',
+ 'misc/freebsd-doc-hu',
+ 'misc/freebsd-doc-it',
+ 'misc/freebsd-doc-ja',
+ 'misc/freebsd-doc-mn',
+ 'misc/freebsd-doc-nl',
+ 'misc/freebsd-doc-pl',
+ 'misc/freebsd-doc-pt',
+ 'misc/freebsd-doc-ru',
+ 'misc/freebsd-doc-sr',
+ 'misc/freebsd-doc-tr',
+ 'misc/freebsd-doc-zh_cn',
+ 'misc/freebsd-doc-zh_tw']
+ return pkgs
+
# The list of desired packages
def desired_packages():
disc1 = disc1_packages()
disc2 = disc2_packages()
- return [disc1, disc2]
+ docs = docs_packages()
+ return [disc1, disc2, docs]
# Suck the entire INDEX file into a two different dictionaries. The first
# dictionary maps port names (origins) to package names. The second
Modified: projects/clangbsd/release/sparc64/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/sparc64/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/sparc64/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -42,4 +42,4 @@ progs usbconfig
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml
-libs -larchive -lbz2 -lusb
+libs -larchive -lbz2 -lusb -ljail
Modified: projects/clangbsd/release/sun4v/boot_crunch.conf
==============================================================================
--- projects/clangbsd/release/sun4v/boot_crunch.conf Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/release/sun4v/boot_crunch.conf Tue Jun 30 09:14:09 2009 (r195183)
@@ -42,4 +42,4 @@ progs usbconfig
libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml
-libs -larchive -lbz2 -lusb
+libs -larchive -lbz2 -lusb -ljail
Modified: projects/clangbsd/sys/amd64/amd64/sys_machdep.c
==============================================================================
--- projects/clangbsd/sys/amd64/amd64/sys_machdep.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/amd64/amd64/sys_machdep.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -87,7 +87,7 @@ sysarch_ldt(struct thread *td, struct sy
* XXXKIB check that the BSM generation code knows to encode
* the op argument.
*/
- AUDIT_ARG(cmd, uap->op);
+ AUDIT_ARG_CMD(uap->op);
if (uap_space == UIO_USERSPACE) {
error = copyin(uap->parms, &la, sizeof(struct i386_ldt_args));
if (error != 0)
@@ -170,7 +170,7 @@ sysarch(td, uap)
* XXXKIB check that the BSM generation code knows to encode
* the op argument.
*/
- AUDIT_ARG(cmd, uap->op);
+ AUDIT_ARG_CMD(uap->op);
switch (uap->op) {
case I386_GET_IOPERM:
case I386_SET_IOPERM:
Modified: projects/clangbsd/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- projects/clangbsd/sys/compat/freebsd32/freebsd32_misc.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/compat/freebsd32/freebsd32_misc.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -2924,7 +2924,7 @@ freebsd32_nmount(struct thread *td,
struct uio *auio;
int error;
- AUDIT_ARG(fflags, uap->flags);
+ AUDIT_ARG_FFLAGS(uap->flags);
/*
* Filter out MNT_ROOTFS. We do not want clients of nmount() in
Modified: projects/clangbsd/sys/compat/linux/linux_signal.c
==============================================================================
--- projects/clangbsd/sys/compat/linux/linux_signal.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/compat/linux/linux_signal.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -546,8 +546,8 @@ linux_do_tkill(struct thread *td, l_int
ksiginfo_t ksi;
int error;
- AUDIT_ARG(signum, signum);
- AUDIT_ARG(pid, pid);
+ AUDIT_ARG_SIGNUM(signum);
+ AUDIT_ARG_PID(pid);
/*
* Allow signal 0 as a means to check for privileges
@@ -563,7 +563,7 @@ linux_do_tkill(struct thread *td, l_int
return (ESRCH);
}
- AUDIT_ARG(process, p);
+ AUDIT_ARG_PROCESS(p);
error = p_cansignal(td, p, signum);
if (error)
goto out;
Modified: projects/clangbsd/sys/dev/ale/if_ale.c
==============================================================================
--- projects/clangbsd/sys/dev/ale/if_ale.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ale/if_ale.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -620,6 +620,14 @@ ale_attach(device_t dev)
ifp->if_capabilities |= IFCAP_VLAN_MTU;
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM;
ifp->if_capenable = ifp->if_capabilities;
+ /*
+ * Even though controllers supported by ale(3) have Rx checksum
+ * offload bug the workaround for fragmented frames seemed to
+ * work so far. However it seems Rx checksum offload does not
+ * work under certain conditions. So disable Rx checksum offload
+ * until I find more clue about it but allow users to override it.
+ */
+ ifp->if_capenable &= ~IFCAP_RXCSUM;
/* Tell the upper layer(s) we support long frames. */
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
Modified: projects/clangbsd/sys/dev/ath/ath_hal/ah.c
==============================================================================
--- projects/clangbsd/sys/dev/ath/ath_hal/ah.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/ath_hal/ah.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -503,6 +503,8 @@ ath_hal_getcapability(struct ath_hal *ah
case HAL_CAP_INTRMASK: /* mask of supported interrupts */
*result = pCap->halIntrMask;
return HAL_OK;
+ case HAL_CAP_BSSIDMATCH: /* hardware has disable bssid match */
+ return pCap->halBssidMatchSupport ? HAL_OK : HAL_ENOTSUPP;
default:
return HAL_EINVAL;
}
Modified: projects/clangbsd/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- projects/clangbsd/sys/dev/ath/ath_hal/ah.h Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/ath_hal/ah.h Tue Jun 30 09:14:09 2009 (r195183)
@@ -110,6 +110,7 @@ typedef enum {
HAL_CAP_BB_HANG = 35, /* can baseband hang */
HAL_CAP_MAC_HANG = 36, /* can MAC hang */
HAL_CAP_INTRMASK = 37, /* bitmask of supported interrupts */
+ HAL_CAP_BSSIDMATCH = 38, /* hardware has disable bssid match */
} HAL_CAPABILITY_TYPE;
/*
@@ -296,6 +297,7 @@ typedef enum {
HAL_RX_FILTER_PHYERR = 0x00000100, /* Allow phy errors */
HAL_RX_FILTER_PHYRADAR = 0x00000200, /* Allow phy radar errors */
HAL_RX_FILTER_COMPBAR = 0x00000400, /* Allow compressed BAR */
+ HAL_RX_FILTER_BSSID = 0x00000800, /* Disable BSSID match */
} HAL_RX_FILTER;
typedef enum {
Modified: projects/clangbsd/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- projects/clangbsd/sys/dev/ath/ath_hal/ah_internal.h Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/ath_hal/ah_internal.h Tue Jun 30 09:14:09 2009 (r195183)
@@ -193,7 +193,8 @@ typedef struct {
halExtChanDfsSupport : 1,
halForcePpmSupport : 1,
halEnhancedPmSupport : 1,
- halMbssidAggrSupport : 1;
+ halMbssidAggrSupport : 1,
+ halBssidMatchSupport : 1;
uint32_t halWirelessModes;
uint16_t halTotalQueues;
uint16_t halKeyCacheSize;
Modified: projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
==============================================================================
--- projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -833,11 +833,15 @@ ar5212FillCapabilityInfo(struct ath_hal
ahpriv->ah_rxornIsFatal =
(AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_VENICE);
- /* h/w phy counters first appeared in Hainan */
- pCap->halHwPhyCounterSupport =
- (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_VERSION_VENICE &&
+ /* enable features that first appeared in Hainan */
+ if ((AH_PRIVATE(ah)->ah_macVersion == AR_SREV_VERSION_VENICE &&
AH_PRIVATE(ah)->ah_macRev == AR_SREV_HAINAN) ||
- AH_PRIVATE(ah)->ah_macVersion > AR_SREV_VERSION_VENICE;
+ AH_PRIVATE(ah)->ah_macVersion > AR_SREV_VERSION_VENICE) {
+ /* h/w phy counters */
+ pCap->halHwPhyCounterSupport = AH_TRUE;
+ /* bssid match disable */
+ pCap->halBssidMatchSupport = AH_TRUE;
+ }
pCap->halTstampPrecision = 15;
pCap->halIntrMask = HAL_INT_COMMON
Modified: projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
==============================================================================
--- projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5212_recv.c,v 1.4 2008/11/10 04:08:03 sam Exp $
+ * $FreeBSD$
*/
#include "opt_ah.h"
@@ -163,6 +163,9 @@ ar5212GetRxFilter(struct ath_hal *ah)
bits |= HAL_RX_FILTER_PHYRADAR;
if (phybits & (AR_PHY_ERR_OFDM_TIMING|AR_PHY_ERR_CCK_TIMING))
bits |= HAL_RX_FILTER_PHYERR;
+ if (AH_PRIVATE(ah)->ah_caps.halBssidMatchSupport &&
+ (OS_REG_READ(ah, AR_MISC_MODE) & AR_MISC_MODE_BSSID_MATCH_FORCE))
+ bits |= HAL_RX_FILTER_BSSID;
return bits;
}
@@ -175,7 +178,8 @@ ar5212SetRxFilter(struct ath_hal *ah, ui
uint32_t phybits;
OS_REG_WRITE(ah, AR_RX_FILTER,
- bits &~ (HAL_RX_FILTER_PHYRADAR|HAL_RX_FILTER_PHYERR));
+ bits &~ (HAL_RX_FILTER_PHYRADAR|HAL_RX_FILTER_PHYERR|
+ HAL_RX_FILTER_BSSID));
phybits = 0;
if (bits & HAL_RX_FILTER_PHYRADAR)
phybits |= AR_PHY_ERR_RADAR;
@@ -189,6 +193,14 @@ ar5212SetRxFilter(struct ath_hal *ah, ui
OS_REG_WRITE(ah, AR_RXCFG,
OS_REG_READ(ah, AR_RXCFG) &~ AR_RXCFG_ZLFDMA);
}
+ if (AH_PRIVATE(ah)->ah_caps.halBssidMatchSupport) {
+ uint32_t miscbits = OS_REG_READ(ah, AR_MISC_MODE);
+ if (bits & HAL_RX_FILTER_BSSID)
+ miscbits |= AR_MISC_MODE_BSSID_MATCH_FORCE;
+ else
+ miscbits &= ~AR_MISC_MODE_BSSID_MATCH_FORCE;
+ OS_REG_WRITE(ah, AR_MISC_MODE, miscbits);
+ }
}
/*
Modified: projects/clangbsd/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- projects/clangbsd/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -811,6 +811,7 @@ ar5416FillCapabilityInfo(struct ath_hal
pCap->halMbssidAggrSupport = AH_TRUE;
pCap->halForcePpmSupport = AH_TRUE;
pCap->halEnhancedPmSupport = AH_TRUE;
+ pCap->halBssidMatchSupport = AH_TRUE;
if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) &&
ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) {
Modified: projects/clangbsd/sys/dev/ath/if_athvar.h
==============================================================================
--- projects/clangbsd/sys/dev/ath/if_athvar.h Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/ath/if_athvar.h Tue Jun 30 09:14:09 2009 (r195183)
@@ -590,6 +590,8 @@ void ath_intr(void *);
(ath_hal_getcapability(_ah, HAL_CAP_FASTFRAME, 0, NULL) == HAL_OK)
#define ath_hal_hasbssidmask(_ah) \
(ath_hal_getcapability(_ah, HAL_CAP_BSSIDMASK, 0, NULL) == HAL_OK)
+#define ath_hal_hasbssidmatch(_ah) \
+ (ath_hal_getcapability(_ah, HAL_CAP_BSSIDMATCH, 0, NULL) == HAL_OK)
#define ath_hal_hastsfadjust(_ah) \
(ath_hal_getcapability(_ah, HAL_CAP_TSF_ADJUST, 0, NULL) == HAL_OK)
#define ath_hal_gettsfadjust(_ah) \
Modified: projects/clangbsd/sys/dev/sound/usb/uaudio.c
==============================================================================
--- projects/clangbsd/sys/dev/sound/usb/uaudio.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/sound/usb/uaudio.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -3671,24 +3671,24 @@ umidi_open(struct usb_fifo *fifo, int ff
if (usb_fifo_alloc_buffer(fifo, 4, (1024 / 4))) {
return (ENOMEM);
}
- mtx_lock(&Giant);
+ mtx_lock(&chan->mtx);
chan->read_open_refcount++;
sub->read_open = 1;
- mtx_unlock(&Giant);
+ mtx_unlock(&chan->mtx);
}
if (fflags & FWRITE) {
if (usb_fifo_alloc_buffer(fifo, 32, (1024 / 32))) {
return (ENOMEM);
}
/* clear stall first */
- mtx_lock(&Giant);
+ mtx_lock(&chan->mtx);
chan->flags |= UMIDI_FLAG_WRITE_STALL;
chan->write_open_refcount++;
sub->write_open = 1;
/* reset */
sub->state = UMIDI_ST_UNKNOWN;
- mtx_unlock(&Giant);
+ mtx_unlock(&chan->mtx);
}
return (0); /* success */
}
Modified: projects/clangbsd/sys/dev/usb/controller/at91dci.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/controller/at91dci.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/controller/at91dci.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1227,7 +1227,7 @@ at91dci_device_done(struct usb_xfer *xfe
static void
at91dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
- struct usb_endpoint *ep)
+ struct usb_endpoint *ep, uint8_t *did_stall)
{
struct at91dci_softc *sc;
uint32_t csr_val;
Modified: projects/clangbsd/sys/dev/usb/controller/atmegadci.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/controller/atmegadci.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/controller/atmegadci.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1113,7 +1113,7 @@ atmegadci_device_done(struct usb_xfer *x
static void
atmegadci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
- struct usb_endpoint *ep)
+ struct usb_endpoint *ep, uint8_t *did_stall)
{
struct atmegadci_softc *sc;
uint8_t ep_no;
Modified: projects/clangbsd/sys/dev/usb/controller/avr32dci.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/controller/avr32dci.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/controller/avr32dci.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1081,7 +1081,7 @@ avr32dci_device_done(struct usb_xfer *xf
static void
avr32dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
- struct usb_endpoint *ep)
+ struct usb_endpoint *ep, uint8_t *did_stall)
{
struct avr32dci_softc *sc;
uint8_t ep_no;
Modified: projects/clangbsd/sys/dev/usb/controller/musb_otg.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/controller/musb_otg.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/controller/musb_otg.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1473,7 +1473,7 @@ musbotg_device_done(struct usb_xfer *xfe
static void
musbotg_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
- struct usb_endpoint *ep)
+ struct usb_endpoint *ep, uint8_t *did_stall)
{
struct musbotg_softc *sc;
uint8_t ep_no;
Modified: projects/clangbsd/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/controller/uss820dci.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/controller/uss820dci.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1202,7 +1202,7 @@ uss820dci_device_done(struct usb_xfer *x
static void
uss820dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
- struct usb_endpoint *ep)
+ struct usb_endpoint *ep, uint8_t *did_stall)
{
struct uss820dci_softc *sc;
uint8_t ep_no;
Modified: projects/clangbsd/sys/dev/usb/net/if_cdce.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/net/if_cdce.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/net/if_cdce.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -764,7 +764,7 @@ tr_setup:
static int
cdce_handle_request(device_t dev,
const void *req, void **pptr, uint16_t *plen,
- uint16_t offset, uint8_t is_complete)
+ uint16_t offset, uint8_t *pstate)
{
return (ENXIO); /* use builtin handler */
}
Modified: projects/clangbsd/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/serial/usb_serial.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/serial/usb_serial.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -151,6 +151,8 @@ MODULE_VERSION(ucom, 1);
#define UCOM_SUB_UNIT_MAX 0x100 /* exclusive */
static uint8_t ucom_bitmap[(UCOM_UNIT_MAX + 7) / 8];
+static struct mtx ucom_bitmap_mtx;
+MTX_SYSINIT(ucom_bitmap_mtx, &ucom_bitmap_mtx, "ucom bitmap", MTX_DEF);
static uint8_t
ucom_units_alloc(uint32_t sub_units, uint32_t *p_root_unit)
@@ -161,7 +163,7 @@ ucom_units_alloc(uint32_t sub_units, uin
uint32_t max = UCOM_UNIT_MAX - (UCOM_UNIT_MAX % sub_units);
uint8_t error = 1;
- mtx_lock(&Giant);
+ mtx_lock(&ucom_bitmap_mtx);
for (n = 0; n < max; n += sub_units) {
@@ -192,7 +194,7 @@ ucom_units_alloc(uint32_t sub_units, uin
skip: ;
}
- mtx_unlock(&Giant);
+ mtx_unlock(&ucom_bitmap_mtx);
/*
* Always set the variable pointed to by "p_root_unit" so that
@@ -208,14 +210,14 @@ ucom_units_free(uint32_t root_unit, uint
{
uint32_t x;
- mtx_lock(&Giant);
+ mtx_lock(&ucom_bitmap_mtx);
while (sub_units--) {
x = root_unit + sub_units;
ucom_bitmap[x / 8] &= ~(1 << (x % 8));
}
- mtx_unlock(&Giant);
+ mtx_unlock(&ucom_bitmap_mtx);
}
/*
Modified: projects/clangbsd/sys/dev/usb/storage/ustorage_fs.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/storage/ustorage_fs.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/storage/ustorage_fs.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -475,10 +475,11 @@ ustorage_fs_transfer_stop(struct ustorag
static int
ustorage_fs_handle_request(device_t dev,
const void *preq, void **pptr, uint16_t *plen,
- uint16_t offset, uint8_t is_complete)
+ uint16_t offset, uint8_t *pstate)
{
struct ustorage_fs_softc *sc = device_get_softc(dev);
const struct usb_device_request *req = preq;
+ uint8_t is_complete = *pstate;
if (!is_complete) {
if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) &&
Modified: projects/clangbsd/sys/dev/usb/usb_controller.h
==============================================================================
--- projects/clangbsd/sys/dev/usb/usb_controller.h Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/usb_controller.h Tue Jun 30 09:14:09 2009 (r195183)
@@ -96,7 +96,7 @@ struct usb_bus_methods {
/* USB Device mode only - Mandatory */
void (*get_hw_ep_profile) (struct usb_device *udev, const struct usb_hw_ep_profile **ppf, uint8_t ep_addr);
- void (*set_stall) (struct usb_device *udev, struct usb_xfer *xfer, struct usb_endpoint *ep);
+ void (*set_stall) (struct usb_device *udev, struct usb_xfer *xfer, struct usb_endpoint *ep, uint8_t *did_stall);
void (*clear_stall) (struct usb_device *udev, struct usb_endpoint *ep);
};
Modified: projects/clangbsd/sys/dev/usb/usb_device.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/usb_device.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/usb_device.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -936,7 +936,7 @@ usbd_set_endpoint_stall(struct usb_devic
* complete the USB transfer like in case of a timeout
* setting the error code "USB_ERR_STALLED".
*/
- (udev->bus->methods->set_stall) (udev, xfer, ep);
+ (udev->bus->methods->set_stall) (udev, xfer, ep, &do_stall);
}
if (!do_stall) {
ep->toggle_next = 0; /* reset data toggle */
Modified: projects/clangbsd/sys/dev/usb/usb_handle_request.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/usb_handle_request.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/usb_handle_request.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -198,6 +198,7 @@ usb_handle_iface_request(struct usb_xfer
struct usb_device *udev = xfer->xroot->udev;
int error;
uint8_t iface_index;
+ uint8_t temp_state;
if ((req.bmRequestType & 0x1F) == UT_INTERFACE) {
iface_index = req.wIndex[0]; /* unicast */
@@ -222,6 +223,10 @@ tr_repeat:
/* end of interfaces non-existing interface */
goto tr_stalled;
}
+ /* set initial state */
+
+ temp_state = state;
+
/* forward request to interface, if any */
if ((error != 0) &&
@@ -233,7 +238,7 @@ tr_repeat:
#endif
error = USB_HANDLE_REQUEST(iface->subdev,
&req, ppdata, plen,
- off, state);
+ off, &temp_state);
}
iface_parent = usbd_get_iface(udev, iface->parent_iface_index);
@@ -252,14 +257,18 @@ tr_repeat:
(iface_parent->subdev != iface->subdev) &&
device_is_attached(iface_parent->subdev)) {
error = USB_HANDLE_REQUEST(iface_parent->subdev,
- &req, ppdata, plen, off,
- state);
+ &req, ppdata, plen, off, &temp_state);
}
if (error == 0) {
/* negativly adjust pointer and length */
*ppdata = ((uint8_t *)(*ppdata)) - off;
*plen += off;
- goto tr_valid;
+
+ if ((state == USB_HR_NOT_COMPLETE) &&
+ (temp_state == USB_HR_COMPLETE_OK))
+ goto tr_short;
+ else
+ goto tr_valid;
} else if (error == ENOTTY) {
goto tr_stalled;
}
@@ -337,6 +346,12 @@ tr_valid:
USB_XFER_LOCK(xfer);
return (0);
+tr_short:
+ mtx_unlock(&Giant);
+ sx_unlock(udev->default_sx + 1);
+ USB_XFER_LOCK(xfer);
+ return (USB_ERR_SHORT_XFER);
+
tr_stalled:
mtx_unlock(&Giant);
sx_unlock(udev->default_sx + 1);
@@ -444,6 +459,7 @@ usb_handle_request(struct usb_xfer *xfer
uint16_t wValue;
uint16_t wIndex;
uint8_t state;
+ uint8_t is_complete = 1;
usb_error_t err;
union {
uWord wStatus;
@@ -596,6 +612,9 @@ usb_handle_request(struct usb_xfer *xfer
USB_ADD_BYTES(&src_zcopy, 0),
&max_len, req, off, state);
if (err == 0) {
+ is_complete = 0;
+ goto tr_valid;
+ } else if (err == USB_ERR_SHORT_XFER) {
goto tr_valid;
}
/*
@@ -735,7 +754,7 @@ tr_valid:
if (rem > xfer->max_data_length) {
rem = usbd_xfer_max_len(xfer);
}
- if (rem != max_len) {
+ if ((rem != max_len) && (is_complete != 0)) {
/*
* If we don't transfer the data we can transfer, then
* the transfer is short !
Modified: projects/clangbsd/sys/dev/usb/usb_if.m
==============================================================================
--- projects/clangbsd/sys/dev/usb/usb_if.m Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/usb_if.m Tue Jun 30 09:14:09 2009 (r195183)
@@ -36,6 +36,11 @@ INTERFACE usb;
# The device received a control request
#
+# The value pointed to by "pstate" can be updated to
+# "USB_HR_COMPLETE_OK" to indicate that the control
+# read transfer is complete, in case of short USB
+# control transfers.
+#
# Return values:
# 0: Success
# ENOTTY: Transaction stalled
@@ -47,5 +52,5 @@ METHOD int handle_request {
void **pptr; /* data pointer */
uint16_t *plen; /* maximum transfer length */
uint16_t offset; /* data offset */
- uint8_t is_complete; /* set if transfer is complete, see USB_HR_XXX */
+ uint8_t *pstate; /* set if transfer is complete, see USB_HR_XXX */
};
Modified: projects/clangbsd/sys/dev/usb/usb_transfer.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/usb_transfer.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/usb_transfer.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -2352,29 +2352,37 @@ usbd_pipe_start(struct usb_xfer_queue *p
(type == UE_INTERRUPT)) {
struct usb_device *udev;
struct usb_xfer_root *info;
+ uint8_t did_stall;
info = xfer->xroot;
udev = info->udev;
- ep->is_stalled = 1;
+ did_stall = 1;
if (udev->flags.usb_mode == USB_MODE_DEVICE) {
(udev->bus->methods->set_stall) (
- udev, NULL, ep);
+ udev, NULL, ep, &did_stall);
} else if (udev->default_xfer[1]) {
info = udev->default_xfer[1]->xroot;
- if (usb_proc_msignal(
+ usb_proc_msignal(
&info->bus->non_giant_callback_proc,
- &udev->cs_msg[0], &udev->cs_msg[1])) {
- /* ignore */
- }
+ &udev->cs_msg[0], &udev->cs_msg[1]);
} else {
/* should not happen */
DPRINTFN(0, "No stall handler!\n");
}
/*
- * We get started again when the stall is cleared!
+ * Check if we should stall. Some USB hardware
+ * handles set- and clear-stall in hardware.
*/
- return;
+ if (did_stall) {
+ /*
+ * The transfer will be continued when
+ * the clear-stall control endpoint
+ * message is received.
+ */
+ ep->is_stalled = 1;
+ return;
+ }
}
}
/* Set or clear stall complete - special case */
@@ -2966,6 +2974,12 @@ usbd_xfer_set_flag(struct usb_xfer *xfer
case USB_SHORT_XFER_OK:
xfer->flags.short_xfer_ok = 1;
break;
+ case USB_MULTI_SHORT_OK:
+ xfer->flags.short_frames_ok = 1;
+ break;
+ case USB_MANUAL_STATUS:
+ xfer->flags.manual_status = 1;
+ break;
}
}
@@ -2979,5 +2993,22 @@ usbd_xfer_clr_flag(struct usb_xfer *xfer
case USB_SHORT_XFER_OK:
xfer->flags.short_xfer_ok = 0;
break;
+ case USB_MULTI_SHORT_OK:
+ xfer->flags.short_frames_ok = 0;
+ break;
+ case USB_MANUAL_STATUS:
+ xfer->flags.manual_status = 0;
+ break;
}
}
+
+/*
+ * The following function returns in milliseconds when the isochronous
+ * transfer was completed by the hardware. The returned value wraps
+ * around 65536 milliseconds.
+ */
+uint16_t
+usbd_xfer_get_timestamp(struct usb_xfer *xfer)
+{
+ return (xfer->isoc_time_complete);
+}
Modified: projects/clangbsd/sys/dev/usb/usbdi.h
==============================================================================
--- projects/clangbsd/sys/dev/usb/usbdi.h Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/usbdi.h Tue Jun 30 09:14:09 2009 (r195183)
@@ -78,6 +78,8 @@ typedef enum { /* keep in sync with usb_
#define USB_SHORT_XFER_OK 0x0004 /* allow short reads */
#define USB_DELAY_STATUS_STAGE 0x0010 /* insert delay before STATUS stage */
#define USB_USER_DATA_PTR 0x0020 /* internal flag */
+#define USB_MULTI_SHORT_OK 0x0040 /* allow multiple short frames */
+#define USB_MANUAL_STATUS 0x0080 /* manual ctrl status */
#define USB_NO_TIMEOUT 0
#define USB_DEFAULT_TIMEOUT 5000 /* 5000 ms = 5 seconds */
@@ -486,6 +488,7 @@ void usbd_xfer_set_stall(struct usb_xfer
int usbd_xfer_is_stalled(struct usb_xfer *xfer);
void usbd_xfer_set_flag(struct usb_xfer *xfer, int flag);
void usbd_xfer_clr_flag(struct usb_xfer *xfer, int flag);
+uint16_t usbd_xfer_get_timestamp(struct usb_xfer *xfer);
void usbd_copy_in(struct usb_page_cache *cache, usb_frlength_t offset,
const void *ptr, usb_frlength_t len);
Modified: projects/clangbsd/sys/dev/usb/wlan/if_urtw.c
==============================================================================
--- projects/clangbsd/sys/dev/usb/wlan/if_urtw.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/dev/usb/wlan/if_urtw.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -116,6 +116,7 @@ static const struct usb_device_id urtw_d
URTW_DEV_L(NETGEAR, WG111V2),
URTW_DEV_L(REALTEK, RTL8187),
{ USB_VPI(USB_VENDOR_SITECOMEU, 0x000d, URTW_REV_RTL8187L) },
+ { USB_VPI(USB_VENDOR_SITECOMEU, 0x0028, URTW_REV_RTL8187B) },
{ USB_VPI(USB_VENDOR_SPHAIRON, 0x0150, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_SURECOM, 0x11f2, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_QCOM, 0x6232, URTW_REV_RTL8187L) },
Modified: projects/clangbsd/sys/i386/i386/sys_machdep.c
==============================================================================
--- projects/clangbsd/sys/i386/i386/sys_machdep.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/i386/i386/sys_machdep.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -107,7 +107,7 @@ sysarch(td, uap)
uint32_t base;
struct segment_descriptor sd, *sdp;
- AUDIT_ARG(cmd, uap->op);
+ AUDIT_ARG_CMD(uap->op);
switch (uap->op) {
case I386_GET_IOPERM:
case I386_SET_IOPERM:
Modified: projects/clangbsd/sys/kern/kern_descrip.c
==============================================================================
--- projects/clangbsd/sys/kern/kern_descrip.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/kern/kern_descrip.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1144,7 +1144,7 @@ closefrom(struct thread *td, struct clos
int fd;
fdp = td->td_proc->p_fd;
- AUDIT_ARG(fd, uap->lowfd);
+ AUDIT_ARG_FD(uap->lowfd);
/*
* Treat negative starting file descriptor values identical to
@@ -1219,12 +1219,12 @@ kern_fstat(struct thread *td, int fd, st
struct file *fp;
int error;
- AUDIT_ARG(fd, fd);
+ AUDIT_ARG_FD(fd);
if ((error = fget(td, fd, &fp)) != 0)
return (error);
- AUDIT_ARG(file, td->td_proc, fp);
+ AUDIT_ARG_FILE(td->td_proc, fp);
error = fo_stat(fp, sbp, td->td_ucred, td);
fdrop(fp, td);
Modified: projects/clangbsd/sys/kern/kern_event.c
==============================================================================
--- projects/clangbsd/sys/kern/kern_event.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/kern/kern_event.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -1606,17 +1606,18 @@ kqueue_wakeup(struct kqueue *kq)
* first.
*/
void
-knote(struct knlist *list, long hint, int islocked)
+knote(struct knlist *list, long hint, int lockflags)
{
struct kqueue *kq;
struct knote *kn;
+ int error;
if (list == NULL)
return;
- KNL_ASSERT_LOCK(list, islocked);
+ KNL_ASSERT_LOCK(list, lockflags & KNF_LISTLOCKED);
- if (!islocked)
+ if ((lockflags & KNF_LISTLOCKED) == 0)
list->kl_lock(list->kl_lockarg);
/*
@@ -1631,17 +1632,28 @@ knote(struct knlist *list, long hint, in
kq = kn->kn_kq;
if ((kn->kn_status & KN_INFLUX) != KN_INFLUX) {
KQ_LOCK(kq);
- if ((kn->kn_status & KN_INFLUX) != KN_INFLUX) {
+ if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) {
+ KQ_UNLOCK(kq);
+ } else if ((lockflags & KNF_NOKQLOCK) != 0) {
+ kn->kn_status |= KN_INFLUX;
+ KQ_UNLOCK(kq);
+ error = kn->kn_fop->f_event(kn, hint);
+ KQ_LOCK(kq);
+ kn->kn_status &= ~KN_INFLUX;
+ if (error)
+ KNOTE_ACTIVATE(kn, 1);
+ KQ_UNLOCK_FLUX(kq);
+ } else {
kn->kn_status |= KN_HASKQLOCK;
if (kn->kn_fop->f_event(kn, hint))
KNOTE_ACTIVATE(kn, 1);
kn->kn_status &= ~KN_HASKQLOCK;
+ KQ_UNLOCK(kq);
}
- KQ_UNLOCK(kq);
}
kq = NULL;
}
- if (!islocked)
+ if ((lockflags & KNF_LISTLOCKED) == 0)
list->kl_unlock(list->kl_lockarg);
}
Modified: projects/clangbsd/sys/kern/kern_exec.c
==============================================================================
--- projects/clangbsd/sys/kern/kern_exec.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/kern/kern_exec.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -274,9 +274,9 @@ kern_execve(td, args, mac_p)
struct proc *p = td->td_proc;
int error;
- AUDIT_ARG(argv, args->begin_argv, args->argc,
+ AUDIT_ARG_ARGV(args->begin_argv, args->argc,
args->begin_envv - args->begin_argv);
- AUDIT_ARG(envv, args->begin_envv, args->envc,
+ AUDIT_ARG_ENVV(args->begin_envv, args->envc,
args->endp - args->begin_envv);
if (p->p_flag & P_HADTHREADS) {
PROC_LOCK(p);
@@ -413,13 +413,13 @@ interpret:
binvp = nd.ni_vp;
imgp->vp = binvp;
} else {
- AUDIT_ARG(fd, args->fd);
+ AUDIT_ARG_FD(args->fd);
error = fgetvp(td, args->fd, &binvp);
if (error)
goto exec_fail;
vfslocked = VFS_LOCK_GIANT(binvp->v_mount);
vn_lock(binvp, LK_EXCLUSIVE | LK_RETRY);
- AUDIT_ARG(vnode, binvp, ARG_VNODE1);
+ AUDIT_ARG_VNODE(binvp, ARG_VNODE1);
imgp->vp = binvp;
}
Modified: projects/clangbsd/sys/kern/kern_exit.c
==============================================================================
--- projects/clangbsd/sys/kern/kern_exit.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/kern/kern_exit.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -211,7 +211,7 @@ exit1(struct thread *td, int rv)
* it was. The exit status is WEXITSTATUS(rv), but it's not clear
* what the return value is.
*/
- AUDIT_ARG(exit, WEXITSTATUS(rv), 0);
+ AUDIT_ARG_EXIT(WEXITSTATUS(rv), 0);
AUDIT_SYSCALL_EXIT(0, td);
#endif
@@ -803,7 +803,7 @@ kern_wait(struct thread *td, pid_t pid,
struct proc *p, *q;
int error, nfound;
- AUDIT_ARG(pid, pid);
+ AUDIT_ARG_PID(pid);
q = td->td_proc;
if (pid == 0) {
Modified: projects/clangbsd/sys/kern/kern_fork.c
==============================================================================
--- projects/clangbsd/sys/kern/kern_fork.c Tue Jun 30 05:21:00 2009 (r195182)
+++ projects/clangbsd/sys/kern/kern_fork.c Tue Jun 30 09:14:09 2009 (r195183)
@@ -146,7 +146,7 @@ rfork(td, uap)
if ((uap->flags & RFKERNELONLY) != 0)
return (EINVAL);
- AUDIT_ARG(fflags, uap->flags);
+ AUDIT_ARG_FFLAGS(uap->flags);
error = fork1(td, uap->flags, 0, &p2);
if (error == 0) {
td->td_retval[0] = p2 ? p2->p_pid : 0;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list