From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 14 13:06:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45B3B1065672; Sun, 14 Nov 2010 13:06:35 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4A58FC17; Sun, 14 Nov 2010 13:06:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAED6ZT8082629; Sun, 14 Nov 2010 13:06:35 GMT (envelope-from nork@svn.freebsd.org) Received: (from nork@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAED6Z1F082628; Sun, 14 Nov 2010 13:06:35 GMT (envelope-from nork@svn.freebsd.org) Message-Id: <201011141306.oAED6Z1F082628@svn.freebsd.org> From: Norikatsu Shigemura Date: Sun, 14 Nov 2010 13:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215294 - in stable/8: . contrib/top etc/periodic/daily gnu/usr.bin lib/libusb release/picobsd/floppy.tree/sbin sbin/geom/class/sched tools/regression/lib/msun tools/regression/usr.bin/... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:06:35 -0000 Author: nork Date: Sun Nov 14 13:06:34 2010 New Revision: 215294 URL: http://svn.freebsd.org/changeset/base/215294 Log: Remove extra svn:mergeinfo. Pointy hat to: myself Pointed out by: hrs, ume, nyan, avg, jhb Suggested by: jhb Reviewd by: nyan, jhb Approved by: imp (mentor) Modified: Directory Properties: stable/8/ (props changed) stable/8/Makefile (props changed) stable/8/Makefile.inc1 (props changed) stable/8/ObsoleteFiles.inc (props changed) stable/8/UPDATING (props changed) stable/8/bin/ (props changed) stable/8/bin/chio/ (props changed) stable/8/bin/chmod/ (props changed) stable/8/bin/cp/ (props changed) stable/8/bin/csh/ (props changed) stable/8/bin/date/ (props changed) stable/8/bin/expr/ (props changed) stable/8/bin/getfacl/ (props changed) stable/8/bin/kill/ (props changed) stable/8/bin/ln/ (props changed) stable/8/bin/ls/ (props changed) stable/8/bin/mv/ (props changed) stable/8/bin/pax/ (props changed) stable/8/bin/pkill/ (props changed) stable/8/bin/ps/ (props changed) stable/8/bin/pwait/ (props changed) stable/8/bin/setfacl/ (props changed) stable/8/bin/sh/ (props changed) stable/8/bin/sleep/ (props changed) stable/8/bin/test/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/lib/ (props changed) stable/8/cddl/lib/libnvpair/ (props changed) stable/8/cddl/lib/libzpool/ (props changed) stable/8/cddl/usr.bin/ (props changed) stable/8/cddl/usr.sbin/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/bind9/ (props changed) stable/8/contrib/binutils/ (props changed) stable/8/contrib/bsnmp/ (props changed) stable/8/contrib/bzip2/ (props changed) stable/8/contrib/com_err/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/contrib/ee/ (props changed) stable/8/contrib/expat/ (props changed) stable/8/contrib/file/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gdb/ (props changed) stable/8/contrib/gdtoa/ (props changed) stable/8/contrib/groff/ (props changed) stable/8/contrib/ipfilter/ (props changed) stable/8/contrib/less/ (props changed) stable/8/contrib/libpcap/ (props changed) stable/8/contrib/ncurses/ (props changed) stable/8/contrib/netcat/ (props changed) stable/8/contrib/ntp/ (props changed) stable/8/contrib/nvi/ (props changed) stable/8/contrib/one-true-awk/ (props changed) stable/8/contrib/openbsm/ (props changed) stable/8/contrib/openpam/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/contrib/sendmail/ (props changed) stable/8/contrib/tcp_wrappers/ (props changed) stable/8/contrib/tcpdump/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/telnet/ (props changed) stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/contrib/traceroute/ (props changed) stable/8/contrib/wpa/ (props changed) stable/8/contrib/xz/ (props changed) stable/8/crypto/heimdal/ (props changed) stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssl/ (props changed) stable/8/etc/ (props changed) stable/8/etc/periodic/daily/ (props changed) stable/8/etc/periodic/daily/800.scrub-zfs (props changed) stable/8/etc/periodic/security/ (props changed) stable/8/games/factor/ (props changed) stable/8/games/fortune/ (props changed) stable/8/games/grdc/ (props changed) stable/8/games/pom/ (props changed) stable/8/gnu/lib/csu/ (props changed) stable/8/gnu/lib/libstdc++/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/gnu/usr.bin/Makefile (props changed) stable/8/gnu/usr.bin/dialog/ (props changed) stable/8/gnu/usr.bin/gdb/ (props changed) stable/8/gnu/usr.bin/gdb/kgdb/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/patch/ (props changed) stable/8/include/ (props changed) stable/8/kerberos5/lib/libgssapi_krb5/ (props changed) stable/8/kerberos5/lib/libgssapi_spnego/ (props changed) stable/8/kerberos5/usr.bin/kdestroy/ (props changed) stable/8/kerberos5/usr.bin/kpasswd/ (props changed) stable/8/lib/ (props changed) stable/8/lib/bind/ (props changed) stable/8/lib/csu/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/lib/libc_r/ (props changed) stable/8/lib/libcam/ (props changed) stable/8/lib/libcompat/ (props changed) stable/8/lib/libdevinfo/ (props changed) stable/8/lib/libdisk/ (props changed) stable/8/lib/libedit/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libexpat/ (props changed) stable/8/lib/libfetch/ (props changed) stable/8/lib/libgeom/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libjail/ (props changed) stable/8/lib/libkse/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/liblzma/ (props changed) stable/8/lib/libmagic/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/lib/libpam/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libproc/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/librpcsec_gss/ (props changed) stable/8/lib/librtld_db/ (props changed) stable/8/lib/libsm/ (props changed) stable/8/lib/libstand/ (props changed) stable/8/lib/libtacplus/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libthread_db/ (props changed) stable/8/lib/libufs/ (props changed) stable/8/lib/libugidfw/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) stable/8/lib/libusbhid/ (props changed) stable/8/lib/libutil/ (props changed) stable/8/lib/libz/ (props changed) stable/8/lib/libz/contrib/ (props changed) stable/8/lib/msun/ (props changed) stable/8/libexec/ (props changed) stable/8/libexec/ftpd/ (props changed) stable/8/libexec/rtld-elf/ (props changed) stable/8/libexec/tftpd/ (props changed) stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/release/powerpc/ (props changed) stable/8/sbin/ (props changed) stable/8/sbin/atacontrol/ (props changed) stable/8/sbin/bsdlabel/ (props changed) stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/ddb/ (props changed) stable/8/sbin/devd/ (props changed) stable/8/sbin/devfs/ (props changed) stable/8/sbin/dhclient/ (props changed) stable/8/sbin/dump/ (props changed) stable/8/sbin/dumpfs/ (props changed) stable/8/sbin/fsck/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/fsck_msdosfs/ (props changed) stable/8/sbin/fsirand/ (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/sched/gsched.8 (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sbin/ggate/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/sbin/kldload/ (props changed) stable/8/sbin/kldstat/ (props changed) stable/8/sbin/mdconfig/ (props changed) stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mount/ (props changed) stable/8/sbin/mount_cd9660/ (props changed) stable/8/sbin/mount_msdosfs/ (props changed) stable/8/sbin/mount_nfs/ (props changed) stable/8/sbin/natd/ (props changed) stable/8/sbin/newfs/ (props changed) stable/8/sbin/newfs_msdos/ (props changed) stable/8/sbin/ping6/ (props changed) stable/8/sbin/reboot/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/sbin/routed/ (props changed) stable/8/sbin/setkey/ (props changed) stable/8/sbin/spppcontrol/ (props changed) stable/8/sbin/sysctl/ (props changed) stable/8/sbin/tunefs/ (props changed) stable/8/sbin/umount/ (props changed) stable/8/secure/ (props changed) stable/8/secure/lib/libcrypto/ (props changed) stable/8/secure/lib/libssl/ (props changed) stable/8/secure/usr.bin/bdes/ (props changed) stable/8/secure/usr.bin/openssl/ (props changed) stable/8/share/dict/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/share/misc/ (props changed) stable/8/share/mk/ (props changed) stable/8/share/termcap/ (props changed) stable/8/share/timedef/ (props changed) stable/8/share/zoneinfo/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/debugscripts/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/tr/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/umastat/ (props changed) stable/8/tools/tools/vimage/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.bin/apply/ (props changed) stable/8/usr.bin/ar/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/biff/ (props changed) stable/8/usr.bin/c89/ (props changed) stable/8/usr.bin/c99/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/column/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/du/ (props changed) stable/8/usr.bin/ee/ (props changed) stable/8/usr.bin/enigma/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fold/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/getopt/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/jot/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/killall/ (props changed) stable/8/usr.bin/ktrace/ (props changed) stable/8/usr.bin/lex/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/lockf/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/mail/ (props changed) stable/8/usr.bin/make/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/minigzip/ (props changed) stable/8/usr.bin/ncal/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/pathchk/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/rpcgen/ (props changed) stable/8/usr.bin/ruptime/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/sed/ (props changed) stable/8/usr.bin/sockstat/ (props changed) stable/8/usr.bin/split/ (props changed) stable/8/usr.bin/stat/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tar/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/tr/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/uname/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/unzip/ (props changed) stable/8/usr.bin/uudecode/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xinstall/ (props changed) stable/8/usr.bin/xlint/ (props changed) stable/8/usr.bin/yacc/ (props changed) stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/asf/ (props changed) stable/8/usr.sbin/bluetooth/ (props changed) stable/8/usr.sbin/bluetooth/bthidcontrol/ (props changed) stable/8/usr.sbin/bluetooth/bthidd/ (props changed) stable/8/usr.sbin/boot0cfg/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/chown/ (props changed) stable/8/usr.sbin/config/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/crunch/examples/ (props changed) stable/8/usr.sbin/ctm/ (props changed) stable/8/usr.sbin/cxgbtool/ (props changed) stable/8/usr.sbin/devinfo/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/fdcontrol/ (props changed) stable/8/usr.sbin/fdformat/ (props changed) stable/8/usr.sbin/fdread/ (props changed) stable/8/usr.sbin/fdwrite/ (props changed) stable/8/usr.sbin/fifolog/ (props changed) stable/8/usr.sbin/flowctl/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/i2c/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/mailwrapper/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/ (props changed) stable/8/usr.sbin/mountd/ (props changed) stable/8/usr.sbin/moused/ (props changed) stable/8/usr.sbin/mptutil/ (props changed) stable/8/usr.sbin/mtest/ (props changed) stable/8/usr.sbin/mtree/ (props changed) stable/8/usr.sbin/named/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/nfsdumpstate/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/8/usr.sbin/periodic/ (props changed) stable/8/usr.sbin/pmcannotate/ (props changed) stable/8/usr.sbin/pmccontrol/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pppctl/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.lockd/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtadvd/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/sade/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/services_mkdb/ (props changed) stable/8/usr.sbin/setfmac/ (props changed) stable/8/usr.sbin/setpmac/ (props changed) stable/8/usr.sbin/smbmsg/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/uathload/ (props changed) stable/8/usr.sbin/ugidfw/ (props changed) stable/8/usr.sbin/uhsoctl/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/vidcontrol/ (props changed) stable/8/usr.sbin/watchdogd/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 14 19:36:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C542E106566B; Sun, 14 Nov 2010 19:36:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B35ED8FC19; Sun, 14 Nov 2010 19:36:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEJatGF091546; Sun, 14 Nov 2010 19:36:55 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJatBn091543; Sun, 14 Nov 2010 19:36:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011141936.oAEJatBn091543@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Nov 2010 19:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215311 - stable/8/bin/sh X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:36:55 -0000 Author: jilles Date: Sun Nov 14 19:36:55 2010 New Revision: 215311 URL: http://svn.freebsd.org/changeset/base/215311 Log: MFC r213775: sh: Make DEBUG traces 64-bit clean: - Use %t to print ptrdiff_t values. - Cast a ptrdiff_t value explicitly to int for a field width specifier. While here, sort includes. Original commit by jhb. Modified: stable/8/bin/sh/expand.c stable/8/bin/sh/jobs.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Sun Nov 14 18:42:39 2010 (r215310) +++ stable/8/bin/sh/expand.c Sun Nov 14 19:36:55 2010 (r215311) @@ -43,14 +43,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include -#include -#include +#include +#include #include +#include #include +#include #include +#include /* * Routines to expand arguments to commands. We have to deal with @@ -491,9 +492,9 @@ expbackq(union node *cmd, int quoted, in exitstatus = waitforjob(in.jp, (int *)NULL); if (quoted == 0) recordregion(startloc, dest - stackblock(), 0); - TRACE(("evalbackq: size=%d: \"%.*s\"\n", - (dest - stackblock()) - startloc, - (dest - stackblock()) - startloc, + TRACE(("expbackq: size=%td: \"%.*s\"\n", + ((dest - stackblock()) - startloc), + (int)((dest - stackblock()) - startloc), stackblock() + startloc)); expdest = dest; INTON; Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Sun Nov 14 18:42:39 2010 (r215310) +++ stable/8/bin/sh/jobs.c Sun Nov 14 19:36:55 2010 (r215311) @@ -38,18 +38,18 @@ static char sccsid[] = "@(#)jobs.c 8.5 ( #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include -#include +#include #include -#include -#include #include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include #include "shell.h" #if JOBS @@ -653,7 +653,7 @@ makejob(union node *node __unused, int n jp->ps = &jp->ps0; } INTON; - TRACE(("makejob(%p, %d) returns %%%d\n", (void *)node, nprocs, + TRACE(("makejob(%p, %d) returns %%%td\n", (void *)node, nprocs, jp - jobtab + 1)); return jp; } @@ -739,7 +739,7 @@ forkshell(struct job *jp, union node *n, pid_t pid; pid_t pgrp; - TRACE(("forkshell(%%%d, %p, %d) called\n", jp - jobtab, (void *)n, + TRACE(("forkshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n, mode)); INTOFF; flushall(); @@ -868,7 +868,7 @@ waitforjob(struct job *jp, int *origstat int st; INTOFF; - TRACE(("waitforjob(%%%d) called\n", jp - jobtab + 1)); + TRACE(("waitforjob(%%%td) called\n", jp - jobtab + 1)); while (jp->state == 0) if (dowait(1, jp) == -1) dotrap(); @@ -969,7 +969,7 @@ dowait(int block, struct job *job) if (stopped) { /* stopped or done */ int state = done? JOBDONE : JOBSTOPPED; if (jp->state != state) { - TRACE(("Job %d: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state)); + TRACE(("Job %td: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state)); jp->state = state; #if JOBS if (done) From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 14 19:40:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E9C21065675; Sun, 14 Nov 2010 19:40:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3838FC0A; Sun, 14 Nov 2010 19:40:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEJeNFx091714; Sun, 14 Nov 2010 19:40:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJeNog091712; Sun, 14 Nov 2010 19:40:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011141940.oAEJeNog091712@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Nov 2010 19:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215313 - stable/8/bin/sh X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:40:23 -0000 Author: jilles Date: Sun Nov 14 19:40:22 2010 New Revision: 215313 URL: http://svn.freebsd.org/changeset/base/215313 Log: MFC r213925: sh: Use rather than . is only for the kernel and conflicts with . Note: there is no mergeinfo as r213925 was previously "blocked" by obrien. Modified: stable/8/bin/sh/jobs.c Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Sun Nov 14 19:37:07 2010 (r215312) +++ stable/8/bin/sh/jobs.c Sun Nov 14 19:40:22 2010 (r215313) @@ -41,13 +41,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include #include +#include #include #include From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 15 09:41:47 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44097106564A; Mon, 15 Nov 2010 09:41:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31BA08FC17; Mon, 15 Nov 2010 09:41:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF9flww010830; Mon, 15 Nov 2010 09:41:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF9fluL010828; Mon, 15 Nov 2010 09:41:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011150941.oAF9fluL010828@svn.freebsd.org> From: Andriy Gapon Date: Mon, 15 Nov 2010 09:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215337 - stable/8/sys/x86/cpufreq X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 09:41:47 -0000 Author: avg Date: Mon Nov 15 09:41:46 2010 New Revision: 215337 URL: http://svn.freebsd.org/changeset/base/215337 Log: MFC r215131: make it possible to actually enable hwpstate_verbose Modified: stable/8/sys/x86/cpufreq/hwpstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/x86/cpufreq/hwpstate.c ============================================================================== --- stable/8/sys/x86/cpufreq/hwpstate.c Mon Nov 15 07:33:54 2010 (r215336) +++ stable/8/sys/x86/cpufreq/hwpstate.c Mon Nov 15 09:41:46 2010 (r215337) @@ -118,8 +118,9 @@ static int hwpstate_get_info_from_msr(de static int hwpstate_goto_pstate(device_t dev, int pstate_id); static int hwpstate_verbose = 0; -SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RDTUN, +SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RW | CTLFLAG_TUN, &hwpstate_verbose, 0, "Debug hwpstate"); +TUNABLE_INT("debug.hwpstate_verbose", &hwpstate_verbose); static device_method_t hwpstate_methods[] = { /* Device interface */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 15 17:48:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F0DE10656C2; Mon, 15 Nov 2010 17:48:15 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC0208FC17; Mon, 15 Nov 2010 17:48:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFHmEnU023846; Mon, 15 Nov 2010 17:48:14 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFHmDc0023783; Mon, 15 Nov 2010 17:48:13 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201011151748.oAFHmDc0023783@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 15 Nov 2010 17:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215342 - in stable/8/sys: arm/at91 arm/xscale/ixp425 dev/ae dev/an dev/ath dev/bwi dev/bwn dev/ce dev/cm dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed dev/ep dev/ex dev/fe dev/ie dev/i... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 17:48:15 -0000 Author: sobomax Date: Mon Nov 15 17:48:13 2010 New Revision: 215342 URL: http://svn.freebsd.org/changeset/base/215342 Log: MFC r207554: Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. Modified: stable/8/sys/arm/at91/if_ate.c stable/8/sys/arm/xscale/ixp425/if_npe.c stable/8/sys/dev/ae/if_ae.c stable/8/sys/dev/an/if_an.c stable/8/sys/dev/ath/if_ath.c stable/8/sys/dev/bwi/if_bwi.c stable/8/sys/dev/bwn/if_bwn.c stable/8/sys/dev/ce/if_ce.c stable/8/sys/dev/cm/smc90cx6.c stable/8/sys/dev/cp/if_cp.c stable/8/sys/dev/cs/if_cs.c stable/8/sys/dev/ctau/if_ct.c stable/8/sys/dev/cx/if_cx.c stable/8/sys/dev/cxgb/cxgb_main.c stable/8/sys/dev/ed/if_ed.c stable/8/sys/dev/ep/if_ep.c stable/8/sys/dev/ex/if_ex.c stable/8/sys/dev/fe/if_fe.c stable/8/sys/dev/ie/if_ie.c stable/8/sys/dev/iicbus/if_ic.c stable/8/sys/dev/ipw/if_ipw.c stable/8/sys/dev/iwi/if_iwi.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/le/lance.c stable/8/sys/dev/malo/if_malo.c stable/8/sys/dev/mwl/if_mwl.c stable/8/sys/dev/my/if_my.c stable/8/sys/dev/nxge/if_nxge.c stable/8/sys/dev/pdq/pdq_ifsubr.c stable/8/sys/dev/ppbus/if_plip.c stable/8/sys/dev/ral/rt2560.c stable/8/sys/dev/ral/rt2661.c stable/8/sys/dev/sbni/if_sbni.c stable/8/sys/dev/smc/if_smc.c stable/8/sys/dev/sn/if_sn.c stable/8/sys/dev/snc/dp83932.c stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/net/usb_ethernet.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c stable/8/sys/dev/vx/if_vx.c stable/8/sys/dev/wi/if_wi.c stable/8/sys/dev/wl/if_wl.c stable/8/sys/dev/wpi/if_wpi.c stable/8/sys/dev/xe/if_xe.c stable/8/sys/mips/adm5120/if_admsw.c stable/8/sys/net/if.c stable/8/sys/net/if_ef.c stable/8/sys/net/if_gif.c stable/8/sys/net/if_gre.c stable/8/sys/net/if_stf.c stable/8/sys/net80211/ieee80211.c stable/8/sys/netgraph/ng_eiface.c stable/8/sys/netgraph/ng_fec.c stable/8/sys/netgraph/ng_iface.c stable/8/sys/netgraph/ng_tty.c stable/8/sys/pci/if_rl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/at91/if_ate.c ============================================================================== --- stable/8/sys/arm/at91/if_ate.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/arm/at91/if_ate.c Mon Nov 15 17:48:13 2010 (r215342) @@ -274,8 +274,8 @@ ate_attach(device_t dev) ifp->if_ioctl = ateioctl; ifp->if_init = ateinit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; ifp->if_linkmib = &sc->mibdata; Modified: stable/8/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- stable/8/sys/arm/xscale/ixp425/if_npe.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/arm/xscale/ixp425/if_npe.c Mon Nov 15 17:48:13 2010 (r215342) @@ -359,7 +359,7 @@ npe_attach(device_t dev) ifp->if_ioctl = npeioctl; ifp->if_init = npeinit; IFQ_SET_MAXLEN(&ifp->if_snd, sc->txdma.nbuf - 1); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); Modified: stable/8/sys/dev/ae/if_ae.c ============================================================================== --- stable/8/sys/dev/ae/if_ae.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ae/if_ae.c Mon Nov 15 17:48:13 2010 (r215342) @@ -375,7 +375,7 @@ ae_attach(device_t dev) ifp->if_init = ae_init; ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; ifp->if_hwassist = 0; - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { Modified: stable/8/sys/dev/an/if_an.c ============================================================================== --- stable/8/sys/dev/an/if_an.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/an/if_an.c Mon Nov 15 17:48:13 2010 (r215342) @@ -773,8 +773,8 @@ an_attach(struct an_softc *sc, int unit, ifp->if_watchdog = an_watchdog; ifp->if_init = an_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); bzero(sc->an_config.an_nodename, sizeof(sc->an_config.an_nodename)); Modified: stable/8/sys/dev/ath/if_ath.c ============================================================================== --- stable/8/sys/dev/ath/if_ath.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ath/if_ath.c Mon Nov 15 17:48:13 2010 (r215342) @@ -562,8 +562,8 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_start = ath_start; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/8/sys/dev/bwi/if_bwi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/bwi/if_bwi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -462,8 +462,8 @@ bwi_attach(struct bwi_softc *sc) ifp->if_ioctl = bwi_ioctl; ifp->if_start = bwi_start; ifp->if_watchdog = bwi_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Modified: stable/8/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/8/sys/dev/bwn/if_bwn.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/bwn/if_bwn.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1194,8 +1194,8 @@ bwn_attach_pre(struct bwn_softc *sc) ifp->if_init = bwn_init; ifp->if_ioctl = bwn_ioctl; ifp->if_start = bwn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); return (0); Modified: stable/8/sys/dev/ce/if_ce.c ============================================================================== --- stable/8/sys/dev/ce/if_ce.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ce/if_ce.c Mon Nov 15 17:48:13 2010 (r215342) @@ -701,9 +701,9 @@ static int ce_attach (device_t dev) #endif continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->queue.ifq_mtx, "ce_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ce_queue_hi", NULL, MTX_DEF); @@ -733,7 +733,7 @@ static int ce_attach (device_t dev) d->ifp->if_start = ce_ifstart; d->ifp->if_watchdog = ce_ifwatchdog; d->ifp->if_init = ce_initialize; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); #endif Modified: stable/8/sys/dev/cm/smc90cx6.c ============================================================================== --- stable/8/sys/dev/cm/smc90cx6.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cm/smc90cx6.c Mon Nov 15 17:48:13 2010 (r215342) @@ -197,7 +197,7 @@ cm_attach(dev) ifp->if_watchdog = cm_watchdog; ifp->if_init = cm_init; /* XXX IFQ_SET_READY(&ifp->if_snd); */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_timer = 0; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; Modified: stable/8/sys/dev/cp/if_cp.c ============================================================================== --- stable/8/sys/dev/cp/if_cp.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cp/if_cp.c Mon Nov 15 17:48:13 2010 (r215342) @@ -504,8 +504,8 @@ static int cp_attach (device_t dev) NG_NODE_UNREF (d->node); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "cp_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cp_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, CALLOUT_MPSAFE); Modified: stable/8/sys/dev/cs/if_cs.c ============================================================================== --- stable/8/sys/dev/cs/if_cs.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cs/if_cs.c Mon Nov 15 17:48:13 2010 (r215342) @@ -500,7 +500,7 @@ cs_attach(device_t dev) ifp->if_start=cs_start; ifp->if_ioctl=cs_ioctl; ifp->if_init=cs_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_flags=(IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); Modified: stable/8/sys/dev/ctau/if_ct.c ============================================================================== --- stable/8/sys/dev/ctau/if_ct.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ctau/if_ct.c Mon Nov 15 17:48:13 2010 (r215342) @@ -721,8 +721,8 @@ static int ct_attach (device_t dev) ct_bus_dma_mem_free (&d->dmamem); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, CALLOUT_MPSAFE); Modified: stable/8/sys/dev/cx/if_cx.c ============================================================================== --- stable/8/sys/dev/cx/if_cx.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cx/if_cx.c Mon Nov 15 17:48:13 2010 (r215342) @@ -830,8 +830,8 @@ static int cx_attach (device_t dev) cx_bus_dma_mem_free (&d->dmamem); continue; } - d->lo_queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->lo_queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->lo_queue.ifq_mtx, "cx_queue_lo", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cx_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, CALLOUT_MPSAFE); Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cxgb/cxgb_main.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1024,7 +1024,7 @@ cxgb_port_attach(device_t dev) ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; + ifp->if_snd.ifq_drv_maxlen = max(cxgb_snd_queue_len, ifqmaxlen); IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); Modified: stable/8/sys/dev/ed/if_ed.c ============================================================================== --- stable/8/sys/dev/ed/if_ed.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ed/if_ed.c Mon Nov 15 17:48:13 2010 (r215342) @@ -283,8 +283,8 @@ ed_attach(device_t dev) ifp->if_ioctl = ed_ioctl; ifp->if_watchdog = ed_watchdog; ifp->if_init = ed_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof sc->mibdata; Modified: stable/8/sys/dev/ep/if_ep.c ============================================================================== --- stable/8/sys/dev/ep/if_ep.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ep/if_ep.c Mon Nov 15 17:48:13 2010 (r215342) @@ -304,8 +304,8 @@ ep_attach(struct ep_softc *sc) ifp->if_ioctl = epioctl; ifp->if_watchdog = epwatchdog; ifp->if_init = epinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (!sc->epb.mii_trans) { Modified: stable/8/sys/dev/ex/if_ex.c ============================================================================== --- stable/8/sys/dev/ex/if_ex.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ex/if_ex.c Mon Nov 15 17:48:13 2010 (r215342) @@ -237,7 +237,7 @@ ex_attach(device_t dev) ifp->if_start = ex_start; ifp->if_ioctl = ex_ioctl; ifp->if_init = ex_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifmedia_init(&sc->ifmedia, 0, ex_ifmedia_upd, ex_ifmedia_sts); mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, Modified: stable/8/sys/dev/fe/if_fe.c ============================================================================== --- stable/8/sys/dev/fe/if_fe.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/fe/if_fe.c Mon Nov 15 17:48:13 2010 (r215342) @@ -766,7 +766,7 @@ fe_attach (device_t dev) * Set fixed interface flags. */ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); #if FE_SINGLE_TRANSMISSION /* Override txb config to allocate minimum. */ Modified: stable/8/sys/dev/ie/if_ie.c ============================================================================== --- stable/8/sys/dev/ie/if_ie.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ie/if_ie.c Mon Nov 15 17:48:13 2010 (r215342) @@ -318,7 +318,7 @@ ie_attach(device_t dev) ifp->if_start = iestart; ifp->if_ioctl = ieioctl; ifp->if_init = ieinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ether_ifattach(ifp, sc->enaddr); Modified: stable/8/sys/dev/iicbus/if_ic.c ============================================================================== --- stable/8/sys/dev/iicbus/if_ic.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/iicbus/if_ic.c Mon Nov 15 17:48:13 2010 (r215342) @@ -181,7 +181,7 @@ icattach(device_t dev) ifp->if_output = icoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ic_alloc_buffers(sc, ICMTU); Modified: stable/8/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/8/sys/dev/ipw/if_ipw.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ipw/if_ipw.c Mon Nov 15 17:48:13 2010 (r215342) @@ -289,8 +289,8 @@ ipw_attach(device_t dev) ifp->if_init = ipw_init; ifp->if_ioctl = ipw_ioctl; ifp->if_start = ipw_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/8/sys/dev/iwi/if_iwi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/iwi/if_iwi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -365,8 +365,8 @@ iwi_attach(device_t dev) ifp->if_init = iwi_init; ifp->if_ioctl = iwi_ioctl; ifp->if_start = iwi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/iwn/if_iwn.c Mon Nov 15 17:48:13 2010 (r215342) @@ -640,8 +640,8 @@ iwn_attach(device_t dev) ifp->if_init = iwn_init; ifp->if_ioctl = iwn_ioctl; ifp->if_start = iwn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/le/lance.c ============================================================================== --- stable/8/sys/dev/le/lance.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/le/lance.c Mon Nov 15 17:48:13 2010 (r215342) @@ -133,8 +133,8 @@ lance_config(struct lance_softc *sc, con ifp->if_flags &= ~IFF_MULTICAST; #endif ifp->if_baudrate = IF_Mbps(10); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Initialize ifmedia structures. */ Modified: stable/8/sys/dev/malo/if_malo.c ============================================================================== --- stable/8/sys/dev/malo/if_malo.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/malo/if_malo.c Mon Nov 15 17:48:13 2010 (r215342) @@ -275,8 +275,8 @@ malo_attach(uint16_t devid, struct malo_ ifp->if_watchdog = malo_watchdog; ifp->if_ioctl = malo_ioctl; ifp->if_init = malo_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/8/sys/dev/mwl/if_mwl.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/mwl/if_mwl.c Mon Nov 15 17:48:13 2010 (r215342) @@ -404,8 +404,8 @@ mwl_attach(uint16_t devid, struct mwl_so ifp->if_watchdog = mwl_watchdog; ifp->if_ioctl = mwl_ioctl; ifp->if_init = mwl_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/my/if_my.c ============================================================================== --- stable/8/sys/dev/my/if_my.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/my/if_my.c Mon Nov 15 17:48:13 2010 (r215342) @@ -889,8 +889,8 @@ my_attach(device_t dev) ifp->if_watchdog = my_watchdog; ifp->if_init = my_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (sc->my_info->my_did == MTD803ID) Modified: stable/8/sys/dev/nxge/if_nxge.c ============================================================================== --- stable/8/sys/dev/nxge/if_nxge.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/nxge/if_nxge.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1190,7 +1190,7 @@ xge_interface_setup(device_t dev) ifnetp->if_start = xge_send; /* TODO: Check and assign optimal value */ - ifnetp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifnetp->if_snd.ifq_maxlen = ifqmaxlen; ifnetp->if_capabilities = IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM; Modified: stable/8/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- stable/8/sys/dev/pdq/pdq_ifsubr.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/pdq/pdq_ifsubr.c Mon Nov 15 17:48:13 2010 (r215342) @@ -423,7 +423,7 @@ pdq_ifattach(pdq_softc_t *sc, const pdq_ ifp->if_softc = sc; ifp->if_init = (if_init_f_t *)pdq_ifinit; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST; ifp->if_watchdog = pdq_ifwatchdog; Modified: stable/8/sys/dev/ppbus/if_plip.c ============================================================================== --- stable/8/sys/dev/ppbus/if_plip.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ppbus/if_plip.c Mon Nov 15 17:48:13 2010 (r215342) @@ -262,7 +262,7 @@ lp_attach(device_t dev) ifp->if_output = lpoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: stable/8/sys/dev/ral/rt2560.c ============================================================================== --- stable/8/sys/dev/ral/rt2560.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ral/rt2560.c Mon Nov 15 17:48:13 2010 (r215342) @@ -267,8 +267,8 @@ rt2560_attach(device_t dev, int id) ifp->if_init = rt2560_init; ifp->if_ioctl = rt2560_ioctl; ifp->if_start = rt2560_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/ral/rt2661.c ============================================================================== --- stable/8/sys/dev/ral/rt2661.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ral/rt2661.c Mon Nov 15 17:48:13 2010 (r215342) @@ -269,8 +269,8 @@ rt2661_attach(device_t dev, int id) ifp->if_init = rt2661_init; ifp->if_ioctl = rt2661_ioctl; ifp->if_start = rt2661_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/sbni/if_sbni.c ============================================================================== --- stable/8/sys/dev/sbni/if_sbni.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/sbni/if_sbni.c Mon Nov 15 17:48:13 2010 (r215342) @@ -235,7 +235,7 @@ sbni_attach(struct sbni_softc *sc, int u ifp->if_init = sbni_init; ifp->if_start = sbni_start; ifp->if_ioctl = sbni_ioctl; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); /* report real baud rate */ csr0 = sbni_inb(sc, CSR0); Modified: stable/8/sys/dev/smc/if_smc.c ============================================================================== --- stable/8/sys/dev/smc/if_smc.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/smc/if_smc.c Mon Nov 15 17:48:13 2010 (r215342) @@ -348,7 +348,7 @@ smc_attach(device_t dev) ifp->if_init = smc_init; ifp->if_ioctl = smc_ioctl; ifp->if_start = smc_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = ifp->if_capenable = 0; Modified: stable/8/sys/dev/sn/if_sn.c ============================================================================== --- stable/8/sys/dev/sn/if_sn.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/sn/if_sn.c Mon Nov 15 17:48:13 2010 (r215342) @@ -205,8 +205,8 @@ sn_attach(device_t dev) ifp->if_watchdog = snwatchdog; ifp->if_init = sninit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; Modified: stable/8/sys/dev/snc/dp83932.c ============================================================================== --- stable/8/sys/dev/snc/dp83932.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/snc/dp83932.c Mon Nov 15 17:48:13 2010 (r215342) @@ -177,7 +177,7 @@ sncconfig(sc, media, nmedia, defmedia, m ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = sncinit; ifp->if_mtu = ETHERMTU; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); /* Initialize media goo. */ ifmedia_init(&sc->sc_media, 0, snc_mediachange, Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/net/uhso.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1471,8 +1471,8 @@ static int uhso_attach_ifnet(struct uhso ifp->if_output = uhso_if_output; ifp->if_flags = 0; ifp->if_softc = sc; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if_attach(ifp); Modified: stable/8/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- stable/8/sys/dev/usb/net/usb_ethernet.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/net/usb_ethernet.c Mon Nov 15 17:48:13 2010 (r215342) @@ -214,8 +214,8 @@ ue_attach_post_task(struct usb_proc_msg ifp->if_ioctl = uether_ioctl; ifp->if_start = ue_start; ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ue->ue_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_rum.c Mon Nov 15 17:48:13 2010 (r215342) @@ -478,8 +478,8 @@ rum_attach(device_t self) ifp->if_init = rum_init; ifp->if_ioctl = rum_ioctl; ifp->if_start = rum_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_run.c Mon Nov 15 17:48:13 2010 (r215342) @@ -615,8 +615,8 @@ run_attach(device_t self) ifp->if_init = run_init; ifp->if_ioctl = run_ioctl; ifp->if_start = run_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_uath.c Mon Nov 15 17:48:13 2010 (r215342) @@ -438,8 +438,8 @@ uath_attach(device_t dev) ifp->if_ioctl = uath_ioctl; ifp->if_start = uath_start; /* XXX UATH_TX_DATA_LIST_COUNT */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Mon Nov 15 17:48:13 2010 (r215342) @@ -332,7 +332,7 @@ upgt_attach(device_t dev) ifp->if_init = upgt_init; ifp->if_ioctl = upgt_ioctl; ifp->if_start = upgt_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_ural.c Mon Nov 15 17:48:13 2010 (r215342) @@ -467,8 +467,8 @@ ural_attach(device_t self) ifp->if_init = ural_init; ifp->if_ioctl = ural_ioctl; ifp->if_start = ural_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Mon Nov 15 17:48:13 2010 (r215342) @@ -868,8 +868,8 @@ urtw_attach(device_t dev) ifp->if_ioctl = urtw_ioctl; ifp->if_start = urtw_start; /* XXX URTW_TX_DATA_LIST_COUNT */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Mon Nov 15 17:48:13 2010 (r215342) @@ -381,7 +381,7 @@ zyd_attach(device_t dev) ifp->if_init = zyd_init; ifp->if_ioctl = zyd_ioctl; ifp->if_start = zyd_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/vx/if_vx.c ============================================================================== --- stable/8/sys/dev/vx/if_vx.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/vx/if_vx.c Mon Nov 15 17:48:13 2010 (r215342) @@ -188,7 +188,7 @@ vx_attach(device_t dev) } ifp->if_mtu = ETHERMTU; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = vx_start; ifp->if_ioctl = vx_ioctl; Modified: stable/8/sys/dev/wi/if_wi.c ============================================================================== --- stable/8/sys/dev/wi/if_wi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/wi/if_wi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -333,8 +333,8 @@ wi_attach(device_t dev) ifp->if_ioctl = wi_ioctl; ifp->if_start = wi_start; ifp->if_init = wi_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/wl/if_wl.c ============================================================================== --- stable/8/sys/dev/wl/if_wl.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/wl/if_wl.c Mon Nov 15 17:48:13 2010 (r215342) @@ -560,7 +560,7 @@ wlattach(device_t device) ifp->if_start = wlstart; ifp->if_ioctl = wlioctl; ifp->if_timer = 0; /* paranoia */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* no entries ifp->if_watchdog ifp->if_done Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/wpi/if_wpi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -662,8 +662,8 @@ wpi_attach(device_t dev) ifp->if_init = wpi_init; ifp->if_ioctl = wpi_ioctl; ifp->if_start = wpi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/xe/if_xe.c ============================================================================== --- stable/8/sys/dev/xe/if_xe.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/xe/if_xe.c Mon Nov 15 17:48:13 2010 (r215342) @@ -254,7 +254,7 @@ xe_attach(device_t dev) scp->ifp->if_ioctl = xe_ioctl; scp->ifp->if_init = xe_init; scp->ifp->if_baudrate = 100000000; - IFQ_SET_MAXLEN(&scp->ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&scp->ifp->if_snd, ifqmaxlen); /* Initialise the ifmedia structure */ ifmedia_init(scp->ifm, 0, xe_media_change, xe_media_status); Modified: stable/8/sys/mips/adm5120/if_admsw.c ============================================================================== --- stable/8/sys/mips/adm5120/if_admsw.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/mips/adm5120/if_admsw.c Mon Nov 15 17:48:13 2010 (r215342) @@ -541,8 +541,8 @@ admsw_attach(device_t dev) ifp->if_init = admsw_init; ifp->if_mtu = ETHERMTU; ifp->if_baudrate = IF_Mbps(100); - IFQ_SET_MAXLEN(&ifp->if_snd, max(ADMSW_NTXLDESC, IFQ_MAXLEN)); - ifp->if_snd.ifq_drv_maxlen = max(ADMSW_NTXLDESC, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, max(ADMSW_NTXLDESC, ifqmaxlen)); + ifp->if_snd.ifq_drv_maxlen = max(ADMSW_NTXLDESC, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities |= IFCAP_VLAN_MTU; Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if.c Mon Nov 15 17:48:13 2010 (r215342) @@ -101,6 +101,10 @@ static int slowtimo_started; SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); +TUNABLE_INT("net.link.ifqmaxlen", &ifqmaxlen); +SYSCTL_UINT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, + &ifqmaxlen, 0, "max send queue size"); + /* Log link state change events */ static int log_link_state_change = 1; Modified: stable/8/sys/net/if_ef.c ============================================================================== --- stable/8/sys/net/if_ef.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_ef.c Mon Nov 15 17:48:13 2010 (r215342) @@ -129,7 +129,7 @@ ef_attach(struct efnet *sc) ifp->if_start = ef_start; ifp->if_init = ef_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); /* * Attach the interface Modified: stable/8/sys/net/if_gif.c ============================================================================== --- stable/8/sys/net/if_gif.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_gif.c Mon Nov 15 17:48:13 2010 (r215342) @@ -185,7 +185,7 @@ gif_clone_create(ifc, unit, params) GIF2IFP(sc)->if_ioctl = gif_ioctl; GIF2IFP(sc)->if_start = gif_start; GIF2IFP(sc)->if_output = gif_output; - GIF2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GIF2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) Modified: stable/8/sys/net/if_gre.c ============================================================================== --- stable/8/sys/net/if_gre.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_gre.c Mon Nov 15 17:48:13 2010 (r215342) @@ -191,7 +191,7 @@ gre_clone_create(ifc, unit, params) GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), ifc->ifc_name, unit); - GRE2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GRE2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; GRE2IFP(sc)->if_addrlen = 0; GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ GRE2IFP(sc)->if_mtu = GREMTU; Modified: stable/8/sys/net/if_stf.c ============================================================================== --- stable/8/sys/net/if_stf.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_stf.c Mon Nov 15 17:48:13 2010 (r215342) @@ -252,7 +252,7 @@ stf_clone_create(struct if_clone *ifc, c ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl; ifp->if_output = stf_output; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); return (0); Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net80211/ieee80211.c Mon Nov 15 17:48:13 2010 (r215342) @@ -394,8 +394,8 @@ ieee80211_vap_setup(struct ieee80211com ifp->if_ioctl = ieee80211_ioctl; ifp->if_init = ieee80211_init; /* NB: input+output filled in by ether_ifattach */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); vap->iv_ifp = ifp; Modified: stable/8/sys/netgraph/ng_eiface.c ============================================================================== --- stable/8/sys/netgraph/ng_eiface.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_eiface.c Mon Nov 15 17:48:13 2010 (r215342) @@ -369,7 +369,7 @@ ng_eiface_constructor(node_p node) ifp->if_output = ether_output; ifp->if_start = ng_eiface_start; ifp->if_ioctl = ng_eiface_ioctl; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); /* Give this node the same name as the interface (if possible) */ Modified: stable/8/sys/netgraph/ng_fec.c ============================================================================== --- stable/8/sys/netgraph/ng_fec.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_fec.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1227,7 +1227,7 @@ ng_fec_constructor(node_p node) ifp->if_start = ng_fec_start; ifp->if_ioctl = ng_fec_ioctl; ifp->if_init = ng_fec_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_mtu = NG_FEC_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST); ifp->if_addrlen = 0; /* XXX */ Modified: stable/8/sys/netgraph/ng_iface.c ============================================================================== --- stable/8/sys/netgraph/ng_iface.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_iface.c Mon Nov 15 17:48:13 2010 (r215342) @@ -564,8 +564,8 @@ ng_iface_constructor(node_p node) ifp->if_addrlen = 0; /* XXX */ ifp->if_hdrlen = 0; /* XXX */ ifp->if_baudrate = 64000; /* XXX */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Give this node the same name as the interface (if possible) */ Modified: stable/8/sys/netgraph/ng_tty.c ============================================================================== --- stable/8/sys/netgraph/ng_tty.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_tty.c Mon Nov 15 17:48:13 2010 (r215342) @@ -164,7 +164,7 @@ ngt_constructor(node_p node) sc->node = node; mtx_init(&sc->outq.ifq_mtx, "ng_tty node+queue", NULL, MTX_DEF); - IFQ_SET_MAXLEN(&sc->outq, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&sc->outq, ifqmaxlen); return (0); } Modified: stable/8/sys/pci/if_rl.c ============================================================================== --- stable/8/sys/pci/if_rl.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/pci/if_rl.c Mon Nov 15 17:48:13 2010 (r215342) @@ -960,8 +960,8 @@ rl_attach(device_t dev) #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 15 23:51:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B6E6106566C; Mon, 15 Nov 2010 23:51:12 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D25038FC0A; Mon, 15 Nov 2010 23:51:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFNpB12032593; Mon, 15 Nov 2010 23:51:11 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNpBMQ032589; Mon, 15 Nov 2010 23:51:11 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011152351.oAFNpBMQ032589@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 15 Nov 2010 23:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215356 - in stable/8/sys/netinet: . libalias X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:51:12 -0000 Author: lstewart Date: Mon Nov 15 23:51:11 2010 New Revision: 215356 URL: http://svn.freebsd.org/changeset/base/215356 Log: MFC r215152: The university does not require that its CRICOS number be included in source code. Remove all references from the tree. Modified: stable/8/sys/netinet/libalias/alias_sctp.c stable/8/sys/netinet/libalias/alias_sctp.h stable/8/sys/netinet/siftr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/libalias/alias_sctp.c ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.c Mon Nov 15 23:38:52 2010 (r215355) +++ stable/8/sys/netinet/libalias/alias_sctp.c Mon Nov 15 23:51:11 2010 (r215356) @@ -1,8 +1,7 @@ /** * @file alias_sctp.c * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/8/sys/netinet/libalias/alias_sctp.h ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.h Mon Nov 15 23:38:52 2010 (r215355) +++ stable/8/sys/netinet/libalias/alias_sctp.h Mon Nov 15 23:51:11 2010 (r215356) @@ -1,8 +1,7 @@ /** * @file alias_sctp.h * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/8/sys/netinet/siftr.c ============================================================================== --- stable/8/sys/netinet/siftr.c Mon Nov 15 23:38:52 2010 (r215355) +++ stable/8/sys/netinet/siftr.c Mon Nov 15 23:51:11 2010 (r215356) @@ -1,7 +1,6 @@ /*- * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 00:01:45 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B48106566B; Tue, 16 Nov 2010 00:01:45 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24B098FC19; Tue, 16 Nov 2010 00:01:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG01jUt032984; Tue, 16 Nov 2010 00:01:45 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG01jWB032980; Tue, 16 Nov 2010 00:01:45 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160001.oAG01jWB032980@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 00:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215359 - in stable/8/sys/netinet: . libalias X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 00:01:45 -0000 Author: lstewart Date: Tue Nov 16 00:01:44 2010 New Revision: 215359 URL: http://svn.freebsd.org/changeset/base/215359 Log: MFC r215153: Standardise all Swinburne related copyright/licence statements throughout the tree in preparation for another large code import. Swinburne University is the legal entity that owns copyright and the 2-clause BSD licence is acceptable. Modified: stable/8/sys/netinet/libalias/alias_sctp.c stable/8/sys/netinet/libalias/alias_sctp.h stable/8/sys/netinet/siftr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/libalias/alias_sctp.c ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.c Tue Nov 16 00:00:31 2010 (r215358) +++ stable/8/sys/netinet/libalias/alias_sctp.c Tue Nov 16 00:01:44 2010 (r215359) @@ -1,8 +1,7 @@ -/** - * @file alias_sctp.c - * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. - * +/*- + * Copyright (c) 2008 + * Swinburne University of Technology, Melbourne, Australia. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -11,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The names of the authors, the "Centre for Advanced Internet Architectures" - * and "Swinburne University of Technology" may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -27,7 +22,9 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * + */ + +/* * Alias_sctp forms part of the libalias kernel module to handle * Network Address Translation (NAT) for the SCTP protocol. * Modified: stable/8/sys/netinet/libalias/alias_sctp.h ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.h Tue Nov 16 00:00:31 2010 (r215358) +++ stable/8/sys/netinet/libalias/alias_sctp.h Tue Nov 16 00:01:44 2010 (r215359) @@ -1,8 +1,7 @@ -/** - * @file alias_sctp.h - * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. - * +/*- + * Copyright (c) 2008 + * Swinburne University of Technology, Melbourne, Australia. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -11,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The names of the authors, the "Centre for Advanced Internet Architectures" - * and "Swinburne University of Technology" may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -27,7 +22,9 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * + */ + +/* * Alias_sctp forms part of the libalias kernel module to handle * Network Address Translation (NAT) for the SCTP protocol. * Modified: stable/8/sys/netinet/siftr.c ============================================================================== --- stable/8/sys/netinet/siftr.c Tue Nov 16 00:00:31 2010 (r215358) +++ stable/8/sys/netinet/siftr.c Tue Nov 16 00:01:44 2010 (r215359) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. + * Copyright (c) 2007-2009 + * Swinburne University of Technology, Melbourne, Australia. * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 00:06:49 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0837F1065670; Tue, 16 Nov 2010 00:06:49 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA3848FC21; Tue, 16 Nov 2010 00:06:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG06mM2033209; Tue, 16 Nov 2010 00:06:48 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG06mWg033207; Tue, 16 Nov 2010 00:06:48 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160006.oAG06mWg033207@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 00:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215361 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 00:06:49 -0000 Author: lstewart Date: Tue Nov 16 00:06:48 2010 New Revision: 215361 URL: http://svn.freebsd.org/changeset/base/215361 Log: MFC r215154: The first releases SIFTR will ship in will be 7.4 and 8.2. Modified: stable/8/share/man/man4/siftr.4 Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man4/siftr.4 ============================================================================== --- stable/8/share/man/man4/siftr.4 Tue Nov 16 00:06:19 2010 (r215360) +++ stable/8/share/man/man4/siftr.4 Tue Nov 16 00:06:48 2010 (r215361) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2010 +.Dd November 12, 2010 .Dt SIFTR 4 .Os .Sh NAME @@ -610,7 +610,9 @@ and the FreeBSD Foundation. .Sh HISTORY .Nm first appeared in -.Fx 9.0 . +.Fx 7.4 +and +.Fx 8.2 . .Pp .Nm was first released in 2007 by Lawrence Stewart and James Healy whilst working on From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 00:32:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D0A61065673; Tue, 16 Nov 2010 00:32:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D43858FC18; Tue, 16 Nov 2010 00:32:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG0WHka033756; Tue, 16 Nov 2010 00:32:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG0WHcf033754; Tue, 16 Nov 2010 00:32:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011160032.oAG0WHcf033754@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 00:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215362 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 00:32:18 -0000 Author: yongari Date: Tue Nov 16 00:32:17 2010 New Revision: 215362 URL: http://svn.freebsd.org/changeset/base/215362 Log: MFC r214968: Use shorten model name instead of showing all controller model numbers. bge(4) supports too many models such that it's unreasonable to list all these controllers in one line description of name. While I'm here mention that BCM590x/BCM5779x is Fast Ethernet controller. bge(4) still lacks support for some controllers but supporting these controllers should be easy now and adding new controllers do not require touching .Nd any more. Obtained from: OpenBSD Modified: stable/8/share/man/man4/bge.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/bge.4 ============================================================================== --- stable/8/share/man/man4/bge.4 Tue Nov 16 00:06:48 2010 (r215361) +++ stable/8/share/man/man4/bge.4 Tue Nov 16 00:32:17 2010 (r215362) @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2010 +.Dd November 7, 2010 .Dt BGE 4 .Os .Sh NAME .Nm bge -.Nd "Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5761/5784/5789/57780 PCI Gigabit Ethernet adapter driver" +.Nd "Broadcom BCM57xx/BCM590x Gigabit/Fast Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -56,8 +56,8 @@ if_bge_load="YES" The .Nm driver provides support for various NICs based on the Broadcom BCM570x, -5714, 5721, 5722, 5750, 5751, 5752, 5761, 5784, 5789 and 57780 families -of Gigabit Ethernet controller chips. +571x, 572x, 575x, 576x, 578x, 5776x and 5778x Gigabit Ethernet controller +chips and the 590x and 5779x Fast Ethernet controller chips. .Pp All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 copper cable, except for the SysKonnect SK-9D41 which supports only @@ -82,7 +82,7 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5702, BCM5703 and BCM5704 also support +The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704 and BCM5717 also support jumbo frames, which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 04:40:28 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07B011065704; Tue, 16 Nov 2010 04:40:28 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA22A8FC12; Tue, 16 Nov 2010 04:40:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG4eRA0039535; Tue, 16 Nov 2010 04:40:27 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG4eRr9039533; Tue, 16 Nov 2010 04:40:27 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160440.oAG4eRr9039533@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 04:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215369 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 04:40:28 -0000 Author: alc Date: Tue Nov 16 04:40:27 2010 New Revision: 215369 URL: http://svn.freebsd.org/changeset/base/215369 Log: MFC r214953 In case the stack size reaches its limit and its growth must be restricted, ensure that grow_amount is a multiple of the page size. Otherwise, the kernel may crash in swap_reserve_by_uid() on HEAD and FreeBSD 8.x, and produce a core file with a missing stack on FreeBSD 7.x. Modified: stable/8/sys/vm/vm_map.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Tue Nov 16 04:40:03 2010 (r215368) +++ stable/8/sys/vm/vm_map.c Tue Nov 16 04:40:27 2010 (r215369) @@ -3343,7 +3343,8 @@ Retry: if (grow_amount > stack_entry->avail_ssize) grow_amount = stack_entry->avail_ssize; if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) { - grow_amount = stacklim - ctob(vm->vm_ssize); + grow_amount = trunc_page((vm_size_t)stacklim) - + ctob(vm->vm_ssize); } /* If we would blow our VMEM resource limit, no go */ From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 05:06:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43311065679; Tue, 16 Nov 2010 05:06:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 985F28FC15; Tue, 16 Nov 2010 05:06:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG56Kxw040265; Tue, 16 Nov 2010 05:06:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG56K99040263; Tue, 16 Nov 2010 05:06:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160506.oAG56K99040263@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 05:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215372 - stable/8/sys/i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 05:06:20 -0000 Author: alc Date: Tue Nov 16 05:06:20 2010 New Revision: 215372 URL: http://svn.freebsd.org/changeset/base/215372 Log: MFC r214938 Eliminate a possible race between pmap_pinit() and pmap_kenter_pde() on superpage promotion or demotion. Micro-optimize pmap_kenter_pde(). Modified: stable/8/sys/i386/i386/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:01:27 2010 (r215371) +++ stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:06:20 2010 (r215372) @@ -1649,11 +1649,19 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return pmap_unwire_pte_hold(pmap, mpte, free); } +/* + * Initialize the pmap for the swapper process. + */ void pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); + /* + * Since the page table directory is shared with the kernel pmap, + * which is already included in the list "allpmaps", this pmap does + * not need to be inserted into that list. + */ pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); #ifdef PAE pmap->pm_pdpt = (pdpt_entry_t *)(KERNBASE + (vm_offset_t)IdlePDPT); @@ -1663,9 +1671,6 @@ pmap_pinit0(pmap_t pmap) PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); - mtx_lock_spin(&allpmaps_lock); - LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); } /* @@ -1730,9 +1735,9 @@ pmap_pinit(pmap_t pmap) mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); - /* Wire in kernel global address entries. */ + /* Copy the kernel page table directory entries. */ bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); + mtx_unlock_spin(&allpmaps_lock); /* install self-referential address mapping entry(s) */ for (i = 0; i < NPGPTD; i++) { From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 05:46:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A219106566B; Tue, 16 Nov 2010 05:46:36 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379158FC0C; Tue, 16 Nov 2010 05:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG5ka82041158; Tue, 16 Nov 2010 05:46:36 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG5kaS7041154; Tue, 16 Nov 2010 05:46:36 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160546.oAG5kaS7041154@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 05:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215373 - in stable/8/sys/i386: i386 include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 05:46:36 -0000 Author: alc Date: Tue Nov 16 05:46:35 2010 New Revision: 215373 URL: http://svn.freebsd.org/changeset/base/215373 Log: MFC r213455 Initialize KPTmap in locore so that vm86.c can call vtophys() (or really pmap_kextract()) before pmap_bootstrap() is called. Document the set of pmap functions that may be called before pmap_bootstrap() is called. Modified: stable/8/sys/i386/i386/locore.s stable/8/sys/i386/i386/pmap.c stable/8/sys/i386/include/pmap.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/i386/locore.s ============================================================================== --- stable/8/sys/i386/i386/locore.s Tue Nov 16 05:06:20 2010 (r215372) +++ stable/8/sys/i386/i386/locore.s Tue Nov 16 05:46:35 2010 (r215373) @@ -104,6 +104,9 @@ IdlePTD: .long 0 /* phys addr of kernel IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #endif + .globl KPTmap +KPTmap: .long 0 /* address of kernel page tables */ + .globl KPTphys KPTphys: .long 0 /* phys addr of kernel page tables */ @@ -717,6 +720,8 @@ no_kernend: /* Allocate Kernel Page Tables */ ALLOCPAGES(NKPT) movl %esi,R(KPTphys) + addl $(KERNBASE-(KPTDI<<(PDRSHIFT-PAGE_SHIFT+PTESHIFT))),%esi + movl %esi,R(KPTmap) /* Allocate Page Table Directory */ #ifdef PAE @@ -780,6 +785,11 @@ no_kernend: shrl $PAGE_SHIFT,%ecx fillkptphys($PG_RW) +/* Map page table pages. */ + movl R(KPTphys),%eax + movl $NKPT,%ecx + fillkptphys($PG_RW) + /* Map page directory. */ #ifdef PAE movl R(IdlePDPT), %eax Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:06:20 2010 (r215372) +++ stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:46:35 2010 (r215373) @@ -243,7 +243,7 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0, *KPTmap; +pt_entry_t *CMAP1 = 0; static pt_entry_t *CMAP3; static pd_entry_t *KPTD; caddr_t CADDR1 = 0, ptvmmap = 0; @@ -375,12 +375,11 @@ pmap_bootstrap(vm_paddr_t firstaddr) int i; /* - * XXX The calculation of virtual_avail is wrong. It's NKPT*PAGE_SIZE too - * large. It should instead be correctly calculated in locore.s and - * not based on 'first' (which is a physical address, not a virtual - * address, for the start of unused physical memory). The kernel - * page tables are NOT double mapped and thus should not be included - * in this calculation. + * Initialize the first available kernel virtual address. However, + * using "firstaddr" may waste a few pages of the kernel virtual + * address space, because locore may not have mapped every physical + * page that it allocated. Preferably, locore would provide a first + * unused virtual address in addition to "firstaddr". */ virtual_avail = (vm_offset_t) KERNBASE + firstaddr; virtual_avail = pmap_kmem_choose(virtual_avail); @@ -452,6 +451,10 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * KPTmap is used by pmap_kextract(). + * + * KPTmap is first initialized by locore. However, that initial + * KPTmap can only support NKPT page table pages. Here, a larger + * KPTmap is created that can support KVA_PAGES page table pages. */ SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES) @@ -1364,6 +1367,8 @@ pmap_extract_and_hold(pmap_t pmap, vm_of /* * Add a wired page to the kva. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kenter(vm_offset_t va, vm_paddr_t pa) @@ -1386,6 +1391,8 @@ pmap_kenter_attr(vm_offset_t va, vm_padd /* * Remove a page from the kernel pagetables. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kremove(vm_offset_t va) Modified: stable/8/sys/i386/include/pmap.h ============================================================================== --- stable/8/sys/i386/include/pmap.h Tue Nov 16 05:06:20 2010 (r215372) +++ stable/8/sys/i386/include/pmap.h Tue Nov 16 05:46:35 2010 (r215373) @@ -191,12 +191,21 @@ extern pdpt_entry_t *IdlePDPT; extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */ /* - * virtual address to page table entry and - * to physical address. - * Note: these work recursively, thus vtopte of a pte will give - * the corresponding pde that in turn maps it. + * Translate a virtual address to the kernel virtual address of its page table + * entry (PTE). This can be used recursively. If the address of a PTE as + * previously returned by this macro is itself given as the argument, then the + * address of the page directory entry (PDE) that maps the PTE will be + * returned. + * + * This macro may be used before pmap_bootstrap() is called. */ #define vtopte(va) (PTmap + i386_btop(va)) + +/* + * Translate a virtual address to its physical address. + * + * This macro may be used before pmap_bootstrap() is called. + */ #define vtophys(va) pmap_kextract((vm_offset_t)(va)) #ifdef XEN @@ -272,14 +281,18 @@ pte_load_store_ma(pt_entry_t *ptep, pt_e * table pages, and not user page table pages, and (2) it provides access to * a kernel page table page after the corresponding virtual addresses have * been promoted to a 2/4MB page mapping. + * + * KPTmap is first initialized by locore to support just NPKT page table + * pages. Later, it is reinitialized by pmap_bootstrap() to allow for + * expansion of the kernel page table. */ extern pt_entry_t *KPTmap; /* - * Routine: pmap_kextract - * Function: - * Extract the physical page address associated - * kernel virtual address. + * Extract from the kernel page table the physical address that is mapped by + * the given virtual address "va". + * + * This function may be used before pmap_bootstrap() is called. */ static __inline vm_paddr_t pmap_kextract(vm_offset_t va) @@ -483,6 +496,11 @@ extern vm_offset_t virtual_end; #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) +/* + * Only the following functions or macros may be used before pmap_bootstrap() + * is called: pmap_kenter(), pmap_kextract(), pmap_kremove(), vtophys(), and + * vtopte(). + */ void pmap_bootstrap(vm_paddr_t); int pmap_cache_bits(int mode, boolean_t is_pde); int pmap_change_attr(vm_offset_t, vm_size_t, int); From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:16:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A122C1065672; Tue, 16 Nov 2010 07:16:40 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1898FC14; Tue, 16 Nov 2010 07:16:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7GeQ0043238; Tue, 16 Nov 2010 07:16:40 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7GeiQ043236; Tue, 16 Nov 2010 07:16:40 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160716.oAG7GeiQ043236@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215378 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:16:40 -0000 Author: brucec Date: Tue Nov 16 07:16:40 2010 New Revision: 215378 URL: http://svn.freebsd.org/changeset/base/215378 Log: MFC r215263: Add ftp4.se.freebsd.org to the set of mirrors. PR: bin/150552 Submitted by: Niclas Zeising Modified: stable/8/usr.sbin/sysinstall/menus.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/menus.c ============================================================================== --- stable/8/usr.sbin/sysinstall/menus.c Tue Nov 16 07:09:05 2010 (r215377) +++ stable/8/usr.sbin/sysinstall/menus.c Tue Nov 16 07:16:40 2010 (r215378) @@ -793,6 +793,8 @@ DMenu MenuMediaFTP = { VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" }, + { " Sweden #4", "ftp4.se.freebsd.org", NULL, dmenuSetVariable, NULL, + VAR_FTP_PATH "=ftp://ftp4.se.freebsd.org" }, { " Sweden #5", "ftp5.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.se.freebsd.org" }, From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:24:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC30106564A; Tue, 16 Nov 2010 07:24:18 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5C9A8FC14; Tue, 16 Nov 2010 07:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7OHuj043510; Tue, 16 Nov 2010 07:24:17 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7OHuF043508; Tue, 16 Nov 2010 07:24:17 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160724.oAG7OHuF043508@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215380 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:24:18 -0000 Author: brucec Date: Tue Nov 16 07:24:17 2010 New Revision: 215380 URL: http://svn.freebsd.org/changeset/base/215380 Log: MFC r215239: Memory stats are reported in bytes, not pages. PR: docs/151283 Submitted by: Bas Smeelen Modified: stable/8/usr.bin/top/top.local.1 Directory Properties: stable/8/usr.bin/top/ (props changed) Modified: stable/8/usr.bin/top/top.local.1 ============================================================================== --- stable/8/usr.bin/top/top.local.1 Tue Nov 16 07:19:05 2010 (r215379) +++ stable/8/usr.bin/top/top.local.1 Tue Nov 16 07:24:17 2010 (r215380) @@ -6,8 +6,8 @@ The '-H' option will toggle the display At runtime the 'H' key will toggle this mode. The default is OFF. .SH DESCRIPTION OF MEMORY -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free -Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out +Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free +Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out .B K: Kilobyte @@ -19,23 +19,23 @@ Megabyte 1/100 .TP .B Active: -number of pages active +number of bytes active .TP .B Inact: -number of pages inactive +number of bytes inactive .TP .B Wired: -number of pages wired down, including cached file data pages +number of bytes wired down, including cached file data pages .TP .B Cache: -number of clean pages caching data that are available for +number of clean bytes caching data that are available for immediate reallocation .TP .B Buf: -number of pages used for BIO-level disk caching +number of bytes used for BIO-level disk caching .TP .B Free: -number of pages free +number of bytes free .TP .B Total: total available swap usage @@ -47,7 +47,7 @@ total free swap usage swap usage .TP .B In: -pages paged in from swap devices (last interval) +bytes paged in from swap devices (last interval) .TP .B Out: -pages paged out to swap devices (last interval) +bytes paged out to swap devices (last interval) From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:30:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DF61065674; Tue, 16 Nov 2010 07:30:52 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2060B8FC19; Tue, 16 Nov 2010 07:30:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7UqD9043769; Tue, 16 Nov 2010 07:30:52 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7Uqi0043767; Tue, 16 Nov 2010 07:30:52 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160730.oAG7Uqi0043767@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215382 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:30:52 -0000 Author: brucec Date: Tue Nov 16 07:30:51 2010 New Revision: 215382 URL: http://svn.freebsd.org/changeset/base/215382 Log: MFC r214381: Add information about the values and default setting of the kern.cam.ada.spindown_shutdown sysctl. Modified: stable/8/share/man/man4/ada.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Nov 16 07:26:49 2010 (r215381) +++ stable/8/share/man/man4/ada.4 Tue Nov 16 07:30:51 2010 (r215382) @@ -121,6 +121,7 @@ seconds. .It kern.cam.ada.spindown_shutdown .Pp This variable determines whether to spin-down disks when shutting down. +Set to 1 to enable spin-down, 0 to disable. The default is currently enabled. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:33:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A88421065675; Tue, 16 Nov 2010 07:33:53 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96D5D8FC0C; Tue, 16 Nov 2010 07:33:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7Xrca043877; Tue, 16 Nov 2010 07:33:53 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7XrW2043875; Tue, 16 Nov 2010 07:33:53 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160733.oAG7XrW2043875@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215383 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:33:53 -0000 Author: brucec Date: Tue Nov 16 07:33:53 2010 New Revision: 215383 URL: http://svn.freebsd.org/changeset/base/215383 Log: MFC r213763: Use the RFC2606 domain example.com in examples. Modified: stable/8/usr.sbin/sysinstall/tcpip.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/tcpip.c ============================================================================== --- stable/8/usr.sbin/sysinstall/tcpip.c Tue Nov 16 07:30:51 2010 (r215382) +++ stable/8/usr.sbin/sysinstall/tcpip.c Tue Nov 16 07:33:53 2010 (r215383) @@ -72,12 +72,12 @@ static char ipv6addr[INET6_ADDRSTRLEN]; static Layout layout[] = { #define LAYOUT_HOSTNAME 0 { 1, 2, 25, HOSTNAME_FIELD_LEN - 1, - "Host:", "Your fully-qualified hostname, e.g. foo.bar.com", + "Host:", "Your fully-qualified hostname, e.g. foo.example.com", hostname, STRINGOBJ, NULL }, #define LAYOUT_DOMAINNAME 1 { 1, 35, 20, HOSTNAME_FIELD_LEN - 1, "Domain:", - "The name of the domain that your machine is in, e.g. bar.com", + "The name of the domain that your machine is in, e.g. example.com", domainname, STRINGOBJ, NULL }, #define LAYOUT_GATEWAY 2 { 5, 2, 18, IPADDR_FIELD_LEN - 1, From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:38:27 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33CFF106564A; Tue, 16 Nov 2010 07:38:27 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 222FF8FC1B; Tue, 16 Nov 2010 07:38:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7cR03044059; Tue, 16 Nov 2010 07:38:27 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7cRTK044057; Tue, 16 Nov 2010 07:38:27 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160738.oAG7cRTK044057@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215385 - stable/8/sys/dev/firewire X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:38:27 -0000 Author: brucec Date: Tue Nov 16 07:38:26 2010 New Revision: 215385 URL: http://svn.freebsd.org/changeset/base/215385 Log: MFC r214021: Fix grammar. Modified: stable/8/sys/dev/firewire/fwohci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/firewire/fwohci.c ============================================================================== --- stable/8/sys/dev/firewire/fwohci.c Tue Nov 16 07:35:29 2010 (r215384) +++ stable/8/sys/dev/firewire/fwohci.c Tue Nov 16 07:38:26 2010 (r215385) @@ -1971,8 +1971,8 @@ fwohci_intr_dma(struct fwohci_softc *sc, OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCTIMER); #endif OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); - device_printf(fc->dev, "too many cycle lost, " - "no cycle master presents?\n"); + device_printf(fc->dev, "too many cycles lost, " + "no cycle master present?\n"); } } if (stat & OHCI_INT_DMA_ATRQ) { From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:47:44 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EEDF106566B; Tue, 16 Nov 2010 07:47:44 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6378FC12; Tue, 16 Nov 2010 07:47:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7lhnT044330; Tue, 16 Nov 2010 07:47:43 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7lhdo044328; Tue, 16 Nov 2010 07:47:43 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160747.oAG7lhdo044328@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215387 - stable/8/contrib/netcat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:47:44 -0000 Author: brucec Date: Tue Nov 16 07:47:43 2010 New Revision: 215387 URL: http://svn.freebsd.org/changeset/base/215387 Log: MFC r214022: Remove extra word, which looks like a left-over from a deleted sentence. Modified: stable/8/contrib/netcat/nc.1 Directory Properties: stable/8/contrib/netcat/ (props changed) Modified: stable/8/contrib/netcat/nc.1 ============================================================================== --- stable/8/contrib/netcat/nc.1 Tue Nov 16 07:39:52 2010 (r215386) +++ stable/8/contrib/netcat/nc.1 Tue Nov 16 07:47:43 2010 (r215387) @@ -158,7 +158,6 @@ TCP_NOOPT socket option. .It Fl O Ar length Specifies the size of the TCP send buffer. -When .It Fl P Ar proxy_username Specifies a username to present to a proxy server that requires authentication. If no username is specified then authentication will not be attempted. From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:51:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7C881065672; Tue, 16 Nov 2010 07:51:35 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B64B98FC08; Tue, 16 Nov 2010 07:51:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7pZUw044469; Tue, 16 Nov 2010 07:51:35 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7pZKb044466; Tue, 16 Nov 2010 07:51:35 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160751.oAG7pZKb044466@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215388 - stable/8/sbin/camcontrol X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:51:35 -0000 Author: brucec Date: Tue Nov 16 07:51:35 2010 New Revision: 215388 URL: http://svn.freebsd.org/changeset/base/215388 Log: MFC r214073: Stop disallowing device nodes to be passed to camcontrol(8) since libcam already allows both device names and nodes to be specified. Modified: stable/8/sbin/camcontrol/camcontrol.8 stable/8/sbin/camcontrol/camcontrol.c Directory Properties: stable/8/sbin/camcontrol/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.8 Tue Nov 16 07:47:43 2010 (r215387) +++ stable/8/sbin/camcontrol/camcontrol.8 Tue Nov 16 07:51:35 2010 (r215388) @@ -207,9 +207,6 @@ A device identifier can take one of thre .Bl -tag -width 14n .It deviceUNIT Specify a device name and unit number combination, like "da5" or "cd3". -Note that character device node names (e.g.\& /dev/da0) are -.Em not -allowed here. .It bus:target Specify a bus number and target id. The bus number can be determined from Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Tue Nov 16 07:47:43 2010 (r215387) +++ stable/8/sbin/camcontrol/camcontrol.c Tue Nov 16 07:51:35 2010 (r215388) @@ -4607,15 +4607,7 @@ main(int argc, char **argv) char name[30]; int rv; - /* - * First catch people who try to do things like: - * camcontrol tur /dev/da0 - * camcontrol doesn't take device nodes as arguments. - */ - if (argv[2][0] == '/') { - warnx("%s is not a valid device identifier", argv[2]); - errx(1, "please read the camcontrol(8) man page"); - } else if (isdigit(argv[2][0])) { + if (isdigit(argv[2][0])) { /* device specified as bus:target[:lun] */ rv = parse_btl(argv[2], &bus, &target, &lun, &arglist); if (rv < 2) From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:53:14 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6356106566C; Tue, 16 Nov 2010 07:53:14 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D485C8FC19; Tue, 16 Nov 2010 07:53:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7rEra044558; Tue, 16 Nov 2010 07:53:14 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7rEtO044556; Tue, 16 Nov 2010 07:53:14 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160753.oAG7rEtO044556@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215389 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:53:15 -0000 Author: brucec Date: Tue Nov 16 07:53:14 2010 New Revision: 215389 URL: http://svn.freebsd.org/changeset/base/215389 Log: MFC r214395: Fix formatting. Modified: stable/8/share/man/man4/ada.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Nov 16 07:51:35 2010 (r215388) +++ stable/8/share/man/man4/ada.4 Tue Nov 16 07:53:14 2010 (r215389) @@ -121,7 +121,8 @@ seconds. .It kern.cam.ada.spindown_shutdown .Pp This variable determines whether to spin-down disks when shutting down. -Set to 1 to enable spin-down, 0 to disable. The default is currently enabled. +Set to 1 to enable spin-down, 0 to disable. +The default is currently enabled. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 07:55:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9820106566C; Tue, 16 Nov 2010 07:55:36 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97E8F8FC1A; Tue, 16 Nov 2010 07:55:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7taBV044677; Tue, 16 Nov 2010 07:55:36 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7tagE044675; Tue, 16 Nov 2010 07:55:36 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160755.oAG7tagE044675@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215390 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:55:36 -0000 Author: brucec Date: Tue Nov 16 07:55:36 2010 New Revision: 215390 URL: http://svn.freebsd.org/changeset/base/215390 Log: MFC r215136: Bump .Dd due to additions in r214279. Modified: stable/8/share/man/man4/ada.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Nov 16 07:53:14 2010 (r215389) +++ stable/8/share/man/man4/ada.4 Tue Nov 16 07:55:36 2010 (r215390) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2009 +.Dd October 24, 2010 .Dt ADA 4 .Os .Sh NAME From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 09:01:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EAA8106564A; Tue, 16 Nov 2010 09:01:20 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BF1E8FC17; Tue, 16 Nov 2010 09:01:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG91KhZ046584; Tue, 16 Nov 2010 09:01:20 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG91KHn046582; Tue, 16 Nov 2010 09:01:20 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201011160901.oAG91KHn046582@svn.freebsd.org> From: Alexander Leidinger Date: Tue, 16 Nov 2010 09:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215394 - stable/8/sys/compat/linprocfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 09:01:20 -0000 Author: netchild Date: Tue Nov 16 09:01:19 2010 New Revision: 215394 URL: http://svn.freebsd.org/changeset/base/215394 Log: MFC r206081: Fix some bogus values in linprocfs. Submitted by: Petr Salinger Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Reviewed by / discussed with: kib, des, jhb, submitter Requested by: emaste Tested by: olli Modified: stable/8/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/8/sys/compat/linprocfs/linprocfs.c Tue Nov 16 08:43:25 2010 (r215393) +++ stable/8/sys/compat/linprocfs/linprocfs.c Tue Nov 16 09:01:19 2010 (r215394) @@ -115,12 +115,14 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ -#define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz)) /* ticks to jiffies */ +#define T2J(x) ((long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to jiffies */ +#define T2CS(x) ((unsigned long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to centiseconds */ #define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */ #define B2K(x) ((x) >> 10) /* bytes to kbytes */ #define B2P(x) ((x) >> PAGE_SHIFT) /* bytes to pages */ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ +#define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) /** * @brief Mapping of ki_stat in struct kinfo_proc to the linux state @@ -510,9 +512,10 @@ linprocfs_douptime(PFS_FILL_ARGS) getmicrouptime(&tv); read_cpu_time(cp_time); - sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", + sbuf_printf(sb, "%lld.%02ld %ld.%02lu\n", (long long)tv.tv_sec, tv.tv_usec / 10000, - T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); + T2S(cp_time[CP_IDLE] / mp_ncpus), + T2CS(cp_time[CP_IDLE] / mp_ncpus) % 100); return (0); } @@ -618,9 +621,17 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct kinfo_proc kp; char state; static int ratelimit = 0; + vm_offset_t startcode, startdata; PROC_LOCK(p); fill_kinfo_proc(p, &kp); + if (p->p_vmspace) { + startcode = (vm_offset_t)p->p_vmspace->vm_taddr; + startdata = (vm_offset_t)p->p_vmspace->vm_daddr; + } else { + startcode = 0; + startdata = 0; + }; sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); @@ -639,30 +650,27 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - PS_ADD("tty", "%d", 0); /* XXX */ + PS_ADD("tty", "%d", kp.ki_tdev); PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt); PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); PS_ADD("majflt", "%lu", kp.ki_rusage.ru_majflt); PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); - PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); - PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); - PS_ADD("cutime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); - PS_ADD("cstime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); + PS_ADD("utime", "%ld", TV2J(&kp.ki_rusage.ru_utime)); + PS_ADD("stime", "%ld", TV2J(&kp.ki_rusage.ru_stime)); + PS_ADD("cutime", "%ld", TV2J(&kp.ki_rusage_ch.ru_utime)); + PS_ADD("cstime", "%ld", TV2J(&kp.ki_rusage_ch.ru_stime)); PS_ADD("priority", "%d", kp.ki_pri.pri_user); PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ - /* XXX: starttime is not right, it is the _same_ for _every_ process. - It should be the number of jiffies between system boot and process - start. */ - PS_ADD("starttime", "%lu", T2J(tvtohz(&kp.ki_start))); + PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - TV2J(&boottime)); PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); PS_ADD("rss", "%ju", (uintmax_t)kp.ki_rssize); PS_ADD("rlim", "%lu", kp.ki_rusage.ru_maxrss); - PS_ADD("startcode", "%u", (unsigned)0); - PS_ADD("endcode", "%u", 0); /* XXX */ + PS_ADD("startcode", "%ju", (uintmax_t)startcode); + PS_ADD("endcode", "%ju", (uintmax_t)startdata); PS_ADD("startstack", "%u", 0); /* XXX */ PS_ADD("kstkesp", "%u", 0); /* XXX */ PS_ADD("kstkeip", "%u", 0); /* XXX */ @@ -805,7 +813,7 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) */ sbuf_printf(sb, "VmSize:\t%8ju kB\n", B2K((uintmax_t)kp.ki_size)); sbuf_printf(sb, "VmLck:\t%8u kB\n", P2K(0)); /* XXX */ - sbuf_printf(sb, "VmRss:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); + sbuf_printf(sb, "VmRSS:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); sbuf_printf(sb, "VmData:\t%8ju kB\n", P2K((uintmax_t)kp.ki_dsize)); sbuf_printf(sb, "VmStk:\t%8ju kB\n", P2K((uintmax_t)kp.ki_ssize)); sbuf_printf(sb, "VmExe:\t%8ju kB\n", P2K((uintmax_t)kp.ki_tsize)); From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 17:44:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 155BC1065675; Tue, 16 Nov 2010 17:44:10 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9298FC19; Tue, 16 Nov 2010 17:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGHi9Cf061922; Tue, 16 Nov 2010 17:44:09 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGHi9Zl061920; Tue, 16 Nov 2010 17:44:09 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201011161744.oAGHi9Zl061920@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 16 Nov 2010 17:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215402 - stable/8/release/picobsd/build X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 17:44:10 -0000 Author: luigi Date: Tue Nov 16 17:44:09 2010 New Revision: 215402 URL: http://svn.freebsd.org/changeset/base/215402 Log: sync with the version in HEAD -- use ${BINMAKE} built by the toolchain and not the hosts's make Modified: stable/8/release/picobsd/build/picobsd Modified: stable/8/release/picobsd/build/picobsd ============================================================================== --- stable/8/release/picobsd/build/picobsd Tue Nov 16 15:53:44 2010 (r215401) +++ stable/8/release/picobsd/build/picobsd Tue Nov 16 17:44:09 2010 (r215402) @@ -176,9 +176,9 @@ create_includes_and_libraries2() { # opt ( cd ${SRC}; # make -DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R -DPICOBSD buildworld if [ -d "$1" ] ; then - cd $1 ; make $2 # specific target, e.g. ld-elf.so + cd $1 ; ${BINMAKE} $2 # specific target, e.g. ld-elf.so else - make _+_= $no toolchain _includes _libraries + ${BINMAKE} _+_= $no toolchain _includes _libraries fi ) } @@ -297,11 +297,6 @@ build_image() { PICO_OBJ=${l_objtree}/picobsd/${THETYPE} log "PICO_OBJ is ${PICO_OBJ}" - if [ ${OSVERSION} -ge 500035 ] ; then - export MAKEOBJDIRPREFIX=${l_objtree} - eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" - eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` - fi # create build directory and subtree mkdir -p ${BUILDDIR}/crunch # remove any old stuff @@ -979,10 +974,17 @@ set_build_parameters() { l_usrtree=${USR:-${SRC}/../usr} fi l_objtree=${l_usrtree}/obj-pico + PICO_TREE=${PICO_TREE:-${SRC}/release/picobsd} set `grep "#define[\t ]__FreeBSD_version" ${SRC}/sys/sys/param.h` OSVERSION=$3 log "OSVERSION is ${OSVERSION}" + if [ ${OSVERSION} -ge 500035 ] ; then + export MAKEOBJDIRPREFIX=${l_objtree} + eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" + eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` + fi + if [ "${o_init_src}" != "" ] ; then if [ ${OSVERSION} -lt 500035 ] ; then create_includes_and_libraries From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 20:21:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FFE11065698; Tue, 16 Nov 2010 20:21:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 339888FC31; Tue, 16 Nov 2010 20:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGKLs1l066203; Tue, 16 Nov 2010 20:21:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKLsNg066201; Tue, 16 Nov 2010 20:21:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162021.oAGKLsNg066201@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215403 - stable/8/sys/dev/re X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:21:54 -0000 Author: yongari Date: Tue Nov 16 20:21:53 2010 New Revision: 215403 URL: http://svn.freebsd.org/changeset/base/215403 Log: MFC r214992: Reduce spin wait time consumed in GMII register access routine. There were a couple of attempts in the past to reduce it since it took more than 1ms. Because mii_tick() periodically polls link status, waiting more than 1ms for each GMII register access was overkill. Unfortunately all previous attempts were failed with various ways on different controllers. This time, add additional 20us dealy at the end of GMII register access which seems to requirement of all RealTek controllers to issue next GMII register access request. This is the same way what Linux does. Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Tue Nov 16 17:44:09 2010 (r215402) +++ stable/8/sys/dev/re/if_re.c Tue Nov 16 20:21:53 2010 (r215403) @@ -423,13 +423,12 @@ re_gmii_readreg(device_t dev, int phy, i } CSR_WRITE_4(sc, RL_PHYAR, reg << 16); - DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); if (rval & RL_PHYAR_BUSY) break; - DELAY(100); + DELAY(25); } if (i == RL_PHY_TIMEOUT) { @@ -437,6 +436,11 @@ re_gmii_readreg(device_t dev, int phy, i return (0); } + /* + * Controller requires a 20us delay to process next MDIO request. + */ + DELAY(20); + return (rval & RL_PHYAR_PHYDATA); } @@ -451,13 +455,12 @@ re_gmii_writereg(device_t dev, int phy, CSR_WRITE_4(sc, RL_PHYAR, (reg << 16) | (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); - DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); if (!(rval & RL_PHYAR_BUSY)) break; - DELAY(100); + DELAY(25); } if (i == RL_PHY_TIMEOUT) { @@ -465,6 +468,11 @@ re_gmii_writereg(device_t dev, int phy, return (0); } + /* + * Controller requires a 20us delay to process next MDIO request. + */ + DELAY(20); + return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 20:32:09 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03C310656A7; Tue, 16 Nov 2010 20:32:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C39DA8FC1A; Tue, 16 Nov 2010 20:32:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGKW9YK066537; Tue, 16 Nov 2010 20:32:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKW98l066534; Tue, 16 Nov 2010 20:32:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162032.oAGKW98l066534@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215405 - in stable/8/sys: dev/re pci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:32:10 -0000 Author: yongari Date: Tue Nov 16 20:32:09 2010 New Revision: 215405 URL: http://svn.freebsd.org/changeset/base/215405 Log: MFC r215017,215025: Follow the lead of vendor's interrupt moderation mechanism. It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt moderation mechanism but it is not documented at all. The magic value dramatically reduced number of interrupts without noticeable performance drops so apply it to all RTL8169/RTL8169 controllers. Vendor's FreeBSD driver also applies it to RTL810xE controllers but their Linux driver explicitly cleared the register, so do not enable interrupt moderation for RTL810xE controllers. While I'm here sort 8169 specific registers. Obtained from: RealTek FreeBSD driver MFC r215025: Only moderate TX completion interrupts. Relying on taskqueue to suppress RX interrupts seems to give better RX performance than RX interrupt moderation. Modified: stable/8/sys/dev/re/if_re.c stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Tue Nov 16 20:27:01 2010 (r215404) +++ stable/8/sys/dev/re/if_re.c Tue Nov 16 20:32:09 2010 (r215405) @@ -2715,6 +2715,24 @@ re_init_locked(struct rl_softc *sc) */ re_set_rxmode(sc); + /* Configure interrupt moderation. */ + if (sc->rl_type == RL_8169) { + switch (sc->rl_hwrev) { + case RL_HWREV_8100E: + case RL_HWREV_8101E: + case RL_HWREV_8102E: + case RL_HWREV_8102EL: + case RL_HWREV_8102EL_SPIN1: + case RL_HWREV_8103E: + CSR_WRITE_2(sc, RL_INTRMOD, 0); + break; + default: + /* Magic from vendor. */ + CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); + break; + } + } + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:27:01 2010 (r215404) +++ stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:32:09 2010 (r215405) @@ -125,6 +125,7 @@ /* * Registers specific to the 8169 gigE chip */ +#define RL_GTXSTART 0x0038 /* 8 bits */ #define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ #define RL_PHYAR 0x0060 #define RL_TBICSR 0x0064 @@ -135,7 +136,7 @@ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ #define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ -#define RL_GTXSTART 0x0038 /* 8 bits */ +#define RL_INTRMOD 0x00E2 /* 16 bits */ /* * TX config register bits From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 16 20:36:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE43E106566C; Tue, 16 Nov 2010 20:36:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB4B58FC1B; Tue, 16 Nov 2010 20:36:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGKaqQ1066778; Tue, 16 Nov 2010 20:36:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKaqh6066776; Tue, 16 Nov 2010 20:36:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162036.oAGKaqh6066776@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215407 - stable/8/sys/pci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:36:53 -0000 Author: yongari Date: Tue Nov 16 20:36:52 2010 New Revision: 215407 URL: http://svn.freebsd.org/changeset/base/215407 Log: MFC r215018-215020: r215018: Consistently use tab character instead of using space character. No functional changes. r215019: Remove trailing white spaces. r215020: Remove standard PCI configuration space register definitions. Modified: stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:34:00 2010 (r215406) +++ stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:36:52 2010 (r215407) @@ -36,211 +36,211 @@ * RealTek 8129/8139 register offsets */ #define RL_IDR0 0x0000 /* ID register 0 (station addr) */ -#define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ -#define RL_IDR2 0x0002 -#define RL_IDR3 0x0003 -#define RL_IDR4 0x0004 -#define RL_IDR5 0x0005 +#define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ +#define RL_IDR2 0x0002 +#define RL_IDR3 0x0003 +#define RL_IDR4 0x0004 +#define RL_IDR5 0x0005 /* 0006-0007 reserved */ -#define RL_MAR0 0x0008 /* Multicast hash table */ -#define RL_MAR1 0x0009 -#define RL_MAR2 0x000A -#define RL_MAR3 0x000B -#define RL_MAR4 0x000C -#define RL_MAR5 0x000D -#define RL_MAR6 0x000E -#define RL_MAR7 0x000F - -#define RL_TXSTAT0 0x0010 /* status of TX descriptor 0 */ -#define RL_TXSTAT1 0x0014 /* status of TX descriptor 1 */ -#define RL_TXSTAT2 0x0018 /* status of TX descriptor 2 */ -#define RL_TXSTAT3 0x001C /* status of TX descriptor 3 */ - -#define RL_TXADDR0 0x0020 /* address of TX descriptor 0 */ -#define RL_TXADDR1 0x0024 /* address of TX descriptor 1 */ -#define RL_TXADDR2 0x0028 /* address of TX descriptor 2 */ -#define RL_TXADDR3 0x002C /* address of TX descriptor 3 */ - -#define RL_RXADDR 0x0030 /* RX ring start address */ -#define RL_RX_EARLY_BYTES 0x0034 /* RX early byte count */ -#define RL_RX_EARLY_STAT 0x0036 /* RX early status */ -#define RL_COMMAND 0x0037 /* command register */ -#define RL_CURRXADDR 0x0038 /* current address of packet read */ -#define RL_CURRXBUF 0x003A /* current RX buffer address */ -#define RL_IMR 0x003C /* interrupt mask register */ -#define RL_ISR 0x003E /* interrupt status register */ -#define RL_TXCFG 0x0040 /* transmit config */ -#define RL_RXCFG 0x0044 /* receive config */ -#define RL_TIMERCNT 0x0048 /* timer count register */ -#define RL_MISSEDPKT 0x004C /* missed packet counter */ -#define RL_EECMD 0x0050 /* EEPROM command register */ -#define RL_CFG0 0x0051 /* config register #0 */ -#define RL_CFG1 0x0052 /* config register #1 */ +#define RL_MAR0 0x0008 /* Multicast hash table */ +#define RL_MAR1 0x0009 +#define RL_MAR2 0x000A +#define RL_MAR3 0x000B +#define RL_MAR4 0x000C +#define RL_MAR5 0x000D +#define RL_MAR6 0x000E +#define RL_MAR7 0x000F + +#define RL_TXSTAT0 0x0010 /* status of TX descriptor 0 */ +#define RL_TXSTAT1 0x0014 /* status of TX descriptor 1 */ +#define RL_TXSTAT2 0x0018 /* status of TX descriptor 2 */ +#define RL_TXSTAT3 0x001C /* status of TX descriptor 3 */ + +#define RL_TXADDR0 0x0020 /* address of TX descriptor 0 */ +#define RL_TXADDR1 0x0024 /* address of TX descriptor 1 */ +#define RL_TXADDR2 0x0028 /* address of TX descriptor 2 */ +#define RL_TXADDR3 0x002C /* address of TX descriptor 3 */ + +#define RL_RXADDR 0x0030 /* RX ring start address */ +#define RL_RX_EARLY_BYTES 0x0034 /* RX early byte count */ +#define RL_RX_EARLY_STAT 0x0036 /* RX early status */ +#define RL_COMMAND 0x0037 /* command register */ +#define RL_CURRXADDR 0x0038 /* current address of packet read */ +#define RL_CURRXBUF 0x003A /* current RX buffer address */ +#define RL_IMR 0x003C /* interrupt mask register */ +#define RL_ISR 0x003E /* interrupt status register */ +#define RL_TXCFG 0x0040 /* transmit config */ +#define RL_RXCFG 0x0044 /* receive config */ +#define RL_TIMERCNT 0x0048 /* timer count register */ +#define RL_MISSEDPKT 0x004C /* missed packet counter */ +#define RL_EECMD 0x0050 /* EEPROM command register */ +#define RL_CFG0 0x0051 /* config register #0 */ +#define RL_CFG1 0x0052 /* config register #1 */ #define RL_CFG2 0x0053 /* config register #2 */ #define RL_CFG3 0x0054 /* config register #3 */ #define RL_CFG4 0x0055 /* config register #4 */ #define RL_CFG5 0x0056 /* config register #5 */ /* 0057 reserved */ -#define RL_MEDIASTAT 0x0058 /* media status register (8139) */ +#define RL_MEDIASTAT 0x0058 /* media status register (8139) */ /* 0059-005A reserved */ -#define RL_MII 0x005A /* 8129 chip only */ -#define RL_HALTCLK 0x005B -#define RL_MULTIINTR 0x005C /* multiple interrupt */ -#define RL_PCIREV 0x005E /* PCI revision value */ +#define RL_MII 0x005A /* 8129 chip only */ +#define RL_HALTCLK 0x005B +#define RL_MULTIINTR 0x005C /* multiple interrupt */ +#define RL_PCIREV 0x005E /* PCI revision value */ /* 005F reserved */ -#define RL_TXSTAT_ALL 0x0060 /* TX status of all descriptors */ +#define RL_TXSTAT_ALL 0x0060 /* TX status of all descriptors */ /* Direct PHY access registers only available on 8139 */ -#define RL_BMCR 0x0062 /* PHY basic mode control */ -#define RL_BMSR 0x0064 /* PHY basic mode status */ -#define RL_ANAR 0x0066 /* PHY autoneg advert */ -#define RL_LPAR 0x0068 /* PHY link partner ability */ -#define RL_ANER 0x006A /* PHY autoneg expansion */ - -#define RL_DISCCNT 0x006C /* disconnect counter */ -#define RL_FALSECAR 0x006E /* false carrier counter */ -#define RL_NWAYTST 0x0070 /* NWAY test register */ -#define RL_RX_ER 0x0072 /* RX_ER counter */ -#define RL_CSCFG 0x0074 /* CS configuration register */ +#define RL_BMCR 0x0062 /* PHY basic mode control */ +#define RL_BMSR 0x0064 /* PHY basic mode status */ +#define RL_ANAR 0x0066 /* PHY autoneg advert */ +#define RL_LPAR 0x0068 /* PHY link partner ability */ +#define RL_ANER 0x006A /* PHY autoneg expansion */ + +#define RL_DISCCNT 0x006C /* disconnect counter */ +#define RL_FALSECAR 0x006E /* false carrier counter */ +#define RL_NWAYTST 0x0070 /* NWAY test register */ +#define RL_RX_ER 0x0072 /* RX_ER counter */ +#define RL_CSCFG 0x0074 /* CS configuration register */ /* * When operating in special C+ mode, some of the registers in an * 8139C+ chip have different definitions. These are also used for * the 8169 gigE chip. */ -#define RL_DUMPSTATS_LO 0x0010 /* counter dump command register */ -#define RL_DUMPSTATS_HI 0x0014 /* counter dump command register */ -#define RL_TXLIST_ADDR_LO 0x0020 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HI 0x0024 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HPRIO_LO 0x0028 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HPRIO_HI 0x002C /* 64 bits, 256 byte alignment */ -#define RL_CFG2 0x0053 -#define RL_TIMERINT 0x0054 /* interrupt on timer expire */ -#define RL_TXSTART 0x00D9 /* 8 bits */ -#define RL_CPLUS_CMD 0x00E0 /* 16 bits */ -#define RL_RXLIST_ADDR_LO 0x00E4 /* 64 bits, 256 byte alignment */ -#define RL_RXLIST_ADDR_HI 0x00E8 /* 64 bits, 256 byte alignment */ -#define RL_EARLY_TX_THRESH 0x00EC /* 8 bits */ +#define RL_DUMPSTATS_LO 0x0010 /* counter dump command register */ +#define RL_DUMPSTATS_HI 0x0014 /* counter dump command register */ +#define RL_TXLIST_ADDR_LO 0x0020 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HI 0x0024 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HPRIO_LO 0x0028 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HPRIO_HI 0x002C /* 64 bits, 256 byte alignment */ +#define RL_CFG2 0x0053 +#define RL_TIMERINT 0x0054 /* interrupt on timer expire */ +#define RL_TXSTART 0x00D9 /* 8 bits */ +#define RL_CPLUS_CMD 0x00E0 /* 16 bits */ +#define RL_RXLIST_ADDR_LO 0x00E4 /* 64 bits, 256 byte alignment */ +#define RL_RXLIST_ADDR_HI 0x00E8 /* 64 bits, 256 byte alignment */ +#define RL_EARLY_TX_THRESH 0x00EC /* 8 bits */ /* * Registers specific to the 8169 gigE chip */ -#define RL_GTXSTART 0x0038 /* 8 bits */ -#define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ -#define RL_PHYAR 0x0060 -#define RL_TBICSR 0x0064 -#define RL_TBI_ANAR 0x0068 -#define RL_TBI_LPAR 0x006A -#define RL_GMEDIASTAT 0x006C /* 8 bits */ -#define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ -#define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ -#define RL_PMCH 0x006F /* 8 bits */ -#define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ -#define RL_INTRMOD 0x00E2 /* 16 bits */ +#define RL_GTXSTART 0x0038 /* 8 bits */ +#define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ +#define RL_PHYAR 0x0060 +#define RL_TBICSR 0x0064 +#define RL_TBI_ANAR 0x0068 +#define RL_TBI_LPAR 0x006A +#define RL_GMEDIASTAT 0x006C /* 8 bits */ +#define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ +#define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ +#define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ +#define RL_INTRMOD 0x00E2 /* 16 bits */ /* * TX config register bits */ -#define RL_TXCFG_CLRABRT 0x00000001 /* retransmit aborted pkt */ -#define RL_TXCFG_MAXDMA 0x00000700 /* max DMA burst size */ -#define RL_TXCFG_CRCAPPEND 0x00010000 /* CRC append (0 = yes) */ -#define RL_TXCFG_LOOPBKTST 0x00060000 /* loopback test */ -#define RL_TXCFG_IFG2 0x00080000 /* 8169 only */ -#define RL_TXCFG_IFG 0x03000000 /* interframe gap */ -#define RL_TXCFG_HWREV 0x7CC00000 - -#define RL_LOOPTEST_OFF 0x00000000 -#define RL_LOOPTEST_ON 0x00020000 -#define RL_LOOPTEST_ON_CPLUS 0x00060000 +#define RL_TXCFG_CLRABRT 0x00000001 /* retransmit aborted pkt */ +#define RL_TXCFG_MAXDMA 0x00000700 /* max DMA burst size */ +#define RL_TXCFG_CRCAPPEND 0x00010000 /* CRC append (0 = yes) */ +#define RL_TXCFG_LOOPBKTST 0x00060000 /* loopback test */ +#define RL_TXCFG_IFG2 0x00080000 /* 8169 only */ +#define RL_TXCFG_IFG 0x03000000 /* interframe gap */ +#define RL_TXCFG_HWREV 0x7CC00000 + +#define RL_LOOPTEST_OFF 0x00000000 +#define RL_LOOPTEST_ON 0x00020000 +#define RL_LOOPTEST_ON_CPLUS 0x00060000 /* Known revision codes. */ -#define RL_HWREV_8169 0x00000000 -#define RL_HWREV_8169S 0x00800000 -#define RL_HWREV_8110S 0x04000000 -#define RL_HWREV_8169_8110SB 0x10000000 -#define RL_HWREV_8169_8110SC 0x18000000 -#define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24C00000 -#define RL_HWREV_8168D 0x28000000 -#define RL_HWREV_8168DP 0x28800000 -#define RL_HWREV_8168E 0x2C000000 -#define RL_HWREV_8168_SPIN1 0x30000000 -#define RL_HWREV_8100E 0x30800000 -#define RL_HWREV_8101E 0x34000000 -#define RL_HWREV_8102E 0x34800000 -#define RL_HWREV_8103E 0x34C00000 -#define RL_HWREV_8168_SPIN2 0x38000000 -#define RL_HWREV_8168_SPIN3 0x38400000 -#define RL_HWREV_8168C 0x3C000000 -#define RL_HWREV_8168C_SPIN2 0x3C400000 -#define RL_HWREV_8168CP 0x3C800000 -#define RL_HWREV_8139 0x60000000 -#define RL_HWREV_8139A 0x70000000 -#define RL_HWREV_8139AG 0x70800000 -#define RL_HWREV_8139B 0x78000000 -#define RL_HWREV_8130 0x7C000000 -#define RL_HWREV_8139C 0x74000000 -#define RL_HWREV_8139D 0x74400000 -#define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74C00000 -#define RL_HWREV_8100 0x78800000 -#define RL_HWREV_8169_8110SBL 0x7CC00000 -#define RL_HWREV_8169_8110SCE 0x98000000 - -#define RL_TXDMA_16BYTES 0x00000000 -#define RL_TXDMA_32BYTES 0x00000100 -#define RL_TXDMA_64BYTES 0x00000200 -#define RL_TXDMA_128BYTES 0x00000300 -#define RL_TXDMA_256BYTES 0x00000400 -#define RL_TXDMA_512BYTES 0x00000500 -#define RL_TXDMA_1024BYTES 0x00000600 -#define RL_TXDMA_2048BYTES 0x00000700 +#define RL_HWREV_8169 0x00000000 +#define RL_HWREV_8169S 0x00800000 +#define RL_HWREV_8110S 0x04000000 +#define RL_HWREV_8169_8110SB 0x10000000 +#define RL_HWREV_8169_8110SC 0x18000000 +#define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 +#define RL_HWREV_8168D 0x28000000 +#define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 +#define RL_HWREV_8168_SPIN1 0x30000000 +#define RL_HWREV_8100E 0x30800000 +#define RL_HWREV_8101E 0x34000000 +#define RL_HWREV_8102E 0x34800000 +#define RL_HWREV_8103E 0x34C00000 +#define RL_HWREV_8168_SPIN2 0x38000000 +#define RL_HWREV_8168_SPIN3 0x38400000 +#define RL_HWREV_8168C 0x3C000000 +#define RL_HWREV_8168C_SPIN2 0x3C400000 +#define RL_HWREV_8168CP 0x3C800000 +#define RL_HWREV_8139 0x60000000 +#define RL_HWREV_8139A 0x70000000 +#define RL_HWREV_8139AG 0x70800000 +#define RL_HWREV_8139B 0x78000000 +#define RL_HWREV_8130 0x7C000000 +#define RL_HWREV_8139C 0x74000000 +#define RL_HWREV_8139D 0x74400000 +#define RL_HWREV_8139CPLUS 0x74800000 +#define RL_HWREV_8101 0x74C00000 +#define RL_HWREV_8100 0x78800000 +#define RL_HWREV_8169_8110SBL 0x7CC00000 +#define RL_HWREV_8169_8110SCE 0x98000000 + +#define RL_TXDMA_16BYTES 0x00000000 +#define RL_TXDMA_32BYTES 0x00000100 +#define RL_TXDMA_64BYTES 0x00000200 +#define RL_TXDMA_128BYTES 0x00000300 +#define RL_TXDMA_256BYTES 0x00000400 +#define RL_TXDMA_512BYTES 0x00000500 +#define RL_TXDMA_1024BYTES 0x00000600 +#define RL_TXDMA_2048BYTES 0x00000700 /* * Transmit descriptor status register bits. */ -#define RL_TXSTAT_LENMASK 0x00001FFF -#define RL_TXSTAT_OWN 0x00002000 -#define RL_TXSTAT_TX_UNDERRUN 0x00004000 -#define RL_TXSTAT_TX_OK 0x00008000 -#define RL_TXSTAT_EARLY_THRESH 0x003F0000 -#define RL_TXSTAT_COLLCNT 0x0F000000 -#define RL_TXSTAT_CARR_HBEAT 0x10000000 -#define RL_TXSTAT_OUTOFWIN 0x20000000 -#define RL_TXSTAT_TXABRT 0x40000000 -#define RL_TXSTAT_CARRLOSS 0x80000000 +#define RL_TXSTAT_LENMASK 0x00001FFF +#define RL_TXSTAT_OWN 0x00002000 +#define RL_TXSTAT_TX_UNDERRUN 0x00004000 +#define RL_TXSTAT_TX_OK 0x00008000 +#define RL_TXSTAT_EARLY_THRESH 0x003F0000 +#define RL_TXSTAT_COLLCNT 0x0F000000 +#define RL_TXSTAT_CARR_HBEAT 0x10000000 +#define RL_TXSTAT_OUTOFWIN 0x20000000 +#define RL_TXSTAT_TXABRT 0x40000000 +#define RL_TXSTAT_CARRLOSS 0x80000000 /* * Interrupt status register bits. */ -#define RL_ISR_RX_OK 0x0001 -#define RL_ISR_RX_ERR 0x0002 -#define RL_ISR_TX_OK 0x0004 -#define RL_ISR_TX_ERR 0x0008 -#define RL_ISR_RX_OVERRUN 0x0010 -#define RL_ISR_PKT_UNDERRUN 0x0020 -#define RL_ISR_LINKCHG 0x0020 /* 8169 only */ -#define RL_ISR_FIFO_OFLOW 0x0040 /* 8139 only */ -#define RL_ISR_TX_DESC_UNAVAIL 0x0080 /* C+ only */ -#define RL_ISR_SWI 0x0100 /* C+ only */ -#define RL_ISR_CABLE_LEN_CHGD 0x2000 -#define RL_ISR_PCS_TIMEOUT 0x4000 /* 8129 only */ -#define RL_ISR_TIMEOUT_EXPIRED 0x4000 -#define RL_ISR_SYSTEM_ERR 0x8000 +#define RL_ISR_RX_OK 0x0001 +#define RL_ISR_RX_ERR 0x0002 +#define RL_ISR_TX_OK 0x0004 +#define RL_ISR_TX_ERR 0x0008 +#define RL_ISR_RX_OVERRUN 0x0010 +#define RL_ISR_PKT_UNDERRUN 0x0020 +#define RL_ISR_LINKCHG 0x0020 /* 8169 only */ +#define RL_ISR_FIFO_OFLOW 0x0040 /* 8139 only */ +#define RL_ISR_TX_DESC_UNAVAIL 0x0080 /* C+ only */ +#define RL_ISR_SWI 0x0100 /* C+ only */ +#define RL_ISR_CABLE_LEN_CHGD 0x2000 +#define RL_ISR_PCS_TIMEOUT 0x4000 /* 8129 only */ +#define RL_ISR_TIMEOUT_EXPIRED 0x4000 +#define RL_ISR_SYSTEM_ERR 0x8000 -#define RL_INTRS \ +#define RL_INTRS \ (RL_ISR_TX_OK|RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR) #ifdef RE_TX_MODERATION -#define RL_INTRS_CPLUS \ +#define RL_INTRS_CPLUS \ (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR|RL_ISR_TIMEOUT_EXPIRED) #else -#define RL_INTRS_CPLUS \ +#define RL_INTRS_CPLUS \ (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR|RL_ISR_TX_OK| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR|RL_ISR_TIMEOUT_EXPIRED) @@ -249,169 +249,169 @@ /* * Media status register. (8139 only) */ -#define RL_MEDIASTAT_RXPAUSE 0x01 -#define RL_MEDIASTAT_TXPAUSE 0x02 -#define RL_MEDIASTAT_LINK 0x04 -#define RL_MEDIASTAT_SPEED10 0x08 -#define RL_MEDIASTAT_RXFLOWCTL 0x40 /* duplex mode */ -#define RL_MEDIASTAT_TXFLOWCTL 0x80 /* duplex mode */ +#define RL_MEDIASTAT_RXPAUSE 0x01 +#define RL_MEDIASTAT_TXPAUSE 0x02 +#define RL_MEDIASTAT_LINK 0x04 +#define RL_MEDIASTAT_SPEED10 0x08 +#define RL_MEDIASTAT_RXFLOWCTL 0x40 /* duplex mode */ +#define RL_MEDIASTAT_TXFLOWCTL 0x80 /* duplex mode */ /* * Receive config register. */ -#define RL_RXCFG_RX_ALLPHYS 0x00000001 /* accept all nodes */ -#define RL_RXCFG_RX_INDIV 0x00000002 /* match filter */ -#define RL_RXCFG_RX_MULTI 0x00000004 /* accept all multicast */ -#define RL_RXCFG_RX_BROAD 0x00000008 /* accept all broadcast */ -#define RL_RXCFG_RX_RUNT 0x00000010 -#define RL_RXCFG_RX_ERRPKT 0x00000020 -#define RL_RXCFG_WRAP 0x00000080 -#define RL_RXCFG_MAXDMA 0x00000700 -#define RL_RXCFG_BUFSZ 0x00001800 -#define RL_RXCFG_FIFOTHRESH 0x0000E000 -#define RL_RXCFG_EARLYTHRESH 0x07000000 - -#define RL_RXDMA_16BYTES 0x00000000 -#define RL_RXDMA_32BYTES 0x00000100 -#define RL_RXDMA_64BYTES 0x00000200 -#define RL_RXDMA_128BYTES 0x00000300 -#define RL_RXDMA_256BYTES 0x00000400 -#define RL_RXDMA_512BYTES 0x00000500 -#define RL_RXDMA_1024BYTES 0x00000600 -#define RL_RXDMA_UNLIMITED 0x00000700 - -#define RL_RXBUF_8 0x00000000 -#define RL_RXBUF_16 0x00000800 -#define RL_RXBUF_32 0x00001000 -#define RL_RXBUF_64 0x00001800 - -#define RL_RXFIFO_16BYTES 0x00000000 -#define RL_RXFIFO_32BYTES 0x00002000 -#define RL_RXFIFO_64BYTES 0x00004000 -#define RL_RXFIFO_128BYTES 0x00006000 -#define RL_RXFIFO_256BYTES 0x00008000 -#define RL_RXFIFO_512BYTES 0x0000A000 -#define RL_RXFIFO_1024BYTES 0x0000C000 -#define RL_RXFIFO_NOTHRESH 0x0000E000 +#define RL_RXCFG_RX_ALLPHYS 0x00000001 /* accept all nodes */ +#define RL_RXCFG_RX_INDIV 0x00000002 /* match filter */ +#define RL_RXCFG_RX_MULTI 0x00000004 /* accept all multicast */ +#define RL_RXCFG_RX_BROAD 0x00000008 /* accept all broadcast */ +#define RL_RXCFG_RX_RUNT 0x00000010 +#define RL_RXCFG_RX_ERRPKT 0x00000020 +#define RL_RXCFG_WRAP 0x00000080 +#define RL_RXCFG_MAXDMA 0x00000700 +#define RL_RXCFG_BUFSZ 0x00001800 +#define RL_RXCFG_FIFOTHRESH 0x0000E000 +#define RL_RXCFG_EARLYTHRESH 0x07000000 + +#define RL_RXDMA_16BYTES 0x00000000 +#define RL_RXDMA_32BYTES 0x00000100 +#define RL_RXDMA_64BYTES 0x00000200 +#define RL_RXDMA_128BYTES 0x00000300 +#define RL_RXDMA_256BYTES 0x00000400 +#define RL_RXDMA_512BYTES 0x00000500 +#define RL_RXDMA_1024BYTES 0x00000600 +#define RL_RXDMA_UNLIMITED 0x00000700 + +#define RL_RXBUF_8 0x00000000 +#define RL_RXBUF_16 0x00000800 +#define RL_RXBUF_32 0x00001000 +#define RL_RXBUF_64 0x00001800 + +#define RL_RXFIFO_16BYTES 0x00000000 +#define RL_RXFIFO_32BYTES 0x00002000 +#define RL_RXFIFO_64BYTES 0x00004000 +#define RL_RXFIFO_128BYTES 0x00006000 +#define RL_RXFIFO_256BYTES 0x00008000 +#define RL_RXFIFO_512BYTES 0x0000A000 +#define RL_RXFIFO_1024BYTES 0x0000C000 +#define RL_RXFIFO_NOTHRESH 0x0000E000 /* * Bits in RX status header (included with RX'ed packet * in ring buffer). */ -#define RL_RXSTAT_RXOK 0x00000001 -#define RL_RXSTAT_ALIGNERR 0x00000002 -#define RL_RXSTAT_CRCERR 0x00000004 -#define RL_RXSTAT_GIANT 0x00000008 -#define RL_RXSTAT_RUNT 0x00000010 -#define RL_RXSTAT_BADSYM 0x00000020 -#define RL_RXSTAT_BROAD 0x00002000 -#define RL_RXSTAT_INDIV 0x00004000 -#define RL_RXSTAT_MULTI 0x00008000 -#define RL_RXSTAT_LENMASK 0xFFFF0000 +#define RL_RXSTAT_RXOK 0x00000001 +#define RL_RXSTAT_ALIGNERR 0x00000002 +#define RL_RXSTAT_CRCERR 0x00000004 +#define RL_RXSTAT_GIANT 0x00000008 +#define RL_RXSTAT_RUNT 0x00000010 +#define RL_RXSTAT_BADSYM 0x00000020 +#define RL_RXSTAT_BROAD 0x00002000 +#define RL_RXSTAT_INDIV 0x00004000 +#define RL_RXSTAT_MULTI 0x00008000 +#define RL_RXSTAT_LENMASK 0xFFFF0000 -#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ +#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ /* * Command register. */ -#define RL_CMD_EMPTY_RXBUF 0x0001 -#define RL_CMD_TX_ENB 0x0004 -#define RL_CMD_RX_ENB 0x0008 -#define RL_CMD_RESET 0x0010 -#define RL_CMD_STOPREQ 0x0080 +#define RL_CMD_EMPTY_RXBUF 0x0001 +#define RL_CMD_TX_ENB 0x0004 +#define RL_CMD_RX_ENB 0x0008 +#define RL_CMD_RESET 0x0010 +#define RL_CMD_STOPREQ 0x0080 /* * Twister register values. These are completely undocumented and derived * from public sources. */ -#define RL_CSCFG_LINK_OK 0x0400 -#define RL_CSCFG_CHANGE 0x0800 -#define RL_CSCFG_STATUS 0xf000 -#define RL_CSCFG_ROW3 0x7000 -#define RL_CSCFG_ROW2 0x3000 -#define RL_CSCFG_ROW1 0x1000 -#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 -#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 - -#define RL_NWAYTST_RESET 0 -#define RL_NWAYTST_CBL_TEST 0x20 - -#define RL_PARA78 0x78 -#define RL_PARA78_DEF 0x78fa8388 -#define RL_PARA7C 0x7C -#define RL_PARA7C_DEF 0xcb38de43 -#define RL_PARA7C_RETUNE 0xfb38de03 +#define RL_CSCFG_LINK_OK 0x0400 +#define RL_CSCFG_CHANGE 0x0800 +#define RL_CSCFG_STATUS 0xf000 +#define RL_CSCFG_ROW3 0x7000 +#define RL_CSCFG_ROW2 0x3000 +#define RL_CSCFG_ROW1 0x1000 +#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 +#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 + +#define RL_NWAYTST_RESET 0 +#define RL_NWAYTST_CBL_TEST 0x20 + +#define RL_PARA78 0x78 +#define RL_PARA78_DEF 0x78fa8388 +#define RL_PARA7C 0x7C +#define RL_PARA7C_DEF 0xcb38de43 +#define RL_PARA7C_RETUNE 0xfb38de03 /* * EEPROM control register */ -#define RL_EE_DATAOUT 0x01 /* Data out */ -#define RL_EE_DATAIN 0x02 /* Data in */ -#define RL_EE_CLK 0x04 /* clock */ -#define RL_EE_SEL 0x08 /* chip select */ -#define RL_EE_MODE (0x40|0x80) - -#define RL_EEMODE_OFF 0x00 -#define RL_EEMODE_AUTOLOAD 0x40 -#define RL_EEMODE_PROGRAM 0x80 -#define RL_EEMODE_WRITECFG (0x80|0x40) +#define RL_EE_DATAOUT 0x01 /* Data out */ +#define RL_EE_DATAIN 0x02 /* Data in */ +#define RL_EE_CLK 0x04 /* clock */ +#define RL_EE_SEL 0x08 /* chip select */ +#define RL_EE_MODE (0x40|0x80) + +#define RL_EEMODE_OFF 0x00 +#define RL_EEMODE_AUTOLOAD 0x40 +#define RL_EEMODE_PROGRAM 0x80 +#define RL_EEMODE_WRITECFG (0x80|0x40) /* 9346 EEPROM commands */ -#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */ -#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */ +#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */ +#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */ -#define RL_9346_WRITE 0x5 -#define RL_9346_READ 0x6 -#define RL_9346_ERASE 0x7 -#define RL_9346_EWEN 0x4 -#define RL_9346_EWEN_ADDR 0x30 -#define RL_9456_EWDS 0x4 -#define RL_9346_EWDS_ADDR 0x00 - -#define RL_EECMD_WRITE 0x140 -#define RL_EECMD_READ_6BIT 0x180 -#define RL_EECMD_READ_8BIT 0x600 -#define RL_EECMD_ERASE 0x1c0 - -#define RL_EE_ID 0x00 -#define RL_EE_PCI_VID 0x01 -#define RL_EE_PCI_DID 0x02 +#define RL_9346_WRITE 0x5 +#define RL_9346_READ 0x6 +#define RL_9346_ERASE 0x7 +#define RL_9346_EWEN 0x4 +#define RL_9346_EWEN_ADDR 0x30 +#define RL_9456_EWDS 0x4 +#define RL_9346_EWDS_ADDR 0x00 + +#define RL_EECMD_WRITE 0x140 +#define RL_EECMD_READ_6BIT 0x180 +#define RL_EECMD_READ_8BIT 0x600 +#define RL_EECMD_ERASE 0x1c0 + +#define RL_EE_ID 0x00 +#define RL_EE_PCI_VID 0x01 +#define RL_EE_PCI_DID 0x02 /* Location of station address inside EEPROM */ -#define RL_EE_EADDR 0x07 +#define RL_EE_EADDR 0x07 /* * MII register (8129 only) */ -#define RL_MII_CLK 0x01 -#define RL_MII_DATAIN 0x02 -#define RL_MII_DATAOUT 0x04 -#define RL_MII_DIR 0x80 /* 0 == input, 1 == output */ +#define RL_MII_CLK 0x01 +#define RL_MII_DATAIN 0x02 +#define RL_MII_DATAOUT 0x04 +#define RL_MII_DIR 0x80 /* 0 == input, 1 == output */ /* * Config 0 register */ -#define RL_CFG0_ROM0 0x01 -#define RL_CFG0_ROM1 0x02 -#define RL_CFG0_ROM2 0x04 -#define RL_CFG0_PL0 0x08 -#define RL_CFG0_PL1 0x10 -#define RL_CFG0_10MBPS 0x20 /* 10 Mbps internal mode */ -#define RL_CFG0_PCS 0x40 -#define RL_CFG0_SCR 0x80 +#define RL_CFG0_ROM0 0x01 +#define RL_CFG0_ROM1 0x02 +#define RL_CFG0_ROM2 0x04 +#define RL_CFG0_PL0 0x08 +#define RL_CFG0_PL1 0x10 +#define RL_CFG0_10MBPS 0x20 /* 10 Mbps internal mode */ +#define RL_CFG0_PCS 0x40 +#define RL_CFG0_SCR 0x80 /* * Config 1 register */ -#define RL_CFG1_PWRDWN 0x01 -#define RL_CFG1_PME 0x01 -#define RL_CFG1_SLEEP 0x02 -#define RL_CFG1_VPDEN 0x02 -#define RL_CFG1_IOMAP 0x04 -#define RL_CFG1_MEMMAP 0x08 -#define RL_CFG1_RSVD 0x10 +#define RL_CFG1_PWRDWN 0x01 +#define RL_CFG1_PME 0x01 +#define RL_CFG1_SLEEP 0x02 +#define RL_CFG1_VPDEN 0x02 +#define RL_CFG1_IOMAP 0x04 +#define RL_CFG1_MEMMAP 0x08 +#define RL_CFG1_RSVD 0x10 #define RL_CFG1_LWACT 0x10 -#define RL_CFG1_DRVLOAD 0x20 -#define RL_CFG1_LED0 0x40 -#define RL_CFG1_FULLDUPLEX 0x40 /* 8129 only */ -#define RL_CFG1_LED1 0x80 +#define RL_CFG1_DRVLOAD 0x20 +#define RL_CFG1_LED0 0x40 +#define RL_CFG1_FULLDUPLEX 0x40 /* 8129 only */ +#define RL_CFG1_LED1 0x80 /* * Config 2 register @@ -451,35 +451,35 @@ /* RL_DUMPSTATS_LO register */ -#define RL_DUMPSTATS_START 0x00000008 +#define RL_DUMPSTATS_START 0x00000008 /* Transmit start register */ -#define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ -#define RL_TXSTART_START 0x40 /* start normal queue transmit */ -#define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ +#define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ +#define RL_TXSTART_START 0x40 /* start normal queue transmit */ +#define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ /* * Config 2 register, 8139C+/8169/8169S/8110S only */ -#define RL_CFG2_BUSFREQ 0x07 -#define RL_CFG2_BUSWIDTH 0x08 -#define RL_CFG2_AUXPWRSTS 0x10 - -#define RL_BUSFREQ_33MHZ 0x00 -#define RL_BUSFREQ_66MHZ 0x01 - -#define RL_BUSWIDTH_32BITS 0x00 -#define RL_BUSWIDTH_64BITS 0x08 +#define RL_CFG2_BUSFREQ 0x07 +#define RL_CFG2_BUSWIDTH 0x08 +#define RL_CFG2_AUXPWRSTS 0x10 + +#define RL_BUSFREQ_33MHZ 0x00 +#define RL_BUSFREQ_66MHZ 0x01 + +#define RL_BUSWIDTH_32BITS 0x00 +#define RL_BUSWIDTH_64BITS 0x08 /* C+ mode command register */ -#define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ -#define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ -#define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ -#define RL_CPLUSCMD_PCI_DAC 0x0010 /* PCI dual-address cycle only */ -#define RL_CPLUSCMD_RXCSUM_ENB 0x0020 /* enable RX checksum offload */ -#define RL_CPLUSCMD_VLANSTRIP 0x0040 /* enable VLAN tag stripping */ +#define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ +#define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ +#define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ +#define RL_CPLUSCMD_PCI_DAC 0x0010 /* PCI dual-address cycle only */ +#define RL_CPLUSCMD_RXCSUM_ENB 0x0020 /* enable RX checksum offload */ +#define RL_CPLUSCMD_VLANSTRIP 0x0040 /* enable VLAN tag stripping */ #define RL_CPLUSCMD_MACSTAT_DIS 0x0080 /* 8168B/C/CP */ #define RL_CPLUSCMD_ASF 0x0100 /* 8168C/CP */ #define RL_CPLUSCMD_DBG_SEL 0x0200 /* 8168C/CP */ @@ -492,27 +492,27 @@ /* C+ early transmit threshold */ -#define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ +#define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ /* * Gigabit PHY access register (8169 only) */ -#define RL_PHYAR_PHYDATA 0x0000FFFF -#define RL_PHYAR_PHYREG 0x001F0000 -#define RL_PHYAR_BUSY 0x80000000 +#define RL_PHYAR_PHYDATA 0x0000FFFF +#define RL_PHYAR_PHYREG 0x001F0000 +#define RL_PHYAR_BUSY 0x80000000 /* * Gigabit media status (8169 only) */ -#define RL_GMEDIASTAT_FDX 0x01 /* full duplex */ -#define RL_GMEDIASTAT_LINK 0x02 /* link up */ -#define RL_GMEDIASTAT_10MBPS 0x04 /* 10mps link */ -#define RL_GMEDIASTAT_100MBPS 0x08 /* 100mbps link */ -#define RL_GMEDIASTAT_1000MBPS 0x10 /* gigE link */ -#define RL_GMEDIASTAT_RXFLOW 0x20 /* RX flow control on */ -#define RL_GMEDIASTAT_TXFLOW 0x40 /* TX flow control on */ -#define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ +#define RL_GMEDIASTAT_FDX 0x01 /* full duplex */ +#define RL_GMEDIASTAT_LINK 0x02 /* link up */ +#define RL_GMEDIASTAT_10MBPS 0x04 /* 10mps link */ +#define RL_GMEDIASTAT_100MBPS 0x08 /* 100mbps link */ +#define RL_GMEDIASTAT_1000MBPS 0x10 /* gigE link */ +#define RL_GMEDIASTAT_RXFLOW 0x20 /* RX flow control on */ +#define RL_GMEDIASTAT_TXFLOW 0x40 /* TX flow control on */ +#define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ /* * The RealTek doesn't use a fragment-based descriptor mechanism. @@ -529,25 +529,25 @@ * all received packets. */ -#define RL_RX_BUF_SZ RL_RXBUF_64 -#define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) -#define RL_TX_LIST_CNT 4 -#define RL_MIN_FRAMELEN 60 +#define RL_RX_BUF_SZ RL_RXBUF_64 +#define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) +#define RL_TX_LIST_CNT 4 +#define RL_MIN_FRAMELEN 60 #define RL_TX_8139_BUF_ALIGN 4 #define RL_RX_8139_BUF_ALIGN 8 #define RL_RX_8139_BUF_RESERVE sizeof(int64_t) #define RL_RX_8139_BUF_GUARD_SZ \ - (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + RL_RX_8139_BUF_RESERVE) -#define RL_TXTHRESH(x) ((x) << 11) -#define RL_TX_THRESH_INIT 96 -#define RL_RX_FIFOTHRESH RL_RXFIFO_NOTHRESH -#define RL_RX_MAXDMA RL_RXDMA_UNLIMITED -#define RL_TX_MAXDMA RL_TXDMA_2048BYTES + (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + RL_RX_8139_BUF_RESERVE) +#define RL_TXTHRESH(x) ((x) << 11) +#define RL_TX_THRESH_INIT 96 +#define RL_RX_FIFOTHRESH RL_RXFIFO_NOTHRESH +#define RL_RX_MAXDMA RL_RXDMA_UNLIMITED +#define RL_TX_MAXDMA RL_TXDMA_2048BYTES -#define RL_RXCFG_CONFIG (RL_RX_FIFOTHRESH|RL_RX_MAXDMA|RL_RX_BUF_SZ) -#define RL_TXCFG_CONFIG (RL_TXCFG_IFG|RL_TX_MAXDMA) +#define RL_RXCFG_CONFIG (RL_RX_FIFOTHRESH|RL_RX_MAXDMA|RL_RX_BUF_SZ) +#define RL_TXCFG_CONFIG (RL_TXCFG_IFG|RL_TX_MAXDMA) -#define RL_ETHER_ALIGN 2 +#define RL_ETHER_ALIGN 2 /* * re(4) hardware ip4csum-tx could be mangled with 28 bytes or less IP packets. @@ -570,15 +570,15 @@ struct rl_chain_data { uint8_t cur_tx; }; -#define RL_INC(x) (x = (x + 1) % RL_TX_LIST_CNT) -#define RL_CUR_TXADDR(x) ((x->rl_cdata.cur_tx * 4) + RL_TXADDR0) -#define RL_CUR_TXSTAT(x) ((x->rl_cdata.cur_tx * 4) + RL_TXSTAT0) -#define RL_CUR_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.cur_tx]) -#define RL_CUR_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.cur_tx]) -#define RL_LAST_TXADDR(x) ((x->rl_cdata.last_tx * 4) + RL_TXADDR0) -#define RL_LAST_TXSTAT(x) ((x->rl_cdata.last_tx * 4) + RL_TXSTAT0) -#define RL_LAST_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.last_tx]) -#define RL_LAST_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.last_tx]) +#define RL_INC(x) (x = (x + 1) % RL_TX_LIST_CNT) +#define RL_CUR_TXADDR(x) ((x->rl_cdata.cur_tx * 4) + RL_TXADDR0) +#define RL_CUR_TXSTAT(x) ((x->rl_cdata.cur_tx * 4) + RL_TXSTAT0) +#define RL_CUR_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.cur_tx]) +#define RL_CUR_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.cur_tx]) +#define RL_LAST_TXADDR(x) ((x->rl_cdata.last_tx * 4) + RL_TXADDR0) +#define RL_LAST_TXSTAT(x) ((x->rl_cdata.last_tx * 4) + RL_TXSTAT0) +#define RL_LAST_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.last_tx]) +#define RL_LAST_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.last_tx]) struct rl_type { uint16_t rl_vid; @@ -605,17 +605,17 @@ struct rl_mii_frame { /* * MII constants */ -#define RL_MII_STARTDELIM 0x01 -#define RL_MII_READOP 0x02 -#define RL_MII_WRITEOP 0x01 -#define RL_MII_TURNAROUND 0x02 - -#define RL_8129 1 -#define RL_8139 2 -#define RL_8139CPLUS 3 -#define RL_8169 4 +#define RL_MII_STARTDELIM 0x01 +#define RL_MII_READOP 0x02 +#define RL_MII_WRITEOP 0x01 +#define RL_MII_TURNAROUND 0x02 + +#define RL_8129 1 +#define RL_8139 2 +#define RL_8139CPLUS 3 +#define RL_8169 4 -#define RL_ISCPLUS(x) ((x)->rl_type == RL_8139CPLUS || \ +#define RL_ISCPLUS(x) ((x)->rl_type == RL_8139CPLUS || \ (x)->rl_type == RL_8169) /* @@ -639,85 +639,85 @@ struct rl_desc { uint32_t rl_bufaddr_hi; }; -#define RL_TDESC_CMD_FRAGLEN 0x0000FFFF -#define RL_TDESC_CMD_TCPCSUM 0x00010000 /* TCP checksum enable */ -#define RL_TDESC_CMD_UDPCSUM 0x00020000 /* UDP checksum enable */ -#define RL_TDESC_CMD_IPCSUM 0x00040000 /* IP header checksum enable */ -#define RL_TDESC_CMD_MSSVAL 0x07FF0000 /* Large send MSS value */ -#define RL_TDESC_CMD_MSSVAL_SHIFT 16 /* Large send MSS value shift */ -#define RL_TDESC_CMD_LGSEND 0x08000000 /* TCP large send enb */ -#define RL_TDESC_CMD_EOF 0x10000000 /* end of frame marker */ -#define RL_TDESC_CMD_SOF 0x20000000 /* start of frame marker */ -#define RL_TDESC_CMD_EOR 0x40000000 /* end of ring marker */ -#define RL_TDESC_CMD_OWN 0x80000000 /* chip owns descriptor */ +#define RL_TDESC_CMD_FRAGLEN 0x0000FFFF +#define RL_TDESC_CMD_TCPCSUM 0x00010000 /* TCP checksum enable */ +#define RL_TDESC_CMD_UDPCSUM 0x00020000 /* UDP checksum enable */ +#define RL_TDESC_CMD_IPCSUM 0x00040000 /* IP header checksum enable */ +#define RL_TDESC_CMD_MSSVAL 0x07FF0000 /* Large send MSS value */ +#define RL_TDESC_CMD_MSSVAL_SHIFT 16 /* Large send MSS value shift */ +#define RL_TDESC_CMD_LGSEND 0x08000000 /* TCP large send enb */ +#define RL_TDESC_CMD_EOF 0x10000000 /* end of frame marker */ +#define RL_TDESC_CMD_SOF 0x20000000 /* start of frame marker */ +#define RL_TDESC_CMD_EOR 0x40000000 /* end of ring marker */ +#define RL_TDESC_CMD_OWN 0x80000000 /* chip owns descriptor */ -#define RL_TDESC_VLANCTL_TAG 0x00020000 /* Insert VLAN tag */ -#define RL_TDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ +#define RL_TDESC_VLANCTL_TAG 0x00020000 /* Insert VLAN tag */ +#define RL_TDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ /* RTL8168C/RTL8168CP/RTL8111C/RTL8111CP */ #define RL_TDESC_CMD_UDPCSUMV2 0x80000000 -#define RL_TDESC_CMD_TCPCSUMV2 0x40000000 -#define RL_TDESC_CMD_IPCSUMV2 0x20000000 +#define RL_TDESC_CMD_TCPCSUMV2 0x40000000 +#define RL_TDESC_CMD_IPCSUMV2 0x20000000 /* * Error bits are valid only on the last descriptor of a frame * (i.e. RL_TDESC_CMD_EOF == 1) */ -#define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ -#define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ -#define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ -#define RL_TDESC_STAT_OWINCOL 0x00400000 /* out-of-window collision */ -#define RL_TDESC_STAT_TXERRSUM 0x00800000 /* transmit error summary */ -#define RL_TDESC_STAT_UNDERRUN 0x02000000 /* TX underrun occured */ -#define RL_TDESC_STAT_OWN 0x80000000 +#define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ +#define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ +#define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ +#define RL_TDESC_STAT_OWINCOL 0x00400000 /* out-of-window collision */ +#define RL_TDESC_STAT_TXERRSUM 0x00800000 /* transmit error summary */ +#define RL_TDESC_STAT_UNDERRUN 0x02000000 /* TX underrun occured */ +#define RL_TDESC_STAT_OWN 0x80000000 /* * RX descriptor cmd/vlan definitions */ -#define RL_RDESC_CMD_EOR 0x40000000 -#define RL_RDESC_CMD_OWN 0x80000000 -#define RL_RDESC_CMD_BUFLEN 0x00001FFF - -#define RL_RDESC_STAT_OWN 0x80000000 -#define RL_RDESC_STAT_EOR 0x40000000 -#define RL_RDESC_STAT_SOF 0x20000000 -#define RL_RDESC_STAT_EOF 0x10000000 -#define RL_RDESC_STAT_FRALIGN 0x08000000 /* frame alignment error */ -#define RL_RDESC_STAT_MCAST 0x04000000 /* multicast pkt received */ -#define RL_RDESC_STAT_UCAST 0x02000000 /* unicast pkt received */ -#define RL_RDESC_STAT_BCAST 0x01000000 /* broadcast pkt received */ -#define RL_RDESC_STAT_BUFOFLOW 0x00800000 /* out of buffer space */ -#define RL_RDESC_STAT_FIFOOFLOW 0x00400000 /* FIFO overrun */ -#define RL_RDESC_STAT_GIANT 0x00200000 /* pkt > 4096 bytes */ -#define RL_RDESC_STAT_RXERRSUM 0x00100000 /* RX error summary */ -#define RL_RDESC_STAT_RUNT 0x00080000 /* runt packet received */ -#define RL_RDESC_STAT_CRCERR 0x00040000 /* CRC error */ -#define RL_RDESC_STAT_PROTOID 0x00030000 /* Protocol type */ +#define RL_RDESC_CMD_EOR 0x40000000 +#define RL_RDESC_CMD_OWN 0x80000000 +#define RL_RDESC_CMD_BUFLEN 0x00001FFF + +#define RL_RDESC_STAT_OWN 0x80000000 +#define RL_RDESC_STAT_EOR 0x40000000 +#define RL_RDESC_STAT_SOF 0x20000000 +#define RL_RDESC_STAT_EOF 0x10000000 +#define RL_RDESC_STAT_FRALIGN 0x08000000 /* frame alignment error */ +#define RL_RDESC_STAT_MCAST 0x04000000 /* multicast pkt received */ +#define RL_RDESC_STAT_UCAST 0x02000000 /* unicast pkt received */ +#define RL_RDESC_STAT_BCAST 0x01000000 /* broadcast pkt received */ +#define RL_RDESC_STAT_BUFOFLOW 0x00800000 /* out of buffer space */ +#define RL_RDESC_STAT_FIFOOFLOW 0x00400000 /* FIFO overrun */ +#define RL_RDESC_STAT_GIANT 0x00200000 /* pkt > 4096 bytes */ +#define RL_RDESC_STAT_RXERRSUM 0x00100000 /* RX error summary */ +#define RL_RDESC_STAT_RUNT 0x00080000 /* runt packet received */ +#define RL_RDESC_STAT_CRCERR 0x00040000 /* CRC error */ +#define RL_RDESC_STAT_PROTOID 0x00030000 /* Protocol type */ #define RL_RDESC_STAT_UDP 0x00020000 /* UDP, 8168C/CP, 8111C/CP */ #define RL_RDESC_STAT_TCP 0x00010000 /* TCP, 8168C/CP, 8111C/CP */ -#define RL_RDESC_STAT_IPSUMBAD 0x00008000 /* IP header checksum bad */ -#define RL_RDESC_STAT_UDPSUMBAD 0x00004000 /* UDP checksum bad */ -#define RL_RDESC_STAT_TCPSUMBAD 0x00002000 /* TCP checksum bad */ -#define RL_RDESC_STAT_FRAGLEN 0x00001FFF /* RX'ed frame/frag len */ -#define RL_RDESC_STAT_GFRAGLEN 0x00003FFF /* RX'ed frame/frag len */ -#define RL_RDESC_STAT_ERRS (RL_RDESC_STAT_GIANT|RL_RDESC_STAT_RUNT| \ +#define RL_RDESC_STAT_IPSUMBAD 0x00008000 /* IP header checksum bad */ +#define RL_RDESC_STAT_UDPSUMBAD 0x00004000 /* UDP checksum bad */ +#define RL_RDESC_STAT_TCPSUMBAD 0x00002000 /* TCP checksum bad */ +#define RL_RDESC_STAT_FRAGLEN 0x00001FFF /* RX'ed frame/frag len */ +#define RL_RDESC_STAT_GFRAGLEN 0x00003FFF /* RX'ed frame/frag len */ +#define RL_RDESC_STAT_ERRS (RL_RDESC_STAT_GIANT|RL_RDESC_STAT_RUNT| \ RL_RDESC_STAT_CRCERR) -#define RL_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available +#define RL_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available (rl_vlandata valid)*/ -#define RL_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ +#define RL_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ /* RTL8168C/RTL8168CP/RTL8111C/RTL8111CP */ #define RL_RDESC_IPV6 0x80000000 #define RL_RDESC_IPV4 0x40000000 -#define RL_PROTOID_NONIP 0x00000000 -#define RL_PROTOID_TCPIP 0x00010000 -#define RL_PROTOID_UDPIP 0x00020000 -#define RL_PROTOID_IP 0x00030000 -#define RL_TCPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ +#define RL_PROTOID_NONIP 0x00000000 +#define RL_PROTOID_TCPIP 0x00010000 +#define RL_PROTOID_UDPIP 0x00020000 +#define RL_PROTOID_IP 0x00030000 +#define RL_TCPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ RL_PROTOID_TCPIP) -#define RL_UDPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ +#define RL_UDPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ RL_PROTOID_UDPIP) /* @@ -747,7 +747,7 @@ struct rl_stats { * Descriptor alignment : 256 bytes * Tx buffer : At least 4 bytes in length. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 17 09:48:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E055106566B; Wed, 17 Nov 2010 09:48:19 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B3D78FC19; Wed, 17 Nov 2010 09:48:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAH9mJYg085242; Wed, 17 Nov 2010 09:48:19 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9mIWh085240; Wed, 17 Nov 2010 09:48:18 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201011170948.oAH9mIWh085240@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 17 Nov 2010 09:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215421 - stable/8/contrib/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:48:19 -0000 Author: pluknet Date: Wed Nov 17 09:48:18 2010 New Revision: 215421 URL: http://svn.freebsd.org/changeset/base/215421 Log: MFC r215186: Add 'jid' as a possible sort order to the help screen. PR: bin/150992 Submitted by: Frederic Culot Approved by: avg (mentor) Modified: stable/8/contrib/top/commands.c Directory Properties: stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) Modified: stable/8/contrib/top/commands.c ============================================================================== --- stable/8/contrib/top/commands.c Wed Nov 17 09:32:39 2010 (r215420) +++ stable/8/contrib/top/commands.c Wed Nov 17 09:48:18 2010 (r215421) @@ -80,10 +80,12 @@ n or # - change number of processes to #ifdef ORDER if (displaymode == DISP_CPU) fputs("\ -o - specify sort order (pri, size, res, cpu, time, threads)\n", stdout); +o - specify sort order (pri, size, res, cpu, time, threads, jid)\n", + stdout); else fputs("\ -o - specify sort order (vcsw, ivcsw, read, write, fault, total)\n", stdout); +o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid)\n", + stdout); #endif fputs("\ r - renice a process\n\ From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 17 17:12:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8995E1066100; Wed, 17 Nov 2010 17:12:42 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DB228FC16; Wed, 17 Nov 2010 17:12:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHHCgIT098381; Wed, 17 Nov 2010 17:12:42 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHHCgin098377; Wed, 17 Nov 2010 17:12:42 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201011171712.oAHHCgin098377@svn.freebsd.org> From: Mark Murray Date: Wed, 17 Nov 2010 17:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215429 - in stable/8: share/man/man5 tools/build/mk usr.sbin/mailwrapper X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:12:42 -0000 Author: markm Date: Wed Nov 17 17:12:41 2010 New Revision: 215429 URL: http://svn.freebsd.org/changeset/base/215429 Log: MFC: Add /bin/rmail symlink to mailwrapper if sendmail is not being built and mailwrapper is being built. Ensure that it is not removed by "make delete-old". Add Exim example to man page. Modified: stable/8/share/man/man5/mailer.conf.5 stable/8/tools/build/mk/OptionalObsoleteFiles.inc stable/8/usr.sbin/mailwrapper/Makefile Modified: stable/8/share/man/man5/mailer.conf.5 ============================================================================== --- stable/8/share/man/man5/mailer.conf.5 Wed Nov 17 16:17:35 2010 (r215428) +++ stable/8/share/man/man5/mailer.conf.5 Wed Nov 17 17:12:41 2010 (r215429) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2006 +.Dd November 17, 2010 .Dt MAILER.CONF 5 .Os .Sh NAME @@ -110,6 +110,22 @@ mailq /usr/local/sbin/sendmail newaliases /usr/local/sbin/sendmail .Ed .Pp +This example shows +how to invoke +a sendmail-workalike with +.Nm Exim +(from ports) +in place of +.Xr sendmail 8 : +.Bd -literal -offset indent +# Emulate sendmail using exim +sendmail /usr/local/sbin/exim +send-mail /usr/local/sbin/exim +mailq /usr/local/sbin/exim -bp +newaliases /usr/bin/true +rmail /usr/local/sbin/exim -i -oee +.Ed +.Pp This example shows the use of the .Nm mini_sendmail package from ports in place of Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Wed Nov 17 16:17:35 2010 (r215428) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Wed Nov 17 17:12:41 2010 (r215429) @@ -1130,7 +1130,9 @@ OLD_FILES+=usr/share/man/man8/rshd.8.gz #.endif .if ${MK_SENDMAIL} == no +.if ${MK_MAILWRAPPER} == no OLD_FILES+=bin/rmail +.endif OLD_FILES+=usr/bin/vacation OLD_FILES+=usr/include/libmilter/mfapi.h OLD_FILES+=usr/include/libmilter/mfdef.h Modified: stable/8/usr.sbin/mailwrapper/Makefile ============================================================================== --- stable/8/usr.sbin/mailwrapper/Makefile Wed Nov 17 16:17:35 2010 (r215428) +++ stable/8/usr.sbin/mailwrapper/Makefile Wed Nov 17 17:12:41 2010 (r215429) @@ -23,6 +23,10 @@ SYMLINKS+= /usr/libexec/sendmail/sendmai .endif .endif +.if ${MK_MAILWRAPPER} != "no" && ${MK_SENDMAIL} == "no" +SYMLINKS+= ${BINDIR}/mailwrapper /bin/rmail +.endif + .if ${MK_MAILWRAPPER} != "no" .if !exists(${DESTDIR}/etc/mail/mailer.conf) FILES= ${.CURDIR}/../../etc/mail/mailer.conf From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 17 17:29:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B9FD106661F; Wed, 17 Nov 2010 17:29:23 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39CC18FC20; Wed, 17 Nov 2010 17:29:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHHTNa0098779; Wed, 17 Nov 2010 17:29:23 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHHTNKk098773; Wed, 17 Nov 2010 17:29:23 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011171729.oAHHTNKk098773@svn.freebsd.org> From: Alan Cox Date: Wed, 17 Nov 2010 17:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215430 - in stable/8/sys: kern vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:29:23 -0000 Author: alc Date: Wed Nov 17 17:29:22 2010 New Revision: 215430 URL: http://svn.freebsd.org/changeset/base/215430 Log: MFC r209407, r209648, r209650 Introduce and use vm_page_next() and vm_page_prev(). They provide both a simpler and faster interface for iterating over the pages of an object. Modified: stable/8/sys/kern/kern_exec.c stable/8/sys/vm/vm_fault.c stable/8/sys/vm/vm_page.c stable/8/sys/vm/vm_page.h stable/8/sys/vm/vm_pageout.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/kern/kern_exec.c Wed Nov 17 17:29:22 2010 (r215430) @@ -935,7 +935,7 @@ exec_map_first_page(imgp) if (initial_pagein > object->size) initial_pagein = object->size; for (i = 1; i < initial_pagein; i++) { - if ((ma[i] = vm_page_lookup(object, i)) != NULL) { + if ((ma[i] = vm_page_next(ma[i - 1])) != NULL) { if (ma[i]->valid) break; if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy) Modified: stable/8/sys/vm/vm_fault.c ============================================================================== --- stable/8/sys/vm/vm_fault.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_fault.c Wed Nov 17 17:29:22 2010 (r215430) @@ -215,7 +215,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr boolean_t are_queues_locked, growstack, wired; int map_generation; vm_object_t next_object; - vm_page_t marray[VM_FAULT_READ]; + vm_page_t marray[VM_FAULT_READ], mt, mt_prev; int hardfault; int faultcount, ahead, behind, alloc_req; struct faultstate fs; @@ -486,12 +486,18 @@ readrest: fs.first_object->type != OBJT_DEVICE && fs.first_object->type != OBJT_PHYS && fs.first_object->type != OBJT_SG) { - vm_pindex_t firstpindex, tmppindex; + vm_pindex_t firstpindex; if (fs.first_pindex < 2 * VM_FAULT_READ) firstpindex = 0; else firstpindex = fs.first_pindex - 2 * VM_FAULT_READ; + mt = fs.first_object != fs.object ? + fs.first_m : fs.m; + KASSERT(mt != NULL, ("vm_fault: missing mt")); + KASSERT((mt->oflags & VPO_BUSY) != 0, + ("vm_fault: mt %p not busy", mt)); + mt_prev = vm_page_prev(mt); are_queues_locked = FALSE; /* @@ -499,14 +505,10 @@ readrest: * included in the lookahead - NFS piecemeal * writes will barf on it badly. */ - for (tmppindex = fs.first_pindex - 1; - tmppindex >= firstpindex; - --tmppindex) { - vm_page_t mt; - - mt = vm_page_lookup(fs.first_object, tmppindex); - if (mt == NULL || (mt->valid != VM_PAGE_BITS_ALL)) - break; + while ((mt = mt_prev) != NULL && + mt->pindex >= firstpindex && + mt->valid == VM_PAGE_BITS_ALL) { + mt_prev = vm_page_prev(mt); if (mt->busy || (mt->oflags & VPO_BUSY)) continue; Modified: stable/8/sys/vm/vm_page.c ============================================================================== --- stable/8/sys/vm/vm_page.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_page.c Wed Nov 17 17:29:22 2010 (r215430) @@ -811,6 +811,42 @@ vm_page_find_least(vm_object_t object, v } /* + * Returns the given page's successor (by pindex) within the object if it is + * resident; if none is found, NULL is returned. + * + * The object must be locked. + */ +vm_page_t +vm_page_next(vm_page_t m) +{ + vm_page_t next; + + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + if ((next = TAILQ_NEXT(m, listq)) != NULL && + next->pindex != m->pindex + 1) + next = NULL; + return (next); +} + +/* + * Returns the given page's predecessor (by pindex) within the object if it is + * resident; if none is found, NULL is returned. + * + * The object must be locked. + */ +vm_page_t +vm_page_prev(vm_page_t m) +{ + vm_page_t prev; + + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->pindex != m->pindex - 1) + prev = NULL; + return (prev); +} + +/* * vm_page_rename: * * Move the given memory entry from its Modified: stable/8/sys/vm/vm_page.h ============================================================================== --- stable/8/sys/vm/vm_page.h Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_page.h Wed Nov 17 17:29:22 2010 (r215430) @@ -315,6 +315,8 @@ void vm_page_deactivate (vm_page_t); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); +vm_page_t vm_page_next(vm_page_t m); +vm_page_t vm_page_prev(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_requeue(vm_page_t m); Modified: stable/8/sys/vm/vm_pageout.c ============================================================================== --- stable/8/sys/vm/vm_pageout.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_pageout.c Wed Nov 17 17:29:22 2010 (r215430) @@ -279,7 +279,7 @@ vm_pageout_clean(m) vm_page_t m; { vm_object_t object; - vm_page_t mc[2*vm_pageout_page_count]; + vm_page_t mc[2*vm_pageout_page_count], pb, ps; int pageout_count; int ib, is, page_base; vm_pindex_t pindex = m->pindex; @@ -304,7 +304,7 @@ vm_pageout_clean(m) return 0; } - mc[vm_pageout_page_count] = m; + mc[vm_pageout_page_count] = pb = ps = m; pageout_count = 1; page_base = vm_pageout_page_count; ib = 1; @@ -339,11 +339,8 @@ more: break; } - if ((p = vm_page_lookup(object, pindex - ib)) == NULL) { - ib = 0; - break; - } - if ((p->oflags & VPO_BUSY) || p->busy) { + if ((p = vm_page_prev(pb)) == NULL || + (p->oflags & VPO_BUSY) != 0 || p->busy != 0) { ib = 0; break; } @@ -354,7 +351,7 @@ more: ib = 0; break; } - mc[--page_base] = p; + mc[--page_base] = pb = p; ++pageout_count; ++ib; /* @@ -369,18 +366,16 @@ more: pindex + is < object->size) { vm_page_t p; - if ((p = vm_page_lookup(object, pindex + is)) == NULL) + if ((p = vm_page_next(ps)) == NULL || + (p->oflags & VPO_BUSY) != 0 || p->busy != 0) break; - if ((p->oflags & VPO_BUSY) || p->busy) { - break; - } vm_page_test_dirty(p); if (p->dirty == 0 || p->queue != PQ_INACTIVE || p->hold_count != 0) { /* may be undergoing I/O */ break; } - mc[page_base + pageout_count] = p; + mc[page_base + pageout_count] = ps = p; ++pageout_count; ++is; } From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 17 23:13:02 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98F7F1065670; Wed, 17 Nov 2010 23:13:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85A2F8FC0A; Wed, 17 Nov 2010 23:13:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHND269007317; Wed, 17 Nov 2010 23:13:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHND2hc007315; Wed, 17 Nov 2010 23:13:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011172313.oAHND2hc007315@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 17 Nov 2010 23:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215444 - in stable/8: bin/test tools/regression/bin tools/regression/bin/test X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 23:13:02 -0000 Author: jilles Date: Wed Nov 17 23:13:02 2010 New Revision: 215444 URL: http://svn.freebsd.org/changeset/base/215444 Log: MFC r215022: test: Move tests to tools/regression/bin/test. Convert the tests to the perl prove format. Remove obsolete TEST.README (results of an old TEST.sh for some old Unices) and TEST.csh (old tests without correct values, far less complete than TEST.sh). Added: stable/8/tools/regression/bin/test/ - copied from r215022, head/tools/regression/bin/test/ Deleted: stable/8/bin/test/TEST.README stable/8/bin/test/TEST.csh stable/8/bin/test/TEST.sh Modified: stable/8/tools/regression/bin/Makefile Directory Properties: stable/8/bin/test/ (props changed) stable/8/tools/regression/bin/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/tools/regression/bin/Makefile ============================================================================== --- stable/8/tools/regression/bin/Makefile Wed Nov 17 22:28:04 2010 (r215443) +++ stable/8/tools/regression/bin/Makefile Wed Nov 17 23:13:02 2010 (r215444) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= date mv pax sh +SUBDIR= date mv pax sh test .include From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 18 01:14:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EA11065675; Thu, 18 Nov 2010 01:14:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32A168FC12; Thu, 18 Nov 2010 01:14:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAI1EJ27009869; Thu, 18 Nov 2010 01:14:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI1EJn9009865; Thu, 18 Nov 2010 01:14:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201011180114.oAI1EJn9009865@svn.freebsd.org> From: Xin LI Date: Thu, 18 Nov 2010 01:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215445 - stable/8/contrib/netcat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 01:14:19 -0000 Author: delphij Date: Thu Nov 18 01:14:18 2010 New Revision: 215445 URL: http://svn.freebsd.org/changeset/base/215445 Log: MFC through r214047: nc from OpenBSD 4.8. Modified: stable/8/contrib/netcat/nc.1 stable/8/contrib/netcat/netcat.c stable/8/contrib/netcat/socks.c Directory Properties: stable/8/contrib/netcat/ (props changed) Modified: stable/8/contrib/netcat/nc.1 ============================================================================== --- stable/8/contrib/netcat/nc.1 Wed Nov 17 23:13:02 2010 (r215444) +++ stable/8/contrib/netcat/nc.1 Thu Nov 18 01:14:18 2010 (r215445) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.53 2010/02/23 23:00:52 schwarze Exp $ +.\" $OpenBSD: nc.1,v 1.55 2010/07/25 07:51:39 guenther Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2010 +.Dd July 25, 2010 .Dt NC 1 .Os .Sh NAME @@ -46,7 +46,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS -.Op Fl V Ar fib +.Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo @@ -201,8 +201,10 @@ Specifies to use sockets. .It Fl u Use UDP instead of the default option of TCP. -.It Fl V Ar fib -Set the routing table (FIB). +.It Fl V Ar rtable +Set the routing table +.Pq Dq FIB +to be used. The default is 0. .It Fl v Have Modified: stable/8/contrib/netcat/netcat.c ============================================================================== --- stable/8/contrib/netcat/netcat.c Wed Nov 17 23:13:02 2010 (r215444) +++ stable/8/contrib/netcat/netcat.c Thu Nov 18 01:14:18 2010 (r215445) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.95 2010/02/27 00:58:56 nicm Exp $ */ +/* $OpenBSD: netcat.c,v 1.98 2010/07/03 04:44:51 guenther Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -93,7 +93,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ -u_int rdomain; +u_int rtableid; int timeout = -1; int family = AF_UNSPEC; @@ -139,7 +139,6 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; - rdomain = 0; ret = 1; ipsec_count = 0; s = 0; @@ -235,10 +234,10 @@ main(int argc, char *argv[]) case 'V': if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(1, "Multiple FIBS not supported"); - rdomain = (unsigned int)strtonum(optarg, 0, + rtableid = (unsigned int)strtonum(optarg, 0, numfibs - 1, &errstr); if (errstr) - errx(1, "FIB %s: %s", errstr, optarg); + errx(1, "rtable %s: %s", errstr, optarg); break; case 'v': vflag = 1; @@ -371,11 +370,11 @@ main(int argc, char *argv[]) */ if (uflag) { int rv, plen; - char buf[8192]; + char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 8192 : 1024; + plen = jflag ? 16384 : 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -561,8 +560,8 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif - if (rdomain) { - if (setfib(rdomain) == -1) + if (rtableid) { + if (setfib(rtableid) == -1) err(1, "setfib"); } @@ -634,8 +633,8 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; - if (rdomain) { - if (setfib(rdomain) == -1) + if (rtableid) { + if (setfib(rtableid) == -1) err(1, "setfib"); } @@ -680,12 +679,12 @@ void readwrite(int nfd) { struct pollfd pfd[2]; - unsigned char buf[8192]; + unsigned char buf[16384]; int n, wfd = fileno(stdin); int lfd = fileno(stdout); int plen; - plen = jflag ? 8192 : 1024; + plen = jflag ? 16384 : 2048; /* Setup Network FD */ pfd[0].fd = nfd; @@ -827,10 +826,9 @@ build_ports(char *p) hi = strtonum(p, 1, PORT_MAX, &errstr); if (errstr) errx(1, "port number %s: %s", errstr, p); - portlist[0] = calloc(1, PORT_MAX_LEN); + portlist[0] = strdup(p); if (portlist[0] == NULL) err(1, NULL); - portlist[0] = p; } } @@ -947,7 +945,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ - \t-V fib Specify alternate routing table (FIB)\n\ + \t-V rtable Specify alternate routing table\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -992,7 +990,7 @@ usage(int ret) "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" + "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); Modified: stable/8/contrib/netcat/socks.c ============================================================================== --- stable/8/contrib/netcat/socks.c Wed Nov 17 23:13:02 2010 (r215444) +++ stable/8/contrib/netcat/socks.c Thu Nov 18 01:14:18 2010 (r215445) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.17 2006/09/25 04:51:20 ray Exp $ */ +/* $OpenBSD: socks.c,v 1.18 2010/04/20 07:26:35 nicm Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -167,11 +167,11 @@ socks_connect(const char *host, const ch buf[2] = SOCKS_NOAUTH; cnt = atomicio(vwrite, proxyfd, buf, 3); if (cnt != 3) - err(1, "write failed (%d/3)", cnt); + err(1, "write failed (%zu/3)", cnt); cnt = atomicio(read, proxyfd, buf, 2); if (cnt != 2) - err(1, "read failed (%d/3)", cnt); + err(1, "read failed (%zu/3)", cnt); if (buf[1] == SOCKS_NOMETHOD) errx(1, "authentication method negotiation failed"); @@ -220,11 +220,11 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, wlen); if (cnt != wlen) - err(1, "write failed (%d/%d)", cnt, wlen); + err(1, "write failed (%zu/%zu)", cnt, wlen); cnt = atomicio(read, proxyfd, buf, 10); if (cnt != 10) - err(1, "read failed (%d/10)", cnt); + err(1, "read failed (%zu/10)", cnt); if (buf[1] != 0) errx(1, "connection failed, SOCKS error %d", buf[1]); } else if (socksv == 4) { @@ -242,11 +242,11 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, wlen); if (cnt != wlen) - err(1, "write failed (%d/%d)", cnt, wlen); + err(1, "write failed (%zu/%zu)", cnt, wlen); cnt = atomicio(read, proxyfd, buf, 8); if (cnt != 8) - err(1, "read failed (%d/8)", cnt); + err(1, "read failed (%zu/8)", cnt); if (buf[1] != 90) errx(1, "connection failed, SOCKS error %d", buf[1]); } else if (socksv == -1) { @@ -272,7 +272,7 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, r); if (cnt != r) - err(1, "write failed (%d/%d)", cnt, r); + err(1, "write failed (%zu/%d)", cnt, r); if (authretry > 1) { char resp[1024]; @@ -290,7 +290,7 @@ socks_connect(const char *host, const ch errx(1, "Proxy auth response too long"); r = strlen(buf); if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r) - err(1, "write failed (%d/%d)", cnt, r); + err(1, "write failed (%zu/%d)", cnt, r); } /* Terminate headers */ From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 18 17:44:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34DFB1065670; Thu, 18 Nov 2010 17:44:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDF08FC1D; Thu, 18 Nov 2010 17:44:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIHi2jc039624; Thu, 18 Nov 2010 17:44:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIHi2Fu039620; Thu, 18 Nov 2010 17:44:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011181744.oAIHi2Fu039620@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Nov 2010 17:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215456 - stable/8/sys/dev/nfe X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 17:44:03 -0000 Author: yongari Date: Thu Nov 18 17:44:02 2010 New Revision: 215456 URL: http://svn.freebsd.org/changeset/base/215456 Log: MFC r215132,215194: r215132: Add basic WOL support for MCP ethernet controllers. It seems the controller does not perform automatic switching from 1000Mbps link to 10/100Mbps link when WOL is activated. Implement establishing 10/100Mps link with auto-negotiation in driver. Link status change handler was modified to remove taskqueue based approach since driver now needs synchronous handling for link establishment. Submitted by: Yamagi Burmeister (lists <> yamagi.org ) (initial version) Tested by: Yamagi Burmeister (lists <> yamagi.org ) r215194: Fix regression introduced in r215132. Caller always holds a driver lock before accessing mii, so locking is not needed here. Reported by: Rob Farmer (rfarmer <> predatorlabs dot net) Modified: stable/8/sys/dev/nfe/if_nfe.c stable/8/sys/dev/nfe/if_nfereg.h stable/8/sys/dev/nfe/if_nfevar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/8/sys/dev/nfe/if_nfe.c Thu Nov 18 16:32:52 2010 (r215455) +++ stable/8/sys/dev/nfe/if_nfe.c Thu Nov 18 17:44:02 2010 (r215456) @@ -81,7 +81,7 @@ static void nfe_power(struct nfe_softc * static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); static void nfe_miibus_statchg(device_t); -static void nfe_link_task(void *, int); +static void nfe_mac_config(struct nfe_softc *, struct mii_data *); static void nfe_set_intr(struct nfe_softc *); static __inline void nfe_enable_intr(struct nfe_softc *); static __inline void nfe_disable_intr(struct nfe_softc *); @@ -125,6 +125,8 @@ static int sysctl_hw_nfe_proc_limit(SYSC static void nfe_sysctl_node(struct nfe_softc *); static void nfe_stats_clear(struct nfe_softc *); static void nfe_stats_update(struct nfe_softc *); +static void nfe_set_linkspeed(struct nfe_softc *); +static void nfe_set_wol(struct nfe_softc *); #ifdef NFE_DEBUG static int nfedebug = 0; @@ -348,7 +350,6 @@ nfe_attach(device_t dev) mtx_init(&sc->nfe_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->nfe_stat_ch, &sc->nfe_mtx, 0); - TASK_INIT(&sc->nfe_link_task, 0, nfe_link_task, sc); pci_enable_busmaster(dev); @@ -586,6 +587,9 @@ nfe_attach(device_t dev) if ((ifp->if_capabilities & IFCAP_HWCSUM) != 0) ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; } + + if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) + ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; /* @@ -666,7 +670,6 @@ nfe_detach(device_t dev) NFE_UNLOCK(sc); callout_drain(&sc->nfe_stat_ch); taskqueue_drain(taskqueue_fast, &sc->nfe_tx_task); - taskqueue_drain(taskqueue_swi, &sc->nfe_link_task); ether_ifdetach(ifp); } @@ -752,6 +755,7 @@ nfe_suspend(device_t dev) NFE_LOCK(sc); nfe_stop(sc->nfe_ifp); + nfe_set_wol(sc); sc->nfe_suspended = 1; NFE_UNLOCK(sc); @@ -768,6 +772,7 @@ nfe_resume(device_t dev) sc = device_get_softc(dev); NFE_LOCK(sc); + nfe_power(sc); ifp = sc->nfe_ifp; if (ifp->if_flags & IFF_UP) nfe_init_locked(sc); @@ -806,37 +811,51 @@ static void nfe_miibus_statchg(device_t dev) { struct nfe_softc *sc; - - sc = device_get_softc(dev); - taskqueue_enqueue(taskqueue_swi, &sc->nfe_link_task); -} - - -static void -nfe_link_task(void *arg, int pending) -{ - struct nfe_softc *sc; struct mii_data *mii; struct ifnet *ifp; - uint32_t phy, seed, misc = NFE_MISC1_MAGIC, link = NFE_MEDIA_SET; - uint32_t gmask, rxctl, txctl, val; + uint32_t rxctl, txctl; - sc = (struct nfe_softc *)arg; - - NFE_LOCK(sc); + sc = device_get_softc(dev); mii = device_get_softc(sc->nfe_miibus); ifp = sc->nfe_ifp; - if (mii == NULL || ifp == NULL) { - NFE_UNLOCK(sc); - return; - } - if (mii->mii_media_status & IFM_ACTIVE) { - if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) + sc->nfe_link = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_1000_T: sc->nfe_link = 1; - } else - sc->nfe_link = 0; + break; + default: + break; + } + } + + nfe_mac_config(sc, mii); + txctl = NFE_READ(sc, NFE_TX_CTL); + rxctl = NFE_READ(sc, NFE_RX_CTL); + if (sc->nfe_link != 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + txctl |= NFE_TX_START; + rxctl |= NFE_RX_START; + } else { + txctl &= ~NFE_TX_START; + rxctl &= ~NFE_RX_START; + } + NFE_WRITE(sc, NFE_TX_CTL, txctl); + NFE_WRITE(sc, NFE_RX_CTL, rxctl); +} + + +static void +nfe_mac_config(struct nfe_softc *sc, struct mii_data *mii) +{ + uint32_t link, misc, phy, seed; + uint32_t val; + + NFE_LOCK_ASSERT(sc); phy = NFE_READ(sc, NFE_PHY_IFACE); phy &= ~(NFE_PHY_HDX | NFE_PHY_100TX | NFE_PHY_1000T); @@ -844,7 +863,10 @@ nfe_link_task(void *arg, int pending) seed = NFE_READ(sc, NFE_RNDSEED); seed &= ~NFE_SEED_MASK; - if (((mii->mii_media_active & IFM_GMASK) & IFM_FDX) == 0) { + misc = NFE_MISC1_MAGIC; + link = NFE_MEDIA_SET; + + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) == 0) { phy |= NFE_PHY_HDX; /* half-duplex */ misc |= NFE_MISC1_HDX; } @@ -881,18 +903,18 @@ nfe_link_task(void *arg, int pending) NFE_WRITE(sc, NFE_MISC1, misc); NFE_WRITE(sc, NFE_LINKSPEED, link); - gmask = mii->mii_media_active & IFM_GMASK; - if ((gmask & IFM_FDX) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { /* It seems all hardwares supports Rx pause frames. */ val = NFE_READ(sc, NFE_RXFILTER); - if ((gmask & IFM_FLAG0) != 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) != 0) val |= NFE_PFF_RX_PAUSE; else val &= ~NFE_PFF_RX_PAUSE; NFE_WRITE(sc, NFE_RXFILTER, val); if ((sc->nfe_flags & NFE_TX_FLOW_CTRL) != 0) { val = NFE_READ(sc, NFE_MISC1); - if ((gmask & IFM_FLAG1) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_FLAG1) != 0) { NFE_WRITE(sc, NFE_TX_PAUSE_FRAME, NFE_TX_PAUSE_FRAME_ENABLE); val |= NFE_MISC1_TX_PAUSE; @@ -916,20 +938,6 @@ nfe_link_task(void *arg, int pending) NFE_WRITE(sc, NFE_MISC1, val); } } - - txctl = NFE_READ(sc, NFE_TX_CTL); - rxctl = NFE_READ(sc, NFE_RX_CTL); - if (sc->nfe_link != 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { - txctl |= NFE_TX_START; - rxctl |= NFE_RX_START; - } else { - txctl &= ~NFE_TX_START; - rxctl &= ~NFE_RX_START; - } - NFE_WRITE(sc, NFE_TX_CTL, txctl); - NFE_WRITE(sc, NFE_RX_CTL, rxctl); - - NFE_UNLOCK(sc); } @@ -1714,6 +1722,10 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, } } #endif /* DEVICE_POLLING */ + if ((mask & IFCAP_WOL_MAGIC) != 0 && + (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) + ifp->if_capenable ^= IFCAP_WOL_MAGIC; + if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && (mask & IFCAP_HWCSUM) != 0) { ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2746,7 +2758,8 @@ nfe_init_locked(void *xsc) NFE_WRITE(sc, NFE_STATUS, sc->mii_phyaddr << 24 | NFE_STATUS_MAGIC); NFE_WRITE(sc, NFE_SETUP_R4, NFE_R4_MAGIC); - NFE_WRITE(sc, NFE_WOL_CTL, NFE_WOL_MAGIC); + /* Disable WOL. */ + NFE_WRITE(sc, NFE_WOL_CTL, 0); sc->rxtxctl &= ~NFE_RXTX_BIT2; NFE_WRITE(sc, NFE_RXTX_CTL, sc->rxtxctl); @@ -2917,18 +2930,8 @@ nfe_tick(void *xsc) static int nfe_shutdown(device_t dev) { - struct nfe_softc *sc; - struct ifnet *ifp; - - sc = device_get_softc(dev); - NFE_LOCK(sc); - ifp = sc->nfe_ifp; - nfe_stop(ifp); - /* nfe_reset(sc); */ - NFE_UNLOCK(sc); - - return (0); + return (nfe_suspend(dev)); } @@ -3212,3 +3215,115 @@ nfe_stats_update(struct nfe_softc *sc) stats->rx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST); } } + + +static void +nfe_set_linkspeed(struct nfe_softc *sc) +{ + struct mii_softc *miisc; + struct mii_data *mii; + int aneg, i, phyno; + + NFE_LOCK_ASSERT(sc); + + mii = device_get_softc(sc->nfe_miibus); + mii_pollstat(mii); + aneg = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch IFM_SUBTYPE(mii->mii_media_active) { + case IFM_10_T: + case IFM_100_TX: + return; + case IFM_1000_T: + aneg++; + break; + default: + break; + } + } + phyno = 0; + if (mii->mii_instance) { + miisc = LIST_FIRST(&mii->mii_phys); + phyno = miisc->mii_phy; + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + mii_phy_reset(miisc); + } else + return; + nfe_miibus_writereg(sc->nfe_dev, phyno, MII_100T2CR, 0); + nfe_miibus_writereg(sc->nfe_dev, phyno, + MII_ANAR, ANAR_TX_FD | ANAR_TX | ANAR_10_FD | ANAR_10 | ANAR_CSMA); + nfe_miibus_writereg(sc->nfe_dev, phyno, + MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG); + DELAY(1000); + if (aneg != 0) { + /* + * Poll link state until nfe(4) get a 10/100Mbps link. + */ + for (i = 0; i < MII_ANEGTICKS_GIGE; i++) { + mii_pollstat(mii); + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) + == (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + nfe_mac_config(sc, mii); + return; + default: + break; + } + } + NFE_UNLOCK(sc); + pause("nfelnk", hz); + NFE_LOCK(sc); + } + if (i == MII_ANEGTICKS_GIGE) + device_printf(sc->nfe_dev, + "establishing a link failed, WOL may not work!"); + } + /* + * No link, force MAC to have 100Mbps, full-duplex link. + * This is the last resort and may/may not work. + */ + mii->mii_media_status = IFM_AVALID | IFM_ACTIVE; + mii->mii_media_active = IFM_ETHER | IFM_100_TX | IFM_FDX; + nfe_mac_config(sc, mii); +} + + +static void +nfe_set_wol(struct nfe_softc *sc) +{ + struct ifnet *ifp; + uint32_t wolctl; + int pmc; + uint16_t pmstat; + + NFE_LOCK_ASSERT(sc); + + if (pci_find_extcap(sc->nfe_dev, PCIY_PMG, &pmc) != 0) + return; + ifp = sc->nfe_ifp; + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + wolctl = NFE_WOL_MAGIC; + else + wolctl = 0; + NFE_WRITE(sc, NFE_WOL_CTL, wolctl); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) { + nfe_set_linkspeed(sc); + if ((sc->nfe_flags & NFE_PWR_MGMT) != 0) + NFE_WRITE(sc, NFE_PWR2_CTL, + NFE_READ(sc, NFE_PWR2_CTL) & ~NFE_PWR2_GATE_CLOCKS); + /* Enable RX. */ + NFE_WRITE(sc, NFE_RX_RING_ADDR_HI, 0); + NFE_WRITE(sc, NFE_RX_RING_ADDR_LO, 0); + NFE_WRITE(sc, NFE_RX_CTL, NFE_READ(sc, NFE_RX_CTL) | + NFE_RX_START); + } + /* Request PME if WOL is requested. */ + pmstat = pci_read_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, 2); + pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); + if ((ifp->if_capenable & IFCAP_WOL) != 0) + pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); +} Modified: stable/8/sys/dev/nfe/if_nfereg.h ============================================================================== --- stable/8/sys/dev/nfe/if_nfereg.h Thu Nov 18 16:32:52 2010 (r215455) +++ stable/8/sys/dev/nfe/if_nfereg.h Thu Nov 18 17:44:02 2010 (r215456) @@ -190,6 +190,7 @@ #define NFE_PWR2_WAKEUP_MASK 0x0f11 #define NFE_PWR2_REVA3 (1 << 0) +#define NFE_PWR2_GATE_CLOCKS 0x0f00 #define NFE_MEDIA_SET 0x10000 #define NFE_MEDIA_1000T 0x00032 Modified: stable/8/sys/dev/nfe/if_nfevar.h ============================================================================== --- stable/8/sys/dev/nfe/if_nfevar.h Thu Nov 18 16:32:52 2010 (r215455) +++ stable/8/sys/dev/nfe/if_nfevar.h Thu Nov 18 17:44:02 2010 (r215456) @@ -140,7 +140,6 @@ struct nfe_softc { struct taskqueue *nfe_tq; struct task nfe_int_task; struct task nfe_tx_task; - struct task nfe_link_task; int nfe_link; int nfe_suspended; int nfe_framesize; From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 18 18:03:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5800106564A; Thu, 18 Nov 2010 18:03:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D63B88FC12; Thu, 18 Nov 2010 18:03:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAII3qMQ040362; Thu, 18 Nov 2010 18:03:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAII3qfk040360; Thu, 18 Nov 2010 18:03:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011181803.oAII3qfk040360@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Nov 2010 18:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215460 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 18:03:53 -0000 Author: marius Date: Thu Nov 18 18:03:52 2010 New Revision: 215460 URL: http://svn.freebsd.org/changeset/base/215460 Log: MFC: r215348 Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules. Submitted by: yongari Modified: stable/8/sys/dev/mii/mii.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/mii.c ============================================================================== --- stable/8/sys/dev/mii/mii.c Thu Nov 18 17:58:59 2010 (r215459) +++ stable/8/sys/dev/mii/mii.c Thu Nov 18 18:03:52 2010 (r215460) @@ -449,6 +449,9 @@ mii_attach(device_t dev, device_t *miibu rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0) From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 18 19:06:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CB16106566B; Thu, 18 Nov 2010 19:06:57 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E10E8FC08; Thu, 18 Nov 2010 19:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIJ6v3j042133; Thu, 18 Nov 2010 19:06:57 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIJ6uNW042131; Thu, 18 Nov 2010 19:06:56 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201011181906.oAIJ6uNW042131@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 18 Nov 2010 19:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215466 - stable/8/usr.bin/truss X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 19:06:57 -0000 Author: jh Date: Thu Nov 18 19:06:56 2010 New Revision: 215466 URL: http://svn.freebsd.org/changeset/base/215466 Log: MFC r215235: Set FD_CLOEXEC for the output file only when the file has been specified with the -o option. Setting the flag for stderr (the default) could cause the traced process to redirect stderr to a random file. PR: bin/152151 Modified: stable/8/usr.bin/truss/main.c Directory Properties: stable/8/usr.bin/truss/ (props changed) Modified: stable/8/usr.bin/truss/main.c ============================================================================== --- stable/8/usr.bin/truss/main.c Thu Nov 18 18:49:04 2010 (r215465) +++ stable/8/usr.bin/truss/main.c Thu Nov 18 19:06:56 2010 (r215466) @@ -238,13 +238,14 @@ main(int ac, char **av) if (fname != NULL) { /* Use output file */ if ((trussinfo->outfile = fopen(fname, "w")) == NULL) errx(1, "cannot open %s", fname); + /* + * Set FD_CLOEXEC, so that the output file is not shared with + * the traced process. + */ + if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == + -1) + warn("fcntl()"); } - /* - * Set FD_CLOEXEC, so that the output file is not shared with - * the traced process. - */ - if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == -1) - warn("fcntl()"); /* * If truss starts the process itself, it will ignore some signals -- From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:17:50 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A836106564A; Fri, 19 Nov 2010 01:17:50 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19F138FC12; Fri, 19 Nov 2010 01:17:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1HnXO051023; Fri, 19 Nov 2010 01:17:49 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1HnOT051021; Fri, 19 Nov 2010 01:17:49 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190117.oAJ1HnOT051021@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215475 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:17:50 -0000 Author: thompsa Date: Fri Nov 19 01:17:49 2010 New Revision: 215475 URL: http://svn.freebsd.org/changeset/base/215475 Log: MFC r203774 Use more standard way for setting nonblocking flag for a filedescriptor. This makes libusb porting a bit easier. Modified: stable/8/lib/libusb/libusb10.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Thu Nov 18 23:46:55 2010 (r215474) +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 01:17:49 2010 (r215475) @@ -25,17 +25,16 @@ * SUCH DAMAGE. */ +#include #include #include #include #include #include -#include #include #include -#include +#include #include -#include #define libusb_device_handle libusb20_device @@ -75,6 +74,7 @@ libusb_init(libusb_context **context) { struct libusb_context *ctx; char *debug; + int flag; int ret; ctx = malloc(sizeof(*ctx)); @@ -105,10 +105,12 @@ libusb_init(libusb_context **context) return (LIBUSB_ERROR_OTHER); } /* set non-blocking mode on the control pipe to avoid deadlock */ - ret = 1; - ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); - ret = 1; - ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); + flag = 1; + ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); + flag = 1; + ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:18:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52AB6106566C; Fri, 19 Nov 2010 01:18:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379058FC13; Fri, 19 Nov 2010 01:18:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1IrN0051095; Fri, 19 Nov 2010 01:18:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Irv5051088; Fri, 19 Nov 2010 01:18:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190118.oAJ1Irv5051088@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215476 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:18:53 -0000 Author: thompsa Date: Fri Nov 19 01:18:52 2010 New Revision: 215476 URL: http://svn.freebsd.org/changeset/base/215476 Log: MFC r203775 Remove redundand headers and use more standard ones where necessary. Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_ugen20.c stable/8/lib/libusb/usb.h (contents, props changed) Directory Properties: stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb.h Fri Nov 19 01:18:52 2010 (r215476) @@ -29,12 +29,7 @@ #include #include -#include -#include -#include -#include -#include #ifdef __cplusplus Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:18:52 2010 (r215476) @@ -26,7 +26,6 @@ #include #include -#include #include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb10_io.c ============================================================================== --- stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:18:52 2010 (r215476) @@ -32,7 +32,6 @@ #include #include #include -#include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb20_desc.c ============================================================================== --- stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:18:52 2010 (r215476) @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "libusb20.h" Modified: stable/8/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:18:52 2010 (r215476) @@ -31,7 +31,6 @@ #include #include #include -#include #include #include Modified: stable/8/lib/libusb/usb.h ============================================================================== --- stable/8/lib/libusb/usb.h Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/usb.h Fri Nov 19 01:18:52 2010 (r215476) @@ -27,8 +27,7 @@ #ifndef _LIBUSB20_COMPAT_01_H_ #define _LIBUSB20_COMPAT_01_H_ -#include -#include +#include #include #include From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:20:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 099A81065673; Fri, 19 Nov 2010 01:20:54 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC9218FC0A; Fri, 19 Nov 2010 01:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1KrLt051206; Fri, 19 Nov 2010 01:20:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1KraM051195; Fri, 19 Nov 2010 01:20:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190120.oAJ1KraM051195@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215477 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:20:54 -0000 Author: thompsa Date: Fri Nov 19 01:20:53 2010 New Revision: 215477 URL: http://svn.freebsd.org/changeset/base/215477 Log: MFC r203815 Resort includes to match style(9) a bit more. No functional change is expected after this commit. Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20.c stable/8/lib/libusb/libusb20.h stable/8/lib/libusb/libusb20_compat01.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_ugen20.c stable/8/lib/libusb/usb.h (contents, props changed) Directory Properties: stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb.h Fri Nov 19 01:20:53 2010 (r215477) @@ -30,8 +30,6 @@ #include #include - - #ifdef __cplusplus extern "C" { #endif Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 01:20:53 2010 (r215477) @@ -25,16 +25,17 @@ * SUCH DAMAGE. */ +#include +#include +#include + #include -#include -#include -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,12 +24,13 @@ * SUCH DAMAGE. */ -#include -#include #include #define libusb_device_handle libusb20_device +#include +#include + #include "libusb20.h" #include "libusb20_desc.h" #include "libusb20_int.h" Modified: stable/8/lib/libusb/libusb10_io.c ============================================================================== --- stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,14 +24,15 @@ * SUCH DAMAGE. */ -#include -#include -#include +#include + +#include #include #include +#include +#include #include -#include -#include +#include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb20.c ============================================================================== --- stable/8/lib/libusb/libusb20.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,12 +24,13 @@ * SUCH DAMAGE. */ +#include + +#include +#include #include #include #include -#include -#include -#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/libusb20.h ============================================================================== --- stable/8/lib/libusb/libusb20.h Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20.h Fri Nov 19 01:20:53 2010 (r215477) @@ -29,13 +29,13 @@ #ifndef _LIBUSB20_H_ #define _LIBUSB20_H_ -#include -#include -#include - +#include #include #include -#include + +#include +#include +#include #ifdef __cplusplus extern "C" { Modified: stable/8/lib/libusb/libusb20_compat01.c ============================================================================== --- stable/8/lib/libusb/libusb20_compat01.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20_compat01.c Fri Nov 19 01:20:53 2010 (r215477) @@ -30,9 +30,9 @@ #include -#include -#include #include +#include +#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/libusb20_desc.c ============================================================================== --- stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,10 +24,11 @@ * SUCH DAMAGE. */ +#include + #include #include #include -#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:20:53 2010 (r215477) @@ -27,12 +27,12 @@ #include #include +#include +#include #include #include -#include #include -#include -#include +#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/usb.h ============================================================================== --- stable/8/lib/libusb/usb.h Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/usb.h Fri Nov 19 01:20:53 2010 (r215477) @@ -27,9 +27,10 @@ #ifndef _LIBUSB20_COMPAT_01_H_ #define _LIBUSB20_COMPAT_01_H_ -#include -#include #include +#include + +#include /* USB interface class codes */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:23:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732EA1065698; Fri, 19 Nov 2010 01:23:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E618FC13; Fri, 19 Nov 2010 01:23:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1NARX051333; Fri, 19 Nov 2010 01:23:10 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1NA1r051329; Fri, 19 Nov 2010 01:23:10 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190123.oAJ1NA1r051329@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215478 - in stable/8: share/man/man4 sys/dev/usb sys/dev/usb/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:23:10 -0000 Author: thompsa Date: Fri Nov 19 01:23:09 2010 New Revision: 215478 URL: http://svn.freebsd.org/changeset/base/215478 Log: MFC r210275 - Support for Globetrotter iCON 452. - Fixed the interface probe routine to only attach to USB interfaces the driver actually supports. This allows other drivers to attach to things like MicroSD slots etc. - Fixed network interface enumeration to be globally sequential instead of relying on the USB interface numbers. This make sure the first network interface always is at uhso0 and the second at usho1 and so on. - Added a radio kill switch; exposed through sysctl. - Updated the manual page to be verbose about the number of serial ports and include iCON 452 in the set of tested hardware. Submitted by: Fredrik Lindberg Modified: stable/8/share/man/man4/uhso.4 stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/uhso.4 ============================================================================== --- stable/8/share/man/man4/uhso.4 Fri Nov 19 01:20:53 2010 (r215477) +++ stable/8/share/man/man4/uhso.4 Fri Nov 19 01:23:09 2010 (r215478) @@ -43,8 +43,9 @@ based on their packet interface. Each device has a set of serial ports and a raw IP packet interface. The serial ports of the device are accessed through the .Xr ucom 4 -driver which makes them behave like a -.Xr tty 4 . +driver which makes them behave like +.Xr tty 4 +devices. The packet interface is exposed as a network interface. .Pp Establishing a connection on the packet interface is achieved by using the @@ -60,10 +61,19 @@ these calls. Each device usually have at least two or more serial ports, their individual purpose can be identified through .Xr sysctl 8 . +Ports identified as +.Dq Modem +features a normal modem interface that can be used with PPP. +Ports identified as +.Dq Diagnostic +uses a proprietary binary interface used for firmware upgrades, this port does not +have a AT command interface and can not be used to control the device. +Other ports features an AT command interface that can be used for normal device control. .Sh HARDWARE The .Nm -driver supports at least the following cards +driver should work with most devices from Option. +The following devices have been verified to work .Pp .Bl -bullet -compact .It @@ -71,6 +81,8 @@ Option GlobeSurfer iCON 7.2 (new firmwar .It Option iCON 225 .It +Option iCON 452 +.It Option iCON 505 .El .Pp @@ -88,7 +100,8 @@ This behavior can be disabled by setting to 0 using .Xr sysctl 8 .Sh EXAMPLES -Establishing a packet interface connection +Establishing a packet interface connection using the AT command interface available +at one of the serial ports .Bd -literal -offset indent AT+CGDCONT=1,,"apn.provider" AT_OWANCALL=1,1,1 Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:20:53 2010 (r215477) +++ stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:23:09 2010 (r215478) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Fredrik Lindberg + * Copyright (c) 2010 Fredrik Lindberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -81,6 +82,7 @@ struct uhso_softc { struct usb_device *sc_udev; struct mtx sc_mtx; uint32_t sc_type; /* Interface definition */ + int sc_radio; struct usb_xfer *sc_xfer[3]; uint8_t sc_iface_no; @@ -155,6 +157,7 @@ struct uhso_softc { * Note that these definitions are arbitrary and do not match the values * returned by the auto config descriptor. */ +#define UHSO_PORT_TYPE_UNKNOWN 0x00 #define UHSO_PORT_TYPE_CTL 0x01 #define UHSO_PORT_TYPE_APP 0x02 #define UHSO_PORT_TYPE_APP2 0x03 @@ -185,7 +188,7 @@ static char *uhso_port[] = { * descriptor values. */ static unsigned char uhso_port_map[] = { - 0, + UHSO_PORT_TYPE_UNKNOWN, UHSO_PORT_TYPE_DIAG, UHSO_PORT_TYPE_GPS, UHSO_PORT_TYPE_GPSCTL, @@ -243,6 +246,9 @@ static char *uhso_port_type_sysctl[] = { #define UHSO_STATIC_IFACE 0x01 #define UHSO_AUTO_IFACE 0x02 +/* ifnet device unit allocations */ +static struct unrhdr *uhso_ifnet_unit = NULL; + static const struct usb_device_id uhso_devs[] = { #define UHSO_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } /* Option GlobeSurfer iCON 7.2 */ @@ -272,6 +278,8 @@ static const struct usb_device_id uhso_d UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE), /* Option iCON 505 */ UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), + /* Option iCON 452 */ + UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), #undef UHSO_DEV }; @@ -432,9 +440,9 @@ static const struct usb_config uhso_bs_c }; static int uhso_probe_iface(struct uhso_softc *, int, - int (*probe)(struct uhso_softc *, int)); -static int uhso_probe_iface_auto(struct uhso_softc *, int); -static int uhso_probe_iface_static(struct uhso_softc *, int); + int (*probe)(struct usb_device *, int)); +static int uhso_probe_iface_auto(struct usb_device *, int); +static int uhso_probe_iface_static(struct usb_device *, int); static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, int type); static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, @@ -444,6 +452,8 @@ static int uhso_attach_ifnet(struct uhs static void uhso_test_autoinst(void *, struct usb_device *, struct usb_attach_arg *); static int uhso_driver_loaded(struct module *, int, void *); +static int uhso_radio_sysctl(SYSCTL_HANDLER_ARGS); +static int uhso_radio_ctrl(struct uhso_softc *, int); static void uhso_ucom_start_read(struct ucom_softc *); static void uhso_ucom_stop_read(struct ucom_softc *); @@ -497,6 +507,7 @@ static int uhso_probe(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); + int error; if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); @@ -505,7 +516,20 @@ uhso_probe(device_t self) if (uaa->device->ddesc.bDeviceClass != 0xff) return (ENXIO); - return (usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa)); + error = usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa); + if (error != 0) + return (error); + + /* + * Probe device to see if we are able to attach + * to this interface or not. + */ + if (USB_GET_DRIVER_INFO(uaa) == UHSO_AUTO_IFACE) { + if (uhso_probe_iface_auto(uaa->device, + uaa->info.bIfaceNum) == 0) + return (ENXIO); + } + return (error); } static int @@ -517,7 +541,7 @@ uhso_attach(device_t self) struct usb_interface_descriptor *id; struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; - struct sysctl_oid *tree, *tty_node; + struct sysctl_oid *tree = NULL, *tty_node; struct ucom_softc *ucom; struct uhso_tty *ht; int i, error, port; @@ -531,6 +555,7 @@ uhso_attach(device_t self) sc->sc_ucom = NULL; sc->sc_ttys = 0; + sc->sc_radio = 1; cd = usbd_get_config_descriptor(uaa->device); id = usbd_get_interface_descriptor(uaa->iface); @@ -566,6 +591,8 @@ uhso_attach(device_t self) SYSCTL_ADD_STRING(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "type", CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "radio", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, uhso_radio_sysctl, "I", "Enable radio"); /* * The default interface description on most Option devices isn't @@ -655,6 +682,7 @@ uhso_detach(device_t self) if (sc->sc_ifp != NULL) { callout_drain(&sc->sc_c); + free_unr(uhso_ifnet_unit, sc->sc_ifp->if_dunit); mtx_lock(&sc->sc_mtx); uhso_if_stop(sc); bpfdetach(sc->sc_ifp); @@ -701,9 +729,12 @@ uhso_driver_loaded(struct module *mod, i /* register our autoinstall handler */ uhso_etag = EVENTHANDLER_REGISTER(usb_dev_configured, uhso_test_autoinst, NULL, EVENTHANDLER_PRI_ANY); + /* create our unit allocator for inet devs */ + uhso_ifnet_unit = new_unrhdr(0, INT_MAX, NULL); break; case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(usb_dev_configured, uhso_etag); + delete_unrhdr(uhso_ifnet_unit); break; default: return (EOPNOTSUPP); @@ -717,7 +748,7 @@ uhso_driver_loaded(struct module *mod, i * Returns a bit mask with the interface capabilities. */ static int -uhso_probe_iface_auto(struct uhso_softc *sc, int index) +uhso_probe_iface_auto(struct usb_device *udev, int index) { struct usb_device_request req; usb_error_t uerr; @@ -731,11 +762,11 @@ uhso_probe_iface_auto(struct uhso_softc USETW(req.wIndex, 0); USETW(req.wLength, 17); - uerr = usbd_do_request_flags(sc->sc_udev, NULL, &req, buf, + uerr = usbd_do_request_flags(udev, NULL, &req, buf, 0, &actlen, USB_MS_HZ); if (uerr != 0) { - device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", - usbd_errstr(uerr)); + printf("%s: usbd_do_request_flags failed, %s\n", + __func__, usbd_errstr(uerr)); return (0); } @@ -759,23 +790,35 @@ uhso_probe_iface_auto(struct uhso_softc case UHSO_PORT_TYPE_NETWORK: return (UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); - case UHSO_PORT_TYPE_VOICE: - /* Don't claim 'voice' ports */ - return (0); - default: + case UHSO_PORT_TYPE_DIAG: + case UHSO_PORT_TYPE_DIAG2: + case UHSO_PORT_TYPE_CTL: + case UHSO_PORT_TYPE_APP: + case UHSO_PORT_TYPE_APP2: + case UHSO_PORT_TYPE_MODEM: return (UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, port)); + case UHSO_PORT_TYPE_MSD: + return (0); + case UHSO_PORT_TYPE_UNKNOWN: + default: + return (0); } return (0); } +/* + * Returns the capabilities of interfaces for devices that don't + * support the automatic query. + * Returns a bit mask with the interface capabilities. + */ static int -uhso_probe_iface_static(struct uhso_softc *sc, int index) +uhso_probe_iface_static(struct usb_device *udev, int index) { struct usb_config_descriptor *cd; - cd = usbd_get_config_descriptor(sc->sc_udev); + cd = usbd_get_config_descriptor(udev); if (cd->bNumInterface <= 3) { /* Cards with 3 or less interfaces */ switch (index) { @@ -817,14 +860,14 @@ uhso_probe_iface_static(struct uhso_soft */ static int uhso_probe_iface(struct uhso_softc *sc, int index, - int (*probe)(struct uhso_softc *, int)) + int (*probe)(struct usb_device *, int)) { struct usb_interface *iface; int type, error; UHSO_DPRINTF(1, "Probing for interface %d, probe_func=%p\n", index, probe); - type = probe(sc, index); + type = probe(sc->sc_udev, index); UHSO_DPRINTF(1, "Probe result %x\n", type); if (type <= 0) return (ENXIO); @@ -888,6 +931,47 @@ uhso_probe_iface(struct uhso_softc *sc, return (0); } +static int +uhso_radio_ctrl(struct uhso_softc *sc, int onoff) +{ + struct usb_device_request req; + usb_error_t uerr; + + req.bmRequestType = UT_VENDOR; + req.bRequest = onoff ? 0x82 : 0x81; + USETW(req.wValue, 0); + USETW(req.wIndex, 0); + USETW(req.wLength, 0); + + uerr = usbd_do_request(sc->sc_udev, NULL, &req, NULL); + if (uerr != 0) { + device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", + usbd_errstr(uerr)); + return (-1); + } + return (onoff); +} + +static int +uhso_radio_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct uhso_softc *sc = arg1; + int error, radio; + + radio = sc->sc_radio; + error = sysctl_handle_int(oidp, &radio, 0, req); + if (error) + return (error); + if (radio != sc->sc_radio) { + radio = radio != 0 ? 1 : 0; + error = uhso_radio_ctrl(sc, radio); + if (error != -1) + sc->sc_radio = radio; + + } + return (0); +} + /* * Expands allocated memory to fit an additional TTY. * Two arrays are kept with matching indexes, one for ucom and one @@ -1435,13 +1519,14 @@ uhso_ucom_stop_write(struct ucom_softc * } } -static int uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, - int type) +static int +uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, int type) { struct ifnet *ifp; usb_error_t uerr; struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; + unsigned int devunit; uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_if_xfer, @@ -1463,7 +1548,14 @@ static int uhso_attach_ifnet(struct uhso callout_reset(&sc->sc_c, 1, uhso_if_rxflush, sc); mtx_unlock(&sc->sc_mtx); - if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); + /* + * We create our own unit numbers for ifnet devices because the + * USB interface unit numbers can be at arbitrary positions yielding + * odd looking device names. + */ + devunit = alloc_unr(uhso_ifnet_unit); + + if_initname(ifp, device_get_name(sc->sc_dev), devunit); ifp->if_mtu = UHSO_MAX_MTU; ifp->if_ioctl = uhso_if_ioctl; ifp->if_init = uhso_if_init; Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:20:53 2010 (r215477) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:23:09 2010 (r215478) @@ -2398,6 +2398,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 +product OPTION_ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:24:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1CB4106564A; Fri, 19 Nov 2010 01:24:36 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF98C8FC08; Fri, 19 Nov 2010 01:24:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1Oafe051427; Fri, 19 Nov 2010 01:24:36 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Oaq2051426; Fri, 19 Nov 2010 01:24:36 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190124.oAJ1Oaq2051426@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215479 - in stable/8: share/man/man4 sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/xen/xenpci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:24:37 -0000 Author: thompsa Date: Fri Nov 19 01:24:36 2010 New Revision: 215479 URL: http://svn.freebsd.org/changeset/base/215479 Log: MFC r212980 Add new device ids. Buffalo (Melco Inc.) LUA3-U2-AGT Logitec LAN-GTJ/U2A(usb/119981) PR: usb/119981 Modified: Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:27:22 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19C911065673; Fri, 19 Nov 2010 01:27:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095C08FC19; Fri, 19 Nov 2010 01:27:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1RLi1051545; Fri, 19 Nov 2010 01:27:21 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1RLfW051543; Fri, 19 Nov 2010 01:27:21 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190127.oAJ1RLfW051543@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215480 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:27:22 -0000 Author: thompsa Date: Fri Nov 19 01:27:21 2010 New Revision: 215480 URL: http://svn.freebsd.org/changeset/base/215480 Log: MFC r206369 Remove debugging code that snuck in. Modified: stable/8/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:24:36 2010 (r215479) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:27:21 2010 (r215480) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L"); -#define URTW_DEBUG #ifdef URTW_DEBUG int urtw_debug = 0; SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0, From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:28:22 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CFB1106566C; Fri, 19 Nov 2010 01:28:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5644B8FC1E; Fri, 19 Nov 2010 01:28:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1SMkO051618; Fri, 19 Nov 2010 01:28:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1SMIK051615; Fri, 19 Nov 2010 01:28:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190128.oAJ1SMIK051615@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215481 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:28:22 -0000 Author: thompsa Date: Fri Nov 19 01:28:22 2010 New Revision: 215481 URL: http://svn.freebsd.org/changeset/base/215481 Log: MFC r209144 - Because hostapd calls iv_key_set() before if_init(), make sure key_set callback function will be executed, and that the key won't be deleted during the init process. - txmic and rxmic are written into the chip the same place regardless of opmode. - Make the hardware generate 802.11 sequence numbers. Submitted by: Akinori Furukoshi Modified: stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:27:21 2010 (r215480) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:28:22 2010 (r215481) @@ -718,6 +718,10 @@ run_detach(device_t self) usbd_transfer_unsetup(sc->sc_xfer, RUN_N_XFER); RUN_LOCK(sc); + + sc->ratectl_run = RUN_RATECTL_OFF; + sc->cmdq_run = sc->cmdq_key_set = RUN_CMDQ_ABORT; + /* free TX list, if any */ for (i = 0; i != RUN_EP_QUEUES; i++) run_unsetup_tx_list(sc, &sc->sc_epq[i]); @@ -827,6 +831,9 @@ run_vap_create(struct ieee80211com *ic, if(sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; + if(opmode == IEEE80211_M_HOSTAP) + sc->cmdq_run = RUN_CMDQ_GO; + DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); @@ -1952,19 +1959,14 @@ run_key_set_cb(void *arg) struct ieee80211_node *ni; uint32_t attr; uint16_t base, associd; - uint8_t mode, wcid, txmic, rxmic, iv[8]; + uint8_t mode, wcid, iv[8]; RUN_LOCK_ASSERT(sc, MA_OWNED); - if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + if(vap->iv_opmode == IEEE80211_M_HOSTAP) ni = ieee80211_find_vap_node(&ic->ic_sta, vap, cmdq->mac); - txmic = 24; - rxmic = 16; - } else { + else ni = vap->iv_bss; - txmic = 16; - rxmic = 24; - } associd = (ni != NULL) ? ni->ni_associd : 0; /* map net80211 cipher to RT2860 security mode */ @@ -2003,9 +2005,9 @@ run_key_set_cb(void *arg) if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_TKIP) { if(run_write_region_1(sc, base, k->wk_key, 16)) return; - if(run_write_region_1(sc, base + 16, &k->wk_key[txmic], 8)) /* wk_txmic */ + if(run_write_region_1(sc, base + 16, &k->wk_key[16], 8)) /* wk_txmic */ return; - if(run_write_region_1(sc, base + 24, &k->wk_key[rxmic], 8)) /* wk_rxmic */ + if(run_write_region_1(sc, base + 24, &k->wk_key[24], 8)) /* wk_rxmic */ return; } else { /* roundup len to 16-bit: XXX fix write_region_1() instead */ @@ -2086,6 +2088,16 @@ run_key_set(struct ieee80211vap *vap, st IEEE80211_ADDR_COPY(sc->cmdq[i].mac, mac); ieee80211_runtask(ic, &sc->cmdq_task); + /* + * To make sure key will be set when hostapd + * calls iv_key_set() before if_init(). + */ + if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + RUN_LOCK(sc); + sc->cmdq_key_set = RUN_CMDQ_GO; + RUN_UNLOCK(sc); + } + return(1); } @@ -2896,6 +2908,9 @@ run_set_tx_desc(struct run_softc *sc, st txwi->txop |= RT2860_TX_TXOP_HT; else txwi->txop |= RT2860_TX_TXOP_BACKOFF; + + if(vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) + txwi->xflags |= RT2860_TX_NSEQ; } /* This function must be called locked */ @@ -2975,7 +2990,7 @@ run_tx(struct run_softc *sc, struct mbuf if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && (!hasqos || (qos & IEEE80211_QOS_ACKPOLICY) != IEEE80211_QOS_ACKPOLICY_NOACK)) { - xflags = RT2860_TX_ACK; + xflags |= RT2860_TX_ACK; if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) dur = rt2860_rates[ctl_ridx].sp_ack_dur; else @@ -2997,8 +3012,8 @@ run_tx(struct run_softc *sc, struct mbuf txd->flags = qflags; txwi = (struct rt2860_txwi *)(txd + 1); txwi->xflags = xflags; - txwi->wcid = (type == IEEE80211_FC0_TYPE_DATA) ? - RUN_AID2WCID(ni->ni_associd) : 0xff; + txwi->wcid = IEEE80211_IS_MULTICAST(wh->i_addr1) ? + 0 : RUN_AID2WCID(ni->ni_associd); /* clear leftover garbage bits */ txwi->flags = 0; txwi->txop = 0; @@ -3921,6 +3936,7 @@ run_update_beacon_cb(void *arg) txwi.phy |= htole16(RT2860_PHY_OFDM); txwi.txop = RT2860_TX_TXOP_HT; txwi.flags = RT2860_TX_TS; + txwi.xflags = RT2860_TX_NSEQ; run_write_region_1(sc, RT2860_BCN_BASE(RUN_VAP(vap)->rvp_id), (uint8_t *)&txwi, sizeof txwi); @@ -4668,10 +4684,14 @@ run_init_locked(struct run_softc *sc) run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512); /* clear WCID attribute table */ run_set_region_4(sc, RT2860_WCID_ATTR(0), 0, 8 * 32); - /* clear shared key table */ - run_set_region_4(sc, RT2860_SKEY(0, 0), 0, 8 * 32); - /* clear shared key mode */ - run_set_region_4(sc, RT2860_SKEY_MODE_0_7, 0, 4); + + /* hostapd sets a key before init. So, don't clear it. */ + if(sc->cmdq_key_set != RUN_CMDQ_GO){ + /* clear shared key table */ + run_set_region_4(sc, RT2860_SKEY(0, 0), 0, 8 * 32); + /* clear shared key mode */ + run_set_region_4(sc, RT2860_SKEY_MODE_0_7, 0, 4); + } run_read(sc, RT2860_US_CYC_CNT, &tmp); tmp = (tmp & ~0xff) | 0x1e; @@ -4779,7 +4799,7 @@ run_stop(void *arg) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); sc->ratectl_run = RUN_RATECTL_OFF; - sc->cmdq_run = RUN_CMDQ_ABORT; + sc->cmdq_run = sc->cmdq_key_set; RUN_UNLOCK(sc); Modified: stable/8/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/8/sys/dev/usb/wlan/if_runvar.h Fri Nov 19 01:27:21 2010 (r215480) +++ stable/8/sys/dev/usb/wlan/if_runvar.h Fri Nov 19 01:28:22 2010 (r215481) @@ -218,6 +218,7 @@ struct run_softc { uint32_t cmdq_store; uint8_t cmdq_exec; uint8_t cmdq_run; + uint8_t cmdq_key_set; #define RUN_CMDQ_ABORT 0 #define RUN_CMDQ_GO 1 From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:29:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8C510656A3; Fri, 19 Nov 2010 01:29:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 805A88FC1C; Fri, 19 Nov 2010 01:29:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1TKBg051686; Fri, 19 Nov 2010 01:29:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1TKmM051681; Fri, 19 Nov 2010 01:29:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190129.oAJ1TKmM051681@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215482 - in stable/8/sys/dev/usb: . controller X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:29:20 -0000 Author: thompsa Date: Fri Nov 19 01:29:20 2010 New Revision: 215482 URL: http://svn.freebsd.org/changeset/base/215482 Log: MFC r209443 Add support for LOW speed BULK transfers. This mode is not recommended by the USB 2.0 standard, though some USB devices use it anyway. Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ohci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:29:20 2010 (r215482) @@ -3792,9 +3792,7 @@ ehci_ep_init(struct usb_device *udev, st } break; case UE_BULK: - if (udev->speed != USB_SPEED_LOW) { - ep->methods = &ehci_device_bulk_methods; - } + ep->methods = &ehci_device_bulk_methods; break; default: /* do nothing */ Modified: stable/8/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:29:20 2010 (r215482) @@ -2614,9 +2614,7 @@ ohci_ep_init(struct usb_device *udev, st } break; case UE_BULK: - if (udev->speed != USB_SPEED_LOW) { - ep->methods = &ohci_device_bulk_methods; - } + ep->methods = &ohci_device_bulk_methods; break; default: /* do nothing */ Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:29:20 2010 (r215482) @@ -3068,9 +3068,7 @@ uhci_ep_init(struct usb_device *udev, st } break; case UE_BULK: - if (udev->speed != USB_SPEED_LOW) { - ep->methods = &uhci_device_bulk_methods; - } + ep->methods = &uhci_device_bulk_methods; break; default: /* do nothing */ Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:29:20 2010 (r215482) @@ -3057,7 +3057,7 @@ usbd_get_std_packet_size(struct usb_std_ }; static const uint16_t bulk_min[USB_SPEED_MAX] = { - [USB_SPEED_LOW] = 0, /* not supported */ + [USB_SPEED_LOW] = 8, [USB_SPEED_FULL] = 8, [USB_SPEED_HIGH] = 512, [USB_SPEED_VARIABLE] = 512, From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:30:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA8A1065695; Fri, 19 Nov 2010 01:30:24 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF028FC1A; Fri, 19 Nov 2010 01:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1UNGg051763; Fri, 19 Nov 2010 01:30:24 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1UN9L051761; Fri, 19 Nov 2010 01:30:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190130.oAJ1UN9L051761@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215483 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:30:24 -0000 Author: thompsa Date: Fri Nov 19 01:30:23 2010 New Revision: 215483 URL: http://svn.freebsd.org/changeset/base/215483 Log: MFC r209450 Reduce MIDI input buffer size to one USB packet, hence some USB devices don't properly short terminate their transfers. This fixes a problem where input appears several seconds late. Reported by: Alexander Yerenkow Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:29:20 2010 (r215482) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:23 2010 (r215483) @@ -507,8 +507,8 @@ static const struct usb_config .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = UMIDI_BULK_SIZE, - .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 4, /* bytes */ + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.proxy_buffer = 1,}, .callback = &umidi_bulk_read_callback, }, @@ -3366,10 +3366,6 @@ umidi_bulk_read_callback(struct usb_xfer DPRINTF("actlen=%d bytes\n", actlen); - if (actlen == 0) { - /* should not happen */ - goto tr_error; - } pos = 0; pc = usbd_xfer_get_frame(xfer, 0); @@ -3404,8 +3400,6 @@ umidi_bulk_read_callback(struct usb_xfer return; default: -tr_error: - DPRINTF("error=%s\n", usbd_errstr(error)); if (error != USB_ERR_CANCELLED) { From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:31:00 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B0C810656A3; Fri, 19 Nov 2010 01:31:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3A348FC24; Fri, 19 Nov 2010 01:30:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1Uxif051822; Fri, 19 Nov 2010 01:30:59 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Ux3a051819; Fri, 19 Nov 2010 01:30:59 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190130.oAJ1Ux3a051819@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215484 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:31:00 -0000 Author: thompsa Date: Fri Nov 19 01:30:59 2010 New Revision: 215484 URL: http://svn.freebsd.org/changeset/base/215484 Log: MFC r209452 - fix for USB audio devices which use the 7-byte endpoint descriptor instead of the 9-byte one. - remove sync-endpoint code, which is currently unused. Reported by: Antun Matanovi Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:23 2010 (r215483) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:59 2010 (r215484) @@ -792,7 +792,8 @@ uaudio_chan_dump_ep_desc(const usb_endpo ed, ed->bLength, ed->bDescriptorType, ed->bEndpointAddress, ed->bmAttributes, UGETW(ed->wMaxPacketSize), ed->bInterval, - ed->bRefresh, ed->bSynchAddress); + UEP_HAS_REFRESH(ed) ? ed->bRefresh : 0, + UEP_HAS_SYNCADDR(ed) ? ed->bSynchAddress : 0); } } @@ -817,8 +818,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint16_t alt_index = 0; uint16_t wFormat; uint8_t ep_dir; - uint8_t ep_type; - uint8_t ep_sync; uint8_t bChannels; uint8_t bBitResolution; uint8_t x; @@ -896,34 +895,12 @@ uaudio_chan_fill_info_sub(struct uaudio_ } } if ((desc->bDescriptorType == UDESC_ENDPOINT) && - (desc->bLength >= sizeof(*ed1))) { + (desc->bLength >= UEP_MINSIZE)) { if (ed1 == NULL) { ed1 = (void *)desc; if (UE_GET_XFERTYPE(ed1->bmAttributes) != UE_ISOCHRONOUS) { ed1 = NULL; } - } else { - if (ed2 == NULL) { - ed2 = (void *)desc; - if (UE_GET_XFERTYPE(ed2->bmAttributes) != UE_ISOCHRONOUS) { - ed2 = NULL; - continue; - } - if (ed2->bSynchAddress != 0) { - DPRINTFN(11, "invalid endpoint: bSynchAddress != 0\n"); - ed2 = NULL; - continue; - } - if (ed2->bEndpointAddress != ed1->bSynchAddress) { - DPRINTFN(11, "invalid endpoint addresses: " - "ep[0]->bSynchAddress=0x%x " - "ep[1]->bEndpointAddress=0x%x\n", - ed1->bSynchAddress, - ed2->bEndpointAddress); - ed2 = NULL; - continue; - } - } } } if ((desc->bDescriptorType == UDESC_CS_ENDPOINT) && @@ -936,35 +913,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ if (audio_if && asid && asf1d && ed1 && sed) { ep_dir = UE_GET_DIR(ed1->bEndpointAddress); - ep_type = UE_GET_ISO_TYPE(ed1->bmAttributes); - ep_sync = 0; - - if ((sc->sc_uq_au_inp_async) && - (ep_dir == UE_DIR_IN) && (ep_type == UE_ISO_ADAPT)) { - ep_type = UE_ISO_ASYNC; - } - if ((ep_dir == UE_DIR_IN) && (ep_type == UE_ISO_ADAPT)) { - ep_sync = 1; - } - if ((ep_dir != UE_DIR_IN) && (ep_type == UE_ISO_ASYNC)) { - ep_sync = 1; - } - /* Ignore sync endpoint information until further. */ -#if 0 - if (ep_sync && (!ed2)) { - continue; - } - /* - * we can't handle endpoints that need a sync pipe - * yet - */ - if (ep_sync) { - DPRINTF("skipped sync interface\n"); - audio_if = 0; - continue; - } -#endif + /* We ignore sync endpoint information until further. */ wFormat = UGETW(asid->wFormatTag); bChannels = UAUDIO_MAX_CHAN(asf1d->bNrChannels); Modified: stable/8/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudioreg.h Fri Nov 19 01:30:23 2010 (r215483) +++ stable/8/sys/dev/sound/usb/uaudioreg.h Fri Nov 19 01:30:59 2010 (r215484) @@ -47,6 +47,11 @@ #define UDESCSUB_AC_PROCESSING 7 #define UDESCSUB_AC_EXTENSION 8 +/* These macros check if the endpoint descriptor has additional fields */ +#define UEP_MINSIZE 7 +#define UEP_HAS_REFRESH(ep) ((ep)->bLength >= 8) +#define UEP_HAS_SYNCADDR(ep) ((ep)->bLength >= 9) + /* The first fields are identical to struct usb_endpoint_descriptor */ typedef struct { uByte bLength; From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:32:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E249A106566C; Fri, 19 Nov 2010 01:32:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02318FC1D; Fri, 19 Nov 2010 01:32:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1WNBD051899; Fri, 19 Nov 2010 01:32:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1WNP3051897; Fri, 19 Nov 2010 01:32:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190132.oAJ1WNP3051897@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215485 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:32:24 -0000 Author: thompsa Date: Fri Nov 19 01:32:23 2010 New Revision: 215485 URL: http://svn.freebsd.org/changeset/base/215485 Log: MFC r209917 Update for style(9). Submitted by: Akinori Furukoshi (author) Modified: stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:30:59 2010 (r215484) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:32:23 2010 (r215485) @@ -569,7 +569,7 @@ run_attach(device_t self) /* wait for the chip to settle */ for (ntries = 0; ntries < 100; ntries++) { - if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0){ + if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0) { RUN_UNLOCK(sc); goto detach; } @@ -699,11 +699,11 @@ run_attach(device_t self) if (bootverbose) ieee80211_announce(ic); - return 0; + return (0); detach: run_detach(self); - return(ENXIO); + return (ENXIO); } static int @@ -754,9 +754,9 @@ run_vap_create(struct ieee80211com *ic, struct ieee80211vap *vap; int i; - if(sc->rvp_cnt >= RUN_VAP_MAX){ + if (sc->rvp_cnt >= RUN_VAP_MAX) { if_printf(ifp, "number of VAPs maxed out\n"); - return NULL; + return (NULL); } switch (opmode) { @@ -770,7 +770,7 @@ run_vap_create(struct ieee80211com *ic, case IEEE80211_M_MBSS: /* other than WDS vaps, only one at a time */ if (!TAILQ_EMPTY(&ic->ic_vaps)) - return NULL; + return (NULL); break; case IEEE80211_M_WDS: TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next){ @@ -780,20 +780,20 @@ run_vap_create(struct ieee80211com *ic, flags &= ~IEEE80211_CLONE_BSSID; break; } - if(vap == NULL){ + if (vap == NULL) { if_printf(ifp, "wds only supported in ap mode\n"); - return NULL; + return (NULL); } break; default: if_printf(ifp, "unknown opmode %d\n", opmode); - return NULL; + return (NULL); } rvp = (struct run_vap *) malloc(sizeof(struct run_vap), M_80211_VAP, M_NOWAIT | M_ZERO); if (rvp == NULL) - return NULL; + return (NULL); vap = &rvp->vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); @@ -821,23 +821,23 @@ run_vap_create(struct ieee80211com *ic, ieee80211_vap_attach(vap, run_media_change, ieee80211_media_status); /* make sure id is always unique */ - for(i = 0; i < RUN_VAP_MAX; i++){ + for (i = 0; i < RUN_VAP_MAX; i++) { if((sc->rvp_bmap & 1 << i) == 0){ sc->rvp_bmap |= 1 << i; rvp->rvp_id = i; break; } } - if(sc->rvp_cnt++ == 0) + if (sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; - if(opmode == IEEE80211_M_HOSTAP) + if (opmode == IEEE80211_M_HOSTAP) sc->cmdq_run = RUN_CMDQ_GO; DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); - return vap; + return (vap); } static void @@ -849,7 +849,7 @@ run_vap_delete(struct ieee80211vap *vap) struct run_softc *sc; uint8_t rvp_id; - if(vap == NULL) + if (vap == NULL) return; ic = vap->iv_ic; @@ -892,15 +892,15 @@ run_cmdq_cb(void *arg, int pending) /* call cmdq[].func locked */ RUN_LOCK(sc); - for(i = sc->cmdq_exec; sc->cmdq[i].func && pending; - i = sc->cmdq_exec, pending--){ + for (i = sc->cmdq_exec; sc->cmdq[i].func && pending; + i = sc->cmdq_exec, pending--) { DPRINTFN(6, "cmdq_exec=%d pending=%d\n", i, pending); - if(sc->cmdq_run == RUN_CMDQ_GO){ + if (sc->cmdq_run == RUN_CMDQ_GO) { /* * If arg0 is NULL, callback func needs more * than one arg. So, pass ptr to cmdq struct. */ - if(sc->cmdq[i].arg0) + if (sc->cmdq[i].arg0) sc->cmdq[i].func(sc->cmdq[i].arg0); else sc->cmdq[i].func(&sc->cmdq[i]); @@ -943,7 +943,7 @@ run_unsetup_tx_list(struct run_softc *sc /* free up all node references and mbufs */ for (data = &pq->tx_data[0]; - data < &pq->tx_data[RUN_TX_RING_COUNT]; data++){ + data < &pq->tx_data[RUN_TX_RING_COUNT]; data++) { if (data->m != NULL) { m_freem(data->m); data->m = NULL; @@ -969,7 +969,7 @@ run_load_microcode(struct run_softc *sc) RUN_UNLOCK(sc); fw = firmware_get("runfw"); RUN_LOCK(sc); - if(fw == NULL){ + if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", "runfw"); return ENOENT; @@ -991,14 +991,14 @@ run_load_microcode(struct run_softc *sc) base = fw->data; if ((sc->mac_ver) != 0x2860 && (sc->mac_ver) != 0x2872 && - (sc->mac_ver) != 0x3070){ + (sc->mac_ver) != 0x3070) { base += 4096; } /* cheap sanity check */ temp = fw->data; bytes = *temp; - if(bytes != be64toh(0xffffff0210280210)) { + if (bytes != be64toh(0xffffff0210280210)) { device_printf(sc->sc_dev, "firmware checksum failed\n"); error = EINVAL; goto fail; @@ -1059,7 +1059,7 @@ run_reset(struct run_softc *sc) USETW(req.wValue, 1); USETW(req.wIndex, 0); USETW(req.wLength, 0); - return usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); } static usb_error_t @@ -1094,7 +1094,7 @@ run_read(struct run_softc *sc, uint16_t *val = le32toh(tmp); else *val = 0xffffffff; - return error; + return (error); } static int @@ -1108,7 +1108,7 @@ run_read_region_1(struct run_softc *sc, USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); } static int @@ -1122,7 +1122,7 @@ run_write_2(struct run_softc *sc, uint16 USETW(req.wIndex, reg); USETW(req.wLength, 0); - return run_do_request(sc, &req, NULL); + return (run_do_request(sc, &req, NULL)); } static int @@ -1132,7 +1132,7 @@ run_write(struct run_softc *sc, uint16_t if ((error = run_write_2(sc, reg, val & 0xffff)) == 0) error = run_write_2(sc, reg + 2, val >> 16); - return error; + return (error); } static int @@ -1148,7 +1148,7 @@ run_write_region_1(struct run_softc *sc, KASSERT((len & 1) == 0, ("run_write_region_1: Data too long.\n")); for (i = 0; i < len && error == 0; i += 2) error = run_write_2(sc, reg + i, buf[i] | buf[i + 1] << 8); - return error; + return (error); #else usb_device_request_t req; @@ -1157,7 +1157,7 @@ run_write_region_1(struct run_softc *sc, USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); #endif } @@ -1169,7 +1169,7 @@ run_set_region_4(struct run_softc *sc, u KASSERT((len & 3) == 0, ("run_set_region_4: Invalid data length.\n")); for (i = 0; i < len && error == 0; i += 4) error = run_write(sc, reg + i, val); - return error; + return (error); } /* Read 16-bit from eFUSE ROM (RT3070 only.) */ @@ -1181,7 +1181,7 @@ run_efuse_read_2(struct run_softc *sc, u int error, ntries; if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); addr *= 2; /*- @@ -1196,25 +1196,25 @@ run_efuse_read_2(struct run_softc *sc, u run_write(sc, RT3070_EFUSE_CTRL, tmp); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_EFSROM_KICK)) break; run_delay(sc, 2); } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) { *val = 0xffff; /* address not found */ - return 0; + return (0); } /* determine to which 32-bit register our 16-bit word belongs */ reg = RT3070_EFUSE_DATA3 - (addr & 0xc); if ((error = run_read(sc, reg, &tmp)) != 0) - return error; + return (error); *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; - return 0; + return (0); } static int @@ -1236,7 +1236,7 @@ run_eeprom_read_2(struct run_softc *sc, *val = le16toh(tmp); else *val = 0xffff; - return error; + return (error); } static __inline int @@ -1254,17 +1254,17 @@ run_rt2870_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_RF_CSR_CFG0, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_RF_REG_CTRL)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); /* RF registers are 24-bit on the RT2860 */ tmp = RT2860_RF_REG_CTRL | 24 << RT2860_RF_REG_WIDTH_SHIFT | (val & 0x3fffff) << 2 | (reg & 3); - return run_write(sc, RT2860_RF_CSR_CFG0, tmp); + return (run_write(sc, RT2860_RF_CSR_CFG0, tmp)); } static int @@ -1275,28 +1275,28 @@ run_rt3070_rf_read(struct run_softc *sc, for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_KICK | reg << 8; if ((error = run_write(sc, RT3070_RF_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1307,15 +1307,15 @@ run_rt3070_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_WRITE | RT3070_RF_KICK | reg << 8 | val; - return run_write(sc, RT3070_RF_CSR_CFG, tmp); + return (run_write(sc, RT3070_RF_CSR_CFG, tmp)); } static int @@ -1326,28 +1326,28 @@ run_bbp_read(struct run_softc *sc, uint8 for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_READ | RT2860_BBP_CSR_KICK | reg << 8; if ((error = run_write(sc, RT2860_BBP_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1358,15 +1358,15 @@ run_bbp_write(struct run_softc *sc, uint for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_KICK | reg << 8 | val; - return run_write(sc, RT2860_BBP_CSR_CFG, tmp); + return (run_write(sc, RT2860_BBP_CSR_CFG, tmp)); } /* @@ -1390,7 +1390,7 @@ run_mcu_cmd(struct run_softc *sc, uint8_ tmp = RT2860_H2M_BUSY | RT2860_TOKEN_NO_INTR << 16 | arg; if ((error = run_write(sc, RT2860_H2M_MAILBOX, tmp)) == 0) error = run_write(sc, RT2860_HOST_CMD, cmd); - return error; + return (error); } /* @@ -1411,7 +1411,7 @@ b4inc(uint32_t b32, int8_t delta) b4 = 0xf; b32 = b32 >> 4 | b4 << 28; } - return b32; + return (b32); } static const char * @@ -1428,7 +1428,7 @@ run_get_rf(int rev) case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; } - return "unknown"; + return ("unknown"); } int @@ -1679,7 +1679,7 @@ run_read_eeprom(struct run_softc *sc) sc->rssi_5ghz[ant] = 0; } } - return 0; + return (0); } struct ieee80211_node * @@ -1702,9 +1702,9 @@ run_media_change(struct ifnet *ifp) RUN_LOCK(sc); error = ieee80211_media_change(ifp); - if (error != ENETRESET){ + if (error != ENETRESET) { RUN_UNLOCK(sc); - return error; + return (error); } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; @@ -1727,7 +1727,7 @@ run_media_change(struct ifnet *ifp) RUN_UNLOCK(sc); - return 0; + return (0); } static int @@ -1773,7 +1773,7 @@ run_newstate(struct ieee80211vap *vap, e sc->runbmap &= ~bid; /* abort TSF synchronization if there is no vap running */ - if(--sc->running == 0){ + if (--sc->running == 0) { run_read(sc, RT2860_BCN_TIME_CFG, &tmp); run_write(sc, RT2860_BCN_TIME_CFG, tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | @@ -1784,13 +1784,13 @@ run_newstate(struct ieee80211vap *vap, e case IEEE80211_S_RUN: ni = vap->iv_bss; - if(!(sc->runbmap & bid)){ + if (!(sc->runbmap & bid)) { if(sc->running++) restart_ratectl = 1; sc->runbmap |= bid; } - switch(vap->iv_opmode){ + switch (vap->iv_opmode) { case IEEE80211_M_HOSTAP: case IEEE80211_M_MBSS: sc->ap_running |= bid; @@ -1799,13 +1799,13 @@ run_newstate(struct ieee80211vap *vap, e break; case IEEE80211_M_IBSS: sc->adhoc_running |= bid; - if(!sc->ap_running) + if (!sc->ap_running) ic->ic_opmode = vap->iv_opmode; run_update_beacon_cb(vap); break; case IEEE80211_M_STA: sc->sta_running |= bid; - if(!sc->ap_running && !sc->adhoc_running) + if (!sc->ap_running && !sc->adhoc_running) ic->ic_opmode = vap->iv_opmode; /* read statistic counters (clear on read) */ @@ -1845,7 +1845,7 @@ run_newstate(struct ieee80211vap *vap, e } /* restart amrr for running VAPs */ - if((sc->ratectl_run = ratectl) && restart_ratectl) + if ((sc->ratectl_run = ratectl) && restart_ratectl) usb_callout_reset(&sc->ratectl_ch, hz, run_ratectl_to, sc); RUN_UNLOCK(sc); @@ -1872,7 +1872,7 @@ run_wme_update_cb(void *arg) wmesp->wme_params[aci].wmep_logcwmin << 12 | wmesp->wme_params[aci].wmep_aifsn << 8 | wmesp->wme_params[aci].wmep_txopLimit); - if(error) goto err; + if (error) goto err; } /* update SCH/DMA registers too */ @@ -1881,29 +1881,29 @@ run_wme_update_cb(void *arg) wmesp->wme_params[WME_AC_VI].wmep_aifsn << 8 | wmesp->wme_params[WME_AC_BK].wmep_aifsn << 4 | wmesp->wme_params[WME_AC_BE].wmep_aifsn); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMIN_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmin << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmin << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmin << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmin); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMAX_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmax << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmax << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmax << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmax); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP0_CFG, wmesp->wme_params[WME_AC_BK].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_BE].wmep_txopLimit); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP1_CFG, wmesp->wme_params[WME_AC_VO].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_VI].wmep_txopLimit); err: - if(error) + if (error) DPRINTF("WME update failed\n"); return; @@ -1915,13 +1915,13 @@ run_wme_update(struct ieee80211com *ic) struct run_softc *sc = ic->ic_ifp->if_softc; /* sometime called wothout lock */ - if(mtx_owned(&ic->ic_comlock.mtx)){ + if (mtx_owned(&ic->ic_comlock.mtx)) { uint32_t i = RUN_CMDQ_GET(&sc->cmdq_store); DPRINTF("cmdq_store=%d\n", i); sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return (0); + return 0; } RUN_LOCK(sc); @@ -1963,7 +1963,7 @@ run_key_set_cb(void *arg) RUN_LOCK_ASSERT(sc, MA_OWNED); - if(vap->iv_opmode == IEEE80211_M_HOSTAP) + if (vap->iv_opmode == IEEE80211_M_HOSTAP) ni = ieee80211_find_vap_node(&ic->ic_sta, vap, cmdq->mac); else ni = vap->iv_bss; @@ -2018,7 +2018,7 @@ run_key_set_cb(void *arg) if (!(k->wk_flags & IEEE80211_KEY_GROUP) || (k->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV))) { /* set initial packet number in IV+EIV */ - if (k->wk_cipher == IEEE80211_CIPHER_WEP){ + if (k->wk_cipher == IEEE80211_CIPHER_WEP) { memset(iv, 0, sizeof iv); iv[3] = vap->iv_def_txkey << 6; } else { @@ -2037,24 +2037,24 @@ run_key_set_cb(void *arg) iv[6] = k->wk_keytsc >> 32; iv[7] = k->wk_keytsc >> 40; } - if(run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) + if (run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) return; } if (k->wk_flags & IEEE80211_KEY_GROUP) { /* install group key */ - if(run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) + if (run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) return; attr &= ~(0xf << (k->wk_keyix * 4)); attr |= mode << (k->wk_keyix * 4); - if(run_write(sc, RT2860_SKEY_MODE_0_7, attr)) + if (run_write(sc, RT2860_SKEY_MODE_0_7, attr)) return; } else { /* install pairwise key */ - if(run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) + if (run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) return; attr = (attr & ~0xf) | (mode << 1) | RT2860_RX_PKEY_EN; - if(run_write(sc, RT2860_WCID_ATTR(wcid), attr)) + if (run_write(sc, RT2860_WCID_ATTR(wcid), attr)) return; } @@ -2092,13 +2092,13 @@ run_key_set(struct ieee80211vap *vap, st * To make sure key will be set when hostapd * calls iv_key_set() before if_init(). */ - if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + if (vap->iv_opmode == IEEE80211_M_HOSTAP) { RUN_LOCK(sc); sc->cmdq_key_set = RUN_CMDQ_GO; RUN_UNLOCK(sc); } - return(1); + return (1); } /* @@ -2187,10 +2187,10 @@ run_ratectl_cb(void *arg, int pending) struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if(vap == NULL) + if (vap == NULL) return; - if(sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) + if (sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) run_iter_func(sc, vap->iv_bss); else { /* @@ -2228,7 +2228,7 @@ run_drain_fifo(void *arg) /* drain Tx status FIFO (maxsize = 16) */ run_read(sc, RT2860_TX_STAT_FIFO, &stat); DPRINTFN(4, "tx stat 0x%08x\n", stat); - if(!(stat & RT2860_TXQ_VLD)) + if (!(stat & RT2860_TXQ_VLD)) break; wcid = (stat >> RT2860_TXQ_WCID_SHIFT) & 0xff; @@ -2239,7 +2239,7 @@ run_drain_fifo(void *arg) continue; ni = sc->sc_ni[wcid]; - if(ni->ni_rctls == NULL) + if (ni->ni_rctls == NULL) continue; /* update per-STA AMRR stats */ @@ -2282,8 +2282,8 @@ run_iter_func(void *arg, struct ieee8021 int txcnt = 0, success = 0, retrycnt = 0; int error; - if(sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || - vap->iv_opmode == IEEE80211_M_STA)){ + if (sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_STA)) { RUN_LOCK(sc); /* read statistic counters (clear on read) and update AMRR state */ @@ -2348,13 +2348,13 @@ run_newassoc(struct ieee80211_node *ni, uint8_t wcid = RUN_AID2WCID(ni->ni_associd); int i, j; - if(wcid > RT2870_WCID_MAX){ + if (wcid > RT2870_WCID_MAX) { device_printf(sc->sc_dev, "wcid=%d out of range\n", wcid); return; } /* only interested in true associations */ - if (isnew && ni->ni_associd != 0){ + if (isnew && ni->ni_associd != 0) { /* * This function could is called though timeout function. @@ -2423,7 +2423,7 @@ run_maxrssi_chain(struct run_softc *sc, if (rxwi->rssi[2] > rxwi->rssi[rxchain]) rxchain = 2; } - return rxchain; + return (rxchain); } static void @@ -2464,12 +2464,12 @@ run_rx_frame(struct run_softc *sc, struc wh = mtod(m, struct ieee80211_frame *); - if (wh->i_fc[1] & IEEE80211_FC1_WEP){ + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { wh->i_fc[1] &= ~IEEE80211_FC1_WEP; m->m_flags |= M_WEP; } - if (flags & RT2860_RX_L2PAD){ + if (flags & RT2860_RX_L2PAD) { DPRINTFN(8, "received RT2860_RX_L2PAD frame\n"); len += 2; } @@ -2479,7 +2479,7 @@ run_rx_frame(struct run_softc *sc, struc if (__predict_false(flags & RT2860_RX_MICERR)) { /* report MIC failures to net80211 for TKIP */ - if(ni != NULL) + if (ni != NULL) ieee80211_notify_michael_failure(ni->ni_vap, wh, rxwi->keyidx); m_freem(m); ifp->if_ierrors++; @@ -2501,7 +2501,7 @@ run_rx_frame(struct run_softc *sc, struc (void)ieee80211_input_all(ic, m, rssi, nf); } - if(__predict_false(ieee80211_radiotap_active(ic))){ + if (__predict_false(ieee80211_radiotap_active(ic))) { struct run_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; @@ -2602,7 +2602,7 @@ tr_setup: goto tr_setup; } - if(sc->rx_m != NULL){ + if (sc->rx_m != NULL) { m_freem(sc->rx_m); sc->rx_m = NULL; } @@ -2633,7 +2633,7 @@ tr_setup: } /* If it is the last one or a single frame, we won't copy. */ - if((xferlen -= dmalen + 8) <= 8){ + if ((xferlen -= dmalen + 8) <= 8) { /* trim 32-bit DMA-len header */ m->m_data += 4; m->m_pkthdr.len = m->m_len -= 4; @@ -2673,7 +2673,7 @@ run_tx_free(struct run_endpoint_queue *p m_freem(data->m); data->m = NULL; - if(data->ni == NULL) { + if (data->ni == NULL) { DPRINTF("no node\n"); } else { ieee80211_free_node(data->ni); @@ -2703,7 +2703,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - switch (USB_GET_STATE(xfer)){ + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete: %d " "bytes @ index %d\n", actlen, index); @@ -2721,7 +2721,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x case USB_ST_SETUP: tr_setup: data = STAILQ_FIRST(&pq->tx_qh); - if(data == NULL) + if (data == NULL) break; STAILQ_REMOVE_HEAD(&pq->tx_qh, next); @@ -2791,7 +2791,7 @@ tr_setup: run_tx_free(pq, data, error); usbd_xfer_set_priv(xfer, NULL); } - if(vap == NULL) + if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); if (error != USB_ERR_CANCELLED) { @@ -2909,7 +2909,7 @@ run_set_tx_desc(struct run_softc *sc, st else txwi->txop |= RT2860_TX_TXOP_BACKOFF; - if(vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) + if (vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) txwi->xflags |= RT2860_TX_NSEQ; } @@ -3037,8 +3037,8 @@ run_tx(struct run_softc *sc, struct mbuf * * FIFO stats doesn't count Tx with WCID 0xff, so we do this in run_tx(). */ - if(sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || - vap->iv_opmode == IEEE80211_M_MBSS){ + if (sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_MBSS) { uint16_t pid = (rt2860_rates[ridx].mcs + 1) & 0xf; txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT); @@ -3054,7 +3054,7 @@ run_tx(struct run_softc *sc, struct mbuf * run_ratectl_cb() via callout. * Call it early. Otherwise overflow. */ - if(sc->fifo_cnt++ == 10){ + if (sc->fifo_cnt++ == 10) { /* * With multiple vaps or if_bridge, if_start() is called * with a non-sleepable lock, tcpinp. So, need to defer. @@ -3275,7 +3275,7 @@ run_tx_param(struct run_softc *sc, struc rate); if (error) { /* let caller free mbuf */ - return (error); + return error; } opflags |= /*XXX RT2573_TX_LONG_RETRY |*/ RT2860_TX_TXOP_SIFS; } @@ -3314,7 +3314,7 @@ run_tx_param(struct run_softc *sc, struc usbd_transfer_start(sc->sc_xfer[0]); - return (0); + return (0); } static int @@ -3335,14 +3335,14 @@ run_raw_xmit(struct ieee80211_node *ni, if (params == NULL) { /* tx mgt packet */ - if ((error = run_tx_mgt(sc, m, ni)) != 0){ + if ((error = run_tx_mgt(sc, m, ni)) != 0) { ifp->if_oerrors++; DPRINTF("mgt tx failed\n"); goto done; } } else { /* tx raw packet with param */ - if ((error = run_tx_param(sc, m, ni, params)) != 0){ + if ((error = run_tx_param(sc, m, ni, params)) != 0) { ifp->if_oerrors++; DPRINTF("tx with param failed\n"); goto done; @@ -3354,7 +3354,7 @@ run_raw_xmit(struct ieee80211_node *ni, done: RUN_UNLOCK(sc); - if(error != 0){ + if (error != 0) { if(m != NULL) m_freem(m); ieee80211_free_node(ni); @@ -3413,13 +3413,13 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } else run_update_promisc_locked(ifp); } else { - if(ifp->if_drv_flags & IFF_DRV_RUNNING && - (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)){ + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)) { run_stop(sc); } } RUN_UNLOCK(sc); - if(startall) + if (startall) ieee80211_start_all(ic); break; case SIOCGIFMEDIA: @@ -3814,7 +3814,7 @@ run_set_chan(struct run_softc *sc, struc chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) - return EINVAL; + return (EINVAL); if (sc->mac_ver == 0x3572) run_rt3572_set_chan(sc, chan); @@ -3838,7 +3838,7 @@ run_set_chan(struct run_softc *sc, struc run_delay(sc, 10); - return 0; + return (0); } static void @@ -3919,7 +3919,7 @@ run_update_beacon_cb(void *arg) struct mbuf *m; uint8_t ridx; - if(vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) return; if ((m = ieee80211_beacon_alloc(vap->iv_bss, &RUN_VAP(vap)->bo)) == NULL) @@ -3982,7 +3982,7 @@ run_usb_timeout_cb(void *arg) if(vap->iv_state == IEEE80211_S_RUN && vap->iv_opmode != IEEE80211_M_STA) run_reset_livelock(sc); - else if(vap->iv_state == IEEE80211_S_SCAN){ + else if (vap->iv_state == IEEE80211_S_SCAN) { DPRINTF("timeout caused by scan\n"); /* cancel bgscan */ ieee80211_cancel_scan(vap); @@ -4004,7 +4004,7 @@ run_reset_livelock(struct run_softc *sc) */ run_read(sc, RT2860_DEBUG, &tmp); DPRINTFN(3, "debug reg %08x\n", tmp); - if((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))){ + if ((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))) { DPRINTF("CTS-to-self livelock detected\n"); run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_SRST); run_delay(sc, 1); @@ -4203,7 +4203,7 @@ run_rssi2dbm(struct run_softc *sc, uint8 } else delta = sc->rssi_2ghz[rxchain] - sc->lna[0]; - return -12 - delta - rssi; + return (-12 - delta - rssi); } static int @@ -4220,7 +4220,7 @@ run_bbp_init(struct run_softc *sc) break; } if (ntries == 20) - return ETIMEDOUT; + return (ETIMEDOUT); /* initialize BBP registers to default values */ for (i = 0; i < nitems(rt2860_def_bbp); i++) { @@ -4240,7 +4240,7 @@ run_bbp_init(struct run_softc *sc) run_bbp_write(sc, 69, 0x16); run_bbp_write(sc, 73, 0x12); } - return 0; + return (0); } static int @@ -4292,7 +4292,7 @@ run_rt3070_rf_init(struct run_softc *sc) run_read(sc, RT3070_GPIO_SWITCH, &tmp); run_write(sc, RT3070_GPIO_SWITCH, tmp & ~0x20); - } else if(sc->mac_ver == 0x3572){ + } else if (sc->mac_ver == 0x3572) { run_rt3070_rf_read(sc, 6, &rf); run_rt3070_rf_write(sc, 6, rf | 0x40); @@ -4301,7 +4301,7 @@ run_rt3070_rf_init(struct run_softc *sc) tmp = (tmp & ~0x1f000000) | 0x0d000000; run_write(sc, RT3070_LDO_CFG0, tmp); - if (sc->mac_rev < 0x0211 || !sc->patch_dac){ + if (sc->mac_rev < 0x0211 || !sc->patch_dac) { run_delay(sc, 1); /* wait for 1msec */ /* decrease voltage back to 1.2V */ tmp = (tmp & ~0x1f000000) | 0x01000000; @@ -4379,7 +4379,7 @@ run_rt3070_rf_init(struct run_softc *sc) rf |= 0x03; run_rt3070_rf_write(sc, 27, rf); } - return 0; + return (0); } static int @@ -4444,7 +4444,7 @@ run_rt3070_filter_calib(struct run_softc run_rt3070_rf_read(sc, 22, &rf22); run_rt3070_rf_write(sc, 22, rf22 & ~0x01); - return 0; + return (0); } static void @@ -4570,7 +4570,7 @@ run_txrx_enable(struct run_softc *sc) run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:34:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30196106566C; Fri, 19 Nov 2010 01:34:19 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3C08FC0C; Fri, 19 Nov 2010 01:34:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1YJCh051994; Fri, 19 Nov 2010 01:34:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1YJLR051992; Fri, 19 Nov 2010 01:34:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190134.oAJ1YJLR051992@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215486 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:34:19 -0000 Author: thompsa Date: Fri Nov 19 01:34:18 2010 New Revision: 215486 URL: http://svn.freebsd.org/changeset/base/215486 Log: MFC r209918 Use more compact deviceid table. Modified: stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:32:23 2010 (r215485) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:34:18 2010 (r215486) @@ -97,199 +97,201 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, #define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) static const struct usb_device_id run_devs[] = { - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2770) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2870) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3070) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3071) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3072) }, - { USB_VP(USB_VENDOR_ABOCOM2, USB_PRODUCT_ABOCOM2_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2770) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_5) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_5) }, - { USB_VP(USB_VENDOR_AIRTIES, USB_PRODUCT_AIRTIES_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2770) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2870) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3071) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3072) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3572) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_2) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GNR) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIT2, USB_PRODUCT_AMIT2_RT2870) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_1) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_2) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_3) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_4) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_5) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_USBN13) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT3070_1) }, - { USB_VP(USB_VENDOR_ASUS2, USB_PRODUCT_ASUS2_USBN11) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8053V3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8055) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6D4050V1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_2) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS2, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS3, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_3) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_4) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_5) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_6) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_7) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_8) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_VIGORN61) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB300GNM) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_1) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_2) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_3) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT3070) }, - { USB_VP(USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA130) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_3) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_4) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_5) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072_1) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7717) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7718) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RT2870_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_2) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_3) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB31N) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB32L) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_RT2870_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_2) }, - { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWNU300) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_HWUN2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_1) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT3070) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_1) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_2) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_3) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_4) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_RT3070) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB100) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB54GCV3) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600NV2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_1) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_3) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_1) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_2) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCAG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCGN) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT2770) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT3070) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_1) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_2) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_3) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_4) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_5) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_6) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_7) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_8) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_9) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_10) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_11) }, - { USB_VP(USB_VENDOR_OVISLINK, USB_PRODUCT_OVISLINK_RT3072) }, - { USB_VP(USB_VENDOR_PARA, USB_PRODUCT_PARA_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT2870) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_2) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_3) }, - { USB_VP(USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRON) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT3070) }, - { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2870) }, - { USB_VP(USB_VENDOR_QUANTA, USB_PRODUCT_QUANTA_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2770) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2870) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3071) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3072) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3370) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3572) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT8070) }, - { USB_VP(USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3070) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3071) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2770) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3071) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_6) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL608) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2870_1) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT3070) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW153) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW303) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW313) }, - { USB_VP(USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_RT3070) }, - { USB_VP(USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3070) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_2) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_2) }, +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } + RUN_DEV(ABOCOM, RT2770), + RUN_DEV(ABOCOM, RT2870), + RUN_DEV(ABOCOM, RT3070), + RUN_DEV(ABOCOM, RT3071), + RUN_DEV(ABOCOM, RT3072), + RUN_DEV(ABOCOM2, RT2870_1), + RUN_DEV(ACCTON, RT2770), + RUN_DEV(ACCTON, RT2870_1), + RUN_DEV(ACCTON, RT2870_2), + RUN_DEV(ACCTON, RT2870_3), + RUN_DEV(ACCTON, RT2870_4), + RUN_DEV(ACCTON, RT2870_5), + RUN_DEV(ACCTON, RT3070), + RUN_DEV(ACCTON, RT3070_1), + RUN_DEV(ACCTON, RT3070_2), + RUN_DEV(ACCTON, RT3070_3), + RUN_DEV(ACCTON, RT3070_4), + RUN_DEV(ACCTON, RT3070_5), + RUN_DEV(AIRTIES, RT3070), + RUN_DEV(ALLWIN, RT2070), + RUN_DEV(ALLWIN, RT2770), + RUN_DEV(ALLWIN, RT2870), + RUN_DEV(ALLWIN, RT3070), + RUN_DEV(ALLWIN, RT3071), + RUN_DEV(ALLWIN, RT3072), + RUN_DEV(ALLWIN, RT3572), + RUN_DEV(AMIGO, RT2870_1), + RUN_DEV(AMIGO, RT2870_2), + RUN_DEV(AMIT, CGWLUSB2GNR), + RUN_DEV(AMIT, RT2870_1), + RUN_DEV(AMIT2, RT2870), + RUN_DEV(ASUS, RT2870_1), + RUN_DEV(ASUS, RT2870_2), + RUN_DEV(ASUS, RT2870_3), + RUN_DEV(ASUS, RT2870_4), + RUN_DEV(ASUS, RT2870_5), + RUN_DEV(ASUS, USBN13), + RUN_DEV(ASUS, RT3070_1), + RUN_DEV(ASUS2, USBN11), + RUN_DEV(AZUREWAVE, RT2870_1), + RUN_DEV(AZUREWAVE, RT2870_2), + RUN_DEV(AZUREWAVE, RT3070_1), + RUN_DEV(AZUREWAVE, RT3070_2), + RUN_DEV(AZUREWAVE, RT3070_3), + RUN_DEV(BELKIN, F5D8053V3), + RUN_DEV(BELKIN, F5D8055), + RUN_DEV(BELKIN, F6D4050V1), + RUN_DEV(BELKIN, RT2870_1), + RUN_DEV(BELKIN, RT2870_2), + RUN_DEV(CISCOLINKSYS2, RT3070), + RUN_DEV(CISCOLINKSYS3, RT3070), + RUN_DEV(CONCEPTRONIC2, RT2870_1), + RUN_DEV(CONCEPTRONIC2, RT2870_2), + RUN_DEV(CONCEPTRONIC2, RT2870_3), + RUN_DEV(CONCEPTRONIC2, RT2870_4), + RUN_DEV(CONCEPTRONIC2, RT2870_5), + RUN_DEV(CONCEPTRONIC2, RT2870_6), + RUN_DEV(CONCEPTRONIC2, RT2870_7), + RUN_DEV(CONCEPTRONIC2, RT2870_8), + RUN_DEV(CONCEPTRONIC2, RT3070_1), + RUN_DEV(CONCEPTRONIC2, RT3070_2), + RUN_DEV(CONCEPTRONIC2, VIGORN61), + RUN_DEV(COREGA, CGWLUSB300GNM), + RUN_DEV(COREGA, RT2870_1), + RUN_DEV(COREGA, RT2870_2), + RUN_DEV(COREGA, RT2870_3), + RUN_DEV(COREGA, RT3070), + RUN_DEV(CYBERTAN, RT2870), + RUN_DEV(DLINK, RT2870), + RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK2, DWA130), + RUN_DEV(DLINK2, RT2870_1), + RUN_DEV(DLINK2, RT2870_2), + RUN_DEV(DLINK2, RT3070_1), + RUN_DEV(DLINK2, RT3070_2), + RUN_DEV(DLINK2, RT3070_3), + RUN_DEV(DLINK2, RT3070_4), + RUN_DEV(DLINK2, RT3070_5), + RUN_DEV(DLINK2, RT3072), + RUN_DEV(DLINK2, RT3072_1), + RUN_DEV(EDIMAX, EW7717), + RUN_DEV(EDIMAX, EW7718), + RUN_DEV(EDIMAX, RT2870_1), + RUN_DEV(ENCORE, RT3070_1), + RUN_DEV(ENCORE, RT3070_2), + RUN_DEV(ENCORE, RT3070_3), + RUN_DEV(GIGABYTE, GNWB31N), + RUN_DEV(GIGABYTE, GNWB32L), + RUN_DEV(GIGABYTE, RT2870_1), + RUN_DEV(GIGASET, RT3070_1), + RUN_DEV(GIGASET, RT3070_2), + RUN_DEV(GUILLEMOT, HWNU300), + RUN_DEV(HAWKING, HWUN2), + RUN_DEV(HAWKING, RT2870_1), + RUN_DEV(HAWKING, RT2870_2), + RUN_DEV(HAWKING, RT3070), + RUN_DEV(IODATA, RT3072_1), + RUN_DEV(IODATA, RT3072_2), + RUN_DEV(IODATA, RT3072_3), + RUN_DEV(IODATA, RT3072_4), + RUN_DEV(LINKSYS4, RT3070), + RUN_DEV(LINKSYS4, WUSB100), + RUN_DEV(LINKSYS4, WUSB54GCV3), + RUN_DEV(LINKSYS4, WUSB600N), + RUN_DEV(LINKSYS4, WUSB600NV2), + RUN_DEV(LOGITEC, RT2870_1), + RUN_DEV(LOGITEC, RT2870_2), + RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, RT2870_2), + RUN_DEV(MELCO, WLIUCAG300N), + RUN_DEV(MELCO, WLIUCG300N), + RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MOTOROLA4, RT2770), + RUN_DEV(MOTOROLA4, RT3070), + RUN_DEV(MSI, RT3070_1), + RUN_DEV(MSI, RT3070_2), + RUN_DEV(MSI, RT3070_3), + RUN_DEV(MSI, RT3070_4), + RUN_DEV(MSI, RT3070_5), + RUN_DEV(MSI, RT3070_6), + RUN_DEV(MSI, RT3070_7), + RUN_DEV(MSI, RT3070_8), + RUN_DEV(MSI, RT3070_9), + RUN_DEV(MSI, RT3070_10), + RUN_DEV(MSI, RT3070_11), + RUN_DEV(OVISLINK, RT3072), + RUN_DEV(PARA, RT3070), + RUN_DEV(PEGATRON, RT2870), + RUN_DEV(PEGATRON, RT3070), + RUN_DEV(PEGATRON, RT3070_2), + RUN_DEV(PEGATRON, RT3070_3), + RUN_DEV(PHILIPS, RT2870), + RUN_DEV(PLANEX2, GWUS300MINIS), + RUN_DEV(PLANEX2, GWUSMICRON), + RUN_DEV(PLANEX2, RT2870), + RUN_DEV(PLANEX2, RT3070), + RUN_DEV(QCOM, RT2870), + RUN_DEV(QUANTA, RT3070), + RUN_DEV(RALINK, RT2070), + RUN_DEV(RALINK, RT2770), + RUN_DEV(RALINK, RT2870), + RUN_DEV(RALINK, RT3070), + RUN_DEV(RALINK, RT3071), + RUN_DEV(RALINK, RT3072), + RUN_DEV(RALINK, RT3370), + RUN_DEV(RALINK, RT3572), + RUN_DEV(RALINK, RT8070), + RUN_DEV(SAMSUNG2, RT2870_1), + RUN_DEV(SENAO, RT2870_1), + RUN_DEV(SENAO, RT2870_2), + RUN_DEV(SENAO, RT2870_3), + RUN_DEV(SENAO, RT2870_4), + RUN_DEV(SENAO, RT3070), + RUN_DEV(SENAO, RT3071), + RUN_DEV(SENAO, RT3072_1), + RUN_DEV(SENAO, RT3072_2), + RUN_DEV(SENAO, RT3072_3), + RUN_DEV(SENAO, RT3072_4), + RUN_DEV(SENAO, RT3072_5), + RUN_DEV(SITECOMEU, RT2770), + RUN_DEV(SITECOMEU, RT2870_1), + RUN_DEV(SITECOMEU, RT2870_2), + RUN_DEV(SITECOMEU, RT2870_3), + RUN_DEV(SITECOMEU, RT2870_4), + RUN_DEV(SITECOMEU, RT3070), + RUN_DEV(SITECOMEU, RT3070_2), + RUN_DEV(SITECOMEU, RT3070_3), + RUN_DEV(SITECOMEU, RT3070_4), + RUN_DEV(SITECOMEU, RT3071), + RUN_DEV(SITECOMEU, RT3072_1), + RUN_DEV(SITECOMEU, RT3072_2), + RUN_DEV(SITECOMEU, RT3072_3), + RUN_DEV(SITECOMEU, RT3072_4), + RUN_DEV(SITECOMEU, RT3072_5), + RUN_DEV(SITECOMEU, RT3072_6), + RUN_DEV(SITECOMEU, WL608), + RUN_DEV(SPARKLAN, RT2870_1), + RUN_DEV(SPARKLAN, RT3070), + RUN_DEV(SWEEX2, LW153), + RUN_DEV(SWEEX2, LW303), + RUN_DEV(SWEEX2, LW313), + RUN_DEV(TOSHIBA, RT3070), + RUN_DEV(UMEDIA, RT2870_1), + RUN_DEV(ZCOM, RT2870_1), + RUN_DEV(ZCOM, RT2870_2), + RUN_DEV(ZINWELL, RT2870_1), + RUN_DEV(ZINWELL, RT2870_2), + RUN_DEV(ZINWELL, RT3070), + RUN_DEV(ZINWELL, RT3072_1), + RUN_DEV(ZINWELL, RT3072_2), + RUN_DEV(ZYXEL, RT2870_1), + RUN_DEV(ZYXEL, RT2870_2), +#undef RUN_DEV }; MODULE_DEPEND(run, wlan, 1, 1, 1); @@ -1921,7 +1923,7 @@ run_wme_update(struct ieee80211com *ic) sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return 0; + return (0); } RUN_LOCK(sc); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:35:14 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6AFE106566C; Fri, 19 Nov 2010 01:35:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A64768FC14; Fri, 19 Nov 2010 01:35:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1ZEUJ052066; Fri, 19 Nov 2010 01:35:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1ZELi052064; Fri, 19 Nov 2010 01:35:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190135.oAJ1ZELi052064@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215487 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:35:14 -0000 Author: thompsa Date: Fri Nov 19 01:35:14 2010 New Revision: 215487 URL: http://svn.freebsd.org/changeset/base/215487 Log: MFC r210018 Add a 4 and 7 port USB hub from NEC. PR: 148189 Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:34:18 2010 (r215486) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:14 2010 (r215487) @@ -2255,6 +2255,8 @@ product NATIONAL BEARPAW1200 0x1000 Bear product NATIONAL BEARPAW2400 0x1001 BearPaw 2400 /* NEC products */ +product NEC HUB_0050 0x0050 USB 2.0 7-Port Hub +product NEC HUB_005A 0x005a USB 2.0 4-Port Hub product NEC HUB 0x55aa hub product NEC HUB_B 0x55ab hub From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:35:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD87B10656A4; Fri, 19 Nov 2010 01:35:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 686E88FC0C; Fri, 19 Nov 2010 01:35:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1ZvF4052124; Fri, 19 Nov 2010 01:35:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Zv3B052121; Fri, 19 Nov 2010 01:35:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190135.oAJ1Zv3B052121@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215488 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:35:57 -0000 Author: thompsa Date: Fri Nov 19 01:35:57 2010 New Revision: 215488 URL: http://svn.freebsd.org/changeset/base/215488 Log: MFC r210469 Give a name to the HTC Wizard Smartphone PR: usb/135575 Modified: stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/uipaq.c ============================================================================== --- stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:35:14 2010 (r215487) +++ stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:35:57 2010 (r215488) @@ -690,14 +690,14 @@ static const struct usb_device_id uipaq_ {USB_VPI(USB_VENDOR_HTC, 0x0a9e, 0)}, /* SmartPhone USB Sync */ {USB_VPI(USB_VENDOR_HTC, 0x0a9f, 0)}, - /* "High Tech Computer Corp" */ - {USB_VPI(USB_VENDOR_HTC, 0x0bce, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_PPC6700MODEM, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_SMARTPHONE, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE, 0)}, + /* High Tech Computer Wizard Smartphone */ + {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WIZARD, 0)}, /* JVC USB Sync */ {USB_VPI(USB_VENDOR_JVC, 0x3011, 0)}, /* JVC USB Sync */ Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:14 2010 (r215487) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:57 2010 (r215488) @@ -1761,6 +1761,7 @@ product HP HS2300 0x1e1d hs2300 HSDPA product HTC WINMOBILE 0x00ce HTC USB Sync product HTC PPC6700MODEM 0x00cf PPC6700 Modem product HTC SMARTPHONE 0x0a51 SmartPhone USB Sync +product HTC WIZARD 0x0bce HTC Wizard USB Sync /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:36:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AA371065670; Fri, 19 Nov 2010 01:36:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1E38FC19; Fri, 19 Nov 2010 01:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1aeUa052186; Fri, 19 Nov 2010 01:36:40 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1aeco052184; Fri, 19 Nov 2010 01:36:40 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190136.oAJ1aeco052184@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215489 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:36:40 -0000 Author: thompsa Date: Fri Nov 19 01:36:40 2010 New Revision: 215489 URL: http://svn.freebsd.org/changeset/base/215489 Log: MFC r210553 Fix the entry for the Option ICON452 where an underscore was used instead of whitespace. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:57 2010 (r215488) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:36:40 2010 (r215489) @@ -2401,7 +2401,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 -product OPTION_ICON452 0x7901 Globetrotter iCON 452 +product OPTION ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:39:29 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E04106564A; Fri, 19 Nov 2010 01:39:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A13F98FC1F; Fri, 19 Nov 2010 01:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1dTov052280; Fri, 19 Nov 2010 01:39:29 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1dTIW052278; Fri, 19 Nov 2010 01:39:29 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190139.oAJ1dTIW052278@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215490 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:39:29 -0000 Author: thompsa Date: Fri Nov 19 01:39:29 2010 New Revision: 215490 URL: http://svn.freebsd.org/changeset/base/215490 Log: MFC r211021 Sort this file a little better: the vendors are supposed to be sorted by vendor ID in the vendor section, and by symbolic name in the product section. Products are sorted by product ID. While here, get rid of a duplicate Microsoft Mouse entry, revealed by sorting. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:36:40 2010 (r215489) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:39:29 2010 (r215490) @@ -560,6 +560,7 @@ vendor DYNASTREAM 0x0fcf Dynastream Inno vendor QUALCOMM 0x1004 Qualcomm vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola +vendor AIRPLUS 0x1011 Airplus vendor DESKNOTE 0x1019 Desknote vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital @@ -574,7 +575,6 @@ vendor SILABS 0x10c4 Silicon Labs vendor SILABS3 0x10c5 Silicon Labs vendor SILABS4 0x10ce Silicon Labs vendor ACTIONS 0x10d6 Actions -vendor AIRPLUS 0x1011 Airplus vendor ANALOG 0x1110 Analog Devices vendor TENX 0x1130 Ten X Technology, Inc. vendor ISSC 0x1131 Integrated System Solution Corp. @@ -2161,11 +2161,10 @@ product MICROSOFT MN110 0x007a 10/100 U product MICROSOFT WLINTELLIMOUSE 0x008c Wireless Optical IntelliMouse product MICROSOFT WLNOTEBOOK 0x00b9 Wireless Optical Mouse (Model 1023) product MICROSOFT COMFORT3000 0x00d1 Comfort Optical Mouse 3000 (Model 1043) -product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) product MICROSOFT WLNOTEBOOK3 0x00d2 Wireless Optical Mouse 3000 (Model 1049) -product MICROSOFT WLUSBMOUSE 0x00b9 Wireless USB Mouse -product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN product MICROSOFT NATURAL4000 0x00db Natural Ergonomic Keyboard 4000 +product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) +product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN /* Microtech products */ product MICROTECH SCSIDB25 0x0004 USB-SCSI-DB25 @@ -3229,6 +3228,9 @@ product UNKNOWN4 USBMEMSTICK 0x6025 Flas /* Unknown vendors */ product UNKNOWN5 USB2IDEBRIDGE 0x00ff USB 2.0 ATA/SATA Bridge +/* USI products */ +product USI MC60 0x10c5 MC60 Serial + /* U.S. Robotics products */ product USR USR5422 0x0118 USR5422 WLAN product USR USR5423 0x0121 USR5423 WLAN @@ -3236,9 +3238,6 @@ product USR USR5423 0x0121 USR5423 WLAN /* VIA Technologies products */ product VIA USB2IDEBRIDGE 0x6204 USB 2.0 IDE Bridge -/* USI products */ -product USI MC60 0x10c5 MC60 Serial - /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable @@ -3309,9 +3308,6 @@ product XIRLINK PCCAM 0x8080 IBM PC Cam product XYRATEX PRISM_GT_1 0x2000 PrismGT USB 2.0 WLAN product XYRATEX PRISM_GT_2 0x2002 PrismGT USB 2.0 WLAN -/* Y-E Data products */ -product YEDATA FLASHBUSTERU 0x0000 Flashbuster-U - /* Yamaha products */ product YAMAHA UX256 0x1000 UX256 MIDI I/F product YAMAHA UX96 0x1008 UX96 MIDI I/F From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:40:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE240106564A; Fri, 19 Nov 2010 01:40:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAEDE8FC1E; Fri, 19 Nov 2010 01:40:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1eYNM052353; Fri, 19 Nov 2010 01:40:34 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1eYGm052351; Fri, 19 Nov 2010 01:40:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190140.oAJ1eYGm052351@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215491 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:40:35 -0000 Author: thompsa Date: Fri Nov 19 01:40:34 2010 New Revision: 215491 URL: http://svn.freebsd.org/changeset/base/215491 Log: MFC r211104 Add entries for some devices I have locally. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:39:29 2010 (r215490) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:40:34 2010 (r215491) @@ -677,6 +677,7 @@ vendor ALINK 0x1e0e Alink vendor AIRTIES 0x1eda AirTies vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications +vendor HAUPPAUGE2 0x2040 Hauppauge Computer Works vendor TLAYTECH 0x20b9 Tlay Tech vendor ENCORE 0x203d Encore vendor PARA 0x20b8 PARA Industrial @@ -992,6 +993,8 @@ product AOX USB101 0x0008 Ethernet product APC UPS 0x0002 Uninterruptible Power Supply /* Apple Computer products */ +product APPLE IMAC_KBD 0x0201 USB iMac Keyboard +product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard product APPLE KBD_TP_ANSI 0x0223 Apple Internal Keyboard/Trackpad (Wellspring/ANSI) product APPLE KBD_TP_ISO 0x0224 Apple Internal Keyboard/Trackpad (Wellspring/ISO) @@ -999,8 +1002,10 @@ product APPLE KBD_TP_JIS 0x0225 Apple In product APPLE KBD_TP_ANSI2 0x0230 Apple Internal Keyboard/Trackpad (Wellspring2/ANSI) product APPLE KBD_TP_ISO2 0x0231 Apple Internal Keyboard/Trackpad (Wellspring2/ISO) product APPLE KBD_TP_JIS2 0x0232 Apple Internal Keyboard/Trackpad (Wellspring2/JIS) +product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse +product APPLE KBD_HUB 0x1001 Hub in Apple USB Keyboard product APPLE EXT_KBD_HUB 0x1003 Hub in Apple Extended USB Keyboard product APPLE SPEAKERS 0x1101 Speakers product APPLE IPOD 0x1201 iPod @@ -1014,7 +1019,11 @@ product APPLE IPOD_08 0x1208 iPod '08' product APPLE IPODVIDEO 0x1209 iPod Video product APPLE IPODNANO 0x120a iPod Nano product APPLE IPHONE 0x1290 iPhone +product APPLE IPOD_TOUCH 0x1291 iPod Touch product APPLE IPHONE_3G 0x1292 iPhone 3G +product APPLE IPHONE_3GS 0x1294 iPhone 3GS +product APPLE IPHONE_4 0x1297 iPhone 4 +product APPLE IPAD 0x129a iPad product APPLE ETHERNET 0x1402 Ethernet A1277 /* Arkmicro Technologies */ @@ -1080,6 +1089,9 @@ product ATMEL BW002 0x7605 BW002 Wirele product ATMEL WL1130USB 0x7613 WL-1130 USB product ATMEL AT76C505A 0x7614 AT76c505a Wireless Adapter +/* AuthenTec products */ +product AUTHENTEC AES1610 0x1600 AES1610 Fingerprint Sensor + /* Avision products */ product AVISION 1200U 0x0268 1200U scanner @@ -1146,6 +1158,7 @@ product BROTHER HL1050 0x0002 HL-1050 l product BROTHER MFC8600_9650 0x0100 MFC8600/9650 multifunction device /* Behavior Technology Computer products */ +product BTC BTC6100 0x5550 6100C Keyboard product BTC BTC7932 0x6782 Keyboard with mouse port /* Canon, Inc. products */ @@ -1190,6 +1203,7 @@ product CHIC CYPRESS 0x0003 Cypress USB /* Chicony products */ product CHICONY KB8933 0x0001 KB-8933 keyboard +product CHICONY KU0325 0x0116 KU-0325 keyboard product CHICONY CNF7129 0xb071 Notebook Web Camera product CHICONY2 TWINKLECAM 0x600d TwinkleCam USB camera @@ -1690,6 +1704,7 @@ product HANDSPRING TREO600 0x0300 Handsp /* Hauppauge Computer Works */ product HAUPPAUGE WINTV_USB_FM 0x4d12 WinTV USB FM +product HAUPPAUGE2 NOVAT500 0x9580 NovaT 500Stick /* Hawking Technologies products */ product HAWKING RT2870_1 0x0001 RT2870 @@ -1762,6 +1777,9 @@ product HTC WINMOBILE 0x00ce HTC USB Sy product HTC PPC6700MODEM 0x00cf PPC6700 Modem product HTC SMARTPHONE 0x0a51 SmartPhone USB Sync product HTC WIZARD 0x0bce HTC Wizard USB Sync +product HTC LEGENDSYNC 0x0c97 HTC Legend USB Sync +product HTC LEGEND 0x0ff9 HTC Legend +product HTC LEGENDINTERNET 0x0ffe HTC Legend Internet Sharing /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile @@ -2155,6 +2173,8 @@ product MICROSOFT INETPRO 0x001c Interne product MICROSOFT TBEXPLORER 0x0024 Trackball Explorer product MICROSOFT INTELLIEYE 0x0025 IntelliEye mouse product MICROSOFT INETPRO2 0x002b Internet Keyboard Pro +product MICROSOFT INTELLIMOUSE5 0x0039 IntelliMouse 1.1 5-Button Mouse +product MICROSOFT WHEELMOUSE 0x0040 Wheel Mouse Optical product MICROSOFT MN510 0x006e MN510 Wireless product MICROSOFT 700WX 0x0079 Palm 700WX product MICROSOFT MN110 0x007a 10/100 USB NIC @@ -2338,6 +2358,10 @@ product NOVATEL2 FLEXPACKGPS 0x0100 NovA /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 +/* O2Micro products */ +product O2MICRO OZ776_HUB 0x7761 OZ776 hub +product O2MICRO OZ776_CCID_SC 0x7772 OZ776 CCID SC Reader + /* Olympus products */ product OLYMPUS C1 0x0102 C-1 Digital Camera product OLYMPUS C700 0x0105 C-700 Ultra Zoom @@ -2529,6 +2553,7 @@ product PRIMAX G2E600 0x0383 G2E-600 sc product PRIMAX COMFORT 0x4d01 Comfort product PRIMAX MOUSEINABOX 0x4d02 Mouse-in-a-Box product PRIMAX PCGAUMS1 0x4d04 Sony PCGA-UMS1 +product PRIMAX HP_RH304AA 0x4d17 HP RH304AA mouse /* Prolific products */ product PROLIFIC PL2301 0x0000 PL2301 Host-Host interface From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:41:29 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4959F106566C; Fri, 19 Nov 2010 01:41:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35E2A8FC1A; Fri, 19 Nov 2010 01:41:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1fTif052456; Fri, 19 Nov 2010 01:41:29 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1fSYp052416; Fri, 19 Nov 2010 01:41:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190141.oAJ1fSYp052416@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215492 - in stable/8/sys/dev: if_ndis usb usb/input usb/misc usb/net usb/serial usb/storage usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:41:29 -0000 Author: thompsa Date: Fri Nov 19 01:41:28 2010 New Revision: 215492 URL: http://svn.freebsd.org/changeset/base/215492 Log: MFC r212122 Add missing MODULE_VERSION() definitions, this resolves problems around duplicate module loads. PR: usb/125736 Submitted by: danger, mm Modified: stable/8/sys/dev/if_ndis/if_ndis_usb.c stable/8/sys/dev/usb/input/atp.c stable/8/sys/dev/usb/input/uep.c stable/8/sys/dev/usb/input/uhid.c stable/8/sys/dev/usb/input/ukbd.c stable/8/sys/dev/usb/input/ums.c stable/8/sys/dev/usb/misc/udbp.c stable/8/sys/dev/usb/misc/ufm.c stable/8/sys/dev/usb/net/if_aue.c stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/net/if_cue.c stable/8/sys/dev/usb/net/if_kue.c stable/8/sys/dev/usb/net/if_rue.c stable/8/sys/dev/usb/net/if_udav.c stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/serial/uark.c stable/8/sys/dev/usb/serial/ubsa.c stable/8/sys/dev/usb/serial/ubser.c stable/8/sys/dev/usb/serial/uchcom.c stable/8/sys/dev/usb/serial/ucycom.c stable/8/sys/dev/usb/serial/ufoma.c stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/serial/ugensa.c stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/serial/ulpt.c stable/8/sys/dev/usb/serial/umct.c stable/8/sys/dev/usb/serial/umoscom.c stable/8/sys/dev/usb/serial/uvisor.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/storage/urio.c stable/8/sys/dev/usb/usb_compat_linux.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/if_ndis/if_ndis_usb.c ============================================================================== --- stable/8/sys/dev/if_ndis/if_ndis_usb.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/if_ndis/if_ndis_usb.c Fri Nov 19 01:41:28 2010 (r215492) @@ -107,6 +107,7 @@ static driver_t ndis_driver = { static devclass_t ndis_devclass; DRIVER_MODULE(ndis, uhub, ndis_driver, ndis_devclass, ndisdrv_modevent, 0); +MODULE_VERSION(ndis, 1); static int ndisusb_devcompare(interface_type bustype, struct ndis_usb_type *t, device_t dev) Modified: stable/8/sys/dev/usb/input/atp.c ============================================================================== --- stable/8/sys/dev/usb/input/atp.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/atp.c Fri Nov 19 01:41:28 2010 (r215492) @@ -2222,3 +2222,4 @@ static devclass_t atp_devclass; DRIVER_MODULE(atp, uhub, atp_driver, atp_devclass, NULL, 0); MODULE_DEPEND(atp, usb, 1, 1, 1); +MODULE_VERSION(atp, 1); Modified: stable/8/sys/dev/usb/input/uep.c ============================================================================== --- stable/8/sys/dev/usb/input/uep.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/uep.c Fri Nov 19 01:41:28 2010 (r215492) @@ -439,3 +439,4 @@ static driver_t uep_driver = { DRIVER_MODULE(uep, uhub, uep_driver, uep_devclass, NULL, NULL); MODULE_DEPEND(uep, usb, 1, 1, 1); +MODULE_VERSION(uep, 1); Modified: stable/8/sys/dev/usb/input/uhid.c ============================================================================== --- stable/8/sys/dev/usb/input/uhid.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/uhid.c Fri Nov 19 01:41:28 2010 (r215492) @@ -808,3 +808,4 @@ static driver_t uhid_driver = { DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, NULL, 0); MODULE_DEPEND(uhid, usb, 1, 1, 1); +MODULE_VERSION(uhid, 1); Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:41:28 2010 (r215492) @@ -1894,3 +1894,4 @@ static driver_t ukbd_driver = { DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); MODULE_DEPEND(ukbd, usb, 1, 1, 1); +MODULE_VERSION(ukbd, 1); Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:41:28 2010 (r215492) @@ -1017,3 +1017,4 @@ static driver_t ums_driver = { DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass, NULL, 0); MODULE_DEPEND(ums, usb, 1, 1, 1); +MODULE_VERSION(ums, 1); Modified: stable/8/sys/dev/usb/misc/udbp.c ============================================================================== --- stable/8/sys/dev/usb/misc/udbp.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/misc/udbp.c Fri Nov 19 01:41:28 2010 (r215492) @@ -261,6 +261,7 @@ static driver_t udbp_driver = { DRIVER_MODULE(udbp, uhub, udbp_driver, udbp_devclass, udbp_modload, 0); MODULE_DEPEND(udbp, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION); MODULE_DEPEND(udbp, usb, 1, 1, 1); +MODULE_VERSION(udbp, 1); static int udbp_modload(module_t mod, int event, void *data) Modified: stable/8/sys/dev/usb/misc/ufm.c ============================================================================== --- stable/8/sys/dev/usb/misc/ufm.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/misc/ufm.c Fri Nov 19 01:41:28 2010 (r215492) @@ -117,6 +117,7 @@ static driver_t ufm_driver = { DRIVER_MODULE(ufm, uhub, ufm_driver, ufm_devclass, NULL, 0); MODULE_DEPEND(ufm, usb, 1, 1, 1); +MODULE_VERSION(ufm, 1); static int ufm_probe(device_t dev) Modified: stable/8/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_aue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_aue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -281,6 +281,7 @@ MODULE_DEPEND(aue, uether, 1, 1, 1); MODULE_DEPEND(aue, usb, 1, 1, 1); MODULE_DEPEND(aue, ether, 1, 1, 1); MODULE_DEPEND(aue, miibus, 1, 1, 1); +MODULE_VERSION(aue, 1); static const struct usb_ether_methods aue_ue_methods = { .ue_attach_post = aue_attach_post, Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:41:28 2010 (r215492) @@ -248,6 +248,7 @@ MODULE_DEPEND(axe, uether, 1, 1, 1); MODULE_DEPEND(axe, usb, 1, 1, 1); MODULE_DEPEND(axe, ether, 1, 1, 1); MODULE_DEPEND(axe, miibus, 1, 1, 1); +MODULE_VERSION(axe, 1); static const struct usb_ether_methods axe_ue_methods = { .ue_attach_post = axe_attach_post, Modified: stable/8/sys/dev/usb/net/if_cue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_cue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_cue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -173,6 +173,7 @@ DRIVER_MODULE(cue, uhub, cue_driver, cue MODULE_DEPEND(cue, uether, 1, 1, 1); MODULE_DEPEND(cue, usb, 1, 1, 1); MODULE_DEPEND(cue, ether, 1, 1, 1); +MODULE_VERSION(cue, 1); static const struct usb_ether_methods cue_ue_methods = { .ue_attach_post = cue_attach_post, Modified: stable/8/sys/dev/usb/net/if_kue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_kue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_kue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -215,6 +215,7 @@ DRIVER_MODULE(kue, uhub, kue_driver, kue MODULE_DEPEND(kue, uether, 1, 1, 1); MODULE_DEPEND(kue, usb, 1, 1, 1); MODULE_DEPEND(kue, ether, 1, 1, 1); +MODULE_VERSION(kue, 1); static const struct usb_ether_methods kue_ue_methods = { .ue_attach_post = kue_attach_post, Modified: stable/8/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_rue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_rue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -213,6 +213,7 @@ MODULE_DEPEND(rue, uether, 1, 1, 1); MODULE_DEPEND(rue, usb, 1, 1, 1); MODULE_DEPEND(rue, ether, 1, 1, 1); MODULE_DEPEND(rue, miibus, 1, 1, 1); +MODULE_VERSION(rue, 1); static const struct usb_ether_methods rue_ue_methods = { .ue_attach_post = rue_attach_post, Modified: stable/8/sys/dev/usb/net/if_udav.c ============================================================================== --- stable/8/sys/dev/usb/net/if_udav.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_udav.c Fri Nov 19 01:41:28 2010 (r215492) @@ -172,6 +172,7 @@ MODULE_DEPEND(udav, uether, 1, 1, 1); MODULE_DEPEND(udav, usb, 1, 1, 1); MODULE_DEPEND(udav, ether, 1, 1, 1); MODULE_DEPEND(udav, miibus, 1, 1, 1); +MODULE_VERSION(udav, 1); static const struct usb_ether_methods udav_ue_methods = { .ue_attach_post = udav_attach_post, Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:41:28 2010 (r215492) @@ -179,6 +179,7 @@ static driver_t u3g_driver = { DRIVER_MODULE(u3g, uhub, u3g_driver, u3g_devclass, u3g_driver_loaded, 0); MODULE_DEPEND(u3g, ucom, 1, 1, 1); MODULE_DEPEND(u3g, usb, 1, 1, 1); +MODULE_VERSION(u3g, 1); static const struct usb_device_id u3g_devs[] = { #define U3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } Modified: stable/8/sys/dev/usb/serial/uark.c ============================================================================== --- stable/8/sys/dev/usb/serial/uark.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uark.c Fri Nov 19 01:41:28 2010 (r215492) @@ -169,6 +169,7 @@ static driver_t uark_driver = { DRIVER_MODULE(uark, uhub, uark_driver, uark_devclass, NULL, 0); MODULE_DEPEND(uark, ucom, 1, 1, 1); MODULE_DEPEND(uark, usb, 1, 1, 1); +MODULE_VERSION(uark, 1); static const struct usb_device_id uark_devs[] = { {USB_VPI(USB_VENDOR_ARKMICRO, USB_PRODUCT_ARKMICRO_ARK3116, 0)}, Modified: stable/8/sys/dev/usb/serial/ubsa.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubsa.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ubsa.c Fri Nov 19 01:41:28 2010 (r215492) @@ -277,6 +277,7 @@ static driver_t ubsa_driver = { DRIVER_MODULE(ubsa, uhub, ubsa_driver, ubsa_devclass, NULL, 0); MODULE_DEPEND(ubsa, ucom, 1, 1, 1); MODULE_DEPEND(ubsa, usb, 1, 1, 1); +MODULE_VERSION(ubsa, 1); static int ubsa_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:41:28 2010 (r215492) @@ -215,6 +215,7 @@ static driver_t ubser_driver = { DRIVER_MODULE(ubser, uhub, ubser_driver, ubser_devclass, NULL, 0); MODULE_DEPEND(ubser, ucom, 1, 1, 1); MODULE_DEPEND(ubser, usb, 1, 1, 1); +MODULE_VERSION(ubser, 1); static int ubser_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uchcom.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uchcom.c Fri Nov 19 01:41:28 2010 (r215492) @@ -855,3 +855,4 @@ static devclass_t uchcom_devclass; DRIVER_MODULE(uchcom, uhub, uchcom_driver, uchcom_devclass, NULL, 0); MODULE_DEPEND(uchcom, ucom, 1, 1, 1); MODULE_DEPEND(uchcom, usb, 1, 1, 1); +MODULE_VERSION(uchcom, 1); Modified: stable/8/sys/dev/usb/serial/ucycom.c ============================================================================== --- stable/8/sys/dev/usb/serial/ucycom.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ucycom.c Fri Nov 19 01:41:28 2010 (r215492) @@ -176,6 +176,7 @@ static driver_t ucycom_driver = { DRIVER_MODULE(ucycom, uhub, ucycom_driver, ucycom_devclass, NULL, 0); MODULE_DEPEND(ucycom, ucom, 1, 1, 1); MODULE_DEPEND(ucycom, usb, 1, 1, 1); +MODULE_VERSION(ucycom, 1); /* * Supported devices Modified: stable/8/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/8/sys/dev/usb/serial/ufoma.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ufoma.c Fri Nov 19 01:41:28 2010 (r215492) @@ -326,6 +326,7 @@ static driver_t ufoma_driver = { DRIVER_MODULE(ufoma, uhub, ufoma_driver, ufoma_devclass, NULL, 0); MODULE_DEPEND(ufoma, ucom, 1, 1, 1); MODULE_DEPEND(ufoma, usb, 1, 1, 1); +MODULE_VERSION(ufoma, 1); static int ufoma_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uftdi.c Fri Nov 19 01:41:28 2010 (r215492) @@ -212,6 +212,7 @@ static driver_t uftdi_driver = { DRIVER_MODULE(uftdi, uhub, uftdi_driver, uftdi_devclass, NULL, 0); MODULE_DEPEND(uftdi, ucom, 1, 1, 1); MODULE_DEPEND(uftdi, usb, 1, 1, 1); +MODULE_VERSION(uftdi, 1); static struct usb_device_id uftdi_devs[] = { #define UFTDI_DEV(v,p,t) \ Modified: stable/8/sys/dev/usb/serial/ugensa.c ============================================================================== --- stable/8/sys/dev/usb/serial/ugensa.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ugensa.c Fri Nov 19 01:41:28 2010 (r215492) @@ -160,6 +160,7 @@ static driver_t ugensa_driver = { DRIVER_MODULE(ugensa, uhub, ugensa_driver, ugensa_devclass, NULL, 0); MODULE_DEPEND(ugensa, ucom, 1, 1, 1); MODULE_DEPEND(ugensa, usb, 1, 1, 1); +MODULE_VERSION(ugensa, 1); static const struct usb_device_id ugensa_devs[] = { {USB_VPI(USB_VENDOR_AIRPRIME, USB_PRODUCT_AIRPRIME_PC5220, 0)}, Modified: stable/8/sys/dev/usb/serial/uipaq.c ============================================================================== --- stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:41:28 2010 (r215492) @@ -1092,6 +1092,7 @@ static driver_t uipaq_driver = { DRIVER_MODULE(uipaq, uhub, uipaq_driver, uipaq_devclass, NULL, 0); MODULE_DEPEND(uipaq, ucom, 1, 1, 1); MODULE_DEPEND(uipaq, usb, 1, 1, 1); +MODULE_VERSION(uipaq, 1); static int uipaq_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/ulpt.c ============================================================================== --- stable/8/sys/dev/usb/serial/ulpt.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ulpt.c Fri Nov 19 01:41:28 2010 (r215492) @@ -752,3 +752,4 @@ static driver_t ulpt_driver = { DRIVER_MODULE(ulpt, uhub, ulpt_driver, ulpt_devclass, NULL, 0); MODULE_DEPEND(ulpt, usb, 1, 1, 1); MODULE_DEPEND(ulpt, ucom, 1, 1, 1); +MODULE_VERSION(ulpt, 1); Modified: stable/8/sys/dev/usb/serial/umct.c ============================================================================== --- stable/8/sys/dev/usb/serial/umct.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/umct.c Fri Nov 19 01:41:28 2010 (r215492) @@ -219,6 +219,7 @@ static driver_t umct_driver = { DRIVER_MODULE(umct, uhub, umct_driver, umct_devclass, NULL, 0); MODULE_DEPEND(umct, ucom, 1, 1, 1); MODULE_DEPEND(umct, usb, 1, 1, 1); +MODULE_VERSION(umct, 1); static int umct_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/umoscom.c ============================================================================== --- stable/8/sys/dev/usb/serial/umoscom.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/umoscom.c Fri Nov 19 01:41:28 2010 (r215492) @@ -279,6 +279,7 @@ static driver_t umoscom_driver = { DRIVER_MODULE(umoscom, uhub, umoscom_driver, umoscom_devclass, NULL, 0); MODULE_DEPEND(umoscom, ucom, 1, 1, 1); MODULE_DEPEND(umoscom, usb, 1, 1, 1); +MODULE_VERSION(umoscom, 1); static const struct usb_device_id umoscom_devs[] = { {USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7703, 0)} Modified: stable/8/sys/dev/usb/serial/uvisor.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvisor.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uvisor.c Fri Nov 19 01:41:28 2010 (r215492) @@ -259,6 +259,7 @@ static driver_t uvisor_driver = { DRIVER_MODULE(uvisor, uhub, uvisor_driver, uvisor_devclass, NULL, 0); MODULE_DEPEND(uvisor, ucom, 1, 1, 1); MODULE_DEPEND(uvisor, usb, 1, 1, 1); +MODULE_VERSION(uvisor, 1); static const struct usb_device_id uvisor_devs[] = { #define UVISOR_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:41:28 2010 (r215492) @@ -715,6 +715,7 @@ static driver_t umass_driver = { DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, NULL, 0); MODULE_DEPEND(umass, usb, 1, 1, 1); MODULE_DEPEND(umass, cam, 1, 1, 1); +MODULE_VERSION(umass, 1); /* * USB device probe/attach/detach Modified: stable/8/sys/dev/usb/storage/urio.c ============================================================================== --- stable/8/sys/dev/usb/storage/urio.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/storage/urio.c Fri Nov 19 01:41:28 2010 (r215492) @@ -197,6 +197,7 @@ static driver_t urio_driver = { DRIVER_MODULE(urio, uhub, urio_driver, urio_devclass, NULL, 0); MODULE_DEPEND(urio, usb, 1, 1, 1); +MODULE_VERSION(urio, 1); static int urio_probe(device_t dev) Modified: stable/8/sys/dev/usb/usb_compat_linux.c ============================================================================== --- stable/8/sys/dev/usb/usb_compat_linux.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/usb_compat_linux.c Fri Nov 19 01:41:28 2010 (r215492) @@ -122,6 +122,7 @@ static driver_t usb_linux_driver = { static devclass_t usb_linux_devclass; DRIVER_MODULE(usb_linux, uhub, usb_linux_driver, usb_linux_devclass, NULL, 0); +MODULE_VERSION(usb_linux, 1); /*------------------------------------------------------------------------* * usb_linux_lookup_id Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:41:28 2010 (r215492) @@ -170,6 +170,7 @@ static driver_t uhub_driver = { DRIVER_MODULE(uhub, usbus, uhub_driver, uhub_devclass, 0, 0); DRIVER_MODULE(uhub, uhub, uhub_driver, uhub_devclass, NULL, 0); +MODULE_VERSION(uhub, 1); static void uhub_intr_callback(struct usb_xfer *xfer, usb_error_t error) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:41:28 2010 (r215492) @@ -139,9 +139,6 @@ static const struct usb_device_id rum_de #undef RUM_DEV }; -MODULE_DEPEND(rum, wlan, 1, 1, 1); -MODULE_DEPEND(rum, usb, 1, 1, 1); - static device_probe_t rum_match; static device_attach_t rum_attach; static device_detach_t rum_detach; @@ -2351,3 +2348,6 @@ static driver_t rum_driver = { static devclass_t rum_devclass; DRIVER_MODULE(rum, uhub, rum_driver, rum_devclass, NULL, 0); +MODULE_DEPEND(rum, wlan, 1, 1, 1); +MODULE_DEPEND(rum, usb, 1, 1, 1); +MODULE_VERSION(rum, 1); Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:41:28 2010 (r215492) @@ -294,10 +294,6 @@ static const struct usb_device_id run_de #undef RUN_DEV }; -MODULE_DEPEND(run, wlan, 1, 1, 1); -MODULE_DEPEND(run, usb, 1, 1, 1); -MODULE_DEPEND(run, firmware, 1, 1, 1); - static device_probe_t run_match; static device_attach_t run_attach; static device_detach_t run_detach; @@ -4871,3 +4867,7 @@ static driver_t run_driver = { static devclass_t run_devclass; DRIVER_MODULE(run, uhub, run_driver, run_devclass, NULL, 0); +MODULE_DEPEND(run, wlan, 1, 1, 1); +MODULE_DEPEND(run, usb, 1, 1, 1); +MODULE_DEPEND(run, firmware, 1, 1, 1); +MODULE_VERSION(run, 1); Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:41:28 2010 (r215492) @@ -2892,3 +2892,4 @@ static devclass_t uath_devclass; DRIVER_MODULE(uath, uhub, uath_driver, uath_devclass, NULL, 0); MODULE_DEPEND(uath, wlan, 1, 1, 1); MODULE_DEPEND(uath, usb, 1, 1, 1); +MODULE_VERSION(uath, 1); Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:41:28 2010 (r215492) @@ -400,6 +400,7 @@ static devclass_t ural_devclass; DRIVER_MODULE(ural, uhub, ural_driver, ural_devclass, NULL, 0); MODULE_DEPEND(ural, usb, 1, 1, 1); MODULE_DEPEND(ural, wlan, 1, 1, 1); +MODULE_VERSION(ural, 1); static int ural_match(device_t self) Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:41:28 2010 (r215492) @@ -4441,3 +4441,4 @@ static devclass_t urtw_devclass; DRIVER_MODULE(urtw, uhub, urtw_driver, urtw_devclass, NULL, 0); MODULE_DEPEND(urtw, wlan, 1, 1, 1); MODULE_DEPEND(urtw, usb, 1, 1, 1); +MODULE_VERSION(urtw, 1); Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:41:28 2010 (r215492) @@ -2948,3 +2948,4 @@ static devclass_t zyd_devclass; DRIVER_MODULE(zyd, uhub, zyd_driver, zyd_devclass, NULL, 0); MODULE_DEPEND(zyd, usb, 1, 1, 1); MODULE_DEPEND(zyd, wlan, 1, 1, 1); +MODULE_VERSION(zyd, 1); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:42:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE3831065670; Fri, 19 Nov 2010 01:42:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACC1C8FC14; Fri, 19 Nov 2010 01:42:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1gDS3052526; Fri, 19 Nov 2010 01:42:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1gDoq052518; Fri, 19 Nov 2010 01:42:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190142.oAJ1gDoq052518@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215493 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:42:14 -0000 Author: thompsa Date: Fri Nov 19 01:42:13 2010 New Revision: 215493 URL: http://svn.freebsd.org/changeset/base/215493 Log: MFC r212127 We need to grab a node reference count to vap->iv_bss before using it as it is possible for the node to be replaced and freed at any time by ieee80211_sta_join1(). Modified: stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:42:13 2010 (r215493) @@ -717,7 +717,7 @@ rum_newstate(struct ieee80211vap *vap, e break; case IEEE80211_S_RUN: - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); if (vap->iv_opmode != IEEE80211_M_MONITOR) { rum_update_slot(ic->ic_ifp); @@ -741,6 +741,7 @@ rum_newstate(struct ieee80211vap *vap, e tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) rum_ratectl_start(sc, ni); + ieee80211_free_node(ni); break; default: break; @@ -2214,7 +2215,7 @@ rum_ratectl_task(void *arg, int pending) struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = ic->ic_ifp; struct rum_softc *sc = ifp->if_softc; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; int ok, fail; int sum, retrycnt; @@ -2228,8 +2229,10 @@ rum_ratectl_task(void *arg, int pending) sum = ok+fail; retrycnt = (le32toh(sc->sta[5]) & 0xffff) + fail; + ni = ieee80211_ref_node(vap->iv_bss); ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt); (void) ieee80211_ratectl_rate(ni, NULL, 0); + ieee80211_free_node(ni); ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */ Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:42:13 2010 (r215493) @@ -1693,7 +1693,6 @@ run_media_change(struct ifnet *ifp) struct ieee80211com *ic = vap->iv_ic; const struct ieee80211_txparam *tp; struct run_softc *sc = ic->ic_ifp->if_softc; - struct run_node *rn = (void *)vap->iv_bss; uint8_t rate, ridx; int error; @@ -1707,13 +1706,19 @@ run_media_change(struct ifnet *ifp) tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { + struct ieee80211_node *ni; + struct run_node *rn; + rate = ic->ic_sup_rates[ic->ic_curmode]. rs_rates[tp->ucastrate] & IEEE80211_RATE_VAL; for (ridx = 0; ridx < RT2860_RIDX_MAX; ridx++) if (rt2860_rates[ridx].rate == rate) break; + ni = ieee80211_ref_node(vap->iv_bss); + rn = (struct run_node *)ni; rn->fix_ridx = ridx; DPRINTF("rate=%d, fix_ridx=%d\n", rate, rn->fix_ridx); + ieee80211_free_node(ni); } #if 0 @@ -1736,7 +1741,6 @@ run_newstate(struct ieee80211vap *vap, e struct run_softc *sc = ic->ic_ifp->if_softc; struct run_vap *rvp = RUN_VAP(vap); enum ieee80211_state ostate; - struct ieee80211_node *ni; uint32_t sta[3]; uint32_t tmp; uint8_t ratectl; @@ -1781,7 +1785,6 @@ run_newstate(struct ieee80211vap *vap, e case IEEE80211_S_RUN: - ni = vap->iv_bss; if (!(sc->runbmap & bid)) { if(sc->running++) restart_ratectl = 1; @@ -1817,12 +1820,16 @@ run_newstate(struct ieee80211vap *vap, e } if (vap->iv_opmode != IEEE80211_M_MONITOR) { + struct ieee80211_node *ni; + run_updateslot(ic->ic_ifp); run_enable_mrr(sc); run_set_txpreamble(sc); run_set_basicrates(sc); + ni = ieee80211_ref_node(vap->iv_bss); IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid); run_set_bssid(sc, ni->ni_bssid); + ieee80211_free_node(ni); run_enable_tsf_sync(sc); /* enable automatic rate adaptation */ Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:42:13 2010 (r215493) @@ -1968,9 +1968,10 @@ uath_create_connection(struct uath_softc const struct ieee80211_rateset *rs; struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct uath_cmd_create_connection create; + ni = ieee80211_ref_node(vap->iv_bss); bzero(&create, sizeof create); create.connid = htobe32(connid); create.bssid = htobe32(0); @@ -1989,6 +1990,7 @@ uath_create_connection(struct uath_softc create.connattr.wlanmode = htobe32(WLAN_MODE_11g); else create.connattr.wlanmode = htobe32(WLAN_MODE_11b); + ieee80211_free_node(ni); return uath_cmd_write(sc, WDCMSG_CREATE_CONNECTION, &create, sizeof create, 0); @@ -2017,14 +2019,16 @@ uath_write_associd(struct uath_softc *sc { struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct uath_cmd_set_associd associd; + ni = ieee80211_ref_node(vap->iv_bss); bzero(&associd, sizeof associd); associd.defaultrateix = htobe32(1); /* XXX */ associd.associd = htobe32(ni->ni_associd); associd.timoffset = htobe32(0x3b); /* XXX */ IEEE80211_ADDR_COPY(associd.bssid, ni->ni_bssid); + ieee80211_free_node(ni); return uath_cmd_write(sc, WDCMSG_WRITE_ASSOCID, &associd, sizeof associd, 0); } @@ -2065,7 +2069,7 @@ uath_newstate(struct ieee80211vap *vap, { enum ieee80211_state ostate = vap->iv_state; int error; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct ieee80211com *ic = vap->iv_ic; struct uath_softc *sc = ic->ic_ifp->if_softc; struct uath_vap *uvp = UATH_VAP(vap); @@ -2078,6 +2082,7 @@ uath_newstate(struct ieee80211vap *vap, UATH_LOCK(sc); callout_stop(&sc->stat_ch); callout_stop(&sc->watchdog_ch); + ni = ieee80211_ref_node(vap->iv_bss); switch (nstate) { case IEEE80211_S_INIT: @@ -2150,6 +2155,7 @@ uath_newstate(struct ieee80211vap *vap, default: break; } + ieee80211_free_node(ni); UATH_UNLOCK(sc); IEEE80211_LOCK(ic); return (uvp->newstate(vap, nstate, arg)); Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:42:13 2010 (r215493) @@ -652,7 +652,6 @@ upgt_set_macfilter(struct upgt_softc *sc struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; struct upgt_data *data_cmd; struct upgt_lmac_mem *mem; struct upgt_lmac_filter *filter; @@ -707,6 +706,9 @@ upgt_set_macfilter(struct upgt_softc *sc filter->unknown3 = htole16(UPGT_FILTER_UNKNOWN3); break; case IEEE80211_S_RUN: + struct ieee80211_node *ni; + + ni = ieee80211_ref_node(vap->iv_bss); /* XXX monitor mode isn't tested yet. */ if (vap->iv_opmode == IEEE80211_M_MONITOR) { filter->type = htole16(UPGT_FILTER_TYPE_MONITOR); @@ -730,6 +732,7 @@ upgt_set_macfilter(struct upgt_softc *sc filter->rxhw = htole32(sc->sc_eeprom_hwrx); filter->unknown3 = htole16(UPGT_FILTER_UNKNOWN3); } + ieee80211_free_node(ni); break; default: device_printf(sc->sc_dev, Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:42:13 2010 (r215493) @@ -711,7 +711,7 @@ ural_newstate(struct ieee80211vap *vap, break; case IEEE80211_S_RUN: - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); if (vap->iv_opmode != IEEE80211_M_MONITOR) { ural_update_slot(ic->ic_ifp); @@ -729,6 +729,7 @@ ural_newstate(struct ieee80211vap *vap, "could not allocate beacon\n"); RAL_UNLOCK(sc); IEEE80211_LOCK(ic); + ieee80211_free_node(ni); return (-1); } ieee80211_ref_node(ni); @@ -737,6 +738,7 @@ ural_newstate(struct ieee80211vap *vap, "could not send beacon\n"); RAL_UNLOCK(sc); IEEE80211_LOCK(ic); + ieee80211_free_node(ni); return (-1); } } @@ -754,7 +756,7 @@ ural_newstate(struct ieee80211vap *vap, tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) ural_ratectl_start(sc, ni); - + ieee80211_free_node(ni); break; default: @@ -2237,10 +2239,11 @@ ural_ratectl_task(void *arg, int pending struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = ic->ic_ifp; struct ural_softc *sc = ifp->if_softc; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; int ok, fail; int sum, retrycnt; + ni = ieee80211_ref_node(vap->iv_bss); RAL_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof(sc->sta)); @@ -2258,6 +2261,7 @@ ural_ratectl_task(void *arg, int pending usb_callout_reset(&uvp->ratectl_ch, hz, ural_ratectl_timeout, uvp); RAL_UNLOCK(sc); + ieee80211_free_node(ni); } static int Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:42:13 2010 (r215493) @@ -1830,7 +1830,6 @@ urtw_tx_start(struct urtw_softc *sc, str static int urtw_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - struct ieee80211_node *ni = vap->iv_bss; struct ieee80211com *ic = vap->iv_ic; struct urtw_softc *sc = ic->ic_ifp->if_softc; struct urtw_vap *uvp = URTW_VAP(vap); @@ -1854,6 +1853,9 @@ urtw_newstate(struct ieee80211vap *vap, case IEEE80211_S_ASSOC: break; case IEEE80211_S_RUN: + struct ieee80211_node *ni; + + ni = ieee80211_ref_node(vap->iv_bss); /* setting bssid. */ urtw_write32_m(sc, URTW_BSSID, ((uint32_t *)ni->ni_bssid)[0]); urtw_write16_m(sc, URTW_BSSID + 4, @@ -1868,6 +1870,7 @@ urtw_newstate(struct ieee80211vap *vap, if (error != 0) device_printf(sc->sc_dev, "could not control LED (%d)\n", error); + ieee80211_free_node(ni); break; default: break; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:42:13 2010 (r215493) @@ -572,7 +572,6 @@ zyd_newstate(struct ieee80211vap *vap, e struct zyd_vap *zvp = ZYD_VAP(vap); struct ieee80211com *ic = vap->iv_ic; struct zyd_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; int error; DPRINTF(sc, ZYD_DEBUG_STATE, "%s: %s -> %s\n", __func__, @@ -586,7 +585,6 @@ zyd_newstate(struct ieee80211vap *vap, e zyd_set_chan(sc, ic->ic_curchan); break; case IEEE80211_S_RUN: - ni = vap->iv_bss; if (vap->iv_opmode == IEEE80211_M_MONITOR) break; @@ -598,7 +596,7 @@ zyd_newstate(struct ieee80211vap *vap, e /* make data LED blink upon Tx */ zyd_write32_m(sc, sc->sc_fwbase + ZYD_FW_LINK_STATUS, 1); - IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid); + IEEE80211_ADDR_COPY(sc->sc_bssid, vap->iv_bss->ni_bssid); zyd_set_bssid(sc, sc->sc_bssid); break; default: From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:43:08 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABAD8106566B; Fri, 19 Nov 2010 01:43:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1128FC14; Fri, 19 Nov 2010 01:43:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1h8m0052594; Fri, 19 Nov 2010 01:43:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1h81s052592; Fri, 19 Nov 2010 01:43:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190143.oAJ1h81s052592@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215494 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:43:08 -0000 Author: thompsa Date: Fri Nov 19 01:43:08 2010 New Revision: 215494 URL: http://svn.freebsd.org/changeset/base/215494 Log: MFC r212128 Silence debug error by default. PR: usb/141212 Modified: stable/8/sys/dev/usb/input/ukbd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:42:13 2010 (r215493) +++ stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:43:08 2010 (r215494) @@ -727,7 +727,7 @@ ukbd_set_leds_callback(struct usb_xfer * break; default: /* Error */ - DPRINTFN(0, "error=%s\n", usbd_errstr(error)); + DPRINTFN(1, "error=%s\n", usbd_errstr(error)); break; } } From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:44:14 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069DD1065694; Fri, 19 Nov 2010 01:44:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9E628FC08; Fri, 19 Nov 2010 01:44:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1iD9S052686; Fri, 19 Nov 2010 01:44:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1iDFT052684; Fri, 19 Nov 2010 01:44:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190144.oAJ1iDFT052684@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215495 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:44:14 -0000 Author: thompsa Date: Fri Nov 19 01:44:13 2010 New Revision: 215495 URL: http://svn.freebsd.org/changeset/base/215495 Log: MFC r212129 Add support for extra buttons on the Kensington Slimblade Trackball. Modified: stable/8/sys/dev/usb/input/ums.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:43:08 2010 (r215494) +++ stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:44:13 2010 (r215495) @@ -406,6 +406,7 @@ ums_hid_parse(struct ums_softc *sc, devi struct ums_info *info = &sc->sc_info[index]; uint32_t flags; uint8_t i; + uint8_t j; if (hid_locate(buf, len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, index, &info->sc_loc_x, &flags, &info->sc_iid_x)) { @@ -483,6 +484,17 @@ ums_hid_parse(struct ums_softc *sc, devi break; } } + + /* detect other buttons */ + + for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) { + if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)), + hid_input, index, &info->sc_loc_btn[i], NULL, + &info->sc_iid_btn[i])) { + break; + } + } + info->sc_buttons = i; if (i > sc->sc_buttons) From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:45:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32C9C106566B; Fri, 19 Nov 2010 01:45:35 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 212268FC18; Fri, 19 Nov 2010 01:45:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1jZU0052780; Fri, 19 Nov 2010 01:45:35 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1jYIo052777; Fri, 19 Nov 2010 01:45:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190145.oAJ1jYIo052777@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215496 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:45:35 -0000 Author: thompsa Date: Fri Nov 19 01:45:34 2010 New Revision: 215496 URL: http://svn.freebsd.org/changeset/base/215496 Log: MFC r212130 Add GPIO programming for more PHY hardware. Submitted by: yongari Modified: stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/net/if_axereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:44:13 2010 (r215495) +++ stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:45:34 2010 (r215496) @@ -507,12 +507,19 @@ axe_get_phyno(struct axe_softc *sc, int return (phyno); } +#define AXE_GPIO_WRITE(x, y) do { \ + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, (x), NULL); \ + uether_pause(ue, (y)); \ +} while (0) + static void axe_ax88178_init(struct axe_softc *sc) { - int gpio0 = 0, phymode = 0; - uint16_t eeprom; + struct usb_ether *ue; + int gpio0, phymode; + uint16_t eeprom, val; + ue = &sc->sc_ue; axe_cmd(sc, AXE_CMD_SROM_WR_ENABLE, 0, 0, NULL); /* XXX magic */ axe_cmd(sc, AXE_CMD_SROM_READ, 0, 0x0017, &eeprom); @@ -521,46 +528,89 @@ axe_ax88178_init(struct axe_softc *sc) /* if EEPROM is invalid we have to use to GPIO0 */ if (eeprom == 0xffff) { - phymode = 0; + phymode = AXE_PHY_MODE_MARVELL; gpio0 = 1; } else { - phymode = eeprom & 7; + phymode = eeprom & 0x7f; gpio0 = (eeprom & 0x80) ? 0 : 1; } - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x008c, NULL); - uether_pause(&sc->sc_ue, hz / 16); - - if ((eeprom >> 8) != 0x01) { - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x003c, NULL); - uether_pause(&sc->sc_ue, hz / 32); - - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x001c, NULL); - uether_pause(&sc->sc_ue, hz / 3); - - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x003c, NULL); - uether_pause(&sc->sc_ue, hz / 32); - } else { - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x0004, NULL); - uether_pause(&sc->sc_ue, hz / 32); - - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x000c, NULL); - uether_pause(&sc->sc_ue, hz / 32); + if (bootverbose) + device_printf(sc->sc_ue.ue_dev, "EEPROM data : 0x%04x\n", + eeprom); + /* Program GPIOs depending on PHY hardware. */ + switch (phymode) { + case AXE_PHY_MODE_MARVELL: + if (gpio0 == 1) { + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO0_EN, + hz / 32); + AXE_GPIO_WRITE(AXE_GPIO0_EN | AXE_GPIO2 | AXE_GPIO2_EN, + hz / 32); + AXE_GPIO_WRITE(AXE_GPIO0_EN | AXE_GPIO2_EN, hz / 4); + AXE_GPIO_WRITE(AXE_GPIO0_EN | AXE_GPIO2 | AXE_GPIO2_EN, + hz / 32); + } else + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO1 | + AXE_GPIO1_EN, hz / 32); + break; + case AXE_PHY_MODE_CICADA: + if (gpio0 == 1) + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO0 | + AXE_GPIO0_EN, hz / 32); + else + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO1 | + AXE_GPIO1_EN, hz / 32); + break; + case AXE_PHY_MODE_AGERE: + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO1 | + AXE_GPIO1_EN, hz / 32); + AXE_GPIO_WRITE(AXE_GPIO1 | AXE_GPIO1_EN | AXE_GPIO2 | + AXE_GPIO2_EN, hz / 32); + AXE_GPIO_WRITE(AXE_GPIO1 | AXE_GPIO1_EN | AXE_GPIO2_EN, hz / 4); + AXE_GPIO_WRITE(AXE_GPIO1 | AXE_GPIO1_EN | AXE_GPIO2 | + AXE_GPIO2_EN, hz / 32); + break; + case AXE_PHY_MODE_REALTEK_8211CL: + case AXE_PHY_MODE_REALTEK_8211BN: + case AXE_PHY_MODE_REALTEK_8251CL: + val = gpio0 == 1 ? AXE_GPIO0 | AXE_GPIO0_EN : + AXE_GPIO1 | AXE_GPIO1_EN; + AXE_GPIO_WRITE(val, hz / 32); + AXE_GPIO_WRITE(val | AXE_GPIO2 | AXE_GPIO2_EN, hz / 32); + AXE_GPIO_WRITE(val | AXE_GPIO2_EN, hz / 4); + AXE_GPIO_WRITE(val | AXE_GPIO2 | AXE_GPIO2_EN, hz / 32); + if (phymode == AXE_PHY_MODE_REALTEK_8211CL) { + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x1F, 0x0005); + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x0C, 0x0000); + val = axe_miibus_readreg(ue->ue_dev, sc->sc_phyno, + 0x0001); + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x01, val | 0x0080); + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x1F, 0x0000); + } + break; + default: + /* Unknown PHY model or no need to program GPIOs. */ + break; } /* soft reset */ axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_CLEAR, NULL); - uether_pause(&sc->sc_ue, hz / 4); + uether_pause(ue, hz / 4); axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_PRL | AXE_178_RESET_MAGIC, NULL); - uether_pause(&sc->sc_ue, hz / 4); + uether_pause(ue, hz / 4); /* Enable MII/GMII/RGMII interface to work with external PHY. */ axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0, NULL); - uether_pause(&sc->sc_ue, hz / 4); + uether_pause(ue, hz / 4); axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); } +#undef AXE_GPIO_WRITE static void axe_ax88772_init(struct axe_softc *sc) @@ -629,10 +679,9 @@ axe_attach_post(struct usb_ether *ue) * Load PHY indexes first. Needed by axe_xxx_init(). */ axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, sc->sc_phyaddrs); -#if 1 - device_printf(sc->sc_ue.ue_dev, "PHYADDR 0x%02x:0x%02x\n", - sc->sc_phyaddrs[0], sc->sc_phyaddrs[1]); -#endif + if (bootverbose) + device_printf(sc->sc_ue.ue_dev, "PHYADDR 0x%02x:0x%02x\n", + sc->sc_phyaddrs[0], sc->sc_phyaddrs[1]); sc->sc_phyno = axe_get_phyno(sc, AXE_PHY_SEL_PRI); if (sc->sc_phyno == -1) sc->sc_phyno = axe_get_phyno(sc, AXE_PHY_SEL_SEC); Modified: stable/8/sys/dev/usb/net/if_axereg.h ============================================================================== --- stable/8/sys/dev/usb/net/if_axereg.h Fri Nov 19 01:44:13 2010 (r215495) +++ stable/8/sys/dev/usb/net/if_axereg.h Fri Nov 19 01:45:34 2010 (r215496) @@ -153,6 +153,25 @@ #define AXE_772_PHY_NO_EPHY 0x10 /* Embedded 10/100 PHY of AX88772 */ +#define AXE_GPIO0_EN 0x01 +#define AXE_GPIO0 0x02 +#define AXE_GPIO1_EN 0x04 +#define AXE_GPIO1 0x08 +#define AXE_GPIO2_EN 0x10 +#define AXE_GPIO2 0x20 +#define AXE_GPIO_RELOAD_EEPROM 0x80 + +#define AXE_PHY_MODE_MARVELL 0x00 +#define AXE_PHY_MODE_CICADA 0x01 +#define AXE_PHY_MODE_AGERE 0x02 +#define AXE_PHY_MODE_CICADA_V2 0x05 +#define AXE_PHY_MODE_AGERE_GMII 0x06 +#define AXE_PHY_MODE_CICADA_V2_ASIX 0x09 +#define AXE_PHY_MODE_REALTEK_8211CL 0x0C +#define AXE_PHY_MODE_REALTEK_8211BN 0x0D +#define AXE_PHY_MODE_REALTEK_8251CL 0x0E +#define AXE_PHY_MODE_ATTANSIC 0x40 + #define AXE_BULK_BUF_SIZE 16384 /* bytes */ #define AXE_CTL_READ 0x01 From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:46:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E89B9106564A; Fri, 19 Nov 2010 01:46:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD9348FC19; Fri, 19 Nov 2010 01:46:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1kXpj052852; Fri, 19 Nov 2010 01:46:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1kXcA052849; Fri, 19 Nov 2010 01:46:33 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190146.oAJ1kXcA052849@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215497 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:46:34 -0000 Author: thompsa Date: Fri Nov 19 01:46:33 2010 New Revision: 215497 URL: http://svn.freebsd.org/changeset/base/215497 Log: MFC r212131 Fix build breakage from r212127 Modified: stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:45:34 2010 (r215496) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:46:33 2010 (r215497) @@ -652,6 +652,7 @@ upgt_set_macfilter(struct upgt_softc *sc struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211_node *ni; struct upgt_data *data_cmd; struct upgt_lmac_mem *mem; struct upgt_lmac_filter *filter; @@ -706,8 +707,6 @@ upgt_set_macfilter(struct upgt_softc *sc filter->unknown3 = htole16(UPGT_FILTER_UNKNOWN3); break; case IEEE80211_S_RUN: - struct ieee80211_node *ni; - ni = ieee80211_ref_node(vap->iv_bss); /* XXX monitor mode isn't tested yet. */ if (vap->iv_opmode == IEEE80211_M_MONITOR) { Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:45:34 2010 (r215496) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:46:33 2010 (r215497) @@ -1833,6 +1833,7 @@ urtw_newstate(struct ieee80211vap *vap, struct ieee80211com *ic = vap->iv_ic; struct urtw_softc *sc = ic->ic_ifp->if_softc; struct urtw_vap *uvp = URTW_VAP(vap); + struct ieee80211_node *ni; usb_error_t error = 0; DPRINTF(sc, URTW_DEBUG_STATE, "%s: %s -> %s\n", __func__, @@ -1853,8 +1854,6 @@ urtw_newstate(struct ieee80211vap *vap, case IEEE80211_S_ASSOC: break; case IEEE80211_S_RUN: - struct ieee80211_node *ni; - ni = ieee80211_ref_node(vap->iv_bss); /* setting bssid. */ urtw_write32_m(sc, URTW_BSSID, ((uint32_t *)ni->ni_bssid)[0]); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:47:09 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BCCA1065674; Fri, 19 Nov 2010 01:47:09 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B37B8FC14; Fri, 19 Nov 2010 01:47:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1l9EY052912; Fri, 19 Nov 2010 01:47:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1l9UC052910; Fri, 19 Nov 2010 01:47:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190147.oAJ1l9UC052910@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215498 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:47:09 -0000 Author: thompsa Date: Fri Nov 19 01:47:09 2010 New Revision: 215498 URL: http://svn.freebsd.org/changeset/base/215498 Log: MFC r212132 Fix UMS_BUTTON_MAX define name Modified: stable/8/sys/dev/usb/input/ums.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:46:33 2010 (r215497) +++ stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:47:09 2010 (r215498) @@ -487,7 +487,7 @@ ums_hid_parse(struct ums_softc *sc, devi /* detect other buttons */ - for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) { + for (j = 0; (i < UMS_BUTTON_MAX) && (j < 2); i++, j++) { if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)), hid_input, index, &info->sc_loc_btn[i], NULL, &info->sc_iid_btn[i])) { From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:47:47 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213241065672; Fri, 19 Nov 2010 01:47:47 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 108FD8FC13; Fri, 19 Nov 2010 01:47:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1lkWV052970; Fri, 19 Nov 2010 01:47:46 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1lk1n052968; Fri, 19 Nov 2010 01:47:46 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190147.oAJ1lk1n052968@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215499 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:47:47 -0000 Author: thompsa Date: Fri Nov 19 01:47:46 2010 New Revision: 215499 URL: http://svn.freebsd.org/changeset/base/215499 Log: MFC r212133 Fix setting of the rx_max and tx_max variables. If the expected buffer size is greater than 65535 bytes then the CDC driver might not work as expected, which is not likely with the existing USB speeds. Modified: stable/8/sys/dev/usb/net/if_cdce.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/if_cdce.c ============================================================================== --- stable/8/sys/dev/usb/net/if_cdce.c Fri Nov 19 01:47:09 2010 (r215498) +++ stable/8/sys/dev/usb/net/if_cdce.c Fri Nov 19 01:47:46 2010 (r215499) @@ -312,14 +312,14 @@ cdce_ncm_init(struct cdce_softc *sc) /* Read correct set of parameters according to device mode */ if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { - sc->sc_ncm.rx_max = UGETW(temp.dwNtbInMaxSize); - sc->sc_ncm.tx_max = UGETW(temp.dwNtbOutMaxSize); + sc->sc_ncm.rx_max = UGETDW(temp.dwNtbInMaxSize); + sc->sc_ncm.tx_max = UGETDW(temp.dwNtbOutMaxSize); sc->sc_ncm.tx_remainder = UGETW(temp.wNdpOutPayloadRemainder); sc->sc_ncm.tx_modulus = UGETW(temp.wNdpOutDivisor); sc->sc_ncm.tx_struct_align = UGETW(temp.wNdpOutAlignment); } else { - sc->sc_ncm.rx_max = UGETW(temp.dwNtbOutMaxSize); - sc->sc_ncm.tx_max = UGETW(temp.dwNtbInMaxSize); + sc->sc_ncm.rx_max = UGETDW(temp.dwNtbOutMaxSize); + sc->sc_ncm.tx_max = UGETDW(temp.dwNtbInMaxSize); sc->sc_ncm.tx_remainder = UGETW(temp.wNdpInPayloadRemainder); sc->sc_ncm.tx_modulus = UGETW(temp.wNdpInDivisor); sc->sc_ncm.tx_struct_align = UGETW(temp.wNdpInAlignment); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:48:48 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F5A7106564A; Fri, 19 Nov 2010 01:48:48 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2C48FC1C; Fri, 19 Nov 2010 01:48:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1mlra053049; Fri, 19 Nov 2010 01:48:47 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1mlBb053041; Fri, 19 Nov 2010 01:48:47 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190148.oAJ1mlBb053041@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215500 - in stable/8/sys/dev/usb: . controller X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:48:48 -0000 Author: thompsa Date: Fri Nov 19 01:48:47 2010 New Revision: 215500 URL: http://svn.freebsd.org/changeset/base/215500 Log: MFC r212134 Change argument for usbd_get_dma_delay() from USB bus to USB device, some embedded hardware needs to know exactly which device is in question before it exactly can decide the required delay. Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ohci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/usb_controller.h stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/dev/usb/usb_transfer.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:48:47 2010 (r215500) @@ -3804,7 +3804,7 @@ done: } static void -ehci_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +ehci_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* * Wait until the hardware has finished any possible use of Modified: stable/8/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:48:47 2010 (r215500) @@ -2630,7 +2630,7 @@ ohci_xfer_unsetup(struct usb_xfer *xfer) } static void -ohci_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +ohci_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* * Wait until hardware has finished any possible use of the Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:48:47 2010 (r215500) @@ -3084,7 +3084,7 @@ uhci_xfer_unsetup(struct usb_xfer *xfer) } static void -uhci_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +uhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* * Wait until hardware has finished any possible use of the Modified: stable/8/sys/dev/usb/usb_controller.h ============================================================================== --- stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:48:47 2010 (r215500) @@ -62,7 +62,7 @@ struct usb_bus_methods { struct usb_endpoint_descriptor *, struct usb_endpoint *); void (*xfer_setup) (struct usb_setup_params *); void (*xfer_unsetup) (struct usb_xfer *); - void (*get_dma_delay) (struct usb_bus *, uint32_t *); + void (*get_dma_delay) (struct usb_device *, uint32_t *); void (*device_suspend) (struct usb_device *); void (*device_resume) (struct usb_device *); void (*set_hw_power) (struct usb_bus *); Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:48:47 2010 (r215500) @@ -2105,8 +2105,9 @@ repeat: (udev->bus->methods->device_suspend) (udev); /* do DMA delay */ - temp = usbd_get_dma_delay(udev->bus); - usb_pause_mtx(NULL, USB_MS_TO_TICKS(temp)); + temp = usbd_get_dma_delay(udev); + if (temp != 0) + usb_pause_mtx(NULL, USB_MS_TO_TICKS(temp)); } /* suspend current port */ Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:48:47 2010 (r215500) @@ -158,12 +158,16 @@ usbd_update_max_frame_size(struct usb_xf * Else: milliseconds of DMA delay *------------------------------------------------------------------------*/ usb_timeout_t -usbd_get_dma_delay(struct usb_bus *bus) +usbd_get_dma_delay(struct usb_device *udev) { - uint32_t temp = 0; + struct usb_bus_methods *mtod; + uint32_t temp; - if (bus->methods->get_dma_delay) { - (bus->methods->get_dma_delay) (bus, &temp); + mtod = udev->bus->methods; + temp = 0; + + if (mtod->get_dma_delay) { + (mtod->get_dma_delay) (udev, &temp); /* * Round up and convert to milliseconds. Note that we use * 1024 milliseconds per second. to save a division. @@ -1094,9 +1098,11 @@ usbd_transfer_unsetup_sub(struct usb_xfe if (needs_delay) { usb_timeout_t temp; - temp = usbd_get_dma_delay(info->bus); - usb_pause_mtx(&info->bus->bus_mtx, - USB_MS_TO_TICKS(temp)); + temp = usbd_get_dma_delay(info->udev); + if (temp != 0) { + usb_pause_mtx(&info->bus->bus_mtx, + USB_MS_TO_TICKS(temp)); + } } /* make sure that our done messages are not queued anywhere */ @@ -2577,7 +2583,7 @@ usbd_callback_wrapper_sub(struct usb_xfe /* we can not cancel this delay */ xfer->flags_int.can_cancel_immed = 0; - temp = usbd_get_dma_delay(xfer->xroot->bus); + temp = usbd_get_dma_delay(xfer->xroot->udev); DPRINTFN(3, "DMA delay, %u ms, " "on %p\n", temp, xfer); Modified: stable/8/sys/dev/usb/usb_transfer.h ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.h Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_transfer.h Fri Nov 19 01:48:47 2010 (r215500) @@ -131,7 +131,7 @@ usb_callback_t usb_handle_request_callba usb_callback_t usb_do_clear_stall_callback; void usbd_transfer_timeout_ms(struct usb_xfer *xfer, void (*cb) (void *arg), usb_timeout_t ms); -usb_timeout_t usbd_get_dma_delay(struct usb_bus *bus); +usb_timeout_t usbd_get_dma_delay(struct usb_device *udev); void usbd_transfer_power_ref(struct usb_xfer *xfer, int val); #endif /* _USB_TRANSFER_H_ */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:49:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2765F106564A; Fri, 19 Nov 2010 01:49:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 164C68FC1A; Fri, 19 Nov 2010 01:49:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1nMbL053114; Fri, 19 Nov 2010 01:49:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1nMZY053108; Fri, 19 Nov 2010 01:49:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190149.oAJ1nMZY053108@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215501 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:49:23 -0000 Author: thompsa Date: Fri Nov 19 01:49:22 2010 New Revision: 215501 URL: http://svn.freebsd.org/changeset/base/215501 Log: MFC r212135 Add support for power mode filtering as some USB hardware does not support power saving. Modified: stable/8/sys/dev/usb/usb_controller.h stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usbdi.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_controller.h ============================================================================== --- stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:49:22 2010 (r215501) @@ -102,6 +102,10 @@ struct usb_bus_methods { /* Optional transfer polling support */ void (*xfer_poll) (struct usb_bus *); + + /* Optional fixed power mode support */ + + void (*get_power_mode) (struct usb_device *udev, int8_t *pmode); }; /* Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:49:22 2010 (r215501) @@ -1524,7 +1524,7 @@ usb_alloc_device(device_t parent_dev, st * of USB devices out there that do not work very well with * automatic suspend and resume! */ - udev->power_mode = USB_POWER_MODE_ON; + udev->power_mode = usbd_filter_power_mode(udev, USB_POWER_MODE_ON); udev->pwr_save.last_xfer_time = ticks; /* we are not ready yet */ udev->refcount = 1; Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:49:22 2010 (r215501) @@ -1791,10 +1791,9 @@ ugen_get_power_mode(struct usb_fifo *f) { struct usb_device *udev = f->udev; - if ((udev == NULL) || - (udev->parent_hub == NULL)) { + if (udev == NULL) return (USB_POWER_MODE_ON); - } + return (udev->power_mode); } Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:49:22 2010 (r215501) @@ -2133,12 +2133,39 @@ usbd_set_power_mode(struct usb_device *u { /* filter input argument */ if ((power_mode != USB_POWER_MODE_ON) && - (power_mode != USB_POWER_MODE_OFF)) { + (power_mode != USB_POWER_MODE_OFF)) power_mode = USB_POWER_MODE_SAVE; - } + + power_mode = usbd_filter_power_mode(udev, power_mode); + udev->power_mode = power_mode; /* update copy of power mode */ #if USB_HAVE_POWERD usb_bus_power_update(udev->bus); #endif } + +/*------------------------------------------------------------------------* + * usbd_filter_power_mode + * + * This function filters the power mode based on hardware requirements. + *------------------------------------------------------------------------*/ +uint8_t +usbd_filter_power_mode(struct usb_device *udev, uint8_t power_mode) +{ + struct usb_bus_methods *mtod; + int8_t temp; + + mtod = udev->bus->methods; + temp = -1; + + if (mtod->get_power_mode != NULL) + (mtod->get_power_mode) (udev, &temp); + + /* check if we should not filter */ + if (temp < 0) + return (power_mode); + + /* use fixed power mode given by hardware driver */ + return (temp); +} Modified: stable/8/sys/dev/usb/usbdi.h ============================================================================== --- stable/8/sys/dev/usb/usbdi.h Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usbdi.h Fri Nov 19 01:49:22 2010 (r215501) @@ -479,6 +479,7 @@ void usbd_set_parent_iface(struct usb_de uint8_t usbd_get_bus_index(struct usb_device *udev); uint8_t usbd_get_device_index(struct usb_device *udev); void usbd_set_power_mode(struct usb_device *udev, uint8_t power_mode); +uint8_t usbd_filter_power_mode(struct usb_device *udev, uint8_t power_mode); uint8_t usbd_device_attached(struct usb_device *udev); void usbd_xfer_status(struct usb_xfer *xfer, int *actlen, int *sumlen, From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:50:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 352FC1065670; Fri, 19 Nov 2010 01:50:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22B798FC17; Fri, 19 Nov 2010 01:50:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1oNvC053194; Fri, 19 Nov 2010 01:50:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1oMid053186; Fri, 19 Nov 2010 01:50:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190150.oAJ1oMid053186@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215502 - in stable/8/sys/dev/usb: . net serial storage X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:50:23 -0000 Author: thompsa Date: Fri Nov 19 01:50:22 2010 New Revision: 215502 URL: http://svn.freebsd.org/changeset/base/215502 Log: MFC r212136 Reduce the need to accesss struct usb_device by providing functions to access the product, manufacturer and serial strings. Modified: stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/serial/ubser.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usbdi_util.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:50:22 2010 (r215502) @@ -62,13 +62,11 @@ __FBSDID("$FreeBSD$"); #define USB_DEBUG_VAR uhso_debug #include #include -#include #include -#include -#include -#include #include +#include + struct uhso_tty { struct uhso_softc *ht_sc; struct usb_xfer *ht_xfer[3]; @@ -513,7 +511,7 @@ uhso_probe(device_t self) return (ENXIO); if (uaa->info.bConfigIndex != 0) return (ENXIO); - if (uaa->device->ddesc.bDeviceClass != 0xff) + if (uaa->info.bDeviceClass != 0xff) return (ENXIO); error = usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa); @@ -603,8 +601,9 @@ uhso_attach(device_t self) /* Announce device */ device_printf(self, "<%s port> at <%s %s> on %s\n", uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)], - uaa->device->manufacturer, uaa->device->product, - device_get_nameunit(uaa->device->bus->bdev)); + usb_get_manufacturer(uaa->device), + usb_get_product(uaa->device), + device_get_nameunit(device_get_parent(self))); if (sc->sc_ttys > 0) { SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "ports", Modified: stable/8/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:50:22 2010 (r215502) @@ -104,7 +104,6 @@ __FBSDID("$FreeBSD$"); #define USB_DEBUG_VAR ubser_debug #include #include -#include #include @@ -226,7 +225,7 @@ ubser_probe(device_t dev) return (ENXIO); } /* check if this is a BWCT vendor specific ubser interface */ - if ((strcmp(uaa->device->manufacturer, "BWCT") == 0) && + if ((strcmp(usb_get_manufacturer(uaa->device), "BWCT") == 0) && (uaa->info.bInterfaceClass == 0xff) && (uaa->info.bInterfaceSubClass == 0x00)) return (0); Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:50:22 2010 (r215502) @@ -124,7 +124,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "usbdevs.h" #include @@ -2304,23 +2304,24 @@ umass_cam_action(struct cam_sim *sim, un if (umass_std_transform(sc, ccb, cmd, ccb->csio.cdb_len)) { if (sc->sc_transfer.cmd_data[0] == INQUIRY) { + const char *pserial; + + pserial = usb_get_serial(sc->sc_udev); /* * Umass devices don't generally report their serial numbers * in the usual SCSI way. Emulate it here. */ if ((sc->sc_transfer.cmd_data[1] & SI_EVPD) && - sc->sc_transfer.cmd_data[2] == SVPD_UNIT_SERIAL_NUMBER && - sc->sc_udev != NULL && - sc->sc_udev->serial != NULL && - sc->sc_udev->serial[0] != '\0') { + (sc->sc_transfer.cmd_data[2] == SVPD_UNIT_SERIAL_NUMBER) && + (pserial[0] != '\0')) { struct scsi_vpd_unit_serial_number *vpd_serial; vpd_serial = (struct scsi_vpd_unit_serial_number *)ccb->csio.data_ptr; - vpd_serial->length = strlen(sc->sc_udev->serial); + vpd_serial->length = strlen(pserial); if (vpd_serial->length > sizeof(vpd_serial->serial_num)) vpd_serial->length = sizeof(vpd_serial->serial_num); - memcpy(vpd_serial->serial_num, sc->sc_udev->serial, vpd_serial->length); + memcpy(vpd_serial->serial_num, pserial, vpd_serial->length); ccb->csio.scsi_status = SCSI_STATUS_OK; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -2553,9 +2554,7 @@ umass_cam_cb(struct umass_softc *sc, uni sc->sc_transfer.cmd_data[0] == INQUIRY && (sc->sc_transfer.cmd_data[1] & SI_EVPD) && sc->sc_transfer.cmd_data[2] == SVPD_SUPPORTED_PAGE_LIST && - sc->sc_udev != NULL && - sc->sc_udev->serial != NULL && - sc->sc_udev->serial[0] != '\0') { + (usb_get_serial(sc->sc_udev)[0] != '\0')) { struct ccb_scsiio *csio; struct scsi_vpd_supported_page_list *page_list; Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:50:22 2010 (r215502) @@ -136,6 +136,24 @@ usb_statestr(enum usb_dev_state state) return ((state < USB_STATE_MAX) ? statestr[state] : "UNKNOWN"); } +const char * +usb_get_manufacturer(struct usb_device *udev) +{ + return (udev->manufacturer ? udev->manufacturer : "Unknown"); +} + +const char * +usb_get_product(struct usb_device *udev) +{ + return (udev->product ? udev->product : ""); +} + +const char * +usb_get_serial(struct usb_device *udev) +{ + return (udev->serial ? udev->serial : ""); +} + /*------------------------------------------------------------------------* * usbd_get_ep_by_addr * @@ -1833,7 +1851,8 @@ config_done: udev->ugen_symlink = usb_alloc_symlink(udev->ugen_name); /* Announce device */ - printf("%s: <%s> at %s\n", udev->ugen_name, udev->manufacturer, + printf("%s: <%s> at %s\n", udev->ugen_name, + usb_get_manufacturer(udev), device_get_nameunit(udev->bus->bdev)); usb_notify_addq("ATTACH", udev); @@ -1985,7 +2004,7 @@ usb_free_device(struct usb_device *udev, usb_notify_addq("DETACH", udev); printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name, - udev->manufacturer, device_get_nameunit(bus->bdev)); + usb_get_manufacturer(udev), device_get_nameunit(bus->bdev)); /* Destroy UGEN symlink, if any */ if (udev->ugen_symlink) { @@ -2150,7 +2169,8 @@ usb_devinfo(struct usb_device *udev, cha if (udd->bDeviceClass != 0xFF) { snprintf(dst_ptr, dst_len, "%s %s, class %d/%d, rev %x.%02x/" "%x.%02x, addr %d", - udev->manufacturer, udev->product, + usb_get_manufacturer(udev), + usb_get_product(udev), udd->bDeviceClass, udd->bDeviceSubClass, (bcdUSB >> 8), bcdUSB & 0xFF, (bcdDevice >> 8), bcdDevice & 0xFF, @@ -2158,7 +2178,8 @@ usb_devinfo(struct usb_device *udev, cha } else { snprintf(dst_ptr, dst_len, "%s %s, rev %x.%02x/" "%x.%02x, addr %d", - udev->manufacturer, udev->product, + usb_get_manufacturer(udev), + usb_get_product(udev), (bcdUSB >> 8), bcdUSB & 0xFF, (bcdDevice >> 8), bcdDevice & 0xFF, udev->address); @@ -2397,7 +2418,7 @@ usb_notify_addq_compat(const char *type, UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, - udev->serial, + usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), udev->port_no, udev->parent_hub != NULL ? @@ -2437,7 +2458,7 @@ usb_notify_addq(const char *type, struct UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, - udev->serial, + usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), (udev->flags.usb_mode == USB_MODE_HOST) ? "host" : "device", udev->port_no, @@ -2476,7 +2497,7 @@ usb_notify_addq(const char *type, struct UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, - udev->serial, + usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), (udev->flags.usb_mode == USB_MODE_HOST) ? "host" : "device", iface->idesc->bInterfaceNumber, Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:50:22 2010 (r215502) @@ -825,9 +825,9 @@ usb_gen_fill_deviceinfo(struct usb_fifo di->udi_bus = device_get_unit(udev->bus->bdev); di->udi_addr = udev->address; di->udi_index = udev->device_index; - strlcpy(di->udi_serial, udev->serial, sizeof(di->udi_serial)); - strlcpy(di->udi_vendor, udev->manufacturer, sizeof(di->udi_vendor)); - strlcpy(di->udi_product, udev->product, sizeof(di->udi_product)); + strlcpy(di->udi_serial, usb_get_serial(udev), sizeof(di->udi_serial)); + strlcpy(di->udi_vendor, usb_get_manufacturer(udev), sizeof(di->udi_vendor)); + strlcpy(di->udi_product, usb_get_product(udev), sizeof(di->udi_product)); usb_printbcd(di->udi_release, sizeof(di->udi_release), UGETW(udev->ddesc.bcdDevice)); di->udi_vendorNo = UGETW(udev->ddesc.idVendor); Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:50:22 2010 (r215502) @@ -53,6 +53,7 @@ #include #include #include +#include #define USB_DEBUG_VAR uhub_debug @@ -1059,7 +1060,7 @@ uhub_child_pnpinfo_string(device_t paren UGETW(res.udev->ddesc.idProduct), res.udev->ddesc.bDeviceClass, res.udev->ddesc.bDeviceSubClass, - res.udev->serial, + usb_get_serial(res.udev), UGETW(res.udev->ddesc.bcdDevice), iface->idesc->bInterfaceClass, iface->idesc->bInterfaceSubClass); Modified: stable/8/sys/dev/usb/usbdi_util.h ============================================================================== --- stable/8/sys/dev/usb/usbdi_util.h Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usbdi_util.h Fri Nov 19 01:50:22 2010 (r215502) @@ -78,4 +78,11 @@ usb_error_t usbd_req_set_protocol(struct usb_error_t usbd_req_set_report(struct usb_device *udev, struct mtx *mtx, void *data, uint16_t len, uint8_t iface_index, uint8_t type, uint8_t id); + +/* The following functions will not return NULL strings. */ + +const char *usb_get_manufacturer(struct usb_device *); +const char *usb_get_product(struct usb_device *); +const char *usb_get_serial(struct usb_device *); + #endif /* _USB_USBDI_UTIL_H_ */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:50:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0010810656AD; Fri, 19 Nov 2010 01:50:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C88D78FC16; Fri, 19 Nov 2010 01:50:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1ou1a053249; Fri, 19 Nov 2010 01:50:56 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1ouQI053247; Fri, 19 Nov 2010 01:50:56 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190150.oAJ1ouQI053247@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215503 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:50:57 -0000 Author: thompsa Date: Fri Nov 19 01:50:56 2010 New Revision: 215503 URL: http://svn.freebsd.org/changeset/base/215503 Log: MFC r212830 Cleanup white space and typos. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:50:22 2010 (r215502) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:50:56 2010 (r215503) @@ -495,7 +495,7 @@ vendor GEOCAST 0x0a79 Geocast Network S vendor IDQUANTIQUE 0x0aba id Quantique vendor ZYDAS 0x0ace Zydas Technology Corporation vendor NEODIO 0x0aec Neodio -vendor OPTION 0x0af0 Option N.V: +vendor OPTION 0x0af0 Option N.V. vendor ASUS 0x0b05 ASUSTeK Computer vendor TODOS 0x0b0c Todos Data System vendor SIIG2 0x0b39 SIIG @@ -1451,7 +1451,7 @@ product EDIMAX EW7718 0x7718 EW-7718 /* eGalax Products */ product EGALAX TPANEL 0x0001 Touch Panel product EGALAX TPANEL2 0x0002 Touch Panel -product EGALAX2 TPANEL 0x0001 Touch Panel +product EGALAX2 TPANEL 0x0001 Touch Panel /* Eicon Networks */ product EICON DIVA852 0x4905 Diva 852 ISDN TA @@ -2104,7 +2104,7 @@ product MELCO LUATX1 0x0001 LUA-TX Ethe product MELCO LUATX5 0x0005 LUA-TX Ethernet product MELCO LUA2TX5 0x0009 LUA2-TX Ethernet product MELCO LUAKTX 0x0012 LUA-KTX Ethernet -product MELCO DUBPXXG 0x001c USB-IDE Bridge: DUB-PxxG +product MELCO DUBPXXG 0x001c DUB-PxxG product MELCO LUAU2KTX 0x003d LUA-U2-KTX Ethernet product MELCO KG54YB 0x005e WLI-U2-KG54-YB WLAN product MELCO KG54 0x0066 WLI-U2-KG54 WLAN @@ -2465,7 +2465,7 @@ product PANASONIC TYTP50P6S 0x3900 TY-TP /* PARA Industrial products */ product PARA RT3070 0x8888 RT3070 - + /* Pegatron products */ product PEGATRON RT2870 0x0002 RT2870 product PEGATRON RT3070 0x000c RT3070 @@ -2752,7 +2752,7 @@ product SAGEM XG76NA 0x0062 XG-76NA product SAMSUNG ML6060 0x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player product SAMSUNG YP_U4 0x5092 YP-U4 MP3 Player -product SAMSUNG I500 0x6601 I500 Palm USB Phone +product SAMSUNG I500 0x6601 I500 Palm USB Phone product SAMSUNG I330 0x8001 I330 phone cradle product SAMSUNG2 RT2870_1 0x2018 RT2870 @@ -3382,7 +3382,7 @@ product ZOOM 2986L 0x9700 2986L Fax mod product ZORAN EX20DSC 0x4343 Digital Camera EX-20 DSC /* Zydas Technology Corporation products */ -product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg +product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg product ZYDAS ZD1211B 0x1215 ZD1211B /* ZyXEL Communication Co. products */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:51:52 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07BD21065696; Fri, 19 Nov 2010 01:51:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EADF68FC19; Fri, 19 Nov 2010 01:51:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1pp2F053317; Fri, 19 Nov 2010 01:51:51 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1ppmq053314; Fri, 19 Nov 2010 01:51:51 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190151.oAJ1ppmq053314@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215504 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:51:52 -0000 Author: thompsa Date: Fri Nov 19 01:51:51 2010 New Revision: 215504 URL: http://svn.freebsd.org/changeset/base/215504 Log: MFC r215326 Add a special INIT product ID used by some models of the HUAWEI K3765 datacard. After ejecting this device, it reappears using the normal K3765 ID. It does not switch automatically Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:50:56 2010 (r215503) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:51:51 2010 (r215504) @@ -285,6 +285,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:50:56 2010 (r215503) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:51:51 2010 (r215504) @@ -1850,6 +1850,7 @@ product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem product HUAWEI E14AC 0x14ac 3G modem +product HUAWEI K3765_INIT 0x1520 HUAWEI Mobile K3765 Initial /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:52:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9478C1065672; Fri, 19 Nov 2010 01:52:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 839E68FC1D; Fri, 19 Nov 2010 01:52:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1qY8M053384; Fri, 19 Nov 2010 01:52:34 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1qYbX053381; Fri, 19 Nov 2010 01:52:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190152.oAJ1qYbX053381@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215505 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:52:34 -0000 Author: thompsa Date: Fri Nov 19 01:52:34 2010 New Revision: 215505 URL: http://svn.freebsd.org/changeset/base/215505 Log: MFC r215330 Add the Sierra MC8700. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:51:51 2010 (r215504) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:52:34 2010 (r215505) @@ -453,6 +453,7 @@ static const struct usb_device_id u3g_de U3G_DEV(SIERRA, MC5727, 0), U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), + U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), U3G_DEV(SIERRA, MC8755_3, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:51:51 2010 (r215504) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:52:34 2010 (r215505) @@ -2895,6 +2895,7 @@ product SIERRA C888 0x6890 C888 product SIERRA C22 0x6891 C22 product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 +product SIERRA MC8700 0x68A3 MC8700 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:58:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F23FC1065670; Fri, 19 Nov 2010 01:58:11 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E18D68FC20; Fri, 19 Nov 2010 01:58:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1wBKq053652; Fri, 19 Nov 2010 01:58:11 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1wBMN053650; Fri, 19 Nov 2010 01:58:11 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190158.oAJ1wBMN053650@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215506 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:58:12 -0000 Author: thompsa Date: Fri Nov 19 01:58:11 2010 New Revision: 215506 URL: http://svn.freebsd.org/changeset/base/215506 Log: MFC r207768 Add dummy function for ic_update_mcast (a la if_urtw) to avoid console spam. Modified: stable/8/sys/dev/usb/wlan/if_rum.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:52:34 2010 (r215505) +++ stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:58:11 2010 (r215506) @@ -194,6 +194,7 @@ static void rum_enable_tsf(struct rum_s static void rum_update_slot(struct ifnet *); static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); +static void rum_update_mcast(struct ifnet *); static void rum_update_promisc(struct ifnet *); static void rum_setpromisc(struct rum_softc *); static const char *rum_get_rf(int); @@ -512,6 +513,7 @@ rum_attach(device_t self) ic->ic_vap_create = rum_vap_create; ic->ic_vap_delete = rum_vap_delete; + ic->ic_update_mcast = rum_update_mcast; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), @@ -1814,6 +1816,17 @@ rum_update_promisc(struct ifnet *ifp) RUM_UNLOCK(sc); } +static void +rum_update_mcast(struct ifnet *ifp) +{ + static int warning_printed; + + if (warning_printed == 0) { + if_printf(ifp, "need to implement %s\n", __func__); + warning_printed = 1; + } +} + static const char * rum_get_rf(int rev) { From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 09:14:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A500A1065672; Fri, 19 Nov 2010 09:14:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92E168FC12; Fri, 19 Nov 2010 09:14:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9Er0A065130; Fri, 19 Nov 2010 09:14:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9Er4V065126; Fri, 19 Nov 2010 09:14:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190914.oAJ9Er4V065126@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215509 - in stable/8/sys/dev: ahci ata siis X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:14:53 -0000 Author: mav Date: Fri Nov 19 09:14:53 2010 New Revision: 215509 URL: http://svn.freebsd.org/changeset/base/215509 Log: MFC r214988: Teach ahci(4), siis(4) and ATA_CAM ata(4) wrapper report to CAM residual I/O length on underruns, that often happens for some SCSI commands. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Fri Nov 19 04:30:33 2010 (r215508) +++ stable/8/sys/dev/ahci/ahci.c Fri Nov 19 09:14:53 2010 (r215509) @@ -1619,12 +1619,13 @@ ahci_execute_transaction(struct ahci_slo /* Setup the command list entry */ clp = (struct ahci_cmd_list *) (ch->dma.work + AHCI_CL_OFFSET + (AHCI_CL_SIZE * slot->slot)); - clp->prd_length = slot->dma.nsegs; - clp->cmd_flags = (ccb->ccb_h.flags & CAM_DIR_OUT ? AHCI_CMD_WRITE : 0) | - (ccb->ccb_h.func_code == XPT_SCSI_IO ? - (AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH) : 0) | - (fis_size / sizeof(u_int32_t)) | - (port << 12); + clp->cmd_flags = htole16( + (ccb->ccb_h.flags & CAM_DIR_OUT ? AHCI_CMD_WRITE : 0) | + (ccb->ccb_h.func_code == XPT_SCSI_IO ? + (AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH) : 0) | + (fis_size / sizeof(u_int32_t)) | + (port << 12)); + clp->prd_length = htole16(slot->dma.nsegs); /* Special handling for Soft Reset command. */ if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) { @@ -1644,7 +1645,7 @@ ahci_execute_transaction(struct ahci_slo clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET + (AHCI_CT_SIZE * slot->slot)); bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); bus_dmamap_sync(ch->dma.rfis_tag, ch->dma.rfis_map, BUS_DMASYNC_PREREAD); /* Set ACTIVE bit for NCQ commands. */ @@ -1849,10 +1850,13 @@ ahci_end_transaction(struct ahci_slot *s device_t dev = slot->dev; struct ahci_channel *ch = device_get_softc(dev); union ccb *ccb = slot->ccb; + struct ahci_cmd_list *clp; int lastto; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, - BUS_DMASYNC_POSTWRITE); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + clp = (struct ahci_cmd_list *) + (ch->dma.work + AHCI_CL_OFFSET + (AHCI_CL_SIZE * slot->slot)); /* Read result registers to the result struct * May be incorrect if several commands finished same time, * so read only when sure or have to. @@ -1887,6 +1891,16 @@ ahci_end_transaction(struct ahci_slot *s res->sector_count_exp = fis[13]; } else bzero(res, sizeof(*res)); + if ((ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) == 0 && + (ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + ccb->ataio.resid = + ccb->ataio.dxfer_len - le32toh(clp->bytecount); + } + } else { + if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + ccb->csio.resid = + ccb->csio.dxfer_len - le32toh(clp->bytecount); + } } if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { bus_dmamap_sync(ch->dma.data_tag, slot->dma.data_map, Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Fri Nov 19 04:30:33 2010 (r215508) +++ stable/8/sys/dev/ata/ata-all.c Fri Nov 19 09:14:53 2010 (r215509) @@ -1516,6 +1516,15 @@ ata_cam_end_transaction(device_t dev, st res->sector_count = request->u.ata.count; res->sector_count_exp = request->u.ata.count >> 8; } + if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + if (ccb->ccb_h.func_code == XPT_ATA_IO) { + ccb->ataio.resid = + ccb->ataio.dxfer_len - request->donecount; + } else { + ccb->csio.resid = + ccb->csio.dxfer_len - request->donecount; + } + } ata_free_request(request); xpt_done(ccb); /* Do error recovery if needed. */ Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Fri Nov 19 04:30:33 2010 (r215508) +++ stable/8/sys/dev/siis/siis.c Fri Nov 19 09:14:53 2010 (r215509) @@ -1208,6 +1208,17 @@ siis_end_transaction(struct siis_slot *s res->sector_count_exp = ATA_INB(ch->r_mem, offs + 13); } else bzero(res, sizeof(*res)); + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN && + ch->numrslots == 1) { + ccb->ataio.resid = ccb->ataio.dxfer_len - + ATA_INL(ch->r_mem, SIIS_P_LRAM_SLOT(slot->slot) + 4); + } + } else { + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN && + ch->numrslots == 1) { + ccb->csio.resid = ccb->csio.dxfer_len - + ATA_INL(ch->r_mem, SIIS_P_LRAM_SLOT(slot->slot) + 4); + } } if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { bus_dmamap_sync(ch->dma.data_tag, slot->dma.data_map, From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 09:21:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3FBF1065670; Fri, 19 Nov 2010 09:21:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2CE08FC08; Fri, 19 Nov 2010 09:21:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9LrKg065678; Fri, 19 Nov 2010 09:21:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9Lrq1065676; Fri, 19 Nov 2010 09:21:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190921.oAJ9Lrq1065676@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215510 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:21:53 -0000 Author: mav Date: Fri Nov 19 09:21:53 2010 New Revision: 215510 URL: http://svn.freebsd.org/changeset/base/215510 Log: MFC r209682 by imp: Minor formatting nits. Modified: stable/8/sys/dev/ata/ata-card.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-card.c ============================================================================== --- stable/8/sys/dev/ata/ata-card.c Fri Nov 19 09:14:53 2010 (r215509) +++ stable/8/sys/dev/ata/ata-card.c Fri Nov 19 09:21:53 2010 (r215510) @@ -135,9 +135,9 @@ ata_pccard_attach(device_t dev) ch->unit = 0; ch->flags |= ATA_USE_16BIT; funce = 0; /* Default to sane setting of FUNCE */ - pccard_get_funce_disk(dev, &funce); + pccard_get_funce_disk(dev, &funce); if (!(funce & PFD_I_D)) - ch-> flags |= ATA_NO_SLAVE; + ch-> flags |= ATA_NO_SLAVE; ata_generic_hw(dev); err = ata_probe(dev); if (err) From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 09:25:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC54106566B; Fri, 19 Nov 2010 09:25:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 221C78FC0A; Fri, 19 Nov 2010 09:25:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9PDoM065891; Fri, 19 Nov 2010 09:25:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9PDjr065889; Fri, 19 Nov 2010 09:25:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190925.oAJ9PDjr065889@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215511 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:25:13 -0000 Author: mav Date: Fri Nov 19 09:25:12 2010 New Revision: 215511 URL: http://svn.freebsd.org/changeset/base/215511 Log: MFC r209683 by imp: Add a safety-belt. If the identified disk has 0 blocks, don't attach it. This can happen in some cases when plugging in SD/SmartCard PC Cards with empty slots. It is better to detect this bogosity, and refuse to attach rather than panic with a division by zero (in one of many places) down stream. Modified: stable/8/sys/dev/ata/ata-disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Fri Nov 19 09:21:53 2010 (r215510) +++ stable/8/sys/dev/ata/ata-disk.c Fri Nov 19 09:25:12 2010 (r215511) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); /* prototypes */ static void ad_init(device_t dev); -static void ad_get_geometry(device_t dev); +static int ad_get_geometry(device_t dev); static void ad_set_geometry(device_t dev); static void ad_done(struct ata_request *request); static void ad_describe(device_t dev); @@ -106,7 +106,8 @@ ad_attach(device_t dev) device_set_ivars(dev, adp); /* get device geometry into internal structs */ - ad_get_geometry(dev); + if (ad_get_geometry(dev)) + return ENXIO; /* set the max size if configured */ if (ata_setmax) @@ -412,7 +413,7 @@ ad_init(device_t dev) atadev->max_iosize = DEV_BSIZE; } -static void +static int ad_get_geometry(device_t dev) { struct ata_device *atadev = device_get_softc(dev); @@ -434,6 +435,9 @@ ad_get_geometry(device_t dev) } lbasize = (u_int32_t)atadev->param.lba_size_1 | ((u_int32_t)atadev->param.lba_size_2 << 16); + /* This device exists, but has no size. Filter out this bogus device. */ + if (!lbasize && !adp->total_secs) + return ENXIO; /* does this device need oldstyle CHS addressing */ if (!ad_version(atadev->param.version_major) || !lbasize) @@ -451,6 +455,7 @@ ad_get_geometry(device_t dev) if ((atadev->param.support.command2 & ATA_SUPPORT_ADDRESS48) && lbasize48 > ATA_MAX_28BIT_LBA) adp->total_secs = lbasize48; + return 0; } static void From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 09:26:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF1A1065694; Fri, 19 Nov 2010 09:26:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E898FC13; Fri, 19 Nov 2010 09:26:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9QdGq065995; Fri, 19 Nov 2010 09:26:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9QdcD065993; Fri, 19 Nov 2010 09:26:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190926.oAJ9QdcD065993@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215512 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:26:40 -0000 Author: mav Date: Fri Nov 19 09:26:39 2010 New Revision: 215512 URL: http://svn.freebsd.org/changeset/base/215512 Log: MFC r214672: Remove stale line, accidentally slipped into r214016. Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Fri Nov 19 09:25:12 2010 (r215511) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Fri Nov 19 09:26:39 2010 (r215512) @@ -315,7 +315,6 @@ ata_intel_ch_attach(device_t dev) map &= 0x03; if (map == 0x00) { ch->flags |= ATA_SATA; - smap[ch->unit] = (ch->unit == 0) ? 0x20 : 0x31; smap[0] = (ch->unit == 0) ? 0 : 1; smap[1] = (ch->unit == 0) ? 2 : 3; } else if (map == 0x02 && ch->unit == 0) { From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 09:49:14 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCC371065673; Fri, 19 Nov 2010 09:49:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B78558FC25; Fri, 19 Nov 2010 09:49:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9nE5N067127; Fri, 19 Nov 2010 09:49:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9nEhM067119; Fri, 19 Nov 2010 09:49:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011190949.oAJ9nEhM067119@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 09:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215513 - in stable/8/sys: amd64/acpica amd64/amd64 amd64/ia32 amd64/include crypto/via dev/fb dev/random i386/i386 i386/include i386/isa i386/linux kern opencrypto pc98/include pc98/pc... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:49:14 -0000 Author: kib Date: Fri Nov 19 09:49:14 2010 New Revision: 215513 URL: http://svn.freebsd.org/changeset/base/215513 Log: Merge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the amd64 suspend/resume support. Tested by: Mike Tancsa Also tested by: Dewayne Geraghty , Daryl Richards Below is the svn log of the merged revisions. ------------------------------------------------------------------------ r197455 | emaste | 2009-09-24 17:26:42 +0300 (Thu, 24 Sep 2009) | 5 lines Add a backtrace to the "fpudna in kernel mode!" case, to help track down where this comes from. Reviewed by: bde ------------------------------------------------------------------------ r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines Clean up amd64 suspend/resume code. - Allocate memory for wakeup code after ACPI bus is attached. The early memory allocation hack was inherited from i386 but amd64 does not need it. - Exclude real mode IVT and BDA explicitly. Improve comments about memory allocation and reason for the exclusions. It is a no-op in reality, though. - Remove an unnecessary CLD from wakeup code and re-align. ------------------------------------------------------------------------ r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines Tweak memory allocation for amd64 suspend/resume CPU context. ------------------------------------------------------------------------ r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines Simplify a macro not to generate unncessary symbols. ------------------------------------------------------------------------ r205444 | emaste | 2010-03-22 13:52:53 +0200 (Mon, 22 Mar 2010) | 7 lines Merge r197455 from amd64: Add a backtrace to the "fpudna in kernel mode!" case, to help track down where this comes from. Reviewed by: bde ------------------------------------------------------------------------ r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines Introduce the x86 kernel interfaces to allow kernel code to use FPU/SSE hardware. Caller should provide a save area that is chained into the stack of the areas; pcb save_area for usermode FPU state is on top. The pcb now contains a pointer to the current FPU saved area, used during FPUDNA handling and context switches. There is also a facility to allow the kernel thread to use pcb save_area. Change the dreaded warnings "npxdna in kernel mode!" into the panics when FPU usage is not registered. KPI discussed with: fabient Tested by: pho, fabient Hardware provided by: Sentex Communications MFC after: 1 month ------------------------------------------------------------------------ r208834 | kib | 2010-06-05 19:00:53 +0300 (Sat, 05 Jun 2010) | 13 lines Use the fpu_kern_enter() interface to properly separate usermode FPU context from in-kernel execution of padlock instructions and to handle spurious FPUDNA exceptions that sometime are raised when doing padlock calculations. Globally mark crypto(9) kthread as using FPU. Reviewed by: pjd Hardware provided by: Sentex Communications Tested by: pho PR: amd64/135014 MFC after: 1 month ------------------------------------------------------------------------ r208877 | kib | 2010-06-06 19:13:50 +0300 (Sun, 06 Jun 2010) | 5 lines Style-compilant order of declarations. Noted by: bde MFC after: 1 month ------------------------------------------------------------------------ r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines Fix ACPI suspend/resume on amd64, which was broken since r208833. We need actual storage for FPU state to save and restore. ------------------------------------------------------------------------ r209198 | kib | 2010-06-15 12:19:33 +0300 (Tue, 15 Jun 2010) | 10 lines Use critical sections instead of disabling local interrupts to ensure the consistency between PCPU fpcurthread and the state of the FPU. Explicitely assert that the calling conventions for fpudrop() are adhered too. In cpu_thread_exit(), add missed critical section entrance. Reviewed by: bde Tested by: pho MFC after: 1 month ------------------------------------------------------------------------ r209204 | kib | 2010-06-15 17:59:35 +0300 (Tue, 15 Jun 2010) | 5 lines Rename CRITSECT_ASSERT to CRITICAL_ASSERT. Suggested by: jhb MFC after: 1 month ------------------------------------------------------------------------ r209208 | kib | 2010-06-15 21:16:04 +0300 (Tue, 15 Jun 2010) | 4 lines Remove two obsoleted comments, add a note about 32bit compatibility. MFC after: 1 month ------------------------------------------------------------------------ r209252 | kib | 2010-06-17 15:35:17 +0300 (Thu, 17 Jun 2010) | 6 lines In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead of fpu{get,set}regs. Noted by: bde MFC after: 1 month ------------------------------------------------------------------------ r209460 | kib | 2010-06-23 13:40:28 +0300 (Wed, 23 Jun 2010) | 8 lines Remove unused i586 optimized bcopy/bzero/etc implementations that utilize FPU registers for copying. Remove the switch table and jumps from bcopy/bzero/... to the actual implementation. As a side-effect, i486-optimized bzero is removed. Reviewed by: bde Tested by: pho (previous version) ------------------------------------------------------------------------ r209461 | kib | 2010-06-23 14:12:58 +0300 (Wed, 23 Jun 2010) | 8 lines Remove the support for int13 FPU exception reporting on i386. It is believed that all 486-class CPUs FreeBSD is capable to run on, either have no FPU and cannot use external coprocessor, or have FPU on the package and can use #MF. Reviewed by: bde Tested by: pho (previous version) ------------------------------------------------------------------------ r209462 | kib | 2010-06-23 14:21:19 +0300 (Wed, 23 Jun 2010) | 8 lines After the FPU use requires #MF working due to INT13 FPU exception handling removal, MFi386 r209198: Use critical sections instead of disabling local interrupts to ensure the consistency between PCPU fpcurthread and the state of FPU. Reviewed by: bde Tested by: pho ------------------------------------------------------------------------ r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines Re-implement FPU suspend/resume for amd64. This removes superfluous uses of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs(). Also, we do not touch PCB flags any more. MFC after: 1 month ------------------------------------------------------------------------ r210517 | jkim | 2010-07-27 00:24:52 +0300 (Tue, 27 Jul 2010) | 4 lines FNSTSW instruction can use AX register as an operand. Obtained from: fenv.h ------------------------------------------------------------------------ r210518 | jkim | 2010-07-27 01:16:36 +0300 (Tue, 27 Jul 2010) | 5 lines Reduce diff against fenv.h: Mark all inline asms as volatile for safety. No object file change after this commit (verified with md5). ------------------------------------------------------------------------ r210519 | jkim | 2010-07-27 01:55:14 +0300 (Tue, 27 Jul 2010) | 2 lines Remove an unused macro since r189418. ------------------------------------------------------------------------ r210520 | jkim | 2010-07-27 02:02:18 +0300 (Tue, 27 Jul 2010) | 2 lines Add missing ldmxcsr() prototype for lint case. ------------------------------------------------------------------------ r210521 | jkim | 2010-07-27 02:20:55 +0300 (Tue, 27 Jul 2010) | 3 lines Simplify fldcw() macro. There is no reason to use pointer here. No object file change after this commit (verified with md5). ------------------------------------------------------------------------ r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h. ------------------------------------------------------------------------ r210615 | jkim | 2010-07-29 19:49:20 +0300 (Thu, 29 Jul 2010) | 5 lines Fix another fallout from r208833. savectx() is used to save CPU context for crash dump (dumppcb) and kdb (stoppcbs). For both cases, there cannot have a valid pointer in pcb_save. This should restore the previous behaviour. ------------------------------------------------------------------------ r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines - Merge savectx2() with savectx() and struct xpcb with struct pcb. [1] savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs). Thus, saving additional information does not hurt and it may be even beneficial. Unfortunately, struct pcb has grown larger to accommodate more data. Move 512-byte long pcb_user_save to the end of struct pcb while I am here. - savectx() now saves FPU state unconditionally and copy it to the PCB of FPU thread if necessary. This gives panic dump and kdb a chance to take a look at the current FPU state even if the FPU is "supposedly" not used. - Resuming CPU now unconditionally reinitializes FPU. If the saved FPU state was irrelevant, it could be in an unknown state. Suggested by: bde [1] ------------------------------------------------------------------------ r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines savectx() has not been used for fork(2) for about 15 years. [1] Do not clobber FPU thread's PCB as it is more harmful. When we resume CPU, unconditionally reload FPU state. Pointed out by: bde [1] ------------------------------------------------------------------------ r212026 | jkim | 2010-08-31 00:19:42 +0300 (Tue, 31 Aug 2010) | 3 lines Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use these values in the function. ------------------------------------------------------------------------ r214347 | jhb | 2010-10-25 18:31:13 +0300 (Mon, 25 Oct 2010) | 5 lines Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned by intr_disable(). Requested by: bde ------------------------------------------------------------------------ Modified: stable/8/sys/amd64/acpica/acpi_machdep.c stable/8/sys/amd64/acpica/acpi_switch.S stable/8/sys/amd64/acpica/acpi_wakecode.S stable/8/sys/amd64/acpica/acpi_wakeup.c stable/8/sys/amd64/amd64/cpu_switch.S stable/8/sys/amd64/amd64/fpu.c stable/8/sys/amd64/amd64/genassym.c stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/amd64/vm_machdep.c stable/8/sys/amd64/ia32/ia32_reg.c stable/8/sys/amd64/ia32/ia32_signal.c stable/8/sys/amd64/include/fpu.h stable/8/sys/amd64/include/pcb.h stable/8/sys/crypto/via/padlock.c stable/8/sys/crypto/via/padlock.h stable/8/sys/crypto/via/padlock_cipher.c stable/8/sys/crypto/via/padlock_hash.c stable/8/sys/dev/fb/fbreg.h stable/8/sys/dev/random/nehemiah.c stable/8/sys/i386/i386/identcpu.c stable/8/sys/i386/i386/initcpu.c stable/8/sys/i386/i386/machdep.c stable/8/sys/i386/i386/perfmon.c stable/8/sys/i386/i386/ptrace_machdep.c stable/8/sys/i386/i386/support.s stable/8/sys/i386/i386/swtch.s stable/8/sys/i386/i386/trap.c stable/8/sys/i386/i386/vm_machdep.c stable/8/sys/i386/include/md_var.h stable/8/sys/i386/include/npx.h stable/8/sys/i386/include/pcb.h stable/8/sys/i386/isa/npx.c stable/8/sys/i386/linux/linux_ptrace.c stable/8/sys/kern/subr_trap.c stable/8/sys/opencrypto/crypto.c stable/8/sys/pc98/include/npx.h stable/8/sys/pc98/pc98/machdep.c stable/8/sys/x86/x86/local_apic.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- stable/8/sys/amd64/acpica/acpi_machdep.c Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_machdep.c Fri Nov 19 09:49:14 2010 (r215513) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include #include @@ -71,7 +72,6 @@ acpi_machdep_init(device_t dev) STAILQ_INSERT_TAIL(&sc->apm_cdevs, &acpi_clone, entries); ACPI_UNLOCK(acpi); sc->acpi_clone = &acpi_clone; - acpi_install_wakeup_handler(sc); if (intr_model != ACPI_INTR_PIC) acpi_SetIntrModel(intr_model); @@ -363,13 +363,20 @@ nexus_acpi_probe(device_t dev) static int nexus_acpi_attach(device_t dev) { + device_t acpi_dev; + int error; nexus_init_resources(); bus_generic_probe(dev); - if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL) + acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0); + if (acpi_dev == NULL) panic("failed to add acpi0 device"); - return (bus_generic_attach(dev)); + error = bus_generic_attach(dev); + if (error == 0) + acpi_install_wakeup_handler(device_get_softc(acpi_dev)); + + return (error); } static device_method_t nexus_acpi_methods[] = { Modified: stable/8/sys/amd64/acpica/acpi_switch.S ============================================================================== --- stable/8/sys/amd64/acpica/acpi_switch.S Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_switch.S Fri Nov 19 09:49:14 2010 (r215513) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,26 +34,11 @@ #include "acpi_wakedata.h" #include "assym.s" -#define WAKEUP_DECL(member) \ - .set WAKEUP_ ## member, wakeup_ ## member - wakeup_ctx - - WAKEUP_DECL(xpcb) - WAKEUP_DECL(gdt) - WAKEUP_DECL(efer) - WAKEUP_DECL(pat) - WAKEUP_DECL(star) - WAKEUP_DECL(lstar) - WAKEUP_DECL(cstar) - WAKEUP_DECL(sfmask) - WAKEUP_DECL(cpu) - -#define WAKEUP_CTX(member) WAKEUP_ ## member (%rdi) -#define WAKEUP_PCB(member) PCB_ ## member(%r11) -#define WAKEUP_XPCB(member) XPCB_ ## member(%r11) +#define WAKEUP_CTX(member) wakeup_ ## member - wakeup_ctx(%rsi) ENTRY(acpi_restorecpu) /* Switch to KPML4phys. */ - movq %rsi, %rax + movq %rdi, %rax movq %rax, %cr3 /* Restore GDT. */ @@ -62,7 +47,7 @@ ENTRY(acpi_restorecpu) 1: /* Fetch PCB. */ - movq WAKEUP_CTX(xpcb), %r11 + movq WAKEUP_CTX(pcb), %rdi /* Force kernel segment registers. */ movl $KDSEL, %eax @@ -75,16 +60,16 @@ ENTRY(acpi_restorecpu) movw %ax, %gs movl $MSR_FSBASE, %ecx - movl WAKEUP_PCB(FSBASE), %eax - movl 4 + WAKEUP_PCB(FSBASE), %edx + movl PCB_FSBASE(%rdi), %eax + movl 4 + PCB_FSBASE(%rdi), %edx wrmsr movl $MSR_GSBASE, %ecx - movl WAKEUP_PCB(GSBASE), %eax - movl 4 + WAKEUP_PCB(GSBASE), %edx + movl PCB_GSBASE(%rdi), %eax + movl 4 + PCB_GSBASE(%rdi), %edx wrmsr movl $MSR_KGSBASE, %ecx - movl WAKEUP_XPCB(KGSBASE), %eax - movl 4 + WAKEUP_XPCB(KGSBASE), %edx + movl PCB_KGSBASE(%rdi), %eax + movl 4 + PCB_KGSBASE(%rdi), %edx wrmsr /* Restore EFER. */ @@ -115,17 +100,21 @@ ENTRY(acpi_restorecpu) movl WAKEUP_CTX(sfmask), %eax wrmsr - /* Restore CR0, CR2 and CR4. */ - movq WAKEUP_XPCB(CR0), %rax + /* Restore CR0 except for FPU mode. */ + movq PCB_CR0(%rdi), %rax + movq %rax, %rcx + andq $~(CR0_EM | CR0_TS), %rax movq %rax, %cr0 - movq WAKEUP_XPCB(CR2), %rax + + /* Restore CR2 and CR4. */ + movq PCB_CR2(%rdi), %rax movq %rax, %cr2 - movq WAKEUP_XPCB(CR4), %rax + movq PCB_CR4(%rdi), %rax movq %rax, %cr4 /* Restore descriptor tables. */ - lidt WAKEUP_XPCB(IDT) - lldt WAKEUP_XPCB(LDT) + lidt PCB_IDT(%rdi) + lldt PCB_LDT(%rdi) #define SDT_SYSTSS 9 #define SDT_SYSBSY 11 @@ -133,37 +122,44 @@ ENTRY(acpi_restorecpu) /* Clear "task busy" bit and reload TR. */ movq PCPU(TSS), %rax andb $(~SDT_SYSBSY | SDT_SYSTSS), 5(%rax) - movw WAKEUP_XPCB(TR), %ax + movw PCB_TR(%rdi), %ax ltr %ax #undef SDT_SYSTSS #undef SDT_SYSBSY /* Restore other callee saved registers. */ - movq WAKEUP_PCB(R15), %r15 - movq WAKEUP_PCB(R14), %r14 - movq WAKEUP_PCB(R13), %r13 - movq WAKEUP_PCB(R12), %r12 - movq WAKEUP_PCB(RBP), %rbp - movq WAKEUP_PCB(RSP), %rsp - movq WAKEUP_PCB(RBX), %rbx + movq PCB_R15(%rdi), %r15 + movq PCB_R14(%rdi), %r14 + movq PCB_R13(%rdi), %r13 + movq PCB_R12(%rdi), %r12 + movq PCB_RBP(%rdi), %rbp + movq PCB_RSP(%rdi), %rsp + movq PCB_RBX(%rdi), %rbx /* Restore debug registers. */ - movq WAKEUP_PCB(DR0), %rax + movq PCB_DR0(%rdi), %rax movq %rax, %dr0 - movq WAKEUP_PCB(DR1), %rax + movq PCB_DR1(%rdi), %rax movq %rax, %dr1 - movq WAKEUP_PCB(DR2), %rax + movq PCB_DR2(%rdi), %rax movq %rax, %dr2 - movq WAKEUP_PCB(DR3), %rax + movq PCB_DR3(%rdi), %rax movq %rax, %dr3 - movq WAKEUP_PCB(DR6), %rax + movq PCB_DR6(%rdi), %rax movq %rax, %dr6 - movq WAKEUP_PCB(DR7), %rax + movq PCB_DR7(%rdi), %rax movq %rax, %dr7 + /* Restore FPU state. */ + fninit + fxrstor PCB_USERFPU(%rdi) + + /* Reload CR0. */ + movq %rcx, %cr0 + /* Restore return address. */ - movq WAKEUP_PCB(RIP), %rax + movq PCB_RIP(%rdi), %rax movq %rax, (%rsp) /* Indicate the CPU is resumed. */ @@ -172,19 +168,3 @@ ENTRY(acpi_restorecpu) ret END(acpi_restorecpu) - -ENTRY(acpi_savecpu) - /* Fetch XPCB and save CPU context. */ - movq %rdi, %r10 - call savectx2 - movq %r10, %r11 - - /* Patch caller's return address and stack pointer. */ - movq (%rsp), %rax - movq %rax, WAKEUP_PCB(RIP) - movq %rsp, %rax - movq %rax, WAKEUP_PCB(RSP) - - movl $1, %eax - ret -END(acpi_savecpu) Modified: stable/8/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakecode.S Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_wakecode.S Fri Nov 19 09:49:14 2010 (r215513) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,18 +52,17 @@ .data /* So we can modify it */ ALIGN_TEXT -wakeup_start: .code16 +wakeup_start: /* * Set up segment registers for real mode, a small stack for * any calls we make, and clear any flags. */ cli /* make sure no interrupts */ - cld mov %cs, %ax /* copy %cs to %ds. Remember these */ mov %ax, %ds /* are offsets rather than selectors */ mov %ax, %ss - movw $PAGE_SIZE - 8, %sp + movw $PAGE_SIZE, %sp xorw %ax, %ax pushw %ax popfw @@ -127,6 +126,7 @@ wakeup_sw32: /* * At this point, we are running in 32 bit legacy protected mode. */ + ALIGN_TEXT .code32 wakeup_32: @@ -205,8 +205,8 @@ wakeup_64: mov %ax, %ds /* Restore arguments and return. */ - movq wakeup_ctx - wakeup_start(%rbx), %rdi - movq wakeup_kpml4 - wakeup_start(%rbx), %rsi + movq wakeup_kpml4 - wakeup_start(%rbx), %rdi + movq wakeup_ctx - wakeup_start(%rbx), %rsi movq wakeup_retaddr - wakeup_start(%rbx), %rax jmp *%rax @@ -260,7 +260,7 @@ wakeup_kpml4: wakeup_ctx: .quad 0 -wakeup_xpcb: +wakeup_pcb: .quad 0 wakeup_gdt: .word 0 Modified: stable/8/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakeup.c Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_wakeup.c Fri Nov 19 09:49:14 2010 (r215513) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,11 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include #include #include -#include #include #include @@ -47,11 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef SMP #include #include +#include #endif #include @@ -64,23 +62,18 @@ __FBSDID("$FreeBSD$"); /* Make sure the code is less than a page and leave room for the stack. */ CTASSERT(sizeof(wakecode) < PAGE_SIZE - 1024); -#ifndef _SYS_CDEFS_H_ -#error this file needs sys/cdefs.h as a prerequisite -#endif - extern int acpi_resume_beep; extern int acpi_reset_video; #ifdef SMP -extern struct xpcb *stopxpcbs; +extern struct pcb **susppcbs; #else -static struct xpcb *stopxpcbs; +static struct pcb **susppcbs; #endif -int acpi_restorecpu(struct xpcb *, vm_offset_t); -int acpi_savecpu(struct xpcb *); +int acpi_restorecpu(struct pcb *, vm_offset_t); -static void acpi_alloc_wakeup_handler(void); +static void *acpi_alloc_wakeup_handler(void); static void acpi_stop_beep(void *); #ifdef SMP @@ -111,10 +104,10 @@ acpi_wakeup_ap(struct acpi_softc *sc, in int apic_id = cpu_apic_ids[cpu]; int ms; - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, &stopxpcbs[cpu]); - WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu].xpcb_gdt.rd_limit); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]); + WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[cpu].xpcb_gdt.rd_base); + susppcbs[cpu]->pcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, cpu); /* do an INIT IPI: assert RESET */ @@ -222,7 +215,6 @@ acpi_wakeup_cpus(struct acpi_softc *sc, int acpi_sleep_machdep(struct acpi_softc *sc, int state) { - struct savefpu *stopfpu; #ifdef SMP cpumask_t wakeup_cpus; #endif @@ -252,10 +244,7 @@ acpi_sleep_machdep(struct acpi_softc *sc cr3 = rcr3(); load_cr3(KPML4phys); - stopfpu = &stopxpcbs[0].xpcb_pcb.pcb_save; - if (acpi_savecpu(&stopxpcbs[0])) { - fpugetregs(curthread, stopfpu); - + if (savectx(susppcbs[0])) { #ifdef SMP if (wakeup_cpus != 0 && suspend_cpus(wakeup_cpus) == 0) { device_printf(sc->acpi_dev, @@ -268,11 +257,11 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, &stopxpcbs[0]); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); WAKECODE_FIXUP(wakeup_gdt, uint16_t, - stopxpcbs[0].xpcb_gdt.rd_limit); + susppcbs[0]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[0].xpcb_gdt.rd_base); + susppcbs[0]->pcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, 0); /* Call ACPICA to enter the desired sleep state */ @@ -291,7 +280,6 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ia32_pause(); } else { - fpusetregs(curthread, stopfpu); #ifdef SMP if (wakeup_cpus != 0) acpi_wakeup_cpus(sc, wakeup_cpus); @@ -324,49 +312,48 @@ out: return (ret); } -static vm_offset_t acpi_wakeaddr; - -static void +static void * acpi_alloc_wakeup_handler(void) { void *wakeaddr; - - if (!cold) - return; + int i; /* * Specify the region for our wakeup code. We want it in the low 1 MB - * region, excluding video memory and above (0xa0000). We ask for - * it to be page-aligned, just to be safe. + * region, excluding real mode IVT (0-0x3ff), BDA (0x400-0x4ff), EBDA + * (less than 128KB, below 0xa0000, must be excluded by SMAP and DSDT), + * and ROM area (0xa0000 and above). The temporary page tables must be + * page-aligned. */ - wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0, 0x9ffff, - PAGE_SIZE, 0ul); + wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0x500, + 0xa0000, PAGE_SIZE, 0ul); if (wakeaddr == NULL) { printf("%s: can't alloc wake memory\n", __func__); - return; - } - stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_NOWAIT); - if (stopxpcbs == NULL) { - contigfree(wakeaddr, 4 * PAGE_SIZE, M_DEVBUF); - printf("%s: can't alloc CPU state memory\n", __func__); - return; + return (NULL); } - acpi_wakeaddr = (vm_offset_t)wakeaddr; -} + susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); + for (i = 0; i < mp_ncpus; i++) + susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK); -SYSINIT(acpiwakeup, SI_SUB_KMEM, SI_ORDER_ANY, acpi_alloc_wakeup_handler, 0); + return (wakeaddr); +} void acpi_install_wakeup_handler(struct acpi_softc *sc) { + static void *wakeaddr = NULL; uint64_t *pt4, *pt3, *pt2; int i; - if (acpi_wakeaddr == 0ul) + if (wakeaddr != NULL) + return; + + wakeaddr = acpi_alloc_wakeup_handler(); + if (wakeaddr == NULL) return; - sc->acpi_wakeaddr = acpi_wakeaddr; - sc->acpi_wakephys = vtophys(acpi_wakeaddr); + sc->acpi_wakeaddr = (vm_offset_t)wakeaddr; + sc->acpi_wakephys = vtophys(wakeaddr); bcopy(wakecode, (void *)WAKECODE_VADDR(sc), sizeof(wakecode)); @@ -392,7 +379,7 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_sfmask, uint64_t, rdmsr(MSR_SF_MASK)); /* Build temporary page tables below realmode code. */ - pt4 = (uint64_t *)acpi_wakeaddr; + pt4 = wakeaddr; pt3 = pt4 + (PAGE_SIZE) / sizeof(uint64_t); pt2 = pt3 + (PAGE_SIZE) / sizeof(uint64_t); Modified: stable/8/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/8/sys/amd64/amd64/cpu_switch.S Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/amd64/cpu_switch.S Fri Nov 19 09:49:14 2010 (r215513) @@ -113,7 +113,7 @@ done_store_dr: /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f - addq $PCB_SAVEFPU,%r8 + movq PCB_SAVEFPU(%r8),%r8 clts fxsave (%r8) smsw %ax @@ -302,121 +302,62 @@ END(cpu_switch) * Update pcb, saving current processor state. */ ENTRY(savectx) - /* Fetch PCB. */ - movq %rdi,%rcx - - /* Save caller's return address. */ - movq (%rsp),%rax - movq %rax,PCB_RIP(%rcx) - - movq %cr3,%rax - movq %rax,PCB_CR3(%rcx) - - movq %rbx,PCB_RBX(%rcx) - movq %rsp,PCB_RSP(%rcx) - movq %rbp,PCB_RBP(%rcx) - movq %r12,PCB_R12(%rcx) - movq %r13,PCB_R13(%rcx) - movq %r14,PCB_R14(%rcx) - movq %r15,PCB_R15(%rcx) - - /* - * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the - * state had better already be in the pcb. This is true for forks - * but not for dumps (the old book-keeping with FP flags in the pcb - * always lost for dumps because the dump pcb has 0 flags). - * - * If fpcurthread != NULL, then we have to save the fpu h/w state to - * fpcurthread's pcb and copy it to the requested pcb, or save to the - * requested pcb and reload. Copying is easier because we would - * have to handle h/w bugs for reloading. We used to lose the - * parent's fpu state for forks by forgetting to reload. - */ - pushfq - cli - movq PCPU(FPCURTHREAD),%rax - testq %rax,%rax - je 1f - - movq TD_PCB(%rax),%rdi - leaq PCB_SAVEFPU(%rdi),%rdi - clts - fxsave (%rdi) - smsw %ax - orb $CR0_TS,%al - lmsw %ax - - movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */ - leaq PCB_SAVEFPU(%rcx),%rsi /* arg 2 */ - /* arg 1 (%rdi) already loaded */ - call bcopy -1: - popfq - - ret -END(savectx) - -/* - * savectx2(xpcb) - * Update xpcb, saving current processor state. - */ -ENTRY(savectx2) - /* Fetch XPCB. */ - movq %rdi,%r8 - /* Save caller's return address. */ movq (%rsp),%rax - movq %rax,PCB_RIP(%r8) + movq %rax,PCB_RIP(%rdi) - movq %rbx,PCB_RBX(%r8) - movq %rsp,PCB_RSP(%r8) - movq %rbp,PCB_RBP(%r8) - movq %r12,PCB_R12(%r8) - movq %r13,PCB_R13(%r8) - movq %r14,PCB_R14(%r8) - movq %r15,PCB_R15(%r8) + movq %rbx,PCB_RBX(%rdi) + movq %rsp,PCB_RSP(%rdi) + movq %rbp,PCB_RBP(%rdi) + movq %r12,PCB_R12(%rdi) + movq %r13,PCB_R13(%rdi) + movq %r14,PCB_R14(%rdi) + movq %r15,PCB_R15(%rdi) - movq %cr0,%rax - movq %rax,XPCB_CR0(%r8) + movq %cr0,%rsi + movq %rsi,PCB_CR0(%rdi) movq %cr2,%rax - movq %rax,XPCB_CR2(%r8) + movq %rax,PCB_CR2(%rdi) + movq %cr3,%rax + movq %rax,PCB_CR3(%rdi) movq %cr4,%rax - movq %rax,XPCB_CR4(%r8) + movq %rax,PCB_CR4(%rdi) movq %dr0,%rax - movq %rax,PCB_DR0(%r8) + movq %rax,PCB_DR0(%rdi) movq %dr1,%rax - movq %rax,PCB_DR1(%r8) + movq %rax,PCB_DR1(%rdi) movq %dr2,%rax - movq %rax,PCB_DR2(%r8) + movq %rax,PCB_DR2(%rdi) movq %dr3,%rax - movq %rax,PCB_DR3(%r8) + movq %rax,PCB_DR3(%rdi) movq %dr6,%rax - movq %rax,PCB_DR6(%r8) + movq %rax,PCB_DR6(%rdi) movq %dr7,%rax - movq %rax,PCB_DR7(%r8) - - sgdt XPCB_GDT(%r8) - sidt XPCB_IDT(%r8) - sldt XPCB_LDT(%r8) - str XPCB_TR(%r8) + movq %rax,PCB_DR7(%rdi) movl $MSR_FSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_FSBASE(%r8) + movl %eax,PCB_FSBASE(%rdi) + movl %edx,PCB_FSBASE+4(%rdi) movl $MSR_GSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_GSBASE(%r8) + movl %eax,PCB_GSBASE(%rdi) + movl %edx,PCB_GSBASE+4(%rdi) movl $MSR_KGSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,XPCB_KGSBASE(%r8) + movl %eax,PCB_KGSBASE(%rdi) + movl %edx,PCB_KGSBASE+4(%rdi) + + sgdt PCB_GDT(%rdi) + sidt PCB_IDT(%rdi) + sldt PCB_LDT(%rdi) + str PCB_TR(%rdi) - movl $1, %eax + clts + fxsave PCB_USERFPU(%rdi) + movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */ + + movl $1,%eax ret -END(savectx2) +END(savectx) Modified: stable/8/sys/amd64/amd64/fpu.c ============================================================================== --- stable/8/sys/amd64/amd64/fpu.c Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/amd64/fpu.c Fri Nov 19 09:49:14 2010 (r215513) @@ -65,34 +65,36 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) -#define fnclex() __asm("fnclex") -#define fninit() __asm("fninit") +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) +#define fnclex() __asm __volatile("fnclex") +#define fninit() __asm __volatile("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) -#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr))) -#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr))) +#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) +#define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) -#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) -#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm("clts") +#define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) +#define start_emulating() __asm __volatile( \ + "smsw %%ax; orb %0,%%al; lmsw %%ax" \ + : : "n" (CR0_TS) : "ax") +#define stop_emulating() __asm __volatile("clts") #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnstcw(caddr_t addr); void fnstsw(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); +void ldmxcsr(u_int csr); void start_emulating(void); void stop_emulating(void); #endif /* __GNUCLIKE_ASM && !lint */ -#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save.sv_env.en_cw) -#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save.sv_env.en_sw) +#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_cw) +#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_sw) typedef u_char bool_t; @@ -111,15 +113,18 @@ static struct savefpu fpu_initialstate; void fpuinit(void) { - register_t savecrit; + register_t saveintr; u_int mxcsr; u_short control; - savecrit = intr_disable(); + /* + * It is too early for critical_enter() to work on AP. + */ + saveintr = intr_disable(); stop_emulating(); fninit(); control = __INITIAL_FPUCW__; - fldcw(&control); + fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); if (PCPU_GET(cpuid) == 0) { @@ -132,7 +137,7 @@ fpuinit(void) bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm)); } start_emulating(); - intr_restore(savecrit); + intr_restore(saveintr); } /* @@ -141,16 +146,15 @@ fpuinit(void) void fpuexit(struct thread *td) { - register_t savecrit; - savecrit = intr_disable(); + critical_enter(); if (curthread == PCPU_GET(fpcurthread)) { stop_emulating(); - fxsave(&PCPU_GET(curpcb)->pcb_save); + fxsave(PCPU_GET(curpcb)->pcb_save); start_emulating(); PCPU_SET(fpcurthread, 0); } - intr_restore(savecrit); + critical_exit(); } int @@ -351,10 +355,9 @@ static char fpetable[128] = { int fputrap() { - register_t savecrit; u_short control, status; - savecrit = intr_disable(); + critical_enter(); /* * Interrupt handling (for another interrupt) may have pushed the @@ -371,7 +374,7 @@ fputrap() if (PCPU_GET(fpcurthread) == curthread) fnclex(); - intr_restore(savecrit); + critical_exit(); return (fpetable[status & ((~control & 0x3f) | 0x40)]); } @@ -389,12 +392,13 @@ void fpudna(void) { struct pcb *pcb; - register_t s; + critical_enter(); if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", ++err_count); stop_emulating(); + critical_exit(); return; } if (PCPU_GET(fpcurthread) != NULL) { @@ -404,7 +408,6 @@ fpudna(void) curthread, curthread->td_proc->p_pid); panic("fpudna"); } - s = intr_disable(); stop_emulating(); /* * Record new context early in case frstor causes a trap. @@ -422,23 +425,23 @@ fpudna(void) */ fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(&pcb->pcb_initial_fpucw); + fldcw(pcb->pcb_initial_fpucw); pcb->pcb_flags |= PCB_FPUINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_USERFPUINITDONE; } else - fxrstor(&pcb->pcb_save); - intr_restore(s); + fxrstor(pcb->pcb_save); + critical_exit(); } -/* - * This should be called with interrupts disabled and only when the owning - * FPU thread is non-null. - */ void fpudrop() { struct thread *td; td = PCPU_GET(fpcurthread); + KASSERT(td == curthread, ("fpudrop: fpcurthread != curthread")); + CRITICAL_ASSERT(td); PCPU_SET(fpcurthread, NULL); td->td_pcb->pcb_flags &= ~PCB_FPUINITDONE; start_emulating(); @@ -449,23 +452,47 @@ fpudrop() * It returns the FPU ownership status. */ int +fpugetuserregs(struct thread *td, struct savefpu *addr) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { + bcopy(&fpu_initialstate, addr, sizeof(fpu_initialstate)); + addr->sv_env.en_cw = pcb->pcb_initial_fpucw; + return (_MC_FPOWNED_NONE); + } + critical_enter(); + if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { + fxsave(addr); + critical_exit(); + return (_MC_FPOWNED_FPU); + } else { + critical_exit(); + bcopy(&pcb->pcb_user_save, addr, sizeof(*addr)); + return (_MC_FPOWNED_PCB); + } +} + +int fpugetregs(struct thread *td, struct savefpu *addr) { - register_t s; + struct pcb *pcb; - if ((td->td_pcb->pcb_flags & PCB_FPUINITDONE) == 0) { + pcb = td->td_pcb; + if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { bcopy(&fpu_initialstate, addr, sizeof(fpu_initialstate)); - addr->sv_env.en_cw = td->td_pcb->pcb_initial_fpucw; + addr->sv_env.en_cw = pcb->pcb_initial_fpucw; return (_MC_FPOWNED_NONE); } - s = intr_disable(); + critical_enter(); if (td == PCPU_GET(fpcurthread)) { fxsave(addr); - intr_restore(s); + critical_exit(); return (_MC_FPOWNED_FPU); } else { - intr_restore(s); - bcopy(&td->td_pcb->pcb_save, addr, sizeof(*addr)); + critical_exit(); + bcopy(pcb->pcb_save, addr, sizeof(*addr)); return (_MC_FPOWNED_PCB); } } @@ -474,19 +501,42 @@ fpugetregs(struct thread *td, struct sav * Set the state of the FPU. */ void +fpusetuserregs(struct thread *td, struct savefpu *addr) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + critical_enter(); + if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { + fxrstor(addr); + critical_exit(); + pcb->pcb_flags |= PCB_FPUINITDONE | PCB_USERFPUINITDONE; + } else { + critical_exit(); + bcopy(addr, &td->td_pcb->pcb_user_save, sizeof(*addr)); + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_FPUINITDONE; + pcb->pcb_flags |= PCB_USERFPUINITDONE; + } +} + +void fpusetregs(struct thread *td, struct savefpu *addr) { - register_t s; + struct pcb *pcb; - s = intr_disable(); + pcb = td->td_pcb; + critical_enter(); if (td == PCPU_GET(fpcurthread)) { fxrstor(addr); - intr_restore(s); + critical_exit(); } else { - intr_restore(s); - bcopy(addr, &td->td_pcb->pcb_save, sizeof(*addr)); + critical_exit(); + bcopy(addr, td->td_pcb->pcb_save, sizeof(*addr)); } - curthread->td_pcb->pcb_flags |= PCB_FPUINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_USERFPUINITDONE; + pcb->pcb_flags |= PCB_FPUINITDONE; } /* @@ -575,3 +625,73 @@ static devclass_t fpupnp_devclass; DRIVER_MODULE(fpupnp, acpi, fpupnp_driver, fpupnp_devclass, 0, 0); #endif /* DEV_ISA */ + +int +fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == &pcb->pcb_user_save, + ("mangled pcb_save")); + ctx->flags = 0; + if ((pcb->pcb_flags & PCB_FPUINITDONE) != 0) + ctx->flags |= FPU_KERN_CTX_FPUINITDONE; + fpuexit(td); + ctx->prev = pcb->pcb_save; + pcb->pcb_save = &ctx->hwstate; + pcb->pcb_flags |= PCB_KERNFPU; + pcb->pcb_flags &= ~PCB_FPUINITDONE; + return (0); +} + +int +fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + critical_enter(); + if (curthread == PCPU_GET(fpcurthread)) + fpudrop(); + critical_exit(); + pcb->pcb_save = ctx->prev; + if (pcb->pcb_save == &pcb->pcb_user_save) { + if ((pcb->pcb_flags & PCB_USERFPUINITDONE) != 0) + pcb->pcb_flags |= PCB_FPUINITDONE; + else + pcb->pcb_flags &= ~PCB_FPUINITDONE; + pcb->pcb_flags &= ~PCB_KERNFPU; + } else { + if ((ctx->flags & FPU_KERN_CTX_FPUINITDONE) != 0) + pcb->pcb_flags |= PCB_FPUINITDONE; + else + pcb->pcb_flags &= ~PCB_FPUINITDONE; + KASSERT(!PCB_USER_FPU(pcb), ("unpaired fpu_kern_leave")); + } + return (0); +} + +int +fpu_kern_thread(u_int flags) +{ + struct pcb *pcb; + + pcb = PCPU_GET(curpcb); + KASSERT((curthread->td_pflags & TDP_KTHREAD) != 0, + ("Only kthread may use fpu_kern_thread")); + KASSERT(pcb->pcb_save == &pcb->pcb_user_save, ("mangled pcb_save")); + KASSERT(PCB_USER_FPU(pcb), ("recursive call")); + + pcb->pcb_flags |= PCB_KERNFPU; + return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 10:01:30 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6981C1065695; Fri, 19 Nov 2010 10:01:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57DC48FC24; Fri, 19 Nov 2010 10:01:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJA1ULZ067908; Fri, 19 Nov 2010 10:01:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJA1ULB067906; Fri, 19 Nov 2010 10:01:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191001.oAJA1ULB067906@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 10:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215516 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:01:30 -0000 Author: avg Date: Fri Nov 19 10:01:30 2010 New Revision: 215516 URL: http://svn.freebsd.org/changeset/base/215516 Log: MFC r215397: fix misspelling in a comment Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Nov 19 09:59:55 2010 (r215515) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Nov 19 10:01:30 2010 (r215516) @@ -1555,7 +1555,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla int err; /* - * zfs_zget() can't operate on virtual entires like .zfs/ or + * zfs_zget() can't operate on virtual entries like .zfs/ or * .zfs/snapshot/ directories, that's why we return EOPNOTSUPP. * This will make NFS to switch to LOOKUP instead of using VGET. */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 10:14:08 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38D5E106564A; Fri, 19 Nov 2010 10:14:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26E728FC1D; Fri, 19 Nov 2010 10:14:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJAE82V068692; Fri, 19 Nov 2010 10:14:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJAE7jD068688; Fri, 19 Nov 2010 10:14:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011191014.oAJAE7jD068688@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 10:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215517 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:14:08 -0000 Author: kib Date: Fri Nov 19 10:14:07 2010 New Revision: 215517 URL: http://svn.freebsd.org/changeset/base/215517 Log: MFC r209686,r209702: Reimplement vm_object_page_clean(), using the fact that vm object memq is ordered by page index. Reviewed by: alc Modified: stable/8/sys/vm/vm_object.c stable/8/sys/vm/vm_page.h stable/8/sys/vm/vm_pager.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Fri Nov 19 10:01:30 2010 (r215516) +++ stable/8/sys/vm/vm_object.c Fri Nov 19 10:14:07 2010 (r215517) @@ -96,24 +96,17 @@ __FBSDID("$FreeBSD$"); #include #include -#define EASY_SCAN_FACTOR 8 - -#define MSYNC_FLUSH_HARDSEQ 0x01 -#define MSYNC_FLUSH_SOFTSEQ 0x02 - -/* - * msync / VM object flushing optimizations - */ -static int msync_flush_flags = MSYNC_FLUSH_HARDSEQ | MSYNC_FLUSH_SOFTSEQ; +static int msync_flush_flags = 0; SYSCTL_INT(_vm, OID_AUTO, msync_flush_flags, CTLFLAG_RW, &msync_flush_flags, 0, - "Enable sequential iteration optimization"); + "Does nothing; kept for backward compatibility"); static int old_msync; SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0, "Use old (insecure) msync behavior"); +static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, + int pagerflags); static void vm_object_qcollapse(vm_object_t object); -static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags); static void vm_object_vndeallocate(vm_object_t object); /* @@ -763,278 +756,165 @@ vm_object_terminate(vm_object_t object) * The object must be locked. */ void -vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int flags) +vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, + int flags) { - vm_page_t p, np; - vm_pindex_t tstart, tend; - vm_pindex_t pi; - int clearobjflags; - int pagerflags; - int curgeneration; + vm_page_t np, p; + vm_pindex_t pi, tend; + int clearobjflags, curgeneration, n, pagerflags; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if ((object->flags & OBJ_MIGHTBEDIRTY) == 0) - return; KASSERT(object->type == OBJT_VNODE, ("Not a vnode object")); + if ((object->flags & OBJ_MIGHTBEDIRTY) == 0 || + object->resident_page_count == 0) + return; - pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) ? VM_PAGER_PUT_SYNC : VM_PAGER_CLUSTER_OK; - pagerflags |= (flags & OBJPC_INVAL) ? VM_PAGER_PUT_INVAL : 0; + pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) != 0 ? + VM_PAGER_PUT_SYNC : VM_PAGER_CLUSTER_OK; + pagerflags |= (flags & OBJPC_INVAL) != 0 ? VM_PAGER_PUT_INVAL : 0; - vm_object_set_flag(object, OBJ_CLEANING); + tend = (end == 0) ? object->size : end; - tstart = start; - if (end == 0) { - tend = object->size; - } else { - tend = end; - } + vm_object_set_flag(object, OBJ_CLEANING); vm_page_lock_queues(); - /* - * If the caller is smart and only msync()s a range he knows is - * dirty, we may be able to avoid an object scan. This results in - * a phenominal improvement in performance. We cannot do this - * as a matter of course because the object may be huge - e.g. - * the size might be in the gigabytes or terrabytes. - */ - if (msync_flush_flags & MSYNC_FLUSH_HARDSEQ) { - vm_pindex_t tscan; - int scanlimit; - int scanreset; - - scanreset = object->resident_page_count / EASY_SCAN_FACTOR; - if (scanreset < 16) - scanreset = 16; - pagerflags |= VM_PAGER_IGNORE_CLEANCHK; - - scanlimit = scanreset; - tscan = tstart; - while (tscan < tend) { - curgeneration = object->generation; - p = vm_page_lookup(object, tscan); - if (p == NULL || p->valid == 0) { - if (--scanlimit == 0) - break; - ++tscan; - continue; - } - vm_page_test_dirty(p); - if (p->dirty == 0) { - if (--scanlimit == 0) - break; - ++tscan; - continue; - } - /* - * If we have been asked to skip nosync pages and - * this is a nosync page, we can't continue. - */ - if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) { - if (--scanlimit == 0) - break; - ++tscan; - continue; - } - scanlimit = scanreset; - - /* - * This returns 0 if it was unable to busy the first - * page (i.e. had to sleep). - */ - tscan += vm_object_page_collect_flush(object, p, curgeneration, pagerflags); - } - - /* - * If everything was dirty and we flushed it successfully, - * and the requested range is not the entire object, we - * don't have to mess with CLEANCHK or MIGHTBEDIRTY and can - * return immediately. - */ - if (tscan >= tend && (tstart || tend < object->size)) { - vm_page_unlock_queues(); - vm_object_clear_flag(object, OBJ_CLEANING); - return; - } - pagerflags &= ~VM_PAGER_IGNORE_CLEANCHK; - } /* - * Generally set CLEANCHK interlock and make the page read-only so - * we can then clear the object flags. + * Make the page read-only so we can then clear the object flags. * * However, if this is a nosync mmap then the object is likely to * stay dirty so do not mess with the page and do not clear the * object flags. */ clearobjflags = 1; - TAILQ_FOREACH(p, &object->memq, listq) { - p->oflags |= VPO_CLEANCHK; - if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) + for (p = vm_page_find_least(object, start); + p != NULL && p->pindex < tend; p = TAILQ_NEXT(p, listq)) { + if ((flags & OBJPC_NOSYNC) != 0 && + (p->oflags & VPO_NOSYNC) != 0) clearobjflags = 0; else pmap_remove_write(p); } - if (clearobjflags && (tstart == 0) && (tend == object->size)) + if (clearobjflags && (start == 0) && (tend == object->size)) vm_object_clear_flag(object, OBJ_MIGHTBEDIRTY); rescan: curgeneration = object->generation; - for (p = TAILQ_FIRST(&object->memq); p; p = np) { - int n; - - np = TAILQ_NEXT(p, listq); - -again: + for (p = vm_page_find_least(object, start); p != NULL; p = np) { pi = p->pindex; - if ((p->oflags & VPO_CLEANCHK) == 0 || - (pi < tstart) || (pi >= tend) || - p->valid == 0) { - p->oflags &= ~VPO_CLEANCHK; + if (pi >= tend) + break; + np = TAILQ_NEXT(p, listq); + if (p->valid == 0) continue; + while (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) { + vm_page_lock_queues(); + if (object->generation != curgeneration) + goto rescan; } - vm_page_test_dirty(p); - if (p->dirty == 0) { - p->oflags &= ~VPO_CLEANCHK; + if (p->dirty == 0) continue; - } /* * If we have been asked to skip nosync pages and this is a * nosync page, skip it. Note that the object flags were * not cleared in this case so we do not have to set them. */ - if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) { - p->oflags &= ~VPO_CLEANCHK; + if ((flags & OBJPC_NOSYNC) != 0 && + (p->oflags & VPO_NOSYNC) != 0) continue; - } - - n = vm_object_page_collect_flush(object, p, - curgeneration, pagerflags); - if (n == 0) - goto rescan; + n = vm_object_page_collect_flush(object, p, pagerflags); + KASSERT(n > 0, ("vm_object_page_collect_flush failed")); if (object->generation != curgeneration) goto rescan; - - /* - * Try to optimize the next page. If we can't we pick up - * our (random) scan where we left off. - */ - if (msync_flush_flags & MSYNC_FLUSH_SOFTSEQ) { - if ((p = vm_page_lookup(object, pi + n)) != NULL) - goto again; - } + np = vm_page_find_least(object, pi + n); } vm_page_unlock_queues(); #if 0 - VOP_FSYNC(vp, (pagerflags & VM_PAGER_PUT_SYNC)?MNT_WAIT:0, curproc); + VOP_FSYNC(vp, (pagerflags & VM_PAGER_PUT_SYNC) ? MNT_WAIT : 0); #endif vm_object_clear_flag(object, OBJ_CLEANING); - return; } static int -vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags) +vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags) { int runlen; int maxf; int chkb; int maxb; - int i; + int i, index; vm_pindex_t pi; vm_page_t maf[vm_pageout_page_count]; vm_page_t mab[vm_pageout_page_count]; vm_page_t ma[vm_pageout_page_count]; + vm_page_t tp, p1; mtx_assert(&vm_page_queue_mtx, MA_OWNED); pi = p->pindex; - while (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) { - vm_page_lock_queues(); - if (object->generation != curgeneration) { - return(0); - } - } maxf = 0; - for(i = 1; i < vm_pageout_page_count; i++) { - vm_page_t tp; - - if ((tp = vm_page_lookup(object, pi + i)) != NULL) { - if ((tp->oflags & VPO_BUSY) || - ((pagerflags & VM_PAGER_IGNORE_CLEANCHK) == 0 && - (tp->oflags & VPO_CLEANCHK) == 0) || - (tp->busy != 0)) - break; - vm_page_test_dirty(tp); - if (tp->dirty == 0) { - tp->oflags &= ~VPO_CLEANCHK; - break; - } - maf[ i - 1 ] = tp; - maxf++; - continue; - } - break; + for (i = 1, p1 = p; i < vm_pageout_page_count; i++) { + tp = vm_page_next(p1); + if (tp == NULL || tp->busy != 0 || (tp->oflags & VPO_BUSY) != 0) + break; + vm_page_test_dirty(tp); + if (tp->dirty == 0) + break; + maf[i - 1] = p1 = tp; + maxf++; } maxb = 0; chkb = vm_pageout_page_count - maxf; - if (chkb) { - for(i = 1; i < chkb;i++) { - vm_page_t tp; - - if ((tp = vm_page_lookup(object, pi - i)) != NULL) { - if ((tp->oflags & VPO_BUSY) || - ((pagerflags & VM_PAGER_IGNORE_CLEANCHK) == 0 && - (tp->oflags & VPO_CLEANCHK) == 0) || - (tp->busy != 0)) - break; - vm_page_test_dirty(tp); - if (tp->dirty == 0) { - tp->oflags &= ~VPO_CLEANCHK; - break; - } - mab[ i - 1 ] = tp; - maxb++; - continue; - } + for (i = 1, p1 = p; i < chkb; i++) { + tp = vm_page_prev(p1); + if (tp == NULL || tp->busy != 0 || (tp->oflags & VPO_BUSY) != 0) break; - } + vm_page_test_dirty(tp); + if (tp->dirty == 0) + break; + mab[i - 1] = p1 = tp; + maxb++; } - for(i = 0; i < maxb; i++) { - int index = (maxb - i) - 1; + for (i = 0; i < maxb; i++) { + index = (maxb - i) - 1; ma[index] = mab[i]; - ma[index]->oflags &= ~VPO_CLEANCHK; } - p->oflags &= ~VPO_CLEANCHK; ma[maxb] = p; - for(i = 0; i < maxf; i++) { - int index = (maxb + i) + 1; + for (i = 0; i < maxf; i++) { + index = (maxb + i) + 1; ma[index] = maf[i]; - ma[index]->oflags &= ~VPO_CLEANCHK; } runlen = maxb + maxf + 1; vm_pageout_flush(ma, runlen, pagerflags); for (i = 0; i < runlen; i++) { - if (ma[i]->dirty) { - pmap_remove_write(ma[i]); - ma[i]->oflags |= VPO_CLEANCHK; - + if (ma[i]->dirty != 0) { + KASSERT((ma[i]->flags & PG_WRITEABLE) == 0, + ("vm_object_page_collect_flush: page %p is not write protected", + ma[i])); + } + } + for (i = 0; i < maxf; i++) { + if (ma[i + maxb + 1]->dirty != 0) { /* * maxf will end up being the actual number of pages * we wrote out contiguously, non-inclusive of the * first page. We do not count look-behind pages. */ - if (i >= maxb + 1 && (maxf > i - maxb - 1)) - maxf = i - maxb - 1; + if (maxf > i) { + maxf = i; + break; + } } } - return(maxf + 1); + return (maxf + 1); } /* Modified: stable/8/sys/vm/vm_page.h ============================================================================== --- stable/8/sys/vm/vm_page.h Fri Nov 19 10:01:30 2010 (r215516) +++ stable/8/sys/vm/vm_page.h Fri Nov 19 10:14:07 2010 (r215517) @@ -142,7 +142,6 @@ struct vm_page { */ #define VPO_BUSY 0x0001 /* page is in transit */ #define VPO_WANTED 0x0002 /* someone is waiting for page */ -#define VPO_CLEANCHK 0x0100 /* page will be checked for cleaning */ #define VPO_SWAPINPROG 0x0200 /* swap I/O in progress on page */ #define VPO_NOSYNC 0x0400 /* do not collect for syncer */ Modified: stable/8/sys/vm/vm_pager.h ============================================================================== --- stable/8/sys/vm/vm_pager.h Fri Nov 19 10:01:30 2010 (r215516) +++ stable/8/sys/vm/vm_pager.h Fri Nov 19 10:14:07 2010 (r215517) @@ -90,7 +90,6 @@ extern struct pagerops sgpagerops; #define VM_PAGER_PUT_SYNC 0x0001 #define VM_PAGER_PUT_INVAL 0x0002 -#define VM_PAGER_IGNORE_CLEANCHK 0x0004 #define VM_PAGER_CLUSTER_OK 0x0008 #ifdef _KERNEL From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 14:26:46 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796411065672; Fri, 19 Nov 2010 14:26:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 638B58FC17; Fri, 19 Nov 2010 14:26:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJEQkCJ076790; Fri, 19 Nov 2010 14:26:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJEQk0I076779; Fri, 19 Nov 2010 14:26:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191426.oAJEQk0I076779@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 14:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215521 - in stable/8: share/man/man4 sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpic... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 14:26:46 -0000 Author: avg Date: Fri Nov 19 14:26:45 2010 New Revision: 215521 URL: http://svn.freebsd.org/changeset/base/215521 Log: MFC imports of ACPICA revisions 20100428 through 20101013 Plus related changes and ehancements. Full list of revisions: o----------------------------------------------------------------------- r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines Merge ACPICA 20100428. o----------------------------------------------------------------------- r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines Simplify a function for getting brightness levels. o----------------------------------------------------------------------- r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines Merge ACPICA 20100702. o----------------------------------------------------------------------- r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines Fix mis-merges in the previous commit. o----------------------------------------------------------------------- r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines If there is any pending sleep request, disallow entering S5 state. Otherwise, bad things may happen. ;-) o----------------------------------------------------------------------- r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines Merge ACPICA 20100806. o----------------------------------------------------------------------- r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines When ACPI reports current battery consumption rate in mAmps, print it also in mWatts. Values in mAmps are not always suitable, because they depend on battery voltage, which depends on battery type and charge level. o----------------------------------------------------------------------- r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines Merge ACPICA 20100915. o----------------------------------------------------------------------- r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines Mark acpi_bus_number() as __unused. This allows clang to this file without any warnings. o----------------------------------------------------------------------- r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines Remove acpi_bus_number() completely. It had to be removed in r212761. Pointed out by: jhb o----------------------------------------------------------------------- r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines Clean up unused headers. o----------------------------------------------------------------------- r213806 | jkim | 2010-10-14 00:37:02 +0300 (Thu, 14 Oct 2010) | 2 lines Merge ACPICA 20101013. o----------------------------------------------------------------------- r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines Add two new loader tunables 'hw.acpi.install_interface' and 'hw.acpi.remove_interface'. hw.acpi.install_interface lets you install new interfaces. Conversely, hw.acpi.remove_interface lets you remove OS interfaces from the pre-defined list in ACPICA. For example, hw.acpi.install_interface="FreeBSD" lets _OSI("FreeBSD") method to return 0xffffffff (or success) and hw.acpi.remove_interface="Windows 2009" lets _OSI("Windows 2009") method to return zero (or failure). Both are comma-separated lists and leading white spaces are ignored. For example, the following examples are valid: hw.acpi.install_interface="Linux, FreeBSD" hw.acpi.remove_interface="Windows 2006, Windows 2006.1" o----------------------------------------------------------------------- r214401 | jkim | 2010-10-27 00:22:55 +0300 (Wed, 27 Oct 2010) | 3 lines Document newly added loader tunables "hw.acpi.install_interface" and "hw.acpi.remove_interface". o----------------------------------------------------------------------- r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type in ACPICA. Reshuffle the code a bit to make sure this kludge only applies to these two specical cases and to make it cleaner. o----------------------------------------------------------------------- r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines Fix a use-after-free bug for extended IRQ resource[1]. When _PRS buffer is copied as a template for _SRS, a string pointer for descriptor name is also copied and it becomes stale as soon as it gets de-allocated[2]. Now _CRS is used as a template for _SRS as ACPI specification suggests if it is usable. The template from _PRS is still utilized but only when _CRS is not available or broken. To avoid use-after-free the problem in this case, however, only mandatory fields are copied, optional data is removed, and structure length is adjusted accordingly. Reported by: hps[1] Analyzed by: avg[2] Tested by: hps o----------------------------------------------------------------------- r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines Add a forgotten change from the previous commit. o----------------------------------------------------------------------- r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines Consistently use padding `_' in the comment. o----------------------------------------------------------------------- Reviewed by: jkim Tested by: Alexandre "Sunny" Kovalenko On behalf of: jkim Added: stable/8/sys/contrib/dev/acpica/compiler/aslmessages.h - copied unchanged from r213806, head/sys/contrib/dev/acpica/compiler/aslmessages.h stable/8/sys/contrib/dev/acpica/compiler/aslrestype1i.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype1i.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2d.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2d.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2e.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2e.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2q.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2q.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2w.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2w.c stable/8/sys/contrib/dev/acpica/compiler/dtcompile.c - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dtcompile.c stable/8/sys/contrib/dev/acpica/compiler/dtcompiler.h - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtcompiler.h stable/8/sys/contrib/dev/acpica/compiler/dtfield.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtfield.c stable/8/sys/contrib/dev/acpica/compiler/dtio.c - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dtio.c stable/8/sys/contrib/dev/acpica/compiler/dtsubtable.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtsubtable.c stable/8/sys/contrib/dev/acpica/compiler/dttable.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dttable.c stable/8/sys/contrib/dev/acpica/compiler/dttemplate.c - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dttemplate.c stable/8/sys/contrib/dev/acpica/compiler/dttemplate.h - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dttemplate.h stable/8/sys/contrib/dev/acpica/compiler/dtutils.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtutils.c stable/8/sys/contrib/dev/acpica/events/evgpeinit.c - copied, changed from r207344, head/sys/contrib/dev/acpica/events/evgpeinit.c stable/8/sys/contrib/dev/acpica/events/evgpeutil.c - copied, changed from r207344, head/sys/contrib/dev/acpica/events/evgpeutil.c stable/8/sys/contrib/dev/acpica/hardware/hwpci.c - copied unchanged from r212761, head/sys/contrib/dev/acpica/hardware/hwpci.c stable/8/sys/contrib/dev/acpica/utilities/utosi.c - copied, changed from r210976, head/sys/contrib/dev/acpica/utilities/utosi.c stable/8/sys/contrib/dev/acpica/utilities/utxferror.c - copied unchanged from r212761, head/sys/contrib/dev/acpica/utilities/utxferror.c Modified: stable/8/share/man/man4/acpi.4 stable/8/sys/conf/files stable/8/sys/contrib/dev/acpica/acpica_prep.sh stable/8/sys/contrib/dev/acpica/changes.txt stable/8/sys/contrib/dev/acpica/common/adfile.c stable/8/sys/contrib/dev/acpica/common/adisasm.c stable/8/sys/contrib/dev/acpica/common/adwalk.c stable/8/sys/contrib/dev/acpica/common/dmextern.c stable/8/sys/contrib/dev/acpica/common/dmrestag.c stable/8/sys/contrib/dev/acpica/common/dmtable.c stable/8/sys/contrib/dev/acpica/common/dmtbdump.c stable/8/sys/contrib/dev/acpica/common/dmtbinfo.c stable/8/sys/contrib/dev/acpica/common/getopt.c stable/8/sys/contrib/dev/acpica/compiler/aslanalyze.c stable/8/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/8/sys/contrib/dev/acpica/compiler/aslcompile.c stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.l stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.y stable/8/sys/contrib/dev/acpica/compiler/asldefine.h stable/8/sys/contrib/dev/acpica/compiler/aslerror.c stable/8/sys/contrib/dev/acpica/compiler/aslfiles.c stable/8/sys/contrib/dev/acpica/compiler/aslglobal.h stable/8/sys/contrib/dev/acpica/compiler/asllisting.c stable/8/sys/contrib/dev/acpica/compiler/asllookup.c stable/8/sys/contrib/dev/acpica/compiler/aslmain.c stable/8/sys/contrib/dev/acpica/compiler/aslopcodes.c stable/8/sys/contrib/dev/acpica/compiler/aslopt.c stable/8/sys/contrib/dev/acpica/compiler/aslpredef.c stable/8/sys/contrib/dev/acpica/compiler/aslresource.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype1.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2.c stable/8/sys/contrib/dev/acpica/compiler/aslstartup.c stable/8/sys/contrib/dev/acpica/compiler/asltransform.c stable/8/sys/contrib/dev/acpica/compiler/asltree.c stable/8/sys/contrib/dev/acpica/compiler/asltypes.h stable/8/sys/contrib/dev/acpica/compiler/aslutils.c stable/8/sys/contrib/dev/acpica/debugger/dbcmds.c stable/8/sys/contrib/dev/acpica/debugger/dbdisply.c stable/8/sys/contrib/dev/acpica/debugger/dbexec.c stable/8/sys/contrib/dev/acpica/debugger/dbfileio.c stable/8/sys/contrib/dev/acpica/debugger/dbhistry.c stable/8/sys/contrib/dev/acpica/debugger/dbinput.c stable/8/sys/contrib/dev/acpica/debugger/dbutils.c stable/8/sys/contrib/dev/acpica/disassembler/dmobject.c stable/8/sys/contrib/dev/acpica/disassembler/dmopcode.c stable/8/sys/contrib/dev/acpica/disassembler/dmresrc.c stable/8/sys/contrib/dev/acpica/dispatcher/dsinit.c stable/8/sys/contrib/dev/acpica/dispatcher/dsmethod.c stable/8/sys/contrib/dev/acpica/dispatcher/dsmthdat.c stable/8/sys/contrib/dev/acpica/dispatcher/dsobject.c stable/8/sys/contrib/dev/acpica/dispatcher/dsopcode.c stable/8/sys/contrib/dev/acpica/dispatcher/dsutils.c stable/8/sys/contrib/dev/acpica/events/evgpe.c stable/8/sys/contrib/dev/acpica/events/evgpeblk.c stable/8/sys/contrib/dev/acpica/events/evrgnini.c stable/8/sys/contrib/dev/acpica/events/evxface.c stable/8/sys/contrib/dev/acpica/events/evxfevnt.c stable/8/sys/contrib/dev/acpica/events/evxfregn.c stable/8/sys/contrib/dev/acpica/executer/exconfig.c stable/8/sys/contrib/dev/acpica/executer/exdump.c stable/8/sys/contrib/dev/acpica/executer/exfldio.c stable/8/sys/contrib/dev/acpica/executer/exmutex.c stable/8/sys/contrib/dev/acpica/executer/exoparg1.c stable/8/sys/contrib/dev/acpica/executer/exprep.c stable/8/sys/contrib/dev/acpica/executer/exregion.c stable/8/sys/contrib/dev/acpica/executer/exsystem.c stable/8/sys/contrib/dev/acpica/hardware/hwgpe.c stable/8/sys/contrib/dev/acpica/hardware/hwsleep.c stable/8/sys/contrib/dev/acpica/hardware/hwvalid.c stable/8/sys/contrib/dev/acpica/include/acapps.h stable/8/sys/contrib/dev/acpica/include/acconfig.h stable/8/sys/contrib/dev/acpica/include/acdebug.h stable/8/sys/contrib/dev/acpica/include/acdisasm.h stable/8/sys/contrib/dev/acpica/include/acevents.h stable/8/sys/contrib/dev/acpica/include/acexcep.h stable/8/sys/contrib/dev/acpica/include/acglobal.h stable/8/sys/contrib/dev/acpica/include/achware.h stable/8/sys/contrib/dev/acpica/include/acinterp.h stable/8/sys/contrib/dev/acpica/include/aclocal.h stable/8/sys/contrib/dev/acpica/include/acmacros.h stable/8/sys/contrib/dev/acpica/include/acnamesp.h stable/8/sys/contrib/dev/acpica/include/acobject.h stable/8/sys/contrib/dev/acpica/include/acoutput.h stable/8/sys/contrib/dev/acpica/include/acpiosxf.h stable/8/sys/contrib/dev/acpica/include/acpixf.h stable/8/sys/contrib/dev/acpica/include/acpredef.h stable/8/sys/contrib/dev/acpica/include/acstruct.h stable/8/sys/contrib/dev/acpica/include/actbl.h stable/8/sys/contrib/dev/acpica/include/actbl2.h stable/8/sys/contrib/dev/acpica/include/actypes.h stable/8/sys/contrib/dev/acpica/include/acutils.h stable/8/sys/contrib/dev/acpica/include/amlresrc.h stable/8/sys/contrib/dev/acpica/include/platform/acenv.h stable/8/sys/contrib/dev/acpica/include/platform/acfreebsd.h stable/8/sys/contrib/dev/acpica/include/platform/acgcc.h stable/8/sys/contrib/dev/acpica/namespace/nsaccess.c stable/8/sys/contrib/dev/acpica/namespace/nsalloc.c stable/8/sys/contrib/dev/acpica/namespace/nsdump.c stable/8/sys/contrib/dev/acpica/namespace/nsinit.c stable/8/sys/contrib/dev/acpica/namespace/nsnames.c stable/8/sys/contrib/dev/acpica/namespace/nsparse.c stable/8/sys/contrib/dev/acpica/namespace/nsrepair.c stable/8/sys/contrib/dev/acpica/namespace/nsrepair2.c stable/8/sys/contrib/dev/acpica/namespace/nssearch.c stable/8/sys/contrib/dev/acpica/namespace/nsutils.c stable/8/sys/contrib/dev/acpica/namespace/nswalk.c stable/8/sys/contrib/dev/acpica/namespace/nsxfobj.c stable/8/sys/contrib/dev/acpica/osunixxf.c stable/8/sys/contrib/dev/acpica/tables/tbfadt.c stable/8/sys/contrib/dev/acpica/tables/tbfind.c stable/8/sys/contrib/dev/acpica/tables/tbinstal.c stable/8/sys/contrib/dev/acpica/tables/tbutils.c stable/8/sys/contrib/dev/acpica/tables/tbxface.c stable/8/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h stable/8/sys/contrib/dev/acpica/utilities/utcopy.c stable/8/sys/contrib/dev/acpica/utilities/utdebug.c stable/8/sys/contrib/dev/acpica/utilities/uteval.c stable/8/sys/contrib/dev/acpica/utilities/utglobal.c stable/8/sys/contrib/dev/acpica/utilities/utids.c stable/8/sys/contrib/dev/acpica/utilities/utinit.c stable/8/sys/contrib/dev/acpica/utilities/utmath.c stable/8/sys/contrib/dev/acpica/utilities/utmisc.c stable/8/sys/contrib/dev/acpica/utilities/utmutex.c stable/8/sys/contrib/dev/acpica/utilities/uttrack.c stable/8/sys/contrib/dev/acpica/utilities/utxface.c stable/8/sys/dev/acpica/Osd/OsdHardware.c stable/8/sys/dev/acpica/Osd/OsdMemory.c stable/8/sys/dev/acpica/acpi.c stable/8/sys/dev/acpica/acpi_button.c stable/8/sys/dev/acpica/acpi_ec.c stable/8/sys/dev/acpica/acpi_lid.c stable/8/sys/dev/acpica/acpi_pci_link.c stable/8/sys/dev/acpica/acpi_video.c stable/8/sys/modules/acpi/acpi/Makefile stable/8/usr.sbin/acpi/acpiconf/acpiconf.c stable/8/usr.sbin/acpi/acpidb/Makefile stable/8/usr.sbin/acpi/acpidump/acpi_user.c stable/8/usr.sbin/acpi/iasl/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/usr.sbin/acpi/ (props changed) Modified: stable/8/share/man/man4/acpi.4 ============================================================================== --- stable/8/share/man/man4/acpi.4 Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/share/man/man4/acpi.4 Fri Nov 19 14:26:45 2010 (r215521) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2010 +.Dd October 26, 2010 .Dt ACPI 4 .Os .Sh NAME @@ -224,6 +224,26 @@ Try increasing this number if you get th .Qq Li AE_NO_HARDWARE_RESPONSE . .It Va hw.acpi.host_mem_start Override the assumed memory starting address for PCI host bridges. +.It Va hw.acpi.install_interface , hw.acpi.remove_interface +Install or remove OS interface(s) to control return value of +.Ql _OSI +query method. When an OS interface is specified in +.Va hw.acpi.install_interface , +.Li _OSI +query for the interface returns it is +.Em supported . +Conversely, when an OS interface is specified in +.Va hw.acpi.remove_interface , +.Li _OSI +query returns it is +.Em not supported . +Multiple interfaces can be specified in a comma-separated list and +any leading white spaces will be ignored. For example, +.Qq Li FreeBSD, Linux +is a valid list of two interfaces +.Qq Li FreeBSD +and +.Qq Li Linux . .It Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. This can fix some graphics cards that have problems such as LCD white-out Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/conf/files Fri Nov 19 14:26:45 2010 (r215521) @@ -174,6 +174,8 @@ contrib/dev/acpica/dispatcher/dswstate.c contrib/dev/acpica/events/evevent.c optional acpi contrib/dev/acpica/events/evgpe.c optional acpi contrib/dev/acpica/events/evgpeblk.c optional acpi +contrib/dev/acpica/events/evgpeinit.c optional acpi +contrib/dev/acpica/events/evgpeutil.c optional acpi contrib/dev/acpica/events/evmisc.c optional acpi contrib/dev/acpica/events/evregion.c optional acpi contrib/dev/acpica/events/evrgnini.c optional acpi @@ -207,6 +209,7 @@ contrib/dev/acpica/executer/exsystem.c contrib/dev/acpica/executer/exutils.c optional acpi contrib/dev/acpica/hardware/hwacpi.c optional acpi contrib/dev/acpica/hardware/hwgpe.c optional acpi +contrib/dev/acpica/hardware/hwpci.c optional acpi contrib/dev/acpica/hardware/hwregs.c optional acpi contrib/dev/acpica/hardware/hwsleep.c optional acpi contrib/dev/acpica/hardware/hwtimer.c optional acpi @@ -271,9 +274,11 @@ contrib/dev/acpica/utilities/utmath.c o contrib/dev/acpica/utilities/utmisc.c optional acpi contrib/dev/acpica/utilities/utmutex.c optional acpi contrib/dev/acpica/utilities/utobject.c optional acpi +contrib/dev/acpica/utilities/utosi.c optional acpi contrib/dev/acpica/utilities/utresrc.c optional acpi contrib/dev/acpica/utilities/utstate.c optional acpi contrib/dev/acpica/utilities/utxface.c optional acpi +contrib/dev/acpica/utilities/utxferror.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: stable/8/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- stable/8/sys/contrib/dev/acpica/acpica_prep.sh Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/acpica_prep.sh Fri Nov 19 14:26:45 2010 (r215521) @@ -19,11 +19,11 @@ fulldirs="common compiler debugger disas tools utilities" # files to remove -stripdirs="acpisrc acpixtract examples generate os_specific" +stripdirs="acpisrc acpixtract examples generate os_specific tests" stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c \ - aehandlers.c aemain.c aetables.c osunixdir.c readme.txt \ - utclib.c" + aehandlers.c aemain.c aetables.c aetables.h osunixdir.c \ + readme.txt utclib.c" # include files to canonify src_headers="acapps.h accommon.h acconfig.h acdebug.h acdisasm.h \ @@ -33,7 +33,8 @@ src_headers="acapps.h accommon.h acconfi acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h \ actbl2.h actypes.h acutils.h amlcode.h amlresrc.h \ platform/acenv.h platform/acfreebsd.h platform/acgcc.h" -comp_headers="aslcompiler.h asldefine.h aslglobal.h asltypes.h" +comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ + asltypes.h dtcompiler.h dttemplate.h" platform_headers="acfreebsd.h acgcc.h" # pre-clean @@ -49,7 +50,7 @@ tar -x -z -f ${src} -C ${wrk} # strip files echo strip for i in ${stripdirs}; do - find ${wrk} -name ${i} -type d | xargs rm -r + find ${wrk} -name ${i} -type d -print | xargs rm -r done for i in ${stripfiles}; do find ${wrk} -name ${i} -type f -delete @@ -58,22 +59,22 @@ done # copy files echo copying full dirs for i in ${fulldirs}; do - find ${wrk} -name ${i} -type d | xargs -J % mv % ${dst} + find ${wrk} -name ${i} -type d -print | xargs -J % mv % ${dst} done echo copying remaining files -find ${wrk} -type f | xargs -J % mv % ${dst} +find ${wrk} -type f -print | xargs -J % mv % ${dst} # canonify include paths for H in ${src_headers}; do - find ${dst} -name "*.[chy]" -type f | \ + find ${dst} -name "*.[chy]" -type f -print | \ xargs sed -i "" -e "s|[\"<]$H[\">]|\|g" done for H in ${comp_headers}; do - find ${dst}/compiler -name "*.[chly]" -type f | \ + find ${dst}/common ${dst}/compiler -name "*.[chly]" -type f | \ xargs sed -i "" -e "s|[\"<]$H[\">]|\|g" done for H in ${platform_headers}; do - find ${dst}/include/platform -name "*.h" -type f | \ + find ${dst}/include/platform -name "*.h" -type f -print | \ xargs sed -i "" -e "s|[\"<]$H[\">]|\|g" done Modified: stable/8/sys/contrib/dev/acpica/changes.txt ============================================================================== --- stable/8/sys/contrib/dev/acpica/changes.txt Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/changes.txt Fri Nov 19 14:26:45 2010 (r215521) @@ -1,4 +1,416 @@ ---------------------------------------- +13 October 2010. Summary of changes for version 20101013: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Added support to clear the PCIEXP_WAKE event. When clearing ACPI events, now +clear the PCIEXP_WAKE_STS bit in the ACPI PM1 Status Register, via +HwClearAcpiStatus. Original change from Colin King. ACPICA BZ 880. + +Changed the type of the predefined namespace object _TZ from ThermalZone to +Device. This was found to be confusing to the host software that processes +the various thermal zones, since _TZ is not really a ThermalZone. However, a +Notify() can still be performed on it. ACPICA BZ 876. Suggestion from Rui +Zhang. + +Added Windows Vista SP2 to the list of supported _OSI strings. The actual +string is "Windows 2006 SP2". + +Eliminated duplicate code in AcpiUtExecute* functions. Now that the nsrepair +code automatically repairs _HID-related strings, this type of code is no +longer needed in Execute_HID, Execute_CID, and Execute_UID. ACPICA BZ 878. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented additional compile-time validation for _HID strings. The +non-hex prefix (such as "PNP" or "ACPI") must be uppercase, and the length of +the string must be exactly seven or eight characters. For both _HID and _CID +strings, all characters must be alphanumeric. ACPICA BZ 874. + +iASL: Allow certain "null" resource descriptors. Some BIOS code creates +descriptors that are mostly or all zeros, with the expectation that they will +be filled in at runtime. iASL now allows this as long as there is a "resource +tag" (name) associated with the descriptor, which gives the ASL a handle +needed to modify the descriptor. ACPICA BZ 873. + +Added single-thread support to the generic Unix application OSL. Primarily +for iASL support, this change removes the use of semaphores in the single- +threaded ACPICA tools/applications - increasing performance. The +_MULTI_THREADED option was replaced by the (reverse) ACPI_SINGLE_THREADED +option. ACPICA BZ 879. + +AcpiExec: several fixes for the 64-bit version. Adds XSDT support and support +for 64-bit DSDT/FACS addresses in the FADT. Lin Ming. + +iASL: Moved all compiler messages to a new file, aslmessages.h. + +---------------------------------------- +15 September 2010. Summary of changes for version 20100915: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Removed the AcpiOsDerivePciId OSL interface. The various host implementations +of this function were not OS-dependent and are now obsolete and can be +removed from all host OSLs. This function has been replaced by +AcpiHwDerivePciId, which is now part of the ACPICA core code. +AcpiHwDerivePciId has been implemented without recursion. Adds one new +module, hwpci.c. ACPICA BZ 857. + +Implemented a dynamic repair for _HID and _CID strings. The following +problems are now repaired at runtime: 1) Remove a leading asterisk in the +string, and 2) the entire string is uppercased. Both repairs are in +accordance with the ACPI specification and will simplify host driver code. +ACPICA BZ 871. + +The ACPI_THREAD_ID type is no longer configurable, internally it is now +always UINT64. This simplifies the ACPICA code, especially any printf output. +UINT64 is the only common data type for all thread_id types across all +operating systems. It is now up to the host OSL to cast the native thread_id +type to UINT64 before returning the value to ACPICA (via AcpiOsGetThreadId). +Lin Ming, Bob Moore. + +Added the ACPI_INLINE type to enhance the ACPICA configuration. The "inline" +keyword is not standard across compilers, and this type allows inline to be +configured on a per-compiler basis. Lin Ming. + +Made the system global AcpiGbl_SystemAwakeAndRunning publically available. +Added an extern for this boolean in acpixf.h. Some hosts utilize this value +during suspend/restore operations. ACPICA BZ 869. + +All code that implements error/warning messages with the "ACPI:" prefix has +been moved to a new module, utxferror.c. + +The UINT64_OVERLAY was moved to utmath.c, which is the only module where it +is used. ACPICA BZ 829. Lin Ming, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.1K Code, 19.0K Data, 108.1K Total + Debug Version: 165.1K Code, 51.9K Data, 217.0K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Write ACPI errors to stderr instead of the output file. +This keeps the output files free of random error messages that may originate +from within the namespace/interpreter code. Used this opportunity to merge +all ACPI:-style messages into a single new module, utxferror.c. ACPICA BZ +866. Lin Ming, Bob Moore. + +Tools: update some printfs for ansi warnings on size_t. Handle width change +of size_t on 32-bit versus 64-bit generations. Lin Ming. + +---------------------------------------- +06 August 2010. Summary of changes for version 20100806: + +1) ACPI CA Core Subsystem: + +Designed and implemented a new host interface to the _OSI support code. This +will allow the host to dynamically add or remove multiple _OSI strings, as +well as install an optional handler that is called for each _OSI invocation. +Also added a new AML debugger command, 'osi' to display and modify the global +_OSI string table, and test support in the AcpiExec utility. See the ACPICA +reference manual for full details. Lin Ming, Bob Moore. ACPICA BZ 836. +New Functions: + AcpiInstallInterface - Add an _OSI string. + AcpiRemoveInterface - Delete an _OSI string. + AcpiInstallInterfaceHandler - Install optional _OSI handler. +Obsolete Functions: + AcpiOsValidateInterface - no longer used. +New Files: + source/components/utilities/utosi.c + +Re-introduced the support to enable multi-byte transfers for Embedded +Controller (EC) operation regions. A reported problem was found to be a bug +in the host OS, not in the multi-byte support. Previously, the maximum data +size passed to the EC operation region handler was a single byte. There are +often EC Fields larger than one byte that need to be transferred, and it is +useful for the EC driver to lock these as a single transaction. This change +enables single transfers larger than 8 bits. This effectively changes the +access to the EC space from ByteAcc to AnyAcc, and will probably require +changes to the host OS Embedded Controller driver to enable 16/32/64/256-bit +transfers in addition to 8-bit transfers. Alexey Starikovskiy, Lin Ming. + +Fixed a problem with the prototype for AcpiOsReadPciConfiguration. The +prototype in acpiosxf.h had the output value pointer as a (void *). +It should be a (UINT64 *). This may affect some host OSL code. + +Fixed a couple problems with the recently modified Linux makefiles for iASL +and AcpiExec. These new makefiles place the generated object files in the +local directory so that there can be no collisions between the files that are +shared between them that are compiled with different options. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.0K Code, 51.5K Data, 215.5K Total + Current Release: + Non-Debug Version: 89.1K Code, 19.0K Data, 108.1K Total + Debug Version: 165.1K Code, 51.9K Data, 217.0K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Added a new option (-da, "disassemble all") to load the +namespace from and disassemble an entire group of AML files. Useful for +loading all of the AML tables for a given machine (DSDT, SSDT1...SSDTn) and +disassembling with one simple command. ACPICA BZ 865. Lin Ming. + +iASL: Allow multiple invocations of -e option. This change allows multiple +uses of -e on the command line: "-e ssdt1.dat -e ssdt2.dat". ACPICA BZ 834. +Lin Ming. + +---------------------------------------- +02 July 2010. Summary of changes for version 20100702: + +1) ACPI CA Core Subsystem: + +Implemented several updates to the recently added GPE reference count +support. The model for "wake" GPEs is changing to give the host OS complete +control of these GPEs. Eventually, the ACPICA core will not execute any _PRW +methods, since the host already must execute them. Also, additional changes +were made to help ensure that the reference counts are kept in proper +synchronization with reality. Rafael J. Wysocki. + +1) Ensure that GPEs are not enabled twice during initialization. +2) Ensure that GPE enable masks stay in sync with the reference count. +3) Do not inadvertently enable GPEs when writing GPE registers. +4) Remove the internal wake reference counter and add new AcpiGpeWakeup +interface. This interface will set or clear individual GPEs for wakeup. +5) Remove GpeType argument from AcpiEnable and AcpiDisable. These interfaces +are now used for "runtime" GPEs only. + +Changed the behavior of the GPE install/remove handler interfaces. The GPE is +no longer disabled during this process, as it was found to cause problems on +some machines. Rafael J. Wysocki. + +Reverted a change introduced in version 20100528 to enable Embedded +Controller multi-byte transfers. This change was found to cause problems with +Index Fields and possibly Bank Fields. It will be reintroduced when these +problems have been resolved. + +Fixed a problem with references to Alias objects within Package Objects. A +reference to an Alias within the definition of a Package was not always +resolved properly. Aliases to objects like Processors, Thermal zones, etc. +were resolved to the actual object instead of a reference to the object as it +should be. Package objects are only allowed to contain integer, string, +buffer, package, and reference objects. Redhat bugzilla 608648. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.1K Code, 51.5K Data, 215.6K Total + Current Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.0K Code, 51.5K Data, 215.5K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented a new compiler subsystem to allow definition and +compilation of the non-AML ACPI tables such as FADT, MADT, SRAT, etc. These +are called "ACPI Data Tables", and the new compiler is the "Data Table +Compiler". This compiler is intended to simplify the existing error-prone +process of creating these tables for the BIOS, as well as allowing the +disassembly, modification, recompilation, and override of existing ACPI data +tables. See the iASL User Guide for detailed information. + +iASL: Implemented a new Template Generator option in support of the new Data +Table Compiler. This option will create examples of all known ACPI tables +that can be used as the basis for table development. See the iASL +documentation and the -T option. + +Disassembler and headers: Added support for the WDDT ACPI table (Watchdog +Descriptor Table). + +Updated the Linux makefiles for iASL and AcpiExec to place the generated +object files in the local directory so that there can be no collisions +between the shared files between them that are generated with different +options. + +Added support for Mac OS X in the Unix OSL used for iASL and AcpiExec. Use +the #define __APPLE__ to enable this support. + +---------------------------------------- +28 May 2010. Summary of changes for version 20100528: + +Note: The ACPI 4.0a specification was released on April 5, 2010 and is +available at www.acpi.info. This is primarily an errata release. + +1) ACPI CA Core Subsystem: + +Undefined ACPI tables: We are looking for the definitions for the following +ACPI tables that have been seen in the field: ATKG, IEIT, GSCI. + +Implemented support to enable multi-byte transfers for Embedded Controller +(EC) operation regions. Previously, the maximum data size passed to the EC +operation region handler was a single byte. There are often EC Fields larger +than one byte that need to be transferred, and it is useful for the EC driver +to lock these as a single transaction. This change enables single transfers +larger than 8 bits. This effectively changes the access to the EC space from +ByteAcc to AnyAcc, and will probably require changes to the host OS Embedded +Controller driver to enable 16/32/64/256-bit transfers in addition to 8-bit +transfers. Alexey Starikovskiy, Lin Ming + +Implemented a performance enhancement for namespace search and access. This +change enhances the performance of namespace searches and walks by adding a +backpointer to the parent in each namespace node. On large namespaces, this +change can improve overall ACPI performance by up to 9X. Adding a pointer to +each namespace node increases the overall size of the internal namespace by +about 5%, since each namespace entry usually consists of both a namespace +node and an ACPI operand object. However, this is the first growth of the +namespace in ten years. ACPICA bugzilla 817. Alexey Starikovskiy. + +Implemented a performance optimization that reduces the number of namespace +walks. On control method exit, only walk the namespace if the method is known +to have created namespace objects outside of its local scope. Previously, the +entire namespace was traversed on each control method exit. This change can +improve overall ACPI performance by up to 3X. Alexey Starikovskiy, Bob Moore. + +Added support to truncate I/O addresses to 16 bits for Windows compatibility. +Some ASL code has been seen in the field that inadvertently has bits set +above bit 15. This feature is optional and is enabled if the BIOS requests +any Windows OSI strings. It can also be enabled by the host OS. Matthew +Garrett, Bob Moore. + +Added support to limit the maximum time for the ASL Sleep() operator. To +prevent accidental deep sleeps, limit the maximum time that Sleep() will +actually sleep. Configurable, the default maximum is two seconds. ACPICA +bugzilla 854. + +Added run-time validation support for the _WDG and_WED Microsoft predefined +methods. These objects are defined by "Windows Instrumentation", and are not +part of the ACPI spec. ACPICA BZ 860. + +Expanded all statistic counters used during namespace and device +initialization from 16 to 32 bits in order to support very large namespaces. + +Replaced all instances of %d in printf format specifiers with %u since nearly +all integers in ACPICA are unsigned. + +Fixed the exception namestring for AE_WAKE_ONLY_GPE. Was incorrectly returned +as AE_NO_HANDLER. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 88.4K Code, 18.8K Data, 107.2K Total + Debug Version: 164.2K Code, 51.5K Data, 215.7K Total + Current Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.1K Code, 51.5K Data, 215.6K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Added compiler support for the _WDG and_WED Microsoft predefined +methods. These objects are defined by "Windows Instrumentation", and are not +part of the ACPI spec. ACPICA BZ 860. + +AcpiExec: added option to disable the memory tracking mechanism. The -dt +option will disable the tracking mechanism, which improves performance +considerably. + +AcpiExec: Restructured the command line options into -d (disable) and -e +(enable) options. + +---------------------------------------- +28 April 2010. Summary of changes for version 20100428: + +1) ACPI CA Core Subsystem: + +Implemented GPE support for dynamically loaded ACPI tables. For all GPEs, +including FADT-based and GPE Block Devices, execute any _PRW methods in the +new table, and process any _Lxx/_Exx GPE methods in the new table. Any +runtime GPE that is referenced by an _Lxx/_Exx method in the new table is +immediately enabled. Handles the FADT-defined GPEs as well as GPE Block +Devices. Provides compatibility with other ACPI implementations. Two new +files added, evgpeinit.c and evgpeutil.c. ACPICA BZ 833. Lin Ming, Bob Moore. + +Fixed a regression introduced in version 20100331 within the table manager +where initial table loading could fail. This was introduced in the fix for +AcpiReallocateRootTable. Also, renamed some of fields in the table manager +data structures to clarify their meaning and use. + +Fixed a possible allocation overrun during internal object copy in +AcpiUtCopySimpleObject. The original code did not correctly handle the case +where the object to be copied was a namespace node. Lin Ming. ACPICA BZ 847. + +Updated the allocation dump routine, AcpiUtDumpAllocation and fixed a +possible access beyond end-of-allocation. Also, now fully validate descriptor +(size and type) before output. Lin Ming, Bob Moore. ACPICA BZ 847 + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.9K Code, 18.6K Data, 106.5K Total + Debug Version: 163.5K Code, 51.3K Data, 214.8K Total + Current Release: + Non-Debug Version: 88.4K Code, 18.8K Data, 107.2K Total + Debug Version: 164.2K Code, 51.5K Data, 215.7K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented Min/Max/Len/Gran validation for address resource +descriptors. This change implements validation for the address fields that +are common to all address-type resource descriptors. These checks are +implemented: Checks for valid Min/Max, length within the Min/Max window, +valid granularity, Min/Max a multiple of granularity, and _MIF/_MAF as per +table 6-40 in the ACPI 4.0a specification. Also split the large aslrestype1.c +and aslrestype2.c files into five new files. ACPICA BZ 840. + +iASL: Added support for the _Wxx predefined names. This support was missing +and these names were not recognized by the compiler as valid predefined +names. ACPICA BZ 851. + +iASL: Added an error for all predefined names that are defined to return no +value and thus must be implemented as Control Methods. These include all of +the _Lxx, _Exx, _Wxx, and _Qxx names, as well as some other miscellaneous +names such as _DIS, _INI, _IRC, _OFF, _ON, and _PSx. ACPICA BZ 850, 856. + +iASL: Implemented the -ts option to emit hex AML data in ASL format, as an +ASL Buffer. Allows ACPI tables to be easily included within ASL files, to be +dynamically loaded via the Load() operator. Also cleaned up output for the - +ta and -tc options. ACPICA BZ 853. + +Tests: Added a new file with examples of extended iASL error checking. +Demonstrates the advanced error checking ability of the iASL compiler. +Available at tests/misc/badcode.asl. + +---------------------------------------- 31 March 2010. Summary of changes for version 20100331: 1) ACPI CA Core Subsystem: Modified: stable/8/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adfile.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/adfile.c Fri Nov 19 14:26:45 2010 (r215521) @@ -126,13 +126,13 @@ /* Local prototypes */ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, UINT32 Length); -char FilenameBuf[20]; +static char FilenameBuf[20]; /****************************************************************************** @@ -190,7 +190,7 @@ AdGenerateFilename ( * ******************************************************************************/ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, Modified: stable/8/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adisasm.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/adisasm.c Fri Nov 19 14:26:45 2010 (r215521) @@ -134,7 +134,6 @@ extern int AslCompilerdebug; -extern char *Gbl_ExternalFilename; ACPI_STATUS @@ -148,22 +147,18 @@ LsSetupNsList ( /* Local prototypes */ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table); -void -AdDisassemblerHeader ( - char *Filename); - -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, UINT32 AmlLength); -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root); @@ -282,8 +277,8 @@ AdInitialize ( /* Setup the Table Manager (cheat - there is no RSDT) */ - AcpiGbl_RootTableList.Size = 1; - AcpiGbl_RootTableList.Count = 0; + AcpiGbl_RootTableList.MaxTableCount = 1; + AcpiGbl_RootTableList.CurrentTableCount = 0; AcpiGbl_RootTableList.Tables = LocalTables; return (Status); @@ -317,6 +312,7 @@ AdAmlDisassemble ( ACPI_STATUS Status; char *DisasmFilename = NULL; char *ExternalFilename; + ACPI_EXTERNAL_FILE *ExternalFileList = AcpiGbl_ExternalFileList; FILE *File = NULL; ACPI_TABLE_HEADER *Table = NULL; ACPI_TABLE_HEADER *ExternalTable; @@ -339,46 +335,54 @@ AdAmlDisassemble ( * External filenames separated by commas * Example: iasl -e file1,file2,file3 -d xxx.aml */ - if (Gbl_ExternalFilename) + while (ExternalFileList) { - ExternalFilename = strtok (Gbl_ExternalFilename, ","); + ExternalFilename = ExternalFileList->Path; + if (!ACPI_STRCMP (ExternalFilename, Filename)) + { + /* Next external file */ + + ExternalFileList = ExternalFileList->Next; + + continue; + } + + Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable); + if (ACPI_FAILURE (Status)) + { + return Status; + } - while (ExternalFilename) + /* Load external table for symbol resolution */ + + if (ExternalTable) { - Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable); + Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE); if (ACPI_FAILURE (Status)) { + AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", + AcpiFormatException (Status)); return Status; } - /* Load external table for symbol resolution */ - - if (ExternalTable) - { - Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", - AcpiFormatException (Status)); - return Status; - } - - /* - * Load namespace from names created within control methods - * Set owner id of nodes in external table - */ - AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); - } + /* + * Load namespace from names created within control methods + * Set owner id of nodes in external table + */ + AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, + AcpiGbl_RootNode, OwnerId); + AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); + } - /* Next external file name */ + /* Next external file */ - ExternalFilename = strtok (NULL, ","); - } + ExternalFileList = ExternalFileList->Next; + } - /* Clear external list generated by Scope in external tables */ + /* Clear external list generated by Scope in external tables */ + if (AcpiGbl_ExternalFileList) + { AcpiDmClearExternalList (); } } @@ -502,7 +506,7 @@ AdAmlDisassemble ( if (AcpiDmGetExternalMethodCount ()) { fprintf (stderr, - "\nFound %d external control methods, reparsing with new information\n", + "\nFound %u external control methods, reparsing with new information\n", AcpiDmGetExternalMethodCount ()); /* @@ -515,10 +519,11 @@ AdAmlDisassemble ( AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME; AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED; AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_DEVICE; + AcpiGbl_RootNodeStruct.Parent = NULL; AcpiGbl_RootNodeStruct.Child = NULL; AcpiGbl_RootNodeStruct.Peer = NULL; AcpiGbl_RootNodeStruct.Object = NULL; - AcpiGbl_RootNodeStruct.Flags = ANOBJ_END_OF_PEER_LIST; + AcpiGbl_RootNodeStruct.Flags = 0; Status = AcpiNsRootInitialize (); AcpiDmAddExternalsToNamespace (); @@ -607,10 +612,10 @@ AdDisassemblerHeader ( /* Header and input table info */ - AcpiOsPrintf ("/*\n * Intel ACPI Component Architecture\n"); - AcpiOsPrintf (" * AML Disassembler version %8.8X\n", ACPI_CA_VERSION); + AcpiOsPrintf ("/*\n"); + AcpiOsPrintf (ACPI_COMMON_HEADER ("AML Disassembler", " * ")); - AcpiOsPrintf (" *\n * Disassembly of %s, %s", Filename, ctime (&Timer)); + AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer)); AcpiOsPrintf (" *\n"); } @@ -629,7 +634,7 @@ AdDisassemblerHeader ( * *****************************************************************************/ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table) @@ -643,7 +648,7 @@ AdCreateTableHeader ( */ AdDisassemblerHeader (Filename); - AcpiOsPrintf (" *\n * Original Table Header:\n"); + AcpiOsPrintf (" * Original Table Header:\n"); AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature); AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length); @@ -688,7 +693,7 @@ AdCreateTableHeader ( AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision); AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId); AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision); - AcpiOsPrintf (" */\n"); + AcpiOsPrintf (" */\n\n"); /* Create AML output filename based on input filename */ @@ -706,7 +711,7 @@ AdCreateTableHeader ( /* Open the ASL definition block */ AcpiOsPrintf ( - "DefinitionBlock (\"%s\", \"%4.4s\", %hd, \"%.6s\", \"%.8s\", 0x%8.8X)\n", + "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n", NewFilename, Table->Signature, Table->Revision, Table->OemId, Table->OemTableId, Table->OemRevision); @@ -776,7 +781,7 @@ AdDisplayTables ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, @@ -899,7 +904,7 @@ AdDeferredParse ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root) { @@ -1018,7 +1023,7 @@ AdGetLocalTables ( * is architecture-dependent. */ NumTables = (NewTable->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize; - AcpiOsPrintf ("There are %d tables defined in the %4.4s\n\n", + AcpiOsPrintf ("There are %u tables defined in the %4.4s\n\n", NumTables, NewTable->Signature); /* Get the FADT */ @@ -1156,7 +1161,7 @@ AdParseTable ( /* If LoadTable is FALSE, we are parsing the last loaded table */ - TableIndex = AcpiGbl_RootTableList.Count - 1; + TableIndex = AcpiGbl_RootTableList.CurrentTableCount - 1; /* Pass 2 */ Modified: stable/8/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adwalk.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/adwalk.c Fri Nov 19 14:26:45 2010 (r215521) @@ -537,7 +537,7 @@ AcpiDmFindOrphanDescending ( } ArgCount = AcpiDmInspectPossibleArgs (3, 1, NextOp); - AcpiOsPrintf ("/* A-CHILDREN: %d Actual %d */\n", ArgCount, AcpiDmCountChildren (Op)); + AcpiOsPrintf ("/* A-CHILDREN: %u Actual %u */\n", ArgCount, AcpiDmCountChildren (Op)); if (ArgCount < 1) { @@ -792,6 +792,7 @@ AcpiDmXrefDescendingOp ( ACPI_PARSE_OBJECT *NextOp; ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *Object; + UINT32 ParamCount = 0; WalkState = Info->WalkState; @@ -880,18 +881,13 @@ AcpiDmXrefDescendingOp ( if (Object) { ObjectType2 = Object->Common.Type; + if (ObjectType2 == ACPI_TYPE_METHOD) + { + ParamCount = Object->Method.ParamCount; + } } - if (ObjectType2 == ACPI_TYPE_METHOD) - { - AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_METHOD, - Object->Method.ParamCount); - } - else - { - AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, 0); - } - + AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount); Op->Common.Node = Node; } else Modified: stable/8/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/dmextern.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/dmextern.c Fri Nov 19 14:26:45 2010 (r215521) @@ -252,7 +252,7 @@ AcpiDmNormalizeParentPrefix ( Node = Op->Common.Node; while (Node && (*Path == (UINT8) AML_PARENT_PREFIX)) { - Node = AcpiNsGetParentNode (Node); + Node = Node->Parent; Path++; } @@ -312,6 +312,95 @@ Cleanup: /******************************************************************************* * + * FUNCTION: AcpiDmAddToExternalFileList + * + * PARAMETERS: PathList - Single path or list separated by comma + * + * RETURN: None + * + * DESCRIPTION: Add external files to global list + * + ******************************************************************************/ + +ACPI_STATUS +AcpiDmAddToExternalFileList ( + char *PathList) +{ + ACPI_EXTERNAL_FILE *ExternalFile; + char *Path; + char *TmpPath; + + + if (!PathList) + { + return (AE_OK); + } + + Path = strtok (PathList, ","); + + while (Path) + { + TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1); + if (!TmpPath) + { + return (AE_NO_MEMORY); + } + + ACPI_STRCPY (TmpPath, Path); + + ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE)); + if (!ExternalFile) + { + ACPI_FREE (TmpPath); + return (AE_NO_MEMORY); + } + + ExternalFile->Path = TmpPath; + + if (AcpiGbl_ExternalFileList) + { + ExternalFile->Next = AcpiGbl_ExternalFileList; + } + + AcpiGbl_ExternalFileList = ExternalFile; + Path = strtok (NULL, ","); + } + + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmClearExternalFileList + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Clear the external file list + * + ******************************************************************************/ + +void +AcpiDmClearExternalFileList ( + void) +{ + ACPI_EXTERNAL_FILE *NextExternal; + + + while (AcpiGbl_ExternalFileList) + { + NextExternal = AcpiGbl_ExternalFileList->Next; + ACPI_FREE (AcpiGbl_ExternalFileList->Path); + ACPI_FREE (AcpiGbl_ExternalFileList); + AcpiGbl_ExternalFileList = NextExternal; + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmAddToExternalList * * PARAMETERS: Op - Current parser Op @@ -629,7 +718,7 @@ AcpiDmEmitExternals ( if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD) { - AcpiOsPrintf (") // %d Arguments\n", + AcpiOsPrintf (") // %u Arguments\n", AcpiGbl_ExternalList->Value); } else Modified: stable/8/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/dmrestag.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/dmrestag.c Fri Nov 19 14:26:45 2010 (r215521) @@ -549,13 +549,6 @@ AcpiDmGetResourceNode ( return (Node); } - /* List is circular, this flag marks the end */ - - if (Node->Flags & ANOBJ_END_OF_PEER_LIST) - { - return (NULL); - } - Node = Node->Peer; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 15:21:53 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1199A106566C; Fri, 19 Nov 2010 15:21:53 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id A235F8FC23; Fri, 19 Nov 2010 15:21:52 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 59FF01DD651; Fri, 19 Nov 2010 16:21:51 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 4D9DC17042; Fri, 19 Nov 2010 16:21:51 +0100 (CET) Date: Fri, 19 Nov 2010 16:21:51 +0100 From: Jilles Tjoelker To: Andrew Thompson Message-ID: <20101119152151.GC7614@stack.nl> References: <201011190117.oAJ1HnOT051021@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011190117.oAJ1HnOT051021@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215475 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:21:53 -0000 On Fri, Nov 19, 2010 at 01:17:49AM +0000, Andrew Thompson wrote: > Author: thompsa > Date: Fri Nov 19 01:17:49 2010 > New Revision: 215475 > URL: http://svn.freebsd.org/changeset/base/215475 > Log: > MFC r203774 > Use more standard way for setting nonblocking flag for a filedescriptor. > This makes libusb porting a bit easier. > Modified: > stable/8/lib/libusb/libusb10.c > Directory Properties: > stable/8/lib/libusb/ (props changed) > stable/8/lib/libusb/usb.h (props changed) > > Modified: stable/8/lib/libusb/libusb10.c > ============================================================================== > --- stable/8/lib/libusb/libusb10.c Thu Nov 18 23:46:55 2010 (r215474) > +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 01:17:49 2010 (r215475) [...] > @@ -105,10 +105,12 @@ libusb_init(libusb_context **context) > return (LIBUSB_ERROR_OTHER); > } > /* set non-blocking mode on the control pipe to avoid deadlock */ > - ret = 1; > - ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); > - ret = 1; > - ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); > + flag = 1; > + ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); > + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); > + flag = 1; > + ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); > + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); > > libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); This is not the correct way to use fcntl() to turn on non-blocking mode. The correct way is flag = fcntl(ctx->ctrl_pipe[0], F_GETFL, 0); if (flag != -1) { ret = fcntl(ctx->ctrl_pipe[0], F_SETFL, flag | O_NONBLOCK); if (ret == -1) handle_error(); } else handle_error(); substituting some sort of error handling for handle_error(). This has been fixed in head in r213853, but that commit also makes other changes. It turns out that on FreeBSD both F_SETFL and O_NONBLOCK have the value 4, so there is some chance the desired result is achieved and fcntl() will not fail. It may also set other flags for the open file description, which could lead to unexpected results. -- Jilles Tjoelker From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 16:24:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B8E91065673; Fri, 19 Nov 2010 16:24:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5ADFB8FC15; Fri, 19 Nov 2010 16:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJGOCEp080202; Fri, 19 Nov 2010 16:24:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJGOCTM080200; Fri, 19 Nov 2010 16:24:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191624.oAJGOCTM080200@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 16:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215527 - stable/8/sys/x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:24:12 -0000 Author: jhb Date: Fri Nov 19 16:24:12 2010 New Revision: 215527 URL: http://svn.freebsd.org/changeset/base/215527 Log: MFC 215001: Only dump the values of the PMC and CMCI local vector table entries on a local APIC if those LVT entries are valid. This quiets spurious illegal register local APIC errors during boot on a CPU that doesn't support those vectors. Modified: stable/8/sys/x86/x86/local_apic.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/x86/x86/local_apic.c ============================================================================== --- stable/8/sys/x86/x86/local_apic.c Fri Nov 19 15:39:59 2010 (r215526) +++ stable/8/sys/x86/x86/local_apic.c Fri Nov 19 16:24:12 2010 (r215527) @@ -290,16 +290,21 @@ lapic_create(u_int apic_id, int boot_cpu void lapic_dump(const char* str) { + uint32_t maxlvt; + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; printf("cpu%d %s:\n", PCPU_GET(cpuid), str); printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n", lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", - lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, - lapic->lvt_pcint); - printf(" cmci: 0x%08x\n", lapic->lvt_cmci); + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x", + lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error); + if (maxlvt >= LVT_PMC) + printf(" pmc: 0x%08x", lapic->lvt_pcint); + printf("\n"); + if (maxlvt >= LVT_CMCI) + printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } void From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 16:52:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BAB11065670; Fri, 19 Nov 2010 16:52:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF358FC0A; Fri, 19 Nov 2010 16:52:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJGqI3q081081; Fri, 19 Nov 2010 16:52:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJGqINX081079; Fri, 19 Nov 2010 16:52:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191652.oAJGqINX081079@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 16:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215529 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:52:18 -0000 Author: jhb Date: Fri Nov 19 16:52:18 2010 New Revision: 215529 URL: http://svn.freebsd.org/changeset/base/215529 Log: MFC 214782: Update startup_alloc() to support multi-page allocations and allow internal zones whose objects are larger than a page to use startup_alloc(). This allows allocation of zone objects during early boot on machines with a large number of CPUs since the resulting zone objects are larger than a page. Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Fri Nov 19 16:26:51 2010 (r215528) +++ stable/8/sys/vm/uma_core.c Fri Nov 19 16:52:18 2010 (r215529) @@ -932,15 +932,32 @@ startup_alloc(uma_zone_t zone, int bytes { uma_keg_t keg; uma_slab_t tmps; + int pages, check_pages; keg = zone_first_keg(zone); + pages = howmany(bytes, PAGE_SIZE); + check_pages = pages - 1; + KASSERT(pages > 0, ("startup_alloc can't reserve 0 pages\n")); /* * Check our small startup cache to see if it has pages remaining. */ mtx_lock(&uma_boot_pages_mtx); - if ((tmps = LIST_FIRST(&uma_boot_pages)) != NULL) { - LIST_REMOVE(tmps, us_link); + + /* First check if we have enough room. */ + tmps = LIST_FIRST(&uma_boot_pages); + while (tmps != NULL && check_pages-- > 0) + tmps = LIST_NEXT(tmps, us_link); + if (tmps != NULL) { + /* + * It's ok to lose tmps references. The last one will + * have tmps->us_data pointing to the start address of + * "pages" contiguous pages of memory. + */ + while (pages-- > 0) { + tmps = LIST_FIRST(&uma_boot_pages); + LIST_REMOVE(tmps, us_link); + } mtx_unlock(&uma_boot_pages_mtx); *pflag = tmps->us_flags; return (tmps->us_data); @@ -952,7 +969,7 @@ startup_alloc(uma_zone_t zone, int bytes * Now that we've booted reset these users to their real allocator. */ #ifdef UMA_MD_SMALL_ALLOC - keg->uk_allocf = uma_small_alloc; + keg->uk_allocf = (keg->uk_ppera > 1) ? page_alloc : uma_small_alloc; #else keg->uk_allocf = page_alloc; #endif @@ -1181,12 +1198,15 @@ keg_large_init(uma_keg_t keg) keg->uk_ppera = pages; keg->uk_ipers = 1; + keg->uk_rsize = keg->uk_size; + + /* We can't do OFFPAGE if we're internal, bail out here. */ + if (keg->uk_flags & UMA_ZFLAG_INTERNAL) + return; keg->uk_flags |= UMA_ZONE_OFFPAGE; if ((keg->uk_flags & UMA_ZONE_VTOSLAB) == 0) keg->uk_flags |= UMA_ZONE_HASH; - - keg->uk_rsize = keg->uk_size; } static void @@ -1305,7 +1325,8 @@ keg_ctor(void *mem, int size, void *udat #endif if (booted == 0) keg->uk_allocf = startup_alloc; - } + } else if (booted == 0 && (keg->uk_flags & UMA_ZFLAG_INTERNAL)) + keg->uk_allocf = startup_alloc; /* * Initialize keg's lock (shared among zones). @@ -1334,7 +1355,7 @@ keg_ctor(void *mem, int size, void *udat if (totsize & UMA_ALIGN_PTR) totsize = (totsize & ~UMA_ALIGN_PTR) + (UMA_ALIGN_PTR + 1); - keg->uk_pgoff = UMA_SLAB_SIZE - totsize; + keg->uk_pgoff = (UMA_SLAB_SIZE * keg->uk_ppera) - totsize; if (keg->uk_flags & UMA_ZONE_REFCNT) totsize = keg->uk_pgoff + sizeof(struct uma_slab_refcnt) @@ -1350,7 +1371,7 @@ keg_ctor(void *mem, int size, void *udat * mathematically possible for all cases, so we make * sure here anyway. */ - if (totsize > UMA_SLAB_SIZE) { + if (totsize > UMA_SLAB_SIZE * keg->uk_ppera) { printf("zone %s ipers %d rsize %d size %d\n", zone->uz_name, keg->uk_ipers, keg->uk_rsize, keg->uk_size); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 17:04:56 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22CF1106564A; Fri, 19 Nov 2010 17:04:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10D798FC26; Fri, 19 Nov 2010 17:04:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJH4tvu081607; Fri, 19 Nov 2010 17:04:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH4tAH081605; Fri, 19 Nov 2010 17:04:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191704.oAJH4tAH081605@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215530 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:04:56 -0000 Author: marius Date: Fri Nov 19 17:04:55 2010 New Revision: 215530 URL: http://svn.freebsd.org/changeset/base/215530 Log: MFC: r214879 Implement pmap_is_prefaultable(). Reviewed by: alc (with bugfix) Modified: stable/8/sys/sparc64/sparc64/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Fri Nov 19 16:52:18 2010 (r215529) +++ stable/8/sys/sparc64/sparc64/pmap.c Fri Nov 19 17:04:55 2010 (r215530) @@ -1928,8 +1928,12 @@ pmap_is_modified(vm_page_t m) boolean_t pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr) { + boolean_t rv; - return (FALSE); + PMAP_LOCK(pmap); + rv = tsb_tte_lookup(pmap, addr) == NULL; + PMAP_UNLOCK(pmap); + return (rv); } void From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 17:07:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44BD1106564A; Fri, 19 Nov 2010 17:07:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33D158FC18; Fri, 19 Nov 2010 17:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJH7X67081802; Fri, 19 Nov 2010 17:07:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH7XLL081800; Fri, 19 Nov 2010 17:07:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191707.oAJH7XLL081800@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215532 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:07:33 -0000 Author: marius Date: Fri Nov 19 17:07:32 2010 New Revision: 215532 URL: http://svn.freebsd.org/changeset/base/215532 Log: MFC: r215300 Remove redundant cases and a style(9) bug. Modified: stable/8/sys/dev/mii/xmphy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/xmphy.c ============================================================================== --- stable/8/sys/dev/mii/xmphy.c Fri Nov 19 17:04:57 2010 (r215531) +++ stable/8/sys/dev/mii/xmphy.c Fri Nov 19 17:07:32 2010 (r215532) @@ -167,7 +167,7 @@ xmphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN) return (0); #endif - (void) xmphy_mii_phy_auto(sc); + (void)xmphy_mii_phy_auto(sc); break; case IFM_1000_SX: mii_phy_reset(sc); @@ -179,9 +179,6 @@ xmphy_service(struct mii_softc *sc, stru PHY_WRITE(sc, XMPHY_MII_BMCR, 0); } break; - case IFM_100_T4: - case IFM_100_TX: - case IFM_10_T: default: return (EINVAL); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 17:08:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E521065672; Fri, 19 Nov 2010 17:08:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87E8F8FC14; Fri, 19 Nov 2010 17:08:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJH8FdL081885; Fri, 19 Nov 2010 17:08:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH8FXg081877; Fri, 19 Nov 2010 17:08:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191708.oAJH8FXg081877@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215534 - stable/8/usr.sbin/mptutil X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:08:15 -0000 Author: jhb Date: Fri Nov 19 17:08:15 2010 New Revision: 215534 URL: http://svn.freebsd.org/changeset/base/215534 Log: MFC 204352, 208028, 209266, 209399, 210723, 213672, 215046: - Fixed static linkage. - Document that mptutil/mpt do not support RAID volumes in excess of 2TB. - Report subcommand handler errors so that tools that invoke mptutil can robustly report errors. - Save errno values before calling warn(3) so that errors are correctly reported. - Check for malloc() failures. Modified: stable/8/usr.sbin/mptutil/Makefile stable/8/usr.sbin/mptutil/mpt_cam.c stable/8/usr.sbin/mptutil/mpt_cmd.c stable/8/usr.sbin/mptutil/mpt_config.c stable/8/usr.sbin/mptutil/mpt_drive.c stable/8/usr.sbin/mptutil/mpt_evt.c stable/8/usr.sbin/mptutil/mpt_show.c stable/8/usr.sbin/mptutil/mpt_volume.c stable/8/usr.sbin/mptutil/mptutil.8 stable/8/usr.sbin/mptutil/mptutil.c Directory Properties: stable/8/usr.sbin/mptutil/ (props changed) Modified: stable/8/usr.sbin/mptutil/Makefile ============================================================================== --- stable/8/usr.sbin/mptutil/Makefile Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/Makefile Fri Nov 19 17:08:15 2010 (r215534) @@ -8,8 +8,8 @@ MAN= mptutil.8 WARNS?= 3 -DPADD+= ${LIBCAM} ${LIBUTIL} -LDADD+= -lcam -lutil +DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} +LDADD= -lcam -lsbuf -lutil # Here be dragons .ifdef DEBUG Modified: stable/8/usr.sbin/mptutil/mpt_cam.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_cam.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_cam.c Fri Nov 19 17:08:15 2010 (r215534) @@ -63,6 +63,7 @@ fetch_path_id(path_id_t *path_id) struct bus_match_pattern *b; union ccb ccb; size_t bufsize; + int error; if (xpt_open() < 0) return (ENXIO); @@ -91,9 +92,10 @@ fetch_path_id(path_id_t *path_id) b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (errno); + return (error); } free(ccb.cdm.patterns); @@ -124,7 +126,7 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID union ccb ccb; path_id_t path_id; size_t bufsize; - int error, i; + int error; /* mpt(4) only handles devices on bus 0. */ if (VolumeBus != 0) @@ -164,10 +166,10 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME | PERIPH_MATCH_TARGET; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - i = errno; + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (i); + return (error); } free(ccb.cdm.patterns); @@ -397,8 +399,8 @@ mpt_fetch_disks(int fd, int *ndisks, str union ccb ccb; path_id_t path_id; size_t bufsize; - u_int i; int count, error; + uint32_t i; if (xpt_open() < 0) return (ENXIO); @@ -431,10 +433,10 @@ mpt_fetch_disks(int fd, int *ndisks, str p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - i = errno; + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (i); + return (error); } free(ccb.cdm.patterns); @@ -481,6 +483,8 @@ mpt_fetch_disks(int fd, int *ndisks, str * exclude them from the list. */ ioc2 = mpt_read_ioc_page(fd, 2, NULL); + if (ioc2 == NULL) + return (errno); disks = calloc(ccb.cdm.num_matches, sizeof(*disks)); count = 0; for (i = 0; i < ccb.cdm.num_matches; i++) { Modified: stable/8/usr.sbin/mptutil/mpt_cmd.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_cmd.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_cmd.c Fri Nov 19 17:08:15 2010 (r215534) @@ -310,18 +310,15 @@ mpt_lookup_volume(int fd, const char *na id = strtol(cp + 1, &cp, 0); if (*cp == '\0') { if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { - errno = EINVAL; - return (-1); + return (EINVAL); } *VolumeBus = bus; *VolumeID = id; return (0); } } else if (*cp == '\0') { - if (bus < 0 || bus > 0xff) { - errno = EINVAL; - return (-1); - } + if (bus < 0 || bus > 0xff) + return (EINVAL); *VolumeBus = 0; *VolumeID = bus; return (0); @@ -329,7 +326,7 @@ mpt_lookup_volume(int fd, const char *na ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) - return (-1); + return (errno); vol = ioc2->RaidVolume; for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { @@ -343,8 +340,7 @@ mpt_lookup_volume(int fd, const char *na } } free(ioc2); - errno = EINVAL; - return (-1); + return (EINVAL); } int @@ -360,15 +356,14 @@ mpt_read_config_page_header(int fd, U8 P req.header.PageNumber = PageNumber; req.page_address = PageAddress; if (ioctl(fd, MPTIO_READ_CFG_HEADER, &req) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) *IOCStatus = req.ioc_status; else warnx("Reading config page header failed: %s", mpt_ioc_status(req.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } *header = req.header; return (0); @@ -380,7 +375,7 @@ mpt_read_config_page(int fd, U8 PageType { struct mpt_cfg_page_req req; void *buf; - int save_errno; + int error; if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; @@ -404,9 +399,9 @@ mpt_read_config_page(int fd, U8 PageType req.buf = buf; bcopy(&req.header, buf, sizeof(req.header)); if (ioctl(fd, MPTIO_READ_CFG_PAGE, &req) < 0) { - save_errno = errno; + error = errno; free(buf); - errno = save_errno; + errno = error; return (NULL); } if (!IOC_STATUS_SUCCESS(req.ioc_status)) { @@ -428,7 +423,7 @@ mpt_read_extended_config_page(int fd, U8 { struct mpt_ext_cfg_page_req req; void *buf; - int save_errno; + int error; if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; @@ -453,9 +448,9 @@ mpt_read_extended_config_page(int fd, U8 req.buf = buf; bcopy(&req.header, buf, sizeof(req.header)); if (ioctl(fd, MPTIO_READ_EXT_CFG_PAGE, &req) < 0) { - save_errno = errno; + error = errno; free(buf); - errno = save_errno; + errno = error; return (NULL); } if (!IOC_STATUS_SUCCESS(req.ioc_status)) { @@ -484,7 +479,7 @@ mpt_write_config_page(int fd, void *buf, hdr = buf; req.len = hdr->PageLength * 4; if (ioctl(fd, MPTIO_WRITE_CFG_PAGE, &req) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) { *IOCStatus = req.ioc_status; @@ -492,8 +487,7 @@ mpt_write_config_page(int fd, void *buf, } warnx("Writing config page failed: %s", mpt_ioc_status(req.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } return (0); } @@ -507,10 +501,8 @@ mpt_raid_action(int fd, U8 Action, U8 Vo if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; - if (datalen < 0 || (unsigned)datalen > sizeof(raid_act.action_data)) { - errno = EINVAL; - return (-1); - } + if (datalen < 0 || (unsigned)datalen > sizeof(raid_act.action_data)) + return (EINVAL); bzero(&raid_act, sizeof(raid_act)); raid_act.action = Action; raid_act.volume_bus = VolumeBus; @@ -524,7 +516,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo } if (ioctl(fd, MPTIO_RAID_ACTION, &raid_act) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(raid_act.ioc_status)) { if (IOCStatus != NULL) { @@ -533,8 +525,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo } warnx("RAID action failed: %s", mpt_ioc_status(raid_act.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } if (ActionStatus != NULL) @@ -544,8 +535,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo return (0); warnx("RAID action failed: %s", mpt_raid_status(raid_act.action_status)); - errno = EIO; - return (-1); + return (EIO); } if (VolumeStatus != NULL) Modified: stable/8/usr.sbin/mptutil/mpt_config.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_config.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_config.c Fri Nov 19 17:08:15 2010 (r215534) @@ -102,15 +102,15 @@ mpt_lock_volume(U8 VolumeBus, U8 VolumeI */ return (0); if (error) { - errno = error; - warn("Unable to lookup volume device name"); - return (-1); + warnc(error, "Unable to lookup volume device name"); + return (error); } snprintf(path, sizeof(path), "%s%s", _PATH_DEV, qd.devname); vfd = open(path, O_RDWR); if (vfd < 0) { + error = errno; warn("Unable to lock volume %s", qd.devname); - return (-1); + return (error); } return (0); } @@ -119,13 +119,14 @@ static int mpt_lock_physdisk(struct mpt_standalone_disk *disk) { char path[MAXPATHLEN]; - int dfd; + int dfd, error; snprintf(path, sizeof(path), "%s%s", _PATH_DEV, disk->devname); dfd = open(path, O_RDWR); if (dfd < 0) { + error = errno; warn("Unable to lock disk %s", disk->devname); - return (-1); + return (error); } return (0); } @@ -144,8 +145,7 @@ mpt_lookup_standalone_disk(const char *n id = strtol(cp + 1, &cp, 0); if (*cp == '\0') { if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { - errno = EINVAL; - return (-1); + return (EINVAL); } for (i = 0; i < ndisks; i++) { if (disks[i].bus == (U8)bus && @@ -154,8 +154,7 @@ mpt_lookup_standalone_disk(const char *n return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } } @@ -166,12 +165,10 @@ mpt_lookup_standalone_disk(const char *n return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } - errno = EINVAL; - return (-1); + return (EINVAL); } /* @@ -182,16 +179,17 @@ mpt_create_physdisk(int fd, struct mpt_s { CONFIG_PAGE_HEADER header; CONFIG_PAGE_RAID_PHYS_DISK_0 *config_page; + int error; U32 ActionData; - if (mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, - 0, 0, &header, NULL) < 0) - return (-1); + error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, + 0, 0, &header, NULL); + if (error) + return (error); if (header.PageVersion > MPI_RAIDPHYSDISKPAGE0_PAGEVERSION) { warnx("Unsupported RAID physdisk page 0 version %d", header.PageVersion); - errno = EOPNOTSUPP; - return (-1); + return (EOPNOTSUPP); } config_page = calloc(1, sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0)); config_page->Header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; @@ -203,10 +201,11 @@ mpt_create_physdisk(int fd, struct mpt_s config_page->PhysDiskID = disk->target; /* XXX: Enclosure info for PhysDiskSettings? */ - if (mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, config_page, sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0), NULL, - &ActionData, sizeof(ActionData), NULL, NULL, 1) < 0) - return (-1); + &ActionData, sizeof(ActionData), NULL, NULL, 1); + if (error) + return (error); *PhysDiskNum = ActionData & 0xff; return (0); } @@ -232,18 +231,20 @@ clear_config(int ac, char **av) IOC_3_PHYS_DISK *disk; CONFIG_PAGE_IOC_5 *ioc5; IOC_5_HOT_SPARE *spare; - int ch, fd, i; + int ch, error, fd, i; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); - return (errno); + return (error); } /* Lock all the volumes first. */ @@ -267,14 +268,16 @@ clear_config(int ac, char **av) /* Delete all the volumes. */ vol = ioc2->RaidVolume; - for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) - if (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, + for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { + error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, vol->VolumeBus, vol->VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | MPI_RAID_ACTION_ADATA_ZERO_LBA0, NULL, 0, NULL, NULL, 0, - NULL, NULL, 0) < 0) - warn("Failed to delete volume %s", + NULL, NULL, 0); + if (error) + warnc(error, "Failed to delete volume %s", mpt_volume_name(vol->VolumeBus, vol->VolumeID)); + } free(ioc2); /* Delete all the spares. */ @@ -411,8 +414,9 @@ parse_volume(int fd, int raid_type, stru /* See if it is a standalone disk. */ if (mpt_lookup_standalone_disk(cp, state->sdisks, state->nsdisks, &i) < 0) { + error = errno; warn("Unable to lookup drive %s", cp); - return (errno); + return (error); } dinfo->sdisk = &state->sdisks[i]; @@ -433,17 +437,18 @@ add_drives(int fd, struct volume_info *i { struct drive_info *dinfo; U8 PhysDiskNum; - int i; + int error, i; for (i = 0, dinfo = info->drives; i < info->drive_count; i++, dinfo++) { if (dinfo->info == NULL) { if (mpt_create_physdisk(fd, dinfo->sdisk, &PhysDiskNum) < 0) { + error = errno; warn( "Failed to create physical disk page for %s", dinfo->sdisk->devname); - return (errno); + return (error); } if (verbose) printf("Added drive %s with PhysDiskNum %u\n", @@ -500,11 +505,14 @@ build_volume(int fd, struct volume_info U32 MinLBA; uint64_t MaxLBA; size_t page_size; - int i; + int error, i; - if (mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_VOLUME, - 0, 0, &header, NULL) < 0) + error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_VOLUME, + 0, 0, &header, NULL); + if (error) { + errno = error; return (NULL); + } if (header.PageVersion > MPI_RAIDVOLPAGE0_PAGEVERSION) { warnx("Unsupported RAID volume page 0 version %d", header.PageVersion); @@ -514,6 +522,8 @@ build_volume(int fd, struct volume_info page_size = sizeof(CONFIG_PAGE_RAID_VOL_0) + sizeof(RAID_VOL0_PHYS_DISK) * (info->drive_count - 1); vol = calloc(1, page_size); + if (vol == NULL) + return (NULL); /* Header */ vol->Header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; @@ -607,8 +617,8 @@ create_volume(int ac, char **av) CONFIG_PAGE_RAID_VOL_0 *vol; struct config_id_state state; struct volume_info *info; - int ch, error, fd, i, raid_type, verbose, quick; long stripe_size; + int ch, error, fd, i, quick, raid_type, verbose; #ifdef DEBUG int dump; #endif @@ -620,8 +630,9 @@ create_volume(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } /* Lookup the RAID type first. */ @@ -677,8 +688,9 @@ create_volume(int ac, char **av) /* Fetch existing config data. */ state.ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (state.ioc2 == NULL) { + error = errno; warn("Failed to read volume list"); - return (errno); + return (error); } state.list = mpt_pd_list(fd); if (state.list == NULL) @@ -696,6 +708,8 @@ create_volume(int ac, char **av) return (EINVAL); } info = calloc(1, sizeof(*info)); + if (info == NULL) + return (ENOMEM); error = parse_volume(fd, raid_type, &state, av[0], info); if (error) return (error); @@ -707,6 +721,8 @@ create_volume(int ac, char **av) /* Build the volume. */ vol = build_volume(fd, info, raid_type, stripe_size, &state, verbose); + if (vol == NULL) + return (errno); #ifdef DEBUG if (dump) { @@ -716,12 +732,13 @@ create_volume(int ac, char **av) #endif /* Send the new volume to the controller. */ - if (mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_VOLUME, vol->VolumeBus, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_VOLUME, vol->VolumeBus, vol->VolumeID, 0, quick ? MPI_RAID_ACTION_ADATA_DO_NOT_SYNC : 0, - vol, vol->Header.PageLength * 4, NULL, NULL, 0, NULL, NULL, 1) < - 0) { + vol, vol->Header.PageLength * 4, NULL, NULL, 0, NULL, NULL, 1); + if (error) { + errno = error; warn("Failed to add volume"); - return (errno); + return (error); } #ifdef DEBUG @@ -745,7 +762,7 @@ static int delete_volume(int ac, char **av) { U8 VolumeBus, VolumeID; - int fd; + int error, fd; if (ac != 2) { warnx("delete: volume required"); @@ -754,24 +771,27 @@ delete_volume(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } - if (mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume %s", av[1]); - return (errno); + error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume %s", av[1]); + return (error); } if (mpt_lock_volume(VolumeBus, VolumeID) < 0) return (errno); - if (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, + error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | MPI_RAID_ACTION_ADATA_ZERO_LBA0, NULL, 0, NULL, NULL, 0, NULL, - NULL, 0) < 0) { - warn("Failed to delete volume"); - return (errno); + NULL, 0); + if (error) { + warnc(error, "Failed to delete volume"); + return (error); } mpt_rescan_bus(-1, -1); @@ -788,16 +808,17 @@ find_volume_spare_pool(int fd, const cha CONFIG_PAGE_IOC_2 *ioc2; CONFIG_PAGE_IOC_2_RAID_VOL *vol; U8 VolumeBus, VolumeID; - int i, j, new_pool, pool_count[7]; + int error, i, j, new_pool, pool_count[7]; - if (mpt_lookup_volume(fd, name, &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume %s", name); - return (-1); + error = mpt_lookup_volume(fd, name, &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume %s", name); + return (error); } info = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (info == NULL) - return (-1); + return (errno); /* * Check for an existing pool other than pool 0 (used for @@ -817,15 +838,16 @@ find_volume_spare_pool(int fd, const cha */ ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); - return (-1); + return (error); } bzero(pool_count, sizeof(pool_count)); vol = ioc2->RaidVolume; for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { info = mpt_vol_info(fd, vol->VolumeBus, vol->VolumeID, NULL); if (info == NULL) - return (-1); + return (errno); for (j = 0; j < 7; j++) if (info->VolumeSettings.HotSparePool & (1 << (j + 1))) pool_count[j]++; @@ -843,14 +865,15 @@ find_volume_spare_pool(int fd, const cha /* Add this pool to the volume. */ info = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (info == NULL) - return (-1); + return (error); info->VolumeSettings.HotSparePool |= (1 << new_pool); - if (mpt_raid_action(fd, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, VolumeBus, VolumeID, 0, *(U32 *)&info->VolumeSettings, NULL, 0, - NULL, NULL, 0, NULL, NULL, 0) < 0) { + NULL, NULL, 0, NULL, NULL, 0); + if (error) { warnx("Failed to add spare pool %d to %s", new_pool, mpt_volume_name(VolumeBus, VolumeID)); - return (-1); + return (error); } free(info); @@ -878,13 +901,15 @@ add_spare(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } if (ac == 3) { - if (find_volume_spare_pool(fd, av[2], &pool) < 0) - return (errno); + error = find_volume_spare_pool(fd, av[2], &pool); + if (error) + return (error); } else pool = MPI_RAID_HOT_SPARE_POOL_0; @@ -902,16 +927,18 @@ add_spare(int ac, char **av) if (mpt_lookup_standalone_disk(av[1], sdisks, nsdisks, &i) < 0) { + error = errno; warn("Unable to lookup drive %s", av[1]); - return (errno); + return (error); } if (mpt_lock_physdisk(&sdisks[i]) < 0) return (errno); if (mpt_create_physdisk(fd, &sdisks[i], &PhysDiskNum) < 0) { + error = errno; warn("Failed to create physical disk page"); - return (errno); + return (error); } free(sdisks); } @@ -919,8 +946,9 @@ add_spare(int ac, char **av) info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } info->PhysDiskSettings.HotSparePool = pool; @@ -928,8 +956,8 @@ add_spare(int ac, char **av) 0, PhysDiskNum, *(U32 *)&info->PhysDiskSettings, NULL, 0, NULL, NULL, 0, NULL, NULL, 0); if (error) { - warn("Failed to assign spare"); - return (errno); + warnc(error, "Failed to assign spare"); + return (error); } free(info); @@ -954,8 +982,9 @@ remove_spare(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -972,8 +1001,9 @@ remove_spare(int ac, char **av) info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } if (info->PhysDiskSettings.HotSparePool == 0) { @@ -982,8 +1012,9 @@ remove_spare(int ac, char **av) } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { + error = errno; warn("Failed to delete physical disk page"); - return (errno); + return (error); } mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); @@ -1011,8 +1042,9 @@ pd_create(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } error = mpt_fetch_disks(fd, &ndisks, &disks); @@ -1022,16 +1054,18 @@ pd_create(int ac, char **av) } if (mpt_lookup_standalone_disk(av[1], disks, ndisks, &i) < 0) { + error = errno; warn("Unable to lookup drive"); - return (errno); + return (error); } if (mpt_lock_physdisk(&disks[i]) < 0) return (errno); if (mpt_create_physdisk(fd, &disks[i], &PhysDiskNum) < 0) { + error = errno; warn("Failed to create physical disk page"); - return (errno); + return (error); } free(disks); @@ -1048,7 +1082,7 @@ pd_delete(int ac, char **av) { CONFIG_PAGE_RAID_PHYS_DISK_0 *info; struct mpt_drive_list *list; - int fd; + int error, fd; U8 PhysDiskNum; if (ac != 2) { @@ -1058,8 +1092,9 @@ pd_delete(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -1067,20 +1102,23 @@ pd_delete(int ac, char **av) return (errno); if (mpt_lookup_drive(list, av[1], &PhysDiskNum) < 0) { + error = errno; warn("Failed to find drive %s", av[1]); - return (errno); + return (error); } mpt_free_pd_list(list); info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { + error = errno; warn("Failed to delete physical disk page"); - return (errno); + return (error); } mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); @@ -1126,7 +1164,7 @@ debug_config(int ac, char **av) { CONFIG_PAGE_RAID_VOL_0 *vol; U8 VolumeBus, VolumeID; - int fd; + int error, fd; if (ac != 2) { warnx("debug: volume required"); @@ -1135,19 +1173,22 @@ debug_config(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } - if (mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume: %s", av[1]); - return (errno); + error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume: %s", av[1]); + return (error); } vol = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (vol == NULL) { + error = errno; warn("Failed to get volume info"); - return (errno); + return (error); } dump_config(vol); Modified: stable/8/usr.sbin/mptutil/mpt_drive.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_drive.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_drive.c Fri Nov 19 17:08:15 2010 (r215534) @@ -129,7 +129,7 @@ mpt_pd_insert(int fd, struct mpt_drive_l list->drives[j + 1] = list->drives[j]; list->drives[i] = mpt_pd_info(fd, PhysDiskNum, NULL); if (list->drives[i] == NULL) - return (-1); + return (errno); list->ndrives++; return (0); } @@ -146,26 +146,32 @@ mpt_pd_list(int fd) CONFIG_PAGE_IOC_5 *ioc5; IOC_5_HOT_SPARE *spare; struct mpt_drive_list *list; - int count, i, j; + int count, error, i, j; ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); + errno = error; return (NULL); } ioc3 = mpt_read_ioc_page(fd, 3, NULL); if (ioc3 == NULL) { + error = errno; warn("Failed to fetch drive list"); free(ioc2); + errno = error; return (NULL); } ioc5 = mpt_read_ioc_page(fd, 5, NULL); if (ioc5 == NULL) { + error = errno; warn("Failed to fetch spare list"); free(ioc3); free(ioc2); + errno = error; return (NULL); } @@ -180,7 +186,9 @@ mpt_pd_list(int fd) volumes[i] = mpt_vol_info(fd, vol->VolumeBus, vol->VolumeID, NULL); if (volumes[i] == NULL) { + error = errno; warn("Failed to read volume info"); + errno = error; return (NULL); } count += volumes[i]->NumPhysDisks; @@ -264,13 +272,11 @@ mpt_lookup_drive(struct mpt_drive_list * return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } bad: - errno = EINVAL; - return (-1); + return (EINVAL); } /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ @@ -306,12 +312,13 @@ drive_set_state(char *drive, U8 Action, CONFIG_PAGE_RAID_PHYS_DISK_0 *info; struct mpt_drive_list *list; U8 PhysDiskNum; - int fd; + int error, fd; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -319,16 +326,18 @@ drive_set_state(char *drive, U8 Action, return (errno); if (mpt_lookup_drive(list, drive, &PhysDiskNum) < 0) { + error = errno; warn("Failed to find drive %s", drive); - return (errno); + return (error); } mpt_free_pd_list(list); /* Get the info for this drive. */ info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch info for drive %u", PhysDiskNum); - return (errno); + return (error); } /* Try to change the state. */ @@ -337,10 +346,11 @@ drive_set_state(char *drive, U8 Action, return (EINVAL); } - if (mpt_raid_action(fd, Action, 0, 0, PhysDiskNum, 0, NULL, 0, NULL, - NULL, 0, NULL, NULL, 0) < 0) { - warn("Failed to set drive %u to %s", PhysDiskNum, name); - return (errno); + error = mpt_raid_action(fd, Action, 0, 0, PhysDiskNum, 0, NULL, 0, NULL, + NULL, 0, NULL, NULL, 0); + if (error) { + warnc(error, "Failed to set drive %u to %s", PhysDiskNum, name); + return (error); } free(info); Modified: stable/8/usr.sbin/mptutil/mpt_evt.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_evt.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_evt.c Fri Nov 19 17:08:15 2010 (r215534) @@ -94,18 +94,20 @@ show_events(int ac, char **av) { CONFIG_PAGE_LOG_0 *log; MPI_LOG_0_ENTRY **entries; - int ch, fd, i, num_events, verbose; + int ch, error, fd, i, num_events, verbose; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } log = mpt_get_events(fd, NULL); if (log == NULL) { + error = errno; warn("Failed to get event log info"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 17:11:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36ADB1065670; Fri, 19 Nov 2010 17:11:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 258FC8FC08; Fri, 19 Nov 2010 17:11:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJHBD8J082080; Fri, 19 Nov 2010 17:11:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHBDTq082077; Fri, 19 Nov 2010 17:11:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191711.oAJHBDTq082077@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215536 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:11:13 -0000 Author: marius Date: Fri Nov 19 17:11:12 2010 New Revision: 215536 URL: http://svn.freebsd.org/changeset/base/215536 Log: MFC: r200874 Convert drivers somehow missed in r200874 (merged to stable/8 in r202225) to multipass probing. Modified: stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Fri Nov 19 17:08:29 2010 (r215535) +++ stable/8/sys/sparc64/pci/psycho.c Fri Nov 19 17:11:12 2010 (r215536) @@ -159,7 +159,8 @@ static devclass_t psycho_devclass; DEFINE_CLASS_0(pcib, psycho_driver, psycho_methods, sizeof(struct psycho_softc)); -DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0); +EARLY_DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, psycho_softc) psycho_softcs = SLIST_HEAD_INITIALIZER(psycho_softcs); Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Fri Nov 19 17:08:29 2010 (r215535) +++ stable/8/sys/sparc64/pci/schizo.c Fri Nov 19 17:11:12 2010 (r215536) @@ -158,7 +158,8 @@ static devclass_t schizo_devclass; DEFINE_CLASS_0(pcib, schizo_driver, schizo_methods, sizeof(struct schizo_softc)); -DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0); +EARLY_DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, schizo_softc) schizo_softcs = SLIST_HEAD_INITIALIZER(schizo_softcs); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 17:49:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119FA106564A; Fri, 19 Nov 2010 17:49:17 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F32668FC1D; Fri, 19 Nov 2010 17:49:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJHnG8T083496; Fri, 19 Nov 2010 17:49:16 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHnGl1083487; Fri, 19 Nov 2010 17:49:16 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011191749.oAJHnGl1083487@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 17:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:49:17 -0000 Author: attilio Date: Fri Nov 19 17:49:16 2010 New Revision: 215539 URL: http://svn.freebsd.org/changeset/base/215539 Log: MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me: Move nexus in x86 and cleaning it up. Sponsored by: Sandvine Incorporated Added: stable/8/sys/x86/x86/nexus.c - copied, changed from r214457, head/sys/x86/x86/nexus.c Deleted: stable/8/sys/amd64/amd64/nexus.c stable/8/sys/i386/i386/nexus.c Modified: stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/conf/files.pc98 stable/8/sys/i386/i386/machdep.c stable/8/sys/pc98/include/bus.h stable/8/sys/pc98/pc98/busiosubr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/conf/files.amd64 Fri Nov 19 17:49:16 2010 (r215539) @@ -123,7 +123,6 @@ amd64/amd64/minidump_machdep.c standard amd64/amd64/mp_machdep.c optional smp amd64/amd64/mp_watchdog.c optional mp_watchdog smp amd64/amd64/mpboot.S optional smp -amd64/amd64/nexus.c standard amd64/amd64/pmap.c standard amd64/amd64/prof_machdep.c optional profiling-routine amd64/amd64/sigtramp.S standard @@ -319,3 +318,4 @@ x86/x86/mca.c standard x86/x86/mptable.c optional mptable x86/x86/mptable_pci.c optional mptable pci x86/x86/msi.c optional pci +x86/x86/nexus.c standard Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/conf/files.i386 Fri Nov 19 17:49:16 2010 (r215539) @@ -289,7 +289,6 @@ i386/xen/mp_machdep.c optional xen smp i386/i386/mp_watchdog.c optional mp_watchdog smp i386/i386/mpboot.s optional smp native i386/xen/mptable.c optional apic xen -i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c optional native i386/xen/pmap.c optional xen @@ -394,3 +393,4 @@ x86/x86/mca.c standard x86/x86/mptable.c optional apic native x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci +x86/x86/nexus.c standard Modified: stable/8/sys/conf/files.pc98 ============================================================================== --- stable/8/sys/conf/files.pc98 Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/conf/files.pc98 Fri Nov 19 17:49:16 2010 (r215539) @@ -158,7 +158,6 @@ i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mp_watchdog.c optional mp_watchdog smp i386/i386/mpboot.s optional smp -i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard i386/i386/ptrace_machdep.c standard @@ -258,3 +257,4 @@ x86/x86/mca.c standard x86/x86/mptable.c optional apic x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci +x86/x86/nexus.c standard Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/i386/i386/machdep.c Fri Nov 19 17:49:16 2010 (r215539) @@ -1957,7 +1957,7 @@ add_smap_entry(struct bios_smap *smap, v return (1); #ifndef PAE - if (smap->base >= 0xffffffff) { + if (smap->base > 0xffffffff) { printf("%uK of memory above 4GB ignored\n", (u_int)(smap->length / 1024)); return (1); Modified: stable/8/sys/pc98/include/bus.h ============================================================================== --- stable/8/sys/pc98/include/bus.h Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/pc98/include/bus.h Fri Nov 19 17:49:16 2010 (r215539) @@ -158,8 +158,8 @@ struct bus_space_access_methods { * Access methods for bus resources and address space. */ struct bus_space_tag { -#define BUS_SPACE_IO 0 -#define BUS_SPACE_MEM 1 +#define BUS_SPACE_TAG_IO 0 +#define BUS_SPACE_TAG_MEM 1 u_int bs_tag; /* bus space flags */ struct bus_space_access_methods bs_da; /* direct access */ Modified: stable/8/sys/pc98/pc98/busiosubr.c ============================================================================== --- stable/8/sys/pc98/pc98/busiosubr.c Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/pc98/pc98/busiosubr.c Fri Nov 19 17:49:16 2010 (r215539) @@ -63,7 +63,7 @@ _BUS_SPACE_CALL_FUNCS_PROTO(SBUS_RA_mem, _BUS_SPACE_CALL_FUNCS_PROTO(SBUS_RA_mem,u_int32_t,4) struct bus_space_tag SBUS_io_space_tag = { - BUS_SPACE_IO, + BUS_SPACE_TAG_IO, /* direct bus access methods */ { @@ -81,7 +81,7 @@ struct bus_space_tag SBUS_io_space_tag = }; struct bus_space_tag SBUS_mem_space_tag = { - BUS_SPACE_MEM, + BUS_SPACE_TAG_MEM, /* direct bus access methods */ { @@ -109,7 +109,7 @@ _BUS_SPACE_CALL_FUNCS_PROTO(NEPC_RA_io,u _BUS_SPACE_CALL_FUNCS_PROTO(NEPC_RA_io,u_int32_t,4) struct bus_space_tag NEPC_io_space_tag = { - BUS_SPACE_IO, + BUS_SPACE_TAG_IO, /* direct bus access methods */ { @@ -127,7 +127,7 @@ struct bus_space_tag NEPC_io_space_tag = }; struct bus_space_tag NEPC_mem_space_tag = { - BUS_SPACE_MEM, + BUS_SPACE_TAG_MEM, /* direct bus access methods */ { @@ -256,7 +256,7 @@ i386_memio_subregion(bus_space_tag_t t, pbase = pbsh->bsh_base + offset; switch (t->bs_tag) { - case BUS_SPACE_IO: + case BUS_SPACE_TAG_IO: if (pbsh->bsh_iatsz > 0) { if (offset >= pbsh->bsh_iatsz || offset + size > pbsh->bsh_iatsz) @@ -265,7 +265,7 @@ i386_memio_subregion(bus_space_tag_t t, } break; - case BUS_SPACE_MEM: + case BUS_SPACE_TAG_MEM: if (pbsh->bsh_iatsz > 0) return EINVAL; if (offset > pbsh->bsh_sz || offset + size > pbsh->bsh_sz) @@ -282,7 +282,7 @@ i386_memio_subregion(bus_space_tag_t t, return error; switch (t->bs_tag) { - case BUS_SPACE_IO: + case BUS_SPACE_TAG_IO: if (pbsh->bsh_iatsz > 0) { for (i = 0; i < size; i ++) bsh->bsh_iat[i] = pbsh->bsh_iat[i + offset]; @@ -295,7 +295,7 @@ i386_memio_subregion(bus_space_tag_t t, } break; - case BUS_SPACE_MEM: + case BUS_SPACE_TAG_MEM: break; } Copied and modified: stable/8/sys/x86/x86/nexus.c (from r214457, head/sys/x86/x86/nexus.c) ============================================================================== --- head/sys/x86/x86/nexus.c Thu Oct 28 16:31:39 2010 (r214457, copy source) +++ stable/8/sys/x86/x86/nexus.c Fri Nov 19 17:49:16 2010 (r215539) @@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __amd64__ #include -#endif #include #include #include @@ -67,12 +65,10 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __amd64__ #include -#include -#endif #include #include +#include #ifdef DEV_APIC #include "pcib_if.h" @@ -89,13 +85,15 @@ __FBSDID("$FreeBSD$"); #include #ifdef __amd64__ -#define RMAN_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define RMAN_BUS_SPACE_MEM AMD64_BUS_SPACE_MEM +#define BUS_SPACE_IO AMD64_BUS_SPACE_IO +#define BUS_SPACE_MEM AMD64_BUS_SPACE_MEM #else -#define RMAN_BUS_SPACE_IO I386_BUS_SPACE_IO -#define RMAN_BUS_SPACE_MEM I386_BUS_SPACE_MEM +#define BUS_SPACE_IO I386_BUS_SPACE_IO +#define BUS_SPACE_MEM I386_BUS_SPACE_MEM #endif +#define ELF_KERN_STR ("elf"__XSTRING(__ELF_WORD_SIZE)" kernel") + static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) @@ -435,7 +433,7 @@ nexus_activate_resource(device_t bus, de #else rman_set_bushandle(r, rman_get_start(r)); #endif - rman_set_bustag(r, RMAN_BUS_SPACE_IO); + rman_set_bustag(r, BUS_SPACE_IO); break; case SYS_RES_MEMORY: #ifdef PC98 @@ -446,7 +444,7 @@ nexus_activate_resource(device_t bus, de #endif vaddr = pmap_mapdev(rman_get_start(r), rman_get_size(r)); rman_set_virtual(r, vaddr); - rman_set_bustag(r, RMAN_BUS_SPACE_MEM); + rman_set_bustag(r, BUS_SPACE_MEM); #ifdef PC98 /* PC-98: the type of bus_space_handle_t is the structure. */ bh->bsh_base = (bus_addr_t) vaddr; @@ -668,12 +666,12 @@ ram_probe(device_t dev) return (0); } -#ifdef __amd64__ static int ram_attach(device_t dev) { struct bios_smap *smapbase, *smap, *smapend; struct resource *res; + vm_paddr_t *p; caddr_t kmdp; uint32_t smapsize; int error, rid; @@ -681,69 +679,74 @@ ram_attach(device_t dev) /* Retrieve the system memory map from the loader. */ kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) - kmdp = preload_search_by_type("elf64 kernel"); - smapbase = (struct bios_smap *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_SMAP); - smapsize = *((u_int32_t *)smapbase - 1); - smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); - - rid = 0; - for (smap = smapbase; smap < smapend; smap++) { - if (smap->type != SMAP_TYPE_MEMORY || smap->length == 0) - continue; - error = bus_set_resource(dev, SYS_RES_MEMORY, rid, smap->base, - smap->length); - if (error) - panic("ram_attach: resource %d failed set with %d", rid, - error); - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); - if (res == NULL) - panic("ram_attach: resource %d failed to attach", rid); - rid++; + kmdp = preload_search_by_type(ELF_KERN_STR); + if (kmdp != NULL) + smapbase = (struct bios_smap *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_SMAP); + else + smapbase = NULL; + if (smapbase != NULL) { + smapsize = *((u_int32_t *)smapbase - 1); + smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); + + rid = 0; + for (smap = smapbase; smap < smapend; smap++) { + if (smap->type != SMAP_TYPE_MEMORY || + smap->length == 0) + continue; +#ifdef __i386__ + /* + * Resources use long's to track resources, so + * we can't include memory regions above 4GB. + */ + if (smap->base > ~0ul) + continue; +#endif + error = bus_set_resource(dev, SYS_RES_MEMORY, rid, + smap->base, smap->length); + if (error) + panic( + "ram_attach: resource %d failed set with %d", + rid, error); + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + 0); + if (res == NULL) + panic("ram_attach: resource %d failed to attach", + rid); + rid++; + } + return (0); } - return (0); -} -#else -static int -ram_attach(device_t dev) -{ - struct resource *res; - vm_paddr_t *p; - int error, i, rid; /* - * We use the dump_avail[] array rather than phys_avail[] for - * the memory map as phys_avail[] contains holes for kernel - * memory, page 0, the message buffer, and the dcons buffer. - * We test the end address in the loop instead of the start - * since the start address for the first segment is 0. - * - * XXX: It would be preferable to use the SMAP if it exists - * instead since if the SMAP is very fragmented we may not - * include some memory regions in dump_avail[] and phys_avail[]. + * If the system map is not available, fall back to using + * dump_avail[]. We use the dump_avail[] array rather than + * phys_avail[] for the memory map as phys_avail[] contains + * holes for kernel memory, page 0, the message buffer, and + * the dcons buffer. We test the end address in the loop + * instead of the start since the start address for the first + * segment is 0. */ - for (i = 0, p = dump_avail; p[1] != 0; i++, p += 2) { - rid = i; + for (rid = 0, p = dump_avail; p[1] != 0; rid++, p += 2) { #ifdef PAE /* * Resources use long's to track resources, so we can't * include memory regions above 4GB. */ - if (p[0] >= ~0ul) + if (p[0] > ~0ul) break; #endif error = bus_set_resource(dev, SYS_RES_MEMORY, rid, p[0], p[1] - p[0]); if (error) - panic("ram_attach: resource %d failed set with %d", i, + panic("ram_attach: resource %d failed set with %d", rid, error); res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); if (res == NULL) - panic("ram_attach: resource %d failed to attach", i); + panic("ram_attach: resource %d failed to attach", rid); } return (0); } -#endif static device_method_t ram_methods[] = { /* Device interface */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 20:19:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89295106566C; Fri, 19 Nov 2010 20:19:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id EE38C8FC1B; Fri, 19 Nov 2010 20:19:19 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oAJJlCKl082512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Nov 2010 21:47:12 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oAJJlCmW035144; Fri, 19 Nov 2010 21:47:12 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAJJlCUb035143; Fri, 19 Nov 2010 21:47:12 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Nov 2010 21:47:12 +0200 From: Kostik Belousov To: Attilio Rao Message-ID: <20101119194712.GS2392@deviant.kiev.zoral.com.ua> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="49CZtb4AZ7eASE2/" Content-Disposition: inline In-Reply-To: <201011191749.oAJHnGl1083487@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:19:20 -0000 --49CZtb4AZ7eASE2/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 19, 2010 at 05:49:16PM +0000, Attilio Rao wrote: > Author: attilio > Date: Fri Nov 19 17:49:16 2010 > New Revision: 215539 > URL: http://svn.freebsd.org/changeset/base/215539 >=20 > Log: > MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me: > Move nexus in x86 and cleaning it up. > =20 > Sponsored by: Sandvine Incorporated >=20 > Added: > stable/8/sys/x86/x86/nexus.c > - copied, changed from r214457, head/sys/x86/x86/nexus.c > Deleted: > stable/8/sys/amd64/amd64/nexus.c > stable/8/sys/i386/i386/nexus.c > Modified: > stable/8/sys/conf/files.amd64 > stable/8/sys/conf/files.i386 > stable/8/sys/conf/files.pc98 > stable/8/sys/i386/i386/machdep.c > stable/8/sys/pc98/include/bus.h > stable/8/sys/pc98/pc98/busiosubr.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) During the make depend stage, I get /usr/bsd/src/sys/x86/x86/nexus.c:82:25: error: x86/isa/isa.h: No such file = or directory mkdep: compile failed --49CZtb4AZ7eASE2/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzm1EAACgkQC3+MBN1Mb4hkQACfbFOUS0nJt/nfg6t79JQ5vK/W zNwAn2K/8edlESThxhMnSdNBjWkRd9YI =hHAL -----END PGP SIGNATURE----- --49CZtb4AZ7eASE2/-- From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 20:23:01 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2A5A1065674; Fri, 19 Nov 2010 20:23:01 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91EA18FC13; Fri, 19 Nov 2010 20:23:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJKN1Qf088271; Fri, 19 Nov 2010 20:23:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJKN1LZ088269; Fri, 19 Nov 2010 20:23:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011192023.oAJKN1LZ088269@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 20:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215545 - stable/8/sys/x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:23:01 -0000 Author: attilio Date: Fri Nov 19 20:23:01 2010 New Revision: 215545 URL: http://svn.freebsd.org/changeset/base/215545 Log: Fix-up r215539 by specifying correctly the ISA headers are they are not shared on STABLE_8. Reported by: kib Modified: stable/8/sys/x86/x86/nexus.c Modified: stable/8/sys/x86/x86/nexus.c ============================================================================== --- stable/8/sys/x86/x86/nexus.c Fri Nov 19 19:43:56 2010 (r215544) +++ stable/8/sys/x86/x86/nexus.c Fri Nov 19 20:23:01 2010 (r215545) @@ -76,10 +76,12 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ISA #include -#ifdef PC98 -#include +#ifdef __amd64__ +#include +#elif defined(__i386__) +#include #else -#include +#include #endif #endif #include From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 20:24:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFC2106566B; Fri, 19 Nov 2010 20:24:07 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id E810B8FC12; Fri, 19 Nov 2010 20:24:06 +0000 (UTC) Received: by qyk9 with SMTP id 9so172495qyk.13 for ; Fri, 19 Nov 2010 12:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=HKrym278qgibWpj7WjCca/fj2CHagnn3RwLoc6n5Pmc=; b=co2QQnDSs6ksiNWuKIevZm8H+1IRWDaboEFHM+BHIXHIQdJ5GyyEwZ+FQfclhV7852 1qjzUTZnm7p3QmDqdwCD46qVu9+blke5q3KiS9rsYiir8lyIm6Xsq7jPnornYLozrB3J e7zh75eE1nBLOorC3Xpgf87KcKT81ANpZ+iBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=S6GzsK7bDVbNuxIo+9PwpcUAkbQ6G+cKvaAV0tTAz0fhszakbY7b3v+oJ4CDbEgkx5 P9NZap11fvT6SkV1crNL33JM1kh7SioWPHWuV+GDsQoqoZoyGVMi9cN7G1nhfyASK/sd uIwd5gXcGP8TWYu8c9AvQDJix+p3jYb30I/O4= MIME-Version: 1.0 Received: by 10.229.236.83 with SMTP id kj19mr2124242qcb.218.1290198245639; Fri, 19 Nov 2010 12:24:05 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 12:24:05 -0800 (PST) In-Reply-To: <20101119194712.GS2392@deviant.kiev.zoral.com.ua> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> Date: Fri, 19 Nov 2010 15:24:05 -0500 X-Google-Sender-Auth: Yxg0osXOBI5DDFQd1Te1pIxKl4w Message-ID: From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:24:07 -0000 2010/11/19 Kostik Belousov : > On Fri, Nov 19, 2010 at 05:49:16PM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Fri Nov 19 17:49:16 2010 >> New Revision: 215539 >> URL: http://svn.freebsd.org/changeset/base/215539 >> >> Log: >> =C2=A0 MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and m= e: >> =C2=A0 Move nexus in x86 and cleaning it up. >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> >> Added: >> =C2=A0 stable/8/sys/x86/x86/nexus.c >> =C2=A0 =C2=A0 =C2=A0- copied, changed from r214457, head/sys/x86/x86/nex= us.c >> Deleted: >> =C2=A0 stable/8/sys/amd64/amd64/nexus.c >> =C2=A0 stable/8/sys/i386/i386/nexus.c >> Modified: >> =C2=A0 stable/8/sys/conf/files.amd64 >> =C2=A0 stable/8/sys/conf/files.i386 >> =C2=A0 stable/8/sys/conf/files.pc98 >> =C2=A0 stable/8/sys/i386/i386/machdep.c >> =C2=A0 stable/8/sys/pc98/include/bus.h >> =C2=A0 stable/8/sys/pc98/pc98/busiosubr.c >> Directory Properties: >> =C2=A0 stable/8/sys/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/amd64/include/xen/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/cddl/contrib/opensolaris/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/contrib/dev/acpica/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/contrib/pf/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/dev/xen/xenpci/ =C2=A0 (props changed) > During the make depend stage, I get > /usr/bsd/src/sys/x86/x86/nexus.c:82:25: error: x86/isa/isa.h: No such fil= e or directory > mkdep: compile failed r215545 might fix this, thanks a lot for reporting promptly. Jeeeeeez, I usually made the svn mv by hand rather than relying on merging for STBALE_8, I would have kept to do that :/. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 20:33:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B68C1065675; Fri, 19 Nov 2010 20:33:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id AC13B8FC15; Fri, 19 Nov 2010 20:33:15 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oAJKX8WA085051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Nov 2010 22:33:08 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oAJKX8bc035478; Fri, 19 Nov 2010 22:33:08 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAJKX85A035477; Fri, 19 Nov 2010 22:33:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Nov 2010 22:33:08 +0200 From: Kostik Belousov To: Attilio Rao Message-ID: <20101119203308.GU2392@deviant.kiev.zoral.com.ua> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YQEFGVUvDf3HQAmF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:33:16 -0000 --YQEFGVUvDf3HQAmF Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 19, 2010 at 03:24:05PM -0500, Attilio Rao wrote: > 2010/11/19 Kostik Belousov : > > On Fri, Nov 19, 2010 at 05:49:16PM +0000, Attilio Rao wrote: > >> Author: attilio > >> Date: Fri Nov 19 17:49:16 2010 > >> New Revision: 215539 > >> URL: http://svn.freebsd.org/changeset/base/215539 > >> > >> Log: > >> =9A MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me: > >> =9A Move nexus in x86 and cleaning it up. > >> > >> =9A Sponsored by: =9A =9A =9A Sandvine Incorporated > >> > >> Added: > >> =9A stable/8/sys/x86/x86/nexus.c > >> =9A =9A =9A- copied, changed from r214457, head/sys/x86/x86/nexus.c > >> Deleted: > >> =9A stable/8/sys/amd64/amd64/nexus.c > >> =9A stable/8/sys/i386/i386/nexus.c > >> Modified: > >> =9A stable/8/sys/conf/files.amd64 > >> =9A stable/8/sys/conf/files.i386 > >> =9A stable/8/sys/conf/files.pc98 > >> =9A stable/8/sys/i386/i386/machdep.c > >> =9A stable/8/sys/pc98/include/bus.h > >> =9A stable/8/sys/pc98/pc98/busiosubr.c > >> Directory Properties: > >> =9A stable/8/sys/ =9A (props changed) > >> =9A stable/8/sys/amd64/include/xen/ =9A (props changed) > >> =9A stable/8/sys/cddl/contrib/opensolaris/ =9A (props changed) > >> =9A stable/8/sys/contrib/dev/acpica/ =9A (props changed) > >> =9A stable/8/sys/contrib/pf/ =9A (props changed) > >> =9A stable/8/sys/dev/xen/xenpci/ =9A (props changed) > > During the make depend stage, I get > > /usr/bsd/src/sys/x86/x86/nexus.c:82:25: error: x86/isa/isa.h: No such f= ile or directory > > mkdep: compile failed >=20 > r215545 might fix this, thanks a lot for reporting promptly. >=20 > Jeeeeeez, I usually made the svn mv by hand rather than relying on > merging for STBALE_8, I would have kept to do that :/. >=20 > Attilio Thanks, r215545 allowed the build to finish. --YQEFGVUvDf3HQAmF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzm3wMACgkQC3+MBN1Mb4i1kACfVMcufP/WciWCzOQPU3EqtGjK Ze0AoKxwzaLEXz+5D2ZkvLHK2Q7EoCO7 =RYq6 -----END PGP SIGNATURE----- --YQEFGVUvDf3HQAmF-- From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 21:04:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59811065670; Fri, 19 Nov 2010 21:04:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 934868FC0A; Fri, 19 Nov 2010 21:04:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJL4IlC089448; Fri, 19 Nov 2010 21:04:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJL4ILw089443; Fri, 19 Nov 2010 21:04:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011192104.oAJL4ILw089443@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 21:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215546 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:04:18 -0000 Author: thompsa Date: Fri Nov 19 21:04:18 2010 New Revision: 215546 URL: http://svn.freebsd.org/changeset/base/215546 Log: MFC r213853 - Add missing LibUSB API functions: * libusb_strerror() * libusb_get_driver[_np]() * libusb_detach_kernel_driver[_np]() - Factor out setting of non-blocking flag inside libusb. - Add missing NULL check after libusb_get_device() call. - Correct some wrong error codes due to copy and paste error. PR: usb/150546 Submitted by: Robert Jenssen, Alexander Leidinger Modified: stable/8/lib/libusb/libusb.3 stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb20.3 Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb.3 ============================================================================== --- stable/8/lib/libusb/libusb.3 Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb.3 Fri Nov 19 21:04:18 2010 (r215546) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 2009 +.Dd October 14, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -72,6 +72,15 @@ Deinitialise libusb. Must be called at t . .Pp . +.Ft const char * +.Fn libusb_strerror "int code" +Get ASCII representation of the error given by the +.Fa code +argument. +. +. +.Pp +. .Ft void .Fn libusb_set_debug "libusb_context *ctx" "int level" Set debug to the @@ -239,12 +248,37 @@ if the device has been disconnected and .Pp . .Ft int +.Fn libusb_get_driver "libusb_device_handle *devh" "int interface" "char *name" "int namelen" +or +.Ft int +.Fn libusb_get_driver_np "libusb_device_handle *devh" "int interface" "char *name" "int namelen" +Gets the name of the driver attached to the given +.Fa device +and +.Fa interface +into the buffer given by +.Fa name +and +.Fa namelen . +Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if no kernel driver is attached +to the given interface and LIBUSB_ERROR_INVALID_PARAM if the interface does +not exist. +This function is non-portable. +The buffer pointed to by +.Fa name +is only zero terminated on success. +. +.Pp +. +.Ft int .Fn libusb_detach_kernel_driver "libusb_device_handle *devh" "int interface" -Detach a kernel driver from an interface. This is needed to claim an interface -required by a kernel driver. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if -no kernel driver was active, LIBUSB_ERROR_INVALID_PARAM if the interface does not -exist, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a -LIBUSB_ERROR code on failure. +or +.Ft int +.Fn libusb_detach_kernel_driver_np "libusb_device_handle *devh" "int interface" +Detach a kernel driver from an interface. +This is needed to claim an interface required by a kernel driver. +Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if no kernel driver was active, +LIBUSB_ERROR_INVALID_PARAM if the interface does not exist, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on failure. This function is non-portable. . .Pp . @@ -271,7 +305,7 @@ failure. . .Pp .Ft int -.Fn libsub_get_active_config_descriptor "libusb_device *dev" "libusb_device_descriptor **config" +.Fn libsub_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" Get the USB configuration descriptor for the active configuration. Returns 0 on success, returns LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state and return another LIBUSB_ERROR code on error. @@ -337,7 +371,7 @@ LIBUSB_ERROR code on failure. . .Pp .Ft int -.Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" +.Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb.h Fri Nov 19 21:04:18 2010 (r215546) @@ -294,6 +294,7 @@ typedef struct libusb_transfer { /* Library initialisation */ void libusb_set_debug(libusb_context * ctx, int level); +const char *libusb_strerror(int code); int libusb_init(libusb_context ** context); void libusb_exit(struct libusb_context *ctx); @@ -317,6 +318,9 @@ int libusb_claim_interface(libusb_device int libusb_release_interface(libusb_device_handle * devh, int interface_number); int libusb_reset_device(libusb_device_handle * devh); int libusb_kernel_driver_active(libusb_device_handle * devh, int interface); +int libusb_get_driver_np(libusb_device_handle * devh, int interface, char *name, int namelen); +int libusb_get_driver(libusb_device_handle * devh, int interface, char *name, int namelen); +int libusb_detach_kernel_driver_np(libusb_device_handle * devh, int interface); int libusb_detach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_attach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_set_interface_alt_setting(libusb_device_handle * devh, int interface_number, int alternate_setting); Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 21:04:18 2010 (r215546) @@ -70,12 +70,30 @@ libusb_set_debug(libusb_context *ctx, in ctx->debug = level; } +static void +libusb_set_nonblocking(int f) +{ + int flags; + + /* + * We ignore any failures in this function, hence the + * non-blocking flag is not critical to the operation of + * libUSB. We use F_GETFL and F_SETFL to be compatible with + * Linux. + */ + + flags = fcntl(f, F_GETFL, NULL); + if (flags == -1) + return; + flags |= O_NONBLOCK; + fcntl(f, F_SETFL, flags); +} + int libusb_init(libusb_context **context) { struct libusb_context *ctx; char *debug; - int flag; int ret; ctx = malloc(sizeof(*ctx)); @@ -106,12 +124,8 @@ libusb_init(libusb_context **context) return (LIBUSB_ERROR_OTHER); } /* set non-blocking mode on the control pipe to avoid deadlock */ - flag = 1; - ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); - assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); - flag = 1; - ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); - assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); + libusb_set_nonblocking(ctx->ctrl_pipe[0]); + libusb_set_nonblocking(ctx->ctrl_pipe[1]); libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); @@ -356,7 +370,7 @@ libusb_open(libusb_device *dev, libusb_d /* make sure our event loop detects the new device */ dummy = 0; err = write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy)); - if (err < sizeof(dummy)) { + if (err < (int)sizeof(dummy)) { /* ignore error, if any */ DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open write failed!"); } @@ -431,7 +445,7 @@ libusb_close(struct libusb20_device *pde /* make sure our event loop detects the closed device */ dummy = 0; err = write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy)); - if (err < sizeof(dummy)) { + if (err < (int)sizeof(dummy)) { /* ignore error, if any */ DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_close write failed!"); } @@ -473,7 +487,6 @@ libusb_set_configuration(struct libusb20 uint8_t i; dev = libusb_get_device(pdev); - if (dev == NULL) return (LIBUSB_ERROR_INVALID_PARAM); @@ -620,6 +633,8 @@ libusb_clear_halt(struct libusb20_device return (LIBUSB_ERROR_INVALID_PARAM); dev = libusb_get_device(pdev); + if (dev == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); CTX_LOCK(dev->ctx); err = libusb20_tr_open(xfer, 0, 0, endpoint); @@ -647,7 +662,7 @@ libusb_reset_device(struct libusb20_devi dev = libusb_get_device(pdev); if (dev == NULL) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); libusb10_cancel_all_transfer(dev); @@ -673,6 +688,45 @@ libusb_kernel_driver_active(struct libus } int +libusb_get_driver_np(struct libusb20_device *pdev, int interface, + char *name, int namelen) +{ + return (libusb_get_driver(pdev, interface, name, namelen)); +} + +int +libusb_get_driver(struct libusb20_device *pdev, int interface, + char *name, int namelen) +{ + char *ptr; + int err; + + if (pdev == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); + if (namelen < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + err = libusb20_dev_get_iface_desc( + pdev, interface, name, namelen); + + if (err != 0) + return (LIBUSB_ERROR_OTHER); + + /* we only want the driver name */ + ptr = strstr(name, ":"); + if (ptr != NULL) + *ptr = 0; + + return (0); +} + +int +libusb_detach_kernel_driver_np(struct libusb20_device *pdev, int interface) +{ + return (libusb_detach_kernel_driver(pdev, interface)); +} + +int libusb_detach_kernel_driver(struct libusb20_device *pdev, int interface) { int err; @@ -683,7 +737,7 @@ libusb_detach_kernel_driver(struct libus err = libusb20_dev_detach_kernel_driver( pdev, interface); - return (err ? LIBUSB20_ERROR_OTHER : 0); + return (err ? LIBUSB_ERROR_OTHER : 0); } int @@ -1362,3 +1416,9 @@ libusb_le16_to_cpu(uint16_t x) return (le16toh(x)); } +const char * +libusb_strerror(int code) +{ + /* TODO */ + return ("Unknown error"); +} Modified: stable/8/lib/libusb/libusb20.3 ============================================================================== --- stable/8/lib/libusb/libusb20.3 Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb20.3 Fri Nov 19 21:04:18 2010 (r215546) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2009 +.Dd October 14, 2010 .Dt LIBUSB20 3 .Os .Sh NAME @@ -177,7 +177,7 @@ USB access library (libusb -lusb) .Ft int .Fn libusb20_be_set_template "struct libusb20_backend *pbe" "int temp" .Ft int -.Fn libusb20_be_get_dev_quirk "struct libusb20_backend *pber", "uint16_t index" "struct libusb20_quirk *pq" +.Fn libusb20_be_get_dev_quirk "struct libusb20_backend *pber" "uint16_t index" "struct libusb20_quirk *pq" .Ft int .Fn libusb20_be_get_quirk_name "struct libusb20_backend *pbe" "uint16_t index" "struct libusb20_quirk *pq" .Ft int From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 04:54:59 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39BF4106564A; Sat, 20 Nov 2010 04:54:59 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E30A8FC08; Sat, 20 Nov 2010 04:54:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAK4swfI000419; Sat, 20 Nov 2010 04:54:58 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAK4swPc000417; Sat, 20 Nov 2010 04:54:58 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201011200454.oAK4swPc000417@svn.freebsd.org> From: Ryan Stone Date: Sat, 20 Nov 2010 04:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215551 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 04:54:59 -0000 Author: rstone Date: Sat Nov 20 04:54:58 2010 New Revision: 215551 URL: http://svn.freebsd.org/changeset/base/215551 Log: MFC r212281 and 212282 In munmap() downgrade the vm_map_lock to a read lock before taking a read lock on the pmc-sx lock. This prevents a deadlock with pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries to get a read lock on a vm_map. Downgrading the vm_map_lock in munmap allows pmc_log_process_mappings to continue, preventing the deadlock. Without this change I could cause a deadlock on a multicore 8.1-RELEASE system by having one thread constantly mmap'ing and then munmap'ing a PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat in system-wide sampling mode. Approved by: emaste (mentor) Modified: stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Fri Nov 19 22:25:32 2010 (r215550) +++ stable/8/sys/vm/vm_mmap.c Sat Nov 20 04:54:58 2010 (r215551) @@ -577,6 +577,7 @@ munmap(td, uap) * Inform hwpmc if the address range being unmapped contains * an executable region. */ + pkm.pm_address = (uintptr_t) NULL; if (vm_map_lookup_entry(map, addr, &entry)) { for (; entry != &map->header && entry->start < addr + size; @@ -585,16 +586,23 @@ munmap(td, uap) entry->end, VM_PROT_EXECUTE) == TRUE) { pkm.pm_address = (uintptr_t) addr; pkm.pm_size = (size_t) size; - PMC_CALL_HOOK(td, PMC_FN_MUNMAP, - (void *) &pkm); break; } } } #endif - /* returns nothing but KERN_SUCCESS anyway */ vm_map_delete(map, addr, addr + size); + +#ifdef HWPMC_HOOKS + /* downgrade the lock to prevent a LOR with the pmc-sx lock */ + vm_map_lock_downgrade(map); + if (pkm.pm_address != (uintptr_t) NULL) + PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); + vm_map_unlock_read(map); +#else vm_map_unlock(map); +#endif + /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 06:39:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0227D106566C; Sat, 20 Nov 2010 06:39:54 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE5F8FC08; Sat, 20 Nov 2010 06:39:53 +0000 (UTC) Received: by wwd20 with SMTP id 20so5296146wwd.31 for ; Fri, 19 Nov 2010 22:39:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.129.71 with SMTP id n7mr3255313wbs.128.1290233585483; Fri, 19 Nov 2010 22:13:05 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.227.146.67 with HTTP; Fri, 19 Nov 2010 22:13:05 -0800 (PST) In-Reply-To: <20101119152151.GC7614@stack.nl> References: <201011190117.oAJ1HnOT051021@svn.freebsd.org> <20101119152151.GC7614@stack.nl> Date: Sat, 20 Nov 2010 19:13:05 +1300 X-Google-Sender-Auth: urTkqmot5R46UVbPwDDLBrd15Sw Message-ID: From: Andrew Thompson To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215475 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 06:39:54 -0000 On 20 November 2010 04:21, Jilles Tjoelker wrote: > On Fri, Nov 19, 2010 at 01:17:49AM +0000, Andrew Thompson wrote: >> Author: thompsa >> Date: Fri Nov 19 01:17:49 2010 >> New Revision: 215475 >> URL: http://svn.freebsd.org/changeset/base/215475 > >> Log: >> =A0 MFC r203774 > >> =A0 =A0Use more standard way for setting nonblocking flag for a filedesc= riptor. >> =A0 =A0This makes libusb porting a bit easier. > >> Modified: >> =A0 stable/8/lib/libusb/libusb10.c >> Directory Properties: >> =A0 stable/8/lib/libusb/ =A0 (props changed) >> =A0 stable/8/lib/libusb/usb.h =A0 (props changed) >> >> Modified: stable/8/lib/libusb/libusb10.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- stable/8/lib/libusb/libusb10.c =A0 =A0Thu Nov 18 23:46:55 2010 =A0 = =A0 =A0 =A0(r215474) >> +++ stable/8/lib/libusb/libusb10.c =A0 =A0Fri Nov 19 01:17:49 2010 =A0 = =A0 =A0 =A0(r215475) > [...] >> @@ -105,10 +105,12 @@ libusb_init(libusb_context **context) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (LIBUSB_ERROR_OTHER); >> =A0 =A0 =A0 } >> =A0 =A0 =A0 /* set non-blocking mode on the control pipe to avoid deadlo= ck */ >> - =A0 =A0 ret =3D 1; >> - =A0 =A0 ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); >> - =A0 =A0 ret =3D 1; >> - =A0 =A0 ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); >> + =A0 =A0 flag =3D 1; >> + =A0 =A0 ret =3D fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); >> + =A0 =A0 assert(ret !=3D -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_p= ipe[0]"); >> + =A0 =A0 flag =3D 1; >> + =A0 =A0 ret =3D fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); >> + =A0 =A0 assert(ret !=3D -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_p= ipe[1]"); >> >> =A0 =A0 =A0 libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pip= e[0], POLLIN); > > This is not the correct way to use fcntl() to turn on non-blocking mode. > The correct way is > > =A0 =A0 =A0 =A0flag =3D fcntl(ctx->ctrl_pipe[0], F_GETFL, 0); > =A0 =A0 =A0 =A0if (flag !=3D -1) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ret =3D fcntl(ctx->ctrl_pipe[0], F_SETFL, = flag | O_NONBLOCK); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ret =3D=3D -1) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0handle_error(); > =A0 =A0 =A0 =A0} else > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0handle_error(); > > substituting some sort of error handling for handle_error(). > > This has been fixed in head in r213853, but that commit also makes other > changes. > > It turns out that on FreeBSD both F_SETFL and O_NONBLOCK have the value > 4, so there is some chance the desired result is achieved and fcntl() > will not fail. It may also set other flags for the open file > description, which could lead to unexpected results. I have merged r213853 now. From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 10:12:21 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 532C210656C0; Sat, 20 Nov 2010 10:12:21 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 277BF8FC1C; Sat, 20 Nov 2010 10:12:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKACLQp008257; Sat, 20 Nov 2010 10:12:21 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKACL7O008255; Sat, 20 Nov 2010 10:12:21 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201011201012.oAKACL7O008255@svn.freebsd.org> From: Martin Matuska Date: Sat, 20 Nov 2010 10:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215554 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 10:12:21 -0000 Author: mm Date: Sat Nov 20 10:12:20 2010 New Revision: 215554 URL: http://svn.freebsd.org/changeset/base/215554 Log: MFC r215260: Disable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot and VFS_RELE on a non-existing hold on snapshot parent's z_vfs. This disables the changes from OpenSolaris onnv-revision 9234:bffdc4fc05c4 (bug IDs: 6792139, 6794830) - not applicable to FreeBSD. This fixes the process hang if umounting a manually mounted snapshot. Reported by: Alexander Zagrebin Approved by: delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Nov 20 08:40:37 2010 (r215553) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Nov 20 10:12:20 2010 (r215554) @@ -1218,12 +1218,14 @@ zfs_mount(vfs_t *vfsp) error = zfs_domount(vfsp, osname); PICKUP_GIANT(); +#ifdef sun /* * Add an extra VFS_HOLD on our parent vfs so that it can't * disappear due to a forced unmount. */ if (error == 0 && ((zfsvfs_t *)vfsp->vfs_data)->z_issnap) VFS_HOLD(mvp->v_vfsp); +#endif /* sun */ out: return (error); @@ -1768,12 +1770,14 @@ zfs_freevfs(vfs_t *vfsp) { zfsvfs_t *zfsvfs = vfsp->vfs_data; +#ifdef sun /* * If this is a snapshot, we have an extra VFS_HOLD on our parent * from zfs_mount(). Release it here. */ if (zfsvfs->z_issnap) VFS_RELE(zfsvfs->z_parent->z_vfs); +#endif /* sun */ zfsvfs_free(zfsvfs); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 11:14:06 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0A1A1065674; Sat, 20 Nov 2010 11:14:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F38C8FC16; Sat, 20 Nov 2010 11:14:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKBE6Dm009786; Sat, 20 Nov 2010 11:14:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKBE6Bk009784; Sat, 20 Nov 2010 11:14:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011201114.oAKBE6Bk009784@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Nov 2010 11:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215555 - stable/8/sbin/kldstat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 11:14:06 -0000 Author: kib Date: Sat Nov 20 11:14:06 2010 New Revision: 215555 URL: http://svn.freebsd.org/changeset/base/215555 Log: MFC r215248: In printfile(), exit the process instead of only printing the warning. Adjust style. Modified: stable/8/sbin/kldstat/kldstat.c Directory Properties: stable/8/sbin/kldstat/ (props changed) Modified: stable/8/sbin/kldstat/kldstat.c ============================================================================== --- stable/8/sbin/kldstat/kldstat.c Sat Nov 20 10:12:20 2010 (r215554) +++ stable/8/sbin/kldstat/kldstat.c Sat Nov 20 11:14:06 2010 (r215555) @@ -50,14 +50,15 @@ printmod(int modid) printf("\t\t%2d %s\n", stat.id, stat.name); } -static void printfile(int fileid, int verbose) +static void +printfile(int fileid, int verbose) { struct kld_file_stat stat; int modid; stat.version = sizeof(struct kld_file_stat); if (kldstat(fileid, &stat) < 0) - warn("can't stat file id %d", fileid); + err(1, "can't stat file id %d", fileid); else printf("%2d %4d %p %-8zx %s", stat.id, stat.refs, stat.address, stat.size, From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 12:22:02 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B03C3106564A; Sat, 20 Nov 2010 12:22:02 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83FE68FC0A; Sat, 20 Nov 2010 12:22:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCM2vX011434; Sat, 20 Nov 2010 12:22:02 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCM2gp011431; Sat, 20 Nov 2010 12:22:02 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201222.oAKCM2gp011431@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215556 - stable/8/sys/net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:22:02 -0000 Author: bschmidt Date: Sat Nov 20 12:22:02 2010 New Revision: 215556 URL: http://svn.freebsd.org/changeset/base/215556 Log: MFC r207323: When in the RUN -> AUTH -> RUN FSM transition happens, we'll call the ratectl_node_init() functions and since ni_rtctls was already malloc'ed() we will panic. Fix this by using the already malloc'ed pointer. Modified: stable/8/sys/net80211/ieee80211_amrr.c stable/8/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/8/sys/net80211/ieee80211_amrr.c Sat Nov 20 11:14:06 2010 (r215555) +++ stable/8/sys/net80211/ieee80211_amrr.c Sat Nov 20 12:22:02 2010 (r215556) @@ -136,16 +136,16 @@ amrr_node_init(struct ieee80211_node *ni struct ieee80211_amrr *amrr = vap->iv_rs; struct ieee80211_amrr_node *amn; - KASSERT(ni->ni_rctls == NULL, ("%s: ni_rctls already initialized", - __func__)); - - ni->ni_rctls = amn = malloc(sizeof(struct ieee80211_amrr_node), - M_80211_RATECTL, M_NOWAIT|M_ZERO); - if (amn == NULL) { - if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " - "structure\n"); - return; - } + if (ni->ni_rctls == NULL) { + ni->ni_rctls = amn = malloc(sizeof(struct ieee80211_amrr_node), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (amn == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " + "structure\n"); + return; + } + } else + amn = ni->ni_rctls; amn->amn_amrr = amrr; amn->amn_success = 0; amn->amn_recovery = 0; Modified: stable/8/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 11:14:06 2010 (r215555) +++ stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 12:22:02 2010 (r215556) @@ -169,13 +169,17 @@ rssadapt_node_init(struct ieee80211_node struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; - ni->ni_rctls = ra = malloc(sizeof(struct ieee80211_rssadapt_node), - M_80211_RATECTL, M_NOWAIT|M_ZERO); - if (ra == NULL) { - if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " - "structure\n"); - return; - } + if (ni->ni_rctls == NULL) { + ni->ni_rctls = ra = + malloc(sizeof(struct ieee80211_rssadapt_node), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (ra == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " + "structure\n"); + return; + } + } else + ra = ni->ni_rctls; ra->ra_rs = rsa; ra->ra_rates = *rs; rssadapt_updatestats(ra); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 12:24:27 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FA5F1065672; Sat, 20 Nov 2010 12:24:27 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3698FC08; Sat, 20 Nov 2010 12:24:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCORAd011556; Sat, 20 Nov 2010 12:24:27 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCOQOp011539; Sat, 20 Nov 2010 12:24:26 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201224.oAKCOQOp011539@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215557 - in stable/8/sys: dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:24:27 -0000 Author: bschmidt Date: Sat Nov 20 12:24:26 2010 New Revision: 215557 URL: http://svn.freebsd.org/changeset/base/215557 Log: MFC r214894: Instead of using the AMRR ratectl algo as default for drivers which have the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if a driver calls ieee80211_ratectl_init() check if the NONE algo is still selected and try to use AMRR in that case. Drivers are still free to use any other algo by calling ieee80211_ratectl_set() prior to the ieee80211_ratectl_init() call. After this change it is now safe to assume that a ratectl algo is always available and selected, which renders the IEEE80211_C_RATECTL flag pretty much useless. Therefore revert r211314 and 211546. Modified: stable/8/sys/dev/bwi/if_bwi.c stable/8/sys/dev/bwn/if_bwn.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/ral/rt2560.c stable/8/sys/dev/ral/rt2661.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_zyd.c stable/8/sys/dev/wpi/if_wpi.c stable/8/sys/net80211/ieee80211.c stable/8/sys/net80211/ieee80211_node.c stable/8/sys/net80211/ieee80211_ratectl.c stable/8/sys/net80211/ieee80211_ratectl.h stable/8/sys/net80211/ieee80211_sta.c stable/8/sys/net80211/ieee80211_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/8/sys/dev/bwi/if_bwi.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/bwi/if_bwi.c Sat Nov 20 12:24:26 2010 (r215557) @@ -511,8 +511,7 @@ bwi_attach(struct bwi_softc *sc) IEEE80211_C_SHPREAMBLE | IEEE80211_C_WPA | IEEE80211_C_BGSCAN | - IEEE80211_C_MONITOR | - IEEE80211_C_RATECTL; + IEEE80211_C_MONITOR; ic->ic_opmode = IEEE80211_M_STA; ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/8/sys/dev/bwn/if_bwn.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/bwn/if_bwn.c Sat Nov 20 12:24:26 2010 (r215557) @@ -1070,7 +1070,6 @@ bwn_attach_post(struct bwn_softc *sc) | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_TXPMGT /* capable of txpow mgt */ - | IEEE80211_C_RATECTL /* use ratectl */ ; ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; /* s/w bmiss */ Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 12:24:26 2010 (r215557) @@ -580,7 +580,6 @@ iwn_attach(device_t dev) | IEEE80211_C_IBSS /* ibss/adhoc mode */ #endif | IEEE80211_C_WME /* WME */ - | IEEE80211_C_RATECTL /* use ratectl */ ; #if 0 /* HT */ /* XXX disable until HT channel setup works */ Modified: stable/8/sys/dev/ral/rt2560.c ============================================================================== --- stable/8/sys/dev/ral/rt2560.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/ral/rt2560.c Sat Nov 20 12:24:26 2010 (r215557) @@ -291,7 +291,6 @@ rt2560_attach(device_t dev, int id) #ifdef notyet | IEEE80211_C_TXFRAG /* handle tx frags */ #endif - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/ral/rt2661.c ============================================================================== --- stable/8/sys/dev/ral/rt2661.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/ral/rt2661.c Sat Nov 20 12:24:26 2010 (r215557) @@ -294,7 +294,6 @@ rt2661_attach(device_t dev, int id) | IEEE80211_C_TXFRAG /* handle tx frags */ | IEEE80211_C_WME /* 802.11e */ #endif - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_rum.c Sat Nov 20 12:24:26 2010 (r215557) @@ -494,7 +494,6 @@ rum_attach(device_t self) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_run.c Sat Nov 20 12:24:26 2010 (r215557) @@ -632,8 +632,7 @@ run_attach(device_t self) IEEE80211_C_SHPREAMBLE | /* short preamble supported */ IEEE80211_C_SHSLOT | /* short slot time supported */ IEEE80211_C_WME | /* WME */ - IEEE80211_C_WPA | /* WPA1|WPA2(RSN) */ - IEEE80211_C_RATECTL; /* use ratectl */ + IEEE80211_C_WPA; /* WPA1|WPA2(RSN) */ ic->ic_cryptocaps = IEEE80211_CRYPTO_WEP | Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_ural.c Sat Nov 20 12:24:26 2010 (r215557) @@ -486,7 +486,6 @@ ural_attach(device_t self) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Sat Nov 20 12:24:26 2010 (r215557) @@ -397,7 +397,6 @@ zyd_attach(device_t dev) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_WPA /* 802.11i */ - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:24:26 2010 (r215557) @@ -634,7 +634,6 @@ wpi_attach(device_t dev) | IEEE80211_C_WME /* 802.11e */ | IEEE80211_C_HOSTAP /* Host access point mode */ #endif - | IEEE80211_C_RATECTL /* use ratectl */ ; /* Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211.c Sat Nov 20 12:24:26 2010 (r215557) @@ -485,9 +485,7 @@ ieee80211_vap_setup(struct ieee80211com ieee80211_scan_vattach(vap); ieee80211_regdomain_vattach(vap); ieee80211_radiotap_vattach(vap); - - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR); + ieee80211_ratectl_set(vap, IEEE80211_RATECTL_NONE); return 0; } Modified: stable/8/sys/net80211/ieee80211_node.c ============================================================================== --- stable/8/sys/net80211/ieee80211_node.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_node.c Sat Nov 20 12:24:26 2010 (r215557) @@ -817,8 +817,7 @@ ieee80211_sta_join(struct ieee80211vap * if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); return ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -1038,8 +1037,7 @@ node_free(struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; - if (ni->ni_vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_deinit(ni); + ieee80211_ratectl_node_deinit(ni); ic->ic_node_cleanup(ni); ieee80211_ies_cleanup(&ni->ni_ies); ieee80211_psq_cleanup(&ni->ni_psq); @@ -1404,8 +1402,7 @@ ieee80211_fakeup_adhoc_node(struct ieee8 #endif } ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -1475,8 +1472,7 @@ ieee80211_add_neighbor(struct ieee80211v if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -2345,8 +2341,7 @@ ieee80211_node_join(struct ieee80211_nod ); ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); /* give driver a chance to setup state like ni_txrate */ if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, newassoc); Modified: stable/8/sys/net80211/ieee80211_ratectl.c ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_ratectl.c Sat Nov 20 12:24:26 2010 (r215557) @@ -66,6 +66,14 @@ ieee80211_ratectl_unregister(int type) } void +ieee80211_ratectl_init(struct ieee80211vap *vap) +{ + if (vap->iv_rate == ratectls[IEEE80211_RATECTL_NONE]) + ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR); + vap->iv_rate->ir_init(vap); +} + +void ieee80211_ratectl_set(struct ieee80211vap *vap, int type) { if (type >= IEEE80211_RATECTL_MAX) Modified: stable/8/sys/net80211/ieee80211_ratectl.h ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:24:26 2010 (r215557) @@ -57,17 +57,12 @@ struct ieee80211_ratectl { void ieee80211_ratectl_register(int, const struct ieee80211_ratectl *); void ieee80211_ratectl_unregister(int); +void ieee80211_ratectl_init(struct ieee80211vap *); void ieee80211_ratectl_set(struct ieee80211vap *, int); MALLOC_DECLARE(M_80211_RATECTL); static void __inline -ieee80211_ratectl_init(struct ieee80211vap *vap) -{ - vap->iv_rate->ir_init(vap); -} - -static void __inline ieee80211_ratectl_deinit(struct ieee80211vap *vap) { vap->iv_rate->ir_deinit(vap); Modified: stable/8/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_sta.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_sta.c Sat Nov 20 12:24:26 2010 (r215557) @@ -1598,8 +1598,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, htinfo); ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); } else { #ifdef IEEE80211_SUPPORT_SUPERG if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_ATH)) Modified: stable/8/sys/net80211/ieee80211_var.h ============================================================================== --- stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 12:24:26 2010 (r215557) @@ -597,8 +597,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */ #define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/ #define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS available */ -#define IEEE80211_C_RATECTL 0x00080000 /* CAPABILITY: use ratectl */ -/* 0x700000 available */ +/* 0x7c0000 available */ #define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */ #define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ #define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 12:26:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80400106564A; Sat, 20 Nov 2010 12:26:31 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E98F8FC12; Sat, 20 Nov 2010 12:26:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCQVI9011659; Sat, 20 Nov 2010 12:26:31 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCQVB3011657; Sat, 20 Nov 2010 12:26:31 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201226.oAKCQVB3011657@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215558 - stable/8/sys/net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:26:31 -0000 Author: bschmidt Date: Sat Nov 20 12:26:31 2010 New Revision: 215558 URL: http://svn.freebsd.org/changeset/base/215558 Log: MFC r215244: Some device drivers calculate various timing related things based on the currently selected rate. The calculations of course need a valid rate. To make that possible before any call to node_rate() is done, initialize ni_txrate on none_node_init() calls. Modified: stable/8/sys/net80211/ieee80211_ratectl_none.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_ratectl_none.c ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl_none.c Sat Nov 20 12:24:26 2010 (r215557) +++ stable/8/sys/net80211/ieee80211_ratectl_none.c Sat Nov 20 12:26:31 2010 (r215558) @@ -59,6 +59,7 @@ none_deinit(struct ieee80211vap *vap) static void none_node_init(struct ieee80211_node *ni) { + ni->ni_txrate = ni->ni_rates.rs_rates[0] & IEEE80211_RATE_VAL; } static void From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 12:28:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAC9010656A7; Sat, 20 Nov 2010 12:28:24 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EE378FC39; Sat, 20 Nov 2010 12:28:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCSO2n011789; Sat, 20 Nov 2010 12:28:24 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCSOEG011787; Sat, 20 Nov 2010 12:28:24 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201228.oAKCSOEG011787@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215560 - stable/8/sys/net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:28:24 -0000 Author: bschmidt Date: Sat Nov 20 12:28:24 2010 New Revision: 215560 URL: http://svn.freebsd.org/changeset/base/215560 Log: MFC r215289: The ni_rctls checks are used to verify that a ratectl algo has set up its internal data. This has been used to bypass missing calls in drivers which do not use the ratectl framework correctly. Issue is, not all algos use that variable, or even have internal data, therefore valid calls are not done. Fix this by removing the checks, all driver issues should be resolved. Modified: stable/8/sys/net80211/ieee80211_ratectl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_ratectl.h ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:27:40 2010 (r215559) +++ stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:28:24 2010 (r215560) @@ -81,8 +81,6 @@ ieee80211_ratectl_node_deinit(struct iee { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_node_deinit(ni); } @@ -91,8 +89,6 @@ ieee80211_ratectl_rate(struct ieee80211_ { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return 0; return vap->iv_rate->ir_rate(ni, arg, iarg); } @@ -100,8 +96,6 @@ static void __inline ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap, const struct ieee80211_node *ni, int status, void *arg1, void *arg2) { - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2); } @@ -111,8 +105,6 @@ ieee80211_ratectl_tx_update(const struct { if (vap->iv_rate->ir_tx_update == NULL) return; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3); } From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 12:59:01 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B35B31065672; Sat, 20 Nov 2010 12:59:01 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1BC88FC19; Sat, 20 Nov 2010 12:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCx1hM012576; Sat, 20 Nov 2010 12:59:01 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCx1sp012574; Sat, 20 Nov 2010 12:59:01 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201259.oAKCx1sp012574@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215561 - stable/8/sys/dev/wpi X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:59:01 -0000 Author: bschmidt Date: Sat Nov 20 12:59:01 2010 New Revision: 215561 URL: http://svn.freebsd.org/changeset/base/215561 Log: MFC r199018 & r199037: Turn off debug output by default. Committed by: dougb Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:28:24 2010 (r215560) +++ stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:59:01 2010 (r215561) @@ -127,7 +127,7 @@ enum { WPI_DEBUG_ANY = 0xffffffff }; -static int wpi_debug = 1; +static int wpi_debug = 0; SYSCTL_INT(_debug, OID_AUTO, wpi, CTLFLAG_RW, &wpi_debug, 0, "wpi debug level"); TUNABLE_INT("debug.wpi", &wpi_debug); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 13:13:00 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16F86106566C; Sat, 20 Nov 2010 13:13:00 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 047258FC18; Sat, 20 Nov 2010 13:13:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKDD06m012945; Sat, 20 Nov 2010 13:13:00 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDCxvF012942; Sat, 20 Nov 2010 13:12:59 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201312.oAKDCxvF012942@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215562 - stable/8/sys/dev/iwn X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:13:00 -0000 Author: bschmidt Date: Sat Nov 20 13:12:59 2010 New Revision: 215562 URL: http://svn.freebsd.org/changeset/base/215562 Log: MFC r212853-212855: Rewrite parts of the calibration code which is run while bringing up the device: - Group functions used for initial calibration. - Unobscure some of the code by moving it into its own functions. - Get rid of some magic numbers. - Create similar structure as the reference driver has, this should make further syncs easier. Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 12:59:01 2010 (r215561) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 13:12:59 2010 (r215562) @@ -135,8 +135,6 @@ static void iwn_rx_done(struct iwn_softc static void iwn_rx_compressed_ba(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); #endif -static void iwn5000_rx_calib_results(struct iwn_softc *, - struct iwn_rx_desc *, struct iwn_rx_data *); static void iwn_rx_statistics(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); static void iwn4965_tx_done(struct iwn_softc *, struct iwn_rx_desc *, @@ -220,8 +218,14 @@ static void iwn5000_ampdu_tx_start(struc struct ieee80211_node *, uint8_t, uint16_t); static void iwn5000_ampdu_tx_stop(struct iwn_softc *, uint8_t, uint16_t); #endif -static int iwn5000_query_calibration(struct iwn_softc *); -static int iwn5000_send_calibration(struct iwn_softc *); +static int iwn5000_send_calib_results(struct iwn_softc *); +static int iwn5000_save_calib_result(struct iwn_softc *, + struct iwn_phy_calib *, int, int); +static void iwn5000_free_calib_results(struct iwn_softc *); +static int iwn5000_chrystal_calib(struct iwn_softc *); +static int iwn5000_send_calib_query(struct iwn_softc *); +static int iwn5000_rx_calib_result(struct iwn_softc *, + struct iwn_rx_desc *, struct iwn_rx_data *); static int iwn5000_send_wimax_coex(struct iwn_softc *); static int iwn4965_post_alive(struct iwn_softc *); static int iwn5000_post_alive(struct iwn_softc *); @@ -704,6 +708,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn5000fw"; sc->txchainmask = IWN_ANT_B; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_TX_IQ_PERIODIC | + IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_5150: sc->sc_hal = &iwn5000_hal; @@ -711,6 +718,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn5150fw"; sc->txchainmask = IWN_ANT_A; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_DC | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_5300: case IWN_HW_REV_TYPE_5350: @@ -719,6 +728,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn5000fw"; sc->txchainmask = IWN_ANT_ABC; sc->rxchainmask = IWN_ANT_ABC; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_TX_IQ_PERIODIC | + IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_1000: sc->sc_hal = &iwn5000_hal; @@ -726,6 +738,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn1000fw"; sc->txchainmask = IWN_ANT_A; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_TX_IQ_PERIODIC | + IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_6000: sc->sc_hal = &iwn5000_hal; @@ -743,6 +758,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->rxchainmask = IWN_ANT_ABC; break; } + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_6050: sc->sc_hal = &iwn5000_hal; @@ -750,6 +767,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn6050fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_DC | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_6005: sc->sc_hal = &iwn5000_hal; @@ -757,6 +776,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn6005fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; default: device_printf(sc->sc_dev, "adapter type %d not supported\n", @@ -841,6 +862,8 @@ iwn_cleanup(device_t dev) ieee80211_ifdetach(ic); } + iwn5000_free_calib_results(sc); + /* Free DMA resources. */ iwn_free_rx_ring(sc, &sc->rxq); if (sc->sc_hal != NULL) @@ -1696,12 +1719,6 @@ iwn5000_read_eeprom(struct iwn_softc *sc sc->temp_off = temp - (volt / -5); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "temp=%d volt=%d offset=%dK\n", temp, volt, sc->temp_off); - } else { - /* Read crystal calibration. */ - iwn_read_prom_data(sc, base + IWN5000_EEPROM_CRYSTAL, - &sc->eeprom_crystal, sizeof (uint32_t)); - DPRINTF(sc, IWN_DEBUG_CALIBRATE, "crystal calibration 0x%08x\n", - le32toh(sc->eeprom_crystal)); } } @@ -2195,64 +2212,6 @@ iwn_rx_compressed_ba(struct iwn_softc *s #endif /* - * Process a CALIBRATION_RESULT notification sent by the initialization - * firmware on response to a CMD_CALIB_CONFIG command (5000 only.) - */ -static void -iwn5000_rx_calib_results(struct iwn_softc *sc, struct iwn_rx_desc *desc, - struct iwn_rx_data *data) -{ - struct iwn_phy_calib *calib = (struct iwn_phy_calib *)(desc + 1); - int len, idx = -1; - - /* Runtime firmware should not send such a notification. */ - if (sc->sc_flags & IWN_FLAG_CALIB_DONE) - return; - - bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); - len = (le32toh(desc->len) & 0x3fff) - 4; - - switch (calib->code) { - case IWN5000_PHY_CALIB_DC: - if (sc->hw_type == IWN_HW_REV_TYPE_5150 || - sc->hw_type == IWN_HW_REV_TYPE_6050) - idx = 0; - break; - case IWN5000_PHY_CALIB_LO: - idx = 1; - break; - case IWN5000_PHY_CALIB_TX_IQ: - idx = 2; - break; - case IWN5000_PHY_CALIB_TX_IQ_PERIODIC: - if (sc->hw_type < IWN_HW_REV_TYPE_6000 && - sc->hw_type != IWN_HW_REV_TYPE_5150) - idx = 3; - break; - case IWN5000_PHY_CALIB_BASE_BAND: - idx = 4; - break; - } - if (idx == -1) /* Ignore other results. */ - return; - - /* Save calibration result. */ - if (sc->calibcmd[idx].buf != NULL) - free(sc->calibcmd[idx].buf, M_DEVBUF); - sc->calibcmd[idx].buf = malloc(len, M_DEVBUF, M_NOWAIT); - if (sc->calibcmd[idx].buf == NULL) { - DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "not enough memory for calibration result %d\n", - calib->code); - return; - } - DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "saving calibration result code=%d len=%d\n", calib->code, len); - sc->calibcmd[idx].len = len; - memcpy(sc->calibcmd[idx].buf, calib, len); -} - -/* * Process an RX_STATISTICS or BEACON_STATISTICS firmware notification. * The latter is sent by the firmware after each received beacon. */ @@ -2607,7 +2566,7 @@ iwn_notif_intr(struct iwn_softc *sc) break; } case IWN5000_CALIBRATION_RESULT: - iwn5000_rx_calib_results(sc, desc, data); + iwn5000_rx_calib_result(sc, desc, data); break; case IWN5000_CALIBRATION_DONE: @@ -5238,22 +5197,140 @@ iwn5000_ampdu_tx_stop(struct iwn_softc * #endif /* - * Query calibration tables from the initialization firmware. We do this - * only once at first boot. Called from a process context. + * Send calibration results to the runtime firmware. These results were + * obtained on first boot from the initialization firmware, or by reading + * the EEPROM for crystal calibration. */ static int -iwn5000_query_calibration(struct iwn_softc *sc) +iwn5000_send_calib_results(struct iwn_softc *sc) { + struct iwn_calib_info *calib_result; + int idx, error; + + for (idx = 0; idx < IWN_CALIB_NUM; idx++) { + calib_result = &sc->calib_results[idx]; + + /* No support for this type of calibration. */ + if ((sc->calib_init & (1 << idx)) == 0) + continue; + + /* No calibration result available. */ + if (calib_result->buf == NULL) + continue; + + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: send calibration result idx=%d, len=%d\n", + __func__, idx, calib_result->len); + + error = iwn_cmd(sc, IWN_CMD_PHY_CALIB, calib_result->buf, + calib_result->len, 0); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not send calibration result " + "idx=%d, error=%d\n", + __func__, idx, error); + return error; + } + } + return 0; +} + +/* + * Save calibration result at the given index. The index determines + * in which order the results are sent to the runtime firmware. + */ +static int +iwn5000_save_calib_result(struct iwn_softc *sc, struct iwn_phy_calib *calib, + int len, int idx) +{ + struct iwn_calib_info *calib_result = &sc->calib_results[idx]; + + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: saving calibration result code=%d, idx=%d, len=%d\n", + __func__, calib->code, idx, len); + + if (calib_result->buf != NULL) + free(calib_result->buf, M_DEVBUF); + + calib_result->buf = malloc(len, M_DEVBUF, M_NOWAIT); + if (calib_result->buf == NULL) { + device_printf(sc->sc_dev, + "%s: not enough memory for calibration result " + "code=%d, len=%d\n", __func__, calib->code, len); + return ENOMEM; + } + + calib_result->len = len; + memcpy(calib_result->buf, calib, len); + return 0; +} + +static void +iwn5000_free_calib_results(struct iwn_softc *sc) +{ + struct iwn_calib_info *calib_result; + int idx; + + for (idx = 0; idx < IWN_CALIB_NUM; idx++) { + calib_result = &sc->calib_results[idx]; + + if (calib_result->buf != NULL) + free(calib_result->buf, M_DEVBUF); + + calib_result->buf = NULL; + calib_result->len = 0; + } +} + +/* + * Obtain the crystal calibration result from the EEPROM. + */ +static int +iwn5000_chrystal_calib(struct iwn_softc *sc) +{ + struct iwn5000_phy_calib_crystal cmd; + uint32_t base, crystal; + uint16_t val; + + /* Read crystal calibration. */ + iwn_read_prom_data(sc, IWN5000_EEPROM_CAL, &val, 2); + base = le16toh(val); + iwn_read_prom_data(sc, base + IWN5000_EEPROM_CRYSTAL, &crystal, + sizeof(uint32_t)); + DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: crystal calibration=0x%08x\n", + __func__, le32toh(crystal)); + + memset(&cmd, 0, sizeof cmd); + cmd.code = IWN5000_PHY_CALIB_CRYSTAL; + cmd.ngroups = 1; + cmd.isvalid = 1; + cmd.cap_pin[0] = le32toh(crystal) & 0xff; + cmd.cap_pin[1] = (le32toh(crystal) >> 16) & 0xff; + + return iwn5000_save_calib_result(sc, (struct iwn_phy_calib *)&cmd, + sizeof cmd, IWN_CALIB_IDX_XTAL); +} + +/* + * Query calibration results from the initialization firmware. We do this + * only once at first boot. + */ +static int +iwn5000_send_calib_query(struct iwn_softc *sc) +{ +#define CALIB_INIT_CFG 0xffffffff; struct iwn5000_calib_config cmd; int error; memset(&cmd, 0, sizeof cmd); - cmd.ucode.once.enable = 0xffffffff; - cmd.ucode.once.start = 0xffffffff; - cmd.ucode.once.send = 0xffffffff; - cmd.ucode.flags = 0xffffffff; - DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: sending calibration query\n", + cmd.ucode.once.enable = CALIB_INIT_CFG; + cmd.ucode.once.start = CALIB_INIT_CFG; + cmd.ucode.once.send = CALIB_INIT_CFG; + cmd.ucode.flags = CALIB_INIT_CFG; + + DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: query calibration results\n", __func__); + error = iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof cmd, 0); if (error != 0) return error; @@ -5261,34 +5338,56 @@ iwn5000_query_calibration(struct iwn_sof /* Wait at most two seconds for calibration to complete. */ if (!(sc->sc_flags & IWN_FLAG_CALIB_DONE)) error = msleep(sc, &sc->sc_mtx, PCATCH, "iwninit", 2 * hz); + return error; +#undef CALIB_INIT_CFG } /* - * Send calibration results to the runtime firmware. These results were - * obtained on first boot from the initialization firmware. + * Process a CALIBRATION_RESULT notification sent by the initialization + * firmware on response to a CMD_CALIB_CONFIG command. */ static int -iwn5000_send_calibration(struct iwn_softc *sc) +iwn5000_rx_calib_result(struct iwn_softc *sc, struct iwn_rx_desc *desc, + struct iwn_rx_data *data) { - int idx, error; +#define FRAME_SIZE_MASK 0x3fff + struct iwn_phy_calib *calib = (struct iwn_phy_calib *)(desc + 1); + int len, idx; - for (idx = 0; idx < 5; idx++) { - if (sc->calibcmd[idx].buf == NULL) - continue; /* No results available. */ + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); + len = (le32toh(desc->len) & FRAME_SIZE_MASK); + + /* Remove length field itself. */ + len -= 4; + + /* + * Determine the order in which the results will be send to the + * runtime firmware. + */ + switch (calib->code) { + case IWN5000_PHY_CALIB_DC: + idx = IWN_CALIB_IDX_DC; + break; + case IWN5000_PHY_CALIB_LO: + idx = IWN_CALIB_IDX_LO; + break; + case IWN5000_PHY_CALIB_TX_IQ: + idx = IWN_CALIB_IDX_TX_IQ; + break; + case IWN5000_PHY_CALIB_TX_IQ_PERIODIC: + idx = IWN_CALIB_IDX_TX_IQ_PERIODIC; + break; + case IWN5000_PHY_CALIB_BASE_BAND: + idx = IWN_CALIB_IDX_BASE_BAND; + break; + default: DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "send calibration result idx=%d len=%d\n", - idx, sc->calibcmd[idx].len); - error = iwn_cmd(sc, IWN_CMD_PHY_CALIB, sc->calibcmd[idx].buf, - sc->calibcmd[idx].len, 0); - if (error != 0) { - device_printf(sc->sc_dev, - "%s: could not send calibration result, error %d\n", - __func__, error); - return error; - } + "%s: unknown calibration code=%d\n", __func__, calib->code); + return EINVAL; } - return 0; + return iwn5000_save_calib_result(sc, calib, len, idx); +#undef FRAME_SIZE_MASK } static int @@ -5434,36 +5533,40 @@ iwn5000_post_alive(struct iwn_softc *sc) __func__, error); return error; } - if (sc->hw_type != IWN_HW_REV_TYPE_5150) { - struct iwn5000_phy_calib_crystal cmd; - /* Perform crystal calibration. */ - memset(&cmd, 0, sizeof cmd); - cmd.code = IWN5000_PHY_CALIB_CRYSTAL; - cmd.ngroups = 1; - cmd.isvalid = 1; - cmd.cap_pin[0] = le32toh(sc->eeprom_crystal) & 0xff; - cmd.cap_pin[1] = (le32toh(sc->eeprom_crystal) >> 16) & 0xff; - DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "sending crystal calibration %d, %d\n", - cmd.cap_pin[0], cmd.cap_pin[1]); - error = iwn_cmd(sc, IWN_CMD_PHY_CALIB, &cmd, sizeof cmd, 0); + if (!(sc->sc_flags & IWN_FLAG_CALIB_DONE)) { + /* + * Start calibration by setting and sending the chrystal + * calibration first, this must be done before we are able + * to query the other calibration results. + */ + error = iwn5000_chrystal_calib(sc); if (error != 0) { device_printf(sc->sc_dev, - "%s: crystal calibration failed, error %d\n", - __func__, error); + "%s: could not set chrystal calibration, " + "error=%d\n", __func__, error); return error; } - } - if (!(sc->sc_flags & IWN_FLAG_CALIB_DONE)) { - /* Query calibration from the initialization firmware. */ - error = iwn5000_query_calibration(sc); + error = iwn5000_send_calib_results(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not send chrystal calibration, " + "error=%d\n", __func__, error); + return error; + } + + /* + * Query other calibration results from the initialization + * firmware. + */ + error = iwn5000_send_calib_query(sc); if (error != 0) { device_printf(sc->sc_dev, - "%s: could not query calibration, error %d\n", + "%s: could not query calibration, error=%d\n", __func__, error); return error; } + /* * We have the calibration results now, reboot with the * runtime firmware (call ourselves recursively!) @@ -5471,8 +5574,11 @@ iwn5000_post_alive(struct iwn_softc *sc) iwn_hw_stop(sc); error = iwn_hw_init(sc); } else { - /* Send calibration results to runtime firmware. */ - error = iwn5000_send_calibration(sc); + /* + * Send calibration results obtained from the initialization + * firmware to the runtime firmware. + */ + error = iwn5000_send_calib_results(sc); } return error; } Modified: stable/8/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnvar.h Sat Nov 20 12:59:01 2010 (r215561) +++ stable/8/sys/dev/iwn/if_iwnvar.h Sat Nov 20 13:12:59 2010 (r215562) @@ -263,9 +263,23 @@ struct iwn_softc { int calib_cnt; struct iwn_calib_state calib; + u_int calib_init; +#define IWN_CALIB_XTAL (1 << IWN_CALIB_IDX_XTAL) +#define IWN_CALIB_DC (1 << IWN_CALIB_IDX_DC) +#define IWN_CALIB_LO (1 << IWN_CALIB_IDX_LO) +#define IWN_CALIB_TX_IQ (1 << IWN_CALIB_IDX_TX_IQ) +#define IWN_CALIB_TX_IQ_PERIODIC (1 << IWN_CALIB_IDX_TX_IQ_PERIODIC) +#define IWN_CALIB_BASE_BAND (1 << IWN_CALIB_IDX_BASE_BAND) +#define IWN_CALIB_NUM 6 + struct iwn_calib_info calib_results[IWN_CALIB_NUM]; +#define IWN_CALIB_IDX_XTAL 0 +#define IWN_CALIB_IDX_DC 1 +#define IWN_CALIB_IDX_LO 2 +#define IWN_CALIB_IDX_TX_IQ 3 +#define IWN_CALIB_IDX_TX_IQ_PERIODIC 4 +#define IWN_CALIB_IDX_BASE_BAND 5 struct iwn_fw_info fw; - struct iwn_calib_info calibcmd[5]; uint32_t errptr; struct iwn_rx_stat last_rx_stat; @@ -284,7 +298,6 @@ struct iwn_softc { uint16_t rfcfg; uint8_t calib_ver; char eeprom_domain[4]; - uint32_t eeprom_crystal; int16_t eeprom_voltage; int8_t maxpwr2GHz; int8_t maxpwr5GHz; From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 13:24:05 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BADC0106564A; Sat, 20 Nov 2010 13:24:05 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A93078FC16; Sat, 20 Nov 2010 13:24:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKDO5v0013290; Sat, 20 Nov 2010 13:24:05 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDO5mB013288; Sat, 20 Nov 2010 13:24:05 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201324.oAKDO5mB013288@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215563 - stable/8/sys/net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:24:05 -0000 Author: bschmidt Date: Sat Nov 20 13:24:05 2010 New Revision: 215563 URL: http://svn.freebsd.org/changeset/base/215563 Log: MFC r209092: Remove GNU-style struct initialization. Committed by: ed Modified: stable/8/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 13:12:59 2010 (r215562) +++ stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 13:24:05 2010 (r215563) @@ -58,12 +58,12 @@ struct rssadapt_expavgctl { }; static struct rssadapt_expavgctl master_expavgctl = { - rc_decay_denom : 16, - rc_decay_old : 15, - rc_thresh_denom : 8, - rc_thresh_old : 4, - rc_avgrssi_denom : 8, - rc_avgrssi_old : 4 + .rc_decay_denom = 16, + .rc_decay_old = 15, + .rc_thresh_denom = 8, + .rc_thresh_old = 4, + .rc_avgrssi_denom = 8, + .rc_avgrssi_old = 4 }; #ifdef interpolate From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 13:26:09 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89EFA106564A; Sat, 20 Nov 2010 13:26:09 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 782328FC0A; Sat, 20 Nov 2010 13:26:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKDQ9gs013388; Sat, 20 Nov 2010 13:26:09 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDQ9C7013386; Sat, 20 Nov 2010 13:26:09 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201326.oAKDQ9C7013386@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215564 - stable/8/sys/net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:26:09 -0000 Author: bschmidt Date: Sat Nov 20 13:26:09 2010 New Revision: 215564 URL: http://svn.freebsd.org/changeset/base/215564 Log: MFC r213321: Fix background roaming to actually work in AUTO roaming mode. IEEE80211_F_BGSCAN is a vap flag, not a channel flag. So although bgscan occured, sta_roam_check() would never be called. Committed by: adrian Modified: stable/8/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_scan_sta.c Sat Nov 20 13:24:05 2010 (r215563) +++ stable/8/sys/net80211/ieee80211_scan_sta.c Sat Nov 20 13:26:09 2010 (r215564) @@ -1361,7 +1361,7 @@ sta_age(struct ieee80211_scan_state *ss) KASSERT(vap->iv_opmode == IEEE80211_M_STA, ("wrong mode %u", vap->iv_opmode)); if (vap->iv_roaming == IEEE80211_ROAMING_AUTO && - (vap->iv_ic->ic_flags & IEEE80211_F_BGSCAN) && + (vap->iv_flags & IEEE80211_F_BGSCAN) && vap->iv_state >= IEEE80211_S_RUN) /* XXX vap is implicit */ sta_roam_check(ss, vap); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 13:28:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07790106564A; Sat, 20 Nov 2010 13:28:15 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id 685278FC08; Sat, 20 Nov 2010 13:28:14 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id oAKDS8cF068295; Sat, 20 Nov 2010 22:28:10 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sat, 20 Nov 2010 22:28:08 +0900 (JST) Message-Id: <20101120.222808.162088883.nyan@FreeBSD.org> To: attilio@freebsd.org From: TAKAHASHI Yoshihiro In-Reply-To: References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:28:15 -0000 In article Attilio Rao writes: > r215545 might fix this, thanks a lot for reporting promptly. > > Jeeeeeez, I usually made the svn mv by hand rather than relying on > merging for STBALE_8, I would have kept to do that :/. It is still broken on pc98. Because __i386__ is also defined on pc98. --- TAKAHASHI Yoshihiro From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 13:28:32 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4A56106567A; Sat, 20 Nov 2010 13:28:32 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A34268FC21; Sat, 20 Nov 2010 13:28:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKDSWGo013501; Sat, 20 Nov 2010 13:28:32 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDSWf1013499; Sat, 20 Nov 2010 13:28:32 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201328.oAKDSWf1013499@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215565 - stable/8/sys/net80211 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:28:32 -0000 Author: bschmidt Date: Sat Nov 20 13:28:32 2010 New Revision: 215565 URL: http://svn.freebsd.org/changeset/base/215565 Log: MFC r201793: Fix #ifdefs so that GCC 4.4 doesn't complain about it. Committed by: trasz Modified: stable/8/sys/net80211/ieee80211_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_var.h ============================================================================== --- stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 13:26:09 2010 (r215564) +++ stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 13:28:32 2010 (r215565) @@ -32,11 +32,11 @@ * Definitions for IEEE 802.11 drivers. */ /* NB: portability glue must go first */ -#ifdef __NetBSD__ +#if defined(__NetBSD__) #include -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #include -#elif __linux__ +#elif defined(__linux__) #include #else #error "No support for your operating system!" From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 16:42:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C237D1065670; Sat, 20 Nov 2010 16:42:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0B238FC08; Sat, 20 Nov 2010 16:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKGgJao018900; Sat, 20 Nov 2010 16:42:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKGgJ7L018898; Sat, 20 Nov 2010 16:42:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011201642.oAKGgJ7L018898@svn.freebsd.org> From: Andriy Gapon Date: Sat, 20 Nov 2010 16:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215571 - stable/8/sys/dev/acpica X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:42:19 -0000 Author: avg Date: Sat Nov 20 16:42:19 2010 New Revision: 215571 URL: http://svn.freebsd.org/changeset/base/215571 Log: fix a mismerge in r215521: MFC imports of ACPICA revisions 20100428 through 20101013 The mismerge resulted in ia64 build breakage. This is a direct commit. Pointyhat to: avg Modified: stable/8/sys/dev/acpica/acpi.c Modified: stable/8/sys/dev/acpica/acpi.c ============================================================================== --- stable/8/sys/dev/acpica/acpi.c Sat Nov 20 16:03:53 2010 (r215570) +++ stable/8/sys/dev/acpica/acpi.c Sat Nov 20 16:42:19 2010 (r215571) @@ -2314,6 +2314,7 @@ acpi_sleep_force(void *arg) int acpi_ReqSleepState(struct acpi_softc *sc, int state) { +#if defined(__amd64__) || defined(__i386__) #if defined(__i386__) struct apm_clone_data *clone; #endif @@ -2326,7 +2327,6 @@ acpi_ReqSleepState(struct acpi_softc *sc ACPI_LOCK(acpi); -#if defined(__amd64__) || defined(__i386__) /* If a suspend request is already in progress, just return. */ if (sc->acpi_next_sstate != 0) { ACPI_UNLOCK(acpi); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 16:46:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2466106566B; Sat, 20 Nov 2010 16:46:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0E988FC14; Sat, 20 Nov 2010 16:46:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKGkGTG019087; Sat, 20 Nov 2010 16:46:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKGkGW7019085; Sat, 20 Nov 2010 16:46:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201646.oAKGkGW7019085@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 16:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215572 - stable/8/sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:46:16 -0000 Author: jilles Date: Sat Nov 20 16:46:16 2010 New Revision: 215572 URL: http://svn.freebsd.org/changeset/base/215572 Log: MFC r215183: Make POLL_ERR and POLL_HUP different. The kernel currently does not generate any of the POLL_* constants, but some applications use them and break if they are not all distinct. PR: kern/126076 Modified: stable/8/sys/sys/signal.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/signal.h ============================================================================== --- stable/8/sys/sys/signal.h Sat Nov 20 16:42:19 2010 (r215571) +++ stable/8/sys/sys/signal.h Sat Nov 20 16:46:16 2010 (r215572) @@ -283,7 +283,7 @@ typedef struct __siginfo { #define POLL_MSG 3 /* Input message available */ #define POLL_ERR 4 /* I/O Error */ #define POLL_PRI 5 /* High priority input available */ -#define POLL_HUP 4 /* Device disconnected */ +#define POLL_HUP 6 /* Device disconnected */ #endif From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 18:24:09 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6C21065673; Sat, 20 Nov 2010 18:24:09 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAE798FC13; Sat, 20 Nov 2010 18:24:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKIO9g0021443; Sat, 20 Nov 2010 18:24:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKIO95j021441; Sat, 20 Nov 2010 18:24:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011201824.oAKIO95j021441@svn.freebsd.org> From: Attilio Rao Date: Sat, 20 Nov 2010 18:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215575 - stable/8/sys/x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 18:24:09 -0000 Author: attilio Date: Sat Nov 20 18:24:09 2010 New Revision: 215575 URL: http://svn.freebsd.org/changeset/base/215575 Log: Add a second fix-up for the PC98 case. PC98 cases might be explicit in presence of a difference with i386 because both are defined, leading to mishandling of code in circumstances like this. Reported by: nyan Modified: stable/8/sys/x86/x86/nexus.c Modified: stable/8/sys/x86/x86/nexus.c ============================================================================== --- stable/8/sys/x86/x86/nexus.c Sat Nov 20 17:27:38 2010 (r215574) +++ stable/8/sys/x86/x86/nexus.c Sat Nov 20 18:24:09 2010 (r215575) @@ -76,12 +76,12 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ISA #include -#ifdef __amd64__ +#ifdef PC98 +#include +#elif defined(__amd64__) #include -#elif defined(__i386__) -#include #else -#include +#include #endif #endif #include From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 18:24:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E517F106564A; Sat, 20 Nov 2010 18:24:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6CB8FC1D; Sat, 20 Nov 2010 18:24:54 +0000 (UTC) Received: by qwf6 with SMTP id 6so128583qwf.13 for ; Sat, 20 Nov 2010 10:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=K0Vjp5UtiZA/SLjDHQmAK/bc09F4hdKD2tYGaXN5FlI=; b=UuRMeFv5DrIw01EoY98Kb6R+0no4jcP+8upu/uaIXDUlhERQ0+dDjaGVvA30OUSPni bhh39X9owzTebk+xOSSRZ1icUjJEheA9U/KWOXxyt7BKLvDfOyjCRuAXRtpHPot5vs4T IIdoyq2iiVtBJXCbWAxLco3pkMu3FkIfGsRMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NyvUupnnscYrMnMHOEYeGDKk2ibjFZJ3hDTRbEzvV/izdRT5YqBillTcR+LpP1wZ8a 7i+3XU+9a5B+6uEipPT71l7OEi1uVoVS0vLxQGg6aWe/Gy8TX8fGb8OX2BqjLg0qhzwb Lz2MSe1yIHysHq2eSzEih/VmsBbFfDId6EAdo= MIME-Version: 1.0 Received: by 10.229.236.83 with SMTP id kj19mr3198278qcb.218.1290277494435; Sat, 20 Nov 2010 10:24:54 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Sat, 20 Nov 2010 10:24:54 -0800 (PST) In-Reply-To: <20101120.222808.162088883.nyan@FreeBSD.org> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> <20101120.222808.162088883.nyan@FreeBSD.org> Date: Sat, 20 Nov 2010 13:24:54 -0500 X-Google-Sender-Auth: GPRQ75CkdfvQ3Qe83aX7oBlZjf0 Message-ID: From: Attilio Rao To: TAKAHASHI Yoshihiro Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: kostikbel@gmail.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 18:24:56 -0000 2010/11/20 TAKAHASHI Yoshihiro : > In article > Attilio Rao writes: > >> r215545 might fix this, thanks a lot for reporting promptly. >> >> Jeeeeeez, I usually made the svn mv by hand rather than relying on >> merging for STBALE_8, I would have kept to do that :/. > > It is still broken on pc98. =C2=A0Because __i386__ is also defined on pc9= 8. > Sigh. Hopefully r215575 may fix this. Sorry for the mis-service. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:26:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3BF31065693; Sat, 20 Nov 2010 19:26:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 919B88FC19; Sat, 20 Nov 2010 19:26:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJQZvE023102; Sat, 20 Nov 2010 19:26:35 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJQZWr023100; Sat, 20 Nov 2010 19:26:35 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201926.oAKJQZWr023100@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215578 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:26:35 -0000 Author: tuexen Date: Sat Nov 20 19:26:35 2010 New Revision: 215578 URL: http://svn.freebsd.org/changeset/base/215578 Log: MFC r214876 * Fix an accounting bug regarding SACK/NR-SACK chunks. * Fix the generation of the SACK/NR-SACK gap lists. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Nov 20 19:23:16 2010 (r215577) +++ stable/8/sys/netinet/sctp_output.c Sat Nov 20 19:26:35 2010 (r215578) @@ -9927,7 +9927,7 @@ sctp_send_sack(struct sctp_tcb *stcb) caddr_t limit; uint32_t *dup; int limit_reached = 0; - unsigned int i, sel_start, siz, j, starting_index; + unsigned int i, sel_start, siz, j; unsigned int num_gap_blocks = 0, num_nr_gap_blocks = 0, space; int num_dups = 0; int space_req; @@ -9954,7 +9954,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (chk->rec.chunk_id.id == type) { /* Hmm, found a sack already on queue, remove it */ TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); - asoc->ctrl_queue_cnt++; + asoc->ctrl_queue_cnt--; a_chk = chk; if (a_chk->data) { sctp_m_freem(a_chk->data); @@ -9993,15 +9993,13 @@ sctp_send_sack(struct sctp_tcb *stcb) a_chk->whoTo = NULL; if ((asoc->numduptsns) || - (asoc->last_data_chunk_from->dest_state & SCTP_ADDR_NOT_REACHABLE) - ) { + (asoc->last_data_chunk_from->dest_state & SCTP_ADDR_NOT_REACHABLE)) { /*- * Ok, we have some duplicates or the destination for the * sack is unreachable, lets see if we can select an * alternate than asoc->last_data_chunk_from */ - if ((!(asoc->last_data_chunk_from->dest_state & - SCTP_ADDR_NOT_REACHABLE)) && + if ((!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_NOT_REACHABLE)) && (asoc->used_alt_onsack > asoc->numnets)) { /* We used an alt last time, don't this time */ a_chk->whoTo = NULL; @@ -10120,53 +10118,25 @@ sctp_send_sack(struct sctp_tcb *stcb) } } - if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { - offset = 1; - /*- - * The base TSN is intialized to be the first TSN the peer - * will send us. If the cum-ack is behind this then when they - * send us the next in sequence it will mark the base_tsn bit. - * Thus we need to use the very first selector and the offset - * is 1. Our table is built for this case. - */ - starting_index = 0; + if (((type == SCTP_SELECTIVE_ACK) && + (((asoc->mapping_array[0] | asoc->nr_mapping_array[0]) & 0x01) == 0x00)) || + ((type == SCTP_NR_SELECTIVE_ACK) && + ((asoc->mapping_array[0] & 0x01) == 0x00))) { sel_start = 0; } else { - /*- - * we skip the first selector when the cum-ack is at or above the - * mapping array base. This is because the bits at the base or above - * are turned on and our first selector in the table assumes they are - * off. We thus will use the second selector (first is 0). We use - * the reverse of our macro to fix the offset, in bits, that our - * table is at. Note that this method assumes that the cum-tsn is - * within the first bit, i.e. its value is 0-7 which means the - * result to our offset will be either a 0 - -7. If the cumack - * is NOT in the first byte (0) (which it should be since we did - * a mapping array slide above) then we need to calculate the starting - * index i.e. which byte of the mapping array we should start at. We - * do this by dividing by 8 and pushing the remainder (mod) into offset. - * then we multiply the offset to be negative, since we need a negative - * offset into the selector table. - */ - SCTP_CALC_TSN_TO_GAP(offset, asoc->cumulative_tsn, asoc->mapping_array_base_tsn); - if (offset > 7) { - starting_index = offset / 8; - offset = offset % 8; - printf("Strange starting index is %d offset:%d (not 0/x)\n", - starting_index, offset); - } else { - starting_index = 0; - } - /* We need a negative offset in our table */ - offset *= -1; sel_start = 1; } + if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { + offset = 1; + } else { + offset = asoc->mapping_array_base_tsn - asoc->cumulative_tsn; + } if (((type == SCTP_SELECTIVE_ACK) && compare_with_wrap(highest_tsn, asoc->cumulative_tsn, MAX_TSN)) || ((type == SCTP_NR_SELECTIVE_ACK) && compare_with_wrap(asoc->highest_tsn_inside_map, asoc->cumulative_tsn, MAX_TSN))) { /* we have a gap .. maybe */ - for (i = starting_index; i < siz; i++) { + for (i = 0; i < siz; i++) { if (type == SCTP_SELECTIVE_ACK) { selector = &sack_array[asoc->mapping_array[i] | asoc->nr_mapping_array[i]]; } else { @@ -10224,25 +10194,21 @@ sctp_send_sack(struct sctp_tcb *stcb) mergeable = 0; - if (asoc->highest_tsn_inside_nr_map > asoc->mapping_array_base_tsn) + if (asoc->highest_tsn_inside_nr_map > asoc->mapping_array_base_tsn) { siz = (((asoc->highest_tsn_inside_nr_map - asoc->mapping_array_base_tsn) + 1) + 7) / 8; - else + } else { siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + asoc->highest_tsn_inside_nr_map + 7) / 8; + } + if ((asoc->nr_mapping_array[0] & 0x01) == 0x00) { + sel_start = 0; + } else { + sel_start = 1; + } if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { offset = 1; - /*- - * cum-ack behind the mapping array, so we start and use all - * entries. - */ - sel_start = 0; } else { offset = asoc->mapping_array_base_tsn - asoc->cumulative_tsn; - /*- - * we skip the first one when the cum-ack is at or above the - * mapping array base. Note this only works if - */ - sel_start = 1; } if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, asoc->cumulative_tsn, MAX_TSN)) { /* we have a gap .. maybe */ From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:29:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 531B21065670; Sat, 20 Nov 2010 19:29:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41AB68FC08; Sat, 20 Nov 2010 19:29:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJTJH5023236; Sat, 20 Nov 2010 19:29:19 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJTJcn023234; Sat, 20 Nov 2010 19:29:19 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201929.oAKJTJcn023234@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215579 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:29:19 -0000 Author: tuexen Date: Sat Nov 20 19:29:18 2010 New Revision: 215579 URL: http://svn.freebsd.org/changeset/base/215579 Log: MFC r214877: Do not resend DATA chunks without delay when dropped by the peer and the CRC was correct. Modified: stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:26:35 2010 (r215578) +++ stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:29:18 2010 (r215579) @@ -3115,6 +3115,10 @@ process_chunk_drop(struct sctp_tcb *stcb if ((tp1) && (tp1->sent < SCTP_DATAGRAM_ACKED)) { uint8_t *ddp; + if (((flg & SCTP_BADCRC) == 0) && + ((flg & SCTP_FROM_MIDDLE_BOX) == 0)) { + return (0); + } if ((stcb->asoc.peers_rwnd == 0) && ((flg & SCTP_FROM_MIDDLE_BOX) == 0)) { SCTP_STAT_INCR(sctps_pdrpdiwnp); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:31:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2738106566B; Sat, 20 Nov 2010 19:31:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C09DE8FC12; Sat, 20 Nov 2010 19:31:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJVV6U023338; Sat, 20 Nov 2010 19:31:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJVVSm023334; Sat, 20 Nov 2010 19:31:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201931.oAKJVVSm023334@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215580 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:31:32 -0000 Author: tuexen Date: Sat Nov 20 19:31:31 2010 New Revision: 215580 URL: http://svn.freebsd.org/changeset/base/215580 Log: MFC r214918: Not only stop all timers when entering the SHUTDOWN_SENT state, but also when entering the SHUTDOWN_ACK_SENT state. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Nov 20 19:29:18 2010 (r215579) +++ stable/8/sys/netinet/sctp_indata.c Sat Nov 20 19:31:31 2010 (r215580) @@ -4369,7 +4369,7 @@ again: SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination); - + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, asoc->primary_destination); } @@ -5081,7 +5081,7 @@ done_with_it: SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination); - + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, asoc->primary_destination); return; Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:29:18 2010 (r215579) +++ stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:31:31 2010 (r215580) @@ -908,9 +908,7 @@ sctp_handle_shutdown(struct sctp_shutdow } SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_ACK_SENT); SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_7); - /* start SHUTDOWN timer */ + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net); } Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 19:29:18 2010 (r215579) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 19:31:31 2010 (r215580) @@ -725,6 +725,31 @@ sctp_audit_log(uint8_t ev, uint8_t fd) #endif /* + * sctp_stop_timers_for_shutdown() should be called + * when entering the SHUTDOWN_SENT or SHUTDOWN_ACK_SENT + * state to make sure that all timers are stopped. + */ +void +sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) +{ + struct sctp_association *asoc; + struct sctp_nets *net; + + asoc = &stcb->asoc; + + (void)SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); + TAILQ_FOREACH(net, &asoc->nets, sctp_next) { + (void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer); + (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); + } +} + +/* * a list of sizes based on typical mtu's, used only if next hop size not * returned. */ @@ -749,26 +774,6 @@ static int sctp_mtu_sizes[] = { 65535 }; -void -sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) -{ - struct sctp_association *asoc; - struct sctp_nets *net; - - asoc = &stcb->asoc; - - (void)SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - } -} - int find_next_best_mtu(int totsz) { From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:33:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7745106564A; Sat, 20 Nov 2010 19:33:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C58568FC1D; Sat, 20 Nov 2010 19:33:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJXgOO023440; Sat, 20 Nov 2010 19:33:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJXgi9023438; Sat, 20 Nov 2010 19:33:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201933.oAKJXgi9023438@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215581 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:33:43 -0000 Author: tuexen Date: Sat Nov 20 19:33:42 2010 New Revision: 215581 URL: http://svn.freebsd.org/changeset/base/215581 Log: MFC r214928: * Use exponential backoff for retransmission of SHUTDOWN and SHUTDOWN-ACK chunks. * While there, do some cleanups. Modified: stable/8/sys/netinet/sctp_timer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:31:31 2010 (r215580) +++ stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:33:42 2010 (r215581) @@ -291,6 +291,10 @@ sctp_threshold_management(struct sctp_in return (0); } +/* + * sctp_find_alternate_net() returns a non-NULL pointer as long + * the argument net is non-NULL. + */ struct sctp_nets * sctp_find_alternate_net(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -440,8 +444,7 @@ sctp_find_alternate_net(struct sctp_tcb else if (mode == 1) { TAILQ_FOREACH(mnet, &stcb->asoc.nets, sctp_next) { if (((mnet->dest_state & SCTP_ADDR_REACHABLE) != SCTP_ADDR_REACHABLE) || - (mnet->dest_state & SCTP_ADDR_UNCONFIRMED) - ) { + (mnet->dest_state & SCTP_ADDR_UNCONFIRMED)) { /* * will skip ones that are not-reachable or * unconfirmed @@ -505,12 +508,10 @@ sctp_find_alternate_net(struct sctp_tcb } alt->src_addr_selected = 0; } - if ( - ((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && - (alt->ro.ro_rt != NULL) && /* sa_ignore NO_NULL_CHK */ - (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED)) - ) { + if (((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && + (alt->ro.ro_rt != NULL) && + (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED))) { /* Found a reachable address */ break; } @@ -549,8 +550,6 @@ sctp_find_alternate_net(struct sctp_tcb return (alt); } - - static void sctp_backoff_on_timeout(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -1021,8 +1020,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, * used, then pick dest with largest ssthresh for any * retransmission. */ - alt = net; - alt = sctp_find_alternate_net(stcb, alt, 1); + alt = sctp_find_alternate_net(stcb, net, 1); /* * CUCv2: If a different dest is picked for the * retransmission, then new (rtx-)pseudo_cumack needs to be @@ -1213,7 +1211,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp struct sctp_nets *alt; alt = sctp_find_alternate_net(stcb, stcb->asoc.primary_destination, 0); - if ((alt != NULL) && (alt != stcb->asoc.primary_destination)) { + if (alt != stcb->asoc.primary_destination) { sctp_move_chunks_from_net(stcb, stcb->asoc.primary_destination); stcb->asoc.primary_destination = alt; } @@ -1480,6 +1478,7 @@ sctp_delete_prim_timer(struct sctp_inpcb * For the shutdown and shutdown-ack, we do not keep one around on the * control queue. This means we must generate a new one and call the general * chunk output routine, AFTER having done threshold management. + * It is assumed that net is non-NULL. */ int sctp_shutdown_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1492,18 +1491,13 @@ sctp_shutdown_timer(struct sctp_inpcb *i /* Assoc is over */ return (1); } + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); /* second select an alternative */ alt = sctp_find_alternate_net(stcb, net, 0); /* third generate a shutdown into the queue for out net */ - if (alt) { - sctp_send_shutdown(stcb, alt); - } else { - /* - * if alt is NULL, there is no dest to send to?? - */ - return (0); - } + sctp_send_shutdown(stcb, alt); + /* fourth restart timer */ sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, alt); return (0); @@ -1520,6 +1514,7 @@ sctp_shutdownack_timer(struct sctp_inpcb /* Assoc is over */ return (1); } + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); /* second select an alternative */ alt = sctp_find_alternate_net(stcb, net, 0); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:35:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A73DF106566C; Sat, 20 Nov 2010 19:35:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8648FC22; Sat, 20 Nov 2010 19:35:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJZDT5023520; Sat, 20 Nov 2010 19:35:13 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJZDGO023517; Sat, 20 Nov 2010 19:35:13 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201935.oAKJZDGO023517@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215582 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:35:13 -0000 Author: tuexen Date: Sat Nov 20 19:35:13 2010 New Revision: 215582 URL: http://svn.freebsd.org/changeset/base/215582 Log: MFC r214933: Remove two functions which are not used. Modified: stable/8/sys/netinet/sctp_timer.c stable/8/sys/netinet/sctp_timer.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:33:42 2010 (r215581) +++ stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:35:13 2010 (r215582) @@ -1670,30 +1670,6 @@ sctp_heartbeat_timer(struct sctp_inpcb * return (0); } -int -sctp_is_hb_timer_running(struct sctp_tcb *stcb) -{ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.hb_timer.timer)) { - /* its running */ - return (1); - } else { - /* nope */ - return (0); - } -} - -int -sctp_is_sack_timer_running(struct sctp_tcb *stcb) -{ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - /* its running */ - return (1); - } else { - /* nope */ - return (0); - } -} - #define SCTP_NUMBER_OF_MTU_SIZES 18 static uint32_t mtu_sizes[] = { 68, Modified: stable/8/sys/netinet/sctp_timer.h ============================================================================== --- stable/8/sys/netinet/sctp_timer.h Sat Nov 20 19:33:42 2010 (r215581) +++ stable/8/sys/netinet/sctp_timer.h Sat Nov 20 19:35:13 2010 (r215582) @@ -65,9 +65,6 @@ int sctp_heartbeat_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, int); -int sctp_is_hb_timer_running(struct sctp_tcb *stcb); -int sctp_is_sack_timer_running(struct sctp_tcb *stcb); - int sctp_cookie_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:37:00 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BDBE106566C; Sat, 20 Nov 2010 19:37:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69F918FC13; Sat, 20 Nov 2010 19:37:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJb0nH023623; Sat, 20 Nov 2010 19:37:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJb0PW023618; Sat, 20 Nov 2010 19:37:00 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201937.oAKJb0PW023618@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215583 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:37:00 -0000 Author: tuexen Date: Sat Nov 20 19:37:00 2010 New Revision: 215583 URL: http://svn.freebsd.org/changeset/base/215583 Log: MFC r214939: Do not have the MTU table twice in the code. Therefore move the function from the timer code to util, rename it appropriately and also fix a bug in sctp_get_prev_mtu(), where calling it with a value existing in the MTU table did not return a smaller one. Modified: stable/8/sys/netinet/sctp_timer.c stable/8/sys/netinet/sctp_usrreq.c stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:37:00 2010 (r215583) @@ -1670,46 +1670,6 @@ sctp_heartbeat_timer(struct sctp_inpcb * return (0); } -#define SCTP_NUMBER_OF_MTU_SIZES 18 -static uint32_t mtu_sizes[] = { - 68, - 296, - 508, - 512, - 544, - 576, - 1006, - 1492, - 1500, - 1536, - 2002, - 2048, - 4352, - 4464, - 8166, - 17914, - 32000, - 65535 -}; - - -static uint32_t -sctp_getnext_mtu(struct sctp_inpcb *inp, uint32_t cur_mtu) -{ - /* select another MTU that is just bigger than this one */ - int i; - - for (i = 0; i < SCTP_NUMBER_OF_MTU_SIZES; i++) { - if (cur_mtu < mtu_sizes[i]) { - /* no max_mtu is bigger than this one */ - return (mtu_sizes[i]); - } - } - /* here return the highest allowable */ - return (cur_mtu); -} - - void sctp_pathmtu_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1717,7 +1677,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *in { uint32_t next_mtu, mtu; - next_mtu = sctp_getnext_mtu(inp, net->mtu); + next_mtu = sctp_get_next_mtu(inp, net->mtu); if ((next_mtu > net->mtu) && (net->port == 0)) { if ((net->src_addr_selected == 0) || Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 19:37:00 2010 (r215583) @@ -194,7 +194,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, * mtu is. Rats we will have to guess (in a educated fashion * of course) */ - nxtsz = find_next_best_mtu(totsz); + nxtsz = sctp_get_prev_mtu(totsz); } /* Stop any PMTU timer */ if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 19:37:00 2010 (r215583) @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define NUMBER_OF_MTU_SIZES 18 - #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS @@ -753,7 +751,7 @@ sctp_stop_timers_for_shutdown(struct sct * a list of sizes based on typical mtu's, used only if next hop size not * returned. */ -static int sctp_mtu_sizes[] = { +static uint32_t sctp_mtu_sizes[] = { 68, 296, 508, @@ -774,25 +772,42 @@ static int sctp_mtu_sizes[] = { 65535 }; -int -find_next_best_mtu(int totsz) +/* + * Return the largest MTU smaller than val. If there is no + * entry, just return val. + */ +uint32_t +sctp_get_prev_mtu(uint32_t val) { - int i, perfer; + uint32_t i; - /* - * if we are in here we must find the next best fit based on the - * size of the dg that failed to be sent. - */ - perfer = 0; - for (i = 0; i < NUMBER_OF_MTU_SIZES; i++) { - if (totsz < sctp_mtu_sizes[i]) { - perfer = i - 1; - if (perfer < 0) - perfer = 0; + if (val <= sctp_mtu_sizes[0]) { + return (val); + } + for (i = 1; i < (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) { + if (val <= sctp_mtu_sizes[i]) { break; } } - return (sctp_mtu_sizes[perfer]); + return (sctp_mtu_sizes[i - 1]); +} + +/* + * Return the smallest MTU larger than val. If there is no + * entry, just return val. + */ +uint32_t +sctp_get_next_mtu(struct sctp_inpcb *inp, uint32_t val) +{ + /* select another MTU that is just bigger than this one */ + uint32_t i; + + for (i = 0; i < (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) { + if (val < sctp_mtu_sizes[i]) { + return (sctp_mtu_sizes[i]); + } + } + return (val); } void Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctputil.h Sat Nov 20 19:37:00 2010 (r215583) @@ -124,7 +124,8 @@ sctp_append_to_readq(struct sctp_inpcb * void sctp_iterator_worker(void); -int find_next_best_mtu(int); +uint32_t sctp_get_prev_mtu(uint32_t); +uint32_t sctp_get_next_mtu(struct sctp_inpcb *, uint32_t); void sctp_timeout_handler(void *); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:37:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61B3C106566C; Sat, 20 Nov 2010 19:37:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 361CD8FC15; Sat, 20 Nov 2010 19:37:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJbYI6023695; Sat, 20 Nov 2010 19:37:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJbYJA023694; Sat, 20 Nov 2010 19:37:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201937.oAKJbYJA023694@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 19:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215584 - stable/8/bin/sh/bltin X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:37:34 -0000 Author: jilles Date: Sat Nov 20 19:37:33 2010 New Revision: 215584 URL: http://svn.freebsd.org/changeset/base/215584 Log: MFC r215184: sh: Remove unused man page for echo builtin. The information in sh(1) about the echo builtin is equivalent, though less extensive. The echo(1) man page (bin/echo/echo.1) is different. Unfortunately, sh's echo builtin and /bin/echo have gone out of sync and this probably cannot be fixed any more. Deleted: stable/8/bin/sh/bltin/echo.1 Modified: Directory Properties: stable/8/bin/sh/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:39:02 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A19A106566B; Sat, 20 Nov 2010 19:39:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B368FC15; Sat, 20 Nov 2010 19:39:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJd2tu023779; Sat, 20 Nov 2010 19:39:02 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJd2Iq023777; Sat, 20 Nov 2010 19:39:02 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201939.oAKJd2Iq023777@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215585 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:39:02 -0000 Author: tuexen Date: Sat Nov 20 19:39:02 2010 New Revision: 215585 URL: http://svn.freebsd.org/changeset/base/215585 Log: MFC r215035: Fix a bug which resulted in kevent() reporting an event twice on 1-to-1 style sockets when an ABORT was received. Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 19:37:33 2010 (r215584) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 19:39:02 2010 (r215585) @@ -2826,6 +2826,7 @@ sctp_notify_assoc_change(uint32_t event, } } #endif + socantrcvmore(stcb->sctp_socket); sorwakeup(stcb->sctp_socket); sowwakeup(stcb->sctp_socket); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 19:39:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489931065789; Sat, 20 Nov 2010 19:39:13 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36DD78FC17; Sat, 20 Nov 2010 19:39:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJdDmv023818; Sat, 20 Nov 2010 19:39:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJdD0U023816; Sat, 20 Nov 2010 19:39:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201939.oAKJdD0U023816@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 19:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215586 - stable/8/bin/echo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:39:13 -0000 Author: jilles Date: Sat Nov 20 19:39:12 2010 New Revision: 215586 URL: http://svn.freebsd.org/changeset/base/215586 Log: MFC r215211: echo(1): Clarify portability and mention literal "--" handling. Modified: stable/8/bin/echo/echo.1 Directory Properties: stable/8/bin/echo/ (props changed) Modified: stable/8/bin/echo/echo.1 ============================================================================== --- stable/8/bin/echo/echo.1 Sat Nov 20 19:39:02 2010 (r215585) +++ stable/8/bin/echo/echo.1 Sat Nov 20 19:39:12 2010 (r215586) @@ -32,7 +32,7 @@ .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 .\" $FreeBSD$ .\" -.Dd April 12, 2003 +.Dd November 12, 2010 .Dt ECHO 1 .Os .Sh NAME @@ -56,24 +56,37 @@ The following option is available: .Bl -tag -width flag .It Fl n Do not print the trailing newline character. -This may also be achieved by appending +.El +.Pp +The end-of-options marker +.Fl Fl +is not recognized and written literally. +.Pp +The newline may also be suppressed by appending .Ql \ec to the end of the string, as is done by iBCS2 compatible systems. -Note that this option as well as the effect of +Note that the +.Fl n +option as well as the effect of .Ql \ec are implementation-defined in .St -p1003.1-2001 as amended by Cor.\& 1-2002. -Applications aiming for maximum -portability are strongly encouraged to use +For portability, +.Nm +should only be used if the first argument does not start with a hyphen +.Pq Ql "-" +and does not contain any backslashes +.Pq Ql "\e" . +If this is not sufficient, .Xr printf 1 -to suppress the newline character. -.El +should be used. .Pp -Some shells may provide a builtin +Most shells provide a builtin .Nm -command which is similar or identical to this utility. +command which tends to differ from this utility +in the treatment of options and backslashes. Consult the .Xr builtin 1 manual page. From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 20:34:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB211065672; Sat, 20 Nov 2010 20:34:13 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C830B8FC18; Sat, 20 Nov 2010 20:34:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKKYDqS025130; Sat, 20 Nov 2010 20:34:13 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKKYDhY025109; Sat, 20 Nov 2010 20:34:13 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011202034.oAKKYDhY025109@svn.freebsd.org> From: Bruce Cran Date: Sat, 20 Nov 2010 20:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215588 - in stable/8: libexec/tftpd sys/arm/xscale/ixp425 sys/boot/arm/ixp425/boot2 sys/dev/ata sys/dev/drm sys/dev/isp sys/dev/ixgbe sys/dev/msk sys/dev/pccard sys/dev/sound/sbus sys/... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 20:34:14 -0000 Author: brucec Date: Sat Nov 20 20:34:13 2010 New Revision: 215588 URL: http://svn.freebsd.org/changeset/base/215588 Log: MFC r215034: Fix typos. PR: bin/148894 Submitted by: olgeni Modified: stable/8/libexec/tftpd/tftp-utils.c stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c stable/8/sys/dev/ata/ata-disk.c stable/8/sys/dev/drm/r300_reg.h stable/8/sys/dev/isp/isp_freebsd.c stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/pccard/pccardvar.h stable/8/sys/dev/sound/sbus/cs4231.c stable/8/sys/dev/syscons/schistory.c stable/8/sys/dev/uart/uart_subr.c stable/8/sys/kern/subr_lock.c stable/8/sys/mips/mips/vm_machdep.c stable/8/sys/netinet/sctp.h stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_uio.h stable/8/sys/security/mac_portacl/mac_portacl.c stable/8/usr.sbin/config/configvers.h Directory Properties: stable/8/libexec/tftpd/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/usr.sbin/config/ (props changed) Modified: stable/8/libexec/tftpd/tftp-utils.c ============================================================================== --- stable/8/libexec/tftpd/tftp-utils.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/libexec/tftpd/tftp-utils.c Sat Nov 20 20:34:13 2010 (r215588) @@ -100,7 +100,7 @@ unmappedaddr(struct sockaddr_in6 *sin6) sin4->sin_len = sizeof(struct sockaddr_in); } -/* Get a field from a \0 seperated string */ +/* Get a field from a \0 separated string */ ssize_t get_field(int peer, char *buffer, ssize_t size) { Modified: stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c ============================================================================== --- stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c Sat Nov 20 20:34:13 2010 (r215588) @@ -317,7 +317,7 @@ ixpqmgr_attach(device_t dev) sc->aqmFreeSramAddress = 0x100; /* Q buffer space starts at 0x2100 */ - ixpqmgr_rebuild(sc); /* build inital priority table */ + ixpqmgr_rebuild(sc); /* build initial priority table */ aqm_reset(sc); /* reset h/w */ return (0); } @@ -775,7 +775,7 @@ ixpqmgr_intr(void *arg) * * The search will end when all the bits of the interrupt * register are cleared. There is no need to maintain - * a seperate value and test it at each iteration. + * a separate value and test it at each iteration. */ if (intRegVal & sc->lowPriorityTableFirstHalfMask) { priorityTableIndex = 0; Modified: stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c ============================================================================== --- stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c Sat Nov 20 20:34:13 2010 (r215588) @@ -88,7 +88,7 @@ board_init(void) /* * This should be called just before starting the kernel. This is so - * that one can undo incompatable hardware settings. + * that one can undo incompatible hardware settings. */ void clr_board(void) @@ -504,7 +504,7 @@ cfaltwait(u_int8_t mask) while (tout <= 5000000) { status = cfaltread8(CF_ALT_STATUS); if (status == 0xff) { - printf("cfaltwait: master: no status, reselectin\n"); + printf("cfaltwait: master: no status, reselecting\n"); cfwrite8(CF_DRV_HEAD, CF_D_IBM); DELAY(1); status = cfread8(CF_STATUS); Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/ata/ata-disk.c Sat Nov 20 20:34:13 2010 (r215588) @@ -175,13 +175,13 @@ ad_detach(device_t dev) free(children, M_TEMP); } - /* detroy disk from the system so we dont get any further requests */ + /* destroy disk from the system so we don't get any further requests */ disk_destroy(adp->disk); - /* fail requests on the queue and any thats "in flight" for this device */ + /* fail requests on the queue and any that's "in flight" for this device */ ata_fail_requests(dev); - /* dont leave anything behind */ + /* don't leave anything behind */ device_set_ivars(dev, NULL); free(adp, M_AD); return 0; @@ -523,7 +523,7 @@ ad_describe(device_t dev) struct ad_softc *adp = device_get_ivars(dev); u_int8_t *marker, vendor[64], product[64]; - /* try to seperate the ATA model string into vendor and model parts */ + /* try to separate the ATA model string into vendor and model parts */ if ((marker = index(atadev->param.model, ' ')) || (marker = index(atadev->param.model, '-'))) { int len = (marker - atadev->param.model); Modified: stable/8/sys/dev/drm/r300_reg.h ============================================================================== --- stable/8/sys/dev/drm/r300_reg.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/drm/r300_reg.h Sat Nov 20 20:34:13 2010 (r215588) @@ -345,7 +345,7 @@ __FBSDID("$FreeBSD$"); * position takes place. * * Most likely this is used to ignore rest of the program in cases - * where group of verts arent visible. For some reason this "section" + * where group of verts aren't visible. For some reason this "section" * is sometimes accepted other instruction that have no relationship with * position calculations. */ @@ -590,7 +590,7 @@ __FBSDID("$FreeBSD$"); #define R300_RE_FOG_START 0x4298 /* Not sure why there are duplicate of factor and constant values. - * My best guess so far is that there are seperate zbiases for test and write. + * My best guess so far is that there are separate zbiases for test and write. * Ordering might be wrong. * Some of the tests indicate that fgl has a fallback implementation of zbias * via pixel shaders. @@ -608,7 +608,7 @@ __FBSDID("$FreeBSD$"); * My guess is that there are two bits for each zbias primitive * (FILL, LINE, POINT). * One to enable depth test and one for depth write. - * Yet this doesnt explain why depth writes work ... + * Yet this doesn't explain why depth writes work ... */ #define R300_RE_OCCLUSION_CNTL 0x42B4 # define R300_OCCLUSION_ON (1<<1) @@ -693,7 +693,7 @@ __FBSDID("$FreeBSD$"); * the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the * color register index. * - * Apperently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any + * Apparently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any * R300_RS_ROUTE_0_COLOR_DEST value; this setup is used for clearing the state. * See r300_ioctl.c:r300EmitClearState. I'm not sure if this setup is strictly * correct or not. - Oliver. @@ -817,8 +817,8 @@ __FBSDID("$FreeBSD$"); # define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 11) # define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR (10 << 11) -/* NOTE: NEAREST doesnt seem to exist. - * Im not seting MAG_FILTER_MASK and (3 << 11) on for all +/* NOTE: NEAREST doesn't seem to exist. + * I'm not setting MAG_FILTER_MASK and (3 << 11) on for all * anisotropy modes because that would void selected mag filter */ # define R300_TX_MIN_FILTER_ANISO_NEAREST (0 << 13) Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/isp/isp_freebsd.c Sat Nov 20 20:34:13 2010 (r215588) @@ -1790,7 +1790,7 @@ isp_handle_platform_atio(ispsoftc_t *isp * The firmware status (except for the QLTM_SVALID bit) * indicates why this ATIO was sent to us. * - * If QLTM_SVALID is set, the firware has recommended Sense Data. + * If QLTM_SVALID is set, the firmware has recommended Sense Data. * * If the DISCONNECTS DISABLED bit is set in the flags field, * we're still connected on the SCSI bus. @@ -1917,7 +1917,7 @@ isp_handle_platform_atio2(ispsoftc_t *is * The firmware status (except for the QLTM_SVALID bit) * indicates why this ATIO was sent to us. * - * If QLTM_SVALID is set, the firware has recommended Sense Data. + * If QLTM_SVALID is set, the firmware has recommended Sense Data. */ if ((aep->at_status & ~QLTM_SVALID) != AT_CDB) { isp_prt(isp, ISP_LOGWARN, "bogus atio (0x%x) leaked to platform", aep->at_status); @@ -2581,7 +2581,7 @@ isp_handle_platform_notify_24xx(ispsoftc /* * Note that we're just getting notification that an ELS was received - * (possibly with some associcated information sent upstream). This is + * (possibly with some associated information sent upstream). This is * *not* the same as being given the ELS frame to accept or reject. */ switch (inot->in_status_subcode) { @@ -2780,7 +2780,7 @@ isp_handle_platform_target_notify_ack(is } /* - * Handle task managment functions. + * Handle task management functions. * * We show up here with a notify structure filled out. * @@ -2890,7 +2890,7 @@ bad: } /* - * Find the associated private data and makr it as dead so + * Find the associated private data and mark it as dead so * we don't try to work on it any further. */ static void @@ -5361,7 +5361,7 @@ isp_default_wwn(ispsoftc_t * isp, int ch /* - * For channel zero just return what we have. For either ACIIVE or + * For channel zero just return what we have. For either ACTIVE or * DEFAULT cases, we depend on default override of NVRAM values for * channel zero. */ @@ -5397,7 +5397,7 @@ isp_default_wwn(ispsoftc_t * isp, int ch * physical port on dual-port chips (23XX/24XX) * * This is somewhat nutty, particularly since bit 48 is - * irrelevant as they assign seperate serial numbers to + * irrelevant as they assign separate serial numbers to * different physical ports anyway. * * We'll stick our channel number plus one first into bits Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/ixgbe/ixgbe.c Sat Nov 20 20:34:13 2010 (r215588) @@ -256,7 +256,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg /* * Header split: this causes the hardware to DMA - * the header into a seperate mbuf from the payload, + * the header into a separate mbuf from the payload, * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ @@ -3655,7 +3655,7 @@ ixgbe_setup_receive_ring(struct rx_ring rxbuf = &rxr->rx_buffers[j]; /* - ** Dont allocate mbufs if not + ** Don't allocate mbufs if not ** doing header split, its wasteful */ if (rxr->hdr_split == FALSE) @@ -4123,7 +4123,7 @@ ixgbe_rxeof(struct ix_queue *que, int co ** not be fragmented across sequential ** descriptors, rather the next descriptor ** is indicated in bits of the descriptor. - ** This also means that we might proceses + ** This also means that we might process ** more than one packet at a time, something ** that has never been true before, it ** required eliminating global chain pointers @@ -4472,14 +4472,14 @@ ixgbe_enable_intr(struct adapter *adapte /* With RSS we use auto clear */ if (adapter->msix_mem) { mask = IXGBE_EIMS_ENABLE_MASK; - /* Dont autoclear Link */ + /* Don't autoclear Link */ mask &= ~IXGBE_EIMS_OTHER; mask &= ~IXGBE_EIMS_LSC; IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); } /* - ** Now enable all queues, this is done seperately to + ** Now enable all queues, this is done separately to ** allow for handling the extended (beyond 32) MSIX ** vectors that can be used by 82599 */ Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/msk/if_msk.c Sat Nov 20 20:34:13 2010 (r215588) @@ -1070,7 +1070,7 @@ mskc_setup_rambuffer(struct msk_softc *s sc->msk_pflags |= MSK_FLAG_RAMBUF; /* * Give receiver 2/3 of memory and round down to the multiple - * of 1024. Tx/Rx RAM buffer size of Yukon II shoud be multiple + * of 1024. Tx/Rx RAM buffer size of Yukon II should be multiple * of 1024. */ sc->msk_rxqsize = rounddown((sc->msk_ramsize * 1024 * 2) / 3, 1024); @@ -1545,7 +1545,7 @@ msk_attach(device_t dev) */ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO; /* - * Enable Rx checksum offloading for VLAN taggedd frames + * Enable Rx checksum offloading for VLAN tagged frames * if controller support new descriptor format. */ if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0 && @@ -1733,7 +1733,7 @@ mskc_attach(device_t dev) * does not rely on status word of received frame * in msk_rxeof() which in turn disables all * hardware assistance bits reported by the status - * word as well as validity of the recevied frame. + * word as well as validity of the received frame. * Just pass received frames to upper stack with * minimal test and let upper stack handle them. */ @@ -2067,10 +2067,10 @@ msk_txrx_dma_alloc(struct msk_if_softc * * what DMA address is used and chain another descriptor for the * 64bits DMA operation. This also means descriptor ring size is * variable. Limiting DMA address to be in 32bit address space greatly - * simplyfies descriptor handling and possibly would increase + * simplifies descriptor handling and possibly would increase * performance a bit due to efficient handling of descriptors. * Apart from harassing checksum offloading mechanisms, it seems - * it's really bad idea to use a seperate descriptor for 64bit + * it's really bad idea to use a separate descriptor for 64bit * DMA operation to save small descriptor memory. Anyway, I've * never seen these exotic scheme on ethernet interface hardware. */ @@ -2567,7 +2567,7 @@ msk_encap(struct msk_if_softc *sc_if, st * Short UDP packets appear to be handled correctly by * Yukon II. Also I assume this bug does not happen on * controllers that use newer descriptor format or - * automatic Tx checksum calaulcation. + * automatic Tx checksum calculation. */ m = m_pullup(m, offset + sizeof(struct tcphdr)); if (m == NULL) { @@ -2704,7 +2704,7 @@ msk_encap(struct msk_if_softc *sc_if, st /* Update producer index. */ sc_if->msk_cdata.msk_tx_prod = prod; - /* Set EOP on the last desciptor. */ + /* Set EOP on the last descriptor. */ prod = (prod + MSK_TX_RING_CNT - 1) % MSK_TX_RING_CNT; tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; tx_le->msk_control |= htole32(EOP); @@ -3175,7 +3175,7 @@ msk_intr_gmac(struct msk_if_softc *sc_if * XXX * In case of Tx underrun, we may need to flush/reset * Tx MAC but that would also require resynchronization - * with status LEs. Reintializing status LEs would + * with status LEs. Reinitializing status LEs would * affect other port in dual MAC configuration so it * should be avoided as possible as we can. * Due to lack of documentation it's all vague guess but @@ -3684,7 +3684,7 @@ msk_init_locked(struct msk_if_softc *sc_ msk_setvlan(sc_if, ifp); if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) { - /* Set Rx Pause threshould. */ + /* Set Rx Pause threshold. */ CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), MSK_ECU_LLPP); CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), Modified: stable/8/sys/dev/pccard/pccardvar.h ============================================================================== --- stable/8/sys/dev/pccard/pccardvar.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/pccard/pccardvar.h Sat Nov 20 20:34:13 2010 (r215588) @@ -31,7 +31,7 @@ */ /* - * PCCARD_API_LEVEL. When set to 5, we provide a 5.x compatable API + * PCCARD_API_LEVEL. When set to 5, we provide a 5.x compatible API * for driver writers that have to share their code between 5.x and 6.x. * The 5.x compatibility interfaces will be unsupported in 7.0, at which * point we'll only support 6 and newer, etc. @@ -191,7 +191,7 @@ enum { PCCARD_IVAR_PRODEXT, PCCARD_IVAR_FUNCTION_NUMBER, PCCARD_IVAR_VENDOR_STR, /* CIS string for "Manufacturer" */ - PCCARD_IVAR_PRODUCT_STR,/* CIS strnig for "Product" */ + PCCARD_IVAR_PRODUCT_STR,/* CIS string for "Product" */ PCCARD_IVAR_CIS3_STR, PCCARD_IVAR_CIS4_STR, PCCARD_IVAR_FUNCTION, @@ -254,7 +254,7 @@ enum { #endif /* - * Defines to decoe the get_funce_disk return value. See the PCMCIA standard + * Defines to decode the get_funce_disk return value. See the PCMCIA standard * for all the details of what these bits mean. */ #define PFD_I_V_MASK 0x3 Modified: stable/8/sys/dev/sound/sbus/cs4231.c ============================================================================== --- stable/8/sys/dev/sound/sbus/cs4231.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/sound/sbus/cs4231.c Sat Nov 20 20:34:13 2010 (r215588) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); * for playback/capture. * Since I couldn't find any documentation for APCDMA programming * information, I guessed the usage of APCDMA from that of OpenBSD's - * driver. The EBDMA infomation of PCIO can be obtained from + * driver. The EBDMA information of PCIO can be obtained from * http://solutions.sun.com/embedded/databook/web/microprocessors/pcio.html * And CS4231A datasheet can also be obtained from * ftp://ftp.alsa-project.org/pub/manuals/cirrus/4231a.pdf @@ -1198,7 +1198,7 @@ cs4231_chan_fs(struct cs4231_softc *sc, /* * capture channel - * cs4231 doesn't allow seperate fs setup for playback/capture. + * cs4231 doesn't allow separate fs setup for playback/capture. * I believe this will break full-duplex operation. */ if (dir == PCMDIR_REC) { Modified: stable/8/sys/dev/syscons/schistory.c ============================================================================== --- stable/8/sys/dev/syscons/schistory.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/syscons/schistory.c Sat Nov 20 20:34:13 2010 (r215588) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); /* * XXX Placeholder. - * This calculations should be dynamically scaled by number of seperate sc + * This calculations should be dynamically scaled by number of separate sc * devices. A base value of 'extra_history_size' should be defined for * each syscons unit, and added and subtracted from the dynamic * 'extra_history_size' as units are added and removed. This way, each time @@ -86,7 +86,7 @@ int sc_alloc_history_buffer(scr_stat *scp, int lines, int prev_ysize, int wait) { /* - * syscons unconditionally allocates buffers upto + * syscons unconditionally allocates buffers up to * SC_HISTORY_SIZE lines or scp->ysize lines, whichever * is larger. A value greater than that is allowed, * subject to extra_history_size. @@ -116,7 +116,7 @@ sc_alloc_history_buffer(scr_stat *scp, i delta = cur_lines - min_lines; } - /* lines upto min_lines are always allowed. */ + /* lines up to min_lines are always allowed. */ min_lines = imax(SC_HISTORY_SIZE, scp->ysize); if (lines > min_lines) { if (lines - min_lines > extra_history_size + delta) { Modified: stable/8/sys/dev/uart/uart_subr.c ============================================================================== --- stable/8/sys/dev/uart/uart_subr.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/uart/uart_subr.c Sat Nov 20 20:34:13 2010 (r215588) @@ -172,8 +172,8 @@ out: /* * Parse a device specification. The specification is a list of attributes - * seperated by commas. Each attribute is a tag-value pair with the tag and - * value seperated by a colon. Supported tags are: + * separated by commas. Each attribute is a tag-value pair with the tag and + * value separated by a colon. Supported tags are: * * br = Baudrate * ch = Channel Modified: stable/8/sys/kern/subr_lock.c ============================================================================== --- stable/8/sys/kern/subr_lock.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/kern/subr_lock.c Sat Nov 20 20:34:13 2010 (r215588) @@ -170,7 +170,7 @@ SLIST_HEAD(lphead, lock_prof); /* * Array of objects and profs for each type of object for each cpu. Spinlocks - * are handled seperately because a thread may be preempted and acquire a + * are handled separately because a thread may be preempted and acquire a * spinlock while in the lock profiling code of a non-spinlock. In this way * we only need a critical section to protect the per-cpu lists. */ Modified: stable/8/sys/mips/mips/vm_machdep.c ============================================================================== --- stable/8/sys/mips/mips/vm_machdep.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/mips/mips/vm_machdep.c Sat Nov 20 20:34:13 2010 (r215588) @@ -122,8 +122,8 @@ cpu_fork(register struct thread *td1,reg /* Copy p1's pcb, note that in this case * our pcb also includes the td_frame being copied * too. The older mips2 code did an additional copy - * of the td_frame, for us thats not needed any - * longer (this copy does them both + * of the td_frame, for us that's not needed any + * longer (this copy does them both) */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); @@ -317,7 +317,7 @@ cpu_set_syscall_retval(struct thread *td * Initialize machine state (pcb and trap frame) for a new thread about to * upcall. Put enough state in the new thread's PCB to get it to go back * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources + * Address and stack, along with those from upcalls that are from other sources * such as those generated in thread_userret() itself. */ void @@ -339,7 +339,7 @@ cpu_set_upcall(struct thread *td, struct * at this time (see the matching comment below for * more analysis) (need a good safe default). * In MIPS, the trapframe is the first element of the PCB - * and gets copied when we copy the PCB. No seperate copy + * and gets copied when we copy the PCB. No separate copy * is needed. */ bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); Modified: stable/8/sys/netinet/sctp.h ============================================================================== --- stable/8/sys/netinet/sctp.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp.h Sat Nov 20 20:34:13 2010 (r215588) @@ -108,7 +108,7 @@ struct sctp_paramhdr { #define SCTP_MAX_BURST 0x00000019 /* rw */ /* assoc level context */ #define SCTP_CONTEXT 0x0000001a /* rw */ -/* explict EOR signalling */ +/* explicit EOR signalling */ #define SCTP_EXPLICIT_EOR 0x0000001b #define SCTP_REUSE_PORT 0x0000001c /* rw */ #define SCTP_AUTH_DEACTIVATE_KEY 0x0000001d @@ -131,9 +131,9 @@ struct sctp_paramhdr { * Blocking I/O is enabled on any TCP type socket by default. For the UDP * model if this is turned on then the socket buffer is shared for send * resources amongst all associations. The default for the UDP model is that - * is SS_NBIO is set. Which means all associations have a seperate send + * is SS_NBIO is set. Which means all associations have a separate send * limit BUT they will NOT ever BLOCK instead you will get an error back - * EAGAIN if you try to send to much. If you want the blocking symantics you + * EAGAIN if you try to send too much. If you want the blocking semantics you * set this option at the cost of sharing one socket send buffer size amongst * all associations. Peeled off sockets turn this option off and block. But * since both TCP and peeled off sockets have only one assoc per socket this @@ -141,7 +141,7 @@ struct sctp_paramhdr { * model OR peeled off UDP model, but we do allow you to do so. You just use * the normal syscall to toggle SS_NBIO the way you want. * - * Blocking I/O is controled by the SS_NBIO flag on the socket state so_state + * Blocking I/O is controlled by the SS_NBIO flag on the socket state so_state * field. */ @@ -166,7 +166,7 @@ struct sctp_paramhdr { /* Special hook for dynamically setting primary for all assoc's, - * this is a write only option that requires root privledge. + * this is a write only option that requires root privilege. */ #define SCTP_SET_DYNAMIC_PRIMARY 0x00002001 @@ -181,7 +181,7 @@ struct sctp_paramhdr { * to. The endpoint, before binding, may select * the "default" VRF it is in by using a set socket * option with SCTP_VRF_ID. This will also - * get propegated to the default VRF. Once the + * get propagated to the default VRF. Once the * endpoint binds an address then it CANNOT add * additional VRF's to become a Multi-VRF endpoint. * @@ -308,7 +308,7 @@ struct sctp_paramhdr { #define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105 /* - * error cause parameters (user visisble) + * error cause parameters (user visible) */ struct sctp_error_cause { uint16_t code; Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp_os_bsd.h Sat Nov 20 20:34:13 2010 (r215588) @@ -316,7 +316,7 @@ typedef struct callout sctp_os_timer_t; } /* We make it so if you have up to 4 threads - * writting based on the default size of + * writing based on the default size of * the packet log 65 k, that would be * 4 16k packets before we would hit * a problem. @@ -353,7 +353,7 @@ typedef struct callout sctp_os_timer_t; /* For BSD this just accesses the M_PKTHDR length * so it operates on an mbuf with hdr flag. Other - * O/S's may have seperate packet header and mbuf + * O/S's may have separate packet header and mbuf * chain pointers.. thus the macro. */ #define SCTP_HEADER_TO_CHAIN(m) (m) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 20:34:13 2010 (r215588) @@ -107,7 +107,7 @@ sctp_fill_pcbinfo(struct sctp_pcbinfo *s * ... +--ifa-> ifa -> ifa * vrf * - * We keep these seperate lists since the SCTP subsystem will + * We keep these separate lists since the SCTP subsystem will * point to these from its source address selection nets structure. * When an address is deleted it does not happen right away on * the SCTP side, it gets scheduled. What we do when a @@ -191,7 +191,7 @@ sctp_find_ifn(void *ifn, uint32_t ifn_in struct sctp_ifnlist *hash_ifn_head; /* - * We assume the lock is held for the addresses if thats wrong + * We assume the lock is held for the addresses if that's wrong * problems could occur :-) */ hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; @@ -327,7 +327,7 @@ sctp_mark_ifa_addr_down(uint32_t vrf_id, len1 = strlen(if_name); len2 = strlen(sctp_ifap->ifn_p->ifn_name); if (len1 != len2) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different lenght %d vs %d - ignored\n", + SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different length %d vs %d - ignored\n", len1, len2); goto out; } @@ -380,7 +380,7 @@ sctp_mark_ifa_addr_up(uint32_t vrf_id, s len1 = strlen(if_name); len2 = strlen(sctp_ifap->ifn_p->ifn_name); if (len1 != len2) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different lenght %d vs %d - ignored\n", + SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different length %d vs %d - ignored\n", len1, len2); goto out; } @@ -567,7 +567,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo } else { if (sctp_ifap->ifn_p) { /* - * The last IFN gets the address, removee + * The last IFN gets the address, remove * the old one */ SCTPDBG(SCTP_DEBUG_PCB4, "Moving ifa %p from %s (0x%x) to %s (0x%x)\n", @@ -1515,7 +1515,7 @@ sctp_endpoint_probe(struct sockaddr *nam int fnd; /* - * Endpoing probe expects that the INP_INFO is locked. + * Endpoint probe expects that the INP_INFO is locked. */ sin = NULL; #ifdef INET6 @@ -1800,7 +1800,7 @@ sctp_pcb_findep(struct sockaddr *nam, in * endpoint is gone but there exists a connected socket for this guy * yet. If so we can return the first one that we find. This may NOT * be the correct one so the caller should be wary on the return - * INP. Currently the onlyc caller that sets this flag is in bindx + * INP. Currently the only caller that sets this flag is in bindx * where we are verifying that a user CAN bind the address. He * either has bound it already, or someone else has, or its open to * bind, so this is good enough. @@ -2005,7 +2005,7 @@ sctp_findassoc_by_vtag(struct sockaddr * } if (remote_tag) { /* - * If we have both vtags thats all we match + * If we have both vtags that's all we match * on */ if (stcb->asoc.peer_vtag == remote_tag) { @@ -2183,7 +2183,7 @@ sctp_findassociation_addr(struct mbuf *m * association that is linked to an existing * association that is under the TCP pool (i.e. no * listener exists). The endpoint finding routine - * will always find a listner before examining the + * will always find a listener before examining the * TCP pool. */ if (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) { @@ -3554,7 +3554,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, SCTP_INP_INFO_WUNLOCK(); /* * Now we release all locks. Since this INP cannot be found anymore - * except possbily by the kill timer that might be running. We call + * except possibly by the kill timer that might be running. We call * the drain function here. It should hit the case were it sees the * ACTIVE flag cleared and exit out freeing us to proceed and * destroy everything. @@ -3716,7 +3716,7 @@ sctp_add_remote_addr(struct sctp_tcb *st { /* * The following is redundant to the same lines in the - * sctp_aloc_assoc() but is needed since other's call the add + * sctp_aloc_assoc() but is needed since others call the add * address function */ struct sctp_nets *net, *netfirst; @@ -4034,7 +4034,7 @@ sctp_add_remote_addr(struct sctp_tcb *st (stcb->asoc.primary_destination)) { /* * first one on the list is NOT the primary sctp_cmpaddr() - * is much more efficent if the primary is the first on the + * is much more efficient if the primary is the first on the * list, make it so. */ TAILQ_REMOVE(&stcb->asoc.nets, @@ -4176,7 +4176,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, if (inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) { /* * If you have not performed a bind, then we need to do the - * ephemerial bind for you. + * ephemeral bind for you. */ if ((err = sctp_inpcb_bind(inp->sctp_socket, (struct sockaddr *)NULL, @@ -5159,7 +5159,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, SCTP_INP_RUNLOCK(inp); /* * This will start the kill timer (if we are the - * lastone) since we hold an increment yet. But this + * last one) since we hold an increment yet. But this * is the only safe way to do this since otherwise * if the socket closes at the same time we are here * we might collide in the cleanup. @@ -6461,7 +6461,7 @@ sctp_set_primary_addr(struct sctp_tcb *s if (net != stcb->asoc.primary_destination) { /* * first one on the list is NOT the primary - * sctp_cmpaddr() is much more efficent if the + * sctp_cmpaddr() is much more efficient if the * primary is the first on the list, make it so. */ TAILQ_REMOVE(&stcb->asoc.nets, stcb->asoc.primary_destination, sctp_next); @@ -6676,7 +6676,7 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, } /* * Another issue, in un-setting the TSN's in the mapping array we - * DID NOT adjust the higest_tsn marker. This will cause one of two + * DID NOT adjust the highest_tsn marker. This will cause one of two * things to occur. It may cause us to do extra work in checking for * our mapping array movement. More importantly it may cause us to * SACK every datagram. This may not be a bad thing though since we Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp_uio.h Sat Nov 20 20:34:13 2010 (r215588) @@ -80,7 +80,7 @@ struct sctp_initmsg { /* We add 96 bytes to the size of sctp_sndrcvinfo. * This makes the current structure 128 bytes long * which is nicely 64 bit aligned but also has room - * for us to add more and keep ABI compatability. + * for us to add more and keep ABI compatibility. * For example, already we have the sctp_extrcvinfo * when enabled which is 48 bytes. */ @@ -304,7 +304,7 @@ struct sctp_setadaptation { uint32_t ssb_adaptation_ind; }; -/* compatable old spelling */ +/* compatible old spelling */ struct sctp_adaption_event { uint16_t sai_type; uint16_t sai_flags; @@ -396,7 +396,7 @@ union sctp_notification { struct sctp_send_failed sn_send_failed; struct sctp_shutdown_event sn_shutdown_event; struct sctp_adaptation_event sn_adaptation_event; - /* compatability same as above */ + /* compatibility same as above */ struct sctp_adaption_event sn_adaption_event; struct sctp_pdapi_event sn_pdapi_event; struct sctp_authkey_event sn_auth_event; @@ -417,7 +417,7 @@ union sctp_notification { #define SCTP_AUTHENTICATION_EVENT 0x0008 #define SCTP_STREAM_RESET_EVENT 0x0009 #define SCTP_SENDER_DRY_EVENT 0x000a -#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */ +#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we don't send this */ /* * socket option structs */ @@ -893,7 +893,7 @@ struct sctpstat { uint32_t sctps_earlyfrstrid; uint32_t sctps_earlyfrstrout; uint32_t sctps_earlyfrstrtmr; - /* otheres */ + /* others */ uint32_t sctps_hdrops; /* packet shorter than header */ uint32_t sctps_badsum; /* checksum error */ uint32_t sctps_noport; /* no endpoint for port */ @@ -904,8 +904,8 @@ struct sctpstat { * RTT window */ uint32_t sctps_markedretrans; uint32_t sctps_naglesent; /* nagle allowed sending */ - uint32_t sctps_naglequeued; /* nagle does't allow sending */ - uint32_t sctps_maxburstqueued; /* max burst dosn't allow sending */ + uint32_t sctps_naglequeued; /* nagle doesn't allow sending */ + uint32_t sctps_maxburstqueued; /* max burst doesn't allow sending */ uint32_t sctps_ifnomemqueued; /* look ahead tells us no memory in * interface ring buffer OR we had a * send error and are queuing one @@ -931,7 +931,7 @@ struct sctpstat { uint32_t sctps_wu_sacks_sent; /* Window Update only sacks sent */ uint32_t sctps_sends_with_flags; /* number of sends with * sinfo_flags !=0 */ - uint32_t sctps_sends_with_unord /* number of undordered sends */ ; + uint32_t sctps_sends_with_unord; /* number of unordered sends */ uint32_t sctps_sends_with_eof; /* number of sends with EOF flag set */ uint32_t sctps_sends_with_abort; /* number of sends with ABORT * flag set */ @@ -943,7 +943,7 @@ struct sctpstat { * with peek */ uint32_t sctps_cached_chk; /* Number of cached chunks used */ uint32_t sctps_cached_strmoq; /* Number of cached stream oq's used */ - uint32_t sctps_left_abandon; /* Number of unread message abandonded + uint32_t sctps_left_abandon; /* Number of unread messages abandoned * by close */ uint32_t sctps_send_burst_avoid; /* Unused */ uint32_t sctps_send_cwnd_avoid; /* Send cwnd full avoidance, already Modified: stable/8/sys/security/mac_portacl/mac_portacl.c ============================================================================== --- stable/8/sys/security/mac_portacl/mac_portacl.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/security/mac_portacl/mac_portacl.c Sat Nov 20 20:34:13 2010 (r215588) @@ -133,7 +133,7 @@ struct rule { /* * Text format for the rule string is that a rule consists of a - * comma-seperated list of elements. Each element is in the form + * comma-separated list of elements. Each element is in the form * idtype:id:protocol:portnumber, and constitutes granting of permission * for the specified binding. */ Modified: stable/8/usr.sbin/config/configvers.h ============================================================================== --- stable/8/usr.sbin/config/configvers.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/usr.sbin/config/configvers.h Sat Nov 20 20:34:13 2010 (r215588) @@ -26,7 +26,7 @@ * was a huge problem for 'make buildkernel' which was run with the installed * /usr/sbin/config, not a cross built one. We started bumping the version * number as a way to trap cases where the previous installworld was not - * compatable with the new buildkernel. The buildtools phase and much more + * compatible with the new buildkernel. The buildtools phase and much more * comprehensive error code returns solved this original problem. * * Most end-users will use buildkernel and the build tools from buildworld. From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:15:44 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751111065670; Sat, 20 Nov 2010 21:15:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62BCE8FC14; Sat, 20 Nov 2010 21:15:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLFi76026165; Sat, 20 Nov 2010 21:15:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLFiN1026163; Sat, 20 Nov 2010 21:15:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202115.oAKLFiN1026163@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215589 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:15:44 -0000 Author: tuexen Date: Sat Nov 20 21:15:44 2010 New Revision: 215589 URL: http://svn.freebsd.org/changeset/base/215589 Log: MFC r215039: Improve the scalability by using the local and remote port when putting inps in the tcpephash. Modified: stable/8/sys/netinet/sctp_pcb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 20:34:13 2010 (r215588) +++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:15:44 2010 (r215589) @@ -567,8 +567,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo } else { if (sctp_ifap->ifn_p) { /* - * The last IFN gets the address, remove - * the old one + * The last IFN gets the address, remove the + * old one */ SCTPDBG(SCTP_DEBUG_PCB4, "Moving ifa %p from %s (0x%x) to %s (0x%x)\n", sctp_ifap, sctp_ifap->ifn_p->ifn_name, @@ -849,7 +849,7 @@ sctp_tcb_special_locate(struct sctp_inpc } else { return NULL; } - ephead = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), SCTP_BASE_INFO(hashtcpmark))]; + ephead = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport | rport), SCTP_BASE_INFO(hashtcpmark))]; /* * Ok now for each of the guys in this bucket we must look and see: * - Does the remote port match. - Does there single association's @@ -1771,6 +1771,7 @@ sctp_pcb_findep(struct sockaddr *nam, in struct sockaddr_in *sin; struct sockaddr_in6 *sin6; int lport; + unsigned int i; if (nam->sa_family == AF_INET) { sin = (struct sockaddr_in *)nam; @@ -1797,17 +1798,22 @@ sctp_pcb_findep(struct sockaddr *nam, in /* * If the TCP model exists it could be that the main listening - * endpoint is gone but there exists a connected socket for this guy - * yet. If so we can return the first one that we find. This may NOT - * be the correct one so the caller should be wary on the return - * INP. Currently the only caller that sets this flag is in bindx - * where we are verifying that a user CAN bind the address. He - * either has bound it already, or someone else has, or its open to - * bind, so this is good enough. + * endpoint is gone but there still exists a connected socket for + * this guy. If so we can return the first one that we find. This + * may NOT be the correct one so the caller should be wary on the + * returned INP. Currently the only caller that sets find_tcp_pool + * is in bindx where we are verifying that a user CAN bind the + * address. He either has bound it already, or someone else has, or + * its open to bind, so this is good enough. */ if (inp == NULL && find_tcp_pool) { - head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashtcpmark))]; - inp = sctp_endpoint_probe(nam, head, lport, vrf_id); + for (i = 0; i < SCTP_BASE_INFO(hashtcpmark) + 1; i++) { + head = &SCTP_BASE_INFO(sctp_tcpephash)[i]; + inp = sctp_endpoint_probe(nam, head, lport, vrf_id); + if (inp) { + break; + } + } } if (inp) { SCTP_INP_INCR_REF(inp); @@ -2603,8 +2609,7 @@ sctp_move_pcb_and_assoc(struct sctp_inpc LIST_REMOVE(stcb, sctp_tcbasocidhash); } /* Now insert the new_inp into the TCP connected hash */ - head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), - SCTP_BASE_INFO(hashtcpmark))]; + head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport | rport), SCTP_BASE_INFO(hashtcpmark))]; LIST_INSERT_HEAD(head, new_inp, sctp_hash); /* Its safe to access */ @@ -3089,12 +3094,10 @@ continue_anyway: /* find the bucket */ if (port_reuse_active) { /* Put it into tcp 1-2-1 hash */ - head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), - SCTP_BASE_INFO(hashtcpmark))]; + head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashtcpmark))]; inp->sctp_flags |= SCTP_PCB_FLAGS_IN_TCPPOOL; } else { - head = &SCTP_BASE_INFO(sctp_ephash)[SCTP_PCBHASH_ALLADDR(lport, - SCTP_BASE_INFO(hashmark))]; + head = &SCTP_BASE_INFO(sctp_ephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashmark))]; } /* put it in the bucket */ LIST_INSERT_HEAD(head, inp, sctp_hash); @@ -3716,8 +3719,8 @@ sctp_add_remote_addr(struct sctp_tcb *st { /* * The following is redundant to the same lines in the - * sctp_aloc_assoc() but is needed since others call the add - * address function + * sctp_aloc_assoc() but is needed since others call the add address + * function */ struct sctp_nets *net, *netfirst; int addr_inscope; @@ -5159,10 +5162,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, SCTP_INP_RUNLOCK(inp); /* * This will start the kill timer (if we are the - * last one) since we hold an increment yet. But this - * is the only safe way to do this since otherwise - * if the socket closes at the same time we are here - * we might collide in the cleanup. + * last one) since we hold an increment yet. But + * this is the only safe way to do this since + * otherwise if the socket closes at the same time + * we are here we might collide in the cleanup. */ sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE, @@ -6676,12 +6679,12 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, } /* * Another issue, in un-setting the TSN's in the mapping array we - * DID NOT adjust the highest_tsn marker. This will cause one of two - * things to occur. It may cause us to do extra work in checking for - * our mapping array movement. More importantly it may cause us to - * SACK every datagram. This may not be a bad thing though since we - * will recover once we get our cum-ack above and all this stuff we - * dumped recovered. + * DID NOT adjust the highest_tsn marker. This will cause one of + * two things to occur. It may cause us to do extra work in checking + * for our mapping array movement. More importantly it may cause us + * to SACK every datagram. This may not be a bad thing though since + * we will recover once we get our cum-ack above and all this stuff + * we dumped recovered. */ } From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:20:39 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A56E1065675; Sat, 20 Nov 2010 21:20:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78AE78FC1E; Sat, 20 Nov 2010 21:20:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLKd5C026315; Sat, 20 Nov 2010 21:20:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLKdXD026313; Sat, 20 Nov 2010 21:20:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202120.oAKLKdXD026313@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215590 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:20:39 -0000 Author: tuexen Date: Sat Nov 20 21:20:39 2010 New Revision: 215590 URL: http://svn.freebsd.org/changeset/base/215590 Log: MFC r215134,r215198: Fix issues with the SACK/NR-SACK generation code. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:15:44 2010 (r215589) +++ stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:20:39 2010 (r215590) @@ -9927,13 +9927,14 @@ sctp_send_sack(struct sctp_tcb *stcb) caddr_t limit; uint32_t *dup; int limit_reached = 0; - unsigned int i, sel_start, siz, j; + unsigned int i, siz, j; unsigned int num_gap_blocks = 0, num_nr_gap_blocks = 0, space; int num_dups = 0; int space_req; uint32_t highest_tsn; uint8_t flags; uint8_t type; + uint8_t tsn_map; if ((stcb->asoc.sctp_nr_sack_on_off == 1) && (stcb->asoc.peer_supports_nr_sack == 1)) { @@ -10118,14 +10119,6 @@ sctp_send_sack(struct sctp_tcb *stcb) } } - if (((type == SCTP_SELECTIVE_ACK) && - (((asoc->mapping_array[0] | asoc->nr_mapping_array[0]) & 0x01) == 0x00)) || - ((type == SCTP_NR_SELECTIVE_ACK) && - ((asoc->mapping_array[0] & 0x01) == 0x00))) { - sel_start = 0; - } else { - sel_start = 1; - } if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { offset = 1; } else { @@ -10137,11 +10130,18 @@ sctp_send_sack(struct sctp_tcb *stcb) compare_with_wrap(asoc->highest_tsn_inside_map, asoc->cumulative_tsn, MAX_TSN))) { /* we have a gap .. maybe */ for (i = 0; i < siz; i++) { + tsn_map = asoc->mapping_array[i]; if (type == SCTP_SELECTIVE_ACK) { - selector = &sack_array[asoc->mapping_array[i] | asoc->nr_mapping_array[i]]; - } else { - selector = &sack_array[asoc->mapping_array[i]]; + tsn_map |= asoc->nr_mapping_array[i]; } + if (i == 0) { + /* + * Clear all bits corresponding to TSNs + * smaller or equal to the cumulative TSN. + */ + tsn_map &= (~0 << (1 - offset)); + } + selector = &sack_array[tsn_map]; if (mergeable && selector->right_edge) { /* * Backup, left and right edges were ok to @@ -10153,7 +10153,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (selector->num_entries == 0) mergeable = 0; else { - for (j = sel_start; j < selector->num_entries; j++) { + for (j = 0; j < selector->num_entries; j++) { if (mergeable && selector->right_edge) { /* * do a merge by NOT setting @@ -10185,7 +10185,6 @@ sctp_send_sack(struct sctp_tcb *stcb) /* Reached the limit stop */ break; } - sel_start = 0; offset += 8; } } @@ -10200,11 +10199,6 @@ sctp_send_sack(struct sctp_tcb *stcb) siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + asoc->highest_tsn_inside_nr_map + 7) / 8; } - if ((asoc->nr_mapping_array[0] & 0x01) == 0x00) { - sel_start = 0; - } else { - sel_start = 1; - } if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { offset = 1; } else { @@ -10213,7 +10207,16 @@ sctp_send_sack(struct sctp_tcb *stcb) if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, asoc->cumulative_tsn, MAX_TSN)) { /* we have a gap .. maybe */ for (i = 0; i < siz; i++) { - selector = &sack_array[asoc->nr_mapping_array[i]]; + tsn_map = asoc->nr_mapping_array[i]; + if (i == 0) { + /* + * Clear all bits corresponding to + * TSNs smaller or equal to the + * cumulative TSN. + */ + tsn_map &= (~0 << (1 - offset)); + } + selector = &sack_array[tsn_map]; if (mergeable && selector->right_edge) { /* * Backup, left and right edges were @@ -10225,7 +10228,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (selector->num_entries == 0) mergeable = 0; else { - for (j = sel_start; j < selector->num_entries; j++) { + for (j = 0; j < selector->num_entries; j++) { if (mergeable && selector->right_edge) { /* * do a merge by NOT @@ -10258,7 +10261,6 @@ sctp_send_sack(struct sctp_tcb *stcb) /* Reached the limit stop */ break; } - sel_start = 0; offset += 8; } } From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:22:21 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C675106564A; Sat, 20 Nov 2010 21:22:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0518FC15; Sat, 20 Nov 2010 21:22:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLMKtH026405; Sat, 20 Nov 2010 21:22:20 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLMK1n026403; Sat, 20 Nov 2010 21:22:20 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202122.oAKLMK1n026403@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215591 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:22:21 -0000 Author: tuexen Date: Sat Nov 20 21:22:20 2010 New Revision: 215591 URL: http://svn.freebsd.org/changeset/base/215591 Log: MFC r215199: Don't print an empty line when printing mapping arrays. Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 21:20:39 2010 (r215590) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 21:22:20 2010 (r215591) @@ -1212,8 +1212,6 @@ sctp_print_mapping_array(struct sctp_ass printf("Renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); - if (((i + 1) % 16) == 0) - printf("\n"); } if (limit % 16) printf("\n"); From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:24:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041311065696; Sat, 20 Nov 2010 21:24:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6EB08FC13; Sat, 20 Nov 2010 21:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLOHaL026500; Sat, 20 Nov 2010 21:24:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLOHdv026498; Sat, 20 Nov 2010 21:24:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202124.oAKLOHdv026498@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215592 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:24:18 -0000 Author: tuexen Date: Sat Nov 20 21:24:17 2010 New Revision: 215592 URL: http://svn.freebsd.org/changeset/base/215592 Log: MFC r215241: Fix a locking issue reported by brucec@ affecting 1-to-1 style sockets which have not yet been accepted. Modified: stable/8/sys/netinet/sctp_pcb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:22:20 2010 (r215591) +++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:24:17 2010 (r215592) @@ -3464,6 +3464,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, cnt = 0; for ((asoc = LIST_FIRST(&inp->sctp_asoc_list)); asoc != NULL; asoc = nasoc) { + SCTP_TCB_LOCK(asoc); nasoc = LIST_NEXT(asoc, sctp_tcblist); if (asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { if (asoc->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE) { @@ -3471,10 +3472,10 @@ sctp_inpcb_free(struct sctp_inpcb *inp, sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, asoc, NULL); } cnt++; + SCTP_TCB_UNLOCK(asoc); continue; } /* Free associations that are NOT killing us */ - SCTP_TCB_LOCK(asoc); if ((SCTP_GET_STATE(&asoc->asoc) != SCTP_STATE_COOKIE_WAIT) && ((asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0)) { struct mbuf *op_err; From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:39:08 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CB261065694; Sat, 20 Nov 2010 21:39:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3168FC15; Sat, 20 Nov 2010 21:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLd8cA027232; Sat, 20 Nov 2010 21:39:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLd8i7027230; Sat, 20 Nov 2010 21:39:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202139.oAKLd8i7027230@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215594 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:39:08 -0000 Author: tuexen Date: Sat Nov 20 21:39:08 2010 New Revision: 215594 URL: http://svn.freebsd.org/changeset/base/215594 Log: MFC r215301: Simplify sctp_delayed_cksum() a bit. Modified: stable/8/sys/netinet/sctp_crc32.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_crc32.c ============================================================================== --- stable/8/sys/netinet/sctp_crc32.c Sat Nov 20 21:36:12 2010 (r215593) +++ stable/8/sys/netinet/sctp_crc32.c Sat Nov 20 21:39:08 2010 (r215594) @@ -124,18 +124,16 @@ sctp_delayed_cksum(struct mbuf *m, uint3 #if defined(SCTP_WITH_NO_CSUM) panic("sctp_delayed_cksum() called when using no SCTP CRC."); #else - struct ip *ip; uint32_t checksum; - ip = mtod(m, struct ip *); checksum = sctp_calculate_cksum(m, offset); SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", - (uint32_t) m->m_len, offset, ip->ip_p); + printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n", + (uint32_t) m->m_len, offset); /* * XXX this shouldn't happen, but if it does, the correct * behavior may be to insert the checksum in the appropriate From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:41:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E77D1065670; Sat, 20 Nov 2010 21:41:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1748FC0A; Sat, 20 Nov 2010 21:41:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLf7JF027322; Sat, 20 Nov 2010 21:41:07 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLf7sG027320; Sat, 20 Nov 2010 21:41:07 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202141.oAKLf7sG027320@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215595 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:41:07 -0000 Author: tuexen Date: Sat Nov 20 21:41:07 2010 New Revision: 215595 URL: http://svn.freebsd.org/changeset/base/215595 Log: MFC r215305: Take out special code for disable CRC computations on the loopback interface for IPv6. It will be handled by the loopback interface. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:39:08 2010 (r215594) +++ stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:41:07 2010 (r215595) @@ -4069,15 +4069,9 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && - (stcb) && - (stcb->asoc.loopback_scope))) { - m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; - SCTP_STAT_INCR(sctps_sendhwcrc); - } else { - SCTP_STAT_INCR(sctps_sendnocrc); - } + m->m_pkthdr.csum_flags = CSUM_SCTP; + m->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); #endif } /* send it out. table id is taken from stcb */ From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 20 21:44:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 922D11065675; Sat, 20 Nov 2010 21:44:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 759F98FC1A; Sat, 20 Nov 2010 21:44:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLiIEh027433; Sat, 20 Nov 2010 21:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLiIJt027429; Sat, 20 Nov 2010 21:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202144.oAKLiIJt027429@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215596 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:44:18 -0000 Author: tuexen Date: Sat Nov 20 21:44:18 2010 New Revision: 215596 URL: http://svn.freebsd.org/changeset/base/215596 Log: MFC r215410: Add an SCTP socket option to retrieve the number of timeouts of an association. Modified: stable/8/sys/netinet/sctp.h stable/8/sys/netinet/sctp_uio.h stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp.h ============================================================================== --- stable/8/sys/netinet/sctp.h Sat Nov 20 21:41:07 2010 (r215595) +++ stable/8/sys/netinet/sctp.h Sat Nov 20 21:44:18 2010 (r215596) @@ -123,6 +123,7 @@ struct sctp_paramhdr { #define SCTP_LOCAL_AUTH_CHUNKS 0x00000103 #define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */ #define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */ +#define SCTP_TIMEOUTS 0x00000106 /* * user socket options: BSD implementation specific Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Nov 20 21:41:07 2010 (r215595) +++ stable/8/sys/netinet/sctp_uio.h Sat Nov 20 21:44:18 2010 (r215596) @@ -563,6 +563,17 @@ struct sctp_sack_info { uint32_t sack_freq; }; +struct sctp_timeouts { + sctp_assoc_t stimo_assoc_id; + uint32_t stimo_init; + uint32_t stimo_data; + uint32_t stimo_sack; + uint32_t stimo_shutdown; + uint32_t stimo_heartbeat; + uint32_t stimo_cookie; + uint32_t stimo_shutdownack; +}; + struct sctp_cwnd_args { struct sctp_nets *net; /* network to *//* FIXME: LP64 issue */ uint32_t cwnd_new_value;/* cwnd in k */ Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 21:41:07 2010 (r215595) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 21:44:18 2010 (r215596) @@ -2441,6 +2441,29 @@ flags_out: *optsize = sizeof(*srto); } break; + case SCTP_TIMEOUTS: + { + struct sctp_timeouts *stimo; + + SCTP_CHECK_AND_CAST(stimo, optval, struct sctp_timeouts, *optsize); + SCTP_FIND_STCB(inp, stcb, stimo->stimo_assoc_id); + + if (stcb) { + stimo->stimo_init = stcb->asoc.timoinit; + stimo->stimo_data = stcb->asoc.timodata; + stimo->stimo_sack = stcb->asoc.timosack; + stimo->stimo_shutdown = stcb->asoc.timoshutdown; + stimo->stimo_heartbeat = stcb->asoc.timoheartbeat; + stimo->stimo_cookie = stcb->asoc.timocookie; + stimo->stimo_shutdownack = stcb->asoc.timoshutdownack; + SCTP_TCB_UNLOCK(stcb); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); + error = EINVAL; + } + *optsize = sizeof(*stimo); + } + break; case SCTP_ASSOCINFO: { struct sctp_assocparams *sasoc;