svn commit: r223492 - in head/usr.sbin: ancontrol ifmcstat nfsd pmcstat ppp rpc.yppasswdd rpc.ypupdated sysinstall wpa/ndis_events wpa/wpa_supplicant
Author: kevlo Date: Fri Jun 24 07:05:20 2011 New Revision: 223492 URL: http://svn.freebsd.org/changeset/base/223492 Log: Remove duplicated header files Modified: head/usr.sbin/ancontrol/ancontrol.c head/usr.sbin/ifmcstat/ifmcstat.c head/usr.sbin/nfsd/nfsd.c head/usr.sbin/pmcstat/pmcpl_calltree.c head/usr.sbin/ppp/nat_cmd.c head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c head/usr.sbin/rpc.ypupdated/update.c head/usr.sbin/rpc.ypupdated/ypupdated_main.c head/usr.sbin/rpc.ypupdated/ypupdated_server.c head/usr.sbin/sysinstall/modules.c head/usr.sbin/wpa/ndis_events/ndis_events.c head/usr.sbin/wpa/wpa_supplicant/Packet32.c Modified: head/usr.sbin/ancontrol/ancontrol.c == --- head/usr.sbin/ancontrol/ancontrol.c Fri Jun 24 05:41:38 2011 (r223491) +++ head/usr.sbin/ancontrol/ancontrol.c Fri Jun 24 07:05:20 2011 (r223492) @@ -40,7 +40,6 @@ static const char copyright[] = @(#) Co __FBSDID($FreeBSD$); #include sys/types.h -#include sys/cdefs.h #include sys/socket.h #include sys/ioctl.h Modified: head/usr.sbin/ifmcstat/ifmcstat.c == --- head/usr.sbin/ifmcstat/ifmcstat.c Fri Jun 24 05:41:38 2011 (r223491) +++ head/usr.sbin/ifmcstat/ifmcstat.c Fri Jun 24 07:05:20 2011 (r223492) @@ -72,7 +72,6 @@ __FBSDID($FreeBSD$); #include stddef.h #include stdarg.h -#include stdlib.h #include stdint.h #include stdio.h #include stdlib.h Modified: head/usr.sbin/nfsd/nfsd.c == --- head/usr.sbin/nfsd/nfsd.c Fri Jun 24 05:41:38 2011(r223491) +++ head/usr.sbin/nfsd/nfsd.c Fri Jun 24 07:05:20 2011(r223492) @@ -71,7 +71,6 @@ static const char rcsid[] = #include stdlib.h #include string.h #include unistd.h -#include netdb.h /* Global defs */ #ifdef DEBUG Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c == --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Jun 24 05:41:38 2011 (r223491) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Jun 24 07:05:20 2011 (r223492) @@ -46,7 +46,6 @@ __FBSDID($FreeBSD$); #include fcntl.h #include pmc.h #include pmclog.h -#include sysexits.h #include stdint.h #include stdio.h #include stdlib.h Modified: head/usr.sbin/ppp/nat_cmd.c == --- head/usr.sbin/ppp/nat_cmd.c Fri Jun 24 05:41:38 2011(r223491) +++ head/usr.sbin/ppp/nat_cmd.c Fri Jun 24 07:05:20 2011(r223492) @@ -32,7 +32,6 @@ #include arpa/inet.h #include netdb.h #include netinet/in_systm.h -#include netinet/in.h #include netinet/ip.h #include sys/socket.h #include sys/un.h Modified: head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c == --- head/usr.sbin/rpc.yppasswdd/yppasswdd_main.cFri Jun 24 05:41:38 2011(r223491) +++ head/usr.sbin/rpc.yppasswdd/yppasswdd_main.cFri Jun 24 07:05:20 2011(r223492) @@ -48,7 +48,6 @@ __FBSDID($FreeBSD$); #include signal.h #include stdio.h #include stdlib.h /* getenv, exit */ -#include string.h #include string.h /* strcmp */ #include syslog.h #include unistd.h Modified: head/usr.sbin/rpc.ypupdated/update.c == --- head/usr.sbin/rpc.ypupdated/update.cFri Jun 24 05:41:38 2011 (r223491) +++ head/usr.sbin/rpc.ypupdated/update.cFri Jun 24 07:05:20 2011 (r223492) @@ -57,7 +57,6 @@ static const char rcsid[] = #include pwd.h #include string.h #include sys/resource.h -#include stdlib.h #include ypupdated_extern.h #ifdef YP Modified: head/usr.sbin/rpc.ypupdated/ypupdated_main.c == --- head/usr.sbin/rpc.ypupdated/ypupdated_main.cFri Jun 24 05:41:38 2011(r223491) +++ head/usr.sbin/rpc.ypupdated/ypupdated_main.cFri Jun 24 07:05:20 2011(r223492) @@ -50,7 +50,6 @@ __FBSDID($FreeBSD$); #include sys/wait.h #include errno.h #include err.h -#include stdlib.h #include unistd.h #include ypupdated_extern.h #include yp_extern.h Modified: head/usr.sbin/rpc.ypupdated/ypupdated_server.c == --- head/usr.sbin/rpc.ypupdated/ypupdated_server.c Fri Jun 24 05:41:38 2011(r223491) +++ head/usr.sbin/rpc.ypupdated/ypupdated_server.c Fri Jun 24 07:05:20 2011(r223492) @@ -43,7 +43,6 @@ __FBSDID($FreeBSD$); #include rpc/rpc.h #include rpc/key_prot.h #include sys/param.h -#include sys/cdefs.h #include rpcsvc/yp.h #include ypupdate_prot.h #include ypupdated_extern.h Modified:
svn commit: r223493 - in head/usr.bin: ktrace ncplogin systat tftp vmstat
Author: kevlo Date: Fri Jun 24 07:18:44 2011 New Revision: 223493 URL: http://svn.freebsd.org/changeset/base/223493 Log: Remove duplicated header files Modified: head/usr.bin/ktrace/ktrace.c head/usr.bin/ncplogin/ncplogin.c head/usr.bin/systat/netstat.c head/usr.bin/tftp/main.c head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/ktrace/ktrace.c == --- head/usr.bin/ktrace/ktrace.cFri Jun 24 07:05:20 2011 (r223492) +++ head/usr.bin/ktrace/ktrace.cFri Jun 24 07:18:44 2011 (r223493) @@ -51,7 +51,6 @@ __FBSDID($FreeBSD$); #include sys/ktrace.h #include err.h -#include stdlib.h #include stdio.h #include stdlib.h #include unistd.h Modified: head/usr.bin/ncplogin/ncplogin.c == --- head/usr.bin/ncplogin/ncplogin.cFri Jun 24 07:05:20 2011 (r223492) +++ head/usr.bin/ncplogin/ncplogin.cFri Jun 24 07:18:44 2011 (r223493) @@ -42,8 +42,6 @@ __FBSDID($FreeBSD$); #include stdio.h #include stdlib.h #include string.h -#include stdlib.h -#include string.h #include sysexits.h #include unistd.h Modified: head/usr.bin/systat/netstat.c == --- head/usr.bin/systat/netstat.c Fri Jun 24 07:05:20 2011 (r223492) +++ head/usr.bin/systat/netstat.c Fri Jun 24 07:18:44 2011 (r223493) @@ -63,7 +63,6 @@ static const char sccsid[] = @(#)netsta #define TCPSTATES #include netinet/tcp_fsm.h #include netinet/tcp_timer.h -#include netinet/tcp_var.h #include netinet/tcp_debug.h #include netinet/udp.h #include netinet/udp_var.h Modified: head/usr.bin/tftp/main.c == --- head/usr.bin/tftp/main.cFri Jun 24 07:05:20 2011(r223492) +++ head/usr.bin/tftp/main.cFri Jun 24 07:18:44 2011(r223493) @@ -52,7 +52,6 @@ __FBSDID($FreeBSD$); #include sys/socket.h #include sys/sysctl.h #include sys/file.h -#include sys/param.h #include sys/stat.h #include netinet/in.h Modified: head/usr.bin/vmstat/vmstat.c == --- head/usr.bin/vmstat/vmstat.cFri Jun 24 07:05:20 2011 (r223492) +++ head/usr.bin/vmstat/vmstat.cFri Jun 24 07:18:44 2011 (r223493) @@ -43,7 +43,6 @@ static char sccsid[] = @(#)vmstat.c 8.1 __FBSDID($FreeBSD$); #include sys/param.h -#include sys/time.h #include sys/proc.h #include sys/uio.h #include sys/namei.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223493 - in head/usr.bin: ktrace ncplogin systat tftp vmstat
On Fri, Jun 24, 2011 at 07:18:44AM +, Kevin Lo wrote: Author: kevlo Date: Fri Jun 24 07:18:44 2011 New Revision: 223493 URL: http://svn.freebsd.org/changeset/base/223493 Log: Remove duplicated header files You may be interested in this tool: http://code.google.com/p/include-what-you-use/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223494 - in head: bin/rcp bin/sh sbin/savecore
Author: kevlo Date: Fri Jun 24 07:29:04 2011 New Revision: 223494 URL: http://svn.freebsd.org/changeset/base/223494 Log: Remove duplicated header files Modified: head/bin/rcp/rcp.c head/bin/sh/mkinit.c head/sbin/savecore/savecore.c Modified: head/bin/rcp/rcp.c == --- head/bin/rcp/rcp.c Fri Jun 24 07:18:44 2011(r223493) +++ head/bin/rcp/rcp.c Fri Jun 24 07:29:04 2011(r223494) @@ -71,7 +71,6 @@ __FBSDID($FreeBSD$); #include stdio.h #include stdlib.h #include string.h -#include string.h #include unistd.h #include extern.h Modified: head/bin/sh/mkinit.c == --- head/bin/sh/mkinit.cFri Jun 24 07:18:44 2011(r223493) +++ head/bin/sh/mkinit.cFri Jun 24 07:29:04 2011(r223494) @@ -55,7 +55,6 @@ __FBSDID($FreeBSD$); */ -#include sys/cdefs.h #include sys/types.h #include stdio.h #include stdlib.h Modified: head/sbin/savecore/savecore.c == --- head/sbin/savecore/savecore.c Fri Jun 24 07:18:44 2011 (r223493) +++ head/sbin/savecore/savecore.c Fri Jun 24 07:29:04 2011 (r223494) @@ -66,7 +66,6 @@ __FBSDID($FreeBSD$); #include sys/param.h #include sys/disk.h #include sys/kerneldump.h -#include sys/param.h #include sys/mount.h #include sys/stat.h #include errno.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223493 - in head/usr.bin: ktrace ncplogin systat tftp vmstat
On Fri Jun 24 11, Roman Divacky wrote: On Fri, Jun 24, 2011 at 07:18:44AM +, Kevin Lo wrote: Author: kevlo Date: Fri Jun 24 07:18:44 2011 New Revision: 223493 URL: http://svn.freebsd.org/changeset/base/223493 Log: Remove duplicated header files You may be interested in this tool: http://code.google.com/p/include-what-you-use/ did they add C support since the last time i tested it? back then it only worked with CPP code, iirc. it was possible to thorw it at C code, but it returned pretty useless results. cheers. alex ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223493 - in head/usr.bin: ktrace ncplogin systat tftp vmstat
On 五, 2011-06-24 at 09:21 +0200, Roman Divacky wrote: On Fri, Jun 24, 2011 at 07:18:44AM +, Kevin Lo wrote: Author: kevlo Date: Fri Jun 24 07:18:44 2011 New Revision: 223493 URL: http://svn.freebsd.org/changeset/base/223493 Log: Remove duplicated header files You may be interested in this tool: http://code.google.com/p/include-what-you-use/ Hi Roman, Cool! Thanks for that info, I'll give it a try. Kevin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223495 - head/lib/libusb
Author: hselasky Date: Fri Jun 24 11:14:09 2011 New Revision: 223495 URL: http://svn.freebsd.org/changeset/base/223495 Log: - Add two new API's to libusb20 which can be used to retrive information about the parent USB device: - libusb20_dev_get_parent_address - libusb20_dev_get_parent_port - Rename libusb20_compat01.c into libusb01.c MFC after:3 days Added: head/lib/libusb/libusb01.c - copied unchanged from r216431, head/lib/libusb/libusb20_compat01.c Deleted: head/lib/libusb/libusb20_compat01.c Modified: head/lib/libusb/Makefile head/lib/libusb/libusb20.3 head/lib/libusb/libusb20.c head/lib/libusb/libusb20.h head/lib/libusb/libusb20_int.h head/lib/libusb/libusb20_ugen20.c Modified: head/lib/libusb/Makefile == --- head/lib/libusb/MakefileFri Jun 24 07:29:04 2011(r223494) +++ head/lib/libusb/MakefileFri Jun 24 11:14:09 2011(r223495) @@ -22,7 +22,7 @@ MLINKS+= libusb.3 usb.3 # libusb 0.1 compat INCS+= usb.h -SRCS+= libusb20_compat01.c +SRCS+= libusb01.c # libusb 1.0 compat INCS+= libusb.h @@ -184,6 +184,8 @@ MLINKS += libusb20.3 libusb20_dev_get_de MLINKS += libusb20.3 libusb20_dev_alloc_config.3 MLINKS += libusb20.3 libusb20_dev_alloc.3 MLINKS += libusb20.3 libusb20_dev_get_address.3 +MLINKS += libusb20.3 libusb20_dev_get_parent_address.3 +MLINKS += libusb20.3 libusb20_dev_get_parent_port.3 MLINKS += libusb20.3 libusb20_dev_get_bus_number.3 MLINKS += libusb20.3 libusb20_dev_get_mode.3 MLINKS += libusb20.3 libusb20_dev_get_speed.3 Copied: head/lib/libusb/libusb01.c (from r216431, head/lib/libusb/libusb20_compat01.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libusb/libusb01.c Fri Jun 24 11:14:09 2011(r223495, copy of r216431, head/lib/libusb/libusb20_compat01.c) @@ -0,0 +1,945 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This file contains the emulation layer for LibUSB v0.1 from sourceforge. + */ + +#include sys/queue.h + +#include errno.h +#include stdio.h +#include stdlib.h + +#include libusb20.h +#include libusb20_desc.h +#include libusb20_int.h +#include usb.h + +/* + * The two following macros were taken from the original LibUSB v0.1 + * for sake of compatibility: + */ +#defineLIST_ADD(begin, ent) \ + do {\ +if (begin) { \ + ent-next = begin; \ + ent-next-prev = ent; \ +} else { \ + ent-next = NULL; \ +} \ +ent-prev = NULL; \ +begin = ent; \ + } while(0) + +#defineLIST_DEL(begin, ent) \ + do { \ +if (ent-prev) {\ + ent-prev-next = ent-next; \ +} else {\ + begin = ent-next;\ +} \ +if (ent-next) {\ + ent-next-prev = ent-prev; \ +} \ +ent-prev = NULL; \ +ent-next = NULL; \ + } while (0) + +struct usb_bus *usb_busses = NULL; + +static struct usb_bus usb_global_bus = { + .dirname = {/dev/usb}, + .root_dev = NULL, + .devices = NULL, +}; + +static struct libusb20_backend *usb_backend = NULL; + +struct usb_parse_state { + +
Re: svn commit: r223464 - head/sys/vm
2011/6/24 Jayachandran C. c.jayachand...@gmail.com: On Fri, Jun 24, 2011 at 1:33 AM, Alan Cox a...@rice.edu wrote: On 6/23/2011 1:30 PM, Warner Losh wrote: On Jun 23, 2011, at 2:17 AM, Bjoern A. Zeeb wrote: On Jun 23, 2011, at 5:24 AM, Alan Cox wrote: Author: alc Date: Thu Jun 23 05:23:59 2011 New Revision: 223464 URL: http://svn.freebsd.org/changeset/base/223464 Log: Revert to using the page queues lock in vm_page_clear_dirty_mask() on MIPS. (At present, although atomic_clear_char() is defined by atomic.h on MIPS, it is not actually implemented by support.S.) Thanks, and good catch on the atomics even if not planned, just in time for 9.0:) Yea, there's some work there to fix them... Not sure we can even fix some of them atomically... I'm not sure that I understand what you mean by the second statement. Can you elaborate? The 8- and 16-bit operations should be no less atomic than the 32- and 64-bit operations. In general, regardless of the size of the operation, the sc instruction may fail and the whole operation has to be restarted if another processor (or I/O device) performs a concurrent, cache coherent store to the same location (or even cache line) as the ll and sc instructions are operating on. On the other hand, if the sc instruction succeeds, whether you used it to change all of the 32 bits or just 8 of the 32 bits, it should appear as an atomic change to any other processor. I will try out an implementation and see if this works on XLR, if so this is something we can add to support.S There is a chance we can leave all the atomic support inlined in atomic.h? When I looked into it, my opinion is that support.S part is just in the wrong place (and Warner didn't have a good explanation for it, so I don't see a problem about moving anything to atomic.h). Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223496 - head/etc
Author: adrian Date: Fri Jun 24 12:30:43 2011 New Revision: 223496 URL: http://svn.freebsd.org/changeset/base/223496 Log: Import one of the two missing US FCC DFS bands to FCC3. The FCC opened up this band sometime in 2009 (and ath was updated); but regdomain.xml wasn't updated. Modified: head/etc/regdomain.xml Modified: head/etc/regdomain.xml == --- head/etc/regdomain.xml Fri Jun 24 11:14:09 2011(r223495) +++ head/etc/regdomain.xml Fri Jun 24 12:30:43 2011(r223496) @@ -138,6 +138,12 @@ maxpower17/maxpower /band band + freqband ref=F1_5260_5320/ + maxpower20/maxpower + flagsIEEE80211_CHAN_PASSIVE/flags + flagsIEEE80211_CHAN_DFS/flags +/band +band freqband ref=F1_5745_5805/ maxpower23/maxpower flagsIEEE80211_CHAN_PASSIVE/flags @@ -176,6 +182,20 @@ flagsIEEE80211_CHAN_HT40/flags /band band + freqband ref=F1_5260_5320/ + maxpower20/maxpower + flagsIEEE80211_CHAN_HT20/flags + flagsIEEE80211_CHAN_PASSIVE/flags + flagsIEEE80211_CHAN_DFS/flags +/band +band + freqband ref=H4_5260_5320/ + maxpower20/maxpower + flagsIEEE80211_CHAN_HT40/flags + flagsIEEE80211_CHAN_PASSIVE/flags + flagsIEEE80211_CHAN_DFS/flags +/band +band freqband ref=F1_5745_5805/ maxpower23/maxpower flagsIEEE80211_CHAN_HT20/flags ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223497 - head/etc
Author: adrian Date: Fri Jun 24 12:31:36 2011 New Revision: 223497 URL: http://svn.freebsd.org/changeset/base/223497 Log: Fix an incorrect frequency band for HT/40 in the FCC SKU. Noticed by: bschmidt@ Modified: head/etc/regdomain.xml Modified: head/etc/regdomain.xml == --- head/etc/regdomain.xml Fri Jun 24 12:30:43 2011(r223496) +++ head/etc/regdomain.xml Fri Jun 24 12:31:36 2011(r223497) @@ -83,7 +83,7 @@ flagsIEEE80211_CHAN_HT20/flags /band band - freqband ref=F1_2412_2462/ + freqband ref=H4_2412_2462/ maxpower30/maxpower flagsIEEE80211_CHAN_G/flags flagsIEEE80211_CHAN_HT40/flags ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223498 - head/etc
Author: adrian Date: Fri Jun 24 12:50:18 2011 New Revision: 223498 URL: http://svn.freebsd.org/changeset/base/223498 Log: More incorrect HT/40 setups in FCC. Noticed-by: bschmidt@ Modified: head/etc/regdomain.xml Modified: head/etc/regdomain.xml == --- head/etc/regdomain.xml Fri Jun 24 12:31:36 2011(r223497) +++ head/etc/regdomain.xml Fri Jun 24 12:50:18 2011(r223498) @@ -96,7 +96,7 @@ flagsIEEE80211_CHAN_HT20/flags /band band - freqband ref=F1_5180_5240/ + freqband ref=H4_5180_5240/ maxpower17/maxpower flagsIEEE80211_CHAN_HT40/flags /band @@ -106,7 +106,7 @@ flagsIEEE80211_CHAN_HT20/flags /band band - freqband ref=F1_5745_5805/ + freqband ref=H4_5745_5805/ maxpower23/maxpower flagsIEEE80211_CHAN_HT40/flags /band ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223499 - head/sbin/ipfw
Author: glebius Date: Fri Jun 24 12:55:16 2011 New Revision: 223499 URL: http://svn.freebsd.org/changeset/base/223499 Log: Actually, if code had followed style(9), there would be less stupid errors like the one fixed in r223416. Noticed by: julian Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c == --- head/sbin/ipfw/nat.cFri Jun 24 12:50:18 2011(r223498) +++ head/sbin/ipfw/nat.cFri Jun 24 12:55:16 2011(r223499) @@ -738,7 +738,8 @@ ipfw_config_nat(int ac, char **av) char *id, *buf, **av1, *end; size_t len; - av++; ac--; + av++; + ac--; /* Nat id. */ if (ac == 0) errx(EX_DATAERR, missing nat id); @@ -746,7 +747,8 @@ ipfw_config_nat(int ac, char **av) i = (int)strtol(id, end, 0); if (i = 0 || *end != '\0') errx(EX_DATAERR, illegal nat id: %s, id); - av++; ac--; + av++; + ac--; if (ac == 0) errx(EX_DATAERR, missing option); @@ -755,11 +757,13 @@ ipfw_config_nat(int ac, char **av) av1 = av; while (ac1 0) { tok = match_token(nat_params, *av1); - ac1--; av1++; + ac1--; + av1++; switch (tok) { case TOK_IP: case TOK_IF: - ac1--; av1++; + ac1--; + av1++; break; case TOK_ALOG: case TOK_DENY_INC: @@ -775,18 +779,22 @@ ipfw_config_nat(int ac, char **av) errx(EX_DATAERR, redirect_addr: not enough arguments); len += estimate_redir_addr(ac1, av1); - av1 += 2; ac1 -= 2; + av1 += 2; + ac1 -= 2; break; case TOK_REDIR_PORT: if (ac1 3) errx(EX_DATAERR, redirect_port: not enough arguments); - av1++; ac1--; + av1++; + ac1--; len += estimate_redir_port(ac1, av1); - av1 += 2; ac1 -= 2; + av1 += 2; + ac1 -= 2; /* Skip optional remoteIP/port */ if (ac1 != 0 isdigit(**av1)) { - av1++; ac1--; + av1++; + ac1--; } break; case TOK_REDIR_PROTO: @@ -794,13 +802,16 @@ ipfw_config_nat(int ac, char **av) errx(EX_DATAERR, redirect_proto: not enough arguments); len += sizeof(struct cfg_redir); - av1 += 2; ac1 -= 2; + av1 += 2; + ac1 -= 2; /* Skip optional remoteIP/port */ if (ac1 != 0 isdigit(**av1)) { - av1++; ac1--; + av1++; + ac1--; } if (ac1 != 0 isdigit(**av1)) { - av1++; ac1--; + av1++; + ac1--; } break; default: @@ -819,7 +830,8 @@ ipfw_config_nat(int ac, char **av) while (ac 0) { tok = match_token(nat_params, *av); - ac--; av++; + ac--; + av++; switch (tok) { case TOK_IP: if (ac == 0) @@ -827,13 +839,15 @@ ipfw_config_nat(int ac, char **av) if (!inet_aton(av[0], (n-ip))) errx(EX_DATAERR, bad ip address ``%s'', av[0]); - ac--; av++; + ac--; + av++; break; case TOK_IF: if (ac == 0) errx(EX_DATAERR, missing option); set_addr_dynamic(av[0], n); - ac--; av++; + ac--; + av++; break; case TOK_ALOG: n-mode |= PKT_ALIAS_LOG; @@ -912,7 +926,8 @@ ipfw_show_nat(int ac, char **av) data = NULL; frule = 0; lrule = IPFW_DEFAULT_RULE; /* max ipfw rule number */ - ac--; av++; + ac--; + av++; if (co.test_only) return;
svn commit: r223502 - head/sys/dev/acpica
Author: jhb Date: Fri Jun 24 13:58:56 2011 New Revision: 223502 URL: http://svn.freebsd.org/changeset/base/223502 Log: Typo. Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Fri Jun 24 13:45:14 2011(r223501) +++ head/sys/dev/acpica/acpi.c Fri Jun 24 13:58:56 2011(r223502) @@ -1244,7 +1244,7 @@ acpi_alloc_resource(device_t bus, device /* * First attempt at allocating the resource. For direct children, * use resource_list_alloc() to handle reserved resources. For - * other dveices, pass the request up to our parent. + * other devices, pass the request up to our parent. */ if (bus == device_get_parent(child)) { ad = device_get_ivars(child); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223504 - head/etc
Author: adrian Date: Fri Jun 24 14:31:30 2011 New Revision: 223504 URL: http://svn.freebsd.org/changeset/base/223504 Log: Fix another broken HT40 channel band reference. Modified: head/etc/regdomain.xml Modified: head/etc/regdomain.xml == --- head/etc/regdomain.xml Fri Jun 24 14:03:10 2011(r223503) +++ head/etc/regdomain.xml Fri Jun 24 14:31:30 2011(r223504) @@ -251,7 +251,7 @@ flagsIEEE80211_CHAN_HT20/flags /band band - freqband ref=F1_2412_2462/ + freqband ref=H4_2412_2462/ maxpower30/maxpower flagsIEEE80211_CHAN_G/flags flagsIEEE80211_CHAN_HT40/flags ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223505 - head/sys/kern
Author: jonathan Date: Fri Jun 24 14:40:22 2011 New Revision: 223505 URL: http://svn.freebsd.org/changeset/base/223505 Log: Tidy up a capabilities-related comment. This comment refers to an #ifdef that hasn't been merged [yet?]; remove it. Approved by: rwatson Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cFri Jun 24 14:31:30 2011(r223504) +++ head/sys/kern/vfs_subr.cFri Jun 24 14:40:22 2011(r223505) @@ -3590,9 +3590,6 @@ vn_isdisk(struct vnode *vp, int *errp) * and optional call-by-reference privused argument allowing vaccess() * to indicate to the caller whether privilege was used to satisfy the * request (obsoleted). Returns 0 on success, or an errno on failure. - * - * The ifdef'd CAPABILITIES version is here for reference, but is not - * actually used. */ int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223506 - head/etc
Author: pluknet Date: Fri Jun 24 14:56:38 2011 New Revision: 223506 URL: http://svn.freebsd.org/changeset/base/223506 Log: Add support for string values with white spaces for ifconfig(8) parameters accepting them (such as description, group). Changes discussed on freebsd-rc. PR: conf/156675 Reported by: Alexander V. Chernikov melifaro att ipfw ru Suggested by: hrs Analyzed with:Alexander V. Chernikov via IRC MFC after:2 weeks Modified: head/etc/network.subr Modified: head/etc/network.subr == --- head/etc/network.subr Fri Jun 24 14:40:22 2011(r223505) +++ head/etc/network.subr Fri Jun 24 14:56:38 2011(r223506) @@ -94,7 +94,7 @@ ifconfig_up() # ifconfig_IF ifconfig_args=`ifconfig_getargs $1` if [ -n ${ifconfig_args} ]; then - ifconfig $1 ${ifconfig_args} + eval ifconfig $1 ${ifconfig_args} _cfg=0 fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223505 - head/sys/kern
On 24 June 2011 18:40, Jonathan Anderson jonat...@freebsd.org wrote: Author: jonathan Date: Fri Jun 24 14:40:22 2011 New Revision: 223505 URL: http://svn.freebsd.org/changeset/base/223505 Log: Tidy up a capabilities-related comment. This comment refers to an #ifdef that hasn't been merged [yet?]; remove it. Approved by: rwatson Thanks! Can you close PR kern/148801 as well? This comment was mistakenly left after Sweep kernel replacing suser(9) calls with priv(9) calls (svn r164033 by rwatson@) in which the exp. CAPABILITIES facility transformed to currently operating priv(9). After that the comment has lost its relevance. May be applied down to 7.x. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.c Fri Jun 24 14:31:30 2011 (r223504) +++ head/sys/kern/vfs_subr.c Fri Jun 24 14:40:22 2011 (r223505) @@ -3590,9 +3590,6 @@ vn_isdisk(struct vnode *vp, int *errp) * and optional call-by-reference privused argument allowing vaccess() * to indicate to the caller whether privilege was used to satisfy the * request (obsoleted). Returns 0 on success, or an errno on failure. - * - * The ifdef'd CAPABILITIES version is here for reference, but is not - * actually used. */ int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, -- wbr, pluknet ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223488 - head/lib/libstand
On Fri, 24 Jun 2011 03:50:55 + (UTC) Craig Rodrigues rodr...@freebsd.org wrote: Hi, + if (d-xid != 1) { + return (-1); + } this is distinctly NOT what I sent to you and would rather not take credit for consequences. What you are doing here is not dropping the packet, you are returning error from read and with errno in unknown state on top of that. Why did this have to change and why there is no mention of that in the commit message? -- Alexander Kabaev signature.asc Description: PGP signature
Re: svn commit: r223485 - in head/sys/powerpc: aim booke include ofw powerpc
On Jun 23, 2011, at 3:21 PM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Jun 23 22:21:28 2011 New Revision: 223485 URL: http://svn.freebsd.org/changeset/base/223485 Log: Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) instead of a PCPU field for curthread. This averts a race on SMP systems with a high interrupt rate where the thread looking up the value of curthread could be preempted and migrated between obtaining the PCPU pointer and reading the value of pc_curthread, resulting in curthread being observed to be the current thread on the thread's original CPU. This played merry havoc with the system, in particular with mutexes. Many thanks to jhb for helping me work this one out. Nice catch! Another approach would be to have r2/r13 hold the address of the PCPU structure and simply do a load from that address to get curthread. The difference between the approaches is the need to to a memory load or not for curthread. But with r2/r13 pointing to the PCPU, you may be faster to get other PCPU fields if reading from the a SPR adds to the overhead. Plus, it's easier to be atomic if you don't have to read the SPR first and then do a load. Is curthread the only field that needs to be atomically accessed or are other fields in the PCPU susceptible to race conditions? -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223485 - in head/sys/powerpc: aim booke include ofw powerpc
On 06/24/11 11:11, Marcel Moolenaar wrote: On Jun 23, 2011, at 3:21 PM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Jun 23 22:21:28 2011 New Revision: 223485 URL: http://svn.freebsd.org/changeset/base/223485 Log: Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) instead of a PCPU field for curthread. This averts a race on SMP systems with a high interrupt rate where the thread looking up the value of curthread could be preempted and migrated between obtaining the PCPU pointer and reading the value of pc_curthread, resulting in curthread being observed to be the current thread on the thread's original CPU. This played merry havoc with the system, in particular with mutexes. Many thanks to jhb for helping me work this one out. Nice catch! Another approach would be to have r2/r13 hold the address of the PCPU structure and simply do a load from that address to get curthread. The difference between the approaches is the need to to a memory load or not for curthread. But with r2/r13 pointing to the PCPU, you may be faster to get other PCPU fields if reading from the a SPR adds to the overhead. Plus, it's easier to be atomic if you don't have to read the SPR first and then do a load. The trouble with this approach is that r2/r13 would need to be updated on every CPU switch with the new PCPU pointer, so I just put curthread in there due to laziness, which is of course constant for a given thread. Another consideration is that we'd have to additionally maintain SPRG0 as the PCPU pointer anyway, since we need a PCPU area that userland can't change (r2/r13 is set from PCPU data when traps are taken now). Is curthread the only field that needs to be atomically accessed or are other fields in the PCPU susceptible to race conditions? In my discussion with John yesterday, he said he thought it was the only one susceptible to races of this type. The approach I used here (providing a special accessor for curthread that reads a non-PCPU-related register) is borrowed from the one used on amd64, i386, and alpha. Whether it is the only possibility for this kind of race or not, none of these platforms at least override anything else. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223485 - in head/sys/powerpc: aim booke include ofw powerpc
On Jun 24, 2011, at 9:18 AM, Nathan Whitehorn wrote: On 06/24/11 11:11, Marcel Moolenaar wrote: On Jun 23, 2011, at 3:21 PM, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Jun 23 22:21:28 2011 New Revision: 223485 URL: http://svn.freebsd.org/changeset/base/223485 Log: Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) instead of a PCPU field for curthread. This averts a race on SMP systems with a high interrupt rate where the thread looking up the value of curthread could be preempted and migrated between obtaining the PCPU pointer and reading the value of pc_curthread, resulting in curthread being observed to be the current thread on the thread's original CPU. This played merry havoc with the system, in particular with mutexes. Many thanks to jhb for helping me work this one out. Nice catch! Another approach would be to have r2/r13 hold the address of the PCPU structure and simply do a load from that address to get curthread. The difference between the approaches is the need to to a memory load or not for curthread. But with r2/r13 pointing to the PCPU, you may be faster to get other PCPU fields if reading from the a SPR adds to the overhead. Plus, it's easier to be atomic if you don't have to read the SPR first and then do a load. The trouble with this approach is that r2/r13 would need to be updated on every CPU switch with the new PCPU pointer, so I just put curthread in there due to laziness, which is of course constant for a given thread. Actually, you need to save and assign that register on entry into the kernel only and restore it when you go back to user space (due to it being the thread pointer in user space). It remains a constant within the kernel (from the CPU's point of view) and does not have to be changed on a context switch. If r2/r13 hold curthread, then r2/r13 are indeed constant from the perspective of the thread, but it needs to be changed for every context switch in that case. From the CPU's perspective these registers are not constant then. Another consideration is that we'd have to additionally maintain SPRG0 as the PCPU pointer anyway, since we need a PCPU area that userland can't change (r2/r13 is set from PCPU data when traps are taken now). Yes. On ia64 we use the thread register to hold the address of the PCPU structure and since curthread is at offset 0 in the PCPU structure, we can do an atomic load. We use a kernel register to restore the PCPU address in the thread register on entry into the kernel. Works well and it doesn't make curthread too special (other than it needing to be at offset 0 in the PCPU structure for the dereferencing to be atomic). As such, even PCPU_GET(curthread) is atomic... Anyway: I'll see about fixing Book-E... Is curthread the only field that needs to be atomically accessed or are other fields in the PCPU susceptible to race conditions? In my discussion with John yesterday, he said he thought it was the only one susceptible to races of this type. The approach I used here (providing a special accessor for curthread that reads a non-PCPU-related register) is borrowed from the one used on amd64, i386, and alpha. Whether it is the only possibility for this kind of race or not, none of these platforms at least override anything else. Thanks. That's what I figured, but I never really had any firm confirmation and we still have comments in our code like: /* * XXX The implementation of this operation should be made atomic * with respect to preemption. */ #define PCPU_ADD(member, value) (pcpup-pc_ ## member += (value)) It's always created uncertainty and doubt in my mind... -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223510 - head/usr.sbin/mtest
Author: jhb Date: Fri Jun 24 17:54:45 2011 New Revision: 223510 URL: http://svn.freebsd.org/changeset/base/223510 Log: Don't die if either of INET or INET6 aren't in the running kernel. Instead, report protocol not supported errors at runtime if a user attempts to use a protocol that the kernel doesn't support. Reviewed by: bz MFC after:1 week Modified: head/usr.sbin/mtest/mtest.c Modified: head/usr.sbin/mtest/mtest.c == --- head/usr.sbin/mtest/mtest.c Fri Jun 24 17:29:41 2011(r223509) +++ head/usr.sbin/mtest/mtest.c Fri Jun 24 17:54:45 2011(r223510) @@ -204,14 +204,16 @@ main(int argc, char **argv) s6 = -1; #ifdef INET s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (s == -1) + if (s == -1 errno != EPROTONOSUPPORT) err(1, can't open IPv4 socket); #endif #ifdef INET6 s6 = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); - if (s6 == -1) + if (s6 == -1 errno != EPROTONOSUPPORT) err(1, can't open IPv6 socket); #endif + if (s == -1 s6 == -1) + errc(1, EPROTONOSUPPORT, can't open socket); if (argc 2) { if (isatty(STDIN_FILENO)) { @@ -371,7 +373,7 @@ af2socklen(const int af) } static void -process_cmd(char *cmd, int s, int s6 __unused, FILE *fp __unused) +process_cmd(char *cmd, int s, int s6, FILE *fp __unused) { char str1[STR_SIZE]; char str2[STR_SIZE]; @@ -457,7 +459,10 @@ process_cmd(char *cmd, int s, int s6 __u optval = (void *)mr.mr; optlen = sizeof(mr.mr); } - if (setsockopt(s, level, optname, optval, + if (s 0) { + warnc(EPROTONOSUPPORT, setsockopt %s, + toptname); + } else if (setsockopt(s, level, optname, optval, optlen) == 0) { printf(ok\n); break; @@ -496,7 +501,10 @@ process_cmd(char *cmd, int s, int s6 __u optval = (void *)mr.mr6; optlen = sizeof(mr.mr6); } - if (setsockopt(s6, level, optname, optval, + if (s6 0) { + warnc(EPROTONOSUPPORT, setsockopt %s, + toptname); + } else if (setsockopt(s6, level, optname, optval, optlen) == 0) { printf(ok\n); break; @@ -534,6 +542,10 @@ process_cmd(char *cmd, int s, int s6 __u break; } af = su.sa.sa_family; + if (af2sock(af, s, s6) == -1) { + warnc(EPROTONOSUPPORT, setsourcefilter); + break; + } memset(hints, 0, sizeof(struct addrinfo)); hints.ai_flags = AI_NUMERICHOST; @@ -593,6 +605,10 @@ process_cmd(char *cmd, int s, int s6 __u break; } af = su.sa.sa_family; + if (af2sock(af, s, s6) == -1) { + warnc(EPROTONOSUPPORT, getsourcefilter); + break; + } /* First determine our current filter mode. */ n = 0; @@ -700,6 +716,10 @@ process_cmd(char *cmd, int s, int s6 __u } af = su.sa.sa_family; + if (af2sock(af, s, s6) == -1) { + warnc(EPROTONOSUPPORT, getsourcefilter); + break; + } nsrc = nreqsrc; if (getsourcefilter(af2sock(af, s, s6), ifindex, su.sa, su.sa.sa_len, fmode, nsrc, sources[0].ss) != 0) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223511 - head/sys/dev/usb/storage
Author: hselasky Date: Fri Jun 24 18:11:55 2011 New Revision: 223511 URL: http://svn.freebsd.org/changeset/base/223511 Log: - Export the URIO USB device ID's. - Add checks for configuration and interface index. MFC after:3 days Modified: head/sys/dev/usb/storage/urio.c Modified: head/sys/dev/usb/storage/urio.c == --- head/sys/dev/usb/storage/urio.c Fri Jun 24 17:54:45 2011 (r223510) +++ head/sys/dev/usb/storage/urio.c Fri Jun 24 18:11:55 2011 (r223511) @@ -198,22 +198,25 @@ DRIVER_MODULE(urio, uhub, urio_driver, u MODULE_DEPEND(urio, usb, 1, 1, 1); MODULE_VERSION(urio, 1); +static const STRUCT_USB_HOST_ID urio_devs[] = { + {USB_VPI(USB_VENDOR_DIAMOND, USB_PRODUCT_DIAMOND_RIO500USB, 0)}, + {USB_VPI(USB_VENDOR_DIAMOND2, USB_PRODUCT_DIAMOND2_RIO600USB, 0)}, + {USB_VPI(USB_VENDOR_DIAMOND2, USB_PRODUCT_DIAMOND2_RIO800USB, 0)}, +}; + static int urio_probe(device_t dev) { struct usb_attach_arg *uaa = device_get_ivars(dev); - if (uaa-usb_mode != USB_MODE_HOST) { + if (uaa-usb_mode != USB_MODE_HOST) return (ENXIO); - } - if uaa-info.idVendor == USB_VENDOR_DIAMOND) - (uaa-info.idProduct == USB_PRODUCT_DIAMOND_RIO500USB)) || - ((uaa-info.idVendor == USB_VENDOR_DIAMOND2) - ((uaa-info.idProduct == USB_PRODUCT_DIAMOND2_RIO600USB) || - (uaa-info.idProduct == USB_PRODUCT_DIAMOND2_RIO800USB) - return (0); - else + if (uaa-info.bConfigIndex != 0) return (ENXIO); + if (uaa-info.bIfaceIndex != 0) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(urio_devs, sizeof(urio_devs), uaa)); } static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223512 - head/sys/dev/usb
Author: hselasky Date: Fri Jun 24 18:14:43 2011 New Revision: 223512 URL: http://svn.freebsd.org/changeset/base/223512 Log: - Move execution of event handlers into the probe and attach function so that dynamically loaded device drivers get a chance to run their event hooks. - Decouple the USB suspend and resume lock from witness. It produces some false warnings due to reusing the lock name among multiple devices. MFC after:3 days Modified: head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_device.c == --- head/sys/dev/usb/usb_device.c Fri Jun 24 18:11:55 2011 (r223511) +++ head/sys/dev/usb/usb_device.c Fri Jun 24 18:14:43 2011 (r223512) @@ -1297,6 +1297,21 @@ usb_probe_and_attach(struct usb_device * usb_init_attach_arg(udev, uaa); + /* +* If the whole USB device is targeted, invoke the USB event +* handler(s): +*/ + if (iface_index == USB_IFACE_INDEX_ANY) { + + EVENTHANDLER_INVOKE(usb_dev_configured, udev, uaa); + + if (uaa.dev_state != UAA_DEV_READY) { + /* leave device unconfigured */ + usb_unconfigure(udev, 0); + goto done; + } + } + /* Check if only one interface should be probed: */ if (iface_index != USB_IFACE_INDEX_ANY) { i = iface_index; @@ -1526,7 +1541,7 @@ usb_alloc_device(device_t parent_dev, st /* initialise our SX-lock */ sx_init_flags(udev-enum_sx, USB config SX lock, SX_DUPOK); - sx_init_flags(udev-sr_sx, USB suspend and resume SX lock, SX_DUPOK); + sx_init_flags(udev-sr_sx, USB suspend and resume SX lock, SX_NOWITNESS); cv_init(udev-ctrlreq_cv, WCTRL); cv_init(udev-ref_cv, UGONE); @@ -1834,11 +1849,6 @@ repeat_set_config: } } } - EVENTHANDLER_INVOKE(usb_dev_configured, udev, uaa); - if (uaa.dev_state != UAA_DEV_READY) { - /* leave device unconfigured */ - usb_unconfigure(udev, 0); - } config_done: DPRINTF(new dev (addr %d), udev=%p, parent_hub=%p\n, Modified: head/sys/dev/usb/usb_msctest.c == --- head/sys/dev/usb/usb_msctest.c Fri Jun 24 18:11:55 2011 (r223511) +++ head/sys/dev/usb/usb_msctest.c Fri Jun 24 18:14:43 2011 (r223512) @@ -489,6 +489,24 @@ bbb_attach(struct usb_device *udev, uint struct usb_interface_descriptor *id; struct bbb_transfer *sc; usb_error_t err; + uint8_t do_unlock; + + /* automatic locking */ + if (usbd_enum_is_locked(udev)) { + do_unlock = 0; + } else { + do_unlock = 1; + usbd_enum_lock(udev); + } + + /* +* Make sure any driver which is hooked up to this interface, +* like umass is gone: +*/ + usb_detach_device(udev, iface_index, 0); + + if (do_unlock) + usbd_enum_unlock(udev); iface = usbd_get_iface(udev, iface_index); if (iface == NULL) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223513 - head/sys/dev/usb
Author: hselasky Date: Fri Jun 24 19:02:56 2011 New Revision: 223513 URL: http://svn.freebsd.org/changeset/base/223513 Log: - Ensure that we get all the required nomatch devd events. MFC after:3 days Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c == --- head/sys/dev/usb/usb_device.c Fri Jun 24 18:14:43 2011 (r223512) +++ head/sys/dev/usb/usb_device.c Fri Jun 24 19:02:56 2011 (r223513) @@ -1358,17 +1358,18 @@ usb_probe_and_attach(struct usb_device * uaa.info.bIfaceIndex, uaa.info.bIfaceNum); - if (usb_probe_and_attach_sub(udev, uaa)) { - /* ignore */ - } - } + usb_probe_and_attach_sub(udev, uaa); - if (uaa.temp_dev) { - /* remove the last created child; it is unused */ - - if (device_delete_child(udev-parent_dev, uaa.temp_dev)) { + /* +* Remove the leftover child, if any, to enforce that +* a new nomatch devd event is generated for the next +* interface if no driver is found: +*/ + if (uaa.temp_dev == NULL) + continue; + if (device_delete_child(udev-parent_dev, uaa.temp_dev)) DPRINTFN(0, device delete child failed\n); - } + uaa.temp_dev = NULL; } done: if (do_unlock) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223515 - in head/sys/dev/usb: misc serial
Author: hselasky Date: Fri Jun 24 19:32:29 2011 New Revision: 223515 URL: http://svn.freebsd.org/changeset/base/223515 Log: - Export more USB device ID's. MFC after:3 days Modified: head/sys/dev/usb/misc/udbp.c head/sys/dev/usb/misc/ufm.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/umodem.c Modified: head/sys/dev/usb/misc/udbp.c == --- head/sys/dev/usb/misc/udbp.cFri Jun 24 19:24:56 2011 (r223514) +++ head/sys/dev/usb/misc/udbp.cFri Jun 24 19:32:29 2011 (r223515) @@ -288,40 +288,27 @@ udbp_modload(module_t mod, int event, vo return (error); } +static const STRUCT_USB_HOST_ID udbp_devs[] = { + {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_TURBOCONNECT, 0)}, + {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301, 0)}, + {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302, 0)}, + {USB_VPI(USB_VENDOR_ANCHOR, USB_PRODUCT_ANCHOR_EZLINK, 0)}, + {USB_VPI(USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL620USB, 0)}, +}; + static int udbp_probe(device_t dev) { struct usb_attach_arg *uaa = device_get_ivars(dev); - if (uaa-usb_mode != USB_MODE_HOST) { + if (uaa-usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa-info.bConfigIndex != 0) + return (ENXIO); + if (uaa-info.bIfaceIndex != 0) return (ENXIO); - } - /* -* XXX Julian, add the id of the device if you have one to test -* things with. run 'usbdevs -v' and note the 3 ID's that appear. -* The Vendor Id and Product Id are in hex and the Revision Id is in -* bcd. But as usual if the revision is 0x101 then you should -* compare the revision id in the device descriptor with 0x101 Or go -* search the file usbdevs.h. Maybe the device is already in there. -*/ - if (((uaa-info.idVendor == USB_VENDOR_NETCHIP) - (uaa-info.idProduct == USB_PRODUCT_NETCHIP_TURBOCONNECT))) - return (0); - - if (((uaa-info.idVendor == USB_VENDOR_PROLIFIC) - ((uaa-info.idProduct == USB_PRODUCT_PROLIFIC_PL2301) || - (uaa-info.idProduct == USB_PRODUCT_PROLIFIC_PL2302 - return (0); - - if ((uaa-info.idVendor == USB_VENDOR_ANCHOR) - (uaa-info.idProduct == USB_PRODUCT_ANCHOR_EZLINK)) - return (0); - - if ((uaa-info.idVendor == USB_VENDOR_GENESYS) - (uaa-info.idProduct == USB_PRODUCT_GENESYS_GL620USB)) - return (0); - return (ENXIO); + return (usbd_lookup_id_by_uaa(udbp_devs, sizeof(udbp_devs), uaa)); } static int Modified: head/sys/dev/usb/misc/ufm.c == --- head/sys/dev/usb/misc/ufm.c Fri Jun 24 19:24:56 2011(r223514) +++ head/sys/dev/usb/misc/ufm.c Fri Jun 24 19:32:29 2011(r223515) @@ -118,19 +118,23 @@ DRIVER_MODULE(ufm, uhub, ufm_driver, ufm MODULE_DEPEND(ufm, usb, 1, 1, 1); MODULE_VERSION(ufm, 1); +static const STRUCT_USB_HOST_ID ufm_devs[] = { + {USB_VPI(USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_FMRADIO, 0)}, +}; + static int ufm_probe(device_t dev) { struct usb_attach_arg *uaa = device_get_ivars(dev); - if (uaa-usb_mode != USB_MODE_HOST) { + if (uaa-usb_mode != USB_MODE_HOST) return (ENXIO); - } - if ((uaa-info.idVendor == USB_VENDOR_CYPRESS) - (uaa-info.idProduct == USB_PRODUCT_CYPRESS_FMRADIO)) { - return (0); - } - return (ENXIO); + if (uaa-info.bConfigIndex != 0) + return (ENXIO); + if (uaa-info.bIfaceIndex != 0) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(ufm_devs, sizeof(ufm_devs), uaa)); } static int Modified: head/sys/dev/usb/serial/ufoma.c == --- head/sys/dev/usb/serial/ufoma.c Fri Jun 24 19:24:56 2011 (r223514) +++ head/sys/dev/usb/serial/ufoma.c Fri Jun 24 19:32:29 2011 (r223515) @@ -327,6 +327,11 @@ MODULE_DEPEND(ufoma, ucom, 1, 1, 1); MODULE_DEPEND(ufoma, usb, 1, 1, 1); MODULE_VERSION(ufoma, 1); +static const STRUCT_USB_HOST_ID ufoma_devs[] = { + {USB_IFACE_CLASS(UICLASS_CDC), +USB_IFACE_SUBCLASS(UISUBCLASS_MCPC),}, +}; + static int ufoma_probe(device_t dev) { @@ -334,30 +339,31 @@ ufoma_probe(device_t dev) struct usb_interface_descriptor *id; struct usb_config_descriptor *cd; usb_mcpc_acm_descriptor *mad; + int error; - if (uaa-usb_mode != USB_MODE_HOST) { + if (uaa-usb_mode != USB_MODE_HOST) return (ENXIO); - } + + error = usbd_lookup_id_by_uaa(ufoma_devs, sizeof(ufoma_devs), uaa); + if (error) + return (error); + id =
svn commit: r223517 - head/bin/sh
Author: jilles Date: Fri Jun 24 20:23:50 2011 New Revision: 223517 URL: http://svn.freebsd.org/changeset/base/223517 Log: sh(1): Document the case command better. Suggested by: netchild Reviewed by: gjb Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Fri Jun 24 20:15:44 2011(r223516) +++ head/bin/sh/sh.1Fri Jun 24 20:23:50 2011(r223517) @@ -32,7 +32,7 @@ .\from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\ $FreeBSD$ .\ -.Dd June 18, 2011 +.Dd June 24, 2011 .Dt SH 1 .Os .Sh NAME @@ -994,11 +994,22 @@ described later), separated by .Ql \| characters. +Tilde expansion, parameter expansion, command substitution, +arithmetic expansion and quote removal are applied to the word. +Then, each pattern is expanded in turn using tilde expansion, +parameter expansion, command substitution and arithmetic expansion and +the expanded form of the word is checked against it. +If a match is found, the corresponding list is executed. If the selected list is terminated by the control operator .Ql ; instead of .Ql ;; , -execution continues with the next list. +execution continues with the next list, +continuing until a list terminated with +.Ql ;; +or the end of the +.Ic case +command. The exit code of the .Ic case command is the exit code of the last command executed in the list or ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223493 - in head/usr.bin: ktrace ncplogin systat tftp vmstat
On Fri, 24 Jun 2011, Alexander Best wrote: On Fri Jun 24 11, Roman Divacky wrote: On Fri, Jun 24, 2011 at 07:18:44AM +, Kevin Lo wrote: Author: kevlo Date: Fri Jun 24 07:18:44 2011 New Revision: 223493 URL: http://svn.freebsd.org/changeset/base/223493 Log: Remove duplicated header files You may be interested in this tool: http://code.google.com/p/include-what-you-use/ did they add C support since the last time i tested it? back then it only worked with CPP code, iirc. it was possible to thorw it at C code, but it returned pretty useless results. Why not use a FreeBSD utility? There is /usr/src/tools/tools/kerninclude/ kerninclude.sh. This is only for the kernel. No one uses it. I believe it is based on my unusedinc utility which works almost anywhere that make(1) works and has code clean enough to compile with WARNS ~= 6 and doesn't have a convoluted source tree. My utility just copies the source file to the current directory, removes 1 #include line at a time from it, and compiles it before and after with many warning flags; any differences are attributed to the #include line being used. Unfortunately, this gives many false positives and negatives due to namespace pollution and other poor structuring in standard headers. You can remove a primary header like stdio.h which is obviously used, and find that everything still includes because some other header is polluted. The pollution may be an documented feature (like sys/param.h including sys/types.h), in which case it may be correct to depend on it and a style bug to include both headers. The pollution may be an undocumented feature, in which case it may be correct to depend on it after fixing the documentation. But usually, the pollution is an undocumented bug. In all cases, before removing a single header, you must: - determine if pollution is involved. I normally try removing the #include line manually, running make depend, and checking if the file is still included - if pollution is involved, read all the header files and man pages to see if it is intended. kerninclude.sh does a more sophisticated version of this. It does something like copying the entire include hierarchy and replacing each header referred to in an #include line by an empty header, to ensure that the header isn't used by pollution. But would make it too slow to use in a small source tree or one file at a time even if it supported these. unusedinc scribbling in the source directory is sloppy (it does this because using $(mktemp) tends to break paths. This and other problems with paths might be fixable by setting up a full obj tree. I'm not sure if kerninclude.sh does this, but if it does this would be another source of slowness. kerninclude.sh is inconvenient to use on the kernel too. It takes too long, and finds more bugs than you want to know about. AFAIK, google doesn't yet have the AI needed to do this correctly or efficiently. It would have to understand FreeBSD header pollution better than FreeBSD does. Often the correct fix is to fix the pollution in standard headers and not change the application #include's. Often, the correct quick fix is to not change the application #includes and wait for someone to fix the pollution. Example of unusedinc output: % trying /dumpster/home/bde/q/vmstat/vmstat.c % line 75 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include time.h % line 70 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include paths.h % line 69 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include nlist.h % line 66 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include kvm.h % line 60 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include vm/vm_param.h % line 57 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/vmmeter.h % line 56 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/time.h % line 54 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/resource.h % line 51 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/signal.h % line 50 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/malloc.h % line 48 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/uio.h % line 46 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/time.h % line 45 in source /dumpster/home/bde/q/vmstat/vmstat.c seems to be unnecessary: % #include sys/param.h I only investigated 3 of the lines of output: - the 2 #includes of sys/time.h. kevlo removed 1 of these. The wrong one, since sys/time.h is a documented prerequisite for sys/resource.h in at least getrusage(2). sys/time.h was included both before and after sys/resource.h. The former
svn commit: r223518 - head/tools/tools/bus_autoconf
Author: hselasky Date: Fri Jun 24 21:27:33 2011 New Revision: 223518 URL: http://svn.freebsd.org/changeset/base/223518 Log: - We need to sort all USB device ID's together. Else the matching order will be wrong. This is required because devd only executes one entry. MFC after:14 days Modified: head/tools/tools/bus_autoconf/bus_autoconf.c head/tools/tools/bus_autoconf/bus_autoconf.h head/tools/tools/bus_autoconf/bus_autoconf.sh Modified: head/tools/tools/bus_autoconf/bus_autoconf.c == --- head/tools/tools/bus_autoconf/bus_autoconf.cFri Jun 24 20:23:50 2011(r223517) +++ head/tools/tools/bus_autoconf/bus_autoconf.cFri Jun 24 21:27:33 2011(r223518) @@ -43,15 +43,67 @@ static char *type; static char *file_name; -static char *module; static const char *mode; +struct usb_info; +static void usb_dump_sub(struct usb_device_id *, struct usb_info *); + +/* + * To ensure that the correct USB driver is loaded, the driver having + * the most information about the device must be probed first. Then + * more generic drivers shall be probed. + */ static int usb_compare(const void *_a, const void *_b) { const struct usb_device_id *a = _a; const struct usb_device_id *b = _b; + /* vendor matches first */ + + if (a-match_flag_vendor b-match_flag_vendor) + return (-1); + if (a-match_flag_vendor b-match_flag_vendor) + return (1); + + /* product matches first */ + + if (a-match_flag_product b-match_flag_product) + return (-1); + if (a-match_flag_product b-match_flag_product) + return (1); + + /* device class matches first */ + + if (a-match_flag_dev_class b-match_flag_dev_class) + return (-1); + if (a-match_flag_dev_class b-match_flag_dev_class) + return (1); + + if (a-match_flag_dev_subclass b-match_flag_dev_subclass) + return (-1); + if (a-match_flag_dev_subclass b-match_flag_dev_subclass) + return (1); + + /* interface class matches first */ + + if (a-match_flag_int_class b-match_flag_int_class) + return (-1); + if (a-match_flag_int_class b-match_flag_int_class) + return (1); + + if (a-match_flag_int_subclass b-match_flag_int_subclass) + return (-1); + if (a-match_flag_int_subclass b-match_flag_int_subclass) + return (1); + + if (a-match_flag_int_protocol b-match_flag_int_protocol) + return (-1); + if (a-match_flag_int_protocol b-match_flag_int_protocol) + return (1); + + /* then sort according to value */ + if (a-idVendor b-idVendor) return (1); if (a-idVendor b-idVendor) @@ -85,7 +137,9 @@ usb_compare(const void *_a, const void * if (a-bInterfaceProtocol b-bInterfaceProtocol) return (-1); - return (0); + /* in the end sort by module name */ + + return (strcmp(a-module_name, b-module_name)); } static void @@ -105,39 +159,55 @@ static void usb_dump_sub(struct usb_device_id *id, struct usb_info *pinfo) { #if USB_HAVE_COMPAT_LINUX - if (id-match_flags USB_DEVICE_ID_MATCH_VENDOR) - id-match_flag_vendor = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_PRODUCT) - id-match_flag_product = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_DEV_LO) - id-match_flag_dev_lo = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_DEV_HI) - id-match_flag_dev_hi = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_DEV_CLASS) - id-match_flag_dev_class = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_DEV_SUBCLASS) - id-match_flag_dev_subclass = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_DEV_PROTOCOL) - id-match_flag_dev_protocol = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_INT_CLASS) - id-match_flag_int_class = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_INT_SUBCLASS) - id-match_flag_int_subclass = 1; - if (id-match_flags USB_DEVICE_ID_MATCH_INT_PROTOCOL) - id-match_flag_int_protocol = 1; + if (id-match_flags != 0) { + if (id-match_flags USB_DEVICE_ID_MATCH_VENDOR) + id-match_flag_vendor = 1; + if (id-match_flags USB_DEVICE_ID_MATCH_PRODUCT) + id-match_flag_product = 1; + if (id-match_flags USB_DEVICE_ID_MATCH_DEV_LO) + id-match_flag_dev_lo = 1; + if (id-match_flags USB_DEVICE_ID_MATCH_DEV_HI) + id-match_flag_dev_hi = 1; + if (id-match_flags USB_DEVICE_ID_MATCH_DEV_CLASS) + id-match_flag_dev_class = 1; + if
svn commit: r223519 - head/etc/devd
Author: hselasky Date: Fri Jun 24 21:32:03 2011 New Revision: 223519 URL: http://svn.freebsd.org/changeset/base/223519 Log: - Add auto-load devd config file for USB kernel modules. MFC after:14 days Added: head/etc/devd/bus_auto.conf (contents, props changed) Added: head/etc/devd/bus_auto.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/bus_auto.conf Fri Jun 24 21:32:03 2011(r223519) @@ -0,0 +1,2347 @@ +# +# $FreeBSD$ +# +# This file was automatically generated by tools/bus_autoconf.sh. +# Please do not edit! +# + +nomatch 32 { + match bus uhub[0-9]+; + match mode (host|device); + match intclass 0x02; + match intsubclass 0x06; + action kldload if_cdce; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode (host|device); + match intclass 0x02; + match intsubclass 0x0a; + action kldload if_cdce; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode (host|device); + match intclass 0x02; + match intsubclass 0x0d; + action kldload if_cdce; +}; + +# 3 usb_dual entries processed + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x05ac; + match product 0x1290; + match intclass 0xff; + match intsubclass 0xfd; + match intprotocol 0x01; + action kldload if_ipheth; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x05ac; + match product 0x1292; + match intclass 0xff; + match intsubclass 0xfd; + match intprotocol 0x01; + action kldload if_ipheth; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x05ac; + match product 0x1294; + match intclass 0xff; + match intsubclass 0xfd; + match intprotocol 0x01; + action kldload if_ipheth; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x05ac; + match product 0x1297; + match intclass 0xff; + match intsubclass 0xfd; + match intprotocol 0x01; + action kldload if_ipheth; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0104; + match product 0x00be; + action kldload uipaq; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x03e8; + match product 0x0008; + action kldload if_kue; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x03eb; + match product 0x2109; + action kldload uftdi; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x03f0; + match product (0x0121|0x1016|0x1116|0x1216|0x1b1d|0x1e1d|0x2016|0x2116|0x2216|0x3016|0x3116|0x3216|0x3524|0x4016|0x4116|0x4216|0x5016|0x5116|0x5216|0x811c|0xca02); + action kldload ugensa; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0402; + match product 0x5632; + action kldload if_cdce; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0403; + match product (0x6001|0x6004|0x6010|0x6011|0x8372|0x9e90|0xcc48|0xcc49|0xcc4a|0xd678|0xe6c8|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xee18|0xf608|0xf60b|0xf850|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfc08|0xfc09|0xfc0b|0xfc0c|0xfc0d|0xfc82); + action kldload uftdi; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0408; + match product (0x0304|0x1000|0xea02|0xea03|0xea04|0xea05|0xea06); + action kldload if_run; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0409; + match product (0x00d5|0x00d6|0x00d7|0x8024|0x8025); + action kldload uipaq; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0411; + match product (0x0001|0x0005|0x0009|0x0012|0x003d|0x005e|0x0066|0x0067|0x006e|0x008b|0x00b3|0x00d8|0x00d9|0x00da|0x00e8|0x0116|0x0119|0x012e|0x0137|0x0148|0x0150|0x015d|0x016f); + action kldload if_aue; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0413; + match product 0x2101; + action kldload uplcom; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x0423; + match product (0x000a|0x000c); + action kldload if_cue; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x043e; + match product 0x9c01; + action kldload uipaq; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match vendor 0x045a; + match product (0x5001|0x5002); +
svn commit: r223520 - in head/sys: conf dev/pci
Author: jhb Date: Fri Jun 24 21:39:38 2011 New Revision: 223520 URL: http://svn.freebsd.org/changeset/base/223520 Log: Split out host_pcib_get_busno() from the generic PCI-PCI bridge driver to start a new file that will hold utility APIs used by various Host-PCI bridge drivers and drivers that provide PCI domains. Added: head/sys/dev/pci/pci_subr.c - copied, changed from r223482, head/sys/dev/pci/pci_pci.c Modified: head/sys/conf/files head/sys/dev/pci/pci_pci.c Modified: head/sys/conf/files == --- head/sys/conf/files Fri Jun 24 21:32:03 2011(r223519) +++ head/sys/conf/files Fri Jun 24 21:39:38 2011(r223520) @@ -1552,6 +1552,7 @@ dev/pci/isa_pci.c optional pci isa dev/pci/pci.c optional pci dev/pci/pci_if.m standard dev/pci/pci_pci.c optional pci +dev/pci/pci_subr.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pci/vga_pci.c optional pci Modified: head/sys/dev/pci/pci_pci.c == --- head/sys/dev/pci/pci_pci.c Fri Jun 24 21:32:03 2011(r223519) +++ head/sys/dev/pci/pci_pci.c Fri Jun 24 21:39:38 2011(r223520) @@ -38,16 +38,12 @@ __FBSDID($FreeBSD$); #include sys/param.h #include sys/bus.h #include sys/kernel.h -#include sys/libkern.h #include sys/malloc.h #include sys/module.h #include sys/rman.h #include sys/sysctl.h #include sys/systm.h -#include machine/bus.h -#include machine/resource.h - #include dev/pci/pcivar.h #include dev/pci/pcireg.h #include dev/pci/pci_private.h @@ -1432,91 +1428,3 @@ pcib_power_for_sleep(device_t pcib, devi bus = device_get_parent(pcib); return (PCIB_POWER_FOR_SLEEP(bus, dev, pstate)); } - -/* - * Try to read the bus number of a host-PCI bridge using appropriate config - * registers. - */ -int -host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func, -uint8_t *busnum) -{ - uint32_t id; - - id = read_config(bus, slot, func, PCIR_DEVVENDOR, 4); - if (id == 0x) - return (0); - - switch (id) { - case 0x12258086: - /* Intel 824?? */ - /* XXX This is a guess */ - /* *busnum = read_config(bus, slot, func, 0x41, 1); */ - *busnum = bus; - break; - case 0x84c48086: - /* Intel 82454KX/GX (Orion) */ - *busnum = read_config(bus, slot, func, 0x4a, 1); - break; - case 0x84ca8086: - /* -* For the 450nx chipset, there is a whole bundle of -* things pretending to be host bridges. The MIOC will -* be seen first and isn't really a pci bridge (the -* actual busses are attached to the PXB's). We need to -* read the registers of the MIOC to figure out the -* bus numbers for the PXB channels. -* -* Since the MIOC doesn't have a pci bus attached, we -* pretend it wasn't there. -*/ - return (0); - case 0x84cb8086: - switch (slot) { - case 0x12: - /* Intel 82454NX PXB#0, Bus#A */ - *busnum = read_config(bus, 0x10, func, 0xd0, 1); - break; - case 0x13: - /* Intel 82454NX PXB#0, Bus#B */ - *busnum = read_config(bus, 0x10, func, 0xd1, 1) + 1; - break; - case 0x14: - /* Intel 82454NX PXB#1, Bus#A */ - *busnum = read_config(bus, 0x10, func, 0xd3, 1); - break; - case 0x15: - /* Intel 82454NX PXB#1, Bus#B */ - *busnum = read_config(bus, 0x10, func, 0xd4, 1) + 1; - break; - } - break; - - /* ServerWorks -- vendor 0x1166 */ - case 0x00051166: - case 0x00061166: - case 0x00081166: - case 0x00091166: - case 0x00101166: - case 0x0066: - case 0x00171166: - case 0x01011166: - case 0x010f1014: - case 0x01101166: - case 0x02011166: - case 0x02251166: - case 0x03021014: - *busnum = read_config(bus, slot, func, 0x44, 1); - break; - - /* Compaq/HP -- vendor 0x0e11 */ - case 0x60100e11: - *busnum = read_config(bus, slot, func, 0xc8, 1); - break; - default: - /* Don't know how to read bus number. */ - return 0; - } - - return 1; -} Copied and modified: head/sys/dev/pci/pci_subr.c (from r223482,
svn commit: r223521 - in head: etc/devd sys/dev/usb/input
Author: hselasky Date: Fri Jun 24 22:01:56 2011 New Revision: 223521 URL: http://svn.freebsd.org/changeset/base/223521 Log: - Export more USB device ID's. - Update bus_auto.conf accordingly. MFC after:3 days Modified: head/etc/devd/bus_auto.conf head/sys/dev/usb/input/uep.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c Modified: head/etc/devd/bus_auto.conf == --- head/etc/devd/bus_auto.conf Fri Jun 24 21:39:38 2011(r223520) +++ head/etc/devd/bus_auto.conf Fri Jun 24 22:01:56 2011(r223521) @@ -86,6 +86,14 @@ nomatch 32 { nomatch 32 { match bus uhub[0-9]+; match mode host; + match vendor 0x0123; + match product 0x0001; + action kldload uep; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; match vendor 0x03e8; match product 0x0008; action kldload if_kue; @@ -1254,6 +1262,14 @@ nomatch 32 { nomatch 32 { match bus uhub[0-9]+; match mode host; + match vendor 0x0eef; + match product (0x0001|0x0002); + action kldload uep; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; match vendor 0x0f3d; match product (0x0112|0x0112); action kldload u3g; @@ -2263,6 +2279,24 @@ nomatch 32 { nomatch 32 { match bus uhub[0-9]+; match mode host; + match intclass 0x03; + match intsubclass 0x01; + match intprotocol 0x01; + action kldload ukbd; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; + match intclass 0x03; + match intsubclass 0x01; + match intprotocol 0x02; + action kldload ums; +}; + +nomatch 32 { + match bus uhub[0-9]+; + match mode host; match intclass 0x07; match intsubclass 0x01; match intprotocol 0x01; @@ -2343,5 +2377,5 @@ nomatch 32 { action kldload umass; }; -# 1626 usb_host entries processed +# 1631 usb_host entries processed Modified: head/sys/dev/usb/input/uep.c == --- head/sys/dev/usb/input/uep.cFri Jun 24 21:39:38 2011 (r223520) +++ head/sys/dev/usb/input/uep.cFri Jun 24 22:01:56 2011 (r223521) @@ -288,6 +288,12 @@ static const struct usb_config uep_confi }, }; +static const STRUCT_USB_HOST_ID uep_devs[] = { + {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL, 0)}, + {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL2, 0)}, + {USB_VPI(USB_VENDOR_EGALAX2, USB_PRODUCT_EGALAX2_TPANEL, 0)}, +}; + static int uep_probe(device_t dev) { @@ -295,17 +301,12 @@ uep_probe(device_t dev) if (uaa-usb_mode != USB_MODE_HOST) return (ENXIO); + if (uaa-info.bConfigIndex != 0) + return (ENXIO); + if (uaa-info.bIfaceIndex != 0) + return (ENXIO); - if ((uaa-info.idVendor == USB_VENDOR_EGALAX) - ((uaa-info.idProduct == USB_PRODUCT_EGALAX_TPANEL) || - (uaa-info.idProduct == USB_PRODUCT_EGALAX_TPANEL2))) - return (BUS_PROBE_SPECIFIC); - - if ((uaa-info.idVendor == USB_VENDOR_EGALAX2) - (uaa-info.idProduct == USB_PRODUCT_EGALAX2_TPANEL)) - return (BUS_PROBE_SPECIFIC); - - return (ENXIO); + return (usbd_lookup_id_by_uaa(uep_devs, sizeof(uep_devs), uaa)); } static int Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Fri Jun 24 21:39:38 2011 (r223520) +++ head/sys/dev/usb/input/ukbd.c Fri Jun 24 22:01:56 2011 (r223521) @@ -745,6 +745,13 @@ static const struct usb_config ukbd_conf }, }; +/* A match on these entries will load ukbd */ +static const STRUCT_USB_HOST_ID __used ukbd_devs[] = { + {USB_IFACE_CLASS(UICLASS_HID), +USB_IFACE_SUBCLASS(UISUBCLASS_BOOT), +USB_IFACE_PROTOCOL(UIPROTO_BOOT_KEYBOARD),}, +}; + static int ukbd_probe(device_t dev) { Modified: head/sys/dev/usb/input/ums.c == --- head/sys/dev/usb/input/ums.cFri Jun 24 21:39:38 2011 (r223520) +++ head/sys/dev/usb/input/ums.cFri Jun 24 22:01:56 2011 (r223521) @@ -355,6 +355,13 @@ static const struct usb_config ums_confi }, }; +/* A match on these entries will load ums */ +static const STRUCT_USB_HOST_ID __used ums_devs[] = { + {USB_IFACE_CLASS(UICLASS_HID), +USB_IFACE_SUBCLASS(UISUBCLASS_BOOT), +USB_IFACE_PROTOCOL(UIPROTO_MOUSE),}, +}; + static int ums_probe(device_t dev) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to
svn commit: r223522 - head/bin/sh
Author: jilles Date: Fri Jun 24 22:08:26 2011 New Revision: 223522 URL: http://svn.freebsd.org/changeset/base/223522 Log: sh(1): Improve documentation of shell patterns: * Shell patterns are also for ${var#pat} and the like. * An '!' by itself will not trigger pathname generation so do not call it a meta-character, even though it has a special meaning directly after an '['. * Character ranges are locale-dependent. * A '^' will complement a character class like '!' but is non-standard. MFC after:1 week Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Fri Jun 24 22:01:56 2011(r223521) +++ head/bin/sh/sh.1Fri Jun 24 22:08:26 2011(r223522) @@ -1629,15 +1629,15 @@ There are two restrictions on this: firs a string containing a slash, and second, a pattern cannot match a string starting with a period unless the first character of the pattern is a period. -The next section describes the patterns used for both -Pathname Expansion and the +The next section describes the patterns used for +Pathname Expansion, +the four varieties of parameter expansion for substring processing and the .Ic case command. .Ss Shell Patterns A pattern consists of normal characters, which match themselves, and meta-characters. The meta-characters are -.Ql \! , .Ql * , .Ql \? , and @@ -1667,7 +1667,7 @@ matches a .Ql \[ rather than introducing a character class. A character class matches any of the characters between the square brackets. -A range of characters may be specified using a minus sign. +A locale-dependent range of characters may be specified using a minus sign. A named class of characters (see .Xr wctype 3 ) may be specified by surrounding the name with @@ -1680,12 +1680,17 @@ is a shell pattern that matches a single The character class may be complemented by making an exclamation point .Pq Ql !\ the first character of the character class. +A caret +.Pq Ql ^ +has the same effect but is non-standard. .Pp To include a .Ql \] in a character class, make it the first character listed (after the -.Ql \! , +.Ql \! +or +.Ql ^ , if any). To include a .Ql - , ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r223518 - head/tools/tools/bus_autoconf
On Friday 24 June 2011 23:27:33 Hans Petter Selasky wrote: Author: hselasky Date: Fri Jun 24 21:27:33 2011 New Revision: 223518 URL: http://svn.freebsd.org/changeset/base/223518 Log: - We need to sort all USB device ID's together. Else the matching order will be wrong. This is required because devd only executes one entry. MFC after: 14 days Modified: head/tools/tools/bus_autoconf/bus_autoconf.c head/tools/tools/bus_autoconf/bus_autoconf.h head/tools/tools/bus_autoconf/bus_autoconf.sh NOTE: This tool only works correctly when the tool and kernel is built on a 64-bit host. This is due to a long in one of the structures. This will be fixed tomorrow. --HPS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223523 - head/sys/arm/conf
Author: cognet Date: Fri Jun 24 23:26:45 2011 New Revision: 223523 URL: http://svn.freebsd.org/changeset/base/223523 Log: Comment out AH_DEBUG, to get this kernel to compile, until AH_DEBUG is fixed. Modified: head/sys/arm/conf/CAMBRIA Modified: head/sys/arm/conf/CAMBRIA == --- head/sys/arm/conf/CAMBRIA Fri Jun 24 22:08:26 2011(r223522) +++ head/sys/arm/conf/CAMBRIA Fri Jun 24 23:26:45 2011(r223523) @@ -130,7 +130,7 @@ options ATH_DIAGAPI #options ATH_TX99_DIAG device ath_rate_sample # SampleRate tx rate control for ath -optionsAH_DEBUG +#options AH_DEBUG #options AH_ASSERT optionsAH_PRIVATE_DIAG #deviceath_ar5210 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223524 - head/sys/dev/ath/ath_hal
Author: adrian Date: Fri Jun 24 23:59:14 2011 New Revision: 223524 URL: http://svn.freebsd.org/changeset/base/223524 Log: Small fix to bring the non-debug definitions of HALDEBUG/HALDEBUG_G in line with the debug definitions. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Fri Jun 24 23:26:45 2011 (r223523) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Jun 24 23:59:14 2011 (r223524) @@ -528,8 +528,8 @@ extern int ath_hal_debug; /* Global debu extern void DO_HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...) __printflike(3,4); #else -#define HALDEBUG(_ah, __m, _fmt, ...) -#define HALDEBUG_G(_ah, __m, _fmt, ...) +#define HALDEBUG(_ah, __m, ...) +#define HALDEBUG_G(_ah, __m, ...) #endif /* AH_DEBUG */ /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223525 - head/sys/dev/ath
Author: adrian Date: Sat Jun 25 00:34:40 2011 New Revision: 223525 URL: http://svn.freebsd.org/changeset/base/223525 Log: Commit missing piece from a couple days ago - re-add ath_hal_debug. Modified: head/sys/dev/ath/ah_osdep.c Modified: head/sys/dev/ath/ah_osdep.c == --- head/sys/dev/ath/ah_osdep.c Fri Jun 24 23:59:14 2011(r223524) +++ head/sys/dev/ath/ah_osdep.c Sat Jun 25 00:34:40 2011(r223525) @@ -76,6 +76,14 @@ extern void DO_HALDEBUG(struct ath_hal * /* NB: put this here instead of the driver to avoid circular references */ SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, Atheros driver parameters); +SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, Atheros HAL parameters); + +#ifdef AH_DEBUG +int ath_hal_debug = 0; +SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, CTLFLAG_RW, ath_hal_debug, +0, Atheros HAL debugging printfs); +TUNABLE_INT(hw.ath.hal.debug, ath_hal_debug); +#endif /* AH_DEBUG */ MALLOC_DEFINE(M_ATH_HAL, ath_hal, ath hal data); @@ -147,8 +155,6 @@ DO_HALDEBUG(struct ath_hal *ah, u_int ma #include sys/pcpu.h #include dev/ath/ath_hal/ah_decode.h -SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, Atheros HAL parameters); - static struct alq *ath_hal_alq; static int ath_hal_alq_emitdev;/* need to emit DEVICE record */ static u_int ath_hal_alq_lost; /* count of lost records */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223526 - in head/sys: conf ia64/ia64 ia64/include
Author: marcel Date: Sat Jun 25 02:15:14 2011 New Revision: 223526 URL: http://svn.freebsd.org/changeset/base/223526 Log: Switch to the event timers infrastructure. This includes: o Setting td_intr_frame to the XIVs trap frame because it's referenced by the ET event handler. o Signal EOI to the CPU before calling the registered XIV handlers. This prevents lost ITC interrupts, which cause starvation in one-shot mode. o Adding support for IPI_HARDCLOCK with corresponding per-CPU counters. o Have the APs call cpu_initclocks() so as to limited the scattering of clock related initialization. cpu_initclocks() calls the self_bsp() or self_ap() version accordingly. o Uncomment the ET clock handling in cpu_idle(). o Update the DDB 'show pcpu' output for the new MD fields. o Entirely rewritten ia64_ih_clock(). Note that we don't create as many clock XIVs as we have CPUs, as is done on PowerPC. It doesn't scale. We can only have 240 XIVs and we can have more CPUs than that. There's a single intrcnt index for the cumulative clock ticks and we keep per CPU counts in the PCPU stats structure. o Register the ITC by hooking SI_SUB_CONFIGURE (2nd order). Open issues: o Clock interrupts can still be lost. Some tweaking is still necessary. Thanks to: mav@ for his support, feedback and explanations. ET stats while committing: eris% sysctl machdep.cpu | grep nclks machdep.cpu.0.nclks: 24007 machdep.cpu.1.nclks: 22895 machdep.cpu.2.nclks: 13523 machdep.cpu.3.nclks: 9342 machdep.cpu.4.nclks: 9103 machdep.cpu.5.nclks: 9298 machdep.cpu.6.nclks: 10039 machdep.cpu.7.nclks: 9479 eris% vmstat -i | grep clock clock 108599 50 Modified: head/sys/conf/files.ia64 head/sys/ia64/ia64/clock.c head/sys/ia64/ia64/db_machdep.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/include/pcpu.h head/sys/ia64/include/smp.h Modified: head/sys/conf/files.ia64 == --- head/sys/conf/files.ia64Sat Jun 25 00:34:40 2011(r223525) +++ head/sys/conf/files.ia64Sat Jun 25 02:15:14 2011(r223526) @@ -120,6 +120,7 @@ ia64/pci/pci_cfgreg.c optionalpci isa/syscons_isa.c optionalsc isa/vga_isa.c optionalvga kern/imgact_elf32.coptionalcompat_freebsd32 +kern/kern_clocksource.cstandard libkern/bcmp.c standard libkern/ffsl.c standard libkern/fls.c standard Modified: head/sys/ia64/ia64/clock.c == --- head/sys/ia64/ia64/clock.c Sat Jun 25 00:34:40 2011(r223525) +++ head/sys/ia64/ia64/clock.c Sat Jun 25 02:15:14 2011(r223526) @@ -32,9 +32,11 @@ __FBSDID($FreeBSD$); #include sys/bus.h #include sys/interrupt.h #include sys/priority.h +#include sys/proc.h #include sys/queue.h #include sys/sysctl.h #include sys/systm.h +#include sys/timeet.h #include sys/timetc.h #include sys/pcpu.h @@ -45,26 +47,12 @@ __FBSDID($FreeBSD$); #include machine/md_var.h #include machine/smp.h -SYSCTL_NODE(_debug, OID_AUTO, clock, CTLFLAG_RW, 0, clock statistics); - -static int adjust_edges = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_edges, CTLFLAG_RD, -adjust_edges, 0, Number of times ITC got more than 12.5% behind); - -static int adjust_excess = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_excess, CTLFLAG_RD, -adjust_excess, 0, Total number of ignored ITC interrupts); - -static int adjust_lost = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_lost, CTLFLAG_RD, -adjust_lost, 0, Total number of lost ITC interrupts); - -static int adjust_ticks = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_ticks, CTLFLAG_RD, -adjust_ticks, 0, Total number of ITC interrupts with adjustment); +#defineCLOCK_ET_OFF0 +#defineCLOCK_ET_PERIODIC 1 +#defineCLOCK_ET_ONESHOT2 +static struct eventtimer ia64_clock_et; static u_int ia64_clock_xiv; -static uint64_t ia64_clock_reload; #ifndef SMP static timecounter_get_t ia64_get_timecount; @@ -87,75 +75,100 @@ ia64_get_timecount(struct timecounter* t static u_int ia64_ih_clock(struct thread *td, u_int xiv, struct trapframe *tf) { - uint64_t adj, clk, itc; - int64_t delta; - int count; + struct eventtimer *et; + uint64_t itc, load; + uint32_t mode; PCPU_INC(md.stats.pcs_nclks); + intrcnt[INTRCNT_CLOCK]++; - if (PCPU_GET(cpuid) == 0) { - /* -* Clock processing on the BSP. -*/ - intrcnt[INTRCNT_CLOCK]++; - - itc = ia64_get_itc(); - - adj = PCPU_GET(md.clockadj); -
svn commit: r223527 - head/sys/dev/acpica
Author: marcel Date: Sat Jun 25 02:49:47 2011 New Revision: 223527 URL: http://svn.freebsd.org/changeset/base/223527 Log: Now that ia64 has been switched to the event timers, remove the conditional compilation work-arounds. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Sat Jun 25 02:15:14 2011 (r223526) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jun 25 02:49:47 2011 (r223527) @@ -856,10 +856,8 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * sbuf_printf(sb, C%d/%d , i + 1, sc-cpu_cx_states[i].trans_lat); if (sc-cpu_cx_states[i].type ACPI_STATE_C3) sc-cpu_non_c3 = i; -#ifndef __ia64__ else cpu_can_deep_sleep = 1; -#endif } sbuf_trim(sb); sbuf_finish(sb); @@ -929,11 +927,9 @@ acpi_cpu_idle() /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; -#ifndef __ia64__ if (cpu_disable_deep_sleep) i = min(sc-cpu_cx_lowest, sc-cpu_non_c3); else -#endif i = sc-cpu_cx_lowest; for (; i = 0; i--) { if (sc-cpu_cx_states[i].trans_lat * 3 = sc-cpu_prev_sleep) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223528 - head/sys/ia64/ia64
Author: marcel Date: Sat Jun 25 03:37:40 2011 New Revision: 223528 URL: http://svn.freebsd.org/changeset/base/223528 Log: Update copyright. Modified: head/sys/ia64/ia64/clock.c Modified: head/sys/ia64/ia64/clock.c == --- head/sys/ia64/ia64/clock.c Sat Jun 25 02:49:47 2011(r223527) +++ head/sys/ia64/ia64/clock.c Sat Jun 25 03:37:40 2011(r223528) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 Marcel Moolenaar + * Copyright (c) 2005, 2009-2011 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r223529 - head/sys/ia64/ia64
Author: marcel Date: Sat Jun 25 03:43:58 2011 New Revision: 223529 URL: http://svn.freebsd.org/changeset/base/223529 Log: Replace the original copyright notice with my own. Everything in this file is written by me and has no bearing on the initial or original version. Modified: head/sys/ia64/ia64/interrupt.c Modified: head/sys/ia64/ia64/interrupt.c == --- head/sys/ia64/ia64/interrupt.c Sat Jun 25 03:37:40 2011 (r223528) +++ head/sys/ia64/ia64/interrupt.c Sat Jun 25 03:43:58 2011 (r223529) @@ -1,41 +1,33 @@ -/* $FreeBSD$ */ -/* $NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $ */ - /*- - * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. + * Copyright (c) 2010-2011 Marcel Moolenaar * All rights reserved. * - * Authors: Keith Bostic, Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS AS IS - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or software.distribut...@cs.cmu.edu - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ -/*- - * Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center. - * Redistribute and modify at will, leaving only this additional copyright - * notice. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include opt_ddb.h -#include sys/cdefs.h /* RCS ID Copyright macro defns */ +#include sys/cdefs.h +__FBSDID($FreeBSD$); #include sys/param.h #include sys/systm.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org