From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 02:57:41 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941A21065670; Sun, 14 Dec 2008 02:57:41 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80EDB8FC1B; Sun, 14 Dec 2008 02:57:41 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBE2vfdv047247; Sun, 14 Dec 2008 02:57:41 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBE2vfVr047246; Sun, 14 Dec 2008 02:57:41 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200812140257.mBE2vfVr047246@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 14 Dec 2008 02:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186073 - head/sys/boot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 02:57:41 -0000 Author: nyan Date: Sun Dec 14 02:57:41 2008 New Revision: 186073 URL: http://svn.freebsd.org/changeset/base/186073 Log: Disconnect the efi from pc98. It's not needed. Modified: head/sys/boot/Makefile Modified: head/sys/boot/Makefile ============================================================================== --- head/sys/boot/Makefile Sun Dec 14 02:51:17 2008 (r186072) +++ head/sys/boot/Makefile Sun Dec 14 02:57:41 2008 (r186073) @@ -12,7 +12,7 @@ SUBDIR+= ficl .endif # Build EFI library. -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || ${MACHINE_ARCH} == "ia64" SUBDIR+= efi .endif From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 06:40:05 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23AF51065670; Sun, 14 Dec 2008 06:40:05 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1280C8FC08; Sun, 14 Dec 2008 06:40:05 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBE6e55l051610; Sun, 14 Dec 2008 06:40:05 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBE6e4kA051604; Sun, 14 Dec 2008 06:40:04 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812140640.mBE6e4kA051604@svn.freebsd.org> From: Ken Smith Date: Sun, 14 Dec 2008 06:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186075 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 06:40:05 -0000 Author: kensmith Date: Sun Dec 14 06:40:04 2008 New Revision: 186075 URL: http://svn.freebsd.org/changeset/base/186075 Log: Clean out the remaining alpha-isms. Modified: head/usr.sbin/sysinstall/cdrom.c head/usr.sbin/sysinstall/label.c head/usr.sbin/sysinstall/main.c head/usr.sbin/sysinstall/sysinstall.8 head/usr.sbin/sysinstall/sysinstall.h head/usr.sbin/sysinstall/system.c Modified: head/usr.sbin/sysinstall/cdrom.c ============================================================================== --- head/usr.sbin/sysinstall/cdrom.c Sun Dec 14 02:59:07 2008 (r186074) +++ head/usr.sbin/sysinstall/cdrom.c Sun Dec 14 06:40:04 2008 (r186075) @@ -164,9 +164,7 @@ mediaInitCDROM(Device *dev) } if ((cp = property_find(cd_attr, "CD_MACHINE_ARCH")) != NULL) { if (strcmp(cp, "any") && -#ifdef __alpha__ - strcmp(cp, "alpha")) { -#elif defined(PC98) +#if defined(PC98) strcmp(cp, "pc98")) { #elif defined(__sparc64__) strcmp(cp, "sparc64")) { Modified: head/usr.sbin/sysinstall/label.c ============================================================================== --- head/usr.sbin/sysinstall/label.c Sun Dec 14 02:59:07 2008 (r186074) +++ head/usr.sbin/sysinstall/label.c Sun Dec 14 06:40:04 2008 (r186075) @@ -61,7 +61,7 @@ /* * Minimum partition sizes */ -#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) || defined(__amd64__) +#if defined(__ia64__) || defined(__sparc64__) || defined(__amd64__) #define ROOT_MIN_SIZE 128 #else #define ROOT_MIN_SIZE 118 @@ -1094,27 +1094,6 @@ diskLabel(Device *dev) break; } -#ifdef __alpha__ - /* - * SRM requires that the root partition is at the - * begining of the disk and cannot boot otherwise. - * Warn Alpha users if they are about to shoot themselves in - * the foot in this way. - * - * Since partitions may not start precisely at offset 0 we - * check for a "close to 0" instead. :-( - */ - if ((flags & CHUNK_IS_ROOT) && (tmp->offset > 1024)) { - msgConfirm("Your root partition `a' does not seem to be the first\n" - "partition. The Alpha's firmware can only boot from the\n" - "first partition. So it is unlikely that your current\n" - "disk layout will be bootable boot after installation.\n" - "\n" - "Please allocate the root partition before allocating\n" - "any others.\n"); - } -#endif /* alpha */ - tmp->private_data = p; tmp->private_free = safe_free; if (variable_cmp(DISK_LABELLED, "written")) Modified: head/usr.sbin/sysinstall/main.c ============================================================================== --- head/usr.sbin/sysinstall/main.c Sun Dec 14 02:59:07 2008 (r186074) +++ head/usr.sbin/sysinstall/main.c Sun Dec 14 06:40:04 2008 (r186075) @@ -198,7 +198,7 @@ main(int argc, char **argv) choice = scroll = curr = max = 0; dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE); if (getpid() != 1 -#if defined(__alpha__) || defined(__sparc64__) +#if defined(__sparc64__) || !msgNoYes("Are you sure you wish to exit? The system will halt.") #else || !msgNoYes("Are you sure you wish to exit? The system will reboot\n" Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Sun Dec 14 02:59:07 2008 (r186074) +++ head/usr.sbin/sysinstall/sysinstall.8 Sun Dec 14 06:40:04 2008 (r186075) @@ -878,9 +878,9 @@ This property is normally only used with .Fx products that contain CDs for different architectures, to provide better error messages if -users try to install Alpha packages on an i386 machine. +users try to install packages built for the wrong architecture. For example, -.Dq Li "CD_MACHINE_ARCH = alpha" . +.Dq Li "CD_MACHINE_ARCH = amd64" . .It Va CD_VOLUME In a multi-volume collection (such as the .Fx Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Sun Dec 14 02:59:07 2008 (r186074) +++ head/usr.sbin/sysinstall/sysinstall.h Sun Dec 14 06:40:04 2008 (r186075) @@ -52,7 +52,7 @@ /*** Defines ***/ -#if defined(__i386__) || defined(__alpha__) || defined(__amd64__) +#if defined(__i386__) || defined(__amd64__) #define WITH_SYSCONS #define WITH_MICE #endif Modified: head/usr.sbin/sysinstall/system.c ============================================================================== --- head/usr.sbin/sysinstall/system.c Sun Dec 14 02:59:07 2008 (r186074) +++ head/usr.sbin/sysinstall/system.c Sun Dec 14 06:40:04 2008 (r186075) @@ -190,10 +190,6 @@ systemInitialize(int argc, char **argv) setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1); setbuf(stdin, 0); setbuf(stderr, 0); -#ifdef __alpha__ - i = 0; - sysctlbyname("machdep.unaligned_print", NULL, 0, &i, sizeof(i)); -#endif #if 0 signal(SIGCHLD, reap_children); #endif @@ -261,7 +257,7 @@ systemShutdown(int status) if (RunningAsInit) { /* Put the console back */ ioctl(0, VT_ACTIVATE, 2); -#if defined(__alpha__) || defined(__sparc64__) +#if defined(__sparc64__) reboot(RB_HALT); #else reboot(RB_AUTOBOOT); From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 09:06:28 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D771065670; Sun, 14 Dec 2008 09:06:28 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C73AF8FC12; Sun, 14 Dec 2008 09:06:28 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBE96Sww054273; Sun, 14 Dec 2008 09:06:28 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBE96SEZ054272; Sun, 14 Dec 2008 09:06:28 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812140906.mBE96SEZ054272@svn.freebsd.org> From: Joseph Koshy Date: Sun, 14 Dec 2008 09:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186076 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 09:06:28 -0000 Author: jkoshy Date: Sun Dec 14 09:06:28 2008 New Revision: 186076 URL: http://svn.freebsd.org/changeset/base/186076 Log: Bug fix: %ebx needs to be preserved in the user callchain capture path. Modified: head/sys/amd64/amd64/exception.S Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Sun Dec 14 06:40:04 2008 (r186075) +++ head/sys/amd64/amd64/exception.S Sun Dec 14 09:06:28 2008 (r186076) @@ -459,9 +459,9 @@ nmi_calltrap: */ movq %rsp,%rsi /* source stack pointer */ movq $TF_SIZE,%rcx - movq PCPU(RSP0),%rbx - subq %rcx,%rbx - movq %rbx,%rdi /* destination stack pointer */ + movq PCPU(RSP0),%rdx + subq %rcx,%rdx + movq %rdx,%rdi /* destination stack pointer */ shrq $3,%rcx /* trap frame size in long words */ cld @@ -470,7 +470,7 @@ nmi_calltrap: movl %ss,%eax pushq %rax /* tf_ss */ - pushq %rbx /* tf_rsp (on kernel stack) */ + pushq %rdx /* tf_rsp (on kernel stack) */ pushfq /* tf_rflags */ movl %cs,%eax pushq %rax /* tf_cs */ From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 09:08:10 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A41A8106564A; Sun, 14 Dec 2008 09:08:10 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 636A08FC1A; Sun, 14 Dec 2008 09:08:10 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2237508rvf.43 for ; Sun, 14 Dec 2008 01:08:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=IIg5u38gBtlXLSbDqOs0Bqi2bTkurSu7sNJHUS2P6ZI=; b=A+ZHjMzFZbmVH/AMif+Cdh88hAanIGNdN14b/wzOQckb/DceUYpZflzaFXmds+/QDo l0l9buB9Yd5k4ebwWEIG4LHeGTgfdYJfl1X/KPscrMdehlZoVKP41J9I+GIsTZLtiroi pCLBRvSISexhCJv626A2HsQ6lX1GurnKfFOhw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=jLnX6TXjN2H5Ci9MDQ4jug3PnS8IBz52YDICPub+BNka8jhLZqH/13TmxfrjRutjr3 nHio2erhVbTmyzk8TQFQ7EPjXwr4GEskH5BzOC8kHneZHgULF7xToxteNDPlJg3JrY+9 7EIVD2ZEgQwV++SBsXE8Uo9Og5bY/N4Gm3vdA= Received: by 10.140.188.10 with SMTP id l10mr2980094rvf.94.1229245690197; Sun, 14 Dec 2008 01:08:10 -0800 (PST) Received: by 10.140.158.13 with HTTP; Sun, 14 Dec 2008 01:08:10 -0800 (PST) Message-ID: <7d6fde3d0812140108l4b0c75e1o229c667c0b86dd7e@mail.gmail.com> Date: Sun, 14 Dec 2008 01:08:10 -0800 From: "Garrett Cooper" To: "Joseph Koshy" In-Reply-To: <200812140906.mBE96SEZ054272@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812140906.mBE96SEZ054272@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186076 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 09:08:10 -0000 On Sun, Dec 14, 2008 at 1:06 AM, Joseph Koshy wrote: > Author: jkoshy > Date: Sun Dec 14 09:06:28 2008 > New Revision: 186076 > URL: http://svn.freebsd.org/changeset/base/186076 > > Log: > Bug fix: %ebx needs to be preserved in the user callchain capture > path. > > Modified: > head/sys/amd64/amd64/exception.S > > Modified: head/sys/amd64/amd64/exception.S > ============================================================================== > --- head/sys/amd64/amd64/exception.S Sun Dec 14 06:40:04 2008 (r186075) > +++ head/sys/amd64/amd64/exception.S Sun Dec 14 09:06:28 2008 (r186076) > @@ -459,9 +459,9 @@ nmi_calltrap: > */ > movq %rsp,%rsi /* source stack pointer */ > movq $TF_SIZE,%rcx > - movq PCPU(RSP0),%rbx > - subq %rcx,%rbx > - movq %rbx,%rdi /* destination stack pointer */ > + movq PCPU(RSP0),%rdx > + subq %rcx,%rdx > + movq %rdx,%rdi /* destination stack pointer */ > > shrq $3,%rcx /* trap frame size in long words */ > cld > @@ -470,7 +470,7 @@ nmi_calltrap: > > movl %ss,%eax > pushq %rax /* tf_ss */ > - pushq %rbx /* tf_rsp (on kernel stack) */ > + pushq %rdx /* tf_rsp (on kernel stack) */ > pushfq /* tf_rflags */ > movl %cs,%eax > pushq %rax /* tf_cs */ Stupid question -- where's the change? All I see are potentially whitespace modifications.. -Garrett From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 09:32:34 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FF621065670; Sun, 14 Dec 2008 09:32:34 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1DB268FC08; Sun, 14 Dec 2008 09:32:33 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2241747rvf.43 for ; Sun, 14 Dec 2008 01:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=BXyVz2p5yWurasHVY0pZi8hhlyKXtCaIxRD/SZeYiNE=; b=AI1kLsATa5mfoKG5XTar/aquFDxF3hHuaU3N+pNC27ZWU24IS2eJ7OOF2P2LF4XL1E 1DNoDKU3eqs9wO0NzQACby9HFAZSMpG7tRcpD9hyL1poraiuNJPP66o2MydtaDBhYHcu N7YhtXa8MOv65jSpioRXEqATVjgHLsgykwOvk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=G8amJe4C+rnFFxCUUPvEnsHkZPoYWA1DG/HOr3xiTOR68nLlR/BUHNzqLJw7wWnlvp JIiUyBXynTJaQ2hHM2u4uY1mbnEA9RBI/Q+W6+jJEt4bd0vBU0OHgzJ/q9rvUklp7OO2 PjtKMNPiUGTNzPXqtwRjKCY8xNyt5mE2RvSs8= Received: by 10.141.177.10 with SMTP id e10mr2980210rvp.137.1229247153752; Sun, 14 Dec 2008 01:32:33 -0800 (PST) Received: by 10.140.158.13 with HTTP; Sun, 14 Dec 2008 01:32:33 -0800 (PST) Message-ID: <7d6fde3d0812140132u54d9785chb81f96aa3e10d204@mail.gmail.com> Date: Sun, 14 Dec 2008 01:32:33 -0800 From: "Garrett Cooper" To: "Niclas Zeising" In-Reply-To: <4944D17E.9080900@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812140906.mBE96SEZ054272@svn.freebsd.org> <7d6fde3d0812140108l4b0c75e1o229c667c0b86dd7e@mail.gmail.com> <4944D17E.9080900@gmail.com> Cc: svn-src-head@freebsd.org, Joseph Koshy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186076 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 09:32:34 -0000 On Sun, Dec 14, 2008 at 1:27 AM, Niclas Zeising wrote: > Garrett Cooper wrote: >> >> On Sun, Dec 14, 2008 at 1:06 AM, Joseph Koshy wrote: >>> >>> Author: jkoshy >>> Date: Sun Dec 14 09:06:28 2008 >>> New Revision: 186076 >>> URL: http://svn.freebsd.org/changeset/base/186076 >>> >>> Log: >>> Bug fix: %ebx needs to be preserved in the user callchain capture >>> path. >>> >>> Modified: >>> head/sys/amd64/amd64/exception.S >>> >>> Modified: head/sys/amd64/amd64/exception.S >>> >>> ============================================================================== >>> --- head/sys/amd64/amd64/exception.S Sun Dec 14 06:40:04 2008 >>> (r186075) >>> +++ head/sys/amd64/amd64/exception.S Sun Dec 14 09:06:28 2008 >>> (r186076) >>> @@ -459,9 +459,9 @@ nmi_calltrap: >>> */ >>> movq %rsp,%rsi /* source stack pointer */ >>> movq $TF_SIZE,%rcx >>> - movq PCPU(RSP0),%rbx >>> - subq %rcx,%rbx >>> - movq %rbx,%rdi /* destination stack pointer */ >>> + movq PCPU(RSP0),%rdx >>> + subq %rcx,%rdx >>> + movq %rdx,%rdi /* destination stack pointer */ >>> >>> shrq $3,%rcx /* trap frame size in long words */ >>> cld >>> @@ -470,7 +470,7 @@ nmi_calltrap: >>> >>> movl %ss,%eax >>> pushq %rax /* tf_ss */ >>> - pushq %rbx /* tf_rsp (on kernel stack) */ >>> + pushq %rdx /* tf_rsp (on kernel stack) */ > > ^^^^^^ >>> >>> pushfq /* tf_rflags */ >>> movl %cs,%eax >>> pushq %rax /* tf_cs */ >> >> Stupid question -- where's the change? All I see are potentially >> whitespace modifications.. >> -Garrett > > %rbx is changed to a %rdx in some places, I hilighted one. > Regards! > //Niclas Yeah, I know. I'm just blind as a bat ><. -Garrett From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 09:55:13 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0B2E106564A; Sun, 14 Dec 2008 09:55:13 +0000 (UTC) (envelope-from niclas.zeising@gmail.com) Received: from mxf2.bahnhof.se (mxf2.bahnhof.se [213.80.101.26]) by mx1.freebsd.org (Postfix) with ESMTP id 52CE48FC0C; Sun, 14 Dec 2008 09:55:13 +0000 (UTC) (envelope-from niclas.zeising@gmail.com) Received: from localhost (mxf2.local [127.0.0.1]) by mxf2-reinject (Postfix) with ESMTP id 415626BD072; Sun, 14 Dec 2008 10:27:27 +0100 (CET) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MXF2) X-Spam-Score: 2.777 X-Spam-Level: ** X-Spam-Status: No, score=2.777 tagged_above=-99 required=5 tests=[DNS_FROM_RFC_POST=1.708, SPF_NEUTRAL=1.069] Received: from mxf2.bahnhof.se ([127.0.0.1]) by localhost (mxf2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kvvUZK2Acp7X; Sun, 14 Dec 2008 10:27:26 +0100 (CET) Received: from [10.0.0.3] (h-85-24-219-30.NA.cust.bahnhof.se [85.24.219.30]) by mxf2.bahnhof.se (Postfix) with ESMTP id 28DC46BD035; Sun, 14 Dec 2008 10:27:26 +0100 (CET) Received: from 127.0.0.1 (AVG SMTP 8.0.176 [270.9.17/1847]); Sun, 14 Dec 2008 10:27:26 +0100 Message-ID: <4944D17E.9080900@gmail.com> Date: Sun, 14 Dec 2008 10:27:26 +0100 From: Niclas Zeising User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Garrett Cooper References: <200812140906.mBE96SEZ054272@svn.freebsd.org> <7d6fde3d0812140108l4b0c75e1o229c667c0b86dd7e@mail.gmail.com> In-Reply-To: <7d6fde3d0812140108l4b0c75e1o229c667c0b86dd7e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Joseph Koshy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186076 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 09:55:13 -0000 Garrett Cooper wrote: > On Sun, Dec 14, 2008 at 1:06 AM, Joseph Koshy wrote: >> Author: jkoshy >> Date: Sun Dec 14 09:06:28 2008 >> New Revision: 186076 >> URL: http://svn.freebsd.org/changeset/base/186076 >> >> Log: >> Bug fix: %ebx needs to be preserved in the user callchain capture >> path. >> >> Modified: >> head/sys/amd64/amd64/exception.S >> >> Modified: head/sys/amd64/amd64/exception.S >> ============================================================================== >> --- head/sys/amd64/amd64/exception.S Sun Dec 14 06:40:04 2008 (r186075) >> +++ head/sys/amd64/amd64/exception.S Sun Dec 14 09:06:28 2008 (r186076) >> @@ -459,9 +459,9 @@ nmi_calltrap: >> */ >> movq %rsp,%rsi /* source stack pointer */ >> movq $TF_SIZE,%rcx >> - movq PCPU(RSP0),%rbx >> - subq %rcx,%rbx >> - movq %rbx,%rdi /* destination stack pointer */ >> + movq PCPU(RSP0),%rdx >> + subq %rcx,%rdx >> + movq %rdx,%rdi /* destination stack pointer */ >> >> shrq $3,%rcx /* trap frame size in long words */ >> cld >> @@ -470,7 +470,7 @@ nmi_calltrap: >> >> movl %ss,%eax >> pushq %rax /* tf_ss */ >> - pushq %rbx /* tf_rsp (on kernel stack) */ >> + pushq %rdx /* tf_rsp (on kernel stack) */ ^^^^^^ >> pushfq /* tf_rflags */ >> movl %cs,%eax >> pushq %rax /* tf_cs */ > > Stupid question -- where's the change? All I see are potentially > whitespace modifications.. > -Garrett %rbx is changed to a %rdx in some places, I hilighted one. Regards! //Niclas From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 11:47:39 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6E7E106564A; Sun, 14 Dec 2008 11:47:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6D8A8FC19; Sun, 14 Dec 2008 11:47:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEBldDx058139; Sun, 14 Dec 2008 11:47:39 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEBldRL058138; Sun, 14 Dec 2008 11:47:39 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200812141147.mBEBldRL058138@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 14 Dec 2008 11:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186077 - head/sbin/devd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 11:47:39 -0000 Author: phk Date: Sun Dec 14 11:47:39 2008 New Revision: 186077 URL: http://svn.freebsd.org/changeset/base/186077 Log: Clarify that configuration files must be named '*.conf' Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Sun Dec 14 09:06:28 2008 (r186076) +++ head/sbin/devd/devd.conf.5 Sun Dec 14 11:47:39 2008 (r186077) @@ -110,7 +110,7 @@ statement. .It Ic directory Qq Ar /some/path ; Adds the given directory to the list of directories from which .Xr devd 8 -will read +will read all files named "*.conf" as further configuration files. Any number of .Ic directory From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 11:48:51 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21CE106564A; Sun, 14 Dec 2008 11:48:51 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E21D18FC0C; Sun, 14 Dec 2008 11:48:51 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEBmpS8058203; Sun, 14 Dec 2008 11:48:51 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEBmpf3058202; Sun, 14 Dec 2008 11:48:51 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200812141148.mBEBmpf3058202@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 14 Dec 2008 11:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186078 - head/sbin/devd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 11:48:52 -0000 Author: phk Date: Sun Dec 14 11:48:51 2008 New Revision: 186078 URL: http://svn.freebsd.org/changeset/base/186078 Log: Send all debug to stderr. Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Sun Dec 14 11:47:39 2008 (r186077) +++ head/sbin/devd/devd.cc Sun Dec 14 11:48:51 2008 (r186078) @@ -307,7 +307,7 @@ void config::parse_one_file(const char *fn) { if (Dflag) - printf("Parsing %s\n", fn); + fprintf(stderr, "Parsing %s\n", fn); yyin = fopen(fn, "r"); if (yyin == NULL) err(1, "Cannot open config file %s", fn); @@ -325,7 +325,7 @@ config::parse_files_in_dir(const char *d char path[PATH_MAX]; if (Dflag) - printf("Parsing files in %s\n", dirname); + fprintf(stderr, "Parsing files in %s\n", dirname); dirp = opendir(dirname); if (dirp == NULL) return; From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 12:56:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325151065670; Sun, 14 Dec 2008 12:56:57 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21BAD8FC0C; Sun, 14 Dec 2008 12:56:57 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBECuuNC059474; Sun, 14 Dec 2008 12:56:56 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBECuu0E059473; Sun, 14 Dec 2008 12:56:56 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812141256.mBECuu0E059473@svn.freebsd.org> From: Ruslan Ermilov Date: Sun, 14 Dec 2008 12:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186079 - head/sbin/atacontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 12:56:57 -0000 Author: ru Date: Sun Dec 14 12:56:56 2008 New Revision: 186079 URL: http://svn.freebsd.org/changeset/base/186079 Log: Fix the fallouts from r146267: - Add the forgotten "mode" argument to the "mode" command. - Move the description of "info" to where it belongs. Modified: head/sbin/atacontrol/atacontrol.8 Modified: head/sbin/atacontrol/atacontrol.8 ============================================================================== --- head/sbin/atacontrol/atacontrol.8 Sun Dec 14 11:48:51 2008 (r186078) +++ head/sbin/atacontrol/atacontrol.8 Sun Dec 14 12:56:56 2008 (r186079) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2008 +.Dd December 14, 2008 .Dt ATACONTROL 8 .Os .Sh NAME @@ -63,6 +63,7 @@ .Nm .Ic mode .Ar device +.Op Ar mode .Nm .Ic info .Ar channel @@ -94,7 +95,7 @@ The .Ar channel argument is the ATA channel device (e.g., ata0) on which to operate. The following commands are supported: -.Bl -tag -width "rebuild" +.Bl -tag -width ".Ic addspare" .It Ic attach Attach an ATA .Ar channel . @@ -162,9 +163,13 @@ Rebuild a RAID1 array on a RAID capable .It Ic status Get the status of an ATA RAID. .It Ic mode -Without the mode argument, the current transfer modes of the +Without the +.Ar mode +argument, the current transfer mode of the device are printed. -If the mode argument is given, the ATA driver +If the +.Ar mode +argument is given, the ATA driver is asked to change the transfer mode to the one given. The ATA driver will reject modes that are not supported by the hardware. @@ -190,13 +195,12 @@ and .Cm UDMA6 (alias .Cm UDMA133 ) . -The device name and manufacture/version strings are shown. .It Ic cap Show detailed info about the device on .Ar device . .It Ic spindown Set or report timeout after which the -.Ar device +.Ar device will be spun down. To arm the timeout the device needs at least one more request after setting the timeout. @@ -205,6 +209,7 @@ No further actions are needed in this ca .It Ic info Show info about the attached devices on the .Ar channel . +The device name and manufacture/version strings are shown. .It Ic list Show info about all attached devices on all active controllers. .El @@ -312,7 +317,7 @@ If the system has a pure software array RAID controller, then shut the system down, make sure that the disk that was still working is moved to the bootable position (channel 0 or whatever the BIOS allows the system to boot from) and the blank disk -is placed in the secondary position, then boot the system into +is placed in the secondary position, then boot the system into single-user mode and issue the command: .Pp .Dl "atacontrol addspare ar0 ad6" From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 16:09:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90DEF106564A; Sun, 14 Dec 2008 16:09:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65D898FC17; Sun, 14 Dec 2008 16:09:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEG9rMi063249; Sun, 14 Dec 2008 16:09:53 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEG9rDr063248; Sun, 14 Dec 2008 16:09:53 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200812141609.mBEG9rDr063248@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 14 Dec 2008 16:09:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186082 - in head: . tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 16:09:53 -0000 Author: ume Date: Sun Dec 14 16:09:53 2008 New Revision: 186082 URL: http://svn.freebsd.org/changeset/base/186082 Log: Bootstrapping merge history for resolver. Modified: head/tools/regression/bin/sh/builtins/type1.0.stderr (props changed) Changes in other areas also in this revision: Modified: head/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 16:56:48 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 753611065672; Sun, 14 Dec 2008 16:56:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 633A98FC18; Sun, 14 Dec 2008 16:56:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEGult5064250; Sun, 14 Dec 2008 16:56:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEGulI4064249; Sun, 14 Dec 2008 16:56:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812141656.mBEGulI4064249@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 14 Dec 2008 16:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186085 - head/usr.sbin/jls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 16:56:48 -0000 Author: bz Date: Sun Dec 14 16:56:47 2008 New Revision: 186085 URL: http://svn.freebsd.org/changeset/base/186085 Log: Make sure that the direct jls invocations prints something reasonable close to and in the same format as it had always. r185435 said it would try that but I had been living with jail patches for too long to actually remember the single-line format when adding backwards compatibility back in p4. Reported by: Philipp Wuensche Tested by: Philipp Wuensche MFC after: 4 weeks (just for me to get the mail) Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Sun Dec 14 16:49:40 2008 (r186084) +++ head/usr.sbin/jls/jls.c Sun Dec 14 16:56:47 2008 (r186085) @@ -48,7 +48,7 @@ #ifdef SUPPORT_OLD_XPRISON static -char *print_xprison_v1(void *p, char *end) +char *print_xprison_v1(void *p, char *end, unsigned flags) { struct xprison_v1 *xp; struct in_addr in; @@ -57,15 +57,18 @@ char *print_xprison_v1(void *p, char *en errx(1, "Invalid length for jail"); xp = (struct xprison_v1 *)p; - printf("%6d %-29.29s %.74s\n", - xp->pr_id, xp->pr_host, xp->pr_path); - - /* We are not printing an empty line here for state and name. */ - /* We are not printing an empty line here for cpusetid. */ - - /* IPv4 address. */ - in.s_addr = htonl(xp->pr_ip); - printf("%6s %-15.15s\n", "", inet_ntoa(in)); + if (flags & FLAG_V) { + printf("%6d %-29.29s %.74s\n", + xp->pr_id, xp->pr_host, xp->pr_path); + /* We are not printing an empty line here for state and name. */ + /* We are not printing an empty line here for cpusetid. */ + /* IPv4 address. */ + in.s_addr = htonl(xp->pr_ip); + printf("%6s %-15.15s\n", "", inet_ntoa(in)); + } else { + printf("%6d %-15.15s %-29.29s %.74s\n", + xp->pr_id, inet_ntoa(in), xp->pr_host, xp->pr_path); + } return ((char *)(xp + 1)); } @@ -104,8 +107,9 @@ char *print_xprison_v3(void *p, char *en return (q); } - printf("%6d %-29.29s %.74s\n", - xp->pr_id, xp->pr_host, xp->pr_path); + if (flags & FLAG_V) + printf("%6d %-29.29s %.74s\n", + xp->pr_id, xp->pr_host, xp->pr_path); /* Jail state and name. */ if (flags & FLAG_V) @@ -123,11 +127,12 @@ char *print_xprison_v3(void *p, char *en q += (xp->pr_ip4s * sizeof(struct in_addr)); if (q > end) errx(1, "Invalid length for jail"); + in.s_addr = 0; for (i = 0; i < xp->pr_ip4s; i++) { - if (i == 0 || flags & FLAG_V) { + if (i == 0 || flags & FLAG_V) in.s_addr = iap[i].s_addr; + if (flags & FLAG_V) printf("%6s %-15.15s\n", "", inet_ntoa(in)); - } } /* IPv6 addresses. */ ia6p = (struct in6_addr *)(void *)q; @@ -141,6 +146,12 @@ char *print_xprison_v3(void *p, char *en } } + /* If requested print the old style single line version. */ + if (!(flags & FLAG_V)) + printf("%6d %-15.15s %-29.29s %.74s\n", + xp->pr_id, (in.s_addr) ? inet_ntoa(in) : "", + xp->pr_host, xp->pr_path); + return (q); } @@ -206,12 +217,15 @@ main(int argc, char *argv[]) if (version > XPRISON_VERSION) errx(1, "Sci-Fi prison. Kernel/userland out of sync?"); - printf(" JID Hostname Path\n"); if (flags & FLAG_V) { + printf(" JID Hostname Path\n"); printf(" Name State\n"); printf(" CPUSetID\n"); + printf(" IP Address(es)\n"); + } else { + printf(" JID IP Address Hostname" + " Path\n"); } - printf(" IP Address(es)\n"); for (; q != NULL && (char *)q + sizeof(int) < (char *)p + len;) { version = *(int *)q; if (version > XPRISON_VERSION) @@ -219,7 +233,7 @@ main(int argc, char *argv[]) switch (version) { #ifdef SUPPORT_OLD_XPRISON case 1: - q = print_xprison_v1(q, (char *)p + len); + q = print_xprison_v1(q, (char *)p + len, flags); break; case 2: errx(1, "Version 2 was used by multi-IPv4 jail " From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 17:47:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D872D1065679; Sun, 14 Dec 2008 17:47:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA37C8FC18; Sun, 14 Dec 2008 17:47:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEHlXse065235; Sun, 14 Dec 2008 17:47:33 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEHlXGF065234; Sun, 14 Dec 2008 17:47:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812141747.mBEHlXGF065234@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 14 Dec 2008 17:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186086 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 17:47:34 -0000 Author: bz Date: Sun Dec 14 17:47:33 2008 New Revision: 186086 URL: http://svn.freebsd.org/changeset/base/186086 Log: Add a check, that is currently under discussion for 8 but that we need to keep for 7-STABLE when MFCing in_pcbladdr() to not change the behaviour there. With this a destination route via a loopback interface is treated as a valid and reachable thing for IPv4 source address selection, even though nothing of that network is ever directly reachable, but it is more like a blackhole route. With this the source address will be selected and IPsec can grab the packets before we would discard them at a later point, encapsulate them and send them out from a different tunnel endpoint IP. Discussed on: net Reported by: Frank Behrens Tested by: Frank Behrens MFC after: 4 weeks (just so that I get the mail) Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Dec 14 16:56:47 2008 (r186085) +++ head/sys/netinet/in_pcb.c Sun Dec 14 17:47:33 2008 (r186086) @@ -695,6 +695,10 @@ in_pcbladdr(struct inpcb *inp, struct in ia = ifatoia(ifa_ifwithnet(sintosa(&sain))); if (cred == NULL || !jailed(cred)) { +#if __FreeBSD_version < 800000 + if (ia == NULL) + ia = (struct in_ifaddr *)sro.ro_rt->rt_ifa; +#endif if (ia == NULL) { error = ENETUNREACH; goto done; From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 18:53:37 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BD261065673; Sun, 14 Dec 2008 18:53:37 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6073B8FC13; Sun, 14 Dec 2008 18:53:37 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEIrbVY066533; Sun, 14 Dec 2008 18:53:37 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEIrbah066532; Sun, 14 Dec 2008 18:53:37 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200812141853.mBEIrbah066532@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 14 Dec 2008 18:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186087 - head/lib/libc/include/isc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 18:53:37 -0000 Author: ume Date: Sun Dec 14 18:53:37 2008 New Revision: 186087 URL: http://svn.freebsd.org/changeset/base/186087 Log: prop change Modified: head/lib/libc/include/isc/eventlib.h (props changed) From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 19:21:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F6C91065670; Sun, 14 Dec 2008 19:21:09 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD498FC17; Sun, 14 Dec 2008 19:21:08 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 7EEE745B26; Sun, 14 Dec 2008 20:21:05 +0100 (CET) Received: from localhost (chello087206045082.chello.pl [87.206.45.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E5EE64569A; Sun, 14 Dec 2008 20:20:59 +0100 (CET) Date: Sun, 14 Dec 2008 20:21:01 +0100 From: Pawel Jakub Dawidek To: Ulf Lilleengen Message-ID: <20081214192100.GB16926@garage.freebsd.pl> References: <200812131414.mBDEEu0A031376@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H+4ONPRPur6+Ovig" Content-Disposition: inline In-Reply-To: <200812131414.mBDEEu0A031376@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186038 - head/sbin/geom/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 19:21:09 -0000 --H+4ONPRPur6+Ovig Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 13, 2008 at 02:14:56PM +0000, Ulf Lilleengen wrote: > Author: lulf > Date: Sat Dec 13 14:14:56 2008 > New Revision: 186038 > URL: http://svn.freebsd.org/changeset/base/186038 >=20 > Log: > - When writing metadata to a geom provider, open the it as read-write s= ince it > might do subsequent reads from other providers. This stopped geli (and > probably other classes using g_metadata_store as well) from being put= on top > of gvinum raid5 volumes. > =20 > Note: > The reason it fails in the gvinum raid5 case is that gvinum will read b= ack the > old parity stripe before calculating the new parity stripe to be writte= n out > again. The write will then fail because the underlying disk to be read= is > opened write only. I think we discussed this in the past. In my opinion this change is incorrect. The intend here is to only write something, that's why I use O_WRONLY. If gvinum/raid5 needs also read something to satisfy the write, this is gvinum/raid5's internal detail and should be handled there. RAID5 by design needs to read before it can write (in most cases), does it mean that the O_WRONLY flag became bogus suddenly? No. The flag given to open(2) describes caller's intend, not provider's internals. > Modified: > head/sbin/geom/misc/subr.c >=20 > Modified: head/sbin/geom/misc/subr.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 > --- head/sbin/geom/misc/subr.c Sat Dec 13 13:07:12 2008 (r186037) > +++ head/sbin/geom/misc/subr.c Sat Dec 13 14:14:56 2008 (r186038) > @@ -211,7 +211,7 @@ g_metadata_store(const char *name, u_cha > sector =3D NULL; > error =3D 0; > =20 > - fd =3D open(path, O_WRONLY); > + fd =3D open(path, O_RDWR); > if (fd =3D=3D -1) > return (errno); > mediasize =3D g_get_mediasize(name); --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --H+4ONPRPur6+Ovig Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFJRVybForvXbEpPzQRAgc3AJ9DzXxiEepsESTEcxQpnh4UIrBKHQCg1n7F pr0qTfPiyIFilu/4mEZuAbQ= =IphU -----END PGP SIGNATURE----- --H+4ONPRPur6+Ovig-- From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 19:23:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ABC1106564A; Sun, 14 Dec 2008 19:23:20 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D35898FC16; Sun, 14 Dec 2008 19:23:19 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEJNJVD067845; Sun, 14 Dec 2008 19:23:19 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEJNJFp067844; Sun, 14 Dec 2008 19:23:19 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200812141923.mBEJNJFp067844@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 14 Dec 2008 19:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186088 - head/lib/libc/include/isc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 19:23:20 -0000 Author: ume Date: Sun Dec 14 19:23:19 2008 New Revision: 186088 URL: http://svn.freebsd.org/changeset/base/186088 Log: delete svn:keywords. Modified: head/lib/libc/include/isc/eventlib.h (props changed) From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 19:35:43 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D591106564A; Sun, 14 Dec 2008 19:35:43 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 124868FC12; Sun, 14 Dec 2008 19:35:43 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEJZg33068479; Sun, 14 Dec 2008 19:35:42 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEJZgjm068478; Sun, 14 Dec 2008 19:35:42 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200812141935.mBEJZgjm068478@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 14 Dec 2008 19:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186089 - head/lib/libc/include/isc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 19:35:43 -0000 Author: ume Date: Sun Dec 14 19:35:42 2008 New Revision: 186089 URL: http://svn.freebsd.org/changeset/base/186089 Log: prop change. Modified: head/lib/libc/include/isc/eventlib.h (props changed) From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 19:39:54 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A4581065675; Sun, 14 Dec 2008 19:39:54 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35DEA8FC08; Sun, 14 Dec 2008 19:39:54 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEJdrIm068622; Sun, 14 Dec 2008 19:39:53 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEJdr8i068613; Sun, 14 Dec 2008 19:39:53 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200812141939.mBEJdr8i068613@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 14 Dec 2008 19:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186090 - in head: include include/arpa lib/libc/include/isc lib/libc/inet lib/libc/resolv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 19:39:54 -0000 Author: ume Date: Sun Dec 14 19:39:53 2008 New Revision: 186090 URL: http://svn.freebsd.org/changeset/base/186090 Log: Merge the resolver part of BIND 9.4.3 into HEAD. It includes the following fix: 2426. [bug] libbind: inet_net_pton() can sometimes return the wrong value if excessively large netmasks are supplied. [RT #18512] Reported by: Maksymilian Arciemowicz Added: head/lib/libc/include/isc/platform.h (contents, props changed) Modified: head/include/arpa/nameser.h head/include/resolv.h head/lib/libc/include/isc/eventlib.h (contents, props changed) head/lib/libc/inet/inet_net_pton.c head/lib/libc/resolv/res_debug.c head/lib/libc/resolv/res_mkquery.c head/lib/libc/resolv/res_query.c head/lib/libc/resolv/res_send.c Modified: head/include/arpa/nameser.h ============================================================================== --- head/include/arpa/nameser.h Sun Dec 14 19:35:42 2008 (r186089) +++ head/include/arpa/nameser.h Sun Dec 14 19:39:53 2008 (r186090) @@ -49,7 +49,7 @@ */ /* - * $Id: nameser.h,v 1.7.18.1 2005/04/27 05:00:50 sra Exp $ + * $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $ * $FreeBSD$ */ @@ -424,9 +424,10 @@ typedef enum __ns_cert_types { #define NS_NXT_MAX 127 /*% - * EDNS0 extended flags, host order. + * EDNS0 extended flags and option codes, host order. */ #define NS_OPT_DNSSEC_OK 0x8000U +#define NS_OPT_NSID 3 /*% * Inline versions of get/put short/long. Pointer is advanced. Modified: head/include/resolv.h ============================================================================== --- head/include/resolv.h Sun Dec 14 19:35:42 2008 (r186089) +++ head/include/resolv.h Sun Dec 14 19:39:53 2008 (r186090) @@ -50,7 +50,7 @@ /*% * @(#)resolv.h 8.1 (Berkeley) 6/2/93 - * $Id: resolv.h,v 1.19.18.3 2005/08/25 04:43:51 marka Exp $ + * $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $ * $FreeBSD$ */ @@ -245,6 +245,7 @@ union res_sockaddr_union { #define RES_NOCHECKNAME 0x00008000 /*%< do not check names for sanity. */ #define RES_KEEPTSIG 0x00010000 /*%< do not strip TSIG records */ #define RES_BLAST 0x00020000 /*%< blast all recursive servers */ +#define RES_NSID 0x00040000 /*%< request name server ID */ #define RES_NOTLDQUERY 0x00100000 /*%< don't unqualified name as a tld */ #define RES_USE_DNSSEC 0x00200000 /*%< use DNSSEC using OK bit in OPT */ /* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */ @@ -386,6 +387,7 @@ extern const struct res_sym __p_rcode_sy #define sym_ntos __sym_ntos #define sym_ston __sym_ston #define res_nopt __res_nopt +#define res_nopt_rdata __res_nopt_rdata #define res_ndestroy __res_ndestroy #define res_nametoclass __res_nametoclass #define res_nametotype __res_nametotype @@ -474,6 +476,8 @@ int res_findzonecut2(res_state, const c union res_sockaddr_union *, int); void res_nclose(res_state); int res_nopt(res_state, int, u_char *, int, int); +int res_nopt_rdata(res_state, int, u_char *, int, u_char *, + u_short, u_short, u_char *); void res_send_setqhook(res_send_qhook); void res_send_setrhook(res_send_rhook); int __res_vinit(res_state, int); Modified: head/lib/libc/include/isc/eventlib.h ============================================================================== --- head/lib/libc/include/isc/eventlib.h Sun Dec 14 19:35:42 2008 (r186089) +++ head/lib/libc/include/isc/eventlib.h Sun Dec 14 19:39:53 2008 (r186090) @@ -18,7 +18,7 @@ /* eventlib.h - exported interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib.h,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $ + * $Id: eventlib.h,v 1.3.18.3 2008/01/23 02:12:01 marka Exp $ */ #ifndef _EVENTLIB_H @@ -29,6 +29,8 @@ #include #include +#include + #ifndef __P # define __EVENTLIB_P_DEFINED # ifdef __STDC__ Added: head/lib/libc/include/isc/platform.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/include/isc/platform.h Sun Dec 14 19:39:53 2008 (r186090) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: platform.h.in,v 1.2.6.2 2008/01/23 02:15:02 tbox Exp $ */ +/* $FreeBSD$ */ + +/*! \file */ + +#ifndef ISC_PLATFORM_H +#define ISC_PLATFORM_H + +/* + * Define if the OS does not define struct timespec. + */ +#undef ISC_PLATFORM_NEEDTIMESPEC +#ifdef ISC_PLATFORM_NEEDTIMESPEC +#include /* For time_t */ +struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; +#endif + +#endif Modified: head/lib/libc/inet/inet_net_pton.c ============================================================================== --- head/lib/libc/inet/inet_net_pton.c Sun Dec 14 19:35:42 2008 (r186089) +++ head/lib/libc/inet/inet_net_pton.c Sun Dec 14 19:39:53 2008 (r186090) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.1 2005/04/27 05:00:53 sra Exp $"; +static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.2 2008/08/26 04:42:43 marka Exp $"; #endif #include __FBSDID("$FreeBSD$"); @@ -135,11 +135,11 @@ inet_net_pton_ipv4(const char *src, u_ch assert(n >= 0 && n <= 9); bits *= 10; bits += n; + if (bits > 32) + goto enoent; } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch)); if (ch != '\0') goto enoent; - if (bits > 32) - goto emsgsize; } /* Firey death and destruction unless we prefetched EOS. */ Modified: head/lib/libc/resolv/res_debug.c ============================================================================== --- head/lib/libc/resolv/res_debug.c Sun Dec 14 19:35:42 2008 (r186089) +++ head/lib/libc/resolv/res_debug.c Sun Dec 14 19:39:53 2008 (r186090) @@ -91,7 +91,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.5 2005/07/28 07:38:11 marka Exp $"; +static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.6 2008/04/03 23:15:15 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -187,10 +187,56 @@ do_section(const res_state statp, p_type(ns_rr_type(rr)), p_class(ns_rr_class(rr))); else if (section == ns_s_ar && ns_rr_type(rr) == ns_t_opt) { + u_int16_t optcode, optlen, rdatalen = ns_rr_rdlen(rr); u_int32_t ttl = ns_rr_ttl(rr); + fprintf(file, "; EDNS: version: %u, udp=%u, flags=%04x\n", (ttl>>16)&0xff, ns_rr_class(rr), ttl&0xffff); + + while (rdatalen >= 4) { + const u_char *cp = ns_rr_rdata(rr); + int i; + + GETSHORT(optcode, cp); + GETSHORT(optlen, cp); + + if (optcode == NS_OPT_NSID) { + fputs("; NSID: ", file); + if (optlen == 0) { + fputs("; NSID\n", file); + } else { + fputs("; NSID: ", file); + for (i = 0; i < optlen; i++) + fprintf(file, "%02x ", + cp[i]); + fputs(" (",file); + for (i = 0; i < optlen; i++) + fprintf(file, "%c", + isprint(cp[i])? + cp[i] : '.'); + fputs(")\n", file); + } + } else { + if (optlen == 0) { + fprintf(file, "; OPT=%u\n", + optcode); + } else { + fprintf(file, "; OPT=%u: ", + optcode); + for (i = 0; i < optlen; i++) + fprintf(file, "%02x ", + cp[i]); + fputs(" (",file); + for (i = 0; i < optlen; i++) + fprintf(file, "%c", + isprint(cp[i]) ? + cp[i] : '.'); + fputs(")\n", file); + } + } + rdatalen -= 4 + optlen; + } } else { n = ns_sprintrr(handle, &rr, NULL, NULL, buf, buflen); @@ -202,7 +248,7 @@ do_section(const res_state statp, buf = malloc(buflen += 1024); if (buf == NULL) { fprintf(file, - ";; memory allocation failure\n"); + ";; memory allocation failure\n"); return; } continue; @@ -379,7 +425,7 @@ static const struct res_sym __p_default_ {ns_s_an, "ANSWER", (char *)0}, {ns_s_ns, "AUTHORITY", (char *)0}, {ns_s_ar, "ADDITIONAL", (char *)0}, - {0, (char *)0, (char *)0} + {0, (char *)0, (char *)0} }; static const struct res_sym __p_update_section_syms[] = { @@ -387,7 +433,7 @@ static const struct res_sym __p_update_s {S_PREREQ, "PREREQUISITE", (char *)0}, {S_UPDATE, "UPDATE", (char *)0}, {S_ADDT, "ADDITIONAL", (char *)0}, - {0, (char *)0, (char *)0} + {0, (char *)0, (char *)0} }; const struct res_sym __p_key_syms[] = { @@ -615,6 +661,7 @@ p_option(u_long option) { case RES_USE_INET6: return "inet6"; #ifdef RES_USE_EDNS0 /*%< KAME extension */ case RES_USE_EDNS0: return "edns0"; + case RES_NSID: return "nsid"; #endif #ifdef RES_USE_DNAME case RES_USE_DNAME: return "dname"; Modified: head/lib/libc/resolv/res_mkquery.c ============================================================================== --- head/lib/libc/resolv/res_mkquery.c Sun Dec 14 19:35:42 2008 (r186089) +++ head/lib/libc/resolv/res_mkquery.c Sun Dec 14 19:39:53 2008 (r186090) @@ -66,7 +66,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.1 2005/04/27 05:01:11 sra Exp $"; +static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.2 2008/04/03 23:15:15 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -201,9 +201,6 @@ res_nmkquery(res_state statp, #ifdef RES_USE_EDNS0 /* attach OPT pseudo-RR, as documented in RFC2671 (EDNS0). */ -#ifndef T_OPT -#define T_OPT 41 -#endif int res_nopt(res_state statp, @@ -228,15 +225,16 @@ res_nopt(res_state statp, if ((ep - cp) < 1 + RRFIXEDSZ) return (-1); - *cp++ = 0; /*%< "." */ - ns_put16(T_OPT, cp); /*%< TYPE */ + *cp++ = 0; /*%< "." */ + ns_put16(ns_t_opt, cp); /*%< TYPE */ cp += INT16SZ; if (anslen > 0xffff) anslen = 0xffff; /* limit to 16bit value */ - ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */ + ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */ cp += INT16SZ; - *cp++ = NOERROR; /*%< extended RCODE */ - *cp++ = 0; /*%< EDNS version */ + *cp++ = NOERROR; /*%< extended RCODE */ + *cp++ = 0; /*%< EDNS version */ + if (statp->options & RES_USE_DNSSEC) { #ifdef DEBUG if (statp->options & RES_DEBUG) @@ -246,12 +244,60 @@ res_nopt(res_state statp, } ns_put16(flags, cp); cp += INT16SZ; - ns_put16(0, cp); /*%< RDLEN */ + + ns_put16(0U, cp); /*%< RDLEN */ cp += INT16SZ; + hp->arcount = htons(ntohs(hp->arcount) + 1); return (cp - buf); } + +/* + * Construct variable data (RDATA) block for OPT psuedo-RR, append it + * to the buffer, then update the RDLEN field (previously set to zero by + * res_nopt()) with the new RDATA length. + */ +int +res_nopt_rdata(res_state statp, + int n0, /*%< current offset in buffer */ + u_char *buf, /*%< buffer to put query */ + int buflen, /*%< size of buffer */ + u_char *rdata, /*%< ptr to start of opt rdata */ + u_short code, /*%< OPTION-CODE */ + u_short len, /*%< OPTION-LENGTH */ + u_char *data) /*%< OPTION_DATA */ +{ + register u_char *cp, *ep; + +#ifdef DEBUG + if ((statp->options & RES_DEBUG) != 0U) + printf(";; res_nopt_rdata()\n"); +#endif + + cp = buf + n0; + ep = buf + buflen; + + if ((ep - cp) < (4 + len)) + return (-1); + + if (rdata < (buf + 2) || rdata >= ep) + return (-1); + + ns_put16(code, cp); + cp += INT16SZ; + + ns_put16(len, cp); + cp += INT16SZ; + + memcpy(cp, data, len); + cp += len; + + len = cp - rdata; + ns_put16(len, rdata - 2); /* Update RDLEN field */ + + return (cp - buf); +} #endif /*! \file */ Modified: head/lib/libc/resolv/res_query.c ============================================================================== --- head/lib/libc/resolv/res_query.c Sun Dec 14 19:35:42 2008 (r186089) +++ head/lib/libc/resolv/res_query.c Sun Dec 14 19:39:53 2008 (r186090) @@ -66,7 +66,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_query.c,v 1.7.18.1 2005/04/27 05:01:11 sra Exp $"; +static const char rcsid[] = "$Id: res_query.c,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -115,8 +115,9 @@ res_nquery(res_state statp, { u_char buf[MAXPACKET]; HEADER *hp = (HEADER *) answer; - int n; u_int oflags; + u_char *rdata; + int n; oflags = statp->_flags; @@ -131,8 +132,14 @@ again: buf, sizeof(buf)); #ifdef RES_USE_EDNS0 if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 && - (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U) + (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC|RES_NSID))) { n = res_nopt(statp, n, buf, sizeof(buf), anslen); + rdata = &buf[n]; + if (n > 0 && (statp->options & RES_NSID) != 0U) { + n = res_nopt_rdata(statp, n, buf, sizeof(buf), rdata, + NS_OPT_NSID, 0, NULL); + } + } #endif if (n <= 0) { #ifdef DEBUG @@ -142,6 +149,7 @@ again: RES_SET_H_ERRNO(statp, NO_RECOVERY); return (n); } + n = res_nsend(statp, buf, n, answer, anslen); if (n < 0) { #ifdef RES_USE_EDNS0 Modified: head/lib/libc/resolv/res_send.c ============================================================================== --- head/lib/libc/resolv/res_send.c Sun Dec 14 19:35:42 2008 (r186089) +++ head/lib/libc/resolv/res_send.c Sun Dec 14 19:39:53 2008 (r186090) @@ -66,7 +66,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_send.c,v 1.9.18.8 2006/10/16 23:00:58 marka Exp $"; +static const char rcsid[] = "$Id: res_send.c,v 1.9.18.10 2008/01/27 02:06:26 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -302,7 +302,7 @@ int res_nsend(res_state statp, const u_char *buf, int buflen, u_char *ans, int anssiz) { - int gotsomewhere, terrno, try, v_circuit, resplen, ns, n; + int gotsomewhere, terrno, tries, v_circuit, resplen, ns, n; #ifdef USE_KQUEUE int kq; #endif @@ -420,7 +420,7 @@ res_nsend(res_state statp, /* * Send request, RETRY times, or until successful. */ - for (try = 0; try < statp->retry; try++) { + for (tries = 0; tries < statp->retry; tries++) { for (ns = 0; ns < statp->nscount; ns++) { struct sockaddr *nsap; int nsaplen; @@ -471,7 +471,7 @@ res_nsend(res_state statp, if (v_circuit) { /* Use VC; at most one attempt per server. */ - try = statp->retry; + tries = statp->retry; n = send_vc(statp, buf, buflen, ans, anssiz, &terrno, ns); if (n < 0) @@ -486,7 +486,7 @@ res_nsend(res_state statp, kq, #endif buf, buflen, ans, anssiz, &terrno, - ns, try, &v_circuit, &gotsomewhere); + ns, tries, &v_circuit, &gotsomewhere); if (n < 0) goto fail; if (n == 0) @@ -632,6 +632,9 @@ send_vc(res_state statp, u_short len; u_char *cp; void *tmp; +#ifdef SO_NOSIGPIPE + int on = 1; +#endif nsap = get_nsaddr(statp, ns); nsaplen = get_salen(nsap); @@ -679,6 +682,17 @@ send_vc(res_state statp, return (-1); } } +#ifdef SO_NOSIGPIPE + /* + * Disable generation of SIGPIPE when writing to a closed + * socket. Write should return -1 and set errno to EPIPE + * instead. + * + * Push on even if setsockopt(SO_NOSIGPIPE) fails. + */ + (void)_setsockopt(statp->_vcsock, SOL_SOCKET, SO_NOSIGPIPE, &on, + sizeof(on)); +#endif errno = 0; if (_connect(statp->_vcsock, nsap, nsaplen) < 0) { *terrno = errno; @@ -811,7 +825,7 @@ send_dg(res_state statp, int kq, #endif const u_char *buf, int buflen, u_char *ans, - int anssiz, int *terrno, int ns, int try, int *v_circuit, + int anssiz, int *terrno, int ns, int tries, int *v_circuit, int *gotsomewhere) { const HEADER *hp = (const HEADER *) buf; @@ -915,7 +929,7 @@ send_dg(res_state statp, /* * Wait for reply. */ - seconds = (statp->retrans << try); + seconds = (statp->retrans << tries); if (ns > 0) seconds /= statp->nscount; if (seconds <= 0) From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 20:03:47 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D7D106564A; Sun, 14 Dec 2008 20:03:47 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 459E48FC13; Sun, 14 Dec 2008 20:03:47 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEK3lPW069823; Sun, 14 Dec 2008 20:03:47 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEK3lRR069821; Sun, 14 Dec 2008 20:03:47 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200812142003.mBEK3lRR069821@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 14 Dec 2008 20:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186091 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 20:03:47 -0000 Author: phk Date: Sun Dec 14 20:03:46 2008 New Revision: 186091 URL: http://svn.freebsd.org/changeset/base/186091 Log: Move the code that injects received characters into the tty system into a separate public function ucomrxchars(), to avoid requirement of simple metadata prefixing on the USB data stream. Modified: head/sys/dev/usb/ucom.c head/sys/dev/usb/ucomvar.h Modified: head/sys/dev/usb/ucom.c ============================================================================== --- head/sys/dev/usb/ucom.c Sun Dec 14 19:39:53 2008 (r186090) +++ head/sys/dev/usb/ucom.c Sun Dec 14 20:03:46 2008 (r186091) @@ -700,11 +700,30 @@ ucomstartread(struct ucom_softc *sc) return (USBD_NORMAL_COMPLETION); } +void +ucomrxchars(struct ucom_softc *sc, u_char *cp, u_int32_t cc) +{ + struct tty *tp = sc->sc_tty; + + /* Give characters to tty layer. */ + while (cc > 0) { + DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); + if (ttydisc_rint(tp, *cp, 0) == -1) { + /* XXX what should we do? */ + printf("%s: lost %d chars\n", + device_get_nameunit(sc->sc_dev), cc); + break; + } + cc--; + cp++; + } + ttydisc_rint_done(tp); +} + static void ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) { struct ucom_softc *sc = (struct ucom_softc *)p; - struct tty *tp = sc->sc_tty; usbd_status err; u_int32_t cc; u_char *cp; @@ -737,22 +756,8 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_p device_get_nameunit(sc->sc_dev), cc); goto resubmit; } - if (cc < 1) - goto resubmit; - - /* Give characters to tty layer. */ - while (cc > 0) { - DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); - if (ttydisc_rint(tp, *cp, 0) == -1) { - /* XXX what should we do? */ - printf("%s: lost %d chars\n", - device_get_nameunit(sc->sc_dev), cc); - break; - } - cc--; - cp++; - } - ttydisc_rint_done(tp); + if (cc > 0) + ucomrxchars(sc, cp, cc); resubmit: err = ucomstartread(sc); Modified: head/sys/dev/usb/ucomvar.h ============================================================================== --- head/sys/dev/usb/ucomvar.h Sun Dec 14 19:39:53 2008 (r186090) +++ head/sys/dev/usb/ucomvar.h Sun Dec 14 20:03:46 2008 (r186091) @@ -166,3 +166,4 @@ void ucom_attach_tty(struct ucom_softc * int ucom_attach(struct ucom_softc *); int ucom_detach(struct ucom_softc *); void ucom_status_change(struct ucom_softc *); +void ucomrxchars(struct ucom_softc *sc, u_char *cp, u_int32_t cc); From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 20:05:04 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 612E4106564A; Sun, 14 Dec 2008 20:05:04 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F58F8FC0C; Sun, 14 Dec 2008 20:05:04 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEK54tQ069886; Sun, 14 Dec 2008 20:05:04 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEK54YC069885; Sun, 14 Dec 2008 20:05:04 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200812142005.mBEK54YC069885@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 14 Dec 2008 20:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186092 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 20:05:04 -0000 Author: phk Date: Sun Dec 14 20:05:03 2008 New Revision: 186092 URL: http://svn.freebsd.org/changeset/base/186092 Log: Bump the FTDI receive buffer size to 256 in order to improve throughput. Modified: head/sys/dev/usb/uftdi.c Modified: head/sys/dev/usb/uftdi.c ============================================================================== --- head/sys/dev/usb/uftdi.c Sun Dec 14 20:03:46 2008 (r186091) +++ head/sys/dev/usb/uftdi.c Sun Dec 14 20:05:03 2008 (r186092) @@ -100,7 +100,7 @@ SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debu * These are the maximum number of bytes transferred per frame. * The output buffer size cannot be increased due to the size encoding. */ -#define UFTDIIBUFSIZE 64 +#define UFTDIIBUFSIZE 256 #define UFTDIOBUFSIZE 64 struct uftdi_softc { @@ -458,32 +458,33 @@ uftdi_read(void *vsc, int portno, u_char { struct uftdi_softc *sc = vsc; u_char msr, lsr; + unsigned l; - DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", sc, portno, - *count)); - - msr = FTDI_GET_MSR(*ptr); - lsr = FTDI_GET_LSR(*ptr); - -#ifdef USB_DEBUG - if (*count != 2) - DPRINTFN(10,("uftdi_read: sc=%p, port=%d count=%d data[0]=" - "0x%02x\n", sc, portno, *count, (*ptr)[2])); -#endif + DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", + sc, portno, *count)); + while (*count > 0) { + l = *count; + if (l > 64) + l = 64; + + msr = FTDI_GET_MSR(*ptr); + lsr = FTDI_GET_LSR(*ptr); + + if (sc->sc_msr != msr || + (sc->sc_lsr & FTDI_LSR_MASK) != (lsr & FTDI_LSR_MASK)) { + DPRINTF(("uftdi_read: status change msr=0x%02x(0x%02x) " + "lsr=0x%02x(0x%02x)\n", msr, sc->sc_msr, + lsr, sc->sc_lsr)); + sc->sc_msr = msr; + sc->sc_lsr = lsr; + ucom_status_change(&sc->sc_ucom); + } - if (sc->sc_msr != msr || - (sc->sc_lsr & FTDI_LSR_MASK) != (lsr & FTDI_LSR_MASK)) { - DPRINTF(("uftdi_read: status change msr=0x%02x(0x%02x) " - "lsr=0x%02x(0x%02x)\n", msr, sc->sc_msr, - lsr, sc->sc_lsr)); - sc->sc_msr = msr; - sc->sc_lsr = lsr; - ucom_status_change(&sc->sc_ucom); + if (l > 2) + ucomrxchars(&sc->sc_ucom, (*ptr) + 2, l - 2); + *ptr += l; + *count -= l; } - - /* Pick up status and adjust data part. */ - *ptr += 2; - *count -= 2; } static size_t From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 20:15:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 730471065676; Sun, 14 Dec 2008 20:15:31 +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 60A478FC19; Sun, 14 Dec 2008 20:15:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEKFV5r070479; Sun, 14 Dec 2008 20:15:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEKFVjW070478; Sun, 14 Dec 2008 20:15:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812142015.mBEKFVjW070478@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Dec 2008 20:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186093 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 20:15:31 -0000 Author: mav Date: Sun Dec 14 20:15:30 2008 New Revision: 186093 URL: http://svn.freebsd.org/changeset/base/186093 Log: To avoid one doubtless netgraph SMP scalability limitation point, switch node queues processing from single swi:net thread to several specialized threads. Reviewed by: julian Tested with: Netperf Cluster Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Sun Dec 14 20:05:03 2008 (r186092) +++ head/sys/netgraph/ng_base.c Sun Dec 14 20:15:30 2008 (r186093) @@ -62,6 +62,9 @@ #include #include #include +#include +#include +#include #include #include @@ -211,7 +214,7 @@ static int ng_generic_msg(node_p here, i static ng_ID_t ng_decodeidname(const char *name); static int ngb_mod_event(module_t mod, int event, void *data); static void ng_worklist_add(node_p node); -static void ngintr(void); +static void ngthread(void *); static int ng_apply_item(node_p node, item_p item, int rw); static void ng_flush_input_queue(node_p node); static node_p ng_ID2noderef(ng_ID_t ID); @@ -259,6 +262,10 @@ MALLOC_DEFINE(M_NETGRAPH_MSG, "netgraph_ mtx_lock(&ng_worklist_mtx) #define NG_WORKLIST_UNLOCK() \ mtx_unlock(&ng_worklist_mtx) +#define NG_WORKLIST_SLEEP() \ + mtx_sleep(&ng_worklist, &ng_worklist_mtx, PI_NET, "sleep", 0) +#define NG_WORKLIST_WAKEUP() \ + wakeup_one(&ng_worklist) #ifdef NETGRAPH_DEBUG /*----------------------------------------------*/ /* @@ -2868,9 +2875,13 @@ out: uma_zone_t ng_qzone; uma_zone_t ng_qdzone; +static int numthreads = 0; /* number of queue threads */ static int maxalloc = 4096;/* limit the damage of a leak */ static int maxdata = 512; /* limit the damage of a DoS */ +TUNABLE_INT("net.graph.threads", &numthreads); +SYSCTL_INT(_net_graph, OID_AUTO, threads, CTLFLAG_RDTUN, &numthreads, + 0, "Number of queue processing threads"); TUNABLE_INT("net.graph.maxalloc", &maxalloc); SYSCTL_INT(_net_graph, OID_AUTO, maxalloc, CTLFLAG_RDTUN, &maxalloc, 0, "Maximum number of non-data queue items to allocate"); @@ -3064,7 +3075,9 @@ ng_mod_event(module_t mod, int event, vo static int ngb_mod_event(module_t mod, int event, void *data) { - int error = 0; + struct proc *p; + struct thread *td; + int i, error = 0; switch (event) { case MOD_LOAD: @@ -3091,7 +3104,18 @@ ngb_mod_event(module_t mod, int event, v ng_qdzone = uma_zcreate("NetGraph data items", sizeof(struct ng_item), NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); uma_zone_set_max(ng_qdzone, maxdata); - netisr_register(NETISR_NETGRAPH, (netisr_t *)ngintr, NULL, 0); + /* Autoconfigure number of threads. */ + if (numthreads <= 0) + numthreads = mp_ncpus; + /* Create threads. */ + p = NULL; /* start with no process */ + for (i = 0; i < numthreads; i++) { + if (kproc_kthread_add(ngthread, NULL, &p, &td, + RFHIGHPID, 0, "ng_queue", "ng_queue%d", i)) { + numthreads = i; + break; + } + } break; case MOD_UNLOAD: /* You can't unload it because an interface may be using it. */ @@ -3246,25 +3270,20 @@ SYSCTL_PROC(_debug, OID_AUTO, ng_dump_it /*********************************************************************** * Worklist routines **********************************************************************/ -/* NETISR thread enters here */ /* * Pick a node off the list of nodes with work, - * try get an item to process off it. - * If there are no more, remove the node from the list. + * try get an item to process off it. Remove the node from the list. */ static void -ngintr(void) +ngthread(void *arg) { for (;;) { node_p node; /* Get node from the worklist. */ NG_WORKLIST_LOCK(); - node = STAILQ_FIRST(&ng_worklist); - if (!node) { - NG_WORKLIST_UNLOCK(); - break; - } + while ((node = STAILQ_FIRST(&ng_worklist)) == NULL) + NG_WORKLIST_SLEEP(); STAILQ_REMOVE_HEAD(&ng_worklist, nd_input_queue.q_work); NG_WORKLIST_UNLOCK(); CTR3(KTR_NET, "%20s: node [%x] (%p) taken off worklist", @@ -3320,9 +3339,9 @@ ng_worklist_add(node_p node) NG_WORKLIST_LOCK(); STAILQ_INSERT_TAIL(&ng_worklist, node, nd_input_queue.q_work); NG_WORKLIST_UNLOCK(); - schednetisr(NETISR_NETGRAPH); CTR3(KTR_NET, "%20s: node [%x] (%p) put on worklist", __func__, node->nd_ID, node); + NG_WORKLIST_WAKEUP(); } else { CTR3(KTR_NET, "%20s: node [%x] (%p) already on worklist", __func__, node->nd_ID, node); From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 20:26:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC57C106567B; Sun, 14 Dec 2008 20:26:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 86C118FC12; Sun, 14 Dec 2008 20:26:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id F330BFEF7; Mon, 15 Dec 2008 09:26:29 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gTE420bcgnEn; Mon, 15 Dec 2008 09:26:25 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Mon, 15 Dec 2008 09:26:25 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 2CE711142E; Mon, 15 Dec 2008 09:26:25 +1300 (NZDT) Date: Sun, 14 Dec 2008 12:26:25 -0800 From: Andrew Thompson To: Poul-Henning Kamp Message-ID: <20081214202625.GB80520@citylink.fud.org.nz> References: <200812142003.mBEK3lRR069821@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812142003.mBEK3lRR069821@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186091 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 20:26:32 -0000 On Sun, Dec 14, 2008 at 08:03:47PM +0000, Poul-Henning Kamp wrote: > Author: phk > Date: Sun Dec 14 20:03:46 2008 > New Revision: 186091 > URL: http://svn.freebsd.org/changeset/base/186091 > > Log: > Move the code that injects received characters into the tty system into > a separate public function ucomrxchars(), to avoid requirement of > simple metadata prefixing on the USB data stream. > > Modified: > head/sys/dev/usb/ucom.c > head/sys/dev/usb/ucomvar.h > > Modified: head/sys/dev/usb/ucom.c > ============================================================================== > --- head/sys/dev/usb/ucom.c Sun Dec 14 19:39:53 2008 (r186090) > +++ head/sys/dev/usb/ucom.c Sun Dec 14 20:03:46 2008 (r186091) > @@ -700,11 +700,30 @@ ucomstartread(struct ucom_softc *sc) > return (USBD_NORMAL_COMPLETION); > } > > +void > +ucomrxchars(struct ucom_softc *sc, u_char *cp, u_int32_t cc) > +{ > + struct tty *tp = sc->sc_tty; > + > + /* Give characters to tty layer. */ > + while (cc > 0) { > + DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); > + if (ttydisc_rint(tp, *cp, 0) == -1) { > + /* XXX what should we do? */ > + printf("%s: lost %d chars\n", > + device_get_nameunit(sc->sc_dev), cc); > + break; > + } > + cc--; > + cp++; > + } > + ttydisc_rint_done(tp); > +} How about passing the whole buffer before doing a per-char handoff. Andrew Index: ucom.c =================================================================== --- ucom.c (revision 186092) +++ ucom.c (working copy) @@ -704,8 +704,15 @@ void ucomrxchars(struct ucom_softc *sc, u_char *cp, u_int32_t cc) { struct tty *tp = sc->sc_tty; + size_t len; /* Give characters to tty layer. */ + if (ttydisc_can_bypass(tp)) { + DPRINTFN(7, ("ucomreadcb: buf=%*D\n", cc, cp, "")); + len = ttydisc_rint_bypass(tp, cp, cc); + cp += len; + cc -= len; + } while (cc > 0) { DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); if (ttydisc_rint(tp, *cp, 0) == -1) { From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 22:24:52 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AB9A1065676; Sun, 14 Dec 2008 22:24:52 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from mta1.eidsiva.net (mta1.eidsiva.net [82.147.40.130]) by mx1.freebsd.org (Postfix) with ESMTP id 3654A8FC17; Sun, 14 Dec 2008 22:24:51 +0000 (UTC) (envelope-from lulf@FreeBSD.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcsANgVRUlX+AYSPGdsb2JhbACTSQEBAQE1uS6Cfg X-IronPort-AV: E=Sophos;i="4.36,220,1228086000"; d="scan'208";a="16410579" Received: from 18.6.erx-lhm.eidsiva.net (HELO @) ([87.248.6.18]) by mtc1.eidsiva.net with ESMTP; 14 Dec 2008 23:21:32 +0100 Date: Sun, 14 Dec 2008 22:21:33 +0100 From: Ulf Lilleengen To: Pawel Jakub Dawidek Message-ID: <20081214212133.GB3575@nobby> References: <200812131414.mBDEEu0A031376@svn.freebsd.org> <20081214192100.GB16926@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081214192100.GB16926@garage.freebsd.pl> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186038 - head/sbin/geom/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ... List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 22:24:52 -0000 On Sun, Dec 14, 2008 at 08:21:01PM +0100, Pawel Jakub Dawidek wrote: > On Sat, Dec 13, 2008 at 02:14:56PM +0000, Ulf Lilleengen wrote: > > Author: lulf > > Date: Sat Dec 13 14:14:56 2008 > > New Revision: 186038 > > URL: http://svn.freebsd.org/changeset/base/186038 > > > > Log: > > - When writing metadata to a geom provider, open the it as read-write since it > > might do subsequent reads from other providers. This stopped geli (and > > probably other classes using g_metadata_store as well) from being put on top > > of gvinum raid5 volumes. > > > > Note: > > The reason it fails in the gvinum raid5 case is that gvinum will read back the > > old parity stripe before calculating the new parity stripe to be written out > > again. The write will then fail because the underlying disk to be read is > > opened write only. > > I think we discussed this in the past. In my opinion this change is > incorrect. The intend here is to only write something, that's why I use > O_WRONLY. If gvinum/raid5 needs also read something to satisfy the > write, this is gvinum/raid5's internal detail and should be handled > there. RAID5 by design needs to read before it can write (in most > cases), does it mean that the O_WRONLY flag became bogus suddenly? No. > The flag given to open(2) describes caller's intend, not provider's > internals. > Nevermind, I can just add to acr for the internal providers when doing g_access right? -- Ulf Lilleengen From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 22:26:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D10161065670; Sun, 14 Dec 2008 22:26:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEC248FC08; Sun, 14 Dec 2008 22:26:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEMQvjP075813; Sun, 14 Dec 2008 22:26:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEMQv8X075811; Sun, 14 Dec 2008 22:26:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812142226.mBEMQv8X075811@svn.freebsd.org> From: Sam Leffler Date: Sun, 14 Dec 2008 22:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186094 - in head/sys/modules: . ath ath_rate_amrr ath_rate_onoe ath_rate_sample X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 22:26:58 -0000 Author: sam Date: Sun Dec 14 22:26:57 2008 New Revision: 186094 URL: http://svn.freebsd.org/changeset/base/186094 Log: Combine ath rate control modules with ath after bringing ath_hal src into the tree. The old split was balanced on module dependencies and symbol exposure that no longer exists. Users that want a module setup with rate control algorithm other than sample must override ATH_RATE in the ath module Makefile. Reviewed by: imp Deleted: head/sys/modules/ath_rate_amrr/ head/sys/modules/ath_rate_onoe/ head/sys/modules/ath_rate_sample/ Modified: head/sys/modules/Makefile head/sys/modules/ath/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Dec 14 20:15:30 2008 (r186093) +++ head/sys/modules/Makefile Sun Dec 14 22:26:57 2008 (r186094) @@ -30,9 +30,6 @@ SUBDIR= ${_3dfx} \ ${_asr} \ ata \ ath \ - ath_rate_amrr \ - ath_rate_onoe \ - ath_rate_sample \ aue \ ${_auxio} \ axe \ Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Sun Dec 14 20:15:30 2008 (r186093) +++ head/sys/modules/ath/Makefile Sun Dec 14 22:26:57 2008 (r186094) @@ -29,44 +29,80 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/../../dev/ath \ - ${.CURDIR}/../../dev/ath/ath_hal \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5210 \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5211 \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5212 \ - ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +ATH_RATE?= sample # tx rate control algorithm -AR5210_SRCS=ah_eeprom_v1.c \ +.PATH: ${.CURDIR}/../../dev/ath +.PATH: ${.CURDIR}/../../dev/ath/ath_hal + +KMOD= if_ath +SRCS= if_ath.c if_ath_pci.c +# NB: v3 eeprom support used by both AR5211 and AR5212; just include it +SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c +SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h + +# +# AR5210 support; these are first generation 11a-only devices. +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5210 +SRCS+= ah_eeprom_v1.c \ ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \ ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \ ar5210_recv.c ar5210_reset.c ar5210_xmit.c -AR5211_SRCS=ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ + +# +# AR5211 support; these are second generation 11b/g/a devices +# (but 11g was OFDM only and is not supported). +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5211 +SRCS+= ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ ar5211_keycache.c ar5211_misc.c ar5211_phy.c ar5211_power.c \ ar5211_recv.c ar5211_reset.c ar5211_xmit.c -AR5212_SRCS=ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ + +# +# AR5212 support; this covers all other pci/cardbus legacy parts. +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5212 +SRCS+= ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \ ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \ - ar5212_rfgain.c ar5212_xmit.c \ - ar2413.c ar2425.c ar5111.c ar5112.c ar5413.c -AR5416_SRCS=ah_eeprom_v14.c \ + ar5212_rfgain.c ar5212_xmit.c +# RF backends +SRCS+= ar5111.c +SRCS+= ar5112.c +SRCS+= ar2413.c +SRCS+= ar2425.c +SRCS+= ar5413.c + +# +# AR5416, AR9160 support; these are 11n parts but only really +# supported (right now) operating in legacy mode. Note enabling +# this support requires defining AH_SUPPORT_AR5416 in opt_ah.h +# so the 11n tx/rx descriptor format is handled. +# +# NB: 9160 depends on 5416 but 5416 does not require 9160 +# +.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +SRCS+= ah_eeprom_v14.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \ ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \ ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_recv.c \ - ar5416_reset.c ar5416_xmit.c \ - ar2133.c -AR9160_SRCS=ar9160_attach.c - -KMOD= if_ath -SRCS= if_ath.c if_ath_pci.c -# NB: v3 eeprom support used by both AR5211 and AR5212; just include it -SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c -SRCS+= ${AR5210_SRCS} -SRCS+= ${AR5211_SRCS} -SRCS+= ${AR5212_SRCS} -SRCS+= ${AR5416_SRCS} -SRCS+= ${AR9160_SRCS} -SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h + ar5416_reset.c ar5416_xmit.c +SRCS+= ar9160_attach.c +# RF backend for 5416 and 9160 +SRCS+= ar2133.c + +# NB: rate control is bound to the driver by symbol names so only pick one +.if ${ATH_RATE} == "sample" +.PATH: ${.CURDIR}/../../dev/ath/ath_rate/sample +SRCS+= sample.c opt_wlan.h +.elif ${ATH_RATE} == "onoe" +.PATH: ${.CURDIR}/../../dev/ath/ath_rate/onoe +SRCS+= onoe.c +.elif ${ATH_RATE} == "amrr" +.PATH: ${.CURDIR}/../../dev/ath/ath_rate/amrr +SRCS+= amrr.c +.endif CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 22:43:52 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4D4C106564A; Sun, 14 Dec 2008 22:43:52 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from mta2.eidsiva.net (mta2.eidsiva.net [82.147.40.138]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0428FC1A; Sun, 14 Dec 2008 22:43:51 +0000 (UTC) (envelope-from lulf@FreeBSD.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcsALsTRUlX+AYSPGdsb2JhbACTSQEBAQE1uS6Cfg X-IronPort-AV: E=Sophos;i="4.36,220,1228086000"; d="scan'208";a="6698280" Received: from 18.6.erx-lhm.eidsiva.net (HELO @) ([87.248.6.18]) by mtc2.eidsiva.net with ESMTP; 14 Dec 2008 23:13:41 +0100 Date: Sun, 14 Dec 2008 22:13:41 +0100 From: Ulf Lilleengen To: Pawel Jakub Dawidek Message-ID: <20081214211341.GA3575@nobby> References: <200812131414.mBDEEu0A031376@svn.freebsd.org> <20081214192100.GB16926@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081214192100.GB16926@garage.freebsd.pl> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186038 - head/sbin/geom/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 22:43:52 -0000 On Sun, Dec 14, 2008 at 08:21:01PM +0100, Pawel Jakub Dawidek wrote: > On Sat, Dec 13, 2008 at 02:14:56PM +0000, Ulf Lilleengen wrote: > > Author: lulf > > Date: Sat Dec 13 14:14:56 2008 > > New Revision: 186038 > > URL: http://svn.freebsd.org/changeset/base/186038 > > > > Log: > > - When writing metadata to a geom provider, open the it as read-write since it > > might do subsequent reads from other providers. This stopped geli (and > > probably other classes using g_metadata_store as well) from being put on top > > of gvinum raid5 volumes. > > > > Note: > > The reason it fails in the gvinum raid5 case is that gvinum will read back the > > old parity stripe before calculating the new parity stripe to be written out > > again. The write will then fail because the underlying disk to be read is > > opened write only. > > I think we discussed this in the past. In my opinion this change is > incorrect. The intend here is to only write something, that's why I use > O_WRONLY. If gvinum/raid5 needs also read something to satisfy the > write, this is gvinum/raid5's internal detail and should be handled > there. RAID5 by design needs to read before it can write (in most > cases), does it mean that the O_WRONLY flag became bogus suddenly? No. > The flag given to open(2) describes caller's intend, not provider's > internals. > Hmm, I understand your reasoning. But how can gvinum read from these internal providers then? Is there some way to override this internally in GEOM? -- Ulf Lilleengen From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 22:48:48 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A10BD1065672; Sun, 14 Dec 2008 22:48:48 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7F98FC08; Sun, 14 Dec 2008 22:48:48 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBEMmmVF076329; Sun, 14 Dec 2008 22:48:48 GMT (envelope-from murray@svn.freebsd.org) Received: (from murray@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBEMmmrS076328; Sun, 14 Dec 2008 22:48:48 GMT (envelope-from murray@svn.freebsd.org) Message-Id: <200812142248.mBEMmmrS076328@svn.freebsd.org> From: Murray Stokely Date: Sun, 14 Dec 2008 22:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186095 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 22:48:48 -0000 Author: murray Date: Sun Dec 14 22:48:48 2008 New Revision: 186095 URL: http://svn.freebsd.org/changeset/base/186095 Log: Add an ENVIRONMENT section to note that the RSH variable can be set to override the use of the rsh(1) program in rcmd(3). PR: docs/51133 Obtained from: NetBSD, partially MFC after: 3 weeks Modified: head/lib/libc/net/rcmd.3 Modified: head/lib/libc/net/rcmd.3 ============================================================================== --- head/lib/libc/net/rcmd.3 Sun Dec 14 22:26:57 2008 (r186094) +++ head/lib/libc/net/rcmd.3 Sun Dec 14 22:48:48 2008 (r186095) @@ -238,6 +238,13 @@ For .Fn rcmd_af , .Dv PF_UNSPEC is also allowed. +.Sh ENVIRONMENT +.Bl -tag -width RSH +.It Ev RSH +When using the +.Fn rcmd +function, this variable is used as the program to run instead of +.Xr rsh 1 . .Sh DIAGNOSTICS The .Fn rcmd From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 23:12:37 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57087106564A; Sun, 14 Dec 2008 23:12:37 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 456E08FC12; Sun, 14 Dec 2008 23:12:37 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBENCa0x076804; Sun, 14 Dec 2008 23:12:36 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBENCaor076803; Sun, 14 Dec 2008 23:12:36 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200812142312.mBENCaor076803@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 14 Dec 2008 23:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186096 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 23:12:37 -0000 Author: marcel Date: Sun Dec 14 23:12:36 2008 New Revision: 186096 URL: http://svn.freebsd.org/changeset/base/186096 Log: Add __packed to the part sub-structure to compensate for the 32-bit default structure alignment on ARM. Modified: head/sys/sys/vtoc.h Modified: head/sys/sys/vtoc.h ============================================================================== --- head/sys/sys/vtoc.h Sun Dec 14 22:48:48 2008 (r186095) +++ head/sys/sys/vtoc.h Sun Dec 14 23:12:36 2008 (r186096) @@ -72,7 +72,7 @@ struct vtoc8 { struct { uint16_t tag; uint16_t flag; - } part[VTOC8_NPARTS]; + } part[VTOC8_NPARTS] __packed; uint16_t __alignment; uint32_t bootinfo[3]; uint32_t sanity; From owner-svn-src-head@FreeBSD.ORG Sun Dec 14 23:24:00 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE0E31065675; Sun, 14 Dec 2008 23:24:00 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC6E78FC17; Sun, 14 Dec 2008 23:24:00 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBENO0w7077038; Sun, 14 Dec 2008 23:24:00 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBENO0FE077037; Sun, 14 Dec 2008 23:24:00 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200812142324.mBENO0FE077037@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 14 Dec 2008 23:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186097 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 23:24:01 -0000 Author: phk Date: Sun Dec 14 23:24:00 2008 New Revision: 186097 URL: http://svn.freebsd.org/changeset/base/186097 Log: Make the tp pointer available for debugging. Modified: head/sys/dev/usb/ucom.c Modified: head/sys/dev/usb/ucom.c ============================================================================== --- head/sys/dev/usb/ucom.c Sun Dec 14 23:12:36 2008 (r186096) +++ head/sys/dev/usb/ucom.c Sun Dec 14 23:24:00 2008 (r186097) @@ -724,10 +724,12 @@ static void ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) { struct ucom_softc *sc = (struct ucom_softc *)p; + struct tty *tp = sc->sc_tty; usbd_status err; u_int32_t cc; u_char *cp; + (void)tp; /* Used for debugging */ DPRINTF(("ucomreadcb: status = %d\n", status)); if (status != USBD_NORMAL_COMPLETION) { From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 00:29:26 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C06D71065672; Mon, 15 Dec 2008 00:29:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADAF68FC12; Mon, 15 Dec 2008 00:29:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF0TQWM078246; Mon, 15 Dec 2008 00:29:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF0TQVW078245; Mon, 15 Dec 2008 00:29:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150029.mBF0TQVW078245@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 00:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186098 - head/sys/dev/ath/ath_hal/ar5312 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 00:29:26 -0000 Author: sam Date: Mon Dec 15 00:29:26 2008 New Revision: 186098 URL: http://svn.freebsd.org/changeset/base/186098 Log: fix ini setup Submitted by: Jiri Fojtasek Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Sun Dec 14 23:24:00 2008 (r186097) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Mon Dec 15 00:29:26 2008 (r186098) @@ -122,7 +122,7 @@ ar5312Attach(uint16_t devid, HAL_SOFTC s /* setup common ini data; rf backends handle remainder */ HAL_INI_INIT(&ahp->ah_ini_modes, ar5212Modes, 6); - HAL_INI_INIT(&ahp->ah_ini_common, ar5212Common, 6); + HAL_INI_INIT(&ahp->ah_ini_common, ar5212Common, 2); if (!ar5312ChipReset(ah, AH_NULL)) { /* reset chip */ HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__); From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 00:43:01 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8241065675; Mon, 15 Dec 2008 00:43:01 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f14.google.com (mail-bw0-f14.google.com [209.85.218.14]) by mx1.freebsd.org (Postfix) with ESMTP id 64E268FC18; Mon, 15 Dec 2008 00:43:00 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by bwz7 with SMTP id 7so5749264bwz.19 for ; Sun, 14 Dec 2008 16:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=kXj3qOtIe3yBa25CTHCtt/hwdLqjSA3FR2tij/Nk9EE=; b=WxdhtVST4qmf06G0KuZQzR5JU7aY85iM85EuqeAJLKhLy/tSUH3JJEaeYTfH8FIqJQ ZZSdeJbi34p1Mm6TiHBYQVVMln92IsWbyDd43Va4Ixo9nooi6YsvXV9tqr//zMWCvpfZ aFEEPgk8Kebu4bGmlQl4B++y3gaow/SIklxFY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=UOKLhoepeJRYpZfUiR6ZeRSF8sUToesE2aGYFSG/lRbDCDcE7kalxFRrepfsX/DOYz jnIeXiYaS37Tt8inDWUrEnKwfcZMYMaE5BqeO3lmQ1DOBXbDsaWHxnzxdjKWH4SCcVeh zacsRcTFmcm2107NEyDJI3S2PNnOnN67yB/iQ= Received: by 10.181.134.12 with SMTP id l12mr2322238bkn.26.1229301778951; Sun, 14 Dec 2008 16:42:58 -0800 (PST) Received: by 10.181.203.1 with HTTP; Sun, 14 Dec 2008 16:42:58 -0800 (PST) Message-ID: <9bbcef730812141642m554913cau6121a2f51458a49f@mail.gmail.com> Date: Mon, 15 Dec 2008 01:42:58 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Ulf Lilleengen" In-Reply-To: <20081214211341.GA3575@nobby> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812131414.mBDEEu0A031376@svn.freebsd.org> <20081214192100.GB16926@garage.freebsd.pl> <20081214211341.GA3575@nobby> X-Google-Sender-Auth: ba9bcd3d69489adf Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186038 - head/sbin/geom/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 00:43:01 -0000 2008/12/14 Ulf Lilleengen : > On Sun, Dec 14, 2008 at 08:21:01PM +0100, Pawel Jakub Dawidek wrote: >> On Sat, Dec 13, 2008 at 02:14:56PM +0000, Ulf Lilleengen wrote: >> > Author: lulf >> > Date: Sat Dec 13 14:14:56 2008 >> > New Revision: 186038 >> > URL: http://svn.freebsd.org/changeset/base/186038 >> > >> > Log: >> > - When writing metadata to a geom provider, open the it as read-write since it >> > might do subsequent reads from other providers. This stopped geli (and >> > probably other classes using g_metadata_store as well) from being put on top >> > of gvinum raid5 volumes. >> > >> > Note: >> > The reason it fails in the gvinum raid5 case is that gvinum will read back the >> > old parity stripe before calculating the new parity stripe to be written out >> > again. The write will then fail because the underlying disk to be read is >> > opened write only. >> >> I think we discussed this in the past. In my opinion this change is >> incorrect. The intend here is to only write something, that's why I use >> O_WRONLY. If gvinum/raid5 needs also read something to satisfy the >> write, this is gvinum/raid5's internal detail and should be handled >> there. RAID5 by design needs to read before it can write (in most >> cases), does it mean that the O_WRONLY flag became bogus suddenly? No. >> The flag given to open(2) describes caller's intend, not provider's >> internals. >> > Hmm, I understand your reasoning. But how can gvinum read from these internal > providers then? Is there some way to override this internally in GEOM? Can't you just convert (0,1,x) permission to (1,1,x) in your g_access? (i.e. convert all write-only openings to read-write) From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 00:47:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D11E71065672; Mon, 15 Dec 2008 00:47:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B37858FC1F; Mon, 15 Dec 2008 00:47:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF0lO2h079014; Mon, 15 Dec 2008 00:47:24 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF0lObJ079009; Mon, 15 Dec 2008 00:47:24 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150047.mBF0lObJ079009@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 00:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186099 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 00:47:25 -0000 Author: sam Date: Mon Dec 15 00:47:24 2008 New Revision: 186099 URL: http://svn.freebsd.org/changeset/base/186099 Log: Replace adhoc checks in ieee80211_start with a per-node flag that indicates if an association id is required before outbound traffic is permitted. This cleans up the previous change that broke mcast traffic "to the stack" in ap mode as a side effect. Reviewed by: sephe, thompsa, weongyo Modified: head/sys/net80211/ieee80211_ddb.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_ddb.c ============================================================================== --- head/sys/net80211/ieee80211_ddb.c Mon Dec 15 00:29:26 2008 (r186098) +++ head/sys/net80211/ieee80211_ddb.c Mon Dec 15 00:47:24 2008 (r186099) @@ -92,7 +92,8 @@ __FBSDID("$FreeBSD$"); #define IEEE80211_NODE_BITS \ "\20\1AUTH\2QOS\3ERP\5PWR_MGT\6AREF\7HT\10HTCOMPAT\11WPS\12TSN" \ - "\13AMPDU_RX\14AMPDU_TX\15MIMO_PS\16MIMO_RTS\17RIFS\20SGI20\21SGI40" + "\13AMPDU_RX\14AMPDU_TX\15MIMO_PS\16MIMO_RTS\17RIFS\20SGI20\21SGI40" \ + "\22ASSOCID" #define IEEE80211_ERP_BITS \ "\20\1NON_ERP_PRESENT\2USE_PROTECTION\3LONG_PREAMBLE" Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Mon Dec 15 00:29:26 2008 (r186098) +++ head/sys/net80211/ieee80211_hostap.c Mon Dec 15 00:47:24 2008 (r186099) @@ -928,6 +928,11 @@ hostap_auth_open(struct ieee80211_node * * after the transaction completes. */ ni->ni_flags |= IEEE80211_NODE_AREF; + /* + * Mark the node as requiring a valid associatio id + * before outbound traffic is permitted. + */ + ni->ni_flags |= IEEE80211_NODE_ASSOCID; if (vap->iv_acl != NULL && vap->iv_acl->iac_getpolicy(vap) == IEEE80211_MACCMD_POLICY_RADIUS) { @@ -1054,6 +1059,11 @@ hostap_auth_shared(struct ieee80211_node * after the transaction completes. */ ni->ni_flags |= IEEE80211_NODE_AREF; + /* + * Mark the node as requiring a valid associatio id + * before outbound traffic is permitted. + */ + ni->ni_flags |= IEEE80211_NODE_ASSOCID; IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = noise; ni->ni_rstamp = rstamp; Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Mon Dec 15 00:29:26 2008 (r186098) +++ head/sys/net80211/ieee80211_node.c Mon Dec 15 00:47:24 2008 (r186099) @@ -732,6 +732,7 @@ ieee80211_sta_join(struct ieee80211vap * ni->ni_erp = se->se_erp; IEEE80211_RSSI_LPF(ni->ni_avgrssi, se->se_rssi); ni->ni_noise = se->se_noise; + ni->ni_flags |= IEEE80211_NODE_ASSOCID; if (ieee80211_ies_init(&ni->ni_ies, se->se_ies.data, se->se_ies.len)) { ieee80211_ies_expand(&ni->ni_ies); @@ -898,8 +899,10 @@ node_cleanup(struct ieee80211_node *ni) * has happened. This is probably not needed as the node * should always be removed from the table so not found but * do it just in case. + * Likewise clear the ASSOCID flag as these flags are intended + * to be managed in tandem. */ - ni->ni_flags &= ~IEEE80211_NODE_AREF; + ni->ni_flags &= ~(IEEE80211_NODE_AREF | IEEE80211_NODE_ASSOCID); /* * Drain power save queue and, if needed, clear TIM. @@ -1511,19 +1514,8 @@ ieee80211_find_txnode(struct ieee80211va vap->iv_opmode == IEEE80211_M_WDS || IEEE80211_IS_MULTICAST(macaddr)) ni = ieee80211_ref_node(vap->iv_bss); - else { + else ni = ieee80211_find_node_locked(nt, macaddr); - if (vap->iv_opmode == IEEE80211_M_HOSTAP && - (ni != NULL && ni->ni_associd == 0)) { - /* - * Station is not associated; don't permit the - * data frame to be sent by returning NULL. This - * is kinda a kludge but the least intrusive way - * to add this check into all drivers. - */ - ieee80211_unref_node(&ni); /* NB: null's ni */ - } - } IEEE80211_NODE_UNLOCK(nt); if (ni == NULL) { Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Mon Dec 15 00:29:26 2008 (r186098) +++ head/sys/net80211/ieee80211_node.h Mon Dec 15 00:47:24 2008 (r186099) @@ -117,6 +117,7 @@ struct ieee80211_node { #define IEEE80211_NODE_RIFS 0x004000 /* RIFS enabled */ #define IEEE80211_NODE_SGI20 0x008000 /* Short GI in HT20 enabled */ #define IEEE80211_NODE_SGI40 0x010000 /* Short GI in HT40 enabled */ +#define IEEE80211_NODE_ASSOCID 0x020000 /* xmit requires associd */ uint16_t ni_associd; /* association ID */ uint16_t ni_vlan; /* vlan tag */ uint16_t ni_txpower; /* current transmit power */ Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Dec 15 00:29:26 2008 (r186098) +++ head/sys/net80211/ieee80211_output.c Mon Dec 15 00:47:24 2008 (r186099) @@ -203,10 +203,8 @@ ieee80211_start(struct ifnet *ifp) continue; } /* XXX AUTH'd */ - /* XXX mark vap to identify if associd is required */ if (ni->ni_associd == 0 && - (vap->iv_opmode == IEEE80211_M_STA || - vap->iv_opmode == IEEE80211_M_HOSTAP || IS_DWDS(vap))) { + (ni->ni_flags & IEEE80211_NODE_ASSOCID)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT, eh->ether_dhost, NULL, "sta not associated (type 0x%04x)", From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:00:21 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A76B1065676; Mon, 15 Dec 2008 01:00:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAF0C8FC0C; Mon, 15 Dec 2008 01:00:18 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF10INu079336; Mon, 15 Dec 2008 01:00:18 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF10IJk079334; Mon, 15 Dec 2008 01:00:18 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150100.mBF10IJk079334@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186100 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:00:21 -0000 Author: sam Date: Mon Dec 15 01:00:18 2008 New Revision: 186100 URL: http://svn.freebsd.org/changeset/base/186100 Log: Improve regdomain.xml parser: o store XML_Parser in the state block so we can report line numbers for errors o complain about netband w/o mode o complain about unknown modes o complain about band w/o enclosing netband o complain about duplicate freqband o complain about unknown channel flags o complain about band w/o freqband's o complain about band w/o maxpower o complain about country w/o ISO cc o complain about country w/o regdomain reference Modified: head/sbin/ifconfig/regdomain.c head/sbin/ifconfig/regdomain.h Modified: head/sbin/ifconfig/regdomain.c ============================================================================== --- head/sbin/ifconfig/regdomain.c Mon Dec 15 00:47:24 2008 (r186099) +++ head/sbin/ifconfig/regdomain.c Mon Dec 15 01:00:18 2008 (r186100) @@ -48,6 +48,7 @@ static const char rcsid[] = "$FreeBSD$"; #define MAXLEVEL 20 struct mystate { + XML_Parser parser; struct regdata *rdp; struct regdomain *rd; /* current domain */ struct netband *netband; /* current netband */ @@ -107,7 +108,8 @@ start_element(void *data, const char *na } if (iseq(name, "netband") && mt->curband == NULL && mt->rd != NULL) { if (mode == NULL) { - /* XXX complain */ + warnx("no mode for netband at line %ld", + XML_GetCurrentLineNumber(mt->parser)); return; } if (iseq(mode, "11b")) @@ -120,12 +122,16 @@ start_element(void *data, const char *na mt->curband = &mt->rd->bands_11ng; else if (iseq(mode, "11na")) mt->curband = &mt->rd->bands_11na; - /* XXX else complain */ + else + warnx("unknown mode \"%s\" at line %ld", + __DECONST(char *, mode), + XML_GetCurrentLineNumber(mt->parser)); return; } if (iseq(name, "band") && mt->netband == NULL) { if (mt->curband == NULL) { - /* XXX complain */ + warnx("band without enclosing netband at line %ld", + XML_GetCurrentLineNumber(mt->parser)); return; } mt->netband = calloc(1, sizeof(struct netband)); @@ -135,6 +141,8 @@ start_element(void *data, const char *na if (iseq(name, "freqband") && mt->freqband == NULL && mt->netband != NULL) { /* XXX handle inlines and merge into table? */ if (mt->netband->band != NULL) { + warnx("duplicate freqband at line %ld ignored", + XML_GetCurrentLineNumber(mt->parser)); /* XXX complain */ } else mt->netband->band = (void *)strdup(ref); @@ -144,6 +152,7 @@ start_element(void *data, const char *na if (iseq(name, "country") && mt->country == NULL) { mt->country = calloc(1, sizeof(struct country)); mt->country->isoname = strdup(id); + mt->country->code = NO_COUNTRY; mt->nident++; LIST_INSERT_HEAD(&mt->rdp->countries, mt->country, next); return; @@ -159,8 +168,8 @@ start_element(void *data, const char *na #undef iseq } -static uint32_t -decode_flag(const char *p, int len) +static int +decode_flag(struct mystate *mt, const char *p, int len) { #define iseq(a,b) (strcasecmp(a,b) == 0) static const struct { @@ -168,7 +177,7 @@ decode_flag(const char *p, int len) int len; uint32_t value; } flags[] = { -#define FLAG(x) { #x, sizeof(#x), x } +#define FLAG(x) { #x, sizeof(#x)-1, x } FLAG(IEEE80211_CHAN_A), FLAG(IEEE80211_CHAN_B), FLAG(IEEE80211_CHAN_G), @@ -205,6 +214,8 @@ decode_flag(const char *p, int len) for (i = 0; i < sizeof(flags)/sizeof(flags[0]); i++) if (len == flags[i].len && iseq(p, flags[i].name)) return flags[i].value; + warnx("unknown flag \"%.*s\" at line %ld ignored", + len, p, XML_GetCurrentLineNumber(mt->parser)); return 0; #undef iseq } @@ -241,11 +252,12 @@ end_element(void *data, const char *name } if (iseq(name, "flags")) { if (mt->freqband != NULL) - mt->freqband->flags |= decode_flag(p, len); + mt->freqband->flags |= decode_flag(mt, p, len); else if (mt->netband != NULL) - mt->netband->flags |= decode_flag(p, len); + mt->netband->flags |= decode_flag(mt, p, len); else { - /* XXX complain */ + warnx("flags without freqband or netband at line %ld ignored", + XML_GetCurrentLineNumber(mt->parser)); } goto done; } @@ -289,7 +301,8 @@ end_element(void *data, const char *name } if (len != 0) { - printf("Unexpected XML: name \"%s\" data \"%s\"\n", name, p); + warnx("unexpected XML token \"%s\" data \"%s\" at line %ld", + name, p, XML_GetCurrentLineNumber(mt->parser)); /* XXX goto done? */ } /* */ @@ -307,15 +320,12 @@ end_element(void *data, const char *name /* */ if (iseq(name, "band") && mt->netband != NULL) { if (mt->netband->band == NULL) { - printf("No frequency band information at line %d\n", -#if 0 - XML_GetCurrentLineNumber(parser)); -#else - 0); -#endif + warnx("no freqbands for band at line %ld", + XML_GetCurrentLineNumber(mt->parser)); } if (mt->netband->maxPower == 0) { - /* XXX complain */ + warnx("no maxpower for band at line %ld", + XML_GetCurrentLineNumber(mt->parser)); } /* default max power w/ DFS to max power */ if (mt->netband->maxPowerDFS == 0) @@ -330,14 +340,17 @@ end_element(void *data, const char *name } /* */ if (iseq(name, "country") && mt->country != NULL) { - if (mt->country->code == 0) { - /* XXX must have iso cc */ + if (mt->country->code == NO_COUNTRY) { + warnx("no ISO cc for country at line %ld", + XML_GetCurrentLineNumber(mt->parser)); } if (mt->country->name == NULL) { - /* XXX must have name */ + warnx("no name for country at line %ld", + XML_GetCurrentLineNumber(mt->parser)); } if (mt->country->rd == NULL) { - /* XXX? rd ref? */ + warnx("no regdomain reference for country at line %ld", + XML_GetCurrentLineNumber(mt->parser)); } mt->country = NULL; goto done; @@ -383,7 +396,6 @@ findid(struct regdata *rdp, const void * int lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) { - XML_Parser parser; struct mystate *mt; struct regdomain *dp; struct country *cp; @@ -398,17 +410,17 @@ lib80211_regdomain_readconfig(struct reg return ENOMEM; /* parse the XML input */ mt->rdp = rdp; - parser = XML_ParserCreate(NULL); - XML_SetUserData(parser, mt); - XML_SetElementHandler(parser, start_element, end_element); - XML_SetCharacterDataHandler(parser, char_data); - if (XML_Parse(parser, p, len, 1) != XML_STATUS_OK) { + mt->parser = XML_ParserCreate(NULL); + XML_SetUserData(mt->parser, mt); + XML_SetElementHandler(mt->parser, start_element, end_element); + XML_SetCharacterDataHandler(mt->parser, char_data); + if (XML_Parse(mt->parser, p, len, 1) != XML_STATUS_OK) { warnx("%s: %s at line %ld", __func__, - XML_ErrorString(XML_GetErrorCode(parser)), - XML_GetCurrentLineNumber(parser)); + XML_ErrorString(XML_GetErrorCode(mt->parser)), + XML_GetCurrentLineNumber(mt->parser)); return -1; } - XML_ParserFree(parser); + XML_ParserFree(mt->parser); /* setup the identifer table */ rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); Modified: head/sbin/ifconfig/regdomain.h ============================================================================== --- head/sbin/ifconfig/regdomain.h Mon Dec 15 00:47:24 2008 (r186099) +++ head/sbin/ifconfig/regdomain.h Mon Dec 15 01:00:18 2008 (r186100) @@ -73,6 +73,7 @@ struct regdomain { struct country { enum ISOCountryCode code; +#define NO_COUNTRY 0xffff const struct regdomain *rd; const char* isoname; const char* name; From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:06:49 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95DA31065675; Mon, 15 Dec 2008 01:06:49 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 829708FC17; Mon, 15 Dec 2008 01:06:49 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF16ngY079548; Mon, 15 Dec 2008 01:06:49 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF16n3l079546; Mon, 15 Dec 2008 01:06:49 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150106.mBF16n3l079546@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186101 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:06:49 -0000 Author: sam Date: Mon Dec 15 01:06:49 2008 New Revision: 186101 URL: http://svn.freebsd.org/changeset/base/186101 Log: o distinguish between adhoc and ahdemo modes o do not require 1/2 and 1/4 rate channels be present in the calibration list when doing a gsm regulatory change; the existing 900MHz cards are not self-identifying so there is no way (using the calibration channel list) to check Modified: head/sbin/ifconfig/ifieee80211.c head/sbin/ifconfig/ifvlan.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:00:18 2008 (r186100) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:06:49 2008 (r186101) @@ -1770,14 +1770,21 @@ regdomain_addchans(struct ieee80211req_c printf("%u: skip, flags 0x%x not available\n", freq, chanFlags); continue; } + /* + * NB: don't enforce 1/2 and 1/4 rate channels being + * specified in the device's calibration list for + * 900MHz cards because most are not self-identifying. + */ if ((flags & IEEE80211_CHAN_HALF) && - (chanFlags & IEEE80211_CHAN_HALF) == 0) { + ((chanFlags & IEEE80211_CHAN_HALF) == 0 && + (flags & IEEE80211_CHAN_GSM) == 0)) { if (verbose) printf("%u: skip, device does not support half-rate channels\n", freq); continue; } if ((flags & IEEE80211_CHAN_QUARTER) && - (chanFlags & IEEE80211_CHAN_QUARTER) == 0) { + ((chanFlags & IEEE80211_CHAN_HALF) == 0 && + (flags & IEEE80211_CHAN_GSM) == 0)) { if (verbose) printf("%u: skip, device does not support quarter-rate channels\n", freq); continue; @@ -3534,8 +3541,12 @@ get80211opmode(int s) (void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name)); if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0) { - if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) - return IEEE80211_M_IBSS; /* XXX ahdemo */ + if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) { + if (ifmr.ifm_current & IFM_FLAG0) + return IEEE80211_M_AHDEMO; + else + return IEEE80211_M_IBSS; + } if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) return IEEE80211_M_HOSTAP; if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) @@ -4244,6 +4255,7 @@ end: } } } + if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) { /* XXX default define not visible */ if (val != 100 || verbose) Modified: head/sbin/ifconfig/ifvlan.c ============================================================================== --- head/sbin/ifconfig/ifvlan.c Mon Dec 15 01:00:18 2008 (r186100) +++ head/sbin/ifconfig/ifvlan.c Mon Dec 15 01:06:49 2008 (r186101) @@ -119,10 +119,9 @@ vlan_set(int s, struct ifreq *ifr) } } -static -DECL_CMD_FUNC(setvlantag, val, d) +static void +getvlantag(const char *val) { - struct vlanreq vreq; u_long ul; char *endp; @@ -133,24 +132,42 @@ DECL_CMD_FUNC(setvlantag, val, d) /* check if the value can be represented in vlr_tag */ if (params.vlr_tag != ul) errx(1, "value for vlan out of range"); +} - if (getvlan(s, &ifr, &vreq) != -1) - vlan_set(s, &ifr); - else - clone_setcallback(vlan_create); +static +DECL_CMD_FUNC(setvlantag_clone, val, d) +{ + getvlantag(val); + clone_setcallback(vlan_create); } static -DECL_CMD_FUNC(setvlandev, val, d) +DECL_CMD_FUNC(setvlantag, val, d) { struct vlanreq vreq; + getvlantag(val); + if (getvlan(s, &ifr, &vreq) == -1) + errx(1, "no existing vlan"); + vlan_set(s, &ifr); +} + +static +DECL_CMD_FUNC(setvlandev_clone, val, d) +{ strlcpy(params.vlr_parent, val, sizeof(params.vlr_parent)); + clone_setcallback(vlan_create); +} + +static +DECL_CMD_FUNC(setvlandev, val, d) +{ + struct vlanreq vreq; + strlcpy(params.vlr_parent, val, sizeof(params.vlr_parent)); if (getvlan(s, &ifr, &vreq) != -1) - vlan_set(s, &ifr); - else - clone_setcallback(vlan_create); + errx(1, "no existing vlan"); + vlan_set(s, &ifr); } static @@ -172,8 +189,8 @@ DECL_CMD_FUNC(unsetvlandev, val, d) } static struct cmd vlan_cmds[] = { - DEF_CLONE_CMD_ARG("vlan", setvlantag), - DEF_CLONE_CMD_ARG("vlandev", setvlandev), + DEF_CLONE_CMD_ARG("vlan", setvlantag_clone), + DEF_CLONE_CMD_ARG("vlandev", setvlandev_clone), /* NB: non-clone cmds */ DEF_CMD_ARG("vlan", setvlantag), DEF_CMD_ARG("vlandev", setvlandev), From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:09:01 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECA681065672; Mon, 15 Dec 2008 01:09:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9B1E8FC17; Mon, 15 Dec 2008 01:09:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF19165079635; Mon, 15 Dec 2008 01:09:01 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF191l2079634; Mon, 15 Dec 2008 01:09:01 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150109.mBF191l2079634@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186102 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:09:02 -0000 Author: sam Date: Mon Dec 15 01:09:01 2008 New Revision: 186102 URL: http://svn.freebsd.org/changeset/base/186102 Log: 0 is a potential ISO CC; use new NO_COUNTRY #define to identify when the CC is not set. Note NO_COUNTRY is set to 0xffff for now (must be 16 bits as ieee80211_regdomain struct defines sku's and cc's as uint16_t which may need fixing). Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:06:49 2008 (r186101) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:09:01 2008 (r186102) @@ -425,7 +425,7 @@ setregdomain_cb(int s, void *arg) struct ieee80211_devcaps_req dc; struct regdata *rdp = getregdata(); - if (rd->country != 0) { + if (rd->country != NO_COUNTRY) { const struct country *cc; /* * Check current country seting to make sure it's @@ -456,7 +456,7 @@ setregdomain_cb(int s, void *arg) errx(1, "country %s (%s) is not usable with " "regdomain %d", cc->isoname, cc->name, rd->regdomain); - else if (rp->cc != 0 && rp->cc != cc) + else if (rp->cc != NULL && rp->cc != cc) errx(1, "country %s (%s) is not usable with " "regdomain %s", cc->isoname, cc->name, rp->name); From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:10:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF3ED1065672; Mon, 15 Dec 2008 01:10:08 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC8918FC0C; Mon, 15 Dec 2008 01:10:08 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF1A8LC079694; Mon, 15 Dec 2008 01:10:08 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF1A8g3079693; Mon, 15 Dec 2008 01:10:08 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150110.mBF1A8g3079693@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186103 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:10:09 -0000 Author: sam Date: Mon Dec 15 01:10:08 2008 New Revision: 186103 URL: http://svn.freebsd.org/changeset/base/186103 Log: fix handling of unknown country codes; atoi doesn't return -1 for an invalid string as I thought; so use strtol instead Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:09:01 2008 (r186102) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:10:08 2008 (r186103) @@ -1982,8 +1982,12 @@ DECL_CMD_FUNC(set80211country, val, d) cc = lib80211_country_findbyname(rdp, val); if (cc == NULL) { - cc = lib80211_country_findbycc(rdp, atoi(val)); - if (cc == NULL) + char *eptr; + long code = strtol(val, &eptr, 0); + + if (eptr != val) + cc = lib80211_country_findbycc(rdp, code); + if (eptr == val || cc == NULL) errx(1, "unknown ISO country code %s", val); } getregdomain(s); From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:10:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3411065672; Mon, 15 Dec 2008 01:10:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 287BE8FC16; Mon, 15 Dec 2008 01:10:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF1ArmL079742; Mon, 15 Dec 2008 01:10:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF1ArWe079741; Mon, 15 Dec 2008 01:10:53 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150110.mBF1ArWe079741@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186104 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:10:53 -0000 Author: sam Date: Mon Dec 15 01:10:52 2008 New Revision: 186104 URL: http://svn.freebsd.org/changeset/base/186104 Log: fix handling of sku codes like country codes Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:10:08 2008 (r186103) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:10:52 2008 (r186104) @@ -1958,8 +1958,12 @@ DECL_CMD_FUNC(set80211regdomain, val, d) rd = lib80211_regdomain_findbyname(rdp, val); if (rd == NULL) { - rd = lib80211_regdomain_findbysku(rdp, atoi(val)); - if (rd == NULL) + char *eptr; + long sku = strtol(val, &eptr, 0); + + if (eptr != val) + rd = lib80211_regdomain_findbysku(rdp, sku); + if (eptr == val || rd == NULL) errx(1, "unknown regdomain %s", val); } getregdomain(s); From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:15:15 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAFD0106564A; Mon, 15 Dec 2008 01:15:15 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7E6F8FC16; Mon, 15 Dec 2008 01:15:15 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF1FF53079880; Mon, 15 Dec 2008 01:15:15 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF1FFEj079879; Mon, 15 Dec 2008 01:15:15 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150115.mBF1FFEj079879@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186105 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:15:15 -0000 Author: sam Date: Mon Dec 15 01:15:15 2008 New Revision: 186105 URL: http://svn.freebsd.org/changeset/base/186105 Log: move channel parsing to a getchannel routine so it can be reused to check the channel argument supplied to chanswitch Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:10:52 2008 (r186104) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:15:15 2008 (r186105) @@ -664,30 +664,38 @@ getchannelflags(const char *val, int fre } static void -set80211channel(const char *val, int d, int s, const struct afswtch *rafp) +getchannel(int s, struct ieee80211_channel *chan, const char *val) { - struct ieee80211_channel chan; - - memset(&chan, 0, sizeof(chan)); - if (!isanyarg(val)) { - int v, flags; - char *ep; + int v, flags; + char *eptr; - getchaninfo(s); - v = strtol(val, &ep, 10); - if (val[0] == '\0' || val == ep || errno == ERANGE || - /* channel may be suffixed with nothing, :flag, or /width */ - (ep[0] != '\0' && ep[0] != ':' && ep[0] != '/')) - errx(1, "invalid channel specification"); - flags = getchannelflags(val, v); - if (v > 255) { /* treat as frequency */ - mapfreq(&chan, v, flags); - } else { - mapchan(&chan, v, flags); - } + memset(chan, 0, sizeof(*chan)); + if (isanyarg(val)) { + chan->ic_freq = IEEE80211_CHAN_ANY; + return; + } + getchaninfo(s); + errno = 0; + v = strtol(val, &eptr, 10); + if (val[0] == '\0' || val == eptr || errno == ERANGE || + /* channel may be suffixed with nothing, :flag, or /width */ + (eptr[0] != '\0' && eptr[0] != ':' && eptr[0] != '/')) + errx(1, "invalid channel specification%s", + errno == ERANGE ? " (out of range)" : ""); + flags = getchannelflags(val, v); + if (v > 255) { /* treat as frequency */ + mapfreq(chan, v, flags); } else { - chan.ic_freq = IEEE80211_CHAN_ANY; + mapchan(chan, v, flags); } +} + +static void +set80211channel(const char *val, int d, int s, const struct afswtch *rafp) +{ + struct ieee80211_channel chan; + + getchannel(s, &chan, val); set80211(s, IEEE80211_IOC_CURCHAN, 0, sizeof(chan), &chan); } @@ -695,17 +703,8 @@ static void set80211chanswitch(const char *val, int d, int s, const struct afswtch *rafp) { struct ieee80211_chanswitch_req csr; - int v, flags; - memset(&csr, 0, sizeof(csr)); - getchaninfo(s); - v = atoi(val); - flags = getchannelflags(val, v); - if (v > 255) { /* treat as frequency */ - mapfreq(&csr.csa_chan, v, flags); - } else { - mapchan(&csr.csa_chan, v, flags); - } + getchannel(s, &csr.csa_chan, val); csr.csa_mode = 1; csr.csa_count = 5; set80211(s, IEEE80211_IOC_CHANSWITCH, 0, sizeof(csr), &csr); From owner-svn-src-head@FreeBSD.ORG Mon Dec 15 01:18:11 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE3D7106564A; Mon, 15 Dec 2008 01:18:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5898FC1B; Mon, 15 Dec 2008 01:18:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF1IB1H079971; Mon, 15 Dec 2008 01:18:11 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF1IBAo079970; Mon, 15 Dec 2008 01:18:11 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150118.mBF1IBAo079970@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186106 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:18:11 -0000 Author: sam Date: Mon Dec 15 01:18:11 2008 New Revision: 186106 URL: http://svn.freebsd.org/changeset/base/186106 Log: o fix DEBUG sku definition o add definitions for 900MHz radios: Ubiquiti SR9 and XR9, and ZComax GZ-901 Modified: head/etc/regdomain.xml Modified: head/etc/regdomain.xml ============================================================================== --- head/etc/regdomain.xml Mon Dec 15 01:15:15 2008 (r186105) +++ head/etc/regdomain.xml Mon Dec 15 01:18:11 2008 (r186106) @@ -39,7 +39,7 @@ --> DEBUG - 0 + 0x1ff @@ -1080,6 +1080,75 @@ + + + SR9 + 0x0298 + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + + + XR9 + 0x299 + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + + + GZ901 + 0x29a + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + @@ -1201,6 +1270,9 @@ 320 Guatemala + + 5002 ZComax GZ-901 + 340 Honduras @@ -1396,6 +1468,12 @@ 792 Turkey + + 5000 Ubiquiti SR9 + + + 5001 Ubiquiti XR9 + 804 Ukraine @@ -1426,6 +1504,10 @@ 716 Zimbabwe + + + 0 Debug +