From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 00:09:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 853D71065706; Sun, 24 Jan 2010 00:09:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 43BD88FC18; Sun, 24 Jan 2010 00:09:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0O04xQW023892; Sat, 23 Jan 2010 17:04:59 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 23 Jan 2010 17:05:57 -0700 (MST) Message-Id: <20100123.170557.167578749357044632.imp@bsdimp.com> To: peterjeremy@acm.org From: "M. Warner Losh" In-Reply-To: <20100123215945.GF31243@server.vk2pj.dyndns.org> References: <201001230024.o0N0OWEC038553@svn.freebsd.org> <20100123215945.GF31243@server.vk2pj.dyndns.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202850 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 00:09:40 -0000 In message: <20100123215945.GF31243@server.vk2pj.dyndns.org> Peter Jeremy writes: : On 2010-Jan-23 00:24:31 +0000, Warner Losh wrote: : >Author: imp : >Date: Sat Jan 23 00:24:31 2010 : >New Revision: 202850 : >URL: http://svn.freebsd.org/changeset/base/202850 : > : >Log: : > Migrate from old "DDB" style debugger to newer KDB style. : > : >Modified: : > head/sys/mips/cavium/octeon_machdep.c : > : >Modified: head/sys/mips/cavium/octeon_machdep.c : >============================================================================== : >--- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:18:12 2010 (r202849) : >+++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:24:31 2010 (r202850) : >@@ -110,7 +110,7 @@ platform_cpu_init() : > void : > platform_reset(void) : > { : >- ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ : >+ mips_generic_reset(); : > } : : Was this bit intended? It doesn't tally with the log message. Well, it is a bit of leakage, but the change was intentional and should be there. Warner From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 01:06:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3DA21065676; Sun, 24 Jan 2010 01:06:02 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92D2B8FC16; Sun, 24 Jan 2010 01:06:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0O162nF072181; Sun, 24 Jan 2010 01:06:02 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0O162BQ072179; Sun, 24 Jan 2010 01:06:02 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001240106.o0O162BQ072179@svn.freebsd.org> From: Randall Stewart Date: Sun, 24 Jan 2010 01:06:02 +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: r202905 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 01:06:02 -0000 Author: rrs Date: Sun Jan 24 01:06:02 2010 New Revision: 202905 URL: http://svn.freebsd.org/changeset/base/202905 Log: Changes the order of the setting the int happened (inside the lock). Modified: head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Sat Jan 23 23:16:50 2010 (r202904) +++ head/sys/mips/rmi/xlr_machdep.c Sun Jan 24 01:06:02 2010 (r202905) @@ -617,8 +617,8 @@ msgring_process_fast_intr(void *arg) * messages */ disable_msgring_int(NULL); - it->i_pending = 1; thread_lock(td); + it->i_pending = 1; if (TD_AWAITING_INTR(td)) { CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid, p->p_comm); From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 02:59:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C169106566B; Sun, 24 Jan 2010 02:59:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A4078FC08; Sun, 24 Jan 2010 02:59:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0O2xM2q096981; Sun, 24 Jan 2010 02:59:22 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0O2xMWb096979; Sun, 24 Jan 2010 02:59:22 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001240259.o0O2xMWb096979@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 24 Jan 2010 02:59:22 +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: r202908 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 02:59:22 -0000 Author: gonzo Date: Sun Jan 24 02:59:22 2010 New Revision: 202908 URL: http://svn.freebsd.org/changeset/base/202908 Log: - Copy symbol-related tables (.symtab and .strtab) to the end of relocated kernel. We use magic number to signal kernel that symbol data is present. Modified: head/sys/mips/include/elf.h head/sys/mips/mips/elf_trampoline.c Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Sun Jan 24 02:33:14 2010 (r202907) +++ head/sys/mips/include/elf.h Sun Jan 24 02:59:22 2010 (r202908) @@ -256,4 +256,9 @@ __ElfType(Auxinfo); #define ET_DYN_LOAD_ADDR 0x0120000 +/* + * Constant to mark start of symtab/strtab saved by trampoline + */ +#define SYMTAB_MAGIC 0x64656267 + #endif /* !_MACHINE_ELF_H_ */ Modified: head/sys/mips/mips/elf_trampoline.c ============================================================================== --- head/sys/mips/mips/elf_trampoline.c Sun Jan 24 02:33:14 2010 (r202907) +++ head/sys/mips/mips/elf_trampoline.c Sun Jan 24 02:59:22 2010 (r202908) @@ -96,12 +96,17 @@ load_kernel(void * kstart) #ifdef __mips_n64 Elf64_Ehdr *eh; Elf64_Phdr phdr[64] /* XXX */; + Elf64_Phdr shdr[64] /* XXX */; #else Elf32_Ehdr *eh; Elf32_Phdr phdr[64] /* XXX */; + Elf32_Shdr shdr[64] /* XXX */; #endif - int i; + int i, j; void *entry_point; + vm_offset_t lastaddr = 0; + int symtabindex = -1; + int symstrindex = -1; #ifdef __mips_n64 eh = (Elf64_Ehdr *)kstart; @@ -112,6 +117,27 @@ load_kernel(void * kstart) memcpy(phdr, (void *)(kstart + eh->e_phoff ), eh->e_phnum * sizeof(phdr[0])); + memcpy(shdr, (void *)(kstart + eh->e_shoff), + sizeof(*shdr) * eh->e_shnum); + + if (eh->e_shnum * eh->e_shentsize != 0 && eh->e_shoff != 0) { + for (i = 0; i < eh->e_shnum; i++) { + if (shdr[i].sh_type == SHT_SYMTAB) { + /* + * XXX: check if .symtab is in PT_LOAD? + */ + if (shdr[i].sh_offset != 0 && + shdr[i].sh_size != 0) { + symtabindex = i; + symstrindex = shdr[i].sh_link; + } + } + } + } + + /* + * Copy loadable segments + */ for (i = 0; i < eh->e_phnum; i++) { volatile char c; @@ -120,12 +146,44 @@ load_kernel(void * kstart) memcpy((void *)(phdr[i].p_vaddr), (void*)(kstart + phdr[i].p_offset), phdr[i].p_filesz); + /* Clean space from oversized segments, eg: bss. */ if (phdr[i].p_filesz < phdr[i].p_memsz) bzero((void *)(phdr[i].p_vaddr + phdr[i].p_filesz), phdr[i].p_memsz - phdr[i].p_filesz); + + if (lastaddr < phdr[i].p_vaddr + phdr[i].p_memsz) + lastaddr = phdr[i].p_vaddr + phdr[i].p_memsz; } + /* Now grab the symbol tables. */ + if (symtabindex >= 0 && symstrindex >= 0) { + *(Elf_Size *)lastaddr = SYMTAB_MAGIC; + lastaddr += sizeof(Elf_Size); + *(Elf_Size *)lastaddr = shdr[symtabindex].sh_size + + shdr[symstrindex].sh_size + 2*sizeof(Elf_Size); + lastaddr += sizeof(Elf_Size); + /* .symtab size */ + *(Elf_Size *)lastaddr = shdr[symtabindex].sh_size; + lastaddr += sizeof(shdr[symtabindex].sh_size); + /* .symtab data */ + memcpy((void*)lastaddr, + shdr[symtabindex].sh_offset + kstart, + shdr[symtabindex].sh_size); + lastaddr += shdr[symtabindex].sh_size; + + /* .strtab size */ + *(Elf_Size *)lastaddr = shdr[symstrindex].sh_size; + lastaddr += sizeof(shdr[symstrindex].sh_size); + + /* .strtab data */ + memcpy((void*)lastaddr, + shdr[symstrindex].sh_offset + kstart, + shdr[symstrindex].sh_size); + } else + /* Do not take any chances */ + *(Elf_Size *)lastaddr = 0; + return entry_point; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 03:10:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04F5B106566C; Sun, 24 Jan 2010 03:10:49 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD46C8FC1F; Sun, 24 Jan 2010 03:10:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0O3AmNS099776; Sun, 24 Jan 2010 03:10:48 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0O3AmVo099773; Sun, 24 Jan 2010 03:10:48 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001240310.o0O3AmVo099773@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 24 Jan 2010 03:10: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: r202909 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 03:10:49 -0000 Author: gonzo Date: Sun Jan 24 03:10:48 2010 New Revision: 202909 URL: http://svn.freebsd.org/changeset/base/202909 Log: - Introduce kernel_kseg0_end variable that marks first address in KSEG0 available for use. All data below this address considered to be used by kernel. Along with kernel own data it might be symbol tables prepeared by trampoline code, boot loader service data passed for further analysis by kernel, etc... By default kernel_kseg0_end points to the end of loaded kernel. - Introduce mips_postboot_fixup function. It checks for symbol information copied by ELF trampoline and passes it to KDB Modified: head/sys/mips/include/md_var.h head/sys/mips/mips/machdep.c Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Sun Jan 24 02:59:22 2010 (r202908) +++ head/sys/mips/include/md_var.h Sun Jan 24 03:10:48 2010 (r202909) @@ -44,6 +44,7 @@ extern char sigcode[]; extern int szsigcode, szosigcode; extern vm_offset_t kstack0; +extern vm_offset_t kernel_kseg0_end; void MipsSaveCurFPState(struct thread *); void fork_trampoline(void); @@ -69,6 +70,7 @@ void cpu_identify(void); void mips_cpu_init(void); void mips_pcpu0_init(void); void mips_proc0_init(void); +void mips_postboot_fixup(void); /* Platform call-downs. */ void platform_identify(void); Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Sun Jan 24 02:59:22 2010 (r202908) +++ head/sys/mips/mips/machdep.c Sun Jan 24 03:10:48 2010 (r202909) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -151,9 +152,18 @@ extern char MipsTLBMiss[], MipsTLBMissEn extern char MipsCache[], MipsCacheEnd[]; extern char edata[], end[]; +#ifdef DDB +extern vm_offset_t ksym_start, ksym_end; +#endif u_int32_t bootdev; struct bootinfo bootinfo; +/* + * First kseg0 address available for use. By default it's equal to &end. + * But in some cases there might be additional data placed right after + * _end by loader or ELF trampoline. + */ +vm_offset_t kernel_kseg0_end = (vm_offset_t)&end; static void cpu_startup(void *dummy) @@ -360,6 +370,29 @@ mips_vector_init(void) } /* + * Fix kernel_kseg0_end address in case trampoline placed debug sympols + * data there + */ +void +mips_postboot_fixup(void) +{ +#ifdef DDB + Elf_Size *trampoline_data = (Elf_Size*)kernel_kseg0_end; + Elf_Size symtabsize = 0; + + if (trampoline_data[0] == SYMTAB_MAGIC) { + symtabsize = trampoline_data[1]; + kernel_kseg0_end += 2 * sizeof(Elf_Size); + /* start of .symtab */ + ksym_start = kernel_kseg0_end; + kernel_kseg0_end += symtabsize; + /* end of .strtab */ + ksym_end = kernel_kseg0_end; + } +#endif +} + +/* * Many SoCs have a means to reset the core itself. Others do not, or * the method is unknown to us. For those cases, we jump to the mips * reset vector and hope for the best. This works well in practice. From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 08:59:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BE33106568B; Sun, 24 Jan 2010 08:59:34 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE69C8FC08; Sun, 24 Jan 2010 08:59:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0O8xXdw077140; Sun, 24 Jan 2010 08:59:33 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0O8xX9i077138; Sun, 24 Jan 2010 08:59:33 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201001240859.o0O8xX9i077138@svn.freebsd.org> From: Max Khon Date: Sun, 24 Jan 2010 08:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202911 - stable/8/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 08:59:34 -0000 Author: fjoe Date: Sun Jan 24 08:59:33 2010 New Revision: 202911 URL: http://svn.freebsd.org/changeset/base/202911 Log: MFC: Send link state change control messages to "orphans" hook as well. Modified: stable/8/sys/netgraph/ng_ether.c Modified: stable/8/sys/netgraph/ng_ether.c ============================================================================== --- stable/8/sys/netgraph/ng_ether.c Sun Jan 24 05:23:08 2010 (r202910) +++ stable/8/sys/netgraph/ng_ether.c Sun Jan 24 08:59:33 2010 (r202911) @@ -359,9 +359,6 @@ ng_ether_link_state(struct ifnet *ifp, i struct ng_mesg *msg; int cmd, dummy_error = 0; - if (priv->lower == NULL) - return; - if (state == LINK_STATE_UP) cmd = NGM_LINK_IS_UP; else if (state == LINK_STATE_DOWN) @@ -369,9 +366,16 @@ ng_ether_link_state(struct ifnet *ifp, i else return; - NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); - if (msg != NULL) - NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0); + if (priv->lower != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0); + } + if (priv->orphan != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->orphan, 0); + } } /****************************************************************** From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 10:08:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB1AE106566B; Sun, 24 Jan 2010 10:08:54 +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 B7F598FC0C; Sun, 24 Jan 2010 10:08:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OA8sL5092398; Sun, 24 Jan 2010 10:08:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OA8sZ0092388; Sun, 24 Jan 2010 10:08:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001241008.o0OA8sZ0092388@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 24 Jan 2010 10:08:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202914 - in stable/7/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 10:08:55 -0000 Author: bz Date: Sun Jan 24 10:08:54 2010 New Revision: 202914 URL: http://svn.freebsd.org/changeset/base/202914 Log: MFC r194777: Make callers to in6_selectsrc() and in6_pcbladdr() pass in memory to save the selected source address rather than returning an unreferenced copy to a pointer that might long be gone by the time we use the pointer for anything meaningful. Asked for by: rwatson Reviewed by: rwatson Approved by: re (kensmith) Modified: stable/7/sys/netinet/tcp_usrreq.c stable/7/sys/netinet6/icmp6.c stable/7/sys/netinet6/in6_pcb.c stable/7/sys/netinet6/in6_pcb.h stable/7/sys/netinet6/in6_src.c stable/7/sys/netinet6/ip6_var.h stable/7/sys/netinet6/nd6_nbr.c stable/7/sys/netinet6/raw_ip6.c stable/7/sys/netinet6/udp6_usrreq.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/7/sys/netinet/tcp_usrreq.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet/tcp_usrreq.c Sun Jan 24 10:08:54 2010 (r202914) @@ -1111,7 +1111,7 @@ tcp6_connect(struct tcpcb *tp, struct so struct inpcb *inp = tp->t_inpcb, *oinp; struct socket *so = inp->inp_socket; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; - struct in6_addr *addr6; + struct in6_addr addr6; int error; INP_INFO_WLOCK_ASSERT(&tcbinfo); @@ -1135,13 +1135,13 @@ tcp6_connect(struct tcpcb *tp, struct so oinp = in6_pcblookup_hash(inp->inp_pcbinfo, &sin6->sin6_addr, sin6->sin6_port, IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) - ? addr6 + ? &addr6 : &inp->in6p_laddr, inp->inp_lport, 0, NULL); if (oinp) return EADDRINUSE; if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) - inp->in6p_laddr = *addr6; + inp->in6p_laddr = addr6; inp->in6p_faddr = sin6->sin6_addr; inp->inp_fport = sin6->sin6_port; /* update flowinfo - draft-itojun-ipv6-flowlabel-api-00 */ Modified: stable/7/sys/netinet6/icmp6.c ============================================================================== --- stable/7/sys/netinet6/icmp6.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/icmp6.c Sun Jan 24 10:08:54 2010 (r202914) @@ -2032,7 +2032,7 @@ icmp6_reflect(struct mbuf *m, size_t off int plen; int type, code; struct ifnet *outif = NULL; - struct in6_addr origdst, *src = NULL; + struct in6_addr origdst, src, *srcp = NULL; /* too short to reflect */ if (off < sizeof(struct ip6_hdr)) { @@ -2100,7 +2100,7 @@ icmp6_reflect(struct mbuf *m, size_t off if ((ia = ip6_getdstifaddr(m))) { if (!(ia->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) - src = &ia->ia_addr.sin6_addr; + srcp = &ia->ia_addr.sin6_addr; } else { struct sockaddr_in6 d; @@ -2113,12 +2113,12 @@ icmp6_reflect(struct mbuf *m, size_t off if (ia && !(ia->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) { - src = &ia->ia_addr.sin6_addr; + srcp = &ia->ia_addr.sin6_addr; } } } - if (src == NULL) { + if (srcp == NULL) { int e; struct sockaddr_in6 sin6; struct route_in6 ro; @@ -2134,10 +2134,10 @@ icmp6_reflect(struct mbuf *m, size_t off sin6.sin6_addr = ip6->ip6_dst; /* zone ID should be embedded */ bzero(&ro, sizeof(ro)); - src = in6_selectsrc(&sin6, NULL, NULL, &ro, NULL, &outif, &e); + e = in6_selectsrc(&sin6, NULL, NULL, &ro, NULL, &outif, &src); if (ro.ro_rt) RTFREE(ro.ro_rt); /* XXX: we could use this */ - if (src == NULL) { + if (e) { char ip6buf[INET6_ADDRSTRLEN]; nd6log((LOG_DEBUG, "icmp6_reflect: source can't be determined: " @@ -2145,9 +2145,10 @@ icmp6_reflect(struct mbuf *m, size_t off ip6_sprintf(ip6buf, &sin6.sin6_addr), e)); goto bad; } + srcp = &src; } - ip6->ip6_src = *src; + ip6->ip6_src = *srcp; ip6->ip6_flow = 0; ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6->ip6_vfc |= IPV6_VERSION; Modified: stable/7/sys/netinet6/in6_pcb.c ============================================================================== --- stable/7/sys/netinet6/in6_pcb.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/in6_pcb.c Sun Jan 24 10:08:54 2010 (r202914) @@ -278,12 +278,13 @@ in6_pcbbind(register struct inpcb *inp, */ int in6_pcbladdr(register struct inpcb *inp, struct sockaddr *nam, - struct in6_addr **plocal_addr6) + struct in6_addr *plocal_addr6) { register struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; int error = 0; struct ifnet *ifp = NULL; int scope_ambiguous = 0; + struct in6_addr in6a; INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); INP_WLOCK_ASSERT(inp); @@ -311,25 +312,25 @@ in6_pcbladdr(register struct inpcb *inp, if ((error = prison_remote_ip6(inp->inp_cred, &sin6->sin6_addr)) != 0) return (error); - /* - * XXX: in6_selectsrc might replace the bound local address - * with the address specified by setsockopt(IPV6_PKTINFO). - * Is it the intended behavior? - */ - *plocal_addr6 = in6_selectsrc(sin6, inp->in6p_outputopts, - inp, NULL, - inp->inp_cred, - &ifp, &error); + error = in6_selectsrc(sin6, inp->in6p_outputopts, + inp, NULL, inp->inp_cred, &ifp, &in6a); + if (error) + return (error); + if (ifp && scope_ambiguous && (error = in6_setscope(&sin6->sin6_addr, ifp, NULL)) != 0) { return(error); } - if (*plocal_addr6 == NULL) { - if (error == 0) - error = EADDRNOTAVAIL; - return (error); - } + /* + * Do not update this earlier, in case we return with an error. + * + * XXX: this in6_selectsrc result might replace the bound local + * aaddress with the address specified by setsockopt(IPV6_PKTINFO). + * Is it the intended behavior? + */ + *plocal_addr6 = in6a; + /* * Don't do pcblookup call here; return interface in * plocal_addr6 @@ -350,8 +351,8 @@ int in6_pcbconnect(register struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) { - struct in6_addr *addr6; register struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; + struct in6_addr addr6; int error; INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); @@ -367,7 +368,7 @@ in6_pcbconnect(register struct inpcb *in if (in6_pcblookup_hash(inp->inp_pcbinfo, &sin6->sin6_addr, sin6->sin6_port, IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) - ? addr6 : &inp->in6p_laddr, + ? &addr6 : &inp->in6p_laddr, inp->inp_lport, 0, NULL) != NULL) { return (EADDRINUSE); } @@ -377,7 +378,7 @@ in6_pcbconnect(register struct inpcb *in if (error) return (error); } - inp->in6p_laddr = *addr6; + inp->in6p_laddr = addr6; } inp->in6p_faddr = sin6->sin6_addr; inp->inp_fport = sin6->sin6_port; Modified: stable/7/sys/netinet6/in6_pcb.h ============================================================================== --- stable/7/sys/netinet6/in6_pcb.h Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/in6_pcb.h Sun Jan 24 10:08:54 2010 (r202914) @@ -74,8 +74,7 @@ void in6_losing __P((struct inpcb *)); int in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct ucred *)); int in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct ucred *)); void in6_pcbdisconnect __P((struct inpcb *)); -int in6_pcbladdr __P((struct inpcb *, struct sockaddr *, - struct in6_addr **)); +int in6_pcbladdr(struct inpcb *, struct sockaddr *, struct in6_addr *); struct inpcb * in6_pcblookup_local __P((struct inpcbinfo *, struct in6_addr *, u_short, int, Modified: stable/7/sys/netinet6/in6_src.c ============================================================================== --- stable/7/sys/netinet6/in6_src.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/in6_src.c Sun Jan 24 10:08:54 2010 (r202914) @@ -168,10 +168,10 @@ static struct in6_addrpolicy *match_addr goto out; /* XXX: we can't use 'break' here */ \ } while(0) -struct in6_addr * +int in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct inpcb *inp, struct route_in6 *ro, struct ucred *cred, - struct ifnet **ifpp, int *errorp) + struct ifnet **ifpp, struct in6_addr *srcp) { struct in6_addr dst; struct ifnet *ifp = NULL; @@ -181,10 +181,12 @@ in6_selectsrc(struct sockaddr_in6 *dstso struct in6_addrpolicy *dst_policy = NULL, *best_policy = NULL; u_int32_t odstzone; int prefer_tempaddr; + int error; struct ip6_moptions *mopts; + KASSERT(srcp != NULL, ("%s: srcp is NULL", __func__)); + dst = dstsock->sin6_addr; /* make a copy for local operation */ - *errorp = 0; if (ifpp) *ifpp = NULL; @@ -207,10 +209,8 @@ in6_selectsrc(struct sockaddr_in6 *dstso struct in6_ifaddr *ia6; /* get the outgoing interface */ - if ((*errorp = in6_selectif(dstsock, opts, mopts, ro, &ifp)) - != 0) { - return (NULL); - } + if ((error = in6_selectif(dstsock, opts, mopts, ro, &ifp)) != 0) + return (error); /* * determine the appropriate zone id of the source based on @@ -224,25 +224,25 @@ in6_selectsrc(struct sockaddr_in6 *dstso srcsock.sin6_len = sizeof(srcsock); srcsock.sin6_addr = pi->ipi6_addr; if (ifp) { - *errorp = in6_setscope(&srcsock.sin6_addr, ifp, NULL); - if (*errorp != 0) - return (NULL); + error = in6_setscope(&srcsock.sin6_addr, ifp, NULL); + if (error) + return (error); } - if (cred != NULL && (*errorp = prison_local_ip6(cred, + if (cred != NULL && (error = prison_local_ip6(cred, &srcsock.sin6_addr, (inp != NULL && (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) - return (NULL); + return (error); ia6 = (struct in6_ifaddr *)ifa_ifwithaddr((struct sockaddr *)(&srcsock)); if (ia6 == NULL || (ia6->ia6_flags & (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY))) { - *errorp = EADDRNOTAVAIL; - return (NULL); + return (EADDRNOTAVAIL); } pi->ipi6_addr = srcsock.sin6_addr; /* XXX: this overrides pi */ if (ifpp) *ifpp = ifp; - return (&ia6->ia_addr.sin6_addr); + bcopy(&ia6->ia_addr.sin6_addr, srcp, sizeof(*srcp)); + return (0); } /* @@ -250,10 +250,11 @@ in6_selectsrc(struct sockaddr_in6 *dstso */ if (inp != NULL && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (cred != NULL && - (*errorp = prison_local_ip6(cred, &inp->in6p_laddr, + (error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) - return (NULL); - return (&inp->in6p_laddr); + return (error); + bcopy(&inp->in6p_laddr, srcp, sizeof(*srcp)); + return (0); } /* @@ -261,16 +262,16 @@ in6_selectsrc(struct sockaddr_in6 *dstso * the outgoing interface and the destination address. */ /* get the outgoing interface */ - if ((*errorp = in6_selectif(dstsock, opts, mopts, ro, &ifp)) != 0) - return (NULL); + if ((error = in6_selectif(dstsock, opts, mopts, ro, &ifp)) != 0) + return (error); #ifdef DIAGNOSTIC if (ifp == NULL) /* this should not happen */ panic("in6_selectsrc: NULL ifp"); #endif - *errorp = in6_setscope(&dst, ifp, &odstzone); - if (*errorp != 0) - return (NULL); + error = in6_setscope(&dst, ifp, &odstzone); + if (error) + return (error); for (ia = in6_ifaddr; ia; ia = ia->ia_next) { int new_scope = -1, new_matchlen = -1; @@ -449,15 +450,14 @@ in6_selectsrc(struct sockaddr_in6 *dstso break; } - if ((ia = ia_best) == NULL) { - *errorp = EADDRNOTAVAIL; - return (NULL); - } + if ((ia = ia_best) == NULL) + return (EADDRNOTAVAIL); if (ifpp) *ifpp = ifp; - return (&ia->ia_addr.sin6_addr); + bcopy(&ia->ia_addr.sin6_addr, srcp, sizeof(*srcp)); + return (0); } /* Modified: stable/7/sys/netinet6/ip6_var.h ============================================================================== --- stable/7/sys/netinet6/ip6_var.h Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/ip6_var.h Sun Jan 24 10:08:54 2010 (r202914) @@ -389,9 +389,9 @@ int rip6_usrreq __P((struct socket *, int dest6_input __P((struct mbuf **, int *, int)); int none_input __P((struct mbuf **, int *, int)); -struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *, struct ip6_pktopts *, +int in6_selectsrc(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *inp, struct route_in6 *, struct ucred *cred, - struct ifnet **, int *)); + struct ifnet **, struct in6_addr *); int in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct rtentry **, int)); Modified: stable/7/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/7/sys/netinet6/nd6_nbr.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/nd6_nbr.c Sun Jan 24 10:08:54 2010 (r202914) @@ -473,9 +473,9 @@ nd6_ns_output(struct ifnet *ifp, const s dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - src = in6_selectsrc(&dst_sa, NULL, - NULL, &ro, NULL, NULL, &error); - if (src == NULL) { + error = in6_selectsrc(&dst_sa, NULL, + NULL, &ro, NULL, NULL, &src_in); + if (error) { char ip6buf[INET6_ADDRSTRLEN]; nd6log((LOG_DEBUG, "nd6_ns_output: source can't be " @@ -484,6 +484,7 @@ nd6_ns_output(struct ifnet *ifp, const s error)); goto bad; } + src = &src_in; } } else { /* @@ -883,7 +884,7 @@ nd6_na_output(struct ifnet *ifp, const s struct ip6_hdr *ip6; struct nd_neighbor_advert *nd_na; struct ip6_moptions im6o; - struct in6_addr *src, daddr6; + struct in6_addr src, daddr6; struct sockaddr_in6 dst_sa; int icmp6len, maxlen, error; caddr_t mac = NULL; @@ -956,15 +957,15 @@ nd6_na_output(struct ifnet *ifp, const s * Select a source whose scope is the same as that of the dest. */ bcopy(&dst_sa, &ro.ro_dst, sizeof(dst_sa)); - src = in6_selectsrc(&dst_sa, NULL, NULL, &ro, NULL, NULL, &error); - if (src == NULL) { + error = in6_selectsrc(&dst_sa, NULL, NULL, &ro, NULL, NULL, &src); + if (error) { char ip6buf[INET6_ADDRSTRLEN]; nd6log((LOG_DEBUG, "nd6_na_output: source can't be " "determined: dst=%s, error=%d\n", ip6_sprintf(ip6buf, &dst_sa.sin6_addr), error)); goto bad; } - ip6->ip6_src = *src; + ip6->ip6_src = src; nd_na = (struct nd_neighbor_advert *)(ip6 + 1); nd_na->nd_na_type = ND_NEIGHBOR_ADVERT; nd_na->nd_na_code = 0; Modified: stable/7/sys/netinet6/raw_ip6.c ============================================================================== --- stable/7/sys/netinet6/raw_ip6.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/raw_ip6.c Sun Jan 24 10:08:54 2010 (r202914) @@ -328,7 +328,7 @@ rip6_output(m, va_alist) struct ifnet *oifp = NULL; int type = 0, code = 0; /* for ICMPv6 output statistics only */ int scope_ambiguous = 0; - struct in6_addr *in6a; + struct in6_addr in6a; va_list ap; va_start(ap, m); @@ -389,16 +389,14 @@ rip6_output(m, va_alist) /* * Source address selection. */ - if ((in6a = in6_selectsrc(dstsock, optp, in6p, NULL, so->so_cred, - &oifp, &error)) == NULL) { - if (error == 0) - error = EADDRNOTAVAIL; + error = in6_selectsrc(dstsock, optp, in6p, NULL, so->so_cred, + &oifp, &in6a); + if (error) goto bad; - } - error = prison_get_ip6(in6p->inp_cred, in6a); + error = prison_get_ip6(in6p->inp_cred, &in6a); if (error != 0) goto bad; - ip6->ip6_src = *in6a; + ip6->ip6_src = in6a; if (oifp && scope_ambiguous) { /* @@ -685,7 +683,7 @@ rip6_connect(struct socket *so, struct s { struct inpcb *inp; struct sockaddr_in6 *addr = (struct sockaddr_in6 *)nam; - struct in6_addr *in6a = NULL; + struct in6_addr in6a; struct ifnet *ifp = NULL; int error = 0, scope_ambiguous = 0; @@ -715,13 +713,12 @@ rip6_connect(struct socket *so, struct s INP_INFO_WLOCK(&ripcbinfo); INP_WLOCK(inp); /* Source address selection. XXX: need pcblookup? */ - in6a = in6_selectsrc(addr, inp->in6p_outputopts, - inp, NULL, so->so_cred, - &ifp, &error); - if (in6a == NULL) { + error = in6_selectsrc(addr, inp->in6p_outputopts, + inp, NULL, so->so_cred, &ifp, &in6a); + if (error) { INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&ripcbinfo); - return (error ? error : EADDRNOTAVAIL); + return (error); } /* XXX: see above */ @@ -732,7 +729,7 @@ rip6_connect(struct socket *so, struct s return (error); } inp->in6p_faddr = addr->sin6_addr; - inp->in6p_laddr = *in6a; + inp->in6p_laddr = in6a; soisconnected(so); INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&ripcbinfo); Modified: stable/7/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Sun Jan 24 09:05:43 2010 (r202913) +++ stable/7/sys/netinet6/udp6_usrreq.c Sun Jan 24 10:08:54 2010 (r202914) @@ -481,7 +481,7 @@ udp6_output(struct inpcb *inp, struct mb u_int32_t plen = sizeof(struct udphdr) + ulen; struct ip6_hdr *ip6; struct udphdr *udp6; - struct in6_addr *laddr, *faddr; + struct in6_addr *laddr, *faddr, in6a; struct sockaddr_in6 *sin6 = NULL; struct ifnet *oifp = NULL; int scope_ambiguous = 0; @@ -579,13 +579,16 @@ udp6_output(struct inpcb *inp, struct mb } if (!IN6_IS_ADDR_V4MAPPED(faddr)) { - laddr = in6_selectsrc(sin6, optp, inp, NULL, - td->td_ucred, &oifp, &error); + error = in6_selectsrc(sin6, optp, inp, NULL, + td->td_ucred, &oifp, &in6a); + if (error) + goto release; if (oifp && scope_ambiguous && (error = in6_setscope(&sin6->sin6_addr, oifp, NULL))) { goto release; } + laddr = &in6a; } else laddr = &inp->in6p_laddr; /* XXX */ if (laddr == NULL) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 10:22:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 294A71065670; Sun, 24 Jan 2010 10:22:40 +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 186868FC08; Sun, 24 Jan 2010 10:22:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OAMdRE095580; Sun, 24 Jan 2010 10:22:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OAMdie095578; Sun, 24 Jan 2010 10:22:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001241022.o0OAMdie095578@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 24 Jan 2010 10:22: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: r202915 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 10:22:40 -0000 Author: bz Date: Sun Jan 24 10:22:39 2010 New Revision: 202915 URL: http://svn.freebsd.org/changeset/base/202915 Log: Correct a typo. Submitted by: kensmith MFC after: 3 days Modified: head/sys/netinet6/in6_pcb.c Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Sun Jan 24 10:08:54 2010 (r202914) +++ head/sys/netinet6/in6_pcb.c Sun Jan 24 10:22:39 2010 (r202915) @@ -332,7 +332,7 @@ in6_pcbladdr(register struct inpcb *inp, * Do not update this earlier, in case we return with an error. * * XXX: this in6_selectsrc result might replace the bound local - * aaddress with the address specified by setsockopt(IPV6_PKTINFO). + * address with the address specified by setsockopt(IPV6_PKTINFO). * Is it the intended behavior? */ *plocal_addr6 = in6a; From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 10:35:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDAFB106566C; Sun, 24 Jan 2010 10:35:26 +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 ACB188FC0A; Sun, 24 Jan 2010 10:35:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OAZQ4Q098451; Sun, 24 Jan 2010 10:35:26 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OAZQPb098449; Sun, 24 Jan 2010 10:35:26 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001241035.o0OAZQPb098449@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 24 Jan 2010 10:35: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: r202916 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 10:35:26 -0000 Author: ume Date: Sun Jan 24 10:35:26 2010 New Revision: 202916 URL: http://svn.freebsd.org/changeset/base/202916 Log: Make strsignal(3) thread-safe. MFC after: 2 weeks Modified: head/lib/libc/string/strsignal.c Modified: head/lib/libc/string/strsignal.c ============================================================================== --- head/lib/libc/string/strsignal.c Sun Jan 24 10:22:39 2010 (r202915) +++ head/lib/libc/string/strsignal.c Sun Jan 24 10:35:26 2010 (r202916) @@ -33,22 +33,64 @@ static char sccsid[] = "@(#)strerror.c 8 #include __FBSDID("$FreeBSD$"); +#include "namespace.h" #if defined(NLS) #include #endif - #include #include +#include #include #include +#include "reentrant.h" +#include "un-namespace.h" #define UPREFIX "Unknown signal" +static char sig_ebuf[NL_TEXTMAX]; +static char sig_ebuf_err[NL_TEXTMAX]; +static once_t sig_init_once = ONCE_INITIALIZER; +static thread_key_t sig_key; +static int sig_keycreated = 0; + +static void +sig_keycreate(void) +{ + sig_keycreated = (thr_keycreate(&sig_key, free) == 0); +} + +static char * +sig_tlsalloc(void) +{ + char *ebuf = NULL; + + if (thr_main() != 0) + ebuf = sig_ebuf; + else { + if (thr_once(&sig_init_once, sig_keycreate) != 0 || + !sig_keycreated) + goto thr_err; + if ((ebuf = thr_getspecific(sig_key)) == NULL) { + if ((ebuf = malloc(sizeof(sig_ebuf))) == NULL) + goto thr_err; + if (thr_setspecific(sig_key, ebuf) != 0) { + free(ebuf); + ebuf = NULL; + goto thr_err; + } + } + } +thr_err: + if (ebuf == NULL) + ebuf = sig_ebuf_err; + return (ebuf); +} + /* XXX: negative 'num' ? (REGR) */ char * strsignal(int num) { - static char ebuf[NL_TEXTMAX]; + char *ebuf; char tmp[20]; size_t n; int signum; @@ -60,6 +102,8 @@ strsignal(int num) catd = catopen("libc", NL_CAT_LOCALE); #endif + ebuf = sig_tlsalloc(); + if (num > 0 && num < sys_nsig) { n = strlcpy(ebuf, #if defined(NLS) @@ -67,7 +111,7 @@ strsignal(int num) #else sys_siglist[num], #endif - sizeof(ebuf)); + sizeof(sig_ebuf)); } else { n = strlcpy(ebuf, #if defined(NLS) @@ -75,7 +119,7 @@ strsignal(int num) #else UPREFIX, #endif - sizeof(ebuf)); + sizeof(sig_ebuf)); } signum = num; From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 10:50:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18206106566C; Sun, 24 Jan 2010 10:50:21 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 073C18FC20; Sun, 24 Jan 2010 10:50:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OAoKSK006117; Sun, 24 Jan 2010 10:50:20 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OAoKAt006114; Sun, 24 Jan 2010 10:50:20 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201001241050.o0OAoKAt006114@svn.freebsd.org> From: Remko Lodder Date: Sun, 24 Jan 2010 10:50:20 +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: r202917 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 10:50:21 -0000 Author: remko Date: Sun Jan 24 10:50:20 2010 New Revision: 202917 URL: http://svn.freebsd.org/changeset/base/202917 Log: Add support for the NM10 chipset. PR: kern/143118 Submitted by: Koshin sumitani Approved by: imp (mentor, implicit) MFC after: 3 days Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Sun Jan 24 10:35:26 2010 (r202916) +++ head/sys/dev/ichwd/ichwd.c Sun Jan 24 10:50:20 2010 (r202917) @@ -93,6 +93,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH7DH, "Intel ICH7DH watchdog timer", 7 }, { DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 }, { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 }, + { DEVICEID_NM10, "Intel NM10 watchdog timer", 7 }, { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Sun Jan 24 10:35:26 2010 (r202916) +++ head/sys/dev/ichwd/ichwd.h Sun Jan 24 10:50:20 2010 (r202917) @@ -83,6 +83,7 @@ struct ichwd_softc { #define DEVICEID_ICH7 0x27b8 #define DEVICEID_ICH7DH 0x27b0 #define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc #define DEVICEID_ICH7MDH 0x27bd #define DEVICEID_ICH8 0x2810 #define DEVICEID_ICH8DH 0x2812 From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 11:54:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED74E106566B; Sun, 24 Jan 2010 11:54:32 +0000 (UTC) (envelope-from mckay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC6138FC18; Sun, 24 Jan 2010 11:54:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OBsWa4020195; Sun, 24 Jan 2010 11:54:32 GMT (envelope-from mckay@svn.freebsd.org) Received: (from mckay@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OBsWZ3020193; Sun, 24 Jan 2010 11:54:32 GMT (envelope-from mckay@svn.freebsd.org) Message-Id: <201001241154.o0OBsWZ3020193@svn.freebsd.org> From: Stephen McKay Date: Sun, 24 Jan 2010 11:54:32 +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: r202918 - head/usr.sbin/ctm/ctm_smail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 11:54:33 -0000 Author: mckay Date: Sun Jan 24 11:54:32 2010 New Revision: 202918 URL: http://svn.freebsd.org/changeset/base/202918 Log: Shrink encoded line length from 76 to 72 characters. Some Exchange systems wrap lines over 75 characters long while converting messages to quoted-printable, preventing ctm_rmail from reassembling emailed deltas. For a negligible loss of encoding efficiency, this change allows ctm deltas to once more pass through Exchange undamaged. Modified: head/usr.sbin/ctm/ctm_smail/ctm_smail.c Modified: head/usr.sbin/ctm/ctm_smail/ctm_smail.c ============================================================================== --- head/usr.sbin/ctm/ctm_smail/ctm_smail.c Sun Jan 24 10:50:20 2010 (r202917) +++ head/usr.sbin/ctm/ctm_smail/ctm_smail.c Sun Jan 24 11:54:32 2010 (r202918) @@ -29,7 +29,7 @@ #define DEF_MAX_MSG 64000 /* Default maximum mail msg minus headers. */ -#define LINE_LENGTH 76 /* Chars per encoded line. Divisible by 4. */ +#define LINE_LENGTH 72 /* Chars per encoded line. Divisible by 4. */ int chop_and_send_or_queue(FILE *dfp, char *delta, off_t ctm_size, long max_msg_size, char *mail_alias, char *queue_dir); From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 12:13:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2E971065670; Sun, 24 Jan 2010 12:13:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1C6B8FC1E; Sun, 24 Jan 2010 12:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OCDcJl024414; Sun, 24 Jan 2010 12:13:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OCDcgT024412; Sun, 24 Jan 2010 12:13:38 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001241213.o0OCDcgT024412@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 24 Jan 2010 12:13:38 +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: r202919 - head/sys/amd64/ia32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 12:13:38 -0000 Author: trasz Date: Sun Jan 24 12:13:38 2010 New Revision: 202919 URL: http://svn.freebsd.org/changeset/base/202919 Log: Fix array overflow. This routine is only called from procfs, which is not mounted by default, and I've been unable to trigger a panic without this fix applied anyway. Reviewed by: kib, cperciva Modified: head/sys/amd64/ia32/ia32_reg.c Modified: head/sys/amd64/ia32/ia32_reg.c ============================================================================== --- head/sys/amd64/ia32/ia32_reg.c Sun Jan 24 11:54:32 2010 (r202918) +++ head/sys/amd64/ia32/ia32_reg.c Sun Jan 24 12:13:38 2010 (r202919) @@ -213,8 +213,6 @@ fill_dbregs32(struct thread *td, struct err = fill_dbregs(td, &dr); for (i = 0; i < 8; i++) regs->dr[i] = dr.dr[i]; - for (i = 8; i < 16; i++) - regs->dr[i] = 0; return (err); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 12:22:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F9A1065670; Sun, 24 Jan 2010 12:22:38 +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 B52F98FC0A; Sun, 24 Jan 2010 12:22:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OCMcnD026475; Sun, 24 Jan 2010 12:22:38 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OCMcJT026472; Sun, 24 Jan 2010 12:22:38 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001241222.o0OCMcJT026472@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 24 Jan 2010 12:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202920 - in stable/8/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 12:22:38 -0000 Author: bz Date: Sun Jan 24 12:22:38 2010 New Revision: 202920 URL: http://svn.freebsd.org/changeset/base/202920 Log: MFC r202469: Garbage collect references to the no longer implemented tcp_fasttimo(). Modified: stable/8/sys/netinet/tcp_var.h stable/8/sys/netinet6/in6_proto.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_var.h ============================================================================== --- stable/8/sys/netinet/tcp_var.h Sun Jan 24 12:13:38 2010 (r202919) +++ stable/8/sys/netinet/tcp_var.h Sun Jan 24 12:22:38 2010 (r202920) @@ -639,7 +639,6 @@ int tcp_ctloutput(struct socket *, stru struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); -void tcp_fasttimo(void); void tcp_init(void); #ifdef VIMAGE void tcp_destroy(void); Modified: stable/8/sys/netinet6/in6_proto.c ============================================================================== --- stable/8/sys/netinet6/in6_proto.c Sun Jan 24 12:13:38 2010 (r202919) +++ stable/8/sys/netinet6/in6_proto.c Sun Jan 24 12:22:38 2010 (r202920) @@ -173,7 +173,6 @@ struct ip6protosw inet6sw[] = { .pr_ctloutput = tcp_ctloutput, #ifndef INET /* don't call initialization and timeout routines twice */ .pr_init = tcp_init, - .pr_fasttimo = tcp_fasttimo, .pr_slowtimo = tcp_slowtimo, #endif .pr_drain = tcp_drain, From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 12:35:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AAAC106566B; Sun, 24 Jan 2010 12:35:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 062968FC0A; Sun, 24 Jan 2010 12:35:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OCZau6029466; Sun, 24 Jan 2010 12:35:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OCZaZT029457; Sun, 24 Jan 2010 12:35:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001241235.o0OCZaZT029457@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Jan 2010 12:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202921 - in stable/8: include lib/libc/gen usr.bin/catman usr.bin/makewhatis usr.sbin/lpr/common_source X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 12:35:37 -0000 Author: kib Date: Sun Jan 24 12:35:36 2010 New Revision: 202921 URL: http://svn.freebsd.org/changeset/base/202921 Log: Merge scandir(3) interface update to stable/8. MFC r201512: Modernize scandir(3) and alphasort(3) interfaces according to the IEEE Std 1003.1-2008. MFC r201602: Move scandir(3) and alphasort(3) into XSI namespace. MFC r201604: Use thunks to adapt alphasort-like interface to the comparision function required by qsort() and qsort_r(). MFC r202556 (by ache): Use strcoll() in opendir() and alphasort(). Remove some comments. MFC r202572 (by ache): Revert to using strcmp() for opendir(). MFC r202677 (by ache): Style. MFC r202679 (by ache): Style: rename internal function to opendir_compar(). MFC r202691 (by ache): For alphasort(3) add reference to strcoll(3). MFC r202693 (by ache): Style: reword comment. Modified: stable/8/include/dirent.h stable/8/lib/libc/gen/opendir.c stable/8/lib/libc/gen/scandir.3 stable/8/lib/libc/gen/scandir.c stable/8/usr.bin/catman/catman.c stable/8/usr.bin/makewhatis/makewhatis.c stable/8/usr.sbin/lpr/common_source/lp.h stable/8/usr.sbin/lpr/common_source/rmjob.c Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.sbin/lpr/ (props changed) Modified: stable/8/include/dirent.h ============================================================================== --- stable/8/include/dirent.h Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/include/dirent.h Sun Jan 24 12:35:36 2010 (r202921) @@ -93,9 +93,11 @@ typedef void * DIR; #ifndef _KERNEL __BEGIN_DECLS +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700 +int alphasort(const struct dirent **, const struct dirent **); +#endif #if __BSD_VISIBLE DIR *__opendir2(const char *, int); -int alphasort(const void *, const void *); int getdents(int, char *, int); int getdirentries(int, char *, int, long *); #endif @@ -107,9 +109,10 @@ struct dirent * int readdir_r(DIR *, struct dirent *, struct dirent **); #endif void rewinddir(DIR *); -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700 int scandir(const char *, struct dirent ***, - int (*)(struct dirent *), int (*)(const void *, const void *)); + int (*)(const struct dirent *), int (*)(const struct dirent **, + const struct dirent **)); #endif #if __XSI_VISIBLE void seekdir(DIR *, long); Modified: stable/8/lib/libc/gen/opendir.c ============================================================================== --- stable/8/lib/libc/gen/opendir.c Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/lib/libc/gen/opendir.c Sun Jan 24 12:35:36 2010 (r202921) @@ -92,6 +92,14 @@ __opendir2(const char *name, int flags) return __opendir_common(fd, name, flags); } +static int +opendir_compar(const void *p1, const void *p2) +{ + + return (strcmp((*(const struct dirent **)p1)->d_name, + (*(const struct dirent **)p2)->d_name)); +} + /* * Common routine for opendir(3), __opendir2(3) and fdopendir(3). */ @@ -240,7 +248,8 @@ __opendir_common(int fd, const char *nam /* * This sort must be stable. */ - mergesort(dpv, n, sizeof(*dpv), alphasort); + mergesort(dpv, n, sizeof(*dpv), + opendir_compar); dpv[n] = NULL; xp = NULL; Modified: stable/8/lib/libc/gen/scandir.3 ============================================================================== --- stable/8/lib/libc/gen/scandir.3 Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/lib/libc/gen/scandir.3 Sun Jan 24 12:35:36 2010 (r202921) @@ -28,7 +28,7 @@ .\" @(#)scandir.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd January 3, 2010 .Dt SCANDIR 3 .Os .Sh NAME @@ -38,12 +38,11 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In dirent.h .Ft int -.Fn scandir "const char *dirname" "struct dirent ***namelist" "int \\*(lp*select\\*(rp\\*(lpstruct dirent *\\*(rp" "int \\*(lp*compar\\*(rp\\*(lpconst void *, const void *\\*(rp" +.Fn scandir "const char *dirname" "struct dirent ***namelist" "int \\*(lp*select\\*(rp\\*(lpconst struct dirent *\\*(rp" "int \\*(lp*compar\\*(rp\\*(lpconst struct dirent **, const struct dirent **\\*(rp" .Ft int -.Fn alphasort "const void *d1" "const void *d2" +.Fn alphasort "const struct dirent **d1" "const struct dirent **d2" .Sh DESCRIPTION The .Fn scandir @@ -82,7 +81,8 @@ The function is a routine which can be used for the .Fa compar -argument to sort the array alphabetically. +argument to sort the array alphabetically using +.Xr strcoll 3 . .Pp The memory allocated for the array can be deallocated with .Xr free 3 , @@ -95,7 +95,8 @@ cannot allocate enough memory to hold al .Xr directory 3 , .Xr malloc 3 , .Xr qsort 3 , -.Xr dir 5 +.Xr dir 5 , +.Xr strcoll 3 .Sh HISTORY The .Fn scandir Modified: stable/8/lib/libc/gen/scandir.c ============================================================================== --- stable/8/lib/libc/gen/scandir.c Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/lib/libc/gen/scandir.c Sun Jan 24 12:35:36 2010 (r202921) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +static int alphasort_thunk(void *thunk, const void *p1, const void *p2); + /* * The DIRSIZ macro is the minimum record length which will hold the directory * entry. This requires the amount of space in struct dirent without the @@ -58,11 +60,9 @@ __FBSDID("$FreeBSD$"); (((dp)->d_namlen + 1 + 3) &~ 3)) int -scandir(dirname, namelist, select, dcomp) - const char *dirname; - struct dirent ***namelist; - int (*select)(struct dirent *); - int (*dcomp)(const void *, const void *); +scandir(const char *dirname, struct dirent ***namelist, + int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, + const struct dirent **)) { struct dirent *d, *p, **names = NULL; size_t nitems = 0; @@ -111,26 +111,35 @@ scandir(dirname, namelist, select, dcomp } closedir(dirp); if (nitems && dcomp != NULL) - qsort(names, nitems, sizeof(struct dirent *), dcomp); + qsort_r(names, nitems, sizeof(struct dirent *), + &dcomp, alphasort_thunk); *namelist = names; - return(nitems); + return (nitems); fail: while (nitems > 0) free(names[--nitems]); free(names); closedir(dirp); - return -1; + return (-1); } /* * Alphabetic order comparison routine for those who want it. + * POSIX 2008 requires that alphasort() uses strcoll(). */ int -alphasort(d1, d2) - const void *d1; - const void *d2; +alphasort(const struct dirent **d1, const struct dirent **d2) +{ + + return (strcoll((*d1)->d_name, (*d2)->d_name)); +} + +static int +alphasort_thunk(void *thunk, const void *p1, const void *p2) { - return(strcmp((*(struct dirent **)d1)->d_name, - (*(struct dirent **)d2)->d_name)); + int (*dc)(const struct dirent **, const struct dirent **); + + dc = *(int (**)(const struct dirent **, const struct dirent **))thunk; + return (dc((const struct dirent **)p1, (const struct dirent **)p2)); } Modified: stable/8/usr.bin/catman/catman.c ============================================================================== --- stable/8/usr.bin/catman/catman.c Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/usr.bin/catman/catman.c Sun Jan 24 12:35:36 2010 (r202921) @@ -589,9 +589,15 @@ process_section(char *mandir, char *sect } static int -select_sections(struct dirent *entry) +select_sections(const struct dirent *entry) { - return directory_type(entry->d_name) == MAN_SECTION_DIR; + char *name; + int ret; + + name = strdup(entry->d_name); + ret = directory_type(name) == MAN_SECTION_DIR; + free(name); + return (ret); } /* Modified: stable/8/usr.bin/makewhatis/makewhatis.c ============================================================================== --- stable/8/usr.bin/makewhatis/makewhatis.c Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/usr.bin/makewhatis/makewhatis.c Sun Jan 24 12:35:36 2010 (r202921) @@ -879,9 +879,9 @@ process_section(char *section_dir) * Returns whether the directory entry is a man page section. */ static int -select_sections(struct dirent *entry) +select_sections(const struct dirent *entry) { - char *p = &entry->d_name[3]; + const char *p = &entry->d_name[3]; if (strncmp(entry->d_name, "man", 3) != 0) return 0; Modified: stable/8/usr.sbin/lpr/common_source/lp.h ============================================================================== --- stable/8/usr.sbin/lpr/common_source/lp.h Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/usr.sbin/lpr/common_source/lp.h Sun Jan 24 12:35:36 2010 (r202921) @@ -280,7 +280,7 @@ void inform(const struct printer *_pp, void init_printer(struct printer *_pp); void init_request(struct request *_rp); int inlist(char *_uname, char *_cfile); -int iscf(struct dirent *_d); +int iscf(const struct dirent *_d); void ldump(const char *_nfile, const char *_datafile, int _copies); void lastprinter(void); int lockchk(struct printer *_pp, char *_slockf); Modified: stable/8/usr.sbin/lpr/common_source/rmjob.c ============================================================================== --- stable/8/usr.sbin/lpr/common_source/rmjob.c Sun Jan 24 12:22:38 2010 (r202920) +++ stable/8/usr.sbin/lpr/common_source/rmjob.c Sun Jan 24 12:35:36 2010 (r202921) @@ -384,7 +384,7 @@ rmremote(const struct printer *pp) * Return 1 if the filename begins with 'cf' */ int -iscf(struct dirent *d) +iscf(const struct dirent *d) { return(d->d_name[0] == 'c' && d->d_name[1] == 'f'); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 12:37:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BC3106566B; Sun, 24 Jan 2010 12:37:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 663858FC08; Sun, 24 Jan 2010 12:37:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OCbUZm029921; Sun, 24 Jan 2010 12:37:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OCbUmL029919; Sun, 24 Jan 2010 12:37:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001241237.o0OCbUmL029919@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Jan 2010 12:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202922 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 12:37:30 -0000 Author: kib Date: Sun Jan 24 12:37:30 2010 New Revision: 202922 URL: http://svn.freebsd.org/changeset/base/202922 Log: Bump __FreeBSD_version for scandir(3) and alphasort(3) interface changes. Modified: stable/8/sys/sys/param.h Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Sun Jan 24 12:35:36 2010 (r202921) +++ stable/8/sys/sys/param.h Sun Jan 24 12:37:30 2010 (r202922) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 800500 /* Master, propagated to newvers */ +#define __FreeBSD_version 800501 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 13:30:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8F9E106566B; Sun, 24 Jan 2010 13:30:59 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id A9C2A8FC14; Sun, 24 Jan 2010 13:30:59 +0000 (UTC) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id A52731DD643; Sun, 24 Jan 2010 14:30:58 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 1677) id 8C77B73F9F; Sun, 24 Jan 2010 14:30:58 +0100 (CET) Date: Sun, 24 Jan 2010 14:30:58 +0100 From: Jilles Tjoelker To: Doug Barton Message-ID: <20100124133058.GA34275@stack.nl> References: <201001231731.o0NHVDNY071237@svn.freebsd.org> <4B5B565C.3020604@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B5B565C.3020604@FreeBSD.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, Antoine Brodin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r202892 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 13:31:00 -0000 On Sat, Jan 23, 2010 at 12:04:44PM -0800, Doug Barton wrote: > On 01/23/10 09:31, Antoine Brodin wrote: > > Author: antoine > > Date: Sat Jan 23 17:31:13 2010 > > New Revision: 202892 > > URL: http://svn.freebsd.org/changeset/base/202892 > > Log: > > Unbreak world WITHOUT_OPENSSL: > > the new dc(1) depends on crypto(3) and bc(1) depends on dc(1). > The dependency on crytpo(3) seems problematic. What's the nature of the > dependency and how hard would it be to work around? The new dc(1) seems to use openssl's bn(3) multiprecision integer functions to implement its multiprecision floating point arithmetic, so the dependency seems fairly fundamental. In the light of this, the size of the binary compared to the GNU one seems a bit disappointing to me. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:04:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B9C2106568B; Sun, 24 Jan 2010 14:04:39 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9D98FC1A; Sun, 24 Jan 2010 14:04:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OE4cva049177; Sun, 24 Jan 2010 14:04:38 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OE4cxR049175; Sun, 24 Jan 2010 14:04:38 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001241404.o0OE4cxR049175@svn.freebsd.org> From: Antoine Brodin Date: Sun, 24 Jan 2010 14:04:38 +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: r202923 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:04:39 -0000 Author: antoine Date: Sun Jan 24 14:04:38 2010 New Revision: 202923 URL: http://svn.freebsd.org/changeset/base/202923 Log: Add files to remove when MK_CPP=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 12:37:30 2010 (r202922) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:04:38 2010 (r202923) @@ -624,9 +624,10 @@ OLD_FILES+=usr/share/man/man8/zfs.8.gz OLD_FILES+=usr/share/man/man8/zpool.8.gz .endif -#.if ${MK_CPP} == no -# to be filled in -#.endif +.if ${MK_CPP} == no +OLD_FILES+=usr/bin/cpp +OLD_FILES+=usr/share/man/man1/cpp.1.gz +.endif #.if ${MK_CRYPT} == no # to be filled in From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:05:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B6AF106568B; Sun, 24 Jan 2010 14:05:56 +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 67ED98FC08; Sun, 24 Jan 2010 14:05:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OE5uAj049487; Sun, 24 Jan 2010 14:05:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OE5u9m049481; Sun, 24 Jan 2010 14:05:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001241405.o0OE5u9m049481@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 24 Jan 2010 14:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202924 - in stable/7: sys/kern sys/netinet sys/netinet6 sys/sys usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:05:56 -0000 Author: bz Date: Sun Jan 24 14:05:56 2010 New Revision: 202924 URL: http://svn.freebsd.org/changeset/base/202924 Log: MFC r202468: Add security.jail.ip4_saddrsel/ip6_nosaddrsel sysctls to control whether to use source address selection (default) or the primary jail address for unbound outgoing connections. This is intended to be used by people upgrading from single-IP jails to multi-IP jails but not having to change firewall rules, application ACLs, ... but to force their connections (unless otherwise changed) to the primry jail IP they had been used for years, as well as for people prefering to implement similar policies. Note that for IPv6, if configured incorrectly, this might lead to scope violations, which single-IPv6 jails could as well, as by the design of jails. [1] Note that in contrast to FreeBSD 8.x and newer, where we have per-jail options, the sysctls are global for all jails. Reviewed by: jamie, hrs (ipv6 part) [for HEAD] Pointed out by: hrs [1] Tested by: Jase Thew (bazerka beardz.net) (IPv4) Approved by: re (kib) Modified: stable/7/sys/kern/kern_jail.c stable/7/sys/netinet/in_pcb.c stable/7/sys/netinet6/in6_src.c stable/7/sys/sys/jail.h stable/7/usr.sbin/jail/jail.8 Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/usr.sbin/jail/ (props changed) Modified: stable/7/sys/kern/kern_jail.c ============================================================================== --- stable/7/sys/kern/kern_jail.c Sun Jan 24 14:04:38 2010 (r202923) +++ stable/7/sys/kern/kern_jail.c Sun Jan 24 14:05:56 2010 (r202924) @@ -95,6 +95,22 @@ SYSCTL_INT(_security_jail, OID_AUTO, all &jail_allow_raw_sockets, 0, "Prison root can create raw sockets"); +#ifdef INET +static int jail_ip4_saddrsel = 1; +SYSCTL_INT(_security_jail, OID_AUTO, ip4_saddrsel, CTLFLAG_RW, + &jail_ip4_saddrsel, 0, + "Do (not) use IPv4 source address selection rather than the " + "primary jail IPv4 address."); +#endif + +#ifdef INET6 +static int jail_ip6_saddrsel = 1; +SYSCTL_INT(_security_jail, OID_AUTO, ip6_saddrsel, CTLFLAG_RW, + &jail_ip6_saddrsel, 0, + "Do (not) use IPv6 source address selection rather than the " + "primary jail IPv6 address."); +#endif + int jail_chflags_allowed = 0; SYSCTL_INT(_security_jail, OID_AUTO, chflags_allowed, CTLFLAG_RW, &jail_chflags_allowed, 0, @@ -867,6 +883,39 @@ prison_get_ip4(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv4 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv4. + */ +int +prison_saddrsel_ip4(struct ucred *cred, struct in_addr *ia) +{ + struct in_addr lia; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + if (jail_ip4_saddrsel != 0) + return (1); + + lia.s_addr = INADDR_ANY; + error = prison_get_ip4(cred, &lia); + if (error) + return (error); + if (lia.s_addr == INADDR_ANY) + return (1); + + ia->s_addr = lia.s_addr; + return (0); +} + +/* * Make sure our (source) address is set to something meaningful to this * jail. * @@ -1013,6 +1062,39 @@ prison_get_ip6(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv6 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv6. + */ +int +prison_saddrsel_ip6(struct ucred *cred, struct in6_addr *ia6) +{ + struct in6_addr lia6; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + if (jail_ip6_saddrsel != 0) + return (1); + + lia6 = in6addr_any; + error = prison_get_ip6(cred, &lia6); + if (error) + return (error); + if (IN6_IS_ADDR_UNSPECIFIED(&lia6)) + return (1); + + bcopy(&lia6, ia6, sizeof(struct in6_addr)); + return (0); +} + +/* * Make sure our (source) address is set to something meaningful to this jail. * * v6only should be set based on (inp->inp_flags & IN6P_IPV6_V6ONLY != 0) Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Sun Jan 24 14:04:38 2010 (r202923) +++ stable/7/sys/netinet/in_pcb.c Sun Jan 24 14:05:56 2010 (r202924) @@ -552,6 +552,13 @@ in_pcbladdr(struct inpcb *inp, struct in KASSERT(laddr != NULL, ("%s: laddr NULL", __func__)); + /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip4(cred, laddr)) + return (0); + error = 0; ia = NULL; bzero(&sro, sizeof(sro)); Modified: stable/7/sys/netinet6/in6_src.c ============================================================================== --- stable/7/sys/netinet6/in6_src.c Sun Jan 24 14:04:38 2010 (r202923) +++ stable/7/sys/netinet6/in6_src.c Sun Jan 24 14:05:56 2010 (r202924) @@ -258,6 +258,13 @@ in6_selectsrc(struct sockaddr_in6 *dstso } /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip6(cred, srcp)) + return (0); + + /* * If the address is not specified, choose the best one based on * the outgoing interface and the destination address. */ Modified: stable/7/sys/sys/jail.h ============================================================================== --- stable/7/sys/sys/jail.h Sun Jan 24 14:04:38 2010 (r202923) +++ stable/7/sys/sys/jail.h Sun Jan 24 14:05:56 2010 (r202924) @@ -201,11 +201,13 @@ int prison_get_ip4(struct ucred *cred, s int prison_local_ip4(struct ucred *cred, struct in_addr *ia); int prison_remote_ip4(struct ucred *cred, struct in_addr *ia); int prison_check_ip4(struct ucred *cred, struct in_addr *ia); +int prison_saddrsel_ip4(struct ucred *, struct in_addr *); #ifdef INET6 int prison_get_ip6(struct ucred *, struct in6_addr *); int prison_local_ip6(struct ucred *, struct in6_addr *, int); int prison_remote_ip6(struct ucred *, struct in6_addr *); int prison_check_ip6(struct ucred *, struct in6_addr *); +int prison_saddrsel_ip6(struct ucred *, struct in6_addr *); #endif int prison_check_af(struct ucred *cred, int af); int prison_if(struct ucred *cred, struct sockaddr *sa); Modified: stable/7/usr.sbin/jail/jail.8 ============================================================================== --- stable/7/usr.sbin/jail/jail.8 Sun Jan 24 14:04:38 2010 (r202923) +++ stable/7/usr.sbin/jail/jail.8 Sun Jan 24 14:05:56 2010 (r202924) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2009 +.Dd January 17, 2010 .Dt JAIL 8 .Os .Sh NAME @@ -532,6 +532,15 @@ and interact with various network subsys where privileged access to jails is given out to untrusted parties. As such, by default this option is disabled. +.It Va security.jail.ip4_saddrsel +This flag changes how IPv4 source address selection works and can disable +it for all prisons in favour of forcing the primary IPv4 address of each +jail to be used for unbound outgoing connections. +Source address selection is enabled by default for all jails. +.It Va security.jail.ip6_saddrsel +IPv6 equivalent to the +.Va security.jail.ip4_saddrsel +option. .It Va security.jail.enforce_statfs This MIB entry determines which information processes in a jail are able to get about mount-points. From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:06:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E3711065698; Sun, 24 Jan 2010 14:06:20 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5948FC17; Sun, 24 Jan 2010 14:06:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OE6Jff049623; Sun, 24 Jan 2010 14:06:19 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OE6J0o049621; Sun, 24 Jan 2010 14:06:19 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001241406.o0OE6J0o049621@svn.freebsd.org> From: Antoine Brodin Date: Sun, 24 Jan 2010 14:06: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: r202925 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:06:20 -0000 Author: antoine Date: Sun Jan 24 14:06:19 2010 New Revision: 202925 URL: http://svn.freebsd.org/changeset/base/202925 Log: Add files to remove when MK_CTM=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:05:56 2010 (r202924) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:06:19 2010 (r202925) @@ -633,6 +633,18 @@ OLD_FILES+=usr/share/man/man1/cpp.1.gz # to be filled in #.endif +.if ${MK_CTM} == no +OLD_FILES+=usr/sbin/ctm +OLD_FILES+=usr/sbin/ctm_dequeue +OLD_FILES+=usr/sbin/ctm_rmail +OLD_FILES+=usr/sbin/ctm_smail +OLD_FILES+=usr/share/man/man1/ctm.1.gz +OLD_FILES+=usr/share/man/man1/ctm_dequeue.1.gz +OLD_FILES+=usr/share/man/man1/ctm_rmail.1.gz +OLD_FILES+=usr/share/man/man1/ctm_smail.1.gz +OLD_FILES+=usr/share/man/man5/ctm.5.gz +.endif + #.if ${MK_CVS} == no # to be filled in #.endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:09:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F46A1065679; Sun, 24 Jan 2010 14:09:45 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E85F8FC0C; Sun, 24 Jan 2010 14:09:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OE9jAx050428; Sun, 24 Jan 2010 14:09:45 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OE9jPC050426; Sun, 24 Jan 2010 14:09:45 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001241409.o0OE9jPC050426@svn.freebsd.org> From: Antoine Brodin Date: Sun, 24 Jan 2010 14:09:45 +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: r202926 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:09:45 -0000 Author: antoine Date: Sun Jan 24 14:09:45 2010 New Revision: 202926 URL: http://svn.freebsd.org/changeset/base/202926 Log: Add files to remove when MK_CVS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:06:19 2010 (r202925) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:09:45 2010 (r202926) @@ -645,9 +645,34 @@ OLD_FILES+=usr/share/man/man1/ctm_smail. OLD_FILES+=usr/share/man/man5/ctm.5.gz .endif -#.if ${MK_CVS} == no -# to be filled in -#.endif +.if ${MK_CVS} == no +OLD_FILES+=usr/bin/cvs +OLD_FILES+=usr/bin/cvsbug +OLD_FILES+=usr/share/examples/cvs/contrib/README +OLD_FILES+=usr/share/examples/cvs/contrib/clmerge +OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist +OLD_FILES+=usr/share/examples/cvs/contrib/commit_prep +OLD_FILES+=usr/share/examples/cvs/contrib/cvs2vendor +OLD_FILES+=usr/share/examples/cvs/contrib/cvs_acls +OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck +OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck.man +OLD_FILES+=usr/share/examples/cvs/contrib/cvshelp.man +OLD_FILES+=usr/share/examples/cvs/contrib/descend.man +OLD_FILES+=usr/share/examples/cvs/contrib/easy-import +OLD_FILES+=usr/share/examples/cvs/contrib/intro.doc +OLD_FILES+=usr/share/examples/cvs/contrib/log +OLD_FILES+=usr/share/examples/cvs/contrib/log_accum +OLD_FILES+=usr/share/examples/cvs/contrib/mfpipe +OLD_FILES+=usr/share/examples/cvs/contrib/rcs-to-cvs +OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log +OLD_FILES+=usr/share/examples/cvs/contrib/rcslock +OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs +OLD_FILES+=usr/share/info/cvs.info.gz +OLD_FILES+=usr/share/info/cvsclient.info.gz +OLD_FILES+=usr/share/man/man1/cvs.1.gz +OLD_FILES+=usr/share/man/man5/cvs.5.gz +OLD_FILES+=usr/share/man/man8/cvsbug.8.gz +.endif #.if ${MK_CXX} == no # to be filled in From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:13:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C585E106566C; Sun, 24 Jan 2010 14:13:56 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B47D78FC1D; Sun, 24 Jan 2010 14:13:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OEDuNQ051404; Sun, 24 Jan 2010 14:13:56 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OEDuNP051402; Sun, 24 Jan 2010 14:13:56 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001241413.o0OEDuNP051402@svn.freebsd.org> From: Antoine Brodin Date: Sun, 24 Jan 2010 14:13: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: r202927 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:13:56 -0000 Author: antoine Date: Sun Jan 24 14:13:56 2010 New Revision: 202927 URL: http://svn.freebsd.org/changeset/base/202927 Log: Add files to remove when MK_DICT=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:09:45 2010 (r202926) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jan 24 14:13:56 2010 (r202927) @@ -678,9 +678,14 @@ OLD_FILES+=usr/share/man/man8/cvsbug.8.g # to be filled in #.endif -#.if ${MK_DICT} == no -# to be filled in -#.endif +.if ${MK_DICT} == no +OLD_FILES+=usr/share/dict/README +OLD_FILES+=usr/share/dict/freebsd +OLD_FILES+=usr/share/dict/propernames +OLD_FILES+=usr/share/dict/web2 +OLD_FILES+=usr/share/dict/web2a +OLD_FILES+=usr/share/dict/words +.endif #.if ${MK_EXAMPLES} == no # to be filled in From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:29:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D35DD1065670; Sun, 24 Jan 2010 14:29:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C28F58FC16; Sun, 24 Jan 2010 14:29:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OETecT054880; Sun, 24 Jan 2010 14:29:40 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OETend054878; Sun, 24 Jan 2010 14:29:40 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001241429.o0OETend054878@svn.freebsd.org> From: Ed Schouten Date: Sun, 24 Jan 2010 14:29:40 +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: r202928 - head/usr.sbin/lastlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:29:40 -0000 Author: ed Date: Sun Jan 24 14:29:40 2010 New Revision: 202928 URL: http://svn.freebsd.org/changeset/base/202928 Log: Remove unneeded setpassent() calls. lastlogin no longer requires the use of the passwd database. Modified: head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/lastlogin.c ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.c Sun Jan 24 14:13:56 2010 (r202927) +++ head/usr.sbin/lastlogin/lastlogin.c Sun Jan 24 14:29:40 2010 (r202928) @@ -37,7 +37,6 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998 #endif #include -#include #include #include #include @@ -58,8 +57,6 @@ main(int argc, char *argv[]) usage(); } - setpassent(1); /* Keep passwd file pointers open */ - /* Process usernames given on the command line. */ if (argc > 1) { for (i = 1; i < argc; ++i) { @@ -85,7 +82,6 @@ main(int argc, char *argv[]) endutxent(); } - setpassent(0); /* Close passwd file pointers */ exit(0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:30:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 253F31065676; Sun, 24 Jan 2010 14:30:58 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13D578FC12; Sun, 24 Jan 2010 14:30:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OEUvDu055289; Sun, 24 Jan 2010 14:30:57 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OEUvbO055287; Sun, 24 Jan 2010 14:30:57 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001241430.o0OEUvbO055287@svn.freebsd.org> From: Ed Schouten Date: Sun, 24 Jan 2010 14:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202929 - stable/8/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:30:58 -0000 Author: ed Date: Sun Jan 24 14:30:57 2010 New Revision: 202929 URL: http://svn.freebsd.org/changeset/base/202929 Log: MFC r202500: Fix a regression that was introduced in r191882. I changed login_tty() to only work when the application is not a session leader yet. This works fine for applications in the base system, but it turns out various applications call this function after daemonizing, which means they already use their own session. If setsid() fails, just call tcsetsid() on the current session. tcsetsid() will already perform proper security checks. Reported by: Oliver Lehmann Modified: stable/8/lib/libutil/login_tty.c Directory Properties: stable/8/lib/libutil/ (props changed) Modified: stable/8/lib/libutil/login_tty.c ============================================================================== --- stable/8/lib/libutil/login_tty.c Sun Jan 24 14:29:40 2010 (r202928) +++ stable/8/lib/libutil/login_tty.c Sun Jan 24 14:30:57 2010 (r202929) @@ -50,7 +50,7 @@ login_tty(int fd) s = setsid(); if (s == -1) - return (-1); + s = getsid(0); if (tcsetsid(fd, s) == -1) return (-1); (void) dup2(fd, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:44:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 804DF106566C; Sun, 24 Jan 2010 14:44:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2368FC15; Sun, 24 Jan 2010 14:44:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OEi5Ik058172; Sun, 24 Jan 2010 14:44:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OEi5uH058170; Sun, 24 Jan 2010 14:44:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001241444.o0OEi5uH058170@svn.freebsd.org> From: Ed Schouten Date: Sun, 24 Jan 2010 14:44:05 +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: r202930 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:44:05 -0000 Author: ed Date: Sun Jan 24 14:44:05 2010 New Revision: 202930 URL: http://svn.freebsd.org/changeset/base/202930 Log: Improve the ttyname(3) manual page. - Remove unrelated references to tty(5). - Remove unneeded relation with FILE *. - Add better cross references. Modified: head/lib/libc/gen/ttyname.3 Modified: head/lib/libc/gen/ttyname.3 ============================================================================== --- head/lib/libc/gen/ttyname.3 Sun Jan 24 14:30:57 2010 (r202929) +++ head/lib/libc/gen/ttyname.3 Sun Jan 24 14:44:05 2010 (r202930) @@ -47,19 +47,7 @@ .Ft int .Fn isatty "int fd" .Sh DESCRIPTION -These functions operate on the system file descriptors for terminal -type devices. -These descriptors are not related to the standard -.Tn I/O -.Dv FILE -typedef, but refer to the special device files found in -.Pa /dev -and for which an entry exists -in the initialization file -.Pa /etc/ttys -or pseudo-terminals. -(See -.Xr ttys 5 . ) +These functions operate on file descriptors for terminal type devices. .Pp The .Fn isatty @@ -100,11 +88,6 @@ The .Fn ttyname_r function returns 0 if successful. Otherwise an error number is returned. -.Sh FILES -.Bl -tag -width ".Pa /etc/ttys" -compact -.It Pa /dev/\(** -.It Pa /etc/ttys -.El .Sh ERRORS The .Fn ttyname_r @@ -122,8 +105,10 @@ argument is smaller than the length of the string to be returned. .El .Sh SEE ALSO -.Xr ioctl 2 , -.Xr ttys 5 +.Xr fdevname 3 , +.Xr ptsname 3 , +.Xr tcgetattr 3 , +.Xr tty 4 .Sh HISTORY The .Fn isatty From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:57:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E8B31065679; Sun, 24 Jan 2010 14:57:54 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DC1F8FC1C; Sun, 24 Jan 2010 14:57:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OEvspe061317; Sun, 24 Jan 2010 14:57:54 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OEvsft061315; Sun, 24 Jan 2010 14:57:54 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001241457.o0OEvsft061315@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 24 Jan 2010 14:57:54 +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: r202931 - head/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:57:54 -0000 Author: gavin Date: Sun Jan 24 14:57:54 2010 New Revision: 202931 URL: http://svn.freebsd.org/changeset/base/202931 Log: Add support for four more nfsmb controllers, shipping on at least the ASUS Atom ION boards. PR: kern/142571 Submitted by: oliver Approved by: ed (mentor) MFC after: 1 week Modified: head/sys/pci/nfsmb.c Modified: head/sys/pci/nfsmb.c ============================================================================== --- head/sys/pci/nfsmb.c Sun Jan 24 14:44:05 2010 (r202930) +++ head/sys/pci/nfsmb.c Sun Jan 24 14:57:54 2010 (r202931) @@ -65,6 +65,10 @@ static int nfsmb_debug = 0; #define NFSMB_DEVICEID_NF4_55_SMB 0x0368 #define NFSMB_DEVICEID_NF4_61_SMB 0x03eb #define NFSMB_DEVICEID_NF4_65_SMB 0x0446 +#define NFSMB_DEVICEID_NF4_67_SMB 0x0542 +#define NFSMB_DEVICEID_NF4_73_SMB 0x07d8 +#define NFSMB_DEVICEID_NF4_78S_SMB 0x0752 +#define NFSMB_DEVICEID_NF4_79_SMB 0x0aa2 /* PCI Configuration space registers */ #define NF2PCI_SMBASE_1 PCIR_BAR(4) @@ -158,6 +162,10 @@ nfsmb_probe(device_t dev) case NFSMB_DEVICEID_NF4_55_SMB: case NFSMB_DEVICEID_NF4_61_SMB: case NFSMB_DEVICEID_NF4_65_SMB: + case NFSMB_DEVICEID_NF4_67_SMB: + case NFSMB_DEVICEID_NF4_73_SMB: + case NFSMB_DEVICEID_NF4_78S_SMB: + case NFSMB_DEVICEID_NF4_79_SMB: device_set_desc(dev, "nForce2/3/4 MCP SMBus Controller"); return (BUS_PROBE_DEFAULT); } @@ -245,6 +253,10 @@ nfsmb_attach(device_t dev) case NFSMB_DEVICEID_NF4_55_SMB: case NFSMB_DEVICEID_NF4_61_SMB: case NFSMB_DEVICEID_NF4_65_SMB: + case NFSMB_DEVICEID_NF4_67_SMB: + case NFSMB_DEVICEID_NF4_73_SMB: + case NFSMB_DEVICEID_NF4_78S_SMB: + case NFSMB_DEVICEID_NF4_79_SMB: /* Trying to add secondary device as slave */ nfsmb_sc->subdev = device_add_child(dev, "nfsmb", -1); if (!nfsmb_sc->subdev) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 14:58:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27C51065693; Sun, 24 Jan 2010 14:58:49 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0C788FC21; Sun, 24 Jan 2010 14:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OEwnHM061555; Sun, 24 Jan 2010 14:58:49 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OEwnQm061553; Sun, 24 Jan 2010 14:58:49 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201001241458.o0OEwnQm061553@svn.freebsd.org> From: Max Khon Date: Sun, 24 Jan 2010 14:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202932 - stable/7/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:58:49 -0000 Author: fjoe Date: Sun Jan 24 14:58:49 2010 New Revision: 202932 URL: http://svn.freebsd.org/changeset/base/202932 Log: MFC rev. 201924: Send link state change control messages to "orphans" hook as well. Approved by: re (kib) Modified: stable/7/sys/netgraph/ng_ether.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netgraph/ng_ether.c ============================================================================== --- stable/7/sys/netgraph/ng_ether.c Sun Jan 24 14:57:54 2010 (r202931) +++ stable/7/sys/netgraph/ng_ether.c Sun Jan 24 14:58:49 2010 (r202932) @@ -343,9 +343,6 @@ ng_ether_link_state(struct ifnet *ifp, i struct ng_mesg *msg; int cmd, dummy_error = 0; - if (priv->lower == NULL) - return; - if (state == LINK_STATE_UP) cmd = NGM_LINK_IS_UP; else if (state == LINK_STATE_DOWN) @@ -353,9 +350,16 @@ ng_ether_link_state(struct ifnet *ifp, i else return; - NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); - if (msg != NULL) - NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0); + if (priv->lower != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0); + } + if (priv->orphan != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->orphan, 0); + } } /****************************************************************** From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 15:07:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF7B91065679; Sun, 24 Jan 2010 15:07:00 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD61C8FC0A; Sun, 24 Jan 2010 15:07:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OF70rr063403; Sun, 24 Jan 2010 15:07:00 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OF70wG063398; Sun, 24 Jan 2010 15:07:00 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001241507.o0OF70wG063398@svn.freebsd.org> From: Attilio Rao Date: Sun, 24 Jan 2010 15:07: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: r202933 - in head: share/man/man9 sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 15:07:00 -0000 Author: attilio Date: Sun Jan 24 15:07:00 2010 New Revision: 202933 URL: http://svn.freebsd.org/changeset/base/202933 Log: - Fix the kthread_{suspend, resume, suspend_check}() locking. In the current code, the locking is completely broken and may lead easilly to deadlocks. Fix it by using the proc_mtx, linked to the suspending thread, as lock for the operation. Keep using the thread_lock for setting and reading the flag even if it is not entirely necessary (atomic ops may do it as well, but this way the code is more readable). - Fix a deadlock within kthread_suspend(). The suspender should not sleep on a different channel wrt the suspended thread, or, otherwise, the awaker should wakeup both. Uniform the interface to what the kproc_* counterparts do (sleeping on the same channel). - Change the kthread_suspend_check() prototype. kthread_suspend_check() always assumes curthread and must only refer to it, so skip the thread pointer as it may be easilly mistaken. If curthread is not a kthread, the system will panic. In collabouration with: jhb Tested by: Giovanni Trematerra MFC: 2 weeks Modified: head/share/man/man9/kthread.9 head/sys/kern/kern_kthread.c head/sys/sys/kthread.h Modified: head/share/man/man9/kthread.9 ============================================================================== --- head/share/man/man9/kthread.9 Sun Jan 24 14:58:49 2010 (r202932) +++ head/share/man/man9/kthread.9 Sun Jan 24 15:07:00 2010 (r202933) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2009 +.Dd January 24, 2010 .Dt KTHREAD 9 .Os .Sh NAME @@ -50,7 +50,7 @@ .Ft int .Fn kthread_suspend "struct thread *td" "int timo" .Ft void -.Fn kthread_suspend_check "struct thread *td" +.Fn kthread_suspend_check "void" .In sys/unistd.h .Ft int .Fo kthread_add @@ -208,12 +208,9 @@ functions are used to suspend and resume During the main loop of its execution, a kernel thread that wishes to allow itself to be suspended should call .Fn kthread_suspend_check -passing in -.Va curthread -as the only argument. -This function checks to see if the kernel thread has been asked to suspend. +in order to check if the it has been asked to suspend. If it has, it will -.Xr tsleep 9 +.Xr msleep 9 until it is told to resume. Once it has been told to resume it will return allowing execution of the kernel thread to continue. Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Sun Jan 24 14:58:49 2010 (r202932) +++ head/sys/kern/kern_kthread.c Sun Jan 24 15:07:00 2010 (r202933) @@ -335,34 +335,55 @@ kthread_exit(void) int kthread_suspend(struct thread *td, int timo) { - if ((td->td_pflags & TDP_KTHREAD) == 0) { + struct proc *p; + + p = td->td_proc; + + /* + * td_pflags should not be ready by any other thread different by + * curthread, but as long as this flag is invariant during the + * thread lifetime, it is ok to check for it now. + */ + if ((td->td_pflags & TDP_KTHREAD) == 0) return (EINVAL); - } + + /* + * The caller of the primitive should have already checked that the + * thread is up and running, thus not being blocked by other + * conditions. + */ + PROC_LOCK(p); thread_lock(td); td->td_flags |= TDF_KTH_SUSP; thread_unlock(td); - /* - * If it's stopped for some other reason, - * kick it to notice our request - * or we'll end up timing out - */ - wakeup(td); /* traditional place for kernel threads to sleep on */ /* XXX ?? */ - return (tsleep(&td->td_flags, PPAUSE | PDROP, "suspkt", timo)); + return (msleep(&td->td_flags, &p->p_mtx, PPAUSE | PDROP, "suspkt", + timo)); } /* - * let the kthread it can keep going again. + * Resume a thread previously put asleep with kthread_suspend(). */ int kthread_resume(struct thread *td) { - if ((td->td_pflags & TDP_KTHREAD) == 0) { + struct proc *p; + + p = td->td_proc; + + /* + * td_pflags should not be ready by any other thread different by + * curthread, but as long as this flag is invariant during the + * thread lifetime, it is ok to check for it now. + */ + if ((td->td_pflags & TDP_KTHREAD) == 0) return (EINVAL); - } + + PROC_LOCK(p); thread_lock(td); td->td_flags &= ~TDF_KTH_SUSP; thread_unlock(td); - wakeup(&td->td_name); + wakeup(&td->td_flags); + PROC_UNLOCK(p); return (0); } @@ -371,15 +392,28 @@ kthread_resume(struct thread *td) * and notify the caller that is has happened. */ void -kthread_suspend_check(struct thread *td) +kthread_suspend_check() { + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + + if ((td->td_pflags & TDP_KTHREAD) == 0) + panic("%s: curthread is not a valid kthread", __func__); + + /* + * As long as the double-lock protection is used when accessing the + * TDF_KTH_SUSP flag, synchronizing the read operation via proc mutex + * is fine. + */ + PROC_LOCK(p); while (td->td_flags & TDF_KTH_SUSP) { - /* - * let the caller know we got the message then sleep - */ wakeup(&td->td_flags); - tsleep(&td->td_name, PPAUSE, "ktsusp", 0); + msleep(&td->td_flags, &p->p_mtx, PPAUSE, "ktsusp", 0); } + PROC_UNLOCK(p); } int Modified: head/sys/sys/kthread.h ============================================================================== --- head/sys/sys/kthread.h Sun Jan 24 14:58:49 2010 (r202932) +++ head/sys/sys/kthread.h Sun Jan 24 15:07:00 2010 (r202933) @@ -73,7 +73,7 @@ int kthread_resume(struct thread *); void kthread_shutdown(void *, int); void kthread_start(const void *); int kthread_suspend(struct thread *, int); -void kthread_suspend_check(struct thread *); +void kthread_suspend_check(void); #endif /* !_SYS_KTHREAD_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 15:12:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF49106566C; Sun, 24 Jan 2010 15:12:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBA168FC0A; Sun, 24 Jan 2010 15:12:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OFCRuP064639; Sun, 24 Jan 2010 15:12:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OFCRiB064637; Sun, 24 Jan 2010 15:12:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001241512.o0OFCRiB064637@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 24 Jan 2010 15:12:27 +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: r202934 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 15:12:28 -0000 Author: trasz Date: Sun Jan 24 15:12:27 2010 New Revision: 202934 URL: http://svn.freebsd.org/changeset/base/202934 Log: Move out code that does POSIX.1e ACL inheritance into separate routines. Reviewed by: rwatson Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Sun Jan 24 15:07:00 2010 (r202933) +++ head/sys/ufs/ufs/ufs_vnops.c Sun Jan 24 15:12:27 2010 (r202934) @@ -1471,6 +1471,163 @@ out: #ifdef UFS_ACL static int +ufs_do_posix1e_acl_inheritance_dir(struct vnode *dvp, struct vnode *tvp, + mode_t dmode, struct ucred *cred, struct thread *td) +{ + int error; + struct inode *ip = VTOI(tvp); + struct acl *dacl, *acl; + + acl = acl_alloc(M_WAITOK); + dacl = acl_alloc(M_WAITOK); + + /* + * Retrieve default ACL from parent, if any. + */ + error = VOP_GETACL(dvp, ACL_TYPE_DEFAULT, acl, cred, td); + switch (error) { + case 0: + /* + * Retrieved a default ACL, so merge mode and ACL if + * necessary. If the ACL is empty, fall through to + * the "not defined or available" case. + */ + if (acl->acl_cnt != 0) { + dmode = acl_posix1e_newfilemode(dmode, acl); + ip->i_mode = dmode; + DIP_SET(ip, i_mode, dmode); + *dacl = *acl; + ufs_sync_acl_from_inode(ip, acl); + break; + } + /* FALLTHROUGH */ + + case EOPNOTSUPP: + /* + * Just use the mode as-is. + */ + ip->i_mode = dmode; + DIP_SET(ip, i_mode, dmode); + error = 0; + goto out; + + default: + goto out; + } + + /* + * XXX: If we abort now, will Soft Updates notify the extattr + * code that the EAs for the file need to be released? + */ + error = VOP_SETACL(tvp, ACL_TYPE_ACCESS, acl, cred, td); + if (error == 0) + error = VOP_SETACL(tvp, ACL_TYPE_DEFAULT, dacl, cred, td); + switch (error) { + case 0: + break; + + case EOPNOTSUPP: + /* + * XXX: This should not happen, as EOPNOTSUPP above + * was supposed to free acl. + */ + printf("ufs_mkdir: VOP_GETACL() but no VOP_SETACL()\n"); + /* + panic("ufs_mkdir: VOP_GETACL() but no VOP_SETACL()"); + */ + break; + + default: + goto out; + } + +out: + acl_free(acl); + acl_free(dacl); + + return (error); +} + +static int +ufs_do_posix1e_acl_inheritance_file(struct vnode *dvp, struct vnode *tvp, + mode_t mode, struct ucred *cred, struct thread *td) +{ + int error; + struct inode *ip = VTOI(tvp); + struct acl *acl; + + acl = acl_alloc(M_WAITOK); + + /* + * Retrieve default ACL for parent, if any. + */ + error = VOP_GETACL(dvp, ACL_TYPE_DEFAULT, acl, cred, td); + switch (error) { + case 0: + /* + * Retrieved a default ACL, so merge mode and ACL if + * necessary. + */ + if (acl->acl_cnt != 0) { + /* + * Two possible ways for default ACL to not + * be present. First, the EA can be + * undefined, or second, the default ACL can + * be blank. If it's blank, fall through to + * the it's not defined case. + */ + mode = acl_posix1e_newfilemode(mode, acl); + ip->i_mode = mode; + DIP_SET(ip, i_mode, mode); + ufs_sync_acl_from_inode(ip, acl); + break; + } + /* FALLTHROUGH */ + + case EOPNOTSUPP: + /* + * Just use the mode as-is. + */ + ip->i_mode = mode; + DIP_SET(ip, i_mode, mode); + error = 0; + goto out; + + default: + goto out; + } + + /* + * XXX: If we abort now, will Soft Updates notify the extattr + * code that the EAs for the file need to be released? + */ + error = VOP_SETACL(tvp, ACL_TYPE_ACCESS, acl, cred, td); + switch (error) { + case 0: + break; + + case EOPNOTSUPP: + /* + * XXX: This should not happen, as EOPNOTSUPP above was + * supposed to free acl. + */ + printf("ufs_makeinode: VOP_GETACL() but no " + "VOP_SETACL()\n"); + /* panic("ufs_makeinode: VOP_GETACL() but no " + "VOP_SETACL()"); */ + break; + + default: + goto out; + } + +out: + acl_free(acl); + + return (error); +} + +static int ufs_do_nfs4_acl_inheritance(struct vnode *dvp, struct vnode *tvp, mode_t child_mode, struct ucred *cred, struct thread *td) { @@ -1516,9 +1673,6 @@ ufs_mkdir(ap) struct buf *bp; struct dirtemplate dirtemplate, *dtp; struct direct newdir; -#ifdef UFS_ACL - struct acl *acl, *dacl; -#endif int error, dmode; long blkoff; @@ -1607,59 +1761,8 @@ ufs_mkdir(ap) #endif #endif /* !SUIDDIR */ ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE; -#ifdef UFS_ACL - acl = dacl = NULL; - if ((dvp->v_mount->mnt_flag & MNT_ACLS) != 0) { - acl = acl_alloc(M_WAITOK); - dacl = acl_alloc(M_WAITOK); - - /* - * Retrieve default ACL from parent, if any. - */ - error = VOP_GETACL(dvp, ACL_TYPE_DEFAULT, acl, cnp->cn_cred, - cnp->cn_thread); - switch (error) { - case 0: - /* - * Retrieved a default ACL, so merge mode and ACL if - * necessary. If the ACL is empty, fall through to - * the "not defined or available" case. - */ - if (acl->acl_cnt != 0) { - dmode = acl_posix1e_newfilemode(dmode, acl); - ip->i_mode = dmode; - DIP_SET(ip, i_mode, dmode); - *dacl = *acl; - ufs_sync_acl_from_inode(ip, acl); - break; - } - /* FALLTHROUGH */ - - case EOPNOTSUPP: - /* - * Just use the mode as-is. - */ - ip->i_mode = dmode; - DIP_SET(ip, i_mode, dmode); - acl_free(acl); - acl_free(dacl); - dacl = acl = NULL; - break; - - default: - UFS_VFREE(tvp, ip->i_number, dmode); - vput(tvp); - acl_free(acl); - acl_free(dacl); - return (error); - } - } else { -#endif /* !UFS_ACL */ - ip->i_mode = dmode; - DIP_SET(ip, i_mode, dmode); -#ifdef UFS_ACL - } -#endif + ip->i_mode = dmode; + DIP_SET(ip, i_mode, dmode); tvp->v_type = VDIR; /* Rest init'd in getnewvnode(). */ ip->i_effnlink = 2; ip->i_nlink = 2; @@ -1694,43 +1797,12 @@ ufs_mkdir(ap) } #endif #ifdef UFS_ACL - if (acl != NULL) { - /* - * XXX: If we abort now, will Soft Updates notify the extattr - * code that the EAs for the file need to be released? - */ - error = VOP_SETACL(tvp, ACL_TYPE_ACCESS, acl, cnp->cn_cred, - cnp->cn_thread); - if (error == 0) - error = VOP_SETACL(tvp, ACL_TYPE_DEFAULT, dacl, - cnp->cn_cred, cnp->cn_thread); - switch (error) { - case 0: - break; - - case EOPNOTSUPP: - /* - * XXX: This should not happen, as EOPNOTSUPP above - * was supposed to free acl. - */ - printf("ufs_mkdir: VOP_GETACL() but no VOP_SETACL()\n"); - /* - panic("ufs_mkdir: VOP_GETACL() but no VOP_SETACL()"); - */ - break; - - default: - acl_free(acl); - acl_free(dacl); - dacl = acl = NULL; + if (dvp->v_mount->mnt_flag & MNT_ACLS) { + error = ufs_do_posix1e_acl_inheritance_dir(dvp, tvp, dmode, + cnp->cn_cred, cnp->cn_thread); + if (error) goto bad; - } - acl_free(acl); - acl_free(dacl); - dacl = acl = NULL; - } - - if (dvp->v_mount->mnt_flag & MNT_NFS4ACLS) { + } else if (dvp->v_mount->mnt_flag & MNT_NFS4ACLS) { error = ufs_do_nfs4_acl_inheritance(dvp, tvp, dmode, cnp->cn_cred, cnp->cn_thread); if (error) @@ -1797,12 +1869,6 @@ bad: if (error == 0) { *ap->a_vpp = tvp; } else { -#ifdef UFS_ACL - if (acl != NULL) - acl_free(acl); - if (dacl != NULL) - acl_free(dacl); -#endif dp->i_effnlink--; dp->i_nlink--; DIP_SET(dp, i_nlink, dp->i_nlink); @@ -2387,9 +2453,6 @@ ufs_makeinode(mode, dvp, vpp, cnp) struct inode *ip, *pdir; struct direct newdir; struct vnode *tvp; -#ifdef UFS_ACL - struct acl *acl; -#endif int error; pdir = VTOI(dvp); @@ -2469,62 +2532,8 @@ ufs_makeinode(mode, dvp, vpp, cnp) #endif #endif /* !SUIDDIR */ ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE; -#ifdef UFS_ACL - acl = NULL; - if ((dvp->v_mount->mnt_flag & MNT_ACLS) != 0) { - acl = acl_alloc(M_WAITOK); - - /* - * Retrieve default ACL for parent, if any. - */ - error = VOP_GETACL(dvp, ACL_TYPE_DEFAULT, acl, cnp->cn_cred, - cnp->cn_thread); - switch (error) { - case 0: - /* - * Retrieved a default ACL, so merge mode and ACL if - * necessary. - */ - if (acl->acl_cnt != 0) { - /* - * Two possible ways for default ACL to not - * be present. First, the EA can be - * undefined, or second, the default ACL can - * be blank. If it's blank, fall through to - * the it's not defined case. - */ - mode = acl_posix1e_newfilemode(mode, acl); - ip->i_mode = mode; - DIP_SET(ip, i_mode, mode); - ufs_sync_acl_from_inode(ip, acl); - break; - } - /* FALLTHROUGH */ - - case EOPNOTSUPP: - /* - * Just use the mode as-is. - */ - ip->i_mode = mode; - DIP_SET(ip, i_mode, mode); - acl_free(acl); - acl = NULL; - break; - - default: - UFS_VFREE(tvp, ip->i_number, mode); - vput(tvp); - acl_free(acl); - acl = NULL; - return (error); - } - } else { -#endif - ip->i_mode = mode; - DIP_SET(ip, i_mode, mode); -#ifdef UFS_ACL - } -#endif + ip->i_mode = mode; + DIP_SET(ip, i_mode, mode); tvp->v_type = IFTOVT(mode); /* Rest init'd in getnewvnode(). */ ip->i_effnlink = 1; ip->i_nlink = 1; @@ -2557,36 +2566,12 @@ ufs_makeinode(mode, dvp, vpp, cnp) } #endif #ifdef UFS_ACL - if (acl != NULL) { - /* - * XXX: If we abort now, will Soft Updates notify the extattr - * code that the EAs for the file need to be released? - */ - error = VOP_SETACL(tvp, ACL_TYPE_ACCESS, acl, cnp->cn_cred, - cnp->cn_thread); - switch (error) { - case 0: - break; - - case EOPNOTSUPP: - /* - * XXX: This should not happen, as EOPNOTSUPP above was - * supposed to free acl. - */ - printf("ufs_makeinode: VOP_GETACL() but no " - "VOP_SETACL()\n"); - /* panic("ufs_makeinode: VOP_GETACL() but no " - "VOP_SETACL()"); */ - break; - - default: - acl_free(acl); + if (dvp->v_mount->mnt_flag & MNT_ACLS) { + error = ufs_do_posix1e_acl_inheritance_file(dvp, tvp, mode, + cnp->cn_cred, cnp->cn_thread); + if (error) goto bad; - } - acl_free(acl); - } - - if (dvp->v_mount->mnt_flag & MNT_NFS4ACLS) { + } else if (dvp->v_mount->mnt_flag & MNT_NFS4ACLS) { error = ufs_do_nfs4_acl_inheritance(dvp, tvp, mode, cnp->cn_cred, cnp->cn_thread); if (error) From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 16:17:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A6BD1065672; Sun, 24 Jan 2010 16:17:59 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EBF08FC13; Sun, 24 Jan 2010 16:17:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OGHx63079025; Sun, 24 Jan 2010 16:17:59 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OGHxxq079021; Sun, 24 Jan 2010 16:17:59 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201001241617.o0OGHxxq079021@svn.freebsd.org> From: Shteryana Shopova Date: Sun, 24 Jan 2010 16:17:59 +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: r202935 - in head/sys: net net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 16:17:59 -0000 Author: syrinx Date: Sun Jan 24 16:17:58 2010 New Revision: 202935 URL: http://svn.freebsd.org/changeset/base/202935 Log: While flushing the multicast filter of an interface, do not zero the relevant ifmultiaddr structures' reference to the parent interface, unless the parent interface is really detaching. While here, program only link layer multicast filters to a wlan's hardware parent interface. PR: kern/142391, kern/142392 Reviewed by: sam, rpaolo, bms MFC after: 1 week Modified: head/sys/net/if.c head/sys/net/if_var.h head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Jan 24 15:12:27 2010 (r202934) +++ head/sys/net/if.c Sun Jan 24 16:17:58 2010 (r202935) @@ -740,9 +740,10 @@ if_purgeaddrs(struct ifnet *ifp) } /* - * Remove any multicast network addresses from an interface. + * Remove any multicast network addresses from an interface when an ifnet + * is going away. */ -void +static void if_purgemaddrs(struct ifnet *ifp) { struct ifmultiaddr *ifma; @@ -2940,6 +2941,22 @@ if_delmulti(struct ifnet *ifp, struct so } /* + * Delete all multicast group membership for an interface. + * Should be used to quickly flush all multicast filters. + */ +void +if_delallmulti(struct ifnet *ifp) +{ + struct ifmultiaddr *ifma; + struct ifmultiaddr *next; + + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, next) + if_delmulti_locked(ifp, ifma, 0); + IF_ADDR_UNLOCK(ifp); +} + +/* * Delete a multicast group membership by group membership pointer. * Network-layer protocol domains must use this routine. * Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Jan 24 15:12:27 2010 (r202934) +++ head/sys/net/if_var.h Sun Jan 24 16:17:58 2010 (r202935) @@ -833,7 +833,7 @@ void if_delmulti_ifma(struct ifmultiaddr void if_detach(struct ifnet *); void if_vmove(struct ifnet *, struct vnet *); void if_purgeaddrs(struct ifnet *); -void if_purgemaddrs(struct ifnet *); +void if_delallmulti(struct ifnet *); void if_down(struct ifnet *); struct ifmultiaddr * if_findmulti(struct ifnet *, struct sockaddr *); Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Sun Jan 24 15:12:27 2010 (r202934) +++ head/sys/net80211/ieee80211_ioctl.c Sun Jan 24 16:17:58 2010 (r202935) @@ -3199,15 +3199,18 @@ ieee80211_ioctl_updatemulti(struct ieee8 void *ioctl; IEEE80211_LOCK(ic); - if_purgemaddrs(parent); + if_delallmulti(parent); ioctl = parent->if_ioctl; /* XXX WAR if_allmulti */ parent->if_ioctl = NULL; TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { struct ifnet *ifp = vap->iv_ifp; struct ifmultiaddr *ifma; - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; (void) if_addmulti(parent, ifma->ifma_addr, NULL); + } } parent->if_ioctl = ioctl; ieee80211_runtask(ic, &ic->ic_mcast_task); From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 16:23:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66BD4106566B for ; Sun, 24 Jan 2010 16:23:08 +0000 (UTC) (envelope-from freebsd@beardz.net) Received: from mx-2.btshosting.co.uk (mx-2.btshosting.co.uk [87.117.208.79]) by mx1.freebsd.org (Postfix) with ESMTP id 28BEB8FC0C for ; Sun, 24 Jan 2010 16:23:07 +0000 (UTC) Received: from [192.168.1.65] (host86-148-118-227.range86-148.btcentralplus.com [86.148.118.227]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bazerka@beardz.net) by mx-2.btshosting.co.uk (Postfix) with ESMTPSA id 132C56E5482 for ; Sun, 24 Jan 2010 16:06:04 +0000 (GMT) Message-ID: <4B5C6FE4.5050306@beardz.net> Date: Sun, 24 Jan 2010 16:05:56 +0000 From: Jase Thew User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: svn-src-all@freebsd.org References: <201001241405.o0OE5u9m049481@svn.freebsd.org> In-Reply-To: <201001241405.o0OE5u9m049481@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at mx-2.btshosting.co.uk X-Virus-Status: Clean Subject: Re: svn commit: r202924 - in stable/7: sys/kern sys/netinet sys/netinet6 sys/sys usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 16:23:08 -0000 On 24/01/2010 14:05, Bjoern A. Zeeb wrote: > Author: bz > Date: Sun Jan 24 14:05:56 2010 > New Revision: 202924 > URL: http://svn.freebsd.org/changeset/base/202924 > > Log: > MFC r202468: > > Add security.jail.ip4_saddrsel/ip6_nosaddrsel sysctls to control > whether to use source address selection (default) or the primary > jail address for unbound outgoing connections. > > This is intended to be used by people upgrading from single-IP > jails to multi-IP jails but not having to change firewall rules, > application ACLs, ... but to force their connections (unless > otherwise changed) to the primry jail IP they had been used for > years, as well as for people prefering to implement similar policies. > > Note that for IPv6, if configured incorrectly, this might lead to > scope violations, which single-IPv6 jails could as well, as by the > design of jails. [1] > > Note that in contrast to FreeBSD 8.x and newer, where we have > per-jail options, the sysctls are global for all jails. > > Reviewed by: jamie, hrs (ipv6 part) [for HEAD] > Pointed out by: hrs [1] > Tested by: Jase Thew (bazerka beardz.net) (IPv4) > > Approved by: re (kib) > > Modified: > stable/7/sys/kern/kern_jail.c > stable/7/sys/netinet/in_pcb.c > stable/7/sys/netinet6/in6_src.c > stable/7/sys/sys/jail.h > stable/7/usr.sbin/jail/jail.8 > Directory Properties: > stable/7/sys/ (props changed) > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > stable/7/sys/contrib/dev/acpica/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/usr.sbin/jail/ (props changed) > > Many thanks! Regards, Jase. From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 16:58:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 380601065693; Sun, 24 Jan 2010 16:58:21 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2508FC2B; Sun, 24 Jan 2010 16:58:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OGwKgb087940; Sun, 24 Jan 2010 16:58:20 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OGwKBV087939; Sun, 24 Jan 2010 16:58:20 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201001241658.o0OGwKBV087939@svn.freebsd.org> From: Max Khon Date: Sun, 24 Jan 2010 16:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202936 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 16:58:21 -0000 Author: fjoe Date: Sun Jan 24 16:58:20 2010 New Revision: 202936 URL: http://svn.freebsd.org/changeset/base/202936 Log: Record rev. 201924 MFC. Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 16:59:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E78301065692; Sun, 24 Jan 2010 16:59:04 +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 D520B8FC2C; Sun, 24 Jan 2010 16:59:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OGx4xT088147; Sun, 24 Jan 2010 16:59:04 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OGx4De088144; Sun, 24 Jan 2010 16:59:04 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001241659.o0OGx4De088144@svn.freebsd.org> From: Ruslan Ermilov Date: Sun, 24 Jan 2010 16:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202937 - in stable/7: etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 16:59:05 -0000 Author: ru Date: Sun Jan 24 16:59:04 2010 New Revision: 202937 URL: http://svn.freebsd.org/changeset/base/202937 Log: MFC: r191620: Added (pre|post)(start|stop) jail hooks. PR: 143137 Approved by: re (bz) Modified: stable/7/etc/rc.d/jail stable/7/share/man/man5/rc.conf.5 (contents, props changed) Directory Properties: stable/7/etc/ (props changed) stable/7/share/man/man5/ (props changed) Modified: stable/7/etc/rc.d/jail ============================================================================== --- stable/7/etc/rc.d/jail Sun Jan 24 16:58:20 2010 (r202936) +++ stable/7/etc/rc.d/jail Sun Jan 24 16:59:04 2010 (r202937) @@ -41,6 +41,14 @@ init_variables() eval _ip=\"\$jail_${_j}_ip\" eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\" eval _exec=\"\$jail_${_j}_exec\" + + i=0 + while : ; do + eval _exec_prestart${i}=\"\${jail_${_j}_exec_prestart${i}:-\${jail_exec_prestart${i}}}\" + [ -z "$(eval echo \"\$_exec_prestart${i}\")" ] && break + i=$((i + 1)) + done + eval _exec_start=\"\${jail_${_j}_exec_start:-${jail_exec_start}}\" i=1 @@ -49,8 +57,30 @@ init_variables() [ -z "$(eval echo \"\$_exec_afterstart${i}\")" ] && break i=$((i + 1)) done - + + i=0 + while : ; do + eval _exec_poststart${i}=\"\${jail_${_j}_exec_poststart${i}:-\${jail_exec_poststart${i}}}\" + [ -z "$(eval echo \"\$_exec_poststart${i}\")" ] && break + i=$((i + 1)) + done + + i=0 + while : ; do + eval _exec_prestop${i}=\"\${jail_${_j}_exec_prestop${i}:-\${jail_exec_prestop${i}}}\" + [ -z "$(eval echo \"\$_exec_prestop${i}\")" ] && break + i=$((i + 1)) + done + eval _exec_stop=\"\${jail_${_j}_exec_stop:-${jail_exec_stop}}\" + + i=0 + while : ; do + eval _exec_poststop${i}=\"\${jail_${_j}_exec_poststop${i}:-\${jail_exec_poststop${i}}}\" + [ -z "$(eval echo \"\$_exec_poststop${i}\")" ] && break + i=$((i + 1)) + done + if [ -n "${_exec}" ]; then # simple/backward-compatible execution _exec_start="${_exec}" @@ -102,9 +132,20 @@ init_variables() debug "$_j procdir: $_procdir" debug "$_j ruleset: $_ruleset" debug "$_j fstab: $_fstab" - debug "$_j exec start: $_exec_start" debug "$_j consolelog: $_consolelog" + i=0 + while : ; do + eval out=\"\${_exec_prestart${i}:-''}\" + if [ -z "$out" ]; then + break + fi + debug "$_j exec pre-start #${i}: ${out}" + i=$((i + 1)) + done + + debug "$_j exec start: $_exec_start" + i=1 while [ true ]; do eval out=\"\${_exec_afterstart${i}:-''}\" @@ -117,7 +158,38 @@ init_variables() i=$((i + 1)) done + i=0 + while : ; do + eval out=\"\${_exec_poststart${i}:-''}\" + if [ -z "$out" ]; then + break + fi + debug "$_j exec post-start #${i}: ${out}" + i=$((i + 1)) + done + + i=0 + while : ; do + eval out=\"\${_exec_prestop${i}:-''}\" + if [ -z "$out" ]; then + break + fi + debug "$_j exec pre-stop #${i}: ${out}" + i=$((i + 1)) + done + debug "$_j exec stop: $_exec_stop" + + i=0 + while : ; do + eval out=\"\${_exec_poststop${i}:-''}\" + if [ -z "$out" ]; then + break + fi + debug "$_j exec post-stop #${i}: ${out}" + i=$((i + 1)) + done + debug "$_j flags: $_flags" debug "$_j consolelog: $_consolelog" @@ -555,6 +627,15 @@ jail_start() fi fi _tmp_jail=${_tmp_dir}/jail.$$ + + i=0 + while : ; do + eval out=\"\${_exec_prestart${i}:-''}\" + [ -z "$out" ] && break + ${out} + i=$((i + 1)) + done + eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 @@ -575,6 +656,14 @@ jail_start() echo -n " $_hostname" tail +2 ${_tmp_jail} >${_consolelog} echo ${_jail_id} > /var/run/jail_${_jail}.id + + i=0 + while : ; do + eval out=\"\${_exec_poststart${i}:-''}\" + [ -z "$out" ] && break + ${out} + i=$((i + 1)) + done else jail_umount_fs jail_ips "del" @@ -596,6 +685,15 @@ jail_stop() _jail_id=$(cat /var/run/jail_${_jail}.id) if [ ! -z "${_jail_id}" ]; then init_variables $_jail + + i=0 + while : ; do + eval out=\"\${_exec_prestop${i}:-''}\" + [ -z "$out" ] && break + ${out} + i=$((i + 1)) + done + if [ -n "${_exec_stop}" ]; then eval env -i /usr/sbin/jexec ${_jail_id} ${_exec_stop} \ >> ${_consolelog} 2>&1 @@ -605,6 +703,14 @@ jail_stop() killall -j ${_jail_id} -KILL > /dev/null 2>&1 jail_umount_fs echo -n " $_hostname" + + i=0 + while : ; do + eval out=\"\${_exec_poststop${i}:-''}\" + [ -z "$out" ] && break + ${out} + i=$((i + 1)) + done fi jail_ips "del" rm /var/run/jail_${_jail}.id Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Sun Jan 24 16:58:20 2010 (r202936) +++ stable/7/share/man/man5/rc.conf.5 Sun Jan 24 16:59:04 2010 (r202937) @@ -3455,6 +3455,13 @@ to .Dq Li YES by default for every jail in .Va jail_list . +.It Va jail_exec_prestart Ns Aq Ar N +.Pq Vt str +Unset by default. +When set, use as default value for +.Va jail_ Ns Ao Ar jname Ac Ns Va _exec_prestart Ns Aq Ar N +for every jail in +.Va jail_list . .It Va jail_exec_start .Pq Vt str Unset by default. @@ -3469,12 +3476,33 @@ When set, use as default value for .Va jail_ Ns Ao Ar jname Ac Ns Va _exec_afterstart Ns Aq Ar N for every jail in .Va jail_list . +.It Va jail_exec_poststart Ns Aq Ar N +.Pq Vt str +Unset by default. +When set, use as default value for +.Va jail_ Ns Ao Ar jname Ac Ns Va _exec_poststart Ns Aq Ar N +for every jail in +.Va jail_list . +.It Va jail_exec_prestop Ns Aq Ar N +.Pq Vt str +Unset by default. +When set, use as default value for +.Va jail_ Ns Ao Ar jname Ac Ns Va _exec_prestop Ns Aq Ar N +for every jail in +.Va jail_list . .It Va jail_exec_stop Unset by default. When set, use as default value for .Va jail_ Ns Ao Ar jname Ac Ns Va _exec_stop for every jail in .Va jail_list . +.It Va jail_exec_poststop Ns Aq Ar N +.Pq Vt str +Unset by default. +When set, use as default value for +.Va jail_ Ns Ao Ar jname Ac Ns Va _exec_poststop Ns Aq Ar N +for every jail in +.Va jail_list . .It Va jail_ Ns Ao Ar jname Ac Ns Va _rootdir .Pq Vt str Unset by default. @@ -3589,27 +3617,68 @@ When set to mount the process file system inside jail .Ar jname at jail startup. +.It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_prestart Ns Aq Ar N +.Pq Vt str +Unset by default. +This is the command run as +.Ar N Ns +th command +before jail startup, where +.Ar N +is 0, 1, and so on. +It is run outside the jail. .It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_start .Pq Vt str Set to .Dq Li /bin/sh /etc/rc by default. -This is the command executed at jail startup. +This is the command executed in a jail at jail startup. .It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_afterstart Ns Aq Ar N .Pq Vt str Unset by default. This is the command run as .Ar N Ns th command +in a jail after jail startup, where .Ar N is 1, 2, and so on. +.It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_poststart Ns Aq Ar N +.Pq Vt str +Unset by default. +This is the command run as +.Ar N Ns +th command +after jail startup, where +.Ar N +is 0, 1, and so on. +It is run outside the jail. +.It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_prestop Ns Aq Ar N +.Pq Vt str +Unset by default. +This is the command run as +.Ar N Ns +th command +before jail shutdown, where +.Ar N +is 0, 1, and so on. +It is run outside the jail. .It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_stop .Pq Vt str Set to .Dq Li /bin/sh /etc/rc.shutdown by default. -This is the command executed at jail shutdown. +This is the command executed in a jail at jail shutdown. +.It Va jail_ Ns Ao Ar jname Ac Ns Va _exec_poststop Ns Aq Ar N +.Pq Vt str +Unset by default. +This is the command run as +.Ar N Ns +th command +after jail shutdown, where +.Ar N +is 0, 1, and so on. +It is run outside the jail. .It Va jail_set_hostname_allow .Pq Vt bool If set to From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 17:00:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C751065670; Sun, 24 Jan 2010 17:00:22 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CEFE8FC15; Sun, 24 Jan 2010 17:00:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OH0MlD088485; Sun, 24 Jan 2010 17:00:22 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OH0M9t088484; Sun, 24 Jan 2010 17:00:22 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201001241700.o0OH0M9t088484@svn.freebsd.org> From: Max Khon Date: Sun, 24 Jan 2010 17:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202938 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 17:00:22 -0000 Author: fjoe Date: Sun Jan 24 17:00:21 2010 New Revision: 202938 URL: http://svn.freebsd.org/changeset/base/202938 Log: Record rev. 198277 MFC. Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 18:05:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 482B81065676; Sun, 24 Jan 2010 18:05:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 375BC8FC16; Sun, 24 Jan 2010 18:05:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OI5d65002906; Sun, 24 Jan 2010 18:05:39 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OI5cDb002905; Sun, 24 Jan 2010 18:05:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001241805.o0OI5cDb002905@svn.freebsd.org> From: Warner Losh Date: Sun, 24 Jan 2010 18:05:38 +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: r202939 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 18:05:39 -0000 Author: imp Date: Sun Jan 24 18:05:38 2010 New Revision: 202939 URL: http://svn.freebsd.org/changeset/base/202939 Log: o Write the soft reset bit in the cavium core to reset. [1] o panic if the board boot descriptor is too old... Obtained from: [1] looking at the cavium sdk's executive code Modified: head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/octeon_pcmap_regs.h Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sun Jan 24 17:00:21 2010 (r202938) +++ head/sys/mips/cavium/octeon_machdep.c Sun Jan 24 18:05:38 2010 (r202939) @@ -109,7 +109,7 @@ platform_cpu_init() void platform_reset(void) { - mips_generic_reset(); + oct_write64(OCTEON_CIU_SOFT_RST, 1); } @@ -961,7 +961,9 @@ octeon_boot_params_init(register_t ptr) if (ptr != 0 && ptr < MAX_APP_DESC_ADDR) { app_desc_ptr = (octeon_boot_descriptor_t *)(intptr_t)ptr; octeon_bd_ver = app_desc_ptr->desc_version; - if (app_desc_ptr->desc_version == 6) + if (app_desc_ptr->desc_version < 6) + panic("Your boot code is too old to be supported.\n"); + if (app_desc_ptr->desc_version >= 6) bad_desc = octeon_process_app_desc_ver_6(); } if (bad_desc) Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Sun Jan 24 17:00:21 2010 (r202938) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Sun Jan 24 18:05:38 2010 (r202939) @@ -597,11 +597,9 @@ static inline mipsx_addr_size octeon_ptr #define OCTEON_CIU_PP_RST OCTEON_ADD_IO_SEG(0x0001070000000700ull) +#define OCTEON_CIU_SOFT_RST OCTEON_ADD_IO_SEG(0x0001070000000740ull) #define OCTEON_OCTEON_DID_TAG 12ULL - - - /* * octeon_addr_t */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 18:16:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D086106568B; Sun, 24 Jan 2010 18:16:39 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8A98FC08; Sun, 24 Jan 2010 18:16:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OIGckH005355; Sun, 24 Jan 2010 18:16:38 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OIGcL0005353; Sun, 24 Jan 2010 18:16:38 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001241816.o0OIGcL0005353@svn.freebsd.org> From: Attilio Rao Date: Sun, 24 Jan 2010 18:16:38 +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: r202940 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 18:16:39 -0000 Author: attilio Date: Sun Jan 24 18:16:38 2010 New Revision: 202940 URL: http://svn.freebsd.org/changeset/base/202940 Log: Split out an invariant in order to better check that newtd, when provided, must be on a runqueue. Tested by: Giovanni Trematerra MFC: 2 weeks X-MFC: r202889 Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sun Jan 24 18:05:38 2010 (r202939) +++ head/sys/kern/sched_4bsd.c Sun Jan 24 18:16:38 2010 (r202940) @@ -943,8 +943,10 @@ sched_switch(struct thread *td, struct t if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); - if (newtd) + if (newtd) { + MPASS(newtd->td_lock == &sched_lock); newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); + } td->td_lastcpu = td->td_oncpu; td->td_flags &= ~TDF_NEEDRESCHED; @@ -987,8 +989,8 @@ sched_switch(struct thread *td, struct t sched_load_add(); } else { newtd = choosethread(); + MPASS(newtd->td_lock == &sched_lock); } - MPASS(newtd->td_lock == &sched_lock); if (td != newtd) { #ifdef HWPMC_HOOKS From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 18:18:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 476EC1065693; Sun, 24 Jan 2010 18:18:53 +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 358A68FC1B; Sun, 24 Jan 2010 18:18:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OIIrD3005894; Sun, 24 Jan 2010 18:18:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OIIrOK005891; Sun, 24 Jan 2010 18:18:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001241818.o0OIIrOK005891@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 24 Jan 2010 18:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202941 - in stable/7/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 18:18:53 -0000 Author: bz Date: Sun Jan 24 18:18:52 2010 New Revision: 202941 URL: http://svn.freebsd.org/changeset/base/202941 Log: MFC r202469: Garbage collect references to the no longer implemented tcp_fasttimo(). Approved by: re (kib) Modified: stable/7/sys/netinet/tcp_var.h stable/7/sys/netinet6/in6_proto.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_var.h ============================================================================== --- stable/7/sys/netinet/tcp_var.h Sun Jan 24 18:16:38 2010 (r202940) +++ stable/7/sys/netinet/tcp_var.h Sun Jan 24 18:18:52 2010 (r202941) @@ -534,7 +534,6 @@ int tcp_ctloutput(struct socket *, stru struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); -void tcp_fasttimo(void); void tcp_init(void); void tcp_fini(void *); char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, Modified: stable/7/sys/netinet6/in6_proto.c ============================================================================== --- stable/7/sys/netinet6/in6_proto.c Sun Jan 24 18:16:38 2010 (r202940) +++ stable/7/sys/netinet6/in6_proto.c Sun Jan 24 18:18:52 2010 (r202941) @@ -164,7 +164,6 @@ struct ip6protosw inet6sw[] = { .pr_ctloutput = tcp_ctloutput, #ifndef INET /* don't call initialization and timeout routines twice */ .pr_init = tcp_init, - .pr_fasttimo = tcp_fasttimo, .pr_slowtimo = tcp_slowtimo, #endif .pr_drain = tcp_drain, From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 19:11:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B4A41065670; Sun, 24 Jan 2010 19:11:08 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 784838FC1A; Sun, 24 Jan 2010 19:11:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OJB8HF017557; Sun, 24 Jan 2010 19:11:08 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OJB8nW017552; Sun, 24 Jan 2010 19:11:08 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201001241911.o0OJB8nW017552@svn.freebsd.org> From: Joerg Wunsch Date: Sun, 24 Jan 2010 19:11: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: r202943 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 19:11:08 -0000 Author: joerg Date: Sun Jan 24 19:11:08 2010 New Revision: 202943 URL: http://svn.freebsd.org/changeset/base/202943 Log: Add man pages for the gpib(4), pcii(4), and tnt4882(4) drivers. MFC after: 3 days Added: head/share/man/man4/gpib.4 (contents, props changed) head/share/man/man4/pcii.4 (contents, props changed) head/share/man/man4/tnt4882.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Jan 24 18:56:57 2010 (r202942) +++ head/share/man/man4/Makefile Sun Jan 24 19:11:08 2010 (r202943) @@ -120,6 +120,7 @@ MAN= aac.4 \ geom_linux_lvm.4 \ geom_uzip.4 \ gif.4 \ + gpib.4 \ gre.4 \ harp.4 \ hatm.4 \ @@ -302,6 +303,7 @@ MAN= aac.4 \ pci.4 \ pcib.4 \ pcic.4 \ + pcii.4 \ pcm.4 \ pcn.4 \ pim.4 \ @@ -400,6 +402,7 @@ MAN= aac.4 \ textdump.4 \ ti.4 \ tl.4 \ + tnt4882.4 \ trm.4 \ tty.4 \ tun.4 \ Added: head/share/man/man4/gpib.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/gpib.4 Sun Jan 24 19:11:08 2010 (r202943) @@ -0,0 +1,67 @@ +.\" Copyright (c) 2010, Joerg Wunsch +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 24, 2010 +.Dt GPIB 4 +.Os +.Sh NAME +.Nm gpib +.Nd General-Purpose Instrument Bus (GPIB) driver +.Sh SYNOPSIS +Either of the +.Xr pcii 4 +or +.Xr tnt4882 4 +drivers use this driver as the backend. +.Sh DESCRIPTION +The +.Nm +driver provides support for driving an IEEE-488 bus, also called +IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument +Bus), or GPIB (General Purpose Instrument Bus). +The device can become either a listener, talker, controller, and +in particular a master controller on the bus. +.Sh FILES +.Bl -tag -width /dev/gpibNNib +.It Pa /dev/gpib Ns Em N Ns "ib" +Main device node to access the driver. +.It Pa /dev/gpib Ns Em N Ns "l" +Listen-only entry to the driver. +When opening, an instrument can send data to this device on the +bus in an unaddressed mode, for example hard-copy printer data. +.El +.Sh SEE ALSO +.\" .Xr libgpib 3 , +.Xr gpib 4 , +.Xr tnt4882 4 +.Sh HISTORY +The +.Nm +driver was written by Poul-Henning Kamp, and first appeared in +.Fx 5.4 . +.Sh AUTHORS +This manual page was written by +.An J\(:org Wunsch . Added: head/share/man/man4/pcii.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/pcii.4 Sun Jan 24 19:11:08 2010 (r202943) @@ -0,0 +1,97 @@ +.\" Copyright (c) 2010, Joerg Wunsch +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 24, 2010 +.Dt PCII 4 +.Os +.Sh NAME +.Nm pcii +.Nd National Instruments PCIIA GPIB controller driver +.Sh SYNOPSIS +.Cd "device pcii" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.pcii.0.at="isa" +.Cd hint.pcii.0.port="0x2e1" +.Cd hint.pcii.0.irq="7" +.Cd hint.pcii.0.drq="1" +.Sh DESCRIPTION +The +.Nm +driver provides support for driving an IEEE-488 bus, also called +IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument +Bus), or GPIB (General Purpose Instrument Bus). +The driver supports National Instruments PCIIA cards (sometimes +also refered to as PC2A) and compatibles. +These cards use a NEC \(mcPD7210 controller IC as the main +interface between the host computer and the instrument bus. +.Ss IO memory space layout +The PCIIA cards use a very specific IO memory space allocation layout. +The address bits A0 through A9 (which have traditionally been the only +address bits evaluated on IBM PC XT extension cards) are hardwired to +address 0x2e1. +Bits A10 through A12 are used by the \(mcPD7210 register select lines. +This makes the individual 7210 registers being 0x400 bytes apart in the +ISA bus address space. +Address bits A13 and A14 are compared to a DIP switch setting on the +card, allowing for up to 4 different cards being installed (at base +addresses 0x2e1, 0x22e1, 0x42e1, and 0x62e1, respectively). +A15 has been used to select an optional on-board time-of-day clock +chip (MM58167A) on the original PCIIA rather than the \(mcPD7210 +(which is not implemented on later boards and clones). +Finally, the IO addresses 0x2f0 ... 0x2f7 are used for a +.Em special interrupt handling feature +(re-enable interrupts so the IRQ can be shared), where actually only +address 0x2f0 plus the actual IRQ level is required for each card. +Some clones do not appear to require this special IRQ handling, and +are thus likely to not support the shared IRQ feature. +.Pp +Only the base address of the card needs to be specified in the ISA +device hints; the driver takes care to derive all other IO addresses +needed during the probe phase. +.Ss Supported cards +The following cards are known to be supported: +.Bl -bullet -offset indent +.It +B&C Microsystems PC488A-0 +.It +National Instruments GPIB-PCII/PCIIA (in PCIIa mode) +.It +Axiom AX5488 +.El +.Sh SEE ALSO +.\" .Xr libgpib 3 , +.Xr gpib 4 , +.Xr device.hints 5 +.Sh HISTORY +The +.Nm +driver was written by Poul-Henning Kamp, and first appeared in +.Fx 5.4 . +.Sh AUTHORS +This manual page was written by +.An J\(:org Wunsch . Added: head/share/man/man4/tnt4882.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/tnt4882.4 Sun Jan 24 19:11:08 2010 (r202943) @@ -0,0 +1,55 @@ +.\" Copyright (c) 2010, Joerg Wunsch +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 24, 2010 +.Dt TNT4882 4 +.Os +.Sh NAME +.Nm tnt4882 +.Nd National Instruments TNT4882A GPIB controller driver +.Sh SYNOPSIS +.Cd "device tnt4882" +.Sh DESCRIPTION +The +.Nm +driver provides support for driving an IEEE-488 bus, also called +IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument +Bus), or GPIB (General Purpose Instrument Bus). +The driver supports National Instruments PCI GPIB cards using +the TNT4882 bus interface chip. +This chip emulates a NEC \(mcPD7210 controller IC as the main +interface between the host computer and the instrument bus. +.Sh SEE ALSO +.\" .Xr libgpib 3 , +.Xr gpib 4 , +.Sh HISTORY +The +.Nm +driver was written by Poul-Henning Kamp, and first appeared in +.Fx 5.4 . +.Sh AUTHORS +This manual page was written by +.An J\(:org Wunsch . From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 19:17:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E826106566B; Sun, 24 Jan 2010 19:17:36 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF3E8FC1F; Sun, 24 Jan 2010 19:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OJHaY9018991; Sun, 24 Jan 2010 19:17:36 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OJHaZ4018989; Sun, 24 Jan 2010 19:17:36 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001241917.o0OJHaZ4018989@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 24 Jan 2010 19:17:35 +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: r202944 - head/bin/ls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 19:17:36 -0000 Author: jh Date: Sun Jan 24 19:17:35 2010 New Revision: 202944 URL: http://svn.freebsd.org/changeset/base/202944 Log: Print full path in the error message. It's possible that fts(3) provides an empty fts_name and reporting the full path is more appropriate especially with the -R option. PR: bin/107515 Submitted by: bde Approved by: trasz (mentor) MFC after: 1 week Modified: head/bin/ls/ls.c Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Sun Jan 24 19:11:08 2010 (r202943) +++ head/bin/ls/ls.c Sun Jan 24 19:17:35 2010 (r202944) @@ -508,7 +508,7 @@ traverse(int argc, char *argv[], int opt break; case FTS_DNR: case FTS_ERR: - warnx("%s: %s", p->fts_name, strerror(p->fts_errno)); + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; case FTS_D: From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 19:23:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D7CE106566C; Sun, 24 Jan 2010 19:23:08 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C49C8FC08; Sun, 24 Jan 2010 19:23:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OJN8XM020265; Sun, 24 Jan 2010 19:23:08 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OJN8YS020261; Sun, 24 Jan 2010 19:23:08 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001241923.o0OJN8YS020261@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 24 Jan 2010 19:23: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: r202945 - head/bin/ls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 19:23:08 -0000 Author: jh Date: Sun Jan 24 19:23:07 2010 New Revision: 202945 URL: http://svn.freebsd.org/changeset/base/202945 Log: Fixes for ls(1) long format (-l) output: - Allow -h option to work if the listing contains at least one device file. - Align major and minor device numbers correctly to the size field. PR: bin/125678 Approved by: trasz (mentor) MFC after: 1 month Modified: head/bin/ls/ls.c head/bin/ls/ls.h head/bin/ls/print.c Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Sun Jan 24 19:17:35 2010 (r202944) +++ head/bin/ls/ls.c Sun Jan 24 19:23:07 2010 (r202945) @@ -559,7 +559,8 @@ display(const FTSENT *p, FTSENT *list, i long maxblock; u_long btotal, labelstrlen, maxinode, maxlen, maxnlink; u_long maxlabelstr; - int bcfile, maxflags; + u_int devstrlen; + int maxflags; gid_t maxgroup; uid_t maxuser; size_t flen, ulen, glen; @@ -651,7 +652,7 @@ display(const FTSENT *p, FTSENT *list, i MAKENINES(maxsize); free(jinitmax); } - bcfile = 0; + devstrlen = 0; flags = NULL; for (cur = list, entries = 0; cur; cur = cur->fts_link) { if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) { @@ -791,9 +792,15 @@ label_out: np->group = &np->data[ulen + 1]; (void)strcpy(np->group, group); - if (S_ISCHR(sp->st_mode) || - S_ISBLK(sp->st_mode)) - bcfile = 1; + if ((S_ISCHR(sp->st_mode) || + S_ISBLK(sp->st_mode)) && + devstrlen < DEVSTR_HEX_LEN) { + if (minor(sp->st_rdev) > 255 || + minor(sp->st_rdev) < 0) + devstrlen = DEVSTR_HEX_LEN; + else + devstrlen = DEVSTR_LEN; + } if (f_flags) { np->flags = &np->data[ulen + glen + 2]; @@ -825,7 +832,6 @@ label_out: d.entries = entries; d.maxlen = maxlen; if (needstats) { - d.bcfile = bcfile; d.btotal = btotal; (void)snprintf(buf, sizeof(buf), "%lu", maxblock); d.s_block = strlen(buf); @@ -836,8 +842,14 @@ label_out: d.s_inode = strlen(buf); (void)snprintf(buf, sizeof(buf), "%lu", maxnlink); d.s_nlink = strlen(buf); - (void)snprintf(buf, sizeof(buf), "%ju", maxsize); - d.s_size = strlen(buf); + if (f_humanval) + d.s_size = HUMANVALSTR_LEN; + else { + (void)snprintf(buf, sizeof(buf), "%ju", maxsize); + d.s_size = strlen(buf); + } + if (d.s_size < devstrlen) + d.s_size = devstrlen; d.s_user = maxuser; } printfcn(&d); Modified: head/bin/ls/ls.h ============================================================================== --- head/bin/ls/ls.h Sun Jan 24 19:17:35 2010 (r202944) +++ head/bin/ls/ls.h Sun Jan 24 19:23:07 2010 (r202945) @@ -35,6 +35,10 @@ #define NO_PRINT 1 +#define HUMANVALSTR_LEN 5 +#define DEVSTR_LEN 8 +#define DEVSTR_HEX_LEN 15 + extern long blocksize; /* block size units */ extern int f_accesstime; /* use time of last access */ @@ -62,7 +66,6 @@ extern int f_color; /* add type in colo typedef struct { FTSENT *list; u_long btotal; - int bcfile; int entries; int maxlen; u_int s_block; Modified: head/bin/ls/print.c ============================================================================== --- head/bin/ls/print.c Sun Jan 24 19:17:35 2010 (r202944) +++ head/bin/ls/print.c Sun Jan 24 19:23:07 2010 (r202945) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" static int printaname(const FTSENT *, u_long, u_long); +static void printdev(size_t, dev_t); static void printlink(const FTSENT *); static void printtime(time_t); static int printtype(u_int); @@ -165,16 +166,7 @@ printlong(const DISPLAY *dp) if (f_label) (void)printf("%-*s ", dp->s_label, np->label); if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode)) - if (minor(sp->st_rdev) > 255 || minor(sp->st_rdev) < 0) - (void)printf("%3d, 0x%08x ", - major(sp->st_rdev), - (u_int)minor(sp->st_rdev)); - else - (void)printf("%3d, %3d ", - major(sp->st_rdev), minor(sp->st_rdev)); - else if (dp->bcfile) - (void)printf("%*s%*jd ", - 8 - dp->s_size, "", dp->s_size, sp->st_size); + printdev(dp->s_size, sp->st_rdev); else printsize(dp->s_size, sp->st_size); if (f_accesstime) @@ -353,6 +345,24 @@ printaname(const FTSENT *p, u_long inode return (chcnt); } +/* + * Print device special file major and minor numbers. + */ +static void +printdev(size_t width, dev_t dev) +{ + char buf[DEVSTR_HEX_LEN + 1]; + + if (minor(dev) > 255 || minor(dev) < 0) + (void)snprintf(buf, sizeof(buf), "%3d, 0x%08x", + major(dev), (u_int)minor(dev)); + else + (void)snprintf(buf, sizeof(buf), "%3d, %3d", + major(dev), minor(dev)); + + (void)printf("%*s ", (u_int)width, buf); +} + static void printtime(time_t ftime) { @@ -592,11 +602,15 @@ printsize(size_t width, off_t bytes) { if (f_humanval) { - char buf[5]; + /* + * Reserve one space before the size and allocate room for + * the trailing '\0'. + */ + char buf[HUMANVALSTR_LEN - 1 + 1]; humanize_number(buf, sizeof(buf), (int64_t)bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - (void)printf("%5s ", buf); + (void)printf("%*s ", (u_int)width, buf); } else (void)printf("%*jd ", (u_int)width, bytes); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 19:36:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9943A106568B; Sun, 24 Jan 2010 19:36:43 +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 6D1B98FC15; Sun, 24 Jan 2010 19:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OJah7X023293; Sun, 24 Jan 2010 19:36:43 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OJahLs023290; Sun, 24 Jan 2010 19:36:43 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001241936.o0OJahLs023290@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 24 Jan 2010 19:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202946 - in stable/6/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 19:36:43 -0000 Author: bz Date: Sun Jan 24 19:36:43 2010 New Revision: 202946 URL: http://svn.freebsd.org/changeset/base/202946 Log: MFC r202469: Garbage collect references to the no longer implemented tcp_fasttimo(). Modified: stable/6/sys/netinet/tcp_var.h stable/6/sys/netinet6/in6_proto.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netinet/tcp_var.h ============================================================================== --- stable/6/sys/netinet/tcp_var.h Sun Jan 24 19:23:07 2010 (r202945) +++ stable/6/sys/netinet/tcp_var.h Sun Jan 24 19:36:43 2010 (r202946) @@ -526,7 +526,6 @@ int tcp_ctloutput(struct socket *, stru struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); -void tcp_fasttimo(void); void tcp_init(void); void tcp_fini(void *); void tcp_reass_init(void); Modified: stable/6/sys/netinet6/in6_proto.c ============================================================================== --- stable/6/sys/netinet6/in6_proto.c Sun Jan 24 19:23:07 2010 (r202945) +++ stable/6/sys/netinet6/in6_proto.c Sun Jan 24 19:36:43 2010 (r202946) @@ -182,7 +182,6 @@ struct ip6protosw inet6sw[] = { .pr_ctloutput = tcp_ctloutput, #ifndef INET /* don't call initialization and timeout routines twice */ .pr_init = tcp_init, - .pr_fasttimo = tcp_fasttimo, .pr_slowtimo = tcp_slowtimo, #endif .pr_drain = tcp_drain, From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 20:15:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4117106566B; Sun, 24 Jan 2010 20:15:59 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D27EF8FC0C; Sun, 24 Jan 2010 20:15:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OKFxKW032002; Sun, 24 Jan 2010 20:15:59 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OKFx3U032000; Sun, 24 Jan 2010 20:15:59 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201001242015.o0OKFx3U032000@svn.freebsd.org> From: David Schultz Date: Sun, 24 Jan 2010 20:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202947 - stable/8/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 20:16:00 -0000 Author: das Date: Sun Jan 24 20:15:59 2010 New Revision: 202947 URL: http://svn.freebsd.org/changeset/base/202947 Log: MFC r197752: Better glibc compatibility for getline/getdelim: - Tolerate applications that pass a NULL pointer for the buffer and claim that the capacity of the buffer is nonzero. - If an application passes in a non-NULL buffer pointer and claims the buffer has zero capacity, we should free (well, realloc) it anyway. It could have been obtained from malloc(0), so failing to free it would be a small memory leak. Modified: stable/8/lib/libc/stdio/getdelim.c Modified: stable/8/lib/libc/stdio/getdelim.c ============================================================================== --- stable/8/lib/libc/stdio/getdelim.c Sun Jan 24 19:36:43 2010 (r202946) +++ stable/8/lib/libc/stdio/getdelim.c Sun Jan 24 20:15:59 2010 (r202947) @@ -120,8 +120,8 @@ getdelim(char ** __restrict linep, size_ goto error; } - if (*linecapp == 0) - *linep = NULL; + if (*linep == NULL) + *linecapp = 0; if (fp->_r <= 0 && __srefill(fp)) { /* If fp is at EOF already, we just need space for the NUL. */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 20:19:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 22E4B1065672; Sun, 24 Jan 2010 20:19:08 +0000 (UTC) Date: Sun, 24 Jan 2010 20:19:08 +0000 From: Alexey Dokuchaev To: Jilles Tjoelker Message-ID: <20100124201907.GA83083@FreeBSD.org> References: <201001231731.o0NHVDNY071237@svn.freebsd.org> <4B5B565C.3020604@FreeBSD.org> <20100124133058.GA34275@stack.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20100124133058.GA34275@stack.nl> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, Antoine Brodin , Doug Barton , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r202892 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 20:19:08 -0000 On Sun, Jan 24, 2010 at 02:30:58PM +0100, Jilles Tjoelker wrote: > In the light of this, the size of the binary compared to the GNU one > seems a bit disappointing to me. Not that it is particularly hard to figure, but "the size of the binary (XXX bytes) compared to the GNU one (YYY bytes)" seems like a better phrase to me. :-) ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 21:17:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A18E106566C; Sun, 24 Jan 2010 21:17:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FF228FC12; Sun, 24 Jan 2010 21:17:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OLH7hb045624; Sun, 24 Jan 2010 21:17:07 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OLH717045623; Sun, 24 Jan 2010 21:17:07 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001242117.o0OLH717045623@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 24 Jan 2010 21:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202949 - in stable/8/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 21:17:07 -0000 Author: gavin Date: Sun Jan 24 21:17:06 2010 New Revision: 202949 URL: http://svn.freebsd.org/changeset/base/202949 Log: Fix mergeinfo after r202464, which was merged to etc/rc.d rather than etc Approved by: ed (mentor, implicit) Modified: Directory Properties: stable/8/etc/ (props changed) stable/8/etc/rc.d/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 22:01:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D676106566C; Sun, 24 Jan 2010 22:01:04 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7638FC15; Sun, 24 Jan 2010 22:01:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OM14QB055312; Sun, 24 Jan 2010 22:01:04 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OM14Su055310; Sun, 24 Jan 2010 22:01:04 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001242201.o0OM14Su055310@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 24 Jan 2010 22:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202950 - stable/8/sys/dev/ae X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 22:01:04 -0000 Author: gavin Date: Sun Jan 24 22:01:04 2010 New Revision: 202950 URL: http://svn.freebsd.org/changeset/base/202950 Log: Merge r202000 from head: Don't panic on attach if we can't allocate ifp Approved by: ed (mentor, implicit) Modified: stable/8/sys/dev/ae/if_ae.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ae/if_ae.c ============================================================================== --- stable/8/sys/dev/ae/if_ae.c Sun Jan 24 21:17:06 2010 (r202949) +++ stable/8/sys/dev/ae/if_ae.c Sun Jan 24 22:01:04 2010 (r202950) @@ -367,6 +367,7 @@ ae_attach(device_t dev) if (ifp == NULL) { device_printf(dev, "could not allocate ifnet structure.\n"); error = ENXIO; + goto fail; } ifp->if_softc = sc; From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 22:17:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7212B106566C; Sun, 24 Jan 2010 22:17:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE168FC0A; Sun, 24 Jan 2010 22:17:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OMH8Me058905; Sun, 24 Jan 2010 22:17:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OMH8q5058898; Sun, 24 Jan 2010 22:17:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001242217.o0OMH8q5058898@svn.freebsd.org> From: Michael Tuexen Date: Sun, 24 Jan 2010 22:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202951 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 22:17:08 -0000 Author: tuexen Date: Sun Jan 24 22:17:08 2010 New Revision: 202951 URL: http://svn.freebsd.org/changeset/base/202951 Log: MFC 202449: Get rid of support of an old version of the SCTP-AUTH draft. Get rid of unused MD5 code. Modified: stable/8/sys/netinet/sctp_auth.c stable/8/sys/netinet/sctp_auth.h stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_uio.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_auth.c ============================================================================== --- stable/8/sys/netinet/sctp_auth.c Sun Jan 24 22:01:04 2010 (r202950) +++ stable/8/sys/netinet/sctp_auth.c Sun Jan 24 22:17:08 2010 (r202951) @@ -456,21 +456,6 @@ sctp_compute_hashkey(sctp_key_t * key1, /* concatenate the keys */ if (sctp_compare_key(key1, key2) <= 0) { -#ifdef SCTP_AUTH_DRAFT_04 - /* key is key1 + shared + key2 */ - if (sctp_get_keylen(key1)) { - bcopy(key1->key, key_ptr, key1->keylen); - key_ptr += key1->keylen; - } - if (sctp_get_keylen(shared)) { - bcopy(shared->key, key_ptr, shared->keylen); - key_ptr += shared->keylen; - } - if (sctp_get_keylen(key2)) { - bcopy(key2->key, key_ptr, key2->keylen); - key_ptr += key2->keylen; - } -#else /* key is shared + key1 + key2 */ if (sctp_get_keylen(shared)) { bcopy(shared->key, key_ptr, shared->keylen); @@ -484,23 +469,7 @@ sctp_compute_hashkey(sctp_key_t * key1, bcopy(key2->key, key_ptr, key2->keylen); key_ptr += key2->keylen; } -#endif } else { -#ifdef SCTP_AUTH_DRAFT_04 - /* key is key2 + shared + key1 */ - if (sctp_get_keylen(key2)) { - bcopy(key2->key, key_ptr, key2->keylen); - key_ptr += key2->keylen; - } - if (sctp_get_keylen(shared)) { - bcopy(shared->key, key_ptr, shared->keylen); - key_ptr += shared->keylen; - } - if (sctp_get_keylen(key1)) { - bcopy(key1->key, key_ptr, key1->keylen); - key_ptr += key1->keylen; - } -#else /* key is shared + key2 + key1 */ if (sctp_get_keylen(shared)) { bcopy(shared->key, key_ptr, shared->keylen); @@ -514,7 +483,6 @@ sctp_compute_hashkey(sctp_key_t * key1, bcopy(key1->key, key_ptr, key1->keylen); key_ptr += key1->keylen; } -#endif } return (new_key); } @@ -739,7 +707,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t * l (hmac_id != SCTP_AUTH_HMAC_ID_SHA384) && (hmac_id != SCTP_AUTH_HMAC_ID_SHA512) && #endif - (hmac_id != SCTP_AUTH_HMAC_ID_MD5)) { + 1) { return (-1); } /* Now is it already in the list */ @@ -802,12 +770,6 @@ sctp_negotiate_hmacid(sctp_hmaclist_t * for (i = 0; i < peer->num_algo; i++) { for (j = 0; j < local->num_algo; j++) { if (peer->hmac[i] == local->hmac[j]) { -#ifndef SCTP_AUTH_DRAFT_04 - /* "skip" MD5 as it's been deprecated */ - if (peer->hmac[i] == SCTP_AUTH_HMAC_ID_MD5) - continue; -#endif - /* found the "best" one */ SCTPDBG(SCTP_DEBUG_AUTH1, "SCTP: negotiated peer HMAC id %u\n", @@ -911,8 +873,6 @@ sctp_get_hmac_digest_len(uint16_t hmac_a switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: return (SCTP_AUTH_DIGEST_LEN_SHA1); - case SCTP_AUTH_HMAC_ID_MD5: - return (SCTP_AUTH_DIGEST_LEN_MD5); #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: return (SCTP_AUTH_DIGEST_LEN_SHA224); @@ -936,7 +896,6 @@ sctp_get_hmac_block_len(uint16_t hmac_al { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - case SCTP_AUTH_HMAC_ID_MD5: #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: #endif @@ -962,9 +921,6 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_ case SCTP_AUTH_HMAC_ID_SHA1: SHA1_Init(&ctx->sha1); break; - case SCTP_AUTH_HMAC_ID_MD5: - MD5_Init(&ctx->md5); - break; #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: break; @@ -995,9 +951,6 @@ sctp_hmac_update(uint16_t hmac_algo, sct case SCTP_AUTH_HMAC_ID_SHA1: SHA1_Update(&ctx->sha1, text, textlen); break; - case SCTP_AUTH_HMAC_ID_MD5: - MD5_Update(&ctx->md5, text, textlen); - break; #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: break; @@ -1028,9 +981,6 @@ sctp_hmac_final(uint16_t hmac_algo, sctp case SCTP_AUTH_HMAC_ID_SHA1: SHA1_Final(digest, &ctx->sha1); break; - case SCTP_AUTH_HMAC_ID_MD5: - MD5_Final(digest, &ctx->md5); - break; #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: break; @@ -1636,15 +1586,6 @@ sctp_auth_get_cookie_params(struct sctp_ (uint8_t *) & tmp_param); } /* concatenate the full random key */ -#ifdef SCTP_AUTH_DRAFT_04 - keylen = random_len; - new_key = sctp_alloc_key(keylen); - if (new_key != NULL) { - /* copy in the RANDOM */ - if (p_random != NULL) - bcopy(p_random->random_data, new_key->key, random_len); - } -#else keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; if (chunks != NULL) { keylen += sizeof(*chunks) + num_chunks; @@ -1668,15 +1609,10 @@ sctp_auth_get_cookie_params(struct sctp_ sizeof(*hmacs) + hmacs_len); } } -#endif if (stcb->asoc.authinfo.random != NULL) sctp_free_key(stcb->asoc.authinfo.random); stcb->asoc.authinfo.random = new_key; stcb->asoc.authinfo.random_len = random_len; -#ifdef SCTP_AUTH_DRAFT_04 - /* don't include the chunks and hmacs for draft -04 */ - stcb->asoc.authinfo.random->keylen = random_len; -#endif sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.assoc_keyid); sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.recv_keyid); @@ -2143,11 +2079,6 @@ sctp_initialize_auth_params(struct sctp_ &stcb->asoc.shared_keys); /* now set the concatenated key (random + chunks + hmacs) */ -#ifdef SCTP_AUTH_DRAFT_04 - /* don't include the chunks and hmacs for draft -04 */ - keylen = random_len; - new_key = sctp_generate_random_key(keylen); -#else /* key includes parameter headers */ keylen = (3 * sizeof(struct sctp_paramhdr)) + random_len + chunks_len + hmacs_len; @@ -2188,436 +2119,8 @@ sctp_initialize_auth_params(struct sctp_ (void)sctp_serialize_hmaclist(stcb->asoc.local_hmacs, new_key->key + keylen); } -#endif if (stcb->asoc.authinfo.random != NULL) sctp_free_key(stcb->asoc.authinfo.random); stcb->asoc.authinfo.random = new_key; stcb->asoc.authinfo.random_len = random_len; } - - -#ifdef SCTP_HMAC_TEST -/* - * HMAC and key concatenation tests - */ -static void -sctp_print_digest(uint8_t * digest, uint32_t digestlen, const char *str) -{ - uint32_t i; - - printf("\n%s: 0x", str); - if (digest == NULL) - return; - - for (i = 0; i < digestlen; i++) - printf("%02x", digest[i]); -} - -static int -sctp_test_hmac(const char *str, uint16_t hmac_id, uint8_t * key, - uint32_t keylen, uint8_t * text, uint32_t textlen, - uint8_t * digest, uint32_t digestlen) -{ - uint8_t computed_digest[SCTP_AUTH_DIGEST_LEN_MAX]; - - printf("\n%s:", str); - sctp_hmac(hmac_id, key, keylen, text, textlen, computed_digest); - sctp_print_digest(digest, digestlen, "Expected digest"); - sctp_print_digest(computed_digest, digestlen, "Computed digest"); - if (memcmp(digest, computed_digest, digestlen) != 0) { - printf("\nFAILED"); - return (-1); - } else { - printf("\nPASSED"); - return (0); - } -} - - -/* - * RFC 2202: HMAC-SHA1 test cases - */ -void -sctp_test_hmac_sha1(void) -{ - uint8_t *digest; - uint8_t key[128]; - uint32_t keylen; - uint8_t text[128]; - uint32_t textlen; - uint32_t digestlen = 20; - int failed = 0; - - /*- - * test_case = 1 - * key = 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b - * key_len = 20 - * data = "Hi There" - * data_len = 8 - * digest = 0xb617318655057264e28bc0b6fb378c8ef146be00 - */ - keylen = 20; - memset(key, 0x0b, keylen); - textlen = 8; - strcpy(text, "Hi There"); - digest = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1\x46\xbe\x00"; - if (sctp_test_hmac("SHA1 test case 1", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 2 - * key = "Jefe" - * key_len = 4 - * data = "what do ya want for nothing?" - * data_len = 28 - * digest = 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79 - */ - keylen = 4; - strcpy(key, "Jefe"); - textlen = 28; - strcpy(text, "what do ya want for nothing?"); - digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79"; - if (sctp_test_hmac("SHA1 test case 2", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 3 - * key = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - * key_len = 20 - * data = 0xdd repeated 50 times - * data_len = 50 - * digest = 0x125d7342b9ac11cd91a39af48aa17b4f63f175d3 - */ - keylen = 20; - memset(key, 0xaa, keylen); - textlen = 50; - memset(text, 0xdd, textlen); - digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3"; - if (sctp_test_hmac("SHA1 test case 3", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 4 - * key = 0x0102030405060708090a0b0c0d0e0f10111213141516171819 - * key_len = 25 - * data = 0xcd repeated 50 times - * data_len = 50 - * digest = 0x4c9007f4026250c6bc8414f9bf50c86c2d7235da - */ - keylen = 25; - memcpy(key, "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", keylen); - textlen = 50; - memset(text, 0xcd, textlen); - digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda"; - if (sctp_test_hmac("SHA1 test case 4", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 5 - * key = 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c - * key_len = 20 - * data = "Test With Truncation" - * data_len = 20 - * digest = 0x4c1a03424b55e07fe7f27be1d58bb9324a9a5a04 - * digest-96 = 0x4c1a03424b55e07fe7f27be1 - */ - keylen = 20; - memset(key, 0x0c, keylen); - textlen = 20; - strcpy(text, "Test With Truncation"); - digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04"; - if (sctp_test_hmac("SHA1 test case 5", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 6 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key - Hash Key First" - * data_len = 54 - * digest = 0xaa4ae5e15272d00e95705637ce8a3b55ed402112 - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 54; - strcpy(text, "Test Using Larger Than Block-Size Key - Hash Key First"); - digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12"; - if (sctp_test_hmac("SHA1 test case 6", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 7 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data" - * data_len = 73 - * digest = 0xe8e99d0f45237d786d6bbaa7965c7808bbff1a91 - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 73; - strcpy(text, "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"); - digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91"; - if (sctp_test_hmac("SHA1 test case 7", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /* done with all tests */ - if (failed) - printf("\nSHA1 test results: %d cases failed", failed); - else - printf("\nSHA1 test results: all test cases passed"); -} - -/* - * RFC 2202: HMAC-MD5 test cases - */ -void -sctp_test_hmac_md5(void) -{ - uint8_t *digest; - uint8_t key[128]; - uint32_t keylen; - uint8_t text[128]; - uint32_t textlen; - uint32_t digestlen = 16; - int failed = 0; - - /*- - * test_case = 1 - * key = 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b - * key_len = 16 - * data = "Hi There" - * data_len = 8 - * digest = 0x9294727a3638bb1c13f48ef8158bfc9d - */ - keylen = 16; - memset(key, 0x0b, keylen); - textlen = 8; - strcpy(text, "Hi There"); - digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d"; - if (sctp_test_hmac("MD5 test case 1", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 2 - * key = "Jefe" - * key_len = 4 - * data = "what do ya want for nothing?" - * data_len = 28 - * digest = 0x750c783e6ab0b503eaa86e310a5db738 - */ - keylen = 4; - strcpy(key, "Jefe"); - textlen = 28; - strcpy(text, "what do ya want for nothing?"); - digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38"; - if (sctp_test_hmac("MD5 test case 2", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 3 - * key = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - * key_len = 16 - * data = 0xdd repeated 50 times - * data_len = 50 - * digest = 0x56be34521d144c88dbb8c733f0e8b3f6 - */ - keylen = 16; - memset(key, 0xaa, keylen); - textlen = 50; - memset(text, 0xdd, textlen); - digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6"; - if (sctp_test_hmac("MD5 test case 3", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 4 - * key = 0x0102030405060708090a0b0c0d0e0f10111213141516171819 - * key_len = 25 - * data = 0xcd repeated 50 times - * data_len = 50 - * digest = 0x697eaf0aca3a3aea3a75164746ffaa79 - */ - keylen = 25; - memcpy(key, "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", keylen); - textlen = 50; - memset(text, 0xcd, textlen); - digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea\x3a\x75\x16\x47\x46\xff\xaa\x79"; - if (sctp_test_hmac("MD5 test case 4", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 5 - * key = 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c - * key_len = 16 - * data = "Test With Truncation" - * data_len = 20 - * digest = 0x56461ef2342edc00f9bab995690efd4c - * digest-96 = 0x56461ef2342edc00f9bab995 - */ - keylen = 16; - memset(key, 0x0c, keylen); - textlen = 20; - strcpy(text, "Test With Truncation"); - digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00\xf9\xba\xb9\x95\x69\x0e\xfd\x4c"; - if (sctp_test_hmac("MD5 test case 5", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 6 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key - Hash Key First" - * data_len = 54 - * digest = 0x6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 54; - strcpy(text, "Test Using Larger Than Block-Size Key - Hash Key First"); - digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f\x0b\x62\xe6\xce\x61\xb9\xd0\xcd"; - if (sctp_test_hmac("MD5 test case 6", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 7 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data" - * data_len = 73 - * digest = 0x6f630fad67cda0ee1fb1f562db3aa53e - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 73; - strcpy(text, "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"); - digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e"; - if (sctp_test_hmac("MD5 test case 7", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /* done with all tests */ - if (failed) - printf("\nMD5 test results: %d cases failed", failed); - else - printf("\nMD5 test results: all test cases passed"); -} - -/* - * test assoc key concatenation - */ -static int -sctp_test_key_concatenation(sctp_key_t * key1, sctp_key_t * key2, - sctp_key_t * expected_key) -{ - sctp_key_t *key; - int ret_val; - - sctp_show_key(key1, "\nkey1"); - sctp_show_key(key2, "\nkey2"); - key = sctp_compute_hashkey(key1, key2, NULL); - sctp_show_key(expected_key, "\nExpected"); - sctp_show_key(key, "\nComputed"); - if (memcmp(key, expected_key, expected_key->keylen) != 0) { - printf("\nFAILED"); - ret_val = -1; - } else { - printf("\nPASSED"); - ret_val = 0; - } - sctp_free_key(key1); - sctp_free_key(key2); - sctp_free_key(expected_key); - sctp_free_key(key); - return (ret_val); -} - - -void -sctp_test_authkey(void) -{ - sctp_key_t *key1, *key2, *expected_key; - int failed = 0; - - /* test case 1 */ - key1 = sctp_set_key("\x01\x01\x01\x01", 4); - key2 = sctp_set_key("\x01\x02\x03\x04", 4); - expected_key = sctp_set_key("\x01\x01\x01\x01\x01\x02\x03\x04", 8); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 2 */ - key1 = sctp_set_key("\x00\x00\x00\x01", 4); - key2 = sctp_set_key("\x02", 1); - expected_key = sctp_set_key("\x00\x00\x00\x01\x02", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 3 */ - key1 = sctp_set_key("\x01", 1); - key2 = sctp_set_key("\x00\x00\x00\x02", 4); - expected_key = sctp_set_key("\x01\x00\x00\x00\x02", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 4 */ - key1 = sctp_set_key("\x00\x00\x00\x01", 4); - key2 = sctp_set_key("\x01", 1); - expected_key = sctp_set_key("\x01\x00\x00\x00\x01", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 5 */ - key1 = sctp_set_key("\x01", 1); - key2 = sctp_set_key("\x00\x00\x00\x01", 4); - expected_key = sctp_set_key("\x01\x00\x00\x00\x01", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 6 */ - key1 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07", 11); - key2 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 11); - expected_key = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 22); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 7 */ - key1 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 11); - key2 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07", 11); - expected_key = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 22); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* done with all tests */ - if (failed) - printf("\nKey concatenation test results: %d cases failed", failed); - else - printf("\nKey concatenation test results: all test cases passed"); -} - - -#if defined(STANDALONE_HMAC_TEST) -int -main(void) -{ - sctp_test_hmac_sha1(); - sctp_test_hmac_md5(); - sctp_test_authkey(); -} - -#endif /* STANDALONE_HMAC_TEST */ - -#endif /* SCTP_HMAC_TEST */ Modified: stable/8/sys/netinet/sctp_auth.h ============================================================================== --- stable/8/sys/netinet/sctp_auth.h Sun Jan 24 22:01:04 2010 (r202950) +++ stable/8/sys/netinet/sctp_auth.h Sun Jan 24 22:17:08 2010 (r202951) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); /* digest lengths */ #define SCTP_AUTH_DIGEST_LEN_SHA1 20 -#define SCTP_AUTH_DIGEST_LEN_MD5 16 #define SCTP_AUTH_DIGEST_LEN_SHA224 28 #define SCTP_AUTH_DIGEST_LEN_SHA256 32 #define SCTP_AUTH_DIGEST_LEN_SHA384 48 @@ -52,7 +51,6 @@ __FBSDID("$FreeBSD$"); /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { SHA1_CTX sha1; - MD5_CTX md5; #ifdef HAVE_SHA2 SHA256_CTX sha256; SHA384_CTX sha384; @@ -234,8 +232,4 @@ sctp_initialize_auth_params(struct sctp_ struct sctp_tcb *stcb); /* test functions */ -extern void sctp_test_hmac_sha1(void); -extern void sctp_test_hmac_md5(void); -extern void sctp_test_authkey(void); - #endif /* __SCTP_AUTH_H__ */ Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Sun Jan 24 22:01:04 2010 (r202950) +++ stable/8/sys/netinet/sctp_os_bsd.h Sun Jan 24 22:17:08 2010 (r202951) @@ -478,12 +478,6 @@ sctp_get_mbuf_for_msg(unsigned int space #include #endif -#include -/* map standard crypto API names */ -#define MD5_Init MD5Init -#define MD5_Update MD5Update -#define MD5_Final MD5Final - #endif #define SCTP_DECREMENT_AND_CHECK_REFCOUNT(addr) (atomic_fetchadd_int(addr, -1) == 1) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Jan 24 22:01:04 2010 (r202950) +++ stable/8/sys/netinet/sctp_output.c Sun Jan 24 22:17:08 2010 (r202951) @@ -4313,16 +4313,8 @@ sctp_send_initiate(struct sctp_inpcb *in if (stcb->asoc.authinfo.random != NULL) { randp = (struct sctp_auth_random *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); p_len = sizeof(*randp) + stcb->asoc.authinfo.random_len; -#ifdef SCTP_AUTH_DRAFT_04 - randp->ph.param_type = htons(SCTP_RANDOM); - randp->ph.param_length = htons(p_len); - bcopy(stcb->asoc.authinfo.random->key, - randp->random_data, - stcb->asoc.authinfo.random_len); -#else /* random key already contains the header */ bcopy(stcb->asoc.authinfo.random->key, randp, p_len); -#endif /* zero out any padding required */ bzero((caddr_t)randp + p_len, SCTP_SIZE32(p_len) - p_len); SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sun Jan 24 22:01:04 2010 (r202950) +++ stable/8/sys/netinet/sctp_pcb.c Sun Jan 24 22:17:08 2010 (r202951) @@ -6254,15 +6254,6 @@ next_param: return (-33); } /* concatenate the full random key */ -#ifdef SCTP_AUTH_DRAFT_04 - keylen = random_len; - new_key = sctp_alloc_key(keylen); - if (new_key != NULL) { - /* copy in the RANDOM */ - if (p_random != NULL) - bcopy(p_random->random_data, new_key->key, random_len); - } -#else keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; if (chunks != NULL) { keylen += sizeof(*chunks) + num_chunks; @@ -6285,19 +6276,13 @@ next_param: bcopy(hmacs, new_key->key + keylen, sizeof(*hmacs) + hmacs_len); } - } -#endif - else { + } else { /* failed to get memory for the key */ return (-34); } if (stcb->asoc.authinfo.peer_random != NULL) sctp_free_key(stcb->asoc.authinfo.peer_random); stcb->asoc.authinfo.peer_random = new_key; -#ifdef SCTP_AUTH_DRAFT_04 - /* don't include the chunks and hmacs for draft -04 */ - stcb->asoc.authinfo.peer_random->keylen = random_len; -#endif sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.assoc_keyid); sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.recv_keyid); Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sun Jan 24 22:01:04 2010 (r202950) +++ stable/8/sys/netinet/sctp_uio.h Sun Jan 24 22:17:08 2010 (r202951) @@ -526,7 +526,6 @@ struct sctp_hmacalgo { /* AUTH hmac_id */ #define SCTP_AUTH_HMAC_ID_RSVD 0x0000 #define SCTP_AUTH_HMAC_ID_SHA1 0x0001 /* default, mandatory */ -#define SCTP_AUTH_HMAC_ID_MD5 0x0002 /* deprecated */ #define SCTP_AUTH_HMAC_ID_SHA256 0x0003 #define SCTP_AUTH_HMAC_ID_SHA224 0x0004 #define SCTP_AUTH_HMAC_ID_SHA384 0x0005 From owner-svn-src-all@FreeBSD.ORG Sun Jan 24 22:29:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 243351065670; Sun, 24 Jan 2010 22:29:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECF418FC0C; Sun, 24 Jan 2010 22:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0OMTZdh061663; Sun, 24 Jan 2010 22:29:35 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0OMTZqk061662; Sun, 24 Jan 2010 22:29:35 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001242229.o0OMTZqk061662@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 24 Jan 2010 22:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202952 - in stable/7/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 22:29:36 -0000 Author: gavin Date: Sun Jan 24 22:29:35 2010 New Revision: 202952 URL: http://svn.freebsd.org/changeset/base/202952 Log: Fix mergeinfo after r202465, which was merged to etc/rc.d rather than etc Approved by: re (kib), ed (mentor, implicit) Modified: Directory Properties: stable/7/etc/ (props changed) stable/7/etc/rc.d/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 00:44:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71F2C106568B; Mon, 25 Jan 2010 00:44:05 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7F78FC0A; Mon, 25 Jan 2010 00:44:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P0i5KG091083; Mon, 25 Jan 2010 00:44:05 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P0i5Sv091075; Mon, 25 Jan 2010 00:44:05 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001250044.o0P0i5Sv091075@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 25 Jan 2010 00:44:05 +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: r202954 - in head/sys/mips: adm5120 alchemy atheros idt malta sentry5 sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 00:44:05 -0000 Author: gonzo Date: Mon Jan 25 00:44:05 2010 New Revision: 202954 URL: http://svn.freebsd.org/changeset/base/202954 Log: - Call post-boot fixup function in order to get proper static symbols resolving in DDB - When zeroing .bss/.sbss do not round end address to page boundary, it's not neccessary and might destroy data pased by trampoline or boot loader Modified: head/sys/mips/adm5120/adm5120_machdep.c head/sys/mips/alchemy/alchemy_machdep.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/idt/idt_machdep.c head/sys/mips/malta/malta_machdep.c head/sys/mips/sentry5/s5_machdep.c head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- head/sys/mips/adm5120/adm5120_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/adm5120/adm5120_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -94,7 +94,7 @@ mips_init(void) } /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = ctob(realmem); physmem = realmem; @@ -153,9 +153,11 @@ platform_start(__register_t a0 __unused, uint64_t platform_counter_freq = 175 * 1000 * 1000; /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); + kernend = (vm_offset_t)&end; memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_postboot_fixup(); + /* Initialize pcpu stuff */ mips_pcpu0_init(); Modified: head/sys/mips/alchemy/alchemy_machdep.c ============================================================================== --- head/sys/mips/alchemy/alchemy_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/alchemy/alchemy_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -94,7 +94,7 @@ mips_init(void) } /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = ctob(realmem); physmem = realmem; @@ -154,9 +154,11 @@ platform_start(__register_t a0 __unused, uint64_t platform_counter_freq = 175 * 1000 * 1000; /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); + kernend = (vm_offset_t)&end; memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_postboot_fixup(); + /* Initialize pcpu stuff */ mips_pcpu0_init(); Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/atheros/ar71xx_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$"); #include -extern int *edata; -extern int *end; +extern char edata[], end[]; + uint32_t ar711_base_mac[ETHER_ADDR_LEN]; /* 4KB static data aread to keep a copy of the bootload env until the dynamic kenv is setup */ @@ -142,16 +142,21 @@ void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) { - vm_offset_t kernend; uint64_t platform_counter_freq; uint32_t reg; int argc, i, count = 0; char **argv, **envp; + vm_offset_t kernend; - /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); + /* + * clear the BSS and SBSS segments, this should be first call in + * the function + */ + kernend = (vm_offset_t)&end; memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_postboot_fixup(); + /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -186,7 +191,7 @@ platform_start(__register_t a0 __unused, realmem = btoc(32*1024*1024); /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = ctob(realmem); physmem = realmem; Modified: head/sys/mips/idt/idt_machdep.c ============================================================================== --- head/sys/mips/idt/idt_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/idt/idt_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -134,9 +134,11 @@ platform_start(__register_t a0, __regist /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); + kernend = (vm_offset_t)&end; memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_postboot_fixup(); + /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -162,7 +164,7 @@ platform_start(__register_t a0, __regist } /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = ctob(realmem); physmem = realmem; Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/malta/malta_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -178,7 +178,7 @@ mips_init(void) } /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); phys_avail[1] = ctob(realmem); physmem = realmem; @@ -293,9 +293,11 @@ platform_start(__register_t a0, __regist int i; /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); + kernend = (vm_offset_t)&end; memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_postboot_fixup(); + mips_pcpu0_init(); platform_counter_freq = malta_cpu_freq(); mips_timer_early_init(platform_counter_freq); Modified: head/sys/mips/sentry5/s5_machdep.c ============================================================================== --- head/sys/mips/sentry5/s5_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/sentry5/s5_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -119,7 +119,7 @@ mips_init(void) * from CFE, omit the region at the start of physical * memory where the kernel has been loaded. */ - phys_avail[i] += MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[i] += MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); } phys_avail[i + 1] = addr + len; physmem += len; @@ -187,9 +187,11 @@ platform_start(__register_t a0, __regist uint64_t platform_counter_freq; /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); + kernend = (vm_offset_t)&end; memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_postboot_fixup(); + /* Initialize pcpu stuff */ mips_pcpu0_init(); Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Sun Jan 24 22:33:47 2010 (r202953) +++ head/sys/mips/sibyte/sb_machdep.c Mon Jan 25 00:44:05 2010 (r202954) @@ -169,7 +169,7 @@ mips_init(void) * from CFE, omit the region at the start of physical * memory where the kernel has been loaded. */ - phys_avail[i] += MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[i] += MIPS_KSEG0_TO_PHYS(kernel_kseg0_end); } phys_avail[i + 1] = addr + len; physmem += len; @@ -246,8 +246,6 @@ void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) { - vm_offset_t kernend; - /* * Make sure that kseg0 is mapped cacheable-coherent */ @@ -255,7 +253,7 @@ platform_start(__register_t a0, __regist /* clear the BSS and SBSS segments */ memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); - kernend = round_page((vm_offset_t)&end); + mips_postboot_fixup(); /* Initialize pcpu stuff */ mips_pcpu0_init(); From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 04:22:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DB711065676; Mon, 25 Jan 2010 04:22:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECA7A8FC08; Mon, 25 Jan 2010 04:22:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P4MJV3043046; Mon, 25 Jan 2010 04:22:19 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P4MJUx043033; Mon, 25 Jan 2010 04:22:19 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001250422.o0P4MJUx043033@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Jan 2010 04:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202958 - in vendor/bind9/dist: . bin/dnssec bin/named doc/arm lib/dns lib/dns/include/dns lib/lwres/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 04:22:20 -0000 Author: dougb Date: Mon Jan 25 04:22:19 2010 New Revision: 202958 URL: http://svn.freebsd.org/changeset/base/202958 Log: Vendor import of BIND 9.6.1-P3 Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/FAQ vendor/bind9/dist/FAQ.xml vendor/bind9/dist/bin/dnssec/dnssec-signzone.8 vendor/bind9/dist/bin/dnssec/dnssec-signzone.html vendor/bind9/dist/bin/named/query.c vendor/bind9/dist/doc/arm/Bv9ARM.pdf vendor/bind9/dist/doc/arm/man.dnssec-signzone.html vendor/bind9/dist/doc/arm/man.named-checkconf.html vendor/bind9/dist/doc/arm/man.named-checkzone.html vendor/bind9/dist/doc/arm/man.named.html vendor/bind9/dist/doc/arm/man.nsupdate.html vendor/bind9/dist/doc/arm/man.rndc-confgen.html vendor/bind9/dist/doc/arm/man.rndc.conf.html vendor/bind9/dist/doc/arm/man.rndc.html vendor/bind9/dist/lib/dns/include/dns/db.h vendor/bind9/dist/lib/dns/include/dns/ncache.h vendor/bind9/dist/lib/dns/include/dns/types.h vendor/bind9/dist/lib/dns/rbtdb.c vendor/bind9/dist/lib/dns/resolver.c vendor/bind9/dist/lib/dns/validator.c vendor/bind9/dist/lib/lwres/man/lwres.html vendor/bind9/dist/lib/lwres/man/lwres_buffer.html vendor/bind9/dist/lib/lwres/man/lwres_config.html vendor/bind9/dist/lib/lwres/man/lwres_context.html vendor/bind9/dist/lib/lwres/man/lwres_gabn.html vendor/bind9/dist/lib/lwres/man/lwres_gai_strerror.html vendor/bind9/dist/lib/lwres/man/lwres_getaddrinfo.html vendor/bind9/dist/lib/lwres/man/lwres_gethostent.html vendor/bind9/dist/lib/lwres/man/lwres_getipnode.html vendor/bind9/dist/lib/lwres/man/lwres_getnameinfo.html vendor/bind9/dist/lib/lwres/man/lwres_getrrsetbyname.html vendor/bind9/dist/lib/lwres/man/lwres_gnba.html vendor/bind9/dist/lib/lwres/man/lwres_hstrerror.html vendor/bind9/dist/lib/lwres/man/lwres_inetntop.html vendor/bind9/dist/lib/lwres/man/lwres_noop.html vendor/bind9/dist/lib/lwres/man/lwres_packet.html vendor/bind9/dist/lib/lwres/man/lwres_resutil.html vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/CHANGES Mon Jan 25 04:22:19 2010 (r202958) @@ -1,3 +1,15 @@ + --- 9.6.1-P3 released --- + +2831. [security] Do not attempt to validate or cache + out-of-bailiwick data returned with a secure + answer; it must be re-fetched from its original + source and validated in that context. [RT #20819] + +2828. [security] Cached CNAME or DNAME RR could be returned to clients + without DNSSEC validation. [RT #20737] + +2827. [security] Bogus NXDOMAIN could be cached as if valid. [RT #20712] + --- 9.6.1-P2 released --- 2772. [security] When validating, track whether pending data was from Modified: vendor/bind9/dist/FAQ ============================================================================== --- vendor/bind9/dist/FAQ Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/FAQ Mon Jan 25 04:22:19 2010 (r202958) @@ -153,24 +153,29 @@ A: BIND 9.3 and later: Use TSIG to selec Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -220,13 +225,13 @@ A: You choose one view to be master and Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -239,7 +244,7 @@ A: You choose one view to be master and type master; file "internal/example.db"; allow-update { key mykey; }; - notify-also { 10.0.1.1; }; + also-notify { 10.0.1.1; }; }; }; @@ -249,7 +254,7 @@ A: You choose one view to be master and type slave; file "external/example.db"; masters { 10.0.1.1; }; - transfer-source { 10.0.1.1; }; + transfer-source 10.0.1.1; // allow-update-forwarding { any; }; // allow-notify { ... }; }; Modified: vendor/bind9/dist/FAQ.xml ============================================================================== --- vendor/bind9/dist/FAQ.xml Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/FAQ.xml Mon Jan 25 04:22:19 2010 (r202958) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - +
Frequently Asked Questions about BIND 9 @@ -319,24 +319,29 @@ Slave: 10.0.1.3 (internal), 10.0.1.4 (ex Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -424,13 +429,13 @@ named-checkzone example.com tmp Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -443,7 +448,7 @@ Master 10.0.1.1: type master; file "internal/example.db"; allow-update { key mykey; }; - notify-also { 10.0.1.1; }; + also-notify { 10.0.1.1; }; }; }; @@ -453,7 +458,7 @@ Master 10.0.1.1: type slave; file "external/example.db"; masters { 10.0.1.1; }; - transfer-source { 10.0.1.1; }; + transfer-source 10.0.1.1; // allow-update-forwarding { any; }; // allow-notify { ... }; }; Modified: vendor/bind9/dist/bin/dnssec/dnssec-signzone.8 ============================================================================== --- vendor/bind9/dist/bin/dnssec/dnssec-signzone.8 Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/bin/dnssec/dnssec-signzone.8 Mon Jan 25 04:22:19 2010 (r202958) @@ -13,163 +13,287 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-signzone.8,v 1.47.44.4 2009/06/09 01:47:19 each Exp $ +.\" $Id: dnssec-signzone.8,v 1.47.44.4.8.1 2009/12/31 23:17:46 tbox Exp $ .\" .hy 0 .ad l -.\"Generated by db2man.xsl. Don't modify this, modify the source. -.de Sh \" Subsection -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.TH "DNSSEC-SIGNZONE" 8 "June 08, 2009" "" "" -.SH NAME -dnssec-signzone \- DNSSEC zone signing tool +.\" Title: dnssec\-signzone +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.71.1 +.\" Date: June 08, 2009 +.\" Manual: BIND9 +.\" Source: BIND9 +.\" +.TH "DNSSEC\-SIGNZONE" "8" "June 08, 2009" "BIND9" "BIND9" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +dnssec\-signzone \- DNSSEC zone signing tool .SH "SYNOPSIS" .HP 16 -\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fIclass\fR\fR] [\fB\-d\ \fIdirectory\fR\fR] [\fB\-e\ \fIend\-time\fR\fR] [\fB\-f\ \fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fIkey\fR\fR] [\fB\-l\ \fIdomain\fR\fR] [\fB\-i\ \fIinterval\fR\fR] [\fB\-I\ \fIinput\-format\fR\fR] [\fB\-j\ \fIjitter\fR\fR] [\fB\-N\ \fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fIorigin\fR\fR] [\fB\-O\ \fIoutput\-format\fR\fR] [\fB\-p\fR] [\fB\-r\ \fIrandomdev\fR\fR] [\fB\-s\ \fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fIlevel\fR\fR] [\fB\-z\fR] [\fB\-3\ \fIsalt\fR\fR] [\fB\-H\ \fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...] +\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...] .SH "DESCRIPTION" .PP -\fBdnssec\-signzone\fR signs a zone\&. It generates NSEC and RRSIG records and produces a signed version of the zone\&. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a \fIkeyset\fR file for each child zone\&. +\fBdnssec\-signzone\fR +signs a zone. It generates NSEC and RRSIG records and produces a signed version of the zone. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a +\fIkeyset\fR +file for each child zone. .SH "OPTIONS" -.TP +.PP \-a -Verify all generated signatures\&. -.TP +.RS 4 +Verify all generated signatures. +.RE +.PP \-c \fIclass\fR -Specifies the DNS class of the zone\&. -.TP +.RS 4 +Specifies the DNS class of the zone. +.RE +.PP \-k \fIkey\fR -Treat specified key as a key signing key ignoring any key flags\&. This option may be specified multiple times\&. -.TP +.RS 4 +Treat specified key as a key signing key ignoring any key flags. This option may be specified multiple times. +.RE +.PP \-l \fIdomain\fR -Generate a DLV set in addition to the key (DNSKEY) and DS sets\&. The domain is appended to the name of the records\&. -.TP +.RS 4 +Generate a DLV set in addition to the key (DNSKEY) and DS sets. The domain is appended to the name of the records. +.RE +.PP \-d \fIdirectory\fR -Look for \fIkeyset\fR files in \fBdirectory\fR as the directory -.TP +.RS 4 +Look for +\fIkeyset\fR +files in +\fBdirectory\fR +as the directory +.RE +.PP \-g -Generate DS records for child zones from keyset files\&. Existing DS records will be removed\&. -.TP +.RS 4 +Generate DS records for child zones from keyset files. Existing DS records will be removed. +.RE +.PP \-s \fIstart\-time\fR -Specify the date and time when the generated RRSIG records become valid\&. This can be either an absolute or relative time\&. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000\&. A relative start time is indicated by +N, which is N seconds from the current time\&. If no \fBstart\-time\fR is specified, the current time minus 1 hour (to allow for clock skew) is used\&. -.TP +.RS 4 +Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no +\fBstart\-time\fR +is specified, the current time minus 1 hour (to allow for clock skew) is used. +.RE +.PP \-e \fIend\-time\fR -Specify the date and time when the generated RRSIG records expire\&. As with \fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation\&. A time relative to the start time is indicated with +N, which is N seconds from the start time\&. A time relative to the current time is indicated with now+N\&. If no \fBend\-time\fR is specified, 30 days from the start time is used as a default\&. -.TP +.RS 4 +Specify the date and time when the generated RRSIG records expire. As with +\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no +\fBend\-time\fR +is specified, 30 days from the start time is used as a default. +.RE +.PP \-f \fIoutput\-file\fR -The name of the output file containing the signed zone\&. The default is to append \fI\&.signed\fR to the input filename\&. -.TP +.RS 4 +The name of the output file containing the signed zone. The default is to append +\fI.signed\fR +to the input filename. +.RE +.PP \-h -Prints a short summary of the options and arguments to \fBdnssec\-signzone\fR\&. -.TP +.RS 4 +Prints a short summary of the options and arguments to +\fBdnssec\-signzone\fR. +.RE +.PP \-i \fIinterval\fR -When a previously\-signed zone is passed as input, records may be resigned\&. The \fBinterval\fR option specifies the cycle interval as an offset from the current time (in seconds)\&. If a RRSIG record expires after the cycle interval, it is retained\&. Otherwise, it is considered to be expiring soon, and it will be replaced\&. -The default cycle interval is one quarter of the difference between the signature end and start times\&. So if neither \fBend\-time\fR or \fBstart\-time\fR are specified, \fBdnssec\-signzone\fR generates signatures that are valid for 30 days, with a cycle interval of 7\&.5 days\&. Therefore, if any existing RRSIG records are due to expire in less than 7\&.5 days, they would be replaced\&. -.TP +.RS 4 +When a previously\-signed zone is passed as input, records may be resigned. The +\fBinterval\fR +option specifies the cycle interval as an offset from the current time (in seconds). If a RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced. +.sp +The default cycle interval is one quarter of the difference between the signature end and start times. So if neither +\fBend\-time\fR +or +\fBstart\-time\fR +are specified, +\fBdnssec\-signzone\fR +generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced. +.RE +.PP \-I \fIinput\-format\fR -The format of the input zone file\&. Possible formats are \fB"text"\fR (default) and \fB"raw"\fR\&. This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non\-text format containing updates can be signed directly\&. The use of this option does not make much sense for non\-dynamic zones\&. -.TP +.RS 4 +The format of the input zone file. Possible formats are +\fB"text"\fR +(default) and +\fB"raw"\fR. This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non\-text format containing updates can be signed directly. The use of this option does not make much sense for non\-dynamic zones. +.RE +.PP \-j \fIjitter\fR -When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expires simultaneously\&. If the zone is incrementally signed, i\&.e\&. a previously\-signed zone is passed as input to the signer, all expired signatures have to be regenerated at about the same time\&. The \fBjitter\fR option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time\&. -Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i\&.e\&. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time\&. -.TP +.RS 4 +When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expires simultaneously. If the zone is incrementally signed, i.e. a previously\-signed zone is passed as input to the signer, all expired signatures have to be regenerated at about the same time. The +\fBjitter\fR +option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time. +.sp +Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i.e. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time. +.RE +.PP \-n \fIncpus\fR -Specifies the number of threads to use\&. By default, one thread is started for each detected CPU\&. -.TP +.RS 4 +Specifies the number of threads to use. By default, one thread is started for each detected CPU. +.RE +.PP \-N \fIsoa\-serial\-format\fR -The SOA serial number format of the signed zone\&. Possible formats are \fB"keep"\fR (default), \fB"increment"\fR and \fB"unixtime"\fR\&. -.RS -.TP +.RS 4 +The SOA serial number format of the signed zone. Possible formats are +\fB"keep"\fR +(default), +\fB"increment"\fR +and +\fB"unixtime"\fR. +.RS 4 +.PP \fB"keep"\fR -Do not modify the SOA serial number\&. -.TP +.RS 4 +Do not modify the SOA serial number. +.RE +.PP \fB"increment"\fR -Increment the SOA serial number using RFC 1982 arithmetics\&. -.TP +.RS 4 +Increment the SOA serial number using RFC 1982 arithmetics. +.RE +.PP \fB"unixtime"\fR -Set the SOA serial number to the number of seconds since epoch\&. +.RS 4 +Set the SOA serial number to the number of seconds since epoch. .RE -.IP -.TP +.RE +.RE +.PP \-o \fIorigin\fR -The zone origin\&. If not specified, the name of the zone file is assumed to be the origin\&. -.TP +.RS 4 +The zone origin. If not specified, the name of the zone file is assumed to be the origin. +.RE +.PP \-O \fIoutput\-format\fR -The format of the output file containing the signed zone\&. Possible formats are \fB"text"\fR (default) and \fB"raw"\fR\&. -.TP +.RS 4 +The format of the output file containing the signed zone. Possible formats are +\fB"text"\fR +(default) and +\fB"raw"\fR. +.RE +.PP \-p -Use pseudo\-random data when signing the zone\&. This is faster, but less secure, than using real random data\&. This option may be useful when signing large zones or when the entropy source is limited\&. -.TP +.RS 4 +Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited. +.RE +.PP \-r \fIrandomdev\fR -Specifies the source of randomness\&. If the operating system does not provide a \fI/dev/random\fR or equivalent device, the default source of randomness is keyboard input\&. \fIrandomdev\fR specifies the name of a character device or file containing random data to be used instead of the default\&. The special value \fIkeyboard\fR indicates that keyboard input should be used\&. -.TP +.RS 4 +Specifies the source of randomness. If the operating system does not provide a +\fI/dev/random\fR +or equivalent device, the default source of randomness is keyboard input. +\fIrandomdev\fR +specifies the name of a character device or file containing random data to be used instead of the default. The special value +\fIkeyboard\fR +indicates that keyboard input should be used. +.RE +.PP \-t -Print statistics at completion\&. -.TP +.RS 4 +Print statistics at completion. +.RE +.PP \-v \fIlevel\fR -Sets the debugging level\&. -.TP +.RS 4 +Sets the debugging level. +.RE +.PP \-z -Ignore KSK flag on key when determining what to sign\&. -.TP +.RS 4 +Ignore KSK flag on key when determining what to sign. +.RE +.PP \-3 \fIsalt\fR -Generate a NSEC3 chain with the given hex encoded salt\&. A dash (\fIsalt\fR) can be used to indicate that no salt is to be used when generating the NSEC3 chain\&. -.TP +.RS 4 +Generate a NSEC3 chain with the given hex encoded salt. A dash (\fIsalt\fR) can be used to indicate that no salt is to be used when generating the NSEC3 chain. +.RE +.PP \-H \fIiterations\fR -When generating a NSEC3 chain use this many interations\&. The default is 100\&. -.TP +.RS 4 +When generating a NSEC3 chain use this many interations. The default is 100. +.RE +.PP \-A -When generating a NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations\&. -.TP +.RS 4 +When generating a NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations. +.RE +.PP zonefile -The file containing the zone to be signed\&. -.TP +.RS 4 +The file containing the zone to be signed. +.RE +.PP key -Specify which keys should be used to sign the zone\&. If no keys are specified, then the zone will be examined for DNSKEY records at the zone apex\&. If these are found and there are matching private keys, in the current directory, then these will be used for signing\&. +.RS 4 +Specify which keys should be used to sign the zone. If no keys are specified, then the zone will be examined for DNSKEY records at the zone apex. If these are found and there are matching private keys, in the current directory, then these will be used for signing. +.RE .SH "EXAMPLE" .PP -The following command signs the \fBexample\&.com\fR zone with the DSA key generated by \fBdnssec\-keygen\fR (Kexample\&.com\&.+003+17247)\&. The zone's keys must be in the master file (\fIdb\&.example\&.com\fR)\&. This invocation looks for \fIkeyset\fR files, in the current directory, so that DS records can be generated from them (\fB\-g\fR)\&. +The following command signs the +\fBexample.com\fR +zone with the DSA key generated by +\fBdnssec\-keygen\fR +(Kexample.com.+003+17247). The zone's keys must be in the master file (\fIdb.example.com\fR). This invocation looks for +\fIkeyset\fR +files, in the current directory, so that DS records can be generated from them (\fB\-g\fR). +.sp +.RS 4 .nf -% dnssec\-signzone \-g \-o example\&.com db\&.example\&.com \\ -Kexample\&.com\&.+003+17247 -db\&.example\&.com\&.signed +% dnssec\-signzone \-g \-o example.com db.example.com \\ +Kexample.com.+003+17247 +db.example.com.signed % .fi +.RE .PP -In the above example, \fBdnssec\-signzone\fR creates the file \fIdb\&.example\&.com\&.signed\fR\&. This file should be referenced in a zone statement in a \fInamed\&.conf\fR file\&. -.PP -This example re\-signs a previously signed zone with default parameters\&. The private keys are assumed to be in the current directory\&. +In the above example, +\fBdnssec\-signzone\fR +creates the file +\fIdb.example.com.signed\fR. This file should be referenced in a zone statement in a +\fInamed.conf\fR +file. +.PP +This example re\-signs a previously signed zone with default parameters. The private keys are assumed to be in the current directory. +.sp +.RS 4 .nf -% cp db\&.example\&.com\&.signed db\&.example\&.com -% dnssec\-signzone \-o example\&.com db\&.example\&.com -db\&.example\&.com\&.signed +% cp db.example.com.signed db.example.com +% dnssec\-signzone \-o example.com db.example.com +db.example.com.signed % .fi +.RE .SH "KNOWN BUGS" .PP - \fBdnssec\-signzone\fR was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys needed to produce a fully\-signed zone\&. This permits a zone administrator, for example, to sign a zone with one key on one machine, move the resulting partially\-signed zone to a second machine, and sign it again with a second key\&. -.PP -An unfortunate side\-effect of this flexibility is that \fBdnssec\-signzone\fR does not check to make sure it's signing a zone with any valid keys at all\&. An attempt to sign a zone without any keys will appear to succeed, producing a "signed" zone with no signatures\&. There is no warning issued when a zone is not fully signed\&. +\fBdnssec\-signzone\fR +was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys needed to produce a fully\-signed zone. This permits a zone administrator, for example, to sign a zone with one key on one machine, move the resulting partially\-signed zone to a second machine, and sign it again with a second key. .PP -This will be corrected in a future release\&. In the meantime, ISC recommends examining the output of \fBdnssec\-signzone\fR to confirm that the zone is properly signed by all keys before using it\&. +An unfortunate side\-effect of this flexibility is that +\fBdnssec\-signzone\fR +does not check to make sure it's signing a zone with any valid keys at all. An attempt to sign a zone without any keys will appear to succeed, producing a "signed" zone with no signatures. There is no warning issued when a zone is not fully signed. +.PP +This will be corrected in a future release. In the meantime, ISC recommends examining the output of +\fBdnssec\-signzone\fR +to confirm that the zone is properly signed by all keys before using it. .SH "SEE ALSO" .PP -\fBdnssec\-keygen\fR(8), BIND 9 Administrator Reference Manual, RFC 4033\&. +\fBdnssec\-keygen\fR(8), +BIND 9 Administrator Reference Manual, +RFC 4033. .SH "AUTHOR" .PP -Internet Systems Consortium +Internet Systems Consortium +.SH "COPYRIGHT" +Copyright \(co 2004\-2009 Internet Systems Consortium, Inc. ("ISC") +.br +Copyright \(co 2000\-2003 Internet Software Consortium. +.br Modified: vendor/bind9/dist/bin/dnssec/dnssec-signzone.html ============================================================================== --- vendor/bind9/dist/bin/dnssec/dnssec-signzone.html Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/bin/dnssec/dnssec-signzone.html Mon Jan 25 04:22:19 2010 (r202958) @@ -14,12 +14,12 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + dnssec-signzone - +
@@ -32,7 +32,7 @@

dnssec-signzone [-a] [-c class] [-d directory] [-e end-time] [-f output-file] [-g] [-h] [-k key] [-l domain] [-i interval] [-I input-format] [-j jitter] [-N soa-seria l-format] [-o origin] [-O output-format] [-p] [-r randomdev] [-s start-time] [-t] [-v level] [-z] [-3 salt] [-H iterations] [-A] {zonefile} [key...]

-

DESCRIPTION

+

DESCRIPTION

dnssec-signzone signs a zone. It generates NSEC and RRSIG records and produces a signed version of the @@ -43,7 +43,7 @@

-

OPTIONS

+

OPTIONS

-a

@@ -258,7 +258,7 @@

-

EXAMPLE

+

EXAMPLE

The following command signs the example.com zone with the DSA key generated by dnssec-keygen @@ -287,7 +287,7 @@ db.example.com.signed %

-

KNOWN BUGS

+

KNOWN BUGS

dnssec-signzone was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys @@ -312,14 +312,14 @@ db.example.com.signed

-

SEE ALSO

+

SEE ALSO

dnssec-keygen(8), BIND 9 Administrator Reference Manual, RFC 4033.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: vendor/bind9/dist/bin/named/query.c ============================================================================== --- vendor/bind9/dist/bin/named/query.c Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/bin/named/query.c Mon Jan 25 04:22:19 2010 (r202958) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.313.20.7.12.1 2009/11/18 23:58:04 marka Exp $ */ +/* $Id: query.c,v 1.313.20.7.12.4 2009/12/31 22:53:03 each Exp $ */ /*! \file */ @@ -1160,7 +1160,8 @@ query_addadditional(void *arg, dns_name_ goto cleanup; } result = dns_db_find(db, name, version, type, - client->query.dboptions | DNS_DBFIND_GLUEOK, + client->query.dboptions | + DNS_DBFIND_GLUEOK | DNS_DBFIND_ADDITIONALOK, client->now, &node, fname, rdataset, sigrdataset); if (result == DNS_R_GLUE && @@ -1645,7 +1646,8 @@ query_addadditional2(void *arg, dns_name goto try_glue; result = dns_db_find(db, name, version, type, - client->query.dboptions | DNS_DBFIND_GLUEOK, + client->query.dboptions | + DNS_DBFIND_GLUEOK | DNS_DBFIND_ADDITIONALOK, client->now, &node, fname, NULL, NULL); if (result == ISC_R_SUCCESS) goto found; @@ -3718,8 +3720,6 @@ query_find(ns_client_t *client, dns_fetc dns_rdataset_t *noqname; isc_boolean_t resuming; int line = -1; - dns_rdataset_t tmprdataset; - unsigned int dboptions; CTRACE("query_find"); @@ -3937,49 +3937,9 @@ query_find(ns_client_t *client, dns_fetc /* * Now look for an answer in the database. */ - dboptions = client->query.dboptions; - if (sigrdataset == NULL && client->view->enablednssec) { - /* - * If the client doesn't want DNSSEC we still want to - * look for any data pending validation to save a remote - * lookup if possible. - */ - dns_rdataset_init(&tmprdataset); - sigrdataset = &tmprdataset; - dboptions |= DNS_DBFIND_PENDINGOK; - } - refind: result = dns_db_find(db, client->query.qname, version, type, - dboptions, client->now, &node, fname, - rdataset, sigrdataset); - /* - * If we have found pending data try to validate it. - * If the data does not validate as secure and we can't - * use the unvalidated data requery the database with - * pending disabled to prevent infinite looping. - */ - if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust)) - goto validation_done; - if (validate(client, db, fname, rdataset, sigrdataset)) - goto validation_done; - if (rdataset->trust != dns_trust_pending_answer || - !PENDINGOK(client->query.dboptions)) { - dns_rdataset_disassociate(rdataset); - if (sigrdataset != NULL && - dns_rdataset_isassociated(sigrdataset)) - dns_rdataset_disassociate(sigrdataset); - if (sigrdataset == &tmprdataset) - sigrdataset = NULL; - dns_db_detachnode(db, &node); - dboptions &= ~DNS_DBFIND_PENDINGOK; - goto refind; - } - validation_done: - if (sigrdataset == &tmprdataset) { - if (dns_rdataset_isassociated(sigrdataset)) - dns_rdataset_disassociate(sigrdataset); - sigrdataset = NULL; - } + client->query.dboptions, client->now, + &node, fname, rdataset, sigrdataset); resume: CTRACE("query_find: resume"); Modified: vendor/bind9/dist/doc/arm/Bv9ARM.pdf ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/bind9/dist/doc/arm/man.dnssec-signzone.html ============================================================================== --- vendor/bind9/dist/doc/arm/man.dnssec-signzone.html Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/doc/arm/man.dnssec-signzone.html Mon Jan 25 04:22:19 2010 (r202958) @@ -14,12 +14,12 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + dnssec-signzone - + @@ -50,7 +50,7 @@

dnssec-signzone [-a] [-c class] [-d directory] [-e end-time] [-f output-file] [-g] [-h] [-k key] [-l domain] [-i interval] [-I input-format] [-j jitter] [-N soa-seria l-format] [-o origin] [-O output-format] [-p] [-r randomdev] [-s start-time] [-t] [-v level] [-z] [-3 salt] [-H iterations] [-A] {zonefile} [key...]

-

DESCRIPTION

+

DESCRIPTION

dnssec-signzone signs a zone. It generates NSEC and RRSIG records and produces a signed version of the @@ -61,7 +61,7 @@

-

OPTIONS

+

OPTIONS

-a

@@ -276,7 +276,7 @@

-

EXAMPLE

+

EXAMPLE

The following command signs the example.com zone with the DSA key generated by dnssec-keygen @@ -305,7 +305,7 @@ db.example.com.signed %

-

KNOWN BUGS

+

KNOWN BUGS

dnssec-signzone was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys @@ -330,14 +330,14 @@ db.example.com.signed

-

SEE ALSO

+

SEE ALSO

dnssec-keygen(8), BIND 9 Administrator Reference Manual, RFC 4033.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: vendor/bind9/dist/doc/arm/man.named-checkconf.html ============================================================================== --- vendor/bind9/dist/doc/arm/man.named-checkconf.html Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/doc/arm/man.named-checkconf.html Mon Jan 25 04:22:19 2010 (r202958) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -50,14 +50,14 @@

named-checkconf [-h] [-v] [-j] [-t directory] {filename} [-z]

-

DESCRIPTION

+

DESCRIPTION

named-checkconf checks the syntax, but not the semantics, of a named configuration file.

-

OPTIONS

+

OPTIONS

-h

@@ -92,21 +92,21 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkconf returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkzone(8), BIND 9 Administrator Reference Manual.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: vendor/bind9/dist/doc/arm/man.named-checkzone.html ============================================================================== --- vendor/bind9/dist/doc/arm/man.named-checkzone.html Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/doc/arm/man.named-checkzone.html Mon Jan 25 04:22:19 2010 (r202958) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -51,7 +51,7 @@

named-compilezone [-d] [-j] [-q] [-v] [-c class] [-C mode] [-f format] [-F format] [-i mode] [-k mode] [-m mode] [-n mode] [-o filename] [-s style] [-t directory] [-w directory] [-D] [-W mode] {zonename} {filename}

-

DESCRIPTION

+

DESCRIPTION

named-checkzone checks the syntax and integrity of a zone file. It performs the same checks as named does when loading a @@ -71,7 +71,7 @@

-

OPTIONS

+

OPTIONS

-d

@@ -257,14 +257,14 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkzone returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkconf(8), RFC 1035, @@ -272,7 +272,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: vendor/bind9/dist/doc/arm/man.named.html ============================================================================== --- vendor/bind9/dist/doc/arm/man.named.html Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/doc/arm/man.named.html Mon Jan 25 04:22:19 2010 (r202958) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -50,7 +50,7 @@

named [-4] [-6] [-c config-file] [-d debug-level] [-f] [-g] [-m flag] [-n #cpus] [-p port] [-s] [-S #max-socks] [-t directory] [-u user] [-v] [-V] [-x cache-file]

-

DESCRIPTION

+

DESCRIPTION

named is a Domain Name System (DNS) server, part of the BIND 9 distribution from ISC. For more @@ -65,7 +65,7 @@

-

OPTIONS

+

OPTIONS

-4

@@ -238,7 +238,7 @@

-

SIGNALS

+

SIGNALS

In routine operation, signals should not be used to control the nameserver; rndc should be used @@ -259,7 +259,7 @@

-

CONFIGURATION

+

CONFIGURATION

The named configuration file is too complex to describe in detail here. A complete description is provided @@ -268,7 +268,7 @@

-

FILES

+

FILES

/etc/named.conf

@@ -281,7 +281,7 @@

-

SEE ALSO

+

SEE ALSO

RFC 1033, RFC 1034, RFC 1035, @@ -294,7 +294,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: vendor/bind9/dist/doc/arm/man.nsupdate.html ============================================================================== --- vendor/bind9/dist/doc/arm/man.nsupdate.html Mon Jan 25 04:21:56 2010 (r202957) +++ vendor/bind9/dist/doc/arm/man.nsupdate.html Mon Jan 25 04:22:19 2010 (r202958) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -50,7 +50,7 @@

nsupdate [-d] [-D] [[-g] | [-o] | [-y [hmac:]keyname:secret] | [-k keyfile]] [-t timeout] [-u udptimeout] [-r udpretries] [-R randomdev] [-v] [filename]

-

DESCRIPTION

*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 04:24:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDE871065670; Mon, 25 Jan 2010 04:24:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 940B58FC14; Mon, 25 Jan 2010 04:24:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P4O54P043534; Mon, 25 Jan 2010 04:24:05 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P4O5T9043533; Mon, 25 Jan 2010 04:24:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001250424.o0P4O5T9043533@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Jan 2010 04:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202959 - vendor/bind9/9.6.1-P3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 04:24:05 -0000 Author: dougb Date: Mon Jan 25 04:24:05 2010 New Revision: 202959 URL: http://svn.freebsd.org/changeset/base/202959 Log: Tag the 9.6.1-P3 release Added: vendor/bind9/9.6.1-P3/ - copied from r202958, vendor/bind9/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 04:42:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B87BA106568B; Mon, 25 Jan 2010 04:42:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA758FC14; Mon, 25 Jan 2010 04:42:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P4gsjZ048054; Mon, 25 Jan 2010 04:42:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P4gs3w048049; Mon, 25 Jan 2010 04:42:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001250442.o0P4gs3w048049@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Jan 2010 04:42:54 +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: r202960 - in head/lib/bind/dns: . dns X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 04:42:54 -0000 Author: dougb Date: Mon Jan 25 04:42:54 2010 New Revision: 202960 URL: http://svn.freebsd.org/changeset/base/202960 Log: Commit copyright-only changes to generated files as part of the 9.6.1-P3 update Modified: head/lib/bind/dns/code.h head/lib/bind/dns/dns/enumclass.h head/lib/bind/dns/dns/enumtype.h head/lib/bind/dns/dns/rdatastruct.h Modified: head/lib/bind/dns/code.h ============================================================================== --- head/lib/bind/dns/code.h Mon Jan 25 04:24:05 2010 (r202959) +++ head/lib/bind/dns/code.h Mon Jan 25 04:42:54 2010 (r202960) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: head/lib/bind/dns/dns/enumclass.h ============================================================================== --- head/lib/bind/dns/dns/enumclass.h Mon Jan 25 04:24:05 2010 (r202959) +++ head/lib/bind/dns/dns/enumclass.h Mon Jan 25 04:42:54 2010 (r202960) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: head/lib/bind/dns/dns/enumtype.h ============================================================================== --- head/lib/bind/dns/dns/enumtype.h Mon Jan 25 04:24:05 2010 (r202959) +++ head/lib/bind/dns/dns/enumtype.h Mon Jan 25 04:42:54 2010 (r202960) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: head/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- head/lib/bind/dns/dns/rdatastruct.h Mon Jan 25 04:24:05 2010 (r202959) +++ head/lib/bind/dns/dns/rdatastruct.h Mon Jan 25 04:42:54 2010 (r202960) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 06:18:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DD2B1065679; Mon, 25 Jan 2010 06:18:31 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6588FC13; Mon, 25 Jan 2010 06:18:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P6IVmQ071233; Mon, 25 Jan 2010 06:18:31 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P6IVfN071220; Mon, 25 Jan 2010 06:18:31 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001250618.o0P6IVfN071220@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Jan 2010 06:18: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: r202961 - in head/contrib/bind9: . bin/dnssec bin/named doc/arm lib/dns lib/dns/include/dns lib/lwres/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 06:18:31 -0000 Author: dougb Date: Mon Jan 25 06:18:31 2010 New Revision: 202961 URL: http://svn.freebsd.org/changeset/base/202961 Log: Upgrade to BIND 9.6.1-P3. This version address the following vulnerabilities: BIND 9 Cache Update from Additional Section https://www.isc.org/advisories/CVE-2009-4022v6 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022 A nameserver with DNSSEC validation enabled may incorrectly add unauthenticated records to its cache that are received during the resolution of a recursive client query BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses https://www.isc.org/advisories/CVE-2010-0097 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097 There was an error in the DNSSEC NSEC/NSEC3 validation code that could cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records proven by NSEC or NSEC3 to exist) to be cached as if they had validated correctly These issues only affect systems with DNSSEC validation enabled. Modified: head/contrib/bind9/CHANGES head/contrib/bind9/FAQ head/contrib/bind9/FAQ.xml head/contrib/bind9/bin/dnssec/dnssec-signzone.8 head/contrib/bind9/bin/dnssec/dnssec-signzone.html head/contrib/bind9/bin/named/query.c head/contrib/bind9/doc/arm/Bv9ARM.pdf head/contrib/bind9/doc/arm/man.dnssec-signzone.html head/contrib/bind9/doc/arm/man.named-checkconf.html head/contrib/bind9/doc/arm/man.named-checkzone.html head/contrib/bind9/doc/arm/man.named.html head/contrib/bind9/doc/arm/man.nsupdate.html head/contrib/bind9/doc/arm/man.rndc-confgen.html head/contrib/bind9/doc/arm/man.rndc.conf.html head/contrib/bind9/doc/arm/man.rndc.html head/contrib/bind9/lib/dns/include/dns/db.h head/contrib/bind9/lib/dns/include/dns/ncache.h head/contrib/bind9/lib/dns/include/dns/types.h head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/validator.c head/contrib/bind9/lib/lwres/man/lwres.html head/contrib/bind9/lib/lwres/man/lwres_buffer.html head/contrib/bind9/lib/lwres/man/lwres_config.html head/contrib/bind9/lib/lwres/man/lwres_context.html head/contrib/bind9/lib/lwres/man/lwres_gabn.html head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html head/contrib/bind9/lib/lwres/man/lwres_gethostent.html head/contrib/bind9/lib/lwres/man/lwres_getipnode.html head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html head/contrib/bind9/lib/lwres/man/lwres_gnba.html head/contrib/bind9/lib/lwres/man/lwres_hstrerror.html head/contrib/bind9/lib/lwres/man/lwres_inetntop.html head/contrib/bind9/lib/lwres/man/lwres_noop.html head/contrib/bind9/lib/lwres/man/lwres_packet.html head/contrib/bind9/lib/lwres/man/lwres_resutil.html head/contrib/bind9/version Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/CHANGES Mon Jan 25 06:18:31 2010 (r202961) @@ -1,3 +1,15 @@ + --- 9.6.1-P3 released --- + +2831. [security] Do not attempt to validate or cache + out-of-bailiwick data returned with a secure + answer; it must be re-fetched from its original + source and validated in that context. [RT #20819] + +2828. [security] Cached CNAME or DNAME RR could be returned to clients + without DNSSEC validation. [RT #20737] + +2827. [security] Bogus NXDOMAIN could be cached as if valid. [RT #20712] + --- 9.6.1-P2 released --- 2772. [security] When validating, track whether pending data was from Modified: head/contrib/bind9/FAQ ============================================================================== --- head/contrib/bind9/FAQ Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/FAQ Mon Jan 25 06:18:31 2010 (r202961) @@ -153,24 +153,29 @@ A: BIND 9.3 and later: Use TSIG to selec Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -220,13 +225,13 @@ A: You choose one view to be master and Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -239,7 +244,7 @@ A: You choose one view to be master and type master; file "internal/example.db"; allow-update { key mykey; }; - notify-also { 10.0.1.1; }; + also-notify { 10.0.1.1; }; }; }; @@ -249,7 +254,7 @@ A: You choose one view to be master and type slave; file "external/example.db"; masters { 10.0.1.1; }; - transfer-source { 10.0.1.1; }; + transfer-source 10.0.1.1; // allow-update-forwarding { any; }; // allow-notify { ... }; }; Modified: head/contrib/bind9/FAQ.xml ============================================================================== --- head/contrib/bind9/FAQ.xml Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/FAQ.xml Mon Jan 25 06:18:31 2010 (r202961) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - +
Frequently Asked Questions about BIND 9 @@ -319,24 +319,29 @@ Slave: 10.0.1.3 (internal), 10.0.1.4 (ex Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -424,13 +429,13 @@ named-checkzone example.com tmp Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -443,7 +448,7 @@ Master 10.0.1.1: type master; file "internal/example.db"; allow-update { key mykey; }; - notify-also { 10.0.1.1; }; + also-notify { 10.0.1.1; }; }; }; @@ -453,7 +458,7 @@ Master 10.0.1.1: type slave; file "external/example.db"; masters { 10.0.1.1; }; - transfer-source { 10.0.1.1; }; + transfer-source 10.0.1.1; // allow-update-forwarding { any; }; // allow-notify { ... }; }; Modified: head/contrib/bind9/bin/dnssec/dnssec-signzone.8 ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-signzone.8 Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/bin/dnssec/dnssec-signzone.8 Mon Jan 25 06:18:31 2010 (r202961) @@ -13,163 +13,287 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-signzone.8,v 1.47.44.4 2009/06/09 01:47:19 each Exp $ +.\" $Id: dnssec-signzone.8,v 1.47.44.4.8.1 2009/12/31 23:17:46 tbox Exp $ .\" .hy 0 .ad l -.\"Generated by db2man.xsl. Don't modify this, modify the source. -.de Sh \" Subsection -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.TH "DNSSEC-SIGNZONE" 8 "June 08, 2009" "" "" -.SH NAME -dnssec-signzone \- DNSSEC zone signing tool +.\" Title: dnssec\-signzone +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.71.1 +.\" Date: June 08, 2009 +.\" Manual: BIND9 +.\" Source: BIND9 +.\" +.TH "DNSSEC\-SIGNZONE" "8" "June 08, 2009" "BIND9" "BIND9" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +dnssec\-signzone \- DNSSEC zone signing tool .SH "SYNOPSIS" .HP 16 -\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fIclass\fR\fR] [\fB\-d\ \fIdirectory\fR\fR] [\fB\-e\ \fIend\-time\fR\fR] [\fB\-f\ \fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fIkey\fR\fR] [\fB\-l\ \fIdomain\fR\fR] [\fB\-i\ \fIinterval\fR\fR] [\fB\-I\ \fIinput\-format\fR\fR] [\fB\-j\ \fIjitter\fR\fR] [\fB\-N\ \fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fIorigin\fR\fR] [\fB\-O\ \fIoutput\-format\fR\fR] [\fB\-p\fR] [\fB\-r\ \fIrandomdev\fR\fR] [\fB\-s\ \fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fIlevel\fR\fR] [\fB\-z\fR] [\fB\-3\ \fIsalt\fR\fR] [\fB\-H\ \fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...] +\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...] .SH "DESCRIPTION" .PP -\fBdnssec\-signzone\fR signs a zone\&. It generates NSEC and RRSIG records and produces a signed version of the zone\&. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a \fIkeyset\fR file for each child zone\&. +\fBdnssec\-signzone\fR +signs a zone. It generates NSEC and RRSIG records and produces a signed version of the zone. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a +\fIkeyset\fR +file for each child zone. .SH "OPTIONS" -.TP +.PP \-a -Verify all generated signatures\&. -.TP +.RS 4 +Verify all generated signatures. +.RE +.PP \-c \fIclass\fR -Specifies the DNS class of the zone\&. -.TP +.RS 4 +Specifies the DNS class of the zone. +.RE +.PP \-k \fIkey\fR -Treat specified key as a key signing key ignoring any key flags\&. This option may be specified multiple times\&. -.TP +.RS 4 +Treat specified key as a key signing key ignoring any key flags. This option may be specified multiple times. +.RE +.PP \-l \fIdomain\fR -Generate a DLV set in addition to the key (DNSKEY) and DS sets\&. The domain is appended to the name of the records\&. -.TP +.RS 4 +Generate a DLV set in addition to the key (DNSKEY) and DS sets. The domain is appended to the name of the records. +.RE +.PP \-d \fIdirectory\fR -Look for \fIkeyset\fR files in \fBdirectory\fR as the directory -.TP +.RS 4 +Look for +\fIkeyset\fR +files in +\fBdirectory\fR +as the directory +.RE +.PP \-g -Generate DS records for child zones from keyset files\&. Existing DS records will be removed\&. -.TP +.RS 4 +Generate DS records for child zones from keyset files. Existing DS records will be removed. +.RE +.PP \-s \fIstart\-time\fR -Specify the date and time when the generated RRSIG records become valid\&. This can be either an absolute or relative time\&. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000\&. A relative start time is indicated by +N, which is N seconds from the current time\&. If no \fBstart\-time\fR is specified, the current time minus 1 hour (to allow for clock skew) is used\&. -.TP +.RS 4 +Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no +\fBstart\-time\fR +is specified, the current time minus 1 hour (to allow for clock skew) is used. +.RE +.PP \-e \fIend\-time\fR -Specify the date and time when the generated RRSIG records expire\&. As with \fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation\&. A time relative to the start time is indicated with +N, which is N seconds from the start time\&. A time relative to the current time is indicated with now+N\&. If no \fBend\-time\fR is specified, 30 days from the start time is used as a default\&. -.TP +.RS 4 +Specify the date and time when the generated RRSIG records expire. As with +\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no +\fBend\-time\fR +is specified, 30 days from the start time is used as a default. +.RE +.PP \-f \fIoutput\-file\fR -The name of the output file containing the signed zone\&. The default is to append \fI\&.signed\fR to the input filename\&. -.TP +.RS 4 +The name of the output file containing the signed zone. The default is to append +\fI.signed\fR +to the input filename. +.RE +.PP \-h -Prints a short summary of the options and arguments to \fBdnssec\-signzone\fR\&. -.TP +.RS 4 +Prints a short summary of the options and arguments to +\fBdnssec\-signzone\fR. +.RE +.PP \-i \fIinterval\fR -When a previously\-signed zone is passed as input, records may be resigned\&. The \fBinterval\fR option specifies the cycle interval as an offset from the current time (in seconds)\&. If a RRSIG record expires after the cycle interval, it is retained\&. Otherwise, it is considered to be expiring soon, and it will be replaced\&. -The default cycle interval is one quarter of the difference between the signature end and start times\&. So if neither \fBend\-time\fR or \fBstart\-time\fR are specified, \fBdnssec\-signzone\fR generates signatures that are valid for 30 days, with a cycle interval of 7\&.5 days\&. Therefore, if any existing RRSIG records are due to expire in less than 7\&.5 days, they would be replaced\&. -.TP +.RS 4 +When a previously\-signed zone is passed as input, records may be resigned. The +\fBinterval\fR +option specifies the cycle interval as an offset from the current time (in seconds). If a RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced. +.sp +The default cycle interval is one quarter of the difference between the signature end and start times. So if neither +\fBend\-time\fR +or +\fBstart\-time\fR +are specified, +\fBdnssec\-signzone\fR +generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced. +.RE +.PP \-I \fIinput\-format\fR -The format of the input zone file\&. Possible formats are \fB"text"\fR (default) and \fB"raw"\fR\&. This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non\-text format containing updates can be signed directly\&. The use of this option does not make much sense for non\-dynamic zones\&. -.TP +.RS 4 +The format of the input zone file. Possible formats are +\fB"text"\fR +(default) and +\fB"raw"\fR. This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non\-text format containing updates can be signed directly. The use of this option does not make much sense for non\-dynamic zones. +.RE +.PP \-j \fIjitter\fR -When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expires simultaneously\&. If the zone is incrementally signed, i\&.e\&. a previously\-signed zone is passed as input to the signer, all expired signatures have to be regenerated at about the same time\&. The \fBjitter\fR option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time\&. -Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i\&.e\&. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time\&. -.TP +.RS 4 +When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expires simultaneously. If the zone is incrementally signed, i.e. a previously\-signed zone is passed as input to the signer, all expired signatures have to be regenerated at about the same time. The +\fBjitter\fR +option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time. +.sp +Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i.e. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time. +.RE +.PP \-n \fIncpus\fR -Specifies the number of threads to use\&. By default, one thread is started for each detected CPU\&. -.TP +.RS 4 +Specifies the number of threads to use. By default, one thread is started for each detected CPU. +.RE +.PP \-N \fIsoa\-serial\-format\fR -The SOA serial number format of the signed zone\&. Possible formats are \fB"keep"\fR (default), \fB"increment"\fR and \fB"unixtime"\fR\&. -.RS -.TP +.RS 4 +The SOA serial number format of the signed zone. Possible formats are +\fB"keep"\fR +(default), +\fB"increment"\fR +and +\fB"unixtime"\fR. +.RS 4 +.PP \fB"keep"\fR -Do not modify the SOA serial number\&. -.TP +.RS 4 +Do not modify the SOA serial number. +.RE +.PP \fB"increment"\fR -Increment the SOA serial number using RFC 1982 arithmetics\&. -.TP +.RS 4 +Increment the SOA serial number using RFC 1982 arithmetics. +.RE +.PP \fB"unixtime"\fR -Set the SOA serial number to the number of seconds since epoch\&. +.RS 4 +Set the SOA serial number to the number of seconds since epoch. .RE -.IP -.TP +.RE +.RE +.PP \-o \fIorigin\fR -The zone origin\&. If not specified, the name of the zone file is assumed to be the origin\&. -.TP +.RS 4 +The zone origin. If not specified, the name of the zone file is assumed to be the origin. +.RE +.PP \-O \fIoutput\-format\fR -The format of the output file containing the signed zone\&. Possible formats are \fB"text"\fR (default) and \fB"raw"\fR\&. -.TP +.RS 4 +The format of the output file containing the signed zone. Possible formats are +\fB"text"\fR +(default) and +\fB"raw"\fR. +.RE +.PP \-p -Use pseudo\-random data when signing the zone\&. This is faster, but less secure, than using real random data\&. This option may be useful when signing large zones or when the entropy source is limited\&. -.TP +.RS 4 +Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited. +.RE +.PP \-r \fIrandomdev\fR -Specifies the source of randomness\&. If the operating system does not provide a \fI/dev/random\fR or equivalent device, the default source of randomness is keyboard input\&. \fIrandomdev\fR specifies the name of a character device or file containing random data to be used instead of the default\&. The special value \fIkeyboard\fR indicates that keyboard input should be used\&. -.TP +.RS 4 +Specifies the source of randomness. If the operating system does not provide a +\fI/dev/random\fR +or equivalent device, the default source of randomness is keyboard input. +\fIrandomdev\fR +specifies the name of a character device or file containing random data to be used instead of the default. The special value +\fIkeyboard\fR +indicates that keyboard input should be used. +.RE +.PP \-t -Print statistics at completion\&. -.TP +.RS 4 +Print statistics at completion. +.RE +.PP \-v \fIlevel\fR -Sets the debugging level\&. -.TP +.RS 4 +Sets the debugging level. +.RE +.PP \-z -Ignore KSK flag on key when determining what to sign\&. -.TP +.RS 4 +Ignore KSK flag on key when determining what to sign. +.RE +.PP \-3 \fIsalt\fR -Generate a NSEC3 chain with the given hex encoded salt\&. A dash (\fIsalt\fR) can be used to indicate that no salt is to be used when generating the NSEC3 chain\&. -.TP +.RS 4 +Generate a NSEC3 chain with the given hex encoded salt. A dash (\fIsalt\fR) can be used to indicate that no salt is to be used when generating the NSEC3 chain. +.RE +.PP \-H \fIiterations\fR -When generating a NSEC3 chain use this many interations\&. The default is 100\&. -.TP +.RS 4 +When generating a NSEC3 chain use this many interations. The default is 100. +.RE +.PP \-A -When generating a NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations\&. -.TP +.RS 4 +When generating a NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations. +.RE +.PP zonefile -The file containing the zone to be signed\&. -.TP +.RS 4 +The file containing the zone to be signed. +.RE +.PP key -Specify which keys should be used to sign the zone\&. If no keys are specified, then the zone will be examined for DNSKEY records at the zone apex\&. If these are found and there are matching private keys, in the current directory, then these will be used for signing\&. +.RS 4 +Specify which keys should be used to sign the zone. If no keys are specified, then the zone will be examined for DNSKEY records at the zone apex. If these are found and there are matching private keys, in the current directory, then these will be used for signing. +.RE .SH "EXAMPLE" .PP -The following command signs the \fBexample\&.com\fR zone with the DSA key generated by \fBdnssec\-keygen\fR (Kexample\&.com\&.+003+17247)\&. The zone's keys must be in the master file (\fIdb\&.example\&.com\fR)\&. This invocation looks for \fIkeyset\fR files, in the current directory, so that DS records can be generated from them (\fB\-g\fR)\&. +The following command signs the +\fBexample.com\fR +zone with the DSA key generated by +\fBdnssec\-keygen\fR +(Kexample.com.+003+17247). The zone's keys must be in the master file (\fIdb.example.com\fR). This invocation looks for +\fIkeyset\fR +files, in the current directory, so that DS records can be generated from them (\fB\-g\fR). +.sp +.RS 4 .nf -% dnssec\-signzone \-g \-o example\&.com db\&.example\&.com \\ -Kexample\&.com\&.+003+17247 -db\&.example\&.com\&.signed +% dnssec\-signzone \-g \-o example.com db.example.com \\ +Kexample.com.+003+17247 +db.example.com.signed % .fi +.RE .PP -In the above example, \fBdnssec\-signzone\fR creates the file \fIdb\&.example\&.com\&.signed\fR\&. This file should be referenced in a zone statement in a \fInamed\&.conf\fR file\&. -.PP -This example re\-signs a previously signed zone with default parameters\&. The private keys are assumed to be in the current directory\&. +In the above example, +\fBdnssec\-signzone\fR +creates the file +\fIdb.example.com.signed\fR. This file should be referenced in a zone statement in a +\fInamed.conf\fR +file. +.PP +This example re\-signs a previously signed zone with default parameters. The private keys are assumed to be in the current directory. +.sp +.RS 4 .nf -% cp db\&.example\&.com\&.signed db\&.example\&.com -% dnssec\-signzone \-o example\&.com db\&.example\&.com -db\&.example\&.com\&.signed +% cp db.example.com.signed db.example.com +% dnssec\-signzone \-o example.com db.example.com +db.example.com.signed % .fi +.RE .SH "KNOWN BUGS" .PP - \fBdnssec\-signzone\fR was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys needed to produce a fully\-signed zone\&. This permits a zone administrator, for example, to sign a zone with one key on one machine, move the resulting partially\-signed zone to a second machine, and sign it again with a second key\&. -.PP -An unfortunate side\-effect of this flexibility is that \fBdnssec\-signzone\fR does not check to make sure it's signing a zone with any valid keys at all\&. An attempt to sign a zone without any keys will appear to succeed, producing a "signed" zone with no signatures\&. There is no warning issued when a zone is not fully signed\&. +\fBdnssec\-signzone\fR +was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys needed to produce a fully\-signed zone. This permits a zone administrator, for example, to sign a zone with one key on one machine, move the resulting partially\-signed zone to a second machine, and sign it again with a second key. .PP -This will be corrected in a future release\&. In the meantime, ISC recommends examining the output of \fBdnssec\-signzone\fR to confirm that the zone is properly signed by all keys before using it\&. +An unfortunate side\-effect of this flexibility is that +\fBdnssec\-signzone\fR +does not check to make sure it's signing a zone with any valid keys at all. An attempt to sign a zone without any keys will appear to succeed, producing a "signed" zone with no signatures. There is no warning issued when a zone is not fully signed. +.PP +This will be corrected in a future release. In the meantime, ISC recommends examining the output of +\fBdnssec\-signzone\fR +to confirm that the zone is properly signed by all keys before using it. .SH "SEE ALSO" .PP -\fBdnssec\-keygen\fR(8), BIND 9 Administrator Reference Manual, RFC 4033\&. +\fBdnssec\-keygen\fR(8), +BIND 9 Administrator Reference Manual, +RFC 4033. .SH "AUTHOR" .PP -Internet Systems Consortium +Internet Systems Consortium +.SH "COPYRIGHT" +Copyright \(co 2004\-2009 Internet Systems Consortium, Inc. ("ISC") +.br +Copyright \(co 2000\-2003 Internet Software Consortium. +.br Modified: head/contrib/bind9/bin/dnssec/dnssec-signzone.html ============================================================================== --- head/contrib/bind9/bin/dnssec/dnssec-signzone.html Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/bin/dnssec/dnssec-signzone.html Mon Jan 25 06:18:31 2010 (r202961) @@ -14,12 +14,12 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + dnssec-signzone - +
@@ -32,7 +32,7 @@

dnssec-signzone [-a] [-c class] [-d directory] [-e end-time] [-f output-file] [-g] [-h] [-k key] [-l domain] [-i interval] [-I input-format] [-j jitter] [-N soa-seria l-format] [-o origin] [-O output-format] [-p] [-r randomdev] [-s start-time] [-t] [-v level] [-z] [-3 salt] [-H iterations] [-A] {zonefile} [key...]

-

DESCRIPTION

+

DESCRIPTION

dnssec-signzone signs a zone. It generates NSEC and RRSIG records and produces a signed version of the @@ -43,7 +43,7 @@

-

OPTIONS

+

OPTIONS

-a

@@ -258,7 +258,7 @@

-

EXAMPLE

+

EXAMPLE

The following command signs the example.com zone with the DSA key generated by dnssec-keygen @@ -287,7 +287,7 @@ db.example.com.signed %

-

KNOWN BUGS

+

KNOWN BUGS

dnssec-signzone was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys @@ -312,14 +312,14 @@ db.example.com.signed

-

SEE ALSO

+

SEE ALSO

dnssec-keygen(8), BIND 9 Administrator Reference Manual, RFC 4033.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/bin/named/query.c ============================================================================== --- head/contrib/bind9/bin/named/query.c Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/bin/named/query.c Mon Jan 25 06:18:31 2010 (r202961) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.313.20.7.12.1 2009/11/18 23:58:04 marka Exp $ */ +/* $Id: query.c,v 1.313.20.7.12.4 2009/12/31 22:53:03 each Exp $ */ /*! \file */ @@ -1160,7 +1160,8 @@ query_addadditional(void *arg, dns_name_ goto cleanup; } result = dns_db_find(db, name, version, type, - client->query.dboptions | DNS_DBFIND_GLUEOK, + client->query.dboptions | + DNS_DBFIND_GLUEOK | DNS_DBFIND_ADDITIONALOK, client->now, &node, fname, rdataset, sigrdataset); if (result == DNS_R_GLUE && @@ -1645,7 +1646,8 @@ query_addadditional2(void *arg, dns_name goto try_glue; result = dns_db_find(db, name, version, type, - client->query.dboptions | DNS_DBFIND_GLUEOK, + client->query.dboptions | + DNS_DBFIND_GLUEOK | DNS_DBFIND_ADDITIONALOK, client->now, &node, fname, NULL, NULL); if (result == ISC_R_SUCCESS) goto found; @@ -3718,8 +3720,6 @@ query_find(ns_client_t *client, dns_fetc dns_rdataset_t *noqname; isc_boolean_t resuming; int line = -1; - dns_rdataset_t tmprdataset; - unsigned int dboptions; CTRACE("query_find"); @@ -3937,49 +3937,9 @@ query_find(ns_client_t *client, dns_fetc /* * Now look for an answer in the database. */ - dboptions = client->query.dboptions; - if (sigrdataset == NULL && client->view->enablednssec) { - /* - * If the client doesn't want DNSSEC we still want to - * look for any data pending validation to save a remote - * lookup if possible. - */ - dns_rdataset_init(&tmprdataset); - sigrdataset = &tmprdataset; - dboptions |= DNS_DBFIND_PENDINGOK; - } - refind: result = dns_db_find(db, client->query.qname, version, type, - dboptions, client->now, &node, fname, - rdataset, sigrdataset); - /* - * If we have found pending data try to validate it. - * If the data does not validate as secure and we can't - * use the unvalidated data requery the database with - * pending disabled to prevent infinite looping. - */ - if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust)) - goto validation_done; - if (validate(client, db, fname, rdataset, sigrdataset)) - goto validation_done; - if (rdataset->trust != dns_trust_pending_answer || - !PENDINGOK(client->query.dboptions)) { - dns_rdataset_disassociate(rdataset); - if (sigrdataset != NULL && - dns_rdataset_isassociated(sigrdataset)) - dns_rdataset_disassociate(sigrdataset); - if (sigrdataset == &tmprdataset) - sigrdataset = NULL; - dns_db_detachnode(db, &node); - dboptions &= ~DNS_DBFIND_PENDINGOK; - goto refind; - } - validation_done: - if (sigrdataset == &tmprdataset) { - if (dns_rdataset_isassociated(sigrdataset)) - dns_rdataset_disassociate(sigrdataset); - sigrdataset = NULL; - } + client->query.dboptions, client->now, + &node, fname, rdataset, sigrdataset); resume: CTRACE("query_find: resume"); Modified: head/contrib/bind9/doc/arm/Bv9ARM.pdf ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/bind9/doc/arm/man.dnssec-signzone.html ============================================================================== --- head/contrib/bind9/doc/arm/man.dnssec-signzone.html Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/doc/arm/man.dnssec-signzone.html Mon Jan 25 06:18:31 2010 (r202961) @@ -14,12 +14,12 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + dnssec-signzone - + @@ -50,7 +50,7 @@

dnssec-signzone [-a] [-c class] [-d directory] [-e end-time] [-f output-file] [-g] [-h] [-k key] [-l domain] [-i interval] [-I input-format] [-j jitter] [-N soa-seria l-format] [-o origin] [-O output-format] [-p] [-r randomdev] [-s start-time] [-t] [-v level] [-z] [-3 salt] [-H iterations] [-A] {zonefile} [key...]

-

DESCRIPTION

+

DESCRIPTION

dnssec-signzone signs a zone. It generates NSEC and RRSIG records and produces a signed version of the @@ -61,7 +61,7 @@

-

OPTIONS

+

OPTIONS

-a

@@ -276,7 +276,7 @@

-

EXAMPLE

+

EXAMPLE

The following command signs the example.com zone with the DSA key generated by dnssec-keygen @@ -305,7 +305,7 @@ db.example.com.signed %

-

KNOWN BUGS

+

KNOWN BUGS

dnssec-signzone was designed so that it could sign a zone partially, using only a subset of the DNSSEC keys @@ -330,14 +330,14 @@ db.example.com.signed

-

SEE ALSO

+

SEE ALSO

dnssec-keygen(8), BIND 9 Administrator Reference Manual, RFC 4033.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/doc/arm/man.named-checkconf.html ============================================================================== --- head/contrib/bind9/doc/arm/man.named-checkconf.html Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/doc/arm/man.named-checkconf.html Mon Jan 25 06:18:31 2010 (r202961) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -50,14 +50,14 @@

named-checkconf [-h] [-v] [-j] [-t directory] {filename} [-z]

-

DESCRIPTION

+

DESCRIPTION

named-checkconf checks the syntax, but not the semantics, of a named configuration file.

-

OPTIONS

+

OPTIONS

-h

@@ -92,21 +92,21 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkconf returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkzone(8), BIND 9 Administrator Reference Manual.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/doc/arm/man.named-checkzone.html ============================================================================== --- head/contrib/bind9/doc/arm/man.named-checkzone.html Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/doc/arm/man.named-checkzone.html Mon Jan 25 06:18:31 2010 (r202961) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -51,7 +51,7 @@

named-compilezone [-d] [-j] [-q] [-v] [-c class] [-C mode] [-f format] [-F format] [-i mode] [-k mode] [-m mode] [-n mode] [-o filename] [-s style] [-t directory] [-w directory] [-D] [-W mode] {zonename} {filename}

-

DESCRIPTION

+

DESCRIPTION

named-checkzone checks the syntax and integrity of a zone file. It performs the same checks as named does when loading a @@ -71,7 +71,7 @@

-

OPTIONS

+

OPTIONS

-d

@@ -257,14 +257,14 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkzone returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkconf(8), RFC 1035, @@ -272,7 +272,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/doc/arm/man.named.html ============================================================================== --- head/contrib/bind9/doc/arm/man.named.html Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/doc/arm/man.named.html Mon Jan 25 06:18:31 2010 (r202961) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -50,7 +50,7 @@

named [-4] [-6] [-c config-file] [-d debug-level] [-f] [-g] [-m flag] [-n #cpus] [-p port] [-s] [-S #max-socks] [-t directory] [-u user] [-v] [-V] [-x cache-file]

-

DESCRIPTION

+

DESCRIPTION

named is a Domain Name System (DNS) server, part of the BIND 9 distribution from ISC. For more @@ -65,7 +65,7 @@

-

OPTIONS

+

OPTIONS

-4

@@ -238,7 +238,7 @@

-

SIGNALS

+

SIGNALS

In routine operation, signals should not be used to control the nameserver; rndc should be used @@ -259,7 +259,7 @@

-

CONFIGURATION

+

CONFIGURATION

The named configuration file is too complex to describe in detail here. A complete description is provided @@ -268,7 +268,7 @@

-

FILES

+

FILES

/etc/named.conf

@@ -281,7 +281,7 @@

-

SEE ALSO

+

SEE ALSO

RFC 1033, RFC 1034, RFC 1035, @@ -294,7 +294,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: head/contrib/bind9/doc/arm/man.nsupdate.html ============================================================================== --- head/contrib/bind9/doc/arm/man.nsupdate.html Mon Jan 25 04:42:54 2010 (r202960) +++ head/contrib/bind9/doc/arm/man.nsupdate.html Mon Jan 25 06:18:31 2010 (r202961) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -50,7 +50,7 @@

nsupdate [-d] [-D] [[-g] | [-o] | [-y [hmac:]keyname:secret] | [-k keyfile]] [-t timeout] [-u udptimeout] [-r udpretries] [-R randomdev] [-v] [filename]

-

DESCRIPTION

*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 06:37:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C4B1065679; Mon, 25 Jan 2010 06:37:44 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E001B8FC15; Mon, 25 Jan 2010 06:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P6biiA075836; Mon, 25 Jan 2010 06:37:44 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P6bi6Y075834; Mon, 25 Jan 2010 06:37:44 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201001250637.o0P6bi6Y075834@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 25 Jan 2010 06:37:44 +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: r202962 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 06:37:45 -0000 Author: joerg Date: Mon Jan 25 06:37:44 2010 New Revision: 202962 URL: http://svn.freebsd.org/changeset/base/202962 Log: Add an example, derived from the basic demo phk once sent me. Modified: head/share/man/man4/gpib.4 Modified: head/share/man/man4/gpib.4 ============================================================================== --- head/share/man/man4/gpib.4 Mon Jan 25 06:18:31 2010 (r202961) +++ head/share/man/man4/gpib.4 Mon Jan 25 06:37:44 2010 (r202962) @@ -44,6 +44,39 @@ IEC-625 (or just "IEC bus"), or HP-IB (H Bus), or GPIB (General Purpose Instrument Bus). The device can become either a listener, talker, controller, and in particular a master controller on the bus. +.Ss Example +The following example code queries the device provided as +.Va argv[1] +for its identification response. +.Bd -literal +/* compile with: cc -O -o ibtest ibtest.c -lgpib */ + +#include +#include +#include +#include + +#include + +int +main(int argc, char **argv) +{ + int dmm; + unsigned char buf[100]; + char vbuf[sizeof buf * 4]; + + /* DVM */ + dmm = ibdev(0, (argc > 1? atoi(argv[1]): 7), 0, + T10s, 1, 0); + if (dmm < 0) + errx(1, "ibdev = %d\\n", dmm); + ibwrt(dmm, "*IDN?\\r\\n", 7); + ibrd(dmm, buf, sizeof buf - 1); + strvisx(vbuf, buf, ibcnt, VIS_WHITE | VIS_CSTYLE); + printf("%s\\n", vbuf); + return (0); +} +.Ed .Sh FILES .Bl -tag -width /dev/gpibNNib .It Pa /dev/gpib Ns Em N Ns "ib" From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 07:52:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFB2F106568D; Mon, 25 Jan 2010 07:52:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE9A48FC08; Mon, 25 Jan 2010 07:52:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0P7qseL093959; Mon, 25 Jan 2010 07:52:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0P7qsFo093957; Mon, 25 Jan 2010 07:52:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001250752.o0P7qsFo093957@svn.freebsd.org> From: Xin LI Date: Mon, 25 Jan 2010 07:52:54 +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: r202964 - head/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 07:52:54 -0000 Author: delphij Date: Mon Jan 25 07:52:54 2010 New Revision: 202964 URL: http://svn.freebsd.org/changeset/base/202964 Log: On FreeBSD, time_t is 64-bit for all platforms except i386 and powerpc, where the type is 32-bit. ZFS can handle 64-bit timestamp internally but zfs_setattr() would check if the time value can fit, we change the checking macros to match 64-bit timestamp if the platform supports it. This change has some downsides like, while you can import zfs on 32-bit platforms, the timestamp would overflow if they are out of the range. This fixes the Y2.038K issue on platforms using 64-bit timestamps. Reviewed by: pjd MFC after: 1 month Modified: head/sys/cddl/compat/opensolaris/sys/time.h Modified: head/sys/cddl/compat/opensolaris/sys/time.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/time.h Mon Jan 25 07:37:37 2010 (r202963) +++ head/sys/cddl/compat/opensolaris/sys/time.h Mon Jan 25 07:52:54 2010 (r202964) @@ -40,8 +40,13 @@ typedef longlong_t hrtime_t; #define LBOLT ((gethrtime() * hz) / NANOSEC) +#if defined(__i386__) || defined(__powerpc__) #define TIMESPEC_OVERFLOW(ts) \ ((ts)->tv_sec < INT32_MIN || (ts)->tv_sec > INT32_MAX) +#else +#define TIMESPEC_OVERFLOW(ts) \ + ((ts)->tv_sec < INT64_MIN || (ts)->tv_sec > INT64_MAX) +#endif #ifdef _KERNEL #define lbolt64 (int64_t)(LBOLT) From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 11:56:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C85C8106568D; Mon, 25 Jan 2010 11:56:53 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B54788FC08; Mon, 25 Jan 2010 11:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PBurRL054405; Mon, 25 Jan 2010 11:56:53 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PBurub054402; Mon, 25 Jan 2010 11:56:53 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001251156.o0PBurub054402@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Jan 2010 11:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202965 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 11:56:53 -0000 Author: attilio Date: Mon Jan 25 11:56:53 2010 New Revision: 202965 URL: http://svn.freebsd.org/changeset/base/202965 Log: MFC r201790: - Set td_slptick to 0 when moving threads out of sleepqueues. - Move td_slptick from u_int to int in order to follow 'ticks' signedness and wrap up accordingly. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Mon Jan 25 07:52:54 2010 (r202964) +++ stable/8/sys/kern/sched_4bsd.c Mon Jan 25 11:56:53 2010 (r202965) @@ -1050,7 +1050,7 @@ sched_wakeup(struct thread *td) updatepri(td); resetpriority(td); } - td->td_slptick = ticks; + td->td_slptick = 0; ts->ts_slptime = 0; sched_add(td, SRQ_BORING); } Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Mon Jan 25 07:52:54 2010 (r202964) +++ stable/8/sys/sys/proc.h Mon Jan 25 11:56:53 2010 (r202965) @@ -216,7 +216,7 @@ struct thread { int td_pinned; /* (k) Temporary cpu pin count. */ struct ucred *td_ucred; /* (k) Reference to credentials. */ u_int td_estcpu; /* (t) estimated cpu utilization */ - u_int td_slptick; /* (t) Time at sleep. */ + int td_slptick; /* (t) Time at sleep. */ struct rusage td_ru; /* (t) rusage information */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 12:05:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83CBD1065676; Mon, 25 Jan 2010 12:05:51 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6698FC1A; Mon, 25 Jan 2010 12:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PC5pRY056858; Mon, 25 Jan 2010 12:05:51 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PC5pnC056848; Mon, 25 Jan 2010 12:05:51 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001251205.o0PC5pnC056848@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Jan 2010 12:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202966 - in stable/8: . share/man/man9 sys/conf sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 12:05:51 -0000 Author: attilio Date: Mon Jan 25 12:05:51 2010 New Revision: 202966 URL: http://svn.freebsd.org/changeset/base/202966 Log: MFC r201879: Introduce the new kernel thread called "deadlock resolver". It is used in order to seek within the threads state and heuristically understand if there is any deadlock happening. In order to implement it, the sq_type in sleepqueues is mandatory and not only compiled along with INVARIANTS option. Additively, a new sleepqueue function, sleepq_type() is added, returning the type of the sleepqueue linked to a wchan. Three new sysctls are added in order to configure the thread: debug.deadlkres.slptime_threshold debug.deadlkres.blktime_threshold debug.deadlkres.sleepfreq rappresenting the thresholds for sleep and block time that will lead to a deadlock matching (when exceeded), while the sleepfreq rappresents the number of seconds between 2 consecutive thread runnings. In order to enable the deadlock resolver thread recompile your kernel with the option DEADLKRES. Sponsored by: Sandvine Incorporated Modified: stable/8/UPDATING (contents, props changed) stable/8/share/man/man9/sleepqueue.9 stable/8/sys/conf/NOTES stable/8/sys/conf/options stable/8/sys/kern/kern_clock.c stable/8/sys/kern/subr_sleepqueue.c stable/8/sys/kern/subr_turnstile.c stable/8/sys/sys/proc.h stable/8/sys/sys/sleepqueue.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/UPDATING Mon Jan 25 12:05:51 2010 (r202966) @@ -15,6 +15,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100125: + Introduce the kernel thread "deadlock resolver" (which can be enabled + via the DEADLKRES option, see NOTES for more details) and the + sleepq_type() function for sleepqueues. + 20090929: 802.11s D3.03 support was committed. This is incompatible with the previous code, which was based on D3.0. Modified: stable/8/share/man/man9/sleepqueue.9 ============================================================================== --- stable/8/share/man/man9/sleepqueue.9 Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/share/man/man9/sleepqueue.9 Mon Jan 25 12:05:51 2010 (r202966) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 18, 2010 +.Dd January 25, 2010 .Dt SLEEPQUEUE 9 .Os .Sh NAME @@ -44,6 +44,7 @@ .Nm sleepq_sleepcnt , .Nm sleepq_timedwait , .Nm sleepq_timedwait_sig , +.Nm sleepq_type , .Nm sleepq_wait , .Nm sleepq_wait_sig .Nd manage the queues of sleeping threads @@ -84,6 +85,8 @@ .Fn sleepq_timedwait "void *wchan" .Ft int .Fn sleepq_timedwait_sig "void *wchan" "int signal_caught" +.Ft int +.Fn sleepq_type "void *wchan" .Ft void .Fn sleepq_wait "void *wchan" .Ft int @@ -366,6 +369,12 @@ given a .Fa wchan . .Pp The +.Fn sleepq_type +function returns the type of +.Fa wchan +associated to a sleepqueue. +.Pp +The .Fn sleepq_abort , .Fn sleepq_broadcast , and Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/conf/NOTES Mon Jan 25 12:05:51 2010 (r202966) @@ -2473,6 +2473,11 @@ options BOOTP_BLOCKSIZE=8192 # Override options SW_WATCHDOG # +# Add the software deadlock resolver thread. +# +options DEADLKRES + +# # Disable swapping of stack pages. This option removes all # code which actually performs swapping, so it's not possible to turn # it back on at run-time. Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/conf/options Mon Jan 25 12:05:51 2010 (r202966) @@ -72,6 +72,7 @@ COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7 opt_compat.h COMPILING_LINT opt_global.h CY_PCI_FASTINTR +DEADLKRES opt_watchdog.h DIRECTIO FULL_PREEMPTION opt_sched.h IPI_PREEMPTION opt_sched.h Modified: stable/8/sys/kern/kern_clock.c ============================================================================== --- stable/8/sys/kern/kern_clock.c Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/kern/kern_clock.c Mon Jan 25 12:05:51 2010 (r202966) @@ -48,14 +48,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -159,6 +161,124 @@ sysctl_kern_cp_times(SYSCTL_HANDLER_ARGS SYSCTL_PROC(_kern, OID_AUTO, cp_times, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, 0,0, sysctl_kern_cp_times, "LU", "per-CPU time statistics"); +#ifdef DEADLKRES +static int slptime_threshold = 1800; +static int blktime_threshold = 900; +static int sleepfreq = 3; + +static void +deadlkres(void) +{ + struct proc *p; + struct thread *td; + void *wchan; + int blkticks, slpticks, slptype, tryl, tticks; + + tryl = 0; + for (;;) { + blkticks = blktime_threshold * hz; + slpticks = slptime_threshold * hz; + + /* + * Avoid to sleep on the sx_lock in order to avoid a possible + * priority inversion problem leading to starvation. + * If the lock can't be held after 100 tries, panic. + */ + if (!sx_try_slock(&allproc_lock)) { + if (tryl > 100) + panic("%s: possible deadlock detected on allproc_lock\n", + __func__); + tryl++; + pause("allproc_lock deadlkres", sleepfreq * hz); + continue; + } + tryl = 0; + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + FOREACH_THREAD_IN_PROC(p, td) { + thread_lock(td); + if (TD_ON_LOCK(td)) { + + /* + * The thread should be blocked on a + * turnstile, simply check if the + * turnstile channel is in good state. + */ + MPASS(td->td_blocked != NULL); + tticks = ticks - td->td_blktick; + thread_unlock(td); + if (tticks > blkticks) { + + /* + * Accordingly with provided + * thresholds, this thread is + * stuck for too long on a + * turnstile. + */ + PROC_UNLOCK(p); + sx_sunlock(&allproc_lock); + panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", + __func__, td, tticks); + } + } else if (TD_IS_SLEEPING(td)) { + + /* + * Check if the thread is sleeping on a + * lock, otherwise skip the check. + * Drop the thread lock in order to + * avoid a LOR with the sleepqueue + * spinlock. + */ + wchan = td->td_wchan; + tticks = ticks - td->td_slptick; + thread_unlock(td); + slptype = sleepq_type(wchan); + if ((slptype == SLEEPQ_SX || + slptype == SLEEPQ_LK) && + tticks > slpticks) { + + /* + * Accordingly with provided + * thresholds, this thread is + * stuck for too long on a + * sleepqueue. + */ + PROC_UNLOCK(p); + sx_sunlock(&allproc_lock); + panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", + __func__, td, tticks); + } + } else + thread_unlock(td); + } + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + + /* Sleep for sleepfreq seconds. */ + pause("deadlkres", sleepfreq * hz); + } +} + +static struct kthread_desc deadlkres_kd = { + "deadlkres", + deadlkres, + (struct thread **)NULL +}; + +SYSINIT(deadlkres, SI_SUB_CLOCKS, SI_ORDER_ANY, kthread_start, &deadlkres_kd); + +SYSCTL_NODE(_debug, OID_AUTO, deadlkres, CTLFLAG_RW, 0, "Deadlock resolver"); +SYSCTL_INT(_debug_deadlkres, OID_AUTO, slptime_threshold, CTLFLAG_RW, + &slptime_threshold, 0, + "Number of seconds within is valid to sleep on a sleepqueue"); +SYSCTL_INT(_debug_deadlkres, OID_AUTO, blktime_threshold, CTLFLAG_RW, + &blktime_threshold, 0, + "Number of seconds within is valid to block on a turnstile"); +SYSCTL_INT(_debug_deadlkres, OID_AUTO, sleepfreq, CTLFLAG_RW, &sleepfreq, 0, + "Number of seconds between any deadlock resolver thread run"); +#endif /* DEADLKRES */ + void read_cpu_time(long *cp_time) { Modified: stable/8/sys/kern/subr_sleepqueue.c ============================================================================== --- stable/8/sys/kern/subr_sleepqueue.c Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/kern/subr_sleepqueue.c Mon Jan 25 12:05:51 2010 (r202966) @@ -122,8 +122,8 @@ struct sleepqueue { LIST_ENTRY(sleepqueue) sq_hash; /* (c) Chain and free list. */ LIST_HEAD(, sleepqueue) sq_free; /* (c) Free queues. */ void *sq_wchan; /* (c) Wait channel. */ -#ifdef INVARIANTS int sq_type; /* (c) Queue type. */ +#ifdef INVARIANTS struct lock_object *sq_lock; /* (c) Associated lock. */ #endif }; @@ -317,7 +317,6 @@ sleepq_add(void *wchan, struct lock_obje ("thread's sleep queue has a non-empty free list")); KASSERT(sq->sq_wchan == NULL, ("stale sq_wchan pointer")); sq->sq_lock = lock; - sq->sq_type = flags & SLEEPQ_TYPE; #endif #ifdef SLEEPQUEUE_PROFILING sc->sc_depth++; @@ -330,6 +329,7 @@ sleepq_add(void *wchan, struct lock_obje sq = td->td_sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; + sq->sq_type = flags & SLEEPQ_TYPE; } else { MPASS(wchan == sq->sq_wchan); MPASS(lock == sq->sq_lock); @@ -669,6 +669,28 @@ sleepq_timedwait_sig(void *wchan, int pr } /* + * Returns the type of sleepqueue given a waitchannel. + */ +int +sleepq_type(void *wchan) +{ + struct sleepqueue *sq; + int type; + + MPASS(wchan != NULL); + + sleepq_lock(wchan); + sq = sleepq_lookup(wchan); + if (sq == NULL) { + sleepq_release(wchan); + return (-1); + } + type = sq->sq_type; + sleepq_release(wchan); + return (type); +} + +/* * Removes a thread from a sleep queue and makes it * runnable. */ @@ -1176,8 +1198,8 @@ DB_SHOW_COMMAND(sleepq, db_show_sleepque return; found: db_printf("Wait channel: %p\n", sq->sq_wchan); -#ifdef INVARIANTS db_printf("Queue type: %d\n", sq->sq_type); +#ifdef INVARIANTS if (sq->sq_lock) { lock = sq->sq_lock; db_printf("Associated Interlock: %p - (%s) %s\n", lock, Modified: stable/8/sys/kern/subr_turnstile.c ============================================================================== --- stable/8/sys/kern/subr_turnstile.c Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/kern/subr_turnstile.c Mon Jan 25 12:05:51 2010 (r202966) @@ -733,6 +733,7 @@ turnstile_wait(struct turnstile *ts, str td->td_tsqueue = queue; td->td_blocked = ts; td->td_lockname = lock->lo_name; + td->td_blktick = ticks; TD_SET_LOCK(td); mtx_unlock_spin(&tc->tc_lock); propagate_priority(td); @@ -925,6 +926,7 @@ turnstile_unpend(struct turnstile *ts, i MPASS(TD_CAN_RUN(td)); td->td_blocked = NULL; td->td_lockname = NULL; + td->td_blktick = 0; #ifdef INVARIANTS td->td_tsqueue = 0xff; #endif Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/sys/proc.h Mon Jan 25 12:05:51 2010 (r202966) @@ -217,6 +217,7 @@ struct thread { struct ucred *td_ucred; /* (k) Reference to credentials. */ u_int td_estcpu; /* (t) estimated cpu utilization */ int td_slptick; /* (t) Time at sleep. */ + int td_blktick; /* (t) Time spent blocked. */ struct rusage td_ru; /* (t) rusage information */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ Modified: stable/8/sys/sys/sleepqueue.h ============================================================================== --- stable/8/sys/sys/sleepqueue.h Mon Jan 25 11:56:53 2010 (r202965) +++ stable/8/sys/sys/sleepqueue.h Mon Jan 25 12:05:51 2010 (r202966) @@ -112,6 +112,7 @@ void sleepq_set_timeout(void *wchan, int u_int sleepq_sleepcnt(void *wchan, int queue); int sleepq_timedwait(void *wchan, int pri); int sleepq_timedwait_sig(void *wchan, int pri); +int sleepq_type(void *wchan); void sleepq_wait(void *wchan, int pri); int sleepq_wait_sig(void *wchan, int pri); From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 12:23:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84E89106566B; Mon, 25 Jan 2010 12:23:52 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72B108FC18; Mon, 25 Jan 2010 12:23:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PCNqWq061180; Mon, 25 Jan 2010 12:23:52 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PCNqhG061178; Mon, 25 Jan 2010 12:23:52 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001251223.o0PCNqhG061178@svn.freebsd.org> From: Rui Paulo Date: Mon, 25 Jan 2010 12:23:52 +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: r202967 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 12:23:52 -0000 Author: rpaulo Date: Mon Jan 25 12:23:51 2010 New Revision: 202967 URL: http://svn.freebsd.org/changeset/base/202967 Log: Call ieee80211_radiotap_rx, not ieee80211_radiotap_tx on sta_input() PR: 143163 Submitted by: Alexander Egorenkov MFC after: 3 days Modified: head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Mon Jan 25 12:05:51 2010 (r202966) +++ head/sys/net80211/ieee80211_sta.c Mon Jan 25 12:23:51 2010 (r202967) @@ -759,7 +759,7 @@ sta_input(struct ieee80211_node *ni, str /* copy to listener after decrypt */ if (ieee80211_radiotap_active_vap(vap)) - ieee80211_radiotap_tx(vap, m); + ieee80211_radiotap_rx(vap, m); need_tap = 0; /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 13:44:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC45E106568B; Mon, 25 Jan 2010 13:44:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7DCDB8FC14; Mon, 25 Jan 2010 13:44:50 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2F83C46B32; Mon, 25 Jan 2010 08:44:50 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 4E3828A027; Mon, 25 Jan 2010 08:44:49 -0500 (EST) From: John Baldwin To: Alan Cox Date: Mon, 25 Jan 2010 07:57:49 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <201001231842.o0NIgSa5086957@svn.freebsd.org> In-Reply-To: <201001231842.o0NIgSa5086957@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001250757.49334.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 25 Jan 2010 08:44:49 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202894 - in head/sys/i386: i386 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 13:44:50 -0000 On Saturday 23 January 2010 1:42:28 pm Alan Cox wrote: > Author: alc > Date: Sat Jan 23 18:42:28 2010 > New Revision: 202894 > URL: http://svn.freebsd.org/changeset/base/202894 > > Log: > Handle a race between pmap_kextract() and pmap_promote_pde(). This race is > known to cause a kernel crash in ZFS on i386 when superpage promotion is > enabled. > > Tested by: netchild > MFC after: 1 week Yay! Should we enable pg_ps by default on i386 now? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 14:17:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4F3E106568F; Mon, 25 Jan 2010 14:17:13 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C99BF8FC12; Mon, 25 Jan 2010 14:17:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PEHDxU086804; Mon, 25 Jan 2010 14:17:13 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PEHDCU086801; Mon, 25 Jan 2010 14:17:13 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201001251417.o0PEHDCU086801@svn.freebsd.org> From: Marko Zec Date: Mon, 25 Jan 2010 14:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202968 - stable/8/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 14:17:14 -0000 Author: zec Date: Mon Jan 25 14:17:13 2010 New Revision: 202968 URL: http://svn.freebsd.org/changeset/base/202968 Log: MFC r201895: Reduce recursions on curvnet and thus spamming the console with warning messages for kernels built with options VIMAGE and VNET_DEBUG enabled. Reviewed by: bz Modified: stable/8/sys/nfsclient/nfs_vfsops.c stable/8/sys/nfsclient/nfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsclient/nfs_vfsops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vfsops.c Mon Jan 25 12:23:51 2010 (r202967) +++ stable/8/sys/nfsclient/nfs_vfsops.c Mon Jan 25 14:17:13 2010 (r202968) @@ -423,14 +423,18 @@ nfs_mountroot(struct mount *mp) char buf[128]; char *cp; + CURVNET_SET(TD_TO_VNET(td)); + #if defined(BOOTP_NFSROOT) && defined(BOOTP) bootpc_init(); /* use bootp to get nfs_diskless filled in */ #elif defined(NFS_ROOT) nfs_setup_diskless(); #endif - if (nfs_diskless_valid == 0) + if (nfs_diskless_valid == 0) { + CURVNET_RESTORE(); return (-1); + } if (nfs_diskless_valid == 1) nfs_convert_diskless(); @@ -516,6 +520,7 @@ nfs_mountroot(struct mount *mp) nd->root_args.hostname = buf; if ((error = nfs_mountdiskless(buf, &nd->root_saddr, &nd->root_args, td, &vp, mp)) != 0) { + CURVNET_RESTORE(); return (error); } @@ -529,6 +534,7 @@ nfs_mountroot(struct mount *mp) sizeof (prison0.pr_hostname)); mtx_unlock(&prison0.pr_mtx); inittodr(ntohl(nd->root_time)); + CURVNET_RESTORE(); return (0); } @@ -827,8 +833,6 @@ nfs_mount(struct mount *mp) has_fh_opt = 0; has_hostname_opt = 0; - CURVNET_SET(CRED_TO_VNET(curthread->td_ucred)); - if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; goto out; @@ -1128,7 +1132,6 @@ out: mp->mnt_kern_flag |= (MNTK_MPSAFE|MNTK_LOOKUP_SHARED); MNT_IUNLOCK(mp); } - CURVNET_RESTORE(); return (error); } Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Mon Jan 25 12:23:51 2010 (r202967) +++ stable/8/sys/nfsclient/nfs_vnops.c Mon Jan 25 14:17:13 2010 (r202968) @@ -1555,19 +1555,15 @@ nfs_create(struct vop_create_args *ap) struct vattr vattr; int v3 = NFS_ISV3(dvp); - CURVNET_SET(CRED_TO_VNET(curthread->td_ucred)); - /* * Oops, not for me.. */ if (vap->va_type == VSOCK) { error = nfs_mknodrpc(dvp, ap->a_vpp, cnp, vap); - CURVNET_RESTORE(); return (error); } if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0) { - CURVNET_RESTORE(); return (error); } if (vap->va_vaflags & VA_EXCLUSIVE) @@ -1665,7 +1661,6 @@ nfsmout: KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(dvp); } mtx_unlock(&(VTONFS(dvp))->n_mtx); - CURVNET_RESTORE(); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 14:17:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E532A10656A4; Mon, 25 Jan 2010 14:17:36 +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 D4D9E8FC1B; Mon, 25 Jan 2010 14:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PEHaec086940; Mon, 25 Jan 2010 14:17:36 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PEHaKT086938; Mon, 25 Jan 2010 14:17:36 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001251417.o0PEHaKT086938@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 25 Jan 2010 14:17: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: r202969 - head/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 14:17:37 -0000 Author: ru Date: Mon Jan 25 14:17:36 2010 New Revision: 202969 URL: http://svn.freebsd.org/changeset/base/202969 Log: Actualize. Modified: head/tools/make_libdeps.sh Modified: head/tools/make_libdeps.sh ============================================================================== --- head/tools/make_libdeps.sh Mon Jan 25 14:17:13 2010 (r202968) +++ head/tools/make_libdeps.sh Mon Jan 25 14:17:36 2010 (r202969) @@ -47,9 +47,12 @@ sed -E -e's; ;! ;g' -e's;$;!;' -e's;-lbsdxml!;lib/libexpat;g' + -e's;-lpthread!;lib/libthr;g' -e's;-lm!;lib/msun;g' - -e's;-l(supc\+\+)!;gnu/lib/lib\1;g' - -e's;-l(asn1|krb5|roken)!;kerberos5/lib/lib\1;g' + -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g' + -e's;-l(gcc)!;gnu/lib/lib\1;g' + -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g' + -e's;-l(asn1|heimntlm|hx509|krb5|roken)!;kerberos5/lib/lib\1;g' -e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g' -e's;-l([^!]+)!;lib/lib\1;g' " From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 15:50:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAA4E1065672; Mon, 25 Jan 2010 15:50:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9936E8FC1E; Mon, 25 Jan 2010 15:50:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PFoqOq007669; Mon, 25 Jan 2010 15:50:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PFoqlb007665; Mon, 25 Jan 2010 15:50:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001251550.o0PFoqlb007665@svn.freebsd.org> From: John Baldwin Date: Mon, 25 Jan 2010 15:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202970 - in stable/7/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 15:50:52 -0000 Author: jhb Date: Mon Jan 25 15:50:52 2010 New Revision: 202970 URL: http://svn.freebsd.org/changeset/base/202970 Log: MFC 190239: In general, the kernel virtual address of the pml4 page table page that is stored in the pmap is from the direct map region. The two exceptions have been the kernel pmap and the swapper's pmap. These pmaps have used a kernel virtual address established by pmap_bootstrap() for their shared pml4 page table page. However, there is no reason not to use the direct map for these pmaps as well. Approved by: re (kib) Modified: stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/amd64/vm_machdep.c stable/7/sys/amd64/include/pmap.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Mon Jan 25 14:17:36 2010 (r202969) +++ stable/7/sys/amd64/amd64/pmap.c Mon Jan 25 15:50:52 2010 (r202970) @@ -528,7 +528,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) * Initialize the kernel pmap (which is statically allocated). */ PMAP_LOCK_INIT(kernel_pmap); - kernel_pmap->pm_pml4 = (pdp_entry_t *) (KERNBASE + KPML4phys); + kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); kernel_pmap->pm_root = NULL; kernel_pmap->pm_active = -1; /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); @@ -1351,7 +1351,7 @@ pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); - pmap->pm_pml4 = (pml4_entry_t *)(KERNBASE + KPML4phys); + pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); pmap->pm_root = NULL; pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvchunk); @@ -4569,7 +4569,7 @@ if (oldpmap) /* XXX FIXME */ oldpmap->pm_active &= ~PCPU_GET(cpumask); pmap->pm_active |= PCPU_GET(cpumask); #endif - cr3 = vtophys(pmap->pm_pml4); + cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4); td->td_pcb->pcb_cr3 = cr3; load_cr3(cr3); critical_exit(); Modified: stable/7/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/vm_machdep.c Mon Jan 25 14:17:36 2010 (r202969) +++ stable/7/sys/amd64/amd64/vm_machdep.c Mon Jan 25 15:50:52 2010 (r202970) @@ -109,6 +109,7 @@ cpu_fork(td1, p2, td2, flags) register struct proc *p1; struct pcb *pcb2; struct mdproc *mdp2; + pmap_t pmap2; p1 = td1->td_proc; if ((flags & RFPROC) == 0) @@ -156,7 +157,8 @@ cpu_fork(td1, p2, td2, flags) * Set registers for trampoline to user mode. Leave space for the * return address on stack. These are the kernel mode register values. */ - pcb2->pcb_cr3 = vtophys(vmspace_pmap(p2->p_vmspace)->pm_pml4); + pmap2 = vmspace_pmap(p2->p_vmspace); + pcb2->pcb_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap2->pm_pml4); pcb2->pcb_r12 = (register_t)fork_return; /* fork_trampoline argument */ pcb2->pcb_rbp = 0; pcb2->pcb_rsp = (register_t)td2->td_frame - sizeof(void *); Modified: stable/7/sys/amd64/include/pmap.h ============================================================================== --- stable/7/sys/amd64/include/pmap.h Mon Jan 25 14:17:36 2010 (r202969) +++ stable/7/sys/amd64/include/pmap.h Mon Jan 25 15:50:52 2010 (r202970) @@ -238,6 +238,10 @@ struct md_page { TAILQ_HEAD(,pv_entry) pv_list; }; +/* + * The kernel virtual address (KVA) of the level 4 page table page is always + * within the direct map (DMAP) region. + */ struct pmap { struct mtx pm_mtx; pml4_entry_t *pm_pml4; /* KVA of level 4 page table */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 16:09:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F94F106566B; Mon, 25 Jan 2010 16:09:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F2848FC17; Mon, 25 Jan 2010 16:09:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PG9pGj011911; Mon, 25 Jan 2010 16:09:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PG9p19011909; Mon, 25 Jan 2010 16:09:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001251609.o0PG9p19011909@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 25 Jan 2010 16:09: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: r202971 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 16:09:51 -0000 Author: trasz Date: Mon Jan 25 16:09:50 2010 New Revision: 202971 URL: http://svn.freebsd.org/changeset/base/202971 Log: Return proper error code. Found with: clang Modified: head/sys/ufs/ufs/ufs_acl.c Modified: head/sys/ufs/ufs/ufs_acl.c ============================================================================== --- head/sys/ufs/ufs/ufs_acl.c Mon Jan 25 15:50:52 2010 (r202970) +++ head/sys/ufs/ufs/ufs_acl.c Mon Jan 25 16:09:50 2010 (r202971) @@ -465,7 +465,7 @@ ufs_setacl_nfs4(struct vop_setacl_args * error = ufs_setacl_nfs4_internal(ap->a_vp, ap->a_aclp, ap->a_td); - return (0); + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 16:10:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2B191065670; Mon, 25 Jan 2010 16:10:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1F9D8FC20; Mon, 25 Jan 2010 16:10:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PGAM0d012086; Mon, 25 Jan 2010 16:10:22 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PGAM6T012084; Mon, 25 Jan 2010 16:10:22 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001251610.o0PGAM6T012084@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 25 Jan 2010 16:10:22 +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: r202972 - head/sys/geom/mountver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 16:10:23 -0000 Author: trasz Date: Mon Jan 25 16:10:22 2010 New Revision: 202972 URL: http://svn.freebsd.org/changeset/base/202972 Log: Remove unused variable. Found with: clang Modified: head/sys/geom/mountver/g_mountver.c Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Mon Jan 25 16:09:50 2010 (r202971) +++ head/sys/geom/mountver/g_mountver.c Mon Jan 25 16:10:22 2010 (r202972) @@ -81,7 +81,6 @@ struct g_class g_mountver_class = { static void g_mountver_done(struct bio *bp) { - struct g_mountver_softc *sc; struct g_geom *gp; struct bio *pbp; @@ -97,7 +96,6 @@ g_mountver_done(struct bio *bp) * that failed with ENXIO, in order to send them later. */ gp = bp->bio_from->geom; - sc = gp->softc; pbp = bp->bio_parent; KASSERT(pbp->bio_to == LIST_FIRST(&gp->provider), From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 16:44:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A4981065693; Mon, 25 Jan 2010 16:44:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0F48FC13; Mon, 25 Jan 2010 16:44:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PGiJi7019564; Mon, 25 Jan 2010 16:44:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PGiJJ0019563; Mon, 25 Jan 2010 16:44:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001251644.o0PGiJJ0019563@svn.freebsd.org> From: Warner Losh Date: Mon, 25 Jan 2010 16:44: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: r202973 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 16:44:19 -0000 Author: imp Date: Mon Jan 25 16:44:18 2010 New Revision: 202973 URL: http://svn.freebsd.org/changeset/base/202973 Log: Comment out the led wheel code for the moment. Likely it shouldn't even be here in the first place, but it is cool to see FreeBSD scrolling on the LED pannel of the octeon board when we're running... Modified: head/sys/mips/mips/tick.c Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Mon Jan 25 16:10:22 2010 (r202972) +++ head/sys/mips/mips/tick.c Mon Jan 25 16:44:18 2010 (r202973) @@ -240,10 +240,10 @@ DELAY(int n) } } -#ifdef TARGET_OCTEON +#if 0 /* TARGET_OCTEON */ int64_t wheel_run = 0; -void octeon_led_run_wheel(void); +void octeon_led_run_wheel(); #endif /* @@ -295,7 +295,7 @@ clock_intr(void *arg) profclock(USERMODE(tf->sr), tf->pc); } critical_exit(); -#ifdef TARGET_OCTEON +#if 0 /* TARGET_OCTEON */ /* Run the FreeBSD display once every hz ticks */ wheel_run += cycles_per_tick; if (wheel_run >= cycles_per_sec) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 16:55:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DA78106566B; Mon, 25 Jan 2010 16:55:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1E38FC19; Mon, 25 Jan 2010 16:55:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PGtUAB022138; Mon, 25 Jan 2010 16:55:30 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PGtUmj022135; Mon, 25 Jan 2010 16:55:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001251655.o0PGtUmj022135@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 25 Jan 2010 16:55:30 +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: r202974 - head/sys/geom/vinum X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 16:55:30 -0000 Author: trasz Date: Mon Jan 25 16:55:30 2010 New Revision: 202974 URL: http://svn.freebsd.org/changeset/base/202974 Log: Remove some pointless variable assignments. Found with: clang Modified: head/sys/geom/vinum/geom_vinum.c head/sys/geom/vinum/geom_vinum_create.c Modified: head/sys/geom/vinum/geom_vinum.c ============================================================================== --- head/sys/geom/vinum/geom_vinum.c Mon Jan 25 16:44:18 2010 (r202973) +++ head/sys/geom/vinum/geom_vinum.c Mon Jan 25 16:55:30 2010 (r202974) @@ -130,7 +130,6 @@ gv_access(struct g_provider *pp, int dr, struct gv_drive *d, *d2; int error; - error = ENXIO; gp = pp->geom; sc = gp->softc; /* Modified: head/sys/geom/vinum/geom_vinum_create.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_create.c Mon Jan 25 16:44:18 2010 (r202973) +++ head/sys/geom/vinum/geom_vinum_create.c Mon Jan 25 16:55:30 2010 (r202974) @@ -314,7 +314,7 @@ gv_concat(struct g_geom *gp, struct gctl struct gv_plex *p; struct gv_softc *sc; char *drive, buf[30], *vol; - int *drives, *flags, dcount; + int *drives, dcount; sc = gp->softc; dcount = 0; @@ -324,7 +324,6 @@ gv_concat(struct g_geom *gp, struct gctl return; } - flags = gctl_get_paraml(req, "flags", sizeof(*flags)); drives = gctl_get_paraml(req, "drives", sizeof(*drives)); if (drives == NULL) { @@ -475,7 +474,6 @@ gv_raid5(struct g_geom *gp, struct gctl_ char *vol, *drive, buf[30]; off_t *stripesize; - dcount = 0; sc = gp->softc; vol = gctl_get_param(req, "name", NULL); From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 16:55:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC4D7106566C; Mon, 25 Jan 2010 16:55:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC5EE8FC16; Mon, 25 Jan 2010 16:55:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PGtVLB022173; Mon, 25 Jan 2010 16:55:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PGtVY8022171; Mon, 25 Jan 2010 16:55:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001251655.o0PGtVY8022171@svn.freebsd.org> From: Warner Losh Date: Mon, 25 Jan 2010 16:55: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: r202975 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 16:55:31 -0000 Author: imp Date: Mon Jan 25 16:55:31 2010 New Revision: 202975 URL: http://svn.freebsd.org/changeset/base/202975 Log: Fix device name for root.... Indent rgmii correctly. Remove stale comments. Modified: head/sys/mips/conf/OCTEON1-32 Modified: head/sys/mips/conf/OCTEON1-32 ============================================================================== --- head/sys/mips/conf/OCTEON1-32 Mon Jan 25 16:55:30 2010 (r202974) +++ head/sys/mips/conf/OCTEON1-32 Mon Jan 25 16:55:31 2010 (r202975) @@ -34,8 +34,6 @@ hints "OCTEON1.hints" #Default places makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -#XXXimp: Need to make work with 64-bit too -#options ISA_MIPS64 options ISA_MIPS32 options DDB @@ -69,14 +67,14 @@ device ether device md device uart nodevice uart_ns8250 -device rgmii +device rgmii #options VERBOSE_SYSINIT # # Use the following for Compact Flash file-system device cf -options ROOTDEVNAME = \"ufs:cf0s2\" # Unmask if compact flash is needed as RFS +options ROOTDEVNAME = \"ufs:cf0s2a\" # Unmask if compact flash is needed as RFS # # Use the following for RFS in mem-device From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 16:58:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2B5510656A6; Mon, 25 Jan 2010 16:58:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C24E88FC1E; Mon, 25 Jan 2010 16:58:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PGwwVg022974; Mon, 25 Jan 2010 16:58:58 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PGwwfX022972; Mon, 25 Jan 2010 16:58:58 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001251658.o0PGwwfX022972@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 25 Jan 2010 16:58:58 +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: r202976 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 16:58:58 -0000 Author: trasz Date: Mon Jan 25 16:58:58 2010 New Revision: 202976 URL: http://svn.freebsd.org/changeset/base/202976 Log: Remove pointless assignment. Found with: clang Modified: head/sys/geom/eli/g_eli_key.c Modified: head/sys/geom/eli/g_eli_key.c ============================================================================== --- head/sys/geom/eli/g_eli_key.c Mon Jan 25 16:55:31 2010 (r202975) +++ head/sys/geom/eli/g_eli_key.c Mon Jan 25 16:58:58 2010 (r202976) @@ -120,7 +120,6 @@ g_eli_mkey_decrypt(const struct g_eli_me g_eli_crypto_hmac(key, G_ELI_USERKEYLEN, "\x01", 1, enckey, 0); mmkey = md->md_mkeys; - nkey = 0; for (nkey = 0; nkey < G_ELI_MAXMKEYS; nkey++, mmkey += G_ELI_MKEYLEN) { bit = (1 << nkey); if (!(md->md_keys & bit)) From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 17:00:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 736C810656A7; Mon, 25 Jan 2010 17:00:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634808FC1C; Mon, 25 Jan 2010 17:00:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PH0Lrm023329; Mon, 25 Jan 2010 17:00:21 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PH0LkC023326; Mon, 25 Jan 2010 17:00:21 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001251700.o0PH0LkC023326@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 25 Jan 2010 17:00:21 +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: r202977 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 17:00:21 -0000 Author: trasz Date: Mon Jan 25 17:00:21 2010 New Revision: 202977 URL: http://svn.freebsd.org/changeset/base/202977 Log: Remove unneeded variables. Found with: clang Modified: head/sys/geom/part/g_part_bsd.c head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_bsd.c ============================================================================== --- head/sys/geom/part/g_part_bsd.c Mon Jan 25 16:58:58 2010 (r202976) +++ head/sys/geom/part/g_part_bsd.c Mon Jan 25 17:00:21 2010 (r202977) @@ -186,7 +186,6 @@ g_part_bsd_bootcode(struct g_part_table static int g_part_bsd_create(struct g_part_table *basetable, struct g_part_parms *gpp) { - struct g_consumer *cp; struct g_provider *pp; struct g_part_entry *baseentry; struct g_part_bsd_entry *entry; @@ -195,7 +194,6 @@ g_part_bsd_create(struct g_part_table *b uint32_t msize, ncyls, secpercyl; pp = gpp->gpp_provider; - cp = LIST_FIRST(&pp->consumers); if (pp->sectorsize < sizeof(struct disklabel)) return (ENOSPC); Modified: head/sys/geom/part/g_part_vtoc8.c ============================================================================== --- head/sys/geom/part/g_part_vtoc8.c Mon Jan 25 16:58:58 2010 (r202976) +++ head/sys/geom/part/g_part_vtoc8.c Mon Jan 25 17:00:21 2010 (r202977) @@ -177,7 +177,6 @@ g_part_vtoc8_add(struct g_part_table *ba static int g_part_vtoc8_create(struct g_part_table *basetable, struct g_part_parms *gpp) { - struct g_consumer *cp; struct g_provider *pp; struct g_part_entry *entry; struct g_part_vtoc8_table *table; @@ -185,7 +184,6 @@ g_part_vtoc8_create(struct g_part_table uint32_t acyls, ncyls, pcyls; pp = gpp->gpp_provider; - cp = LIST_FIRST(&pp->consumers); if (pp->sectorsize < sizeof(struct vtoc8)) return (ENOSPC); From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 17:06:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FC481065679; Mon, 25 Jan 2010 17:06:34 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id E1EF08FC14; Mon, 25 Jan 2010 17:06:33 +0000 (UTC) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 62D532C2D89; Mon, 25 Jan 2010 11:06:33 -0600 (CST) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id U5v+hefG4TDH; Mon, 25 Jan 2010 11:06:25 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 4D5F62C2E1E; Mon, 25 Jan 2010 11:06:25 -0600 (CST) Message-ID: <4B5DCF90.9030007@cs.rice.edu> Date: Mon, 25 Jan 2010 11:06:24 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.23 (X11/20100102) MIME-Version: 1.0 To: John Baldwin References: <201001231842.o0NIgSa5086957@svn.freebsd.org> <201001250757.49334.jhb@freebsd.org> In-Reply-To: <201001250757.49334.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202894 - in head/sys/i386: i386 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 17:06:34 -0000 John Baldwin wrote: > On Saturday 23 January 2010 1:42:28 pm Alan Cox wrote: > >> Author: alc >> Date: Sat Jan 23 18:42:28 2010 >> New Revision: 202894 >> URL: http://svn.freebsd.org/changeset/base/202894 >> >> Log: >> Handle a race between pmap_kextract() and pmap_promote_pde(). This race is >> known to cause a kernel crash in ZFS on i386 when superpage promotion is >> enabled. >> >> Tested by: netchild >> MFC after: 1 week >> > > Yay! Should we enable pg_ps by default on i386 now? > > Yes, I think so. Alan From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 17:51:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97FF0106566C; Mon, 25 Jan 2010 17:51:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 876258FC08; Mon, 25 Jan 2010 17:51:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PHpYlN034628; Mon, 25 Jan 2010 17:51:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PHpYID034626; Mon, 25 Jan 2010 17:51:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001251751.o0PHpYID034626@svn.freebsd.org> From: John Baldwin Date: Mon, 25 Jan 2010 17:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202978 - stable/7/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 17:51:34 -0000 Author: jhb Date: Mon Jan 25 17:51:34 2010 New Revision: 202978 URL: http://svn.freebsd.org/changeset/base/202978 Log: MFC 193842: Eliminate an unnecessary restriction on the vm object type from vm_map_pmap_enter(). The immediate effect of this change is that automatic prefaulting by mmap() for small mappings is performed on POSIX shared memory objects just the same as it is on ordinary files. Approved by: re (kib) Modified: stable/7/sys/vm/vm_map.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/vm/vm_map.c ============================================================================== --- stable/7/sys/vm/vm_map.c Mon Jan 25 17:00:21 2010 (r202977) +++ stable/7/sys/vm/vm_map.c Mon Jan 25 17:51:34 2010 (r202978) @@ -1485,11 +1485,9 @@ vm_map_pmap_enter(vm_map_t map, vm_offse psize = atop(size); - if (object->type != OBJT_VNODE || - ((flags & MAP_PREFAULT_PARTIAL) && (psize > MAX_INIT_PT) && - (object->resident_page_count > MAX_INIT_PT))) { + if ((flags & MAP_PREFAULT_PARTIAL) && psize > MAX_INIT_PT && + object->resident_page_count > MAX_INIT_PT) goto unlock_return; - } if (psize + pindex > object->size) { if (object->size < pindex) From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 18:15:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 713F41065672; Mon, 25 Jan 2010 18:15:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 605B48FC08; Mon, 25 Jan 2010 18:15:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PIFAsM039858; Mon, 25 Jan 2010 18:15:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PIFAMg039857; Mon, 25 Jan 2010 18:15:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001251815.o0PIFAMg039857@svn.freebsd.org> From: John Baldwin Date: Mon, 25 Jan 2010 18:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202979 - stable/7/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 18:15:10 -0000 Author: jhb Date: Mon Jan 25 18:15:10 2010 New Revision: 202979 URL: http://svn.freebsd.org/changeset/base/202979 Log: MFC 194607: Implement a mechanism within vm_phys_alloc_contig() to defer all necessary calls to vdrop() until after the free page queues lock is released. This eliminates repeatedly releasing and reacquiring the free page queues lock each time the last cached page is reclaimed from a vnode-backed object. Approved by: re (kib) Modified: stable/7/sys/vm/vm_phys.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/vm/vm_phys.c ============================================================================== --- stable/7/sys/vm/vm_phys.c Mon Jan 25 17:51:34 2010 (r202978) +++ stable/7/sys/vm/vm_phys.c Mon Jan 25 18:15:10 2010 (r202979) @@ -594,7 +594,7 @@ vm_phys_alloc_contig(unsigned long npage struct vm_phys_seg *seg; vm_object_t m_object; vm_paddr_t pa, pa_last, size; - vm_page_t m, m_ret; + vm_page_t deferred_vdrop_list, m, m_ret; int flind, i, oind, order, pind; size = npages << PAGE_SHIFT; @@ -604,6 +604,7 @@ vm_phys_alloc_contig(unsigned long npage ("vm_phys_alloc_contig: alignment must be a power of 2")); KASSERT((boundary & (boundary - 1)) == 0, ("vm_phys_alloc_contig: boundary must be a power of 2")); + deferred_vdrop_list = NULL; /* Compute the queue that is the best fit for npages. */ for (order = 0; (1 << order) < npages; order++); mtx_lock(&vm_page_queue_free_mtx); @@ -700,10 +701,23 @@ done: KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, ("vm_phys_alloc_contig: page %p has unexpected memattr %d", m, pmap_page_get_memattr(m))); - m_object = m->object; if ((m->flags & PG_CACHED) != 0) { m->valid = 0; + m_object = m->object; vm_page_cache_remove(m); + if (m_object->type == OBJT_VNODE && + m_object->cache == NULL) { + /* + * Enqueue the vnode for deferred vdrop(). + * + * Unmanaged pages don't use "pageq", so it + * can be safely abused to construct a short- + * lived queue of vnodes. + */ + m->pageq.tqe_prev = m_object->handle; + m->pageq.tqe_next = deferred_vdrop_list; + deferred_vdrop_list = m; + } } else { KASSERT(VM_PAGE_IS_FREE(m), ("vm_phys_alloc_contig: page %p is not free", m)); @@ -717,13 +731,6 @@ done: m->flags = PG_UNMANAGED | (m->flags & PG_ZERO); m->oflags = 0; /* Unmanaged pages don't use "act_count". */ - if (m_object != NULL && - m_object->type == OBJT_VNODE && - m_object->cache == NULL) { - mtx_unlock(&vm_page_queue_free_mtx); - vdrop(m_object->handle); - mtx_lock(&vm_page_queue_free_mtx); - } } for (; i < roundup2(npages, 1 << imin(oind, order)); i++) { m = &m_ret[i]; @@ -733,6 +740,10 @@ done: vm_phys_free_pages(m, 0); } mtx_unlock(&vm_page_queue_free_mtx); + while (deferred_vdrop_list != NULL) { + vdrop((struct vnode *)deferred_vdrop_list->pageq.tqe_prev); + deferred_vdrop_list = deferred_vdrop_list->pageq.tqe_next; + } return (m_ret); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 18:35:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CF971065692; Mon, 25 Jan 2010 18:35:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF1E8FC28; Mon, 25 Jan 2010 18:35:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PIZwJO044481; Mon, 25 Jan 2010 18:35:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PIZwOS044479; Mon, 25 Jan 2010 18:35:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001251835.o0PIZwOS044479@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 25 Jan 2010 18:35:58 +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: r202980 - head/contrib/smbfs/smbutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 18:35:59 -0000 Author: yongari Date: Mon Jan 25 18:35:58 2010 New Revision: 202980 URL: http://svn.freebsd.org/changeset/base/202980 Log: shi1_remark is in little endian format, convert it to host ordering. Also remove upper 16bits which always seem to be 0xFFFF. We don't allocate more than 64KB buffer anyway. This change make smbutil work on sparc64. Reviewed by: marius, bp Approved by: bp Modified: head/contrib/smbfs/smbutil/view.c Modified: head/contrib/smbfs/smbutil/view.c ============================================================================== --- head/contrib/smbfs/smbutil/view.c Mon Jan 25 18:15:10 2010 (r202979) +++ head/contrib/smbfs/smbutil/view.c Mon Jan 25 18:35:58 2010 (r202980) @@ -69,6 +69,7 @@ cmd_view(int argc, char *argv[]) struct smb_ctx sctx, *ctx = &sctx; struct smb_share_info_1 *rpbuf, *ep; char *cp; + u_int32_t remark; u_int16_t type; int error, opt, bufsize, i, entries, total; @@ -117,11 +118,13 @@ cmd_view(int argc, char *argv[]) } for (ep = rpbuf, i = 0; i < entries; i++, ep++) { type = le16toh(ep->shi1_type); + remark = le32toh(ep->shi1_remark); + remark &= 0xFFFF; - cp = (char*)rpbuf + ep->shi1_remark; + cp = (char*)rpbuf + remark; printf("%-12s %-10s %s\n", ep->shi1_netname, shtype[min(type, sizeof shtype / sizeof(char *) - 1)], - ep->shi1_remark ? nls_str_toloc(cp, cp) : ""); + remark ? nls_str_toloc(cp, cp) : ""); } printf("\n%d shares listed from %d available\n", entries, total); free(rpbuf); From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 18:50:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE9B010656A9; Mon, 25 Jan 2010 18:50:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EB1E8FC12; Mon, 25 Jan 2010 18:50:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PIowZF047800; Mon, 25 Jan 2010 18:50:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PIowFg047798; Mon, 25 Jan 2010 18:50:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001251850.o0PIowFg047798@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 25 Jan 2010 18:50:58 +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: r202981 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 18:50:58 -0000 Author: yongari Date: Mon Jan 25 18:50:58 2010 New Revision: 202981 URL: http://svn.freebsd.org/changeset/base/202981 Log: Build smbfs kernel module on sparc64. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jan 25 18:35:58 2010 (r202980) +++ head/sys/modules/Makefile Mon Jan 25 18:50:58 2010 (r202981) @@ -615,6 +615,7 @@ _igb= igb .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris .endif +_smbfs= smbfs _sound= sound .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 18:52:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E12106568B; Mon, 25 Jan 2010 18:52:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53B9A8FC13; Mon, 25 Jan 2010 18:52:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PIql0U048230; Mon, 25 Jan 2010 18:52:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PIqlm8048226; Mon, 25 Jan 2010 18:52:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001251852.o0PIqlm8048226@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 25 Jan 2010 18:52: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: r202982 - in head: lib usr.bin usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 18:52:47 -0000 Author: yongari Date: Mon Jan 25 18:52:47 2010 New Revision: 202982 URL: http://svn.freebsd.org/changeset/base/202982 Log: Connect smbfs related libraries and tool on sparc64. Reviewed by: marius Modified: head/lib/Makefile head/usr.bin/Makefile head/usr.sbin/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Jan 25 18:50:58 2010 (r202981) +++ head/lib/Makefile Mon Jan 25 18:52:47 2010 (r202982) @@ -119,6 +119,10 @@ _libvgl= libvgl _libsmb= libsmb .endif +.if ${MACHINE_ARCH} == "sparc64" +_libsmb= libsmb +.endif + .if ${MK_OPENSSL} != "no" _libmp= libmp .endif Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Jan 25 18:50:58 2010 (r202981) +++ head/usr.bin/Makefile Mon Jan 25 18:52:47 2010 (r202982) @@ -390,4 +390,8 @@ _smbutil= smbutil _smbutil= smbutil .endif +.if ${MACHINE_ARCH} == "sparc64" +_smbutil= smbutil +.endif + .include Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Mon Jan 25 18:50:58 2010 (r202981) +++ head/usr.sbin/Makefile Mon Jan 25 18:52:47 2010 (r202982) @@ -512,6 +512,7 @@ _ofwdump= ofwdump .if ${MACHINE_ARCH} == "sparc64" _eeprom= eeprom +_mount_smbfs= mount_smbfs _ofwdump= ofwdump .endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:01:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C7A1065698; Mon, 25 Jan 2010 19:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58ECD8FC20; Mon, 25 Jan 2010 19:01:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PJ1cti050222; Mon, 25 Jan 2010 19:01:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PJ1cgx050220; Mon, 25 Jan 2010 19:01:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001251901.o0PJ1cgx050220@svn.freebsd.org> From: Warner Losh Date: Mon, 25 Jan 2010 19:01:38 +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: r202983 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:01:38 -0000 Author: imp Date: Mon Jan 25 19:01:38 2010 New Revision: 202983 URL: http://svn.freebsd.org/changeset/base/202983 Log: Store the mutex in the correct location. Before, we were storing it in the pcb at the td_lock offset, rather than in the struct thread at the td_lock offset. And we were storing a pointer to the old thread rather than to the mutex. Why this didn't always kill us, I'll never know. Fix an obsolete comment and update the prototype in the comments. Also note what variables are in what registers since this function is a little complex... neel@ found this problem and proposed this fix. This cures a number of different problem reports out there, and gets us booting octeon to the login prompt... Submitted by: neel@ Reviewed by: rrs@, gonzo@ Modified: head/sys/mips/mips/swtch.S Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Mon Jan 25 18:52:47 2010 (r202982) +++ head/sys/mips/mips/swtch.S Mon Jan 25 19:01:38 2010 (r202983) @@ -282,9 +282,10 @@ NON_LEAF(mips_cpu_throw, STAND_FRAME_SIZ END(mips_cpu_throw) /* - *XXX Fixme: should be written to new interface that requires lock - * storage. We fake it for now. - * cpu_switch(struct thread *old, struct thread *new); + * cpu_switch(struct thread *old, struct thread *new, struct mutex *mtx); + * a0 - old + * a1 - new + * a2 - mtx * Find the highest priority process and resume it. */ NON_LEAF(cpu_switch, STAND_FRAME_SIZE, ra) @@ -323,7 +324,7 @@ getpc: * to be saved with the other registers do so here. */ - sw a3, TD_LOCK(a0) # Switchout td_lock + sw a2, TD_LOCK(a3) # Switchout td_lock mips_sw1: #if defined(SMP) && defined(SCHED_ULE) From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:25:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E3871065693; Mon, 25 Jan 2010 19:25:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1498C8FC19; Mon, 25 Jan 2010 19:25:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PJPLoe055567; Mon, 25 Jan 2010 19:25:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PJPLDl055565; Mon, 25 Jan 2010 19:25:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001251925.o0PJPLDl055565@svn.freebsd.org> From: Warner Losh Date: Mon, 25 Jan 2010 19:25:21 +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: r202984 - head/sys/mips/cavium/dev/rgmii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:25:22 -0000 Author: imp Date: Mon Jan 25 19:25:21 2010 New Revision: 202984 URL: http://svn.freebsd.org/changeset/base/202984 Log: Turn on debugging on the fpa unit. Fix some printfs that were only enabled for debugging. This should be turned off before we release, but we need it for the moment. Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Mon Jan 25 19:01:38 2010 (r202983) +++ head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Mon Jan 25 19:25:21 2010 (r202984) @@ -18,7 +18,7 @@ __FBSDID("$FreeBSD$"); #include "octeon_fpa.h" -//#define FPA_DEBUG 1 +#define FPA_DEBUG 1 /* * octeon_dump_fpa @@ -112,7 +112,7 @@ void octeon_enable_fpa (void) } -//#define FPA_DEBUG_TERSE 1 +#define FPA_DEBUG_TERSE 1 /* * octeon_fpa_fill_pool_mem @@ -165,13 +165,13 @@ void octeon_fpa_fill_pool_mem (u_int poo * already preallocated extra */ #ifdef FPA_DEBUG - printf(" %% Huge MemBlock 0x%X Bytes %u\n", memory, bytes); + printf(" %% Huge MemBlock %p Bytes %u\n", memory, bytes); #endif memory = (void *) OCTEON_ALIGN(memory); #ifdef FPA_DEBUG_TERSE - printf("FPA fill: %u Count: %u SizeBytes: %u SizeBytesAligned: %u 1st: 0x%X = %p\n", + printf("FPA fill: %u Count: %u SizeBytes: %u SizeBytesAligned: %u 1st: %p = 0x%X\n", pool, elem_num, elem_size_bytes, block_size, memory, (void *)OCTEON_PTR2PHYS(memory)); #endif @@ -180,7 +180,7 @@ void octeon_fpa_fill_pool_mem (u_int poo while (elem_num--) { #ifdef FPA_DEBUG if (((elems - elem_num) < 4) || (elem_num < 4)) - printf(" %% Block %d: 0x%X Phys 0x%X Bytes %u\n", block, memory, OCTEON_PTR2PHYS(memory), elem_size_bytes); + printf(" %% Block %d: %p Phys 0x%X Bytes %u\n", block, memory, OCTEON_PTR2PHYS(memory), elem_size_bytes); block++; #endif octeon_fpa_free(memory, pool, 0); From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:27:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E06921065670; Mon, 25 Jan 2010 19:27:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02AA8FC0C; Mon, 25 Jan 2010 19:27:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PJRKHb056046; Mon, 25 Jan 2010 19:27:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PJRKEU056043; Mon, 25 Jan 2010 19:27:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001251927.o0PJRKEU056043@svn.freebsd.org> From: Warner Losh Date: Mon, 25 Jan 2010 19:27:20 +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: r202985 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:27:21 -0000 Author: imp Date: Mon Jan 25 19:27:20 2010 New Revision: 202985 URL: http://svn.freebsd.org/changeset/base/202985 Log: Export knowledge of the special bus space we use for the console to obio. Take advantage of the fact that obio only really supports uart at the moment to use the uart bus tag always for IOPORT allocations. # this needs to be redone to conform to FreeBSD standards and allow for # additional drivers for SoC hardware to attach Modified: head/sys/mips/cavium/obio.c head/sys/mips/cavium/uart_cpu_octeonusart.c Modified: head/sys/mips/cavium/obio.c ============================================================================== --- head/sys/mips/cavium/obio.c Mon Jan 25 19:25:21 2010 (r202984) +++ head/sys/mips/cavium/obio.c Mon Jan 25 19:27:20 2010 (r202985) @@ -36,8 +36,8 @@ */ /* - * On-board device autoconfiguration support for Intel IQ80321 - * evaluation boards. + * On-board device autoconfiguration support for Cavium OCTEON 1 family of + * SoC devices. */ #include @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +extern struct bus_space octeon_uart_tag; + int obio_probe(device_t); int obio_attach(device_t); @@ -125,7 +127,7 @@ obio_alloc_resource(device_t bus, device return (NULL); case SYS_RES_IOPORT: rm = &sc->oba_rman; - bt = sc->oba_st; + bt = &octeon_uart_tag; bh = device_get_unit(child) ? OCTEON_MIO_UART1 : OCTEON_MIO_UART0; start = bh; Modified: head/sys/mips/cavium/uart_cpu_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 25 19:25:21 2010 (r202984) +++ head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 25 19:27:20 2010 (r202985) @@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$"); * 64-bit word bus that's on the octeon. We only support simple read/write * in this space. Everything else is undefined. */ - static uint8_t ou_bs_r_1(void *t, bus_space_handle_t handle, bus_size_t offset) { @@ -127,7 +126,7 @@ ou_bs_w_8(void *t, bus_space_handle_t bs oct_write64(bsh + (offset << 3), value); } -static struct bus_space octeon_uart_tag = { +struct bus_space octeon_uart_tag = { .bs_map = generic_bs_map, .bs_unmap = generic_bs_unmap, .bs_subregion = generic_bs_subregion, From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:29:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9169E1065692; Mon, 25 Jan 2010 19:29:41 +0000 (UTC) Date: Mon, 25 Jan 2010 19:29:41 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Message-ID: <20100125192941.GA9196@FreeBSD.org> References: <200911032022.nA3KM96H003434@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200911032022.nA3KM96H003434@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:29:41 -0000 On Tue, Nov 03, 2009 at 08:22:09PM +0000, Jung-uk Kim wrote: > Author: jkim > Date: Tue Nov 3 20:22:09 2009 > New Revision: 198858 > URL: http://svn.freebsd.org/changeset/base/198858 > > Log: > Fix VESA color palette corruption: > > - VBE 3.0 says palette format resets to 6-bit mode when video mode changes. > We simply set 8-bit mode when we switch modes if the adapter supports it. > - VBE 3.0 also says if the mode is not VGA compatible, we must use VBE > function to save/restore palette. Otherwise, VGA function may be used. > Thus, reinstate the save/load palette functions only for non-VGA compatible > modes regardless of its palette format. > - Let vesa(4) set VESA modes even if vga(4) claims to support it. > - Reset default palette if VESA pixel mode is set initially. > - Fix more style nits. > > Modified: > head/sys/dev/fb/vesa.c > head/sys/dev/syscons/syscons.c > head/sys/sys/fbio.h Apparently this revision broke logo screen saver w/ vesa.ko on i386 (it works, but image is significantly darker). Building vesa from earlier sources gives previously seen (i.e. correct) result. Could you take a look please? My gfx card is GF6600. Thanks. ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:36:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7349810656D5; Mon, 25 Jan 2010 19:36:49 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 623738FC0C; Mon, 25 Jan 2010 19:36:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PJanfN058152; Mon, 25 Jan 2010 19:36:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PJamD0058150; Mon, 25 Jan 2010 19:36:48 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001251936.o0PJamD0058150@svn.freebsd.org> From: Rui Paulo Date: Mon, 25 Jan 2010 19:36: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: r202986 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:36:49 -0000 Author: rpaulo Date: Mon Jan 25 19:36:48 2010 New Revision: 202986 URL: http://svn.freebsd.org/changeset/base/202986 Log: o add more notification strings in iwn_intr_str() o sync with OpenBSD code Submitted by: Bernhard Schmidt MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Jan 25 19:27:20 2010 (r202985) +++ head/sys/dev/iwn/if_iwn.c Mon Jan 25 19:36:48 2010 (r202986) @@ -1927,6 +1927,7 @@ iwn_rx_phy(struct iwn_softc *sc, struct struct iwn_rx_stat *stat = (struct iwn_rx_stat *)(desc + 1); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: received PHY stats\n", __func__); + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); /* Save RX statistics, they will be used on MPDU_RX_DONE. */ memcpy(&sc->last_rx_stat, stat, sizeof (*stat)); @@ -2140,6 +2141,7 @@ iwn5000_rx_calib_results(struct iwn_soft if (sc->sc_flags & IWN_FLAG_CALIB_DONE) return; + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); len = (le32toh(desc->len) & 0x3fff) - 4; switch (calib->code) { @@ -2202,6 +2204,7 @@ iwn_rx_statistics(struct iwn_softc *sc, (ic->ic_flags & IEEE80211_F_SCAN)) return; + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: cmd %d\n", __func__, desc->type); iwn_calib_reset(sc); /* Reset TX power calibration timeout. */ @@ -2253,6 +2256,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st stat->btkillcnt, stat->rate, le16toh(stat->duration), le32toh(stat->status)); + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); iwn_tx_done(sc, desc, stat->ackfailcnt, le32toh(stat->status) & 0xff); } @@ -2272,6 +2276,8 @@ iwn5000_tx_done(struct iwn_softc *sc, st /* Reset TX scheduler slot. */ iwn5000_reset_sched(sc, desc->qid & 0xf, desc->idx); #endif + + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); iwn_tx_done(sc, desc, stat->ackfailcnt, le16toh(stat->status) & 0xff); } @@ -2433,10 +2439,11 @@ iwn_notif_intr(struct iwn_softc *sc) { struct iwn_beacon_missed *miss = (struct iwn_beacon_missed *)(desc + 1); - int misses = le32toh(miss->consecutive); + int misses; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); + misses = le32toh(miss->consecutive); /* XXX not sure why we're notified w/ zero */ if (misses == 0) @@ -4372,7 +4379,7 @@ iwn_send_sensitivity(struct iwn_softc *s cmd.corr_barker = htole16(190); cmd.corr_barker_mrc = htole16(390); - DPRINTF(sc, IWN_DEBUG_RESET, + DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n", __func__, calib->ofdm_x1, calib->ofdm_mrc_x1, calib->ofdm_x4, calib->ofdm_mrc_x4, calib->cck_x4, @@ -6388,10 +6395,14 @@ iwn_intr_str(uint8_t cmd) case IWN_CMD_SET_LED: return "IWN_CMD_SET_LED"; case IWN5000_CMD_WIMAX_COEX: return "IWN5000_CMD_WIMAX_COEX"; case IWN5000_CMD_CALIB_CONFIG: return "IWN5000_CMD_CALIB_CONFIG"; + case IWN5000_CMD_CALIB_RESULT: return "IWN5000_CMD_CALIB_RESULT"; + case IWN5000_CMD_CALIB_COMPLETE: return "IWN5000_CMD_CALIB_COMPLETE"; case IWN_CMD_SET_POWER_MODE: return "IWN_CMD_SET_POWER_MODE"; case IWN_CMD_SCAN: return "IWN_CMD_SCAN"; + case IWN_CMD_SCAN_RESULTS: return "IWN_CMD_SCAN_RESULTS"; case IWN_CMD_TXPOWER: return "IWN_CMD_TXPOWER"; case IWN_CMD_TXPOWER_DBM: return "IWN_CMD_TXPOWER_DBM"; + case IWN5000_CMD_TX_ANT_CONFIG: return "IWN5000_CMD_TX_ANT_CONFIG"; case IWN_CMD_BT_COEX: return "IWN_CMD_BT_COEX"; case IWN_CMD_SET_CRITICAL_TEMP: return "IWN_CMD_SET_CRITICAL_TEMP"; case IWN_CMD_SET_SENSITIVITY: return "IWN_CMD_SET_SENSITIVITY"; Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Jan 25 19:27:20 2010 (r202985) +++ head/sys/dev/iwn/if_iwnreg.h Mon Jan 25 19:36:48 2010 (r202986) @@ -421,8 +421,11 @@ struct iwn_tx_cmd { #define IWN_CMD_SET_LED 72 #define IWN5000_CMD_WIMAX_COEX 90 #define IWN5000_CMD_CALIB_CONFIG 101 +#define IWN5000_CMD_CALIB_RESULT 102 +#define IWN5000_CMD_CALIB_COMPLETE 103 #define IWN_CMD_SET_POWER_MODE 119 #define IWN_CMD_SCAN 128 +#define IWN_CMD_SCAN_RESULTS 131 #define IWN_CMD_TXPOWER_DBM 149 #define IWN_CMD_TXPOWER 151 #define IWN5000_CMD_TX_ANT_CONFIG 152 From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:56:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA62E10656C5; Mon, 25 Jan 2010 19:56:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8B8F88FC0C; Mon, 25 Jan 2010 19:56:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3B8C346B89; Mon, 25 Jan 2010 14:56:46 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 72E748A026; Mon, 25 Jan 2010 14:56:45 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Mon, 25 Jan 2010 14:56:32 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <201001231554.o0NFsMbx049837@svn.freebsd.org> In-Reply-To: <201001231554.o0NFsMbx049837@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001251456.32459.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 25 Jan 2010 14:56:45 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202889 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:56:46 -0000 On Saturday 23 January 2010 10:54:22 am Attilio Rao wrote: > Author: attilio > Date: Sat Jan 23 15:54:21 2010 > New Revision: 202889 > URL: http://svn.freebsd.org/changeset/base/202889 > > Log: > - Fix a race in sched_switch() of sched_4bsd. > In the case of the thread being on a sleepqueue or a turnstile, the > sched_lock was acquired (without the aid of the td_lock interface) and > the td_lock was dropped. This was going to break locking rules on other > threads willing to access to the thread (via the td_lock interface) and > modify his flags (allowed as long as the container lock was different > by the one used in sched_switch). > In order to prevent this situation, while sched_lock is acquired there > the td_lock gets blocked. [0] > - Merge the ULE's internal function thread_block_switch() into the global > thread_lock_block() and make the former semantic as the default for > thread_lock_block(). This means that thread_lock_block() will not > disable interrupts when called (and consequently thread_unlock_block() > will not re-enabled them when called). This should be done manually > when necessary. > Note, however, that ULE's thread_unblock_switch() is not reaped > because it does reflect a difference in semantic due in ULE (the > td_lock may not be necessarilly still blocked_lock when calling this). > While asymmetric, it does describe a remarkable difference in semantic > that is good to keep in mind. Does this affect the various #ifdef's for handling the third argument to cpu_switch()? E.g. does 4BSD need to spin if td_lock is &blocked_lock? Also, BLOCK_SPIN() on x86 is non-optimal. It should not do cmpxchg in a loop. Instead, it should do cmp in a loop, and if the cmp succeeds, then try cmpxchg. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 20:51:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A5DE1065679; Mon, 25 Jan 2010 20:51:40 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5ECE88FC1F; Mon, 25 Jan 2010 20:51:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PKpeiZ074788; Mon, 25 Jan 2010 20:51:40 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PKpeFC074786; Mon, 25 Jan 2010 20:51:40 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201001252051.o0PKpeFC074786@svn.freebsd.org> From: Ivan Voras Date: Mon, 25 Jan 2010 20:51:40 +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: r202987 - head/sys/geom/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 20:51:40 -0000 Author: ivoras Date: Mon Jan 25 20:51:40 2010 New Revision: 202987 URL: http://svn.freebsd.org/changeset/base/202987 Log: Go through with write_metadata() non-error-handling and make it return "void". This is mostly to avoid dead variable assignment warning by LLVM. No functional change. Pointed out by: trasz Approved by: gnn (mentor) Modified: head/sys/geom/virstor/g_virstor.c Modified: head/sys/geom/virstor/g_virstor.c ============================================================================== --- head/sys/geom/virstor/g_virstor.c Mon Jan 25 19:36:48 2010 (r202986) +++ head/sys/geom/virstor/g_virstor.c Mon Jan 25 20:51:40 2010 (r202987) @@ -98,7 +98,7 @@ SYSCTL_UINT(_kern_geom_virstor, OID_AUTO "Minimum number of free components before issuing administrative warning"); static int read_metadata(struct g_consumer *, struct g_virstor_metadata *); -static int write_metadata(struct g_consumer *, struct g_virstor_metadata *); +static void write_metadata(struct g_consumer *, struct g_virstor_metadata *); static int clear_metadata(struct g_virstor_component *); static int add_provider_to_geom(struct g_virstor_softc *, struct g_provider *, struct g_virstor_metadata *); @@ -1002,8 +1002,13 @@ read_metadata(struct g_consumer *cp, str /** * Utility function: encode & write metadata. Assumes topology lock is * held. + * + * There is no useful way of recovering from errors in this function, + * not involving panicking the kernel. If the metadata cannot be written + * the most we can do is notify the operator and hope he spots it and + * replaces the broken drive. */ -static int +static void write_metadata(struct g_consumer *cp, struct g_virstor_metadata *md) { struct g_provider *pp; @@ -1015,8 +1020,11 @@ write_metadata(struct g_consumer *cp, st LOG_MSG(LVL_DEBUG, "Writing metadata on %s", cp->provider->name); g_topology_assert(); error = g_access(cp, 0, 1, 0); - if (error != 0) - return (error); + if (error != 0) { + LOG_MSG(LVL_ERROR, "g_access(0,1,0) failed for %s: %d", + cp->provider->name, error); + return; + } pp = cp->provider; buf = malloc(pp->sectorsize, M_GVIRSTOR, M_WAITOK); @@ -1026,9 +1034,11 @@ write_metadata(struct g_consumer *cp, st pp->sectorsize); g_topology_lock(); g_access(cp, 0, -1, 0); - free(buf, M_GVIRSTOR); - return (0); + + if (error != 0) + LOG_MSG(LVL_ERROR, "Error %d writing metadata to %s", + error, cp->provider->name); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 20:59:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71E91106568B; Mon, 25 Jan 2010 20:59:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613CD8FC12; Mon, 25 Jan 2010 20:59:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PKx4mf076456; Mon, 25 Jan 2010 20:59:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PKx4pn076454; Mon, 25 Jan 2010 20:59:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001252059.o0PKx4pn076454@svn.freebsd.org> From: Ed Maste Date: Mon, 25 Jan 2010 20:59: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: r202988 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 20:59:04 -0000 Author: emaste Date: Mon Jan 25 20:59:04 2010 New Revision: 202988 URL: http://svn.freebsd.org/changeset/base/202988 Log: Remove vestigial NetBSD compatibility shim. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Mon Jan 25 20:51:40 2010 (r202987) +++ head/etc/rc.subr Mon Jan 25 20:59:04 2010 (r202988) @@ -52,22 +52,12 @@ _rc_subr_loaded="YES" SYSCTL="/sbin/sysctl" SYSCTL_N="${SYSCTL} -n" -CMD_OSTYPE="${SYSCTL_N} kern.ostype" -OSTYPE=`${CMD_OSTYPE}` +SYSCTL_W="${SYSCTL}" ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" JID=`$PS -p $$ -o jid=` -case ${OSTYPE} in -FreeBSD) - SYSCTL_W="${SYSCTL}" - ;; -NetBSD) - SYSCTL_W="${SYSCTL} -w" - ;; -esac - # # functions # --------- From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 22:03:31 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 80EE41065679; Mon, 25 Jan 2010 22:03:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Alexey Dokuchaev Date: Mon, 25 Jan 2010 17:03:16 -0500 User-Agent: KMail/1.6.2 References: <200911032022.nA3KM96H003434@svn.freebsd.org> <20100125192941.GA9196@FreeBSD.org> In-Reply-To: <20100125192941.GA9196@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_mUhXLYAFO8xpZ8W" Message-Id: <201001251703.18130.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 22:03:31 -0000 --Boundary-00=_mUhXLYAFO8xpZ8W Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Monday 25 January 2010 02:29 pm, Alexey Dokuchaev wrote: > On Tue, Nov 03, 2009 at 08:22:09PM +0000, Jung-uk Kim wrote: > > Author: jkim > > Date: Tue Nov 3 20:22:09 2009 > > New Revision: 198858 > > URL: http://svn.freebsd.org/changeset/base/198858 > > > > Log: > > Fix VESA color palette corruption: > > > > - VBE 3.0 says palette format resets to 6-bit mode when video > > mode changes. We simply set 8-bit mode when we switch modes if > > the adapter supports it. - VBE 3.0 also says if the mode is not > > VGA compatible, we must use VBE function to save/restore palette. > > Otherwise, VGA function may be used. Thus, reinstate the > > save/load palette functions only for non-VGA compatible modes > > regardless of its palette format. > > - Let vesa(4) set VESA modes even if vga(4) claims to support > > it. - Reset default palette if VESA pixel mode is set initially. > > - Fix more style nits. > > > > Modified: > > head/sys/dev/fb/vesa.c > > head/sys/dev/syscons/syscons.c > > head/sys/sys/fbio.h > > Apparently this revision broke logo screen saver w/ vesa.ko on i386 > (it works, but image is significantly darker). Building vesa from > earlier sources gives previously seen (i.e. correct) result. Could > you take a look please? My gfx card is GF6600. Thanks. If your VESA BIOS is lying or ignorant about compatibility with VGA mode, you may see some images like that. Please try to avoid the mode, e.g., see the attached patch. Jung-uk Kim --Boundary-00=_mUhXLYAFO8xpZ8W Content-Type: text/plain; charset="iso-8859-1"; name="logo.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="logo.diff" --- sys/dev/syscons/logo/logo_saver.c 2009-11-03 19:27:43.000000000 -0500 +++ sys/dev/syscons/logo/logo_saver.c 2010-01-25 16:44:24.000000000 -0500 @@ -135,9 +135,11 @@ static int logo_init(video_adapter_t *adp) { video_info_t info; - - if (!vidd_get_info(adp, M_VESA_CG800x600, &info)) { - scrmode = M_VESA_CG800x600; + + if (!vidd_get_info(adp, M_VESA_CG640x480, &info)) { + scrmode = M_VESA_CG640x480; + } else if (!vidd_get_info(adp, M_VESA_CG640x400, &info)) { + scrmode = M_VESA_CG640x400; } else if (!vidd_get_info(adp, M_VGA_CG320, &info)) { scrmode = M_VGA_CG320; } else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) { --Boundary-00=_mUhXLYAFO8xpZ8W-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 23:37:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51C971065670; Mon, 25 Jan 2010 23:37:50 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C8138FC08; Mon, 25 Jan 2010 23:37:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PNboFo012280; Mon, 25 Jan 2010 23:37:50 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PNbobw012278; Mon, 25 Jan 2010 23:37:50 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001252337.o0PNbobw012278@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 25 Jan 2010 23:37:50 +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: r202992 - head/lib/libc/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 23:37:50 -0000 Author: gabor (doc,ports committer) Date: Mon Jan 25 23:37:49 2010 New Revision: 202992 URL: http://svn.freebsd.org/changeset/base/202992 Log: Cache failing and opened catalogs in catopen() and related functions. Continuous catopen() calls cause 4 failig stat(2) each, which means a lot of overhead. It is also a good idea to keep the opened catalogs in the memory to speed up further catopen() calls to the same catalog since these catalogs are not big at all. In this case, we count references and only free() the allocated space when the reference count reaches 0. The reads and writes to the cache are syncronized with an rwlock when these functions are called from a threaded program. Requested by: kib Approved by: delphij Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Mon Jan 25 23:30:53 2010 (r202991) +++ head/lib/libc/nls/msgcat.c Mon Jan 25 23:37:49 2010 (r202992) @@ -1,5 +1,6 @@ /*********************************************************** Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts. +Copyright 2010, Gabor Kovesdan All Rights Reserved @@ -39,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* for ntohl() */ @@ -47,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -57,10 +60,49 @@ __FBSDID("$FreeBSD$"); #define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L" +#define RLOCK(fail) { int ret; \ + if (__isthreaded && \ + ((ret = _pthread_rwlock_rdlock(&rwlock)) != 0)) { \ + errno = ret; \ + return (fail); \ + }} +#define WLOCK(fail) { int ret; \ + if (__isthreaded && \ + ((ret = _pthread_rwlock_wrlock(&rwlock)) != 0)) { \ + errno = ret; \ + return (fail); \ + }} +#define UNLOCK { if (__isthreaded) \ + _pthread_rwlock_unlock(&rwlock); } + #define NLERR ((nl_catd) -1) #define NLRETERR(errc) { errno = errc; return (NLERR); } +#define SAVEFAIL(n, e) { WLOCK(NLERR); \ + np = malloc(sizeof(struct catentry)); \ + if (np != NULL) { \ + np->name = strdup(n); \ + np->caterrno = e; \ + SLIST_INSERT_HEAD(&cache, np, list); \ + } \ + UNLOCK; \ + } + +static nl_catd load_msgcat(const char *, const char *, const char *); + +static pthread_rwlock_t rwlock; -static nl_catd load_msgcat(const char *); +struct catentry { + SLIST_ENTRY(catentry) list; + char *name; + char *path; + int caterrno; + nl_catd catd; + char *lang; + int refcount; +}; + +SLIST_HEAD(listhead, catentry) cache = + SLIST_HEAD_INITIALIZER(cache); nl_catd catopen(const char *name, int type) @@ -70,14 +112,14 @@ catopen(const char *name, int type) char *nlspath, *lang, *base, *cptr, *pathP, *tmpptr; char *cptr1, *plang, *pter, *pcode; struct stat sbuf; + struct catentry *np; if (name == NULL || *name == '\0') NLRETERR(EINVAL); - /* is it absolute path ? if yes, load immediately */ if (strchr(name, '/') != NULL) - return (load_msgcat(name)); - + lang = NULL; + else { if (type == NL_CAT_LOCALE) lang = setlocale(LC_MESSAGES, NULL); else @@ -88,6 +130,29 @@ catopen(const char *name, int type) (lang[1] == '\0' || (lang[1] == '.' && lang[2] == '\0'))) || strchr(lang, '/') != NULL) lang = "C"; + } + + /* Try to get it from the cache first */ + RLOCK(NLERR); + SLIST_FOREACH(np, &cache, list) { + if (strcmp(np->name, name) == 0) { + if (np->caterrno != 0) { + /* Found cached failing entry */ + UNLOCK; + NLRETERR(np->caterrno); + } else if (strcmp(np->lang, lang) == 0) { + /* Found cached successful entry */ + np->refcount++; + UNLOCK; + return (np->catd); + } + } + } + UNLOCK; + + /* is it absolute path ? if yes, load immediately */ + if (strchr(name, '/') != NULL) + return (load_msgcat(name, name, lang)); if ((plang = cptr1 = strdup(lang)) == NULL) return (NLERR); @@ -166,7 +231,7 @@ catopen(const char *name, int type) if (stat(path, &sbuf) == 0) { free(plang); free(base); - return (load_msgcat(path)); + return (load_msgcat(path, name, lang)); } } else { tmpptr = (char *)name; @@ -190,12 +255,12 @@ catgets(nl_catd catd, int set_id, int ms if (catd == NULL || catd == NLERR) { errno = EBADF; /* LINTED interface problem */ - return (char *) s; -} + return ((char *)s); + } - cat_hdr = (struct _nls_cat_hdr *)catd->__data; - set_hdr = (struct _nls_set_hdr *)(void *)((char *)catd->__data - + sizeof(struct _nls_cat_hdr)); + cat_hdr = (struct _nls_cat_hdr *)catd->__data; + set_hdr = (struct _nls_set_hdr *)(void *)((char *)catd->__data + + sizeof(struct _nls_cat_hdr)); /* binary search, see knuth algorithm b */ l = 0; @@ -228,7 +293,7 @@ catgets(nl_catd catd, int set_id, int ms } else { l = i + 1; } -} + } /* not found */ goto notfound; @@ -238,25 +303,41 @@ catgets(nl_catd catd, int set_id, int ms } else { l = i + 1; } -} + } notfound: /* not found */ errno = ENOMSG; /* LINTED interface problem */ - return (char *) s; + return ((char *)s); } int catclose(nl_catd catd) { + struct catentry *np; + if (catd == NULL || catd == NLERR) { errno = EBADF; return (-1); } + /* Remove from cache if not referenced any more */ + WLOCK(-1); + SLIST_FOREACH(np, &cache, list) { + if ((np->catd->__size == catd->__size) && + memcmp((const void *)np->catd, (const void *)catd, np->catd->__size) == 0) { + np->refcount--; + if (np->refcount == 0) { munmap(catd->__data, (size_t)catd->__size); free(catd); + SLIST_REMOVE(&cache, np, catentry, list); + free(np); + } + break; + } + } + UNLOCK; return (0); } @@ -265,19 +346,35 @@ catclose(nl_catd catd) */ static nl_catd -load_msgcat(const char *path) +load_msgcat(const char *path, const char *name, const char *lang) { struct stat st; nl_catd catd; + struct catentry *np; void *data; int fd; - /* XXX: path != NULL? */ + /* path/name will never be NULL here */ + + /* One more try in cache; if it was not found by name, + it might still be found by absolute path. */ + RLOCK(NLERR); + SLIST_FOREACH(np, &cache, list) { + if (strcmp(np->path, path) == 0) { + np->refcount++; + UNLOCK; + return (np->catd); + } + } + UNLOCK; - if ((fd = _open(path, O_RDONLY)) == -1) + if ((fd = _open(path, O_RDONLY)) == -1) { + SAVEFAIL(name, errno); return (NLERR); + } if (_fstat(fd, &st) != 0) { + SAVEFAIL(name, errno); _close(fd); return (NLERR); } @@ -286,22 +383,39 @@ load_msgcat(const char *path) (off_t)0); _close(fd); - if (data == MAP_FAILED) + if (data == MAP_FAILED) { + SAVEFAIL(name, errno); return (NLERR); + } if (ntohl((u_int32_t)((struct _nls_cat_hdr *)data)->__magic) != _NLS_MAGIC) { + SAVEFAIL(name, errno); munmap(data, (size_t)st.st_size); NLRETERR(EINVAL); } if ((catd = malloc(sizeof (*catd))) == NULL) { + SAVEFAIL(name, errno); munmap(data, (size_t)st.st_size); return (NLERR); } catd->__data = data; catd->__size = (int)st.st_size; + + /* Caching opened catalog */ + WLOCK(NLERR); + if ((np = malloc(sizeof(struct catentry))) != NULL) { + np->name = strdup(name); + np->path = strdup(path); + np->catd = catd; + np->lang = (lang == NULL) ? NULL : strdup(lang); + np->refcount = 1; + np->caterrno = 0; + SLIST_INSERT_HEAD(&cache, np, list); + } + UNLOCK; return (catd); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 23:44:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99FC3106566C; Mon, 25 Jan 2010 23:44:00 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4F08FC14; Mon, 25 Jan 2010 23:44:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PNi0w3013663; Mon, 25 Jan 2010 23:44:00 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PNi0Gh013661; Mon, 25 Jan 2010 23:44:00 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001252344.o0PNi0Gh013661@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 25 Jan 2010 23:44: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: r202993 - head/lib/libc/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 23:44:00 -0000 Author: gabor (doc,ports committer) Date: Mon Jan 25 23:44:00 2010 New Revision: 202993 URL: http://svn.freebsd.org/changeset/base/202993 Log: - style(9) Approved by: delphij Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Mon Jan 25 23:37:49 2010 (r202992) +++ head/lib/libc/nls/msgcat.c Mon Jan 25 23:44:00 2010 (r202993) @@ -107,11 +107,11 @@ SLIST_HEAD(listhead, catentry) cache = nl_catd catopen(const char *name, int type) { - int spcleft, saverr; - char path[PATH_MAX]; - char *nlspath, *lang, *base, *cptr, *pathP, *tmpptr; - char *cptr1, *plang, *pter, *pcode; - struct stat sbuf; + int spcleft, saverr; + char path[PATH_MAX]; + char *nlspath, *lang, *base, *cptr, *pathP, *tmpptr; + char *cptr1, *plang, *pter, *pcode; + struct stat sbuf; struct catentry *np; if (name == NULL || *name == '\0') @@ -120,16 +120,16 @@ catopen(const char *name, int type) if (strchr(name, '/') != NULL) lang = NULL; else { - if (type == NL_CAT_LOCALE) - lang = setlocale(LC_MESSAGES, NULL); - else - lang = getenv("LANG"); - - if (lang == NULL || *lang == '\0' || strlen(lang) > ENCODING_LEN || - (lang[0] == '.' && - (lang[1] == '\0' || (lang[1] == '.' && lang[2] == '\0'))) || - strchr(lang, '/') != NULL) - lang = "C"; + if (type == NL_CAT_LOCALE) + lang = setlocale(LC_MESSAGES, NULL); + else + lang = getenv("LANG"); + + if (lang == NULL || *lang == '\0' || strlen(lang) > ENCODING_LEN || + (lang[0] == '.' && + (lang[1] == '\0' || (lang[1] == '.' && lang[2] == '\0'))) || + strchr(lang, '/') != NULL) + lang = "C"; } /* Try to get it from the cache first */ @@ -247,10 +247,10 @@ catopen(const char *name, int type) char * catgets(nl_catd catd, int set_id, int msg_id, const char *s) { - struct _nls_cat_hdr *cat_hdr; - struct _nls_set_hdr *set_hdr; - struct _nls_msg_hdr *msg_hdr; - int l, u, i, r; + struct _nls_cat_hdr *cat_hdr; + struct _nls_set_hdr *set_hdr; + struct _nls_msg_hdr *msg_hdr; + int l, u, i, r; if (catd == NULL || catd == NLERR) { errno = EBADF; @@ -329,8 +329,8 @@ catclose(nl_catd catd) memcmp((const void *)np->catd, (const void *)catd, np->catd->__size) == 0) { np->refcount--; if (np->refcount == 0) { - munmap(catd->__data, (size_t)catd->__size); - free(catd); + munmap(catd->__data, (size_t)catd->__size); + free(catd); SLIST_REMOVE(&cache, np, catentry, list); free(np); } @@ -348,11 +348,11 @@ catclose(nl_catd catd) static nl_catd load_msgcat(const char *path, const char *name, const char *lang) { - struct stat st; - nl_catd catd; + struct stat st; + nl_catd catd; struct catentry *np; - void *data; - int fd; + void *data; + int fd; /* path/name will never be NULL here */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 23:48:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F651065679; Mon, 25 Jan 2010 23:48:48 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02D998FC20; Mon, 25 Jan 2010 23:48:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PNml3K014780; Mon, 25 Jan 2010 23:48:47 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PNmlnr014778; Mon, 25 Jan 2010 23:48:47 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201001252348.o0PNmlnr014778@svn.freebsd.org> From: Colin Percival Date: Mon, 25 Jan 2010 23:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202994 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 23:48:48 -0000 Author: cperciva Date: Mon Jan 25 23:48:47 2010 New Revision: 202994 URL: http://svn.freebsd.org/changeset/base/202994 Log: Add support for "at vp" lookups to namei. This functionality was added to HEAD in r185029; but this is an "inspired by" commit rather than a literal merge, since this region of code in HEAD has other non-MFCable changes. The namei lookups this unbreaks are required for ZFS extended attributes; prior to this commit, an attempt to look up (list, read, write, delete) extended attributes would be handled as an attempt to look up a file in the current directory if an extended attribute directory existed ("at vp" was mishandled as "right here"). Reviewed by: jhb Approved by: re (kib) Found by: Henrik Wiest & libarchive Modified: stable/7/sys/kern/vfs_lookup.c Modified: stable/7/sys/kern/vfs_lookup.c ============================================================================== --- stable/7/sys/kern/vfs_lookup.c Mon Jan 25 23:44:00 2010 (r202993) +++ stable/7/sys/kern/vfs_lookup.c Mon Jan 25 23:48:47 2010 (r202994) @@ -191,10 +191,26 @@ namei(struct nameidata *ndp) ndp->ni_rootdir = fdp->fd_rdir; ndp->ni_topdir = fdp->fd_jdir; - dp = fdp->fd_cdir; + if (ndp->ni_startdir != NULL) { + dp = ndp->ni_startdir; + FILEDESC_SUNLOCK(fdp); + if (dp->v_type != VDIR) { + vfslocked = VFS_LOCK_GIANT(dp->v_mount); + vrele(dp); + VFS_UNLOCK_GIANT(vfslocked); + uma_zfree(namei_zone, cnp->cn_pnbuf); +#ifdef DIAGNOSTIC + cnp->cn_pnbuf = NULL; + cnp->cn_nameptr = NULL; +#endif + return (ENOTDIR); + } + } else { + dp = fdp->fd_cdir; + VREF(dp); + FILEDESC_SUNLOCK(fdp); + } vfslocked = VFS_LOCK_GIANT(dp->v_mount); - VREF(dp); - FILEDESC_SUNLOCK(fdp); for (;;) { /* * Check if root directory should replace current directory. From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 00:38:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E61BC106566C; Tue, 26 Jan 2010 00:38:56 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3D728FC0A; Tue, 26 Jan 2010 00:38:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q0cugb025938; Tue, 26 Jan 2010 00:38:56 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q0cui0025935; Tue, 26 Jan 2010 00:38:56 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201001260038.o0Q0cui0025935@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 26 Jan 2010 00:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202995 - stable/8/lib/libbluetooth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 00:38:57 -0000 Author: emax Date: Tue Jan 26 00:38:56 2010 New Revision: 202995 URL: http://svn.freebsd.org/changeset/base/202995 Log: MFC SVN rev 198492 Fix typo in bluetooth.3 Do not use reserved C++ keyword "new" Modified: stable/8/lib/libbluetooth/bluetooth.3 stable/8/lib/libbluetooth/bluetooth.h Directory Properties: stable/8/lib/libbluetooth/ (props changed) Modified: stable/8/lib/libbluetooth/bluetooth.3 ============================================================================== --- stable/8/lib/libbluetooth/bluetooth.3 Mon Jan 25 23:48:47 2010 (r202994) +++ stable/8/lib/libbluetooth/bluetooth.3 Tue Jan 26 00:38:56 2010 (r202995) @@ -272,7 +272,7 @@ otherwise 0. .Pp The .Fn bt_devinfo -function populates prodivded +function populates provided .Vt bt_devinfo structure with the information about given Bluetooth device. The caller is expected to pass Bluetooth device name in the Modified: stable/8/lib/libbluetooth/bluetooth.h ============================================================================== --- stable/8/lib/libbluetooth/bluetooth.h Mon Jan 25 23:48:47 2010 (r202994) +++ stable/8/lib/libbluetooth/bluetooth.h Tue Jan 26 00:38:56 2010 (r202995) @@ -163,8 +163,8 @@ int bt_devclose(int s); int bt_devsend (int s, uint16_t opcode, void *param, size_t plen); ssize_t bt_devrecv (int s, void *buf, size_t size, time_t to); int bt_devreq (int s, struct bt_devreq *r, time_t to); -int bt_devfilter(int s, struct bt_devfilter const *new, - struct bt_devfilter *old); +int bt_devfilter(int s, struct bt_devfilter const *newp, + struct bt_devfilter *oldp); void bt_devfilter_pkt_set(struct bt_devfilter *filter, uint8_t type); void bt_devfilter_pkt_clr(struct bt_devfilter *filter, uint8_t type); int bt_devfilter_pkt_tst(struct bt_devfilter const *filter, uint8_t type); From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 02:26:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CCF1065672; Tue, 26 Jan 2010 02:26:04 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A81058FC16; Tue, 26 Jan 2010 02:26:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q2Q4BG049457; Tue, 26 Jan 2010 02:26:04 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q2Q4W5049453; Tue, 26 Jan 2010 02:26:04 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001260226.o0Q2Q4W5049453@svn.freebsd.org> From: Neel Natu Date: Tue, 26 Jan 2010 02:26: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: r202996 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 02:26:05 -0000 Author: neel Date: Tue Jan 26 02:26:04 2010 New Revision: 202996 URL: http://svn.freebsd.org/changeset/base/202996 Log: Fix a problem seen when a new process was returning to userland through fork_trampoline. This was caused because we were clearing the SR_INT_IE and setting SR_EXL bits of the status register at the same time. This meant that if an interrupt happened while this MTC0 was making its way through the pipeline the exception processing would see the status register with SR_EXL bit set. This in turn would mean that the COP_0_EXC_PC would not be updated so the return from exception would be to an incorrect address. It is easy to verify this fix by a program that forks in a loop and the child just exits: while (1) { pid_t pid = vfork(); if (pid == 0) _exit(0); if (pid != -1) waitpid(pid, NULL, 0); } Also remove two instances where we set SR_EXL bit gratuitously in exception.S. Approved by: imp (mentor) Modified: head/sys/mips/include/cpuregs.h head/sys/mips/mips/exception.S head/sys/mips/mips/swtch.S Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Jan 26 00:38:56 2010 (r202995) +++ head/sys/mips/include/cpuregs.h Tue Jan 26 02:26:04 2010 (r202996) @@ -106,7 +106,11 @@ #elif defined(CPU_SB1) #define COP0_SYNC ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop #else -#define COP0_SYNC /* nothing */ +/* + * Pick a reasonable default based on the "typical" spacing described in the + * "CP0 Hazards" chapter of MIPS Architecture Book Vol III. + */ +#define COP0_SYNC ssnop; ssnop; ssnop; ssnop; ssnop #endif #define COP0_HAZARD_FPUENABLE nop; nop; nop; nop; Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Tue Jan 26 00:38:56 2010 (r202995) +++ head/sys/mips/mips/exception.S Tue Jan 26 02:26:04 2010 (r202996) @@ -519,9 +519,6 @@ NNON_LEAF(MipsUserGenException, STAND_FR and t0, t0, ~(MIPS_SR_INT_IE) mtc0 t0, COP_0_STATUS_REG ITLBNOPFIX - or t0, t0, SR_EXL - mtc0 t0, COP_0_STATUS_REG # set exeption level - ITLBNOPFIX /* * The use of k1 for storing the PCB pointer must be done only @@ -751,9 +748,6 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE and t0, t0, ~(MIPS_SR_INT_IE) mtc0 t0, COP_0_STATUS_REG ITLBNOPFIX - or t0, t0, SR_EXL - mtc0 t0, COP_0_STATUS_REG # set exeption level - ITLBNOPFIX GET_CPU_PCPU(k1) lw k1, PC_CURPCB(k1) Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Tue Jan 26 00:38:56 2010 (r202995) +++ head/sys/mips/mips/swtch.S Tue Jan 26 02:26:04 2010 (r202996) @@ -171,13 +171,9 @@ LEAF(fork_trampoline) 1: mfc0 v0, COP_0_STATUS_REG # set exeption level bit. - or v0, SR_EXL and v0, ~(SR_INT_ENAB) mtc0 v0, COP_0_STATUS_REG # set exeption level bit. - nop - nop - nop - nop + COP0_SYNC .set noat move k1, a1 RESTORE_U_PCB_REG(t0, MULLO, k1) From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 02:39:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E693C106566B; Tue, 26 Jan 2010 02:39:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D61FC8FC08; Tue, 26 Jan 2010 02:39:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q2dEUt052420; Tue, 26 Jan 2010 02:39:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q2dEZB052418; Tue, 26 Jan 2010 02:39:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001260239.o0Q2dEZB052418@svn.freebsd.org> From: Warner Losh Date: Tue, 26 Jan 2010 02:39:14 +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: r202997 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 02:39:15 -0000 Author: imp Date: Tue Jan 26 02:39:14 2010 New Revision: 202997 URL: http://svn.freebsd.org/changeset/base/202997 Log: Doh. Remove extra pcpu initialization that I thought was needed, but isn't needed since we moved all that into mips_pcpu0_init. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Tue Jan 26 02:26:04 2010 (r202996) +++ head/sys/mips/cavium/octeon_machdep.c Tue Jan 26 02:39:14 2010 (r202997) @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); #define MAX_APP_DESC_ADDR 0xafffffff #endif -static struct pcpu pcpu0; extern int *edata; extern int *end; @@ -739,7 +738,6 @@ platform_start(__register_t a0, __regist octeon_ciu_reset(); octeon_boot_params_init(a3); bootverbose = 1; - cpuid_to_pcpu[0] = &pcpu0; /* * For some reason on the cn38xx simulator ebase register is set to From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 03:24:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7B41065670; Tue, 26 Jan 2010 03:24:11 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8438FC22; Tue, 26 Jan 2010 03:24:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q3OBvP062795; Tue, 26 Jan 2010 03:24:11 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q3OBrj062793; Tue, 26 Jan 2010 03:24:11 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001260324.o0Q3OBrj062793@svn.freebsd.org> From: Neel Natu Date: Tue, 26 Jan 2010 03:24: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: r202998 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 03:24:11 -0000 Author: neel Date: Tue Jan 26 03:24:11 2010 New Revision: 202998 URL: http://svn.freebsd.org/changeset/base/202998 Log: Print the address of the base of the stackframe in DDB backtrace output. Approved by: imp (mentor) Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Tue Jan 26 02:39:14 2010 (r202997) +++ head/sys/mips/mips/db_trace.c Tue Jan 26 03:24:11 2010 (r202998) @@ -344,7 +344,7 @@ done: (*printfn)("?"); } - (*printfn) (") ra %x sz %d\n", ra, stksize); + (*printfn) (") ra %x sp %x sz %d\n", ra, sp, stksize); if (ra) { if (pc == ra && stksize == 0) From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 03:29:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E061065672; Tue, 26 Jan 2010 03:29:53 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC58F8FC0A; Tue, 26 Jan 2010 03:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q3TqQE064062; Tue, 26 Jan 2010 03:29:52 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q3TqWw064060; Tue, 26 Jan 2010 03:29:52 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001260329.o0Q3TqWw064060@svn.freebsd.org> From: Neel Natu Date: Tue, 26 Jan 2010 03:29:52 +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: r202999 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 03:29:53 -0000 Author: neel Date: Tue Jan 26 03:29:52 2010 New Revision: 202999 URL: http://svn.freebsd.org/changeset/base/202999 Log: Add a DDB command "show trapframe" to dump out contents of the trapframe specified by the first argument. Approved by: imp (mentor) Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Tue Jan 26 03:24:11 2010 (r202998) +++ head/sys/mips/mips/vm_machdep.c Tue Jan 26 03:29:52 2010 (r202999) @@ -599,26 +599,12 @@ cpu_throw(struct thread *old, struct thr #define DB_PRINT_REG_ARRAY(ptr, arrname, regname) \ db_printf(" %-12s 0x%lx\n", #regname, (long)((ptr)->arrname[regname])) -DB_SHOW_COMMAND(pcb, ddb_dump_pcb) +static void +dump_trapframe(struct trapframe *trapframe) { - struct thread *td; - struct pcb *pcb; - struct trapframe *trapframe; - - /* Determine which thread to examine. */ - if (have_addr) - td = db_lookup_thread(addr, FALSE); - else - td = curthread; - - pcb = td->td_pcb; - db_printf("Thread %d at %p\n", td->td_tid, td); - - db_printf("PCB at %p\n", pcb); - - trapframe = &pcb->pcb_regs; db_printf("Trapframe at %p\n", trapframe); + DB_PRINT_REG(trapframe, zero); DB_PRINT_REG(trapframe, ast); DB_PRINT_REG(trapframe, v0); @@ -657,6 +643,28 @@ DB_SHOW_COMMAND(pcb, ddb_dump_pcb) DB_PRINT_REG(trapframe, badvaddr); DB_PRINT_REG(trapframe, cause); DB_PRINT_REG(trapframe, pc); +} + +DB_SHOW_COMMAND(pcb, ddb_dump_pcb) +{ + struct thread *td; + struct pcb *pcb; + struct trapframe *trapframe; + + /* Determine which thread to examine. */ + if (have_addr) + td = db_lookup_thread(addr, TRUE); + else + td = curthread; + + pcb = td->td_pcb; + + db_printf("Thread %d at %p\n", td->td_tid, td); + + db_printf("PCB at %p\n", pcb); + + trapframe = &pcb->pcb_regs; + dump_trapframe(trapframe); db_printf("PCB Context:\n"); DB_PRINT_REG_ARRAY(pcb, pcb_context, PCB_REG_S0); @@ -684,4 +692,16 @@ DB_SHOW_COMMAND(pcb, ddb_dump_pcb) } } +/* + * Dump the trapframe beginning at address specified by first argument. + */ +DB_SHOW_COMMAND(trapframe, ddb_dump_trapframe) +{ + + if (!have_addr) + return; + + dump_trapframe((struct trapframe *)addr); +} + #endif /* DDB */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 03:39:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196DD1065672; Tue, 26 Jan 2010 03:39:11 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095A48FC0A; Tue, 26 Jan 2010 03:39:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q3dADO066166; Tue, 26 Jan 2010 03:39:10 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q3dAxh066164; Tue, 26 Jan 2010 03:39:10 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001260339.o0Q3dAxh066164@svn.freebsd.org> From: Neel Natu Date: Tue, 26 Jan 2010 03:39:10 +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: r203000 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 03:39:11 -0000 Author: neel Date: Tue Jan 26 03:39:10 2010 New Revision: 203000 URL: http://svn.freebsd.org/changeset/base/203000 Log: Install the XTLB exception handler for Sibyte processors. This is a workaround for the fact that the CFE is compiled as a 64-bit application and therefore sets the SR_KX bit every time we call into it (for e.g. console). A TLB miss for any address above 0xc0000000 with the SR_KX bit set will end up at the XTLB exception vector. We workaround this by copying the standard TLB handler at the XTLB exception vector. Approved by: imp (mentor) Modified: head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Tue Jan 26 03:29:52 2010 (r202999) +++ head/sys/mips/sibyte/sb_machdep.c Tue Jan 26 03:39:10 2010 (r203000) @@ -93,6 +93,8 @@ extern void cfe_env_init(void); extern int *edata; extern int *end; +extern char MipsTLBMiss[], MipsTLBMissEnd[]; + void platform_cpu_init() { @@ -183,6 +185,28 @@ mips_init(void) init_param1(); init_param2(physmem); mips_cpu_init(); + + /* + * XXX + * The kernel is running in 32-bit mode but the CFE is running in + * 64-bit mode. So the SR_KX bit in the status register is turned + * on by the CFE every time we call into it - for e.g. CFE_CONSOLE. + * + * This means that if get a TLB miss for any address above 0xc0000000 + * and the SR_KX bit is set then we will end up in the XTLB exception + * vector. + * + * For now work around this by copying the TLB exception handling + * code to the XTLB exception vector. + */ + { + bcopy(MipsTLBMiss, (void *)XTLB_MISS_EXC_VEC, + MipsTLBMissEnd - MipsTLBMiss); + + mips_icache_sync_all(); + mips_dcache_wbinv_all(); + } + pmap_bootstrap(); mips_proc0_init(); mutex_init(); From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 03:42:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBB9B1065676; Tue, 26 Jan 2010 03:42:34 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C26478FC16; Tue, 26 Jan 2010 03:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q3gYhu066949; Tue, 26 Jan 2010 03:42:34 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q3gYif066947; Tue, 26 Jan 2010 03:42:34 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001260342.o0Q3gYif066947@svn.freebsd.org> From: Neel Natu Date: Tue, 26 Jan 2010 03:42:34 +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: r203001 - head/sys/dev/cfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 03:42:35 -0000 Author: neel Date: Tue Jan 26 03:42:34 2010 New Revision: 203001 URL: http://svn.freebsd.org/changeset/base/203001 Log: Create the "cfecons" tty directly using tty_makedev(). It is not clear what the intention of having two ttys pointing to the same cfe console device was. Also we were not initializing the output[] array passed in as input to tty_makedev() so one name of the ttys was garbage. Fix the code that calls cfe_write() to deal with the case where only a partial buffer is written out. cfe_cngetc() needs to return if there is no character available as input. If we don't do this then the cfe_timeout() function will spin forever because cfe_cngetc() will only ever return if there is valid input. Approved by: imp (mentor) Modified: head/sys/dev/cfe/cfe_console.c Modified: head/sys/dev/cfe/cfe_console.c ============================================================================== --- head/sys/dev/cfe/cfe_console.c Tue Jan 26 03:39:10 2010 (r203000) +++ head/sys/dev/cfe/cfe_console.c Tue Jan 26 03:42:34 2010 (r203001) @@ -84,14 +84,12 @@ CONSOLE_DRIVER(cfe); static void cn_drvinit(void *unused) { - char output[32]; struct tty *tp; if (cfe_consdev.cn_pri != CN_DEAD && cfe_consdev.cn_name[0] != '\0') { tp = tty_alloc(&cfe_ttydevsw, NULL); - tty_makedev(tp, NULL, "%s", output); - tty_makealias(tp, "cfecons"); + tty_makedev(tp, NULL, "cfecons"); } } @@ -117,15 +115,21 @@ cfe_tty_close(struct tty *tp) static void cfe_tty_outwakeup(struct tty *tp) { - int len; + int len, written, rc; u_char buf[CFEBURSTLEN]; for (;;) { len = ttydisc_getc(tp, buf, sizeof buf); if (len == 0) break; - while (cfe_write(conhandle, buf, len) == 0) - continue; + + written = 0; + while (written < len) { + rc = cfe_write(conhandle, &buf[written], len - written); + if (rc < 0) + break; + written += rc; + } } } @@ -184,13 +188,9 @@ cfe_cnterm(struct consdev *cp) static int cfe_cngetc(struct consdev *cp) { - int result; unsigned char ch; - while ((result = cfe_read(conhandle, &ch, 1)) == 0) - continue; - - if (result > 0) { + if (cfe_read(conhandle, &ch, 1) == 1) { #if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) int kdb_brk; From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 04:17:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38CA7106568B; Tue, 26 Jan 2010 04:17:19 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24A658FC0C; Tue, 26 Jan 2010 04:17:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q4HJAL074623; Tue, 26 Jan 2010 04:17:19 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q4HIOB074607; Tue, 26 Jan 2010 04:17:18 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001260417.o0Q4HIOB074607@svn.freebsd.org> From: Gregory Neil Shapiro Date: Tue, 26 Jan 2010 04:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203002 - in vendor/sendmail/dist: . cf cf/cf cf/feature cf/m4 contrib devtools devtools/M4 devtools/OS doc/op include/libmilter include/sm libmilter libmilter/docs libsm libsmdb libsmu... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 04:17:19 -0000 Author: gshapiro Date: Tue Jan 26 04:17:18 2010 New Revision: 203002 URL: http://svn.freebsd.org/changeset/base/203002 Log: Import sendmail 8.14.4 Modified: vendor/sendmail/dist/CACerts vendor/sendmail/dist/LICENSE vendor/sendmail/dist/PGPKEYS vendor/sendmail/dist/README vendor/sendmail/dist/RELEASE_NOTES vendor/sendmail/dist/cf/README vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf vendor/sendmail/dist/cf/cf/generic-hpux10.cf vendor/sendmail/dist/cf/cf/generic-hpux9.cf vendor/sendmail/dist/cf/cf/generic-linux.cf vendor/sendmail/dist/cf/cf/generic-mpeix.cf vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf vendor/sendmail/dist/cf/cf/generic-osf1.cf vendor/sendmail/dist/cf/cf/generic-solaris.cf vendor/sendmail/dist/cf/cf/generic-sunos4.1.cf vendor/sendmail/dist/cf/cf/generic-ultrix4.cf vendor/sendmail/dist/cf/cf/submit.cf vendor/sendmail/dist/cf/feature/ldap_routing.m4 vendor/sendmail/dist/cf/m4/cfhead.m4 vendor/sendmail/dist/cf/m4/proto.m4 vendor/sendmail/dist/cf/m4/version.m4 vendor/sendmail/dist/contrib/qtool.pl vendor/sendmail/dist/contrib/smcontrol.pl vendor/sendmail/dist/devtools/M4/switch.m4 vendor/sendmail/dist/devtools/OS/Linux vendor/sendmail/dist/devtools/OS/OpenBSD vendor/sendmail/dist/devtools/OS/SunOS.5.11 vendor/sendmail/dist/devtools/README vendor/sendmail/dist/doc/op/op.me vendor/sendmail/dist/doc/op/op.ps vendor/sendmail/dist/include/libmilter/mfapi.h vendor/sendmail/dist/include/libmilter/mfdef.h vendor/sendmail/dist/include/sm/conf.h vendor/sendmail/dist/include/sm/ldap.h vendor/sendmail/dist/include/sm/sem.h vendor/sendmail/dist/libmilter/Makefile.m4 vendor/sendmail/dist/libmilter/comm.c vendor/sendmail/dist/libmilter/docs/api.html vendor/sendmail/dist/libmilter/docs/overview.html vendor/sendmail/dist/libmilter/docs/smfi_addheader.html vendor/sendmail/dist/libmilter/docs/smfi_chgheader.html vendor/sendmail/dist/libmilter/docs/smfi_insheader.html vendor/sendmail/dist/libmilter/engine.c vendor/sendmail/dist/libmilter/example.c vendor/sendmail/dist/libmilter/handler.c vendor/sendmail/dist/libmilter/libmilter.h vendor/sendmail/dist/libmilter/listener.c vendor/sendmail/dist/libmilter/main.c vendor/sendmail/dist/libmilter/worker.c vendor/sendmail/dist/libsm/debug.c vendor/sendmail/dist/libsm/ldap.c vendor/sendmail/dist/libsm/mbdb.c vendor/sendmail/dist/libsm/sem.c vendor/sendmail/dist/libsm/t-sem.c vendor/sendmail/dist/libsmdb/smdb1.c vendor/sendmail/dist/libsmdb/smdb2.c vendor/sendmail/dist/libsmutil/safefile.c vendor/sendmail/dist/praliases/praliases.0 vendor/sendmail/dist/praliases/praliases.8 vendor/sendmail/dist/praliases/praliases.c vendor/sendmail/dist/src/Makefile.m4 vendor/sendmail/dist/src/README vendor/sendmail/dist/src/TRACEFLAGS vendor/sendmail/dist/src/collect.c vendor/sendmail/dist/src/conf.c vendor/sendmail/dist/src/conf.h vendor/sendmail/dist/src/daemon.c vendor/sendmail/dist/src/deliver.c vendor/sendmail/dist/src/envelope.c vendor/sendmail/dist/src/headers.c vendor/sendmail/dist/src/main.c vendor/sendmail/dist/src/map.c vendor/sendmail/dist/src/milter.c vendor/sendmail/dist/src/queue.c vendor/sendmail/dist/src/ratectrl.c vendor/sendmail/dist/src/readcf.c vendor/sendmail/dist/src/savemail.c vendor/sendmail/dist/src/sendmail.0 vendor/sendmail/dist/src/sendmail.8 vendor/sendmail/dist/src/sendmail.h vendor/sendmail/dist/src/sfsasl.c vendor/sendmail/dist/src/srvrsmtp.c vendor/sendmail/dist/src/tls.c vendor/sendmail/dist/src/usersmtp.c vendor/sendmail/dist/src/util.c vendor/sendmail/dist/src/version.c vendor/sendmail/dist/vacation/vacation.c Modified: vendor/sendmail/dist/CACerts ============================================================================== --- vendor/sendmail/dist/CACerts Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/CACerts Tue Jan 26 04:17:18 2010 (r203002) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $ +# $Id: CACerts,v 8.4 2009/06/26 05:46:10 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -11,73 +11,6 @@ Certificate: Version: 3 (0x2) Serial Number: 0 (0x0) Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Validity - Not Before: Feb 1 21:51:47 2003 GMT - Not After : Jan 31 21:51:47 2008 GMT - Subject: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:9a:fb:dc:4c:a3:58:21:1b:84:78:0a:53:56:b3: - 8d:84:05:b7:db:dd:d7:81:ea:dd:c1:ab:d4:be:d9: - 2b:12:e0:6d:3a:31:d5:f0:7b:13:fc:d8:da:09:0b: - 71:11:8e:b9:48:c4:ab:ae:f5:9c:4c:e2:04:27:8e: - c8:03:3a:aa:00:8b:46:f2:79:09:ae:65:b2:9a:66: - e7:ac:a9:ea:32:f7:4a:4e:fd:da:41:48:34:5a:9d: - b0:42:ea:55:40:17:27:5e:67:9e:e5:ce:dc:84:6d: - 1d:48:37:23:11:68:9d:a8:d4:58:02:05:ea:88:35: - bd:0d:b6:28:d5:cd:d4:d8:95 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - X509v3 Authority Key Identifier: - keyid:DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - DirName:/C=US/ST=California/L=Berkeley/O=Sendmail Consortium/CN=Certificate Authority/emailAddress=certificates@sendmail.org - serial:00 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: md5WithRSAEncryption - 66:92:b9:57:17:3b:6a:0e:72:b1:85:29:53:9f:11:68:a0:0d: - 79:43:d0:7c:48:73:b9:71:09:50:08:02:03:0b:28:0c:33:9a: - 00:ac:94:69:4f:bc:0f:45:6b:f5:3a:ca:6a:87:a1:7f:28:f7: - 9a:c4:b6:b0:f3:dc:a3:eb:42:95:9f:99:19:f8:b8:84:6d:f1: - 1d:bc:9f:f0:a0:cc:60:2d:00:6b:17:55:33:16:85:d1:73:e1: - 00:59:89:33:19:c4:2e:29:5a:39:a7:0e:e7:9b:d2:4c:c7:b9: - 7d:6a:3e:b4:00:83:86:d3:16:28:fd:ad:55:65:60:4e:14:02: - 46:d3 ------BEGIN CERTIFICATE----- -MIIDsDCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -HhcNMDMwMjAxMjE1MTQ3WhcNMDgwMTMxMjE1MTQ3WjCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJr73EyjWCEbhHgKU1azjYQFt9vd -14Hq3cGr1L7ZKxLgbTox1fB7E/zY2gkLcRGOuUjEq671nEziBCeOyAM6qgCLRvJ5 -Ca5lsppm56yp6jL3Sk792kFINFqdsELqVUAXJ15nnuXO3IRtHUg3IxFonajUWAIF -6og1vQ22KNXN1NiVAgMBAAGjgf0wgfowHQYDVR0OBBYEFN7NbriJNAY96c2n/kVP -Tvvhjed5MIHKBgNVHSMEgcIwgb+AFN7NbriJNAY96c2n/kVPTvvhjed5oYGjpIGg -MIGdMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI -QmVya2VsZXkxHDAaBgNVBAoTE1NlbmRtYWlsIENvbnNvcnRpdW0xHjAcBgNVBAMT -FUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNh -dGVzQHNlbmRtYWlsLm9yZ4IBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUA -A4GBAGaSuVcXO2oOcrGFKVOfEWigDXlD0HxIc7lxCVAIAgMLKAwzmgCslGlPvA9F -a/U6ymqHoX8o95rEtrDz3KPrQpWfmRn4uIRt8R28n/CgzGAtAGsXVTMWhdFz4QBZ -iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT ------END CERTIFICATE----- - - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu Validity Not Before: May 12 00:40:50 2000 GMT @@ -144,93 +77,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - fa:7c:2c:80:29:3f:c2:64 + c2:3c:61:67:3b:0a:cc:5e Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Validity - Not Before: May 4 02:07:56 2007 GMT - Not After : May 3 02:07:56 2010 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Not Before: May 14 04:42:18 2009 GMT + Not After : May 13 04:42:18 2012 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (2048 bit) Modulus (2048 bit): - 00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1: - f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4: - d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62: - 01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62: - fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd: - c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a: - b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0: - 49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75: - d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef: - 7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45: - 1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78: - c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7: - 59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89: - 80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae: - de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4: - 58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd: - 7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2: - cf:ef + 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: + 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: + e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: + b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: + 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: + 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: + d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: + 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: + 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: + 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: + 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: + c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: + dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: + ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: + d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: + fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: + f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: + 71:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C + A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C X509v3 Authority Key Identifier: - keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org - serial:FA:7C:2C:80:29:3F:C2:64 + keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + serial:C2:3C:61:67:3B:0A:CC:5E X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org Signature Algorithm: md5WithRSAEncryption - 98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9: - 56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4: - 4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91: - a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8: - 1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17: - 63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b: - 49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3: - 06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d: - 04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a: - fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4: - 77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6: - c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b: - a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14: - 2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5: - 07:6a:3f:f7 + b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: + 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: + 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: + 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: + 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: + 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: + 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: + 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: + 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: + f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: + 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: + 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: + ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: + 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: + d0:82:1e:07 -----BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD +MIIFJzCCBA+gAwIBAgIJAMI8YWc7CsxeMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDkxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMDlAZXNtdHAub3JnMB4XDTA5MDUxNDA0NDIxOFoXDTEyMDUxMzA0NDIxOFow gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG -A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5 -NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0 -WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL -/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV -q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2 -os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD -M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y +A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAwOUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDV+NNIOHXfLmuLxI0dQV6tS5Y9SMLc5f9hmJUyA+m2cVpoMbzhXKoO +cKe8UbcTanhUrqbQREkbXjdbWSABR6fsQUwReYwlwRvA7YWy3g8Qn+eyo8Tx/IVR +qtZoSVE+BOHr6c2HG9Cdl3tM4R6xar4BCqmXmlCJ42YGTAfLfplwE+i0nOfmUjjA +ZJBC0PXPIkYiYOk0cB3j0RMzOjG6EwaowjSQR8WhvS19mCFw3iLQExHlCN2gdwvf +NKcHVd5acfZsnuz3RXUfIqmEBsZPhD1OBdfk5ZhBYXuOyTum7TGAff368Ny3B4K4 +7CcgOV94lfENk435TSEI/XKJAf8soHGdAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +p2H6Ma+o4l6TtoSedAiidlCHaXwwgdoGA1UdIwSB0jCBz4AUp2H6Ma+o4l6TtoSe +dAiidlCHaXyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK -BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C -ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP -KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h -NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7 -rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3 -m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR -dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3 +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwOUBlc210cC5vcmeCCQDCPGFnOwrM +XjAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBAUAA4IBAQCzOODaqAfYzLhNjCCmBiz4J9uOKA85vdkkx5/gTda2Y0I2D9hw +QeeeoiRkBeqFl6zyzMKmcbswIcHHxFQ0HTAJ8Jt0J5NZEkxTC4w+0DntStDZZiTY +5+WcqG1fVl2akf4bfbl8eZ4cuXF0FPgMMFD5sSJWqE1vS5vlioEzG3d19tjO1JA0 +hjTRhnWp4SPmr8GOKJdHIE0bVwk59FYB0odDPin2xFt9j569rTZ5zwlwQzAhmCMx +yA057nfhSkQaXHkvbOyKPNuZoBG8GkYkUed11prbrd1V1N3KgaAQd5aRnHYwOBjw +gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H -----END CERTIFICATE----- Modified: vendor/sendmail/dist/LICENSE ============================================================================== --- vendor/sendmail/dist/LICENSE Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/LICENSE Tue Jan 26 04:17:18 2010 (r203002) @@ -1,7 +1,7 @@ SENDMAIL LICENSE The following license terms and conditions apply, unless a different -license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, +license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2004 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2009 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.13 $, Last updated $Date: 2004/05/11 23:57:57 $ +$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $ Modified: vendor/sendmail/dist/PGPKEYS ============================================================================== --- vendor/sendmail/dist/PGPKEYS Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/PGPKEYS Tue Jan 26 04:17:18 2010 (r203002) @@ -142,6 +142,79 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 1024 0xA77F2429 2009-01-01 ---------- RSA Sign & Encrypt +f16 Fingerprint16 = 33 3A 62 61 2C F3 21 AA 4E 87 47 F2 2F 2C 40 4D +uid Sendmail Signing Key/2009 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.8 (OpenBSD) + +mQCNA0lcVHwAAAEEAM7aXDJHNH3g0oxbsSUjqRiKh47W4srnfEYREj2Q26AXWzXE +BSyfl6QMRLbSVNIiPOWlMPbZWjCx4c1TNsj3TiiklCcievlvbAPVa3kY2hZ6pmyU +czJq4S/mT1lt+uPOCjvKxo8OLQoFuJMTIS+Ya7LVjW7fJD5yrhKJbpunfyQpAAUR +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDA5IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQCVAwUQSVxUfBKJbpunfyQpAQHirwP+JvK4cBqtw9rxSZ0whmC1N4a2r24f +SH2WDC1zNNeiCHg93udKs3PKLPm688U+WxiaSsrGQXQlGojx7jn1XggTPOG+SteJ +JP/Ea9buJK9KaLaniUm84XxHxa71y3v3+SfhJMpJioY4G6qKqfLZFzmpiwUTvtLR +B9LfWvzvUUHJSTyJAJUDBRBJXFY9wZwdJRLTRh0BAcrBBACYcnhE8cx5eA8WqTR4 +2CVZgxxrIMOrqda+hdpSgsRjUEWRpb5+Es1hfM3OLXqbsywCTUvxeoymVYQr3aSP +sbm+rQ4l6gf7ibpiVZA6vDxh0EfwNYE+aI3AoW03ODoCAaj+utOjGdqzIcec0RpS +zXPI1gWW3sBck95KsiDUYmXYTIkAlQMFEElcVkzvWJZk1DLhnQEByUIEAKOdWew/ +M75xyVbugMGUZnAJrTZPKu9y3V3TLqyET3rGYfLjt6M4R+99j+mkhmi2rOckM9VV +30kvjW9BBarnr13XoMVTtLneoLaVrbMw4aZHRkTdRL14LIj+w1jzEKXDwYylJbGZ +UlmZn7lFkJrLIaBDmQl7GswBJRJvFLQbdzzMiQCVAwUQSVxWVW9Sk9ijm6ZVAQHr +DQP9ECF56TGI8YRPVOzZJzUyOmiMAouRoJ74aWfM8TA2Q8gVtedDc6IHiNzcVjq4 +jOZuMgb1KTPPF/TwWL5MHIFldsMdJ/i0Rml+x4h3Ff+8ZYlJgFBylUmx++nW1rbc +nn9RS/Es+zKsDOnTN5fTFo3br1z2saLnuXNB+SuJmSC8i2CJAJUDBRBJXFZgnBy9 +4uNcVjUBAcdaA/9ur7HbueufNbvr0HoDbhBijagbeqRrzmYtsOtYUfBGEtc5JiNH +r7NIAM66Tog8p9ZZA+qOaGHvujecBOTlokLpPKvcQngOz7c53z3Yop90TnMytUL2 +IExcuCdH4BMy72R5nH5YY5pMqb7pFjcyGDDIM8cxMgbZ3gzvbPDHZMUQ6okAlQMF +EElcVmc4IttHzDdPLQEBJ/0EANME79+Z/BItRKlSgzH52JBGGQZrZi57Pz+hJ+du +K7RgSkhpsXnk1kELvig5TCd2YaDZXoZwUrJLObVKAMI4lpGNTkZlzRRrFXcx4Q14 +YPJ/nay5jkqHvR9neKTsifzdsPVLi9nUDBMtURIQo5yn5AYMloiDzw/HpNGvkk92 +ITqwiQCVAwUQSVxWbolpYrhnjAoDAQHLDgP+L+Od/CoHaVUpsZld1SJKwvelIe1S +wT8SBqppQyDbKw0ZczetUSASt+g8OqJKD88I2no5mjEmHx0lncoKJ06qxpJBIu7A +lbByeE9i8Bn52YKhPGka4AwA3DOm5yR967BncOf/zY65t83hocZL1uKQeHW8wnpR +x3o+RBz2354phxyJAJUDBRBJXFZ2IYPhsTlvB4kBARKHA/sHFkKAvCo5Hto2CJWF +gyBCJUsUuHCaQTkfL4IspkIBjmrsr2KKe0WQUqIlebhhWzVhgYsc8AXZil+pLahC +L9CNQVQpoPKD3mit2+Vsi8254QxQjeYD3jUQT1C6uq6l9IORdIxYah9DNBNHCgwX +PuTMmpU1JQj6haKhGa1kbaQq2IkAlQMFEElcVn3I1e0plfYXcQEB2TYD+wYXb+sU +0vmG51lVWj2BPMvv/lbfzU6KnqXNCD2ra0yu6C83WHNFXEz+JuLYlzLnaKm8DJI/ +SFBZZIxpUaoaFHyGrjbWrDI6oMfvp/dMnJjfibNbmZuVIl2z0TKO98jiJ/+/9e/5 +AtCsSFfyZ6FSTtAHbG1ZOJvhPBub9aELiUCiiQCVAwUQSVxWknCgJE0e+ZJRAQHz +NQP7BYHJwViDWqp9c5DmxM6vHrVq/wsDyPgm52+QpopErCRt2iTpocldHQG/9ZdE +0ENn6PhI49xobh+m0HfoZZ+Cr4LPU7g2ftmEtrxtDN1BYdNQHZLZStUp7A8SsLgL +2IvYSI9iKAmQoWQTAOECDD41o1BOnnM1eraeUyqdmZaFm8iJAJUDBRBJXFaZHnuz +yK+VliUBAVgdBACmbsAKzbNnvfaTCJxqhaJI5uNDCdH7rgoCHEJR4aefPY89Do7b +ixLCyW4wUr7pxqvf/xbEGJHNCG5WnmncXBCnoEVqmHb7J9vQw1o3K6pRPqtTjVBR +VEUUK4xe6ZIOft3FOI5fKAPO5Vc9NlxPDjSJcjR6+B//TpecZ2L9A/Dp+4kAlQMF +EElcVqGXQwEYcJO4QQEBl1YD/AsMu6g/4KiwelIz2rDzm4wzvsQm+cYm47hv2IHV +Fkx5f8mS6um39+4J/FHni7i2bfSuHpRn1RdURR7Gebu7HKYfGTNLNYyKt7U/6VFb +ylDxUTS32sier3GlDrlJrBQ+VDIG4dUaioKoKUXxBhEVzAZrvkYhaiGWIl/K4zz5 +C1qdiQCVAwUQSVxWqdiq8Mr2swcpAQFzwgP9FJOM0MysHIjq/KihatPjerxhud6j +bd1Zo/tIKybvPsJNaeTeR+0IKm+vbAWtYL5oBc2wxgdQAs8tUi5SryK1otMAJ6sj +KNN+QxIp2FEumzReGRo+hCETiusjD9Abbh1L9L7FOkhGhH+m6fBVQIYUytmMFpnQ +qn17I9DVPxpwob+JAJUDBRBJXFa9wCnKQBb0zOkBAd0BA/9yRRB2waP3duE2rYKF +Obsbs3XXOQHEl/rjpIHVmYIqqRSglmlTEXwjKJeCEN9q0PRiazhztEhVJWP8ORRP +fkjlscP25T4A4tMC1F49biMak5MI2ffawVkUVsjIWFF/vFQIqKl4JG8SI/r4Oxep +yaozkowCJX3zZtkEfB2Id1nU9IkAlQMFEElcV0e92o/WP+p9/QEBxQID/R4E3pRI +isTe5RJotQKcsQKo3y+8KkmvfZQ6d3h/n4anq6bs1rRrWKqL6XoM7Nc5teLR3QaW +CVTssPtt3P06WqMm8Ct25iZ8dIyqRN0d0k5dJ6d5Qp4WSCL0TmTQ7wO4q9aCOhGK +YFKCP3i2v8zCOhuqk2pLeOYxl6f912COvmwSiQCVAwUQSVxXVXxLZ22gDhVjAQFU +WAP/TjyHxNVsptLRcFRfMCi9fjkrftbma00pzIaj9d6Ybxt6nMQ8C8TCTrurkXpq +9kGIrFVndsovql8++Y9VsDeh/vLX65mZl8FEVFvbl38+YSYeB44upadibU6uB0iL +zFz6da6gZmm/NENX3UCldIWv35L33EFotQ9GxTn8b0MQnY2JAJUDBRBJXFdl1uCh +/k++Kt0BAQ39BACfVZaig8loIuKosYh5Ydcefe0NZTZOCgPZ+mAzShEeBIN/btA0 ++jMXfu6tEgqUKQnyKCXZcPoZwY9Y0hOqGT2AIkWmZHJ/uKrzXIAcwUTS0TQV1k5x +mHPkZmvr55JDYp/JIbxIZ8QTpTuEzlymow12qMOUhPkL/wOQET9duDMKzokAlQMF +EEli68zPHrUDIjJ6AQEBzacD/RPBzReBSsVar0+B4xEW0i11LKV2Q7gH+y256IDX +3SxML4+GZM9FmEMVhlTbHPOE2rfwFvLrMxCmIqGHjMccJRZpV9OFpXa8z15FRDmJ +U01qOITDcIAiIPgGamifxMOYG4+spaj2sxLGnY/6aowhjh1XNbQPuJ6laNq7bz50 +wzfu +=RCyv +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 1024 0xF6B30729 2008-01-18 ---------- RSA Sign & Encrypt f16 Fingerprint16 = 07 FB 9A F9 F7 94 4B E4 0F 28 D1 8E 23 6F A2 B0 uid Sendmail Signing Key/2008 @@ -1792,4 +1865,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.26 $, Last updated $Date: 2008/01/22 06:20:27 $ +$Revision: 8.29 $, Last updated $Date: 2009/01/06 05:59:03 $ Modified: vendor/sendmail/dist/README ============================================================================== --- vendor/sendmail/dist/README Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/README Tue Jan 26 04:17:18 2010 (r203002) @@ -38,6 +38,7 @@ the latest updates. 4. Read cf/README. Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. +-----------------------+ | DIRECTORY PERMISSIONS | @@ -464,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.94 $, Last updated $Date: 2008/02/12 16:40:05 $ +$Revision: 8.95 $, Last updated $Date: 2009/04/10 17:49:18 $ Modified: vendor/sendmail/dist/RELEASE_NOTES ============================================================================== --- vendor/sendmail/dist/RELEASE_NOTES Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/RELEASE_NOTES Tue Jan 26 04:17:18 2010 (r203002) @@ -1,11 +1,96 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1926 2008/05/03 03:34:26 ca Exp $ + $Id: RELEASE_NOTES,v 8.1963 2009/12/23 04:43:46 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.4/8.14.4 2009/12/30 + SECURITY: Handle bogus certificates containing NUL characters + in CNs by placing a string indicating a bad certificate + in the {cn_subject} or {cn_issuer} macro. Patch inspired + by Matthias Andree's changes for fetchmail. + During the generation of a queue identifier an integer overflow + could occur which might result in bogus characters + being used. Based on patch from John Vannoy of + Pepperdine University. + The value of headers, e.g., Precedence, Content-Type, et.al., + was not processed correctly. Patch from Per Hedeland. + Between 8.11.7 and 8.12.0 the length limitation on a return + path was erroneously reduced from MAXNAME (256) to + MAXSHORTSTR (203). Patch from John Gardiner Myers + of Proofpoint; the problem was also noted by Steve + Hubert of University of Washington. + Prevent a crash when a hostname lookup returns a seemingly + valid result which contains a NULL pointer (this seems + to be happening on some Linux versions). + The process title was missing the current load average when + the MTA was delaying connections due to DelayLA. + Patch from Dick St.Peters of NetHeaven. + Do not reset the number of queue entries in shared memory if + only some of them are processed. + Fix overflow of an internal array when parsing some replies + from a milter. Problem found by Scott Rotondo + of Sun Microsystems. + If STARTTLS is turned off in the server (via M=S) then it + would not be initialized for use in the client either. + Patch from Kazuteru Okahashi of IIJ. + If a Diffie-Hellman cipher is selected for STARTTLS, the + handshake could fail with some TLS implementations + because the prime used by the server is not long enough. + Note: the initialization of the DSA/DH parameters for + the server can take a significant amount of time on slow + machines. This can be turned off by setting DHParameters + to none or a file (see doc/op/op.me). Patch from + Petr Lampa of the Brno University of Technology. + Fix handling of `b' modifier for DaemonPortOptions on little + endian machines for loopback address. Patch from + John Beck of Sun Microsystems. + Fix a potential memory leak in libsmdb/smdb1.c found by parfait. + Based on patch from Jonathan Gray of OpenBSD. + If a milter sets the reply code to "421" during the transfer + of the body, the SMTP server will terminate the SMTP session + with that error to match the behavior of the other callbacks. + Return EX_IOERR (instead of 0) if a mail submission fails due to + missing disk space in the mail queue. Based on patch + from Martin Poole of RedHat. + CONFIG: Using FEATURE(`ldap_routing')'s `nodomain' argument would + cause addresses not found in LDAP to be misparsed. + CONFIG: Using a CN restriction did not work for TLS_Clt as it + referred to a wrong macro. Patch from John Gardiner + Myers of Proofpoint. + CONFIG: The option relaytofulladdress of FEATURE(`access_db') + did not work if FEATURE(`relay_hosts_only') is used too. + Problem noted by Kristian Shaw. + CONFIG: The internal function lower() was broken and hence + strcasecmp() did not work either, which could cause + problems for some FEATURE()s if upper case arguments + were used. Patch from Vesa-Matti J Kari of the + University of Helsinki. + LIBMILTER: Fix internal check whether a milter application + is compiled against the same version of libmilter as + it is linked against (especially useful for dynamic + libraries). + LIBMILTER: Fix memory leak that occurred when smfi_setsymlist() + was used. Based on patch by Dan Lukes. + LIBMILTER: Document the effect of SMFIP_HDR_LEADSPC for filters + which add, insert, or replace headers. From Benjamin + Pineau. + LIBMILTER: Fix error messages which refer to "select()" to be + correct if SM_CONF_POLL is used. Based on patch from + John Nemeth. + LIBSM: Fix handling of LDAP search failures where the error is + carried in the search result itself, such as seen with + OpenLDAP proxy servers. + VACATION: Do not refer to a local variable outside its scope. + Based on patch from Mark Costlow of Southwest Cyberport. + Portability: + Enable HAVE_NANOSLEEP for SunOS 5.11. Patch from + John Beck of Sun Microsystems. + Drop NISPLUS from default SunOS 5.11 map definitions. + Patch from John Beck of Sun Microsystems. + 8.14.3/8.14.3 2008/05/03 During ruleset processing the generation of a key for a map lookup and the parsing of the default value was broken @@ -37,7 +122,7 @@ summary of the changes in that release. Support shared libraries in Darwin 8 and 9. Patch from Chris Behrens of Concentric. Add support for SCO OpenServer 6, patch from Boyd Gerber. - DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing path. + DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing slash. Added Files: devtools/OS/Darwin.9.x devtools/OS/OSR.i386 Modified: vendor/sendmail/dist/cf/README ============================================================================== --- vendor/sendmail/dist/cf/README Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/README Tue Jan 26 04:17:18 2010 (r203002) @@ -3142,7 +3142,7 @@ starts with '+' and the items are separa extensions are: CN:name name must match ${cn_subject} -CN ${server_name} must match ${cn_subject} +CN ${client_name}/${server_name} must match ${cn_subject} CS:name name must match ${cert_subject} CI:name name must match ${cert_issuer} @@ -4701,4 +4701,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.724 $, Last updated $Date: 2008/02/15 23:05:32 $ +$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $ Modified: vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-bsd4.4.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp $ ##### @@ -41,7 +41,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -122,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -448,6 +448,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -508,6 +509,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-hpux10.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-hpux10.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-hpux10.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-hpux10.mc,v 8.13 2001/05/29 17:29:52 ca Exp $ ##### @@ -42,7 +42,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -449,6 +449,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -509,6 +510,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-hpux9.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-hpux9.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-hpux9.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-hpux9.mc,v 8.11 1999/02/07 07:26:02 gshapiro Exp $ ##### @@ -42,7 +42,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -449,6 +449,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -509,6 +510,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-linux.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-linux.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-linux.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $ ##### @@ -46,7 +46,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -127,7 +127,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -453,6 +453,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -513,6 +514,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-mpeix.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-mpeix.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-mpeix.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-mpeix.mc,v 8.1 2001/12/13 23:56:37 gshapiro Exp $ ##### @@ -42,7 +42,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -449,6 +449,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -509,6 +510,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-nextstep3.3.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp $ ##### @@ -41,7 +41,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -122,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -448,6 +448,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -508,6 +509,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-osf1.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-osf1.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-osf1.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-osf1.mc,v 8.11 1999/02/07 07:26:02 gshapiro Exp $ ##### @@ -42,7 +42,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -449,6 +449,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -509,6 +510,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: vendor/sendmail/dist/cf/cf/generic-solaris.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-solaris.cf Tue Jan 26 03:42:34 2010 (r203001) +++ vendor/sendmail/dist/cf/cf/generic-solaris.cf Tue Jan 26 04:17:18 2010 (r203002) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:38:59 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:08 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro Exp $ ##### @@ -41,7 +41,7 @@ -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -122,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.14.3 +DZ8.14.4 ############### @@ -448,6 +448,7 @@ O OperatorChars=.:%@!^/[]+ # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? #O DontProbeInterfaces=False @@ -508,6 +509,7 @@ O MaxHeadersLength=32768 # SMTP STARTTLS server options #O TLSSrvOptions *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 04:21:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 154F51065670; Tue, 26 Jan 2010 04:21:22 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E038B8FC1B; Tue, 26 Jan 2010 04:21:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q4LLNZ075591; Tue, 26 Jan 2010 04:21:21 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q4LLvD075590; Tue, 26 Jan 2010 04:21:21 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001260421.o0Q4LLvD075590@svn.freebsd.org> From: Gregory Neil Shapiro Date: Tue, 26 Jan 2010 04:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203003 - vendor/sendmail/8.14.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 04:21:22 -0000 Author: gshapiro Date: Tue Jan 26 04:21:21 2010 New Revision: 203003 URL: http://svn.freebsd.org/changeset/base/203003 Log: Tag sendmail 8.14.4 Added: vendor/sendmail/8.14.4/ - copied from r203002, vendor/sendmail/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 04:41:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71412106566B; Tue, 26 Jan 2010 04:41:16 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D80F8FC0A; Tue, 26 Jan 2010 04:41:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q4fG57079969; Tue, 26 Jan 2010 04:41:16 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q4fFUJ079950; Tue, 26 Jan 2010 04:41:15 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001260441.o0Q4fFUJ079950@svn.freebsd.org> From: Gregory Neil Shapiro Date: Tue, 26 Jan 2010 04:41: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: r203004 - in head/contrib/sendmail: . cf cf/cf cf/feature cf/m4 contrib doc/op include/libmilter include/sm libmilter libmilter/docs libsm libsmdb libsmutil praliases src vacation X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 04:41:16 -0000 Author: gshapiro Date: Tue Jan 26 04:41:15 2010 New Revision: 203004 URL: http://svn.freebsd.org/changeset/base/203004 Log: Merge sendmail 8.14.4 to HEAD MFC after: 4 days Modified: head/contrib/sendmail/CACerts head/contrib/sendmail/LICENSE head/contrib/sendmail/PGPKEYS head/contrib/sendmail/README head/contrib/sendmail/RELEASE_NOTES head/contrib/sendmail/cf/README head/contrib/sendmail/cf/cf/submit.cf head/contrib/sendmail/cf/feature/ldap_routing.m4 head/contrib/sendmail/cf/m4/cfhead.m4 head/contrib/sendmail/cf/m4/proto.m4 head/contrib/sendmail/cf/m4/version.m4 head/contrib/sendmail/contrib/qtool.pl head/contrib/sendmail/contrib/smcontrol.pl head/contrib/sendmail/doc/op/op.me head/contrib/sendmail/include/libmilter/mfapi.h head/contrib/sendmail/include/libmilter/mfdef.h head/contrib/sendmail/include/sm/conf.h head/contrib/sendmail/include/sm/ldap.h head/contrib/sendmail/include/sm/sem.h head/contrib/sendmail/libmilter/Makefile.m4 head/contrib/sendmail/libmilter/comm.c head/contrib/sendmail/libmilter/docs/api.html head/contrib/sendmail/libmilter/docs/overview.html head/contrib/sendmail/libmilter/docs/smfi_addheader.html head/contrib/sendmail/libmilter/docs/smfi_chgheader.html head/contrib/sendmail/libmilter/docs/smfi_insheader.html head/contrib/sendmail/libmilter/engine.c head/contrib/sendmail/libmilter/example.c head/contrib/sendmail/libmilter/handler.c head/contrib/sendmail/libmilter/libmilter.h head/contrib/sendmail/libmilter/listener.c head/contrib/sendmail/libmilter/main.c head/contrib/sendmail/libmilter/worker.c head/contrib/sendmail/libsm/debug.c head/contrib/sendmail/libsm/ldap.c head/contrib/sendmail/libsm/mbdb.c head/contrib/sendmail/libsm/sem.c head/contrib/sendmail/libsm/t-sem.c head/contrib/sendmail/libsmdb/smdb1.c head/contrib/sendmail/libsmdb/smdb2.c head/contrib/sendmail/libsmutil/safefile.c head/contrib/sendmail/praliases/praliases.8 head/contrib/sendmail/praliases/praliases.c head/contrib/sendmail/src/Makefile.m4 head/contrib/sendmail/src/README head/contrib/sendmail/src/TRACEFLAGS head/contrib/sendmail/src/collect.c head/contrib/sendmail/src/conf.c head/contrib/sendmail/src/conf.h head/contrib/sendmail/src/daemon.c head/contrib/sendmail/src/deliver.c head/contrib/sendmail/src/envelope.c head/contrib/sendmail/src/headers.c head/contrib/sendmail/src/main.c head/contrib/sendmail/src/map.c head/contrib/sendmail/src/milter.c head/contrib/sendmail/src/queue.c head/contrib/sendmail/src/ratectrl.c head/contrib/sendmail/src/readcf.c head/contrib/sendmail/src/savemail.c head/contrib/sendmail/src/sendmail.8 head/contrib/sendmail/src/sendmail.h head/contrib/sendmail/src/sfsasl.c head/contrib/sendmail/src/srvrsmtp.c head/contrib/sendmail/src/tls.c head/contrib/sendmail/src/usersmtp.c head/contrib/sendmail/src/util.c head/contrib/sendmail/src/version.c head/contrib/sendmail/vacation/vacation.c Directory Properties: head/contrib/sendmail/ (props changed) Modified: head/contrib/sendmail/CACerts ============================================================================== --- head/contrib/sendmail/CACerts Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/CACerts Tue Jan 26 04:41:15 2010 (r203004) @@ -1,4 +1,4 @@ -# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $ +# $Id: CACerts,v 8.4 2009/06/26 05:46:10 ca Exp $ # This file contains some CA certificates that are used to sign the # certificates of mail servers of members of the sendmail consortium # who may reply to questions etc sent to sendmail.org. @@ -11,73 +11,6 @@ Certificate: Version: 3 (0x2) Serial Number: 0 (0x0) Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Validity - Not Before: Feb 1 21:51:47 2003 GMT - Not After : Jan 31 21:51:47 2008 GMT - Subject: C=US, ST=California, L=Berkeley, O=Sendmail Consortium, CN=Certificate Authority/emailAddress=certificates@sendmail.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:9a:fb:dc:4c:a3:58:21:1b:84:78:0a:53:56:b3: - 8d:84:05:b7:db:dd:d7:81:ea:dd:c1:ab:d4:be:d9: - 2b:12:e0:6d:3a:31:d5:f0:7b:13:fc:d8:da:09:0b: - 71:11:8e:b9:48:c4:ab:ae:f5:9c:4c:e2:04:27:8e: - c8:03:3a:aa:00:8b:46:f2:79:09:ae:65:b2:9a:66: - e7:ac:a9:ea:32:f7:4a:4e:fd:da:41:48:34:5a:9d: - b0:42:ea:55:40:17:27:5e:67:9e:e5:ce:dc:84:6d: - 1d:48:37:23:11:68:9d:a8:d4:58:02:05:ea:88:35: - bd:0d:b6:28:d5:cd:d4:d8:95 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - X509v3 Authority Key Identifier: - keyid:DE:CD:6E:B8:89:34:06:3D:E9:CD:A7:FE:45:4F:4E:FB:E1:8D:E7:79 - DirName:/C=US/ST=California/L=Berkeley/O=Sendmail Consortium/CN=Certificate Authority/emailAddress=certificates@sendmail.org - serial:00 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: md5WithRSAEncryption - 66:92:b9:57:17:3b:6a:0e:72:b1:85:29:53:9f:11:68:a0:0d: - 79:43:d0:7c:48:73:b9:71:09:50:08:02:03:0b:28:0c:33:9a: - 00:ac:94:69:4f:bc:0f:45:6b:f5:3a:ca:6a:87:a1:7f:28:f7: - 9a:c4:b6:b0:f3:dc:a3:eb:42:95:9f:99:19:f8:b8:84:6d:f1: - 1d:bc:9f:f0:a0:cc:60:2d:00:6b:17:55:33:16:85:d1:73:e1: - 00:59:89:33:19:c4:2e:29:5a:39:a7:0e:e7:9b:d2:4c:c7:b9: - 7d:6a:3e:b4:00:83:86:d3:16:28:fd:ad:55:65:60:4e:14:02: - 46:d3 ------BEGIN CERTIFICATE----- -MIIDsDCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -HhcNMDMwMjAxMjE1MTQ3WhcNMDgwMTMxMjE1MTQ3WjCBnTELMAkGA1UEBhMCVVMx -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRwwGgYDVQQK -ExNTZW5kbWFpbCBDb25zb3J0aXVtMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRo -b3JpdHkxKDAmBgkqhkiG9w0BCQEWGWNlcnRpZmljYXRlc0BzZW5kbWFpbC5vcmcw -gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJr73EyjWCEbhHgKU1azjYQFt9vd -14Hq3cGr1L7ZKxLgbTox1fB7E/zY2gkLcRGOuUjEq671nEziBCeOyAM6qgCLRvJ5 -Ca5lsppm56yp6jL3Sk792kFINFqdsELqVUAXJ15nnuXO3IRtHUg3IxFonajUWAIF -6og1vQ22KNXN1NiVAgMBAAGjgf0wgfowHQYDVR0OBBYEFN7NbriJNAY96c2n/kVP -Tvvhjed5MIHKBgNVHSMEgcIwgb+AFN7NbriJNAY96c2n/kVPTvvhjed5oYGjpIGg -MIGdMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI -QmVya2VsZXkxHDAaBgNVBAoTE1NlbmRtYWlsIENvbnNvcnRpdW0xHjAcBgNVBAMT -FUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNh -dGVzQHNlbmRtYWlsLm9yZ4IBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUA -A4GBAGaSuVcXO2oOcrGFKVOfEWigDXlD0HxIc7lxCVAIAgMLKAwzmgCslGlPvA9F -a/U6ymqHoX8o95rEtrDz3KPrQpWfmRn4uIRt8R28n/CgzGAtAGsXVTMWhdFz4QBZ -iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT ------END CERTIFICATE----- - - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu Validity Not Before: May 12 00:40:50 2000 GMT @@ -144,93 +77,93 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - fa:7c:2c:80:29:3f:c2:64 + c2:3c:61:67:3b:0a:cc:5e Signature Algorithm: md5WithRSAEncryption - Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Validity - Not Before: May 4 02:07:56 2007 GMT - Not After : May 3 02:07:56 2010 GMT - Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org + Not Before: May 14 04:42:18 2009 GMT + Not After : May 13 04:42:18 2012 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (2048 bit) Modulus (2048 bit): - 00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1: - f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4: - d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62: - 01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62: - fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd: - c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a: - b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0: - 49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75: - d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef: - 7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45: - 1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78: - c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7: - 59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89: - 80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae: - de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4: - 58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd: - 7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2: - cf:ef + 00:d5:f8:d3:48:38:75:df:2e:6b:8b:c4:8d:1d:41: + 5e:ad:4b:96:3d:48:c2:dc:e5:ff:61:98:95:32:03: + e9:b6:71:5a:68:31:bc:e1:5c:aa:0e:70:a7:bc:51: + b7:13:6a:78:54:ae:a6:d0:44:49:1b:5e:37:5b:59: + 20:01:47:a7:ec:41:4c:11:79:8c:25:c1:1b:c0:ed: + 85:b2:de:0f:10:9f:e7:b2:a3:c4:f1:fc:85:51:aa: + d6:68:49:51:3e:04:e1:eb:e9:cd:87:1b:d0:9d:97: + 7b:4c:e1:1e:b1:6a:be:01:0a:a9:97:9a:50:89:e3: + 66:06:4c:07:cb:7e:99:70:13:e8:b4:9c:e7:e6:52: + 38:c0:64:90:42:d0:f5:cf:22:46:22:60:e9:34:70: + 1d:e3:d1:13:33:3a:31:ba:13:06:a8:c2:34:90:47: + c5:a1:bd:2d:7d:98:21:70:de:22:d0:13:11:e5:08: + dd:a0:77:0b:df:34:a7:07:55:de:5a:71:f6:6c:9e: + ec:f7:45:75:1f:22:a9:84:06:c6:4f:84:3d:4e:05: + d7:e4:e5:98:41:61:7b:8e:c9:3b:a6:ed:31:80:7d: + fd:fa:f0:dc:b7:07:82:b8:ec:27:20:39:5f:78:95: + f1:0d:93:8d:f9:4d:21:08:fd:72:89:01:ff:2c:a0: + 71:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C + A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C X509v3 Authority Key Identifier: - keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C - DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org - serial:FA:7C:2C:80:29:3F:C2:64 + keyid:A7:61:FA:31:AF:A8:E2:5E:93:B6:84:9E:74:08:A2:76:50:87:69:7C + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2009/emailAddress=ca+ca-rsa2009@esmtp.org + serial:C2:3C:61:67:3B:0A:CC:5E X509v3 Basic Constraints: - CA:TRUE + CA:TRUE X509v3 Subject Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org X509v3 Issuer Alternative Name: - email:ca+ca-rsa2007@esmtp.org + email:ca+ca-rsa2009@esmtp.org Signature Algorithm: md5WithRSAEncryption - 98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9: - 56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4: - 4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91: - a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8: - 1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17: - 63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b: - 49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3: - 06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d: - 04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a: - fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4: - 77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6: - c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b: - a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14: - 2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5: - 07:6a:3f:f7 + b3:38:e0:da:a8:07:d8:cc:b8:4d:8c:20:a6:06:2c:f8:27:db: + 8e:28:0f:39:bd:d9:24:c7:9f:e0:4d:d6:b6:63:42:36:0f:d8: + 70:41:e7:9e:a2:24:64:05:ea:85:97:ac:f2:cc:c2:a6:71:bb: + 30:21:c1:c7:c4:54:34:1d:30:09:f0:9b:74:27:93:59:12:4c: + 53:0b:8c:3e:d0:39:ed:4a:d0:d9:66:24:d8:e7:e5:9c:a8:6d: + 5f:56:5d:9a:91:fe:1b:7d:b9:7c:79:9e:1c:b9:71:74:14:f8: + 0c:30:50:f9:b1:22:56:a8:4d:6f:4b:9b:e5:8a:81:33:1b:77: + 75:f6:d8:ce:d4:90:34:86:34:d1:86:75:a9:e1:23:e6:af:c1: + 8e:28:97:47:20:4d:1b:57:09:39:f4:56:01:d2:87:43:3e:29: + f6:c4:5b:7d:8f:9e:bd:ad:36:79:cf:09:70:43:30:21:98:23: + 31:c8:0d:39:ee:77:e1:4a:44:1a:5c:79:2f:6c:ec:8a:3c:db: + 99:a0:11:bc:1a:46:24:51:e7:75:d6:9a:db:ad:dd:55:d4:dd: + ca:81:a0:10:77:96:91:9c:76:30:38:18:f0:82:43:b3:7c:41: + 64:4c:4e:da:66:22:67:cf:b7:d7:10:ba:ed:f4:6d:43:59:00: + d0:82:1e:07 -----BEGIN CERTIFICATE----- -MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD +MIIFJzCCBA+gAwIBAgIJAMI8YWc7CsxeMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs -YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz -YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDkxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMDlAZXNtdHAub3JnMB4XDTA5MDUxNDA0NDIxOFoXDTEyMDUxMzA0NDIxOFow gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG -A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX -Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5 -NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0 -WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL -/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV -q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2 -os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU -sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD -M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y +A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAwOUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDV+NNIOHXfLmuLxI0dQV6tS5Y9SMLc5f9hmJUyA+m2cVpoMbzhXKoO +cKe8UbcTanhUrqbQREkbXjdbWSABR6fsQUwReYwlwRvA7YWy3g8Qn+eyo8Tx/IVR +qtZoSVE+BOHr6c2HG9Cdl3tM4R6xar4BCqmXmlCJ42YGTAfLfplwE+i0nOfmUjjA +ZJBC0PXPIkYiYOk0cB3j0RMzOjG6EwaowjSQR8WhvS19mCFw3iLQExHlCN2gdwvf +NKcHVd5acfZsnuz3RXUfIqmEBsZPhD1OBdfk5ZhBYXuOyTum7TGAff368Ny3B4K4 +7CcgOV94lfENk435TSEI/XKJAf8soHGdAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +p2H6Ma+o4l6TtoSedAiidlCHaXwwgdoGA1UdIwSB0jCBz4AUp2H6Ma+o4l6TtoSe +dAiidlCHaXyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK -BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm -MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C -ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu -b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3 -DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP -KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h -NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7 -rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3 -m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR -dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3 +BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwOTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwOUBlc210cC5vcmeCCQDCPGFnOwrM +XjAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDlAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBAUAA4IBAQCzOODaqAfYzLhNjCCmBiz4J9uOKA85vdkkx5/gTda2Y0I2D9hw +QeeeoiRkBeqFl6zyzMKmcbswIcHHxFQ0HTAJ8Jt0J5NZEkxTC4w+0DntStDZZiTY +5+WcqG1fVl2akf4bfbl8eZ4cuXF0FPgMMFD5sSJWqE1vS5vlioEzG3d19tjO1JA0 +hjTRhnWp4SPmr8GOKJdHIE0bVwk59FYB0odDPin2xFt9j569rTZ5zwlwQzAhmCMx +yA057nfhSkQaXHkvbOyKPNuZoBG8GkYkUed11prbrd1V1N3KgaAQd5aRnHYwOBjw +gkOzfEFkTE7aZiJnz7fXELrt9G1DWQDQgh4H -----END CERTIFICATE----- Modified: head/contrib/sendmail/LICENSE ============================================================================== --- head/contrib/sendmail/LICENSE Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/LICENSE Tue Jan 26 04:41:15 2010 (r203004) @@ -1,7 +1,7 @@ SENDMAIL LICENSE The following license terms and conditions apply, unless a different -license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, +license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2004 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2009 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.13 $, Last updated $Date: 2004/05/11 23:57:57 $ +$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $ Modified: head/contrib/sendmail/PGPKEYS ============================================================================== --- head/contrib/sendmail/PGPKEYS Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/PGPKEYS Tue Jan 26 04:41:15 2010 (r203004) @@ -142,6 +142,79 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 1024 0xA77F2429 2009-01-01 ---------- RSA Sign & Encrypt +f16 Fingerprint16 = 33 3A 62 61 2C F3 21 AA 4E 87 47 F2 2F 2C 40 4D +uid Sendmail Signing Key/2009 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.8 (OpenBSD) + +mQCNA0lcVHwAAAEEAM7aXDJHNH3g0oxbsSUjqRiKh47W4srnfEYREj2Q26AXWzXE +BSyfl6QMRLbSVNIiPOWlMPbZWjCx4c1TNsj3TiiklCcievlvbAPVa3kY2hZ6pmyU +czJq4S/mT1lt+uPOCjvKxo8OLQoFuJMTIS+Ya7LVjW7fJD5yrhKJbpunfyQpAAUR +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDA5IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQCVAwUQSVxUfBKJbpunfyQpAQHirwP+JvK4cBqtw9rxSZ0whmC1N4a2r24f +SH2WDC1zNNeiCHg93udKs3PKLPm688U+WxiaSsrGQXQlGojx7jn1XggTPOG+SteJ +JP/Ea9buJK9KaLaniUm84XxHxa71y3v3+SfhJMpJioY4G6qKqfLZFzmpiwUTvtLR +B9LfWvzvUUHJSTyJAJUDBRBJXFY9wZwdJRLTRh0BAcrBBACYcnhE8cx5eA8WqTR4 +2CVZgxxrIMOrqda+hdpSgsRjUEWRpb5+Es1hfM3OLXqbsywCTUvxeoymVYQr3aSP +sbm+rQ4l6gf7ibpiVZA6vDxh0EfwNYE+aI3AoW03ODoCAaj+utOjGdqzIcec0RpS +zXPI1gWW3sBck95KsiDUYmXYTIkAlQMFEElcVkzvWJZk1DLhnQEByUIEAKOdWew/ +M75xyVbugMGUZnAJrTZPKu9y3V3TLqyET3rGYfLjt6M4R+99j+mkhmi2rOckM9VV +30kvjW9BBarnr13XoMVTtLneoLaVrbMw4aZHRkTdRL14LIj+w1jzEKXDwYylJbGZ +UlmZn7lFkJrLIaBDmQl7GswBJRJvFLQbdzzMiQCVAwUQSVxWVW9Sk9ijm6ZVAQHr +DQP9ECF56TGI8YRPVOzZJzUyOmiMAouRoJ74aWfM8TA2Q8gVtedDc6IHiNzcVjq4 +jOZuMgb1KTPPF/TwWL5MHIFldsMdJ/i0Rml+x4h3Ff+8ZYlJgFBylUmx++nW1rbc +nn9RS/Es+zKsDOnTN5fTFo3br1z2saLnuXNB+SuJmSC8i2CJAJUDBRBJXFZgnBy9 +4uNcVjUBAcdaA/9ur7HbueufNbvr0HoDbhBijagbeqRrzmYtsOtYUfBGEtc5JiNH +r7NIAM66Tog8p9ZZA+qOaGHvujecBOTlokLpPKvcQngOz7c53z3Yop90TnMytUL2 +IExcuCdH4BMy72R5nH5YY5pMqb7pFjcyGDDIM8cxMgbZ3gzvbPDHZMUQ6okAlQMF +EElcVmc4IttHzDdPLQEBJ/0EANME79+Z/BItRKlSgzH52JBGGQZrZi57Pz+hJ+du +K7RgSkhpsXnk1kELvig5TCd2YaDZXoZwUrJLObVKAMI4lpGNTkZlzRRrFXcx4Q14 +YPJ/nay5jkqHvR9neKTsifzdsPVLi9nUDBMtURIQo5yn5AYMloiDzw/HpNGvkk92 +ITqwiQCVAwUQSVxWbolpYrhnjAoDAQHLDgP+L+Od/CoHaVUpsZld1SJKwvelIe1S +wT8SBqppQyDbKw0ZczetUSASt+g8OqJKD88I2no5mjEmHx0lncoKJ06qxpJBIu7A +lbByeE9i8Bn52YKhPGka4AwA3DOm5yR967BncOf/zY65t83hocZL1uKQeHW8wnpR +x3o+RBz2354phxyJAJUDBRBJXFZ2IYPhsTlvB4kBARKHA/sHFkKAvCo5Hto2CJWF +gyBCJUsUuHCaQTkfL4IspkIBjmrsr2KKe0WQUqIlebhhWzVhgYsc8AXZil+pLahC +L9CNQVQpoPKD3mit2+Vsi8254QxQjeYD3jUQT1C6uq6l9IORdIxYah9DNBNHCgwX +PuTMmpU1JQj6haKhGa1kbaQq2IkAlQMFEElcVn3I1e0plfYXcQEB2TYD+wYXb+sU +0vmG51lVWj2BPMvv/lbfzU6KnqXNCD2ra0yu6C83WHNFXEz+JuLYlzLnaKm8DJI/ +SFBZZIxpUaoaFHyGrjbWrDI6oMfvp/dMnJjfibNbmZuVIl2z0TKO98jiJ/+/9e/5 +AtCsSFfyZ6FSTtAHbG1ZOJvhPBub9aELiUCiiQCVAwUQSVxWknCgJE0e+ZJRAQHz +NQP7BYHJwViDWqp9c5DmxM6vHrVq/wsDyPgm52+QpopErCRt2iTpocldHQG/9ZdE +0ENn6PhI49xobh+m0HfoZZ+Cr4LPU7g2ftmEtrxtDN1BYdNQHZLZStUp7A8SsLgL +2IvYSI9iKAmQoWQTAOECDD41o1BOnnM1eraeUyqdmZaFm8iJAJUDBRBJXFaZHnuz +yK+VliUBAVgdBACmbsAKzbNnvfaTCJxqhaJI5uNDCdH7rgoCHEJR4aefPY89Do7b +ixLCyW4wUr7pxqvf/xbEGJHNCG5WnmncXBCnoEVqmHb7J9vQw1o3K6pRPqtTjVBR +VEUUK4xe6ZIOft3FOI5fKAPO5Vc9NlxPDjSJcjR6+B//TpecZ2L9A/Dp+4kAlQMF +EElcVqGXQwEYcJO4QQEBl1YD/AsMu6g/4KiwelIz2rDzm4wzvsQm+cYm47hv2IHV +Fkx5f8mS6um39+4J/FHni7i2bfSuHpRn1RdURR7Gebu7HKYfGTNLNYyKt7U/6VFb +ylDxUTS32sier3GlDrlJrBQ+VDIG4dUaioKoKUXxBhEVzAZrvkYhaiGWIl/K4zz5 +C1qdiQCVAwUQSVxWqdiq8Mr2swcpAQFzwgP9FJOM0MysHIjq/KihatPjerxhud6j +bd1Zo/tIKybvPsJNaeTeR+0IKm+vbAWtYL5oBc2wxgdQAs8tUi5SryK1otMAJ6sj +KNN+QxIp2FEumzReGRo+hCETiusjD9Abbh1L9L7FOkhGhH+m6fBVQIYUytmMFpnQ +qn17I9DVPxpwob+JAJUDBRBJXFa9wCnKQBb0zOkBAd0BA/9yRRB2waP3duE2rYKF +Obsbs3XXOQHEl/rjpIHVmYIqqRSglmlTEXwjKJeCEN9q0PRiazhztEhVJWP8ORRP +fkjlscP25T4A4tMC1F49biMak5MI2ffawVkUVsjIWFF/vFQIqKl4JG8SI/r4Oxep +yaozkowCJX3zZtkEfB2Id1nU9IkAlQMFEElcV0e92o/WP+p9/QEBxQID/R4E3pRI +isTe5RJotQKcsQKo3y+8KkmvfZQ6d3h/n4anq6bs1rRrWKqL6XoM7Nc5teLR3QaW +CVTssPtt3P06WqMm8Ct25iZ8dIyqRN0d0k5dJ6d5Qp4WSCL0TmTQ7wO4q9aCOhGK +YFKCP3i2v8zCOhuqk2pLeOYxl6f912COvmwSiQCVAwUQSVxXVXxLZ22gDhVjAQFU +WAP/TjyHxNVsptLRcFRfMCi9fjkrftbma00pzIaj9d6Ybxt6nMQ8C8TCTrurkXpq +9kGIrFVndsovql8++Y9VsDeh/vLX65mZl8FEVFvbl38+YSYeB44upadibU6uB0iL +zFz6da6gZmm/NENX3UCldIWv35L33EFotQ9GxTn8b0MQnY2JAJUDBRBJXFdl1uCh +/k++Kt0BAQ39BACfVZaig8loIuKosYh5Ydcefe0NZTZOCgPZ+mAzShEeBIN/btA0 ++jMXfu6tEgqUKQnyKCXZcPoZwY9Y0hOqGT2AIkWmZHJ/uKrzXIAcwUTS0TQV1k5x +mHPkZmvr55JDYp/JIbxIZ8QTpTuEzlymow12qMOUhPkL/wOQET9duDMKzokAlQMF +EEli68zPHrUDIjJ6AQEBzacD/RPBzReBSsVar0+B4xEW0i11LKV2Q7gH+y256IDX +3SxML4+GZM9FmEMVhlTbHPOE2rfwFvLrMxCmIqGHjMccJRZpV9OFpXa8z15FRDmJ +U01qOITDcIAiIPgGamifxMOYG4+spaj2sxLGnY/6aowhjh1XNbQPuJ6laNq7bz50 +wzfu +=RCyv +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 1024 0xF6B30729 2008-01-18 ---------- RSA Sign & Encrypt f16 Fingerprint16 = 07 FB 9A F9 F7 94 4B E4 0F 28 D1 8E 23 6F A2 B0 uid Sendmail Signing Key/2008 @@ -1792,4 +1865,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.26 $, Last updated $Date: 2008/01/22 06:20:27 $ +$Revision: 8.29 $, Last updated $Date: 2009/01/06 05:59:03 $ Modified: head/contrib/sendmail/README ============================================================================== --- head/contrib/sendmail/README Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/README Tue Jan 26 04:41:15 2010 (r203004) @@ -38,6 +38,7 @@ the latest updates. 4. Read cf/README. Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. +-----------------------+ | DIRECTORY PERMISSIONS | @@ -464,4 +465,4 @@ sendmail Source for the sendmail program test Some test scripts (currently only for compilation aids). vacation Source for the vacation program. NOT PART OF SENDMAIL! -$Revision: 8.94 $, Last updated $Date: 2008/02/12 16:40:05 $ +$Revision: 8.95 $, Last updated $Date: 2009/04/10 17:49:18 $ Modified: head/contrib/sendmail/RELEASE_NOTES ============================================================================== --- head/contrib/sendmail/RELEASE_NOTES Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/RELEASE_NOTES Tue Jan 26 04:41:15 2010 (r203004) @@ -1,11 +1,96 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1926 2008/05/03 03:34:26 ca Exp $ + $Id: RELEASE_NOTES,v 8.1963 2009/12/23 04:43:46 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.14.4/8.14.4 2009/12/30 + SECURITY: Handle bogus certificates containing NUL characters + in CNs by placing a string indicating a bad certificate + in the {cn_subject} or {cn_issuer} macro. Patch inspired + by Matthias Andree's changes for fetchmail. + During the generation of a queue identifier an integer overflow + could occur which might result in bogus characters + being used. Based on patch from John Vannoy of + Pepperdine University. + The value of headers, e.g., Precedence, Content-Type, et.al., + was not processed correctly. Patch from Per Hedeland. + Between 8.11.7 and 8.12.0 the length limitation on a return + path was erroneously reduced from MAXNAME (256) to + MAXSHORTSTR (203). Patch from John Gardiner Myers + of Proofpoint; the problem was also noted by Steve + Hubert of University of Washington. + Prevent a crash when a hostname lookup returns a seemingly + valid result which contains a NULL pointer (this seems + to be happening on some Linux versions). + The process title was missing the current load average when + the MTA was delaying connections due to DelayLA. + Patch from Dick St.Peters of NetHeaven. + Do not reset the number of queue entries in shared memory if + only some of them are processed. + Fix overflow of an internal array when parsing some replies + from a milter. Problem found by Scott Rotondo + of Sun Microsystems. + If STARTTLS is turned off in the server (via M=S) then it + would not be initialized for use in the client either. + Patch from Kazuteru Okahashi of IIJ. + If a Diffie-Hellman cipher is selected for STARTTLS, the + handshake could fail with some TLS implementations + because the prime used by the server is not long enough. + Note: the initialization of the DSA/DH parameters for + the server can take a significant amount of time on slow + machines. This can be turned off by setting DHParameters + to none or a file (see doc/op/op.me). Patch from + Petr Lampa of the Brno University of Technology. + Fix handling of `b' modifier for DaemonPortOptions on little + endian machines for loopback address. Patch from + John Beck of Sun Microsystems. + Fix a potential memory leak in libsmdb/smdb1.c found by parfait. + Based on patch from Jonathan Gray of OpenBSD. + If a milter sets the reply code to "421" during the transfer + of the body, the SMTP server will terminate the SMTP session + with that error to match the behavior of the other callbacks. + Return EX_IOERR (instead of 0) if a mail submission fails due to + missing disk space in the mail queue. Based on patch + from Martin Poole of RedHat. + CONFIG: Using FEATURE(`ldap_routing')'s `nodomain' argument would + cause addresses not found in LDAP to be misparsed. + CONFIG: Using a CN restriction did not work for TLS_Clt as it + referred to a wrong macro. Patch from John Gardiner + Myers of Proofpoint. + CONFIG: The option relaytofulladdress of FEATURE(`access_db') + did not work if FEATURE(`relay_hosts_only') is used too. + Problem noted by Kristian Shaw. + CONFIG: The internal function lower() was broken and hence + strcasecmp() did not work either, which could cause + problems for some FEATURE()s if upper case arguments + were used. Patch from Vesa-Matti J Kari of the + University of Helsinki. + LIBMILTER: Fix internal check whether a milter application + is compiled against the same version of libmilter as + it is linked against (especially useful for dynamic + libraries). + LIBMILTER: Fix memory leak that occurred when smfi_setsymlist() + was used. Based on patch by Dan Lukes. + LIBMILTER: Document the effect of SMFIP_HDR_LEADSPC for filters + which add, insert, or replace headers. From Benjamin + Pineau. + LIBMILTER: Fix error messages which refer to "select()" to be + correct if SM_CONF_POLL is used. Based on patch from + John Nemeth. + LIBSM: Fix handling of LDAP search failures where the error is + carried in the search result itself, such as seen with + OpenLDAP proxy servers. + VACATION: Do not refer to a local variable outside its scope. + Based on patch from Mark Costlow of Southwest Cyberport. + Portability: + Enable HAVE_NANOSLEEP for SunOS 5.11. Patch from + John Beck of Sun Microsystems. + Drop NISPLUS from default SunOS 5.11 map definitions. + Patch from John Beck of Sun Microsystems. + 8.14.3/8.14.3 2008/05/03 During ruleset processing the generation of a key for a map lookup and the parsing of the default value was broken @@ -37,7 +122,7 @@ summary of the changes in that release. Support shared libraries in Darwin 8 and 9. Patch from Chris Behrens of Concentric. Add support for SCO OpenServer 6, patch from Boyd Gerber. - DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing path. + DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing slash. Added Files: devtools/OS/Darwin.9.x devtools/OS/OSR.i386 Modified: head/contrib/sendmail/cf/README ============================================================================== --- head/contrib/sendmail/cf/README Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/cf/README Tue Jan 26 04:41:15 2010 (r203004) @@ -3142,7 +3142,7 @@ starts with '+' and the items are separa extensions are: CN:name name must match ${cn_subject} -CN ${server_name} must match ${cn_subject} +CN ${client_name}/${server_name} must match ${cn_subject} CS:name name must match ${cert_subject} CI:name name must match ${cert_issuer} @@ -4701,4 +4701,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -$Revision: 8.724 $, Last updated $Date: 2008/02/15 23:05:32 $ +$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $ Modified: head/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- head/contrib/sendmail/cf/cf/submit.cf Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/cf/cf/submit.cf Tue Jan 26 04:41:15 2010 (r203004) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:39:00 PDT 2008 -##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf +##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:09 PST 2009 +##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ ##### +##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ ##### ##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ ##### ##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ ##### ##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ ##### @@ -35,7 +35,7 @@ ##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ ##### -##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ ##### +##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ ##### # level 10 config file format V10/Berkeley @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.3/Submit +DZ8.14.4/Submit ############### @@ -440,6 +440,7 @@ O RunAsUser=smmsp # once the threshold number of recipients have been rejected #O BadRcptThrottle=0 + # shall we get local names from our installed interfaces? O DontProbeInterfaces=True @@ -500,6 +501,7 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions + # Input mail filters #O InputMailFilters Modified: head/contrib/sendmail/cf/feature/ldap_routing.m4 ============================================================================== --- head/contrib/sendmail/cf/feature/ldap_routing.m4 Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/cf/feature/ldap_routing.m4 Tue Jan 26 04:41:15 2010 (r203004) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1999-2002, 2004, 2007, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # # By using this file, you agree to the terms and conditions set @@ -10,7 +10,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: ldap_routing.m4,v 8.15 2007/05/01 17:38:25 ca Exp $') +VERSIONID(`$Id: ldap_routing.m4,v 8.17 2009/06/26 21:11:08 ca Exp $') divert(-1) # Check first two arguments. If they aren't set, may need to warn in proto.m4 @@ -35,12 +35,40 @@ ifelse(len(X`'_ARG6_), `1', `define(`_LD _ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')', _ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')') +define(`_ATMPF_', `')dnl +dnl check whether arg contains -T`'_ATMPF_ +dnl unless it is a sequence map or just LDAP +dnl note: this does not work if ARG1 begins with space(s), however, as +dnl we issue a warning, hopefully the user will fix it... +ifelse(defn(`_ARG1_'), `', `', + defn(`_ARG1_'), `LDAP', `', + `ifelse(index(_ARG1_, `sequence '), `0', `', + `ifelse(index(_ARG1_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in first argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG1_, ` ')) + define(`_NARG1_', `substr(_ARG1_, 0, _ABP_) -T'_ATMPF_` substr(_ARG1_, _ABP_)') + ') + ') + ') +ifelse(defn(`_ARG2_'), `', `', + defn(`_ARG2_'), `LDAP', `', + `ifelse(index(_ARG2_, `sequence '), `0', `', + `ifelse(index(_ARG2_, _ATMPF_), `-1', + `errprint(`*** WARNING: missing -T'_ATMPF_` in second argument of FEATURE(`ldap_routing') +') + define(`_ABP_', index(_ARG2_, ` ')) + define(`_NARG2_', `substr(_ARG2_, 0, _ABP_) -T'_ATMPF_` substr(_ARG2_, _ABP_)') + ') + ') + ') + LOCAL_CONFIG # LDAP routing maps Kldapmh ifelse(len(X`'_ARG1_), `1', `ldap -1 -T -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG1_') + defn(`_NARG1_'), `', `_ARG1_', `_NARG1_') Kldapmra ifelse(len(X`'_ARG2_), `1', `ldap -1 -T -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', - `_ARG2_') + defn(`_NARG2_'), `', `_ARG2_', `_NARG2_') Modified: head/contrib/sendmail/cf/m4/cfhead.m4 ============================================================================== --- head/contrib/sendmail/cf/m4/cfhead.m4 Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/cf/m4/cfhead.m4 Tue Jan 26 04:41:15 2010 (r203004) @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -49,7 +49,7 @@ define(`OSTYPE', define(`_ARG_', $2) include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') ## helpful functions -define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwx')') +define(`lower', `translit(`$1', `ABCDEFGHIJKLMNOPQRSTUVWXYZ', `abcdefghijklmnopqrstuvwxyz')') define(`strcasecmp', `ifelse(lower($1), lower($2), `1', `0')') ## access to further arguments in FEATURE/HACK define(`_ACC_ARG_1_',`$1') @@ -308,4 +308,4 @@ define(`confMILTER_MACROS_EOM', `{msg_id divert(0)dnl -VERSIONID(`$Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $') +VERSIONID(`$Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $') Modified: head/contrib/sendmail/cf/m4/proto.m4 ============================================================================== --- head/contrib/sendmail/cf/m4/proto.m4 Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/cf/m4/proto.m4 Tue Jan 26 04:41:15 2010 (r203004) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ divert(-1) # divert(0) -VERSIONID(`$Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $') +VERSIONID(`$Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $') # level CF_LEVEL config file format V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') @@ -580,6 +580,7 @@ _OPTION(MaxRecipientsPerMessage, `confMA # once the threshold number of recipients have been rejected _OPTION(BadRcptThrottle, `confBAD_RCPT_THROTTLE', `0') + # shall we get local names from our installed interfaces? _OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES', `False') @@ -640,6 +641,7 @@ _OPTION(AuthMaxBits, `confAUTH_MAX_BITS' # SMTP STARTTLS server options _OPTION(TLSSrvOptions, `confTLS_SRV_OPTIONS', `') + # Input mail filters _OPTION(InputMailFilters, `confINPUT_MAIL_FILTERS', `') @@ -1509,7 +1511,9 @@ ifdef(`_LDAP_ROUTE_DETAIL_', # try without +detail R<> <> <$+> <$+ + $* @ $+> <> $@ $>LDAPExpand <$1> <$2 @ $4> <+$3>')dnl -ifdef(`_LDAP_ROUTE_NODOMAIN_', `dnl', ` +ifdef(`_LDAP_ROUTE_NODOMAIN_', ` +# pretend we did the @domain lookup +R<> <> <$+> <$+ @ $+> <$*> $: <> <> <$1> <@ $3> <$4>', ` # if still no mailRoutingAddress and no mailHost, # try @domain ifelse(_LDAP_ROUTE_DETAIL_, `_PRESERVE_', `dnl @@ -2139,7 +2143,10 @@ R$+ < @ $=w > $@ RELAY ifdef(`_RELAY_HOSTS_ONLY_', `R$+ < @ $=R > $@ RELAY ifdef(`_ACCESS_TABLE_', `dnl -R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >> +ifdef(`_RELAY_FULL_ADDR_', `dnl +R$+ < @ $+ > $: <$(access To:$1@$2 $: ? $)> <$1 < @ $2 >> +R <$+ < @ $+ >> $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>',` +R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>') dnl workspace: > R <$+ < @ $+ >> $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', `R$+ < @ $* $=R > $@ RELAY @@ -2691,7 +2698,7 @@ R$* $#$* $#$2 R$* $* $: $1', `dnl') ifdef(`_ACCESS_TABLE_', `dnl dnl store name of other side -R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1 +R$* $: $(macro {TLS_Name} $@ $&{client_name} $) $1 dnl ignore second arg for now dnl maybe use it to distinguish permanent/temporary error? dnl if MAIL: permanent (STARTTLS has not been offered) Modified: head/contrib/sendmail/cf/m4/version.m4 ============================================================================== --- head/contrib/sendmail/cf/m4/version.m4 Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/cf/m4/version.m4 Tue Jan 26 04:41:15 2010 (r203004) @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,8 +11,8 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`$Id: version.m4,v 8.195 2008/04/17 17:04:30 ca Exp $') +VERSIONID(`$Id: version.m4,v 8.205 2009/12/23 04:43:09 ca Exp $') # divert(0) # Configuration version number -DZ8.14.3`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.14.4`'ifdef(`confCF_VERSION', `/confCF_VERSION') Modified: head/contrib/sendmail/contrib/qtool.pl ============================================================================== --- head/contrib/sendmail/contrib/qtool.pl Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/contrib/qtool.pl Tue Jan 26 04:41:15 2010 (r203004) @@ -3,7 +3,7 @@ ## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. ## All rights reserved. ## -## $Id: qtool.pl,v 8.29 2007/02/16 01:12:08 ca Exp $ +## $Id: qtool.pl,v 8.30 2009/03/04 16:57:30 ca Exp $ ## use strict; use File::Basename; @@ -450,7 +450,7 @@ sub unlock_file ## ## Parameters: ## src_name -- The name of the file to be move. -## dst_nome -- The name of the place to move it to. +## dst_name -- The name of the place to move it to. ## ## Returns: ## error_string -- If undef then no problem. Otherwise it is a @@ -1193,7 +1193,7 @@ sub bounce ## ## This Condition Class checks the modification time of the ## source file and returns true if the file's modification time is -## older than the number of seconds the class was initialzed with. +## older than the number of seconds the class was initialized with. ## package OlderThan; @@ -1286,7 +1286,7 @@ sub check_move ## Eval ## ## Takes a perl expression and evaluates it. The ControlFile object -## for the source QueuedMessage is avaliable through the name '$msg'. +## for the source QueuedMessage is available through the name '$msg'. ## package Eval; Modified: head/contrib/sendmail/contrib/smcontrol.pl ============================================================================== --- head/contrib/sendmail/contrib/smcontrol.pl Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/contrib/smcontrol.pl Tue Jan 26 04:41:15 2010 (r203004) @@ -1,4 +1,6 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w + +# $Id: smcontrol.pl,v 8.8 2008/07/21 21:31:43 ca Exp $ use strict; use Getopt::Std; Modified: head/contrib/sendmail/doc/op/op.me ============================================================================== --- head/contrib/sendmail/doc/op/op.me Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/doc/op/op.me Tue Jan 26 04:41:15 2010 (r203004) @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: op.me,v 8.741 2007/06/22 23:08:59 ca Exp $ +.\" $Id: op.me,v 8.745 2009/12/13 04:12:46 ca Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -90,13 +90,14 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve $Revision: 8.741 $ +.Ve $Revision: 8.745 $ .rm Ve .sp For Sendmail Version 8.14 .)l .(f Sendmail is a trademark of Sendmail, Inc. +US Patent Numbers 6865671, 6986037. .)f .sp 2 .pp @@ -4952,9 +4953,21 @@ as "(may be forged)". .ip ${cn_issuer} The CN (common name) of the CA that signed the presented certificate (STARTTLS only). +Note: if the CN cannot be extracted properly it will be replaced by +one of these strings based on the encountered error: +.(b +.ta 25n +BadCertificateContainsNUL CN contains a NUL character +BadCertificateTooLong CN is too long +BadCertificateUnknown CN could not be extracted +.)b +In the last case, some other (unspecific) error occurred. .ip ${cn_subject} The CN (common name) of the presented certificate (STARTTLS only). +See +.b ${cn_issuer} +for possible replacements. .ip ${currHeader} Header value as quoted string (possibly truncated to @@ -5130,7 +5143,7 @@ The total number of incoming connections by ConnectionRateWindowSize. .ip ${verify} The result of the verification of the presented cert; -only defined after STARTTLS has been used. +only defined after STARTTLS has been used (or attempted). Possible values are: .(b .ta 13n @@ -6710,10 +6723,25 @@ CRL checking requires at least OpenSSL v Note: if a CRLFile is specified but the file is unusable, STARTTLS is disabled. .ip DHParameters -File with DH parameters for STARTTLS. +Possible values are: +.(b +.ta 1i +5 use 512 bit prime +1 use 1024 bit prime +none do not use Diffie-Hellman +NAME load prime from file +.)b This is only required if a ciphersuite containing DSA/DH is used. -This is only for people with a good knowledge of TLS, all others -can ignore this option. +If ``5'' is selected, then precomputed, fixed primes are used. +This is the default for the client side. +If ``1'' is selected, then prime values are computed during startup. +This is the default for the server side. +Note: this operation can take a significant amount of time on a +slow machine (several seconds), but it is only done once at startup. +If ``none'' is selected, then TLS ciphersuites containing DSA/DH +cannot be used. +If a file name is specified (which must be an absolute path), +then the primes are read from it. .ip DaemonPortOptions=\fIoptions\fP [O] Set server SMTP options. @@ -11435,7 +11463,7 @@ replace it with a blank sheet for double .\".sz 10 .\"Eric Allman .\".sp -.\"Version $Revision: 8.741 $ +.\"Version $Revision: 8.745 $ .\".ce 0 .bp 3 .ce Modified: head/contrib/sendmail/include/libmilter/mfapi.h ============================================================================== --- head/contrib/sendmail/include/libmilter/mfapi.h Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/include/libmilter/mfapi.h Tue Jan 26 04:41:15 2010 (r203004) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfapi.h,v 8.78 2008/02/27 22:30:34 ca Exp $ + * $Id: mfapi.h,v 8.80 2009/11/06 00:57:08 ca Exp $ */ /* @@ -18,7 +18,14 @@ # define _LIBMILTER_MFAPI_H 1 #ifndef SMFI_VERSION -# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# if _FFR_MDS_NEGOTIATE +# define SMFI_VERSION 0x01000002 /* libmilter version number */ + + /* first libmilter version that has MDS support */ +# define SMFI_VERSION_MDS 0x01000002 +# else /* _FFR_MDS_NEGOTIATE */ +# define SMFI_VERSION 0x01000001 /* libmilter version number */ +# endif /* _FFR_MDS_NEGOTIATE */ #endif /* ! SMFI_VERSION */ #define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24) @@ -163,9 +170,7 @@ LIBMILTER_API int smfi_setdbg __P((int)) LIBMILTER_API int smfi_settimeout __P((int)); LIBMILTER_API int smfi_setconn __P((char *)); LIBMILTER_API int smfi_stop __P((void)); -#if _FFR_MAXDATASIZE LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t)); -#endif /* _FFR_MAXDATASIZE */ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *)); /* Modified: head/contrib/sendmail/include/libmilter/mfdef.h ============================================================================== --- head/contrib/sendmail/include/libmilter/mfdef.h Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/include/libmilter/mfdef.h Tue Jan 26 04:41:15 2010 (r203004) @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Id: mfdef.h,v 8.38 2007/03/27 18:53:48 ca Exp $ + * $Id: mfdef.h,v 8.39 2009/11/06 00:57:08 ca Exp $ */ /* @@ -27,6 +27,12 @@ #define MILTER_CHUNK_SIZE 65535 /* body chunk size */ #define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */ +#if _FFR_MDS_NEGOTIATE +# define MILTER_MDS_64K ((64 * 1024) - 1) +# define MILTER_MDS_256K ((256 * 1024) - 1) +# define MILTER_MDS_1M ((1024 * 1024) - 1) +#endif /* _FFR_MDS_NEGOTIATE */ + /* These apply to SMFIF_* flags */ #define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */ #define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */ @@ -100,6 +106,9 @@ #define SMFIP_NR_EOH 0x00040000L /* No reply for eoh */ #define SMFIP_NR_BODY 0x00080000L /* No reply for body chunk */ #define SMFIP_HDR_LEADSPC 0x00100000L /* header value leading space */ +#define SMFIP_MDS_256K 0x10000000L /* MILTER_MAX_DATA_SIZE=256K */ +#define SMFIP_MDS_1M 0x20000000L /* MILTER_MAX_DATA_SIZE=1M */ +/* #define SMFIP_ 0x40000000L reserved: see SMFI_INTERNAL*/ #define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */ #define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */ @@ -107,4 +116,11 @@ /* all defined protocol bits */ #define SMFI_CURR_PROT 0x001FFFFFL +/* internal flags: only used between MTA and libmilter */ +#define SMFI_INTERNAL 0x70000000L + +#if _FFR_MILTER_CHECK +# define SMFIP_TEST 0x80000000L +#endif /* _FFR_MILTER_CHECK */ + #endif /* !_LIBMILTER_MFDEF_H */ Modified: head/contrib/sendmail/include/sm/conf.h ============================================================================== --- head/contrib/sendmail/include/sm/conf.h Tue Jan 26 04:21:21 2010 (r203003) +++ head/contrib/sendmail/include/sm/conf.h Tue Jan 26 04:41:15 2010 (r203004) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.134 2007/09/24 23:05:37 ca Exp $ + * $Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $ */ /* @@ -460,6 +460,7 @@ typedef int pid_t; # endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */ # if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) # define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */ +# define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */ # endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */ # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ @@ -1021,6 +1022,10 @@ extern unsigned int sleepX __P((unsigned # define SMRSH_PATH "/bin:/usr/bin" # endif /* ! SMRSH_PATH */ # endif /* __FreeBSD_version >= 330000 */ +# if __FreeBSD_version >= 430000 /* 4.3.0-release and later */ +# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ +# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ +# endif /* __FreeBSD_version >= 430000 */ # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ # include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 04:44:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CA27106566B; Tue, 26 Jan 2010 04:44:12 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CFFE8FC12; Tue, 26 Jan 2010 04:44:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q4iCRt080662; Tue, 26 Jan 2010 04:44:12 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q4iCIj080659; Tue, 26 Jan 2010 04:44:12 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001260444.o0Q4iCIj080659@svn.freebsd.org> From: Gregory Neil Shapiro Date: Tue, 26 Jan 2010 04:44:12 +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: r203005 - head/etc/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 04:44:12 -0000 Author: gshapiro Date: Tue Jan 26 04:44:12 2010 New Revision: 203005 URL: http://svn.freebsd.org/changeset/base/203005 Log: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.14.4/cf tree. MFC after: 4 days Modified: head/etc/sendmail/freebsd.mc head/etc/sendmail/freebsd.submit.mc Modified: head/etc/sendmail/freebsd.mc ============================================================================== --- head/etc/sendmail/freebsd.mc Tue Jan 26 04:41:15 2010 (r203004) +++ head/etc/sendmail/freebsd.mc Tue Jan 26 04:44:12 2010 (r203005) @@ -34,7 +34,7 @@ divert(-1) # # -# This is a generic configuration file for FreeBSD 5.X and later systems. +# This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your # environment and do the modifications there. # Modified: head/etc/sendmail/freebsd.submit.mc ============================================================================== --- head/etc/sendmail/freebsd.submit.mc Tue Jan 26 04:41:15 2010 (r203004) +++ head/etc/sendmail/freebsd.submit.mc Tue Jan 26 04:44:12 2010 (r203005) @@ -25,3 +25,4 @@ define(`confBIND_OPTS', `WorkAroundBroke dnl dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1] FEATURE(`msp', `[127.0.0.1]')dnl + From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 04:45:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDCE210656A4; Tue, 26 Jan 2010 04:45:26 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE1978FC16; Tue, 26 Jan 2010 04:45:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q4jQ3G080966; Tue, 26 Jan 2010 04:45:26 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q4jQGo080964; Tue, 26 Jan 2010 04:45:26 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201001260445.o0Q4jQGo080964@svn.freebsd.org> From: Gregory Neil Shapiro Date: Tue, 26 Jan 2010 04:45: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: r203006 - head/contrib/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 04:45:27 -0000 Author: gshapiro Date: Tue Jan 26 04:45:26 2010 New Revision: 203006 URL: http://svn.freebsd.org/changeset/base/203006 Log: Update FreeBSD information MFC after: 4 days Modified: head/contrib/sendmail/FREEBSD-upgrade Modified: head/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- head/contrib/sendmail/FREEBSD-upgrade Tue Jan 26 04:44:12 2010 (r203005) +++ head/contrib/sendmail/FREEBSD-upgrade Tue Jan 26 04:45:26 2010 (r203006) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.3 +sendmail 8.14.4 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -110,4 +110,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -27-August-2008 +25-January-2010 From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 05:07:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E17106566C; Tue, 26 Jan 2010 05:07:42 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D12018FC08; Tue, 26 Jan 2010 05:07:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q57fcM085961; Tue, 26 Jan 2010 05:07:41 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q57f16085959; Tue, 26 Jan 2010 05:07:41 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001260507.o0Q57f16085959@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Jan 2010 05:07: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: r203007 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 05:07:42 -0000 Author: rrs Date: Tue Jan 26 05:07:41 2010 New Revision: 203007 URL: http://svn.freebsd.org/changeset/base/203007 Log: Fixes setup of clock. It was not properly initialized, thus backward time warnings were being spewed to the console. Modified: head/sys/mips/rmi/clock.c Modified: head/sys/mips/rmi/clock.c ============================================================================== --- head/sys/mips/rmi/clock.c Tue Jan 26 04:45:26 2010 (r203006) +++ head/sys/mips/rmi/clock.c Tue Jan 26 05:07:41 2010 (r203007) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * RMI_BSD */ + * RMI_BSD + */ #include /* RCS ID & Copyright macro defns */ +__FBSDID("$FreeBSD$"); #include #include @@ -129,6 +131,8 @@ count_compare_clockhandler(struct trapfr return (FILTER_HANDLED); } +unsigned long clock_tick_foo=0; + int pic_hardclockhandler(struct trapframe *tf) { @@ -138,6 +142,12 @@ pic_hardclockhandler(struct trapframe *t if (cpu == 0) { scale_factor++; + clock_tick_foo++; +/* + if ((clock_tick_foo % 10000) == 0) { + printf("Clock tick foo at %ld\n", clock_tick_foo); + } +*/ hardclock(USERMODE(tf->sr), tf->pc); if (scale_factor == STAT_PROF_CLOCK_SCALE_FACTOR) { statclock(USERMODE(tf->sr)); @@ -179,7 +189,7 @@ rmi_early_counter_init() xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0xffffffff & 0xffffffff)); xlr_write_reg(mmio, PIC_IRT_0_TIMER_6, (1 << cpu)); xlr_write_reg(mmio, PIC_IRT_1_TIMER_6, (1 << 31) | (0 << 30) | (1 << 6) | (PIC_TIMER_6_IRQ)); - pic_update_control(1 << (8 + 6)); + pic_update_control(1 << (8 + 6), 0); } void tick_init(void); @@ -237,13 +247,13 @@ platform_initclocks(void) /* Reg 80 is upper bits 63-32 and holds */ /* Valid Edge Local IRQ */ xlr_write_reg(mmio, PIC_IRT_1_TIMER_7, (1 << 31) | (0 << 30) | (1 << 6) | (PIC_TIMER_7_IRQ)); - pic_update_control(1 << (8 + 7)); + pic_update_control(1 << (8 + 7), 1); xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_0, (0xffffffff & 0xffffffff)); - xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0x0 & 0xffffffff)); + xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0xffffffff & 0xffffffff)); xlr_write_reg(mmio, PIC_IRT_0_TIMER_6, (1 << cpu)); xlr_write_reg(mmio, PIC_IRT_1_TIMER_6, (1 << 31) | (0 << 30) | (1 << 6) | (PIC_TIMER_6_IRQ)); - pic_update_control(1 << (8 + 6)); + pic_update_control(1 << (8 + 6), 1); if (rmi_spin_mutex_safe) mtx_unlock_spin(&xlr_pic_lock); } else { From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 05:10:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E42831065670; Tue, 26 Jan 2010 05:10:10 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D48CF8FC08; Tue, 26 Jan 2010 05:10:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q5AA89086585; Tue, 26 Jan 2010 05:10:10 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q5AASp086583; Tue, 26 Jan 2010 05:10:10 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001260510.o0Q5AASp086583@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Jan 2010 05:10:10 +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: r203008 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 05:10:11 -0000 Author: rrs Date: Tue Jan 26 05:10:10 2010 New Revision: 203008 URL: http://svn.freebsd.org/changeset/base/203008 Log: Fix up the msg ring driver a bit tighter so that we don't loose an interrupt which we appeared to be doing. Modified: head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Tue Jan 26 05:07:41 2010 (r203007) +++ head/sys/mips/rmi/xlr_machdep.c Tue Jan 26 05:10:10 2010 (r203008) @@ -352,14 +352,6 @@ mips_init(void) mips_cpu_init(); pmap_bootstrap(); - - mips_proc0_init(); - write_c0_register32(MIPS_COP_0_OSSCRATCH, 7, pcpup->pc_curthread); - - mutex_init(); - - PMAP_LOCK_INIT(kernel_pmap); - #ifdef DDB #ifdef SMP setup_nmi(); @@ -369,6 +361,9 @@ mips_init(void) kdb_enter("Boot flags requested debugger", NULL); } #endif + mips_proc0_init(); + write_c0_register32(MIPS_COP_0_OSSCRATCH, 7, pcpup->pc_curthread); + mutex_init(); } void @@ -604,31 +599,26 @@ msgring_process_fast_intr(void *arg) { int cpu = PCPU_GET(cpuid); volatile struct msgring_ithread *it; - struct proc *p; struct thread *td; /* wakeup an appropriate intr_thread for processing this interrupt */ it = (volatile struct msgring_ithread *)&msgring_ithreads[cpu]; td = it->i_thread; - p = td->td_proc; /* * Interrupt thread will enable the interrupts after processing all * messages */ disable_msgring_int(NULL); + atomic_store_rel_int(&it->i_pending, 1); thread_lock(td); - it->i_pending = 1; if (TD_AWAITING_INTR(td)) { - CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid, - p->p_comm); TD_CLR_IWAIT(td); sched_add(td, SRQ_INTR); } thread_unlock(td); } -#define MIT_DEAD 4 static void msgring_process(void *arg) { @@ -650,22 +640,17 @@ msgring_process(void *arg) //printf("Started %s on CPU %d\n", __FUNCTION__, ithd->i_cpu); while (1) { - if (ithd->i_flags & MIT_DEAD) { - CTR3(KTR_INTR, "%s: pid %d (%s) exiting", __func__, - p->p_pid, p->p_comm); - kthread_exit(); - } while (ithd->i_pending) { /* * This might need a full read and write barrier to * make sure that this write posts before any of the * memory or device accesses in the handlers. */ - atomic_store_rel_int(&ithd->i_pending, 0); xlr_msgring_handler(NULL); + atomic_store_rel_int(&ithd->i_pending, 0); + enable_msgring_int(NULL); } - enable_msgring_int(NULL); - if (!ithd->i_pending && !(ithd->i_flags & MIT_DEAD)) { + if (!ithd->i_pending) { thread_lock(td); if (ithd->i_pending) { thread_unlock(td); From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 05:11:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C8E61065676; Tue, 26 Jan 2010 05:11:48 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0808FC1F; Tue, 26 Jan 2010 05:11:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q5Bm8W086973; Tue, 26 Jan 2010 05:11:48 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q5BmpV086970; Tue, 26 Jan 2010 05:11:48 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001260511.o0Q5BmpV086970@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Jan 2010 05:11: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: r203009 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 05:11:48 -0000 Author: rrs Date: Tue Jan 26 05:11:48 2010 New Revision: 203009 URL: http://svn.freebsd.org/changeset/base/203009 Log: To prevent a LOR we need to pass in a lock flag in the pic routines. In some places we hold the pic lock, others we do not. Modified: head/sys/mips/rmi/intr_machdep.c head/sys/mips/rmi/pic.h Modified: head/sys/mips/rmi/intr_machdep.c ============================================================================== --- head/sys/mips/rmi/intr_machdep.c Tue Jan 26 05:10:10 2010 (r203008) +++ head/sys/mips/rmi/intr_machdep.c Tue Jan 26 05:11:48 2010 (r203009) @@ -147,17 +147,17 @@ cpu_intr(struct trapframe *tf) if ((i == IPI_AST) || (i == IPI_RENDEZVOUS) || (i == IPI_STOP) || (i == IPI_SMP_CALL_FUNCTION)) { write_c0_eirr64(1ULL << i); - pic_ack(i); + pic_ack(i,0); smp_handle_ipi(tf, i); - pic_delayed_ack(i); + pic_delayed_ack(i,0); continue; } #ifdef XLR_PERFMON if (i == IPI_PERFMON) { write_c0_eirr64(1ULL << i); - pic_ack(i); + pic_ack(i,0); xlr_perfmon_sampler(NULL); - pic_delayed_ack(i); + pic_delayed_ack(i,0); continue; } #endif @@ -167,7 +167,7 @@ cpu_intr(struct trapframe *tf) ie = mih->mih_event; write_c0_eirr64(1ULL << i); - pic_ack(i); + pic_ack(i, 0); if (!ie || TAILQ_EMPTY(&ie->ie_handlers)) { printf("stray interrupt %d\n", i); continue; @@ -175,7 +175,7 @@ cpu_intr(struct trapframe *tf) if (intr_event_handle(ie, tf) != 0) { printf("stray interrupt %d\n", i); } - pic_delayed_ack(i); + pic_delayed_ack(i, 0); } critical_exit(); } Modified: head/sys/mips/rmi/pic.h ============================================================================== --- head/sys/mips/rmi/pic.h Tue Jan 26 05:10:10 2010 (r203008) +++ head/sys/mips/rmi/pic.h Tue Jan 26 05:11:48 2010 (r203009) @@ -29,6 +29,8 @@ * RMI_BSD */ #ifndef _RMI_PIC_H_ #define _RMI_PIC_H_ +#include +__FBSDID("$FreeBSD$"); extern int rmi_spin_mutex_safe; @@ -202,44 +204,44 @@ extern struct mtx xlr_pic_lock; static __inline__ __uint32_t -pic_read_control(void) +pic_read_control(int haslock) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); __uint32_t reg; - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_lock_spin(&xlr_pic_lock); xlr_read_reg(mmio, PIC_CTRL); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_unlock_spin(&xlr_pic_lock); return reg; } static __inline__ void -pic_write_control(__uint32_t control) +pic_write_control(__uint32_t control, int haslock) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_lock_spin(&xlr_pic_lock); xlr_write_reg(mmio, PIC_CTRL, control); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_unlock_spin(&xlr_pic_lock); } static __inline__ void -pic_update_control(__uint32_t control) +pic_update_control(__uint32_t control, int haslock) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_lock_spin(&xlr_pic_lock); xlr_write_reg(mmio, PIC_CTRL, (control | xlr_read_reg(mmio, PIC_CTRL))); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_unlock_spin(&xlr_pic_lock); } static __inline__ void -pic_ack(int irq) +pic_ack(int irq, int haslock) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); @@ -248,10 +250,10 @@ pic_ack(int irq) return; if (PIC_IRQ_IS_EDGE_TRIGGERED(irq)) { - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_lock_spin(&xlr_pic_lock); xlr_write_reg(mmio, PIC_INT_ACK, (1 << (irq - PIC_IRQ_BASE))); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_unlock_spin(&xlr_pic_lock); return; } @@ -259,7 +261,7 @@ pic_ack(int irq) } static inline void -pic_delayed_ack(int irq) +pic_delayed_ack(int irq, int haslock) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); @@ -267,10 +269,10 @@ pic_delayed_ack(int irq) return; if (!PIC_IRQ_IS_EDGE_TRIGGERED(irq)) { - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe)&& (haslock == 0)) mtx_lock_spin(&xlr_pic_lock); xlr_write_reg(mmio, PIC_INT_ACK, (1 << (irq - PIC_IRQ_BASE))); - if (rmi_spin_mutex_safe) + if ((rmi_spin_mutex_safe) && (haslock == 0)) mtx_unlock_spin(&xlr_pic_lock); return; } From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 05:14:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D19F1106566B; Tue, 26 Jan 2010 05:14:50 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C25EE8FC16; Tue, 26 Jan 2010 05:14:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q5EoxT087690; Tue, 26 Jan 2010 05:14:50 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q5EoVg087688; Tue, 26 Jan 2010 05:14:50 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001260514.o0Q5EoVg087688@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Jan 2010 05:14:50 +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: r203010 - head/sys/mips/rmi/dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 05:14:50 -0000 Author: rrs Date: Tue Jan 26 05:14:50 2010 New Revision: 203010 URL: http://svn.freebsd.org/changeset/base/203010 Log: 1) Make sure static is init'd to 0 2) In one place make sure we call the backup startup routine (from the timer). Modified: head/sys/mips/rmi/dev/xlr/rge.c Modified: head/sys/mips/rmi/dev/xlr/rge.c ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.c Tue Jan 26 05:11:48 2010 (r203009) +++ head/sys/mips/rmi/dev/xlr/rge.c Tue Jan 26 05:14:50 2010 (r203010) @@ -1686,7 +1686,7 @@ mac_frin_replenish(void *args /* ignored #endif } -static volatile uint32_t g_tx_frm_tx_ok; +static volatile uint32_t g_tx_frm_tx_ok=0; static void rge_tx_bkp_func(void *arg, int npending) @@ -1835,6 +1835,8 @@ xlr_tx_q_wakeup(void *addr) } } } + if (atomic_cmpset_int(&g_tx_frm_tx_ok, 0, 1)) + rge_tx_bkp_func(NULL, 0); callout_reset(&xlr_tx_stop_bkp, 5 * hz, xlr_tx_q_wakeup, NULL); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 05:17:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A384F106568B; Tue, 26 Jan 2010 05:17:03 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 946398FC19; Tue, 26 Jan 2010 05:17:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q5H3sV088225; Tue, 26 Jan 2010 05:17:03 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q5H3SP088223; Tue, 26 Jan 2010 05:17:03 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001260517.o0Q5H3SP088223@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Jan 2010 05:17:03 +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: r203011 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 05:17:03 -0000 Author: rrs Date: Tue Jan 26 05:17:03 2010 New Revision: 203011 URL: http://svn.freebsd.org/changeset/base/203011 Log: My current conf, that comes up but locks up in make buildworld. You need to follow the mips wiki for building the nfs partition and setup things to mount there (in the conf and in your bootp setup). Modified: head/sys/mips/conf/XLR Modified: head/sys/mips/conf/XLR ============================================================================== --- head/sys/mips/conf/XLR Tue Jan 26 05:14:50 2010 (r203010) +++ head/sys/mips/conf/XLR Tue Jan 26 05:17:03 2010 (r203011) @@ -79,10 +79,10 @@ options BOOTP_NFSROOT options BOOTP_NFSV3 options BOOTP_WIRED_TO=rge0 options BOOTP_COMPAT -options ROOTDEVNAME=\"nfs:10.1.1.15:/extra/nfsroot\" +options ROOTDEVNAME=\"nfs:10.1.1.8:/usr/extra/nfsroot\" # #options MD_ROOT # MD is a potential root device -#options MD_ROOT_SIZE=21264 +#options MD_ROOT_SIZE=27000 #options MD_ROOT_SIZE=5120 #options ROOTDEVNAME=\"ufs:md0\" options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions @@ -96,8 +96,8 @@ options DDB options KDB options GDB options ALT_BREAK_TO_DEBUGGER -#options INVARIANTS #Enable calls of extra sanity checking -#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed #options KTR # ktr(4) and ktrdump(8) support @@ -110,10 +110,9 @@ device pci #device ata #device atadisk #options XLR_PERFMON # Enable XLR processor activity monitoring - +options BREAK_TO_DEBUGGER #device genclock device uart - # Pseudo device loop device random From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 06:10:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F54106566B; Tue, 26 Jan 2010 06:10:49 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from expo.ukrweb.net (mail.univua.net [91.202.128.78]) by mx1.freebsd.org (Postfix) with ESMTP id AD1498FC27; Tue, 26 Jan 2010 06:10:48 +0000 (UTC) Received: from [24.87.52.209] (helo=lair.bluezbox.com) by expo.ukrweb.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NZdyR-000Gb7-Jm; Tue, 26 Jan 2010 07:28:27 +0200 Message-ID: <4B5E7D11.7000602@bluezbox.com> Date: Mon, 25 Jan 2010 21:26:41 -0800 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Randall Stewart References: <201001260514.o0Q5EoVg087688@svn.freebsd.org> In-Reply-To: <201001260514.o0Q5EoVg087688@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.87.52.209 X-SA-Exim-Mail-From: gonzo@bluezbox.com X-SA-Exim-Scanned: No (on expo.ukrweb.net); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203010 - head/sys/mips/rmi/dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 06:10:49 -0000 Randall Stewart wrote: > Author: rrs > Date: Tue Jan 26 05:14:50 2010 > New Revision: 203010 > URL: http://svn.freebsd.org/changeset/base/203010 > > Log: > 1) Make sure static is init'd to 0 > Static variables without initializer should be zero-initialized by loader. I believe RMI loader does not zero .bss/.sbss segments so you should do it manually in platform_start to ensure that all static variable are zeroed to prevent side-effects. Check platform_start from ar71xx/ar71xx_machdep.c, for example. From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 06:52:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F011106566C; Tue, 26 Jan 2010 06:52:29 +0000 (UTC) (envelope-from rfarmer@predatorlabs.net) Received: from mail-qy0-f176.google.com (mail-qy0-f176.google.com [209.85.221.176]) by mx1.freebsd.org (Postfix) with ESMTP id EB3EF8FC08; Tue, 26 Jan 2010 06:52:28 +0000 (UTC) Received: by qyk6 with SMTP id 6so2598148qyk.3 for ; Mon, 25 Jan 2010 22:52:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.74.209 with SMTP id v17mr4700776qaj.44.1264487120452; Mon, 25 Jan 2010 22:25:20 -0800 (PST) X-Originating-IP: [128.95.133.190] In-Reply-To: <201001231554.o0NFsMbx049837@svn.freebsd.org> References: <201001231554.o0NFsMbx049837@svn.freebsd.org> Date: Mon, 25 Jan 2010 22:25:20 -0800 Message-ID: From: Rob Farmer To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202889 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 06:52:29 -0000 On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: > Author: attilio > Date: Sat Jan 23 15:54:21 2010 > New Revision: 202889 > URL: http://svn.freebsd.org/changeset/base/202889 > > Log: > =A0- Fix a race in sched_switch() of sched_4bsd. > =A0 =A0In the case of the thread being on a sleepqueue or a turnstile, th= e > =A0 =A0sched_lock was acquired (without the aid of the td_lock interface)= and > =A0 =A0the td_lock was dropped. This was going to break locking rules on = other > =A0 =A0threads willing to access to the thread (via the td_lock interface= ) and > =A0 =A0modify his flags (allowed as long as the container lock was differ= ent > =A0 =A0by the one used in sched_switch). > =A0 =A0In order to prevent this situation, while sched_lock is acquired t= here > =A0 =A0the td_lock gets blocked. [0] > =A0- Merge the ULE's internal function thread_block_switch() into the glo= bal > =A0 =A0thread_lock_block() and make the former semantic as the default fo= r > =A0 =A0thread_lock_block(). This means that thread_lock_block() will not > =A0 =A0disable interrupts when called (and consequently thread_unlock_blo= ck() > =A0 =A0will not re-enabled them when called). This should be done manuall= y > =A0 =A0when necessary. > =A0 =A0Note, however, that ULE's thread_unblock_switch() is not reaped > =A0 =A0because it does reflect a difference in semantic due in ULE (the > =A0 =A0td_lock may not be necessarilly still blocked_lock when calling th= is). > =A0 =A0While asymmetric, it does describe a remarkable difference in sema= ntic > =A0 =A0that is good to keep in mind. > > =A0[0] Reported by: =A0 =A0 =A0Kohji Okuno > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0Tested by: =A0 =A0 =A0 =A0 =A0 =A0Giovanni Trematerra > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0MFC: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A02 weeks > > Modified: > =A0head/sys/kern/kern_mutex.c > =A0head/sys/kern/sched_4bsd.c > =A0head/sys/kern/sched_ule.c Hi, This commit seems to be causing me a kernel panic on sparc64 - details are in PR 143215. Could you take a look before MFCing this? Thanks, --=20 Rob Farmer From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 07:10:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73D20106568B; Tue, 26 Jan 2010 07:10:33 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f204.google.com (mail-iw0-f204.google.com [209.85.223.204]) by mx1.freebsd.org (Postfix) with ESMTP id 0BBF88FC1B; Tue, 26 Jan 2010 07:10:32 +0000 (UTC) Received: by iwn42 with SMTP id 42so1346875iwn.9 for ; Mon, 25 Jan 2010 23:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=pGyYfaeVRa5dt4QVI9ZVbEYVXIBfNaZcGdrBzPjsF50=; b=qI/MKLD22bbOfb+i5yXjENTMucDE6Y2tQgVpT0KyeJn7r0hwC02OW45QW1lFZ1xQBQ hqf+MYcVpmTEGzYmT+F12YuDrvKFyeBUCrFsyJbtESDzGh68cys+XaQdfeK9twB4oyYM NYeD3pGvrBrw5vQmPEyCdNgyrMBulpoZ3ohl8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=uruaWmGV6PVS9d/EC8qF2zUxAn4kZfWpXXurlvDAFytOIa+dq+6Vs0zVI41bxKZ8If eDL0xjDTf+gs86+vSWE5zMRq0qqxjXM5CkpHS6x/TaVmCcpEo3cs1dL/ry/2cpND6l+L gb5fQ+q7uxmef0I8wNCKDKe7d9pORPrPBfyag= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.159.129 with SMTP id j1mr48278ibx.81.1264489825184; Mon, 25 Jan 2010 23:10:25 -0800 (PST) In-Reply-To: References: <201001231554.o0NFsMbx049837@svn.freebsd.org> Date: Tue, 26 Jan 2010 08:10:25 +0100 X-Google-Sender-Auth: 27597bf6ad1e375e Message-ID: <3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com> From: Attilio Rao To: Rob Farmer Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marius Strobl Subject: Re: svn commit: r202889 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 07:10:33 -0000 2010/1/26 Rob Farmer : > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao wrote: >> Author: attilio >> Date: Sat Jan 23 15:54:21 2010 >> New Revision: 202889 >> URL: http://svn.freebsd.org/changeset/base/202889 >> >> Log: >> =C2=A0- Fix a race in sched_switch() of sched_4bsd. >> =C2=A0 =C2=A0In the case of the thread being on a sleepqueue or a turnst= ile, the >> =C2=A0 =C2=A0sched_lock was acquired (without the aid of the td_lock int= erface) and >> =C2=A0 =C2=A0the td_lock was dropped. This was going to break locking ru= les on other >> =C2=A0 =C2=A0threads willing to access to the thread (via the td_lock in= terface) and >> =C2=A0 =C2=A0modify his flags (allowed as long as the container lock was= different >> =C2=A0 =C2=A0by the one used in sched_switch). >> =C2=A0 =C2=A0In order to prevent this situation, while sched_lock is acq= uired there >> =C2=A0 =C2=A0the td_lock gets blocked. [0] >> =C2=A0- Merge the ULE's internal function thread_block_switch() into the= global >> =C2=A0 =C2=A0thread_lock_block() and make the former semantic as the def= ault for >> =C2=A0 =C2=A0thread_lock_block(). This means that thread_lock_block() wi= ll not >> =C2=A0 =C2=A0disable interrupts when called (and consequently thread_unl= ock_block() >> =C2=A0 =C2=A0will not re-enabled them when called). This should be done = manually >> =C2=A0 =C2=A0when necessary. >> =C2=A0 =C2=A0Note, however, that ULE's thread_unblock_switch() is not re= aped >> =C2=A0 =C2=A0because it does reflect a difference in semantic due in ULE= (the >> =C2=A0 =C2=A0td_lock may not be necessarilly still blocked_lock when cal= ling this). >> =C2=A0 =C2=A0While asymmetric, it does describe a remarkable difference = in semantic >> =C2=A0 =C2=A0that is good to keep in mind. >> >> =C2=A0[0] Reported by: =C2=A0 =C2=A0 =C2=A0Kohji Okuno >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 >> =C2=A0Tested by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Giovanni Trema= terra >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 >> =C2=A0MFC: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A02 weeks >> >> Modified: >> =C2=A0head/sys/kern/kern_mutex.c >> =C2=A0head/sys/kern/sched_4bsd.c >> =C2=A0head/sys/kern/sched_ule.c > > Hi, > > This commit seems to be causing me a kernel panic on sparc64 - details > are in PR 143215. Could you take a look before MFCing this? I think that the bug may be in cpu_switch() where the mutex parameter for sched_4bsd is not handled correctly. Does sparc64 support ULE? I don't think it does and I think that it simply ignores the third argument of cpu_switch() which is vital now for for sched_4bsd too (what needs to happen is to take the passed mutex and to set the TD_LOCK of old thread to be the third argument). Unluckilly, I can't do that in sparc64 asm right now, but it should not be too difficult to cope with it. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 08:58:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97DB9106566B; Tue, 26 Jan 2010 08:58:46 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f204.google.com (mail-iw0-f204.google.com [209.85.223.204]) by mx1.freebsd.org (Postfix) with ESMTP id 24DBC8FC08; Tue, 26 Jan 2010 08:58:45 +0000 (UTC) Received: by iwn42 with SMTP id 42so1398432iwn.9 for ; Tue, 26 Jan 2010 00:58:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=NE/dorMO5TIW8lFrzzZJmZsKcPoyQjJWRF9FuRRMRI0=; b=C7PkqBLurocJYtHViXU8AN7T6L6CEPOYY0BL2HlVgtL7s1gvnbQCK6YEdwVFM4empu MMm+teKB/X5Wc+nb5penYuFh4cKZZZg6IevwbxUTOjM5phG6bTfHMFPIeWtRsj73X5gW GC8zCq5OHLkZqZIr7/DkTNMJyZgBq9Sc1+Z/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=cV4RarMDFMZOQ04KWwC/Hi/iDjo1UA5wVdwUOkWxAdeHgpYoVqfxHn8Y4lFKWp5OBy hgWbc39rUCIjW8G5JL16Lh+M+z6HPi/jtAZBDigUttf2Tu5lR9JV5OMTutiPx6xcWoiA BPDOwkAvcTqHc7ATQi8xSsx1dU0frP57Gk0RA= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.154.207 with SMTP id p15mr653977ibw.91.1264496325328; Tue, 26 Jan 2010 00:58:45 -0800 (PST) In-Reply-To: <201001251456.32459.jhb@freebsd.org> References: <201001231554.o0NFsMbx049837@svn.freebsd.org> <201001251456.32459.jhb@freebsd.org> Date: Tue, 26 Jan 2010 09:58:45 +0100 X-Google-Sender-Auth: 047d2549abd65718 Message-ID: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com> From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r202889 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 08:58:46 -0000 2010/1/25 John Baldwin : > On Saturday 23 January 2010 10:54:22 am Attilio Rao wrote: >> Author: attilio >> Date: Sat Jan 23 15:54:21 2010 >> New Revision: 202889 >> URL: http://svn.freebsd.org/changeset/base/202889 >> >> Log: >> =C2=A0 - Fix a race in sched_switch() of sched_4bsd. >> =C2=A0 =C2=A0 In the case of the thread being on a sleepqueue or a turns= tile, the >> =C2=A0 =C2=A0 sched_lock was acquired (without the aid of the td_lock in= terface) and >> =C2=A0 =C2=A0 the td_lock was dropped. This was going to break locking r= ules on other >> =C2=A0 =C2=A0 threads willing to access to the thread (via the td_lock i= nterface) and >> =C2=A0 =C2=A0 modify his flags (allowed as long as the container lock wa= s different >> =C2=A0 =C2=A0 by the one used in sched_switch). >> =C2=A0 =C2=A0 In order to prevent this situation, while sched_lock is ac= quired there >> =C2=A0 =C2=A0 the td_lock gets blocked. [0] >> =C2=A0 - Merge the ULE's internal function thread_block_switch() into th= e global >> =C2=A0 =C2=A0 thread_lock_block() and make the former semantic as the de= fault for >> =C2=A0 =C2=A0 thread_lock_block(). This means that thread_lock_block() w= ill not >> =C2=A0 =C2=A0 disable interrupts when called (and consequently thread_un= lock_block() >> =C2=A0 =C2=A0 will not re-enabled them when called). This should be done= manually >> =C2=A0 =C2=A0 when necessary. >> =C2=A0 =C2=A0 Note, however, that ULE's thread_unblock_switch() is not r= eaped >> =C2=A0 =C2=A0 because it does reflect a difference in semantic due in UL= E (the >> =C2=A0 =C2=A0 td_lock may not be necessarilly still blocked_lock when ca= lling this). >> =C2=A0 =C2=A0 While asymmetric, it does describe a remarkable difference= in semantic >> =C2=A0 =C2=A0 that is good to keep in mind. > > Does this affect the various #ifdef's for handling the third argument to > cpu_switch()? =C2=A0E.g. does 4BSD need to spin if td_lock is &blocked_lo= ck? > > Also, BLOCK_SPIN() on x86 is non-optimal. =C2=A0It should not do cmpxchg = in a loop. > Instead, it should do cmp in a loop, and if the cmp succeeds, then try > cmpxchg. [CC'ing imp@ because he made a similar question privately] Basically it is recounduited to the difference, in terms of runqueue between sched_4bsd and sched_ule. sched_ule has one runqueue per-core and sched_4bsd has just one runqueue. The codepath you are referring to, for the ULE case, is used when threads need to migrate from one cpu to another. What should really happen is that threads should be both locked (thus the runqueues where the in & out threads are present should be both locked) but it will create cyclic LOR and then a 'blocked_lock' is used (in order to avoid such LORs). When you are switching in a thread caming from another CPU you need to make sure its lock already changed to, possibly, the new runqueue one (by the CPU where it *was* running that is going to switch it out). That happens because we have not a global interlock between the CPUs and thread migration gets a bit trickier. Said that, the !SMP case just assume there is one runqueue, so this discussion is not useful (you won't have different runqueues from where the thread may be caming, but just one protected by sched_lock). Also sched_4bsd has just one runqueue, thus this discussion should not apply there. What the last 4bsd patch does is to keep track of the 'old' thread_lock and assign it to the switched out thread, which may now be blocked, when it is safe to do that (after the tlb shootdown in ia32/amd64 cpu_switch() case). However, this may generate a bit of confusion, because 'blocked' has a different meaning between the 2 cases: * ULE does that in order to prevent LOR between runqueues CPUs. * 4BSD now does that in order to be able to not end with 2 spinlocks held in some cases (note: this is not a LOR because there is the well defined order of sq_lock/ts_lock -> sched_lock) but it makes cpu_switch() simpler, faster and reduces contention. It is enough that cpu_switch() does handle the third argument properly and sets back the old lock when it is safe. I see, however, that this may be a problem for architectures that were just supporting 4BSD and not ULE (at least to some extent), like in the sparc64 case. If an architecture does not ignore the third argument of cpu_switch() and does set it properly there should be a problem with sched_4bsd. I should probabilly poke the maintainers of any arch and check with them if there are further problems. Finally, I really don't think the BLOCK_SPIN() performance improvement you suggest should really make a difference (assuming how rarely it should happen) because, please note, that the cmpxchg is necessary as we need to enforce a memory barrier when doing the check in anyway (so the first case should be however an atomic_cmpset_X_Y()). Last thinking: it is not a very good idea cpu_switch() is made conditional in regard of schedulers, but there is not an easy way to do that as long as the safe points for releasing blocked_lock happens within cpu_switch(). I think that is one of the reasons why some people (maybe you or Jeff) pushed for having cpu_switch() made in C. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 09:20:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35622106568F; Tue, 26 Jan 2010 09:20:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5DD8FC17; Tue, 26 Jan 2010 09:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q9KXC9041719; Tue, 26 Jan 2010 09:20:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q9KX7H041717; Tue, 26 Jan 2010 09:20:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001260920.o0Q9KX7H041717@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Jan 2010 09:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203014 - stable/8/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 09:20:34 -0000 Author: kib Date: Tue Jan 26 09:20:33 2010 New Revision: 203014 URL: http://svn.freebsd.org/changeset/base/203014 Log: MFC r202884: Document pthread_timedjoin_np. Note implementation-defined EOPNOTSUPP error [1]. Modified: stable/8/share/man/man3/pthread_join.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/pthread_join.3 ============================================================================== --- stable/8/share/man/man3/pthread_join.3 Tue Jan 26 06:45:38 2010 (r203013) +++ stable/8/share/man/man3/pthread_join.3 Tue Jan 26 09:20:33 2010 (r203014) @@ -30,11 +30,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 1996 +.Dd January 23, 2010 .Dt PTHREAD_JOIN 3 .Os .Sh NAME -.Nm pthread_join +.Nm pthread_join , +.Nm pthread_timedjoin_np .Nd wait for thread termination .Sh LIBRARY .Lb libpthread @@ -42,6 +43,8 @@ .In pthread.h .Ft int .Fn pthread_join "pthread_t thread" "void **value_ptr" +.Ft int +.Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" .Sh DESCRIPTION The .Fn pthread_join @@ -70,18 +73,30 @@ If the thread calling .Fn pthread_join is cancelled, then the target thread is not detached. .Pp +The +.Fn pthread_timedjoin_np +function is equivalent to the +.Fn pthread_join +function except it will return +.Er ETIMEDOUT +if target thread does not exit before specified absolute time passes. +.Pp A thread that has exited but remains unjoined counts against [_POSIX_THREAD_THREADS_MAX]. .Sh RETURN VALUES If successful, the .Fn pthread_join -function will return zero. +and +.Fn pthread_timedjoin_np +functions will return zero. Otherwise an error number will be returned to indicate the error. .Sh ERRORS The .Fn pthread_join -function will fail if: +and +.Fn pthread_timedjoin_np +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The implementation has detected that the value specified by @@ -95,6 +110,19 @@ thread ID, A deadlock was detected or the value of .Fa thread specifies the calling thread. +.It Bq Er EOPNOTSUPP +The implementation detected that another caller is already waiting on +.Fa thread . +.El +.Pp +Additionally, the +.Fn pthread_join +function will fail if: +.Bl -tag -width Er +.It Bq Er ETIMEDOUT +The specified absolute time passed while +.Fn pthread_timedjoin_np +waited for thread exit. .El .Sh SEE ALSO .Xr wait 2 , @@ -104,3 +132,9 @@ The .Fn pthread_join function conforms to .St -p1003.1-96 . +The +.Fn pthread_timedjoin_np +is +.Fx +extension, first appeared in +.Fx 6.1 . From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 09:37:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19EED1065679; Tue, 26 Jan 2010 09:37:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07EE68FC0C; Tue, 26 Jan 2010 09:37:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q9bpVW045578; Tue, 26 Jan 2010 09:37:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0Q9bpFV045576; Tue, 26 Jan 2010 09:37:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001260937.o0Q9bpFV045576@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Jan 2010 09:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203015 - stable/7/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 09:37:52 -0000 Author: kib Date: Tue Jan 26 09:37:51 2010 New Revision: 203015 URL: http://svn.freebsd.org/changeset/base/203015 Log: MFC r202884: Document pthread_timedjoin_np. Note implementation-defined EOPNOTSUPP error [1]. Approved by: re (bz) Modified: stable/7/share/man/man3/pthread_join.3 Directory Properties: stable/7/share/man/man3/ (props changed) Modified: stable/7/share/man/man3/pthread_join.3 ============================================================================== --- stable/7/share/man/man3/pthread_join.3 Tue Jan 26 09:20:33 2010 (r203014) +++ stable/7/share/man/man3/pthread_join.3 Tue Jan 26 09:37:51 2010 (r203015) @@ -30,11 +30,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 1996 +.Dd January 23, 2010 .Dt PTHREAD_JOIN 3 .Os .Sh NAME -.Nm pthread_join +.Nm pthread_join , +.Nm pthread_timedjoin_np .Nd wait for thread termination .Sh LIBRARY .Lb libpthread @@ -42,6 +43,8 @@ .In pthread.h .Ft int .Fn pthread_join "pthread_t thread" "void **value_ptr" +.Ft int +.Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" .Sh DESCRIPTION The .Fn pthread_join @@ -70,18 +73,30 @@ If the thread calling .Fn pthread_join is cancelled, then the target thread is not detached. .Pp +The +.Fn pthread_timedjoin_np +function is equivalent to the +.Fn pthread_join +function except it will return +.Er ETIMEDOUT +if target thread does not exit before specified absolute time passes. +.Pp A thread that has exited but remains unjoined counts against [_POSIX_THREAD_THREADS_MAX]. .Sh RETURN VALUES If successful, the .Fn pthread_join -function will return zero. +and +.Fn pthread_timedjoin_np +functions will return zero. Otherwise an error number will be returned to indicate the error. .Sh ERRORS The .Fn pthread_join -function will fail if: +and +.Fn pthread_timedjoin_np +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The implementation has detected that the value specified by @@ -95,6 +110,19 @@ thread ID, A deadlock was detected or the value of .Fa thread specifies the calling thread. +.It Bq Er EOPNOTSUPP +The implementation detected that another caller is already waiting on +.Fa thread . +.El +.Pp +Additionally, the +.Fn pthread_join +function will fail if: +.Bl -tag -width Er +.It Bq Er ETIMEDOUT +The specified absolute time passed while +.Fn pthread_timedjoin_np +waited for thread exit. .El .Sh SEE ALSO .Xr wait 2 , @@ -104,3 +132,9 @@ The .Fn pthread_join function conforms to .St -p1003.1-96 . +The +.Fn pthread_timedjoin_np +is +.Fx +extension, first appeared in +.Fx 6.1 . From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 10:00:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 625CA106566B; Tue, 26 Jan 2010 10:00:27 +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 386138FC15; Tue, 26 Jan 2010 10:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QA0RKb050642; Tue, 26 Jan 2010 10:00:27 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QA0RZG050640; Tue, 26 Jan 2010 10:00:27 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001261000.o0QA0RZG050640@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 26 Jan 2010 10:00:27 +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: r203016 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 10:00:27 -0000 Author: ru Date: Tue Jan 26 10:00:26 2010 New Revision: 203016 URL: http://svn.freebsd.org/changeset/base/203016 Log: Regen the list of prebuild libraries using tools/make_libdeps.sh. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jan 26 09:37:51 2010 (r203015) +++ head/Makefile.inc1 Tue Jan 26 10:00:26 2010 (r203016) @@ -1105,19 +1105,19 @@ _startup_libs+= lib/libc gnu/lib/libgcc__L: lib/libc__L -_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ - ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libroken} \ - ${_kerberos5_lib_libheimntlm} ${_kerberos5_lib_libgssapi_krb5} \ - lib/libbz2 lib/libcom_err lib/libcrypt lib/libelf \ +_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \ + ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ + ${_kerberos5_lib_libroken} \ + lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libexpat \ - ${_lib_cddl} ${_lib_libgssapi} ${_lib_libipx} \ + ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ - ${_secure_lib_libssl} lib/libdwarf lib/libproc + ${_secure_lib_libssl} .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr @@ -1136,17 +1136,13 @@ _cddl_lib= cddl/lib _secure_lib_libcrypto= secure/lib/libcrypto _secure_lib_libssl= secure/lib/libssl lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L -.if ${MK_KERBEROS} != "no" -kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ - kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ - lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ - lib/libcrypt__L -.endif .if ${MK_OPENSSH} != "no" _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS_SUPPORT} != "no" -secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libgssapi_krb5__L +secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ + kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ + lib/libmd__L kerberos5/lib/libroken__L .endif .endif .endif @@ -1168,7 +1164,6 @@ _kerberos5_lib_libkrb5= kerberos5/lib/li _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm -_kerberos5_lib_libgssapi_krb5= kerberos5/lib/libgssapi_krb5 .endif .if ${MK_NIS} != "no" From owner-svn-src-all@FreeBSD.ORG Tue Jan 26 10:58:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B36E9106566B; Tue, 26 Jan 2010 10:58:58 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A14C88FC1A; Tue, 26 Jan 2010 10:58:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QAww3C068810; Tue, 26 Jan 2010 10:58:58 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QAwwB2068809; Tue, 26 Jan 2010 10:58:58 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001261058.o0QAwwB2068809@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 26 Jan 2010 10:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203017 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 10:58:58 -0000 Author: edwin Date: Tue Jan 26 10:58:58 2010 New Revision: 203017 URL: http://svn.freebsd.org/changeset/base/203017 Log: Vendor import of tzdata2010b: Mexico's House of Representatives has approved a proposal for northern Mexico's border cities to share the same daylight saving schedule as the United States. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/northamerica vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Tue Jan 26 10:00:26 2010 (r203016) +++ vendor/tzdata/dist/northamerica Tue Jan 26 10:58:58 2010 (r203017) @@ -1,5 +1,5 @@ #
-# @(#)northamerica	8.28
+# @(#)northamerica	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1955,6 +1955,58 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 
 # http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
 # confirms this.  Sonora as usual is the only state where DST is not applied.
 
+# From Steffen Thorsen (2009-12-28):
+#
+# Steffen Thorsen wrote:
+# > Mexico's House of Representatives has approved a proposal for northern
+# > Mexico's border cities to share the same daylight saving schedule as
+# > the United States.
+# Now this has passed both the Congress and the Senate, so starting from
+# 2010, some border regions will be the same:
+# 
+# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/
+# 
+# 
+# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939
+# 
+# (Spanish)
+#
+# Could not find the new law text, but the proposed law text changes are here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf
+# 
+# (Gaceta Parlamentaria)
+#
+# There is also a list of the votes here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
+# 
+#
+# Our page:
+# 
+# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# 
+
+# From Arthur David Olson (2010-01-20):
+# The page
+# 
+# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
+# 
+# includes this text:
+# En los municipios fronterizos de Tijuana y Mexicali en Baja California;
+# Juárez y Ojinaga en Chihuahua; Acuña y Piedras Negras en Coahuila;
+# Anáhuac en Nuevo León; y Nuevo Laredo, Reynosa y Matamoros en
+# Tamaulipas, la aplicación de este horario estacional surtirá efecto
+# desde las dos horas del segundo domingo de marzo y concluirá a las dos
+# horas del primer domingo de noviembre.
+# En los municipios fronterizos que se encuentren ubicados en la franja
+# fronteriza norte en el territorio comprendido entre la línea
+# internacional y la línea paralela ubicada a una distancia de veinte
+# kilómetros, así como la Ciudad de Ensenada, Baja California, hacia el
+# interior del país, la aplicación de este horario estacional surtirá
+# efecto desde las dos horas del segundo domingo de marzo y concluirá a
+# las dos horas del primer domingo de noviembre.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
@@ -1981,13 +2033,19 @@ Zone America/Merida	-5:58:28 -	LMT	1922 
 			-6:00	-	CST	1981 Dec 23
 			-5:00	-	EST	1982 Dec  2
 			-6:00	Mexico	C%sT
-# Coahuila, Durango, Nuevo Leon, Tamaulipas
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (near US border)
+Zone America/Matamoros	-6:40:00 -	LMT	1921 Dec 31 23:20:00
+			-6:00	-	CST	1988
+			-6:00	US	C%sT	1989
+			-6:00	Mexico	C%sT	2010
+			-6:00	US	C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (away from US border)
 Zone America/Monterrey	-6:41:16 -	LMT	1921 Dec 31 23:18:44
 			-6:00	-	CST	1988
 			-6:00	US	C%sT	1989
 			-6:00	Mexico	C%sT
 # Central Mexico
-Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
+Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1 0:23:24
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
@@ -1996,7 +2054,19 @@ Zone America/Mexico_City -6:36:36 -	LMT	
 			-6:00	Mexico	C%sT	2001 Sep 30 02:00
 			-6:00	-	CST	2002 Feb 20
 			-6:00	Mexico	C%sT
-# Chihuahua
+# Chihuahua (near US border)
+Zone America/Ojinaga	-6:57:40 -	LMT	1922 Jan 1 0:02:20
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1996
+			-6:00	Mexico	C%sT	1998
+			-6:00	-	CST	1998 Apr Sun>=1 3:00
+			-7:00	Mexico	M%sT	2010
+			-7:00	US	M%sT
+# Chihuahua (away from US border)
 Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2030,7 +2100,7 @@ Zone America/Mazatlan	-7:05:40 -	LMT	192
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# Baja California
+# Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924
 			-8:00	-	PST	1927 Jun 10 23:00
@@ -2048,6 +2118,26 @@ Zone America/Tijuana	-7:48:04 -	LMT	1922
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT	2001
 			-8:00	US	P%sT	2002 Feb 20
+			-8:00	Mexico	P%sT	2010
+			-8:00	US	P%sT
+# Baja California (away from US border)
+Zone America/Santa_Isabel	-7:39:28 -	LMT	1922 Jan  1  0:20:32
+			-7:00	-	MST	1924
+			-8:00	-	PST	1927 Jun 10 23:00
+			-7:00	-	MST	1930 Nov 15
+			-8:00	-	PST	1931 Apr  1
+			-8:00	1:00	PDT	1931 Sep 30
+			-8:00	-	PST	1942 Apr 24
+			-8:00	1:00	PWT	1945 Aug 14 23:00u
+			-8:00	1:00	PPT	1945 Nov 12 # Peace
+			-8:00	-	PST	1948 Apr  5
+			-8:00	1:00	PDT	1949 Jan 14
+			-8:00	-	PST	1954
+			-8:00	CA	P%sT	1961
+			-8:00	-	PST	1976
+			-8:00	US	P%sT	1996
+			-8:00	Mexico	P%sT	2001
+			-8:00	US	P%sT	2002 Feb 20
 			-8:00	Mexico	P%sT
 # From Paul Eggert (2006-03-22):
 # Formerly there was an America/Ensenada zone, which differed from

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Tue Jan 26 10:00:26 2010	(r203016)
+++ vendor/tzdata/dist/zone.tab	Tue Jan 26 10:58:58 2010	(r203017)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.31
+# @(#)zone.tab	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -279,11 +279,14 @@ MW	-1547+03500	Africa/Blantyre
 MX	+1924-09909	America/Mexico_City	Central Time - most locations
 MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2058-08937	America/Merida	Central Time - Campeche, Yucatan
-MX	+2540-10019	America/Monterrey	Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX	+2540-10019	America/Monterrey	Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
+MX	+2550-09730	America/Matamoros	US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
 MX	+2313-10625	America/Mazatlan	Mountain Time - S Baja, Nayarit, Sinaloa
-MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
+MX	+2838-10605	America/Chihuahua	Mexican Mountain Time - Chihuahua away from US border
+MX	+2934-10425	America/Ojinaga	US Mountain Time - Chihuahua near US border
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
-MX	+3232-11701	America/Tijuana	Pacific Time
+MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
+MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 11:01:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7C6C61065786;
	Tue, 26 Jan 2010 11:01:22 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 526148FC20;
	Tue, 26 Jan 2010 11:01:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QB1Mom069404;
	Tue, 26 Jan 2010 11:01:22 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QB1M2m069403;
	Tue, 26 Jan 2010 11:01:22 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001261101.o0QB1M2m069403@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Jan 2010 11:01:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203018 - vendor/tzdata/tzdata2010b
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 11:01:22 -0000

Author: edwin
Date: Tue Jan 26 11:01:22 2010
New Revision: 203018
URL: http://svn.freebsd.org/changeset/base/203018

Log:
  Tag of tzdata2010b

Added:
  vendor/tzdata/tzdata2010b/
     - copied from r203017, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 11:12:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC0871065679;
	Tue, 26 Jan 2010 11:12:47 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B9BBF8FC17;
	Tue, 26 Jan 2010 11:12:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QBCl9f071931;
	Tue, 26 Jan 2010 11:12:47 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QBClbK071928;
	Tue, 26 Jan 2010 11:12:47 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001261112.o0QBClbK071928@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Jan 2010 11:12: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: r203019 - head/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 11:12:47 -0000

Author: edwin
Date: Tue Jan 26 11:12:47 2010
New Revision: 203019
URL: http://svn.freebsd.org/changeset/base/203019

Log:
  MFV of tzdata2010b, r203017
  
  Mexico's House of Representatives has approved a proposal for
  northern Mexico's border cities to share the same daylight saving
  schedule as the United States.
  
  MFC after:	now

Modified:
  head/share/zoneinfo/northamerica
  head/share/zoneinfo/zone.tab
Directory Properties:
  head/share/zoneinfo/   (props changed)

Modified: head/share/zoneinfo/northamerica
==============================================================================
--- head/share/zoneinfo/northamerica	Tue Jan 26 11:01:22 2010	(r203018)
+++ head/share/zoneinfo/northamerica	Tue Jan 26 11:12:47 2010	(r203019)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.28
+# @(#)northamerica	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1955,6 +1955,58 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 
 # http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
 # confirms this.  Sonora as usual is the only state where DST is not applied.
 
+# From Steffen Thorsen (2009-12-28):
+#
+# Steffen Thorsen wrote:
+# > Mexico's House of Representatives has approved a proposal for northern
+# > Mexico's border cities to share the same daylight saving schedule as
+# > the United States.
+# Now this has passed both the Congress and the Senate, so starting from
+# 2010, some border regions will be the same:
+# 
+# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/
+# 
+# 
+# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939
+# 
+# (Spanish)
+#
+# Could not find the new law text, but the proposed law text changes are here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf
+# 
+# (Gaceta Parlamentaria)
+#
+# There is also a list of the votes here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
+# 
+#
+# Our page:
+# 
+# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# 
+
+# From Arthur David Olson (2010-01-20):
+# The page
+# 
+# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
+# 
+# includes this text:
+# En los municipios fronterizos de Tijuana y Mexicali en Baja California;
+# Juárez y Ojinaga en Chihuahua; Acuña y Piedras Negras en Coahuila;
+# Anáhuac en Nuevo León; y Nuevo Laredo, Reynosa y Matamoros en
+# Tamaulipas, la aplicación de este horario estacional surtirá efecto
+# desde las dos horas del segundo domingo de marzo y concluirá a las dos
+# horas del primer domingo de noviembre.
+# En los municipios fronterizos que se encuentren ubicados en la franja
+# fronteriza norte en el territorio comprendido entre la línea
+# internacional y la línea paralela ubicada a una distancia de veinte
+# kilómetros, así como la Ciudad de Ensenada, Baja California, hacia el
+# interior del país, la aplicación de este horario estacional surtirá
+# efecto desde las dos horas del segundo domingo de marzo y concluirá a
+# las dos horas del primer domingo de noviembre.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
@@ -1981,13 +2033,19 @@ Zone America/Merida	-5:58:28 -	LMT	1922 
 			-6:00	-	CST	1981 Dec 23
 			-5:00	-	EST	1982 Dec  2
 			-6:00	Mexico	C%sT
-# Coahuila, Durango, Nuevo Leon, Tamaulipas
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (near US border)
+Zone America/Matamoros	-6:40:00 -	LMT	1921 Dec 31 23:20:00
+			-6:00	-	CST	1988
+			-6:00	US	C%sT	1989
+			-6:00	Mexico	C%sT	2010
+			-6:00	US	C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (away from US border)
 Zone America/Monterrey	-6:41:16 -	LMT	1921 Dec 31 23:18:44
 			-6:00	-	CST	1988
 			-6:00	US	C%sT	1989
 			-6:00	Mexico	C%sT
 # Central Mexico
-Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
+Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1 0:23:24
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
@@ -1996,7 +2054,19 @@ Zone America/Mexico_City -6:36:36 -	LMT	
 			-6:00	Mexico	C%sT	2001 Sep 30 02:00
 			-6:00	-	CST	2002 Feb 20
 			-6:00	Mexico	C%sT
-# Chihuahua
+# Chihuahua (near US border)
+Zone America/Ojinaga	-6:57:40 -	LMT	1922 Jan 1 0:02:20
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1996
+			-6:00	Mexico	C%sT	1998
+			-6:00	-	CST	1998 Apr Sun>=1 3:00
+			-7:00	Mexico	M%sT	2010
+			-7:00	US	M%sT
+# Chihuahua (away from US border)
 Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2030,7 +2100,7 @@ Zone America/Mazatlan	-7:05:40 -	LMT	192
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# Baja California
+# Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924
 			-8:00	-	PST	1927 Jun 10 23:00
@@ -2048,6 +2118,26 @@ Zone America/Tijuana	-7:48:04 -	LMT	1922
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT	2001
 			-8:00	US	P%sT	2002 Feb 20
+			-8:00	Mexico	P%sT	2010
+			-8:00	US	P%sT
+# Baja California (away from US border)
+Zone America/Santa_Isabel	-7:39:28 -	LMT	1922 Jan  1  0:20:32
+			-7:00	-	MST	1924
+			-8:00	-	PST	1927 Jun 10 23:00
+			-7:00	-	MST	1930 Nov 15
+			-8:00	-	PST	1931 Apr  1
+			-8:00	1:00	PDT	1931 Sep 30
+			-8:00	-	PST	1942 Apr 24
+			-8:00	1:00	PWT	1945 Aug 14 23:00u
+			-8:00	1:00	PPT	1945 Nov 12 # Peace
+			-8:00	-	PST	1948 Apr  5
+			-8:00	1:00	PDT	1949 Jan 14
+			-8:00	-	PST	1954
+			-8:00	CA	P%sT	1961
+			-8:00	-	PST	1976
+			-8:00	US	P%sT	1996
+			-8:00	Mexico	P%sT	2001
+			-8:00	US	P%sT	2002 Feb 20
 			-8:00	Mexico	P%sT
 # From Paul Eggert (2006-03-22):
 # Formerly there was an America/Ensenada zone, which differed from

Modified: head/share/zoneinfo/zone.tab
==============================================================================
--- head/share/zoneinfo/zone.tab	Tue Jan 26 11:01:22 2010	(r203018)
+++ head/share/zoneinfo/zone.tab	Tue Jan 26 11:12:47 2010	(r203019)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.31
+# @(#)zone.tab	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -279,11 +279,14 @@ MW	-1547+03500	Africa/Blantyre
 MX	+1924-09909	America/Mexico_City	Central Time - most locations
 MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2058-08937	America/Merida	Central Time - Campeche, Yucatan
-MX	+2540-10019	America/Monterrey	Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX	+2540-10019	America/Monterrey	Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
+MX	+2550-09730	America/Matamoros	US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
 MX	+2313-10625	America/Mazatlan	Mountain Time - S Baja, Nayarit, Sinaloa
-MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
+MX	+2838-10605	America/Chihuahua	Mexican Mountain Time - Chihuahua away from US border
+MX	+2934-10425	America/Ojinaga	US Mountain Time - Chihuahua near US border
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
-MX	+3232-11701	America/Tijuana	Pacific Time
+MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
+MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 11:15:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 413811065670;
	Tue, 26 Jan 2010 11:15:04 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E40A8FC17;
	Tue, 26 Jan 2010 11:15:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QBF44t072501;
	Tue, 26 Jan 2010 11:15:04 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QBF4Xq072497;
	Tue, 26 Jan 2010 11:15:04 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001261115.o0QBF4Xq072497@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Jan 2010 11:15:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203020 - stable/8/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 11:15:04 -0000

Author: edwin
Date: Tue Jan 26 11:15:03 2010
New Revision: 203020
URL: http://svn.freebsd.org/changeset/base/203020

Log:
  MFC of tzdata2010b, r203019
  
  Mexico's House of Representatives has approved a proposal for
  northern Mexico's border cities to share the same daylight saving
  schedule as the United States.

Modified:
  stable/8/share/zoneinfo/northamerica
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Tue Jan 26 11:12:47 2010	(r203019)
+++ stable/8/share/zoneinfo/northamerica	Tue Jan 26 11:15:03 2010	(r203020)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.28
+# @(#)northamerica	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1955,6 +1955,58 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 
 # http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
 # confirms this.  Sonora as usual is the only state where DST is not applied.
 
+# From Steffen Thorsen (2009-12-28):
+#
+# Steffen Thorsen wrote:
+# > Mexico's House of Representatives has approved a proposal for northern
+# > Mexico's border cities to share the same daylight saving schedule as
+# > the United States.
+# Now this has passed both the Congress and the Senate, so starting from
+# 2010, some border regions will be the same:
+# 
+# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/
+# 
+# 
+# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939
+# 
+# (Spanish)
+#
+# Could not find the new law text, but the proposed law text changes are here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf
+# 
+# (Gaceta Parlamentaria)
+#
+# There is also a list of the votes here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
+# 
+#
+# Our page:
+# 
+# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# 
+
+# From Arthur David Olson (2010-01-20):
+# The page
+# 
+# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
+# 
+# includes this text:
+# En los municipios fronterizos de Tijuana y Mexicali en Baja California;
+# Juárez y Ojinaga en Chihuahua; Acuña y Piedras Negras en Coahuila;
+# Anáhuac en Nuevo León; y Nuevo Laredo, Reynosa y Matamoros en
+# Tamaulipas, la aplicación de este horario estacional surtirá efecto
+# desde las dos horas del segundo domingo de marzo y concluirá a las dos
+# horas del primer domingo de noviembre.
+# En los municipios fronterizos que se encuentren ubicados en la franja
+# fronteriza norte en el territorio comprendido entre la línea
+# internacional y la línea paralela ubicada a una distancia de veinte
+# kilómetros, así como la Ciudad de Ensenada, Baja California, hacia el
+# interior del país, la aplicación de este horario estacional surtirá
+# efecto desde las dos horas del segundo domingo de marzo y concluirá a
+# las dos horas del primer domingo de noviembre.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
@@ -1981,13 +2033,19 @@ Zone America/Merida	-5:58:28 -	LMT	1922 
 			-6:00	-	CST	1981 Dec 23
 			-5:00	-	EST	1982 Dec  2
 			-6:00	Mexico	C%sT
-# Coahuila, Durango, Nuevo Leon, Tamaulipas
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (near US border)
+Zone America/Matamoros	-6:40:00 -	LMT	1921 Dec 31 23:20:00
+			-6:00	-	CST	1988
+			-6:00	US	C%sT	1989
+			-6:00	Mexico	C%sT	2010
+			-6:00	US	C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (away from US border)
 Zone America/Monterrey	-6:41:16 -	LMT	1921 Dec 31 23:18:44
 			-6:00	-	CST	1988
 			-6:00	US	C%sT	1989
 			-6:00	Mexico	C%sT
 # Central Mexico
-Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
+Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1 0:23:24
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
@@ -1996,7 +2054,19 @@ Zone America/Mexico_City -6:36:36 -	LMT	
 			-6:00	Mexico	C%sT	2001 Sep 30 02:00
 			-6:00	-	CST	2002 Feb 20
 			-6:00	Mexico	C%sT
-# Chihuahua
+# Chihuahua (near US border)
+Zone America/Ojinaga	-6:57:40 -	LMT	1922 Jan 1 0:02:20
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1996
+			-6:00	Mexico	C%sT	1998
+			-6:00	-	CST	1998 Apr Sun>=1 3:00
+			-7:00	Mexico	M%sT	2010
+			-7:00	US	M%sT
+# Chihuahua (away from US border)
 Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2030,7 +2100,7 @@ Zone America/Mazatlan	-7:05:40 -	LMT	192
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# Baja California
+# Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924
 			-8:00	-	PST	1927 Jun 10 23:00
@@ -2048,6 +2118,26 @@ Zone America/Tijuana	-7:48:04 -	LMT	1922
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT	2001
 			-8:00	US	P%sT	2002 Feb 20
+			-8:00	Mexico	P%sT	2010
+			-8:00	US	P%sT
+# Baja California (away from US border)
+Zone America/Santa_Isabel	-7:39:28 -	LMT	1922 Jan  1  0:20:32
+			-7:00	-	MST	1924
+			-8:00	-	PST	1927 Jun 10 23:00
+			-7:00	-	MST	1930 Nov 15
+			-8:00	-	PST	1931 Apr  1
+			-8:00	1:00	PDT	1931 Sep 30
+			-8:00	-	PST	1942 Apr 24
+			-8:00	1:00	PWT	1945 Aug 14 23:00u
+			-8:00	1:00	PPT	1945 Nov 12 # Peace
+			-8:00	-	PST	1948 Apr  5
+			-8:00	1:00	PDT	1949 Jan 14
+			-8:00	-	PST	1954
+			-8:00	CA	P%sT	1961
+			-8:00	-	PST	1976
+			-8:00	US	P%sT	1996
+			-8:00	Mexico	P%sT	2001
+			-8:00	US	P%sT	2002 Feb 20
 			-8:00	Mexico	P%sT
 # From Paul Eggert (2006-03-22):
 # Formerly there was an America/Ensenada zone, which differed from

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Tue Jan 26 11:12:47 2010	(r203019)
+++ stable/8/share/zoneinfo/zone.tab	Tue Jan 26 11:15:03 2010	(r203020)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.31
+# @(#)zone.tab	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -279,11 +279,14 @@ MW	-1547+03500	Africa/Blantyre
 MX	+1924-09909	America/Mexico_City	Central Time - most locations
 MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2058-08937	America/Merida	Central Time - Campeche, Yucatan
-MX	+2540-10019	America/Monterrey	Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX	+2540-10019	America/Monterrey	Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
+MX	+2550-09730	America/Matamoros	US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
 MX	+2313-10625	America/Mazatlan	Mountain Time - S Baja, Nayarit, Sinaloa
-MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
+MX	+2838-10605	America/Chihuahua	Mexican Mountain Time - Chihuahua away from US border
+MX	+2934-10425	America/Ojinaga	US Mountain Time - Chihuahua near US border
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
-MX	+3232-11701	America/Tijuana	Pacific Time
+MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
+MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 11:22:07 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 000E31065670;
	Tue, 26 Jan 2010 11:22:06 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E09B48FC14;
	Tue, 26 Jan 2010 11:22:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QBM6Yh074182;
	Tue, 26 Jan 2010 11:22:06 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QBM67Y074177;
	Tue, 26 Jan 2010 11:22:06 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001261122.o0QBM67Y074177@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Jan 2010 11:22:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203021 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 11:22:07 -0000

Author: edwin
Date: Tue Jan 26 11:22:06 2010
New Revision: 203021
URL: http://svn.freebsd.org/changeset/base/203021

Log:
  MFC of r200835, r201189, r201189, r202606, r203019
  
  r200835: Comment only, no data changes.
  r201189: Bangladesh will change its clock back to Standard Time on Dec 31, 2009.
  r202606: Administrative only: Fix AT fields for Asia/Dhaka
  r203019: Mexico's House of Representatives has approved a proposal for
  	 northern Mexico's border cities to share the same daylight saving
  	 schedule as the United States

Modified:
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/northamerica
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Tue Jan 26 11:15:03 2010	(r203020)
+++ stable/6/share/zoneinfo/asia	Tue Jan 26 11:22:06 2010	(r203021)
@@ -1,4 +1,4 @@
-# @(#)asia	8.44
+# @(#)asia	8.51
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -196,6 +196,41 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # http://www.thaindian.com/newsportal/business/bangladesh-to-continue-indefinitely-with-advanced-time_100259987.html
 # 
 
+# From Alexander Krivenyshev (2009-12-24):
+# According to Bangladesh newspaper "The Daily Star,"
+# Bangladesh will change its clock back to Standard Time on Dec 31, 2009.
+#
+# Clock goes back 1-hr on Dec 31 night.
+# 
+# http://www.thedailystar.net/newDesign/news-details.php?nid=119228
+# 
+# and
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh05.html
+# 
+#
+# "...The government yesterday decided to put the clock back by one hour
+# on December 31 midnight and the new time will continue until March 31,
+# 2010 midnight. The decision came at a cabinet meeting at the Prime
+# Minister's Office last night..."
+
+# From Danvin Ruangchan (2009-12-24):
+# ...the news mentions DST will be turned off again 7 months after March
+# 31st on Oct 31, 2010.
+
+# From Arthur David Olson (2009-12-26):
+# Indeed, "The government will advance again the Banglasdesh Standard
+# Time by one one hour on March 31 next year by enforcing the Daylight
+# Saving Time (DST) for seven months. It will continue till October 31
+# until further notice." I take that last sentence as the
+# establishment of a rule.
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
+Rule	Dhaka	2010	only	-	Jan	1	0:00	0	-
+Rule	Dhaka	2010	max	-	Mar	31	23:00	1:00	S
+Rule	Dhaka	2010	max	-	Nov	1	0:00	0	-
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
@@ -203,8 +238,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
-			6:00	1:00	BDST
+			6:00	-	BDT	2009
+			6:00	Dhaka	BD%sT
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -363,6 +398,69 @@ Zone	Asia/Urumqi	5:50:20	-	LMT	1928 # or
 # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke,
 # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding,
 # and Yarkand.
+
+# From Luther Ma (2009-10-17):
+# Almost all (>99.9%) ethnic Chinese (properly ethnic Han) living in
+# Xinjiang use Chinese Standard Time. Some are aware of Xinjiang time,
+# but have no need of it. All planes, trains, and schools function on
+# what is called "Beijing time." When Han make an appointment in Chinese
+# they implicitly use Beijing time.
+#
+# On the other hand, ethnic Uyghurs, who make up about half the
+# population of Xinjiang, typically use "Xinjiang time" which is two
+# hours behind Beijing time, or UTC +0600. The government of the Xinjiang
+# Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as
+# local governments such as the Urumqi city government use both times in
+# publications, referring to what is popularly called Xinjiang time as
+# "Urumqi time." When Uyghurs make an appointment in the Uyghur language
+# they almost invariably use Xinjiang time.
+#
+# (Their ethnic Han compatriots would typically have no clue of its
+# widespread use, however, because so extremely few of them are fluent in
+# Uyghur, comparable to the number of Anglo-Americans fluent in Navajo.)
+#
+# (...As with the rest of China there was a brief interval ending in 1990
+# or 1991 when summer time was in use.  The confusion was severe, with
+# the province not having dual times but four times in use at the same
+# time. Some areas remained on standard Xinjiang time or Beijing time and
+# others moving their clocks ahead.)
+#
+# ...an example of an official website using of Urumqi time.
+#
+# The first few lines of the Google translation of
+# 
+# http://www.fjysgl.gov.cn/show.aspx?id=2379&cid=39
+# 
+# (retrieved 2009-10-13)
+# > Urumqi fire seven people are missing the alleged losses of at least
+# > 500 million yuan
+# >
+# > (Reporter Dong Liu) the day before 20:20 or so (Urumqi Time 18:20),
+# > Urumqi City Department of International Plaza Luther Qiantang River
+# > burst fire. As of yesterday, 18:30, Urumqi City Fire officers and men
+# > have worked continuously for 22 hours...
+
+# From Luther Ma (2009-11-19):
+# With the risk of being redundant to previous answers these are the most common
+# English "transliterations" (w/o using non-English symbols):
+#
+# 1. Wulumuqi...
+# 2. Kashi...
+# 3. Urumqi...
+# 4. Kashgar...
+# ...
+# 5. It seems that Uyghurs in Urumqi has been using Xinjiang since at least the
+# 1960's. I know of one Han, now over 50, who grew up in the surrounding
+# countryside and used Xinjiang time as a child.
+#
+# 6. Likewise for Kashgar and the rest of south Xinjiang I don't know of any
+# start date for Xinjiang time.
+#
+# Without having access to local historical records, nor the ability to legally
+# publish them, I would go with October 1, 1949, when Xinjiang became the Uyghur
+# Autonomous Region under the PRC. (Before that Uyghurs, of course, would also
+# not be using Beijing time, but some local time.)
+
 Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # or Kashi or Kaxgar
 			5:30	-	KAST	1940	 # Kashgar Time
 			5:00	-	KAST	1980 May
@@ -370,8 +468,8 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 
 
 # From Lee Yiu Chung (2009-10-24):
-# I found there are some mistakes for the historial DST rule for Hong
-# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# I found there are some mistakes for the...DST rule for Hong
+# Kong. [According] to the DST record from Hong Kong Observatory (actually,
 # it is not [an] observatory, but the official meteorological agency of HK,
 # and also serves as the official timing agency), there are some missing
 # and incorrect rules. Although the exact switch over time is missing, I

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Tue Jan 26 11:15:03 2010	(r203020)
+++ stable/6/share/zoneinfo/europe	Tue Jan 26 11:22:06 2010	(r203021)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.24
+# @(#)europe	8.25
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2130,12 +2130,20 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast',
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
+
+# From Oscar van Vlijmen (2009-11-29):
+# ...some regions of RUssia were merged with others since 2005...
+# Some names were changed, no big deal, except for one instance: a new name.
+# YAK/YAKST: UTC+9 Zabajkal'skij kraj.
+
+# From Oscar van Vlijmen (2009-11-29):
 # The Sakha districts are: Aldanskij, Amginskij, Anabarskij,
-# Bulunskij, Verkhnekolymskij, Verkhnevilyujskij, Vilyujskij, Gornyj,
+# Verkhnevilyujskij, Vilyujskij, Gornyj,
 # Zhiganskij, Kobyajskij, Lenskij, Megino-Kangalasskij, Mirninskij,
-# Namskij, Nyurbinskij, Olenekskij, Olekminskij, Srednekolymskij,
+# Namskij, Nyurbinskij, Olenyokskij, Olyokminskij,
 # Suntarskij, Tattinskij, Ust'-Aldanskij, Khangalasskij,
-# Churapchinskij, Eveno-Bytantajskij.
+# Churapchinskij, Eveno-Bytantajskij Natsional'nij.
+
 Zone Asia/Yakutsk	 8:38:40 -	LMT	1919 Dec 15
 			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
 			 9:00	Russia	YAK%sT	1991 Mar 31 2:00s
@@ -2145,7 +2153,9 @@ Zone Asia/Yakutsk	 8:38:40 -	LMT	1919 De
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj,
 # [parts of] Respublika Sakha (Yakutiya).
-# The Sakha districts are: Verkhoyanskij, Tomponskij, Ust'-Majskij,
+
+# From Oscar van Vlijmen (2009-11-29):
+# The Sakha districts are: Bulunskij, Verkhoyanskij, Tomponskij, Ust'-Majskij,
 # Ust'-Yanskij.
 Zone Asia/Vladivostok	 8:47:44 -	LMT	1922 Nov 15
 			 9:00	-	VLAT	1930 Jun 21 # Vladivostok Time
@@ -2166,8 +2176,10 @@ Zone Asia/Sakhalin	 9:30:48 -	LMT	1905 A
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Magadanskaya oblast', Respublika Sakha (Yakutiya).
 # Probably also: Kuril Islands.
-# The Sakha districts are: Abyjskij, Allaikhovskij, Momskij,
-# Nizhnekolymskij, Ojmyakonskij.
+
+# From Oscar van Vlijmen (2009-11-29):
+# The Sakha districts are: Abyjskij, Allaikhovskij, Verkhhhnekolymskij, Momskij,
+# Nizhnekolymskij, Ojmyakonskij, Srednekolymskij.
 Zone Asia/Magadan	10:03:12 -	LMT	1924 May  2
 			10:00	-	MAGT	1930 Jun 21 # Magadan Time
 			11:00	Russia	MAG%sT	1991 Mar 31 2:00s

Modified: stable/6/share/zoneinfo/northamerica
==============================================================================
--- stable/6/share/zoneinfo/northamerica	Tue Jan 26 11:15:03 2010	(r203020)
+++ stable/6/share/zoneinfo/northamerica	Tue Jan 26 11:22:06 2010	(r203021)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.28
+# @(#)northamerica	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1955,6 +1955,58 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 
 # http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
 # confirms this.  Sonora as usual is the only state where DST is not applied.
 
+# From Steffen Thorsen (2009-12-28):
+#
+# Steffen Thorsen wrote:
+# > Mexico's House of Representatives has approved a proposal for northern
+# > Mexico's border cities to share the same daylight saving schedule as
+# > the United States.
+# Now this has passed both the Congress and the Senate, so starting from
+# 2010, some border regions will be the same:
+# 
+# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/
+# 
+# 
+# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939
+# 
+# (Spanish)
+#
+# Could not find the new law text, but the proposed law text changes are here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf
+# 
+# (Gaceta Parlamentaria)
+#
+# There is also a list of the votes here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
+# 
+#
+# Our page:
+# 
+# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# 
+
+# From Arthur David Olson (2010-01-20):
+# The page
+# 
+# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
+# 
+# includes this text:
+# En los municipios fronterizos de Tijuana y Mexicali en Baja California;
+# Juárez y Ojinaga en Chihuahua; Acuña y Piedras Negras en Coahuila;
+# Anáhuac en Nuevo León; y Nuevo Laredo, Reynosa y Matamoros en
+# Tamaulipas, la aplicación de este horario estacional surtirá efecto
+# desde las dos horas del segundo domingo de marzo y concluirá a las dos
+# horas del primer domingo de noviembre.
+# En los municipios fronterizos que se encuentren ubicados en la franja
+# fronteriza norte en el territorio comprendido entre la línea
+# internacional y la línea paralela ubicada a una distancia de veinte
+# kilómetros, así como la Ciudad de Ensenada, Baja California, hacia el
+# interior del país, la aplicación de este horario estacional surtirá
+# efecto desde las dos horas del segundo domingo de marzo y concluirá a
+# las dos horas del primer domingo de noviembre.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
@@ -1981,13 +2033,19 @@ Zone America/Merida	-5:58:28 -	LMT	1922 
 			-6:00	-	CST	1981 Dec 23
 			-5:00	-	EST	1982 Dec  2
 			-6:00	Mexico	C%sT
-# Coahuila, Durango, Nuevo Leon, Tamaulipas
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (near US border)
+Zone America/Matamoros	-6:40:00 -	LMT	1921 Dec 31 23:20:00
+			-6:00	-	CST	1988
+			-6:00	US	C%sT	1989
+			-6:00	Mexico	C%sT	2010
+			-6:00	US	C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (away from US border)
 Zone America/Monterrey	-6:41:16 -	LMT	1921 Dec 31 23:18:44
 			-6:00	-	CST	1988
 			-6:00	US	C%sT	1989
 			-6:00	Mexico	C%sT
 # Central Mexico
-Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
+Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1 0:23:24
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
@@ -1996,7 +2054,19 @@ Zone America/Mexico_City -6:36:36 -	LMT	
 			-6:00	Mexico	C%sT	2001 Sep 30 02:00
 			-6:00	-	CST	2002 Feb 20
 			-6:00	Mexico	C%sT
-# Chihuahua
+# Chihuahua (near US border)
+Zone America/Ojinaga	-6:57:40 -	LMT	1922 Jan 1 0:02:20
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1996
+			-6:00	Mexico	C%sT	1998
+			-6:00	-	CST	1998 Apr Sun>=1 3:00
+			-7:00	Mexico	M%sT	2010
+			-7:00	US	M%sT
+# Chihuahua (away from US border)
 Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2030,7 +2100,7 @@ Zone America/Mazatlan	-7:05:40 -	LMT	192
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# Baja California
+# Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924
 			-8:00	-	PST	1927 Jun 10 23:00
@@ -2048,6 +2118,26 @@ Zone America/Tijuana	-7:48:04 -	LMT	1922
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT	2001
 			-8:00	US	P%sT	2002 Feb 20
+			-8:00	Mexico	P%sT	2010
+			-8:00	US	P%sT
+# Baja California (away from US border)
+Zone America/Santa_Isabel	-7:39:28 -	LMT	1922 Jan  1  0:20:32
+			-7:00	-	MST	1924
+			-8:00	-	PST	1927 Jun 10 23:00
+			-7:00	-	MST	1930 Nov 15
+			-8:00	-	PST	1931 Apr  1
+			-8:00	1:00	PDT	1931 Sep 30
+			-8:00	-	PST	1942 Apr 24
+			-8:00	1:00	PWT	1945 Aug 14 23:00u
+			-8:00	1:00	PPT	1945 Nov 12 # Peace
+			-8:00	-	PST	1948 Apr  5
+			-8:00	1:00	PDT	1949 Jan 14
+			-8:00	-	PST	1954
+			-8:00	CA	P%sT	1961
+			-8:00	-	PST	1976
+			-8:00	US	P%sT	1996
+			-8:00	Mexico	P%sT	2001
+			-8:00	US	P%sT	2002 Feb 20
 			-8:00	Mexico	P%sT
 # From Paul Eggert (2006-03-22):
 # Formerly there was an America/Ensenada zone, which differed from

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Tue Jan 26 11:15:03 2010	(r203020)
+++ stable/6/share/zoneinfo/zone.tab	Tue Jan 26 11:22:06 2010	(r203021)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.29
+# @(#)zone.tab	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -279,11 +279,14 @@ MW	-1547+03500	Africa/Blantyre
 MX	+1924-09909	America/Mexico_City	Central Time - most locations
 MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2058-08937	America/Merida	Central Time - Campeche, Yucatan
-MX	+2540-10019	America/Monterrey	Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX	+2540-10019	America/Monterrey	Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
+MX	+2550-09730	America/Matamoros	US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
 MX	+2313-10625	America/Mazatlan	Mountain Time - S Baja, Nayarit, Sinaloa
-MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
+MX	+2838-10605	America/Chihuahua	Mexican Mountain Time - Chihuahua away from US border
+MX	+2934-10425	America/Ojinaga	US Mountain Time - Chihuahua near US border
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
-MX	+3232-11701	America/Tijuana	Pacific Time
+MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
+MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 11:33:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6FB26106566B;
	Tue, 26 Jan 2010 11:33:40 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au
	[211.29.132.185])
	by mx1.freebsd.org (Postfix) with ESMTP id 05F398FC15;
	Tue, 26 Jan 2010 11:33:39 +0000 (UTC)
Received: from c122-106-174-165.carlnfd1.nsw.optusnet.com.au
	(c122-106-174-165.carlnfd1.nsw.optusnet.com.au [122.106.174.165])
	by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o0QBXa8V013453
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 26 Jan 2010 22:33:37 +1100
Date: Tue, 26 Jan 2010 22:33:36 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@delplex.bde.org
To: Gabor Kovesdan 
In-Reply-To: <201001252344.o0PNi0Gh013661@svn.freebsd.org>
Message-ID: <20100126222412.L74262@delplex.bde.org>
References: <201001252344.o0PNi0Gh013661@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r202993 - head/lib/libc/nls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 11:33:40 -0000

On Mon, 25 Jan 2010, Gabor Kovesdan wrote:

> Log:
>  - style(9)

It still barely resembles KNF, and regressed in several places.

> Modified: head/lib/libc/nls/msgcat.c
> ==============================================================================
> --- head/lib/libc/nls/msgcat.c	Mon Jan 25 23:37:49 2010	(r202992)
> +++ head/lib/libc/nls/msgcat.c	Mon Jan 25 23:44:00 2010	(r202993)
> @@ -107,11 +107,11 @@ SLIST_HEAD(listhead, catentry) cache =
> nl_catd
> catopen(const char *name, int type)
> {
> -	int             spcleft, saverr;
> -	char            path[PATH_MAX];
> -	char            *nlspath, *lang, *base, *cptr, *pathP, *tmpptr;
> -	char            *cptr1, *plang, *pter, *pcode;
> -	struct stat     sbuf;
> +	int		 spcleft, saverr;
> +	char		 path[PATH_MAX];
> +	char		*nlspath, *lang, *base, *cptr, *pathP, *tmpptr;
> +	char		*cptr1, *plang, *pter, *pcode;
> +	struct stat	 sbuf;
> 	struct catentry	*np;

Declarations of local variable are not indented in KNF.  This change is
sort of backwards since it increases the fanciness of their indentation.

Declarations of local variable are sorted in KNF.  These are still totally
unsorted.

> @@ -247,10 +247,10 @@ catopen(const char *name, int type)
> char *
> catgets(nl_catd catd, int set_id, int msg_id, const char *s)
> {
> -	struct _nls_cat_hdr *cat_hdr;
> -	struct _nls_set_hdr *set_hdr;
> -	struct _nls_msg_hdr *msg_hdr;
> -	int l, u, i, r;
> +	struct _nls_cat_hdr	*cat_hdr;
> +	struct _nls_set_hdr	*set_hdr;
> +	struct _nls_msg_hdr	*msg_hdr;
> +	int			 l, u, i, r;

This changes the indentation from normal to abnormal.

There are only 4 order errors here (s before m, l before i, u before i and r).

> @@ -348,11 +348,11 @@ catclose(nl_catd catd)
> static nl_catd
> load_msgcat(const char *path, const char *name, const char *lang)
> {
> -	struct stat st;
> -	nl_catd catd;
> +	struct stat	 st;
> +	nl_catd		 catd;
> 	struct catentry	*np;
> -	void *data;
> -	int fd;
> +	void		*data;
> +	int		 fd;

The indentation regressed, as above.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 11:39:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 360891065672;
	Tue, 26 Jan 2010 11:39:06 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-iw0-f204.google.com (mail-iw0-f204.google.com
	[209.85.223.204])
	by mx1.freebsd.org (Postfix) with ESMTP id AA80F8FC15;
	Tue, 26 Jan 2010 11:39:05 +0000 (UTC)
Received: by iwn42 with SMTP id 42so1475746iwn.9
	for ; Tue, 26 Jan 2010 03:39:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=UfhGByoSpds4w3m/WnTXFRWi+llFW2LnHkVUfZf3VUM=;
	b=ktxWhwMKIkbPMIn69kqbPCLas0+59fdXOE7TVkvdDLaHJtG1q1ZTgGgwBxk6s31u24
	EaH1qijBl7URJx/wzdEj8Lr5j/9A2osQO4ZoEMCZ7XtQgInaflIWzui7lmAGMuoeHT3z
	VFOg0U+sHb4QFhdrRHEvbFzvAIjOBeqsAalVE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=MIvEWhI0tAiKFMs/ThHqLN6psvk3MPlbiPrndufupGz+yQoC7vOdc2dRTceiamRKmh
	ODQmifCZ2/hdr9IUjEmrbFukVYNq9AiCeVO1os8gQyzM2mb+dBEQGT6ljpoj1M5RI/Nl
	b49Vz96QwqjuwoJKZCc81CECOpCDB/GMbcSJY=
MIME-Version: 1.0
Sender: asmrookie@gmail.com
Received: by 10.231.146.134 with SMTP id h6mr866263ibv.16.1264505942231; Tue, 
	26 Jan 2010 03:39:02 -0800 (PST)
In-Reply-To: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	<201001251456.32459.jhb@freebsd.org>
	<3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
Date: Tue, 26 Jan 2010 12:39:02 +0100
X-Google-Sender-Auth: a4bfe94f10e65e70
Message-ID: <3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com>
From: Attilio Rao 
To: John Baldwin 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Warner Losh ,
	Marcel Moolenaar 
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 11:39:06 -0000

2010/1/26 Attilio Rao :
> 2010/1/25 John Baldwin :
>> On Saturday 23 January 2010 10:54:22 am Attilio Rao wrote:
>>> Author: attilio
>>> Date: Sat Jan 23 15:54:21 2010
>>> New Revision: 202889
>>> URL: http://svn.freebsd.org/changeset/base/202889
>>>
>>> Log:
>>> =C2=A0 - Fix a race in sched_switch() of sched_4bsd.
>>> =C2=A0 =C2=A0 In the case of the thread being on a sleepqueue or a turn=
stile, the
>>> =C2=A0 =C2=A0 sched_lock was acquired (without the aid of the td_lock i=
nterface) and
>>> =C2=A0 =C2=A0 the td_lock was dropped. This was going to break locking =
rules on other
>>> =C2=A0 =C2=A0 threads willing to access to the thread (via the td_lock =
interface) and
>>> =C2=A0 =C2=A0 modify his flags (allowed as long as the container lock w=
as different
>>> =C2=A0 =C2=A0 by the one used in sched_switch).
>>> =C2=A0 =C2=A0 In order to prevent this situation, while sched_lock is a=
cquired there
>>> =C2=A0 =C2=A0 the td_lock gets blocked. [0]
>>> =C2=A0 - Merge the ULE's internal function thread_block_switch() into t=
he global
>>> =C2=A0 =C2=A0 thread_lock_block() and make the former semantic as the d=
efault for
>>> =C2=A0 =C2=A0 thread_lock_block(). This means that thread_lock_block() =
will not
>>> =C2=A0 =C2=A0 disable interrupts when called (and consequently thread_u=
nlock_block()
>>> =C2=A0 =C2=A0 will not re-enabled them when called). This should be don=
e manually
>>> =C2=A0 =C2=A0 when necessary.
>>> =C2=A0 =C2=A0 Note, however, that ULE's thread_unblock_switch() is not =
reaped
>>> =C2=A0 =C2=A0 because it does reflect a difference in semantic due in U=
LE (the
>>> =C2=A0 =C2=A0 td_lock may not be necessarilly still blocked_lock when c=
alling this).
>>> =C2=A0 =C2=A0 While asymmetric, it does describe a remarkable differenc=
e in semantic
>>> =C2=A0 =C2=A0 that is good to keep in mind.
>>
>> Does this affect the various #ifdef's for handling the third argument to
>> cpu_switch()? =C2=A0E.g. does 4BSD need to spin if td_lock is &blocked_l=
ock?
>>
>> Also, BLOCK_SPIN() on x86 is non-optimal. =C2=A0It should not do cmpxchg=
 in a loop.
>> Instead, it should do cmp in a loop, and if the cmp succeeds, then try
>> cmpxchg.
>
> [CC'ing imp@ because he made a similar question privately]
>
> Basically it is recounduited to the difference, in terms of runqueue
> between sched_4bsd and sched_ule.
> sched_ule has one runqueue per-core and sched_4bsd has just one runqueue.
> The codepath you are referring to, for the ULE case, is used when
> threads need to migrate from one cpu to another.
> What should really happen is that threads should be both locked (thus
> the runqueues where the in & out threads are present should be both
> locked) but it will create cyclic LOR and then a 'blocked_lock' is
> used (in order to avoid such LORs).
> When you are switching in a thread caming from another CPU you need to
> make sure its lock already changed to, possibly, the new runqueue one
> (by the CPU where it *was* running that is going to switch it out).
> That happens because we have not a global interlock between the CPUs
> and thread migration gets a bit trickier.
>
> Said that, the !SMP case just assume there is one runqueue, so this
> discussion is not useful (you won't have different runqueues from
> where the thread may be caming, but just one protected by sched_lock).
> Also sched_4bsd has just one runqueue, thus this discussion should not
> apply there.
>
> What the last 4bsd patch does is to keep track of the 'old'
> thread_lock and assign it to the switched out thread, which may now be
> blocked, when it is safe to do that (after the tlb shootdown in
> ia32/amd64 cpu_switch() case).
> However, this may generate a bit of confusion, because 'blocked' has a
> different meaning between the 2 cases:
> * ULE does that in order to prevent LOR between runqueues CPUs.
> * 4BSD now does that in order to be able to not end with 2 spinlocks
> held in some cases (note: this is not a LOR because there is the well
> defined order of sq_lock/ts_lock -> sched_lock) but it makes
> cpu_switch() simpler, faster and reduces contention.
> It is enough that cpu_switch() does handle the third argument properly
> and sets back the old lock when it is safe.
> I see, however, that this may be a problem for architectures that were
> just supporting 4BSD and not ULE (at least to some extent), like in
> the sparc64 case. If an architecture does not ignore the third
> argument of cpu_switch() and does set it properly there should be a
> problem with sched_4bsd. I should probabilly poke the maintainers of
> any arch and check with them if there are further problems.

I checked for available architectures and I think that sparc64 (and
possibly sun4v) is the only one with missing bits.

> Finally, I really don't think the BLOCK_SPIN() performance improvement
> you suggest should really make a difference (assuming how rarely it
> should happen) because, please note, that the cmpxchg is necessary as
> we need to enforce a memory barrier when doing the check in anyway (so
> the first case should be however an atomic_cmpset_X_Y()).

I think that ia64 is broken on that regard because it does use simple
operation while it should use correct atomic and memory barriers
(CC'ed marcel@ for that).

Thanks,
Attilio


--=20
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 13:00:34 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.ORG
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id 579691065670; Tue, 26 Jan 2010 13:00:34 +0000 (UTC)
Date: Tue, 26 Jan 2010 13:00:34 +0000
From: Alexey Dokuchaev 
To: Jung-uk Kim 
Message-ID: <20100126130034.GA44959@FreeBSD.org>
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<20100125192941.GA9196@FreeBSD.org>
	<201001251703.18130.jkim@FreeBSD.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <201001251703.18130.jkim@FreeBSD.org>
User-Agent: Mutt/1.4.2.1i
Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	src-committers@FreeBSD.ORG
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 13:00:34 -0000

On Mon, Jan 25, 2010 at 05:03:16PM -0500, Jung-uk Kim wrote:
> On Monday 25 January 2010 02:29 pm, Alexey Dokuchaev wrote:
> > Apparently this revision broke logo screen saver w/ vesa.ko on i386
> > (it works, but image is significantly darker).  Building vesa from
> > earlier sources gives previously seen (i.e. correct) result.  Could
> > you take a look please?  My gfx card is GF6600.  Thanks.
> 
> If your VESA BIOS is lying or ignorant about compatibility with VGA 
> mode, you may see some images like that.  Please try to avoid the 
> mode, e.g., see the attached patch.

Sorry, but no luck: daemon image is still of the same dark tint, and now
it goes at 640x480 while previously it was running on 800x600; I'm not
sure why did you dump 800x600 completely in your patch in favor of just
640x480 and 640x400.  I will now test your second patch and report ASAP.

./danfe

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 13:15:38 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D569C106566C;
	Tue, 26 Jan 2010 13:15:38 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de
	[217.11.53.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 548FD8FC1C;
	Tue, 26 Jan 2010 13:15:38 +0000 (UTC)
Received: from outgoing.leidinger.net (pD954F11F.dip.t-dialin.net
	[217.84.241.31])
	by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 82693844021;
	Tue, 26 Jan 2010 14:15:31 +0100 (CET)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id 4D760A7B30;
	Tue, 26 Jan 2010 14:15:27 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1264511727;
	bh=27na4nbYKr0t48Dtft/9VUjFC3cfZkZIauq3e2ibOSo=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=BnlpOXX90cNCubKYoNngZOufNybHx7SgKB6fxnvBiYSCjr2UmBZz3pzw0IEfyYo0G
	Xwm9NVc42ZtUoPzR92KbPlmH4djQwaJ7t53VozDyIMs0O8iQUMPS7p5duSm++2VVhU
	hZmqh+BtAi/vVfG86EDYBp5ifOrcUma/o8BlJljIHe+/7ZcsflLY6IORNqL9Yj2cW3
	phCTEhXOaE2/yLX7hMyW3ed1oAGTk9wZI40hqKY7FYHuGSB42zuVYNlet1ZeT/5lcM
	zeAUY2EWuO7Di+5/7BEcde6iChdfImQn4TvkX925Ui0t507XrU2ssXNyX417FefclB
	kiQ2Fli4XD6Tg==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0QDFQAZ015226;
	Tue, 26 Jan 2010 14:15:26 +0100 (CET)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Tue, 26 Jan 2010
	14:15:25 +0100
Message-ID: <20100126141525.10365e5dzlk7jc4k@webmail.leidinger.net>
Date: Tue, 26 Jan 2010 14:15:25 +0100
From: Alexander Leidinger 
To: John Baldwin 
References: <201001231842.o0NIgSa5086957@svn.freebsd.org>
	<201001250757.49334.jhb@freebsd.org>
In-Reply-To: <201001250757.49334.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4)
X-EBL-MailScanner-Information: Please contact the ISP for more information
X-EBL-MailScanner-ID: 82693844021.65CF3
X-EBL-MailScanner: Found to be clean
X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN,
	SpamAssassin (not cached, score=-0.763, required 6,
	autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00,
	DKIM_VERIFIED -0.00, J_CHICKENPOX_24 0.60, TW_SV 0.08)
X-EBL-MailScanner-From: alexander@leidinger.net
X-EBL-MailScanner-Watermark: 1265116533.20612@adcVd23LYyIOo2v7U2b84g
X-EBL-Spam-Status: No
Cc: Alan Cox , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r202894 - in head/sys/i386: i386 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 13:15:39 -0000


Quoting John Baldwin  (from Mon, 25 Jan 2010 07:57:49 -0500):

> On Saturday 23 January 2010 1:42:28 pm Alan Cox wrote:
>> Author: alc
>> Date: Sat Jan 23 18:42:28 2010
>> New Revision: 202894
>> URL: http://svn.freebsd.org/changeset/base/202894
>>
>> Log:
>>   Handle a race between pmap_kextract() and pmap_promote_pde().   
>> This race is
>>   known to cause a kernel crash in ZFS on i386 when superpage promotion is
>>   enabled.
>>
>>   Tested by:	netchild
>>   MFC after:	1 week
>
> Yay!  Should we enable pg_ps by default on i386 now?

Data point, the i386 system where I have superpages enabled is a p4  
with currently 11 jails active. Some webservers, squid, samba, bind,  
postfix and a lot of portupgrades (during the last days, I'm updating  
a jail with a desktop-setup inside). All jails are on ZFS.

# uptime
  2:01pm  up 3 days, 21:52, 2 users, load averages: 1.34, 1.14, 1.09

It is not more because I switched to ATA_CAM after more than a day of  
uptime with the code of this commit.

# sysctl vm.pmap
vm.pmap.pmap_collect_active: 0
vm.pmap.pmap_collect_inactive: 0
vm.pmap.pv_entry_spare: 54584
vm.pmap.pv_entry_allocs: 504637278
vm.pmap.pv_entry_frees: 504575270
vm.pmap.pc_chunk_tryfail: 0
vm.pmap.pc_chunk_frees: 22566325
vm.pmap.pc_chunk_allocs: 22566672
vm.pmap.pc_chunk_count: 347
vm.pmap.pv_entry_count: 62008
vm.pmap.pde.promotions: 2080074
vm.pmap.pde.p_failures: 22736249
vm.pmap.pde.mappings: 0
vm.pmap.pde.demotions: 2080038
vm.pmap.shpgperproc: 200
vm.pmap.pv_entry_max: 1487136
vm.pmap.pg_ps_enabled: 1

Bye,
Alexander.

-- 
When eating an elephant take one bite at a time.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 13:23:31 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 756FC106566C;
	Tue, 26 Jan 2010 13:23:31 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 65A328FC12;
	Tue, 26 Jan 2010 13:23:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QDNVD1000911;
	Tue, 26 Jan 2010 13:23:31 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QDNVOe000909;
	Tue, 26 Jan 2010 13:23:31 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <201001261323.o0QDNVOe000909@svn.freebsd.org>
From: Ed Maste 
Date: Tue, 26 Jan 2010 13:23: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: r203022 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 13:23:31 -0000

Author: emaste
Date: Tue Jan 26 13:23:31 2010
New Revision: 203022
URL: http://svn.freebsd.org/changeset/base/203022

Log:
  Convert to 2-clause license, from NetBSD rc.subr r1.70.
  
  Submitted by:	Alex Kozlov
  Obtained from:	NetBSD

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Tue Jan 26 11:22:06 2010	(r203021)
+++ head/etc/rc.subr	Tue Jan 26 13:23:31 2010	(r203022)
@@ -15,13 +15,6 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#        This product includes software developed by the NetBSD
-#        Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:00:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4890106566B;
	Tue, 26 Jan 2010 14:00:36 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E6038FC19;
	Tue, 26 Jan 2010 14:00:36 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 811041FFC22;
	Tue, 26 Jan 2010 14:00:35 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 544E1844A1; Tue, 26 Jan 2010 15:00:35 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Alexey Dokuchaev 
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<20100125192941.GA9196@FreeBSD.org>
Date: Tue, 26 Jan 2010 15:00:35 +0100
In-Reply-To: <20100125192941.GA9196@FreeBSD.org> (Alexey Dokuchaev's message
	of "Mon, 25 Jan 2010 19:29:41 +0000")
Message-ID: <86ljflj798.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Jung-uk Kim 
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:00:36 -0000

Alexey Dokuchaev  writes:
> Jung-uk Kim  writes:
> > Log:
> >   Fix VESA color palette corruption:
> >=20=20=20
> >   - VBE 3.0 says palette format resets to 6-bit mode when video mode ch=
anges.
> >   We simply set 8-bit mode when we switch modes if the adapter supports=
 it.
> Apparently this revision broke logo screen saver w/ vesa.ko on i386 (it
> works, but image is significantly darker).

A darker image indicates that the BIOS is in 8-bit mode but the driver
thinks it's in 6-bit mode, so the driver right-shifts the palette
entries by two bits.

Perhaps the BIOS is lying?

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:15:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F1FDB106568B;
	Tue, 26 Jan 2010 14:15:12 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E0A288FC15;
	Tue, 26 Jan 2010 14:15:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QEFCXO012251;
	Tue, 26 Jan 2010 14:15:12 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QEFCHw012248;
	Tue, 26 Jan 2010 14:15:12 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201001261415.o0QEFCHw012248@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Tue, 26 Jan 2010 14:15:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203023 - stable/8/lib/libfetch
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:15:13 -0000

Author: des
Date: Tue Jan 26 14:15:12 2010
New Revision: 203023
URL: http://svn.freebsd.org/changeset/base/203023

Log:
  MFH (r202613, r202623): HTTP digest authentication support.

Modified:
  stable/8/lib/libfetch/Makefile
  stable/8/lib/libfetch/http.c
Directory Properties:
  stable/8/lib/libfetch/   (props changed)

Modified: stable/8/lib/libfetch/Makefile
==============================================================================
--- stable/8/lib/libfetch/Makefile	Tue Jan 26 13:23:31 2010	(r203022)
+++ stable/8/lib/libfetch/Makefile	Tue Jan 26 14:15:12 2010	(r203023)
@@ -16,8 +16,11 @@ CFLAGS+=	-DINET6
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+=	-DWITH_SSL
-DPADD=		${LIBSSL} ${LIBCRYPTO}
-LDADD=		-lssl -lcrypto
+DPADD=		${LIBSSL} ${LIBCRYPTO} ${LIBMD}
+LDADD=		-lssl -lcrypto -lmd
+.else
+DPADD=		${LIBMD}
+LDADD=		-lmd
 .endif
 
 CFLAGS+=	-DFTP_COMBINE_CWDS

Modified: stable/8/lib/libfetch/http.c
==============================================================================
--- stable/8/lib/libfetch/http.c	Tue Jan 26 13:23:31 2010	(r203022)
+++ stable/8/lib/libfetch/http.c	Tue Jan 26 14:15:12 2010	(r203023)
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -343,7 +344,8 @@ typedef enum {
 	hdr_last_modified,
 	hdr_location,
 	hdr_transfer_encoding,
-	hdr_www_authenticate
+	hdr_www_authenticate,
+	hdr_proxy_authenticate,
 } hdr_t;
 
 /* Names of interesting headers */
@@ -357,6 +359,7 @@ static struct {
 	{ hdr_location,			"Location" },
 	{ hdr_transfer_encoding,	"Transfer-Encoding" },
 	{ hdr_www_authenticate,		"WWW-Authenticate" },
+	{ hdr_proxy_authenticate,	"Proxy-Authenticate" },
 	{ hdr_unknown,			NULL },
 };
 
@@ -446,21 +449,114 @@ http_match(const char *str, const char *
 	return (hdr);
 }
 
+
 /*
- * Get the next header and return the appropriate symbolic code.
- */
-static hdr_t
-http_next_header(conn_t *conn, const char **p)
+ * Get the next header and return the appropriate symbolic code.  We
+ * need to read one line ahead for checking for a continuation line
+ * belonging to the current header (continuation lines start with
+ * white space). 
+ *
+ * We get called with a fresh line already in the conn buffer, either
+ * from the previous http_next_header() invocation, or, the first
+ * time, from a fetch_getln() performed by our caller.
+ *
+ * This stops when we encounter an empty line (we dont read beyond the header
+ * area).
+ * 
+ * Note that the "headerbuf" is just a place to return the result. Its
+ * contents are not used for the next call. This means that no cleanup
+ * is needed when ie doing another connection, just call the cleanup when
+ * fully done to deallocate memory.
+ */
+
+/* Limit the max number of continuation lines to some reasonable value */
+#define HTTP_MAX_CONT_LINES 10
+
+/* Place into which to build a header from one or several lines */
+typedef struct {
+	char	*buf;		/* buffer */
+	size_t	 bufsize;	/* buffer size */
+	size_t	 buflen;	/* length of buffer contents */
+} http_headerbuf_t;
+
+static void
+init_http_headerbuf(http_headerbuf_t *buf)
 {
-	int i;
+	buf->buf = NULL;
+	buf->bufsize = 0;
+	buf->buflen = 0;
+}
 
-	if (fetch_getln(conn) == -1)
-		return (hdr_syserror);
-	while (conn->buflen && isspace((unsigned char)conn->buf[conn->buflen - 1]))
+static void 
+clean_http_headerbuf(http_headerbuf_t *buf)
+{
+	if (buf->buf)
+		free(buf->buf);
+	init_http_headerbuf(buf);
+}
+
+/* Remove whitespace at the end of the buffer */
+static void 
+http_conn_trimright(conn_t *conn)
+{
+	while (conn->buflen && 
+	       isspace((unsigned char)conn->buf[conn->buflen - 1]))
 		conn->buflen--;
 	conn->buf[conn->buflen] = '\0';
+}
+
+static hdr_t
+http_next_header(conn_t *conn, http_headerbuf_t *hbuf, const char **p)
+{
+	int i, len;
+
+	/* 
+	 * Have to do the stripping here because of the first line. So
+	 * it's done twice for the subsequent lines. No big deal 
+	 */
+	http_conn_trimright(conn);
 	if (conn->buflen == 0)
 		return (hdr_end);
+
+	/* Copy the line to the headerbuf */
+	if (hbuf->bufsize < conn->buflen + 1) {
+		if ((hbuf->buf = realloc(hbuf->buf, conn->buflen + 1)) == NULL)
+			return (hdr_syserror);
+		hbuf->bufsize = conn->buflen + 1;
+	}
+	strcpy(hbuf->buf, conn->buf);
+	hbuf->buflen = conn->buflen;
+
+	/* 
+	 * Fetch possible continuation lines. Stop at 1st non-continuation
+	 * and leave it in the conn buffer 
+         */
+	for (i = 0; i < HTTP_MAX_CONT_LINES; i++) {
+		if (fetch_getln(conn) == -1)
+			return (hdr_syserror);
+
+		/* 
+		 * Note: we carry on the idea from the previous version
+		 * that a pure whitespace line is equivalent to an empty
+		 * one (so it's not continuation and will be handled when
+		 * we are called next) 
+		 */
+		http_conn_trimright(conn);
+		if (conn->buf[0] != ' ' && conn->buf[0] != "\t"[0])
+			break;
+
+		/* Got a continuation line. Concatenate to previous */
+		len = hbuf->buflen + conn->buflen;
+		if (hbuf->bufsize < len + 1) {
+			len *= 2;
+			if ((hbuf->buf = realloc(hbuf->buf, len + 1)) == NULL)
+				return (hdr_syserror);
+			hbuf->bufsize = len + 1;
+		}
+		strcpy(hbuf->buf + hbuf->buflen, conn->buf);
+		hbuf->buflen += conn->buflen;
+	} 
+
 	/*
 	 * We could check for malformed headers but we don't really care.
 	 * A valid header starts with a token immediately followed by a
@@ -468,11 +564,290 @@ http_next_header(conn_t *conn, const cha
 	 * characters except "()<>@,;:\\\"{}".
 	 */
 	for (i = 0; hdr_names[i].num != hdr_unknown; i++)
-		if ((*p = http_match(hdr_names[i].name, conn->buf)) != NULL)
+		if ((*p = http_match(hdr_names[i].name, hbuf->buf)) != NULL)
 			return (hdr_names[i].num);
+
 	return (hdr_unknown);
 }
 
+/**************************
+ * [Proxy-]Authenticate header parsing
+ */
+
+/* 
+ * Read doublequote-delimited string into output buffer obuf (allocated 
+ * by caller, whose responsibility it is to ensure that it's big enough)
+ * cp points to the first char after the initial '"'
+ * Handles \ quoting 
+ * Returns pointer to the first char after the terminating double quote, or 
+ * NULL for error.
+ */
+static const char *
+http_parse_headerstring(const char *cp, char *obuf)
+{
+	for (;;) {
+		switch (*cp) {
+		case 0: /* Unterminated string */
+			*obuf = 0;
+			return (NULL);
+		case '"': /* Ending quote */
+			*obuf = 0;
+			return (++cp);
+		case '\\':
+			if (*++cp == 0) {
+				*obuf = 0;
+				return (NULL);
+			}
+			/* FALLTHROUGH */
+		default:
+			*obuf++ = *cp++;
+		}
+	}
+}
+
+/* Http auth challenge schemes */
+typedef enum {HTTPAS_UNKNOWN, HTTPAS_BASIC,HTTPAS_DIGEST} http_auth_schemes_t;
+
+/* Data holder for a Basic or Digest challenge. */
+typedef struct {
+	http_auth_schemes_t scheme;
+	char	*realm;
+	char	*qop;
+	char	*nonce;
+	char	*opaque;
+	char	*algo;
+	int	 stale;
+	int	 nc; /* Nonce count */
+} http_auth_challenge_t;
+
+static void 
+init_http_auth_challenge(http_auth_challenge_t *b)
+{
+	b->scheme = HTTPAS_UNKNOWN;
+	b->realm = b->qop = b->nonce = b->opaque = b->algo = NULL;
+	b->stale = b->nc = 0;
+}
+
+static void 
+clean_http_auth_challenge(http_auth_challenge_t *b)
+{
+	if (b->realm) 
+		free(b->realm);
+	if (b->qop) 
+		free(b->qop);
+	if (b->nonce) 
+		free(b->nonce);
+	if (b->opaque) 
+		free(b->opaque);
+	if (b->algo) 
+		free(b->algo);
+	init_http_auth_challenge(b);
+}
+
+/* Data holder for an array of challenges offered in an http response. */
+#define MAX_CHALLENGES 10
+typedef struct {
+	http_auth_challenge_t *challenges[MAX_CHALLENGES];
+	int	count; /* Number of parsed challenges in the array */
+	int	valid; /* We did parse an authenticate header */
+} http_auth_challenges_t;
+
+static void 
+init_http_auth_challenges(http_auth_challenges_t *cs)
+{
+	int i;
+	for (i = 0; i < MAX_CHALLENGES; i++)
+		cs->challenges[i] = NULL;
+	cs->count = cs->valid = 0;
+}
+
+static void 
+clean_http_auth_challenges(http_auth_challenges_t *cs)
+{
+	int i;
+	/* We rely on non-zero pointers being allocated, not on the count */
+	for (i = 0; i < MAX_CHALLENGES; i++) {
+		if (cs->challenges[i] != NULL) {
+			clean_http_auth_challenge(cs->challenges[i]);
+			free(cs->challenges[i]);
+		}
+	}
+	init_http_auth_challenges(cs);
+}
+
+/* 
+ * Enumeration for lexical elements. Separators will be returned as their own
+ * ascii value
+ */
+typedef enum {HTTPHL_WORD=256, HTTPHL_STRING=257, HTTPHL_END=258,
+	      HTTPHL_ERROR = 259} http_header_lex_t;
+
+/* 
+ * Determine what kind of token comes next and return possible value
+ * in buf, which is supposed to have been allocated big enough by
+ * caller. Advance input pointer and return element type. 
+ */
+static int 
+http_header_lex(const char **cpp, char *buf)
+{
+	size_t l;
+	/* Eat initial whitespace */
+	*cpp += strspn(*cpp, " \t");
+	if (**cpp == 0)
+		return (HTTPHL_END);
+
+	/* Separator ? */
+	if (**cpp == ',' || **cpp == '=')
+		return (*((*cpp)++));
+
+	/* String ? */
+	if (**cpp == '"') {
+		*cpp = http_parse_headerstring(++*cpp, buf);
+		if (*cpp == NULL)
+			return (HTTPHL_ERROR);
+		return (HTTPHL_STRING);
+	}
+
+	/* Read other token, until separator or whitespace */
+	l = strcspn(*cpp, " \t,=");
+	memcpy(buf, *cpp, l);
+	buf[l] = 0;
+	*cpp += l;
+	return (HTTPHL_WORD);
+}
+
+/* 
+ * Read challenges from http xxx-authenticate header and accumulate them
+ * in the challenges list structure.
+ *
+ * Headers with multiple challenges are specified by rfc2617, but
+ * servers (ie: squid) often send them in separate headers instead,
+ * which in turn is forbidden by the http spec (multiple headers with
+ * the same name are only allowed for pure comma-separated lists, see
+ * rfc2616 sec 4.2).
+ *
+ * We support both approaches anyway
+ */
+static int 
+http_parse_authenticate(const char *cp, http_auth_challenges_t *cs)
+{
+	int ret = -1;
+	http_header_lex_t lex;
+	char *key = malloc(strlen(cp) + 1);
+	char *value = malloc(strlen(cp) + 1);
+	char *buf = malloc(strlen(cp) + 1);
+
+	if (key == NULL || value == NULL || buf == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+
+	/* In any case we've seen the header and we set the valid bit */
+	cs->valid = 1;
+
+	/* Need word first */
+	lex = http_header_lex(&cp, key);
+	if (lex != HTTPHL_WORD)
+		goto out;
+
+	/* Loop on challenges */
+	for (; cs->count < MAX_CHALLENGES; cs->count++) {
+		cs->challenges[cs->count] = 
+			malloc(sizeof(http_auth_challenge_t));
+		if (cs->challenges[cs->count] == NULL) {
+			fetch_syserr();
+			goto out;
+		}
+		init_http_auth_challenge(cs->challenges[cs->count]);
+		if (!strcasecmp(key, "basic")) {
+			cs->challenges[cs->count]->scheme = HTTPAS_BASIC;
+		} else if (!strcasecmp(key, "digest")) {
+			cs->challenges[cs->count]->scheme = HTTPAS_DIGEST;
+		} else {
+			cs->challenges[cs->count]->scheme = HTTPAS_UNKNOWN;
+			/* 
+                         * Continue parsing as basic or digest may
+			 * follow, and the syntax is the same for
+			 * all. We'll just ignore this one when
+			 * looking at the list
+			 */
+		}
+	
+		/* Loop on attributes */
+		for (;;) {
+			/* Key */
+			lex = http_header_lex(&cp, key);
+			if (lex != HTTPHL_WORD)
+				goto out;
+
+			/* Equal sign */
+			lex = http_header_lex(&cp, buf);
+			if (lex != '=')
+				goto out;
+
+			/* Value */
+			lex = http_header_lex(&cp, value);
+			if (lex != HTTPHL_WORD && lex != HTTPHL_STRING)
+				goto out;
+
+			if (!strcasecmp(key, "realm"))
+				cs->challenges[cs->count]->realm = 
+					strdup(value);
+			else if (!strcasecmp(key, "qop"))
+				cs->challenges[cs->count]->qop = 
+					strdup(value);
+			else if (!strcasecmp(key, "nonce"))
+				cs->challenges[cs->count]->nonce = 
+					strdup(value);
+			else if (!strcasecmp(key, "opaque"))
+				cs->challenges[cs->count]->opaque = 
+					strdup(value);
+			else if (!strcasecmp(key, "algorithm"))
+				cs->challenges[cs->count]->algo = 
+					strdup(value);
+			else if (!strcasecmp(key, "stale"))
+				cs->challenges[cs->count]->stale = 
+					strcasecmp(value, "no");
+			/* Else ignore unknown attributes */
+
+			/* Comma or Next challenge or End */
+			lex = http_header_lex(&cp, key);
+			/* 
+                         * If we get a word here, this is the beginning of the
+			 * next challenge. Break the attributes loop 
+                         */
+			if (lex == HTTPHL_WORD)
+				break;
+
+			if (lex == HTTPHL_END) {
+				/* End while looking for ',' is normal exit */
+				cs->count++;
+				ret = 0;
+				goto out;
+			}
+			/* Anything else is an error */
+			if (lex != ',')
+				goto out;
+
+		} /* End attributes loop */
+	} /* End challenge loop */
+
+	/* 
+         * Challenges max count exceeded. This really can't happen
+	 * with normal data, something's fishy -> error 
+	 */ 
+
+out:
+	if (key)
+		free(key);
+	if (value)
+		free(value);
+	if (buf)
+		free(buf);
+	return (ret);
+}
+
+
 /*
  * Parse a last-modified header
  */
@@ -618,6 +993,291 @@ http_base64(const char *src)
 	return (str);
 }
 
+
+/*
+ * Extract authorization parameters from environment value.
+ * The value is like scheme:realm:user:pass
+ */
+typedef struct {
+	char	*scheme;
+	char	*realm;
+	char	*user;
+	char	*password;
+} http_auth_params_t;
+
+static void
+init_http_auth_params(http_auth_params_t *s)
+{
+	s->scheme = s->realm = s->user = s->password = 0;
+}
+
+static void 
+clean_http_auth_params(http_auth_params_t *s)
+{
+	if (s->scheme) 
+		free(s->scheme);
+	if (s->realm) 
+		free(s->realm);
+	if (s->user) 
+		free(s->user);
+	if (s->password) 
+		free(s->password);
+	init_http_auth_params(s);
+}
+
+static int
+http_authfromenv(const char *p, http_auth_params_t *parms)
+{
+	int ret = -1;
+	char *v, *ve;
+	char *str = strdup(p);
+
+	if (str == NULL) {
+		fetch_syserr();
+		return (-1);
+	}
+	v = str;
+
+	if ((ve = strchr(v, ':')) == NULL)
+		goto out;
+
+	*ve = 0;
+	if ((parms->scheme = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	v = ve + 1;
+
+	if ((ve = strchr(v, ':')) == NULL)
+		goto out;
+
+	*ve = 0;
+	if ((parms->realm = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	v = ve + 1;
+
+	if ((ve = strchr(v, ':')) == NULL)
+		goto out;
+
+	*ve = 0;
+	if ((parms->user = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	v = ve + 1;
+
+
+	if ((parms->password = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	ret = 0;
+out:
+	if (ret == -1) 
+		clean_http_auth_params(parms);
+	if (str)
+		free(str);
+	return (ret);
+}
+
+
+/* 
+ * Digest response: the code to compute the digest is taken from the
+ * sample implementation in RFC2616 
+ */
+#define IN
+#define OUT
+
+#define HASHLEN 16
+typedef char HASH[HASHLEN];
+#define HASHHEXLEN 32
+typedef char HASHHEX[HASHHEXLEN+1];
+
+static const char *hexchars = "0123456789abcdef";
+static void 
+CvtHex(IN HASH Bin, OUT HASHHEX Hex)
+{
+	unsigned short i;
+	unsigned char j;
+
+	for (i = 0; i < HASHLEN; i++) {
+		j = (Bin[i] >> 4) & 0xf;
+		Hex[i*2] = hexchars[j];
+		j = Bin[i] & 0xf;
+		Hex[i*2+1] = hexchars[j];
+	};
+	Hex[HASHHEXLEN] = '\0';
+};
+
+/* calculate H(A1) as per spec */
+static void 
+DigestCalcHA1(
+	IN char * pszAlg,
+	IN char * pszUserName,
+	IN char * pszRealm,
+	IN char * pszPassword,
+	IN char * pszNonce,
+	IN char * pszCNonce,
+	OUT HASHHEX SessionKey
+	)
+{
+	MD5_CTX Md5Ctx;
+	HASH HA1;
+
+	MD5Init(&Md5Ctx);
+	MD5Update(&Md5Ctx, pszUserName, strlen(pszUserName));
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm));
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword));
+	MD5Final(HA1, &Md5Ctx);
+	if (strcasecmp(pszAlg, "md5-sess") == 0) {
+
+		MD5Init(&Md5Ctx);
+		MD5Update(&Md5Ctx, HA1, HASHLEN);
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
+		MD5Final(HA1, &Md5Ctx);
+	};
+	CvtHex(HA1, SessionKey);
+}
+
+/* calculate request-digest/response-digest as per HTTP Digest spec */
+static void 
+DigestCalcResponse(
+	IN HASHHEX HA1,           /* H(A1) */
+	IN char * pszNonce,       /* nonce from server */
+	IN char * pszNonceCount,  /* 8 hex digits */
+	IN char * pszCNonce,      /* client nonce */
+	IN char * pszQop,         /* qop-value: "", "auth", "auth-int" */
+	IN char * pszMethod,      /* method from the request */
+	IN char * pszDigestUri,   /* requested URL */
+	IN HASHHEX HEntity,       /* H(entity body) if qop="auth-int" */
+	OUT HASHHEX Response      /* request-digest or response-digest */
+	)
+{
+/*	DEBUG(fprintf(stderr, 
+		      "Calc: HA1[%s] Nonce[%s] qop[%s] method[%s] URI[%s]\n",
+		      HA1, pszNonce, pszQop, pszMethod, pszDigestUri));*/
+	MD5_CTX Md5Ctx;
+	HASH HA2;
+	HASH RespHash;
+	HASHHEX HA2Hex;
+
+	// calculate H(A2)
+	MD5Init(&Md5Ctx);
+	MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod));
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszDigestUri, strlen(pszDigestUri));
+	if (strcasecmp(pszQop, "auth-int") == 0) {
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, HEntity, HASHHEXLEN);
+	};
+	MD5Final(HA2, &Md5Ctx);
+	CvtHex(HA2, HA2Hex);
+
+	// calculate response
+	MD5Init(&Md5Ctx);
+	MD5Update(&Md5Ctx, HA1, HASHHEXLEN);
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
+	MD5Update(&Md5Ctx, ":", 1);
+	if (*pszQop) {
+		MD5Update(&Md5Ctx, pszNonceCount, strlen(pszNonceCount));
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszQop, strlen(pszQop));
+		MD5Update(&Md5Ctx, ":", 1);
+	};
+	MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN);
+	MD5Final(RespHash, &Md5Ctx);
+	CvtHex(RespHash, Response);
+}
+
+/* 
+ * Generate/Send a Digest authorization header 
+ * This looks like: [Proxy-]Authorization: credentials
+ *
+ *  credentials      = "Digest" digest-response
+ *  digest-response  = 1#( username | realm | nonce | digest-uri
+ *                      | response | [ algorithm ] | [cnonce] |
+ *                      [opaque] | [message-qop] |
+ *                          [nonce-count]  | [auth-param] )
+ *  username         = "username" "=" username-value
+ *  username-value   = quoted-string
+ *  digest-uri       = "uri" "=" digest-uri-value
+ *  digest-uri-value = request-uri   ; As specified by HTTP/1.1
+ *  message-qop      = "qop" "=" qop-value
+ *  cnonce           = "cnonce" "=" cnonce-value
+ *  cnonce-value     = nonce-value
+ *  nonce-count      = "nc" "=" nc-value
+ *  nc-value         = 8LHEX
+ *  response         = "response" "=" request-digest
+ *  request-digest = <"> 32LHEX <">
+ */
+static int
+http_digest_auth(conn_t *conn, const char *hdr, http_auth_challenge_t *c,
+		 http_auth_params_t *parms, struct url *url)
+{
+	int r;
+	char noncecount[10];
+	char cnonce[40];
+	char *options = 0;
+
+	if (!c->realm || !c->nonce) {
+		DEBUG(fprintf(stderr, "realm/nonce not set in challenge\n"));
+		return(-1);
+	}
+	if (!c->algo) 
+		c->algo = strdup("");
+
+	if (asprintf(&options, "%s%s%s%s", 
+		     *c->algo? ",algorithm=" : "", c->algo,
+		     c->opaque? ",opaque=" : "", c->opaque?c->opaque:"")== -1)
+		return (-1);
+
+	if (!c->qop) {
+		c->qop = strdup("");
+		*noncecount = 0;
+		*cnonce = 0;
+	} else {
+		c->nc++;
+		sprintf(noncecount, "%08x", c->nc);
+		/* We don't try very hard with the cnonce ... */
+		sprintf(cnonce, "%x%lx", getpid(), (unsigned long)time(0));
+	}
+
+	HASHHEX HA1;
+	DigestCalcHA1(c->algo, parms->user, c->realm,
+		      parms->password, c->nonce, cnonce, HA1);
+	DEBUG(fprintf(stderr, "HA1: [%s]\n", HA1));
+	HASHHEX digest;
+	DigestCalcResponse(HA1, c->nonce, noncecount, cnonce, c->qop,
+			   "GET", url->doc, "", digest);
+
+	if (c->qop[0]) {
+		r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\","
+			     "nonce=\"%s\",uri=\"%s\",response=\"%s\","
+			     "qop=\"auth\", cnonce=\"%s\", nc=%s%s",
+			     hdr, parms->user, c->realm, 
+			     c->nonce, url->doc, digest,
+			     cnonce, noncecount, options);
+	} else {
+		r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\","
+			     "nonce=\"%s\",uri=\"%s\",response=\"%s\"%s",
+			     hdr, parms->user, c->realm, 
+			     c->nonce, url->doc, digest, options);
+	}
+	if (options)
+		free(options);
+	return (r);
+}
+
 /*
  * Encode username and password
  */
@@ -627,8 +1287,8 @@ http_basic_auth(conn_t *conn, const char
 	char *upw, *auth;
 	int r;
 
-	DEBUG(fprintf(stderr, "usr: [%s]\n", usr));
-	DEBUG(fprintf(stderr, "pwd: [%s]\n", pwd));
+	DEBUG(fprintf(stderr, "basic: usr: [%s]\n", usr));
+	DEBUG(fprintf(stderr, "basic: pwd: [%s]\n", pwd));
 	if (asprintf(&upw, "%s:%s", usr, pwd) == -1)
 		return (-1);
 	auth = http_base64(upw);
@@ -641,33 +1301,49 @@ http_basic_auth(conn_t *conn, const char
 }
 
 /*
- * Send an authorization header
+ * Chose the challenge to answer and call the appropriate routine to 
+ * produce the header.
  */
 static int
-http_authorize(conn_t *conn, const char *hdr, const char *p)
+http_authorize(conn_t *conn, const char *hdr, http_auth_challenges_t *cs,
+	       http_auth_params_t *parms, struct url *url)
 {
-	/* basic authorization */
-	if (strncasecmp(p, "basic:", 6) == 0) {
-		char *user, *pwd, *str;
-		int r;
-
-		/* skip realm */
-		for (p += 6; *p && *p != ':'; ++p)
-			/* nothing */ ;
-		if (!*p || strchr(++p, ':') == NULL)
-			return (-1);
-		if ((str = strdup(p)) == NULL)
-			return (-1); /* XXX */
-		user = str;
-		pwd = strchr(str, ':');
-		*pwd++ = '\0';
-		r = http_basic_auth(conn, hdr, user, pwd);
-		free(str);
-		return (r);
+	http_auth_challenge_t *basic = NULL;
+	http_auth_challenge_t *digest = NULL;
+	int i;
+
+	/* If user or pass are null we're not happy */
+	if (!parms->user || !parms->password) {
+		DEBUG(fprintf(stderr, "NULL usr or pass\n"));
+		return (-1);
 	}
-	return (-1);
-}
 
+	/* Look for a Digest and a Basic challenge */
+	for (i = 0; i < cs->count; i++) {
+		if (cs->challenges[i]->scheme == HTTPAS_BASIC)
+			basic = cs->challenges[i];
+		if (cs->challenges[i]->scheme == HTTPAS_DIGEST)
+			digest = cs->challenges[i];
+	}
+
+	/* Error if "Digest" was specified and there is no Digest challenge */
+	if (!digest && (parms->scheme && 
+			!strcasecmp(parms->scheme, "digest"))) {
+		DEBUG(fprintf(stderr, 
+			      "Digest auth in env, not supported by peer\n"));
+		return (-1);
+	}
+	/* 
+         * If "basic" was specified in the environment, or there is no Digest
+	 * challenge, do the basic thing. Don't need a challenge for this,
+	 * so no need to check basic!=NULL 
+	 */
+	if (!digest || (parms->scheme && !strcasecmp(parms->scheme,"basic")))
+		return (http_basic_auth(conn,hdr,parms->user,parms->password));
+
+	/* Else, prefer digest. We just checked that it's not NULL */
+	return (http_digest_auth(conn, hdr, digest, parms, url));
+}
 
 /*****************************************************************************
  * Helper functions for connecting to a server or proxy
@@ -797,13 +1473,13 @@ http_print_html(FILE *out, FILE *in)
  */
 FILE *
 http_request(struct url *URL, const char *op, struct url_stat *us,
-    struct url *purl, const char *flags)
+	struct url *purl, const char *flags)
 {
 	char timebuf[80];
 	char hbuf[MAXHOSTNAMELEN + 7], *host;
 	conn_t *conn;
 	struct url *url, *new;
-	int chunked, direct, ims, need_auth, noredirect, verbose;
+	int chunked, direct, ims, noredirect, verbose;
 	int e, i, n, val;
 	off_t offset, clength, length, size;
 	time_t mtime;
@@ -811,6 +1487,14 @@ http_request(struct url *URL, const char
 	FILE *f;
 	hdr_t h;
 	struct tm *timestruct;
+	http_headerbuf_t headerbuf;
+	http_auth_challenges_t server_challenges;
+	http_auth_challenges_t proxy_challenges;
+
+	/* The following calls don't allocate anything */
+	init_http_headerbuf(&headerbuf); 
+	init_http_auth_challenges(&server_challenges);
+	init_http_auth_challenges(&proxy_challenges);
 
 	direct = CHECK_FLAG('d');
 	noredirect = CHECK_FLAG('A');
@@ -830,7 +1514,6 @@ http_request(struct url *URL, const char
 	i = 0;
 
 	e = HTTP_PROTOCOL_ERROR;
-	need_auth = 0;
 	do {
 		new = NULL;
 		chunked = 0;
@@ -895,27 +1578,67 @@ http_request(struct url *URL, const char
 		/* virtual host */
 		http_cmd(conn, "Host: %s", host);
 
-		/* proxy authorization */
-		if (purl) {
-			if (*purl->user || *purl->pwd)
-				http_basic_auth(conn, "Proxy-Authorization",
-				    purl->user, purl->pwd);
-			else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && *p != '\0')
-				http_authorize(conn, "Proxy-Authorization", p);
+		/* 
+                 * Proxy authorization: we only send auth after we received
+		 * a 407 error. We do not first try basic anyway (changed 
+                 * when support was added for digest-auth)
+                 */
+		if (purl && proxy_challenges.valid) {
+			http_auth_params_t aparams;
+			init_http_auth_params(&aparams);
+			if (*purl->user || *purl->pwd) {
+				aparams.user = purl->user ? 
+					strdup(purl->user) : strdup("");
+				aparams.password = purl->pwd?
+					strdup(purl->pwd) : strdup("");
+			} else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && 
+				   *p != '\0') {
+				if (http_authfromenv(p, &aparams) < 0) {
+					http_seterr(HTTP_NEED_PROXY_AUTH);
+					goto ouch;
+				}
+			}
+			http_authorize(conn, "Proxy-Authorization", 
+				       &proxy_challenges, &aparams, url);
+			clean_http_auth_params(&aparams);
 		}
 
-		/* server authorization */
-		if (need_auth || *url->user || *url->pwd) {
-			if (*url->user || *url->pwd)
-				http_basic_auth(conn, "Authorization", url->user, url->pwd);
-			else if ((p = getenv("HTTP_AUTH")) != NULL && *p != '\0')
-				http_authorize(conn, "Authorization", p);
-			else if (fetchAuthMethod && fetchAuthMethod(url) == 0) {
-				http_basic_auth(conn, "Authorization", url->user, url->pwd);
+		/* 
+                 * Server authorization: we never send "a priori"
+		 * Basic auth, which used to be done if user/pass were
+		 * set in the url. This would be weird because we'd send the
+		 * password in the clear even if Digest is finally to be 
+		 * used (it would have made more sense for the
+		 * pre-digest version to do this when Basic was specified 
+                 * in the environment) 
+                 */
+		if (server_challenges.valid) {
+			http_auth_params_t aparams;
+			init_http_auth_params(&aparams);
+			if (*url->user || *url->pwd) {
+				aparams.user = url->user ? 
+					strdup(url->user) : strdup("");
+				aparams.password = url->pwd ? 
+					strdup(url->pwd) : strdup("");
+			} else if ((p = getenv("HTTP_AUTH")) != NULL && 
+				   *p != '\0') {
+				if (http_authfromenv(p, &aparams) < 0) {
+					http_seterr(HTTP_NEED_AUTH);
+					goto ouch;
+				}
+			} else if (fetchAuthMethod && 
+				   fetchAuthMethod(url) == 0) {
+				aparams.user = url->user ? 
+					strdup(url->user) : strdup("");
+				aparams.password = url->pwd ? 
+					strdup(url->pwd) : strdup("");
 			} else {
 				http_seterr(HTTP_NEED_AUTH);
 				goto ouch;
 			}
+			http_authorize(conn, "Authorization", 
+				       &server_challenges, &aparams, url);
+			clean_http_auth_params(&aparams);
 		}
 
 		/* other headers */
@@ -965,7 +1688,7 @@ http_request(struct url *URL, const char
 			 */
 			break;
 		case HTTP_NEED_AUTH:
-			if (need_auth) {
+			if (server_challenges.valid) {
 				/*
 				 * We already sent out authorization code,
 				 * so there's nothing more we can do.
@@ -978,13 +1701,18 @@ http_request(struct url *URL, const char
 				fetch_info("server requires authorization");
 			break;
 		case HTTP_NEED_PROXY_AUTH:
-			/*
-			 * If we're talking to a proxy, we already sent
-			 * our proxy authorization code, so there's
-			 * nothing more we can do.
-			 */
-			http_seterr(conn->err);
-			goto ouch;
+			if (proxy_challenges.valid) {
+				/*
+				 * We already sent our proxy
+				 * authorization code, so there's
+				 * nothing more we can do. */
+				http_seterr(conn->err);
+				goto ouch;
+			}
+			/* try again, but send the password this time */
+			if (verbose)
+				fetch_info("proxy requires authorization");
+			break;
 		case HTTP_BAD_RANGE:
 			/*
 			 * This can happen if we ask for 0 bytes because
@@ -1004,9 +1732,13 @@ http_request(struct url *URL, const char
 			/* fall through so we can get the full error message */
 		}
 
-		/* get headers */
+		/* get headers. http_next_header expects one line readahead */
+		if (fetch_getln(conn) == -1) {
+		    fetch_syserr();
+		    goto ouch;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:28:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id 94BB31065697; Tue, 26 Jan 2010 14:28:03 +0000 (UTC)
Date: Tue, 26 Jan 2010 14:28:03 +0000
From: Alexey Dokuchaev 
To: Dag-Erling Sm??rgrav 
Message-ID: <20100126142803.GA55760@FreeBSD.org>
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<20100125192941.GA9196@FreeBSD.org> <86ljflj798.fsf@ds4.des.no>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <86ljflj798.fsf@ds4.des.no>
User-Agent: Mutt/1.4.2.1i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Jung-uk Kim 
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:28:03 -0000

On Tue, Jan 26, 2010 at 03:00:35PM +0100, Dag-Erling Sm??rgrav wrote:
> Alexey Dokuchaev  writes:
> > Apparently this revision broke logo screen saver w/ vesa.ko on i386 (it
> > works, but image is significantly darker).
> 
> A darker image indicates that the BIOS is in 8-bit mode but the driver
> thinks it's in 6-bit mode, so the driver right-shifts the palette
> entries by two bits.

Yup, I eventually started to think this is the case after reading
through the code and the patch jkim@ sent me privately (which fixed the
issue).

Considering number of recent vesa/saver breaks, I am thinking about some
regression test suit that could at least check for "8-bit vs. 6-bit" type
of things.  Is it feasible?

./danfe

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:33:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 668511065672;
	Tue, 26 Jan 2010 14:33:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5745A8FC24;
	Tue, 26 Jan 2010 14:33:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QEXvVp016385;
	Tue, 26 Jan 2010 14:33:57 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QEXvWR016383;
	Tue, 26 Jan 2010 14:33:57 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001261433.o0QEXvWR016383@svn.freebsd.org>
From: Randall Stewart 
Date: Tue, 26 Jan 2010 14:33: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: r203024 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:33:57 -0000

Author: rrs
Date: Tue Jan 26 14:33:57 2010
New Revision: 203024
URL: http://svn.freebsd.org/changeset/base/203024

Log:
  Spacing changes in pic_ack and pic_delayed_ack

Modified:
  head/sys/mips/rmi/intr_machdep.c

Modified: head/sys/mips/rmi/intr_machdep.c
==============================================================================
--- head/sys/mips/rmi/intr_machdep.c	Tue Jan 26 14:15:12 2010	(r203023)
+++ head/sys/mips/rmi/intr_machdep.c	Tue Jan 26 14:33:57 2010	(r203024)
@@ -147,17 +147,17 @@ cpu_intr(struct trapframe *tf)
 		if ((i == IPI_AST) || (i == IPI_RENDEZVOUS) || (i == IPI_STOP)
 		    || (i == IPI_SMP_CALL_FUNCTION)) {
 			write_c0_eirr64(1ULL << i);
-			pic_ack(i,0);
+			pic_ack(i, 0);
 			smp_handle_ipi(tf, i);
-			pic_delayed_ack(i,0);
+			pic_delayed_ack(i, 0);
 			continue;
 		}
 #ifdef XLR_PERFMON
 		if (i == IPI_PERFMON) {
 			write_c0_eirr64(1ULL << i);
-			pic_ack(i,0);
+			pic_ack(i, 0);
 			xlr_perfmon_sampler(NULL);
-			pic_delayed_ack(i,0);
+			pic_delayed_ack(i, 0);
 			continue;
 		}
 #endif

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:49:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 116411065672;
	Tue, 26 Jan 2010 14:49:13 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id C3C1E8FC1E;
	Tue, 26 Jan 2010 14:49:12 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id AB0731FFC51;
	Tue, 26 Jan 2010 14:49:11 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 825E78449F; Tue, 26 Jan 2010 15:49:11 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Alexey Dokuchaev 
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<20100125192941.GA9196@FreeBSD.org> <86ljflj798.fsf@ds4.des.no>
	<20100126142803.GA55760@FreeBSD.org>
Date: Tue, 26 Jan 2010 15:49:11 +0100
In-Reply-To: <20100126142803.GA55760@FreeBSD.org> (Alexey Dokuchaev's message
	of "Tue, 26 Jan 2010 14:28:03 +0000")
Message-ID: <86aaw0kjko.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Jung-uk Kim 
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:49:13 -0000

Alexey Dokuchaev  writes:
> Considering number of recent vesa/saver breaks, I am thinking about some
> regression test suit that could at least check for "8-bit vs. 6-bit" type
> of things.  Is it feasible?

Not unless you can figure our a way to programmatically look at the
screen and check that the colors aren't too dark...  IIUC, this is a
BIOS issue, not a driver issue.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:51:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B7DE1106566B;
	Tue, 26 Jan 2010 14:51:54 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A78158FC0A;
	Tue, 26 Jan 2010 14:51:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QEpsTm020337;
	Tue, 26 Jan 2010 14:51:54 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QEpsbL020319;
	Tue, 26 Jan 2010 14:51:54 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201001261451.o0QEpsbL020319@svn.freebsd.org>
From: Gavin Atkinson 
Date: Tue, 26 Jan 2010 14:51:54 +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: r203025 - head/lib/librpcsec_gss
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:51:54 -0000

Author: gavin
Date: Tue Jan 26 14:51:54 2010
New Revision: 203025
URL: http://svn.freebsd.org/changeset/base/203025

Log:
  Correct the HISTORY section of these man pages to show when the function,
  not the "manual page example" was introduced.
  
  Approved by:	ed (mentor, implicit)
  MFC after:	1 week

Modified:
  head/lib/librpcsec_gss/rpc_gss_get_error.3
  head/lib/librpcsec_gss/rpc_gss_get_mech_info.3
  head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3
  head/lib/librpcsec_gss/rpc_gss_get_principal_name.3
  head/lib/librpcsec_gss/rpc_gss_get_versions.3
  head/lib/librpcsec_gss/rpc_gss_getcred.3
  head/lib/librpcsec_gss/rpc_gss_is_installed.3
  head/lib/librpcsec_gss/rpc_gss_max_data_length.3
  head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
  head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
  head/lib/librpcsec_gss/rpc_gss_qop_to_num.3
  head/lib/librpcsec_gss/rpc_gss_seccreate.3
  head/lib/librpcsec_gss/rpc_gss_set_callback.3
  head/lib/librpcsec_gss/rpc_gss_set_defaults.3
  head/lib/librpcsec_gss/rpc_gss_set_svc_name.3
  head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
  head/lib/librpcsec_gss/rpcsec_gss.3

Modified: head/lib/librpcsec_gss/rpc_gss_get_error.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_error.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_get_error.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -50,7 +50,7 @@ A pointer to a structure where the error
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_get_mech_info.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_mech_info.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_get_mech_info.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -60,7 +60,7 @@ otherwise
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -47,7 +47,7 @@ terminated list of installed security me
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_get_principal_name.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_principal_name.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_get_principal_name.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -74,7 +74,7 @@ otherwise
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_get_versions.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_versions.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_get_versions.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -56,7 +56,7 @@ is set to the lowest suppored protocol v
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_getcred.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_getcred.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_getcred.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -77,7 +77,7 @@ otherwise.
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_is_installed.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_is_installed.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_is_installed.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -57,7 +57,7 @@ otherwise.
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_max_data_length.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_max_data_length.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_max_data_length.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -56,7 +56,7 @@ The maximum message size that can be enc
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -60,7 +60,7 @@ is returned, otherwise
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -60,7 +60,7 @@ is returned, otherwise
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_qop_to_num.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_qop_to_num.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_qop_to_num.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -62,7 +62,7 @@ is returned, otherwise
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_seccreate.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_seccreate.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_seccreate.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -104,7 +104,7 @@ to this value.
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_set_callback.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_callback.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_set_callback.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -100,7 +100,7 @@ otherwise
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_set_defaults.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_defaults.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_set_defaults.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -62,7 +62,7 @@ if the values were set
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_set_svc_name.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_svc_name.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_set_svc_name.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -79,7 +79,7 @@ otherwise.
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -56,7 +56,7 @@ The maximum message size that can be enc
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

Modified: head/lib/librpcsec_gss/rpcsec_gss.3
==============================================================================
--- head/lib/librpcsec_gss/rpcsec_gss.3	Tue Jan 26 14:33:57 2010	(r203024)
+++ head/lib/librpcsec_gss/rpcsec_gss.3	Tue Jan 26 14:51:54 2010	(r203025)
@@ -222,7 +222,7 @@ Calculate maximum server message sizes.
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+library first appeared in
 .Fx 8.0 .
 .Sh AUTHORS
 This

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 14:57:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E337106566B;
	Tue, 26 Jan 2010 14:57:57 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8DB4E8FC0C;
	Tue, 26 Jan 2010 14:57:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QEvvYk021787;
	Tue, 26 Jan 2010 14:57:57 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QEvvLW021768;
	Tue, 26 Jan 2010 14:57:57 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201001261457.o0QEvvLW021768@svn.freebsd.org>
From: Gavin Atkinson 
Date: Tue, 26 Jan 2010 14:57: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: r203026 - head/lib/librpcsec_gss
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 14:57:57 -0000

Author: gavin
Date: Tue Jan 26 14:57:57 2010
New Revision: 203026
URL: http://svn.freebsd.org/changeset/base/203026

Log:
  Bump .Dd, forgotten in r203025
  
  Approved by:	ed (mentor, implicit)
  MFC after:	1 week

Modified:
  head/lib/librpcsec_gss/rpc_gss_get_error.3
  head/lib/librpcsec_gss/rpc_gss_get_mech_info.3
  head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3
  head/lib/librpcsec_gss/rpc_gss_get_principal_name.3
  head/lib/librpcsec_gss/rpc_gss_get_versions.3
  head/lib/librpcsec_gss/rpc_gss_getcred.3
  head/lib/librpcsec_gss/rpc_gss_is_installed.3
  head/lib/librpcsec_gss/rpc_gss_max_data_length.3
  head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
  head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
  head/lib/librpcsec_gss/rpc_gss_qop_to_num.3
  head/lib/librpcsec_gss/rpc_gss_seccreate.3
  head/lib/librpcsec_gss/rpc_gss_set_callback.3
  head/lib/librpcsec_gss/rpc_gss_set_defaults.3
  head/lib/librpcsec_gss/rpc_gss_set_svc_name.3
  head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
  head/lib/librpcsec_gss/rpcsec_gss.3

Modified: head/lib/librpcsec_gss/rpc_gss_get_error.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_error.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_get_error.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_GET_ERROR 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_get_mech_info.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_mech_info.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_get_mech_info.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_GET_MECH_INFO 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_get_mechanisms.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_GET_MECHANISMS 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_get_principal_name.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_principal_name.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_get_principal_name.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_GET_PRINCIPAL_NAME 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_get_versions.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_versions.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_get_versions.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_GET_VERSIONS 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_getcred.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_getcred.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_getcred.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_GETCRED 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_is_installed.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_is_installed.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_is_installed.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_IS_INSTALLED 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_max_data_length.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_max_data_length.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_max_data_length.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_MAX_DATA_LENGTH 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_mech_to_oid.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_MECH_TO_OID 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_oid_to_mech.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_OID_TO_MECH 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_qop_to_num.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_qop_to_num.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_qop_to_num.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_QOP_TO_NUM 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_seccreate.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_seccreate.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_seccreate.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_SECCREATE 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_set_callback.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_callback.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_set_callback.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_SET_CALLBACK 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_set_defaults.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_defaults.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_set_defaults.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_SET_DEFAULTS 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_set_svc_name.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_svc_name.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_set_svc_name.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_SET_SVC_NAME 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_SVC_MAX_DATA_LENGTH 3
 .Os
 .Sh NAME

Modified: head/lib/librpcsec_gss/rpcsec_gss.3
==============================================================================
--- head/lib/librpcsec_gss/rpcsec_gss.3	Tue Jan 26 14:51:54 2010	(r203025)
+++ head/lib/librpcsec_gss/rpcsec_gss.3	Tue Jan 26 14:57:57 2010	(r203026)
@@ -24,7 +24,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2008
+.Dd January 26, 2010
 .Dt RPC_GSS_SECCREATE 3
 .Os
 .Sh NAME

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:03:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 62E341065742;
	Tue, 26 Jan 2010 15:03:34 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 51FC08FC0C;
	Tue, 26 Jan 2010 15:03:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QF3Ygc023130;
	Tue, 26 Jan 2010 15:03:34 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QF3XJk023093;
	Tue, 26 Jan 2010 15:03:33 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201001261503.o0QF3XJk023093@svn.freebsd.org>
From: Gavin Atkinson 
Date: Tue, 26 Jan 2010 15:03: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: r203027 - head/lib/libgssapi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:03:34 -0000

Author: gavin
Date: Tue Jan 26 15:03:33 2010
New Revision: 203027
URL: http://svn.freebsd.org/changeset/base/203027

Log:
  Correct the HISTORY section of these man pages to show when the function,
  not the "manual page example" was introduced.
  
  Approved by:	ed (mentor, implicit)
  MFC after:	1 week

Modified:
  head/lib/libgssapi/gss_accept_sec_context.3
  head/lib/libgssapi/gss_acquire_cred.3
  head/lib/libgssapi/gss_add_cred.3
  head/lib/libgssapi/gss_add_oid_set_member.3
  head/lib/libgssapi/gss_canonicalize_name.3
  head/lib/libgssapi/gss_compare_name.3
  head/lib/libgssapi/gss_context_time.3
  head/lib/libgssapi/gss_create_empty_oid_set.3
  head/lib/libgssapi/gss_delete_sec_context.3
  head/lib/libgssapi/gss_display_name.3
  head/lib/libgssapi/gss_display_status.3
  head/lib/libgssapi/gss_duplicate_name.3
  head/lib/libgssapi/gss_export_name.3
  head/lib/libgssapi/gss_export_sec_context.3
  head/lib/libgssapi/gss_get_mic.3
  head/lib/libgssapi/gss_import_name.3
  head/lib/libgssapi/gss_import_sec_context.3
  head/lib/libgssapi/gss_indicate_mechs.3
  head/lib/libgssapi/gss_init_sec_context.3
  head/lib/libgssapi/gss_inquire_context.3
  head/lib/libgssapi/gss_inquire_cred.3
  head/lib/libgssapi/gss_inquire_cred_by_mech.3
  head/lib/libgssapi/gss_inquire_mechs_for_name.3
  head/lib/libgssapi/gss_inquire_names_for_mech.3
  head/lib/libgssapi/gss_process_context_token.3
  head/lib/libgssapi/gss_release_buffer.3
  head/lib/libgssapi/gss_release_cred.3
  head/lib/libgssapi/gss_release_name.3
  head/lib/libgssapi/gss_release_oid_set.3
  head/lib/libgssapi/gss_test_oid_set_member.3
  head/lib/libgssapi/gss_unwrap.3
  head/lib/libgssapi/gss_verify_mic.3
  head/lib/libgssapi/gss_wrap.3
  head/lib/libgssapi/gss_wrap_size_limit.3
  head/lib/libgssapi/gssapi.3
  head/lib/libgssapi/mech.5

Modified: head/lib/libgssapi/gss_accept_sec_context.3
==============================================================================
--- head/lib/libgssapi/gss_accept_sec_context.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_accept_sec_context.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_ACCEPT_SEC_CONTEXT 3 PRM
 .Sh NAME
@@ -451,7 +451,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_acquire_cred.3
==============================================================================
--- head/lib/libgssapi/gss_acquire_cred.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_acquire_cred.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_ACQUIRE_CRED 3 PRM
 .Sh NAME
@@ -205,7 +205,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_add_cred.3
==============================================================================
--- head/lib/libgssapi/gss_add_cred.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_add_cred.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_ADD_CRED 3 PRM
 .Sh NAME
@@ -305,7 +305,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_add_oid_set_member.3
==============================================================================
--- head/lib/libgssapi/gss_add_oid_set_member.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_add_oid_set_member.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_ADD_OID_SET_MEMBER 3 PRM
 .Sh NAME
@@ -97,7 +97,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_canonicalize_name.3
==============================================================================
--- head/lib/libgssapi/gss_canonicalize_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_canonicalize_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_CANONICALIZE_NAME 3 PRM
 .Sh NAME
@@ -104,7 +104,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_compare_name.3
==============================================================================
--- head/lib/libgssapi/gss_compare_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_compare_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_COMPARE_NAME PRM
 .Sh NAME
@@ -89,7 +89,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_context_time.3
==============================================================================
--- head/lib/libgssapi/gss_context_time.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_context_time.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_CONTEXT_TIME 3 PRM
 .Sh NAME
@@ -75,7 +75,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_create_empty_oid_set.3
==============================================================================
--- head/lib/libgssapi/gss_create_empty_oid_set.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_create_empty_oid_set.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_CREATE_EMPTY_OID_SET 3 PRM
 .Sh NAME
@@ -78,7 +78,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_delete_sec_context.3
==============================================================================
--- head/lib/libgssapi/gss_delete_sec_context.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_delete_sec_context.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_DELETE_SEC_CONTEXT 3 PRM
 .Sh NAME
@@ -130,7 +130,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_display_name.3
==============================================================================
--- head/lib/libgssapi/gss_display_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_display_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_DISPLAY_NAME 3 PRM
 .Sh NAME
@@ -118,7 +118,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_display_status.3
==============================================================================
--- head/lib/libgssapi/gss_display_status.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_display_status.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_DISPLAY_STATUS 3 PRM
 .Sh NAME
@@ -177,7 +177,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_duplicate_name.3
==============================================================================
--- head/lib/libgssapi/gss_duplicate_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_duplicate_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_DUPLICATE_NAME 3 PRM
 .Sh NAME
@@ -90,7 +90,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_export_name.3
==============================================================================
--- head/lib/libgssapi/gss_export_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_export_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_EXPORT_NAME 3 PRM
 .Sh NAME
@@ -95,7 +95,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_export_sec_context.3
==============================================================================
--- head/lib/libgssapi/gss_export_sec_context.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_export_sec_context.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_EXPORT_SEC_CONTEXT 3 PRM
 .Sh NAME
@@ -135,7 +135,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_get_mic.3
==============================================================================
--- head/lib/libgssapi/gss_get_mic.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_get_mic.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_GET_MIC 3 PRM
 .Sh NAME
@@ -132,7 +132,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_import_name.3
==============================================================================
--- head/lib/libgssapi/gss_import_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_import_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_IMPORT_NAME 3 PRM
 .Sh NAME
@@ -106,7 +106,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_import_sec_context.3
==============================================================================
--- head/lib/libgssapi/gss_import_sec_context.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_import_sec_context.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_IMPORT_SEC_CONTEXT 3 PRM
 .Sh NAME
@@ -87,7 +87,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_indicate_mechs.3
==============================================================================
--- head/lib/libgssapi/gss_indicate_mechs.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_indicate_mechs.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INDICATE_MECHS 3 PRM
 .Sh NAME
@@ -74,7 +74,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_init_sec_context.3
==============================================================================
--- head/lib/libgssapi/gss_init_sec_context.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_init_sec_context.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INIT_SEC_CONTEXT 3 PRM
 .Sh NAME
@@ -538,7 +538,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_inquire_context.3
==============================================================================
--- head/lib/libgssapi/gss_inquire_context.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_inquire_context.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INQUIRE_CONTEXT 3 PRM
 .Sh NAME
@@ -251,7 +251,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_inquire_cred.3
==============================================================================
--- head/lib/libgssapi/gss_inquire_cred.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_inquire_cred.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INQUIRE_CRED 3 PRM
 .Sh NAME
@@ -125,7 +125,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_inquire_cred_by_mech.3
==============================================================================
--- head/lib/libgssapi/gss_inquire_cred_by_mech.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_inquire_cred_by_mech.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INQUIRE_CRED_BY_MECH 3 PRM
 .Sh NAME
@@ -139,7 +139,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_inquire_mechs_for_name.3
==============================================================================
--- head/lib/libgssapi/gss_inquire_mechs_for_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_inquire_mechs_for_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INQUIRE_MECHS_FOR_NAME 3 PRM
 .Sh NAME
@@ -100,7 +100,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_inquire_names_for_mech.3
==============================================================================
--- head/lib/libgssapi/gss_inquire_names_for_mech.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_inquire_names_for_mech.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_INQUIRE_NAMES_FOR_MECH 3 PRM
 .Sh NAME
@@ -74,7 +74,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_process_context_token.3
==============================================================================
--- head/lib/libgssapi/gss_process_context_token.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_process_context_token.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_PROCESS_CONTEXT_TOKEN 3 PRM
 .Sh NAME
@@ -103,7 +103,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_release_buffer.3
==============================================================================
--- head/lib/libgssapi/gss_release_buffer.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_release_buffer.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_RELEASE_BUFFER 3 PRM
 .Sh NAME
@@ -78,7 +78,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_release_cred.3
==============================================================================
--- head/lib/libgssapi/gss_release_cred.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_release_cred.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_RELEASE_CRED 3 PRM
 .Sh NAME
@@ -75,7 +75,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_release_name.3
==============================================================================
--- head/lib/libgssapi/gss_release_name.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_release_name.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_RELEASE_NAME 3 PRM
 .Sh NAME
@@ -71,7 +71,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_release_oid_set.3
==============================================================================
--- head/lib/libgssapi/gss_release_oid_set.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_release_oid_set.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_RELEASE_OID_SET 3 PRM
 .Sh NAME
@@ -76,7 +76,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_test_oid_set_member.3
==============================================================================
--- head/lib/libgssapi/gss_test_oid_set_member.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_test_oid_set_member.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_TEST_OID_SET_MEMBER 3 PRM
 .Sh NAME
@@ -83,7 +83,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_unwrap.3
==============================================================================
--- head/lib/libgssapi/gss_unwrap.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_unwrap.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_UNWRAP 3 PRM
 .Sh NAME
@@ -158,7 +158,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_verify_mic.3
==============================================================================
--- head/lib/libgssapi/gss_verify_mic.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_verify_mic.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_VERIFY_MIC 3 PRM
 .Sh NAME
@@ -139,7 +139,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_wrap.3
==============================================================================
--- head/lib/libgssapi/gss_wrap.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_wrap.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_WRAP 3 PRM
 .Sh NAME
@@ -146,7 +146,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gss_wrap_size_limit.3
==============================================================================
--- head/lib/libgssapi/gss_wrap_size_limit.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gss_wrap_size_limit.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -27,7 +27,7 @@
 .\"	$FreeBSD$
 .\"
 .\" The following commands are required for all man pages.
-.Dd October 30, 2007
+.Dd January 26, 2010
 .Os
 .Dt GSS_WRAP_SIZE_LIMIT 3 PRM
 .Sh NAME
@@ -131,7 +131,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+function first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/gssapi.3
==============================================================================
--- head/lib/libgssapi/gssapi.3	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/gssapi.3	Tue Jan 26 15:03:33 2010	(r203027)
@@ -26,7 +26,7 @@
 .\"
 .\"	$FreeBSD$
 .\"
-.Dd November 30, 2005
+.Dd January 26, 2010
 .Dt GSSAPI 3
 .Os
 .Sh NAME
@@ -229,7 +229,7 @@ Generic Security Service API Version 2 :
 .Sh HISTORY
 The
 .Nm
-manual page first appeared in
+library first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 John Wray, Iris Associates

Modified: head/lib/libgssapi/mech.5
==============================================================================
--- head/lib/libgssapi/mech.5	Tue Jan 26 14:57:57 2010	(r203026)
+++ head/lib/libgssapi/mech.5	Tue Jan 26 15:03:33 2010	(r203027)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd November 14, 2005
+.Dd January 26, 2010
 .Dt MECH 5
 .Os
 .Sh NAME
@@ -93,7 +93,7 @@ GSS_KRB5_CONF_C_QOP_DES		0x0100	kerberos
 .Sh HISTORY
 The
 .Nm
-manual page example first appeared in
+manual page first appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 This

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:06:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85770106568B;
	Tue, 26 Jan 2010 15:06:22 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 763608FC13;
	Tue, 26 Jan 2010 15:06:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QF6MD5023754;
	Tue, 26 Jan 2010 15:06:22 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QF6MTb023752;
	Tue, 26 Jan 2010 15:06:22 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201001261506.o0QF6MTb023752@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Tue, 26 Jan 2010 15:06:22 +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: r203028 - head/lib/libfetch
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:06:22 -0000

Author: des
Date: Tue Jan 26 15:06:22 2010
New Revision: 203028
URL: http://svn.freebsd.org/changeset/base/203028

Log:
  Document HTTP digest authentication support.
  
  Mention some prominent past contributors: Hajimu Umemoto (ipv6), Henry
  Whincup (https), Jukka Ukkonen (if-modified-since) and Jean-François
  Dockes (digest auth)

Modified:
  head/lib/libfetch/fetch.3

Modified: head/lib/libfetch/fetch.3
==============================================================================
--- head/lib/libfetch/fetch.3	Tue Jan 26 15:03:33 2010	(r203027)
+++ head/lib/libfetch/fetch.3	Tue Jan 26 15:06:22 2010	(r203028)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2008
+.Dd January 26, 2010
 .Dt FETCH 3
 .Os
 .Sh NAME
@@ -509,9 +509,13 @@ Specifies HTTP authorization parameters 
 items.
 The first and second item are the authorization scheme and realm
 respectively; further items are scheme-dependent.
-Currently, only basic authorization is supported.
+Currently, the
+.Dq basic
+and
+.Dq digest
+authorization methods are supported.
 .Pp
-Basic authorization requires two parameters: the user name and
+Both methods require two parameters: the user name and
 password, in that order.
 .Pp
 This variable is only used if the server requires authorization and
@@ -656,12 +660,14 @@ The
 .Nm fetch
 library was mostly written by
 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
-with numerous suggestions from
+with numerous suggestions and contributions from
 .An Jordan K. Hubbard Aq jkh@FreeBSD.org ,
-.An Eugene Skepner Aq eu@qub.com
-and other
-.Fx
-developers.
+.An Eugene Skepner Aq eu@qub.com ,
+.An Hajimu Umemoto Aq ume@FreeBSD.org ,
+.An Henry Whincup Aq henry@techiebod.com ,
+.An Jukka A. Ukkonen Aq jau@iki.fi ,
+.An Jean-Fran\(,cois Dockes Aq jf@dockes.org
+and others.
 It replaces the older
 .Nm ftpio
 library written by

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:07:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ADD22106566C;
	Tue, 26 Jan 2010 15:07:47 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9DB178FC13;
	Tue, 26 Jan 2010 15:07:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QF7lkr024134;
	Tue, 26 Jan 2010 15:07:47 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QF7lPL024132;
	Tue, 26 Jan 2010 15:07:47 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201001261507.o0QF7lPL024132@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Tue, 26 Jan 2010 15:07:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203029 - stable/8/lib/libfetch
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:07:47 -0000

Author: des
Date: Tue Jan 26 15:07:47 2010
New Revision: 203029
URL: http://svn.freebsd.org/changeset/base/203029

Log:
  insta-mfh r203028 (doc update)

Modified:
  stable/8/lib/libfetch/fetch.3
Directory Properties:
  stable/8/lib/libfetch/   (props changed)

Modified: stable/8/lib/libfetch/fetch.3
==============================================================================
--- stable/8/lib/libfetch/fetch.3	Tue Jan 26 15:06:22 2010	(r203028)
+++ stable/8/lib/libfetch/fetch.3	Tue Jan 26 15:07:47 2010	(r203029)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2008
+.Dd January 26, 2010
 .Dt FETCH 3
 .Os
 .Sh NAME
@@ -509,9 +509,13 @@ Specifies HTTP authorization parameters 
 items.
 The first and second item are the authorization scheme and realm
 respectively; further items are scheme-dependent.
-Currently, only basic authorization is supported.
+Currently, the
+.Dq basic
+and
+.Dq digest
+authorization methods are supported.
 .Pp
-Basic authorization requires two parameters: the user name and
+Both methods require two parameters: the user name and
 password, in that order.
 .Pp
 This variable is only used if the server requires authorization and
@@ -656,12 +660,14 @@ The
 .Nm fetch
 library was mostly written by
 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
-with numerous suggestions from
+with numerous suggestions and contributions from
 .An Jordan K. Hubbard Aq jkh@FreeBSD.org ,
-.An Eugene Skepner Aq eu@qub.com
-and other
-.Fx
-developers.
+.An Eugene Skepner Aq eu@qub.com ,
+.An Hajimu Umemoto Aq ume@FreeBSD.org ,
+.An Henry Whincup Aq henry@techiebod.com ,
+.An Jukka A. Ukkonen Aq jau@iki.fi ,
+.An Jean-Fran\(,cois Dockes Aq jf@dockes.org
+and others.
 It replaces the older
 .Nm ftpio
 library written by

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:25:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 08B2C106566C;
	Tue, 26 Jan 2010 15:25:25 +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 EAB8C8FC25;
	Tue, 26 Jan 2010 15:25:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QFPOft028078;
	Tue, 26 Jan 2010 15:25:24 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QFPONL028075;
	Tue, 26 Jan 2010 15:25:24 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001261525.o0QFPONL028075@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 26 Jan 2010 15:25: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: r203030 - in head/sys/dev: ahci ata ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:25:25 -0000

Author: mav
Date: Tue Jan 26 15:25:24 2010
New Revision: 203030
URL: http://svn.freebsd.org/changeset/base/203030

Log:
  Add support for SATA part of Marvell 88SE912x controllers to ahci(4).
  Limit early revisions from 6Gb/s to 3Gb/s by default, or they negotiate
  only 1.5Gbps, when 3Gb/s devices connected.
  
  Add dummy driver for PATA part of these controllers, preventing generic
  driver attach them. It causes system freeze when SATA controller used after
  PATA was touched.

Modified:
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ata/ata-pci.c
  head/sys/dev/ata/ata-pci.h
  head/sys/dev/ata/chipsets/ata-marvell.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Tue Jan 26 15:07:47 2010	(r203029)
+++ head/sys/dev/ahci/ahci.c	Tue Jan 26 15:25:24 2010	(r203030)
@@ -98,6 +98,7 @@ MALLOC_DEFINE(M_AHCI, "AHCI driver", "AH
 
 static struct {
 	uint32_t	id;
+	uint8_t		rev;
 	const char	*name;
 	int		quirks;
 #define AHCI_Q_NOFORCE	1
@@ -107,135 +108,138 @@ static struct {
 #define AHCI_Q_2CH	16
 #define AHCI_Q_4CH	32
 #define AHCI_Q_EDGEIS	64
+#define AHCI_Q_SATA2	128
 } ahci_ids[] = {
-	{0x43801002, "ATI IXP600",	0},
-	{0x43901002, "ATI IXP700",	0},
-	{0x43911002, "ATI IXP700",	0},
-	{0x43921002, "ATI IXP700",	0},
-	{0x43931002, "ATI IXP700",	0},
-	{0x43941002, "ATI IXP800",	0},
-	{0x43951002, "ATI IXP800",	0},
-	{0x26528086, "Intel ICH6",	AHCI_Q_NOFORCE},
-	{0x26538086, "Intel ICH6M",	AHCI_Q_NOFORCE},
-	{0x26818086, "Intel ESB2",	0},
-	{0x26828086, "Intel ESB2",	0},
-	{0x26838086, "Intel ESB2",	0},
-	{0x27c18086, "Intel ICH7",	0},
-	{0x27c38086, "Intel ICH7",	0},
-	{0x27c58086, "Intel ICH7M",	0},
-	{0x27c68086, "Intel ICH7M",	0},
-	{0x28218086, "Intel ICH8",	0},
-	{0x28228086, "Intel ICH8",	0},
-	{0x28248086, "Intel ICH8",	0},
-	{0x28298086, "Intel ICH8M",	0},
-	{0x282a8086, "Intel ICH8M",	0},
-	{0x29228086, "Intel ICH9",	0},
-	{0x29238086, "Intel ICH9",	0},
-	{0x29248086, "Intel ICH9",	0},
-	{0x29258086, "Intel ICH9",	0},
-	{0x29278086, "Intel ICH9",	0},
-	{0x29298086, "Intel ICH9M",	0},
-	{0x292a8086, "Intel ICH9M",	0},
-	{0x292b8086, "Intel ICH9M",	0},
-	{0x292c8086, "Intel ICH9M",	0},
-	{0x292f8086, "Intel ICH9M",	0},
-	{0x294d8086, "Intel ICH9",	0},
-	{0x294e8086, "Intel ICH9M",	0},
-	{0x3a058086, "Intel ICH10",	0},
-	{0x3a228086, "Intel ICH10",	0},
-	{0x3a258086, "Intel ICH10",	0},
-	{0x3b228086, "Intel PCH",	0},
-	{0x3b238086, "Intel PCH",	0},
-	{0x3b248086, "Intel PCH",	0},
-	{0x3b258086, "Intel PCH",	0},
-	{0x3b298086, "Intel PCH",	0},
-	{0x3b2b8086, "Intel PCH",	0},
-	{0x3b2c8086, "Intel PCH",	0},
-	{0x3b2f8086, "Intel PCH",	0},
-	{0x2361197b, "JMicron JMB361",	AHCI_Q_NOFORCE},
-	{0x2363197b, "JMicron JMB363",	AHCI_Q_NOFORCE},
-	{0x2365197b, "JMicron JMB365",	AHCI_Q_NOFORCE},
-	{0x2366197b, "JMicron JMB366",	AHCI_Q_NOFORCE},
-	{0x2368197b, "JMicron JMB368",	AHCI_Q_NOFORCE},
-	{0x611111ab, "Marvell 88SX6111", AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS},
-	{0x612111ab, "Marvell 88SX6121", AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS},
-	{0x614111ab, "Marvell 88SX6141", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
-	{0x614511ab, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
-	{0x044c10de, "NVIDIA MCP65",	0},
-	{0x044d10de, "NVIDIA MCP65",	0},
-	{0x044e10de, "NVIDIA MCP65",	0},
-	{0x044f10de, "NVIDIA MCP65",	0},
-	{0x045c10de, "NVIDIA MCP65",	0},
-	{0x045d10de, "NVIDIA MCP65",	0},
-	{0x045e10de, "NVIDIA MCP65",	0},
-	{0x045f10de, "NVIDIA MCP65",	0},
-	{0x055010de, "NVIDIA MCP67",	0},
-	{0x055110de, "NVIDIA MCP67",	0},
-	{0x055210de, "NVIDIA MCP67",	0},
-	{0x055310de, "NVIDIA MCP67",	0},
-	{0x055410de, "NVIDIA MCP67",	0},
-	{0x055510de, "NVIDIA MCP67",	0},
-	{0x055610de, "NVIDIA MCP67",	0},
-	{0x055710de, "NVIDIA MCP67",	0},
-	{0x055810de, "NVIDIA MCP67",	0},
-	{0x055910de, "NVIDIA MCP67",	0},
-	{0x055A10de, "NVIDIA MCP67",	0},
-	{0x055B10de, "NVIDIA MCP67",	0},
-	{0x058410de, "NVIDIA MCP67",	0},
-	{0x07f010de, "NVIDIA MCP73",	0},
-	{0x07f110de, "NVIDIA MCP73",	0},
-	{0x07f210de, "NVIDIA MCP73",	0},
-	{0x07f310de, "NVIDIA MCP73",	0},
-	{0x07f410de, "NVIDIA MCP73",	0},
-	{0x07f510de, "NVIDIA MCP73",	0},
-	{0x07f610de, "NVIDIA MCP73",	0},
-	{0x07f710de, "NVIDIA MCP73",	0},
-	{0x07f810de, "NVIDIA MCP73",	0},
-	{0x07f910de, "NVIDIA MCP73",	0},
-	{0x07fa10de, "NVIDIA MCP73",	0},
-	{0x07fb10de, "NVIDIA MCP73",	0},
-	{0x0ad010de, "NVIDIA MCP77",	0},
-	{0x0ad110de, "NVIDIA MCP77",	0},
-	{0x0ad210de, "NVIDIA MCP77",	0},
-	{0x0ad310de, "NVIDIA MCP77",	0},
-	{0x0ad410de, "NVIDIA MCP77",	0},
-	{0x0ad510de, "NVIDIA MCP77",	0},
-	{0x0ad610de, "NVIDIA MCP77",	0},
-	{0x0ad710de, "NVIDIA MCP77",	0},
-	{0x0ad810de, "NVIDIA MCP77",	0},
-	{0x0ad910de, "NVIDIA MCP77",	0},
-	{0x0ada10de, "NVIDIA MCP77",	0},
-	{0x0adb10de, "NVIDIA MCP77",	0},
-	{0x0ab410de, "NVIDIA MCP79",	0},
-	{0x0ab510de, "NVIDIA MCP79",	0},
-	{0x0ab610de, "NVIDIA MCP79",	0},
-	{0x0ab710de, "NVIDIA MCP79",	0},
-	{0x0ab810de, "NVIDIA MCP79",	0},
-	{0x0ab910de, "NVIDIA MCP79",	0},
-	{0x0aba10de, "NVIDIA MCP79",	0},
-	{0x0abb10de, "NVIDIA MCP79",	0},
-	{0x0abc10de, "NVIDIA MCP79",	0},
-	{0x0abd10de, "NVIDIA MCP79",	0},
-	{0x0abe10de, "NVIDIA MCP79",	0},
-	{0x0abf10de, "NVIDIA MCP79",	0},
-	{0x0d8410de, "NVIDIA MCP89",	0},
-	{0x0d8510de, "NVIDIA MCP89",	0},
-	{0x0d8610de, "NVIDIA MCP89",	0},
-	{0x0d8710de, "NVIDIA MCP89",	0},
-	{0x0d8810de, "NVIDIA MCP89",	0},
-	{0x0d8910de, "NVIDIA MCP89",	0},
-	{0x0d8a10de, "NVIDIA MCP89",	0},
-	{0x0d8b10de, "NVIDIA MCP89",	0},
-	{0x0d8c10de, "NVIDIA MCP89",	0},
-	{0x0d8d10de, "NVIDIA MCP89",	0},
-	{0x0d8e10de, "NVIDIA MCP89",	0},
-	{0x0d8f10de, "NVIDIA MCP89",	0},
-	{0x33491106, "VIA VT8251",	0},
-	{0x62871106, "VIA VT8251",	0},
-	{0x11841039, "SiS 966",		0},
-	{0x11851039, "SiS 968",		0},
-	{0x01861039, "SiS 968",		0},
-	{0,	     NULL,		0}
+	{0x43801002, 0x00, "ATI IXP600",	0},
+	{0x43901002, 0x00, "ATI IXP700",	0},
+	{0x43911002, 0x00, "ATI IXP700",	0},
+	{0x43921002, 0x00, "ATI IXP700",	0},
+	{0x43931002, 0x00, "ATI IXP700",	0},
+	{0x43941002, 0x00, "ATI IXP800",	0},
+	{0x43951002, 0x00, "ATI IXP800",	0},
+	{0x26528086, 0x00, "Intel ICH6",	AHCI_Q_NOFORCE},
+	{0x26538086, 0x00, "Intel ICH6M",	AHCI_Q_NOFORCE},
+	{0x26818086, 0x00, "Intel ESB2",	0},
+	{0x26828086, 0x00, "Intel ESB2",	0},
+	{0x26838086, 0x00, "Intel ESB2",	0},
+	{0x27c18086, 0x00, "Intel ICH7",	0},
+	{0x27c38086, 0x00, "Intel ICH7",	0},
+	{0x27c58086, 0x00, "Intel ICH7M",	0},
+	{0x27c68086, 0x00, "Intel ICH7M",	0},
+	{0x28218086, 0x00, "Intel ICH8",	0},
+	{0x28228086, 0x00, "Intel ICH8",	0},
+	{0x28248086, 0x00, "Intel ICH8",	0},
+	{0x28298086, 0x00, "Intel ICH8M",	0},
+	{0x282a8086, 0x00, "Intel ICH8M",	0},
+	{0x29228086, 0x00, "Intel ICH9",	0},
+	{0x29238086, 0x00, "Intel ICH9",	0},
+	{0x29248086, 0x00, "Intel ICH9",	0},
+	{0x29258086, 0x00, "Intel ICH9",	0},
+	{0x29278086, 0x00, "Intel ICH9",	0},
+	{0x29298086, 0x00, "Intel ICH9M",	0},
+	{0x292a8086, 0x00, "Intel ICH9M",	0},
+	{0x292b8086, 0x00, "Intel ICH9M",	0},
+	{0x292c8086, 0x00, "Intel ICH9M",	0},
+	{0x292f8086, 0x00, "Intel ICH9M",	0},
+	{0x294d8086, 0x00, "Intel ICH9",	0},
+	{0x294e8086, 0x00, "Intel ICH9M",	0},
+	{0x3a058086, 0x00, "Intel ICH10",	0},
+	{0x3a228086, 0x00, "Intel ICH10",	0},
+	{0x3a258086, 0x00, "Intel ICH10",	0},
+	{0x3b228086, 0x00, "Intel PCH",		0},
+	{0x3b238086, 0x00, "Intel PCH",		0},
+	{0x3b248086, 0x00, "Intel PCH",		0},
+	{0x3b258086, 0x00, "Intel PCH",		0},
+	{0x3b298086, 0x00, "Intel PCH",		0},
+	{0x3b2b8086, 0x00, "Intel PCH",		0},
+	{0x3b2c8086, 0x00, "Intel PCH",		0},
+	{0x3b2f8086, 0x00, "Intel PCH",		0},
+	{0x2361197b, 0x00, "JMicron JMB361",	AHCI_Q_NOFORCE},
+	{0x2363197b, 0x00, "JMicron JMB363",	AHCI_Q_NOFORCE},
+	{0x2365197b, 0x00, "JMicron JMB365",	AHCI_Q_NOFORCE},
+	{0x2366197b, 0x00, "JMicron JMB366",	AHCI_Q_NOFORCE},
+	{0x2368197b, 0x00, "JMicron JMB368",	AHCI_Q_NOFORCE},
+	{0x611111ab, 0x00, "Marvell 88SX6111",	AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS},
+	{0x612111ab, 0x00, "Marvell 88SX6121",	AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS},
+	{0x614111ab, 0x00, "Marvell 88SX6141",	AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
+	{0x614511ab, 0x00, "Marvell 88SX6145",	AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
+	{0x91231b4b, 0x11, "Marvell 88SE912x",	0},
+	{0x91231b4b, 0x00, "Marvell 88SE912x",	AHCI_Q_EDGEIS|AHCI_Q_SATA2},
+	{0x044c10de, 0x00, "NVIDIA MCP65",	0},
+	{0x044d10de, 0x00, "NVIDIA MCP65",	0},
+	{0x044e10de, 0x00, "NVIDIA MCP65",	0},
+	{0x044f10de, 0x00, "NVIDIA MCP65",	0},
+	{0x045c10de, 0x00, "NVIDIA MCP65",	0},
+	{0x045d10de, 0x00, "NVIDIA MCP65",	0},
+	{0x045e10de, 0x00, "NVIDIA MCP65",	0},
+	{0x045f10de, 0x00, "NVIDIA MCP65",	0},
+	{0x055010de, 0x00, "NVIDIA MCP67",	0},
+	{0x055110de, 0x00, "NVIDIA MCP67",	0},
+	{0x055210de, 0x00, "NVIDIA MCP67",	0},
+	{0x055310de, 0x00, "NVIDIA MCP67",	0},
+	{0x055410de, 0x00, "NVIDIA MCP67",	0},
+	{0x055510de, 0x00, "NVIDIA MCP67",	0},
+	{0x055610de, 0x00, "NVIDIA MCP67",	0},
+	{0x055710de, 0x00, "NVIDIA MCP67",	0},
+	{0x055810de, 0x00, "NVIDIA MCP67",	0},
+	{0x055910de, 0x00, "NVIDIA MCP67",	0},
+	{0x055A10de, 0x00, "NVIDIA MCP67",	0},
+	{0x055B10de, 0x00, "NVIDIA MCP67",	0},
+	{0x058410de, 0x00, "NVIDIA MCP67",	0},
+	{0x07f010de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f110de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f210de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f310de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f410de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f510de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f610de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f710de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f810de, 0x00, "NVIDIA MCP73",	0},
+	{0x07f910de, 0x00, "NVIDIA MCP73",	0},
+	{0x07fa10de, 0x00, "NVIDIA MCP73",	0},
+	{0x07fb10de, 0x00, "NVIDIA MCP73",	0},
+	{0x0ad010de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad110de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad210de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad310de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad410de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad510de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad610de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad710de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad810de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ad910de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ada10de, 0x00, "NVIDIA MCP77",	0},
+	{0x0adb10de, 0x00, "NVIDIA MCP77",	0},
+	{0x0ab410de, 0x00, "NVIDIA MCP79",	0},
+	{0x0ab510de, 0x00, "NVIDIA MCP79",	0},
+	{0x0ab610de, 0x00, "NVIDIA MCP79",	0},
+	{0x0ab710de, 0x00, "NVIDIA MCP79",	0},
+	{0x0ab810de, 0x00, "NVIDIA MCP79",	0},
+	{0x0ab910de, 0x00, "NVIDIA MCP79",	0},
+	{0x0aba10de, 0x00, "NVIDIA MCP79",	0},
+	{0x0abb10de, 0x00, "NVIDIA MCP79",	0},
+	{0x0abc10de, 0x00, "NVIDIA MCP79",	0},
+	{0x0abd10de, 0x00, "NVIDIA MCP79",	0},
+	{0x0abe10de, 0x00, "NVIDIA MCP79",	0},
+	{0x0abf10de, 0x00, "NVIDIA MCP79",	0},
+	{0x0d8410de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8510de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8610de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8710de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8810de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8910de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8a10de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8b10de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8c10de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8d10de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8e10de, 0x00, "NVIDIA MCP89",	0},
+	{0x0d8f10de, 0x00, "NVIDIA MCP89",	0},
+	{0x33491106, 0x00, "VIA VT8251",	0},
+	{0x62871106, 0x00, "VIA VT8251",	0},
+	{0x11841039, 0x00, "SiS 966",		0},
+	{0x11851039, 0x00, "SiS 968",		0},
+	{0x01861039, 0x00, "SiS 968",		0},
+	{0x00000000, 0x00, NULL,		0}
 };
 
 static int
@@ -244,6 +248,7 @@ ahci_probe(device_t dev)
 	char buf[64];
 	int i, valid = 0;
 	uint32_t devid = pci_get_devid(dev);
+	uint8_t revid = pci_get_revid(dev);
 
 	/* Is this a possible AHCI candidate? */
 	if (pci_get_class(dev) == PCIC_STORAGE &&
@@ -253,6 +258,7 @@ ahci_probe(device_t dev)
 	/* Is this a known AHCI chip? */
 	for (i = 0; ahci_ids[i].id != 0; i++) {
 		if (ahci_ids[i].id == devid &&
+		    ahci_ids[i].rev <= revid &&
 		    (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) {
 			/* Do not attach JMicrons with single PCI function. */
 			if (pci_get_vendor(dev) == 0x197b &&
@@ -276,12 +282,14 @@ ahci_ata_probe(device_t dev)
 	char buf[64];
 	int i;
 	uint32_t devid = pci_get_devid(dev);
+	uint8_t revid = pci_get_revid(dev);
 
 	if ((intptr_t)device_get_ivars(dev) >= 0)
 		return (ENXIO);
 	/* Is this a known AHCI chip? */
 	for (i = 0; ahci_ids[i].id != 0; i++) {
-		if (ahci_ids[i].id == devid) {
+		if (ahci_ids[i].id == devid &&
+		    ahci_ids[i].rev <= revid) {
 			snprintf(buf, sizeof(buf), "%s AHCI SATA controller",
 			    ahci_ids[i].name);
 			device_set_desc_copy(dev, buf);
@@ -299,11 +307,14 @@ ahci_attach(device_t dev)
 	device_t child;
 	int	error, unit, speed, i;
 	uint32_t devid = pci_get_devid(dev);
+	uint8_t revid = pci_get_revid(dev);
 	u_int32_t version;
 
 	ctlr->dev = dev;
 	i = 0;
-	while (ahci_ids[i].id != 0 && ahci_ids[i].id != devid)
+	while (ahci_ids[i].id != 0 &&
+	    (ahci_ids[i].id != devid ||
+	     ahci_ids[i].rev > revid))
 		i++;
 	ctlr->quirks = ahci_ids[i].quirks;
 	resource_int_value(device_get_name(dev),
@@ -806,6 +817,8 @@ ahci_ch_attach(device_t dev)
 	    pci_get_subdevice(ctlr->dev) == 0x81e4 &&
 	    ch->unit == 0)
 		sata_rev = 1;
+	if (ch->quirks & AHCI_Q_SATA2)
+		sata_rev = 2;
 	resource_int_value(device_get_name(dev),
 	    device_get_unit(dev), "sata_rev", &sata_rev);
 	for (i = 0; i < 16; i++) {

Modified: head/sys/dev/ata/ata-pci.c
==============================================================================
--- head/sys/dev/ata/ata-pci.c	Tue Jan 26 15:07:47 2010	(r203029)
+++ head/sys/dev/ata/ata-pci.c	Tue Jan 26 15:25:24 2010	(r203030)
@@ -877,6 +877,7 @@ ata_pcivendor2str(device_t dev)
     case ATA_ITE_ID:            return "ITE";
     case ATA_JMICRON_ID:        return "JMicron";
     case ATA_MARVELL_ID:        return "Marvell";
+    case ATA_MARVELL2_ID:       return "Marvell";
     case ATA_NATIONAL_ID:       return "National";
     case ATA_NETCELL_ID:        return "Netcell";
     case ATA_NVIDIA_ID:         return "nVidia";

Modified: head/sys/dev/ata/ata-pci.h
==============================================================================
--- head/sys/dev/ata/ata-pci.h	Tue Jan 26 15:07:47 2010	(r203029)
+++ head/sys/dev/ata/ata-pci.h	Tue Jan 26 15:25:24 2010	(r203030)
@@ -234,6 +234,7 @@ struct ata_pci_controller {
 #define ATA_M88SX6121           0x612111ab
 #define ATA_M88SX6141           0x614111ab
 #define ATA_M88SX6145           0x614511ab
+#define ATA_MARVELL2_ID         0x1b4b
 
 #define ATA_MICRON_ID           0x1042
 #define ATA_MICRON_RZ1000       0x10001042

Modified: head/sys/dev/ata/chipsets/ata-marvell.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-marvell.c	Tue Jan 26 15:07:47 2010	(r203029)
+++ head/sys/dev/ata/chipsets/ata-marvell.c	Tue Jan 26 15:25:24 2010	(r203030)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
 static int ata_marvell_chipinit(device_t dev);
 static int ata_marvell_ch_attach(device_t dev);
 static int ata_marvell_setmode(device_t dev, int target, int mode);
+static int ata_marvell_dummy_chipinit(device_t dev);
 static int ata_marvell_edma_ch_attach(device_t dev);
 static int ata_marvell_edma_ch_detach(device_t dev);
 static int ata_marvell_edma_status(device_t dev);
@@ -70,7 +71,7 @@ static void ata_marvell_edma_dmainit(dev
 #define MV_6042		62
 #define MV_7042		72
 #define MV_61XX		61
-
+#define MV_91XX		91
 
 /*
  * Marvell chipset support functions
@@ -113,9 +114,11 @@ ata_marvell_probe(device_t dev)
      { ATA_M88SX6121, 0, 2, MV_61XX, ATA_UDMA6, "88SX6121" },
      { ATA_M88SX6141, 0, 4, MV_61XX, ATA_UDMA6, "88SX6141" },
      { ATA_M88SX6145, 0, 4, MV_61XX, ATA_UDMA6, "88SX6145" },
+     { 0x91a41b4b,    0, 0, MV_91XX, ATA_UDMA6, "88SE912x" },
      { 0, 0, 0, 0, 0, 0}};
 
-    if (pci_get_vendor(dev) != ATA_MARVELL_ID)
+    if (pci_get_vendor(dev) != ATA_MARVELL_ID &&
+	pci_get_vendor(dev) != ATA_MARVELL2_ID)
 	return ENXIO;
 
     if (!(ctlr->chip = ata_match_chip(dev, ids)))
@@ -133,6 +136,9 @@ ata_marvell_probe(device_t dev)
     case MV_61XX:
 	ctlr->chipinit = ata_marvell_chipinit;
 	break;
+    case MV_91XX:
+	ctlr->chipinit = ata_marvell_dummy_chipinit;
+	break;
     }
     return (BUS_PROBE_DEFAULT);
 }
@@ -190,6 +196,15 @@ ata_marvell_setmode(device_t dev, int ta
 	return (mode);
 }
 
+static int
+ata_marvell_dummy_chipinit(device_t dev)
+{
+	struct ata_pci_controller *ctlr = device_get_softc(dev);
+
+        ctlr->channels = 0;
+        return (0);
+}
+
 int
 ata_marvell_edma_chipinit(device_t dev)
 {

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:28:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E81A8106566B;
	Tue, 26 Jan 2010 15:28:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BABC98FC19;
	Tue, 26 Jan 2010 15:28:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QFS0v1028684;
	Tue, 26 Jan 2010 15:28:00 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QFS0X4028677;
	Tue, 26 Jan 2010 15:28:00 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001261528.o0QFS0X4028677@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 26 Jan 2010 15:28: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: r203031 - in head/release: amd64 i386 pc98 powerpc
	sparc64 sun4v
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:28:01 -0000

Author: jhb
Date: Tue Jan 26 15:28:00 2010
New Revision: 203031
URL: http://svn.freebsd.org/changeset/base/203031

Log:
  Remove slattach from the install mfsroot since it doesn't exist anymore
  to quiet a warning from crunchgen.
  
  MFC after:	1 week

Modified:
  head/release/amd64/boot_crunch.conf
  head/release/i386/boot_crunch.conf
  head/release/pc98/boot_crunch.conf
  head/release/powerpc/boot_crunch.conf
  head/release/sparc64/boot_crunch.conf
  head/release/sun4v/boot_crunch.conf

Modified: head/release/amd64/boot_crunch.conf
==============================================================================
--- head/release/amd64/boot_crunch.conf	Tue Jan 26 15:25:24 2010	(r203030)
+++ head/release/amd64/boot_crunch.conf	Tue Jan 26 15:28:00 2010	(r203031)
@@ -20,7 +20,6 @@ progs mount_nfs
 progs newfs
 progs route
 progs rtsol
-progs slattach
 progs tunefs
 ln fsck_ffs fsck_4.2bsd
 ln fsck_ffs fsck_ufs

Modified: head/release/i386/boot_crunch.conf
==============================================================================
--- head/release/i386/boot_crunch.conf	Tue Jan 26 15:25:24 2010	(r203030)
+++ head/release/i386/boot_crunch.conf	Tue Jan 26 15:28:00 2010	(r203031)
@@ -20,7 +20,6 @@ progs mount_nfs
 progs newfs
 progs route
 progs rtsol
-progs slattach
 progs tunefs
 ln fsck_ffs fsck_4.2bsd
 ln fsck_ffs fsck_ufs

Modified: head/release/pc98/boot_crunch.conf
==============================================================================
--- head/release/pc98/boot_crunch.conf	Tue Jan 26 15:25:24 2010	(r203030)
+++ head/release/pc98/boot_crunch.conf	Tue Jan 26 15:28:00 2010	(r203031)
@@ -20,7 +20,6 @@ progs mount_nfs
 progs newfs
 progs route
 progs rtsol
-progs slattach
 progs tunefs
 ln fsck_ffs fsck_4.2bsd
 ln fsck_ffs fsck_ufs

Modified: head/release/powerpc/boot_crunch.conf
==============================================================================
--- head/release/powerpc/boot_crunch.conf	Tue Jan 26 15:25:24 2010	(r203030)
+++ head/release/powerpc/boot_crunch.conf	Tue Jan 26 15:28:00 2010	(r203031)
@@ -22,7 +22,6 @@ progs newfs
 progs newfs_msdos
 progs route
 progs rtsol
-progs slattach
 progs tunefs
 ln fsck_ffs fsck_4.2bsd
 ln fsck_ffs fsck_ufs

Modified: head/release/sparc64/boot_crunch.conf
==============================================================================
--- head/release/sparc64/boot_crunch.conf	Tue Jan 26 15:25:24 2010	(r203030)
+++ head/release/sparc64/boot_crunch.conf	Tue Jan 26 15:28:00 2010	(r203031)
@@ -20,7 +20,6 @@ progs mount_nfs
 progs newfs
 progs route
 progs rtsol
-progs slattach
 progs tunefs
 ln fsck_ffs fsck_4.2bsd
 ln fsck_ffs fsck_ufs

Modified: head/release/sun4v/boot_crunch.conf
==============================================================================
--- head/release/sun4v/boot_crunch.conf	Tue Jan 26 15:25:24 2010	(r203030)
+++ head/release/sun4v/boot_crunch.conf	Tue Jan 26 15:28:00 2010	(r203031)
@@ -20,7 +20,6 @@ progs mount_nfs
 progs newfs
 progs route
 progs rtsol
-progs slattach
 progs tunefs
 ln fsck_ffs fsck_4.2bsd
 ln fsck_ffs fsck_ufs

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:29:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 551491065694;
	Tue, 26 Jan 2010 15:29:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4623F8FC08;
	Tue, 26 Jan 2010 15:29:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QFTrh6029145;
	Tue, 26 Jan 2010 15:29:53 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QFTru6029143;
	Tue, 26 Jan 2010 15:29:53 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001261529.o0QFTru6029143@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 26 Jan 2010 15:29: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: r203032 - head/usr.sbin/sysinstall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:29:53 -0000

Author: jhb
Date: Tue Jan 26 15:29:53 2010
New Revision: 203032
URL: http://svn.freebsd.org/changeset/base/203032

Log:
  Don't pop up the menu to select a documentation language for non-interactive
  installs.  Default to not installing any documentation in that case.
  
  MFC after:	1 week

Modified:
  head/usr.sbin/sysinstall/dist.c

Modified: head/usr.sbin/sysinstall/dist.c
==============================================================================
--- head/usr.sbin/sysinstall/dist.c	Tue Jan 26 15:28:00 2010	(r203031)
+++ head/usr.sbin/sysinstall/dist.c	Tue Jan 26 15:29:53 2010	(r203032)
@@ -775,6 +775,10 @@ distSetDoc(dialogMenuItem *self)
 {
     int i;
 
+    /* Assume no docs for non-interactive installs. */
+    if (variable_get(VAR_NONINTERACTIVE))
+	return DITEM_SUCCESS | DITEM_RESTORE;
+
     dialog_clear_norefresh();
     if (!dmenuOpenSimple(&MenuDocInstall, FALSE))
 	i = DITEM_FAILURE;

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:30:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id A5C0A106568F; Tue, 26 Jan 2010 15:30:27 +0000 (UTC)
Date: Tue, 26 Jan 2010 15:30:27 +0000
From: Alexey Dokuchaev 
To: Dag-Erling Sm??rgrav 
Message-ID: <20100126153027.GA65470@FreeBSD.org>
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<20100125192941.GA9196@FreeBSD.org> <86ljflj798.fsf@ds4.des.no>
	<20100126142803.GA55760@FreeBSD.org> <86aaw0kjko.fsf@ds4.des.no>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <86aaw0kjko.fsf@ds4.des.no>
User-Agent: Mutt/1.4.2.1i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Jung-uk Kim 
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:30:27 -0000

On Tue, Jan 26, 2010 at 03:49:11PM +0100, Dag-Erling Sm??rgrav wrote:
> Alexey Dokuchaev  writes:
> > Considering number of recent vesa/saver breaks, I am thinking about some
> > regression test suit that could at least check for "8-bit vs. 6-bit" type
> > of things.  Is it feasible?
> 
> Not unless you can figure our a way to programmatically look at the
> screen and check that the colors aren't too dark...  IIUC, this is a
> BIOS issue, not a driver issue.

I understand; I was thinking if maybe there are some "hackish" or
indirect way to tell that BIOS is lying.

./danfe

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 15:37:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A1706106568D;
	Tue, 26 Jan 2010 15:37:54 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 70FCD8FC08;
	Tue, 26 Jan 2010 15:37:54 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 0893746B2A;
	Tue, 26 Jan 2010 10:37:54 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 38C428A01F;
	Tue, 26 Jan 2010 10:37:53 -0500 (EST)
From: John Baldwin 
To: Attilio Rao 
Date: Tue, 26 Jan 2010 09:43:38 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; )
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	<201001251456.32459.jhb@freebsd.org>
	<3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
In-Reply-To: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201001260943.38609.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 26 Jan 2010 10:37:53 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Warner Losh 
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 15:37:54 -0000

On Tuesday 26 January 2010 3:58:45 am Attilio Rao wrote:
> Finally, I really don't think the BLOCK_SPIN() performance improvement
> you suggest should really make a difference (assuming how rarely it
> should happen) because, please note, that the cmpxchg is necessary as
> we need to enforce a memory barrier when doing the check in anyway (so
> the first case should be however an atomic_cmpset_X_Y()).

Note that Intel specifically mentions in the app note that introduced 'pause' 
that one should not sit in a spin loop that bangs on cmpxchg due to the extra 
cache contention it causes.  Also, I did not say to remove the cmpxchg, but to 
only do it if a 'cmp' indicates it should work.  We already do this now for 
mtx_lock_spin() in C with something like this:

	while (!atomic_cmpset_acq_ptr(...)) {
		while (m->mtx_lock != MTX_UNOWNED) {
			cpu_spinwait();
		}
	}

The idea is to do "cheap" compares that do not require an exclusive hold on 
the cache line until you have a reason to think that the cmpxchg will "work".

> Last thinking: it is not a very good idea cpu_switch() is made
> conditional in regard of schedulers, but there is not an easy way to
> do that as long as the safe points for releasing blocked_lock happens
> within cpu_switch(). I think that is one of the reasons why some
> people (maybe you or Jeff) pushed for having cpu_switch() made in C.

Would the complicated version of BLOCK_SWITCH() work ok for the sched_4bsd and 
ULE/UP case and just devolve into normally not spinning?

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 16:05:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B13E21065697;
	Tue, 26 Jan 2010 16:05:49 +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 A1F628FC20;
	Tue, 26 Jan 2010 16:05:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QG5n5U036993;
	Tue, 26 Jan 2010 16:05:49 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QG5nRk036991;
	Tue, 26 Jan 2010 16:05:49 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001261605.o0QG5nRk036991@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 26 Jan 2010 16:05: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: r203033 - head/sys/dev/ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 16:05:49 -0000

Author: mav
Date: Tue Jan 26 16:05:49 2010
New Revision: 203033
URL: http://svn.freebsd.org/changeset/base/203033

Log:
  Clear ch->devices, if hard-reset failed.
  This makes hot-plug work nicely.
  
  HW donated by:	James R. Van Artsdalen

Modified:
  head/sys/dev/ata/chipsets/ata-promise.c

Modified: head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-promise.c	Tue Jan 26 15:29:53 2010	(r203032)
+++ head/sys/dev/ata/chipsets/ata-promise.c	Tue Jan 26 16:05:49 2010	(r203033)
@@ -821,7 +821,8 @@ ata_promise_mio_reset(device_t dev)
 		    device_printf(dev, "promise_mio_reset devices=%08x\n",
 		    		  ch->devices);
 
-	    }
+	    } else
+		ch->devices = 0;
 
 	    /* reset and enable plug/unplug intr */
 	    ATA_OUTL(ctlr->r_res2, 0x060, (0x00000011 << ch->unit));

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 16:12:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6607F10656C3;
	Tue, 26 Jan 2010 16:12:28 +0000 (UTC)
	(envelope-from mavbsd@gmail.com)
Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com
	[209.85.220.227])
	by mx1.freebsd.org (Postfix) with ESMTP id 9EA7B8FC12;
	Tue, 26 Jan 2010 16:12:27 +0000 (UTC)
Received: by fxm27 with SMTP id 27so2109589fxm.3
	for ; Tue, 26 Jan 2010 08:12:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:message-id:date:from
	:user-agent:mime-version:to:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=ZPNFMGu4acU5TLpNoXMegY0J9K5bJ3fZP2iTs4hK9kY=;
	b=f8e0WHJ2msr70Pz0A4mdxD3SK8Wj6BDUTrGHvAFrH7/Q560P2p35gQGppIpP92vxn2
	UEDElo1fdeq/uQjt3AfHI+dIg5Ae2j3UKbpNlNEMd0pS9tf6WlldAgYoTmjOWG/BxvHg
	xT66ir6l3l/2qIHqD+whpN61fU8p4DpZ7kSoY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=EuYE3t5q7B5VR4LjmrJsSlt6+VD7h2dZpXjTyz2FYUC7I57WK5D6Jyyu0PvLT3zuhH
	oEGlCfBp1K54/QFJwcymKgYmTCt0G+rpR+awb8aRz3vFsxrFlW+Ho5pxbO46d4BpaZcI
	th/wdKtcjsejqyzeiAmnFRusvbbvJrb0vEe/8=
Received: by 10.223.3.135 with SMTP id 7mr8600615fan.21.1264522346539;
	Tue, 26 Jan 2010 08:12:26 -0800 (PST)
Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226])
	by mx.google.com with ESMTPS id 15sm3390816fxm.14.2010.01.26.08.12.25
	(version=SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 08:12:25 -0800 (PST)
Sender: Alexander Motin 
Message-ID: <4B5F1468.3000001@FreeBSD.org>
Date: Tue, 26 Jan 2010 18:12:24 +0200
From: Alexander Motin 
User-Agent: Thunderbird 2.0.0.23 (X11/20091212)
MIME-Version: 1.0
To: src-committers@freebsd.org, svn-src-all@freebsd.org, 
	svn-src-head@freebsd.org
References: <201001261525.o0QFPONL028075@svn.freebsd.org>
In-Reply-To: <201001261525.o0QFPONL028075@svn.freebsd.org>
X-Enigmail-Version: 0.96.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: 
Subject: Re: svn commit: r203030 - in head/sys/dev: ahci ata ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 16:12:28 -0000

Alexander Motin wrote:
> Author: mav
> Date: Tue Jan 26 15:25:24 2010
> New Revision: 203030
> URL: http://svn.freebsd.org/changeset/base/203030
> 
> Log:
>   Add support for SATA part of Marvell 88SE912x controllers to ahci(4).
>   Limit early revisions from 6Gb/s to 3Gb/s by default, or they negotiate
>   only 1.5Gbps, when 3Gb/s devices connected.
>   
>   Add dummy driver for PATA part of these controllers, preventing generic
>   driver attach them. It causes system freeze when SATA controller used after
>   PATA was touched.

HW donated by:	James R. Van Artsdalen

-- 
Alexander Motin

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 16:18:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB53D1065672;
	Tue, 26 Jan 2010 16:18:45 +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 925518FC16;
	Tue, 26 Jan 2010 16:18:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QGIjm1039849;
	Tue, 26 Jan 2010 16:18:45 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QGIjAR039847;
	Tue, 26 Jan 2010 16:18:45 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001261618.o0QGIjAR039847@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 26 Jan 2010 16:18:45 +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: r203034 - head/sys/dev/ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 16:18:45 -0000

Author: mav
Date: Tue Jan 26 16:18:45 2010
New Revision: 203034
URL: http://svn.freebsd.org/changeset/base/203034

Log:
  Restore SATA speed reporting, broken by ATA_CAM changes.

Modified:
  head/sys/dev/ata/chipsets/ata-promise.c

Modified: head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-promise.c	Tue Jan 26 16:05:49 2010	(r203033)
+++ head/sys/dev/ata/chipsets/ata-promise.c	Tue Jan 26 16:18:45 2010	(r203034)
@@ -73,6 +73,7 @@ static u_int32_t ata_promise_mio_softres
 static void ata_promise_mio_dmainit(device_t dev);
 static void ata_promise_mio_setprd(void *xsc, bus_dma_segment_t *segs, int nsegs, int error);
 static int ata_promise_mio_setmode(device_t dev, int target, int mode);
+static int ata_promise_mio_getrev(device_t dev, int target);
 static void ata_promise_sx4_intr(void *data);
 static int ata_promise_sx4_command(struct ata_request *request);
 static int ata_promise_apkt(u_int8_t *bytep, struct ata_request *request);
@@ -341,6 +342,7 @@ sataii:
 	ctlr->ch_detach = ata_promise_mio_ch_detach;
 	ctlr->reset = ata_promise_mio_reset;
 	ctlr->setmode = ata_promise_mio_setmode;
+	ctlr->getrev = ata_promise_mio_getrev;
 
 	return 0;
     }
@@ -999,7 +1001,7 @@ ata_promise_mio_setmode(device_t dev, in
 
         if ( (ctlr->chip->cfg2 == PR_SATA) ||
     	    ((ctlr->chip->cfg2 == PR_CMBO) && (ch->unit < 2)) ||
-	    (ctlr->chip->cfg2 == PR_SATA2) ||
+	     (ctlr->chip->cfg2 == PR_SATA2) ||
 	    ((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2)))
 		mode = ata_sata_setmode(dev, target, mode);
 	else
@@ -1007,6 +1009,21 @@ ata_promise_mio_setmode(device_t dev, in
 	return (mode);
 }
 
+static int
+ata_promise_mio_getrev(device_t dev, int target)
+{
+        struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
+        struct ata_channel *ch = device_get_softc(dev);
+
+        if ( (ctlr->chip->cfg2 == PR_SATA) ||
+    	    ((ctlr->chip->cfg2 == PR_CMBO) && (ch->unit < 2)) ||
+	     (ctlr->chip->cfg2 == PR_SATA2) ||
+	    ((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2)))
+		return (ata_sata_getrev(dev, target));
+	else
+		return (0);
+}
+
 static void
 ata_promise_sx4_intr(void *data)
 {

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 17:05:51 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D30FC106566B;
	Tue, 26 Jan 2010 17:05:51 +0000 (UTC)
	(envelope-from ivoras@gmail.com)
Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com
	[209.85.220.227])
	by mx1.freebsd.org (Postfix) with ESMTP id BB6428FC1A;
	Tue, 26 Jan 2010 17:05:50 +0000 (UTC)
Received: by fxm27 with SMTP id 27so2169079fxm.3
	for ; Tue, 26 Jan 2010 09:05:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:from:date:x-google-sender-auth:message-id:subject:to:cc
	:content-type:content-transfer-encoding;
	bh=c2/c+nq4MDZFkhabz+jyNXl7u65TP1qN04rtXH7AHnA=;
	b=X7C2QL4q/81Zu11bW4tc+t1TfKVCnrvNX3ETYGpK9IV3mlLnyDzQaWMGZszBBtGFPu
	9ka8r4mbqWTQRsSDx8i714NcpERltNlw1MsQYAi8H/mZOi1DfTpfOLD1IYKwFfOrcUZU
	ghBpp7yRqEiWOCcDfzaTpZGCJNFrF0QBoRnjs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	b=SVZjRnD8ffvI+l1BZ4VwY2dOMDryY08L9FyIca5Fk6Y/e9GQ7YhbtZ5rAU36GfAIdv
	oUqXiH9fAO3DT7cDs/tyqAjVxAHQjzD6ib3MN4rFFUKxm+ymOc7gD9eQgivhP3mut8NF
	BxId21vCvncS5oAbVicXom5Ep0TqJFZz+1yFo=
MIME-Version: 1.0
Sender: ivoras@gmail.com
Received: by 10.216.90.74 with SMTP id d52mr3165283wef.51.1264525549323; Tue, 
	26 Jan 2010 09:05:49 -0800 (PST)
In-Reply-To: <20100126141525.10365e5dzlk7jc4k@webmail.leidinger.net>
References: <201001231842.o0NIgSa5086957@svn.freebsd.org>
	<201001250757.49334.jhb@freebsd.org> 
	<20100126141525.10365e5dzlk7jc4k@webmail.leidinger.net>
From: Ivan Voras 
Date: Tue, 26 Jan 2010 18:05:29 +0100
X-Google-Sender-Auth: c2b0d5f3d98c9549
Message-ID: <9bbcef731001260905u36436624rfcf466765eee1f6a@mail.gmail.com>
To: Alexander Leidinger 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Alan Cox , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	John Baldwin 
Subject: Re: svn commit: r202894 - in head/sys/i386: i386 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 17:05:51 -0000

2010/1/26 Alexander Leidinger :
>
> Quoting John Baldwin  (from Mon, 25 Jan 2010 07:57:49
> -0500):
>
>> On Saturday 23 January 2010 1:42:28 pm Alan Cox wrote:
>>>
>>> Author: alc
>>> Date: Sat Jan 23 18:42:28 2010
>>> New Revision: 202894
>>> URL: http://svn.freebsd.org/changeset/base/202894
>>>
>>> Log:
>>> =C2=A0Handle a race between pmap_kextract() and pmap_promote_pde(). =C2=
=A0This race
>>> is
>>> =C2=A0known to cause a kernel crash in ZFS on i386 when superpage promo=
tion is
>>> =C2=A0enabled.
>>>
>>> =C2=A0Tested by: =C2=A0 =C2=A0netchild
>>> =C2=A0MFC after: =C2=A0 =C2=A01 week
>>
>> Yay! =C2=A0Should we enable pg_ps by default on i386 now?
>
> Data point, the i386 system where I have superpages enabled is a p4 with
> currently 11 jails active. Some webservers, squid, samba, bind, postfix a=
nd
> a lot of portupgrades (during the last days, I'm updating a jail with a
> desktop-setup inside). All jails are on ZFS.

Do you have any method of comparing performance before-and-after?
There was a thread on some of the mailing lists (stable@/current@?)
about squid being the pessimal case for superpages.

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 17:21:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6B1F21065697;
	Tue, 26 Jan 2010 17:21:25 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5AD0F8FC22;
	Tue, 26 Jan 2010 17:21:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QHLP8k053695;
	Tue, 26 Jan 2010 17:21:25 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QHLPbV053693;
	Tue, 26 Jan 2010 17:21:25 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001261721.o0QHLPbV053693@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 26 Jan 2010 17:21:25 +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: r203036 - head/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 17:21:25 -0000

Author: trasz
Date: Tue Jan 26 17:21:25 2010
New Revision: 203036
URL: http://svn.freebsd.org/changeset/base/203036

Log:
  Add information about when nmount(2) was introduced.

Modified:
  head/lib/libc/sys/mount.2

Modified: head/lib/libc/sys/mount.2
==============================================================================
--- head/lib/libc/sys/mount.2	Tue Jan 26 16:47:34 2010	(r203035)
+++ head/lib/libc/sys/mount.2	Tue Jan 26 17:21:25 2010	(r203036)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.2	8.3 (Berkeley) 5/24/95
 .\" $FreeBSD$
 .\"
-.Dd February 23, 2005
+.Dd January 26, 2010
 .Dt MOUNT 2
 .Os
 .Sh NAME
@@ -368,5 +368,9 @@ and
 .Fn unmount
 functions appeared in
 .At v6 .
+The
+.Fn nmount
+system call first appeared in
+.Fx 5.0 .
 .Sh BUGS
 Some of the error codes need translation to more obvious messages.

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 18:24:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ACE5B1065670;
	Tue, 26 Jan 2010 18:24:13 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B31D8FC1D;
	Tue, 26 Jan 2010 18:24:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QIODQN067556;
	Tue, 26 Jan 2010 18:24:13 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QIOD6k067554;
	Tue, 26 Jan 2010 18:24:13 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201001261824.o0QIOD6k067554@svn.freebsd.org>
From: Doug Barton 
Date: Tue, 26 Jan 2010 18:24:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203037 - stable/8/usr.sbin/mergemaster
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 18:24:13 -0000

Author: dougb
Date: Tue Jan 26 18:24:13 2010
New Revision: 203037
URL: http://svn.freebsd.org/changeset/base/203037

Log:
  MFC r202817:
  
  Make -U once again honor -D after my change to consolidate setting
  of MTREEDB with DESTDIR.
  
  PR:		bin/143089
  Submitted by:	Anton Yuzhaninov 

Modified:
  stable/8/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  stable/8/usr.sbin/mergemaster/   (props changed)

Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh
==============================================================================
--- stable/8/usr.sbin/mergemaster/mergemaster.sh	Tue Jan 26 17:21:25 2010	(r203036)
+++ stable/8/usr.sbin/mergemaster/mergemaster.sh	Tue Jan 26 18:24:13 2010	(r203037)
@@ -261,11 +261,6 @@ if [ -r "$HOME/.mergemasterrc" ]; then
   . "$HOME/.mergemasterrc"
 fi
 
-# Assign the location of the mtree database
-#
-MTREEDB=${MTREEDB:-${DESTDIR}/var/db}
-MTREEFILE="${MTREEDB}/mergemaster.mtree"
-
 # Check the command line options
 #
 while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do
@@ -342,6 +337,11 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F
   esac
 done
 
+# Assign the location of the mtree database
+#
+MTREEDB=${MTREEDB:-${DESTDIR}/var/db}
+MTREEFILE="${MTREEDB}/mergemaster.mtree"
+
 # Don't force the user to set this in the mergemaster rc file
 if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then
   PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S`

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 18:25:23 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A198106566C;
	Tue, 26 Jan 2010 18:25:23 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 286F58FC13;
	Tue, 26 Jan 2010 18:25:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QIPN53067870;
	Tue, 26 Jan 2010 18:25:23 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QIPNgJ067868;
	Tue, 26 Jan 2010 18:25:23 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201001261825.o0QIPNgJ067868@svn.freebsd.org>
From: Doug Barton 
Date: Tue, 26 Jan 2010 18:25:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203038 - stable/7/usr.sbin/mergemaster
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 18:25:23 -0000

Author: dougb
Date: Tue Jan 26 18:25:22 2010
New Revision: 203038
URL: http://svn.freebsd.org/changeset/base/203038

Log:
  MFC r202817:
  
  Make -U once again honor -D after my change to consolidate setting
  of MTREEDB with DESTDIR.
  
  PR:             bin/143089
  Submitted by:   Anton Yuzhaninov 
  
  Approved by:	re (kensmith)

Modified:
  stable/7/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  stable/7/usr.sbin/mergemaster/   (props changed)

Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh
==============================================================================
--- stable/7/usr.sbin/mergemaster/mergemaster.sh	Tue Jan 26 18:24:13 2010	(r203037)
+++ stable/7/usr.sbin/mergemaster/mergemaster.sh	Tue Jan 26 18:25:22 2010	(r203038)
@@ -261,11 +261,6 @@ if [ -r "$HOME/.mergemasterrc" ]; then
   . "$HOME/.mergemasterrc"
 fi
 
-# Assign the location of the mtree database
-#
-MTREEDB=${MTREEDB:-${DESTDIR}/var/db}
-MTREEFILE="${MTREEDB}/mergemaster.mtree"
-
 # Check the command line options
 #
 while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do
@@ -342,6 +337,11 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F
   esac
 done
 
+# Assign the location of the mtree database
+#
+MTREEDB=${MTREEDB:-${DESTDIR}/var/db}
+MTREEFILE="${MTREEDB}/mergemaster.mtree"
+
 # Don't force the user to set this in the mergemaster rc file
 if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then
   PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S`

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 18:31:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 000D1106566B;
	Tue, 26 Jan 2010 18:31:42 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A9B428FC12;
	Tue, 26 Jan 2010 18:31:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QIVg3A069300;
	Tue, 26 Jan 2010 18:31:42 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QIVg2i069299;
	Tue, 26 Jan 2010 18:31:42 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201001261831.o0QIVg2i069299@svn.freebsd.org>
From: Doug Barton 
Date: Tue, 26 Jan 2010 18:31:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203039 - stable/8/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 18:31:43 -0000

Author: dougb
Date: Tue Jan 26 18:31:42 2010
New Revision: 203039
URL: http://svn.freebsd.org/changeset/base/203039

Log:
  Remove bogus mergeinfo I accidentally added (attempted merge from
  a bogus head).
  
  Reminded by:	gavin

Modified:
Directory Properties:
  stable/8/etc/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 18:39:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ECAFB106566C;
	Tue, 26 Jan 2010 18:39:58 +0000 (UTC) (envelope-from xcllnt@mac.com)
Received: from asmtpout023.mac.com (asmtpout023.mac.com [17.148.16.98])
	by mx1.freebsd.org (Postfix) with ESMTP id C69DE8FC0C;
	Tue, 26 Jan 2010 18:39:58 +0000 (UTC)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36])
	by asmtp023.mac.com
	(Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008;
	32bit)) with ESMTPSA id <0KWV00IL9AILH530@asmtp023.mac.com>; Tue,
	26 Jan 2010 10:39:58 -0800 (PST)
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
	ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam
	adjust=0
	reason=mlx engine=5.0.0-0908210000 definitions=main-1001260135
From: Marcel Moolenaar 
In-reply-to: <3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com>
Date: Tue, 26 Jan 2010 10:39:57 -0800
Message-id: 
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	<201001251456.32459.jhb@freebsd.org>
	<3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
	<3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com>
To: Attilio Rao 
X-Mailer: Apple Mail (2.1077)
Cc: src-committers@freebsd.org, John Baldwin ,
	svn-src-all@freebsd.org, Marcel Moolenaar ,
	svn-src-head@freebsd.org, Warner Losh 
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 18:39:59 -0000


On Jan 26, 2010, at 3:39 AM, Attilio Rao wrote:
>>> 
>>> Does this affect the various #ifdef's for handling the third argument to
>>> cpu_switch()?  E.g. does 4BSD need to spin if td_lock is &blocked_lock?
>>> 
> 
> I think that ia64 is broken on that regard because it does use simple
> operation while it should use correct atomic and memory barriers
> (CC'ed marcel@ for that).

Ok, so cpu_switch() handles the 3rd argument (the mutex) only
when SCHED_ULE and SMP are defined, even on i386. Maybe it's
just me, but if SCHED_4BSD now also uses the 3rd argument then
all implementations of cpu_switch() are broken, right?

Maybe what is in order right now is a description (using pseudo
code if you like) of what exactly needs to happen with the 3rd
argument, when and how (i.e. what must be atomic and what does
not have to be atomic).

I can deal with ia64 and powerpc once I know for certain what
exactly needs to happen, because it seems to me that I can't
really look at the i386 implementation and infer what needs to
happen.

Thanks,

-- 
Marcel Moolenaar
xcllnt@mac.com




From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 19:17:14 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id 8AFCE106566C;
	Tue, 26 Jan 2010 19:17:14 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: Alexey Dokuchaev 
Date: Tue, 26 Jan 2010 14:16:49 -0500
User-Agent: KMail/1.6.2
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<86aaw0kjko.fsf@ds4.des.no> <20100126153027.GA65470@FreeBSD.org>
In-Reply-To: <20100126153027.GA65470@FreeBSD.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_y+zXLB2u5Sm4pdb"
Message-Id: <201001261417.06116.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, Dag-Erling Sm??rgrav ,
	svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 19:17:14 -0000


--Boundary-00=_y+zXLB2u5Sm4pdb
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 26 January 2010 10:30 am, Alexey Dokuchaev wrote:
> On Tue, Jan 26, 2010 at 03:49:11PM +0100, Dag-Erling Sm??rgrav 
wrote:
> > Alexey Dokuchaev  writes:
> > > Considering number of recent vesa/saver breaks, I am thinking
> > > about some regression test suit that could at least check for
> > > "8-bit vs. 6-bit" type of things.  Is it feasible?
> >
> > Not unless you can figure our a way to programmatically look at
> > the screen and check that the colors aren't too dark...  IIUC,
> > this is a BIOS issue, not a driver issue.
>
> I understand; I was thinking if maybe there are some "hackish" or
> indirect way to tell that BIOS is lying.

Probably you mean something like the attached patch?   Basically, with 
this patch, we ignore the VGA compatibility flag if the DAC mode is 
higher than 6-bit.  Let me know if it works for you.

Jung-uk Kim

--Boundary-00=_y+zXLB2u5Sm4pdb
Content-Type: text/plain;
  charset="iso-8859-1";
  name="vesa.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="vesa.diff"

--- sys/dev/fb/vesa.c
+++ sys/dev/fb/vesa.c
@@ -1367,10 +1367,11 @@ vesa_save_palette(video_adapter_t *adp, u_char *pa
 {
 	int bits;
 
-	if ((adp == vesa_adp) &&
-	    (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 &&
-	    (bits = vesa_bios_get_dac()) >= 6)
-		return (vesa_bios_save_palette(0, 256, palette, bits));
+	if (adp == vesa_adp && VESA_MODE(adp->va_mode)) {
+		bits = vesa_bios_get_dac();
+		if ((adp->va_info.vi_flags & V_INFO_NONVGA) != 0 || bits > 6)
+			return (vesa_bios_save_palette(0, 256, palette, bits));
+	}
 
 	return ((*prevvidsw->save_palette)(adp, palette));
 }
@@ -1380,10 +1381,11 @@ vesa_load_palette(video_adapter_t *adp, u_char *pa
 {
 	int bits;
 
-	if ((adp == vesa_adp) &&
-	    (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 &&
-	    (bits = vesa_bios_get_dac()) >= 6)
-		return (vesa_bios_load_palette(0, 256, palette, bits));
+	if (adp == vesa_adp && VESA_MODE(adp->va_mode)) {
+		bits = vesa_bios_get_dac();
+		if ((adp->va_info.vi_flags & V_INFO_NONVGA) != 0 || bits > 6)
+			return (vesa_bios_load_palette(0, 256, palette, bits));
+	}
 
 	return ((*prevvidsw->load_palette)(adp, palette));
 }
@@ -1581,13 +1583,15 @@ get_palette(video_adapter_t *adp, int base, int co
 	int bits;
 	int error;
 
-	if ((base < 0) || (base >= 256) || (count < 0) || (count > 256))
+	if (base < 0 || base >= 256 || count < 0 || count > 256)
 		return (1);
 	if ((base + count) > 256)
 		return (1);
-	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 ||
-	    (bits = vesa_bios_get_dac()) < 6)
+	if (!VESA_MODE(adp->va_mode))
 		return (1);
+	bits = vesa_bios_get_dac();
+	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 && bits <= 6)
+		return (1);
 
 	r = malloc(count * 3, M_DEVBUF, M_WAITOK);
 	g = r + count;
@@ -1617,11 +1621,15 @@ set_palette(video_adapter_t *adp, int base, int co
 	int bits;
 	int error;
 
-	if ((base < 0) || (base >= 256) || (base + count > 256))
+	if (base < 0 || base >= 256 || count < 0 || count > 256)
 		return (1);
-	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 ||
-	    (bits = vesa_bios_get_dac()) < 6)
+	if ((base + count) > 256)
 		return (1);
+	if (!VESA_MODE(adp->va_mode))
+		return (1);
+	bits = vesa_bios_get_dac();
+	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 && bits <= 6)
+		return (1);
 
 	r = malloc(count * 3, M_DEVBUF, M_WAITOK);
 	g = r + count;

--Boundary-00=_y+zXLB2u5Sm4pdb--

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 19:48:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F60A106566B;
	Tue, 26 Jan 2010 19:48:46 +0000 (UTC) (envelope-from wxs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6DCFB8FC14;
	Tue, 26 Jan 2010 19:48:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QJmkPr086263;
	Tue, 26 Jan 2010 19:48:46 GMT (envelope-from wxs@svn.freebsd.org)
Received: (from wxs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QJmk2i086261;
	Tue, 26 Jan 2010 19:48:46 GMT (envelope-from wxs@svn.freebsd.org)
Message-Id: <201001261948.o0QJmk2i086261@svn.freebsd.org>
From: Wesley Shields 
Date: Tue, 26 Jan 2010 19:48:46 +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: r203040 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 19:48:46 -0000

Author: wxs (ports committer)
Date: Tue Jan 26 19:48:46 2010
New Revision: 203040
URL: http://svn.freebsd.org/changeset/base/203040

Log:
  - Add myself. I forgot to do this when I got my commit bit.

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Tue Jan 26 18:31:42 2010	(r203039)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Tue Jan 26 19:48:46 2010	(r203040)
@@ -158,6 +158,7 @@
 06/02	Jean-Marc Zucconi  born in Pontarlier, France, 1954
 06/02	Alexander Botero-Lowry  born in Austin, TX, USA, 1986
 06/03	CHOI Junho  born in Seoul, Korea, 1974
+06/03	Wesley Shields  born in Binghamton, NY, USA, 1981
 06/04	Julian Elischer  born in Perth, Australia, 1959
 06/04	Jason Evans  born in Greeley, Colorado, United States, 1973
 06/04	Justin Gibbs  born in San Pedro, California, United States, 1973

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 19:49:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A38DA106578D;
	Tue, 26 Jan 2010 19:49:03 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 900ED8FC1C;
	Tue, 26 Jan 2010 19:49:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QJn3xZ086368;
	Tue, 26 Jan 2010 19:49:03 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QJn3ns086365;
	Tue, 26 Jan 2010 19:49:03 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001261949.o0QJn3ns086365@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Jan 2010 19:49:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203041 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 19:49:03 -0000

Author: edwin
Date: Tue Jan 26 19:49:03 2010
New Revision: 203041
URL: http://svn.freebsd.org/changeset/base/203041

Log:
  MFC of tzdata2010b, r203019
  
  Mexico's House of Representatives has approved a proposal for
  northern Mexico's border cities to share the same daylight saving
  schedule as the United States.
  
  Approved by:	re (kib)

Modified:
  stable/7/share/zoneinfo/northamerica
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Tue Jan 26 19:48:46 2010	(r203040)
+++ stable/7/share/zoneinfo/northamerica	Tue Jan 26 19:49:03 2010	(r203041)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.28
+# @(#)northamerica	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1955,6 +1955,58 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 
 # http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
 # confirms this.  Sonora as usual is the only state where DST is not applied.
 
+# From Steffen Thorsen (2009-12-28):
+#
+# Steffen Thorsen wrote:
+# > Mexico's House of Representatives has approved a proposal for northern
+# > Mexico's border cities to share the same daylight saving schedule as
+# > the United States.
+# Now this has passed both the Congress and the Senate, so starting from
+# 2010, some border regions will be the same:
+# 
+# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/
+# 
+# 
+# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939
+# 
+# (Spanish)
+#
+# Could not find the new law text, but the proposed law text changes are here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf
+# 
+# (Gaceta Parlamentaria)
+#
+# There is also a list of the votes here:
+# 
+# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
+# 
+#
+# Our page:
+# 
+# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
+# 
+
+# From Arthur David Olson (2010-01-20):
+# The page
+# 
+# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
+# 
+# includes this text:
+# En los municipios fronterizos de Tijuana y Mexicali en Baja California;
+# Juárez y Ojinaga en Chihuahua; Acuña y Piedras Negras en Coahuila;
+# Anáhuac en Nuevo León; y Nuevo Laredo, Reynosa y Matamoros en
+# Tamaulipas, la aplicación de este horario estacional surtirá efecto
+# desde las dos horas del segundo domingo de marzo y concluirá a las dos
+# horas del primer domingo de noviembre.
+# En los municipios fronterizos que se encuentren ubicados en la franja
+# fronteriza norte en el territorio comprendido entre la línea
+# internacional y la línea paralela ubicada a una distancia de veinte
+# kilómetros, así como la Ciudad de Ensenada, Baja California, hacia el
+# interior del país, la aplicación de este horario estacional surtirá
+# efecto desde las dos horas del segundo domingo de marzo y concluirá a
+# las dos horas del primer domingo de noviembre.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
@@ -1981,13 +2033,19 @@ Zone America/Merida	-5:58:28 -	LMT	1922 
 			-6:00	-	CST	1981 Dec 23
 			-5:00	-	EST	1982 Dec  2
 			-6:00	Mexico	C%sT
-# Coahuila, Durango, Nuevo Leon, Tamaulipas
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (near US border)
+Zone America/Matamoros	-6:40:00 -	LMT	1921 Dec 31 23:20:00
+			-6:00	-	CST	1988
+			-6:00	US	C%sT	1989
+			-6:00	Mexico	C%sT	2010
+			-6:00	US	C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas (away from US border)
 Zone America/Monterrey	-6:41:16 -	LMT	1921 Dec 31 23:18:44
 			-6:00	-	CST	1988
 			-6:00	US	C%sT	1989
 			-6:00	Mexico	C%sT
 # Central Mexico
-Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
+Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1 0:23:24
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
@@ -1996,7 +2054,19 @@ Zone America/Mexico_City -6:36:36 -	LMT	
 			-6:00	Mexico	C%sT	2001 Sep 30 02:00
 			-6:00	-	CST	2002 Feb 20
 			-6:00	Mexico	C%sT
-# Chihuahua
+# Chihuahua (near US border)
+Zone America/Ojinaga	-6:57:40 -	LMT	1922 Jan 1 0:02:20
+			-7:00	-	MST	1927 Jun 10 23:00
+			-6:00	-	CST	1930 Nov 15
+			-7:00	-	MST	1931 May  1 23:00
+			-6:00	-	CST	1931 Oct
+			-7:00	-	MST	1932 Apr  1
+			-6:00	-	CST	1996
+			-6:00	Mexico	C%sT	1998
+			-6:00	-	CST	1998 Apr Sun>=1 3:00
+			-7:00	Mexico	M%sT	2010
+			-7:00	US	M%sT
+# Chihuahua (away from US border)
 Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
@@ -2030,7 +2100,7 @@ Zone America/Mazatlan	-7:05:40 -	LMT	192
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# Baja California
+# Baja California (near US border)
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-7:00	-	MST	1924
 			-8:00	-	PST	1927 Jun 10 23:00
@@ -2048,6 +2118,26 @@ Zone America/Tijuana	-7:48:04 -	LMT	1922
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT	2001
 			-8:00	US	P%sT	2002 Feb 20
+			-8:00	Mexico	P%sT	2010
+			-8:00	US	P%sT
+# Baja California (away from US border)
+Zone America/Santa_Isabel	-7:39:28 -	LMT	1922 Jan  1  0:20:32
+			-7:00	-	MST	1924
+			-8:00	-	PST	1927 Jun 10 23:00
+			-7:00	-	MST	1930 Nov 15
+			-8:00	-	PST	1931 Apr  1
+			-8:00	1:00	PDT	1931 Sep 30
+			-8:00	-	PST	1942 Apr 24
+			-8:00	1:00	PWT	1945 Aug 14 23:00u
+			-8:00	1:00	PPT	1945 Nov 12 # Peace
+			-8:00	-	PST	1948 Apr  5
+			-8:00	1:00	PDT	1949 Jan 14
+			-8:00	-	PST	1954
+			-8:00	CA	P%sT	1961
+			-8:00	-	PST	1976
+			-8:00	US	P%sT	1996
+			-8:00	Mexico	P%sT	2001
+			-8:00	US	P%sT	2002 Feb 20
 			-8:00	Mexico	P%sT
 # From Paul Eggert (2006-03-22):
 # Formerly there was an America/Ensenada zone, which differed from

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Jan 26 19:48:46 2010	(r203040)
+++ stable/7/share/zoneinfo/zone.tab	Tue Jan 26 19:49:03 2010	(r203041)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.31
+# @(#)zone.tab	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -279,11 +279,14 @@ MW	-1547+03500	Africa/Blantyre
 MX	+1924-09909	America/Mexico_City	Central Time - most locations
 MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2058-08937	America/Merida	Central Time - Campeche, Yucatan
-MX	+2540-10019	America/Monterrey	Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX	+2540-10019	America/Monterrey	Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
+MX	+2550-09730	America/Matamoros	US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
 MX	+2313-10625	America/Mazatlan	Mountain Time - S Baja, Nayarit, Sinaloa
-MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
+MX	+2838-10605	America/Chihuahua	Mexican Mountain Time - Chihuahua away from US border
+MX	+2934-10425	America/Ojinaga	US Mountain Time - Chihuahua near US border
 MX	+2904-11058	America/Hermosillo	Mountain Standard Time - Sonora
-MX	+3232-11701	America/Tijuana	Pacific Time
+MX	+3232-11701	America/Tijuana	US Pacific Time - Baja California near US border
+MX	+3018-11452	America/Santa_Isabel	Mexican Pacific Time - Baja California away from US border
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:02:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86E53106568B;
	Tue, 26 Jan 2010 20:02:53 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 757218FC1A;
	Tue, 26 Jan 2010 20:02:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QK2rrJ089431;
	Tue, 26 Jan 2010 20:02:53 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QK2rau089428;
	Tue, 26 Jan 2010 20:02:53 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <201001262002.o0QK2rau089428@svn.freebsd.org>
From: Ed Maste 
Date: Tue, 26 Jan 2010 20:02: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: r203042 - head/usr.bin/uname
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:02:53 -0000

Author: emaste
Date: Tue Jan 26 20:02:53 2010
New Revision: 203042
URL: http://svn.freebsd.org/changeset/base/203042

Log:
  Allow -o as a synonym for -s, for compatibility with other systems.
  
  Using -s is preferred, but some existing scripts and makefiles expect
  to get the system name from uname -o.
  
  Reviewed by:	imp

Modified:
  head/usr.bin/uname/uname.1
  head/usr.bin/uname/uname.c

Modified: head/usr.bin/uname/uname.1
==============================================================================
--- head/usr.bin/uname/uname.1	Tue Jan 26 19:49:03 2010	(r203041)
+++ head/usr.bin/uname/uname.1	Tue Jan 26 20:02:53 2010	(r203042)
@@ -32,7 +32,7 @@
 .\"	@(#)uname.1	8.3 (Berkeley) 4/8/94
 .\" $FreeBSD$
 .\"
-.Dd April 2, 2003
+.Dd January 26, 2010
 .Dt UNAME 1
 .Os
 .Sh NAME
@@ -63,6 +63,10 @@ Write the kernel ident to standard outpu
 Write the type of the current hardware platform to standard output.
 .It Fl n
 Write the name of the system to standard output.
+.It Fl o
+This is a synonym for the
+.Fl s
+option, for compatibility with other systems.
 .It Fl p
 Write the type of the machine processor architecture to standard output.
 .It Fl r

Modified: head/usr.bin/uname/uname.c
==============================================================================
--- head/usr.bin/uname/uname.c	Tue Jan 26 19:49:03 2010	(r203041)
+++ head/usr.bin/uname/uname.c	Tue Jan 26 20:02:53 2010	(r203042)
@@ -88,7 +88,7 @@ main(int argc, char *argv[])
 	setup_get();
 	flags = 0;
 
-	while ((ch = getopt(argc, argv, "aimnprsv")) != -1)
+	while ((ch = getopt(argc, argv, "aimnoprsv")) != -1)
 		switch(ch) {
 		case 'a':
 			flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG);
@@ -109,6 +109,7 @@ main(int argc, char *argv[])
 			flags |= RFLAG;
 			break;
 		case 's':
+		case 'o':
 			flags |= SFLAG;
 			break;
 		case 'v':

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:12:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BAC881065670;
	Tue, 26 Jan 2010 20:12:27 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 87F0F8FC17;
	Tue, 26 Jan 2010 20:12:27 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 39D0546B23;
	Tue, 26 Jan 2010 15:12:27 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 641318A01F;
	Tue, 26 Jan 2010 15:12:26 -0500 (EST)
From: John Baldwin 
To: Ivan Voras 
Date: Tue, 26 Jan 2010 15:07:21 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; )
References: <201001231842.o0NIgSa5086957@svn.freebsd.org>
	<20100126141525.10365e5dzlk7jc4k@webmail.leidinger.net>
	<9bbcef731001260905u36436624rfcf466765eee1f6a@mail.gmail.com>
In-Reply-To: <9bbcef731001260905u36436624rfcf466765eee1f6a@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201001261507.21399.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 26 Jan 2010 15:12:26 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: Alan Cox , Alexander Leidinger ,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	svn-src-head@freebsd.org
Subject: Re: svn commit: r202894 - in head/sys/i386: i386 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:12:27 -0000

On Tuesday 26 January 2010 12:05:29 pm Ivan Voras wrote:
> 2010/1/26 Alexander Leidinger :
> >
> > Quoting John Baldwin  (from Mon, 25 Jan 2010 07:57:49
> > -0500):
> >
> >> On Saturday 23 January 2010 1:42:28 pm Alan Cox wrote:
> >>>
> >>> Author: alc
> >>> Date: Sat Jan 23 18:42:28 2010
> >>> New Revision: 202894
> >>> URL: http://svn.freebsd.org/changeset/base/202894
> >>>
> >>> Log:
> >>>  Handle a race between pmap_kextract() and pmap_promote_pde().  This race
> >>> is
> >>>  known to cause a kernel crash in ZFS on i386 when superpage promotion is
> >>>  enabled.
> >>>
> >>>  Tested by:    netchild
> >>>  MFC after:    1 week
> >>
> >> Yay!  Should we enable pg_ps by default on i386 now?
> >
> > Data point, the i386 system where I have superpages enabled is a p4 with
> > currently 11 jails active. Some webservers, squid, samba, bind, postfix and
> > a lot of portupgrades (during the last days, I'm updating a jail with a
> > desktop-setup inside). All jails are on ZFS.
> 
> Do you have any method of comparing performance before-and-after?
> There was a thread on some of the mailing lists (stable@/current@?)
> about squid being the pessimal case for superpages.

The thread did not say that superpages made squid slower, rather that due to
the way it forked to execute the log rotation binaries, some superpages were
demoted back to regular pages losing the gain of superpages for those pages.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:15:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E22EA106568D;
	Tue, 26 Jan 2010 20:15:29 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 6FC2F8FC1B;
	Tue, 26 Jan 2010 20:15:29 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0QK8gug076235;
	Tue, 26 Jan 2010 13:08:42 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 26 Jan 2010 13:09:32 -0700 (MST)
Message-Id: <20100126.130932.722022410132669562.imp@bsdimp.com>
To: xcllnt@mac.com
From: "M. Warner Losh" 
In-Reply-To: 
References: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
	<3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com>
	
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@freebsd.org, jhb@freebsd.org, svn-src-all@freebsd.org,
	attilio@freebsd.org, marcel@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:15:30 -0000

In message: 
            Marcel Moolenaar  writes:
: 
: On Jan 26, 2010, at 3:39 AM, Attilio Rao wrote:
: >>> 
: >>> Does this affect the various #ifdef's for handling the third argument to
: >>> cpu_switch()?  E.g. does 4BSD need to spin if td_lock is &blocked_lock?
: >>> 
: > 
: > I think that ia64 is broken on that regard because it does use simple
: > operation while it should use correct atomic and memory barriers
: > (CC'ed marcel@ for that).
: 
: Ok, so cpu_switch() handles the 3rd argument (the mutex) only
: when SCHED_ULE and SMP are defined, even on i386. Maybe it's
: just me, but if SCHED_4BSD now also uses the 3rd argument then
: all implementations of cpu_switch() are broken, right?

No.  The current implementations always STORE the argument.  One only
loops if newthread->td_lock == blocked_lock.  which is something
else.  That was part of my initial confusion as well...

: Maybe what is in order right now is a description (using pseudo
: code if you like) of what exactly needs to happen with the 3rd
: argument, when and how (i.e. what must be atomic and what does
: not have to be atomic).

I believe the proper pseudo code should be:

cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx)
{
	/* Save the registers to the pcb */
	old->td_lock = mtx;
#if defined(SMP) && defined(SCHED_ULE)
	/* s/long/int/ if sizeof(long) != sizeof(void *) */
	/* as we have no 'void *' version of the atomics */
	while (atomic_load_acq_long(&new->td_lock) == (long)&blocked_lock)
		continue;
#endif
	/* Switch to new context */
}

although the #ifdef might not actually be strictly necessary (eg, 4BSD
doesn't migrate threads like ULE does, so you don't hit the case of
having to wait for the new thread to become unblocked).  At least
that's the impression I have after reading Atillio's email on this
topic.

I also think that we should have that code somewhere for reference.
When I was bringing up the MIPS code from the 6.1 base to -current,
the third argument made no sense to me at all, so I didn't implement
it at all.  Someone (gonzo@?) tried to implement it, but it was found
recently to have been implemented wrong.  That's been fixed now, and
as part of fixing it, I started asking questions...

: I can deal with ia64 and powerpc once I know for certain what
: exactly needs to happen, because it seems to me that I can't
: really look at the i386 implementation and infer what needs to
: happen.

I think that the only difference between what mips has now and what is
needed is that mips implements the while loop as approximately:
	while ((volatile)new->td_lock == &blocked_lock)
		continue;
so I need to figure out the right memory barrier assembler instruction
to make this right.  I think sync might be it for mips, but maybe it
is sync or some other processor dependent instruction (Cavium has
special instructions for things like this with more tailored
semantics, for example).

Warner

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:26:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4E7F91065679;
	Tue, 26 Jan 2010 20:26:53 +0000 (UTC) (envelope-from xcllnt@mac.com)
Received: from asmtpout026.mac.com (asmtpout026.mac.com [17.148.16.101])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D3A78FC17;
	Tue, 26 Jan 2010 20:26:52 +0000 (UTC)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36])
	by asmtp026.mac.com
	(Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008;
	32bit)) with ESMTPSA id <0KWV00K0FFG4IK30@asmtp026.mac.com>; Tue,
	26 Jan 2010 12:26:30 -0800 (PST)
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
	ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam
	adjust=0
	reason=mlx engine=5.0.0-0908210000 definitions=main-1001260165
From: Marcel Moolenaar 
In-reply-to: <20100126.130932.722022410132669562.imp@bsdimp.com>
Date: Tue, 26 Jan 2010 12:26:27 -0800
Message-id: <3023270A-755A-4BCF-AC9A-C1F290052279@mac.com>
References: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
	<3bbf2fe11001260339u7a694069m6a2bb7e18b2c546a@mail.gmail.com>
	
	<20100126.130932.722022410132669562.imp@bsdimp.com>
To: "M. Warner Losh" 
X-Mailer: Apple Mail (2.1077)
Cc: src-committers@freebsd.org, jhb@freebsd.org, svn-src-all@freebsd.org,
	attilio@freebsd.org, marcel@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:26:53 -0000


On Jan 26, 2010, at 12:09 PM, M. Warner Losh wrote:
> cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx)
> {
> 	/* Save the registers to the pcb */
> 	old->td_lock = mtx;
> #if defined(SMP) && defined(SCHED_ULE)
> 	/* s/long/int/ if sizeof(long) != sizeof(void *) */
> 	/* as we have no 'void *' version of the atomics */
> 	while (atomic_load_acq_long(&new->td_lock) == (long)&blocked_lock)
> 		continue;
> #endif
> 	/* Switch to new context */
> }

Ok. So this is what ia64 has already, except for the atomic_load()
in the while loop. Since td_lock is volatile, I don't think we need
atomic_load(). To be explicit, ia64 has:

		old->td_lock = mtx;
#if defined(SCHED_ULE) && defined(SMP)
		/* td_lock is volatile */
		while (new->td_lock == &blocked_lock)
			;
#endif

Am I right, or am I missing a critical aspect of using atomic load?

> I also think that we should have that code somewhere for reference.

Since ia64 has a C implementation of cpu_switch(), we could make
that the reference implementation?

-- 
Marcel Moolenaar
xcllnt@mac.com




From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:27:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CE66B1065750;
	Tue, 26 Jan 2010 20:27:20 +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 B28128FC28;
	Tue, 26 Jan 2010 20:27:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QKRK1t094818;
	Tue, 26 Jan 2010 20:27:20 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QKRKNw094816;
	Tue, 26 Jan 2010 20:27:20 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001262027.o0QKRKNw094816@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 26 Jan 2010 20:27:20 +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: r203043 - head/sys/dev/ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:27:21 -0000

Author: mav
Date: Tue Jan 26 20:27:20 2010
New Revision: 203043
URL: http://svn.freebsd.org/changeset/base/203043

Log:
  Do not place fake interrupt register on chip.
  Now we have better place for it.

Modified:
  head/sys/dev/ata/chipsets/ata-promise.c

Modified: head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-promise.c	Tue Jan 26 20:02:53 2010	(r203042)
+++ head/sys/dev/ata/chipsets/ata-promise.c	Tue Jan 26 20:27:20 2010	(r203043)
@@ -218,7 +218,7 @@ static int
 ata_promise_chipinit(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    int fake_reg, stat_reg;
+    int stat_reg;
 
     if (ata_setup_interrupt(dev, ata_generic_intr))
 	return ENXIO;
@@ -312,7 +312,6 @@ ata_promise_chipinit(device_t dev)
 	case PR_SATA:
 	    ctlr->channels = 4;
 sata150:
-	    fake_reg = 0x60;
 	    stat_reg = 0x6c;
 	    break;
 
@@ -323,13 +322,12 @@ sata150:
 	default:
 	    ctlr->channels = 4;
 sataii:
-	    fake_reg = 0x54;
 	    stat_reg = 0x60;
 	    break;
 	}
 
 	/* prime fake interrupt register */
-	ATA_OUTL(ctlr->r_res2, fake_reg, 0xffffffff);
+	ctlr->chipset_data = (void *)(uintptr_t)0xffffffff;
 
 	/* clear SATA status and unmask interrupts */
 	ATA_OUTL(ctlr->r_res2, stat_reg, 0x000000ff);
@@ -590,38 +588,23 @@ ata_promise_mio_intr(void *data)
     struct ata_pci_controller *ctlr = data;
     struct ata_channel *ch;
     u_int32_t vector;
-    int unit, fake_reg;
-
-    switch (ctlr->chip->cfg2) {
-    case PR_PATA:
-    case PR_CMBO:
-    case PR_SATA:
-	fake_reg = 0x60;
-	break;
-    case PR_CMBO2: 
-    case PR_SATA2:
-    default:
-	fake_reg = 0x54;
-	break;
-    }
+    int unit;
 
     /*
      * since reading interrupt status register on early "mio" chips
      * clears the status bits we cannot read it for each channel later on
      * in the generic interrupt routine.
-     * store the bits in an unused register in the chip so we can read
-     * it from there safely to get around this "feature".
      */
     vector = ATA_INL(ctlr->r_res2, 0x040);
     ATA_OUTL(ctlr->r_res2, 0x040, vector);
-    ATA_OUTL(ctlr->r_res2, fake_reg, vector);
+    ctlr->chipset_data = (void *)(uintptr_t)vector;
 
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if ((ch = ctlr->interrupt[unit].argument))
 	    ctlr->interrupt[unit].function(ch);
     }
 
-    ATA_OUTL(ctlr->r_res2, fake_reg, 0xffffffff);
+    ctlr->chipset_data = (void *)(uintptr_t)0xffffffff;
 }
 
 static int
@@ -629,25 +612,23 @@ ata_promise_mio_status(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
     struct ata_channel *ch = device_get_softc(dev);
-    u_int32_t fake_reg, stat_reg, vector, status;
+    u_int32_t stat_reg, vector, status;
 
     switch (ctlr->chip->cfg2) {
     case PR_PATA:
     case PR_CMBO:
     case PR_SATA:
-	fake_reg = 0x60;
 	stat_reg = 0x6c;
 	break;
     case PR_CMBO2: 
     case PR_SATA2:
     default:
-	fake_reg = 0x54;
 	stat_reg = 0x60;
 	break;
     }
 
     /* read and acknowledge interrupt */
-    vector = ATA_INL(ctlr->r_res2, fake_reg);
+    vector = (uint32_t)ctlr->chipset_data;
 
     /* read and clear interface status */
     status = ATA_INL(ctlr->r_res2, stat_reg);

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:38:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E8654106566B;
	Tue, 26 Jan 2010 20:38:24 +0000 (UTC)
	(envelope-from avilla@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D6BF68FC1A;
	Tue, 26 Jan 2010 20:38:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QKcOva097325;
	Tue, 26 Jan 2010 20:38:24 GMT (envelope-from avilla@svn.freebsd.org)
Received: (from avilla@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QKcOMl097323;
	Tue, 26 Jan 2010 20:38:24 GMT (envelope-from avilla@svn.freebsd.org)
Message-Id: <201001262038.o0QKcOMl097323@svn.freebsd.org>
From: Alberto Villa 
Date: Tue, 26 Jan 2010 20:38: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: r203044 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:38:25 -0000

Author: avilla (ports committer)
Date: Tue Jan 26 20:38:24 2010
New Revision: 203044
URL: http://svn.freebsd.org/changeset/base/203044

Log:
  Add myself.
  
  Approved by:	tabthorpe (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Tue Jan 26 20:27:20 2010	(r203043)
+++ head/share/misc/committers-ports.dot	Tue Jan 26 20:38:24 2010	(r203044)
@@ -51,6 +51,7 @@ amdmi3 [label="Dmitry Marakasov\namdmi3@
 anray [label="Andrey Slusar\nanray@FreeBSD.org\n2005/12/11"]
 araujo [label="Marcelo Araujo\naraujo@FreeBSD.org\n2007/04/26"]
 arved [label="Tilman Linneweh\narved@FreeBSD.org\n2002/10/15"]
+avilla [label="Alberto Villa\navilla@FreeBSD.org\n2010/01/24"]
 avl [label="Alexander Logvinov\navl@FreeBSD.org\n2009/05/27"]
 az [label="Andrej Zverev\naz@FreeBSD.org\n2005/10/03"]
 beat [label="Beat Gaetzi\nbeat@FreeBSD.org\n2009/01/28"]
@@ -278,6 +279,7 @@ mat -> thierry
 mezz -> tmclaugh
 
 miwi -> amdmi3
+miwi -> avilla
 miwi -> beat
 miwi -> farrokhi
 miwi -> gahr
@@ -331,6 +333,7 @@ stas -> araujo
 
 steve -> netchild
 
+tabthorpe -> avilla
 tabthorpe -> avl
 tabthorpe -> jadawin
 tabthorpe -> pgj

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:39:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8D9681065670;
	Tue, 26 Jan 2010 20:39:27 +0000 (UTC)
	(envelope-from avilla@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B7198FC1C;
	Tue, 26 Jan 2010 20:39:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QKdRAh097590;
	Tue, 26 Jan 2010 20:39:27 GMT (envelope-from avilla@svn.freebsd.org)
Received: (from avilla@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QKdRtA097588;
	Tue, 26 Jan 2010 20:39:27 GMT (envelope-from avilla@svn.freebsd.org)
Message-Id: <201001262039.o0QKdRtA097588@svn.freebsd.org>
From: Alberto Villa 
Date: Tue, 26 Jan 2010 20:39:27 +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: r203045 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:39:27 -0000

Author: avilla (ports committer)
Date: Tue Jan 26 20:39:27 2010
New Revision: 203045
URL: http://svn.freebsd.org/changeset/base/203045

Log:
  Add myself.
  
  Approved by:	tabthorpe (mentor)

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Tue Jan 26 20:38:24 2010	(r203044)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Tue Jan 26 20:39:27 2010	(r203045)
@@ -204,6 +204,7 @@
 07/22	Lukas Ertl  born in Weissenbach/Enns, Steiermark, Austria, 1976
 07/23	Sergey A. Osokin  born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972
 07/24	Alexander Nedotsukov  born in Ulyanovsk, Russian Federation, 1974
+07/24	Alberto Villa  born in Vercelli, Italy, 1987
 07/28	Jim Mock  born in Bethlehem, Pennsylvania, United States, 1974
 07/28	Tom Hukins  born in Manchester, United Kingdom, 1976
 07/29	Dirk Meyer  born in Kassel, Hessen, Germany, 1965

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:48:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1BAC2106566C;
	Tue, 26 Jan 2010 20:48:22 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id C6AC28FC13;
	Tue, 26 Jan 2010 20:48:21 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0QKfYPb076715;
	Tue, 26 Jan 2010 13:41:34 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 26 Jan 2010 13:42:24 -0700 (MST)
Message-Id: <20100126.134224.366306193153347169.imp@bsdimp.com>
To: xcllnt@mac.com
From: "M. Warner Losh" 
In-Reply-To: <3023270A-755A-4BCF-AC9A-C1F290052279@mac.com>
References: 
	<20100126.130932.722022410132669562.imp@bsdimp.com>
	<3023270A-755A-4BCF-AC9A-C1F290052279@mac.com>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@freebsd.org, jhb@freebsd.org, svn-src-all@freebsd.org,
	attilio@freebsd.org, marcel@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:48:22 -0000

In message: <3023270A-755A-4BCF-AC9A-C1F290052279@mac.com>
            Marcel Moolenaar  writes:
: 
: On Jan 26, 2010, at 12:09 PM, M. Warner Losh wrote:
: > cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx)
: > {
: > 	/* Save the registers to the pcb */
: > 	old->td_lock = mtx;
: > #if defined(SMP) && defined(SCHED_ULE)
: > 	/* s/long/int/ if sizeof(long) != sizeof(void *) */
: > 	/* as we have no 'void *' version of the atomics */
: > 	while (atomic_load_acq_long(&new->td_lock) == (long)&blocked_lock)
: > 		continue;
: > #endif
: > 	/* Switch to new context */
: > }
: 
: Ok. So this is what ia64 has already, except for the atomic_load()
: in the while loop. Since td_lock is volatile, I don't think we need
: atomic_load(). To be explicit, ia64 has:
: 
: 		old->td_lock = mtx;
: #if defined(SCHED_ULE) && defined(SMP)
: 		/* td_lock is volatile */
: 		while (new->td_lock == &blocked_lock)
: 			;
: #endif
: 
: Am I right, or am I missing a critical aspect of using atomic load?

The Atomic load acq also has a memory barrier after the item is
fetched from memory.

: > I also think that we should have that code somewhere for reference.
: 
: Since ia64 has a C implementation of cpu_switch(), we could make
: that the reference implementation?

Most likely :)

Warner

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:50:41 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 721741065696;
	Tue, 26 Jan 2010 20:50:41 +0000 (UTC)
	(envelope-from romain@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 603B28FC14;
	Tue, 26 Jan 2010 20:50:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QKofMW000215;
	Tue, 26 Jan 2010 20:50:41 GMT (envelope-from romain@svn.freebsd.org)
Received: (from romain@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QKofE5000213;
	Tue, 26 Jan 2010 20:50:41 GMT (envelope-from romain@svn.freebsd.org)
Message-Id: <201001262050.o0QKofE5000213@svn.freebsd.org>
From: Romain Tartière 
Date: Tue, 26 Jan 2010 20:50: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: r203046 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:50:41 -0000

Author: romain (ports committer)
Date: Tue Jan 26 20:50:41 2010
New Revision: 203046
URL: http://svn.freebsd.org/changeset/base/203046

Log:
  Add myself to the list of ports committers.
  
  Approved by:	flz (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Tue Jan 26 20:39:27 2010	(r203045)
+++ head/share/misc/committers-ports.dot	Tue Jan 26 20:50:41 2010	(r203046)
@@ -135,6 +135,7 @@ philip [label="Philip Paeps\nphilip@Free
 pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"]
 rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"]
 rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"]
+romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"]
 sat [label="Andrew Pantyukhin\nsat@FreeBSD.org\n2006/05/06"]
 sem [label="Sergey Matveychuk\nsem@FreeBSD.org\n2004/07/07"]
 sergei [label="Sergei Kolobov\nsergei@FreeBSD.org\n2003/10/21"]
@@ -221,6 +222,7 @@ fjoe -> osa
 flz -> garga
 flz -> johans
 flz -> laszlof
+flz -> romain
 
 gabor -> lippe
 gabor -> pgj

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:52:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2366B106566C;
	Tue, 26 Jan 2010 20:52:14 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id E4E5A8FC16;
	Tue, 26 Jan 2010 20:52:13 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 94B9E46B3B;
	Tue, 26 Jan 2010 15:52:13 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 82C098A025;
	Tue, 26 Jan 2010 15:52:12 -0500 (EST)
From: John Baldwin 
To: "M. Warner Losh" 
Date: Tue, 26 Jan 2010 15:51:52 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; )
References: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
	
	<20100126.130932.722022410132669562.imp@bsdimp.com>
In-Reply-To: <20100126.130932.722022410132669562.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201001261551.52206.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 26 Jan 2010 15:52:12 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com,
	attilio@freebsd.org, marcel@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:52:14 -0000

On Tuesday 26 January 2010 3:09:32 pm M. Warner Losh wrote:
> In message: 
>             Marcel Moolenaar  writes:
> : Maybe what is in order right now is a description (using pseudo
> : code if you like) of what exactly needs to happen with the 3rd
> : argument, when and how (i.e. what must be atomic and what does
> : not have to be atomic).
> 
> I believe the proper pseudo code should be:
> 
> cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx)
> {
> 	/* Save the registers to the pcb */
> 	old->td_lock = mtx;
> #if defined(SMP) && defined(SCHED_ULE)
> 	/* s/long/int/ if sizeof(long) != sizeof(void *) */
> 	/* as we have no 'void *' version of the atomics */
> 	while (atomic_load_acq_long(&new->td_lock) == (long)&blocked_lock)
> 		continue;
> #endif
> 	/* Switch to new context */
> }

FYI, that is what the '_ptr' variants of atomic ops are for.  I do think that 
the 'acq' membar on the load is needed to ensure the CPU doesn't try to 
speculatively read any of the 'new' thread's PCB until it sees the update to 
td_lock.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 20:58:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1F90D106566C;
	Tue, 26 Jan 2010 20:58:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B5848FC16;
	Tue, 26 Jan 2010 20:58:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QKwAiI002062;
	Tue, 26 Jan 2010 20:58:10 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QKw9T6002049;
	Tue, 26 Jan 2010 20:58:09 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001262058.o0QKw9T6002049@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 26 Jan 2010 20:58:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203047 - in stable/7/sys: amd64/amd64 amd64/include
	i386/i386 i386/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 20:58:10 -0000

Author: jhb
Date: Tue Jan 26 20:58:09 2010
New Revision: 203047
URL: http://svn.freebsd.org/changeset/base/203047

Log:
  MFC 195820, 195940, 196643, 197663, 199067, 199215, and 199253:
  Optimize the cache flushing done when changing caching attributes of pages
  by doing nothing for CPUs that support self-snooping and using CLFLUSH
  instead of a full cache invalidate when possible.
  - On i386 take care of possible mappings of the page by sf buffer by
    utilizing the mapping for clflush, otherwise map the page transiently.
    Amd64 uses the direct map.
  - Do not use CLFLUSH on Intel CPUs due to problems with flushing the local
    APIC range by default.  This can be further controlled via the
    hw.clflush_disable loader tunable.  A setting of 1 disables the
    use of CLFLUSH.  A setting of 0 allows CLFLUSH to be used for Intel
    CPUs when CPUID_SS is not present.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/amd64/amd64/initcpu.c
  stable/7/sys/amd64/amd64/machdep.c
  stable/7/sys/amd64/amd64/pmap.c
  stable/7/sys/amd64/include/cpufunc.h
  stable/7/sys/amd64/include/md_var.h
  stable/7/sys/i386/i386/initcpu.c
  stable/7/sys/i386/i386/pmap.c
  stable/7/sys/i386/i386/vm_machdep.c
  stable/7/sys/i386/include/cpufunc.h
  stable/7/sys/i386/include/md_var.h
  stable/7/sys/i386/include/pmap.h
  stable/7/sys/i386/include/sf_buf.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/amd64/initcpu.c
==============================================================================
--- stable/7/sys/amd64/amd64/initcpu.c	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/amd64/amd64/initcpu.c	Tue Jan 26 20:58:09 2010	(r203047)
@@ -47,6 +47,12 @@ __FBSDID("$FreeBSD$");
 static int	hw_instruction_sse;
 SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD,
     &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU");
+/*
+ * -1: automatic (default)
+ *  0: keep enable CLFLUSH
+ *  1: force disable CLFLUSH
+ */
+static int	hw_clflush_disable = -1;
 
 int	cpu;			/* Are we 386, 386sx, 486, etc? */
 u_int	cpu_feature;		/* Feature flags */
@@ -65,6 +71,7 @@ char	cpu_vendor[20];		/* CPU Origin code
 u_int	cpu_vendor_id;		/* CPU vendor ID */
 u_int	cpu_fxsr;		/* SSE enabled */
 u_int	cpu_mxcsr_mask;		/* Valid bits in mxcsr */
+u_int	cpu_clflush_line_size = 32;
 
 SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD,
 	&via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU");
@@ -157,3 +164,31 @@ initializecpu(void)
 	    CPUID_TO_MODEL(cpu_id) >= 0xf)
 		init_via();
 }
+
+void
+initializecpucache()
+{
+
+	/*
+	 * CPUID with %eax = 1, %ebx returns
+	 * Bits 15-8: CLFLUSH line size
+	 * 	(Value * 8 = cache line size in bytes)
+	 */
+	if ((cpu_feature & CPUID_CLFSH) != 0)
+		cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+	/*
+	 * XXXKIB: (temporary) hack to work around traps generated when
+	 * CLFLUSHing APIC registers window.
+	 */
+	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
+	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
+	    hw_clflush_disable == -1)
+		cpu_feature &= ~CPUID_CLFSH;
+	/*
+	 * Allow to disable CLFLUSH feature manually by
+	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
+	 * CPUs.
+	 */
+	if (hw_clflush_disable == 1)
+		cpu_feature &= ~CPUID_CLFSH;
+}

Modified: stable/7/sys/amd64/amd64/machdep.c
==============================================================================
--- stable/7/sys/amd64/amd64/machdep.c	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/amd64/amd64/machdep.c	Tue Jan 26 20:58:09 2010	(r203047)
@@ -1332,6 +1332,7 @@ hammer_time(u_int64_t modulep, u_int64_t
 
 	identify_cpu();		/* Final stage of CPU initialization */
 	initializecpu();	/* Initialize CPU registers */
+	initializecpucache();
 
 	/* make an initial tss so cpu can get interrupt stack on syscall! */
 	common_tss[0].tss_rsp0 = thread0.td_kstack + \

Modified: stable/7/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/7/sys/amd64/amd64/pmap.c	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/amd64/amd64/pmap.c	Tue Jan 26 20:58:09 2010	(r203047)
@@ -228,6 +228,7 @@ static vm_page_t pmap_enter_quick_locked
     vm_page_t m, vm_prot_t prot, vm_page_t mpte);
 static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte);
 static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte);
+static void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva);
 static boolean_t pmap_is_modified_pvh(struct md_page *pvh);
 static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode);
 static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va);
@@ -934,6 +935,40 @@ pmap_invalidate_cache(void)
 }
 #endif /* !SMP */
 
+static void
+pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
+{
+
+	KASSERT((sva & PAGE_MASK) == 0,
+	    ("pmap_invalidate_cache_range: sva not page-aligned"));
+	KASSERT((eva & PAGE_MASK) == 0,
+	    ("pmap_invalidate_cache_range: eva not page-aligned"));
+
+	if (cpu_feature & CPUID_SS)
+		; /* If "Self Snoop" is supported, do nothing. */
+	else if (cpu_feature & CPUID_CLFSH) {
+
+		/*
+		 * Otherwise, do per-cache line flush.  Use the mfence
+		 * instruction to insure that previous stores are
+		 * included in the write-back.  The processor
+		 * propagates flush to other processors in the cache
+		 * coherence domain.
+		 */
+		mfence();
+		for (; sva < eva; sva += cpu_clflush_line_size)
+			clflush(sva);
+		mfence();
+	} else {
+
+		/*
+		 * No targeted cache flush methods are supported by CPU,
+		 * globally invalidate cache as a last resort.
+		 */
+		pmap_invalidate_cache();
+	}
+}
+
 /*
  * Are we current address space or kernel?
  */
@@ -4229,7 +4264,8 @@ pmap_pde_attr(pd_entry_t *pde, int cache
 void *
 pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mode)
 {
-	vm_offset_t va, tmpva, offset;
+	vm_offset_t va, offset;
+	vm_size_t tmpsize;
 
 	/*
 	 * If the specified range of physical addresses fits within the direct
@@ -4246,14 +4282,10 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_
 	if (!va)
 		panic("pmap_mapdev: Couldn't alloc kernel virtual memory");
 	pa = trunc_page(pa);
-	for (tmpva = va; size > 0; ) {
-		pmap_kenter_attr(tmpva, pa, mode);
-		size -= PAGE_SIZE;
-		tmpva += PAGE_SIZE;
-		pa += PAGE_SIZE;
-	}
-	pmap_invalidate_range(kernel_pmap, va, tmpva);
-	pmap_invalidate_cache();
+	for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE)
+		pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode);
+	pmap_invalidate_range(kernel_pmap, va, va + tmpsize);
+	pmap_invalidate_cache_range(va, va + tmpsize);
 	return ((void *)(va + offset));
 }
 
@@ -4473,7 +4505,7 @@ pmap_change_attr_locked(vm_offset_t va, 
 	 */
 	if (changed) {
 		pmap_invalidate_range(kernel_pmap, base, tmpva);
-		pmap_invalidate_cache();
+		pmap_invalidate_cache_range(base, tmpva);
 	}
 	return (error);
 }

Modified: stable/7/sys/amd64/include/cpufunc.h
==============================================================================
--- stable/7/sys/amd64/include/cpufunc.h	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/amd64/include/cpufunc.h	Tue Jan 26 20:58:09 2010	(r203047)
@@ -100,6 +100,13 @@ bsrq(u_long mask)
 }
 
 static __inline void
+clflush(u_long addr)
+{
+
+	__asm __volatile("clflush %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
 disable_intr(void)
 {
 	__asm __volatile("cli" : : : "memory");
@@ -338,6 +345,13 @@ outw(u_int port, u_short data)
 }
 
 static __inline void
+mfence(void)
+{
+
+	__asm__ __volatile("mfence" : : : "memory");
+}
+
+static __inline void
 ia32_pause(void)
 {
 	__asm __volatile("pause");

Modified: stable/7/sys/amd64/include/md_var.h
==============================================================================
--- stable/7/sys/amd64/include/md_var.h	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/amd64/include/md_var.h	Tue Jan 26 20:58:09 2010	(r203047)
@@ -47,6 +47,7 @@ extern	u_int	amd_feature2;
 extern	u_int	amd_pminfo;
 extern	u_int	via_feature_rng;
 extern	u_int	via_feature_xcrypt;
+extern	u_int	cpu_clflush_line_size;
 extern	u_int	cpu_fxsr;
 extern	u_int	cpu_high;
 extern	u_int	cpu_id;
@@ -75,6 +76,7 @@ void	doreti_iret_fault(void) __asm(__STR
 void	dump_add_page(vm_paddr_t);
 void	dump_drop_page(vm_paddr_t);
 void	initializecpu(void);
+void	initializecpucache(void);
 void	fillw(int /*u_short*/ pat, void *base, size_t cnt);
 void	fpstate_drop(struct thread *td);
 int	is_physical_memory(vm_paddr_t addr);

Modified: stable/7/sys/i386/i386/initcpu.c
==============================================================================
--- stable/7/sys/i386/i386/initcpu.c	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/i386/initcpu.c	Tue Jan 26 20:58:09 2010	(r203047)
@@ -75,6 +75,12 @@ static void	init_mendocino(void);
 static int	hw_instruction_sse;
 SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD,
     &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU");
+/*
+ * -1: automatic (default)
+ *  0: keep enable CLFLUSH
+ *  1: force disable CLFLUSH
+ */
+static int	hw_clflush_disable = -1;
 
 /* Must *NOT* be BSS or locore will bzero these after setting them */
 int	cpu = 0;		/* Are we 386, 386sx, 486, etc? */
@@ -91,6 +97,7 @@ u_int	cpu_procinfo = 0;	/* HyperThreadin
 u_int	cpu_procinfo2 = 0;	/* Multicore info */
 char	cpu_vendor[20] = "";	/* CPU Origin code */
 u_int	cpu_vendor_id = 0;	/* CPU vendor ID */
+u_int	cpu_clflush_line_size = 32;
 
 SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD,
 	&via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU");
@@ -709,6 +716,29 @@ initializecpu(void)
 	}
 	enable_sse();
 
+	/*
+	 * CPUID with %eax = 1, %ebx returns
+	 * Bits 15-8: CLFLUSH line size
+	 * 	(Value * 8 = cache line size in bytes)
+	 */
+	if ((cpu_feature & CPUID_CLFSH) != 0)
+		cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+	/*
+	 * XXXKIB: (temporary) hack to work around traps generated when
+	 * CLFLUSHing APIC registers window.
+	 */
+	TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
+	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
+	    hw_clflush_disable == -1)
+		cpu_feature &= ~CPUID_CLFSH;
+	/*
+	 * Allow to disable CLFLUSH feature manually by
+	 * hw.clflush_disable tunable.  This may help Xen guest on some AMD
+	 * CPUs.
+	 */
+	if (hw_clflush_disable == 1)
+		cpu_feature &= ~CPUID_CLFSH;
+
 #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE)
 	/*
 	 * OS should flush L1 cache by itself because no PC-98 supports

Modified: stable/7/sys/i386/i386/pmap.c
==============================================================================
--- stable/7/sys/i386/i386/pmap.c	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/i386/pmap.c	Tue Jan 26 20:58:09 2010	(r203047)
@@ -119,6 +119,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -735,7 +736,7 @@ SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, pro
  * Determine the appropriate bits to set in a PTE or PDE for a specified
  * caching mode.
  */
-static int
+int
 pmap_cache_bits(int mode, boolean_t is_pde)
 {
 	int pat_flag, pat_index, cache_bits;
@@ -944,6 +945,40 @@ pmap_invalidate_cache(void)
 }
 #endif /* !SMP */
 
+void
+pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
+{
+
+	KASSERT((sva & PAGE_MASK) == 0,
+	    ("pmap_invalidate_cache_range: sva not page-aligned"));
+	KASSERT((eva & PAGE_MASK) == 0,
+	    ("pmap_invalidate_cache_range: eva not page-aligned"));
+
+	if (cpu_feature & CPUID_SS)
+		; /* If "Self Snoop" is supported, do nothing. */
+	else if (cpu_feature & CPUID_CLFSH) {
+
+		/*
+		 * Otherwise, do per-cache line flush.  Use the mfence
+		 * instruction to insure that previous stores are
+		 * included in the write-back.  The processor
+		 * propagates flush to other processors in the cache
+		 * coherence domain.
+		 */
+		mfence();
+		for (; sva < eva; sva += cpu_clflush_line_size)
+			clflush(sva);
+		mfence();
+	} else {
+
+		/*
+		 * No targeted cache flush methods are supported by CPU,
+		 * globally invalidate cache as a last resort.
+		 */
+		pmap_invalidate_cache();
+	}
+}
+
 /*
  * Are we current address space or kernel?  N.B. We return FALSE when
  * a pmap's page table is in use because a kernel thread is borrowing
@@ -4422,7 +4457,8 @@ pmap_pde_attr(pd_entry_t *pde, int cache
 void *
 pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mode)
 {
-	vm_offset_t va, tmpva, offset;
+	vm_offset_t va, offset;
+	vm_size_t tmpsize;
 
 	offset = pa & PAGE_MASK;
 	size = roundup(offset + size, PAGE_SIZE);
@@ -4435,16 +4471,10 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_
 	if (!va)
 		panic("pmap_mapdev: Couldn't alloc kernel virtual memory");
 
-	for (tmpva = va; size > 0; ) {
-		pmap_kenter_attr(tmpva, pa, mode);
-		size -= PAGE_SIZE;
-		tmpva += PAGE_SIZE;
-		pa += PAGE_SIZE;
-	}
-	pmap_invalidate_range(kernel_pmap, va, tmpva);
-	/* If "Self Snoop" is supported, do nothing. */
-	if (!(cpu_feature & CPUID_SS))
-		pmap_invalidate_cache();
+	for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE)
+		pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode);
+	pmap_invalidate_range(kernel_pmap, va, va + tmpsize);
+	pmap_invalidate_cache_range(va, va + size);
 	return ((void *)(va + offset));
 }
 
@@ -4484,16 +4514,48 @@ pmap_unmapdev(vm_offset_t va, vm_size_t 
 void
 pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
 {
+	struct sysmaps *sysmaps;
+	vm_offset_t sva, eva;
 
 	m->md.pat_mode = ma;
+	if ((m->flags & PG_FICTITIOUS) != 0)
+		return;
 
 	/*
 	 * If "m" is a normal page, flush it from the cache.
+	 * See pmap_invalidate_cache_range().
+	 *
+	 * First, try to find an existing mapping of the page by sf
+	 * buffer. sf_buf_invalidate_cache() modifies mapping and
+	 * flushes the cache.
 	 */    
-	if ((m->flags & PG_FICTITIOUS) == 0) {
-		/* If "Self Snoop" is supported, do nothing. */
-		if (!(cpu_feature & CPUID_SS))
-			pmap_invalidate_cache();
+	if (sf_buf_invalidate_cache(m))
+		return;
+
+	/*
+	 * If page is not mapped by sf buffer, but CPU does not
+	 * support self snoop, map the page transient and do
+	 * invalidation. In the worst case, whole cache is flushed by
+	 * pmap_invalidate_cache_range().
+	 */
+	if ((cpu_feature & (CPUID_SS|CPUID_CLFSH)) == CPUID_CLFSH) {
+		sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)];
+		mtx_lock(&sysmaps->lock);
+		if (*sysmaps->CMAP2)
+			panic("pmap_page_set_memattr: CMAP2 busy");
+		sched_pin();
+		*sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) |
+		    PG_A | PG_M | pmap_cache_bits(m->md.pat_mode, 0);
+		invlcaddr(sysmaps->CADDR2);
+		sva = (vm_offset_t)sysmaps->CADDR2;
+		eva = sva + PAGE_SIZE;
+	} else
+		sva = eva = 0; /* gcc */
+	pmap_invalidate_cache_range(sva, eva);
+	if (sva != 0) {
+		*sysmaps->CMAP2 = 0;
+		sched_unpin();
+		mtx_unlock(&sysmaps->lock);
 	}
 }
 
@@ -4606,7 +4668,7 @@ pmap_change_attr(vm_offset_t va, vm_size
 	 */
 	if (changed) {
 		pmap_invalidate_range(kernel_pmap, base, tmpva);
-		pmap_invalidate_cache();
+		pmap_invalidate_cache_range(base, tmpva);
 	}
 	return (0);
 }

Modified: stable/7/sys/i386/i386/vm_machdep.c
==============================================================================
--- stable/7/sys/i386/i386/vm_machdep.c	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/i386/vm_machdep.c	Tue Jan 26 20:58:09 2010	(r203047)
@@ -710,6 +710,39 @@ sf_buf_init(void *arg)
 }
 
 /*
+ * Invalidate the cache lines that may belong to the page, if
+ * (possibly old) mapping of the page by sf buffer exists.  Returns
+ * TRUE when mapping was found and cache invalidated.
+ */
+boolean_t
+sf_buf_invalidate_cache(vm_page_t m)
+{
+	struct sf_head *hash_list;
+	struct sf_buf *sf;
+	boolean_t ret;
+
+	hash_list = &sf_buf_active[SF_BUF_HASH(m)];
+	ret = FALSE;
+	mtx_lock(&sf_buf_lock);
+	LIST_FOREACH(sf, hash_list, list_entry) {
+		if (sf->m == m) {
+			/*
+			 * Use pmap_qenter to update the pte for
+			 * existing mapping, in particular, the PAT
+			 * settings are recalculated.
+			 */
+			pmap_qenter(sf->kva, &m, 1);
+			pmap_invalidate_cache_range(sf->kva, sf->kva +
+			    PAGE_SIZE);
+			ret = TRUE;
+			break;
+		}
+	}
+	mtx_unlock(&sf_buf_lock);
+	return (ret);
+}
+
+/*
  * Get an sf_buf from the freelist.  May block if none are available.
  */
 struct sf_buf *
@@ -775,7 +808,8 @@ sf_buf_alloc(struct vm_page *m, int flag
 	 */
 	ptep = vtopte(sf->kva);
 	opte = *ptep;
-	*ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V;
+	*ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V |
+	    pmap_cache_bits(m->md.pat_mode, 0);
 
 	/*
 	 * Avoid unnecessary TLB invalidations: If the sf_buf's old

Modified: stable/7/sys/i386/include/cpufunc.h
==============================================================================
--- stable/7/sys/i386/include/cpufunc.h	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/include/cpufunc.h	Tue Jan 26 20:58:09 2010	(r203047)
@@ -79,6 +79,13 @@ bsrl(u_int mask)
 }
 
 static __inline void
+clflush(u_long addr)
+{
+
+	__asm __volatile("clflush %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
 disable_intr(void)
 {
 	__asm __volatile("cli" : : : "memory");
@@ -106,6 +113,13 @@ enable_intr(void)
 	__asm __volatile("sti");
 }
 
+static __inline void
+mfence(void)
+{
+
+	__asm __volatile("mfence" : : : "memory");
+}
+
 #ifdef _KERNEL
 
 #define	HAVE_INLINE_FFS

Modified: stable/7/sys/i386/include/md_var.h
==============================================================================
--- stable/7/sys/i386/include/md_var.h	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/include/md_var.h	Tue Jan 26 20:58:09 2010	(r203047)
@@ -52,6 +52,7 @@ extern	u_int	amd_feature2;
 extern	u_int	amd_pminfo;
 extern	u_int	via_feature_rng;
 extern	u_int	via_feature_xcrypt;
+extern	u_int	cpu_clflush_line_size;
 extern	u_int	cpu_fxsr;
 extern	u_int	cpu_high;
 extern	u_int	cpu_id;

Modified: stable/7/sys/i386/include/pmap.h
==============================================================================
--- stable/7/sys/i386/include/pmap.h	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/include/pmap.h	Tue Jan 26 20:58:09 2010	(r203047)
@@ -415,6 +415,7 @@ extern vm_offset_t virtual_end;
 #define	pmap_unmapbios(va, sz)	pmap_unmapdev((va), (sz))
 
 void	pmap_bootstrap(vm_paddr_t);
+int	pmap_cache_bits(int mode, boolean_t is_pde);
 int	pmap_change_attr(vm_offset_t, vm_size_t, int);
 void	pmap_init_pat(void);
 void	pmap_kenter(vm_offset_t va, vm_paddr_t pa);
@@ -432,6 +433,7 @@ void	pmap_invalidate_page(pmap_t, vm_off
 void	pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t);
 void	pmap_invalidate_all(pmap_t);
 void	pmap_invalidate_cache(void);
+void	pmap_invalidate_cache_range(vm_offset_t, vm_offset_t);
 
 #endif /* _KERNEL */
 

Modified: stable/7/sys/i386/include/sf_buf.h
==============================================================================
--- stable/7/sys/i386/include/sf_buf.h	Tue Jan 26 20:50:41 2010	(r203046)
+++ stable/7/sys/i386/include/sf_buf.h	Tue Jan 26 20:58:09 2010	(r203047)
@@ -58,4 +58,6 @@ sf_buf_page(struct sf_buf *sf)
 	return (sf->m);
 }
 
+boolean_t sf_buf_invalidate_cache(vm_page_t m);
+
 #endif /* !_MACHINE_SF_BUF_H_ */

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 21:20:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F270106566C;
	Tue, 26 Jan 2010 21:20:47 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-iw0-f204.google.com (mail-iw0-f204.google.com
	[209.85.223.204])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B8218FC0A;
	Tue, 26 Jan 2010 21:20:46 +0000 (UTC)
Received: by iwn42 with SMTP id 42so2026783iwn.9
	for ; Tue, 26 Jan 2010 13:20:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=C5O2vyS1YLaY8YIyw3NzuEQrmnx55B6aobrr3qLzTuE=;
	b=Ex/hQcjFaaCeLAwcStuDNrvQ++yBi82NTzxmJialO9Eb94SboylNZQERveqHCmaiUG
	P4HJH/ZW/yLqShZP5XJdTE/0I9F3hmWr71BQQZz1X/88ZW9eGdTgYcQEs3Lr9IJhoShc
	Vqb4xrf8dHU2vbDbOopTjOuUsV/5W2DFH7vA4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=KalpC1qFNvMwBBcVgagl3OSIlw7jTPzpQSN09p6asWJMsZPjv1hXNGxUsgMah2QXlt
	2VukLgj7bFaPieOy++JOe1nowrUpErxi/hRlaCDS43fIXHNfMK3jzLaSIxXwhW3IRclk
	yGyYLIVyCjDLEUVjLZ4JisB0kXLoqbr2hraW8=
MIME-Version: 1.0
Sender: asmrookie@gmail.com
Received: by 10.231.154.197 with SMTP id p5mr5085220ibw.28.1264540846133; Tue, 
	26 Jan 2010 13:20:46 -0800 (PST)
In-Reply-To: <201001261551.52206.jhb@freebsd.org>
References: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
	
	<20100126.130932.722022410132669562.imp@bsdimp.com>
	<201001261551.52206.jhb@freebsd.org>
Date: Tue, 26 Jan 2010 22:20:46 +0100
X-Google-Sender-Auth: da681ea0f94b12bc
Message-ID: <3bbf2fe11001261320k654b2b8ck3d03c4d94ae8d9c1@mail.gmail.com>
From: Attilio Rao 
To: John Baldwin 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com,
	marcel@freebsd.org, svn-src-head@freebsd.org,
	"M. Warner Losh" 
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 21:20:47 -0000

2010/1/26 John Baldwin :
> On Tuesday 26 January 2010 3:09:32 pm M. Warner Losh wrote:
>> In message: 
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Marcel Moolenaar  writes:
>> : Maybe what is in order right now is a description (using pseudo
>> : code if you like) of what exactly needs to happen with the 3rd
>> : argument, when and how (i.e. what must be atomic and what does
>> : not have to be atomic).
>>
>> I believe the proper pseudo code should be:
>>
>> cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx)
>> {
>> =C2=A0 =C2=A0 =C2=A0 /* Save the registers to the pcb */
>> =C2=A0 =C2=A0 =C2=A0 old->td_lock =3D mtx;
>> #if defined(SMP) && defined(SCHED_ULE)
>> =C2=A0 =C2=A0 =C2=A0 /* s/long/int/ if sizeof(long) !=3D sizeof(void *) =
*/
>> =C2=A0 =C2=A0 =C2=A0 /* as we have no 'void *' version of the atomics */
>> =C2=A0 =C2=A0 =C2=A0 while (atomic_load_acq_long(&new->td_lock) =3D=3D (=
long)&blocked_lock)
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;
>> #endif
>> =C2=A0 =C2=A0 =C2=A0 /* Switch to new context */
>> }
>
> FYI, that is what the '_ptr' variants of atomic ops are for. =C2=A0I do t=
hink that
> the 'acq' membar on the load is needed to ensure the CPU doesn't try to
> speculatively read any of the 'new' thread's PCB until it sees the update=
 to
> td_lock.

I think it is more important to store the old lock via a rel barrier instea=
d:

- old->td_lock =3D mtx;
+ atomic_store_rel_ptr(&old->td_lock, mtx);

Thanks,
Attilio


--=20
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 21:36:11 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C7565106568B;
	Tue, 26 Jan 2010 21:36:11 +0000 (UTC)
	(envelope-from beat@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B57B18FC18;
	Tue, 26 Jan 2010 21:36:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QLaBDt010567;
	Tue, 26 Jan 2010 21:36:11 GMT (envelope-from beat@svn.freebsd.org)
Received: (from beat@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QLaB0x010565;
	Tue, 26 Jan 2010 21:36:11 GMT (envelope-from beat@svn.freebsd.org)
Message-Id: <201001262136.o0QLaB0x010565@svn.freebsd.org>
From: Beat Gaetzi 
Date: Tue, 26 Jan 2010 21:36: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: r203048 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 21:36:11 -0000

Author: beat (ports committer)
Date: Tue Jan 26 21:36:11 2010
New Revision: 203048
URL: http://svn.freebsd.org/changeset/base/203048

Log:
  Add my birthday to the calendar.

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Tue Jan 26 20:58:09 2010	(r203047)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Tue Jan 26 21:36:11 2010	(r203048)
@@ -256,6 +256,7 @@
 09/28	Alex Dupre  born in Milano, Italy, 1980
 09/29	Matthew Hunt  born in Johnstown, Pennsylvania, United States, 1976
 09/30	Hiten M. Pandya  born in Dar-es-Salaam, Tanzania, East Africa, 1986
+10/02	Beat Gaetzi  born in Zurich, Switzerland, 1980
 10/05	Hiroki Sato  born in Yamagata, Japan, 1977
 10/05	Chris Costello  born in Houston, Texas, United States, 1985
 10/09	Stefan Walter  born in Werne, Nordrhein-Westfalen, 1978

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 22:17:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 65CFE1065670;
	Tue, 26 Jan 2010 22:17:17 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id F16508FC15;
	Tue, 26 Jan 2010 22:17:16 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 7ED8F46B66;
	Tue, 26 Jan 2010 17:17:16 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id B6C338A01F;
	Tue, 26 Jan 2010 17:17:15 -0500 (EST)
From: John Baldwin 
To: Attilio Rao 
Date: Tue, 26 Jan 2010 17:17:00 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; )
References: <3bbf2fe11001260058i65604619l664bd0e49c1dbbd@mail.gmail.com>
	<201001261551.52206.jhb@freebsd.org>
	<3bbf2fe11001261320k654b2b8ck3d03c4d94ae8d9c1@mail.gmail.com>
In-Reply-To: <3bbf2fe11001261320k654b2b8ck3d03c4d94ae8d9c1@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201001261717.00070.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 26 Jan 2010 17:17:15 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com,
	marcel@freebsd.org, svn-src-head@freebsd.org,
	"M. Warner Losh" 
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 22:17:17 -0000

On Tuesday 26 January 2010 4:20:46 pm Attilio Rao wrote:
> 2010/1/26 John Baldwin :
> > On Tuesday 26 January 2010 3:09:32 pm M. Warner Losh wrote:
> >> In message: 
> >>             Marcel Moolenaar  writes:
> >> : Maybe what is in order right now is a description (using pseudo
> >> : code if you like) of what exactly needs to happen with the 3rd
> >> : argument, when and how (i.e. what must be atomic and what does
> >> : not have to be atomic).
> >>
> >> I believe the proper pseudo code should be:
> >>
> >> cpu_switch(struct thread *old, struct thread *new, struct mutext *mtx)
> >> {
> >>       /* Save the registers to the pcb */
> >>       old->td_lock = mtx;
> >> #if defined(SMP) && defined(SCHED_ULE)
> >>       /* s/long/int/ if sizeof(long) != sizeof(void *) */
> >>       /* as we have no 'void *' version of the atomics */
> >>       while (atomic_load_acq_long(&new->td_lock) == (long)&blocked_lock)
> >>               continue;
> >> #endif
> >>       /* Switch to new context */
> >> }
> >
> > FYI, that is what the '_ptr' variants of atomic ops are for.  I do think that
> > the 'acq' membar on the load is needed to ensure the CPU doesn't try to
> > speculatively read any of the 'new' thread's PCB until it sees the update to
> > td_lock.
> 
> I think it is more important to store the old lock via a rel barrier instead:
> 
> - old->td_lock = mtx;
> + atomic_store_rel_ptr(&old->td_lock, mtx);

Both are required to ensure the new CPU does not load stale values from the pcb.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 22:32:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EC6E4106566B;
	Tue, 26 Jan 2010 22:32:22 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DA4868FC14;
	Tue, 26 Jan 2010 22:32:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QMWMxC022949;
	Tue, 26 Jan 2010 22:32:22 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QMWMIk022933;
	Tue, 26 Jan 2010 22:32:22 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001262232.o0QMWMIk022933@svn.freebsd.org>
From: Jack F Vogel 
Date: Tue, 26 Jan 2010 22:32:22 +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: r203049 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 22:32:23 -0000

Author: jfv
Date: Tue Jan 26 22:32:22 2010
New Revision: 203049
URL: http://svn.freebsd.org/changeset/base/203049

Log:
  Update the 1G drivers, shared code sync with Intel,
  igb now has a queue notion that has a single interrupt
  with an RX/TX pair, this will reduce the total interrupts
  seen on a system. Both em and igb have a new watchdog
  method. igb has fixes from Pyun Yong-Hyeon that have
  improved stability, thank you :)
  
  I wish to MFC this for 7.3 asap, please test if able.

Modified:
  head/sys/dev/e1000/LICENSE
  head/sys/dev/e1000/e1000_80003es2lan.c
  head/sys/dev/e1000/e1000_82540.c
  head/sys/dev/e1000/e1000_82541.c
  head/sys/dev/e1000/e1000_82542.c
  head/sys/dev/e1000/e1000_82543.c
  head/sys/dev/e1000/e1000_82571.c
  head/sys/dev/e1000/e1000_82575.c
  head/sys/dev/e1000/e1000_82575.h
  head/sys/dev/e1000/e1000_api.c
  head/sys/dev/e1000/e1000_api.h
  head/sys/dev/e1000/e1000_defines.h
  head/sys/dev/e1000/e1000_hw.h
  head/sys/dev/e1000/e1000_ich8lan.c
  head/sys/dev/e1000/e1000_ich8lan.h
  head/sys/dev/e1000/e1000_mac.c
  head/sys/dev/e1000/e1000_mac.h
  head/sys/dev/e1000/e1000_manage.c
  head/sys/dev/e1000/e1000_osdep.h
  head/sys/dev/e1000/e1000_phy.c
  head/sys/dev/e1000/e1000_phy.h
  head/sys/dev/e1000/e1000_regs.h
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_em.h
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_igb.h

Modified: head/sys/dev/e1000/LICENSE
==============================================================================
--- head/sys/dev/e1000/LICENSE	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/LICENSE	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 $FreeBSD$
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 

Modified: head/sys/dev/e1000/e1000_80003es2lan.c
==============================================================================
--- head/sys/dev/e1000/e1000_80003es2lan.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_80003es2lan.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -256,8 +256,6 @@ static s32 e1000_init_mac_params_80003es
 	mac->ops.write_vfta = e1000_write_vfta_generic;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_80003es2lan;
 	/* ID LED init */
@@ -1048,72 +1046,73 @@ static s32 e1000_copper_link_setup_gg825
 
 	DEBUGFUNC("e1000_copper_link_setup_gg82563_80003es2lan");
 
-	if (!phy->reset_disable) {
-		ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
-		                             &data);
-		if (ret_val)
-			goto out;
+	if (phy->reset_disable)
+		goto skip_reset;
 
-		data |= GG82563_MSCR_ASSERT_CRS_ON_TX;
-		/* Use 25MHz for both link down and 1000Base-T for Tx clock. */
-		data |= GG82563_MSCR_TX_CLK_1000MBPS_25;
+	ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
+				     &data);
+	if (ret_val)
+		goto out;
 
-		ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
-		                              data);
-		if (ret_val)
-			goto out;
+	data |= GG82563_MSCR_ASSERT_CRS_ON_TX;
+	/* Use 25MHz for both link down and 1000Base-T for Tx clock. */
+	data |= GG82563_MSCR_TX_CLK_1000MBPS_25;
 
-		/*
-		 * Options:
-		 *   MDI/MDI-X = 0 (default)
-		 *   0 - Auto for all speeds
-		 *   1 - MDI mode
-		 *   2 - MDI-X mode
-		 *   3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes)
-		 */
-		ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL, &data);
-		if (ret_val)
-			goto out;
+	ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
+				      data);
+	if (ret_val)
+		goto out;
 
-		data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK;
+	/*
+	 * Options:
+	 *   MDI/MDI-X = 0 (default)
+	 *   0 - Auto for all speeds
+	 *   1 - MDI mode
+	 *   2 - MDI-X mode
+	 *   3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes)
+	 */
+	ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL, &data);
+	if (ret_val)
+		goto out;
 
-		switch (phy->mdix) {
-		case 1:
-			data |= GG82563_PSCR_CROSSOVER_MODE_MDI;
-			break;
-		case 2:
-			data |= GG82563_PSCR_CROSSOVER_MODE_MDIX;
-			break;
-		case 0:
-		default:
-			data |= GG82563_PSCR_CROSSOVER_MODE_AUTO;
-			break;
-		}
+	data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK;
 
-		/*
-		 * Options:
-		 *   disable_polarity_correction = 0 (default)
-		 *       Automatic Correction for Reversed Cable Polarity
-		 *   0 - Disabled
-		 *   1 - Enabled
-		 */
-		data &= ~GG82563_PSCR_POLARITY_REVERSAL_DISABLE;
-		if (phy->disable_polarity_correction)
-			data |= GG82563_PSCR_POLARITY_REVERSAL_DISABLE;
+	switch (phy->mdix) {
+	case 1:
+		data |= GG82563_PSCR_CROSSOVER_MODE_MDI;
+		break;
+	case 2:
+		data |= GG82563_PSCR_CROSSOVER_MODE_MDIX;
+		break;
+	case 0:
+	default:
+		data |= GG82563_PSCR_CROSSOVER_MODE_AUTO;
+		break;
+	}
 
-		ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, data);
-		if (ret_val)
-			goto out;
+	/*
+	 * Options:
+	 *   disable_polarity_correction = 0 (default)
+	 *       Automatic Correction for Reversed Cable Polarity
+	 *   0 - Disabled
+	 *   1 - Enabled
+	 */
+	data &= ~GG82563_PSCR_POLARITY_REVERSAL_DISABLE;
+	if (phy->disable_polarity_correction)
+		data |= GG82563_PSCR_POLARITY_REVERSAL_DISABLE;
 
-		/* SW Reset the PHY so all changes take effect */
-		ret_val = hw->phy.ops.commit(hw);
-		if (ret_val) {
-			DEBUGOUT("Error Resetting the PHY\n");
-			goto out;
-		}
+	ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, data);
+	if (ret_val)
+		goto out;
 
+	/* SW Reset the PHY so all changes take effect */
+	ret_val = hw->phy.ops.commit(hw);
+	if (ret_val) {
+		DEBUGOUT("Error Resetting the PHY\n");
+		goto out;
 	}
 
+skip_reset:
 	/* Bypass Rx and Tx FIFO's */
 	ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
 					E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL,

Modified: head/sys/dev/e1000/e1000_82540.c
==============================================================================
--- head/sys/dev/e1000/e1000_82540.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82540.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -228,8 +228,6 @@ static s32 e1000_init_mac_params_82540(s
 	mac->ops.write_vfta = e1000_write_vfta_generic;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_82540;
 	/* ID LED init */

Modified: head/sys/dev/e1000/e1000_82541.c
==============================================================================
--- head/sys/dev/e1000/e1000_82541.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82541.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -260,8 +260,6 @@ static s32 e1000_init_mac_params_82541(s
 	mac->ops.write_vfta = e1000_write_vfta_generic;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_82541;
 	/* ID LED init */

Modified: head/sys/dev/e1000/e1000_82542.c
==============================================================================
--- head/sys/dev/e1000/e1000_82542.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82542.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -134,8 +134,6 @@ static s32 e1000_init_mac_params_82542(s
 	mac->ops.write_vfta = e1000_write_vfta_generic;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_82542;
 	/* set RAR */

Modified: head/sys/dev/e1000/e1000_82543.c
==============================================================================
--- head/sys/dev/e1000/e1000_82543.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82543.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2008, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -63,7 +63,6 @@ static s32  e1000_led_on_82543(struct e1
 static s32  e1000_led_off_82543(struct e1000_hw *hw);
 static void e1000_write_vfta_82543(struct e1000_hw *hw, u32 offset,
                                    u32 value);
-static void e1000_mta_set_82543(struct e1000_hw *hw, u32 hash_value);
 static void e1000_clear_hw_cntrs_82543(struct e1000_hw *hw);
 static s32  e1000_config_mac_to_phy_82543(struct e1000_hw *hw);
 static bool e1000_init_phy_disabled_82543(struct e1000_hw *hw);
@@ -246,8 +245,6 @@ static s32 e1000_init_mac_params_82543(s
 	mac->ops.write_vfta = e1000_write_vfta_82543;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_82543;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_82543;
 	/* turn on/off LED */
@@ -1481,45 +1478,6 @@ static void e1000_write_vfta_82543(struc
 }
 
 /**
- *  e1000_mta_set_82543 - Set multicast filter table address
- *  @hw: pointer to the HW structure
- *  @hash_value: determines the MTA register and bit to set
- *
- *  The multicast table address is a register array of 32-bit registers.
- *  The hash_value is used to determine what register the bit is in, the
- *  current value is read, the new bit is OR'd in and the new value is
- *  written back into the register.
- **/
-static void e1000_mta_set_82543(struct e1000_hw *hw, u32 hash_value)
-{
-	u32 hash_bit, hash_reg, mta, temp;
-
-	DEBUGFUNC("e1000_mta_set_82543");
-
-	hash_reg = (hash_value >> 5);
-
-	/*
-	 * If we are on an 82544 and we are trying to write an odd offset
-	 * in the MTA, save off the previous entry before writing and
-	 * restore the old value after writing.
-	 */
-	if ((hw->mac.type == e1000_82544) && (hash_reg & 1)) {
-		hash_reg &= (hw->mac.mta_reg_count - 1);
-		hash_bit = hash_value & 0x1F;
-		mta = E1000_READ_REG_ARRAY(hw, E1000_MTA, hash_reg);
-		mta |= (1 << hash_bit);
-		temp = E1000_READ_REG_ARRAY(hw, E1000_MTA, hash_reg - 1);
-
-		E1000_WRITE_REG_ARRAY(hw, E1000_MTA, hash_reg, mta);
-		E1000_WRITE_FLUSH(hw);
-		E1000_WRITE_REG_ARRAY(hw, E1000_MTA, hash_reg - 1, temp);
-		E1000_WRITE_FLUSH(hw);
-	} else {
-		e1000_mta_set_generic(hw, hash_value);
-	}
-}
-
-/**
  *  e1000_led_on_82543 - Turn on SW controllable LED
  *  @hw: pointer to the HW structure
  *

Modified: head/sys/dev/e1000/e1000_82571.c
==============================================================================
--- head/sys/dev/e1000/e1000_82571.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82571.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -336,8 +336,6 @@ static s32 e1000_init_mac_params_82571(s
 	mac->ops.write_vfta = e1000_write_vfta_generic;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_82571;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_82571;
 	/* ID LED init */

Modified: head/sys/dev/e1000/e1000_82575.c
==============================================================================
--- head/sys/dev/e1000/e1000_82575.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82575.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -80,8 +80,10 @@ static void e1000_release_swfw_sync_8257
 static bool e1000_sgmii_active_82575(struct e1000_hw *hw);
 static s32  e1000_reset_init_script_82575(struct e1000_hw *hw);
 static s32  e1000_read_mac_addr_82575(struct e1000_hw *hw);
+static void e1000_config_collision_dist_82575(struct e1000_hw *hw);
 static void e1000_power_down_phy_copper_82575(struct e1000_hw *hw);
 static void e1000_shutdown_serdes_link_82575(struct e1000_hw *hw);
+static void e1000_power_up_serdes_link_82575(struct e1000_hw *hw);
 static s32 e1000_set_pcie_completion_timeout(struct e1000_hw *hw);
 
 static const u16 e1000_82580_rxpbs_table[] =
@@ -122,8 +124,7 @@ static s32 e1000_init_phy_params_82575(s
 		phy->ops.reset      = e1000_phy_hw_reset_sgmii_82575;
 		phy->ops.read_reg   = e1000_read_phy_reg_sgmii_82575;
 		phy->ops.write_reg  = e1000_write_phy_reg_sgmii_82575;
-	} else if ((hw->mac.type == e1000_82580) ||
-	           (hw->mac.type == e1000_82580er)) {
+	} else if (hw->mac.type >= e1000_82580) {
 		phy->ops.reset      = e1000_phy_hw_reset_generic;
 		phy->ops.read_reg   = e1000_read_phy_reg_82580;
 		phy->ops.write_reg  = e1000_write_phy_reg_82580;
@@ -273,8 +274,7 @@ static s32 e1000_init_mac_params_82575(s
 	 * if using i2c make certain the MDICNFG register is cleared to prevent
 	 * communications from being misrouted to the mdic registers
 	 */
-	if ((ctrl_ext & E1000_CTRL_I2C_ENA) &&
-	    ((hw->mac.type == e1000_82580) || (hw->mac.type == e1000_82580er)))
+	if ((ctrl_ext & E1000_CTRL_I2C_ENA) && (hw->mac.type == e1000_82580))
 		E1000_WRITE_REG(hw, E1000_MDICNFG, 0);
 
 	/* Set mta register count */
@@ -285,7 +285,7 @@ static s32 e1000_init_mac_params_82575(s
 	mac->rar_entry_count = E1000_RAR_ENTRIES_82575;
 	if (mac->type == e1000_82576)
 		mac->rar_entry_count = E1000_RAR_ENTRIES_82576;
-	if ((mac->type == e1000_82580) || (mac->type == e1000_82580er))
+	if (mac->type == e1000_82580)
 		mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
 	/* Set if part includes ASF firmware */
 	mac->asf_firmware_present = TRUE;
@@ -299,7 +299,7 @@ static s32 e1000_init_mac_params_82575(s
 	/* bus type/speed/width */
 	mac->ops.get_bus_info = e1000_get_bus_info_pcie_generic;
 	/* reset */
-	if ((mac->type == e1000_82580) || (mac->type == e1000_82580er))
+	if (mac->type >= e1000_82580)
 		mac->ops.reset_hw = e1000_reset_hw_82580;
 	else
 	mac->ops.reset_hw = e1000_reset_hw_82575;
@@ -314,20 +314,22 @@ static s32 e1000_init_mac_params_82575(s
 	                : e1000_setup_serdes_link_82575;
 	/* physical interface shutdown */
 	mac->ops.shutdown_serdes = e1000_shutdown_serdes_link_82575;
+	/* physical interface power up */
+	mac->ops.power_up_serdes = e1000_power_up_serdes_link_82575;
 	/* check for link */
 	mac->ops.check_for_link = e1000_check_for_link_82575;
 	/* receive address register setting */
 	mac->ops.rar_set = e1000_rar_set_generic;
 	/* read mac address */
 	mac->ops.read_mac_addr = e1000_read_mac_addr_82575;
+	/* configure collision distance */
+	mac->ops.config_collision_dist = e1000_config_collision_dist_82575;
 	/* multicast address update */
 	mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic;
 	/* writing VFTA */
 	mac->ops.write_vfta = e1000_write_vfta_generic;
 	/* clearing VFTA */
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* ID LED init */
 	mac->ops.id_led_init = e1000_id_led_init_generic;
 	/* blink LED */
@@ -888,6 +890,35 @@ static s32 e1000_check_for_link_82575(st
 }
 
 /**
+ *  e1000_power_up_serdes_link_82575 - Power up the serdes link after shutdown
+ *  @hw: pointer to the HW structure
+ **/
+static void e1000_power_up_serdes_link_82575(struct e1000_hw *hw)
+{
+	u32 reg;
+
+	DEBUGFUNC("e1000_power_up_serdes_link_82575");
+
+	if ((hw->phy.media_type != e1000_media_type_internal_serdes) &&
+	    !e1000_sgmii_active_82575(hw))
+		return;
+
+	/* Enable PCS to turn on link */
+	reg = E1000_READ_REG(hw, E1000_PCS_CFG0);
+	reg |= E1000_PCS_CFG_PCS_EN;
+	E1000_WRITE_REG(hw, E1000_PCS_CFG0, reg);
+
+	/* Power up the laser */
+	reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
+	reg &= ~E1000_CTRL_EXT_SDP3_DATA;
+	E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg);
+
+	/* flush the write to verify completion */
+	E1000_WRITE_FLUSH(hw);
+	msec_delay(1);
+}
+
+/**
  *  e1000_get_pcs_speed_and_duplex_82575 - Retrieve current speed/duplex
  *  @hw: pointer to the HW structure
  *  @speed: stores the current speed
@@ -954,28 +985,14 @@ static s32 e1000_get_pcs_speed_and_duple
 void e1000_shutdown_serdes_link_82575(struct e1000_hw *hw)
 {
 	u32 reg;
-	u16 eeprom_data = 0;
+
+	DEBUGFUNC("e1000_shutdown_serdes_link_82575");
 
 	if ((hw->phy.media_type != e1000_media_type_internal_serdes) &&
 	    !e1000_sgmii_active_82575(hw))
 		return;
 
-	if (hw->bus.func == E1000_FUNC_0)
-		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
-	else if ((hw->mac.type == e1000_82580) ||
-	         (hw->mac.type == e1000_82580er))
-		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A +
-		                 NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
-		                 &eeprom_data);
-	else if (hw->bus.func == E1000_FUNC_1)
-		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_B, 1, &eeprom_data);
-
-	/*
-	 * If APM is not enabled in the EEPROM and management interface is
-	 * not enabled, then power down.
-	 */
-	if (!(eeprom_data & E1000_NVM_APME_82575) &&
-	    !e1000_enable_mng_pass_thru(hw)) {
+	if (!e1000_enable_mng_pass_thru(hw)) {
 		/* Disable PCS to turn off link */
 		reg = E1000_READ_REG(hw, E1000_PCS_CFG0);
 		reg &= ~E1000_PCS_CFG_PCS_EN;
@@ -1205,16 +1222,10 @@ static s32 e1000_setup_serdes_link_82575
 	ctrl_reg = E1000_READ_REG(hw, E1000_CTRL);
 	ctrl_reg |= E1000_CTRL_SLU;
 
-	if (hw->mac.type == e1000_82575 || hw->mac.type == e1000_82576) {
-		/* set both sw defined pins */
+	/* set both sw defined pins on 82575/82576*/
+	if (hw->mac.type == e1000_82575 || hw->mac.type == e1000_82576)
 		ctrl_reg |= E1000_CTRL_SWDPIN0 | E1000_CTRL_SWDPIN1;
 
-		/* Set switch control to serdes energy detect */
-		reg = E1000_READ_REG(hw, E1000_CONNSW);
-		reg |= E1000_CONNSW_ENRGSRC;
-		E1000_WRITE_REG(hw, E1000_CONNSW, reg);
-	}
-
 	reg = E1000_READ_REG(hw, E1000_PCS_LCTL);
 
 	/* default pcs_autoneg to the same setting as mac autoneg */
@@ -1268,10 +1279,7 @@ static s32 e1000_setup_serdes_link_82575
 		DEBUGOUT1("Configuring Autoneg:PCS_LCTL=0x%08X\n", reg);
 	} else {
 		/* Set PCS register for forced link */
-		reg |= E1000_PCS_LCTL_FSD |        /* Force Speed */
-		       E1000_PCS_LCTL_FORCE_LINK | /* Force Link */
-		       E1000_PCS_LCTL_FLV_LINK_UP; /* Force link value up */
-
+		reg |= E1000_PCS_LCTL_FSD;        /* Force Speed */
 		DEBUGOUT1("Configuring Forced Link:PCS_LCTL=0x%08X\n", reg);
 	}
 
@@ -1396,6 +1404,28 @@ out:
 }
 
 /**
+ *  e1000_config_collision_dist_82575 - Configure collision distance
+ *  @hw: pointer to the HW structure
+ *
+ *  Configures the collision distance to the default value and is used
+ *  during link setup.
+ **/
+static void e1000_config_collision_dist_82575(struct e1000_hw *hw)
+{
+	u32 tctl_ext;
+
+	DEBUGFUNC("e1000_config_collision_dist_82575");
+
+	tctl_ext = E1000_READ_REG(hw, E1000_TCTL_EXT);
+
+	tctl_ext &= ~E1000_TCTL_EXT_COLD;
+	tctl_ext |= E1000_COLLISION_DISTANCE << E1000_TCTL_EXT_COLD_SHIFT;
+
+	E1000_WRITE_REG(hw, E1000_TCTL_EXT, tctl_ext);
+	E1000_WRITE_FLUSH(hw);
+}
+
+/**
  * e1000_power_down_phy_copper_82575 - Remove link during PHY power down
  * @hw: pointer to the HW structure
  *
@@ -1656,7 +1686,6 @@ void e1000_vmdq_set_replication_pf(struc
  **/
 static s32 e1000_read_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 *data)
 {
-	u32 mdicnfg = 0;
 	s32 ret_val;
 
 	DEBUGFUNC("e1000_read_phy_reg_82580");
@@ -1665,15 +1694,6 @@ static s32 e1000_read_phy_reg_82580(stru
 	if (ret_val)
 		goto out;
 
-	/*
-	 * We config the phy address in MDICNFG register now. Same bits
-	 * as before. The values in MDIC can be written but will be
-	 * ignored. This allows us to call the old function after
-	 * configuring the PHY address in the new register
-	 */
-	mdicnfg = (hw->phy.addr << E1000_MDIC_PHY_SHIFT);
-	E1000_WRITE_REG(hw, E1000_MDICNFG, mdicnfg);
-
 	ret_val = e1000_read_phy_reg_mdic(hw, offset, data);
 
 	hw->phy.ops.release(hw);
@@ -1692,7 +1712,6 @@ out:
  **/
 static s32 e1000_write_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 data)
 {
-	u32 mdicnfg = 0;
 	s32 ret_val;
 
 	DEBUGFUNC("e1000_write_phy_reg_82580");
@@ -1701,15 +1720,6 @@ static s32 e1000_write_phy_reg_82580(str
 	if (ret_val)
 		goto out;
 
-	/*
-	 * We config the phy address in MDICNFG register now. Same bits
-	 * as before. The values in MDIC can be written but will be
-	 * ignored. This allows us to call the old function after
-	 * configuring the PHY address in the new register
-	 */
-	mdicnfg = (hw->phy.addr << E1000_MDIC_PHY_SHIFT);
-	E1000_WRITE_REG(hw, E1000_MDICNFG, mdicnfg);
-
 	ret_val = e1000_write_phy_reg_mdic(hw, offset, data);
 
 	hw->phy.ops.release(hw);
@@ -1717,6 +1727,7 @@ static s32 e1000_write_phy_reg_82580(str
 out:
 	return ret_val;
 }
+
 /**
  *  e1000_reset_hw_82580 - Reset hardware
  *  @hw: pointer to the HW structure
@@ -1822,20 +1833,3 @@ u16 e1000_rxpbs_adjust_82580(u32 data)
 
 	return ret_val;
 }
-/**
- *  e1000_erfuse_check_82580 - ER Fuse check
- *  @hw: pointer to the HW structure
- *
- *  This function returns the status of the ER Fuse
- **/
-s32 e1000_erfuse_check_82580(struct e1000_hw *hw)
-{
-	s32 ret_val = E1000_SUCCESS;
-	s32 ufuse_reg;
-
-	ufuse_reg = E1000_READ_REG(hw, E1000_UFUSE);
-	if ((ufuse_reg & E1000_ERFUSE) == E1000_ERFUSE)
-		ret_val = E1000_ERFUSE_FAILURE;
-
-	return ret_val;
-}

Modified: head/sys/dev/e1000/e1000_82575.h
==============================================================================
--- head/sys/dev/e1000/e1000_82575.h	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_82575.h	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -443,6 +443,9 @@ struct e1000_adv_tx_context_desc {
 #define E1000_RPLOLR_STRVLAN   0x40000000
 #define E1000_RPLOLR_STRCRC    0x80000000
 
+#define E1000_TCTL_EXT_COLD       0x000FFC00
+#define E1000_TCTL_EXT_COLD_SHIFT 10
+
 #define E1000_DTXCTL_8023LL     0x0004
 #define E1000_DTXCTL_VLAN_ADDED 0x0008
 #define E1000_DTXCTL_OOS_ENABLE 0x0010
@@ -456,5 +459,4 @@ struct e1000_adv_tx_context_desc {
 void e1000_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable);
 void e1000_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable);
 u16 e1000_rxpbs_adjust_82580(u32 data);
-s32 e1000_erfuse_check_82580(struct e1000_hw *);
 #endif /* _E1000_82575_H_ */

Modified: head/sys/dev/e1000/e1000_api.c
==============================================================================
--- head/sys/dev/e1000/e1000_api.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_api.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -281,10 +281,6 @@ s32 e1000_set_mac_type(struct e1000_hw *
 	case E1000_DEV_ID_82580_COPPER_DUAL:
 		mac->type = e1000_82580;
 		break;
-	case E1000_DEV_ID_82580_ER:
-	case E1000_DEV_ID_82580_ER_DUAL:
-		mac->type = e1000_82580er;
-		break;
 	default:
 		/* Should never have loaded on this device */
 		ret_val = -E1000_ERR_MAC_INIT;
@@ -376,7 +372,6 @@ s32 e1000_setup_init_funcs(struct e1000_
 	case e1000_82575:
 	case e1000_82576:
 	case e1000_82580:
-	case e1000_82580er:
 		e1000_init_function_pointers_82575(hw);
 		break;
 	default:
@@ -760,20 +755,6 @@ s32 e1000_validate_mdi_setting(struct e1
 }
 
 /**
- *  e1000_mta_set - Sets multicast table bit
- *  @hw: pointer to the HW structure
- *  @hash_value: Multicast hash value.
- *
- *  This sets the bit in the multicast table corresponding to the
- *  hash value.  This is a function pointer entry point called by drivers.
- **/
-void e1000_mta_set(struct e1000_hw *hw, u32 hash_value)
-{
-	if (hw->mac.ops.mta_set)
-		hw->mac.ops.mta_set(hw, hash_value);
-}
-
-/**
  *  e1000_hash_mc_addr - Determines address location in multicast table
  *  @hw: pointer to the HW structure
  *  @mc_addr: Multicast address to hash.
@@ -1252,6 +1233,18 @@ void e1000_power_down_phy(struct e1000_h
 }
 
 /**
+ *  e1000_power_up_fiber_serdes_link - Power up serdes link
+ *  @hw: pointer to the HW structure
+ *
+ *  Power on the optics and PCS.
+ **/
+void e1000_power_up_fiber_serdes_link(struct e1000_hw *hw)
+{
+	if (hw->mac.ops.power_up_serdes)
+		hw->mac.ops.power_up_serdes(hw);
+}
+
+/**
  *  e1000_shutdown_fiber_serdes_link - Remove link during power down
  *  @hw: pointer to the HW structure
  *

Modified: head/sys/dev/e1000/e1000_api.h
==============================================================================
--- head/sys/dev/e1000/e1000_api.h	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_api.h	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -47,6 +47,7 @@ extern void    e1000_init_function_point
 extern void    e1000_init_function_pointers_82575(struct e1000_hw *hw);
 extern void    e1000_rx_fifo_flush_82575(struct e1000_hw *hw);
 extern void    e1000_init_function_pointers_vf(struct e1000_hw *hw);
+extern void    e1000_power_up_fiber_serdes_link(struct e1000_hw *hw);
 extern void    e1000_shutdown_fiber_serdes_link(struct e1000_hw *hw);
 
 s32  e1000_set_mac_type(struct e1000_hw *hw);
@@ -67,7 +68,6 @@ s32  e1000_get_speed_and_duplex(struct e
 s32  e1000_disable_pcie_master(struct e1000_hw *hw);
 void e1000_config_collision_dist(struct e1000_hw *hw);
 void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
-void e1000_mta_set(struct e1000_hw *hw, u32 hash_value);
 u32  e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
 void e1000_update_mc_addr_list(struct e1000_hw *hw,
                                u8 *mc_addr_list, u32 mc_addr_count);

Modified: head/sys/dev/e1000/e1000_defines.h
==============================================================================
--- head/sys/dev/e1000/e1000_defines.h	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_defines.h	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -1004,7 +1004,6 @@
 #define E1000_ERR_SWFW_SYNC 13
 #define E1000_NOT_IMPLEMENTED 14
 #define E1000_ERR_MBX      15
-#define E1000_ERFUSE_FAILURE 16
 
 /* Loop limit on how long we wait for auto-negotiation to complete */
 #define FIBER_LINK_UP_LIMIT               50

Modified: head/sys/dev/e1000/e1000_hw.h
==============================================================================
--- head/sys/dev/e1000/e1000_hw.h	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_hw.h	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -142,8 +142,6 @@ struct e1000_hw;
 #define E1000_DEV_ID_82580_SERDES             0x1510
 #define E1000_DEV_ID_82580_SGMII              0x1511
 #define E1000_DEV_ID_82580_COPPER_DUAL        0x1516
-#define E1000_DEV_ID_82580_ER                 0x151D
-#define E1000_DEV_ID_82580_ER_DUAL            0x151E
 #define E1000_REVISION_0 0
 #define E1000_REVISION_1 1
 #define E1000_REVISION_2 2
@@ -187,7 +185,6 @@ enum e1000_mac_type {
 	e1000_82575,
 	e1000_82576,
 	e1000_82580,
-	e1000_82580er,
 	e1000_num_macs  /* List is 1-based, so subtract 1 for TRUE count. */
 };
 
@@ -603,11 +600,11 @@ struct e1000_mac_operations {
 	s32  (*reset_hw)(struct e1000_hw *);
 	s32  (*init_hw)(struct e1000_hw *);
 	void (*shutdown_serdes)(struct e1000_hw *);
+	void (*power_up_serdes)(struct e1000_hw *);
 	s32  (*setup_link)(struct e1000_hw *);
 	s32  (*setup_physical_interface)(struct e1000_hw *);
 	s32  (*setup_led)(struct e1000_hw *);
 	void (*write_vfta)(struct e1000_hw *, u32, u32);
-	void (*mta_set)(struct e1000_hw *, u32);
 	void (*config_collision_dist)(struct e1000_hw *);
 	void (*rar_set)(struct e1000_hw *, u8*, u32);
 	s32  (*read_mac_addr)(struct e1000_hw *);

Modified: head/sys/dev/e1000/e1000_ich8lan.c
==============================================================================
--- head/sys/dev/e1000/e1000_ich8lan.c	Tue Jan 26 21:36:11 2010	(r203048)
+++ head/sys/dev/e1000/e1000_ich8lan.c	Tue Jan 26 22:32:22 2010	(r203049)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -125,6 +125,7 @@ static void e1000_power_down_phy_copper_
 static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw);
 static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw);
 static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw);
+static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw);
 
 /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */
 /* Offset 04h HSFSTS */
@@ -199,7 +200,21 @@ static s32 e1000_init_phy_params_pchlan(
 	phy->autoneg_mask             = AUTONEG_ADVERTISE_SPEED_DEFAULT;
 
 	phy->id = e1000_phy_unknown;
-	e1000_get_phy_id(hw);
+	ret_val = e1000_get_phy_id(hw);
+	if (ret_val)
+		goto out;
+	if ((phy->id == 0) || (phy->id == PHY_REVISION_MASK)) {
+		/*
+		 * In case the PHY needs to be in mdio slow mode (eg. 82577),
+		 * set slow mode and try to get the PHY id again.
+		 */
+		ret_val = e1000_set_mdio_slow_mode_hv(hw);
+		if (ret_val)
+			goto out;
+		ret_val = e1000_get_phy_id(hw);
+		if (ret_val)
+			goto out;
+	}
 	phy->type = e1000_get_phy_type_from_id(phy->id);
 
 	switch (phy->type) {
@@ -221,6 +236,7 @@ static s32 e1000_init_phy_params_pchlan(
 		break;
 	}
 
+out:
 	return ret_val;
 }
 
@@ -442,8 +458,6 @@ static s32 e1000_init_mac_params_ich8lan
 	mac->ops.get_link_up_info = e1000_get_link_up_info_ich8lan;
 	/* multicast address update */
 	mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic;
-	/* setting MTA */
-	mac->ops.mta_set = e1000_mta_set_generic;
 	/* clear hardware counters */
 	mac->ops.clear_hw_cntrs = e1000_clear_hw_cntrs_ich8lan;
 
@@ -464,6 +478,7 @@ static s32 e1000_init_mac_params_ich8lan
 		mac->ops.led_on = e1000_led_on_ich8lan;
 		mac->ops.led_off = e1000_led_off_ich8lan;
 		break;
+#if defined(NAHUM4) || defined(NAHUM5)
 	case e1000_pchlan:
 		/* save PCH revision_id */
 		e1000_read_pci_cfg(hw, 0x2, &pci_cfg);
@@ -478,6 +493,7 @@ static s32 e1000_init_mac_params_ich8lan
 		mac->ops.led_on = e1000_led_on_pchlan;
 		mac->ops.led_off = e1000_led_off_pchlan;
 		break;
+#endif /* defined(NAHUM4) || defined(NAHUM5) */
 	default:
 		break;
 	}
@@ -596,9 +612,11 @@ void e1000_init_function_pointers_ich8la
 	case e1000_ich10lan:
 		hw->phy.ops.init_params = e1000_init_phy_params_ich8lan;
 		break;
+#if defined(NAHUM4) || defined(NAHUM5)
 	case e1000_pchlan:
 		hw->phy.ops.init_params = e1000_init_phy_params_pchlan;
 		break;
+#endif /* defined(NAHUM4) || defined(NAHUM5) */
 	default:
 		break;
 	}
@@ -767,9 +785,13 @@ static s32 e1000_sw_lcd_config_ich8lan(s
 {
 	struct e1000_phy_info *phy = &hw->phy;
 	u32 i, data, cnf_size, cnf_base_addr, sw_cfg_mask;
-	s32 ret_val;
+	s32 ret_val = E1000_SUCCESS;
 	u16 word_addr, reg_data, reg_addr, phy_page = 0;
 
+	if (!(hw->mac.type == e1000_ich8lan && phy->type == e1000_phy_igp_3) &&
+		!(hw->mac.type == e1000_pchlan))
+		return ret_val;
+
 	ret_val = hw->phy.ops.acquire(hw);
 	if (ret_val)
 		return ret_val;
@@ -781,95 +803,92 @@ static s32 e1000_sw_lcd_config_ich8lan(s
 	 * Therefore, after each PHY reset, we will load the
 	 * configuration data out of the NVM manually.
 	 */
-	if ((hw->mac.type == e1000_ich8lan && phy->type == e1000_phy_igp_3) ||
-		(hw->mac.type == e1000_pchlan)) {
-		/* Check if SW needs to configure the PHY */
-		if ((hw->device_id == E1000_DEV_ID_ICH8_IGP_M_AMT) ||
-		    (hw->device_id == E1000_DEV_ID_ICH8_IGP_M) ||
-		    (hw->mac.type == e1000_pchlan))
-			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
-		else
-			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
+	if ((hw->device_id == E1000_DEV_ID_ICH8_IGP_M_AMT) ||
+	    (hw->device_id == E1000_DEV_ID_ICH8_IGP_M) ||
+	    (hw->mac.type == e1000_pchlan))
+		sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
+	else
+		sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
 
-		data = E1000_READ_REG(hw, E1000_FEXTNVM);
-		if (!(data & sw_cfg_mask))
-			goto out;
+	data = E1000_READ_REG(hw, E1000_FEXTNVM);
+	if (!(data & sw_cfg_mask))
+		goto out;
 
-		/* Wait for basic configuration completes before proceeding */
-		e1000_lan_init_done_ich8lan(hw);
+	/* Wait for basic configuration completes before proceeding */
+	e1000_lan_init_done_ich8lan(hw);
+
+	/*
+	 * Make sure HW does not configure LCD from PHY
+	 * extended configuration before SW configuration
+	 */
+	data = E1000_READ_REG(hw, E1000_EXTCNF_CTRL);
+	if (data & E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE)
+		goto out;
 
+	cnf_size = E1000_READ_REG(hw, E1000_EXTCNF_SIZE);
+	cnf_size &= E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK;
+	cnf_size >>= E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_SHIFT;
+	if (!cnf_size)
+		goto out;
+
+	cnf_base_addr = data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK;
+	cnf_base_addr >>= E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT;
+
+#if defined(NAHUM4) || defined(NAHUM5)
+	if (!(data & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE) &&
+	    (hw->mac.type == e1000_pchlan)) {
 		/*
-		 * Make sure HW does not configure LCD from PHY
-		 * extended configuration before SW configuration
+		 * HW configures the SMBus address and LEDs when the
+		 * OEM and LCD Write Enable bits are set in the NVM.
+		 * When both NVM bits are cleared, SW will configure
+		 * them instead.
 		 */
-		data = E1000_READ_REG(hw, E1000_EXTCNF_CTRL);
-		if (data & E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE)
+		data = E1000_READ_REG(hw, E1000_STRAP);
+		data &= E1000_STRAP_SMBUS_ADDRESS_MASK;
+		reg_data = data >> E1000_STRAP_SMBUS_ADDRESS_SHIFT;
+		reg_data |= HV_SMB_ADDR_PEC_EN | HV_SMB_ADDR_VALID;
+		ret_val = e1000_write_phy_reg_hv_locked(hw, HV_SMB_ADDR,
+							reg_data);
+		if (ret_val)
 			goto out;
 
-		cnf_size = E1000_READ_REG(hw, E1000_EXTCNF_SIZE);
-		cnf_size &= E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK;
-		cnf_size >>= E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_SHIFT;
-		if (!cnf_size)
+		data = E1000_READ_REG(hw, E1000_LEDCTL);
+		ret_val = e1000_write_phy_reg_hv_locked(hw, HV_LED_CONFIG,
+							(u16)data);
+		if (ret_val)
 			goto out;
+	}
 
-		cnf_base_addr = data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK;
-		cnf_base_addr >>= E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT;
-
-		if (!(data & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE) &&
-		    (hw->mac.type == e1000_pchlan)) {
-			/*
-			 * HW configures the SMBus address and LEDs when the
-			 * OEM and LCD Write Enable bits are set in the NVM.
-			 * When both NVM bits are cleared, SW will configure
-			 * them instead.
-			 */
-			data = E1000_READ_REG(hw, E1000_STRAP);
-			data &= E1000_STRAP_SMBUS_ADDRESS_MASK;
-			reg_data = data >> E1000_STRAP_SMBUS_ADDRESS_SHIFT;
-			reg_data |= HV_SMB_ADDR_PEC_EN | HV_SMB_ADDR_VALID;
-			ret_val = e1000_write_phy_reg_hv_locked(hw, HV_SMB_ADDR,
-			                                        reg_data);
-			if (ret_val)
-				goto out;
-
-			data = E1000_READ_REG(hw, E1000_LEDCTL);
-			ret_val = e1000_write_phy_reg_hv_locked(hw,
-			                                        HV_LED_CONFIG,
-			                                        (u16)data);
-			if (ret_val)
-				goto out;
-		}
-
-		/* Configure LCD from extended configuration region. */
+#endif /* defined(NAHUM4) || defined(NAHUM5) */
+	/* Configure LCD from extended configuration region. */
 
-		/* cnf_base_addr is in DWORD */
-		word_addr = (u16)(cnf_base_addr << 1);
+	/* cnf_base_addr is in DWORD */
+	word_addr = (u16)(cnf_base_addr << 1);
 
-		for (i = 0; i < cnf_size; i++) {
-			ret_val = hw->nvm.ops.read(hw, (word_addr + i * 2), 1,
-			                           ®_data);
-			if (ret_val)
-				goto out;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 22:38:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2517E106566B;
	Tue, 26 Jan 2010 22:38:32 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF6D88FC12;
	Tue, 26 Jan 2010 22:38:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QMcVdp024386;
	Tue, 26 Jan 2010 22:38:31 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QMcVFW024384;
	Tue, 26 Jan 2010 22:38:31 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001262238.o0QMcVFW024384@svn.freebsd.org>
From: Jack F Vogel 
Date: Tue, 26 Jan 2010 22:38: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: r203050 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 22:38:32 -0000

Author: jfv
Date: Tue Jan 26 22:38:31 2010
New Revision: 203050
URL: http://svn.freebsd.org/changeset/base/203050

Log:
  Remove some internal conditional defines that will
  fail in kernel tree.

Modified:
  head/sys/dev/e1000/e1000_ich8lan.c

Modified: head/sys/dev/e1000/e1000_ich8lan.c
==============================================================================
--- head/sys/dev/e1000/e1000_ich8lan.c	Tue Jan 26 22:32:22 2010	(r203049)
+++ head/sys/dev/e1000/e1000_ich8lan.c	Tue Jan 26 22:38:31 2010	(r203050)
@@ -478,7 +478,6 @@ static s32 e1000_init_mac_params_ich8lan
 		mac->ops.led_on = e1000_led_on_ich8lan;
 		mac->ops.led_off = e1000_led_off_ich8lan;
 		break;
-#if defined(NAHUM4) || defined(NAHUM5)
 	case e1000_pchlan:
 		/* save PCH revision_id */
 		e1000_read_pci_cfg(hw, 0x2, &pci_cfg);
@@ -493,7 +492,6 @@ static s32 e1000_init_mac_params_ich8lan
 		mac->ops.led_on = e1000_led_on_pchlan;
 		mac->ops.led_off = e1000_led_off_pchlan;
 		break;
-#endif /* defined(NAHUM4) || defined(NAHUM5) */
 	default:
 		break;
 	}
@@ -612,11 +610,9 @@ void e1000_init_function_pointers_ich8la
 	case e1000_ich10lan:
 		hw->phy.ops.init_params = e1000_init_phy_params_ich8lan;
 		break;
-#if defined(NAHUM4) || defined(NAHUM5)
 	case e1000_pchlan:
 		hw->phy.ops.init_params = e1000_init_phy_params_pchlan;
 		break;
-#endif /* defined(NAHUM4) || defined(NAHUM5) */
 	default:
 		break;
 	}
@@ -834,7 +830,6 @@ static s32 e1000_sw_lcd_config_ich8lan(s
 	cnf_base_addr = data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK;
 	cnf_base_addr >>= E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT;
 
-#if defined(NAHUM4) || defined(NAHUM5)
 	if (!(data & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE) &&
 	    (hw->mac.type == e1000_pchlan)) {
 		/*
@@ -859,7 +854,6 @@ static s32 e1000_sw_lcd_config_ich8lan(s
 			goto out;
 	}
 
-#endif /* defined(NAHUM4) || defined(NAHUM5) */
 	/* Configure LCD from extended configuration region. */
 
 	/* cnf_base_addr is in DWORD */
@@ -2690,16 +2684,9 @@ static s32 e1000_reset_hw_ich8lan(struct
 			DEBUGOUT("Auto Read Done did not complete\n");
 		}
 	}
-#if defined(NAHUM4) || defined(NAHUM5)
-	/* Dummy read to clear the phy wakeup bit after lcd reset */
-#if defined(NAHUM4) && defined(NAHUM5)
-	if ((hw->mac.type == e1000_pchlan) || (hw->mac.type == e1000_pch2lan))
-#else
 	if (hw->mac.type == e1000_pchlan)
-#endif
 		hw->phy.ops.read_reg(hw, BM_WUC, ®);
 
-#endif /* defined(NAHUM4) || defined(NAHUM5) */
 	ret_val = e1000_sw_lcd_config_ich8lan(hw);
 	if (ret_val)
 		goto out;

From owner-svn-src-all@FreeBSD.ORG  Tue Jan 26 23:04:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 06A121065672;
	Tue, 26 Jan 2010 23:04:14 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EA6098FC14;
	Tue, 26 Jan 2010 23:04:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0QN4D4g030058;
	Tue, 26 Jan 2010 23:04:13 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0QN4D25030055;
	Tue, 26 Jan 2010 23:04:13 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001262304.o0QN4D25030055@svn.freebsd.org>
From: Jack F Vogel 
Date: Tue, 26 Jan 2010 23:04:13 +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: r203051 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 26 Jan 2010 23:04:14 -0000

Author: jfv
Date: Tue Jan 26 23:04:13 2010
New Revision: 203051
URL: http://svn.freebsd.org/changeset/base/203051

Log:
  Missing a fix for the new watchdog handling.

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Tue Jan 26 22:38:31 2010	(r203050)
+++ head/sys/dev/e1000/if_em.c	Tue Jan 26 23:04:13 2010	(r203051)
@@ -2224,6 +2224,7 @@ em_xmit(struct adapter *adapter, struct 
 	 */
 	tx_buffer = &adapter->tx_buffer_area[first];
 	tx_buffer->next_eop = last;
+	adapter->watchdog_time = ticks;
 
 	/*
 	 * Advance the Transmit Descriptor Tail (TDT), this tells the E1000

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Tue Jan 26 22:38:31 2010	(r203050)
+++ head/sys/dev/e1000/if_igb.c	Tue Jan 26 23:04:13 2010	(r203051)
@@ -1645,6 +1645,7 @@ igb_xmit(struct tx_ring *txr, struct mbu
 	 */
 	tx_buffer = &txr->tx_buffers[first];
 	tx_buffer->next_eop = last;
+	txr->watchdog_time = ticks;
 
 	/*
 	 * Advance the Transmit Descriptor Tail (TDT), this tells the E1000

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 00:30:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16E17106568B;
	Wed, 27 Jan 2010 00:30:08 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 042DC8FC08;
	Wed, 27 Jan 2010 00:30:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R0U8Jl049172;
	Wed, 27 Jan 2010 00:30:08 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R0U7HJ049160;
	Wed, 27 Jan 2010 00:30:07 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201001270030.o0R0U7HJ049160@svn.freebsd.org>
From: Xin LI 
Date: Wed, 27 Jan 2010 00:30:07 +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: r203052 - in head: contrib/libpcap sbin/ifconfig
	share/man/man4 sys/kern sys/net sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 00:30:08 -0000

Author: delphij
Date: Wed Jan 27 00:30:07 2010
New Revision: 203052
URL: http://svn.freebsd.org/changeset/base/203052

Log:
  Revised revision 199201 (add interface description capability as inspired
  by OpenBSD), based on comments from many, including rwatson, jhb, brooks
  and others.
  
  Sponsored by:	iXsystems, Inc.
  MFC after:	1 month

Modified:
  head/contrib/libpcap/inet.c
  head/sbin/ifconfig/ifconfig.8
  head/sbin/ifconfig/ifconfig.c
  head/share/man/man4/netintro.4
  head/sys/kern/kern_jail.c
  head/sys/net/if.c
  head/sys/net/if.h
  head/sys/net/if_var.h
  head/sys/sys/param.h
  head/sys/sys/priv.h
  head/sys/sys/sockio.h

Modified: head/contrib/libpcap/inet.c
==============================================================================
--- head/contrib/libpcap/inet.c	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/contrib/libpcap/inet.c	Wed Jan 27 00:30:07 2010	(r203052)
@@ -401,10 +401,15 @@ add_addr_to_iflist(pcap_if_t **alldevs, 
 	pcap_if_t *curdev;
 	char *description = NULL;
 	pcap_addr_t *curaddr, *prevaddr, *nextaddr;
+	int s;
 #ifdef SIOCGIFDESCR
 	struct ifreq ifrdesc;
+#ifndef IFDESCRSIZE
+#define _IFDESCRSIZE 64
+	char ifdescr[_IFDESCRSIZE];
+#else
 	char ifdescr[IFDESCRSIZE];
-	int s;
+#endif
 #endif
 
 #ifdef SIOCGIFDESCR
@@ -413,12 +418,17 @@ add_addr_to_iflist(pcap_if_t **alldevs, 
 	 */
 	memset(&ifrdesc, 0, sizeof ifrdesc);
 	strlcpy(ifrdesc.ifr_name, name, sizeof ifrdesc.ifr_name);
+#ifdef __FreeBSD__
+	ifrdesc.ifr_buffer.buffer = ifdescr;
+	ifrdesc.ifr_buffer.length = sizeof(ifdescr);
+#else
 	ifrdesc.ifr_data = (caddr_t)&ifdescr;
+#endif
 	s = socket(AF_INET, SOCK_DGRAM, 0);
 	if (s >= 0) {
 		if (ioctl(s, SIOCGIFDESCR, &ifrdesc) == 0 &&
-		    strlen(ifrdesc.ifr_data) != 0)
-			description = ifrdesc.ifr_data;
+		    strlen(ifdescr) != 0)
+			description = ifdescr;
 		close(s);
 	}
 #endif

Modified: head/sbin/ifconfig/ifconfig.8
==============================================================================
--- head/sbin/ifconfig/ifconfig.8	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sbin/ifconfig/ifconfig.8	Wed Jan 27 00:30:07 2010	(r203052)
@@ -28,7 +28,7 @@
 .\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd September 23, 2009
+.Dd January 26, 2010
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -258,6 +258,12 @@ Disable permanently promiscuous mode.
 Another name for the
 .Fl alias
 parameter.
+.It Cm description Ar value , Cm descr Ar value
+Specify a description of the interface.
+This can be used to label interfaces in situations where they may
+otherwise be difficult to distinguish.
+.It Cm -description , Cm -descr
+Clear the interface description.
 .It Cm down
 Mark an interface
 .Dq down .
@@ -2512,6 +2518,10 @@ Configure the interface
 to use 100baseTX, full duplex Ethernet media options:
 .Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex
 .Pp
+Label the em0 interface as an uplink:
+.Pp
+.Dl # ifconfig em0 description \&"Uplink to Gigabit Switch 2\&"
+.Pp
 Create the software network interface
 .Li gif1 :
 .Dl # ifconfig gif1 create

Modified: head/sbin/ifconfig/ifconfig.c
==============================================================================
--- head/sbin/ifconfig/ifconfig.c	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sbin/ifconfig/ifconfig.c	Wed Jan 27 00:30:07 2010	(r203052)
@@ -44,7 +44,6 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -83,6 +82,8 @@ static const char rcsid[] =
 struct	ifreq ifr;
 
 char	name[IFNAMSIZ];
+char	*descr = NULL;
+size_t	descrlen = 64;
 int	setaddr;
 int	setmask;
 int	doalias;
@@ -838,6 +839,40 @@ setifname(const char *val, int dummy __u
 	free(newname);
 }
 
+/* ARGSUSED */
+static void
+setifdescr(const char *val, int dummy __unused, int s, 
+    const struct afswtch *afp)
+{
+	char *newdescr;
+
+	ifr.ifr_buffer.length = strlen(val) + 1;
+	if (ifr.ifr_buffer.length == 1) {
+		ifr.ifr_buffer.buffer = newdescr = NULL;
+		ifr.ifr_buffer.length = 0;
+	} else {
+		newdescr = strdup(val);
+		ifr.ifr_buffer.buffer = newdescr;
+		if (newdescr == NULL) {
+			warn("no memory to set ifdescr");
+			return;
+		}
+	}
+
+	if (ioctl(s, SIOCSIFDESCR, (caddr_t)&ifr) < 0)
+		warn("ioctl (set descr)");
+
+	free(newdescr);
+}
+
+/* ARGSUSED */
+static void
+unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
+{
+
+	setifdescr("", 0, s, 0);
+}
+
 #define	IFFBITS \
 "\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6SMART\7RUNNING" \
 "\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LINK0\16LINK1\17LINK2" \
@@ -882,6 +917,25 @@ status(const struct afswtch *afp, const 
 		printf(" mtu %d", ifr.ifr_mtu);
 	putchar('\n');
 
+	for (;;) {
+		if ((descr = reallocf(descr, descrlen)) != NULL) {
+			ifr.ifr_buffer.buffer = descr;
+			ifr.ifr_buffer.length = descrlen;
+			if (ioctl(s, SIOCGIFDESCR, &ifr) == 0) {
+				if (strlen(descr) > 0)
+					printf("\tdescription: %s\n", descr);
+				break;
+			} else if (errno == ENAMETOOLONG)
+				descrlen = ifr.ifr_buffer.length;
+			else
+				break;
+		} else {
+			warn("unable to allocate memory for interface"
+			    "description");
+			break;
+		}
+	};
+
 	if (ioctl(s, SIOCGIFCAP, (caddr_t)&ifr) == 0) {
 		if (ifr.ifr_curcap != 0) {
 			printb("\toptions", ifr.ifr_curcap, IFCAPBITS);
@@ -1051,6 +1105,10 @@ static struct cmd basic_cmds[] = {
 	DEF_CMD("-arp",		IFF_NOARP,	setifflags),
 	DEF_CMD("debug",	IFF_DEBUG,	setifflags),
 	DEF_CMD("-debug",	-IFF_DEBUG,	setifflags),
+	DEF_CMD_ARG("description",		setifdescr),
+	DEF_CMD_ARG("descr",			setifdescr),
+	DEF_CMD("-description",	0,		unsetifdescr),
+	DEF_CMD("-descr",	0,		unsetifdescr),
 	DEF_CMD("promisc",	IFF_PPROMISC,	setifflags),
 	DEF_CMD("-promisc",	-IFF_PPROMISC,	setifflags),
 	DEF_CMD("add",		IFF_UP,		notealias),

Modified: head/share/man/man4/netintro.4
==============================================================================
--- head/share/man/man4/netintro.4	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/share/man/man4/netintro.4	Wed Jan 27 00:30:07 2010	(r203052)
@@ -32,7 +32,7 @@
 .\"     @(#)netintro.4	8.2 (Berkeley) 11/30/93
 .\" $FreeBSD$
 .\"
-.Dd June 18, 2004
+.Dd January 26, 2010
 .Dt NETINTRO 4
 .Os
 .Sh NAME
@@ -204,6 +204,7 @@ struct	ifreq {
         struct    sockaddr ifru_addr;
         struct    sockaddr ifru_dstaddr;
         struct    sockaddr ifru_broadaddr;
+        struct    ifreq_buffer ifru_buffer;
         short     ifru_flags[2];
         short     ifru_index;
         int       ifru_metric;
@@ -216,6 +217,7 @@ struct	ifreq {
 #define ifr_addr      ifr_ifru.ifru_addr      /* address */
 #define ifr_dstaddr   ifr_ifru.ifru_dstaddr   /* other end of p-to-p link */
 #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
+#define ifr_buffer    ifr_ifru.ifru_buffer    /* user supplied buffer with its length */
 #define ifr_flags     ifr_ifru.ifru_flags[0]  /* flags (low 16 bits) */
 #define ifr_flagshigh ifr_ifru.ifru_flags[1]  /* flags (high 16 bits) */
 #define ifr_metric    ifr_ifru.ifru_metric    /* metric */
@@ -277,6 +279,33 @@ and
 fields of the
 .Vt ifreq
 structure, respectively.
+.It Dv SIOCGIFDESCR
+Get the interface description, returned in the
+.Va buffer
+field of
+.Va ifru_buffer
+struct.
+The user supplied buffer length should be defined in the
+.Va length
+field of
+.Va ifru_buffer
+struct passed in as parameter, and the length would include
+the terminating nul character.
+If there is not enough space to hold the interface length,
+no copy would be done and an
+error would be returned.
+The kernel will store the buffer length in the
+.Va length
+field upon return, regardless whether the buffer itself is
+sufficient to hold the data.
+.It Dv SIOCSIFDESCR
+Set the interface description to the value of the
+.Va buffer
+field of
+.Va ifru_buffer
+struct, with
+.Va length
+field specifying its length (counting the terminating nul).
 .It Dv SIOCSIFFLAGS
 Set interface flags field.
 If the interface is marked down,
@@ -404,6 +433,13 @@ struct if_clonereq {
         char    *ifcr_buffer;   /* buffer for cloner names */
 };
 .Ed
+.Bd -literal
+/* Structure used in SIOCGIFDESCR and SIOCSIFDESCR requests */
+struct ifreq_buffer {
+        size_t  length;         /* length of the buffer */
+        void   *buffer;         /* pointer to userland space buffer */
+};
+.Ed
 .Sh SEE ALSO
 .Xr ioctl 2 ,
 .Xr socket 2 ,

Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/kern/kern_jail.c	Wed Jan 27 00:30:07 2010	(r203052)
@@ -3592,6 +3592,7 @@ prison_priv_check(struct ucred *cred, in
 	case PRIV_NET_SETIFMTU:
 	case PRIV_NET_SETIFFLAGS:
 	case PRIV_NET_SETIFCAP:
+	case PRIV_NET_SETIFDESCR:
 	case PRIV_NET_SETIFNAME	:
 	case PRIV_NET_SETIFMETRIC:
 	case PRIV_NET_SETIFPHYS:

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/net/if.c	Wed Jan 27 00:30:07 2010	(r203052)
@@ -106,6 +106,18 @@ SYSCTL_INT(_net_link, OID_AUTO, log_link
 	&log_link_state_change, 0,
 	"log interface link state change events");
 
+/* Interface description */
+static unsigned int ifdescr_maxlen = 1024;
+SYSCTL_UINT(_net, OID_AUTO, ifdescr_maxlen, CTLFLAG_RW,
+	&ifdescr_maxlen, 0,
+	"administrative maximum length for interface description");
+
+MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions");
+
+/* global sx for non-critical path ifdescr */
+static struct sx ifdescr_sx;
+SX_SYSINIT(ifdescr_sx, &ifdescr_sx, "ifnet descr");
+
 void	(*bstp_linkstate_p)(struct ifnet *ifp, int state);
 void	(*ng_ether_link_state_p)(struct ifnet *ifp, int state);
 void	(*lagg_linkstate_p)(struct ifnet *ifp, int state);
@@ -442,6 +454,8 @@ if_free_internal(struct ifnet *ifp)
 #ifdef MAC
 	mac_ifnet_destroy(ifp);
 #endif /* MAC */
+	if (ifp->if_description != NULL)
+		free(ifp->if_description, M_IFDESCR);
 	IF_AFDATA_DESTROY(ifp);
 	IF_ADDR_LOCK_DESTROY(ifp);
 	ifq_delete(&ifp->if_snd);
@@ -1979,6 +1993,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
 	int error = 0;
 	int new_flags, temp_flags;
 	size_t namelen, onamelen;
+	size_t descrlen;
+	char *descrbuf, *odescrbuf;
 	char new_name[IFNAMSIZ];
 	struct ifaddr *ifa;
 	struct sockaddr_dl *sdl;
@@ -2018,6 +2034,60 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
 		ifr->ifr_phys = ifp->if_physical;
 		break;
 
+	case SIOCGIFDESCR:
+		error = 0;
+		sx_slock(&ifdescr_sx);
+		if (ifp->if_description == NULL) {
+			ifr->ifr_buffer.length = 0;
+			error = ENOMSG;
+		} else {
+			/* space for terminating nul */
+			descrlen = strlen(ifp->if_description) + 1;
+			if (ifr->ifr_buffer.length < descrlen)
+				error = ENAMETOOLONG;
+			else
+				error = copyout(ifp->if_description,
+				    ifr->ifr_buffer.buffer, descrlen);
+			ifr->ifr_buffer.length = descrlen;
+		}
+		sx_sunlock(&ifdescr_sx);
+		break;
+
+	case SIOCSIFDESCR:
+		error = priv_check(td, PRIV_NET_SETIFDESCR);
+		if (error)
+			return (error);
+
+		/*
+		 * Copy only (length-1) bytes to make sure that
+		 * if_description is always nul terminated.  The
+		 * length parameter is supposed to count the
+		 * terminating nul in.
+		 */
+		if (ifr->ifr_buffer.length > ifdescr_maxlen)
+			return (ENAMETOOLONG);
+		else if (ifr->ifr_buffer.length == 0)
+			descrbuf = NULL;
+		else {
+			descrbuf = malloc(ifr->ifr_buffer.length, M_IFDESCR,
+			    M_WAITOK | M_ZERO);
+			error = copyin(ifr->ifr_buffer.buffer, descrbuf,
+			    ifr->ifr_buffer.length - 1);
+			if (error) {
+				free(descrbuf, M_IFDESCR);
+				break;
+			}
+		}
+
+		sx_xlock(&ifdescr_sx);
+		odescrbuf = ifp->if_description;
+		ifp->if_description = descrbuf;
+		sx_xunlock(&ifdescr_sx);
+
+		getmicrotime(&ifp->if_lastchange);
+		free(odescrbuf, M_IFDESCR);
+		break;
+
 	case SIOCSIFFLAGS:
 		error = priv_check(td, PRIV_NET_SETIFFLAGS);
 		if (error)

Modified: head/sys/net/if.h
==============================================================================
--- head/sys/net/if.h	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/net/if.h	Wed Jan 27 00:30:07 2010	(r203052)
@@ -284,6 +284,14 @@ struct if_announcemsghdr {
 #define	IFAN_DEPARTURE	1	/* interface departure */
 
 /*
+ * Buffer with length to be used in SIOCGIFDESCR/SIOCSIFDESCR requests
+ */
+struct ifreq_buffer {
+	size_t	length;
+	void	*buffer;
+};
+
+/*
  * Interface request structure used for socket
  * ioctl's.  All interface ioctl's must have parameter
  * definitions which begin with ifr_name.  The
@@ -295,6 +303,7 @@ struct	ifreq {
 		struct	sockaddr ifru_addr;
 		struct	sockaddr ifru_dstaddr;
 		struct	sockaddr ifru_broadaddr;
+		struct	ifreq_buffer ifru_buffer;
 		short	ifru_flags[2];
 		short	ifru_index;
 		int	ifru_jid;
@@ -308,6 +317,7 @@ struct	ifreq {
 #define	ifr_addr	ifr_ifru.ifru_addr	/* address */
 #define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
 #define	ifr_broadaddr	ifr_ifru.ifru_broadaddr	/* broadcast address */
+#define	ifr_buffer	ifr_ifru.ifru_buffer	/* user supplied buffer with its length */
 #define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags (low 16 bits) */
 #define	ifr_flagshigh	ifr_ifru.ifru_flags[1]	/* flags (high 16 bits) */
 #define	ifr_jid		ifr_ifru.ifru_jid	/* jail/vnet */

Modified: head/sys/net/if_var.h
==============================================================================
--- head/sys/net/if_var.h	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/net/if_var.h	Wed Jan 27 00:30:07 2010	(r203052)
@@ -203,7 +203,8 @@ struct ifnet {
 	 * be used with care where binary compatibility is required.
 	 */
 	char	 if_cspare[3];
-	void	*if_pspare[8];
+	char	*if_description;	/* interface description */
+	void	*if_pspare[7];
 	int	if_ispare[4];
 };
 

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/sys/param.h	Wed Jan 27 00:30:07 2010	(r203052)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 900008	/* Master, propagated to newvers */
+#define __FreeBSD_version 900009	/* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include 

Modified: head/sys/sys/priv.h
==============================================================================
--- head/sys/sys/priv.h	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/sys/priv.h	Wed Jan 27 00:30:07 2010	(r203052)
@@ -335,6 +335,7 @@
 #define	PRIV_NET_LAGG		415	/* Administer lagg interface. */
 #define	PRIV_NET_GIF		416	/* Administer gif interface. */
 #define	PRIV_NET_SETIFVNET	417	/* Move interface to vnet. */
+#define	PRIV_NET_SETIFDESCR	418	/* Set interface description. */
 
 /*
  * 802.11-related privileges.

Modified: head/sys/sys/sockio.h
==============================================================================
--- head/sys/sys/sockio.h	Tue Jan 26 23:04:13 2010	(r203051)
+++ head/sys/sys/sockio.h	Wed Jan 27 00:30:07 2010	(r203052)
@@ -82,6 +82,8 @@
 #define	SIOCGIFMAC	_IOWR('i', 38, struct ifreq)	/* get IF MAC label */
 #define	SIOCSIFMAC	 _IOW('i', 39, struct ifreq)	/* set IF MAC label */
 #define	SIOCSIFNAME	 _IOW('i', 40, struct ifreq)	/* set IF name */
+#define	SIOCSIFDESCR	 _IOW('i', 41, struct ifreq)	/* set ifnet descr */ 
+#define	SIOCGIFDESCR	_IOWR('i', 42, struct ifreq)	/* get ifnet descr */ 
 
 #define	SIOCADDMULTI	 _IOW('i', 49, struct ifreq)	/* add m'cast addr */
 #define	SIOCDELMULTI	 _IOW('i', 50, struct ifreq)	/* del m'cast addr */

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 00:34:52 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 738681065676;
	Wed, 27 Jan 2010 00:34:52 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 62A9A8FC0A;
	Wed, 27 Jan 2010 00:34:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R0Yqci050262;
	Wed, 27 Jan 2010 00:34:52 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R0Yq3P050259;
	Wed, 27 Jan 2010 00:34:52 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201001270034.o0R0Yq3P050259@svn.freebsd.org>
From: Xin LI 
Date: Wed, 27 Jan 2010 00:34:52 +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: r203053 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 00:34:52 -0000

Author: delphij
Date: Wed Jan 27 00:34:52 2010
New Revision: 203053
URL: http://svn.freebsd.org/changeset/base/203053

Log:
  Add a manual page for nvram(4).
  
  MFC after:	2 weeks

Added:
  head/share/man/man4/nvram.4   (contents, props changed)
Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Wed Jan 27 00:30:07 2010	(r203052)
+++ head/share/man/man4/Makefile	Wed Jan 27 00:34:52 2010	(r203053)
@@ -293,6 +293,7 @@ MAN=	aac.4 \
 	nsp.4 \
 	null.4 \
 	${_nve.4} \
+	${_nvram.4} \
 	${_nxge.4} \
 	ohci.4 \
 	orm.4 \
@@ -645,6 +646,7 @@ _ndis.4=	ndis.4
 _nfe.4=		nfe.4
 _nfsmb.4=	nfsmb.4
 _nve.4=		nve.4
+_nvram.4=	nvram.4
 _nxge.4=	nxge.4
 _rr232x.4=	rr232x.4
 _speaker.4=	speaker.4

Added: head/share/man/man4/nvram.4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man4/nvram.4	Wed Jan 27 00:34:52 2010	(r203053)
@@ -0,0 +1,93 @@
+.\"
+.\"Copyright (c) 2010 iXsystems, Inc.
+.\"All rights reserved.
+.\" written by: Xin LI 
+.\"
+.\"Redistribution and use in source and binary forms, with or without
+.\"modification, are permitted provided that the following conditions
+.\"are met:
+.\"1. Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\"2. Redistributions in binary form must reproduce the above copyright
+.\"   notice, this list of conditions and the following disclaimer in the
+.\"   documentation and/or other materials provided with the distribution.
+.\"
+.\"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\"ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\"SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 27, 2010
+.Dt NVRAM 4 i386
+.Os
+.Sh NAME
+.Nm nvram
+.Nd "non-volatile RAM"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvram"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvram_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to BIOS configuration NVRAM on i386 and amd64
+systems.
+.Pp
+PC motherboard uses a small non-volatile memory to store BIOS settings
+which is usually part of its clock chip and sometimes referred as
+.Dq CMOS SRAM .
+This driver exposes bytes 14 through 128 of the NVRAM, or a total of
+114 bytes, at offset zero of the device file
+.Pa /dev/nvram .
+.Pp
+This driver is useful for cloning machines that shares the same hardware
+configuration and need same BIOS setting tweaks.
+.Sh IMPLEMENTATION NOTES
+The BIOS NVRAM's bytes 16 through 31 are checksummed at byte 32.
+This driver
+.Em does not
+take care for these checksums.
+.Sh EXAMPLES
+Backup existing BIOS NVRAM to
+.Pa nvram.bin :
+.Pp
+.Dl dd if=/dev/nvram of=nvram.bin
+.Pp
+Restore BIOS NVRAM from
+.Pa nvram.bin :
+.Pp
+.Dl dd if=nvram.bin of=/dev/nvram
+.Sh SEE ALSO
+.Xr dd 1
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.4 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Peter Wemm .
+This manual page was written by
+.An Xin LI .

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 02:32:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79720106566B;
	Wed, 27 Jan 2010 02:32:07 +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 699368FC08;
	Wed, 27 Jan 2010 02:32:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R2W7c7076117;
	Wed, 27 Jan 2010 02:32:07 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R2W7Rl076115;
	Wed, 27 Jan 2010 02:32:07 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201001270232.o0R2W7Rl076115@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Wed, 27 Jan 2010 02:32:07 +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: r203054 - head/sys/ia64/ia64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 02:32:08 -0000

Author: marcel
Date: Wed Jan 27 02:32:07 2010
New Revision: 203054
URL: http://svn.freebsd.org/changeset/base/203054

Log:
  In cpu_switch(), use an atomic operation to set the td_lock
  of the old thread to the mutex that's passed.
  
  Pointed out by: attilio, jhb

Modified:
  head/sys/ia64/ia64/machdep.c

Modified: head/sys/ia64/ia64/machdep.c
==============================================================================
--- head/sys/ia64/ia64/machdep.c	Wed Jan 27 00:34:52 2010	(r203053)
+++ head/sys/ia64/ia64/machdep.c	Wed Jan 27 02:32:07 2010	(r203054)
@@ -442,7 +442,7 @@ cpu_switch(struct thread *old, struct th
 	if (PCPU_GET(fpcurthread) == old)
 		old->td_frame->tf_special.psr |= IA64_PSR_DFH;
 	if (!savectx(oldpcb)) {
-		old->td_lock = mtx;
+		atomic_store_rel_ptr(&old->td_lock, mtx);
 #if defined(SCHED_ULE) && defined(SMP)
 		/* td_lock is volatile */
 		while (new->td_lock == &blocked_lock)

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 02:38:11 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0FCB7106566C;
	Wed, 27 Jan 2010 02:38:11 +0000 (UTC)
	(envelope-from rodrigc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E95568FC16;
	Wed, 27 Jan 2010 02:38:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R2cApd077485;
	Wed, 27 Jan 2010 02:38:10 GMT (envelope-from rodrigc@svn.freebsd.org)
Received: (from rodrigc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R2cAEg077483;
	Wed, 27 Jan 2010 02:38:10 GMT (envelope-from rodrigc@svn.freebsd.org)
Message-Id: <201001270238.o0R2cAEg077483@svn.freebsd.org>
From: Craig Rodrigues 
Date: Wed, 27 Jan 2010 02:38:10 +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: r203055 - head/usr.bin/make
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 02:38:11 -0000

Author: rodrigc
Date: Wed Jan 27 02:38:10 2010
New Revision: 203055
URL: http://svn.freebsd.org/changeset/base/203055

Log:
  Partial merge of man page cleanups from NetBSD:
  
    revision 1.91
    Fri Nov 7 01:01:46 2003 UTC by lukem
  
    Add some subsections in the VARIABLE ASSIGNMENTS section.
  
    In the "modifier description" list, show each modifier with the leading `:'.
    Rationale: it's hard to search for modifiers without it, and we already do
    the same thing in the -options and .makecommands lists.  I now find it much
    easier to find the description for a modifier in the man page.
  
  Obtained from: NetBSD

Modified:
  head/usr.bin/make/make.1

Modified: head/usr.bin/make/make.1
==============================================================================
--- head/usr.bin/make/make.1	Wed Jan 27 02:32:07 2010	(r203054)
+++ head/usr.bin/make/make.1	Wed Jan 27 02:38:10 2010	(r203055)
@@ -852,7 +852,7 @@ These directories will be searched for s
 .Nm
 after it has finished parsing all input makefiles.
 .El
-.Pp
+.Ss Variable modifiers
 Variable expansion may be modified to select or modify each word of the
 variable (where a
 .Dq word
@@ -867,7 +867,7 @@ The colon may be escaped with a backslas
 .Pq Ql \e .
 .Bl -tag -width Cm
 .Sm off
-.It Cm C No / Ar pattern Xo
+.It Cm \&:C No / Ar pattern Xo
 .No / Ar replacement
 .No / Op Cm 1g
 .Xc
@@ -896,13 +896,13 @@ and
 are orthogonal; the former specifies whether multiple words are
 potentially affected, the latter whether multiple substitutions can
 potentially occur within each affected word.
-.It Cm E
+.It Cm \&:E
 Replaces each word in the variable with its suffix.
-.It Cm H
+.It Cm \&:H
 Replaces each word in the variable with everything but the last component.
-.It Cm L
+.It Cm \&:L
 Converts variable to lower-case letters.
-.It Cm M Ns Ar pattern
+.It Cm \&:M Ns Ar pattern
 Select only those words that match the rest of the modifier.
 The standard shell wildcard characters
 .Pf ( Ql * ,
@@ -913,21 +913,21 @@ may
 be used.
 The wildcard characters may be escaped with a backslash
 .Pq Ql \e .
-.It Cm N Ns Ar pattern
+.It Cm \&:N Ns Ar pattern
 This is identical to
-.Cm M ,
+.Cm \&:M ,
 but selects all words which do not match
 the rest of the modifier.
-.It Cm O
+.It Cm \&:O
 Order every word in the variable alphabetically.
-.It Cm Q
+.It Cm \&:Q
 Quotes every shell meta-character in the variable, so that it can be passed
 safely through recursive invocations of
 .Nm .
-.It Cm R
+.It Cm \&:R
 Replaces each word in the variable with everything but its suffix.
 .Sm off
-.It Cm S No / Ar old_string Xo
+.It Cm \&:S No / Ar old_string Xo
 .No / Ar new_string
 .No / Op Cm g
 .Xc
@@ -971,7 +971,7 @@ with the single exception that a backsla
 of a dollar sign
 .Pq Ql $ ,
 not a preceding dollar sign as is usual.
-.It Ar old_string=new_string
+.It Ar :old_string=new_string
 This is the
 .At V
 style variable substitution.
@@ -991,11 +991,11 @@ is the substring of
 .Ar old_string
 to be replaced in
 .Ar new_string
-.It Cm T
+.It Cm \&:T
 Replaces each word in the variable with its last component.
-.It Cm U
+.It Cm \&:U
 Converts variable to upper-case letters.
-.It Cm u
+.It Cm \&:u
 Remove adjacent duplicate words (like
 .Xr uniq 1 ) .
 .El

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 06:28:16 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4DF6106566B;
	Wed, 27 Jan 2010 06:28:16 +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 B2E358FC12;
	Wed, 27 Jan 2010 06:28:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R6SGjc028325;
	Wed, 27 Jan 2010 06:28:16 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R6SGxG028323;
	Wed, 27 Jan 2010 06:28:16 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001270628.o0R6SGxG028323@svn.freebsd.org>
From: Alexander Motin 
Date: Wed, 27 Jan 2010 06:28:16 +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: r203058 - head/sys/dev/ata/chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 06:28:16 -0000

Author: mav
Date: Wed Jan 27 06:28:16 2010
New Revision: 203058
URL: http://svn.freebsd.org/changeset/base/203058

Log:
  Add one more type cast, missed in r203043.

Modified:
  head/sys/dev/ata/chipsets/ata-promise.c

Modified: head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-promise.c	Wed Jan 27 02:58:03 2010	(r203057)
+++ head/sys/dev/ata/chipsets/ata-promise.c	Wed Jan 27 06:28:16 2010	(r203058)
@@ -628,7 +628,7 @@ ata_promise_mio_status(device_t dev)
     }
 
     /* read and acknowledge interrupt */
-    vector = (uint32_t)ctlr->chipset_data;
+    vector = (uint32_t)(uintptr_t)ctlr->chipset_data;
 
     /* read and clear interface status */
     status = ATA_INL(ctlr->r_res2, stat_reg);

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 07:37:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B2813106568D;
	Wed, 27 Jan 2010 07:37:39 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F8848FC15;
	Wed, 27 Jan 2010 07:37:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R7bdGC043488;
	Wed, 27 Jan 2010 07:37:39 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R7bdhM043486;
	Wed, 27 Jan 2010 07:37:39 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201001270737.o0R7bdhM043486@svn.freebsd.org>
From: Juli Mallett 
Date: Wed, 27 Jan 2010 07:37: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: r203059 - head/usr.sbin/makefs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 07:37:40 -0000

Author: jmallett
Date: Wed Jan 27 07:37:39 2010
New Revision: 203059
URL: http://svn.freebsd.org/changeset/base/203059

Log:
  Correct copy-paste typo from previous option description.

Modified:
  head/usr.sbin/makefs/makefs.8

Modified: head/usr.sbin/makefs/makefs.8
==============================================================================
--- head/usr.sbin/makefs/makefs.8	Wed Jan 27 06:28:16 2010	(r203058)
+++ head/usr.sbin/makefs/makefs.8	Wed Jan 27 07:37:39 2010	(r203059)
@@ -159,7 +159,7 @@ free files (inodes) exist in the image.
 An optional
 .Ql %
 suffix may be provided to indicate that
-.Ar free-blocks
+.Ar free-files
 indicates a percentage of the calculated image size
 .It Fl F Ar specfile
 Use

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 08:26:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 68BB21065672;
	Wed, 27 Jan 2010 08:26:17 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de
	[217.11.53.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 03AFA8FC08;
	Wed, 27 Jan 2010 08:26:16 +0000 (UTC)
Received: from outgoing.leidinger.net (pD9E2FFF7.dip.t-dialin.net
	[217.226.255.247])
	by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 428E884452C;
	Wed, 27 Jan 2010 09:26:11 +0100 (CET)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id A64761067DB;
	Wed, 27 Jan 2010 09:26:07 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1264580767;
	bh=o72YkU78LjxmdhfLeTcRih/fVlrtRn1L7Yvua5Zo3bI=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=bnEYqR3tOOGyh5ix9YpIpLZ1TO+R/t0z00Ru0Q3tF1o3+cEPIXDoseANPzNZKf36R
	5dzxvaXF6BUxoeY3sQk+1JM9WOPx+6upBzgUc/Np4dkEFEg3Nhdf2umH2Ez3Jw+ywY
	iE3evXX/7xLfEBGiX0BJdqbCPQcmJ8KoF5U+cpQ6cqJxXx1JkpTrn67TZJc5ZNvBw+
	xxjDdez8jPxljCArXwDJPjVHoqq1k0Rd9cqcPYwJSVj7kIByDKsE5wQQqEb5qJeuJY
	Ls8ZEkbrneIdbEgh70gdON90O2RnWpzwaZAwTGx58UfOATaZDLgKVqx4/8qNgI1/o1
	9x1q8w4aWl4FA==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0R8Q6jp081114;
	Wed, 27 Jan 2010 09:26:06 +0100 (CET)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Wed, 27 Jan 2010
	09:26:06 +0100
Message-ID: <20100127092606.19093xuevmlx4xpc@webmail.leidinger.net>
Date: Wed, 27 Jan 2010 09:26:06 +0100
From: Alexander Leidinger 
To: John Baldwin 
References: <201001231842.o0NIgSa5086957@svn.freebsd.org>
	<20100126141525.10365e5dzlk7jc4k@webmail.leidinger.net>
	<9bbcef731001260905u36436624rfcf466765eee1f6a@mail.gmail.com>
	<201001261507.21399.jhb@freebsd.org>
In-Reply-To: <201001261507.21399.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4)
X-EBL-MailScanner-Information: Please contact the ISP for more information
X-EBL-MailScanner-ID: 428E884452C.E8C18
X-EBL-MailScanner: Found to be clean
X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN,
	SpamAssassin (not cached, score=-1.286, required 6,
	autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00,
	DKIM_VERIFIED -0.00, TW_SV 0.08, TW_ZF 0.08)
X-EBL-MailScanner-From: alexander@leidinger.net
X-EBL-MailScanner-Watermark: 1265185572.29599@ddIHPEbw9GiXkEDxTRwfWA
X-EBL-Spam-Status: No
Cc: Alan Cox , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Ivan Voras 
Subject: Re: svn commit: r202894 - in head/sys/i386: i386 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 08:26:17 -0000

Quoting John Baldwin  (from Tue, 26 Jan 2010 15:07:21 -0500):

> On Tuesday 26 January 2010 12:05:29 pm Ivan Voras wrote:
>> 2010/1/26 Alexander Leidinger :
>> >
>> > Quoting John Baldwin  (from Mon, 25 Jan 2010 07:57:49
>> > -0500):
>> >
>> >> On Saturday 23 January 2010 1:42:28 pm Alan Cox wrote:
>> >>>
>> >>> Author: alc
>> >>> Date: Sat Jan 23 18:42:28 2010
>> >>> New Revision: 202894
>> >>> URL: http://svn.freebsd.org/changeset/base/202894
>> >>>
>> >>> Log:
>> >>>  Handle a race between pmap_kextract() and pmap_promote_pde().   
>> This race
>> >>> is
>> >>>  known to cause a kernel crash in ZFS on i386 when superpage  
>> promotion is
>> >>>  enabled.
>> >>>
>> >>>  Tested by:    netchild
>> >>>  MFC after:    1 week
>> >>
>> >> Yay!  Should we enable pg_ps by default on i386 now?
>> >
>> > Data point, the i386 system where I have superpages enabled is a p4 with
>> > currently 11 jails active. Some webservers, squid, samba, bind,  
>> postfix and
>> > a lot of portupgrades (during the last days, I'm updating a jail with a
>> > desktop-setup inside). All jails are on ZFS.
>>
>> Do you have any method of comparing performance before-and-after?
>> There was a thread on some of the mailing lists (stable@/current@?)
>> about squid being the pessimal case for superpages.
>
> The thread did not say that superpages made squid slower, rather that due to
> the way it forked to execute the log rotation binaries, some superpages were
> demoted back to regular pages losing the gain of superpages for those pages.

Additionally:
  - this is my server at home (limited amount of users accessing it)
  - I changed too much at once which may affect the performance
    (superpages, ATA_CAM, zfs-kernel-settings)

Apart from that: I have no performance numbers for this machine.

Bye,
Alexander.

-- 
Fresco's Discovery:
	If you knew what you were doing you'd probably be bored.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 09:28:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E85F91065672;
	Wed, 27 Jan 2010 09:28:43 +0000 (UTC) (envelope-from avg@freebsd.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
	by mx1.freebsd.org (Postfix) with ESMTP id 883A78FC1B;
	Wed, 27 Jan 2010 09:28:42 +0000 (UTC)
Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua
	[212.40.38.100])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA22768;
	Wed, 27 Jan 2010 11:28:40 +0200 (EET) (envelope-from avg@freebsd.org)
Received: from localhost.topspin.kiev.ua ([127.0.0.1])
	by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
	id 1Na4CW-000N28-GZ; Wed, 27 Jan 2010 11:28:40 +0200
Message-ID: <4B600747.4060109@freebsd.org>
Date: Wed, 27 Jan 2010 11:28:39 +0200
From: Andriy Gapon 
User-Agent: Thunderbird 2.0.0.23 (X11/20091128)
MIME-Version: 1.0
To: Jack F Vogel 
References: <201001262232.o0QMWMIk022933@svn.freebsd.org>
In-Reply-To: <201001262232.o0QMWMIk022933@svn.freebsd.org>
X-Enigmail-Version: 0.96.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r203049 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 09:28:44 -0000

on 27/01/2010 00:32 Jack F Vogel said the following:
> Author: jfv
> Date: Tue Jan 26 22:32:22 2010
> New Revision: 203049
> URL: http://svn.freebsd.org/changeset/base/203049
> 
> Log:
>   Update the 1G drivers, shared code sync with Intel,
>   igb now has a queue notion that has a single interrupt
>   with an RX/TX pair, this will reduce the total interrupts
>   seen on a system. Both em and igb have a new watchdog
>   method. igb has fixes from Pyun Yong-Hyeon that have
>   improved stability, thank you :)
>   
>   I wish to MFC this for 7.3 asap, please test if able.

Looks like this commit has broken the build.
I can not build GENERIC and the tinderbox complains too.

-- 
Andriy Gapon

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 09:34:08 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id B520A1065670; Wed, 27 Jan 2010 09:34:08 +0000 (UTC)
Date: Wed, 27 Jan 2010 09:34:08 +0000
From: Alexey Dokuchaev 
To: Jung-uk Kim 
Message-ID: <20100127093408.GA16869@FreeBSD.org>
References: <200911032022.nA3KM96H003434@svn.freebsd.org>
	<86aaw0kjko.fsf@ds4.des.no> <20100126153027.GA65470@FreeBSD.org>
	<201001261417.06116.jkim@FreeBSD.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <201001261417.06116.jkim@FreeBSD.org>
User-Agent: Mutt/1.4.2.1i
Cc: svn-src-head@FreeBSD.org, Dag-Erling Sm??rgrav ,
	svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject: Re: svn commit: r198858 - in head/sys: dev/fb dev/syscons sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 09:34:08 -0000

On Tue, Jan 26, 2010 at 02:16:49PM -0500, Jung-uk Kim wrote:
> On Tuesday 26 January 2010 10:30 am, Alexey Dokuchaev wrote:
> > I understand; I was thinking if maybe there are some "hackish" or
> > indirect way to tell that BIOS is lying.
> 
> Probably you mean something like the attached patch?   Basically, with 
> this patch, we ignore the VGA compatibility flag if the DAC mode is 
> higher than 6-bit.  Let me know if it works for you.

Yup, this patch also works.  It is kinda funny to observe the big creepy
ASCII-artish beastie floating around darker screen (looks like shifted
palette thing again) after *unloading* vesa.ko and then invoking logo
screensaver.  :-)

./danfe

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 09:45:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D09E106566B;
	Wed, 27 Jan 2010 09:45:08 +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 29ABB8FC2B;
	Wed, 27 Jan 2010 09:45:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R9j84W071594;
	Wed, 27 Jan 2010 09:45:08 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R9j8P7071592;
	Wed, 27 Jan 2010 09:45:08 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201001270945.o0R9j8P7071592@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Jan 2010 09:45:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203060 - stable/8/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 09:45:08 -0000

Author: bz
Date: Wed Jan 27 09:45:07 2010
New Revision: 203060
URL: http://svn.freebsd.org/changeset/base/203060

Log:
  MFC r202915:
    Correct a typo.
  
    Submitted by: kensmith

Modified:
  stable/8/sys/netinet6/in6_pcb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet6/in6_pcb.c
==============================================================================
--- stable/8/sys/netinet6/in6_pcb.c	Wed Jan 27 07:37:39 2010	(r203059)
+++ stable/8/sys/netinet6/in6_pcb.c	Wed Jan 27 09:45:07 2010	(r203060)
@@ -332,7 +332,7 @@ in6_pcbladdr(register struct inpcb *inp,
 	 * Do not update this earlier, in case we return with an error.
 	 *
 	 * XXX: this in6_selectsrc result might replace the bound local
-	 * aaddress with the address specified by setsockopt(IPV6_PKTINFO).
+	 * address with the address specified by setsockopt(IPV6_PKTINFO).
 	 * Is it the intended behavior?
 	 */
 	*plocal_addr6 = in6a;

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 09:59:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7DB231065670;
	Wed, 27 Jan 2010 09:59:08 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6B1728FC15;
	Wed, 27 Jan 2010 09:59:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0R9x8Sj074720;
	Wed, 27 Jan 2010 09:59:08 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0R9x8YB074696;
	Wed, 27 Jan 2010 09:59:08 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201001270959.o0R9x8YB074696@svn.freebsd.org>
From: Andriy Gapon 
Date: Wed, 27 Jan 2010 09:59: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: r203061 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 09:59:08 -0000

Author: avg
Date: Wed Jan 27 09:59:08 2010
New Revision: 203061
URL: http://svn.freebsd.org/changeset/base/203061

Log:
  KASSERT that return value of interrupt filter complies with contract
  
  For example a return value of zero could lead to a stuck level-triggered
  interrupt line.
  
  Reviewed by:	jhb (for INTR_FILTER case)
  MFC after:	3 weeks

Modified:
  head/sys/kern/kern_intr.c

Modified: head/sys/kern/kern_intr.c
==============================================================================
--- head/sys/kern/kern_intr.c	Wed Jan 27 09:45:07 2010	(r203060)
+++ head/sys/kern/kern_intr.c	Wed Jan 27 09:59:08 2010	(r203061)
@@ -1378,6 +1378,12 @@ intr_event_handle(struct intr_event *ie,
 			ret = ih->ih_filter(frame);
 		else
 			ret = ih->ih_filter(ih->ih_argument);
+		KASSERT(ret == FILTER_STRAY ||
+		    ((ret & (FILTER_SCHEDULE_THREAD | FILTER_HANDLED)) != 0 &&
+		    (ret & ~(FILTER_SCHEDULE_THREAD | FILTER_HANDLED)) == 0),
+		    ("%s: incorrect return value %#x from %s", __func__, ret,
+		    ih->ih_name));
+
 		/* 
 		 * Wrapper handler special handling:
 		 *
@@ -1546,7 +1552,11 @@ intr_filter_loop(struct intr_event *ie, 
 			thread_only = 1;
 			continue;
 		}
-
+		KASSERT(ret == FILTER_STRAY ||
+		    ((ret & (FILTER_SCHEDULE_THREAD | FILTER_HANDLED)) != 0 &&
+		    (ret & ~(FILTER_SCHEDULE_THREAD | FILTER_HANDLED)) == 0),
+		    ("%s: incorrect return value %#x from %s", __func__, ret,
+		    ih->ih_name));
 		if (ret & FILTER_STRAY)
 			continue;
 		else { 

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 10:17:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DBF141065693;
	Wed, 27 Jan 2010 10:17:28 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B02058FC0A;
	Wed, 27 Jan 2010 10:17:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RAHS7Z078874;
	Wed, 27 Jan 2010 10:17:28 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RAHSPU078872;
	Wed, 27 Jan 2010 10:17:28 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201001271017.o0RAHSPU078872@svn.freebsd.org>
From: Andriy Gapon 
Date: Wed, 27 Jan 2010 10:17: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: r203062 - head/sys/dev/acpica
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 10:17:29 -0000

Author: avg
Date: Wed Jan 27 10:17:28 2010
New Revision: 203062
URL: http://svn.freebsd.org/changeset/base/203062

Log:
  acpi_hpet: correctly get number of timers/comparators in a timer block
  
  Also, account for a quirk of AMD/ATI HPET which reports number of timers
  instead of id of the last timer as manadated by the specification.
  Currently this has no effect on functionality but in the future we may
  make actual use of the HPET timers, not only of its timecounter.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/acpica/acpi_hpet.c

Modified: head/sys/dev/acpica/acpi_hpet.c
==============================================================================
--- head/sys/dev/acpica/acpi_hpet.c	Wed Jan 27 09:59:08 2010	(r203061)
+++ head/sys/dev/acpica/acpi_hpet.c	Wed Jan 27 10:17:28 2010	(r203062)
@@ -42,6 +42,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#define HPET_VENDID_AMD		0x4353
+#define HPET_VENDID_INTEL	0x8086
+
 ACPI_SERIAL_DECL(hpet, "ACPI HPET support");
 
 static devclass_t acpi_hpet_devclass;
@@ -155,9 +158,10 @@ static int
 acpi_hpet_attach(device_t dev)
 {
 	struct acpi_hpet_softc *sc;
-	int rid;
+	int rid, num_timers;
 	uint32_t val, val2;
 	uintmax_t freq;
+	uint16_t vendor;
 
 	ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
 
@@ -194,10 +198,21 @@ acpi_hpet_attach(device_t dev)
 	freq = (1000000000000000LL + val / 2) / val;
 	if (bootverbose) {
 		val = bus_read_4(sc->mem_res, HPET_CAPABILITIES);
+
+		/*
+		 * ATI/AMD violates IA-PC HPET (High Precision Event Timers)
+		 * Specification and provides an off by one number
+		 * of timers/comparators.
+		 * Additionally, they use unregistered value in VENDOR_ID field.
+		 */
+		num_timers = 1 + ((val & HPET_CAP_NUM_TIM) >> 8);
+		vendor = val >> 16;
+		if (vendor == HPET_VENDID_AMD && num_timers > 0)
+			num_timers--;
 		device_printf(dev,
 		    "vend: 0x%x rev: 0x%x num: %d hz: %jd opts:%s%s\n",
-		    val >> 16, val & HPET_CAP_REV_ID,
-		    (val & HPET_CAP_NUM_TIM) >> 8, freq,
+		    vendor, val & HPET_CAP_REV_ID,
+		    num_timers, freq,
 		    (val & HPET_CAP_LEG_RT) ? " legacy_route" : "",
 		    (val & HPET_CAP_COUNT_SIZE) ? " 64-bit" : "");
 	}

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 10:20:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE9C4106568D;
	Wed, 27 Jan 2010 10:20:10 +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 CB7288FC1A;
	Wed, 27 Jan 2010 10:20:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RAKAqX079521;
	Wed, 27 Jan 2010 10:20:10 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RAKAFK079519;
	Wed, 27 Jan 2010 10:20:10 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201001271020.o0RAKAFK079519@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Jan 2010 10:20:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203063 - stable/7/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 10:20:11 -0000

Author: bz
Date: Wed Jan 27 10:20:10 2010
New Revision: 203063
URL: http://svn.freebsd.org/changeset/base/203063

Log:
  MFC r202915:
    Correct a typo.
  
    Submitted by: kensmith
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/netinet6/in6_pcb.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netinet6/in6_pcb.c
==============================================================================
--- stable/7/sys/netinet6/in6_pcb.c	Wed Jan 27 10:17:28 2010	(r203062)
+++ stable/7/sys/netinet6/in6_pcb.c	Wed Jan 27 10:20:10 2010	(r203063)
@@ -326,7 +326,7 @@ in6_pcbladdr(register struct inpcb *inp,
 	 * Do not update this earlier, in case we return with an error.
 	 *
 	 * XXX: this in6_selectsrc result might replace the bound local
-	 * aaddress with the address specified by setsockopt(IPV6_PKTINFO).
+	 * address with the address specified by setsockopt(IPV6_PKTINFO).
 	 * Is it the intended behavior?
 	 */
 	*plocal_addr6 = in6a;

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 10:32:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73EBE1065693;
	Wed, 27 Jan 2010 10:32:02 +0000 (UTC)
	(envelope-from joerg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F5738FC19;
	Wed, 27 Jan 2010 10:32:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RAW2Pd082225;
	Wed, 27 Jan 2010 10:32:02 GMT (envelope-from joerg@svn.freebsd.org)
Received: (from joerg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RAW2nj082220;
	Wed, 27 Jan 2010 10:32:02 GMT (envelope-from joerg@svn.freebsd.org)
Message-Id: <201001271032.o0RAW2nj082220@svn.freebsd.org>
From: Joerg Wunsch 
Date: Wed, 27 Jan 2010 10:32:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203064 - stable/8/sys/dev/ieee488
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 10:32:02 -0000

Author: joerg
Date: Wed Jan 27 10:32:02 2010
New Revision: 203064
URL: http://svn.freebsd.org/changeset/base/203064

Log:
  Merge of r202870,202898:
  
  Overhaul of the pcii driver:
  
  . Properly allocate all IO space resources.  These cards scatter their
    IO addresses over a range of 0x1600 bytes, and they require an
    additional address for "special interrupt handling".
  
  . Implement the "special interrupt handling" per the GPIB-PCIIA
    Technical Reference Manual; this was apparently not declared for the
    clone card this driver has been originally implemented for, but it
    turned out to be needed for both, an original NI brand PCII/PCIIA
    card as well as the Axiom AX5488 clone.
  
  . Add some diagnostic messages for various resource allocation etc.
    failures during probe.
  
  . Add some comments about the structure of the IO address space that
    is used by these cards.

Modified:
  stable/8/sys/dev/ieee488/pcii.c
  stable/8/sys/dev/ieee488/tnt4882.c
  stable/8/sys/dev/ieee488/upd7210.c
  stable/8/sys/dev/ieee488/upd7210.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ieee488/pcii.c
==============================================================================
--- stable/8/sys/dev/ieee488/pcii.c	Wed Jan 27 10:20:10 2010	(r203063)
+++ stable/8/sys/dev/ieee488/pcii.c	Wed Jan 27 10:32:02 2010	(r203064)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2005 Poul-Henning Kamp 
+ * Copyright (c) 2010 Joerg Wunsch 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,6 +34,8 @@
  *
  *    Tested and known working:
  *	"B&C Microsystems PC488A-0"
+ *	"National Instruments GPIB-PCII/PCIIA" (in PCIIa mode)
+ *	"Axiom AX5488"
  *
  */
 
@@ -56,7 +59,7 @@ __FBSDID("$FreeBSD$");
 
 struct pcii_softc {
 	int foo;
-	struct resource	*res[3];
+	struct resource	*res[11];
 	void *intr_handler;
 	struct upd7210	upd7210;
 };
@@ -79,6 +82,14 @@ static struct resource_spec pcii_res_spe
 	{ SYS_RES_IRQ,		0, RF_ACTIVE | RF_SHAREABLE},
 	{ SYS_RES_DRQ,		0, RF_ACTIVE | RF_SHAREABLE | RF_OPTIONAL},
 	{ SYS_RES_IOPORT,	0, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	1, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	2, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	3, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	4, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	5, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	6, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	7, RF_ACTIVE},
+	{ SYS_RES_IOPORT,	8, RF_ACTIVE | RF_SHAREABLE},
 	{ -1, 0, 0 }
 };
 
@@ -92,7 +103,7 @@ static int
 pcii_probe(device_t dev)
 {
 	int rid, i, j;
-	u_long start, count;
+	u_long start, count, addr;
 	int error = 0;
 	struct pcii_softc *sc;
 
@@ -102,30 +113,90 @@ pcii_probe(device_t dev)
 	rid = 0;
 	if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0)
 		return ENXIO;
-	if ((start & 0x3ff) != 0x2e1)
+	/*
+	 * The PCIIA decodes a fixed pattern of 0x2e1 for the lower 10
+	 * address bits A0 ... A9.  Bits A10 through A12 are used by
+	 * the µPD7210 register select lines.  This makes the
+	 * individual 7210 register being 0x400 bytes apart in the ISA
+	 * bus address space.  Address bits A13 and A14 are compared
+	 * to a DIP switch setting on the card, allowing for up to 4
+	 * different cards being installed (at base addresses 0x2e1,
+	 * 0x22e1, 0x42e1, and 0x62e1, respectively).  A15 has been
+	 * used to select an optional on-board time-of-day clock chip
+	 * (MM58167A) on the original PCIIA rather than the µPD7210
+	 * (which is not implemented on later boards).  The
+	 * documentation states the respective addresses for that chip
+	 * should be handled as reserved addresses, which we don't do
+	 * (right now).  Finally, the IO addresses 0x2f0 ... 0x2f7 for
+	 * a "special interrupt handling feature" (re-enable
+	 * interrupts so the IRQ can be shared).
+	 *
+	 * Usually, the user will only set the base address in the
+	 * device hints, so we handle the rest here.
+	 *
+	 * (Source: GPIB-PCIIA Technical Reference Manual, September
+	 * 1989 Edition, National Instruments.)
+	 */
+	if ((start & 0x3ff) != 0x2e1) {
+		if (bootverbose)
+			printf("pcii_probe: PCIIA base address 0x%lx not "
+			       "0x2e1/0x22e1/0x42e1/0x62e1\n",
+			       start);
 		return (ENXIO);
-	count = 1;
-	if (bus_set_resource(dev, SYS_RES_IOPORT, rid, start, count) != 0)
+	}
+
+	for (rid = 0, addr = start; rid < 8; rid++, addr += 0x400) {
+		if (bus_set_resource(dev, SYS_RES_IOPORT, rid, addr, 1) != 0) {
+			printf("pcii_probe: could not set IO port 0x%lx\n",
+			       addr);
+			return (ENXIO);
+		}
+	}
+	if (bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &count) != 0) {
+		printf("pcii_probe: cannot obtain IRQ level\n");
+		return ENXIO;
+	}
+	if (start > 7) {
+		printf("pcii_probe: IRQ level %lu too high\n", start);
 		return ENXIO;
+	}
+
+	if (bus_set_resource(dev, SYS_RES_IOPORT, 8, 0x2f0 + start, 1) != 0) {
+		printf("pcii_probe: could not set IO port 0x%3lx\n",
+		       0x2f0 + start);
+		return (ENXIO);
+	}
+
 	error = bus_alloc_resources(dev, pcii_res_spec, sc->res);
-	if (error)
+	if (error) {
+		printf("pcii_probe: Could not allocate resources\n");
 		return (error);
+	}
 	error = ENXIO;
+	/*
+	 * Perform some basic tests on the µPD7210 registers.  At
+	 * least *some* register must read different from 0x00 or
+	 * 0xff.
+	 */
 	for (i = 0; i < 8; i++) {
-		j = bus_read_1(sc->res[2], i * 0x400);
+		j = bus_read_1(sc->res[2 + i], 0);
 		if (j != 0x00 && j != 0xff)
 			error = 0;
 	}
+	/* SPSR/SPMR read/write test */
 	if (!error) {
-		bus_write_1(sc->res[2], 3 * 0x400, 0x55);
-		if (bus_read_1(sc->res[2], 3 * 0x400) != 0x55)
+		bus_write_1(sc->res[2 + 3], 0, 0x55);
+		if (bus_read_1(sc->res[2 + 3], 0) != 0x55)
 			error = ENXIO;
 	}
 	if (!error) {
-		bus_write_1(sc->res[2], 3 * 0x400, 0xaa);
-		if (bus_read_1(sc->res[2], 3 * 0x400) != 0xaa)
+		bus_write_1(sc->res[2 + 3], 0, 0xaa);
+		if (bus_read_1(sc->res[2 + 3], 0) != 0xaa)
 			error = ENXIO;
 	}
+	if (error)
+		printf("pcii_probe: probe failure\n");
+
 	bus_release_resources(dev, pcii_res_spec, sc->res);
 	return (error);
 }
@@ -134,6 +205,7 @@ static int
 pcii_attach(device_t dev)
 {
 	struct pcii_softc *sc;
+	u_long		start, count;
 	int		unit;
 	int		rid;
 	int		error = 0;
@@ -144,6 +216,11 @@ pcii_attach(device_t dev)
 
 	device_set_desc(dev, "PCII IEEE-4888 controller");
 
+	if (bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &count) != 0) {
+		printf("pcii_attach: cannot obtain IRQ number\n");
+		return ENXIO;
+	}
+
 	error = bus_alloc_resources(dev, pcii_res_spec, sc->res);
 	if (error)
 		return (error);
@@ -157,9 +234,10 @@ pcii_attach(device_t dev)
 	}
 
 	for (rid = 0; rid < 8; rid++) {
-		sc->upd7210.reg_res[rid] = sc->res[2];
-		sc->upd7210.reg_offset[rid] = 0x400 * rid;
+		sc->upd7210.reg_res[rid] = sc->res[2 + rid];
+		sc->upd7210.reg_offset[rid] = 0;
 	}
+	sc->upd7210.irq_clear_res = sc->res[10];
 
 	if (sc->res[1] == NULL)
 		sc->upd7210.dmachan = -1;

Modified: stable/8/sys/dev/ieee488/tnt4882.c
==============================================================================
--- stable/8/sys/dev/ieee488/tnt4882.c	Wed Jan 27 10:20:10 2010	(r203063)
+++ stable/8/sys/dev/ieee488/tnt4882.c	Wed Jan 27 10:32:02 2010	(r203064)
@@ -309,6 +309,9 @@ tnt_attach(device_t dev)
 	/* No DMA help */
 	sc->upd7210.dmachan = -1;
 
+	/* No "special interrupt handling" needed here. */
+	sc->upd7210.irq_clear_res = NULL;
+
 	upd7210attach(&sc->upd7210);
 
 	return (0);

Modified: stable/8/sys/dev/ieee488/upd7210.c
==============================================================================
--- stable/8/sys/dev/ieee488/upd7210.c	Wed Jan 27 10:20:10 2010	(r203063)
+++ stable/8/sys/dev/ieee488/upd7210.c	Wed Jan 27 10:32:02 2010	(r203064)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2005 Poul-Henning Kamp 
+ * Copyright (c) 2010 Joerg Wunsch 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -96,19 +97,36 @@ upd7210intr(void *arg)
 	mtx_lock(&u->mutex);
 	isr1 = upd7210_rd(u, ISR1);
 	isr2 = upd7210_rd(u, ISR2);
-	if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) {
+	if (isr1 != 0 || isr2 != 0) {
+		if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) {
 #if 0
-		printf("upd7210intr [%02x %02x %02x",
-		    upd7210_rd(u, DIR), isr1, isr2);
-		printf(" %02x %02x %02x %02x %02x] ",
-		    upd7210_rd(u, SPSR),
-		    upd7210_rd(u, ADSR),
-		    upd7210_rd(u, CPTR),
-		    upd7210_rd(u, ADR0),
+			printf("upd7210intr [%02x %02x %02x",
+			       upd7210_rd(u, DIR), isr1, isr2);
+			printf(" %02x %02x %02x %02x %02x] ",
+			       upd7210_rd(u, SPSR),
+			       upd7210_rd(u, ADSR),
+			       upd7210_rd(u, CPTR),
+			       upd7210_rd(u, ADR0),
 		    upd7210_rd(u, ADR1));
-		upd7210_print_isr(isr1, isr2);
-		printf("\n");
+			upd7210_print_isr(isr1, isr2);
+			printf("\n");
 #endif
+		}
+		/*
+		 * "special interrupt handling"
+		 *
+		 * In order to implement shared IRQs, the original
+		 * PCIIa uses IO locations 0x2f0 + (IRQ#) as an output
+		 * location.  If an ISR for a particular card has
+		 * detected this card triggered the IRQ, it must reset
+		 * the card's IRQ by writing (anything) to that IO
+		 * location.
+		 *
+		 * Some clones apparently don't implement this
+		 * feature, but National Instrument cards do.
+		 */
+		if (u->irq_clear_res != NULL)
+			bus_write_1(u->irq_clear_res, 0, 42);
 	}
 	mtx_unlock(&u->mutex);
 }

Modified: stable/8/sys/dev/ieee488/upd7210.h
==============================================================================
--- stable/8/sys/dev/ieee488/upd7210.h	Wed Jan 27 10:20:10 2010	(r203063)
+++ stable/8/sys/dev/ieee488/upd7210.h	Wed Jan 27 10:32:02 2010	(r203064)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2005 Poul-Henning Kamp 
+ * Copyright (c) 2010 Joerg Wunsch 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,6 +49,7 @@ typedef int upd7210_irq_t(struct upd7210
 
 struct upd7210 {
 	struct resource		*reg_res[8];
+	struct resource		*irq_clear_res;
 	u_int			reg_offset[8];
 	int			dmachan;
 	int			unit;

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 10:42:35 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49D8D1065709;
	Wed, 27 Jan 2010 10:42:35 +0000 (UTC)
	(envelope-from joerg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3457E8FC30;
	Wed, 27 Jan 2010 10:42:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RAgZ2D084614;
	Wed, 27 Jan 2010 10:42:35 GMT (envelope-from joerg@svn.freebsd.org)
Received: (from joerg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RAgZFH084609;
	Wed, 27 Jan 2010 10:42:35 GMT (envelope-from joerg@svn.freebsd.org)
Message-Id: <201001271042.o0RAgZFH084609@svn.freebsd.org>
From: Joerg Wunsch 
Date: Wed, 27 Jan 2010 10:42:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203065 - stable/8/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 10:42:35 -0000

Author: joerg
Date: Wed Jan 27 10:42:34 2010
New Revision: 203065
URL: http://svn.freebsd.org/changeset/base/203065

Log:
  Merge r202943: Add man pages for the gpib(4), pcii(4), and tnt4882(4)
  drivers.

Added:
  stable/8/share/man/man4/gpib.4
     - copied unchanged from r202943, head/share/man/man4/gpib.4
  stable/8/share/man/man4/pcii.4
     - copied unchanged from r202943, head/share/man/man4/pcii.4
  stable/8/share/man/man4/tnt4882.4
     - copied unchanged from r202943, head/share/man/man4/tnt4882.4
Modified:
  stable/8/share/man/man4/Makefile
Directory Properties:
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man4/de.4   (props changed)

Modified: stable/8/share/man/man4/Makefile
==============================================================================
--- stable/8/share/man/man4/Makefile	Wed Jan 27 10:32:02 2010	(r203064)
+++ stable/8/share/man/man4/Makefile	Wed Jan 27 10:42:34 2010	(r203065)
@@ -117,6 +117,7 @@ MAN=	aac.4 \
 	geom_linux_lvm.4 \
 	geom_uzip.4 \
 	gif.4 \
+	gpib.4 \
 	gre.4 \
 	harp.4 \
 	hatm.4 \
@@ -297,6 +298,7 @@ MAN=	aac.4 \
 	pci.4 \
 	pcib.4 \
 	pcic.4 \
+	pcii.4 \
 	pcm.4 \
 	pcn.4 \
 	pim.4 \
@@ -394,6 +396,7 @@ MAN=	aac.4 \
 	textdump.4 \
 	ti.4 \
 	tl.4 \
+	tnt4882.4 \
 	trm.4 \
 	tty.4 \
 	tun.4 \

Copied: stable/8/share/man/man4/gpib.4 (from r202943, head/share/man/man4/gpib.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/share/man/man4/gpib.4	Wed Jan 27 10:42:34 2010	(r203065, copy of r202943, head/share/man/man4/gpib.4)
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2010, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2010
+.Dt GPIB 4
+.Os
+.Sh NAME
+.Nm gpib
+.Nd General-Purpose Instrument Bus (GPIB) driver
+.Sh SYNOPSIS
+Either of the
+.Xr pcii 4
+or
+.Xr tnt4882 4
+drivers use this driver as the backend.
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for driving an IEEE-488 bus, also called
+IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
+Bus), or GPIB (General Purpose Instrument Bus).
+The device can become either a listener, talker, controller, and
+in particular a master controller on the bus.
+.Sh FILES
+.Bl -tag -width /dev/gpibNNib
+.It Pa /dev/gpib Ns Em N Ns "ib"
+Main device node to access the driver.
+.It Pa /dev/gpib Ns Em N Ns "l"
+Listen-only entry to the driver.
+When opening, an instrument can send data to this device on the
+bus in an unaddressed mode, for example hard-copy printer data.
+.El
+.Sh SEE ALSO
+.\" .Xr libgpib 3 ,
+.Xr gpib 4 ,
+.Xr tnt4882 4
+.Sh HISTORY
+The
+.Nm
+driver was written by Poul-Henning Kamp, and first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+This manual page was written by
+.An J\(:org Wunsch .

Copied: stable/8/share/man/man4/pcii.4 (from r202943, head/share/man/man4/pcii.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/share/man/man4/pcii.4	Wed Jan 27 10:42:34 2010	(r203065, copy of r202943, head/share/man/man4/pcii.4)
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2010, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2010
+.Dt PCII 4
+.Os
+.Sh NAME
+.Nm pcii
+.Nd National Instruments PCIIA GPIB controller driver
+.Sh SYNOPSIS
+.Cd "device pcii"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.pcii.0.at="isa"
+.Cd hint.pcii.0.port="0x2e1"
+.Cd hint.pcii.0.irq="7"
+.Cd hint.pcii.0.drq="1"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for driving an IEEE-488 bus, also called
+IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
+Bus), or GPIB (General Purpose Instrument Bus).
+The driver supports National Instruments PCIIA cards (sometimes
+also refered to as PC2A) and compatibles.
+These cards use a NEC \(mcPD7210 controller IC as the main
+interface between the host computer and the instrument bus.
+.Ss IO memory space layout
+The PCIIA cards use a very specific IO memory space allocation layout.
+The address bits A0 through A9 (which have traditionally been the only
+address bits evaluated on IBM PC XT extension cards) are hardwired to
+address 0x2e1.
+Bits A10 through A12 are used by the \(mcPD7210 register select lines.
+This makes the individual 7210 registers being 0x400 bytes apart in the
+ISA bus address space.
+Address bits A13 and A14 are compared to a DIP switch setting on the
+card, allowing for up to 4 different cards being installed (at base
+addresses 0x2e1, 0x22e1, 0x42e1, and 0x62e1, respectively).
+A15 has been used to select an optional on-board time-of-day clock
+chip (MM58167A) on the original PCIIA rather than the \(mcPD7210
+(which is not implemented on later boards and clones).
+Finally, the IO addresses 0x2f0 ... 0x2f7 are used for a
+.Em special interrupt handling feature
+(re-enable interrupts so the IRQ can be shared), where actually only
+address 0x2f0 plus the actual IRQ level is required for each card.
+Some clones do not appear to require this special IRQ handling, and
+are thus likely to not support the shared IRQ feature.
+.Pp
+Only the base address of the card needs to be specified in the ISA
+device hints; the driver takes care to derive all other IO addresses
+needed during the probe phase.
+.Ss Supported cards
+The following cards are known to be supported:
+.Bl -bullet -offset indent
+.It
+B&C Microsystems PC488A-0
+.It
+National Instruments GPIB-PCII/PCIIA (in PCIIa mode)
+.It
+Axiom AX5488
+.El
+.Sh SEE ALSO
+.\" .Xr libgpib 3 ,
+.Xr gpib 4 ,
+.Xr device.hints 5
+.Sh HISTORY
+The
+.Nm
+driver was written by Poul-Henning Kamp, and first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+This manual page was written by
+.An J\(:org Wunsch .

Copied: stable/8/share/man/man4/tnt4882.4 (from r202943, head/share/man/man4/tnt4882.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/share/man/man4/tnt4882.4	Wed Jan 27 10:42:34 2010	(r203065, copy of r202943, head/share/man/man4/tnt4882.4)
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2010, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2010
+.Dt TNT4882 4
+.Os
+.Sh NAME
+.Nm tnt4882
+.Nd National Instruments TNT4882A GPIB controller driver
+.Sh SYNOPSIS
+.Cd "device tnt4882"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for driving an IEEE-488 bus, also called
+IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
+Bus), or GPIB (General Purpose Instrument Bus).
+The driver supports National Instruments PCI GPIB cards using
+the TNT4882 bus interface chip.
+This chip emulates a NEC \(mcPD7210 controller IC as the main
+interface between the host computer and the instrument bus.
+.Sh SEE ALSO
+.\" .Xr libgpib 3 ,
+.Xr gpib 4 ,
+.Sh HISTORY
+The
+.Nm
+driver was written by Poul-Henning Kamp, and first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+This manual page was written by
+.An J\(:org Wunsch .

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 11:08:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F58C1065672;
	Wed, 27 Jan 2010 11:08:39 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6DDBB8FC1D;
	Wed, 27 Jan 2010 11:08:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RB8dUg094459;
	Wed, 27 Jan 2010 11:08:39 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RB8dJp094457;
	Wed, 27 Jan 2010 11:08:39 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001271108.o0RB8dJp094457@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 27 Jan 2010 11:08: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: r203066 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 11:08:39 -0000

Author: edwin
Date: Wed Jan 27 11:08:39 2010
New Revision: 203066
URL: http://svn.freebsd.org/changeset/base/203066

Log:
  Git has been added as port 9418:
  http://www.iana.org/assignments/port-numbers
  
  PR:		conf/143259
  Submitted by:	Denny Lin 
  Obtained from:	http://www.iana.org/assignments/port-numbers
  MFC after:	2 day

Modified:
  head/etc/services

Modified: head/etc/services
==============================================================================
--- head/etc/services	Wed Jan 27 10:42:34 2010	(r203065)
+++ head/etc/services	Wed Jan 27 11:08:39 2010	(r203066)
@@ -2374,6 +2374,8 @@ dlip		7201/udp
 ftp-proxy	8021/tcp   # FTP proxy
 natd		8668/divert # Network Address Translation
 jetdirect	9100/tcp   #HP JetDirect card
+git		9418/tcp   #git pack transfer service
+git		9418/udp   #git pack transfer service
 man		9535/tcp
 man		9535/udp
 sd		9876/tcp   #Session Director

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 11:23:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0720D106566B;
	Wed, 27 Jan 2010 11:23:22 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EA1278FC08;
	Wed, 27 Jan 2010 11:23:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RBNL5O097723;
	Wed, 27 Jan 2010 11:23:21 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RBNLjJ097721;
	Wed, 27 Jan 2010 11:23:21 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001271123.o0RBNLjJ097721@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 27 Jan 2010 11:23:21 +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: r203067 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 11:23:22 -0000

Author: edwin
Date: Wed Jan 27 11:23:21 2010
New Revision: 203067
URL: http://svn.freebsd.org/changeset/base/203067

Log:
  The Erlang Port Mapper Daemon (from ports/lang/erlang) has been
  assigned official port number 4369 by IANA.
  
  PR:		conf/113265
  Submitted by:	Jimmy Olgeni 
  Obtained from:	http://www.iana.org/assignments/port-numbers
  MFC after:	2 days

Modified:
  head/etc/services

Modified: head/etc/services
==============================================================================
--- head/etc/services	Wed Jan 27 11:08:39 2010	(r203066)
+++ head/etc/services	Wed Jan 27 11:23:21 2010	(r203067)
@@ -2229,6 +2229,8 @@ rwhois		4321/tcp   #Remote Who Is
 rwhois		4321/udp   #Remote Who Is
 unicall		4343/tcp
 unicall		4343/udp
+epmd		4369/tcp   #Erlang Port Mapper Daemon
+epmd		4369/udp   #Erlang Port Mapper Daemon
 krb524		4444/tcp
 krb524		4444/udp
 # PROBLEM krb524 assigned the port,

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 11:54:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B1F87106566C;
	Wed, 27 Jan 2010 11:54:42 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E51C8FC15;
	Wed, 27 Jan 2010 11:54:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RBsgGX005015;
	Wed, 27 Jan 2010 11:54:42 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RBsgcG005005;
	Wed, 27 Jan 2010 11:54:42 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201001271154.o0RBsgcG005005@svn.freebsd.org>
From: Ed Schouten 
Date: Wed, 27 Jan 2010 11:54: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: r203068 - in head: etc/etc.amd64 etc/etc.arm
	etc/etc.i386 etc/etc.ia64 etc/etc.mips etc/etc.pc98
	etc/etc.powerpc etc/etc.sparc64 lib/libc/gen
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 11:54:42 -0000

Author: ed
Date: Wed Jan 27 11:54:42 2010
New Revision: 203068
URL: http://svn.freebsd.org/changeset/base/203068

Log:
  Remove pseudo-terminals from ttys(5).
  
  When we had utmp(5), we had to list all the psuedo-terminals in ttys(5)
  to make ttyslot(3) function properly. Now that pututxline(3) deals with
  slot allocation internally (not based on TTY names), we don't need to
  list all the TTYs on the system in ttys(5) to make user accounting work
  properly.
  
  This patch removes all the entries from the /etc/ttys files, but also
  the pts(4) entries that were appended implicitly, which was added in
  r154838.

Modified:
  head/etc/etc.amd64/ttys
  head/etc/etc.arm/ttys
  head/etc/etc.i386/ttys
  head/etc/etc.ia64/ttys
  head/etc/etc.mips/ttys
  head/etc/etc.pc98/ttys
  head/etc/etc.powerpc/ttys
  head/etc/etc.sparc64/ttys
  head/lib/libc/gen/getttyent.c

Modified: head/etc/etc.amd64/ttys
==============================================================================
--- head/etc/etc.amd64/ttys	Wed Jan 27 11:23:21 2010	(r203067)
+++ head/etc/etc.amd64/ttys	Wed Jan 27 11:54:42 2010	(r203068)
@@ -48,260 +48,3 @@ ttyu2	"/usr/libexec/getty std.9600"	dial
 ttyu3	"/usr/libexec/getty std.9600"	dialup	off secure
 # Dumb console
 dcons	"/usr/libexec/getty std.9600"	vt100	off secure
-# Pseudo terminals
-ttyp0	none			network
-ttyp1	none			network
-ttyp2	none			network
-ttyp3	none			network
-ttyp4	none			network
-ttyp5	none			network
-ttyp6	none			network
-ttyp7	none			network
-ttyp8	none			network
-ttyp9	none			network
-ttypa	none			network
-ttypb	none			network
-ttypc	none			network
-ttypd	none			network
-ttype	none			network
-ttypf	none			network
-ttypg	none			network
-ttyph	none			network
-ttypi	none			network
-ttypj	none			network
-ttypk	none			network
-ttypl	none			network
-ttypm	none			network
-ttypn	none			network
-ttypo	none			network
-ttypp	none			network
-ttypq	none			network
-ttypr	none			network
-ttyps	none			network
-ttypt	none			network
-ttypu	none			network
-ttypv	none			network
-ttyq0	none			network
-ttyq1	none			network
-ttyq2	none			network
-ttyq3	none			network
-ttyq4	none			network
-ttyq5	none			network
-ttyq6	none			network
-ttyq7	none			network
-ttyq8	none			network
-ttyq9	none			network
-ttyqa	none			network
-ttyqb	none			network
-ttyqc	none			network
-ttyqd	none			network
-ttyqe	none			network
-ttyqf	none			network
-ttyqg	none			network
-ttyqh	none			network
-ttyqi	none			network
-ttyqj	none			network
-ttyqk	none			network
-ttyql	none			network
-ttyqm	none			network
-ttyqn	none			network
-ttyqo	none			network
-ttyqp	none			network
-ttyqq	none			network
-ttyqr	none			network
-ttyqs	none			network
-ttyqt	none			network
-ttyqu	none			network
-ttyqv	none			network
-ttyr0	none			network
-ttyr1	none			network
-ttyr2	none			network
-ttyr3	none			network
-ttyr4	none			network
-ttyr5	none			network
-ttyr6	none			network
-ttyr7	none			network
-ttyr8	none			network
-ttyr9	none			network
-ttyra	none			network
-ttyrb	none			network
-ttyrc	none			network
-ttyrd	none			network
-ttyre	none			network
-ttyrf	none			network
-ttyrg	none			network
-ttyrh	none			network
-ttyri	none			network
-ttyrj	none			network
-ttyrk	none			network
-ttyrl	none			network
-ttyrm	none			network
-ttyrn	none			network
-ttyro	none			network
-ttyrp	none			network
-ttyrq	none			network
-ttyrr	none			network
-ttyrs	none			network
-ttyrt	none			network
-ttyru	none			network
-ttyrv	none			network
-ttys0	none			network
-ttys1	none			network
-ttys2	none			network
-ttys3	none			network
-ttys4	none			network
-ttys5	none			network
-ttys6	none			network
-ttys7	none			network
-ttys8	none			network
-ttys9	none			network
-ttysa	none			network
-ttysb	none			network
-ttysc	none			network
-ttysd	none			network
-ttyse	none			network
-ttysf	none			network
-ttysg	none			network
-ttysh	none			network
-ttysi	none			network
-ttysj	none			network
-ttysk	none			network
-ttysl	none			network
-ttysm	none			network
-ttysn	none			network
-ttyso	none			network
-ttysp	none			network
-ttysq	none			network
-ttysr	none			network
-ttyss	none			network
-ttyst	none			network
-ttysu	none			network
-ttysv	none			network
-ttyP0	none			network
-ttyP1	none			network
-ttyP2	none			network
-ttyP3	none			network
-ttyP4	none			network
-ttyP5	none			network
-ttyP6	none			network
-ttyP7	none			network
-ttyP8	none			network
-ttyP9	none			network
-ttyPa	none			network
-ttyPb	none			network
-ttyPc	none			network
-ttyPd	none			network
-ttyPe	none			network
-ttyPf	none			network
-ttyPg	none			network
-ttyPh	none			network
-ttyPi	none			network
-ttyPj	none			network
-ttyPk	none			network
-ttyPl	none			network
-ttyPm	none			network
-ttyPn	none			network
-ttyPo	none			network
-ttyPp	none			network
-ttyPq	none			network
-ttyPr	none			network
-ttyPs	none			network
-ttyPt	none			network
-ttyPu	none			network
-ttyPv	none			network
-ttyQ0	none			network
-ttyQ1	none			network
-ttyQ2	none			network
-ttyQ3	none			network
-ttyQ4	none			network
-ttyQ5	none			network
-ttyQ6	none			network
-ttyQ7	none			network
-ttyQ8	none			network
-ttyQ9	none			network
-ttyQa	none			network
-ttyQb	none			network
-ttyQc	none			network
-ttyQd	none			network
-ttyQe	none			network
-ttyQf	none			network
-ttyQg	none			network
-ttyQh	none			network
-ttyQi	none			network
-ttyQj	none			network
-ttyQk	none			network
-ttyQl	none			network
-ttyQm	none			network
-ttyQn	none			network
-ttyQo	none			network
-ttyQp	none			network
-ttyQq	none			network
-ttyQr	none			network
-ttyQs	none			network
-ttyQt	none			network
-ttyQu	none			network
-ttyQv	none			network
-ttyR0	none			network
-ttyR1	none			network
-ttyR2	none			network
-ttyR3	none			network
-ttyR4	none			network
-ttyR5	none			network
-ttyR6	none			network
-ttyR7	none			network
-ttyR8	none			network
-ttyR9	none			network
-ttyRa	none			network
-ttyRb	none			network
-ttyRc	none			network
-ttyRd	none			network
-ttyRe	none			network
-ttyRf	none			network
-ttyRg	none			network
-ttyRh	none			network
-ttyRi	none			network
-ttyRj	none			network
-ttyRk	none			network
-ttyRl	none			network
-ttyRm	none			network
-ttyRn	none			network
-ttyRo	none			network
-ttyRp	none			network
-ttyRq	none			network
-ttyRr	none			network
-ttyRs	none			network
-ttyRt	none			network
-ttyRu	none			network
-ttyRv	none			network
-ttyS0	none			network
-ttyS1	none			network
-ttyS2	none			network
-ttyS3	none			network
-ttyS4	none			network
-ttyS5	none			network
-ttyS6	none			network
-ttyS7	none			network
-ttyS8	none			network
-ttyS9	none			network
-ttySa	none			network
-ttySb	none			network
-ttySc	none			network
-ttySd	none			network
-ttySe	none			network
-ttySf	none			network
-ttySg	none			network
-ttySh	none			network
-ttySi	none			network
-ttySj	none			network
-ttySk	none			network
-ttySl	none			network
-ttySm	none			network
-ttySn	none			network
-ttySo	none			network
-ttySp	none			network
-ttySq	none			network
-ttySr	none			network
-ttySs	none			network
-ttySt	none			network
-ttySu	none			network
-ttySv	none			network

Modified: head/etc/etc.arm/ttys
==============================================================================
--- head/etc/etc.arm/ttys	Wed Jan 27 11:23:21 2010	(r203067)
+++ head/etc/etc.arm/ttys	Wed Jan 27 11:54:42 2010	(r203068)
@@ -48,260 +48,3 @@ ttyu2	"/usr/libexec/getty std.9600"	dial
 ttyu3	"/usr/libexec/getty std.9600"	dialup	off secure
 # Dumb console
 dcons	"/usr/libexec/getty std.9600"	vt100	off secure
-# Pseudo terminals
-ttyp0	none			network
-ttyp1	none			network
-ttyp2	none			network
-ttyp3	none			network
-ttyp4	none			network
-ttyp5	none			network
-ttyp6	none			network
-ttyp7	none			network
-ttyp8	none			network
-ttyp9	none			network
-ttypa	none			network
-ttypb	none			network
-ttypc	none			network
-ttypd	none			network
-ttype	none			network
-ttypf	none			network
-ttypg	none			network
-ttyph	none			network
-ttypi	none			network
-ttypj	none			network
-ttypk	none			network
-ttypl	none			network
-ttypm	none			network
-ttypn	none			network
-ttypo	none			network
-ttypp	none			network
-ttypq	none			network
-ttypr	none			network
-ttyps	none			network
-ttypt	none			network
-ttypu	none			network
-ttypv	none			network
-ttyq0	none			network
-ttyq1	none			network
-ttyq2	none			network
-ttyq3	none			network
-ttyq4	none			network
-ttyq5	none			network
-ttyq6	none			network
-ttyq7	none			network
-ttyq8	none			network
-ttyq9	none			network
-ttyqa	none			network
-ttyqb	none			network
-ttyqc	none			network
-ttyqd	none			network
-ttyqe	none			network
-ttyqf	none			network
-ttyqg	none			network
-ttyqh	none			network
-ttyqi	none			network
-ttyqj	none			network
-ttyqk	none			network
-ttyql	none			network
-ttyqm	none			network
-ttyqn	none			network
-ttyqo	none			network
-ttyqp	none			network
-ttyqq	none			network
-ttyqr	none			network
-ttyqs	none			network
-ttyqt	none			network
-ttyqu	none			network
-ttyqv	none			network
-ttyr0	none			network
-ttyr1	none			network
-ttyr2	none			network
-ttyr3	none			network
-ttyr4	none			network
-ttyr5	none			network
-ttyr6	none			network
-ttyr7	none			network
-ttyr8	none			network
-ttyr9	none			network
-ttyra	none			network
-ttyrb	none			network
-ttyrc	none			network
-ttyrd	none			network
-ttyre	none			network
-ttyrf	none			network
-ttyrg	none			network
-ttyrh	none			network
-ttyri	none			network
-ttyrj	none			network
-ttyrk	none			network
-ttyrl	none			network
-ttyrm	none			network
-ttyrn	none			network
-ttyro	none			network
-ttyrp	none			network
-ttyrq	none			network
-ttyrr	none			network
-ttyrs	none			network
-ttyrt	none			network
-ttyru	none			network
-ttyrv	none			network
-ttys0	none			network
-ttys1	none			network
-ttys2	none			network
-ttys3	none			network
-ttys4	none			network
-ttys5	none			network
-ttys6	none			network
-ttys7	none			network
-ttys8	none			network
-ttys9	none			network
-ttysa	none			network
-ttysb	none			network
-ttysc	none			network
-ttysd	none			network
-ttyse	none			network
-ttysf	none			network
-ttysg	none			network
-ttysh	none			network
-ttysi	none			network
-ttysj	none			network
-ttysk	none			network
-ttysl	none			network
-ttysm	none			network
-ttysn	none			network
-ttyso	none			network
-ttysp	none			network
-ttysq	none			network
-ttysr	none			network
-ttyss	none			network
-ttyst	none			network
-ttysu	none			network
-ttysv	none			network
-ttyP0	none			network
-ttyP1	none			network
-ttyP2	none			network
-ttyP3	none			network
-ttyP4	none			network
-ttyP5	none			network
-ttyP6	none			network
-ttyP7	none			network
-ttyP8	none			network
-ttyP9	none			network
-ttyPa	none			network
-ttyPb	none			network
-ttyPc	none			network
-ttyPd	none			network
-ttyPe	none			network
-ttyPf	none			network
-ttyPg	none			network
-ttyPh	none			network
-ttyPi	none			network
-ttyPj	none			network
-ttyPk	none			network
-ttyPl	none			network
-ttyPm	none			network
-ttyPn	none			network
-ttyPo	none			network
-ttyPp	none			network
-ttyPq	none			network
-ttyPr	none			network
-ttyPs	none			network
-ttyPt	none			network
-ttyPu	none			network
-ttyPv	none			network
-ttyQ0	none			network
-ttyQ1	none			network
-ttyQ2	none			network
-ttyQ3	none			network
-ttyQ4	none			network
-ttyQ5	none			network
-ttyQ6	none			network
-ttyQ7	none			network
-ttyQ8	none			network
-ttyQ9	none			network
-ttyQa	none			network
-ttyQb	none			network
-ttyQc	none			network
-ttyQd	none			network
-ttyQe	none			network
-ttyQf	none			network
-ttyQg	none			network
-ttyQh	none			network
-ttyQi	none			network
-ttyQj	none			network
-ttyQk	none			network
-ttyQl	none			network
-ttyQm	none			network
-ttyQn	none			network
-ttyQo	none			network
-ttyQp	none			network
-ttyQq	none			network
-ttyQr	none			network
-ttyQs	none			network
-ttyQt	none			network
-ttyQu	none			network
-ttyQv	none			network
-ttyR0	none			network
-ttyR1	none			network
-ttyR2	none			network
-ttyR3	none			network
-ttyR4	none			network
-ttyR5	none			network
-ttyR6	none			network
-ttyR7	none			network
-ttyR8	none			network
-ttyR9	none			network
-ttyRa	none			network
-ttyRb	none			network
-ttyRc	none			network
-ttyRd	none			network
-ttyRe	none			network
-ttyRf	none			network
-ttyRg	none			network
-ttyRh	none			network
-ttyRi	none			network
-ttyRj	none			network
-ttyRk	none			network
-ttyRl	none			network
-ttyRm	none			network
-ttyRn	none			network
-ttyRo	none			network
-ttyRp	none			network
-ttyRq	none			network
-ttyRr	none			network
-ttyRs	none			network
-ttyRt	none			network
-ttyRu	none			network
-ttyRv	none			network
-ttyS0	none			network
-ttyS1	none			network
-ttyS2	none			network
-ttyS3	none			network
-ttyS4	none			network
-ttyS5	none			network
-ttyS6	none			network
-ttyS7	none			network
-ttyS8	none			network
-ttyS9	none			network
-ttySa	none			network
-ttySb	none			network
-ttySc	none			network
-ttySd	none			network
-ttySe	none			network
-ttySf	none			network
-ttySg	none			network
-ttySh	none			network
-ttySi	none			network
-ttySj	none			network
-ttySk	none			network
-ttySl	none			network
-ttySm	none			network
-ttySn	none			network
-ttySo	none			network
-ttySp	none			network
-ttySq	none			network
-ttySr	none			network
-ttySs	none			network
-ttySt	none			network
-ttySu	none			network
-ttySv	none			network

Modified: head/etc/etc.i386/ttys
==============================================================================
--- head/etc/etc.i386/ttys	Wed Jan 27 11:23:21 2010	(r203067)
+++ head/etc/etc.i386/ttys	Wed Jan 27 11:54:42 2010	(r203068)
@@ -48,260 +48,3 @@ ttyu2	"/usr/libexec/getty std.9600"	dial
 ttyu3	"/usr/libexec/getty std.9600"	dialup	off secure
 # Dumb console
 dcons	"/usr/libexec/getty std.9600"	vt100	off secure
-# Pseudo terminals
-ttyp0	none			network
-ttyp1	none			network
-ttyp2	none			network
-ttyp3	none			network
-ttyp4	none			network
-ttyp5	none			network
-ttyp6	none			network
-ttyp7	none			network
-ttyp8	none			network
-ttyp9	none			network
-ttypa	none			network
-ttypb	none			network
-ttypc	none			network
-ttypd	none			network
-ttype	none			network
-ttypf	none			network
-ttypg	none			network
-ttyph	none			network
-ttypi	none			network
-ttypj	none			network
-ttypk	none			network
-ttypl	none			network
-ttypm	none			network
-ttypn	none			network
-ttypo	none			network
-ttypp	none			network
-ttypq	none			network
-ttypr	none			network
-ttyps	none			network
-ttypt	none			network
-ttypu	none			network
-ttypv	none			network
-ttyq0	none			network
-ttyq1	none			network
-ttyq2	none			network
-ttyq3	none			network
-ttyq4	none			network
-ttyq5	none			network
-ttyq6	none			network
-ttyq7	none			network
-ttyq8	none			network
-ttyq9	none			network
-ttyqa	none			network
-ttyqb	none			network
-ttyqc	none			network
-ttyqd	none			network
-ttyqe	none			network
-ttyqf	none			network
-ttyqg	none			network
-ttyqh	none			network
-ttyqi	none			network
-ttyqj	none			network
-ttyqk	none			network
-ttyql	none			network
-ttyqm	none			network
-ttyqn	none			network
-ttyqo	none			network
-ttyqp	none			network
-ttyqq	none			network
-ttyqr	none			network
-ttyqs	none			network
-ttyqt	none			network
-ttyqu	none			network
-ttyqv	none			network
-ttyr0	none			network
-ttyr1	none			network
-ttyr2	none			network
-ttyr3	none			network
-ttyr4	none			network
-ttyr5	none			network
-ttyr6	none			network
-ttyr7	none			network
-ttyr8	none			network
-ttyr9	none			network
-ttyra	none			network
-ttyrb	none			network
-ttyrc	none			network
-ttyrd	none			network
-ttyre	none			network
-ttyrf	none			network
-ttyrg	none			network
-ttyrh	none			network
-ttyri	none			network
-ttyrj	none			network
-ttyrk	none			network
-ttyrl	none			network
-ttyrm	none			network
-ttyrn	none			network
-ttyro	none			network
-ttyrp	none			network
-ttyrq	none			network
-ttyrr	none			network
-ttyrs	none			network
-ttyrt	none			network
-ttyru	none			network
-ttyrv	none			network
-ttys0	none			network
-ttys1	none			network
-ttys2	none			network
-ttys3	none			network
-ttys4	none			network
-ttys5	none			network
-ttys6	none			network
-ttys7	none			network
-ttys8	none			network
-ttys9	none			network
-ttysa	none			network
-ttysb	none			network
-ttysc	none			network
-ttysd	none			network
-ttyse	none			network
-ttysf	none			network
-ttysg	none			network
-ttysh	none			network
-ttysi	none			network
-ttysj	none			network
-ttysk	none			network
-ttysl	none			network
-ttysm	none			network
-ttysn	none			network
-ttyso	none			network
-ttysp	none			network
-ttysq	none			network
-ttysr	none			network
-ttyss	none			network
-ttyst	none			network
-ttysu	none			network
-ttysv	none			network
-ttyP0	none			network
-ttyP1	none			network
-ttyP2	none			network
-ttyP3	none			network
-ttyP4	none			network
-ttyP5	none			network
-ttyP6	none			network
-ttyP7	none			network
-ttyP8	none			network
-ttyP9	none			network
-ttyPa	none			network
-ttyPb	none			network
-ttyPc	none			network
-ttyPd	none			network
-ttyPe	none			network
-ttyPf	none			network
-ttyPg	none			network
-ttyPh	none			network
-ttyPi	none			network
-ttyPj	none			network
-ttyPk	none			network
-ttyPl	none			network
-ttyPm	none			network
-ttyPn	none			network
-ttyPo	none			network
-ttyPp	none			network
-ttyPq	none			network
-ttyPr	none			network
-ttyPs	none			network
-ttyPt	none			network
-ttyPu	none			network
-ttyPv	none			network
-ttyQ0	none			network
-ttyQ1	none			network
-ttyQ2	none			network
-ttyQ3	none			network
-ttyQ4	none			network
-ttyQ5	none			network
-ttyQ6	none			network
-ttyQ7	none			network
-ttyQ8	none			network
-ttyQ9	none			network
-ttyQa	none			network
-ttyQb	none			network
-ttyQc	none			network
-ttyQd	none			network
-ttyQe	none			network
-ttyQf	none			network
-ttyQg	none			network
-ttyQh	none			network
-ttyQi	none			network
-ttyQj	none			network
-ttyQk	none			network
-ttyQl	none			network
-ttyQm	none			network
-ttyQn	none			network
-ttyQo	none			network
-ttyQp	none			network
-ttyQq	none			network
-ttyQr	none			network
-ttyQs	none			network
-ttyQt	none			network
-ttyQu	none			network
-ttyQv	none			network
-ttyR0	none			network
-ttyR1	none			network
-ttyR2	none			network
-ttyR3	none			network
-ttyR4	none			network
-ttyR5	none			network
-ttyR6	none			network
-ttyR7	none			network
-ttyR8	none			network
-ttyR9	none			network
-ttyRa	none			network
-ttyRb	none			network
-ttyRc	none			network
-ttyRd	none			network
-ttyRe	none			network
-ttyRf	none			network
-ttyRg	none			network
-ttyRh	none			network
-ttyRi	none			network
-ttyRj	none			network
-ttyRk	none			network
-ttyRl	none			network
-ttyRm	none			network
-ttyRn	none			network
-ttyRo	none			network
-ttyRp	none			network
-ttyRq	none			network
-ttyRr	none			network
-ttyRs	none			network
-ttyRt	none			network
-ttyRu	none			network
-ttyRv	none			network
-ttyS0	none			network
-ttyS1	none			network
-ttyS2	none			network
-ttyS3	none			network
-ttyS4	none			network
-ttyS5	none			network
-ttyS6	none			network
-ttyS7	none			network
-ttyS8	none			network
-ttyS9	none			network
-ttySa	none			network
-ttySb	none			network
-ttySc	none			network
-ttySd	none			network
-ttySe	none			network
-ttySf	none			network
-ttySg	none			network
-ttySh	none			network
-ttySi	none			network
-ttySj	none			network
-ttySk	none			network
-ttySl	none			network
-ttySm	none			network
-ttySn	none			network
-ttySo	none			network
-ttySp	none			network
-ttySq	none			network
-ttySr	none			network
-ttySs	none			network
-ttySt	none			network
-ttySu	none			network
-ttySv	none			network

Modified: head/etc/etc.ia64/ttys
==============================================================================
--- head/etc/etc.ia64/ttys	Wed Jan 27 11:23:21 2010	(r203067)
+++ head/etc/etc.ia64/ttys	Wed Jan 27 11:54:42 2010	(r203068)
@@ -48,260 +48,3 @@ ttyu2	"/usr/libexec/getty std.9600"	dial
 ttyu3	"/usr/libexec/getty std.9600"	dialup	off secure
 # Dumb console
 dcons	"/usr/libexec/getty std.9600"	vt100	off secure
-# Pseudo terminals.
-ttyp0	none			network
-ttyp1	none			network
-ttyp2	none			network
-ttyp3	none			network
-ttyp4	none			network
-ttyp5	none			network
-ttyp6	none			network
-ttyp7	none			network
-ttyp8	none			network
-ttyp9	none			network
-ttypa	none			network
-ttypb	none			network
-ttypc	none			network
-ttypd	none			network
-ttype	none			network
-ttypf	none			network
-ttypg	none			network
-ttyph	none			network
-ttypi	none			network
-ttypj	none			network
-ttypk	none			network
-ttypl	none			network
-ttypm	none			network
-ttypn	none			network
-ttypo	none			network
-ttypp	none			network
-ttypq	none			network
-ttypr	none			network
-ttyps	none			network
-ttypt	none			network
-ttypu	none			network
-ttypv	none			network
-ttyq0	none			network
-ttyq1	none			network
-ttyq2	none			network
-ttyq3	none			network
-ttyq4	none			network
-ttyq5	none			network
-ttyq6	none			network
-ttyq7	none			network
-ttyq8	none			network
-ttyq9	none			network
-ttyqa	none			network
-ttyqb	none			network
-ttyqc	none			network
-ttyqd	none			network
-ttyqe	none			network
-ttyqf	none			network
-ttyqg	none			network
-ttyqh	none			network
-ttyqi	none			network
-ttyqj	none			network
-ttyqk	none			network
-ttyql	none			network
-ttyqm	none			network
-ttyqn	none			network
-ttyqo	none			network
-ttyqp	none			network
-ttyqq	none			network
-ttyqr	none			network
-ttyqs	none			network
-ttyqt	none			network
-ttyqu	none			network
-ttyqv	none			network
-ttyr0	none			network
-ttyr1	none			network
-ttyr2	none			network
-ttyr3	none			network
-ttyr4	none			network
-ttyr5	none			network
-ttyr6	none			network
-ttyr7	none			network
-ttyr8	none			network
-ttyr9	none			network
-ttyra	none			network
-ttyrb	none			network
-ttyrc	none			network
-ttyrd	none			network
-ttyre	none			network
-ttyrf	none			network
-ttyrg	none			network
-ttyrh	none			network
-ttyri	none			network
-ttyrj	none			network
-ttyrk	none			network
-ttyrl	none			network
-ttyrm	none			network
-ttyrn	none			network
-ttyro	none			network
-ttyrp	none			network
-ttyrq	none			network
-ttyrr	none			network
-ttyrs	none			network
-ttyrt	none			network
-ttyru	none			network
-ttyrv	none			network
-ttys0	none			network
-ttys1	none			network
-ttys2	none			network
-ttys3	none			network
-ttys4	none			network
-ttys5	none			network
-ttys6	none			network
-ttys7	none			network
-ttys8	none			network
-ttys9	none			network
-ttysa	none			network
-ttysb	none			network
-ttysc	none			network
-ttysd	none			network
-ttyse	none			network
-ttysf	none			network
-ttysg	none			network
-ttysh	none			network
-ttysi	none			network
-ttysj	none			network
-ttysk	none			network
-ttysl	none			network
-ttysm	none			network
-ttysn	none			network
-ttyso	none			network
-ttysp	none			network
-ttysq	none			network
-ttysr	none			network
-ttyss	none			network
-ttyst	none			network
-ttysu	none			network
-ttysv	none			network
-ttyP0	none			network
-ttyP1	none			network
-ttyP2	none			network
-ttyP3	none			network
-ttyP4	none			network
-ttyP5	none			network
-ttyP6	none			network
-ttyP7	none			network
-ttyP8	none			network
-ttyP9	none			network
-ttyPa	none			network
-ttyPb	none			network
-ttyPc	none			network
-ttyPd	none			network
-ttyPe	none			network
-ttyPf	none			network
-ttyPg	none			network
-ttyPh	none			network
-ttyPi	none			network
-ttyPj	none			network
-ttyPk	none			network
-ttyPl	none			network
-ttyPm	none			network
-ttyPn	none			network
-ttyPo	none			network
-ttyPp	none			network
-ttyPq	none			network
-ttyPr	none			network
-ttyPs	none			network
-ttyPt	none			network
-ttyPu	none			network
-ttyPv	none			network
-ttyQ0	none			network
-ttyQ1	none			network
-ttyQ2	none			network
-ttyQ3	none			network
-ttyQ4	none			network
-ttyQ5	none			network
-ttyQ6	none			network
-ttyQ7	none			network
-ttyQ8	none			network
-ttyQ9	none			network
-ttyQa	none			network
-ttyQb	none			network
-ttyQc	none			network
-ttyQd	none			network
-ttyQe	none			network
-ttyQf	none			network
-ttyQg	none			network
-ttyQh	none			network
-ttyQi	none			network
-ttyQj	none			network
-ttyQk	none			network
-ttyQl	none			network
-ttyQm	none			network
-ttyQn	none			network
-ttyQo	none			network
-ttyQp	none			network
-ttyQq	none			network
-ttyQr	none			network
-ttyQs	none			network
-ttyQt	none			network
-ttyQu	none			network
-ttyQv	none			network
-ttyR0	none			network
-ttyR1	none			network
-ttyR2	none			network
-ttyR3	none			network
-ttyR4	none			network
-ttyR5	none			network
-ttyR6	none			network
-ttyR7	none			network
-ttyR8	none			network
-ttyR9	none			network
-ttyRa	none			network
-ttyRb	none			network

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 14:43:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 84679106568B;
	Wed, 27 Jan 2010 14:43:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 73B3D8FC0A;
	Wed, 27 Jan 2010 14:43:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0REhSwh043117;
	Wed, 27 Jan 2010 14:43:28 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0REhS0B043115;
	Wed, 27 Jan 2010 14:43:28 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001271443.o0REhS0B043115@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Jan 2010 14:43: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: r203070 - head/sys/dev/nve
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 14:43:28 -0000

Author: jhb
Date: Wed Jan 27 14:43:28 2010
New Revision: 203070
URL: http://svn.freebsd.org/changeset/base/203070

Log:
  Initialize the ifnet before calling mii_phy_probe() as some phy drivers
  (e.g. e1000phy(4)) expect if_dname to be valid when they are probed.
  
  MFC after:	3 days

Modified:
  head/sys/dev/nve/if_nve.c

Modified: head/sys/dev/nve/if_nve.c
==============================================================================
--- head/sys/dev/nve/if_nve.c	Wed Jan 27 14:17:33 2010	(r203069)
+++ head/sys/dev/nve/if_nve.c	Wed Jan 27 14:43:28 2010	(r203070)
@@ -526,14 +526,6 @@ nve_attach(device_t dev)
 		goto fail;
 	}
 
-	/* Probe device for MII interface to PHY */
-	DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n");
-	if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) {
-		device_printf(dev, "MII without any phy!\n");
-		error = ENXIO;
-		goto fail;
-	}
-
 	/* Setup interface parameters */
 	ifp->if_softc = sc;
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
@@ -549,6 +541,14 @@ nve_attach(device_t dev)
 	ifp->if_capabilities |= IFCAP_VLAN_MTU;
 	ifp->if_capenable |= IFCAP_VLAN_MTU;
 
+	/* Probe device for MII interface to PHY */
+	DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n");
+	if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) {
+		device_printf(dev, "MII without any phy!\n");
+		error = ENXIO;
+		goto fail;
+	}
+
 	/* Attach to OS's managers. */
 	ether_ifattach(ifp, eaddr);
 

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 14:54:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 292D6106566B;
	Wed, 27 Jan 2010 14:54:49 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D432D8FC1F;
	Wed, 27 Jan 2010 14:54:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0REsmIS045619;
	Wed, 27 Jan 2010 14:54:48 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0REsmdw045613;
	Wed, 27 Jan 2010 14:54:48 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201001271454.o0REsmdw045613@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Jan 2010 14:54:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203071 - stable/7/lib/libfetch
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 14:54:49 -0000

Author: des
Date: Wed Jan 27 14:54:48 2010
New Revision: 203071
URL: http://svn.freebsd.org/changeset/base/203071

Log:
  Synch with head: avoid namespace collisions (r177447), plug resource leak
  in FTP code (r199801), add support for HTTP (r202613, r202623, r203028).
  Also record mergeinfo for previously merged patches (r174752, r174588).
  
  Approved by:	re (kib)

Modified:
  stable/7/lib/libfetch/Makefile
  stable/7/lib/libfetch/common.c
  stable/7/lib/libfetch/fetch.3
  stable/7/lib/libfetch/ftp.c
  stable/7/lib/libfetch/http.c
Directory Properties:
  stable/7/lib/libfetch/   (props changed)

Modified: stable/7/lib/libfetch/Makefile
==============================================================================
--- stable/7/lib/libfetch/Makefile	Wed Jan 27 14:43:28 2010	(r203070)
+++ stable/7/lib/libfetch/Makefile	Wed Jan 27 14:54:48 2010	(r203071)
@@ -16,8 +16,11 @@ CFLAGS+=	-DINET6
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+=	-DWITH_SSL
-DPADD=		${LIBSSL} ${LIBCRYPTO}
-LDADD=		-lssl -lcrypto
+DPADD=		${LIBSSL} ${LIBCRYPTO} ${LIBMD}
+LDADD=		-lssl -lcrypto -lmd
+.else
+DPADD=		${LIBMD}
+LDADD=		-lmd
 .endif
 
 CFLAGS+=	-DFTP_COMBINE_CWDS

Modified: stable/7/lib/libfetch/common.c
==============================================================================
--- stable/7/lib/libfetch/common.c	Wed Jan 27 14:43:28 2010	(r203070)
+++ stable/7/lib/libfetch/common.c	Wed Jan 27 14:54:48 2010	(r203071)
@@ -377,7 +377,7 @@ fetch_ssl(conn_t *conn, int verbose)
 ssize_t
 fetch_read(conn_t *conn, char *buf, size_t len)
 {
-	struct timeval now, timeout, wait;
+	struct timeval now, timeout, delta;
 	fd_set readfds;
 	ssize_t rlen, total;
 	int r;
@@ -393,19 +393,19 @@ fetch_read(conn_t *conn, char *buf, size
 		while (fetchTimeout && !FD_ISSET(conn->sd, &readfds)) {
 			FD_SET(conn->sd, &readfds);
 			gettimeofday(&now, NULL);
-			wait.tv_sec = timeout.tv_sec - now.tv_sec;
-			wait.tv_usec = timeout.tv_usec - now.tv_usec;
-			if (wait.tv_usec < 0) {
-				wait.tv_usec += 1000000;
-				wait.tv_sec--;
+			delta.tv_sec = timeout.tv_sec - now.tv_sec;
+			delta.tv_usec = timeout.tv_usec - now.tv_usec;
+			if (delta.tv_usec < 0) {
+				delta.tv_usec += 1000000;
+				delta.tv_sec--;
 			}
-			if (wait.tv_sec < 0) {
+			if (delta.tv_sec < 0) {
 				errno = ETIMEDOUT;
 				fetch_syserr();
 				return (-1);
 			}
 			errno = 0;
-			r = select(conn->sd + 1, &readfds, NULL, NULL, &wait);
+			r = select(conn->sd + 1, &readfds, NULL, NULL, &delta);
 			if (r == -1) {
 				if (errno == EINTR && fetchRestartCalls)
 					continue;
@@ -503,7 +503,7 @@ fetch_write(conn_t *conn, const char *bu
 ssize_t
 fetch_writev(conn_t *conn, struct iovec *iov, int iovcnt)
 {
-	struct timeval now, timeout, wait;
+	struct timeval now, timeout, delta;
 	fd_set writefds;
 	ssize_t wlen, total;
 	int r;
@@ -519,19 +519,19 @@ fetch_writev(conn_t *conn, struct iovec 
 		while (fetchTimeout && !FD_ISSET(conn->sd, &writefds)) {
 			FD_SET(conn->sd, &writefds);
 			gettimeofday(&now, NULL);
-			wait.tv_sec = timeout.tv_sec - now.tv_sec;
-			wait.tv_usec = timeout.tv_usec - now.tv_usec;
-			if (wait.tv_usec < 0) {
-				wait.tv_usec += 1000000;
-				wait.tv_sec--;
+			delta.tv_sec = timeout.tv_sec - now.tv_sec;
+			delta.tv_usec = timeout.tv_usec - now.tv_usec;
+			if (delta.tv_usec < 0) {
+				delta.tv_usec += 1000000;
+				delta.tv_sec--;
 			}
-			if (wait.tv_sec < 0) {
+			if (delta.tv_sec < 0) {
 				errno = ETIMEDOUT;
 				fetch_syserr();
 				return (-1);
 			}
 			errno = 0;
-			r = select(conn->sd + 1, NULL, &writefds, NULL, &wait);
+			r = select(conn->sd + 1, NULL, &writefds, NULL, &delta);
 			if (r == -1) {
 				if (errno == EINTR && fetchRestartCalls)
 					continue;

Modified: stable/7/lib/libfetch/fetch.3
==============================================================================
--- stable/7/lib/libfetch/fetch.3	Wed Jan 27 14:43:28 2010	(r203070)
+++ stable/7/lib/libfetch/fetch.3	Wed Jan 27 14:54:48 2010	(r203071)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2008
+.Dd January 26, 2010
 .Dt FETCH 3
 .Os
 .Sh NAME
@@ -509,9 +509,13 @@ Specifies HTTP authorization parameters 
 items.
 The first and second item are the authorization scheme and realm
 respectively; further items are scheme-dependent.
-Currently, only basic authorization is supported.
+Currently, the
+.Dq basic
+and
+.Dq digest
+authorization methods are supported.
 .Pp
-Basic authorization requires two parameters: the user name and
+Both methods require two parameters: the user name and
 password, in that order.
 .Pp
 This variable is only used if the server requires authorization and
@@ -656,12 +660,14 @@ The
 .Nm fetch
 library was mostly written by
 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
-with numerous suggestions from
+with numerous suggestions and contributions from
 .An Jordan K. Hubbard Aq jkh@FreeBSD.org ,
-.An Eugene Skepner Aq eu@qub.com
-and other
-.Fx
-developers.
+.An Eugene Skepner Aq eu@qub.com ,
+.An Hajimu Umemoto Aq ume@FreeBSD.org ,
+.An Henry Whincup Aq henry@techiebod.com ,
+.An Jukka A. Ukkonen Aq jau@iki.fi ,
+.An Jean-Fran\(,cois Dockes Aq jf@dockes.org
+and others.
 It replaces the older
 .Nm ftpio
 library written by

Modified: stable/7/lib/libfetch/ftp.c
==============================================================================
--- stable/7/lib/libfetch/ftp.c	Wed Jan 27 14:43:28 2010	(r203070)
+++ stable/7/lib/libfetch/ftp.c	Wed Jan 27 14:54:48 2010	(r203071)
@@ -1122,17 +1122,19 @@ ftp_request(struct url *url, const char 
 
 	/* change directory */
 	if (ftp_cwd(conn, url->doc) == -1)
-		return (NULL);
+		goto errsock;
 
 	/* stat file */
 	if (us && ftp_stat(conn, url->doc, us) == -1
 	    && fetchLastErrCode != FETCH_PROTO
 	    && fetchLastErrCode != FETCH_UNAVAIL)
-		return (NULL);
+		goto errsock;
 
 	/* just a stat */
-	if (strcmp(op, "STAT") == 0)
+	if (strcmp(op, "STAT") == 0) {
+		ftp_disconnect(conn);
 		return (FILE *)1; /* bogus return value */
+	}
 	if (strcmp(op, "STOR") == 0 || strcmp(op, "APPE") == 0)
 		oflag = O_WRONLY;
 	else
@@ -1140,6 +1142,10 @@ ftp_request(struct url *url, const char 
 
 	/* initiate the transfer */
 	return (ftp_transfer(conn, op, url->doc, oflag, url->offset, flags));
+
+errsock:
+	ftp_disconnect(conn);
+	return (NULL);
 }
 
 /*

Modified: stable/7/lib/libfetch/http.c
==============================================================================
--- stable/7/lib/libfetch/http.c	Wed Jan 27 14:43:28 2010	(r203070)
+++ stable/7/lib/libfetch/http.c	Wed Jan 27 14:54:48 2010	(r203071)
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -343,7 +344,8 @@ typedef enum {
 	hdr_last_modified,
 	hdr_location,
 	hdr_transfer_encoding,
-	hdr_www_authenticate
+	hdr_www_authenticate,
+	hdr_proxy_authenticate,
 } hdr_t;
 
 /* Names of interesting headers */
@@ -357,6 +359,7 @@ static struct {
 	{ hdr_location,			"Location" },
 	{ hdr_transfer_encoding,	"Transfer-Encoding" },
 	{ hdr_www_authenticate,		"WWW-Authenticate" },
+	{ hdr_proxy_authenticate,	"Proxy-Authenticate" },
 	{ hdr_unknown,			NULL },
 };
 
@@ -446,21 +449,114 @@ http_match(const char *str, const char *
 	return (hdr);
 }
 
+
 /*
- * Get the next header and return the appropriate symbolic code.
- */
-static hdr_t
-http_next_header(conn_t *conn, const char **p)
+ * Get the next header and return the appropriate symbolic code.  We
+ * need to read one line ahead for checking for a continuation line
+ * belonging to the current header (continuation lines start with
+ * white space). 
+ *
+ * We get called with a fresh line already in the conn buffer, either
+ * from the previous http_next_header() invocation, or, the first
+ * time, from a fetch_getln() performed by our caller.
+ *
+ * This stops when we encounter an empty line (we dont read beyond the header
+ * area).
+ * 
+ * Note that the "headerbuf" is just a place to return the result. Its
+ * contents are not used for the next call. This means that no cleanup
+ * is needed when ie doing another connection, just call the cleanup when
+ * fully done to deallocate memory.
+ */
+
+/* Limit the max number of continuation lines to some reasonable value */
+#define HTTP_MAX_CONT_LINES 10
+
+/* Place into which to build a header from one or several lines */
+typedef struct {
+	char	*buf;		/* buffer */
+	size_t	 bufsize;	/* buffer size */
+	size_t	 buflen;	/* length of buffer contents */
+} http_headerbuf_t;
+
+static void
+init_http_headerbuf(http_headerbuf_t *buf)
 {
-	int i;
+	buf->buf = NULL;
+	buf->bufsize = 0;
+	buf->buflen = 0;
+}
 
-	if (fetch_getln(conn) == -1)
-		return (hdr_syserror);
-	while (conn->buflen && isspace((unsigned char)conn->buf[conn->buflen - 1]))
+static void 
+clean_http_headerbuf(http_headerbuf_t *buf)
+{
+	if (buf->buf)
+		free(buf->buf);
+	init_http_headerbuf(buf);
+}
+
+/* Remove whitespace at the end of the buffer */
+static void 
+http_conn_trimright(conn_t *conn)
+{
+	while (conn->buflen && 
+	       isspace((unsigned char)conn->buf[conn->buflen - 1]))
 		conn->buflen--;
 	conn->buf[conn->buflen] = '\0';
+}
+
+static hdr_t
+http_next_header(conn_t *conn, http_headerbuf_t *hbuf, const char **p)
+{
+	int i, len;
+
+	/* 
+	 * Have to do the stripping here because of the first line. So
+	 * it's done twice for the subsequent lines. No big deal 
+	 */
+	http_conn_trimright(conn);
 	if (conn->buflen == 0)
 		return (hdr_end);
+
+	/* Copy the line to the headerbuf */
+	if (hbuf->bufsize < conn->buflen + 1) {
+		if ((hbuf->buf = realloc(hbuf->buf, conn->buflen + 1)) == NULL)
+			return (hdr_syserror);
+		hbuf->bufsize = conn->buflen + 1;
+	}
+	strcpy(hbuf->buf, conn->buf);
+	hbuf->buflen = conn->buflen;
+
+	/* 
+	 * Fetch possible continuation lines. Stop at 1st non-continuation
+	 * and leave it in the conn buffer 
+         */
+	for (i = 0; i < HTTP_MAX_CONT_LINES; i++) {
+		if (fetch_getln(conn) == -1)
+			return (hdr_syserror);
+
+		/* 
+		 * Note: we carry on the idea from the previous version
+		 * that a pure whitespace line is equivalent to an empty
+		 * one (so it's not continuation and will be handled when
+		 * we are called next) 
+		 */
+		http_conn_trimright(conn);
+		if (conn->buf[0] != ' ' && conn->buf[0] != "\t"[0])
+			break;
+
+		/* Got a continuation line. Concatenate to previous */
+		len = hbuf->buflen + conn->buflen;
+		if (hbuf->bufsize < len + 1) {
+			len *= 2;
+			if ((hbuf->buf = realloc(hbuf->buf, len + 1)) == NULL)
+				return (hdr_syserror);
+			hbuf->bufsize = len + 1;
+		}
+		strcpy(hbuf->buf + hbuf->buflen, conn->buf);
+		hbuf->buflen += conn->buflen;
+	} 
+
 	/*
 	 * We could check for malformed headers but we don't really care.
 	 * A valid header starts with a token immediately followed by a
@@ -468,11 +564,290 @@ http_next_header(conn_t *conn, const cha
 	 * characters except "()<>@,;:\\\"{}".
 	 */
 	for (i = 0; hdr_names[i].num != hdr_unknown; i++)
-		if ((*p = http_match(hdr_names[i].name, conn->buf)) != NULL)
+		if ((*p = http_match(hdr_names[i].name, hbuf->buf)) != NULL)
 			return (hdr_names[i].num);
+
 	return (hdr_unknown);
 }
 
+/**************************
+ * [Proxy-]Authenticate header parsing
+ */
+
+/* 
+ * Read doublequote-delimited string into output buffer obuf (allocated 
+ * by caller, whose responsibility it is to ensure that it's big enough)
+ * cp points to the first char after the initial '"'
+ * Handles \ quoting 
+ * Returns pointer to the first char after the terminating double quote, or 
+ * NULL for error.
+ */
+static const char *
+http_parse_headerstring(const char *cp, char *obuf)
+{
+	for (;;) {
+		switch (*cp) {
+		case 0: /* Unterminated string */
+			*obuf = 0;
+			return (NULL);
+		case '"': /* Ending quote */
+			*obuf = 0;
+			return (++cp);
+		case '\\':
+			if (*++cp == 0) {
+				*obuf = 0;
+				return (NULL);
+			}
+			/* FALLTHROUGH */
+		default:
+			*obuf++ = *cp++;
+		}
+	}
+}
+
+/* Http auth challenge schemes */
+typedef enum {HTTPAS_UNKNOWN, HTTPAS_BASIC,HTTPAS_DIGEST} http_auth_schemes_t;
+
+/* Data holder for a Basic or Digest challenge. */
+typedef struct {
+	http_auth_schemes_t scheme;
+	char	*realm;
+	char	*qop;
+	char	*nonce;
+	char	*opaque;
+	char	*algo;
+	int	 stale;
+	int	 nc; /* Nonce count */
+} http_auth_challenge_t;
+
+static void 
+init_http_auth_challenge(http_auth_challenge_t *b)
+{
+	b->scheme = HTTPAS_UNKNOWN;
+	b->realm = b->qop = b->nonce = b->opaque = b->algo = NULL;
+	b->stale = b->nc = 0;
+}
+
+static void 
+clean_http_auth_challenge(http_auth_challenge_t *b)
+{
+	if (b->realm) 
+		free(b->realm);
+	if (b->qop) 
+		free(b->qop);
+	if (b->nonce) 
+		free(b->nonce);
+	if (b->opaque) 
+		free(b->opaque);
+	if (b->algo) 
+		free(b->algo);
+	init_http_auth_challenge(b);
+}
+
+/* Data holder for an array of challenges offered in an http response. */
+#define MAX_CHALLENGES 10
+typedef struct {
+	http_auth_challenge_t *challenges[MAX_CHALLENGES];
+	int	count; /* Number of parsed challenges in the array */
+	int	valid; /* We did parse an authenticate header */
+} http_auth_challenges_t;
+
+static void 
+init_http_auth_challenges(http_auth_challenges_t *cs)
+{
+	int i;
+	for (i = 0; i < MAX_CHALLENGES; i++)
+		cs->challenges[i] = NULL;
+	cs->count = cs->valid = 0;
+}
+
+static void 
+clean_http_auth_challenges(http_auth_challenges_t *cs)
+{
+	int i;
+	/* We rely on non-zero pointers being allocated, not on the count */
+	for (i = 0; i < MAX_CHALLENGES; i++) {
+		if (cs->challenges[i] != NULL) {
+			clean_http_auth_challenge(cs->challenges[i]);
+			free(cs->challenges[i]);
+		}
+	}
+	init_http_auth_challenges(cs);
+}
+
+/* 
+ * Enumeration for lexical elements. Separators will be returned as their own
+ * ascii value
+ */
+typedef enum {HTTPHL_WORD=256, HTTPHL_STRING=257, HTTPHL_END=258,
+	      HTTPHL_ERROR = 259} http_header_lex_t;
+
+/* 
+ * Determine what kind of token comes next and return possible value
+ * in buf, which is supposed to have been allocated big enough by
+ * caller. Advance input pointer and return element type. 
+ */
+static int 
+http_header_lex(const char **cpp, char *buf)
+{
+	size_t l;
+	/* Eat initial whitespace */
+	*cpp += strspn(*cpp, " \t");
+	if (**cpp == 0)
+		return (HTTPHL_END);
+
+	/* Separator ? */
+	if (**cpp == ',' || **cpp == '=')
+		return (*((*cpp)++));
+
+	/* String ? */
+	if (**cpp == '"') {
+		*cpp = http_parse_headerstring(++*cpp, buf);
+		if (*cpp == NULL)
+			return (HTTPHL_ERROR);
+		return (HTTPHL_STRING);
+	}
+
+	/* Read other token, until separator or whitespace */
+	l = strcspn(*cpp, " \t,=");
+	memcpy(buf, *cpp, l);
+	buf[l] = 0;
+	*cpp += l;
+	return (HTTPHL_WORD);
+}
+
+/* 
+ * Read challenges from http xxx-authenticate header and accumulate them
+ * in the challenges list structure.
+ *
+ * Headers with multiple challenges are specified by rfc2617, but
+ * servers (ie: squid) often send them in separate headers instead,
+ * which in turn is forbidden by the http spec (multiple headers with
+ * the same name are only allowed for pure comma-separated lists, see
+ * rfc2616 sec 4.2).
+ *
+ * We support both approaches anyway
+ */
+static int 
+http_parse_authenticate(const char *cp, http_auth_challenges_t *cs)
+{
+	int ret = -1;
+	http_header_lex_t lex;
+	char *key = malloc(strlen(cp) + 1);
+	char *value = malloc(strlen(cp) + 1);
+	char *buf = malloc(strlen(cp) + 1);
+
+	if (key == NULL || value == NULL || buf == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+
+	/* In any case we've seen the header and we set the valid bit */
+	cs->valid = 1;
+
+	/* Need word first */
+	lex = http_header_lex(&cp, key);
+	if (lex != HTTPHL_WORD)
+		goto out;
+
+	/* Loop on challenges */
+	for (; cs->count < MAX_CHALLENGES; cs->count++) {
+		cs->challenges[cs->count] = 
+			malloc(sizeof(http_auth_challenge_t));
+		if (cs->challenges[cs->count] == NULL) {
+			fetch_syserr();
+			goto out;
+		}
+		init_http_auth_challenge(cs->challenges[cs->count]);
+		if (!strcasecmp(key, "basic")) {
+			cs->challenges[cs->count]->scheme = HTTPAS_BASIC;
+		} else if (!strcasecmp(key, "digest")) {
+			cs->challenges[cs->count]->scheme = HTTPAS_DIGEST;
+		} else {
+			cs->challenges[cs->count]->scheme = HTTPAS_UNKNOWN;
+			/* 
+                         * Continue parsing as basic or digest may
+			 * follow, and the syntax is the same for
+			 * all. We'll just ignore this one when
+			 * looking at the list
+			 */
+		}
+	
+		/* Loop on attributes */
+		for (;;) {
+			/* Key */
+			lex = http_header_lex(&cp, key);
+			if (lex != HTTPHL_WORD)
+				goto out;
+
+			/* Equal sign */
+			lex = http_header_lex(&cp, buf);
+			if (lex != '=')
+				goto out;
+
+			/* Value */
+			lex = http_header_lex(&cp, value);
+			if (lex != HTTPHL_WORD && lex != HTTPHL_STRING)
+				goto out;
+
+			if (!strcasecmp(key, "realm"))
+				cs->challenges[cs->count]->realm = 
+					strdup(value);
+			else if (!strcasecmp(key, "qop"))
+				cs->challenges[cs->count]->qop = 
+					strdup(value);
+			else if (!strcasecmp(key, "nonce"))
+				cs->challenges[cs->count]->nonce = 
+					strdup(value);
+			else if (!strcasecmp(key, "opaque"))
+				cs->challenges[cs->count]->opaque = 
+					strdup(value);
+			else if (!strcasecmp(key, "algorithm"))
+				cs->challenges[cs->count]->algo = 
+					strdup(value);
+			else if (!strcasecmp(key, "stale"))
+				cs->challenges[cs->count]->stale = 
+					strcasecmp(value, "no");
+			/* Else ignore unknown attributes */
+
+			/* Comma or Next challenge or End */
+			lex = http_header_lex(&cp, key);
+			/* 
+                         * If we get a word here, this is the beginning of the
+			 * next challenge. Break the attributes loop 
+                         */
+			if (lex == HTTPHL_WORD)
+				break;
+
+			if (lex == HTTPHL_END) {
+				/* End while looking for ',' is normal exit */
+				cs->count++;
+				ret = 0;
+				goto out;
+			}
+			/* Anything else is an error */
+			if (lex != ',')
+				goto out;
+
+		} /* End attributes loop */
+	} /* End challenge loop */
+
+	/* 
+         * Challenges max count exceeded. This really can't happen
+	 * with normal data, something's fishy -> error 
+	 */ 
+
+out:
+	if (key)
+		free(key);
+	if (value)
+		free(value);
+	if (buf)
+		free(buf);
+	return (ret);
+}
+
+
 /*
  * Parse a last-modified header
  */
@@ -618,6 +993,291 @@ http_base64(const char *src)
 	return (str);
 }
 
+
+/*
+ * Extract authorization parameters from environment value.
+ * The value is like scheme:realm:user:pass
+ */
+typedef struct {
+	char	*scheme;
+	char	*realm;
+	char	*user;
+	char	*password;
+} http_auth_params_t;
+
+static void
+init_http_auth_params(http_auth_params_t *s)
+{
+	s->scheme = s->realm = s->user = s->password = 0;
+}
+
+static void 
+clean_http_auth_params(http_auth_params_t *s)
+{
+	if (s->scheme) 
+		free(s->scheme);
+	if (s->realm) 
+		free(s->realm);
+	if (s->user) 
+		free(s->user);
+	if (s->password) 
+		free(s->password);
+	init_http_auth_params(s);
+}
+
+static int
+http_authfromenv(const char *p, http_auth_params_t *parms)
+{
+	int ret = -1;
+	char *v, *ve;
+	char *str = strdup(p);
+
+	if (str == NULL) {
+		fetch_syserr();
+		return (-1);
+	}
+	v = str;
+
+	if ((ve = strchr(v, ':')) == NULL)
+		goto out;
+
+	*ve = 0;
+	if ((parms->scheme = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	v = ve + 1;
+
+	if ((ve = strchr(v, ':')) == NULL)
+		goto out;
+
+	*ve = 0;
+	if ((parms->realm = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	v = ve + 1;
+
+	if ((ve = strchr(v, ':')) == NULL)
+		goto out;
+
+	*ve = 0;
+	if ((parms->user = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	v = ve + 1;
+
+
+	if ((parms->password = strdup(v)) == NULL) {
+		fetch_syserr();
+		goto out;
+	}
+	ret = 0;
+out:
+	if (ret == -1) 
+		clean_http_auth_params(parms);
+	if (str)
+		free(str);
+	return (ret);
+}
+
+
+/* 
+ * Digest response: the code to compute the digest is taken from the
+ * sample implementation in RFC2616 
+ */
+#define IN
+#define OUT
+
+#define HASHLEN 16
+typedef char HASH[HASHLEN];
+#define HASHHEXLEN 32
+typedef char HASHHEX[HASHHEXLEN+1];
+
+static const char *hexchars = "0123456789abcdef";
+static void 
+CvtHex(IN HASH Bin, OUT HASHHEX Hex)
+{
+	unsigned short i;
+	unsigned char j;
+
+	for (i = 0; i < HASHLEN; i++) {
+		j = (Bin[i] >> 4) & 0xf;
+		Hex[i*2] = hexchars[j];
+		j = Bin[i] & 0xf;
+		Hex[i*2+1] = hexchars[j];
+	};
+	Hex[HASHHEXLEN] = '\0';
+};
+
+/* calculate H(A1) as per spec */
+static void 
+DigestCalcHA1(
+	IN char * pszAlg,
+	IN char * pszUserName,
+	IN char * pszRealm,
+	IN char * pszPassword,
+	IN char * pszNonce,
+	IN char * pszCNonce,
+	OUT HASHHEX SessionKey
+	)
+{
+	MD5_CTX Md5Ctx;
+	HASH HA1;
+
+	MD5Init(&Md5Ctx);
+	MD5Update(&Md5Ctx, pszUserName, strlen(pszUserName));
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm));
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword));
+	MD5Final(HA1, &Md5Ctx);
+	if (strcasecmp(pszAlg, "md5-sess") == 0) {
+
+		MD5Init(&Md5Ctx);
+		MD5Update(&Md5Ctx, HA1, HASHLEN);
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
+		MD5Final(HA1, &Md5Ctx);
+	};
+	CvtHex(HA1, SessionKey);
+}
+
+/* calculate request-digest/response-digest as per HTTP Digest spec */
+static void 
+DigestCalcResponse(
+	IN HASHHEX HA1,           /* H(A1) */
+	IN char * pszNonce,       /* nonce from server */
+	IN char * pszNonceCount,  /* 8 hex digits */
+	IN char * pszCNonce,      /* client nonce */
+	IN char * pszQop,         /* qop-value: "", "auth", "auth-int" */
+	IN char * pszMethod,      /* method from the request */
+	IN char * pszDigestUri,   /* requested URL */
+	IN HASHHEX HEntity,       /* H(entity body) if qop="auth-int" */
+	OUT HASHHEX Response      /* request-digest or response-digest */
+	)
+{
+/*	DEBUG(fprintf(stderr, 
+		      "Calc: HA1[%s] Nonce[%s] qop[%s] method[%s] URI[%s]\n",
+		      HA1, pszNonce, pszQop, pszMethod, pszDigestUri));*/
+	MD5_CTX Md5Ctx;
+	HASH HA2;
+	HASH RespHash;
+	HASHHEX HA2Hex;
+
+	// calculate H(A2)
+	MD5Init(&Md5Ctx);
+	MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod));
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszDigestUri, strlen(pszDigestUri));
+	if (strcasecmp(pszQop, "auth-int") == 0) {
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, HEntity, HASHHEXLEN);
+	};
+	MD5Final(HA2, &Md5Ctx);
+	CvtHex(HA2, HA2Hex);
+
+	// calculate response
+	MD5Init(&Md5Ctx);
+	MD5Update(&Md5Ctx, HA1, HASHHEXLEN);
+	MD5Update(&Md5Ctx, ":", 1);
+	MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce));
+	MD5Update(&Md5Ctx, ":", 1);
+	if (*pszQop) {
+		MD5Update(&Md5Ctx, pszNonceCount, strlen(pszNonceCount));
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce));
+		MD5Update(&Md5Ctx, ":", 1);
+		MD5Update(&Md5Ctx, pszQop, strlen(pszQop));
+		MD5Update(&Md5Ctx, ":", 1);
+	};
+	MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN);
+	MD5Final(RespHash, &Md5Ctx);
+	CvtHex(RespHash, Response);
+}
+
+/* 
+ * Generate/Send a Digest authorization header 
+ * This looks like: [Proxy-]Authorization: credentials
+ *
+ *  credentials      = "Digest" digest-response
+ *  digest-response  = 1#( username | realm | nonce | digest-uri
+ *                      | response | [ algorithm ] | [cnonce] |
+ *                      [opaque] | [message-qop] |
+ *                          [nonce-count]  | [auth-param] )
+ *  username         = "username" "=" username-value
+ *  username-value   = quoted-string
+ *  digest-uri       = "uri" "=" digest-uri-value
+ *  digest-uri-value = request-uri   ; As specified by HTTP/1.1
+ *  message-qop      = "qop" "=" qop-value
+ *  cnonce           = "cnonce" "=" cnonce-value
+ *  cnonce-value     = nonce-value
+ *  nonce-count      = "nc" "=" nc-value
+ *  nc-value         = 8LHEX
+ *  response         = "response" "=" request-digest
+ *  request-digest = <"> 32LHEX <">
+ */
+static int
+http_digest_auth(conn_t *conn, const char *hdr, http_auth_challenge_t *c,
+		 http_auth_params_t *parms, struct url *url)
+{
+	int r;
+	char noncecount[10];
+	char cnonce[40];
+	char *options = 0;
+
+	if (!c->realm || !c->nonce) {
+		DEBUG(fprintf(stderr, "realm/nonce not set in challenge\n"));
+		return(-1);
+	}
+	if (!c->algo) 
+		c->algo = strdup("");
+
+	if (asprintf(&options, "%s%s%s%s", 
+		     *c->algo? ",algorithm=" : "", c->algo,
+		     c->opaque? ",opaque=" : "", c->opaque?c->opaque:"")== -1)
+		return (-1);
+
+	if (!c->qop) {
+		c->qop = strdup("");
+		*noncecount = 0;
+		*cnonce = 0;
+	} else {
+		c->nc++;
+		sprintf(noncecount, "%08x", c->nc);
+		/* We don't try very hard with the cnonce ... */
+		sprintf(cnonce, "%x%lx", getpid(), (unsigned long)time(0));
+	}
+
+	HASHHEX HA1;
+	DigestCalcHA1(c->algo, parms->user, c->realm,
+		      parms->password, c->nonce, cnonce, HA1);
+	DEBUG(fprintf(stderr, "HA1: [%s]\n", HA1));
+	HASHHEX digest;
+	DigestCalcResponse(HA1, c->nonce, noncecount, cnonce, c->qop,
+			   "GET", url->doc, "", digest);
+
+	if (c->qop[0]) {
+		r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\","
+			     "nonce=\"%s\",uri=\"%s\",response=\"%s\","
+			     "qop=\"auth\", cnonce=\"%s\", nc=%s%s",
+			     hdr, parms->user, c->realm, 
+			     c->nonce, url->doc, digest,
+			     cnonce, noncecount, options);
+	} else {
+		r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\","
+			     "nonce=\"%s\",uri=\"%s\",response=\"%s\"%s",
+			     hdr, parms->user, c->realm, 
+			     c->nonce, url->doc, digest, options);
+	}
+	if (options)
+		free(options);
+	return (r);
+}
+
 /*
  * Encode username and password
  */
@@ -627,8 +1287,8 @@ http_basic_auth(conn_t *conn, const char
 	char *upw, *auth;
 	int r;
 
-	DEBUG(fprintf(stderr, "usr: [%s]\n", usr));
-	DEBUG(fprintf(stderr, "pwd: [%s]\n", pwd));
+	DEBUG(fprintf(stderr, "basic: usr: [%s]\n", usr));
+	DEBUG(fprintf(stderr, "basic: pwd: [%s]\n", pwd));
 	if (asprintf(&upw, "%s:%s", usr, pwd) == -1)
 		return (-1);
 	auth = http_base64(upw);
@@ -641,33 +1301,49 @@ http_basic_auth(conn_t *conn, const char
 }
 
 /*
- * Send an authorization header
+ * Chose the challenge to answer and call the appropriate routine to 
+ * produce the header.
  */
 static int
-http_authorize(conn_t *conn, const char *hdr, const char *p)
+http_authorize(conn_t *conn, const char *hdr, http_auth_challenges_t *cs,
+	       http_auth_params_t *parms, struct url *url)
 {
-	/* basic authorization */
-	if (strncasecmp(p, "basic:", 6) == 0) {
-		char *user, *pwd, *str;
-		int r;
-
-		/* skip realm */
-		for (p += 6; *p && *p != ':'; ++p)
-			/* nothing */ ;
-		if (!*p || strchr(++p, ':') == NULL)
-			return (-1);
-		if ((str = strdup(p)) == NULL)
-			return (-1); /* XXX */
-		user = str;
-		pwd = strchr(str, ':');
-		*pwd++ = '\0';
-		r = http_basic_auth(conn, hdr, user, pwd);
-		free(str);
-		return (r);
+	http_auth_challenge_t *basic = NULL;
+	http_auth_challenge_t *digest = NULL;
+	int i;
+
+	/* If user or pass are null we're not happy */
+	if (!parms->user || !parms->password) {
+		DEBUG(fprintf(stderr, "NULL usr or pass\n"));
+		return (-1);
 	}
-	return (-1);
-}
 
+	/* Look for a Digest and a Basic challenge */
+	for (i = 0; i < cs->count; i++) {
+		if (cs->challenges[i]->scheme == HTTPAS_BASIC)
+			basic = cs->challenges[i];
+		if (cs->challenges[i]->scheme == HTTPAS_DIGEST)
+			digest = cs->challenges[i];
+	}
+
+	/* Error if "Digest" was specified and there is no Digest challenge */
+	if (!digest && (parms->scheme && 
+			!strcasecmp(parms->scheme, "digest"))) {
+		DEBUG(fprintf(stderr, 
+			      "Digest auth in env, not supported by peer\n"));
+		return (-1);
+	}
+	/* 
+         * If "basic" was specified in the environment, or there is no Digest
+	 * challenge, do the basic thing. Don't need a challenge for this,
+	 * so no need to check basic!=NULL 
+	 */
+	if (!digest || (parms->scheme && !strcasecmp(parms->scheme,"basic")))
+		return (http_basic_auth(conn,hdr,parms->user,parms->password));
+
+	/* Else, prefer digest. We just checked that it's not NULL */
+	return (http_digest_auth(conn, hdr, digest, parms, url));
+}
 
 /*****************************************************************************
  * Helper functions for connecting to a server or proxy
@@ -797,13 +1473,13 @@ http_print_html(FILE *out, FILE *in)
  */
 FILE *
 http_request(struct url *URL, const char *op, struct url_stat *us,
-    struct url *purl, const char *flags)
+	struct url *purl, const char *flags)
 {
 	char timebuf[80];
 	char hbuf[MAXHOSTNAMELEN + 7], *host;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 15:22:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 92AD4106566B;
	Wed, 27 Jan 2010 15:22:20 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 813198FC0A;
	Wed, 27 Jan 2010 15:22:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RFMKDj051754;
	Wed, 27 Jan 2010 15:22:20 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RFMKJI051747;
	Wed, 27 Jan 2010 15:22:20 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201001271522.o0RFMKJI051747@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Jan 2010 15:22:20 +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: r203072 - head/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 15:22:20 -0000

Author: rmacklem
Date: Wed Jan 27 15:22:20 2010
New Revision: 203072
URL: http://svn.freebsd.org/changeset/base/203072

Log:
  Fix a race that can occur when nfs nfsiod threads are being created.
  Without this patch it was possible for a different thread that calls
  nfs_asyncio() to snitch a newly created nfsiod thread that was
  intended for another caller of nfs_asyncio(), because the nfs_iod_mtx
  mutex was unlocked while the new nfsiod thread was created. This patch
  labels the newly created nfsiod, so that it is not taken by another
  caller of nfs_asyncio(). This is believed to fix the problem reported
  on the freebsd-stable email list under the subject:
  FreeBSD NFS client/Linux NFS server issue.
  
  Tested by:	to DOT my DOT trociny AT gmail DOT com
  Reviewed by:	jhb
  MFC after:	2 weeks

Modified:
  head/sys/nfsclient/nfs.h
  head/sys/nfsclient/nfs_bio.c
  head/sys/nfsclient/nfs_nfsiod.c
  head/sys/nfsclient/nfs_subs.c
  head/sys/nfsclient/nfs_vnops.c
  head/sys/nfsclient/nfsnode.h

Modified: head/sys/nfsclient/nfs.h
==============================================================================
--- head/sys/nfsclient/nfs.h	Wed Jan 27 14:54:48 2010	(r203071)
+++ head/sys/nfsclient/nfs.h	Wed Jan 27 15:22:20 2010	(r203072)
@@ -252,7 +252,7 @@ int	nfs_writerpc(struct vnode *, struct 
 int	nfs_commit(struct vnode *vp, u_quad_t offset, int cnt,
 	    struct ucred *cred, struct thread *td);
 int	nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *);
-int	nfs_nfsiodnew(void);
+int	nfs_nfsiodnew(int);
 int	nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *);
 int	nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
 void	nfs_doio_directwrite (struct buf *);

Modified: head/sys/nfsclient/nfs_bio.c
==============================================================================
--- head/sys/nfsclient/nfs_bio.c	Wed Jan 27 14:54:48 2010	(r203071)
+++ head/sys/nfsclient/nfs_bio.c	Wed Jan 27 15:22:20 2010	(r203072)
@@ -1377,7 +1377,7 @@ again:
 	 * Find a free iod to process this request.
 	 */
 	for (iod = 0; iod < nfs_numasync; iod++)
-		if (nfs_iodwant[iod]) {
+		if (nfs_iodwant[iod] == NFSIOD_AVAILABLE) {
 			gotiod = TRUE;
 			break;
 		}
@@ -1386,7 +1386,7 @@ again:
 	 * Try to create one if none are free.
 	 */
 	if (!gotiod) {
-		iod = nfs_nfsiodnew();
+		iod = nfs_nfsiodnew(1);
 		if (iod != -1)
 			gotiod = TRUE;
 	}
@@ -1398,7 +1398,7 @@ again:
 		 */
 		NFS_DPF(ASYNCIO, ("nfs_asyncio: waking iod %d for mount %p\n",
 		    iod, nmp));
-		nfs_iodwant[iod] = NULL;
+		nfs_iodwant[iod] = NFSIOD_NOT_AVAILABLE;
 		nfs_iodmount[iod] = nmp;
 		nmp->nm_bufqiods++;
 		wakeup(&nfs_iodwant[iod]);

Modified: head/sys/nfsclient/nfs_nfsiod.c
==============================================================================
--- head/sys/nfsclient/nfs_nfsiod.c	Wed Jan 27 14:54:48 2010	(r203071)
+++ head/sys/nfsclient/nfs_nfsiod.c	Wed Jan 27 15:22:20 2010	(r203072)
@@ -113,7 +113,7 @@ sysctl_iodmin(SYSCTL_HANDLER_ARGS)
 	 * than the new minimum, create some more.
 	 */
 	for (i = nfs_iodmin - nfs_numasync; i > 0; i--)
-		nfs_nfsiodnew();
+		nfs_nfsiodnew(0);
 out:
 	mtx_unlock(&nfs_iod_mtx);	
 	return (0);
@@ -147,7 +147,7 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS)
 	 */
 	iod = nfs_numasync - 1;
 	for (i = 0; i < nfs_numasync - nfs_iodmax; i++) {
-		if (nfs_iodwant[iod])
+		if (nfs_iodwant[iod] == NFSIOD_AVAILABLE)
 			wakeup(&nfs_iodwant[iod]);
 		iod--;
 	}
@@ -160,7 +160,7 @@ SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, 
     "Max number of nfsiod kthreads");
 
 int
-nfs_nfsiodnew(void)
+nfs_nfsiodnew(int set_iodwant)
 {
 	int error, i;
 	int newiod;
@@ -176,12 +176,17 @@ nfs_nfsiodnew(void)
 		}
 	if (newiod == -1)
 		return (-1);
+	if (set_iodwant > 0)
+		nfs_iodwant[i] = NFSIOD_CREATED_FOR_NFS_ASYNCIO;
 	mtx_unlock(&nfs_iod_mtx);
 	error = kproc_create(nfssvc_iod, nfs_asyncdaemon + i, NULL, RFHIGHPID,
 	    0, "nfsiod %d", newiod);
 	mtx_lock(&nfs_iod_mtx);
-	if (error)
+	if (error) {
+		if (set_iodwant > 0)
+			nfs_iodwant[i] = NFSIOD_NOT_AVAILABLE;
 		return (-1);
+	}
 	nfs_numasync++;
 	return (newiod);
 }
@@ -199,7 +204,7 @@ nfsiod_setup(void *dummy)
 		nfs_iodmin = NFS_MAXASYNCDAEMON;
 
 	for (i = 0; i < nfs_iodmin; i++) {
-		error = nfs_nfsiodnew();
+		error = nfs_nfsiodnew(0);
 		if (error == -1)
 			panic("nfsiod_setup: nfs_nfsiodnew failed");
 	}
@@ -236,7 +241,8 @@ nfssvc_iod(void *instance)
 			goto finish;
 		if (nmp)
 			nmp->nm_bufqiods--;
-		nfs_iodwant[myiod] = curthread->td_proc;
+		if (nfs_iodwant[myiod] == NFSIOD_NOT_AVAILABLE)
+			nfs_iodwant[myiod] = NFSIOD_AVAILABLE;
 		nfs_iodmount[myiod] = NULL;
 		/*
 		 * Always keep at least nfs_iodmin kthreads.
@@ -303,7 +309,7 @@ finish:
 	nfs_asyncdaemon[myiod] = 0;
 	if (nmp)
 	    nmp->nm_bufqiods--;
-	nfs_iodwant[myiod] = NULL;
+	nfs_iodwant[myiod] = NFSIOD_NOT_AVAILABLE;
 	nfs_iodmount[myiod] = NULL;
 	/* Someone may be waiting for the last nfsiod to terminate. */
 	if (--nfs_numasync == 0)

Modified: head/sys/nfsclient/nfs_subs.c
==============================================================================
--- head/sys/nfsclient/nfs_subs.c	Wed Jan 27 14:54:48 2010	(r203071)
+++ head/sys/nfsclient/nfs_subs.c	Wed Jan 27 15:22:20 2010	(r203072)
@@ -347,7 +347,7 @@ nfs_init(struct vfsconf *vfsp)
 		nfs_ticks = 1;
 	/* Ensure async daemons disabled */
 	for (i = 0; i < NFS_MAXASYNCDAEMON; i++) {
-		nfs_iodwant[i] = NULL;
+		nfs_iodwant[i] = NFSIOD_NOT_AVAILABLE;
 		nfs_iodmount[i] = NULL;
 	}
 	nfs_nhinit();			/* Init the nfsnode table */
@@ -375,7 +375,7 @@ nfs_uninit(struct vfsconf *vfsp)
 	mtx_lock(&nfs_iod_mtx);
 	nfs_iodmax = 0;
 	for (i = 0; i < nfs_numasync; i++)
-		if (nfs_iodwant[i])
+		if (nfs_iodwant[i] == NFSIOD_AVAILABLE)
 			wakeup(&nfs_iodwant[i]);
 	/* The last nfsiod to exit will wake us up when nfs_numasync hits 0 */
 	while (nfs_numasync)

Modified: head/sys/nfsclient/nfs_vnops.c
==============================================================================
--- head/sys/nfsclient/nfs_vnops.c	Wed Jan 27 14:54:48 2010	(r203071)
+++ head/sys/nfsclient/nfs_vnops.c	Wed Jan 27 15:22:20 2010	(r203072)
@@ -212,7 +212,7 @@ static int	nfs_renameit(struct vnode *sd
  * Global variables
  */
 struct mtx 	nfs_iod_mtx;
-struct proc	*nfs_iodwant[NFS_MAXASYNCDAEMON];
+enum nfsiod_state nfs_iodwant[NFS_MAXASYNCDAEMON];
 struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
 int		 nfs_numasync = 0;
 vop_advlock_t	*nfs_advlock_p = nfs_dolock;

Modified: head/sys/nfsclient/nfsnode.h
==============================================================================
--- head/sys/nfsclient/nfsnode.h	Wed Jan 27 14:54:48 2010	(r203071)
+++ head/sys/nfsclient/nfsnode.h	Wed Jan 27 15:22:20 2010	(r203072)
@@ -177,10 +177,23 @@ struct nfsnode {
 #define NFS_TIMESPEC_COMPARE(T1, T2)	(((T1)->tv_sec != (T2)->tv_sec) || ((T1)->tv_nsec != (T2)->tv_nsec))
 
 /*
+ * NFS iod threads can be in one of these three states once spawned.
+ * NFSIOD_NOT_AVAILABLE - Cannot be assigned an I/O operation at this time.
+ * NFSIOD_AVAILABLE - Available to be assigned an I/O operation.
+ * NFSIOD_CREATED_FOR_NFS_ASYNCIO - Newly created for nfs_asyncio() and
+ *	will be used by the thread that called nfs_asyncio().
+ */
+enum nfsiod_state {
+	NFSIOD_NOT_AVAILABLE = 0,
+	NFSIOD_AVAILABLE = 1,
+	NFSIOD_CREATED_FOR_NFS_ASYNCIO = 2,
+};
+
+/*
  * Queue head for nfsiod's
  */
 extern TAILQ_HEAD(nfs_bufq, buf) nfs_bufq;
-extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
+extern enum nfsiod_state nfs_iodwant[NFS_MAXASYNCDAEMON];
 extern struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
 
 #if defined(_KERNEL)

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 15:29:09 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6EF101065670;
	Wed, 27 Jan 2010 15:29:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5DCBF8FC17;
	Wed, 27 Jan 2010 15:29:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RFT99Q053274;
	Wed, 27 Jan 2010 15:29:09 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RFT9g6053272;
	Wed, 27 Jan 2010 15:29:09 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001271529.o0RFT9g6053272@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Jan 2010 15:29:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203073 - stable/7/sys/amd64/amd64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 15:29:09 -0000

Author: jhb
Date: Wed Jan 27 15:29:09 2010
New Revision: 203073
URL: http://svn.freebsd.org/changeset/base/203073

Log:
  MFC 185715:
  Change the default value for the flag enabling superpage mapping and
  promotion to "on".
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/7/sys/amd64/amd64/pmap.c	Wed Jan 27 15:22:20 2010	(r203072)
+++ stable/7/sys/amd64/amd64/pmap.c	Wed Jan 27 15:29:09 2010	(r203073)
@@ -180,7 +180,7 @@ pt_entry_t pg_nx;
 
 SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
 
-static int pg_ps_enabled;
+static int pg_ps_enabled = 1;
 SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0,
     "Are large page mappings enabled?");
 

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 15:36:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 77C5B106566B;
	Wed, 27 Jan 2010 15:36:19 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 65F968FC15;
	Wed, 27 Jan 2010 15:36:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RFaJQr054906;
	Wed, 27 Jan 2010 15:36:19 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RFaJnN054904;
	Wed, 27 Jan 2010 15:36:19 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201001271536.o0RFaJnN054904@svn.freebsd.org>
From: Gavin Atkinson 
Date: Wed, 27 Jan 2010 15:36:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203074 - stable/8/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 15:36:19 -0000

Author: gavin
Date: Wed Jan 27 15:36:19 2010
New Revision: 203074
URL: http://svn.freebsd.org/changeset/base/203074

Log:
  Merge r200318 from head:  add myself to calendar.freebsd.

Modified:
  stable/8/usr.bin/calendar/calendars/calendar.freebsd   (contents, props changed)
Directory Properties:
  stable/8/usr.bin/calendar/   (props changed)

Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- stable/8/usr.bin/calendar/calendars/calendar.freebsd	Wed Jan 27 15:29:09 2010	(r203073)
+++ stable/8/usr.bin/calendar/calendars/calendar.freebsd	Wed Jan 27 15:36:19 2010	(r203074)
@@ -283,6 +283,7 @@
 11/18	Thomas Quinot  born in Paris, France, 1977
 11/19	Konstantin Belousov  born in Kiev, USSR, 1972
 11/20	Dmitry Morozovsky  born in Moscow, USSR, 1968
+11/20	Gavin Atkinson  born in Middlesbrough, United Kingdom, 1979
 11/23	Josef Lawrence Karthauser  born in Pembury, Kent, United Kingdom, 1972
 11/24	Andrey Zakhvatov  born in Chelyabinsk, Russian Federation, 1974
 11/24	Daniel Gerzo  born in Bratislava, Slovakia, 1986

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 15:40:08 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DB958106566B;
	Wed, 27 Jan 2010 15:40:08 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247])
	by mx1.freebsd.org (Postfix) with ESMTP id 6BC588FC0A;
	Wed, 27 Jan 2010 15:40:08 +0000 (UTC)
Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30])
	by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id o0RFe1CP006479;
	Wed, 27 Jan 2010 15:40:01 GMT
Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk)
	by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68)
	(envelope-from )
	id 1Na9zt-0001d0-JL; Wed, 27 Jan 2010 15:40:01 +0000
Received: from buffy.york.ac.uk (localhost [127.0.0.1])
	by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id o0RFe1qE008887;
	Wed, 27 Jan 2010 15:40:01 GMT (envelope-from gavin@FreeBSD.org)
Received: (from ga9@localhost)
	by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id o0RFe1OY008886;
	Wed, 27 Jan 2010 15:40:01 GMT (envelope-from gavin@FreeBSD.org)
X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to
	gavin@FreeBSD.org using -f
From: Gavin Atkinson 
To: src-committers@FreeBSD.org
In-Reply-To: <201001271536.o0RFaJnN054904@svn.freebsd.org>
References: <201001271536.o0RFaJnN054904@svn.freebsd.org>
Content-Type: text/plain; charset="ASCII"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 27 Jan 2010 15:40:00 +0000
Message-ID: <1264606800.7054.8.camel@buffy.york.ac.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.1 FreeBSD GNOME Team Port 
X-York-MailScanner: Found to be clean
X-York-MailScanner-From: gavin@freebsd.org
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	svn-src-stable-8@FreeBSD.org
Subject: Re: svn commit: r203074 - stable/8/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 15:40:09 -0000

On Wed, 2010-01-27 at 15:36 +0000, Gavin Atkinson wrote:
> Author: gavin
> Date: Wed Jan 27 15:36:19 2010
> New Revision: 203074
> URL: http://svn.freebsd.org/changeset/base/203074
>=20
> Log:
>   Merge r200318 from head:  add myself to calendar.freebsd.

Sorry, forgot:

Approved by: ed (mentor, implicit)

> Modified:
>   stable/8/usr.bin/calendar/calendars/calendar.freebsd   (contents, props=
 changed)
> Directory Properties:
>   stable/8/usr.bin/calendar/   (props changed)

This mergeinfo issue appears to be related to a mismerge of r196252:
I've left it as it was.

Gavin

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 16:15:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3B723106566B;
	Wed, 27 Jan 2010 16:15:20 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B0ED8FC12;
	Wed, 27 Jan 2010 16:15:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RGFKht063433;
	Wed, 27 Jan 2010 16:15:20 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RGFK1D063431;
	Wed, 27 Jan 2010 16:15:20 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201001271615.o0RGFK1D063431@svn.freebsd.org>
From: Warner Losh 
Date: Wed, 27 Jan 2010 16:15:20 +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: r203075 - head/sys/mips/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 16:15:20 -0000

Author: imp
Date: Wed Jan 27 16:15:19 2010
New Revision: 203075
URL: http://svn.freebsd.org/changeset/base/203075

Log:
  Move back to physical address 0x01000000.  0x00100000 seems to have
  problems sometimes for reasons I haven't tracked down.

Modified:
  head/sys/mips/conf/OCTEON1-32

Modified: head/sys/mips/conf/OCTEON1-32
==============================================================================
--- head/sys/mips/conf/OCTEON1-32	Wed Jan 27 15:36:19 2010	(r203074)
+++ head/sys/mips/conf/OCTEON1-32	Wed Jan 27 16:15:19 2010	(r203075)
@@ -26,8 +26,8 @@ makeoptions	MODULES_OVERRIDE=""
 makeoptions     TARGET_BIG_ENDIAN=defined
 makeoptions     LDSCRIPT_NAME=ldscript.mips.octeon1.32
 
-options		KERNVIRTADDR=0x80100000
-makeoptions	KERNLOADADDR=0x80100000
+options		KERNVIRTADDR=0x81000000
+makeoptions	KERNLOADADDR=0x81000000
 include		"../cavium/std.octeon1"
 
 hints		"OCTEON1.hints"		#Default places to look for devices.

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 16:21:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A8F99106568B;
	Wed, 27 Jan 2010 16:21:32 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9801A8FC08;
	Wed, 27 Jan 2010 16:21:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RGLW9D064928;
	Wed, 27 Jan 2010 16:21:32 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RGLWcK064926;
	Wed, 27 Jan 2010 16:21:32 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201001271621.o0RGLWcK064926@svn.freebsd.org>
From: Warner Losh 
Date: Wed, 27 Jan 2010 16:21:32 +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: r203076 - head/sys/mips/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 16:21:32 -0000

Author: imp
Date: Wed Jan 27 16:21:32 2010
New Revision: 203076
URL: http://svn.freebsd.org/changeset/base/203076

Log:
  Make a note that this file is the 64-bit version and experimental and
  point people at the OCTEON1-32 file instead.

Modified:
  head/sys/mips/conf/OCTEON1

Modified: head/sys/mips/conf/OCTEON1
==============================================================================
--- head/sys/mips/conf/OCTEON1	Wed Jan 27 16:15:19 2010	(r203075)
+++ head/sys/mips/conf/OCTEON1	Wed Jan 27 16:21:32 2010	(r203076)
@@ -17,6 +17,13 @@
 #
 # $FreeBSD$
 
+##############################################################################
+###                                                                        ###
+### PLEASE NOTE: This file is the experimental 64-bit kernel.  If you want ###
+### a stable kernel, please use the 32-bit OCTEON1-32 instead.             ###
+###                                                                        ###
+##############################################################################
+
 machine		mips
 cpu		CPU_MIPS4KC
 ident		OCTEON1

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 16:47:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED656106568F;
	Wed, 27 Jan 2010 16:47:02 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DD2528FC15;
	Wed, 27 Jan 2010 16:47:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RGl2Q5070592;
	Wed, 27 Jan 2010 16:47:02 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RGl29q070590;
	Wed, 27 Jan 2010 16:47:02 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <201001271647.o0RGl29q070590@svn.freebsd.org>
From: Ed Maste 
Date: Wed, 27 Jan 2010 16:47:02 +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: r203077 - head/lib/libc/stdlib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 16:47:03 -0000

Author: emaste
Date: Wed Jan 27 16:47:02 2010
New Revision: 203077
URL: http://svn.freebsd.org/changeset/base/203077

Log:
  Add missing return, in a rare case where we can't allocate memory in
  deallocate.
  
  Submitted by:	Ryan Stone (rysto32 at gmail dot com)
  Approved by:	jasone

Modified:
  head/lib/libc/stdlib/malloc.c

Modified: head/lib/libc/stdlib/malloc.c
==============================================================================
--- head/lib/libc/stdlib/malloc.c	Wed Jan 27 16:21:32 2010	(r203076)
+++ head/lib/libc/stdlib/malloc.c	Wed Jan 27 16:47:02 2010	(r203077)
@@ -3800,6 +3800,7 @@ arena_dalloc(arena_t *arena, arena_chunk
 					arena_dalloc_small(arena, chunk, ptr,
 					    mapelm);
 					malloc_spin_unlock(&arena->lock);
+					return;
 				}
 				mag_rack = rack;
 			}

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 17:00:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56FDE1065672;
	Wed, 27 Jan 2010 17:00:43 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4630E8FC14;
	Wed, 27 Jan 2010 17:00:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RH0gNk073638;
	Wed, 27 Jan 2010 17:00:42 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RH0gMd073636;
	Wed, 27 Jan 2010 17:00:42 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201001271700.o0RH0gMd073636@svn.freebsd.org>
From: Jung-uk Kim 
Date: Wed, 27 Jan 2010 17:00: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: r203078 - head/sys/dev/fb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 17:00:43 -0000

Author: jkim
Date: Wed Jan 27 17:00:42 2010
New Revision: 203078
URL: http://svn.freebsd.org/changeset/base/203078

Log:
  Use VESA palette load/save functions if VESA BIOS says the current palette
  format is higher than 6-bit instead of relying VGA compatibility flag.
  This fixes palette problem of NVIDIA GeForce 6600.  Reduce code differences
  between palette load/save functions while we are here.
  
  Tested by:	danfe

Modified:
  head/sys/dev/fb/vesa.c

Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c	Wed Jan 27 16:47:02 2010	(r203077)
+++ head/sys/dev/fb/vesa.c	Wed Jan 27 17:00:42 2010	(r203078)
@@ -1367,10 +1367,11 @@ vesa_save_palette(video_adapter_t *adp, 
 {
 	int bits;
 
-	if ((adp == vesa_adp) &&
-	    (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 &&
-	    (bits = vesa_bios_get_dac()) >= 6)
-		return (vesa_bios_save_palette(0, 256, palette, bits));
+	if (adp == vesa_adp && VESA_MODE(adp->va_mode)) {
+		bits = vesa_bios_get_dac();
+		if ((adp->va_info.vi_flags & V_INFO_NONVGA) != 0 || bits > 6)
+			return (vesa_bios_save_palette(0, 256, palette, bits));
+	}
 
 	return ((*prevvidsw->save_palette)(adp, palette));
 }
@@ -1380,10 +1381,11 @@ vesa_load_palette(video_adapter_t *adp, 
 {
 	int bits;
 
-	if ((adp == vesa_adp) &&
-	    (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 &&
-	    (bits = vesa_bios_get_dac()) >= 6)
-		return (vesa_bios_load_palette(0, 256, palette, bits));
+	if (adp == vesa_adp && VESA_MODE(adp->va_mode)) {
+		bits = vesa_bios_get_dac();
+		if ((adp->va_info.vi_flags & V_INFO_NONVGA) != 0 || bits > 6)
+			return (vesa_bios_load_palette(0, 256, palette, bits));
+	}
 
 	return ((*prevvidsw->load_palette)(adp, palette));
 }
@@ -1581,12 +1583,14 @@ get_palette(video_adapter_t *adp, int ba
 	int bits;
 	int error;
 
-	if ((base < 0) || (base >= 256) || (count < 0) || (count > 256))
+	if (base < 0 || base >= 256 || count < 0 || count > 256)
 		return (1);
 	if ((base + count) > 256)
 		return (1);
-	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 ||
-	    (bits = vesa_bios_get_dac()) < 6)
+	if (!VESA_MODE(adp->va_mode))
+		return (1);
+	bits = vesa_bios_get_dac();
+	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 && bits <= 6)
 		return (1);
 
 	r = malloc(count * 3, M_DEVBUF, M_WAITOK);
@@ -1617,10 +1621,14 @@ set_palette(video_adapter_t *adp, int ba
 	int bits;
 	int error;
 
-	if ((base < 0) || (base >= 256) || (base + count > 256))
+	if (base < 0 || base >= 256 || count < 0 || count > 256)
+		return (1);
+	if ((base + count) > 256)
+		return (1);
+	if (!VESA_MODE(adp->va_mode))
 		return (1);
-	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 ||
-	    (bits = vesa_bios_get_dac()) < 6)
+	bits = vesa_bios_get_dac();
+	if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 && bits <= 6)
 		return (1);
 
 	r = malloc(count * 3, M_DEVBUF, M_WAITOK);

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 17:03:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B962106568B;
	Wed, 27 Jan 2010 17:03:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5154D8FC13;
	Wed, 27 Jan 2010 17:03:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RH3eDu074364;
	Wed, 27 Jan 2010 17:03:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RH3egO074363;
	Wed, 27 Jan 2010 17:03:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001271703.o0RH3egO074363@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Jan 2010 17:03:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203079 - stable/8/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 17:03:40 -0000

Author: jhb
Date: Wed Jan 27 17:03:40 2010
New Revision: 203079
URL: http://svn.freebsd.org/changeset/base/203079

Log:
  Fixup mergeinfo.

Modified:
Directory Properties:
  stable/8/usr.bin/calendar/   (props changed)
  stable/8/usr.bin/calendar/calendars/calendar.freebsd   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 17:04:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D9AD01065670;
	Wed, 27 Jan 2010 17:04:15 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id AA40C8FC26;
	Wed, 27 Jan 2010 17:04:15 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 3499046B2E;
	Wed, 27 Jan 2010 12:04:15 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 6C99C8A01F;
	Wed, 27 Jan 2010 12:04:14 -0500 (EST)
From: John Baldwin 
To: Gavin Atkinson 
Date: Wed, 27 Jan 2010 12:03:56 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; )
References: <201001271536.o0RFaJnN054904@svn.freebsd.org>
	<1264606800.7054.8.camel@buffy.york.ac.uk>
In-Reply-To: <1264606800.7054.8.camel@buffy.york.ac.uk>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201001271203.56836.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Wed, 27 Jan 2010 12:04:14 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r203074 - stable/8/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 17:04:16 -0000

On Wednesday 27 January 2010 10:40:00 am Gavin Atkinson wrote:
> On Wed, 2010-01-27 at 15:36 +0000, Gavin Atkinson wrote:
> > Author: gavin
> > Date: Wed Jan 27 15:36:19 2010
> > New Revision: 203074
> > URL: http://svn.freebsd.org/changeset/base/203074
> > 
> > Log:
> >   Merge r200318 from head:  add myself to calendar.freebsd.
> 
> Sorry, forgot:
> 
> Approved by: ed (mentor, implicit)
> 
> > Modified:
> >   stable/8/usr.bin/calendar/calendars/calendar.freebsd   (contents, props changed)
> > Directory Properties:
> >   stable/8/usr.bin/calendar/   (props changed)
> 
> This mergeinfo issue appears to be related to a mismerge of r196252:
> I've left it as it was.

I've fixed it, thanks.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 17:15:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C3E71065672;
	Wed, 27 Jan 2010 17:15:18 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 130D78FC1D;
	Wed, 27 Jan 2010 17:15:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RHFHjr076925;
	Wed, 27 Jan 2010 17:15:17 GMT (envelope-from kan@svn.freebsd.org)
Received: (from kan@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RHFHxv076923;
	Wed, 27 Jan 2010 17:15:17 GMT (envelope-from kan@svn.freebsd.org)
Message-Id: <201001271715.o0RHFHxv076923@svn.freebsd.org>
From: Alexander Kabaev 
Date: Wed, 27 Jan 2010 17:15:17 +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: r203080 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 17:15:18 -0000

Author: kan
Date: Wed Jan 27 17:15:17 2010
New Revision: 203080
URL: http://svn.freebsd.org/changeset/base/203080

Log:
  Do not leave dirty cache lines behind if bus_dmamap_sync was called
  to invalidate memory chunk that starts or ends in the middle of
  cache line.
  
  This was responsible for one half of the problem preventing umass
  to work reliably on some MIPS32 platforms. USBng needs to stop
  sharing cache lines between DMA-able memory and other structures
  to cure the other half.
  
  Discussed with: imp, gonzo

Modified:
  head/sys/mips/mips/busdma_machdep.c

Modified: head/sys/mips/mips/busdma_machdep.c
==============================================================================
--- head/sys/mips/mips/busdma_machdep.c	Wed Jan 27 17:03:40 2010	(r203079)
+++ head/sys/mips/mips/busdma_machdep.c	Wed Jan 27 17:15:17 2010	(r203080)
@@ -1066,10 +1066,22 @@ bus_dmamap_sync_buf(void *buf, int len, 
 			memcpy ((void*)buf_cl, tmp_cl, size_cl);
 		if (size_clend)
 			memcpy ((void*)buf_clend, tmp_clend, size_clend);
+		/* 
+		 * Copies above have brought corresponding memory
+		 * cache lines back into dirty state. Write them back
+		 * out and invalidate affected cache lines again if
+		 * necessary.
+		 */
+		if (size_cl)
+			mips_dcache_wbinv_range((vm_offset_t)buf_cl, size_cl);
+		if (size_clend && (size_cl == 0 ||
+                    buf_clend - buf_cl > mips_pdcache_linesize))
+			mips_dcache_wbinv_range((vm_offset_t)buf_clend,
+			   size_clend);
 		break;
 
 	case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE:
-		mips_dcache_wbinv_range((vm_offset_t)buf, len);
+		mips_dcache_wbinv_range((vm_offset_t)buf_cl, len);
 		break;
 
 	case BUS_DMASYNC_PREREAD:
@@ -1088,6 +1100,18 @@ bus_dmamap_sync_buf(void *buf, int len, 
 			memcpy ((void *)buf_cl, tmp_cl, size_cl);
 		if (size_clend)
 			memcpy ((void *)buf_clend, tmp_clend, size_clend);
+		/* 
+		 * Copies above have brought corresponding memory
+		 * cache lines back into dirty state. Write them back
+		 * out and invalidate affected cache lines again if
+		 * necessary.
+		 */
+		if (size_cl)
+			mips_dcache_wbinv_range((vm_offset_t)buf_cl, size_cl);
+		if (size_clend && (size_cl == 0 ||
+                    buf_clend - buf_cl > mips_pdcache_linesize))
+			mips_dcache_wbinv_range((vm_offset_t)buf_clend,
+			   size_clend);
 		break;
 
 	case BUS_DMASYNC_PREWRITE:

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 17:35:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8AAD81065676;
	Wed, 27 Jan 2010 17:35:58 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7A4F98FC16;
	Wed, 27 Jan 2010 17:35:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RHZw2V081501;
	Wed, 27 Jan 2010 17:35:58 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RHZwNt081499;
	Wed, 27 Jan 2010 17:35:58 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001271735.o0RHZwNt081499@svn.freebsd.org>
From: Jack F Vogel 
Date: Wed, 27 Jan 2010 17:35:58 +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: r203081 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 17:35:58 -0000

Author: jfv
Date: Wed Jan 27 17:35:58 2010
New Revision: 203081
URL: http://svn.freebsd.org/changeset/base/203081

Log:
  Opps, completely wrong version of if_em.h got into
  the checkin, sorry all :(

Modified:
  head/sys/dev/e1000/if_em.h

Modified: head/sys/dev/e1000/if_em.h
==============================================================================
--- head/sys/dev/e1000/if_em.h	Wed Jan 27 17:15:17 2010	(r203080)
+++ head/sys/dev/e1000/if_em.h	Wed Jan 27 17:35:58 2010	(r203081)
@@ -135,7 +135,7 @@
 #define EM_RADV                         64
 
 /*
- * This parameter controls the duration of transmit watchdog.
+ * This parameter controls the max duration of transmit watchdog.
  */
 #define EM_WATCHDOG                   (10 * hz)
 
@@ -240,7 +240,6 @@
 #define ETH_ZLEN		60
 #define ETH_ADDR_LEN		6
 #define CSUM_OFFLOAD		7	/* Offload bits in mbuf flag */
-#define M_TSO_LEN		66
 
 /*
  * 82574 has a nonstandard address for EIAC
@@ -283,162 +282,131 @@ struct em_int_delay_info {
 	int value;			/* Current value in usecs */
 };
 
-/*
-** Driver queue struct: this is the interrupt container
-**  for the associated tx and rx ring.
-*/
-struct em_queue {
-	struct adapter		*adapter;
-	u32			msix;		/* This queue's MSIX vector */
-	u32			eims;		/* This queue's EIMS bit */
-	u32			eitr_setting;
-	struct resource		*res;
-	void			*tag;
-	struct tx_ring		*txr;
-	struct rx_ring		*rxr;
-	struct task		que_task;
-	struct taskqueue	*tq;
-	u64			irqs;
-};
-
-/*
- * Transmit ring: one per queue
- */
-struct tx_ring {
-	struct adapter		*adapter;
-	u32			me;
-	struct mtx		tx_mtx;
-	char			mtx_name[16];
-	struct em_dma_alloc	txdma;
-	struct e1000_tx_desc	*tx_base;
-	u32			next_avail_desc;
-	u32			next_to_clean;
-	volatile u16		tx_avail;
-	struct em_tx_buffer	*tx_buffers;
-#if __FreeBSD_version >= 800000
-	struct buf_ring		*br;
-#endif
-	bus_dma_tag_t		txtag;
-
-	u32			bytes;
-	u32			packets;
-
-	bool			watchdog_check;
-	int			watchdog_time;
-	u64			no_desc_avail;
-	u64			tx_packets;
-};
-
-/*
- * Receive ring: one per queue
- */
-struct rx_ring {
-	struct adapter		*adapter;
-	u32			me;
-	struct em_dma_alloc	rxdma;
-	union e1000_adv_rx_desc	*rx_base;
-	struct lro_ctrl		lro;
-	bool			lro_enabled;
-	bool			hdr_split;
-	bool			discard;
-	struct mtx		rx_mtx;
-	char			mtx_name[16];
-	u32			last_cleaned;
-	u32			next_to_check;
-	struct em_rx_buf	*rx_buffers;
-	bus_dma_tag_t		rx_htag;	/* dma tag for rx head */
-	bus_dmamap_t		rx_hspare_map;
-	bus_dma_tag_t		rx_ptag;	/* dma tag for rx packet */
-	bus_dmamap_t		rx_pspare_map;
-	/*
-	 * First/last mbuf pointers, for
-	 * collecting multisegment RX packets.
-	 */
-	struct mbuf	       *fmp;
-	struct mbuf	       *lmp;
-
-	/* Temporary stats used by AIM */
-	u32			bytes;
-	u32			packets;
-
-	/* Soft stats */
-	u64			rx_split_packets;
-	u64			rx_discarded;
-	u64			rx_packets;
-	u64			rx_bytes;
-};
-
+/* Our adapter structure */
 struct adapter {
 	struct ifnet	*ifp;
+#if __FreeBSD_version >= 800000
+	struct buf_ring	*br;
+#endif
 	struct e1000_hw	hw;
 
+	/* FreeBSD operating-system-specific structures. */
 	struct e1000_osdep osdep;
 	struct device	*dev;
 
-	struct resource *pci_mem;
-	struct resource *msix_mem;
-	struct resource	*res;
-	void		*tag;
-	u32		eims_mask;
-
-	int		linkvec;
-	int		link_mask;
-	int		link_irq;
+	struct resource *memory;
+	struct resource *flash;
+	struct resource *msix;
+
+	struct resource	*ioport;
+	int		io_rid;
+
+	/* 82574 may use 3 int vectors */
+	struct resource	*res[3];
+	void		*tag[3];
+	int		rid[3];
 
 	struct ifmedia	media;
 	struct callout	timer;
-	int		msix;	/* total vectors allocated */
+	struct callout	tx_fifo_timer;
+	bool		watchdog_check
+	int		watchdog_time;
+	int		msi;
 	int		if_flags;
 	int		max_frame_size;
 	int		min_frame_size;
 	struct mtx	core_mtx;
+	struct mtx	tx_mtx;
+	struct mtx	rx_mtx;
 	int		em_insert_vlan_header;
+
+	/* Task for FAST handling */
+	struct task     link_task;
 	struct task     rxtx_task;
+	struct task     rx_task;
+	struct task     tx_task;
 	struct taskqueue *tq;           /* private task queue */
-        u16		num_queues;
 
+#if __FreeBSD_version >= 700029
 	eventhandler_tag vlan_attach;
 	eventhandler_tag vlan_detach;
-	u32		num_vlans;
+	u32	num_vlans;
+#endif
 
 	/* Management and WOL features */
-	int		wol;
-	int		has_manage;
+	u32		wol;
+	bool		has_manage;
+	bool		has_amt;
 
 	/* Info about the board itself */
-	u8		link_active;
-	u16		link_speed;
-	u16		link_duplex;
-	u32		smartspeed;
-
-	/* Interface queues */
-	struct em_queue	*queues;
+	uint8_t		link_active;
+	uint16_t	link_speed;
+	uint16_t	link_duplex;
+	uint32_t	smartspeed;
+	struct em_int_delay_info tx_int_delay;
+	struct em_int_delay_info tx_abs_int_delay;
+	struct em_int_delay_info rx_int_delay;
+	struct em_int_delay_info rx_abs_int_delay;
 
 	/*
-	 * Transmit rings
+	 * Transmit definitions
+	 *
+	 * We have an array of num_tx_desc descriptors (handled
+	 * by the controller) paired with an array of tx_buffers
+	 * (at tx_buffer_area).
+	 * The index of the next available descriptor is next_avail_tx_desc.
+	 * The number of remaining tx_desc is num_tx_desc_avail.
 	 */
-	struct tx_ring		*tx_rings;
-        u16			num_tx_desc;
+	struct em_dma_alloc	txdma;		/* bus_dma glue for tx desc */
+	struct e1000_tx_desc	*tx_desc_base;
+	uint32_t		next_avail_tx_desc;
+	uint32_t		next_tx_to_clean;
+	volatile uint16_t	num_tx_desc_avail;
+        uint16_t		num_tx_desc;
+        uint16_t		last_hw_offload;
+        uint32_t		txd_cmd;
+	struct em_buffer	*tx_buffer_area;
+	bus_dma_tag_t		txtag;		/* dma tag for tx */
+	uint32_t	   	tx_tso;		/* last tx was tso */
 
 	/* 
-	 * Receive rings
+	 * Receive definitions
+	 *
+	 * we have an array of num_rx_desc rx_desc (handled by the
+	 * controller), and paired with an array of rx_buffers
+	 * (at rx_buffer_area).
+	 * The next pair to check on receive is at offset next_rx_desc_to_check
 	 */
-	struct rx_ring		*rx_rings;
-	bool			rx_hdr_split;
-        u16			num_rx_desc;
+	struct em_dma_alloc	rxdma;		/* bus_dma glue for rx desc */
+	struct e1000_rx_desc	*rx_desc_base;
+	uint32_t		next_rx_desc_to_check;
+	uint32_t		rx_buffer_len;
+	uint16_t		num_rx_desc;
 	int			rx_process_limit;
-	u32			rx_mbuf_sz;
-	u32			rx_mask;
+	struct em_buffer	*rx_buffer_area;
+	bus_dma_tag_t		rxtag;
+	bus_dmamap_t		rx_sparemap;
+
+	/*
+	 * First/last mbuf pointers, for
+	 * collecting multisegment RX packets.
+	 */
+	struct mbuf	       *fmp;
+	struct mbuf	       *lmp;
 
 	/* Misc stats maintained by the driver */
 	unsigned long	dropped_pkts;
-	unsigned long	mbuf_defrag_failed;
-	unsigned long	mbuf_header_failed;
-	unsigned long	mbuf_packet_failed;
+	unsigned long	mbuf_alloc_failed;
+	unsigned long	mbuf_cluster_failed;
+	unsigned long	no_tx_desc_avail1;
+	unsigned long	no_tx_desc_avail2;
 	unsigned long	no_tx_map_avail;
         unsigned long	no_tx_dma_setup;
 	unsigned long	watchdog_events;
 	unsigned long	rx_overruns;
+	unsigned long	rx_irq;
+	unsigned long	tx_irq;
+	unsigned long	link_irq;
 
 	/* 82547 workaround */
 	uint32_t	tx_fifo_size;
@@ -448,9 +416,17 @@ struct adapter {
 	uint64_t	tx_fifo_wrk_cnt;
 	uint32_t	tx_head_addr;
 
-	/* For 82544 PCIX Workaround */
-	boolean_t	pcix_82544;
-	boolean_t	in_detach;
+        /* For 82544 PCIX Workaround */
+	boolean_t       pcix_82544;
+	boolean_t       in_detach;
+
+#ifdef EM_IEEE1588
+	/* IEEE 1588 precision time support */
+	struct cyclecounter     cycles;
+	struct nettimer         clock;
+	struct nettime_compare  compare;
+	struct hwtstamp_ctrl    hwtstamp;
+#endif
 
 	struct e1000_hw_stats stats;
 };

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 17:49:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CAB75106568D;
	Wed, 27 Jan 2010 17:49:27 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BA4E58FC15;
	Wed, 27 Jan 2010 17:49:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RHnRbt084522;
	Wed, 27 Jan 2010 17:49:27 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RHnR2j084519;
	Wed, 27 Jan 2010 17:49:27 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201001271749.o0RHnR2j084519@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 27 Jan 2010 17:49:27 +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: r203082 - in head/sys: dev/re pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 17:49:27 -0000

Author: yongari
Date: Wed Jan 27 17:49:27 2010
New Revision: 203082
URL: http://svn.freebsd.org/changeset/base/203082

Log:
  Add initial support for RTL8103E PCIe fastethernet.
  
  PR:	kern/142974

Modified:
  head/sys/dev/re/if_re.c
  head/sys/pci/if_rlreg.h

Modified: head/sys/dev/re/if_re.c
==============================================================================
--- head/sys/dev/re/if_re.c	Wed Jan 27 17:35:58 2010	(r203081)
+++ head/sys/dev/re/if_re.c	Wed Jan 27 17:49:27 2010	(r203082)
@@ -172,7 +172,7 @@ static struct rl_type re_devs[] = {
 	{ RT_VENDORID, RT_DEVICEID_8139, 0,
 	    "RealTek 8139C+ 10/100BaseTX" },
 	{ RT_VENDORID, RT_DEVICEID_8101E, 0,
-	    "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" },
+	    "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" },
 	{ RT_VENDORID, RT_DEVICEID_8168, 0,
 	    "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/"
 	    "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" },
@@ -212,6 +212,7 @@ static struct rl_hwrev re_hwrevs[] = {
 	{ RL_HWREV_8102E, RL_8169, "8102E"},
 	{ RL_HWREV_8102EL, RL_8169, "8102EL"},
 	{ RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL"},
+	{ RL_HWREV_8103E, RL_8169, "8103E"},
 	{ RL_HWREV_8168_SPIN2, RL_8169, "8168"},
 	{ RL_HWREV_8168_SPIN3, RL_8169, "8168"},
 	{ RL_HWREV_8168C, RL_8169, "8168C/8111C"},
@@ -1268,6 +1269,12 @@ re_attach(device_t dev)
 		    RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT |
 		    RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD;
 		break;
+	case RL_HWREV_8103E:
+		sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE |
+		    RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT |
+		    RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD |
+		    RL_FLAG_MACSLEEP;
+		break;
 	case RL_HWREV_8168_SPIN1:
 	case RL_HWREV_8168_SPIN2:
 		sc->rl_flags |= RL_FLAG_WOLRXENB;

Modified: head/sys/pci/if_rlreg.h
==============================================================================
--- head/sys/pci/if_rlreg.h	Wed Jan 27 17:35:58 2010	(r203081)
+++ head/sys/pci/if_rlreg.h	Wed Jan 27 17:49:27 2010	(r203082)
@@ -166,6 +166,7 @@
 #define RL_HWREV_8100E		0x30800000
 #define RL_HWREV_8101E		0x34000000
 #define RL_HWREV_8102E		0x34800000
+#define RL_HWREV_8103E		0x34C00000
 #define RL_HWREV_8168_SPIN2	0x38000000
 #define RL_HWREV_8168_SPIN3	0x38400000
 #define RL_HWREV_8168C		0x3C000000

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 18:00:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83CBB1065694;
	Wed, 27 Jan 2010 18:00:24 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 73C9E8FC1A;
	Wed, 27 Jan 2010 18:00:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RI0ObW087072;
	Wed, 27 Jan 2010 18:00:24 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RI0OZu087069;
	Wed, 27 Jan 2010 18:00:24 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001271800.o0RI0OZu087069@svn.freebsd.org>
From: Jack F Vogel 
Date: Wed, 27 Jan 2010 18:00: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: r203083 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 18:00:24 -0000

Author: jfv
Date: Wed Jan 27 18:00:24 2010
New Revision: 203083
URL: http://svn.freebsd.org/changeset/base/203083

Log:
  Two more build problems, missing includes and semicolon.

Modified:
  head/sys/dev/e1000/e1000_osdep.h
  head/sys/dev/e1000/if_em.h

Modified: head/sys/dev/e1000/e1000_osdep.h
==============================================================================
--- head/sys/dev/e1000/e1000_osdep.h	Wed Jan 27 17:49:27 2010	(r203082)
+++ head/sys/dev/e1000/e1000_osdep.h	Wed Jan 27 18:00:24 2010	(r203083)
@@ -39,6 +39,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/dev/e1000/if_em.h
==============================================================================
--- head/sys/dev/e1000/if_em.h	Wed Jan 27 17:49:27 2010	(r203082)
+++ head/sys/dev/e1000/if_em.h	Wed Jan 27 18:00:24 2010	(r203083)
@@ -309,7 +309,7 @@ struct adapter {
 	struct ifmedia	media;
 	struct callout	timer;
 	struct callout	tx_fifo_timer;
-	bool		watchdog_check
+	bool		watchdog_check;
 	int		watchdog_time;
 	int		msi;
 	int		if_flags;

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 18:12:23 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6004A1065694;
	Wed, 27 Jan 2010 18:12:23 +0000 (UTC)
	(envelope-from avilla@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 35AE38FC18;
	Wed, 27 Jan 2010 18:12:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RICNuu089861;
	Wed, 27 Jan 2010 18:12:23 GMT (envelope-from avilla@svn.freebsd.org)
Received: (from avilla@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RICNcN089859;
	Wed, 27 Jan 2010 18:12:23 GMT (envelope-from avilla@svn.freebsd.org)
Message-Id: <201001271812.o0RICNcN089859@svn.freebsd.org>
From: Alberto Villa 
Date: Wed, 27 Jan 2010 18:12:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203084 - stable/8/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 18:12:23 -0000

Author: avilla (ports committer)
Date: Wed Jan 27 18:12:22 2010
New Revision: 203084
URL: http://svn.freebsd.org/changeset/base/203084

Log:
  - MFC r197788, r203040, r203045, r203048
  
  Approved by:	tabthorpe (mentor)

Modified:
  stable/8/usr.bin/calendar/calendars/calendar.freebsd

Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- stable/8/usr.bin/calendar/calendars/calendar.freebsd	Wed Jan 27 18:00:24 2010	(r203083)
+++ stable/8/usr.bin/calendar/calendars/calendar.freebsd	Wed Jan 27 18:12:22 2010	(r203084)
@@ -158,6 +158,7 @@
 06/02	Jean-Marc Zucconi  born in Pontarlier, France, 1954
 06/02	Alexander Botero-Lowry  born in Austin, TX, USA, 1986
 06/03	CHOI Junho  born in Seoul, Korea, 1974
+06/03	Wesley Shields  born in Binghamton, NY, USA, 1981
 06/04	Julian Elischer  born in Perth, Australia, 1959
 06/04	Jason Evans  born in Greeley, Colorado, United States, 1973
 06/04	Justin Gibbs  born in San Pedro, California, United States, 1973
@@ -203,6 +204,7 @@
 07/22	Lukas Ertl  born in Weissenbach/Enns, Steiermark, Austria, 1976
 07/23	Sergey A. Osokin  born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972
 07/24	Alexander Nedotsukov  born in Ulyanovsk, Russian Federation, 1974
+07/24	Alberto Villa  born in Vercelli, Italy, 1987
 07/28	Jim Mock  born in Bethlehem, Pennsylvania, United States, 1974
 07/28	Tom Hukins  born in Manchester, United Kingdom, 1976
 07/29	Dirk Meyer  born in Kassel, Hessen, Germany, 1965
@@ -244,6 +246,7 @@
 09/10	Wesley R. Peters  born in Hartford, Alabama, United States, 1961
 09/12	Weongyo Jeong  born in Haman, Korea, 1980
 09/12	William C. Fumerola II  born in Detroit, Michigan, United States, 1981
+09/12	Benedict Christopher Reuschling  born in Darmstadt, Germany, 1981
 09/15	Dima Panov  born in Khabarovsk, Russian Federation, 1978
 09/17	Maxim Bolotin  born in Rostov-on-Don, Russian Federation, 1976
 09/20	Kevin Lo  born in Taipei, Taiwan, Republic of China, 1972
@@ -253,6 +256,7 @@
 09/28	Alex Dupre  born in Milano, Italy, 1980
 09/29	Matthew Hunt  born in Johnstown, Pennsylvania, United States, 1976
 09/30	Hiten M. Pandya  born in Dar-es-Salaam, Tanzania, East Africa, 1986
+10/02	Beat Gaetzi  born in Zurich, Switzerland, 1980
 10/05	Hiroki Sato  born in Yamagata, Japan, 1977
 10/05	Chris Costello  born in Houston, Texas, United States, 1985
 10/09	Stefan Walter  born in Werne, Nordrhein-Westfalen, 1978

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 18:33:23 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52339106568B;
	Wed, 27 Jan 2010 18:33:23 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 421228FC13;
	Wed, 27 Jan 2010 18:33:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RIXNae094506;
	Wed, 27 Jan 2010 18:33:23 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RIXNUp094504;
	Wed, 27 Jan 2010 18:33:23 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201001271833.o0RIXNUp094504@svn.freebsd.org>
From: Alan Cox 
Date: Wed, 27 Jan 2010 18:33:23 +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: r203085 - head/sys/i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 18:33:23 -0000

Author: alc
Date: Wed Jan 27 18:33:22 2010
New Revision: 203085
URL: http://svn.freebsd.org/changeset/base/203085

Log:
  Optimize pmap_demote_pde() by using the new KPTmap to access a kernel
  page table page instead of creating a temporary mapping to it.
  
  Set the PG_G bit on the page table entries that implement the KPTmap.
  
  Locore initializes the unused portions of the NKPT kernel page table
  pages that it allocates to zero.  So, pmap_bootstrap() needn't zero
  the page table entries referenced by CMAP1 and CMAP3.
  
  Simplify pmap_set_pg().
  
  MFC after:	10 days

Modified:
  head/sys/i386/i386/pmap.c

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Wed Jan 27 18:12:22 2010	(r203084)
+++ head/sys/i386/i386/pmap.c	Wed Jan 27 18:33:22 2010	(r203085)
@@ -404,7 +404,6 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 	}
 	SYSMAP(caddr_t, CMAP1, CADDR1, 1)
 	SYSMAP(caddr_t, CMAP3, CADDR3, 1)
-	*CMAP3 = 0;
 
 	/*
 	 * Crashdump maps.
@@ -427,7 +426,7 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 	SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES)
 
 	for (i = 0; i < NKPT; i++)
-		KPTD[i] = (KPTphys + (i << PAGE_SHIFT)) | PG_RW | PG_V;
+		KPTD[i] = (KPTphys + (i << PAGE_SHIFT)) | pgeflag | PG_RW | PG_V;
 
 	/*
 	 * Adjust the start of the KPTD and KPTmap so that the implementation
@@ -439,15 +438,13 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 	/*
 	 * ptemap is used for pmap_pte_quick
 	 */
-	SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1);
-	SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1);
+	SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1)
+	SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1)
 
 	mtx_init(&PMAP2mutex, "PMAP2", NULL, MTX_DEF);
 
 	virtual_avail = va;
 
-	*CMAP1 = 0;
-
 	/*
 	 * Leave in place an identity mapping (virt == phys) for the low 1 MB
 	 * physical memory region that is used by the ACPI wakeup code.  This
@@ -549,25 +546,19 @@ pmap_init_pat(void)
 static void
 pmap_set_pg(void)
 {
-	pd_entry_t pdir;
 	pt_entry_t *pte;
 	vm_offset_t va, endva;
-	int i; 
 
 	if (pgeflag == 0)
 		return;
 
-	i = KERNLOAD/NBPDR;
 	endva = KERNBASE + KERNend;
 
 	if (pseflag) {
 		va = KERNBASE + KERNLOAD;
 		while (va  < endva) {
-			pdir = kernel_pmap->pm_pdir[KPTDI+i];
-			pdir |= pgeflag;
-			kernel_pmap->pm_pdir[KPTDI+i] = PTD[KPTDI+i] = pdir;
+			pdir_pde(PTD, va) |= pgeflag;
 			invltlb();	/* Play it safe, invltlb() every time */
-			i++;
 			va += NBPDR;
 		}
 	} else {
@@ -1895,7 +1886,7 @@ pmap_growkernel(vm_offset_t addr)
 			pmap_zero_page(nkpg);
 		ptppaddr = VM_PAGE_TO_PHYS(nkpg);
 		newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M);
-		pdir_pde(KPTD, kernel_vm_end) = newpdir;
+		pdir_pde(KPTD, kernel_vm_end) = pgeflag | newpdir;
 
 		updated_PTD = FALSE;
 		mtx_lock_spin(&allpmaps_lock);
@@ -2391,10 +2382,14 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t 
 	mptepa = VM_PAGE_TO_PHYS(mpte);
 
 	/*
-	 * Temporarily map the page table page (mpte) into the kernel's
-	 * address space at either PADDR1 or PADDR2.
-	 */
-	if (curthread->td_pinned > 0 && mtx_owned(&vm_page_queue_mtx)) {
+	 * If the page mapping is in the kernel's address space, then the
+	 * KPTmap can provide access to the page table page.  Otherwise,
+	 * temporarily map the page table page (mpte) into the kernel's
+	 * address space at either PADDR1 or PADDR2. 
+	 */
+	if (va >= KERNBASE)
+		firstpte = &KPTmap[i386_btop(trunc_4mpage(va))];
+	else if (curthread->td_pinned > 0 && mtx_owned(&vm_page_queue_mtx)) {
 		if ((*PMAP1 & PG_FRAME) != mptepa) {
 			*PMAP1 = mptepa | PG_RW | PG_V | PG_A | PG_M;
 #ifdef SMP
@@ -2458,10 +2453,9 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t 
 		/*
 		 * A harmless race exists between this loop and the bcopy()
 		 * in pmap_pinit() that initializes the kernel segment of
-		 * the new page table.  Specifically, that bcopy() may copy
-		 * the new PDE from the PTD, which is first in allpmaps, to
-		 * the new page table before this loop updates that new
-		 * page table.
+		 * the new page table directory.  Specifically, that bcopy()
+		 * may copy the new PDE from the PTD to the new page table
+		 * before this loop updates that new page table.
 		 */
 		mtx_lock_spin(&allpmaps_lock);
 		LIST_FOREACH(allpmaps_entry, &allpmaps, pm_list) {

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 19:30:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4F3991065676;
	Wed, 27 Jan 2010 19:30:45 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3F0DA8FC1E;
	Wed, 27 Jan 2010 19:30:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RJUjvf007183;
	Wed, 27 Jan 2010 19:30:45 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RJUj58007179;
	Wed, 27 Jan 2010 19:30:45 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001271930.o0RJUj58007179@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Wed, 27 Jan 2010 19:30:45 +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: r203086 - head/sys/fs/nwfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 19:30:45 -0000

Author: trasz
Date: Wed Jan 27 19:30:44 2010
New Revision: 203086
URL: http://svn.freebsd.org/changeset/base/203086

Log:
  Don't touch v_interlock; use VI_* macros instead.

Modified:
  head/sys/fs/nwfs/nwfs_node.c
  head/sys/fs/nwfs/nwfs_vnops.c

Modified: head/sys/fs/nwfs/nwfs_node.c
==============================================================================
--- head/sys/fs/nwfs/nwfs_node.c	Wed Jan 27 18:33:22 2010	(r203085)
+++ head/sys/fs/nwfs/nwfs_node.c	Wed Jan 27 19:30:44 2010	(r203086)
@@ -151,7 +151,7 @@ loop:
 rescan:
 	if (nwfs_hashlookup(nmp, fid, &np) == 0) {
 		vp = NWTOV(np);
-		mtx_lock(&vp->v_interlock);
+		VI_LOCK(vp);
 		sx_xunlock(&nwhashlock);
 		if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread))
 			goto loop;

Modified: head/sys/fs/nwfs/nwfs_vnops.c
==============================================================================
--- head/sys/fs/nwfs/nwfs_vnops.c	Wed Jan 27 18:33:22 2010	(r203085)
+++ head/sys/fs/nwfs/nwfs_vnops.c	Wed Jan 27 19:30:44 2010	(r203086)
@@ -231,24 +231,24 @@ nwfs_close(ap)
 
 	if (vp->v_type == VDIR) return 0;	/* nothing to do now */
 	error = 0;
-	mtx_lock(&vp->v_interlock);
+	VI_LOCK(vp);
 	if (np->opened == 0) {
-		mtx_unlock(&vp->v_interlock);
+		VI_UNLOCK(vp);
 		return 0;
 	}
-	mtx_unlock(&vp->v_interlock);
+	VI_UNLOCK(vp);
 	error = nwfs_vinvalbuf(vp, ap->a_td);
-	mtx_lock(&vp->v_interlock);
+	VI_LOCK(vp);
 	if (np->opened == 0) {
-		mtx_unlock(&vp->v_interlock);
+		VI_UNLOCK(vp);
 		return 0;
 	}
 	if (--np->opened == 0) {
-		mtx_unlock(&vp->v_interlock);
+		VI_UNLOCK(vp);
 		error = ncp_close_file(NWFSTOCONN(VTONWFS(vp)), &np->n_fh, 
 		   ap->a_td, ap->a_cred);
 	} else
-		mtx_unlock(&vp->v_interlock);
+		VI_UNLOCK(vp);
 	np->n_atime = 0;
 	return (error);
 }

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 19:43:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE9981065672;
	Wed, 27 Jan 2010 19:43:14 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D7918FC0A;
	Wed, 27 Jan 2010 19:43:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RJhE4Q009955;
	Wed, 27 Jan 2010 19:43:14 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RJhEeJ009952;
	Wed, 27 Jan 2010 19:43:14 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <201001271943.o0RJhEeJ009952@svn.freebsd.org>
From: Weongyo Jeong 
Date: Wed, 27 Jan 2010 19:43:14 +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: r203087 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 19:43:14 -0000

Author: weongyo
Date: Wed Jan 27 19:43:14 2010
New Revision: 203087
URL: http://svn.freebsd.org/changeset/base/203087

Log:
  adds sysctl knobs to show rate statistics that it could be useful to
  debug slow TX speed.

Modified:
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwvar.h

Modified: head/sys/dev/usb/wlan/if_urtw.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtw.c	Wed Jan 27 19:30:44 2010	(r203086)
+++ head/sys/dev/usb/wlan/if_urtw.c	Wed Jan 27 19:43:14 2010	(r203087)
@@ -762,6 +762,7 @@ static int		urtw_compute_txtime(uint16_t
 			    uint8_t);
 static void		urtw_updateslot(struct ifnet *);
 static void		urtw_updateslottask(void *, int);
+static void		urtw_sysctl_node(struct urtw_softc *);
 
 static int
 urtw_match(device_t dev)
@@ -906,6 +907,8 @@ urtw_attach(device_t dev)
 	    &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap),
 	    URTW_RX_RADIOTAP_PRESENT);
 
+	urtw_sysctl_node(sc);
+
 	if (bootverbose)
 		ieee80211_announce(ic);
 	return (0);
@@ -1703,6 +1706,8 @@ urtw_tx_start(struct urtw_softc *sc, str
 			rate = urtw_rtl2rate(sc->sc_currate);
 	}
 
+	sc->sc_stats.txrates[sc->sc_currate]++;
+
 	if (IEEE80211_IS_MULTICAST(wh->i_addr1))
 		txdur = pkttime = urtw_compute_txtime(m0->m_pkthdr.len +
 		    IEEE80211_CRC_LEN, rate, 0, 0);
@@ -4372,6 +4377,54 @@ fail:
 	URTW_UNLOCK(sc);
 }
 
+static void
+urtw_sysctl_node(struct urtw_softc *sc)
+{
+#define	URTW_SYSCTL_STAT_ADD32(c, h, n, p, d)	\
+	SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
+	struct sysctl_ctx_list *ctx;
+	struct sysctl_oid_list *child, *parent;
+	struct sysctl_oid *tree;
+	struct urtw_stats *stats = &sc->sc_stats;
+
+	ctx = device_get_sysctl_ctx(sc->sc_dev);
+	child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev));
+
+	tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD,
+	    NULL, "URTW statistics");
+	parent = SYSCTL_CHILDREN(tree);
+
+	/* Tx statistics. */
+	tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD,
+	    NULL, "Tx MAC statistics");
+	child = SYSCTL_CHILDREN(tree);
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "1m", &stats->txrates[0],
+	    "1 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "2m", &stats->txrates[1],
+	    "2 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "5.5m", &stats->txrates[2],
+	    "5.5 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "6m", &stats->txrates[4],
+	    "6 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "9m", &stats->txrates[5],
+	    "9 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "11m", &stats->txrates[3],
+	    "11 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "12m", &stats->txrates[6],
+	    "12 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "18m", &stats->txrates[7],
+	    "18 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "24m", &stats->txrates[8],
+	    "24 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "36m", &stats->txrates[9],
+	    "36 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "48m", &stats->txrates[10],
+	    "48 Mbit/s");
+	URTW_SYSCTL_STAT_ADD32(ctx, child, "54m", &stats->txrates[11],
+	    "54 Mbit/s");
+#undef URTW_SYSCTL_STAT_ADD32
+}
+
 static device_method_t urtw_methods[] = {
 	DEVMETHOD(device_probe, urtw_match),
 	DEVMETHOD(device_attach, urtw_attach),

Modified: head/sys/dev/usb/wlan/if_urtwvar.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwvar.h	Wed Jan 27 19:30:44 2010	(r203086)
+++ head/sys/dev/usb/wlan/if_urtwvar.h	Wed Jan 27 19:43:14 2010	(r203087)
@@ -81,6 +81,10 @@ struct urtw_tx_radiotap_header {
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
 	 (1 << IEEE80211_RADIOTAP_CHANNEL))
 
+struct urtw_stats {
+	unsigned int			txrates[12];
+};
+
 struct urtw_vap {
 	struct ieee80211vap		vap;
 	int				(*newstate)(struct ieee80211vap *,
@@ -169,6 +173,8 @@ struct urtw_softc {
 	uint64_t			sc_txstatus;	/* only for 8187B */
 	struct task			sc_updateslot_task;
 
+	struct urtw_stats		sc_stats;
+
 	struct	urtw_rx_radiotap_header	sc_rxtap;
 	int				sc_rxtap_len;
 	struct	urtw_tx_radiotap_header	sc_txtap;

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:09:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B651106566B;
	Wed, 27 Jan 2010 20:09:20 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A2448FC08;
	Wed, 27 Jan 2010 20:09:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RK9Kxk015813;
	Wed, 27 Jan 2010 20:09:20 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RK9Kw8015811;
	Wed, 27 Jan 2010 20:09:20 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201001272009.o0RK9Kw8015811@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 27 Jan 2010 20:09:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203089 - stable/7/sys/fs/pseudofs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:09:20 -0000

Author: kib
Date: Wed Jan 27 20:09:20 2010
New Revision: 203089
URL: http://svn.freebsd.org/changeset/base/203089

Log:
  MFC r196921:
  Do not decrement pfs_vncache_entries for the vnode that was not in the
  list.
  
  Reminded by:	des
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/fs/pseudofs/pseudofs_vncache.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/fs/pseudofs/pseudofs_vncache.c
==============================================================================
--- stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Wed Jan 27 19:57:34 2010	(r203088)
+++ stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Wed Jan 27 20:09:20 2010	(r203089)
@@ -246,11 +246,13 @@ pfs_vncache_free(struct vnode *vp)
 	KASSERT(pvd != NULL, ("pfs_vncache_free(): no vnode data\n"));
 	if (pvd->pvd_next)
 		pvd->pvd_next->pvd_prev = pvd->pvd_prev;
-	if (pvd->pvd_prev)
+	if (pvd->pvd_prev) {
 		pvd->pvd_prev->pvd_next = pvd->pvd_next;
-	else if (pfs_vncache == pvd)
+		--pfs_vncache_entries;
+	} else if (pfs_vncache == pvd) {
 		pfs_vncache = pvd->pvd_next;
-	--pfs_vncache_entries;
+		--pfs_vncache_entries;
+	}
 	mtx_unlock(&pfs_vncache_mutex);
 
 	FREE(pvd, M_PFSVNCACHE);

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:12:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E0F4F10656C2;
	Wed, 27 Jan 2010 20:12:04 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D06B98FC12;
	Wed, 27 Jan 2010 20:12:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RKC4so016558;
	Wed, 27 Jan 2010 20:12:04 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RKC40c016555;
	Wed, 27 Jan 2010 20:12:04 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001272012.o0RKC40c016555@svn.freebsd.org>
From: Jack F Vogel 
Date: Wed, 27 Jan 2010 20:12: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: r203090 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:12:05 -0000

Author: jfv
Date: Wed Jan 27 20:12:04 2010
New Revision: 203090
URL: http://svn.freebsd.org/changeset/base/203090

Log:
  Add a link tasklet so updates can be sleepable.

Modified:
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_igb.h

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Wed Jan 27 20:09:20 2010	(r203089)
+++ head/sys/dev/e1000/if_igb.c	Wed Jan 27 20:12:04 2010	(r203090)
@@ -244,6 +244,7 @@ static void	igb_add_rx_process_limit(str
 		    const char *, int *, int);
 static void	igb_handle_rxtx(void *context, int pending);
 static void	igb_handle_que(void *context, int pending);
+static void	igb_handle_link(void *context, int pending);
 
 /* These are MSIX only irq handlers */
 static void	igb_msix_que(void *);
@@ -1203,6 +1204,15 @@ igb_handle_que(void *context, int pendin
 	E1000_WRITE_REG(&adapter->hw, E1000_EIMS, que->eims);
 }
 
+/* Deal with link in a sleepable context */
+static void
+igb_handle_link(void *context, int pending)
+{
+	struct adapter *adapter = context;
+
+	adapter->hw.mac.get_link_status = 1;
+	igb_update_link_status(adapter);
+}
 
 /*********************************************************************
  *
@@ -1239,10 +1249,8 @@ igb_irq_fast(void *arg)
 	taskqueue_enqueue(adapter->tq, &adapter->rxtx_task);
 
 	/* Link status change */
-	if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
-		adapter->hw.mac.get_link_status = 1;
-		igb_update_link_status(adapter);
-	}
+	if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))
+		taskqueue_enqueue(adapter->tq, &adapter->link_task);
 
 	if (reg_icr & E1000_ICR_RXO)
 		adapter->rx_overruns++;
@@ -1352,8 +1360,7 @@ igb_msix_link(void *arg)
 	icr = E1000_READ_REG(&adapter->hw, E1000_ICR);
 	if (!(icr & E1000_ICR_LSC))
 		goto spurious;
-	adapter->hw.mac.get_link_status = 1;
-	igb_update_link_status(adapter);
+	taskqueue_enqueue(adapter->tq, &adapter->link_task);
 
 spurious:
 	/* Rearm */
@@ -1986,6 +1993,8 @@ igb_allocate_legacy(struct adapter *adap
 	 * processing contexts.
 	 */
 	TASK_INIT(&adapter->rxtx_task, 0, igb_handle_rxtx, adapter);
+	/* Make tasklet for deferred link handling */
+	TASK_INIT(&adapter->link_task, 0, igb_handle_link, adapter);
 	adapter->tq = taskqueue_create_fast("igb_taskq", M_NOWAIT,
 	    taskqueue_thread_enqueue, &adapter->tq);
 	taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s taskq",
@@ -2072,6 +2081,13 @@ igb_allocate_msix(struct adapter *adapte
 	}
 	adapter->linkvec = vector;
 
+	/* Make tasklet for deferred handling */
+	TASK_INIT(&adapter->link_task, 0, igb_handle_link, adapter);
+	adapter->tq = taskqueue_create_fast("igb_link", M_NOWAIT,
+	    taskqueue_thread_enqueue, &adapter->tq);
+	taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s link",
+	    device_get_nameunit(adapter->dev));
+
 	return (0);
 }
 

Modified: head/sys/dev/e1000/if_igb.h
==============================================================================
--- head/sys/dev/e1000/if_igb.h	Wed Jan 27 20:09:20 2010	(r203089)
+++ head/sys/dev/e1000/if_igb.h	Wed Jan 27 20:12:04 2010	(r203090)
@@ -372,6 +372,7 @@ struct adapter {
 
 	int		linkvec;
 	int		link_mask;
+	struct task	link_task;
 	int		link_irq;
 
 	struct ifmedia	media;
@@ -383,7 +384,7 @@ struct adapter {
 	struct mtx	core_mtx;
 	int		igb_insert_vlan_header;
 	struct task     rxtx_task;
-	struct taskqueue *tq;           /* private task queue */
+	struct taskqueue *tq;	/* adapter task queue */
         u16		num_queues;
 
 	eventhandler_tag vlan_attach;

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:24:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 347511065692;
	Wed, 27 Jan 2010 20:24:29 +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 22FB08FC0C;
	Wed, 27 Jan 2010 20:24:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RKOT7L019351;
	Wed, 27 Jan 2010 20:24:29 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RKOTUh019349;
	Wed, 27 Jan 2010 20:24:29 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201001272024.o0RKOTUh019349@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 27 Jan 2010 20:24:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203092 - stable/7/gnu/usr.bin/groff/tmac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:24:29 -0000

Author: kensmith
Date: Wed Jan 27 20:24:28 2010
New Revision: 203092
URL: http://svn.freebsd.org/changeset/base/203092

Log:
  Update what version of FreeBSD man(1) says this is.
  
  Approved by:	re (implicit)

Modified:
  stable/7/gnu/usr.bin/groff/tmac/mdoc.local

Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local
==============================================================================
--- stable/7/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jan 27 20:12:59 2010	(r203091)
+++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local	Wed Jan 27 20:24:28 2010	(r203092)
@@ -64,13 +64,14 @@
 .ds doc-volume-as-arm      arm
 .
 .\" Default .Os value
-.ds doc-default-operating-system FreeBSD\~7.2
+.ds doc-default-operating-system FreeBSD\~7.3
 .
 .\" FreeBSD releases not found in doc-common
 .ds doc-operating-system-FreeBSD-6.3    6.3
 .ds doc-operating-system-FreeBSD-6.4    6.4
 .ds doc-operating-system-FreeBSD-7.1    7.1
 .ds doc-operating-system-FreeBSD-7.2    7.2
+.ds doc-operating-system-FreeBSD-7.3    7.3
 .ds doc-operating-system-FreeBSD-8.0    8.0
 .
 .ec

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:25:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48CCD1065672;
	Wed, 27 Jan 2010 20:25:47 +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 37BFE8FC08;
	Wed, 27 Jan 2010 20:25:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RKPlXF019693;
	Wed, 27 Jan 2010 20:25:47 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RKPlFF019691;
	Wed, 27 Jan 2010 20:25:47 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201001272025.o0RKPlFF019691@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 27 Jan 2010 20:25:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203093 - stable/7/release
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:25:47 -0000

Author: kensmith
Date: Wed Jan 27 20:25:46 2010
New Revision: 203093
URL: http://svn.freebsd.org/changeset/base/203093

Log:
  Update version to 7.3.
  
  Approved by:	re (implicit)

Modified:
  stable/7/release/Makefile

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Wed Jan 27 20:24:28 2010	(r203092)
+++ stable/7/release/Makefile	Wed Jan 27 20:25:46 2010	(r203093)
@@ -24,11 +24,11 @@
 # Set these, release builder!
 #
 # Fixed version:
-#BUILDNAME=7.2-STABLE
+#BUILDNAME=7.3-STABLE
 #
 # Automatic SNAP versioning:
 DATE != date +%Y%m%d
-BASE = 7.2
+BASE = 7.3
 BUILDNAME?=${BASE}-${DATE}-SNAP
 #
 #CHROOTDIR=/junk/release

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:30:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D53F51065670;
	Wed, 27 Jan 2010 20:30:14 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C4DA18FC17;
	Wed, 27 Jan 2010 20:30:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RKUE2Z020671;
	Wed, 27 Jan 2010 20:30:14 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RKUEJZ020669;
	Wed, 27 Jan 2010 20:30:14 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201001272030.o0RKUEJZ020669@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 27 Jan 2010 20:30:14 +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: r203094 - head/sys/sparc64/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:30:14 -0000

Author: marius
Date: Wed Jan 27 20:30:14 2010
New Revision: 203094
URL: http://svn.freebsd.org/changeset/base/203094

Log:
  - Zero the MSI/MSI-X queue argument, otherwise mtx_init(9) can panic
    indicating an already initialized lock.
  - Check for an empty MSI/MSI-X queue entry before asserting that we have
    received a MSI/MSI-X message in order to not panic in case of stray MSI/
    MSI-X queue interrupts which may happen in case of using an interrupt
    handler rather than a filter.
  
  MFC after:	3 days

Modified:
  head/sys/sparc64/pci/fire.c

Modified: head/sys/sparc64/pci/fire.c
==============================================================================
--- head/sys/sparc64/pci/fire.c	Wed Jan 27 20:25:46 2010	(r203093)
+++ head/sys/sparc64/pci/fire.c	Wed Jan 27 20:30:14 2010	(r203094)
@@ -852,7 +852,7 @@ fire_intr_register(struct fire_softc *sc
 		return (ENXIO);
 	fica = malloc((ino >= FO_EQ_FIRST_INO && ino <= FO_EQ_LAST_INO) ?
 	    sizeof(struct fire_msiqarg) : sizeof(struct fire_icarg), M_DEVBUF,
-	    M_NOWAIT);
+	    M_NOWAIT | M_ZERO);
 	if (fica == NULL)
 		return (ENOMEM);
 	fica->fica_sc = sc;
@@ -1838,13 +1838,13 @@ fire_msiq_common(struct intr_vector *iv,
 	qrec = &fmqa->fmqa_base[head];
 	word0 = qrec->fomqr_word0;
 	for (;;) {
+		if (__predict_false((word0 & FO_MQR_WORD0_FMT_TYPE_MASK) == 0))
+			break;
 		KASSERT((word0 & FO_MQR_WORD0_FMT_TYPE_MSI64) != 0 ||
 		    (word0 & FO_MQR_WORD0_FMT_TYPE_MSI32) != 0,
 		    ("%s: received non-MSI/MSI-X message in event queue %d "
 		    "(word0 %#llx)", device_get_nameunit(dev), msiq,
 		    (unsigned long long)word0));
-		if (__predict_false((word0 & FO_MQR_WORD0_FMT_TYPE_MASK) == 0))
-			break;
 		msi = (word0 & FO_MQR_WORD0_DATA0_MASK) >>
 		    FO_MQR_WORD0_DATA0_SHFT;
 		/*

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:30:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DA0551065696;
	Wed, 27 Jan 2010 20:30:50 +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 C8DA78FC12;
	Wed, 27 Jan 2010 20:30:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RKUo9Y020837;
	Wed, 27 Jan 2010 20:30:50 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RKUoiU020835;
	Wed, 27 Jan 2010 20:30:50 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201001272030.o0RKUoiU020835@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 27 Jan 2010 20:30:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203095 - stable/7/usr.sbin/pkg_install/add
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:30:51 -0000

Author: kensmith
Date: Wed Jan 27 20:30:50 2010
New Revision: 203095
URL: http://svn.freebsd.org/changeset/base/203095

Log:
  Add packages-7.3-release directory.
  
  Approved by:	re (implicit)

Modified:
  stable/7/usr.sbin/pkg_install/add/main.c

Modified: stable/7/usr.sbin/pkg_install/add/main.c
==============================================================================
--- stable/7/usr.sbin/pkg_install/add/main.c	Wed Jan 27 20:30:14 2010	(r203094)
+++ stable/7/usr.sbin/pkg_install/add/main.c	Wed Jan 27 20:30:50 2010	(r203095)
@@ -82,6 +82,7 @@ struct {
 	{ 700000, 700099, "/packages-7.0-release" },
 	{ 701000, 701099, "/packages-7.1-release" },
 	{ 702000, 702099, "/packages-7.2-release" },
+	{ 703000, 703099, "/packages-7.3-release" },
 	{ 800000, 800499, "/packages-8.0-release" },
 	{ 300000, 399000, "/packages-3-stable" },
 	{ 400000, 499000, "/packages-4-stable" },

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 20:32:58 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A8421065693;
	Wed, 27 Jan 2010 20:32:58 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A9B68FC14;
	Wed, 27 Jan 2010 20:32:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RKWwc4021331;
	Wed, 27 Jan 2010 20:32:58 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RKWwhV021329;
	Wed, 27 Jan 2010 20:32:58 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201001272032.o0RKWwhV021329@svn.freebsd.org>
From: Ed Schouten 
Date: Wed, 27 Jan 2010 20:32:58 +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: r203096 - head/sbin/init
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 20:32:58 -0000

Author: ed
Date: Wed Jan 27 20:32:58 2010
New Revision: 203096
URL: http://svn.freebsd.org/changeset/base/203096

Log:
  Remove stale inclusion of .
  
  This tool doesn't require libulog anymore.

Modified:
  head/sbin/init/init.c

Modified: head/sbin/init/init.c
==============================================================================
--- head/sbin/init/init.c	Wed Jan 27 20:30:50 2010	(r203095)
+++ head/sbin/init/init.c	Wed Jan 27 20:32:58 2010	(r203096)
@@ -65,7 +65,6 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 21:01:21 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B59A1065670;
	Wed, 27 Jan 2010 21:01:21 +0000 (UTC)
	(envelope-from schweikh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7A2918FC16;
	Wed, 27 Jan 2010 21:01:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RL1LJ9028487;
	Wed, 27 Jan 2010 21:01:21 GMT
	(envelope-from schweikh@svn.freebsd.org)
Received: (from schweikh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RL1Llv028480;
	Wed, 27 Jan 2010 21:01:21 GMT
	(envelope-from schweikh@svn.freebsd.org)
Message-Id: <201001272101.o0RL1Llv028480@svn.freebsd.org>
From: Jens Schweikhardt 
Date: Wed, 27 Jan 2010 21:01:21 +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: r203097 - head/lib/librpcsec_gss
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 21:01:21 -0000

Author: schweikh
Date: Wed Jan 27 21:01:21 2010
New Revision: 203097
URL: http://svn.freebsd.org/changeset/base/203097

Log:
  Correct a bunch of typos.

Modified:
  head/lib/librpcsec_gss/rpc_gss_get_versions.3
  head/lib/librpcsec_gss/rpc_gss_max_data_length.3
  head/lib/librpcsec_gss/rpc_gss_seccreate.3
  head/lib/librpcsec_gss/rpc_gss_set_callback.3
  head/lib/librpcsec_gss/rpc_gss_set_svc_name.3
  head/lib/librpcsec_gss/rpcsec_gss.3

Modified: head/lib/librpcsec_gss/rpc_gss_get_versions.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_get_versions.3	Wed Jan 27 20:32:58 2010	(r203096)
+++ head/lib/librpcsec_gss/rpc_gss_get_versions.3	Wed Jan 27 21:01:21 2010	(r203097)
@@ -43,11 +43,11 @@ Return the highest and lowest supported 
 .It vers_hi
 The value of
 .Fa *vers_hi
-is set to the highest suppored protocol version
+is set to the highest supported protocol version
 .It vers_lo
 The value of
 .Fa *vers_lo
-is set to the lowest suppored protocol version
+is set to the lowest supported protocol version
 .El
 .Sh SEE ALSO
 .Xr rpc 3 ,

Modified: head/lib/librpcsec_gss/rpc_gss_max_data_length.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_max_data_length.3	Wed Jan 27 20:32:58 2010	(r203096)
+++ head/lib/librpcsec_gss/rpc_gss_max_data_length.3	Wed Jan 27 21:01:21 2010	(r203097)
@@ -43,7 +43,7 @@ given the current service and QoP settin
 .Sh PARAMETERS
 .Bl -tag
 .It auth
-A handle to a RPCSEC_GSS security ccontext
+A handle to a RPCSEC_GSS security context
 .It max_tp_unit_len
 Maximum packet size of the underlying transport protocol
 .El

Modified: head/lib/librpcsec_gss/rpc_gss_seccreate.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_seccreate.3	Wed Jan 27 20:32:58 2010	(r203096)
+++ head/lib/librpcsec_gss/rpc_gss_seccreate.3	Wed Jan 27 21:01:21 2010	(r203097)
@@ -75,7 +75,7 @@ RPC headers are integrity protected by a
 .El
 .It qop
 Desired	quality of protection or NULL for the default.
-Available values are lised in /etc/gss/qop
+Available values are listed in /etc/gss/qop
 .It options_req
 Extra security context options to be passed to the underlying GSS-API
 mechanism.

Modified: head/lib/librpcsec_gss/rpc_gss_set_callback.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_callback.3	Wed Jan 27 20:32:58 2010	(r203096)
+++ head/lib/librpcsec_gss/rpc_gss_set_callback.3	Wed Jan 27 21:01:21 2010	(r203097)
@@ -66,11 +66,11 @@ values for service and quality of protec
 .It cb
 A structure containing the RPC program and version for this callback
 and a function which will be called when new contexts are created for
-ths given RPC program and version
+the given RPC program and version
 .It req
 The RPC request using the new context
 .It deleg
-GSS-APi delegated credentials (if any)
+GSS-API delegated credentials (if any)
 .It gss_context
 The GSS-API context
 .It lock

Modified: head/lib/librpcsec_gss/rpc_gss_set_svc_name.3
==============================================================================
--- head/lib/librpcsec_gss/rpc_gss_set_svc_name.3	Wed Jan 27 20:32:58 2010	(r203096)
+++ head/lib/librpcsec_gss/rpc_gss_set_svc_name.3	Wed Jan 27 21:01:21 2010	(r203097)
@@ -51,7 +51,7 @@ version.
 .It principal
 A string representing the service principal in the form
 .Qq service@hostname
-.It mechanim
+.It mechanism
 The name of the security mechanism
 .It req_time
 The time in seconds that the service credentials should remain

Modified: head/lib/librpcsec_gss/rpcsec_gss.3
==============================================================================
--- head/lib/librpcsec_gss/rpcsec_gss.3	Wed Jan 27 20:32:58 2010	(r203096)
+++ head/lib/librpcsec_gss/rpcsec_gss.3	Wed Jan 27 21:01:21 2010	(r203097)
@@ -43,7 +43,7 @@ subsequent communication between client 
 authenticated.
 Optionally, extra protection can be applied to the connection.
 The integrity service uses checksums to ensure that all data sent by
-a peer is recieved without modification.
+a peer is received without modification.
 The privacy service uses encryption to ensure that no third party can
 access the data for a connection.
 .Pp
@@ -111,7 +111,7 @@ typedef struct {
 } *rpc_gss_principal_t;
 .Ed
 .It Vt rpc_gss_rawcred_t
-This structure is used to access the raw credentions associated with a
+This structure is used to access the raw credentials associated with a
 security context.
 .Bd -literal
 typedef struct {

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 21:06:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EAB1B106566B;
	Wed, 27 Jan 2010 21:06:53 +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 C0F368FC2F;
	Wed, 27 Jan 2010 21:06:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0RL6rEw029919;
	Wed, 27 Jan 2010 21:06:53 GMT (envelope-from ru@svn.freebsd.org)
Received: (from ru@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0RL6rv0029917;
	Wed, 27 Jan 2010 21:06:53 GMT (envelope-from ru@svn.freebsd.org)
Message-Id: <201001272106.o0RL6rv0029917@svn.freebsd.org>
From: Ruslan Ermilov 
Date: Wed, 27 Jan 2010 21:06: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: r203098 - head/usr.bin/make
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 21:06:54 -0000

Author: ru
Date: Wed Jan 27 21:06:53 2010
New Revision: 203098
URL: http://svn.freebsd.org/changeset/base/203098

Log:
  Eliminated nits from last commit.
  
  OK'ed by:	rodrigc

Modified:
  head/usr.bin/make/make.1

Modified: head/usr.bin/make/make.1
==============================================================================
--- head/usr.bin/make/make.1	Wed Jan 27 21:01:21 2010	(r203097)
+++ head/usr.bin/make/make.1	Wed Jan 27 21:06:53 2010	(r203098)
@@ -852,7 +852,7 @@ These directories will be searched for s
 .Nm
 after it has finished parsing all input makefiles.
 .El
-.Ss Variable modifiers
+.Ss Variable Modifiers
 Variable expansion may be modified to select or modify each word of the
 variable (where a
 .Dq word
@@ -867,7 +867,7 @@ The colon may be escaped with a backslas
 .Pq Ql \e .
 .Bl -tag -width Cm
 .Sm off
-.It Cm \&:C No / Ar pattern Xo
+.It Cm :C No / Ar pattern Xo
 .No / Ar replacement
 .No / Op Cm 1g
 .Xc
@@ -896,13 +896,13 @@ and
 are orthogonal; the former specifies whether multiple words are
 potentially affected, the latter whether multiple substitutions can
 potentially occur within each affected word.
-.It Cm \&:E
+.It Cm :E
 Replaces each word in the variable with its suffix.
-.It Cm \&:H
+.It Cm :H
 Replaces each word in the variable with everything but the last component.
-.It Cm \&:L
+.It Cm :L
 Converts variable to lower-case letters.
-.It Cm \&:M Ns Ar pattern
+.It Cm :M Ns Ar pattern
 Select only those words that match the rest of the modifier.
 The standard shell wildcard characters
 .Pf ( Ql * ,
@@ -913,21 +913,21 @@ may
 be used.
 The wildcard characters may be escaped with a backslash
 .Pq Ql \e .
-.It Cm \&:N Ns Ar pattern
+.It Cm :N Ns Ar pattern
 This is identical to
-.Cm \&:M ,
+.Cm :M ,
 but selects all words which do not match
 the rest of the modifier.
-.It Cm \&:O
+.It Cm :O
 Order every word in the variable alphabetically.
-.It Cm \&:Q
+.It Cm :Q
 Quotes every shell meta-character in the variable, so that it can be passed
 safely through recursive invocations of
 .Nm .
-.It Cm \&:R
+.It Cm :R
 Replaces each word in the variable with everything but its suffix.
 .Sm off
-.It Cm \&:S No / Ar old_string Xo
+.It Cm :S No / Ar old_string Xo
 .No / Ar new_string
 .No / Op Cm g
 .Xc
@@ -991,11 +991,11 @@ is the substring of
 .Ar old_string
 to be replaced in
 .Ar new_string
-.It Cm \&:T
+.It Cm :T
 Replaces each word in the variable with its last component.
-.It Cm \&:U
+.It Cm :U
 Converts variable to upper-case letters.
-.It Cm \&:u
+.It Cm :u
 Remove adjacent duplicate words (like
 .Xr uniq 1 ) .
 .El

From owner-svn-src-all@FreeBSD.ORG  Wed Jan 27 21:59:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C88B106566B;
	Wed, 27 Jan 2010 21:59:06 +0000 (UTC)
	(envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214])
	by mx1.freebsd.org (Postfix) with ESMTP id CC7648FC1B;
	Wed, 27 Jan 2010 21:59:05 +0000 (UTC)
Received: from alchemy.franken.de (localhost [127.0.0.1])
	by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id
	o0RLx4AA056247; Wed, 27 Jan 2010 22:59:04 +0100 (CET)
	(envelope-from marius@alchemy.franken.de)
Received: (from marius@localhost)
	by alchemy.franken.de (8.14.3/8.14.3/Submit) id o0RLx4O6056246;
	Wed, 27 Jan 2010 22:59:04 +0100 (CET) (envelope-from marius)
Date: Wed, 27 Jan 2010 22:59:04 +0100
From: Marius Strobl 
To: Attilio Rao 
Message-ID: <20100127215904.GF40779@alchemy.franken.de>
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	
	<3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Rob Farmer , src-committers@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 27 Jan 2010 21:59:06 -0000

On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote:
> 2010/1/26 Rob Farmer :
> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao  wrote:
> >> Author: attilio
> >> Date: Sat Jan 23 15:54:21 2010
> >> New Revision: 202889
> >> URL: http://svn.freebsd.org/changeset/base/202889
> >>
> >> Log:
> >>  - Fix a race in sched_switch() of sched_4bsd.
> >>    In the case of the thread being on a sleepqueue or a turnstile, the
> >>    sched_lock was acquired (without the aid of the td_lock interface) and
> >>    the td_lock was dropped. This was going to break locking rules on other
> >>    threads willing to access to the thread (via the td_lock interface) and
> >>    modify his flags (allowed as long as the container lock was different
> >>    by the one used in sched_switch).
> >>    In order to prevent this situation, while sched_lock is acquired there
> >>    the td_lock gets blocked. [0]
> >>  - Merge the ULE's internal function thread_block_switch() into the global
> >>    thread_lock_block() and make the former semantic as the default for
> >>    thread_lock_block(). This means that thread_lock_block() will not
> >>    disable interrupts when called (and consequently thread_unlock_block()
> >>    will not re-enabled them when called). This should be done manually
> >>    when necessary.
> >>    Note, however, that ULE's thread_unblock_switch() is not reaped
> >>    because it does reflect a difference in semantic due in ULE (the
> >>    td_lock may not be necessarilly still blocked_lock when calling this).
> >>    While asymmetric, it does describe a remarkable difference in semantic
> >>    that is good to keep in mind.
> >>
> >>  [0] Reported by:      Kohji Okuno
> >>                        
> >>  Tested by:            Giovanni Trematerra
> >>                        
> >>  MFC:                  2 weeks
> >>
> >> Modified:
> >>  head/sys/kern/kern_mutex.c
> >>  head/sys/kern/sched_4bsd.c
> >>  head/sys/kern/sched_ule.c
> >
> > Hi,
> >
> > This commit seems to be causing me a kernel panic on sparc64 - details
> > are in PR 143215. Could you take a look before MFCing this?
> 
> I think that the bug may be in cpu_switch() where the mutex parameter
> for sched_4bsd is not handled correctly.
> Does sparc64 support ULE? I don't think it does and I think that it
> simply ignores the third argument of cpu_switch() which is vital now
> for for sched_4bsd too (what needs to happen is to take the passed
> mutex and to set the TD_LOCK of old thread to be the third argument).
> Unluckilly, I can't do that in sparc64 asm right now, but it should
> not be too difficult to cope with it.
> 

The following patch adds handling of the mutex parameter to the
sparc64 cpu_switch():
http://people.freebsd.org/~marius/sparc64_cpu_switch_mtx.diff
This patch works fine with r202888. With r202889 it allows the
machine to boot again, however putting some load on the machine
causes it to issue a reset without a chance to debug. I've also
tried with some variations like duplicating the old cpu_switch()
for cpu_throw() so the altered cpu_switch() doesn't need to
distinguish between the to cases and only assigning old->td_lock
right before return but nothing made a difference. Given that
this leaves little room for a bug in the cpu_switch() changes I
suspect r202889 also breaks additional assumptions. For example
the sparc64 pmap code used sched_lock, does that need to change
to be td_lock now maybe? Is there anything else that comes to
your mind in this regard?

Marius


From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 01:47:31 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8797110656A5;
	Thu, 28 Jan 2010 01:47:31 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5CC778FC08;
	Thu, 28 Jan 2010 01:47:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0S1lVww091534;
	Thu, 28 Jan 2010 01:47:31 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0S1lVA1091532;
	Thu, 28 Jan 2010 01:47:31 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <201001280147.o0S1lVA1091532@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 28 Jan 2010 01:47: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: r203102 - head/share/man/man8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 01:47:31 -0000

Author: emaste
Date: Thu Jan 28 01:47:31 2010
New Revision: 203102
URL: http://svn.freebsd.org/changeset/base/203102

Log:
  Clean up rc.subr man page after removing leftover NetBSD compat.  Also
  switch to 2-clause license per NetBSD rc.subr.8 r1.19.
  
  Submitted by:	Alex Kozlov

Modified:
  head/share/man/man8/rc.subr.8

Modified: head/share/man/man8/rc.subr.8
==============================================================================
--- head/share/man/man8/rc.subr.8	Thu Jan 28 00:48:15 2010	(r203101)
+++ head/share/man/man8/rc.subr.8	Thu Jan 28 01:47:31 2010	(r203102)
@@ -14,13 +14,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"	This product includes software developed by the NetBSD
-.\"	Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\"    contributors may be used to endorse or promote products derived
-.\"    from this software without specific prior written permission.
 .\"
 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -101,38 +94,9 @@ be rewritten to make use of it.
 The
 .Nm
 functions were mostly imported from
-.Nx
-and it is intended that they remain synced between the
-two projects.
-With that in mind there are several variable
-definitions that can help in this regard.
-They are:
-.Bl -tag -width 4n
-.It Va OSTYPE
-Its value will be either
-.Qq Li FreeBSD
-or
-.Qq Li NetBSD ,
-depending on which OS it is running on.
-.It Va SYSCTL
-The path to the
-.Xr sysctl 8
-command.
-.It Va SYSCTL_N
-The path and argument list to display only the
-.Xr sysctl 8
-values instead of a
-.Ar name Ns = Ns Ar value
-pair.
-.It Va SYSCTL_W
-The path and argument to write or modify
-.Xr sysctl 8
-values.
-.El
+.Nx .
 .Pp
-The
-.Nm
-functions are accessed by sourcing
+They are accessed by sourcing
 .Pa /etc/rc.subr
 into the current shell.
 .Pp

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 02:33:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C268F106568D;
	Thu, 28 Jan 2010 02:33:20 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AF3D98FC19;
	Thu, 28 Jan 2010 02:33:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0S2XKPp001812;
	Thu, 28 Jan 2010 02:33:20 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0S2XKFn001808;
	Thu, 28 Jan 2010 02:33:20 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201001280233.o0S2XKFn001808@svn.freebsd.org>
From: Xin LI 
Date: Thu, 28 Jan 2010 02:33:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203105 - in stable/8: sbin/umount usr.sbin/rpc.umntall
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 02:33:20 -0000

Author: delphij
Date: Thu Jan 28 02:33:20 2010
New Revision: 203105
URL: http://svn.freebsd.org/changeset/base/203105

Log:
  MFC r200135:
  
  Make umount(8) WARNS=6 clean:
   - Cast delimiter width to integer [1]
   - Solve name conflicts against system header
   - Constify parameters to avoid qualifier conflict
  
  PR:		bin/140017 [1]
  Submitted by:	Ulrich Spörlein  [1]
  Sponsored by:	iXsystems, Inc

Modified:
  stable/8/sbin/umount/Makefile
  stable/8/sbin/umount/umount.c
  stable/8/usr.sbin/rpc.umntall/mounttab.c
Directory Properties:
  stable/8/sbin/umount/   (props changed)
  stable/8/usr.sbin/rpc.umntall/   (props changed)

Modified: stable/8/sbin/umount/Makefile
==============================================================================
--- stable/8/sbin/umount/Makefile	Thu Jan 28 02:14:45 2010	(r203104)
+++ stable/8/sbin/umount/Makefile	Thu Jan 28 02:33:20 2010	(r203105)
@@ -4,7 +4,6 @@
 
 PROG=	umount
 SRCS=	umount.c vfslist.c mounttab.c
-WARNS?=	0
 MAN=	umount.8
 
 MOUNT=	${.CURDIR}/../mount

Modified: stable/8/sbin/umount/umount.c
==============================================================================
--- stable/8/sbin/umount/umount.c	Thu Jan 28 02:14:45 2010	(r203104)
+++ stable/8/sbin/umount/umount.c	Thu Jan 28 02:33:20 2010	(r203105)
@@ -75,7 +75,7 @@ char   **makevfslist (const char *);
 size_t	 mntinfo (struct statfs **);
 int	 namematch (struct addrinfo *);
 int	 parsehexfsid(const char *hex, fsid_t *fsid);
-int	 sacmp (struct sockaddr *, struct sockaddr *);
+int	 sacmp (void *, void *);
 int	 umountall (char **);
 int	 checkname (char *, char **);
 int	 umountfs(struct statfs *sfs);
@@ -225,7 +225,7 @@ umountall(char **typelist)
  * Do magic checks on mountpoint/device/fsid, and then call unmount(2).
  */
 int
-checkname(char *name, char **typelist)
+checkname(char *mntname, char **typelist)
 {
 	char buf[MAXPATHLEN];
 	struct statfs sfsbuf;
@@ -238,25 +238,25 @@ checkname(char *name, char **typelist)
 	/*
 	 * 1. Check if the name exists in the mounttable.
 	 */
-	sfs = checkmntlist(name);
+	sfs = checkmntlist(mntname);
 	/*
 	 * 2. Remove trailing slashes if there are any. After that
 	 * we look up the name in the mounttable again.
 	 */
 	if (sfs == NULL) {
-		len = strlen(name);
-		while (len > 1 && name[len - 1] == '/')
-			name[--len] = '\0';
-		sfs = checkmntlist(name);
+		len = strlen(mntname);
+		while (len > 1 && mntname[len - 1] == '/')
+			mntname[--len] = '\0';
+		sfs = checkmntlist(mntname);
 	}
 	/*
 	 * 3. Check if the deprecated NFS syntax with an '@' has been used
 	 * and translate it to the ':' syntax. Look up the name in the
 	 * mount table again.
 	 */
-	if (sfs == NULL && (delimp = strrchr(name, '@')) != NULL) {
-		snprintf(buf, sizeof(buf), "%s:%.*s", delimp + 1, delimp - name,
-		    name);
+	if (sfs == NULL && (delimp = strrchr(mntname, '@')) != NULL) {
+		snprintf(buf, sizeof(buf), "%s:%.*s", delimp + 1,
+		    (int)(delimp - mntname), mntname);
 		len = strlen(buf);
 		while (len > 1 && buf[len - 1] == '/')
 			buf[--len] = '\0';
@@ -271,28 +271,28 @@ checkname(char *name, char **typelist)
 	 * mount list and reality.
 	 * We also do this if an ambiguous mount point was specified.
 	 */
-	if (sfs == NULL || (getmntentry(NULL, name, NULL, FIND) != NULL &&
-	    getmntentry(NULL, name, NULL, CHECKUNIQUE) == NULL)) {
-		if (statfs(name, &sfsbuf) != 0) {
-			warn("%s: statfs", name);
-		} else if (stat(name, &sb) != 0) {
-			warn("%s: stat", name);
+	if (sfs == NULL || (getmntentry(NULL, mntname, NULL, FIND) != NULL &&
+	    getmntentry(NULL, mntname, NULL, CHECKUNIQUE) == NULL)) {
+		if (statfs(mntname, &sfsbuf) != 0) {
+			warn("%s: statfs", mntname);
+		} else if (stat(mntname, &sb) != 0) {
+			warn("%s: stat", mntname);
 		} else if (S_ISDIR(sb.st_mode)) {
-			/* Check that `name' is the root directory. */
+			/* Check that `mntname' is the root directory. */
 			dev = sb.st_dev;
-			snprintf(buf, sizeof(buf), "%s/..", name);
+			snprintf(buf, sizeof(buf), "%s/..", mntname);
 			if (stat(buf, &sb) != 0) {
 				warn("%s: stat", buf);
 			} else if (sb.st_dev == dev) {
 				warnx("%s: not a file system root directory",
-				    name);
+				    mntname);
 				return (1);
 			} else
 				sfs = &sfsbuf;
 		}
 	}
 	if (sfs == NULL) {
-		warnx("%s: unknown file system", name);
+		warnx("%s: unknown file system", mntname);
 		return (1);
 	}
 	if (checkvfsname(sfs->f_fstypename, typelist))
@@ -469,15 +469,16 @@ getmntentry(const char *fromname, const 
 }
 
 int
-sacmp(struct sockaddr *sa1, struct sockaddr *sa2)
+sacmp(void *sa1, void *sa2)
 {
 	void *p1, *p2;
 	int len;
 
-	if (sa1->sa_family != sa2->sa_family)
+	if (((struct sockaddr *)sa1)->sa_family !=
+	    ((struct sockaddr *)sa2)->sa_family)
 		return (1);
 
-	switch (sa1->sa_family) {
+	switch (((struct sockaddr *)sa1)->sa_family) {
 	case AF_INET:
 		p1 = &((struct sockaddr_in *)sa1)->sin_addr;
 		p2 = &((struct sockaddr_in *)sa2)->sin_addr;
@@ -520,18 +521,18 @@ namematch(struct addrinfo *ai)
 }
 
 struct statfs *
-checkmntlist(char *name)
+checkmntlist(char *mntname)
 {
 	struct statfs *sfs;
 	fsid_t fsid;
 
 	sfs = NULL;
-	if (parsehexfsid(name, &fsid) == 0)
+	if (parsehexfsid(mntname, &fsid) == 0)
 		sfs = getmntentry(NULL, NULL, &fsid, FIND);
 	if (sfs == NULL)
-		sfs = getmntentry(NULL, name, NULL, FIND);
+		sfs = getmntentry(NULL, mntname, NULL, FIND);
 	if (sfs == NULL)
-		sfs = getmntentry(name, NULL, NULL, FIND);
+		sfs = getmntentry(mntname, NULL, NULL, FIND);
 	return (sfs);
 }
 

Modified: stable/8/usr.sbin/rpc.umntall/mounttab.c
==============================================================================
--- stable/8/usr.sbin/rpc.umntall/mounttab.c	Thu Jan 28 02:14:45 2010	(r203104)
+++ stable/8/usr.sbin/rpc.umntall/mounttab.c	Thu Jan 28 02:33:20 2010	(r203105)
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
 
 struct mtablist *mtabhead;
 
-static void badline(char *field, char *bad);
+static void badline(const char *field, const char *bad);
 
 /*
  * Add an entry to PATH_MOUNTTAB for each mounted NFS filesystem,
@@ -69,12 +69,12 @@ add_mtab(char *hostp, char *dirp) {
  * Read mounttab line for line and return struct mtablist.
  */
 int
-read_mtab() {
+read_mtab(void) {
 	struct mtablist **mtabpp, *mtabp;
 	char *hostp, *dirp, *cp;
 	char str[STRSIZ];
 	char *timep, *endp;
-	time_t time;
+	time_t actiontime;
 	u_long ultmp;
 	FILE *mtabfile;
 
@@ -86,7 +86,7 @@ read_mtab() {
 			return (0);
 		}
 	}
-	time = 0;
+	actiontime = 0;
 	mtabpp = &mtabhead;
 	while (fgets(str, STRSIZ, mtabfile) != NULL) {
 		cp = str;
@@ -113,13 +113,13 @@ read_mtab() {
 			badline("time", timep);
 			continue;
 		}
-		time = ultmp;
+		actiontime = ultmp;
 		if ((mtabp = malloc(sizeof (struct mtablist))) == NULL) {
 			syslog(LOG_ERR, "malloc");
 			fclose(mtabfile);
 			return (0);
 		}
-		mtabp->mtab_time = time;
+		mtabp->mtab_time = actiontime;
 		memmove(mtabp->mtab_host, hostp, MNTNAMLEN);
 		mtabp->mtab_host[MNTNAMLEN - 1] = '\0';
 		memmove(mtabp->mtab_dirp, dirp, MNTPATHLEN);
@@ -218,7 +218,7 @@ free_mtab() {
  * Print bad lines to syslog.
  */
 static void
-badline(char *field, char *bad) {
+badline(const char *field, const char *bad) {
 	syslog(LOG_ERR, "bad mounttab %s field '%s'", field,
 	    (bad == NULL) ? "" : bad);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 04:50:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4F0EF1065670;
	Thu, 28 Jan 2010 04:50:10 +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 250FB8FC18;
	Thu, 28 Jan 2010 04:50:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0S4oApu031936;
	Thu, 28 Jan 2010 04:50:10 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0S4oAvf031935;
	Thu, 28 Jan 2010 04:50:10 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201001280450.o0S4oAvf031935@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 28 Jan 2010 04:50:09 +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: r203106 - head/sys/ia64/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 04:50:10 -0000

Author: marcel
Date: Thu Jan 28 04:50:09 2010
New Revision: 203106
URL: http://svn.freebsd.org/changeset/base/203106

Log:
  In pci_cfgregread() and pci_cfgregwrite(), validate the arguments and check
  that the alignment matches the width of the read or write.

Modified:
  head/sys/ia64/pci/pci_cfgreg.c

Modified: head/sys/ia64/pci/pci_cfgreg.c
==============================================================================
--- head/sys/ia64/pci/pci_cfgreg.c	Thu Jan 28 02:33:20 2010	(r203105)
+++ head/sys/ia64/pci/pci_cfgreg.c	Thu Jan 28 04:50:09 2010	(r203106)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2010 Marcel Moolenaar
  * Copyright (c) 2001 Doug Rabson
  * All rights reserved.
  *
@@ -30,35 +31,69 @@
 #include 
 #include 
 
-#define SAL_PCI_ADDRESS(bus, slot, func, reg) \
-	(((bus) << 16) | ((slot) << 11) | ((func) << 8) | (reg))
+static u_long
+pci_sal_address(int dom, int bus, int slot, int func, int reg)
+{
+	u_long addr;
+
+	addr = ~0ul;
+	if (dom >= 0 && dom <= 255 && bus >= 0 && bus <= 255 &&
+	    slot >= 0 && slot <= 31 && func >= 0 && func <= 7 &&
+	    reg >= 0 && reg <= 255) {
+		addr = ((u_long)dom << 24) | ((u_long)bus << 16) |
+		    ((u_long)slot << 11) | ((u_long)func << 8) | (u_long)reg;
+	}
+	return (addr);
+}
+
+static int
+pci_valid_access(int reg, int len)
+{
+	int ok;
+
+	ok = ((len == 1 || len == 2 || len == 4) && (reg & (len - 1)) == 0)
+	    ? 1 : 0;
+	return (ok);
+}
 
 int
 pci_cfgregopen(void)
 {
-	return 1;
+	return (1);
 }
 
-u_int32_t
-pci_cfgregread(int bus, int slot, int func, int reg, int bytes)
+uint32_t
+pci_cfgregread(int bus, int slot, int func, int reg, int len)
 {
 	struct ia64_sal_result res;
+	u_long addr;
 
-	res = ia64_sal_entry(SAL_PCI_CONFIG_READ,
-			     SAL_PCI_ADDRESS(bus, slot, func, reg),
-			     bytes, 0, 0, 0, 0, 0);
+	addr = pci_sal_address(0, bus, slot, func, reg);
+	if (addr == ~0ul)
+		return (~0);
+
+	if (!pci_valid_access(reg, len))
+		return (~0);
+
+	res = ia64_sal_entry(SAL_PCI_CONFIG_READ, addr, len, 0, 0, 0, 0, 0);
 	if (res.sal_status < 0)
 		return (~0);
-	else
-		return (res.sal_result[0]);
+
+	return (res.sal_result[0]);
 }
 
 void
-pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes)
+pci_cfgregwrite(int bus, int slot, int func, int reg, uint32_t data, int len)
 {
 	struct ia64_sal_result res;
+	u_long addr;
+
+	addr = pci_sal_address(0, bus, slot, func, reg);
+	if (addr == ~0ul)
+		return;
+
+	if (!pci_valid_access(reg, len))
+		return;
 
-	res = ia64_sal_entry(SAL_PCI_CONFIG_WRITE,
-			     SAL_PCI_ADDRESS(bus, slot, func, reg),
-			     bytes, data, 0, 0, 0, 0);
+	res = ia64_sal_entry(SAL_PCI_CONFIG_WRITE, addr, len, data, 0, 0, 0, 0);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 08:41:31 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 67BB61065676;
	Thu, 28 Jan 2010 08:41: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 5288E8FC12;
	Thu, 28 Jan 2010 08:41:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0S8fVI1083994;
	Thu, 28 Jan 2010 08:41:31 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0S8fVbP083984;
	Thu, 28 Jan 2010 08:41:31 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001280841.o0S8fVbP083984@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Jan 2010 08:41: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: r203108 - in head/sys: cam cam/ata cam/scsi dev/ahci
	dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt
	dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 08:41:31 -0000

Author: mav
Date: Thu Jan 28 08:41:30 2010
New Revision: 203108
URL: http://svn.freebsd.org/changeset/base/203108

Log:
  MFp4: Large set of CAM inprovements.
  
  - Unify bus reset/probe sequence. Whenever bus attached at boot or later,
  CAM will automatically reset and scan it. It allows to remove duplicate
  code from many drivers.
  - Any bus, attached before CAM completed it's boot-time initialization,
  will equally join to the process, delaying boot if needed.
  - New kern.cam.boot_delay loader tunable should help controllers that
  are still unable to register their buses in time (such as slow USB/
  PCCard/ CardBus devices), by adding one more event to wait on boot.
  - To allow synchronization between different CAM levels, concept of
  requests priorities was extended. Priorities now split between several
  "run levels". Device can be freezed at specified level, allowing higher
  priority requests to pass. For example, no payload requests allowed,
  until PMP driver enable port. ATA XPT negotiate transfer parameters,
  periph driver configure caching and so on.
  - Frozen requests are no more counted by request allocation scheduler.
  It fixes deadlocks, when frozen low priority payload requests occupying
  slots, required by higher levels to manage theit execution.
  - Two last changes were holding proper ATA reinitialization and error
  recovery implementation. Now it is done: SATA controllers and Port
  Multipliers now implement automatic hot-plug and should correctly
  recover from timeouts and bus resets.
  - Improve SCSI error recovery for devices on buses without automatic sense
  reporting, such as ATAPI or USB. For example, it allows CAM to wait, while
  CD drive loads disk, instead of immediately return error status.
  - Decapitalize diagnostic messages and make them more readable and sensible.
  - Teach PMP driver to limit maximum speed on fan-out ports.
  - Make boot wait for PMP scan completes, and make rescan more reliable.
  - Fix pass driver, to return CCB to user level in case of error.
  - Increase number of retries in cd driver, as device may return several UAs.

Modified:
  head/sys/cam/ata/ata_all.c
  head/sys/cam/ata/ata_da.c
  head/sys/cam/ata/ata_pmp.c
  head/sys/cam/ata/ata_xpt.c
  head/sys/cam/cam.c
  head/sys/cam/cam.h
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_periph.c
  head/sys/cam/cam_periph.h
  head/sys/cam/cam_queue.h
  head/sys/cam/cam_sim.c
  head/sys/cam/cam_xpt.c
  head/sys/cam/cam_xpt.h
  head/sys/cam/cam_xpt_internal.h
  head/sys/cam/cam_xpt_periph.h
  head/sys/cam/cam_xpt_sim.h
  head/sys/cam/scsi/scsi_all.c
  head/sys/cam/scsi/scsi_cd.c
  head/sys/cam/scsi/scsi_ch.c
  head/sys/cam/scsi/scsi_da.c
  head/sys/cam/scsi/scsi_low.c
  head/sys/cam/scsi/scsi_pass.c
  head/sys/cam/scsi/scsi_xpt.c
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ahci/ahci.h
  head/sys/dev/asr/asr.c
  head/sys/dev/ata/ata-all.c
  head/sys/dev/ata/atapi-cam.c
  head/sys/dev/ciss/ciss.c
  head/sys/dev/hptiop/hptiop.c
  head/sys/dev/hptrr/hptrr_osm_bsd.c
  head/sys/dev/hptrr/os_bsd.h
  head/sys/dev/mly/mly.c
  head/sys/dev/mpt/mpt_cam.h
  head/sys/dev/mpt/mpt_raid.c
  head/sys/dev/ppbus/vpo.c
  head/sys/dev/siis/siis.c
  head/sys/dev/trm/trm.c
  head/sys/dev/twa/tw_osl_cam.c
  head/sys/dev/usb/storage/umass.c

Modified: head/sys/cam/ata/ata_all.c
==============================================================================
--- head/sys/cam/ata/ata_all.c	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/ata/ata_all.c	Thu Jan 28 08:41:30 2010	(r203108)
@@ -198,7 +198,7 @@ ata_command_sbuf(struct ccb_ataio *ataio
 {
 	char cmd_str[(12 * 3) + 1];
 
-	sbuf_printf(sb, "CMD: %s: %s",
+	sbuf_printf(sb, "%s. ACB: %s",
 	    ata_op_string(&ataio->cmd),
 	    ata_cmd_string(&ataio->cmd, cmd_str, sizeof(cmd_str)));
 
@@ -212,7 +212,7 @@ int
 ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb)
 {
 
-	sbuf_printf(sb, "ATA Status: %02x (%s%s%s%s%s%s%s%s)",
+	sbuf_printf(sb, "ATA status: %02x (%s%s%s%s%s%s%s%s)",
 	    ataio->res.status,
 	    (ataio->res.status & 0x80) ? "BSY " : "",
 	    (ataio->res.status & 0x40) ? "DRDY " : "",
@@ -223,7 +223,7 @@ ata_status_sbuf(struct ccb_ataio *ataio,
 	    (ataio->res.status & 0x02) ? "IDX " : "",
 	    (ataio->res.status & 0x01) ? "ERR" : "");
 	if (ataio->res.status & 1) {
-	    sbuf_printf(sb, ", Error: %02x (%s%s%s%s%s%s%s%s)",
+	    sbuf_printf(sb, ", error: %02x (%s%s%s%s%s%s%s%s)",
 		ataio->res.error,
 		(ataio->res.error & 0x80) ? "ICRC " : "",
 		(ataio->res.error & 0x40) ? "UNC " : "",

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/ata/ata_da.c	Thu Jan 28 08:41:30 2010	(r203108)
@@ -689,7 +689,7 @@ adaregister(struct cam_periph *periph, v
 
 	/* Check if the SIM does not want queued commands */
 	bzero(&cpi, sizeof(cpi));
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 	if (cpi.ccb_h.status != CAM_REQ_CMP ||

Modified: head/sys/cam/ata/ata_pmp.c
==============================================================================
--- head/sys/cam/ata/ata_pmp.c	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/ata/ata_pmp.c	Thu Jan 28 08:41:30 2010	(r203108)
@@ -98,6 +98,9 @@ struct pmp_softc {
 	int			reset;
 	int			frozen;
 	int			restart;
+	int			events;
+#define PMP_EV_RESET	1
+#define PMP_EV_RESCAN	2
 	union			ccb saved_ccb;
 	struct task		sysctl_task;
 	struct sysctl_ctx_list	sysctl_ctx;
@@ -179,7 +182,8 @@ pmpfreeze(struct cam_periph *periph, int
 		    i, 0) == CAM_REQ_CMP) {
 			softc->frozen |= (1 << i);
 			xpt_acquire_device(dpath->device);
-			cam_freeze_devq(dpath);
+			cam_freeze_devq_arg(dpath,
+			    RELSIM_RELEASE_RUNLEVEL, CAM_RL_BUS + 1);
 			xpt_free_path(dpath);
 		}
 	}
@@ -200,7 +204,8 @@ pmprelease(struct cam_periph *periph, in
 		    xpt_path_path_id(periph->path),
 		    i, 0) == CAM_REQ_CMP) {
 			softc->frozen &= ~(1 << i);
-			cam_release_devq(dpath, 0, 0, 0, FALSE);
+			cam_release_devq(dpath,
+			    RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_BUS + 1, FALSE);
 			xpt_release_device(dpath->device);
 			xpt_free_path(dpath);
 		}
@@ -298,19 +303,20 @@ pmpasync(void *callback_arg, u_int32_t c
 	case AC_BUS_RESET:
 		softc = (struct pmp_softc *)periph->softc;
 		cam_periph_async(periph, code, path, arg);
-		if (code == AC_SCSI_AEN && softc->state != PMP_STATE_NORMAL &&
-		    softc->state != PMP_STATE_SCAN)
-			break;
-		if (softc->state != PMP_STATE_SCAN)
-			pmpfreeze(periph, softc->found);
+		if (code == AC_SCSI_AEN)
+			softc->events |= PMP_EV_RESCAN;
 		else
-			pmpfreeze(periph, softc->found & ~(1 << softc->pm_step));
+			softc->events |= PMP_EV_RESET;
+		if (code == AC_SCSI_AEN && softc->state != PMP_STATE_NORMAL)
+			break;
+		xpt_hold_boot();
+		pmpfreeze(periph, softc->found);
 		if (code == AC_SENT_BDR || code == AC_BUS_RESET)
 			softc->found = 0; /* We have to reset everything. */
 		if (softc->state == PMP_STATE_NORMAL) {
-			softc->state = PMP_STATE_PORTS;
+			softc->state = PMP_STATE_PRECONFIG;
 			cam_periph_acquire(periph);
-			xpt_schedule(periph, CAM_PRIORITY_BUS);
+			xpt_schedule(periph, CAM_PRIORITY_DEV);
 		} else
 			softc->restart = 1;
 		break;
@@ -353,7 +359,6 @@ static cam_status
 pmpregister(struct cam_periph *periph, void *arg)
 {
 	struct pmp_softc *softc;
-	struct ccb_pathinq cpi;
 	struct ccb_getdev *cgd;
 
 	cgd = (struct ccb_getdev *)arg;
@@ -377,16 +382,8 @@ pmpregister(struct cam_periph *periph, v
 	}
 	periph->softc = softc;
 
-	softc->state = PMP_STATE_PORTS;
 	softc->pm_pid = ((uint32_t *)&cgd->ident_data)[0];
 	softc->pm_prv = ((uint32_t *)&cgd->ident_data)[1];
-
-	/* Check if the SIM does not want queued commands */
-	bzero(&cpi, sizeof(cpi));
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
-	cpi.ccb_h.func_code = XPT_PATH_INQ;
-	xpt_action((union ccb *)&cpi);
-
 	TASK_INIT(&softc->sysctl_task, 0, pmpsysctlinit, periph);
 
 	xpt_announce_periph(periph, NULL);
@@ -408,7 +405,10 @@ pmpregister(struct cam_periph *periph, v
 	 * the end of probe.
 	 */
 	(void)cam_periph_acquire(periph);
-	xpt_schedule(periph, CAM_PRIORITY_BUS);
+	xpt_hold_boot();
+	softc->state = PMP_STATE_PORTS;
+	softc->events = PMP_EV_RESCAN;
+	xpt_schedule(periph, CAM_PRIORITY_DEV);
 
 	return(CAM_REQ_CMP);
 }
@@ -416,17 +416,35 @@ pmpregister(struct cam_periph *periph, v
 static void
 pmpstart(struct cam_periph *periph, union ccb *start_ccb)
 {
+	struct ccb_trans_settings cts;
 	struct ccb_ataio *ataio;
 	struct pmp_softc *softc;
+	struct cam_path *dpath;
+	int revision = 0;
 
 	softc = (struct pmp_softc *)periph->softc;
 	ataio = &start_ccb->ataio;
 	
 	if (softc->restart) {
 		softc->restart = 0;
-		softc->state = PMP_STATE_PORTS;
+		softc->state = min(softc->state, PMP_STATE_PRECONFIG);
+	}
+	/* Fetch user wanted device speed. */
+	if (softc->state == PMP_STATE_RESET ||
+	    softc->state == PMP_STATE_CONNECT) {
+		if (xpt_create_path(&dpath, periph,
+		    xpt_path_path_id(periph->path),
+		    softc->pm_step, 0) == CAM_REQ_CMP) {
+			bzero(&cts, sizeof(cts));
+			xpt_setup_ccb(&cts.ccb_h, dpath, CAM_PRIORITY_NONE);
+			cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
+			cts.type = CTS_TYPE_USER_SETTINGS;
+			xpt_action((union ccb *)&cts);
+			if (cts.xport_specific.sata.valid & CTS_SATA_VALID_REVISION)
+				revision = cts.xport_specific.sata.revision;
+			xpt_free_path(dpath);
+		}
 	}
-
 	switch (softc->state) {
 	case PMP_STATE_PORTS:
 		cam_fill_ataio(ataio,
@@ -460,7 +478,8 @@ pmpstart(struct cam_periph *periph, unio
 		      /*dxfer_len*/0,
 		      pmp_default_timeout * 1000);
 		ata_pm_write_cmd(ataio, 2, softc->pm_step,
-		    (softc->found & (1 << softc->pm_step)) ? 0 : 1);
+		    (revision << 4) |
+		    ((softc->found & (1 << softc->pm_step)) ? 0 : 1));
 		break;
 	case PMP_STATE_CONNECT:
 		cam_fill_ataio(ataio,
@@ -471,7 +490,8 @@ pmpstart(struct cam_periph *periph, unio
 		      /*data_ptr*/NULL,
 		      /*dxfer_len*/0,
 		      pmp_default_timeout * 1000);
-		ata_pm_write_cmd(ataio, 2, softc->pm_step, 0);
+		ata_pm_write_cmd(ataio, 2, softc->pm_step,
+		    (revision << 4));
 		break;
 	case PMP_STATE_CHECK:
 		cam_fill_ataio(ataio,
@@ -519,9 +539,9 @@ pmpdone(struct cam_periph *periph, union
 	struct ccb_trans_settings cts;
 	struct pmp_softc *softc;
 	struct ccb_ataio *ataio;
-	union ccb *work_ccb;
 	struct cam_path *path, *dpath;
 	u_int32_t  priority, res;
+	int i;
 
 	softc = (struct pmp_softc *)periph->softc;
 	ataio = &done_ccb->ataio;
@@ -547,16 +567,8 @@ pmpdone(struct cam_periph *periph, union
 
 	if (softc->restart) {
 		softc->restart = 0;
-		if (softc->state == PMP_STATE_SCAN) {
-			pmpfreeze(periph, 1 << softc->pm_step);
-			work_ccb = done_ccb;
-			done_ccb = (union ccb*)work_ccb->ccb_h.ppriv_ptr0;
-			/* Free the current request path- we're done with it. */
-		    	xpt_free_path(work_ccb->ccb_h.path);
-			xpt_free_ccb(work_ccb);
-		}
 		xpt_release_ccb(done_ccb);
-		softc->state = PMP_STATE_PORTS;
+		softc->state = min(softc->state, PMP_STATE_PRECONFIG);
 		xpt_schedule(periph, priority);
 		return;
 	}
@@ -645,7 +657,7 @@ pmpdone(struct cam_periph *periph, union
 			    xpt_path_path_id(periph->path),
 			    softc->pm_step, 0) == CAM_REQ_CMP) {
 				bzero(&cts, sizeof(cts));
-				xpt_setup_ccb(&cts.ccb_h, dpath, CAM_PRIORITY_NORMAL);
+				xpt_setup_ccb(&cts.ccb_h, dpath, CAM_PRIORITY_NONE);
 				cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 				cts.type = CTS_TYPE_CURRENT_SETTINGS;
 				cts.xport_specific.sata.revision = (res & 0x0f0) >> 4;
@@ -705,53 +717,43 @@ pmpdone(struct cam_periph *periph, union
 		xpt_schedule(periph, priority);
 		return;
 	case PMP_STATE_CONFIG:
-		if (softc->found) {
-			softc->pm_step = 0;
-			softc->state = PMP_STATE_SCAN;
-			work_ccb = xpt_alloc_ccb_nowait();
-			if (work_ccb != NULL)
-				goto do_scan;
-			xpt_release_ccb(done_ccb);
+		for (i = 0; i < softc->pm_ports; i++) {
+			union ccb *ccb;
+
+			if ((softc->found & (1 << i)) == 0)
+				continue;
+			if (xpt_create_path(&dpath, periph,
+			    xpt_path_path_id(periph->path),
+			    i, 0) != CAM_REQ_CMP) {
+				printf("pmpdone: xpt_create_path failed"
+				    ", bus scan halted\n");
+				xpt_free_ccb(done_ccb);
+				goto done;
+			}
+			/* If we did hard reset to this device, inform XPT. */
+			if ((softc->reset & softc->found & (1 << i)) != 0)
+				xpt_async(AC_SENT_BDR, dpath, NULL);
+			/* If rescan requested, scan this device. */
+			if (softc->events & PMP_EV_RESCAN) {
+				ccb = xpt_alloc_ccb_nowait();
+				if (ccb == NULL) {
+					xpt_free_path(dpath);
+					goto done;
+				}
+				xpt_setup_ccb(&ccb->ccb_h, dpath, CAM_PRIORITY_XPT);
+				xpt_rescan(ccb);
+			} else
+				xpt_free_path(dpath);
 		}
 		break;
-	case PMP_STATE_SCAN:
-		work_ccb = done_ccb;
-		done_ccb = (union ccb*)work_ccb->ccb_h.ppriv_ptr0;
-		/* Free the current request path- we're done with it. */
-		xpt_free_path(work_ccb->ccb_h.path);
-		softc->pm_step++;
-do_scan:
-		while (softc->pm_step < softc->pm_ports &&
-		    (softc->found & (1 << softc->pm_step)) == 0) {
-			softc->pm_step++;
-		}
-		if (softc->pm_step >= softc->pm_ports) {
-			xpt_free_ccb(work_ccb);
-			break;
-		}
-		if (xpt_create_path(&dpath, periph,
-		    done_ccb->ccb_h.path_id,
-		    softc->pm_step, 0) != CAM_REQ_CMP) {
-			printf("pmpdone: xpt_create_path failed"
-			    ", bus scan halted\n");
-			xpt_free_ccb(work_ccb);
-			break;
-		}
-		xpt_setup_ccb(&work_ccb->ccb_h, dpath,
-		    done_ccb->ccb_h.pinfo.priority);
-		work_ccb->ccb_h.func_code = XPT_SCAN_LUN;
-		work_ccb->ccb_h.cbfcnp = pmpdone;
-		work_ccb->ccb_h.ppriv_ptr0 = done_ccb;
-		work_ccb->crcn.flags = done_ccb->crcn.flags;
-		xpt_action(work_ccb);
-		pmprelease(periph, 1 << softc->pm_step);
-		return;
 	default:
 		break;
 	}
 done:
 	xpt_release_ccb(done_ccb);
 	softc->state = PMP_STATE_NORMAL;
+	softc->events = 0;
+	xpt_release_boot();
 	pmprelease(periph, -1);
 	cam_periph_release_locked(periph);
 }

Modified: head/sys/cam/ata/ata_xpt.c
==============================================================================
--- head/sys/cam/ata/ata_xpt.c	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/ata/ata_xpt.c	Thu Jan 28 08:41:30 2010	(r203108)
@@ -130,6 +130,7 @@ typedef struct {
 	u_int8_t	digest[16];
 	uint32_t	pm_pid;
 	uint32_t	pm_prv;
+	int		restart;
 	struct cam_periph *periph;
 } probe_softc;
 
@@ -231,15 +232,11 @@ proberegister(struct cam_periph *periph,
 	if (status != CAM_REQ_CMP) {
 		return (status);
 	}
-
-
 	/*
-	 * Ensure we've waited at least a bus settle
-	 * delay before attempting to probe the device.
-	 * For HBAs that don't do bus resets, this won't make a difference.
+	 * Ensure nobody slip in until probe finish.
 	 */
-	cam_periph_freeze_after_event(periph, &periph->path->bus->last_reset,
-				      scsi_delay);
+	cam_freeze_devq_arg(periph->path,
+	    RELSIM_RELEASE_RUNLEVEL, CAM_RL_XPT + 1);
 	probeschedule(periph);
 	return(CAM_REQ_CMP);
 }
@@ -247,17 +244,12 @@ proberegister(struct cam_periph *periph,
 static void
 probeschedule(struct cam_periph *periph)
 {
-	struct ccb_pathinq cpi;
 	union ccb *ccb;
 	probe_softc *softc;
 
 	softc = (probe_softc *)periph->softc;
 	ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs);
 
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
-	cpi.ccb_h.func_code = XPT_PATH_INQ;
-	xpt_action((union ccb *)&cpi);
-
 	if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) ||
 	    periph->path->device->protocol == PROTO_SATAPM)
 		PROBE_SET_ACTION(softc, PROBE_RESET);
@@ -269,7 +261,7 @@ probeschedule(struct cam_periph *periph)
 	else
 		softc->flags &= ~PROBE_NO_ANNOUNCE;
 
-	xpt_schedule(periph, ccb->ccb_h.pinfo.priority);
+	xpt_schedule(periph, CAM_PRIORITY_XPT);
 }
 
 static void
@@ -290,6 +282,14 @@ probestart(struct cam_periph *periph, un
 	csio = &start_ccb->csio;
 	ident_buf = &periph->path->device->ident_data;
 
+	if (softc->restart) {
+		softc->restart = 0;
+		if ((path->device->flags & CAM_DEV_UNCONFIGURED) ||
+		    path->device->protocol == PROTO_SATAPM)
+			softc->action = PROBE_RESET;
+		else
+			softc->action = PROBE_IDENTIFY;
+	}
 	switch (softc->action) {
 	case PROBE_RESET:
 		cam_fill_ataio(ataio,
@@ -299,7 +299,7 @@ probestart(struct cam_periph *periph, un
 		      0,
 		      /*data_ptr*/NULL,
 		      /*dxfer_len*/0,
-		      (start_ccb->ccb_h.target_id == 15 ? 3 : 15) * 1000);
+		      15 * 1000);
 		ata_reset_cmd(ataio);
 		break;
 	case PROBE_IDENTIFY:
@@ -339,7 +339,7 @@ probestart(struct cam_periph *periph, un
 		mode = 0;
 		/* Fetch user modes from SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_USER_SETTINGS;
 		xpt_action((union ccb *)&cts);
@@ -355,7 +355,7 @@ negotiate:
 		wantmode = mode = ata_max_mode(ident_buf, mode);
 		/* Report modes to SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_CURRENT_SETTINGS;
 		if (path->device->transport == XPORT_ATA) {
@@ -368,7 +368,7 @@ negotiate:
 		xpt_action((union ccb *)&cts);
 		/* Fetch current modes from SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_CURRENT_SETTINGS;
 		xpt_action((union ccb *)&cts);
@@ -400,7 +400,7 @@ negotiate:
 		bytecount = 8192;	/* SATA maximum */
 		/* Fetch user bytecount from SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_USER_SETTINGS;
 		xpt_action((union ccb *)&cts);
@@ -416,7 +416,7 @@ negotiate:
 		    bytecount / ata_logical_sector_size(ident_buf)));
 		/* Report bytecount to SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_CURRENT_SETTINGS;
 		if (path->device->transport == XPORT_ATA) {
@@ -431,7 +431,7 @@ negotiate:
 		xpt_action((union ccb *)&cts);
 		/* Fetch current bytecount from SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_CURRENT_SETTINGS;
 		xpt_action((union ccb *)&cts);
@@ -462,7 +462,7 @@ negotiate:
 		bytecount = 8192;	/* SATA maximum */
 		/* Fetch user bytecount from SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_USER_SETTINGS;
 		xpt_action((union ccb *)&cts);
@@ -482,7 +482,7 @@ negotiate:
 		}
 		/* Report bytecount to SIM. */
 		bzero(&cts, sizeof(cts));
-		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 		cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 		cts.type = CTS_TYPE_CURRENT_SETTINGS;
 		if (path->device->transport == XPORT_ATA) {
@@ -560,7 +560,7 @@ proberequestdefaultnegotiation(struct ca
 {
 	struct ccb_trans_settings cts;
 
-	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_USER_SETTINGS;
 	xpt_action((union ccb *)&cts);
@@ -582,7 +582,7 @@ proberequestbackoff(struct cam_periph *p
 	struct ccb_trans_settings_spi *spi;
 
 	memset(&cts, 0, sizeof (cts));
-	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
 	xpt_action((union ccb *)&cts);
@@ -739,7 +739,7 @@ noerror:
 		    done_ccb->ccb_h.target_id == 15) {
 			/* Report SIM that PM is present. */
 			bzero(&cts, sizeof(cts));
-			xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+			xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 			cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 			cts.type = CTS_TYPE_CURRENT_SETTINGS;
 			cts.xport_specific.sata.pm_present = 1;
@@ -836,7 +836,7 @@ noerror:
 		    path->bus->sim->max_tagged_dev_openings != 0) {
 			/* Report SIM which tags are allowed. */
 			bzero(&cts, sizeof(cts));
-			xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+			xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 			cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 			cts.type = CTS_TYPE_CURRENT_SETTINGS;
 			cts.xport_specific.sata.tags = path->device->maxtags;
@@ -957,18 +957,23 @@ noerror:
 		break;
 	}
 done:
-	xpt_release_ccb(done_ccb);
-	done_ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs);
-	TAILQ_REMOVE(&softc->request_ccbs, &done_ccb->ccb_h, periph_links.tqe);
-	done_ccb->ccb_h.status = CAM_REQ_CMP;
-	done_ccb->ccb_h.ppriv_field1 = found;
-	xpt_done(done_ccb);
-	if (TAILQ_FIRST(&softc->request_ccbs) == NULL) {
-		cam_periph_invalidate(periph);
-		cam_periph_release_locked(periph);
-	} else {
+	if (softc->restart) {
+		softc->restart = 0;
+		xpt_release_ccb(done_ccb);
 		probeschedule(periph);
+		return;
 	}
+	xpt_release_ccb(done_ccb);
+	while ((done_ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs))) {
+		TAILQ_REMOVE(&softc->request_ccbs,
+		    &done_ccb->ccb_h, periph_links.tqe);
+		done_ccb->ccb_h.status = found ? CAM_REQ_CMP : CAM_REQ_CMP_ERR;
+		xpt_done(done_ccb);
+	}
+	cam_release_devq(periph->path,
+	    RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_XPT + 1, FALSE);
+	cam_periph_invalidate(periph);
+	cam_periph_release_locked(periph);
 }
 
 static void
@@ -1013,7 +1018,7 @@ ata_scan_bus(struct cam_periph *periph, 
 {
 	struct	cam_path *path;
 	ata_scan_bus_info *scan_info;
-	union	ccb *work_ccb;
+	union	ccb *work_ccb, *reset_ccb;
 	cam_status status;
 
 	CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
@@ -1038,6 +1043,26 @@ ata_scan_bus(struct cam_periph *periph, 
 			return;
 		}
 
+		/* We may need to reset bus first, if we haven't done it yet. */
+		if ((work_ccb->cpi.hba_inquiry &
+		    (PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE)) &&
+		    !(work_ccb->cpi.hba_misc & PIM_NOBUSRESET) &&
+		    !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) {
+			reset_ccb = xpt_alloc_ccb_nowait();
+			xpt_setup_ccb(&reset_ccb->ccb_h, request_ccb->ccb_h.path,
+			      CAM_PRIORITY_NONE);
+			reset_ccb->ccb_h.func_code = XPT_RESET_BUS;
+			xpt_action(reset_ccb);
+			if (reset_ccb->ccb_h.status != CAM_REQ_CMP) {
+				request_ccb->ccb_h.status = reset_ccb->ccb_h.status;
+				xpt_free_ccb(reset_ccb);
+				xpt_free_ccb(work_ccb);
+				xpt_done(request_ccb);
+				return;
+			}
+			xpt_free_ccb(reset_ccb);
+		}
+
 		/* Save some state for use while we probe for devices */
 		scan_info = (ata_scan_bus_info *)
 		    malloc(sizeof(ata_scan_bus_info), M_CAMXPT, M_NOWAIT);
@@ -1071,7 +1096,7 @@ ata_scan_bus(struct cam_periph *periph, 
 		/* If there is PMP... */
 		if ((scan_info->cpi->hba_inquiry & PI_SATAPM) &&
 		    (scan_info->counter == scan_info->cpi->max_target)) {
-			if (work_ccb->ccb_h.ppriv_field1 != 0) {
+			if (work_ccb->ccb_h.status == CAM_REQ_CMP) {
 				/* everything else willbe probed by it */
 				goto done;
 			} else {
@@ -1141,10 +1166,9 @@ ata_scan_lun(struct cam_periph *periph, 
 	struct cam_path *new_path;
 	struct cam_periph *old_periph;
 
-	CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
-		  ("xpt_scan_lun\n"));
+	CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_scan_lun\n"));
 
-	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1182,7 +1206,7 @@ ata_scan_lun(struct cam_periph *periph, 
 			free(new_path, M_CAMXPT);
 			return;
 		}
-		xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_XPT);
 		request_ccb->ccb_h.cbfcnp = xptscandone;
 		request_ccb->ccb_h.func_code = XPT_SCAN_LUN;
 		request_ccb->crcn.flags = flags;
@@ -1194,6 +1218,7 @@ ata_scan_lun(struct cam_periph *periph, 
 		softc = (probe_softc *)old_periph->softc;
 		TAILQ_INSERT_TAIL(&softc->request_ccbs, &request_ccb->ccb_h,
 				  periph_links.tqe);
+		softc->restart = 1;
 	} else {
 		status = cam_periph_alloc(proberegister, NULL, probecleanup,
 					  probestart, "aprobe",
@@ -1281,7 +1306,7 @@ ata_device_transport(struct cam_path *pa
 	struct ata_params *ident_buf = NULL;
 
 	/* Get transport information from the SIM */
-	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1301,7 +1326,7 @@ ata_device_transport(struct cam_path *pa
 	    ata_version(ident_buf->version_major) : cpi.transport_version;
 
 	/* Tell the controller what we think */
-	xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
 	cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
 	cts.transport = path->device->transport;
@@ -1429,7 +1454,7 @@ ata_set_transfer_settings(struct ccb_tra
 
 	inq_data = &device->inq_data;
 	scsi = &cts->proto_specific.scsi;
-	xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
+	xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NONE);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
 	xpt_action((union ccb *)&cpi);
 
@@ -1450,7 +1475,7 @@ ata_set_transfer_settings(struct ccb_tra
 		 * Perform sanity checking against what the
 		 * controller and device can do.
 		 */
-		xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
+		xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NONE);
 		cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
 		cur_cts.type = cts->type;
 		xpt_action((union ccb *)&cur_cts);
@@ -1550,6 +1575,10 @@ ata_dev_async(u_int32_t async_code, stru
 			 */
 			ata_scan_lun(newpath.periph, &newpath,
 				     CAM_EXPECT_INQ_CHANGE, NULL);
+		} else {
+			/* We need to reinitialize device after reset. */
+			ata_scan_lun(newpath.periph, &newpath,
+				     0, NULL);
 		}
 		xpt_release_path(&newpath);
 	} else if (async_code == AC_LOST_DEVICE &&

Modified: head/sys/cam/cam.c
==============================================================================
--- head/sys/cam/cam.c	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/cam.c	Thu Jan 28 08:41:30 2010	(r203108)
@@ -305,10 +305,10 @@ cam_error_string(struct cam_device *devi
 		entry = cam_fetch_status_entry(status);
 
 		if (entry == NULL)
-			sbuf_printf(&sb, "CAM Status: Unknown (%#x)\n",
+			sbuf_printf(&sb, "CAM status: Unknown (%#x)\n",
 				    ccb->ccb_h.status);
 		else
-			sbuf_printf(&sb, "CAM Status: %s\n",
+			sbuf_printf(&sb, "CAM status: %s\n",
 				    entry->status_text);
 	}
 
@@ -338,7 +338,7 @@ cam_error_string(struct cam_device *devi
 
 			if (proto_flags & CAM_ESF_PRINT_STATUS) {
 				sbuf_cat(&sb, path_str);
-				sbuf_printf(&sb, "SCSI Status: %s\n",
+				sbuf_printf(&sb, "SCSI status: %s\n",
 					    scsi_status_string(&ccb->csio));
 			}
 

Modified: head/sys/cam/cam.h
==============================================================================
--- head/sys/cam/cam.h	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/cam.h	Thu Jan 28 08:41:30 2010	(r203108)
@@ -60,16 +60,29 @@ typedef u_int lun_id_t;
 struct cam_periph;
 
 /*
- * Priority information for a CAM structure.  The generation number is
- * incremented everytime a new entry is entered into the queue giving round
- * robin per priority level scheduling.
+ * Priority information for a CAM structure. 
+ */
+typedef enum {
+    CAM_RL_HOST,
+    CAM_RL_BUS,
+    CAM_RL_XPT,
+    CAM_RL_DEV,
+    CAM_RL_NORMAL,
+    CAM_RL_VALUES
+} cam_rl;
+/*
+ * The generation number is incremented everytime a new entry is entered into
+ * the queue giving round robin per priority level scheduling.
  */
 typedef struct {
 	u_int32_t priority;
-#define CAM_PRIORITY_BUS	0
-#define CAM_PRIORITY_DEV	0
-#define CAM_PRIORITY_NORMAL	1
+#define CAM_PRIORITY_HOST	((CAM_RL_HOST << 8) + 0x80)
+#define CAM_PRIORITY_BUS	((CAM_RL_BUS << 8) + 0x80)
+#define CAM_PRIORITY_XPT	((CAM_RL_XPT << 8) + 0x80)
+#define CAM_PRIORITY_DEV	((CAM_RL_DEV << 8) + 0x80)
+#define CAM_PRIORITY_NORMAL	((CAM_RL_NORMAL << 8) + 0x80)
 #define CAM_PRIORITY_NONE	(u_int32_t)-1
+#define CAM_PRIORITY_TO_RL(x)	((x) >> 8)
 	u_int32_t generation;
 	int       index;
 #define CAM_UNQUEUED_INDEX	-1

Modified: head/sys/cam/cam_ccb.h
==============================================================================
--- head/sys/cam/cam_ccb.h	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/cam_ccb.h	Thu Jan 28 08:41:30 2010	(r203108)
@@ -126,7 +126,7 @@ typedef enum {
 	XPT_PATH_INQ		= 0x04,
 				/* Path routing inquiry */
 	XPT_REL_SIMQ		= 0x05,
-				/* Release a frozen SIM queue */
+				/* Release a frozen device queue */
 	XPT_SASYNC_CB		= 0x06,
 				/* Set Asynchronous Callback Parameters */
 	XPT_SDEV_TYPE		= 0x07,
@@ -142,6 +142,8 @@ typedef enum {
 				/* Path statistics (error counts, etc.) */
 	XPT_GDEV_STATS		= 0x0c,
 				/* Device statistics (error counts, etc.) */
+	XPT_FREEZE_QUEUE	= 0x0d,
+				/* Freeze device queue */
 /* SCSI Control Functions: 0x10->0x1F */
 	XPT_ABORT		= 0x10,
 				/* Abort the specified CCB */
@@ -685,8 +687,9 @@ struct ccb_relsim {
 #define RELSIM_RELEASE_AFTER_TIMEOUT	0x02
 #define RELSIM_RELEASE_AFTER_CMDCMPLT	0x04
 #define RELSIM_RELEASE_AFTER_QEMPTY	0x08
+#define RELSIM_RELEASE_RUNLEVEL		0x10
 	u_int32_t      openings;
-	u_int32_t      release_timeout;
+	u_int32_t      release_timeout;	/* Abstract argument. */
 	u_int32_t      qfrozen_cnt;
 };
 

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c	Thu Jan 28 05:28:48 2010	(r203107)
+++ head/sys/cam/cam_periph.c	Thu Jan 28 08:41:30 2010	(r203108)
@@ -71,19 +71,20 @@ static  void		camperiphfree(struct cam_p
 static int		camperiphscsistatuserror(union ccb *ccb,
 						 cam_flags camflags,
 						 u_int32_t sense_flags,
-						 union ccb *save_ccb,
 						 int *openings,
 						 u_int32_t *relsim_flags,
-						 u_int32_t *timeout);
+						 u_int32_t *timeout,
+						 const char **action_string);
 static	int		camperiphscsisenseerror(union ccb *ccb,
 					        cam_flags camflags,
 					        u_int32_t sense_flags,
-					        union ccb *save_ccb,
 					        int *openings,
 					        u_int32_t *relsim_flags,
-					        u_int32_t *timeout);
+					        u_int32_t *timeout,
+					        const char **action_string);
 
 static int nperiph_drivers;
+static int initialized = 0;
 struct periph_driver **periph_drivers;
 
 MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers");
@@ -99,6 +100,7 @@ TUNABLE_INT("kern.cam.periph_busy_delay"
 void
 periphdriver_register(void *data)
 {
+	struct periph_driver *drv = (struct periph_driver *)data;
 	struct periph_driver **newdrivers, **old;
 	int ndrivers;
 
@@ -108,13 +110,30 @@ periphdriver_register(void *data)
 	if (periph_drivers)
 		bcopy(periph_drivers, newdrivers,
 		      sizeof(*newdrivers) * nperiph_drivers);
-	newdrivers[nperiph_drivers] = (struct periph_driver *)data;
+	newdrivers[nperiph_drivers] = drv;
 	newdrivers[nperiph_drivers + 1] = NULL;
 	old = periph_drivers;
 	periph_drivers = newdrivers;
 	if (old)
 		free(old, M_CAMPERIPH);
 	nperiph_drivers++;
+	/* If driver marked as early or it is late now, initialize it. */
+	if (((drv->flags & CAM_PERIPH_DRV_EARLY) != 0 && initialized > 0) ||
+	    initialized > 1)
+		(*drv->init)();
+}
+
+void
+periphdriver_init(int level)
+{
+	int	i, early;
+
+	initialized = max(initialized, level);
+	for (i = 0; periph_drivers[i] != NULL; i++) {
+		early = (periph_drivers[i]->flags & CAM_PERIPH_DRV_EARLY) ? 1 : 2;
+		if (early == initialized)
+			(*periph_drivers[i]->init)();
+	}
 }
 
 cam_status
@@ -915,12 +934,14 @@ cam_periph_runccb(union ccb *ccb,
 
 	} while (error == ERESTART);
           
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) 
+	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 		cam_release_devq(ccb->ccb_h.path,
 				 /* relsim_flags */0,
 				 /* openings */0,
 				 /* timeout */0,
 				 /* getcount_only */ FALSE);
+		ccb->ccb_h.status &= ~CAM_DEV_QFRZN;
+	}
 
 	if (ds != NULL) {
 		if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
@@ -950,17 +971,26 @@ cam_periph_runccb(union ccb *ccb,
 void
 cam_freeze_devq(struct cam_path *path)
 {
-	struct ccb_hdr ccb_h;
 
-	xpt_setup_ccb(&ccb_h, path, CAM_PRIORITY_NORMAL);
-	ccb_h.func_code = XPT_NOOP;
-	ccb_h.flags = CAM_DEV_QFREEZE;
-	xpt_action((union ccb *)&ccb_h);
+	cam_freeze_devq_arg(path, 0, 0);
+}
+
+void
+cam_freeze_devq_arg(struct cam_path *path, uint32_t flags, uint32_t arg)
+{
+	struct ccb_relsim crs;
+
+	xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NONE);
+	crs.ccb_h.func_code = XPT_FREEZE_QUEUE;
+	crs.release_flags = flags;
+	crs.openings = arg;
+	crs.release_timeout = arg;
+	xpt_action((union ccb *)&crs);
 }
 
 u_int32_t
 cam_release_devq(struct cam_path *path, u_int32_t relsim_flags,
-		 u_int32_t openings, u_int32_t timeout,
+		 u_int32_t openings, u_int32_t arg,
 		 int getcount_only)
 {
 	struct ccb_relsim crs;
@@ -970,22 +1000,92 @@ cam_release_devq(struct cam_path *path, 
 	crs.ccb_h.flags = getcount_only ? CAM_DEV_QFREEZE : 0;
 	crs.release_flags = relsim_flags;
 	crs.openings = openings;
-	crs.release_timeout = timeout;
+	crs.release_timeout = arg;
 	xpt_action((union ccb *)&crs);
 	return (crs.qfrozen_cnt);
 }
 
 #define saved_ccb_ptr ppriv_ptr0
+#define recovery_depth ppriv_field1
+static void
+camperiphsensedone(struct cam_periph *periph, union ccb *done_ccb)
+{
+	union ccb      *saved_ccb = (union ccb *)done_ccb->ccb_h.saved_ccb_ptr;
+	cam_status	status;
+	int		frozen = 0;
+	u_int		sense_key;
+	int		depth = done_ccb->ccb_h.recovery_depth;
+
+	status = done_ccb->ccb_h.status;
+	if (status & CAM_DEV_QFRZN) {
+		frozen = 1;
+		/*
+		 * Clear freeze flag now for case of retry,
+		 * freeze will be dropped later.
+		 */
+		done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN;
+	}
+	status &= CAM_STATUS_MASK;
+	switch (status) {
+	case CAM_REQ_CMP:
+	{
+		/*
+		 * If we manually retrieved sense into a CCB and got
+		 * something other than "NO SENSE" send the updated CCB
+		 * back to the client via xpt_done() to be processed via
+		 * the error recovery code again.
+		 */
+		sense_key = saved_ccb->csio.sense_data.flags;
+		sense_key &= SSD_KEY;
+		if (sense_key != SSD_KEY_NO_SENSE) {
+			saved_ccb->ccb_h.status |=
+			    CAM_AUTOSNS_VALID;
+		} else {
+			saved_ccb->ccb_h.status &=
+			    ~CAM_STATUS_MASK;
+			saved_ccb->ccb_h.status |=
+			    CAM_AUTOSENSE_FAIL;
+		}
+		bcopy(saved_ccb, done_ccb, sizeof(union ccb));
+		xpt_free_ccb(saved_ccb);
+		break;
+	}
+	default:
+		bcopy(saved_ccb, done_ccb, sizeof(union ccb));
+		xpt_free_ccb(saved_ccb);
+		done_ccb->ccb_h.status &= ~CAM_STATUS_MASK;
+		done_ccb->ccb_h.status |= CAM_AUTOSENSE_FAIL;
+		break;
+	}
+	periph->flags &= ~CAM_PERIPH_SENSE_INPROG;
+	/*
+	 * If it is the end of recovery, drop freeze, taken due to
+	 * CAM_DEV_QFREEZE flag, set on recovery request.
+	 */
+	if (depth == 0) {
+		cam_release_devq(done_ccb->ccb_h.path,
+			 /*relsim_flags*/0,
+			 /*openings*/0,
+			 /*timeout*/0,
+			 /*getcount_only*/0);
+	}
+	/*
+	 * Copy frozen flag from recovery request if it is set there
+	 * for some reason.
+	 */
+	if (frozen != 0)
+		done_ccb->ccb_h.status |= CAM_DEV_QFRZN;
+	(*done_ccb->ccb_h.cbfcnp)(periph, done_ccb);
+}
+
 static void
 camperiphdone(struct cam_periph *periph, union ccb *done_ccb)
 {
-	union ccb      *saved_ccb;
+	union ccb      *saved_ccb, *save_ccb;
 	cam_status	status;
 	int		frozen = 0;
-	int		sense;
 	struct scsi_start_stop_unit *scsi_cmd;
 	u_int32_t	relsim_flags, timeout;
-	int		xpt_done_ccb = FALSE;
 
 	status = done_ccb->ccb_h.status;
 	if (status & CAM_DEV_QFRZN) {
@@ -996,14 +1096,12 @@ camperiphdone(struct cam_periph *periph,
 		 */
 		done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN;
 	}
-	sense  = (status & CAM_AUTOSNS_VALID) != 0;
-	status &= CAM_STATUS_MASK;
 
 	timeout = 0;
 	relsim_flags = 0;
 	saved_ccb = (union ccb *)done_ccb->ccb_h.saved_ccb_ptr;
 
-	switch (status) {
+	switch (status & CAM_STATUS_MASK) {
 	case CAM_REQ_CMP:
 	{
 		/*
@@ -1012,57 +1110,19 @@ camperiphdone(struct cam_periph *periph,
 		 * the inquiry information.  Many devices (mostly disks)
 		 * don't properly report their inquiry information unless
 		 * they are spun up.
-		 *
-		 * If we manually retrieved sense into a CCB and got
-		 * something other than "NO SENSE" send the updated CCB
-		 * back to the client via xpt_done() to be processed via
-		 * the error recovery code again.
 		 */
-		if (done_ccb->ccb_h.func_code == XPT_SCSI_IO) {
-			scsi_cmd = (struct scsi_start_stop_unit *)
-					&done_ccb->csio.cdb_io.cdb_bytes;
-
-		 	if (scsi_cmd->opcode == START_STOP_UNIT)
-				xpt_async(AC_INQ_CHANGED,
-					  done_ccb->ccb_h.path, NULL);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 10:16:57 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 399B5106566B;
	Thu, 28 Jan 2010 10:16:57 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com
	[209.85.223.178])
	by mx1.freebsd.org (Postfix) with ESMTP id D1CEE8FC15;
	Thu, 28 Jan 2010 10:16:56 +0000 (UTC)
Received: by iwn8 with SMTP id 8so598586iwn.13
	for ; Thu, 28 Jan 2010 02:16:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=SXj8qvcvGsl3huRdFZRbHPX6jtNcNbewVdAXYix7DU4=;
	b=WKixgvDbN91TyNkHdl4yn4cxvug4RBr3VQMrU0L5qSm/VmMPLvYmdJXxE4kbXzERKw
	4s0BhTZNHjHWzVl19Ugs76TyZNUMjloFYmvxTHFflXAMck8ytUq6ChmwX593fEo9BwZX
	84oGSgtPfb84NLIR2+bzk3KBk4C8bF5vEJZZ0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=WswmBWQDMkgrAMSBaPbTMdGW7cTMX47X2Cf5MX+Ku8JUFMkxenKg1ttSwSSmQyxBhT
	Ew+hizURgB3AcTRPU6P2CvQBnREGwe/+5zA5WsqDhTdqB65vlptuStGrdQU/ufLDDqp9
	zvbNt+Lwb40d+DVe0HljeN0E0YXBBtwKazW+U=
MIME-Version: 1.0
Sender: asmrookie@gmail.com
Received: by 10.231.154.197 with SMTP id p5mr194257ibw.28.1264673815928; Thu, 
	28 Jan 2010 02:16:55 -0800 (PST)
In-Reply-To: <20100127215904.GF40779@alchemy.franken.de>
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	
	<3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com>
	<20100127215904.GF40779@alchemy.franken.de>
Date: Thu, 28 Jan 2010 11:16:55 +0100
X-Google-Sender-Auth: 09c0f78f7782114d
Message-ID: <3bbf2fe11001280216p705ed94ev61abc4be654f8cc1@mail.gmail.com>
From: Attilio Rao 
To: Marius Strobl 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Rob Farmer , src-committers@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 10:16:57 -0000

2010/1/27 Marius Strobl :
> On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote:
>> 2010/1/26 Rob Farmer :
>> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao  wro=
te:
>> >> Author: attilio
>> >> Date: Sat Jan 23 15:54:21 2010
>> >> New Revision: 202889
>> >> URL: http://svn.freebsd.org/changeset/base/202889
>> >>
>> >> Log:
>> >> =C2=A0- Fix a race in sched_switch() of sched_4bsd.
>> >> =C2=A0 =C2=A0In the case of the thread being on a sleepqueue or a tur=
nstile, the
>> >> =C2=A0 =C2=A0sched_lock was acquired (without the aid of the td_lock =
interface) and
>> >> =C2=A0 =C2=A0the td_lock was dropped. This was going to break locking=
 rules on other
>> >> =C2=A0 =C2=A0threads willing to access to the thread (via the td_lock=
 interface) and
>> >> =C2=A0 =C2=A0modify his flags (allowed as long as the container lock =
was different
>> >> =C2=A0 =C2=A0by the one used in sched_switch).
>> >> =C2=A0 =C2=A0In order to prevent this situation, while sched_lock is =
acquired there
>> >> =C2=A0 =C2=A0the td_lock gets blocked. [0]
>> >> =C2=A0- Merge the ULE's internal function thread_block_switch() into =
the global
>> >> =C2=A0 =C2=A0thread_lock_block() and make the former semantic as the =
default for
>> >> =C2=A0 =C2=A0thread_lock_block(). This means that thread_lock_block()=
 will not
>> >> =C2=A0 =C2=A0disable interrupts when called (and consequently thread_=
unlock_block()
>> >> =C2=A0 =C2=A0will not re-enabled them when called). This should be do=
ne manually
>> >> =C2=A0 =C2=A0when necessary.
>> >> =C2=A0 =C2=A0Note, however, that ULE's thread_unblock_switch() is not=
 reaped
>> >> =C2=A0 =C2=A0because it does reflect a difference in semantic due in =
ULE (the
>> >> =C2=A0 =C2=A0td_lock may not be necessarilly still blocked_lock when =
calling this).
>> >> =C2=A0 =C2=A0While asymmetric, it does describe a remarkable differen=
ce in semantic
>> >> =C2=A0 =C2=A0that is good to keep in mind.
>> >>
>> >> =C2=A0[0] Reported by: =C2=A0 =C2=A0 =C2=A0Kohji Okuno
>> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0
>> >> =C2=A0Tested by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Giovanni Tr=
ematerra
>> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0
>> >> =C2=A0MFC: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A02 weeks
>> >>
>> >> Modified:
>> >> =C2=A0head/sys/kern/kern_mutex.c
>> >> =C2=A0head/sys/kern/sched_4bsd.c
>> >> =C2=A0head/sys/kern/sched_ule.c
>> >
>> > Hi,
>> >
>> > This commit seems to be causing me a kernel panic on sparc64 - details
>> > are in PR 143215. Could you take a look before MFCing this?
>>
>> I think that the bug may be in cpu_switch() where the mutex parameter
>> for sched_4bsd is not handled correctly.
>> Does sparc64 support ULE? I don't think it does and I think that it
>> simply ignores the third argument of cpu_switch() which is vital now
>> for for sched_4bsd too (what needs to happen is to take the passed
>> mutex and to set the TD_LOCK of old thread to be the third argument).
>> Unluckilly, I can't do that in sparc64 asm right now, but it should
>> not be too difficult to cope with it.
>>
>
> The following patch adds handling of the mutex parameter to the
> sparc64 cpu_switch():
> http://people.freebsd.org/~marius/sparc64_cpu_switch_mtx.diff
> This patch works fine with r202888. With r202889 it allows the
> machine to boot again, however putting some load on the machine
> causes it to issue a reset without a chance to debug. I've also
> tried with some variations like duplicating the old cpu_switch()
> for cpu_throw() so the altered cpu_switch() doesn't need to
> distinguish between the to cases and only assigning old->td_lock
> right before return but nothing made a difference. Given that
> this leaves little room for a bug in the cpu_switch() changes I
> suspect r202889 also breaks additional assumptions. For example
> the sparc64 pmap code used sched_lock, does that need to change
> to be td_lock now maybe? Is there anything else that comes to
> your mind in this regard?

Sorry for being lame with sparc64 assembly (so that I can't make much
more productive help here), but the required patch, sched_4bsd only,
should simply save the extra-argument of cpu_switch() (and cpu_throw()
is not involved, so I'm not sure what is changing there) and move in
TD_LOCK(%oldthreadreg) when it is safe to do (just after the oldthread
switched out completely). It doesn't even require a memory barrier.
This patch seems a bit too big and I wonder what else it does (or I'm
entirely wrong and that's just what I asked here), maybe adding the
ULE support as well?

Said that, all the code, including MD parts should always use
td_lock() and not doing explicit acquisitions/drops of sched_lock, if
they want to support ULE (but probabilly even if they do not want),
unless there is a big compelling reason (that I expect to be justified
in comments at least).
I'm not sure how to debug a possible reset or I'm not aware of further
broken asserts, at least for tier-1 architectures.

Thanks,
Attilio


--=20
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 10:22:44 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F33F1065698;
	Thu, 28 Jan 2010 10:22:44 +0000 (UTC)
	(envelope-from bms@incunabulum.net)
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 1D29E8FC21;
	Thu, 28 Jan 2010 10:22:44 +0000 (UTC)
Received: from compute2.internal (compute2.internal [10.202.2.42])
	by gateway1.messagingengine.com (Postfix) with ESMTP id B040CCDE63;
	Thu, 28 Jan 2010 05:22:43 -0500 (EST)
Received: from heartbeat2.messagingengine.com ([10.202.2.161])
	by compute2.internal (MEProxy); Thu, 28 Jan 2010 05:22:43 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com;
	h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding;
	s=smtpout; bh=msKZV0dj+MUfN47wum/Nm2fyZOs=;
	b=kocAnivZpGTj9PIMjuKzTGnHbbjZJZQS+bh/8xZV5XxuSdEwvMtFZ6RBTaFgLvWYpgXJJqLWwZ0kTjaZSqQ209Yaqcnc8dpi1xKE7A9q0O32Eo0v7mms1WQBES1ym6AGH6tXDRGRx/LlpTS9OESKsqU9lL8QblhYM6/GJwuMeHE=
X-Sasl-enc: wORzOtiegI/8N9TMc69hIvRmVFP8fdvw3fK8fib3W2Ul 1264674163
Received: from anglepoise.lon.incunabulum.net
	(cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254])
	by mail.messagingengine.com (Postfix) with ESMTPSA id 18807196BA;
	Thu, 28 Jan 2010 05:22:43 -0500 (EST)
Message-ID: <4B616571.2050607@incunabulum.net>
Date: Thu, 28 Jan 2010 10:22:41 +0000
From: Bruce Simpson 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.7) Gecko/20100124 Thunderbird/3.0.1
MIME-Version: 1.0
To: Alexander Motin 
References: <201001280841.o0S8fVbP083984@svn.freebsd.org>
In-Reply-To: <201001280841.o0S8fVbP083984@svn.freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r203108 - in head/sys: cam cam/ata cam/scsi dev/ahci
 dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus
 dev/siis dev/trm dev/twa dev/usb/storage
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 10:22:44 -0000

I just tested this patch in -STABLE right now, and it's looking fine so far.

Plugging the eSATA box in triggers:
ada1 at ahcich3 bus 0 scbus3 target 0 lun 0
ada1:  ATA-8 SATA 2.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO size 8192bytes)
ada1: Command Queueing enabled
ada1: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)

anglepoise:~ % camcontrol devlist
     at scbus0 target 0 lun 0 (pass0,ada0)
   at scbus3 target 0 lun 0 (ada1,pass5)
   at scbus4 target 1 lun 0 (pass1,cd0,sg0)
    at scbus6 target 0 lun 0 (sg1,da0,pass2)
    at scbus6 target 0 lun 1 (sg2,da1,pass3)
    at scbus6 target 0 lun 2 (sg3,da2,pass4)

Playing an AVI with VLC off the external drive is fine, didn't do any 
more I/O tests.

Unplugging it (after unmounting) triggers:
(ada1:ahcich3:0:0:0): lost device
(ada1:ahcich3:0:0:0): removing device entry

anglepoise:~ % camcontrol devlist
     at scbus0 target 0 lun 0 (pass0,ada0)
   at scbus4 target 1 lun 0 (pass1,cd0,sg0)
    at scbus6 target 0 lun 0 (sg1,da0,pass2)
    at scbus6 target 0 lun 1 (sg2,da1,pass3)
    at scbus6 target 0 lun 2 (sg3,da2,pass4)

Update of the gstat display is almost instantaneous, I see the GEOM 
providers appear and disappear when [un]patching.

Great job!

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 10:50:10 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5840D1065676;
	Thu, 28 Jan 2010 10:50:10 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 461278FC0A;
	Thu, 28 Jan 2010 10:50:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SAoAl5016868;
	Thu, 28 Jan 2010 10:50:10 GMT (envelope-from philip@svn.freebsd.org)
Received: (from philip@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SAoAGw016865;
	Thu, 28 Jan 2010 10:50:10 GMT (envelope-from philip@svn.freebsd.org)
Message-Id: <201001281050.o0SAoAGw016865@svn.freebsd.org>
From: Philip Paeps 
Date: Thu, 28 Jan 2010 10:50:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-svnadmin@freebsd.org
X-SVN-Group: svnadmin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203111 - svnadmin/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 10:50:10 -0000

Author: philip
Date: Thu Jan 28 10:50:09 2010
New Revision: 203111
URL: http://svn.freebsd.org/changeset/base/203111

Log:
  Add Ulrich Spörlein (uqs) as a src committer.  I will be his mentor.
  
  Approved by:	core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==============================================================================
--- svnadmin/conf/access	Thu Jan 28 09:25:34 2010	(r203110)
+++ svnadmin/conf/access	Thu Jan 28 10:50:09 2010	(r203111)
@@ -218,6 +218,7 @@ truckman
 tuexen
 ume
 ups
+uqs
 vanhu
 versus
 weongyo

Modified: svnadmin/conf/mentors
==============================================================================
--- svnadmin/conf/mentors	Thu Jan 28 09:25:34 2010	(r203110)
+++ svnadmin/conf/mentors	Thu Jan 28 10:50:09 2010	(r203111)
@@ -26,5 +26,6 @@ sbruno		scottl
 snb		dwmalone
 sson		gnn
 versus		dds
+uqs		philip
 will		ken
 zml		dfr

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 14:01:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B4C61065672;
	Thu, 28 Jan 2010 14:01:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D4C118FC1A;
	Thu, 28 Jan 2010 14:01:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SE1GRv058867;
	Thu, 28 Jan 2010 14:01:16 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SE1GLb058864;
	Thu, 28 Jan 2010 14:01:16 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001281401.o0SE1GLb058864@svn.freebsd.org>
From: Randall Stewart 
Date: Thu, 28 Jan 2010 14:01:16 +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: r203112 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 14:01:17 -0000

Author: rrs
Date: Thu Jan 28 14:01:16 2010
New Revision: 203112
URL: http://svn.freebsd.org/changeset/base/203112

Log:
  Changes the msg ring so its a filter not a
  handler. Somehow rrs missed this.. Thanks
  to JC for catching this ;-)
  
  Obtained from:	JC (jayachandranc@netlogicmicro.com

Modified:
  head/sys/mips/rmi/on_chip.c
  head/sys/mips/rmi/xlr_machdep.c

Modified: head/sys/mips/rmi/on_chip.c
==============================================================================
--- head/sys/mips/rmi/on_chip.c	Thu Jan 28 10:50:09 2010	(r203111)
+++ head/sys/mips/rmi/on_chip.c	Thu Jan 28 14:01:16 2010	(r203112)
@@ -27,6 +27,8 @@
  * SUCH DAMAGE.
  *
  * RMI_BSD */
+#include 
+__FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
@@ -272,9 +274,9 @@ register_msgring_handler(int major,
 	if (xlr_test_and_set(&msgring_int_enabled)) {
 		platform_prep_smp_launch();
 
-		cpu_establish_hardintr("msgring", (driver_filter_t *) NULL,
-		    (driver_intr_t *) msgring_process_fast_intr,
-		    NULL, IRQ_MSGRING, INTR_TYPE_NET | INTR_FAST, &cookie);
+		cpu_establish_hardintr("msgring", (driver_filter_t *) msgring_process_fast_intr,
+			NULL, NULL, IRQ_MSGRING, 
+			INTR_TYPE_NET | INTR_FAST, &cookie);
 
 		/* configure the msgring interrupt on cpu 0 */
 		enable_msgring_int(NULL);

Modified: head/sys/mips/rmi/xlr_machdep.c
==============================================================================
--- head/sys/mips/rmi/xlr_machdep.c	Thu Jan 28 10:50:09 2010	(r203111)
+++ head/sys/mips/rmi/xlr_machdep.c	Thu Jan 28 14:01:16 2010	(r203112)
@@ -583,7 +583,7 @@ disable_msgring_int(void *arg);
 void 
 enable_msgring_int(void *arg);
 void xlr_msgring_handler(struct trapframe *tf);
-void msgring_process_fast_intr(void *arg);
+int msgring_process_fast_intr(void *arg);
 
 struct msgring_ithread {
 	struct thread *i_thread;
@@ -594,7 +594,7 @@ struct msgring_ithread {
 struct msgring_ithread msgring_ithreads[MAXCPU];
 char ithd_name[MAXCPU][32];
 
-void
+int
 msgring_process_fast_intr(void *arg)
 {
 	int cpu = PCPU_GET(cpuid);
@@ -617,6 +617,7 @@ msgring_process_fast_intr(void *arg)
 		sched_add(td, SRQ_INTR);
 	}
 	thread_unlock(td);
+	return FILTER_HANDLED;
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 14:01:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 74B0C1065672;
	Thu, 28 Jan 2010 14:01:47 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4A7278FC20;
	Thu, 28 Jan 2010 14:01:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SE1lWa059001;
	Thu, 28 Jan 2010 14:01:47 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SE1lUs058999;
	Thu, 28 Jan 2010 14:01:47 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001281401.o0SE1lUs058999@svn.freebsd.org>
From: Randall Stewart 
Date: Thu, 28 Jan 2010 14:01: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: r203113 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 14:01:47 -0000

Author: rrs
Date: Thu Jan 28 14:01:47 2010
New Revision: 203113
URL: http://svn.freebsd.org/changeset/base/203113

Log:
  Make compilable.. i.e. the FreeBSD id I added must
  be in comments.

Modified:
  head/sys/mips/rmi/pic.h

Modified: head/sys/mips/rmi/pic.h
==============================================================================
--- head/sys/mips/rmi/pic.h	Thu Jan 28 14:01:16 2010	(r203112)
+++ head/sys/mips/rmi/pic.h	Thu Jan 28 14:01:47 2010	(r203113)
@@ -30,7 +30,9 @@
 #ifndef _RMI_PIC_H_
 #define _RMI_PIC_H_
 #include 
+/*
 __FBSDID("$FreeBSD$");
+*/
 
 extern int rmi_spin_mutex_safe;
 

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 14:03:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2ED01065672;
	Thu, 28 Jan 2010 14:03:06 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 91CE88FC12;
	Thu, 28 Jan 2010 14:03:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SE36il059335;
	Thu, 28 Jan 2010 14:03:06 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SE36JR059333;
	Thu, 28 Jan 2010 14:03:06 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001281403.o0SE36JR059333@svn.freebsd.org>
From: Randall Stewart 
Date: Thu, 28 Jan 2010 14:03:06 +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: r203114 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 14:03:06 -0000

Author: rrs
Date: Thu Jan 28 14:03:06 2010
New Revision: 203114
URL: http://svn.freebsd.org/changeset/base/203114

Log:
  Adds additional hacks for proper bits so that
  the RMI/XLR has the COP0 and COP2 bits enabled
  Plus it needs SX too. Thanks again for JC in
  catching this ;-)
  
  Submitted by:	JC (jayachandranc@netlogicmicro.com

Modified:
  head/sys/mips/mips/locore.S

Modified: head/sys/mips/mips/locore.S
==============================================================================
--- head/sys/mips/mips/locore.S	Thu Jan 28 14:01:47 2010	(r203113)
+++ head/sys/mips/mips/locore.S	Thu Jan 28 14:03:06 2010	(r203114)
@@ -104,6 +104,12 @@ VECTOR(_locore, unknown)
 
 	/* Reset these bits */
         li	t0, ~(MIPS_SR_DE | MIPS_SR_SOFT_RESET | MIPS_SR_ERL | MIPS_SR_EXL | MIPS_SR_INT_IE)
+#elif defined (CPU_XLR)
+	/* Set these bits */
+        li	t1, (MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | MIPS_SR_KX)
+
+	/* Reset these bits */
+        li	t0, ~(MIPS_SR_BEV | MIPS_SR_SOFT_RESET | MIPS_SR_INT_IE)
 #else
 	/*
 	 * t0: Bits to preserve if set:

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 14:09:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 37C7F106566C;
	Thu, 28 Jan 2010 14:09:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 269CA8FC18;
	Thu, 28 Jan 2010 14:09:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SE9HIG060771;
	Thu, 28 Jan 2010 14:09:17 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SE9HJH060769;
	Thu, 28 Jan 2010 14:09:17 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001281409.o0SE9HJH060769@svn.freebsd.org>
From: Randall Stewart 
Date: Thu, 28 Jan 2010 14:09:17 +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: r203115 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 14:09:17 -0000

Author: rrs
Date: Thu Jan 28 14:09:16 2010
New Revision: 203115
URL: http://svn.freebsd.org/changeset/base/203115

Log:
  Fix two of the extended memory hacks. The copy pages
  routine in one place was setting the valid2 bit to
  2 not 1. This meant the PTE was NOT valid and so
  you would crash.
  
  In Zero Page there was a incorrect setting of
  the valid bit AFTER the actual zero (opps)..
  
  Hopefully this will fix the 0xc0000000 crashes
  that I have been seeing (unless of course there are
  other problems with these old hacks of mine to get
  to memory above 512Meg)

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Thu Jan 28 14:03:06 2010	(r203114)
+++ head/sys/mips/mips/pmap.c	Thu Jan 28 14:09:16 2010	(r203115)
@@ -2273,8 +2273,8 @@ pmap_zero_page(vm_page_t m)
 		PMAP_LGMEM_LOCK(sysm);
 		sched_pin();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
-		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		sysm->valid1 = 1;
+		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero(sysm->CADDR1, PAGE_SIZE);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
 		sysm->CMAP1 = 0;
@@ -2446,7 +2446,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
 				va_src = MIPS_PHYS_TO_CACHED(phy_src);
 				sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
 				pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2);
-				sysm->valid2 = 2;
+				sysm->valid2 = 1;
 				va_dst = (vm_offset_t)sysm->CADDR2;
 			} else if (phy_dst < MIPS_KSEG0_LARGEST_PHYS) {
 				/* one side needs mapping - src */

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 14:59:16 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 976E1106568B;
	Thu, 28 Jan 2010 14:59:16 +0000 (UTC)
	(envelope-from cognet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 868118FC26;
	Thu, 28 Jan 2010 14:59:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SExGel071810;
	Thu, 28 Jan 2010 14:59:16 GMT (envelope-from cognet@svn.freebsd.org)
Received: (from cognet@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SExG03071808;
	Thu, 28 Jan 2010 14:59:16 GMT (envelope-from cognet@svn.freebsd.org)
Message-Id: <201001281459.o0SExG03071808@svn.freebsd.org>
From: Olivier Houchard 
Date: Thu, 28 Jan 2010 14:59:16 +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: r203116 - head/sys/mips/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 14:59:16 -0000

Author: cognet
Date: Thu Jan 28 14:59:16 2010
New Revision: 203116
URL: http://svn.freebsd.org/changeset/base/203116

Log:
  Comment out any reference to ALCHEMY.hints until it's committed, to unbreak
  make universe.
  
  Spotted out by:	gahr

Modified:
  head/sys/mips/conf/ALCHEMY

Modified: head/sys/mips/conf/ALCHEMY
==============================================================================
--- head/sys/mips/conf/ALCHEMY	Thu Jan 28 14:09:16 2010	(r203115)
+++ head/sys/mips/conf/ALCHEMY	Thu Jan 28 14:59:16 2010	(r203116)
@@ -27,7 +27,7 @@ makeoptions	MODULES_OVERRIDE=""
 
 include		"../alchemy/std.alchemy"
 
-hints		"ALCHEMY.hints"		#Default places to look for devices.
+#hints		"ALCHEMY.hints"		#Default places to look for devices.
 
 makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
 

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 15:09:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 667D8106566B;
	Thu, 28 Jan 2010 15:09:12 +0000 (UTC)
	(envelope-from avilla@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B4898FC14;
	Thu, 28 Jan 2010 15:09:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SF9CiX074013;
	Thu, 28 Jan 2010 15:09:12 GMT (envelope-from avilla@svn.freebsd.org)
Received: (from avilla@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SF9CZh074012;
	Thu, 28 Jan 2010 15:09:12 GMT (envelope-from avilla@svn.freebsd.org)
Message-Id: <201001281509.o0SF9CZh074012@svn.freebsd.org>
From: Alberto Villa 
Date: Thu, 28 Jan 2010 15:09:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203117 - stable/8/usr.bin/calendar
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 15:09:12 -0000

Author: avilla (ports committer)
Date: Thu Jan 28 15:09:11 2010
New Revision: 203117
URL: http://svn.freebsd.org/changeset/base/203117

Log:
  - Record merge of r197788, r203040, r203045, r203048.
  
  Noticed by:	gavin
  Approved by:	tabthorpe (mentor)

Modified:
Directory Properties:
  stable/8/usr.bin/calendar/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 16:17:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EECF2106566B;
	Thu, 28 Jan 2010 16:17:24 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DD3038FC19;
	Thu, 28 Jan 2010 16:17:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SGHOHh089024;
	Thu, 28 Jan 2010 16:17:24 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SGHOMF089018;
	Thu, 28 Jan 2010 16:17:24 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201001281617.o0SGHOMF089018@svn.freebsd.org>
From: Rick Macklem 
Date: Thu, 28 Jan 2010 16:17: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: r203119 - head/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 16:17:25 -0000

Author: rmacklem
Date: Thu Jan 28 16:17:24 2010
New Revision: 203119
URL: http://svn.freebsd.org/changeset/base/203119

Log:
  Patch the experimental NFS client in a manner analogous to
  r203072 for the regular NFS client. Also, delete two fields
  of struct nfsmount that are not used by the FreeBSD port of
  the client.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs.h
  head/sys/fs/nfsclient/nfs_clbio.c
  head/sys/fs/nfsclient/nfs_clnfsiod.c
  head/sys/fs/nfsclient/nfs_clsubs.c
  head/sys/fs/nfsclient/nfsmount.h

Modified: head/sys/fs/nfsclient/nfs.h
==============================================================================
--- head/sys/fs/nfsclient/nfs.h	Thu Jan 28 15:09:40 2010	(r203118)
+++ head/sys/fs/nfsclient/nfs.h	Thu Jan 28 16:17:24 2010	(r203119)
@@ -56,6 +56,19 @@
 	(VFSTONFS((v)->v_mount)->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4))
 
 /*
+ * NFS iod threads can be in one of these three states once spawned.
+ * NFSIOD_NOT_AVAILABLE - Cannot be assigned an I/O operation at this time.
+ * NFSIOD_AVAILABLE - Available to be assigned an I/O operation.
+ * NFSIOD_CREATED_FOR_NFS_ASYNCIO - Newly created for nfs_asyncio() and
+ *	will be used by the thread that called nfs_asyncio().
+ */
+enum nfsiod_state {
+	NFSIOD_NOT_AVAILABLE = 0,
+	NFSIOD_AVAILABLE = 1,
+	NFSIOD_CREATED_FOR_NFS_ASYNCIO = 2,
+};
+
+/*
  * Function prototypes.
  */
 int ncl_meta_setsize(struct vnode *, struct ucred *, struct thread *,
@@ -87,7 +100,7 @@ int ncl_fsinfo(struct nfsmount *, struct
 int ncl_init(struct vfsconf *);
 int ncl_uninit(struct vfsconf *);
 int ncl_mountroot(struct mount *);
-int ncl_nfsiodnew(void);
+int ncl_nfsiodnew(int);
 
 #endif	/* _KERNEL */
 

Modified: head/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clbio.c	Thu Jan 28 15:09:40 2010	(r203118)
+++ head/sys/fs/nfsclient/nfs_clbio.c	Thu Jan 28 16:17:24 2010	(r203119)
@@ -63,7 +63,7 @@ extern int newnfs_directio_allow_mmap;
 extern struct nfsstats newnfsstats;
 extern struct mtx ncl_iod_mutex;
 extern int ncl_numasync;
-extern struct proc *ncl_iodwant[NFS_MAXRAHEAD];
+extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
 extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
 extern int newnfs_directio_enable;
 
@@ -1396,7 +1396,7 @@ again:
 	 * Find a free iod to process this request.
 	 */
 	for (iod = 0; iod < ncl_numasync; iod++)
-		if (ncl_iodwant[iod]) {
+		if (ncl_iodwant[iod] == NFSIOD_AVAILABLE) {
 			gotiod = TRUE;
 			break;
 		}
@@ -1405,7 +1405,7 @@ again:
 	 * Try to create one if none are free.
 	 */
 	if (!gotiod) {
-		iod = ncl_nfsiodnew();
+		iod = ncl_nfsiodnew(1);
 		if (iod != -1)
 			gotiod = TRUE;
 	}
@@ -1417,7 +1417,7 @@ again:
 		 */
 		NFS_DPF(ASYNCIO, ("ncl_asyncio: waking iod %d for mount %p\n",
 		    iod, nmp));
-		ncl_iodwant[iod] = NULL;
+		ncl_iodwant[iod] = NFSIOD_NOT_AVAILABLE;
 		ncl_iodmount[iod] = nmp;
 		nmp->nm_bufqiods++;
 		wakeup(&ncl_iodwant[iod]);

Modified: head/sys/fs/nfsclient/nfs_clnfsiod.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clnfsiod.c	Thu Jan 28 15:09:40 2010	(r203118)
+++ head/sys/fs/nfsclient/nfs_clnfsiod.c	Thu Jan 28 16:17:24 2010	(r203119)
@@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
 extern struct mtx ncl_iod_mutex;
 
 int ncl_numasync;
-struct proc *ncl_iodwant[NFS_MAXRAHEAD];
+enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
 struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
 
 static void	nfssvc_iod(void *);
@@ -114,7 +114,7 @@ sysctl_iodmin(SYSCTL_HANDLER_ARGS)
 	 * than the new minimum, create some more.
 	 */
 	for (i = nfs_iodmin - ncl_numasync; i > 0; i--)
-		ncl_nfsiodnew();
+		ncl_nfsiodnew(0);
 out:
 	mtx_unlock(&ncl_iod_mutex);	
 	return (0);
@@ -147,7 +147,7 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS)
 	 */
 	iod = ncl_numasync - 1;
 	for (i = 0; i < ncl_numasync - ncl_iodmax; i++) {
-		if (ncl_iodwant[iod])
+		if (ncl_iodwant[iod] == NFSIOD_AVAILABLE)
 			wakeup(&ncl_iodwant[iod]);
 		iod--;
 	}
@@ -159,7 +159,7 @@ SYSCTL_PROC(_vfs_newnfs, OID_AUTO, iodma
     sizeof (ncl_iodmax), sysctl_iodmax, "IU", "");
 
 int
-ncl_nfsiodnew(void)
+ncl_nfsiodnew(int set_iodwant)
 {
 	int error, i;
 	int newiod;
@@ -175,12 +175,17 @@ ncl_nfsiodnew(void)
 		}
 	if (newiod == -1)
 		return (-1);
+	if (set_iodwant > 0)
+		ncl_iodwant[i] = NFSIOD_CREATED_FOR_NFS_ASYNCIO;
 	mtx_unlock(&ncl_iod_mutex);
 	error = kproc_create(nfssvc_iod, nfs_asyncdaemon + i, NULL, RFHIGHPID,
 	    0, "nfsiod %d", newiod);
 	mtx_lock(&ncl_iod_mutex);
-	if (error)
+	if (error) {
+		if (set_iodwant > 0)
+			ncl_iodwant[i] = NFSIOD_NOT_AVAILABLE;
 		return (-1);
+	}
 	ncl_numasync++;
 	return (newiod);
 }
@@ -199,7 +204,7 @@ nfsiod_setup(void *dummy)
 		nfs_iodmin = NFS_MAXRAHEAD;
 
 	for (i = 0; i < nfs_iodmin; i++) {
-		error = ncl_nfsiodnew();
+		error = ncl_nfsiodnew(0);
 		if (error == -1)
 			panic("newnfsiod_setup: ncl_nfsiodnew failed");
 	}
@@ -235,7 +240,8 @@ nfssvc_iod(void *instance)
 			goto finish;
 		if (nmp)
 			nmp->nm_bufqiods--;
-		ncl_iodwant[myiod] = curthread->td_proc;
+		if (ncl_iodwant[myiod] == NFSIOD_NOT_AVAILABLE)
+			ncl_iodwant[myiod] = NFSIOD_AVAILABLE;
 		ncl_iodmount[myiod] = NULL;
 		/*
 		 * Always keep at least nfs_iodmin kthreads.
@@ -295,7 +301,7 @@ finish:
 	nfs_asyncdaemon[myiod] = 0;
 	if (nmp)
 	    nmp->nm_bufqiods--;
-	ncl_iodwant[myiod] = NULL;
+	ncl_iodwant[myiod] = NFSIOD_NOT_AVAILABLE;
 	ncl_iodmount[myiod] = NULL;
 	/* Someone may be waiting for the last nfsiod to terminate. */
 	if (--ncl_numasync == 0)

Modified: head/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clsubs.c	Thu Jan 28 15:09:40 2010	(r203118)
+++ head/sys/fs/nfsclient/nfs_clsubs.c	Thu Jan 28 16:17:24 2010	(r203119)
@@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 extern struct mtx ncl_iod_mutex;
-extern struct proc *ncl_iodwant[NFS_MAXRAHEAD];
+extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
 extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
 extern int ncl_numasync;
 extern unsigned int ncl_iodmax;
@@ -100,7 +100,7 @@ ncl_uninit(struct vfsconf *vfsp)
 	mtx_lock(&ncl_iod_mutex);
 	ncl_iodmax = 0;
 	for (i = 0; i < ncl_numasync; i++)
-		if (ncl_iodwant[i])
+		if (ncl_iodwant[i] == NFSIOD_AVAILABLE)
 			wakeup(&ncl_iodwant[i]);
 	/* The last nfsiod to exit will wake us up when ncl_numasync hits 0 */
 	while (ncl_numasync)
@@ -396,7 +396,7 @@ ncl_init(struct vfsconf *vfsp)
 
 	/* Ensure async daemons disabled */
 	for (i = 0; i < NFS_MAXRAHEAD; i++) {
-		ncl_iodwant[i] = NULL;
+		ncl_iodwant[i] = NFSIOD_NOT_AVAILABLE;
 		ncl_iodmount[i] = NULL;
 	}
 	ncl_nhinit();			/* Init the nfsnode table */

Modified: head/sys/fs/nfsclient/nfsmount.h
==============================================================================
--- head/sys/fs/nfsclient/nfsmount.h	Thu Jan 28 15:09:40 2010	(r203118)
+++ head/sys/fs/nfsclient/nfsmount.h	Thu Jan 28 16:17:24 2010	(r203119)
@@ -71,8 +71,6 @@ struct	nfsmount {
 	int	nm_tprintf_delay;	/* interval for messages */
 
 	/* Newnfs additions */
-	int	nm_iothreadcnt;
-	struct proc *nm_iodwant[NFS_MAXRAHEAD];
 	struct	nfsclclient *nm_clp;
 	uid_t	nm_uid;			/* Uid for SetClientID etc. */
 	u_int64_t nm_clval;		/* identifies which clientid */

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 16:48:44 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 91E8B106566B;
	Thu, 28 Jan 2010 16:48:44 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E7928FC17;
	Thu, 28 Jan 2010 16:48:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SGmibk095915;
	Thu, 28 Jan 2010 16:48:44 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SGmi9p095908;
	Thu, 28 Jan 2010 16:48:44 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201001281648.o0SGmi9p095908@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 28 Jan 2010 16:48:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203120 - in stable/8: sys/net sys/netinet
	usr.bin/netstat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 16:48:44 -0000

Author: gnn
Date: Thu Jan 28 16:48:44 2010
New Revision: 203120
URL: http://svn.freebsd.org/changeset/base/203120

Log:
  MFC r196797:
  
  Add ARP statistics to the kernel and netstat.

Modified:
  stable/8/sys/net/if_arp.h
  stable/8/sys/netinet/if_ether.c
  stable/8/usr.bin/netstat/inet.c
  stable/8/usr.bin/netstat/main.c
  stable/8/usr.bin/netstat/netstat.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/usr.bin/netstat/   (props changed)

Modified: stable/8/sys/net/if_arp.h
==============================================================================
--- stable/8/sys/net/if_arp.h	Thu Jan 28 16:17:24 2010	(r203119)
+++ stable/8/sys/net/if_arp.h	Thu Jan 28 16:48:44 2010	(r203120)
@@ -108,6 +108,31 @@ struct	arpcom {
 #define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com))
 #define AC2IFP(ac) ((ac)->ac_ifp)
 
-#endif
+#endif /* _KERNEL */
+
+struct arpstat {
+	/* Normal things that happen: */
+	u_long txrequests;	/* # of ARP requests sent by this host. */
+	u_long txreplies;	/* # of ARP replies sent by this host. */
+	u_long rxrequests;	/* # of ARP requests received by this host. */
+	u_long rxreplies;	/* # of ARP replies received by this host. */
+	u_long received;	/* # of ARP packets received by this host. */
+
+	u_long arp_spares[4];	/* For either the upper or lower half. */
+	/* Abnormal event and error  counting: */
+	u_long dropped;		/* # of packets dropped waiting for a reply. */
+	u_long timeouts;	/* # of times with entries removed */
+				/* due to timeout. */
+	u_long dupips;		/* # of duplicate IPs detected. */
+};
+
+/*
+ * In-kernel consumers can use these accessor macros directly to update
+ * stats.
+ */
+#define	ARPSTAT_ADD(name, val)	V_arpstat.name += (val)
+#define	ARPSTAT_SUB(name, val)	V_arpstat.name -= (val)
+#define	ARPSTAT_INC(name)	ARPSTAT_ADD(name, 1)
+#define	ARPSTAT_DEC(name)	ARPSTAT_SUB(name, 1)
 
 #endif /* !_NET_IF_ARP_H_ */

Modified: stable/8/sys/netinet/if_ether.c
==============================================================================
--- stable/8/sys/netinet/if_ether.c	Thu Jan 28 16:17:24 2010	(r203119)
+++ stable/8/sys/netinet/if_ether.c	Thu Jan 28 16:48:44 2010	(r203120)
@@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$");
 
 SYSCTL_DECL(_net_link_ether);
 SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, "");
+SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, "");
 
 VNET_DEFINE(int, useloopback) = 1;	/* use loopback interface for
 					 * local traffic */
@@ -91,11 +92,13 @@ static VNET_DEFINE(int, arpt_down) = 20;
 					       * 20 seconds */
 static VNET_DEFINE(int, arp_maxtries) = 5;
 static VNET_DEFINE(int, arp_proxyall);
+static VNET_DEFINE(struct arpstat, arpstat);  /* ARP statistics, see if_arp.h */
 
 #define	V_arpt_keep		VNET(arpt_keep)
 #define	V_arpt_down		VNET(arpt_down)
 #define	V_arp_maxtries		VNET(arp_maxtries)
 #define	V_arp_proxyall		VNET(arp_proxyall)
+#define	V_arpstat		VNET(arpstat)
 
 SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW,
 	&VNET_NAME(arpt_keep), 0,
@@ -110,6 +113,9 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OI
 SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW,
 	&VNET_NAME(arp_proxyall), 0,
 	"Enable proxy ARP for all suitable requests");
+SYSCTL_VNET_STRUCT(_net_link_ether_arp, OID_AUTO, stats, CTLFLAG_RW,
+	&VNET_NAME(arpstat), arpstat,
+	"ARP statistics (struct arpstat, net/if_arp.h)");
 
 static void	arp_init(void);
 void		arprequest(struct ifnet *,
@@ -166,6 +172,7 @@ arptimer(void *arg)
 		return;
 	}
 	ifp = lle->lle_tbl->llt_ifp;
+	CURVNET_SET(ifp->if_vnet);
 	IF_AFDATA_LOCK(ifp);
 	LLE_WLOCK(lle);
 	if (lle->la_flags & LLE_STATIC)
@@ -174,6 +181,7 @@ arptimer(void *arg)
 		if (!callout_pending(&lle->la_timer) &&
 		    callout_active(&lle->la_timer)) {
 			(void) llentry_free(lle);
+			ARPSTAT_INC(timeouts);
 		} 
 #ifdef DIAGNOSTIC
 		else {
@@ -186,6 +194,7 @@ arptimer(void *arg)
 #endif
 	}
 	IF_AFDATA_UNLOCK(ifp);
+	CURVNET_RESTORE();
 }
 
 /*
@@ -247,6 +256,7 @@ arprequest(struct ifnet *ifp, struct in_
 	sa.sa_len = 2;
 	m->m_flags |= M_BCAST;
 	(*ifp->if_output)(ifp, m, &sa, NULL);
+	ARPSTAT_INC(txrequests);
 }
 
 /*
@@ -348,8 +358,10 @@ retry:
 	 * latest one.
 	 */
 	if (m != NULL) {
-		if (la->la_hold != NULL)
+		if (la->la_hold != NULL) {
 			m_freem(la->la_hold);
+			ARPSTAT_INC(dropped);
+		}
 		la->la_hold = m;
 		if (renew == 0 && (flags & LLE_EXCLUSIVE)) {
 			flags &= ~LLE_EXCLUSIVE;
@@ -422,6 +434,7 @@ arpintr(struct mbuf *m)
 		ar = mtod(m, struct arphdr *);
 	}
 
+	ARPSTAT_INC(received);
 	switch (ntohs(ar->ar_pro)) {
 #ifdef INET
 	case ETHERTYPE_IP:
@@ -502,6 +515,9 @@ in_arpinput(struct mbuf *m)
 	(void)memcpy(&isaddr, ar_spa(ah), sizeof (isaddr));
 	(void)memcpy(&itaddr, ar_tpa(ah), sizeof (itaddr));
 
+	if (op == ARPOP_REPLY)
+		ARPSTAT_INC(rxreplies);
+
 	/*
 	 * For a bridge, we want to check the address irrespective
 	 * of the receive interface. (This will change slightly
@@ -612,6 +628,7 @@ match:
 		   ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
 		   inet_ntoa(isaddr), ifp->if_xname);
 		itaddr = myaddr;
+		ARPSTAT_INC(dupips);
 		goto reply;
 	}
 	if (ifp->if_flags & IFF_STATICARP)
@@ -695,6 +712,7 @@ match:
 reply:
 	if (op != ARPOP_REQUEST)
 		goto drop;
+	ARPSTAT_INC(rxrequests);
 
 	if (itaddr.s_addr == myaddr.s_addr) {
 		/* Shortcut.. the receiving interface is the target. */
@@ -791,6 +809,7 @@ reply:
 	sa.sa_family = AF_ARP;
 	sa.sa_len = 2;
 	(*ifp->if_output)(ifp, m, &sa, NULL);
+	ARPSTAT_INC(txreplies);
 	return;
 
 drop:

Modified: stable/8/usr.bin/netstat/inet.c
==============================================================================
--- stable/8/usr.bin/netstat/inet.c	Thu Jan 28 16:17:24 2010	(r203119)
+++ stable/8/usr.bin/netstat/inet.c	Thu Jan 28 16:48:44 2010	(r203120)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -871,6 +872,47 @@ ip_stats(u_long off, const char *name, i
 #undef p1a
 }
 
+/*
+ * Dump ARP statistics structure.
+ */
+void
+arp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
+{
+	struct arpstat arpstat, zerostat;
+	size_t len = sizeof(arpstat);
+
+	if (live) {
+		if (zflag)
+			memset(&zerostat, 0, len);
+		if (sysctlbyname("net.link.ether.arp.stats", &arpstat, &len,
+		    zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
+			warn("sysctl: net.link.ether.arp.stats");
+			return;
+		}
+	} else
+		kread(off, &arpstat, len);
+
+	printf("%s:\n", name);
+
+#define	p(f, m) if (arpstat.f || sflag <= 1) \
+    printf(m, arpstat.f, plural(arpstat.f))
+#define	p2(f, m) if (arpstat.f || sflag <= 1) \
+    printf(m, arpstat.f, pluralies(arpstat.f))
+
+	p(txrequests, "\t%lu ARP request%s sent\n");
+	p2(txreplies, "\t%lu ARP repl%s sent\n");
+	p(rxrequests, "\t%lu ARP request%s received\n");
+	p2(rxreplies, "\t%lu ARP repl%s received\n");
+	p(received, "\t%lu ARP packet%s received\n");
+	p(dropped, "\t%lu total packet%s dropped due to no ARP entry\n");
+	p(timeouts, "\t%lu ARP entry%s timed out\n");
+	p(dupips, "\t%lu Duplicate IP%s seen\n");
+#undef p
+#undef p2
+}
+
+
+
 static	const char *icmpnames[ICMP_MAXTYPE + 1] = {
 	"echo reply",			/* RFC 792 */
 	"#1",

Modified: stable/8/usr.bin/netstat/main.c
==============================================================================
--- stable/8/usr.bin/netstat/main.c	Thu Jan 28 16:17:24 2010	(r203119)
+++ stable/8/usr.bin/netstat/main.c	Thu Jan 28 16:48:44 2010	(r203120)
@@ -184,6 +184,8 @@ static struct nlist nl[] = {
 	{ .n_name = "_sctpstat" },
 #define	N_MFCTABLESIZE	54
 	{ .n_name = "_mfctablesize" },
+#define N_ARPSTAT       55
+	{ .n_name = "_arpstat" },
 	{ .n_name = NULL },
 };
 
@@ -232,6 +234,8 @@ struct protox {
 	  carp_stats,	NULL,		"carp",	1,	0 },
 	{ -1,		N_PFSYNCSTAT,	1,	NULL,
 	  pfsync_stats,	NULL,		"pfsync", 1,	0 },
+	{ -1,		N_ARPSTAT,	1,	NULL,
+	  arp_stats,	NULL,		"arp", 1,	0 },
 	{ -1,		-1,		0,	NULL,
 	  NULL,		NULL,		NULL,	0,	0 }
 };

Modified: stable/8/usr.bin/netstat/netstat.h
==============================================================================
--- stable/8/usr.bin/netstat/netstat.h	Thu Jan 28 16:17:24 2010	(r203119)
+++ stable/8/usr.bin/netstat/netstat.h	Thu Jan 28 16:48:44 2010	(r203120)
@@ -75,6 +75,7 @@ void	udp_stats(u_long, const char *, int
 void	sctp_protopr(u_long, const char *, int, int);
 void	sctp_stats(u_long, const char *, int, int);
 #endif
+void	arp_stats(u_long, const char *, int, int);
 void	ip_stats(u_long, const char *, int, int);
 void	icmp_stats(u_long, const char *, int, int);
 void	igmp_stats(u_long, const char *, int, int);

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 17:07:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6466D106568B;
	Thu, 28 Jan 2010 17:07:14 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 50EA88FC34;
	Thu, 28 Jan 2010 17:07:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SH7EkM000111;
	Thu, 28 Jan 2010 17:07:14 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SH7EU0000107;
	Thu, 28 Jan 2010 17:07:14 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201001281707.o0SH7EU0000107@svn.freebsd.org>
From: Christian Brueffer 
Date: Thu, 28 Jan 2010 17:07:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203121 - stable/8/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 17:07:14 -0000

Author: brueffer
Date: Thu Jan 28 17:07:14 2010
New Revision: 203121
URL: http://svn.freebsd.org/changeset/base/203121

Log:
  MFC: r202317
  
  Add manpages for ipwfw(4) and iwifw(4), based on iwnfw(4).

Added:
  stable/8/share/man/man4/ipwfw.4
     - copied unchanged from r202317, head/share/man/man4/ipwfw.4
  stable/8/share/man/man4/iwifw.4
     - copied unchanged from r202317, head/share/man/man4/iwifw.4
Modified:
  stable/8/share/man/man4/Makefile
Directory Properties:
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man4/de.4   (props changed)

Modified: stable/8/share/man/man4/Makefile
==============================================================================
--- stable/8/share/man/man4/Makefile	Thu Jan 28 16:48:44 2010	(r203120)
+++ stable/8/share/man/man4/Makefile	Thu Jan 28 17:07:14 2010	(r203121)
@@ -154,10 +154,12 @@ MAN=	aac.4 \
 	ips.4 \
 	ipsec.4 \
 	ipw.4 \
+	ipwfw.4 \
 	iscsi_initiator.4 \
 	isp.4 \
 	ispfw.4 \
 	iwi.4 \
+	iwifw.4 \
 	iwn.4 \
 	iwnfw.4 \
 	ixgb.4 \

Copied: stable/8/share/man/man4/ipwfw.4 (from r202317, head/share/man/man4/ipwfw.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/share/man/man4/ipwfw.4	Thu Jan 28 17:07:14 2010	(r203121, copy of r202317, head/share/man/man4/ipwfw.4)
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 14, 2010
+.Dt IPWFW 4
+.Os
+.Sh NAME
+.Nm ipwfw
+.Nd "Firmware Module for Intel PRO/Wireless 2100 driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ipwfw"
+.Ed
+.Pp
+This will include three firmware images inside the kernel.
+If you want to pick only the firmware image for the mode you want to operate
+your network adapter in choose one of the following:
+.Bd -ragged -offset indent
+.Cd "device ipwbssfw"
+.Cd "device ipwibssfw"
+.Cd "device ipwmonitorfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ipw_bss_load="YES"
+ipw_ibss_load="YES"
+ipw_monitor_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Intel PRO/Wireless 2100 series of IEEE 802.11 adapters.
+It may be statically linked into the kernel, or loaded as a module.
+.Pp
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/intel_ipw/LICENSE
+must be agreed to by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.intel_ipw.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Nm
+firmware license
+.El
+.Sh SEE ALSO
+.Xr ipw 4 ,
+.Xr firmware 9

Copied: stable/8/share/man/man4/iwifw.4 (from r202317, head/share/man/man4/iwifw.4)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/share/man/man4/iwifw.4	Thu Jan 28 17:07:14 2010	(r203121, copy of r202317, head/share/man/man4/iwifw.4)
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 14, 2010
+.Dt IWIFW 4
+.Os
+.Sh NAME
+.Nm iwifw
+.Nd "Firmware Module for Intel PRO/Wireless 2200BG/2225BG/2915ABG driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iwifw"
+.Ed
+.Pp
+This will include three firmware images inside the kernel.
+If you want to pick only the firmware image for the mode you want to operate
+your network adapter in choose one of the following:
+.Bd -ragged -offset indent
+.Cd "device iwibssfw"
+.Cd "device iwiibssfw"
+.Cd "device iwimonitorfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+iwi_bss_load="YES"
+iwi_ibss_load="YES"
+iwi_monitor_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Intel PRO/Wireless 2200BG/2225BG/2915ABG series of IEEE 802.11 adapters.
+It may be statically linked into the kernel, or loaded as a module.
+.Pp
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/intel_iwi/LICENSE
+must be agreed to by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.intel_iwi.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Nm
+firmware license
+.El
+.Sh SEE ALSO
+.Xr iwi 4 ,
+.Xr firmware 9

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 17:09:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2418E10656BD;
	Thu, 28 Jan 2010 17:09:48 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 11EC08FC21;
	Thu, 28 Jan 2010 17:09:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SH9l6A000704;
	Thu, 28 Jan 2010 17:09:47 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SH9lv5000702;
	Thu, 28 Jan 2010 17:09:47 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001281709.o0SH9lv5000702@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 28 Jan 2010 17:09: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: r203122 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 17:09:48 -0000

Author: trasz
Date: Thu Jan 28 17:09:47 2010
New Revision: 203122
URL: http://svn.freebsd.org/changeset/base/203122

Log:
  Improve descriptions, remove turnstiles (since, from what I understand,
  they are only used to implement other synchronization primitives), tweak
  formatting.

Modified:
  head/share/man/man9/locking.9

Modified: head/share/man/man9/locking.9
==============================================================================
--- head/share/man/man9/locking.9	Thu Jan 28 17:07:14 2010	(r203121)
+++ head/share/man/man9/locking.9	Thu Jan 28 17:09:47 2010	(r203122)
@@ -24,15 +24,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 14, 2007
+.Dd January 29, 2010
 .Dt LOCKING 9
 .Os
 .Sh NAME
 .Nm locking
 .Nd kernel synchronization primitives
-.Sh SYNOPSIS
-All sorts of stuff to go here.
-.Pp
 .Sh DESCRIPTION
 The
 .Em FreeBSD
@@ -43,21 +40,19 @@ to safely access and manipulate the many
 These include:
 .Bl -enum
 .It
-Spin Mutexes
-.It
-Sleep Mutexes
+Mutexes
 .It
-pool Mutexes
+Spin mutexes
 .It
-Shared-Exclusive locks
+Pool mutexes
 .It
-Reader-Writer locks
+Shared/exclusive locks
 .It
-Read-Mostly locks
+Reader/writer locks
 .It
-Turnstiles
+Read-mostly locks
 .It
-Semaphores
+Counting semaphores
 .It
 Condition variables
 .It
@@ -70,36 +65,17 @@ Lockmanager locks
 .Pp
 The primitives interact and have a number of rules regarding how
 they can and can not be combined.
-There are too many for the average
-human mind and they keep changing.
-(if you disagree, please write replacement text)  :-)
-.Pp
-Some of these primitives may be used at the low (interrupt) level and
-some may not.
-.Pp
-There are strict ordering requirements and for some of the types this
-is checked using the
+Many of these rules are checked using the
 .Xr witness 4
 code.
 .Pp
-.Ss SPIN Mutexes
-Mutexes are the basic primitive.
-You either hold it or you don't.
-If you don't own it then you just spin, waiting for the holder (on
-another CPU) to release it.
-Hopefully they are doing something fast.
-You 
-.Em must not
-do anything that deschedules the thread while you
-are holding a SPIN mutex.
 .Ss Mutexes
-Basically (regular) mutexes will deschedule the thread if the
-mutex can not be acquired.
-A non-spin mutex can be considered to be equivalent
-to getting a write lock on an 
-.Em rw_lock
-(see below), and in fact non-spin mutexes and rw_locks may soon become the same thing.
-As in spin mutexes, you either get it or you don't.
+Mutexes are the most commonly used synchronization primitive in the kernel.
+Thread acquires (locks) a mutex before accessing data shared with other
+threads (including interrupt threads), and releases (unlocks) it afterwards.
+If the mutex cannot be acquired, the thread requesting it will block.
+.Pp
+Sleeping while holding mutex is generally prohibited.
 You may only call the
 .Xr sleep 9
 call via
@@ -122,10 +98,35 @@ If any caller above you has any mutex or
 rwlock, your sleep, will cause a panic.
 If the sleep only happens rarely it may be years before the 
 bad code path is found.
-.Ss Pool Mutexes
-A variant of regular mutexes where the allocation of the mutex is handled
-more by the system.
-.Ss Rw_locks
+.Pp
+See the
+.Xr mutex 9
+page for more information.
+.Ss Spin mutexes
+Spin mutexes are variation of basic mutexes; the main difference between
+the two is that spin mutexes never block - instead, they spin, waiting
+for the thread holding the lock, which runs on another CPU, to release it.
+Differently from ordinary mutex, spin mutexes disable interrupts when acquired.
+Since disabling interrupts is expensive, they are also generally slower.
+Spin mutexes should only be used to protect data shared with primary
+(INTR_FILTER) interrupt code.
+You 
+.Em must not
+do anything that deschedules the thread while you
+are holding a spin mutex.
+.Ss Pool mutexes
+With most synchronisaton primitives, such as mutexes, programmer must
+provide a piece of allocated memory to hold the primitive.
+For example, a mutex may be embedded inside the structure it protects.
+Pool mutex is a variant of mutex without this requirement - to lock or unlock
+a pool mutex, one uses address of the structure being protected with it,
+not the mutex itself.
+Pool mutexes are seldom used.
+.Pp
+See the
+.Xr mtx_pool 9
+page for more information.
+.Ss Reader/writer locks
 Reader/writer locks allow shared access to protected data by multiple threads,
 or exclusive access by a single thread.
 The threads with shared access are known as
@@ -165,7 +166,11 @@ This ability should not be used lightly 
 .Em may go away.
 Users of recursion in any locks should be prepared to 
 defend their decision against vigorous criticism.
-.Ss Rm_locks
+.Pp
+See the
+.Xr rwlock 9
+page for more information.
+.Ss Read-mostly locks
 Mostly reader locks are similar to
 .Em Reader/write
 locks but optimized for very infrequent 
@@ -176,7 +181,11 @@ locks implement full priority propagatio
 using a lock user supplied
 .Em tracker
 data structure.
-.Ss Sx_locks
+.Pp
+See the
+.Xr rmlock 9
+page for more information.
+.Ss Shared/exclusive locks
 Shared/exclusive locks are used to protect data that are read far more often
 than they are written.
 Mutexes are inherently more efficient than shared/exclusive locks, so
@@ -201,16 +210,21 @@ should be considered to be closely relat
 .Xr sleep 9 .
 In fact it could in some cases be 
 considered a conditional sleep.
-.Ss Turnstiles
-Turnstiles are used to hold a queue of threads blocked on
-non-sleepable locks.
-Sleepable locks use condition variables to implement their queues.
-Turnstiles differ from a sleep queue in that turnstile queue's
-are assigned to a lock held by an owning thread.
-Thus, when one thread is enqueued onto a turnstile, it can lend its
-priority to the owning thread.
-If this sounds confusing, we need to describe it better.
-.Ss Semaphores
+.Pp
+See the
+.Xr sx 9
+page for more information.
+.Ss Counting semaphores
+Counting semaphores provide a mechanism for synchronizing access
+to a pool of resources.
+Unlike mutexes, semaphores do not have the concept of an owner,
+so they can be useful in situations where one thread needs
+to acquire a resource, and another thread needs to release it.
+They are largely deprecated.
+.Pp
+See the
+.Xr sema 9
+page for more information.
 .Ss Condition variables
 Condition variables are used in conjunction with mutexes to wait for
 conditions to occur.
@@ -220,6 +234,10 @@ functions.
 When a thread waits on a condition, the mutex
 is atomically released before the thread is blocked, then reacquired
 before the function call returns.
+.Pp
+See the
+.Xr condvar 9
+page for more information.
 .Ss Giant
 Giant is a special instance of a sleep lock.
 It has several special characteristics.
@@ -298,13 +316,24 @@ while the thread is suspended and will r
 .Va Giant
 mutex before the function returns.
 .Pp
-.Ss lockmanager locks
-Largely deprecated.
+See the
+.Xr sleep 9
+page for more information.
+.Pp
+.Ss Lockmanager locks
+Shared/exclusive sleep locks, used mostly in
+.Xr VFS 9 ,
+in particular as a
+.Xr vnode 9
+lock.
+They have features other lock types don't have, such as sleep timeout,
+writer starvation avoidance, draining, and interlock mutex, but this makes them
+complicated to implement; for this reason, they are deprecated.
+.Pp
 See the
 .Xr lock 9
 page for more information.
-I don't know what the downsides are but I'm sure someone will fill in this part.
-.Sh Usage tables.
+.Sh INTERACTIONS
 .Ss Interaction table.
 The following table shows what you can and can not do if you hold
 one of the synchronization primitives discussed here:
@@ -362,11 +391,13 @@ At this time this is a rather easy to re
 .Xr sema 9 ,
 .Xr sleep 9 ,
 .Xr sx 9 ,
-.Xr LOCK_PROFILING 9 ,
-.Xr WITNESS 9
+.Xr witness 9 ,
+.Xr LOCK_PROFILING 9
 .Sh HISTORY
 These
 functions appeared in
 .Bsx 4.1
 through
 .Fx 7.0
+.Sh BUGS
+There are too many locking primitives to choose from.

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 17:54:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 64BB71065670;
	Thu, 28 Jan 2010 17:54:48 +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 128B78FC08;
	Thu, 28 Jan 2010 17:54:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SHsmlK010554;
	Thu, 28 Jan 2010 17:54:48 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SHsmWR010551;
	Thu, 28 Jan 2010 17:54:48 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001281754.o0SHsmWR010551@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Jan 2010 17:54: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: r203123 - head/sys/dev/ahci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 17:54:48 -0000

Author: mav
Date: Thu Jan 28 17:54:47 2010
New Revision: 203123
URL: http://svn.freebsd.org/changeset/base/203123

Log:
  Add FIS-based switching support. If controller supports FBS, it allows
  several devices beyond Port Multiplier to work simultaneously, substantially
  increasing performance.

Modified:
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ahci/ahci.h

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Thu Jan 28 17:09:47 2010	(r203122)
+++ head/sys/dev/ahci/ahci.c	Thu Jan 28 17:54:47 2010	(r203123)
@@ -78,7 +78,7 @@ static void ahci_dmafini(device_t dev);
 static void ahci_slotsalloc(device_t dev);
 static void ahci_slotsfree(device_t dev);
 static void ahci_reset(device_t dev);
-static void ahci_start(device_t dev);
+static void ahci_start(device_t dev, int fbs);
 static void ahci_stop(device_t dev);
 static void ahci_clo(device_t dev);
 static void ahci_start_fr(device_t dev);
@@ -86,6 +86,7 @@ static void ahci_stop_fr(device_t dev);
 
 static int ahci_sata_connect(struct ahci_channel *ch);
 static int ahci_sata_phy_reset(device_t dev);
+static int ahci_wait_ready(device_t dev, int t);
 
 static void ahci_issue_read_log(device_t dev);
 static void ahci_process_read_log(device_t dev, union ccb *ccb);
@@ -108,6 +109,7 @@ static struct {
 #define AHCI_Q_4CH	32
 #define AHCI_Q_EDGEIS	64
 #define AHCI_Q_SATA2	128
+#define AHCI_Q_NOBSYRES	256
 } ahci_ids[] = {
 	{0x43801002, 0x00, "ATI IXP600",	0},
 	{0x43901002, 0x00, "ATI IXP700",	0},
@@ -162,8 +164,8 @@ static struct {
 	{0x612111ab, 0x00, "Marvell 88SX6121",	AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS},
 	{0x614111ab, 0x00, "Marvell 88SX6141",	AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
 	{0x614511ab, 0x00, "Marvell 88SX6145",	AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
-	{0x91231b4b, 0x11, "Marvell 88SE912x",	0},
-	{0x91231b4b, 0x00, "Marvell 88SE912x",	AHCI_Q_EDGEIS|AHCI_Q_SATA2},
+	{0x91231b4b, 0x11, "Marvell 88SE912x",	AHCI_Q_NOBSYRES},
+	{0x91231b4b, 0x00, "Marvell 88SE912x",	AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES},
 	{0x044c10de, 0x00, "NVIDIA MCP65",	0},
 	{0x044d10de, 0x00, "NVIDIA MCP65",	0},
 	{0x044e10de, 0x00, "NVIDIA MCP65",	0},
@@ -379,14 +381,16 @@ ahci_attach(device_t dev)
 	/* Announce HW capabilities. */
 	speed = (ctlr->caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT;
 	device_printf(dev,
-		    "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s\n",
+		    "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s%s\n",
 		    ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f),
 		    ((version >> 4) & 0xf0) + (version & 0x0f),
 		    (ctlr->caps & AHCI_CAP_NPMASK) + 1,
 		    ((speed == 1) ? "1.5":((speed == 2) ? "3":
 		    ((speed == 3) ? "6":"?"))),
 		    (ctlr->caps & AHCI_CAP_SPM) ?
-		    "supported" : "not supported");
+		    "supported" : "not supported",
+		    (ctlr->caps & AHCI_CAP_FBSS) ?
+		    " with FBS" : "");
 	if (bootverbose) {
 		device_printf(dev, "Caps:%s%s%s%s%s%s%s%s %sGbps",
 		    (ctlr->caps & AHCI_CAP_64BIT) ? " 64bit":"",
@@ -419,7 +423,7 @@ ahci_attach(device_t dev)
 		    (ctlr->caps2 & AHCI_CAP2_BOH) ? " BOH":"");
 	}
 	if (bootverbose && (ctlr->caps & AHCI_CAP_EMS)) {
-		device_printf(dev, "EM Caps: %s%s%s%s%s%s%s%s\n",
+		device_printf(dev, "EM Caps:%s%s%s%s%s%s%s%s\n",
 		    (ctlr->capsem & AHCI_EM_PM) ? " PM":"",
 		    (ctlr->capsem & AHCI_EM_ALHD) ? " ALHD":"",
 		    (ctlr->capsem & AHCI_EM_XMT) ? " XMT":"",
@@ -810,6 +814,7 @@ ahci_ch_attach(device_t dev)
 	struct ahci_channel *ch = device_get_softc(dev);
 	struct cam_devq *devq;
 	int rid, error, i, sata_rev = 0;
+	u_int32_t version;
 
 	ch->dev = dev;
 	ch->unit = (intptr_t)device_get_ivars(dev);
@@ -861,6 +866,18 @@ ahci_ch_attach(device_t dev)
 		error = ENXIO;
 		goto err1;
 	}
+	ch->chcaps = ATA_INL(ch->r_mem, AHCI_P_CMD);
+	version = ATA_INL(ctlr->r_mem, AHCI_VS);
+	if (version < 0x00010020 && (ctlr->caps & AHCI_CAP_FBSS))
+		ch->chcaps |= AHCI_P_CMD_FBSCP;
+	if (bootverbose) {
+		device_printf(dev, "Caps:%s%s%s%s%s\n",
+		    (ch->chcaps & AHCI_P_CMD_HPCP) ? " HPCP":"",
+		    (ch->chcaps & AHCI_P_CMD_MPSP) ? " MPSP":"",
+		    (ch->chcaps & AHCI_P_CMD_CPD) ? " CPD":"",
+		    (ch->chcaps & AHCI_P_CMD_ESP) ? " ESP":"",
+		    (ch->chcaps & AHCI_P_CMD_FBSCP) ? " FBSCP":"");
+	}
 	/* Create the device queue for our SIM. */
 	devq = cam_simq_alloc(ch->numslots);
 	if (devq == NULL) {
@@ -977,7 +994,7 @@ ahci_ch_resume(device_t dev)
 	     ((ch->pm_level == 2 || ch->pm_level == 3) ? AHCI_P_CMD_ALPE : 0) |
 	     ((ch->pm_level > 2) ? AHCI_P_CMD_ASP : 0 )));
 	ahci_start_fr(dev);
-	ahci_start(dev);
+	ahci_start(dev, 1);
 	return (0);
 }
 
@@ -1007,6 +1024,7 @@ ahci_dmainit(device_t dev)
 {
 	struct ahci_channel *ch = device_get_softc(dev);
 	struct ahci_dc_cb_args dcba;
+	size_t rfsize;
 
 	if (ch->caps & AHCI_CAP_64BIT)
 		ch->dma.max_address = BUS_SPACE_MAXADDR;
@@ -1028,16 +1046,20 @@ ahci_dmainit(device_t dev)
 	}
 	ch->dma.work_bus = dcba.maddr;
 	/* FIS receive area. */
-	if (bus_dma_tag_create(bus_get_dma_tag(dev), 4096, 0,
+	if (ch->chcaps & AHCI_P_CMD_FBSCP)
+	    rfsize = 4096;
+	else
+	    rfsize = 256;
+	if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0,
 	    ch->dma.max_address, BUS_SPACE_MAXADDR,
-	    NULL, NULL, 4096, 1, 4096,
+	    NULL, NULL, rfsize, 1, rfsize,
 	    0, NULL, NULL, &ch->dma.rfis_tag))
 		goto error;
 	if (bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0,
 	    &ch->dma.rfis_map))
 		goto error;
 	if (bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis,
-	    4096, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) {
+	    rfsize, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) {
 		bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map);
 		goto error;
 	}
@@ -1225,7 +1247,7 @@ ahci_ch_intr(void *data)
 	struct ahci_channel *ch = device_get_softc(dev);
 	uint32_t istatus, sstatus, cstatus, serr = 0, sntf = 0, ok, err;
 	enum ahci_err_type et;
-	int i, ccs, ncq_err = 0;
+	int i, ccs, port;
 
 	/* Read and clear interrupt statuses. */
 	istatus = ATA_INL(ch->r_mem, AHCI_P_IS);
@@ -1238,7 +1260,17 @@ ahci_ch_intr(void *data)
 	if (istatus & AHCI_P_IX_SDB) {
 		if (ch->caps & AHCI_CAP_SSNTF)
 			sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF);
-		else {
+		else if (ch->fbs_enabled) {
+			u_int8_t *fis = ch->dma.rfis + 0x58;
+
+			for (i = 0; i < 16; i++) {
+				if (fis[1] & 0x80) {
+					fis[1] &= 0x7f;
+	    				sntf |= 1 << i;
+	    			}
+	    			fis += 256;
+	    		}
+		} else {
 			u_int8_t *fis = ch->dma.rfis + 0x58;
 
 			if (fis[1] & 0x80)
@@ -1257,18 +1289,35 @@ ahci_ch_intr(void *data)
 	/* Process command errors */
 	if (istatus & (AHCI_P_IX_OF | AHCI_P_IX_IF |
 	    AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) {
-//device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x\n",
-//    __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD),
-//    serr);
 		ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK)
 		    >> AHCI_P_CMD_CCS_SHIFT;
+//device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x fbs %08x ccs %d\n",
+//    __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD),
+//    serr, ATA_INL(ch->r_mem, AHCI_P_FBS), ccs);
+		port = -1;
+		if (ch->fbs_enabled) {
+			uint32_t fbs = ATA_INL(ch->r_mem, AHCI_P_FBS);
+			if (fbs & AHCI_P_FBS_SDE) {
+				port = (fbs & AHCI_P_FBS_DWE)
+				    >> AHCI_P_FBS_DWE_SHIFT;
+			} else {
+				for (i = 0; i < 16; i++) {
+					if (ch->numrslotspd[i] == 0)
+						continue;
+					if (port == -1)
+						port = i;
+					else if (port != i) {
+						port = -2;
+						break;
+					}
+				}
+			}
+		}
 		err = ch->rslots & (cstatus | sstatus);
-		/* Kick controller into sane state */
-		ahci_stop(dev);
-		ahci_start(dev);
 	} else {
 		ccs = 0;
 		err = 0;
+		port = -1;
 	}
 	/* Complete all successfull commands. */
 	ok = ch->rslots & ~(cstatus | sstatus);
@@ -1292,9 +1341,14 @@ ahci_ch_intr(void *data)
 			/* XXX: reqests in loading state. */
 			if (((err >> i) & 1) == 0)
 				continue;
+			if (port >= 0 &&
+			    ch->slot[i].ccb->ccb_h.target_id != port)
+				continue;
 			if (istatus & AHCI_P_IX_TFE) {
+			    if (port != -2) {
 				/* Task File Error */
-				if (ch->numtslots == 0) {
+				if (ch->numtslotspd[
+				    ch->slot[i].ccb->ccb_h.target_id] == 0) {
 					/* Untagged operation. */
 					if (i == ccs)
 						et = AHCI_ERR_TFE;
@@ -1303,10 +1357,13 @@ ahci_ch_intr(void *data)
 				} else {
 					/* Tagged operation. */
 					et = AHCI_ERR_NCQ;
-					ncq_err = 1;
 				}
+			    } else {
+				et = AHCI_ERR_TFE;
+				ch->fatalerr = 1;
+			    }
 			} else if (istatus & AHCI_P_IX_IF) {
-				if (ch->numtslots == 0 && i != ccs)
+				if (ch->numtslots == 0 && i != ccs && port != -2)
 					et = AHCI_ERR_INNOCENT;
 				else
 					et = AHCI_ERR_SATA;
@@ -1314,8 +1371,12 @@ ahci_ch_intr(void *data)
 				et = AHCI_ERR_INVALID;
 			ahci_end_transaction(&ch->slot[i], et);
 		}
-		if (ncq_err)
-			ahci_issue_read_log(dev);
+		/*
+		 * We can't reinit port if there are some other
+		 * commands active, use resume to complete them.
+		 */
+		if (ch->rslots != 0) 
+			ATA_OUTL(ch->r_mem, AHCI_P_FBS, AHCI_P_FBS_EN | AHCI_P_FBS_DEC);
 	}
 	/* Process NOTIFY events */
 	if (sntf)
@@ -1327,24 +1388,39 @@ static int
 ahci_check_collision(device_t dev, union ccb *ccb)
 {
 	struct ahci_channel *ch = device_get_softc(dev);
+	int t = ccb->ccb_h.target_id;
 
 	if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
 	    (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) {
-		/* Tagged command while untagged are active. */
-		if (ch->numrslots != 0 && ch->numtslots == 0)
-			return (1);
-		/* Tagged command while tagged to other target is active. */
-		if (ch->numtslots != 0 &&
-		    ch->taggedtarget != ccb->ccb_h.target_id)
-			return (1);
 		/* Tagged command while we have no supported tag free. */
 		if (((~ch->oslots) & (0xffffffff >> (32 -
-		    ch->curr[ccb->ccb_h.target_id].tags))) == 0)
+		    ch->curr[t].tags))) == 0)
 			return (1);
+		/* If we have FBS */
+		if (ch->fbs_enabled) {
+			/* Tagged command while untagged are active. */
+			if (ch->numrslotspd[t] != 0 && ch->numtslotspd[t] == 0)
+				return (1);
+		} else {
+			/* Tagged command while untagged are active. */
+			if (ch->numrslots != 0 && ch->numtslots == 0)
+				return (1);
+			/* Tagged command while tagged to other target is active. */
+			if (ch->numtslots != 0 &&
+			    ch->taggedtarget != ccb->ccb_h.target_id)
+				return (1);
+		}
 	} else {
-		/* Untagged command while tagged are active. */
-		if (ch->numrslots != 0 && ch->numtslots != 0)
-			return (1);
+		/* If we have FBS */
+		if (ch->fbs_enabled) {
+			/* Untagged command while tagged are active. */
+			if (ch->numrslotspd[t] != 0 && ch->numtslotspd[t] != 0)
+				return (1);
+		} else {
+			/* Untagged command while tagged are active. */
+			if (ch->numrslots != 0 && ch->numtslots != 0)
+				return (1);
+		}
 	}
 	if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
 	    (ccb->ataio.cmd.flags & (CAM_ATAIO_CONTROL | CAM_ATAIO_NEEDRESULT))) {
@@ -1389,9 +1465,11 @@ ahci_begin_transaction(device_t dev, uni
 	/* Update channel stats. */
 	ch->oslots |= (1 << slot->slot);
 	ch->numrslots++;
+	ch->numrslotspd[ccb->ccb_h.target_id]++;
 	if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
 	    (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) {
 		ch->numtslots++;
+		ch->numtslotspd[ccb->ccb_h.target_id]++;
 		ch->taggedtarget = ccb->ccb_h.target_id;
 	}
 	if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
@@ -1459,7 +1537,9 @@ ahci_execute_transaction(struct ahci_slo
 	struct ahci_cmd_list *clp;
 	union ccb *ccb = slot->ccb;
 	int port = ccb->ccb_h.target_id & 0x0f;
-	int fis_size;
+	int fis_size, i;
+	uint8_t *fis = ch->dma.rfis + 0x40;
+	uint8_t val;
 
 	/* Get a piece of the workspace for this request */
 	ctp = (struct ahci_cmd_tab *)
@@ -1481,13 +1561,18 @@ ahci_execute_transaction(struct ahci_slo
 		     (port << 12);
 	/* Special handling for Soft Reset command. */
 	if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
-	    (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) &&
-	    (ccb->ataio.cmd.control & ATA_A_RESET)) {
-		/* Kick controller into sane state */
-		ahci_stop(dev);
-		ahci_clo(dev);
-		ahci_start(dev);
-		clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY;
+	    (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) {
+		if (ccb->ataio.cmd.control & ATA_A_RESET) {
+			/* Kick controller into sane state */
+			ahci_stop(dev);
+			ahci_clo(dev);
+			ahci_start(dev, 0);
+			clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY;
+		} else {
+			/* Prepare FIS receive area for check. */
+			for (i = 0; i < 20; i++)
+				fis[i] = 0xff;
+		}
 	}
 	clp->bytecount = 0;
 	clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET +
@@ -1501,6 +1586,11 @@ ahci_execute_transaction(struct ahci_slo
 	    (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) {
 		ATA_OUTL(ch->r_mem, AHCI_P_SACT, 1 << slot->slot);
 	}
+	/* If FBS is enabled, set PMP port. */
+	if (ch->fbs_enabled) {
+		ATA_OUTL(ch->r_mem, AHCI_P_FBS, AHCI_P_FBS_EN |
+		    (port << AHCI_P_FBS_DEV_SHIFT));
+	}
 	/* Issue command to the controller. */
 	slot->state = AHCI_SLOT_RUNNING;
 	ch->rslots |= (1 << slot->slot);
@@ -1543,12 +1633,30 @@ ahci_execute_transaction(struct ahci_slo
 			    ATA_INL(ch->r_mem, AHCI_P_SERR));
 			et = AHCI_ERR_TIMEOUT;
 		}
-		if (et != AHCI_ERR_NONE) {
-			/* Kick controller into sane state */
-			ahci_stop(ch->dev);
-			ahci_start(ch->dev);
+		/* Marvell controllers do not wait for readyness. */
+		if ((ch->quirks & AHCI_Q_NOBSYRES) &&
+		    (ccb->ccb_h.func_code == XPT_ATA_IO) &&
+		    (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) &&
+		    (ccb->ataio.cmd.control & ATA_A_RESET) == 0) {
+			while ((val = fis[2]) & (ATA_S_BUSY | ATA_S_DRQ)) {
+				DELAY(1000);
+				if (count++ >= timeout) {
+					device_printf(dev, "device is not "
+					    "ready after soft-reset: "
+					    "tfd = %08x\n", val);
+	    				et = AHCI_ERR_TIMEOUT;
+	    				break;
+				}
+			} 
 		}
 		ahci_end_transaction(slot, et);
+		/* Kick controller into sane state and enable FBS. */
+		if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
+		    (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) &&
+		    (ccb->ataio.cmd.control & ATA_A_RESET) == 0) {
+			ahci_stop(ch->dev);
+			ahci_start(ch->dev, 1);
+		}
 		return;
 	}
 	/* Start command execution timeout */
@@ -1577,7 +1685,8 @@ ahci_timeout(struct ahci_slot *slot)
 		sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT);
 		ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK)
 		    >> AHCI_P_CMD_CCS_SHIFT;
-		if ((sstatus & (1 << slot->slot)) != 0 || ccs == slot->slot)
+		if ((sstatus & (1 << slot->slot)) != 0 || ccs == slot->slot ||
+		    ch->fbs_enabled)
 			slot->state = AHCI_SLOT_EXECUTING;
 
 		callout_reset(&slot->timeout,
@@ -1635,12 +1744,19 @@ ahci_end_transaction(struct ahci_slot *s
 		if ((et == AHCI_ERR_TFE) ||
 		    (ccb->ataio.cmd.flags & CAM_ATAIO_NEEDRESULT)) {
 			u_int8_t *fis = ch->dma.rfis + 0x40;
-			uint16_t tfd = ATA_INL(ch->r_mem, AHCI_P_TFD);
 
 			bus_dmamap_sync(ch->dma.rfis_tag, ch->dma.rfis_map,
 			    BUS_DMASYNC_POSTREAD);
-			res->status = tfd;
-			res->error = tfd >> 8;
+			if (ch->fbs_enabled) {
+				fis += ccb->ccb_h.target_id * 256;
+				res->status = fis[2];
+				res->error = fis[3];
+			} else {
+				uint16_t tfd = ATA_INL(ch->r_mem, AHCI_P_TFD);
+
+				res->status = tfd;
+				res->error = tfd >> 8;
+			}
 			res->lba_low = fis[4];
 			res->lba_mid = fis[5];
 			res->lba_high = fis[6];
@@ -1659,6 +1775,8 @@ ahci_end_transaction(struct ahci_slot *s
 		    BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
 		bus_dmamap_unload(ch->dma.data_tag, slot->dma.data_map);
 	}
+	if (et != AHCI_ERR_NONE)
+		ch->eslots |= (1 << slot->slot);
 	/* In case of error, freeze device for proper recovery. */
 	if ((et != AHCI_ERR_NONE) && (!ch->readlog) &&
 	    !(ccb->ccb_h.status & CAM_DEV_QFRZN)) {
@@ -1722,9 +1840,11 @@ ahci_end_transaction(struct ahci_slot *s
 	slot->ccb = NULL;
 	/* Update channel stats. */
 	ch->numrslots--;
+	ch->numrslotspd[ccb->ccb_h.target_id]--;
 	if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
 	    (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) {
 		ch->numtslots--;
+		ch->numtslotspd[ccb->ccb_h.target_id]--;
 	}
 	/* If it was first request of reset sequence and there is no error,
 	 * proceed to second request. */
@@ -1742,6 +1862,7 @@ ahci_end_transaction(struct ahci_slot *s
 	/* If it was NCQ command error, put result on hold. */
 	} else if (et == AHCI_ERR_NCQ) {
 		ch->hold[slot->slot] = ccb;
+		ch->numhslots++;
 	} else
 		xpt_done(ccb);
 	/* Unfreeze frozen command. */
@@ -1756,6 +1877,15 @@ ahci_end_transaction(struct ahci_slot *s
 		/* if there was fatal error - reset port. */
 		if (ch->fatalerr) {
 			ahci_reset(dev);
+		} else {
+			/* if we have slots in error, we can reinit port. */
+			if (ch->eslots != 0) {
+				ahci_stop(dev);
+				ahci_start(dev, 1);
+			}
+			/* if there commands on hold, we can do READ LOG. */
+			if (!ch->readlog && ch->numhslots)
+				ahci_issue_read_log(dev);
 		}
 	}
 	/* Start PM timer. */
@@ -1843,6 +1973,7 @@ ahci_process_read_log(device_t dev, unio
 			}
 			xpt_done(ch->hold[i]);
 			ch->hold[i] = NULL;
+			ch->numhslots--;
 		}
 	} else {
 		if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
@@ -1855,6 +1986,7 @@ ahci_process_read_log(device_t dev, unio
 				continue;
 			xpt_done(ch->hold[i]);
 			ch->hold[i] = NULL;
+			ch->numhslots--;
 		}
 	}
 	free(ccb->ataio.data_ptr, M_AHCI);
@@ -1863,7 +1995,7 @@ ahci_process_read_log(device_t dev, unio
 }
 
 static void
-ahci_start(device_t dev)
+ahci_start(device_t dev, int fbs)
 {
 	struct ahci_channel *ch = device_get_softc(dev);
 	u_int32_t cmd;
@@ -1872,6 +2004,12 @@ ahci_start(device_t dev)
 	ATA_OUTL(ch->r_mem, AHCI_P_SERR, 0xFFFFFFFF);
 	/* Clear any interrupts pending on this channel */
 	ATA_OUTL(ch->r_mem, AHCI_P_IS, 0xFFFFFFFF);
+	/* Configure FIS-based switching if supported. */
+	if (ch->chcaps & AHCI_P_CMD_FBSCP) {
+		ch->fbs_enabled = (fbs && ch->pm_present) ? 1 : 0;
+		ATA_OUTL(ch->r_mem, AHCI_P_FBS,
+		    ch->fbs_enabled ? AHCI_P_FBS_EN : 0);
+	}
 	/* Start operations on this channel */
 	cmd = ATA_INL(ch->r_mem, AHCI_P_CMD);
 	ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd | AHCI_P_CMD_ST |
@@ -1897,6 +2035,7 @@ ahci_stop(device_t dev)
 			break;
 		}
 	} while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CR);
+	ch->eslots = 0;
 }
 
 static void
@@ -2010,7 +2149,9 @@ ahci_reset(device_t dev)
 			continue;
 		xpt_done(ch->hold[i]);
 		ch->hold[i] = NULL;
+		ch->numhslots--;
 	}
+	ch->eslots = 0;
 	ch->fatalerr = 0;
 	/* Tell the XPT about the event */
 	xpt_async(AC_BUS_RESET, ch->path, NULL);
@@ -2031,7 +2172,7 @@ ahci_reset(device_t dev)
 	/* Wait for clearing busy status. */
 	if (ahci_wait_ready(dev, 15000))
 		ahci_clo(dev);
-	ahci_start(dev);
+	ahci_start(dev, 1);
 	ch->devices = 1;
 	/* Enable wanted port interrupts */
 	ATA_OUTL(ch->r_mem, AHCI_P_IE,

Modified: head/sys/dev/ahci/ahci.h
==============================================================================
--- head/sys/dev/ahci/ahci.h	Thu Jan 28 17:09:47 2010	(r203122)
+++ head/sys/dev/ahci/ahci.h	Thu Jan 28 17:54:47 2010	(r203123)
@@ -247,8 +247,11 @@
 #define         AHCI_P_CMD_CPS      0x00010000
 #define         AHCI_P_CMD_PMA      0x00020000
 #define         AHCI_P_CMD_HPCP     0x00040000
-#define         AHCI_P_CMD_ISP      0x00080000
+#define         AHCI_P_CMD_MPSP     0x00080000
 #define         AHCI_P_CMD_CPD      0x00100000
+#define         AHCI_P_CMD_ESP      0x00200000
+#define         AHCI_P_CMD_FBSCP    0x00400000
+#define         AHCI_P_CMD_APSTE    0x00800000
 #define         AHCI_P_CMD_ATAPI    0x01000000
 #define         AHCI_P_CMD_DLAE     0x02000000
 #define         AHCI_P_CMD_ALPE     0x04000000
@@ -268,6 +271,15 @@
 #define AHCI_P_CI                   0x38
 #define AHCI_P_SNTF                 0x3C
 #define AHCI_P_FBS                  0x40
+#define 	AHCI_P_FBS_EN       0x00000001
+#define 	AHCI_P_FBS_DEC      0x00000002
+#define 	AHCI_P_FBS_SDE      0x00000004
+#define 	AHCI_P_FBS_DEV      0x00000f00
+#define 	AHCI_P_FBS_DEV_SHIFT 8
+#define 	AHCI_P_FBS_ADO      0x0000f000
+#define 	AHCI_P_FBS_ADO_SHIFT 12
+#define 	AHCI_P_FBS_DWE      0x000f0000
+#define 	AHCI_P_FBS_DWE_SHIFT 16
 
 /* Just to be sure, if building as module. */
 #if MAXPHYS < 512 * 1024
@@ -373,6 +385,7 @@ struct ahci_channel {
 	struct cam_path		*path;
 	uint32_t		caps;		/* Controller capabilities */
 	uint32_t		caps2;		/* Controller capabilities */
+	uint32_t		chcaps;		/* Channel capabilities */
 	int			quirks;
 	int			numslots;	/* Number of present slots */
 	int			pm_level;	/* power management level */
@@ -382,11 +395,16 @@ struct ahci_channel {
 	struct mtx		mtx;		/* state lock */
 	int			devices;        /* What is present */
 	int			pm_present;	/* PM presence reported */
+	int			fbs_enabled;	/* FIS-based switching enabled */
 	uint32_t		oslots;		/* Occupied slots */
 	uint32_t		rslots;		/* Running slots */
 	uint32_t		aslots;		/* Slots with atomic commands  */
+	uint32_t		eslots;		/* Slots in error */
 	int			numrslots;	/* Number of running slots */
+	int			numrslotspd[16];/* Number of running slots per dev */
 	int			numtslots;	/* Number of tagged slots */
+	int			numtslotspd[16];/* Number of tagged slots per dev */
+	int			numhslots;	/* Number of holden slots */
 	int			readlog;	/* Our READ LOG active */
 	int			fatalerr;	/* Fatal error happend */
 	int			lastslot;	/* Last used slot */

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 18:15:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E820106566C;
	Thu, 28 Jan 2010 18:15:19 +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 8DEBF8FC17;
	Thu, 28 Jan 2010 18:15:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SIFJAI015078;
	Thu, 28 Jan 2010 18:15:19 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SIFJLH015076;
	Thu, 28 Jan 2010 18:15:19 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001281815.o0SIFJLH015076@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Jan 2010 18:15: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: r203124 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 18:15:19 -0000

Author: mav
Date: Thu Jan 28 18:15:19 2010
New Revision: 203124
URL: http://svn.freebsd.org/changeset/base/203124

Log:
  Note added FIS-based switching support.

Modified:
  head/share/man/man4/ahci.4

Modified: head/share/man/man4/ahci.4
==============================================================================
--- head/share/man/man4/ahci.4	Thu Jan 28 17:54:47 2010	(r203123)
+++ head/share/man/man4/ahci.4	Thu Jan 28 18:15:19 2010	(r203124)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 24, 2009
+.Dd January 28, 2010
 .Dt AHCI 4
 .Os
 .Sh NAME
@@ -114,14 +114,11 @@ ATAPI devices are handled by the SCSI pr
 etc.
 .Pp
 Driver features include support for Serial ATA and ATAPI devices,
-Port Multipliers, hardware command queues (up to 32 commands per port),
+Port Multipliers (including FIS-based switching, when supported),
+hardware command queues (up to 32 commands per port),
 Native Command Queuing, SATA interface Power Management, device hot-plug
 and Message Signaled Interrupts.
 .Pp
-The Port Multiplier FIS Based Switching feature added in the AHCI 1.2
-specification, which is required for effective parallel operation of devices
-behind Port Multipliers, is not yet supported.
-.Pp
 AHCI hardware is also supported by ataahci driver from
 .Xr ata 4
 subsystem. If both drivers are loaded at the same time, this one will be
@@ -131,6 +128,10 @@ The
 .Nm
 driver supports AHCI compatible controllers having PCI class 1 (mass storage),
 subclass 6 (SATA) and programming interface 1 (AHCI).
+.Pp
+Also, in cooperation with atamarvell and atajmicron drivers of ata(4),
+it supports AHCI part of legacy-PATA + AHCI-SATA combined controllers,
+such as JMicron JMB36x and Marvell 88SX61xx.
 .Sh SEE ALSO
 .Xr ada 4 ,
 .Xr cd 4 ,

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 18:19:51 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 040A3106566C;
	Thu, 28 Jan 2010 18:19:51 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id B7A358FC13;
	Thu, 28 Jan 2010 18:19:50 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0SIBNXV010180;
	Thu, 28 Jan 2010 11:11:23 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Thu, 28 Jan 2010 11:12:17 -0700 (MST)
Message-Id: <20100128.111217.902574035110327253.imp@bsdimp.com>
To: rrs@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <201001281401.o0SE1lUs058999@svn.freebsd.org>
References: <201001281401.o0SE1lUs058999@svn.freebsd.org>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r203113 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 18:19:51 -0000

In message: <201001281401.o0SE1lUs058999@svn.freebsd.org>
            Randall Stewart  writes:
: Author: rrs
: Date: Thu Jan 28 14:01:47 2010
: New Revision: 203113
: URL: http://svn.freebsd.org/changeset/base/203113
: 
: Log:
:   Make compilable.. i.e. the FreeBSD id I added must
:   be in comments.
: 
: Modified:
:   head/sys/mips/rmi/pic.h
: 
: Modified: head/sys/mips/rmi/pic.h
: ==============================================================================
: --- head/sys/mips/rmi/pic.h	Thu Jan 28 14:01:16 2010	(r203112)
: +++ head/sys/mips/rmi/pic.h	Thu Jan 28 14:01:47 2010	(r203113)
: @@ -30,7 +30,9 @@
:  #ifndef _RMI_PIC_H_
:  #define _RMI_PIC_H_
:  #include 
: +/*
:  __FBSDID("$FreeBSD$");
: +*/
:  
:  extern int rmi_spin_mutex_safe;


Style here is to have it be part of the comment block earlier in the
file...

Warner



From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 19:12:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 14B78106568F;
	Thu, 28 Jan 2010 19:12:08 +0000 (UTC)
	(envelope-from rrs@lakerest.net)
Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d])
	by mx1.freebsd.org (Postfix) with ESMTP id B75778FC21;
	Thu, 28 Jan 2010 19:12:07 +0000 (UTC)
Received: from mobile-166-129-219-006.mycingular.net
	(mobile-166-129-219-006.mycingular.net [166.129.219.6] (may be
	forged)) (authenticated bits=0)
	by lakerest.net (8.14.3/8.14.3) with ESMTP id o0SJBfPj077469
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
	Thu, 28 Jan 2010 14:12:03 -0500 (EST)
	(envelope-from rrs@lakerest.net)
Message-Id: 
From: Randall Stewart 
To: "M. Warner Losh" 
In-Reply-To: <20100128.111217.902574035110327253.imp@bsdimp.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Thu, 28 Jan 2010 11:12:01 -0800
References: <201001281401.o0SE1lUs058999@svn.freebsd.org>
	<20100128.111217.902574035110327253.imp@bsdimp.com>
X-Mailer: Apple Mail (2.936)
Cc: svn-src-head@freebsd.org, rrs@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r203113 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 19:12:08 -0000

Thanks

I will fix that when i get home ;-)

R
On Jan 28, 2010, at 10:12 AM, M. Warner Losh wrote:

> In message: <201001281401.o0SE1lUs058999@svn.freebsd.org>
>            Randall Stewart  writes:
> : Author: rrs
> : Date: Thu Jan 28 14:01:47 2010
> : New Revision: 203113
> : URL: http://svn.freebsd.org/changeset/base/203113
> :
> : Log:
> :   Make compilable.. i.e. the FreeBSD id I added must
> :   be in comments.
> :
> : Modified:
> :   head/sys/mips/rmi/pic.h
> :
> : Modified: head/sys/mips/rmi/pic.h
> :  
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> : --- head/sys/mips/rmi/pic.h	Thu Jan 28 14:01:16 2010	(r203112)
> : +++ head/sys/mips/rmi/pic.h	Thu Jan 28 14:01:47 2010	(r203113)
> : @@ -30,7 +30,9 @@
> :  #ifndef _RMI_PIC_H_
> :  #define _RMI_PIC_H_
> :  #include 
> : +/*
> :  __FBSDID("$FreeBSD$");
> : +*/
> :
> :  extern int rmi_spin_mutex_safe;
>
>
> Style here is to have it be part of the comment block earlier in the
> file...
>
> Warner
>
>

------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)


From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 19:12:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 63E6D106566B;
	Thu, 28 Jan 2010 19:12:40 +0000 (UTC)
	(envelope-from joerg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 537988FC25;
	Thu, 28 Jan 2010 19:12:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SJCeBC027963;
	Thu, 28 Jan 2010 19:12:40 GMT (envelope-from joerg@svn.freebsd.org)
Received: (from joerg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SJCe8L027961;
	Thu, 28 Jan 2010 19:12:40 GMT (envelope-from joerg@svn.freebsd.org)
Message-Id: <201001281912.o0SJCe8L027961@svn.freebsd.org>
From: Joerg Wunsch 
Date: Thu, 28 Jan 2010 19:12:40 +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: r203125 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 19:12:40 -0000

Author: joerg
Date: Thu Jan 28 19:12:40 2010
New Revision: 203125
URL: http://svn.freebsd.org/changeset/base/203125

Log:
  Fix typo in xref (it accidentally referenced itself).
  
  MFC after:	1 day

Modified:
  head/share/man/man4/gpib.4

Modified: head/share/man/man4/gpib.4
==============================================================================
--- head/share/man/man4/gpib.4	Thu Jan 28 18:15:19 2010	(r203124)
+++ head/share/man/man4/gpib.4	Thu Jan 28 19:12:40 2010	(r203125)
@@ -88,7 +88,7 @@ bus in an unaddressed mode, for example 
 .El
 .Sh SEE ALSO
 .\" .Xr libgpib 3 ,
-.Xr gpib 4 ,
+.Xr pcii 4 ,
 .Xr tnt4882 4
 .Sh HISTORY
 The

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 19:41:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75B33106566C;
	Thu, 28 Jan 2010 19:41:26 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 655668FC0A;
	Thu, 28 Jan 2010 19:41:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SJfQmB034310;
	Thu, 28 Jan 2010 19:41:26 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SJfQrA034308;
	Thu, 28 Jan 2010 19:41:26 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201001281941.o0SJfQrA034308@svn.freebsd.org>
From: Ulrich Spörlein 
Date: Thu, 28 Jan 2010 19:41: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: r203126 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 19:41:26 -0000

Author: uqs
Date: Thu Jan 28 19:41:26 2010
New Revision: 203126
URL: http://svn.freebsd.org/changeset/base/203126

Log:
  Add myself.
  
  Approved by:	philip (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==============================================================================
--- head/share/misc/committers-src.dot	Thu Jan 28 19:12:40 2010	(r203125)
+++ head/share/misc/committers-src.dot	Thu Jan 28 19:41:26 2010	(r203126)
@@ -187,6 +187,7 @@ trasz [label="Edward Tomasz Napierala\nt
 trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"]
 tuexen [label="Michael Tuexen\ntuexen@FreeBSD.org\n2009/06/06"]
 ume [label="Hajimu UMEMOTO\nume@FreeBSD.org\n2000/02/26"]
+uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2010/01/28"]
 vanhu [label="Yvan Vanhullebus\nvanhu@FreeBSD.org\n2008/07/21"]
 versus [label="Konrad Jankowski\nversus@FreeBSD.org\n2008/10/27"]
 weongyo [label="Weongyo Jeong\nweongyo@FreeBSD.org\n2007/12/21"]
@@ -398,6 +399,7 @@ peter -> ps
 philip -> ed
 philip -> jls
 philip -> matteo
+philip -> uqs
 
 pjd -> kib
 pjd -> lulf

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 19:57:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE8C410656A3;
	Thu, 28 Jan 2010 19:57:24 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCAA08FC21;
	Thu, 28 Jan 2010 19:57:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SJvOol037859;
	Thu, 28 Jan 2010 19:57:24 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SJvO23037857;
	Thu, 28 Jan 2010 19:57:24 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001281957.o0SJvO23037857@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 28 Jan 2010 19:57: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: r203127 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 19:57:25 -0000

Author: trasz
Date: Thu Jan 28 19:57:24 2010
New Revision: 203127
URL: http://svn.freebsd.org/changeset/base/203127

Log:
  Add description of bounded sleep vs unbounded sleep (aka blocking).  Move
  rules into their own section.

Modified:
  head/share/man/man9/locking.9

Modified: head/share/man/man9/locking.9
==============================================================================
--- head/share/man/man9/locking.9	Thu Jan 28 19:41:26 2010	(r203126)
+++ head/share/man/man9/locking.9	Thu Jan 28 19:57:24 2010	(r203127)
@@ -73,38 +73,15 @@ code.
 Mutexes are the most commonly used synchronization primitive in the kernel.
 Thread acquires (locks) a mutex before accessing data shared with other
 threads (including interrupt threads), and releases (unlocks) it afterwards.
-If the mutex cannot be acquired, the thread requesting it will block.
-.Pp
-Sleeping while holding mutex is generally prohibited.
-You may only call the
-.Xr sleep 9
-call via
-.Fn msleep
-or the new
-.Fn mtx_sleep
-variant.
-These will atomically drop the mutex and reacquire it
-as part of waking up.
-This is often however a
-.Em BAD
-idea because it generally relies on you having
-such a good knowledge of all the call graph above you
-and what assumptions it is making that there are a lot
-of ways to make hard-to-find mistakes.
-For example you MUST re-test all the assumptions you made before,
-all the way up the call graph to where you got the lock.
-You can not just assume that mtx_sleep can be inserted anywhere.
-If any caller above you has any mutex or
-rwlock, your sleep, will cause a panic.
-If the sleep only happens rarely it may be years before the 
-bad code path is found.
+If the mutex cannot be acquired, the thread requesting it will sleep.
+Mutexes fully support priority propagation.
 .Pp
 See the
 .Xr mutex 9
 page for more information.
 .Ss Spin mutexes
 Spin mutexes are variation of basic mutexes; the main difference between
-the two is that spin mutexes never block - instead, they spin, waiting
+the two is that spin mutexes never sleep - instead, they spin, waiting
 for the thread holding the lock, which runs on another CPU, to release it.
 Differently from ordinary mutex, spin mutexes disable interrupts when acquired.
 Since disabling interrupts is expensive, they are also generally slower.
@@ -136,23 +113,12 @@ A thread with exclusive access is known 
 .Em writer
 since it may modify protected data.
 .Pp
-Although reader/writer locks look very similar to
-.Xr sx 9
-(see below) locks, their usage pattern is different.
 Reader/writer locks can be treated as mutexes (see above and
 .Xr mutex 9 )
 with shared/exclusive semantics.
 More specifically, regular mutexes can be 
 considered to be equivalent to a write-lock on an
 .Em rw_lock.
-In the future this may in fact
-become literally the fact.
-An
-.Em rw_lock
-can be locked while holding a regular mutex, but 
-can
-.Em not
-be held while sleeping.
 The
 .Em rw_lock
 locks have priority propagation like mutexes, but priority
@@ -164,19 +130,15 @@ Another important property is that share
 can recurse, but exclusive locks are not allowed to recurse.
 This ability should not be used lightly and 
 .Em may go away.
-Users of recursion in any locks should be prepared to 
-defend their decision against vigorous criticism.
 .Pp
 See the
 .Xr rwlock 9
 page for more information.
 .Ss Read-mostly locks
 Mostly reader locks are similar to
-.Em Reader/write
-locks but optimized for very infrequent 
-.Em writer
-locking.
-.Em rm_lock
+.Em reader/writer
+locks but optimized for very infrequent write locking.
+.Em Read-mostly
 locks implement full priority propagation by tracking shared owners
 using a lock user supplied
 .Em tracker
@@ -186,27 +148,12 @@ See the
 .Xr rmlock 9
 page for more information.
 .Ss Shared/exclusive locks
-Shared/exclusive locks are used to protect data that are read far more often
-than they are written.
-Mutexes are inherently more efficient than shared/exclusive locks, so
-shared/exclusive locks should be used prudently.
-The main reason for using an
-.Em sx_lock
-is that a thread may hold a shared or exclusive lock on an
-.Em sx_lock
-lock while sleeping.
-As a consequence of this however, an
-.Em sx_lock
-lock may not be acquired while holding a mutex.
-The reason for this is that, if one thread slept while holding an
-.Em sx_lock
-lock while another thread blocked on the same
-.Em sx_lock
-lock after acquiring a mutex, then the second thread would effectively
-end up sleeping while holding a mutex, which is not allowed.
-The
-.Em sx_lock
-should be considered to be closely related to
+Shared/exclusive locks are similar to reader/writer locks; the main difference
+between them is that shared/exclusive locks may be held during unbounded sleep
+(and may thus perform an unbounded sleep).
+They are inherently less efficient than mutexes, reader/writer locks
+and read-mostly locks.  They don't support priority propagation.
+They should be considered to be closely related to
 .Xr sleep 9 .
 In fact it could in some cases be 
 considered a conditional sleep.
@@ -239,8 +186,7 @@ See the
 .Xr condvar 9
 page for more information.
 .Ss Giant
-Giant is a special instance of a sleep lock.
-It has several special characteristics.
+Giant is an instance of a mutex, with some special characteristics:
 .Bl -enum
 .It
 It is recursive.
@@ -255,7 +201,7 @@ Giant must be locked first before other 
 There are places in the kernel that drop Giant and pick it back up
 again.
 Sleep locks will do this before sleeping.
-Parts of the Network or VM code may do this as well, depending on the
+Parts of the network or VM code may do this as well, depending on the
 setting of a sysctl.
 This means that you cannot count on Giant keeping other code from
 running if your code sleeps, even if you want it to.
@@ -321,7 +267,7 @@ See the
 page for more information.
 .Pp
 .Ss Lockmanager locks
-Shared/exclusive sleep locks, used mostly in
+Shared/exclusive locks, used mostly in
 .Xr VFS 9 ,
 in particular as a
 .Xr vnode 9
@@ -334,19 +280,54 @@ See the
 .Xr lock 9
 page for more information.
 .Sh INTERACTIONS
-.Ss Interaction table.
+.Ss Bounded vs. unbounded sleep
+The following primitives perform bounded sleep: mutexes, pool mutexes,
+reader/writer locks and read-mostly locks.
+.Pp
+The following primitives block (perform unbounded sleep): shared/exclusive locks,
+counting semaphores, condition variables, sleep/wakeup and lockmanager locks.
+.Pp
+It is an error to do any operation that could result in any kind of sleep while
+holding spin mutex.
+.Pp
+As a general rule, it is an error to do any operation that could result
+in unbounded sleep while holding any primitive from the 'bounded sleep' group.
+For example, it is an error to try to acquire shared/exclusive lock while
+holding mutex, or to try to allocate memory with M_WAITOK while holding
+read-write lock.
+.Pp
+As a special case, it is possible to call
+.Fn sleep 9
+or
+.Fn mtx_sleep 9
+while holding a mutex.
+It will atomically drop the mutex and reacquire it
+as part of waking up.
+This is often however a bad
+idea because it generally relies on you having
+such a good knowledge of all the call graph above you
+and what assumptions it is making that there are a lot
+of ways to make hard-to-find mistakes.
+For example you must re-test all the assumptions you made before,
+all the way up the call graph to where you got the lock.
+You can not just assume that mtx_sleep can be inserted anywhere.
+If any caller above you has any mutex or
+rwlock, your sleep, will cause a panic.
+If the sleep only happens rarely it may be years before the 
+bad code path is found.
+.Ss Interaction table
 The following table shows what you can and can not do if you hold
 one of the synchronization primitives discussed here:
 (someone who knows what they are talking about should write this table)
-.Bl -column ".Ic xxxxxxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXX" -offset indent
+.Bl -column ".Ic xxxxxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXX" -offset indent
 .It Xo
-.Em "You have: You want:" Ta Spin_mtx Ta Slp_mtx Ta sx_lock Ta rw_lock Ta rm_lock Ta sleep
+.Em "You have: You want:" Ta spin mtx Ta mutex Ta sx Ta rwlock Ta rmlock Ta sleep
 .Xc
-.It Ic SPIN mutex  Ta \&ok-1 Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no-3
-.It Ic Sleep mutex Ta \&ok Ta \&ok-1 Ta \&no Ta \&ok Ta \&ok Ta \&no-3
-.It Ic sx_lock     Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4
-.It Ic rw_lock     Ta \&ok Ta \&ok Ta \&no Ta \&ok-2 Ta \&ok Ta \&no-3
-.It Ic rm_lock     Ta \&ok Ta \&ok Ta \&no Ta \&ok Ta \&ok-2 Ta \&no
+.It Ic spin mtx  Ta \&ok-1 Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no-3
+.It Ic mutex     Ta \&ok Ta \&ok-1 Ta \&no Ta \&ok Ta \&ok Ta \&no-3
+.It Ic sxlock    Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4
+.It Ic rwlock    Ta \&ok Ta \&ok Ta \&no Ta \&ok-2 Ta \&ok Ta \&no-3
+.It Ic rmlock    Ta \&ok Ta \&ok Ta \&no Ta \&ok Ta \&ok-2 Ta \&no
 .El
 .Pp
 .Em *1
@@ -371,12 +352,12 @@ Though one can sleep holding an sx lock,
 .Fn sx_sleep
 which atomically release this primitive when going to sleep and
 reacquire it on wakeup.
-.Ss Context mode table.
+.Ss Context mode table
 The next table shows what can be used in different contexts.
 At this time this is a rather easy to remember table.
-.Bl -column ".Ic Xxxxxxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXX" -offset indent
+.Bl -column ".Ic Xxxxxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXX" -offset indent
 .It Xo
-.Em "Context:" Ta Spin_mtx Ta Slp_mtx Ta sx_lock Ta rw_lock Ta rm_lock Ta sleep
+.Em "Context:" Ta spin mtx Ta mutex Ta sx Ta rwlock Ta rmlock Ta sleep
 .Xc
 .It interrupt:  Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no 
 .It idle:  Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no 

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 20:38:52 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BCDED106568F;
	Thu, 28 Jan 2010 20:38:52 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ABDCC8FC3E;
	Thu, 28 Jan 2010 20:38:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SKcqWN047137;
	Thu, 28 Jan 2010 20:38:52 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SKcqcZ047135;
	Thu, 28 Jan 2010 20:38:52 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201001282038.o0SKcqcZ047135@svn.freebsd.org>
From: Warner Losh 
Date: Thu, 28 Jan 2010 20:38:52 +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: r203128 - head/sys/mips/cavium
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 20:38:52 -0000

Author: imp
Date: Thu Jan 28 20:38:52 2010
New Revision: 203128
URL: http://svn.freebsd.org/changeset/base/203128

Log:
  trim unused members of the softc.

Modified:
  head/sys/mips/cavium/obiovar.h

Modified: head/sys/mips/cavium/obiovar.h
==============================================================================
--- head/sys/mips/cavium/obiovar.h	Thu Jan 28 19:57:24 2010	(r203127)
+++ head/sys/mips/cavium/obiovar.h	Thu Jan 28 20:38:52 2010	(r203128)
@@ -47,12 +47,9 @@ struct obio_softc {
 	bus_space_tag_t oba_st;		/* bus space tag */
 	bus_addr_t oba_addr;		/* address of device */
 	bus_size_t oba_size;		/* size of device */
-	int oba_width;			/* bus width */
-	int oba_irq;			/* XINT interrupt bit # */
 	struct rman oba_rman;
 	struct rman oba_irq_rman;
 	
 };
-extern struct bus_space obio_bs_tag;
 
 #endif /* _OCTEON_OBIOVAR_H_ */

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 20:39:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73869106568F;
	Thu, 28 Jan 2010 20:39:50 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 637358FC0A;
	Thu, 28 Jan 2010 20:39:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SKdoli047378;
	Thu, 28 Jan 2010 20:39:50 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SKdoLe047376;
	Thu, 28 Jan 2010 20:39:50 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201001282039.o0SKdoLe047376@svn.freebsd.org>
From: Warner Losh 
Date: Thu, 28 Jan 2010 20:39:50 +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: r203129 - head/sys/mips/cavium
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 20:39:50 -0000

Author: imp
Date: Thu Jan 28 20:39:50 2010
New Revision: 203129
URL: http://svn.freebsd.org/changeset/base/203129

Log:
  We make it to single user well, but not so well to multi-user.  Force
  single user for the moment since that's a better experience for people
  trying this code out...

Modified:
  head/sys/mips/cavium/octeon_machdep.c

Modified: head/sys/mips/cavium/octeon_machdep.c
==============================================================================
--- head/sys/mips/cavium/octeon_machdep.c	Thu Jan 28 20:38:52 2010	(r203128)
+++ head/sys/mips/cavium/octeon_machdep.c	Thu Jan 28 20:39:50 2010	(r203129)
@@ -730,6 +730,8 @@ platform_start(__register_t a0, __regist
 {
 	uint64_t platform_counter_freq;
 
+	boothowto |= RB_SINGLE;
+
 	/* Initialize pcpu stuff */
 	mips_pcpu0_init();
 	mips_timer_early_init(OCTEON_CLOCK_DEFAULT);

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 20:46:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE8501065679;
	Thu, 28 Jan 2010 20:46:40 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBFFA8FC13;
	Thu, 28 Jan 2010 20:46:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SKkenj048988;
	Thu, 28 Jan 2010 20:46:40 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SKkeeL048971;
	Thu, 28 Jan 2010 20:46:40 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201001282046.o0SKkeeL048971@svn.freebsd.org>
From: Warner Losh 
Date: Thu, 28 Jan 2010 20:46:40 +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: r203130 - in head/sys/mips/cavium: . dev/rgmii
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 20:46:41 -0000

Author: imp
Date: Thu Jan 28 20:46:40 2010
New Revision: 203130
URL: http://svn.freebsd.org/changeset/base/203130

Log:
  Add Cavium's standard copyright to those files that are currently
  lacking a copyright/license statement.  All these files were in the
  Cavium FreeBSD source drop and appear to be written by Cavium (some
  are nearly verbatim copies of files from the cnusers' 1.9.0 SDK, which
  also uses this copyright).

Modified:
  head/sys/mips/cavium/asm_octeon.S
  head/sys/mips/cavium/dev/rgmii/octeon_fau.c
  head/sys/mips/cavium/dev/rgmii/octeon_fau.h
  head/sys/mips/cavium/dev/rgmii/octeon_fpa.c
  head/sys/mips/cavium/dev/rgmii/octeon_fpa.h
  head/sys/mips/cavium/dev/rgmii/octeon_ipd.c
  head/sys/mips/cavium/dev/rgmii/octeon_ipd.h
  head/sys/mips/cavium/dev/rgmii/octeon_pip.h
  head/sys/mips/cavium/dev/rgmii/octeon_pko.c
  head/sys/mips/cavium/dev/rgmii/octeon_pko.h
  head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
  head/sys/mips/cavium/dev/rgmii/octeon_rgmx.h
  head/sys/mips/cavium/driveid.h
  head/sys/mips/cavium/octeon_ebt3000_cf.c
  head/sys/mips/cavium/octeon_ebt3000_cf.h
  head/sys/mips/cavium/octeon_pcmap_regs.h

Modified: head/sys/mips/cavium/asm_octeon.S
==============================================================================
--- head/sys/mips/cavium/asm_octeon.S	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/asm_octeon.S	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,42 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
 
 #include 
 #include 

Modified: head/sys/mips/cavium/dev/rgmii/octeon_fau.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_fau.c	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_fau.c	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*------------------------------------------------------------------
  * octeon_fau.c        Fetch & Add Block
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_fau.h
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_fau.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_fau.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*------------------------------------------------------------------
  * octeon_fau.h        Fetch & Add Unit
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_fpa.c	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_fpa.c	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*------------------------------------------------------------------
  * octeon_fpa.c        Free Pool Allocator
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.h
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_fpa.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_fpa.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*------------------------------------------------------------------
  * octeon_fpa.h      Free Pool Allocator
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_ipd.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_ipd.c	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_ipd.c	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*------------------------------------------------------------------
  * octeon_ipd.c      Input Packet Unit
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_ipd.h
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_ipd.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_ipd.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*------------------------------------------------------------------
  * octeon_ipd.h      Input Packet Unit
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_pip.h
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_pip.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_pip.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*
  * octeon_pip.h		Packet Input Processing Block
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_pko.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_pko.c	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_pko.c	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*------------------------------------------------------------------
  * octeon_pko.c      Packet Output Unit
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_pko.h
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_pko.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_pko.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*------------------------------------------------------------------
  * octeon_pko.h      Packet Output Block
  *

Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*
  * octeon_rgmx.c     RGMII  Ethernet Interfaces on Octeon
  *
@@ -176,9 +214,6 @@ static void  octeon_rgmx_init	      (voi
 static int   octeon_rgmx_ioctl        (struct ifnet *, u_long, caddr_t);
 static void  octeon_rgmx_output_start (struct ifnet *);
 static void  octeon_rgmx_output_start_locked (struct ifnet *);
-#if 0
-static void  octeon_rgmx_watchdog     (struct ifnet *);
-#endif
 static int   octeon_rgmx_medchange    (struct ifnet *);
 static void  octeon_rgmx_medstat      (struct ifnet *, struct ifmediareq *);
 
@@ -295,9 +330,6 @@ static int octeon_rgmx_init_ifnet (struc
         if_initname(sc->ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev));
         ifp->if_start    = octeon_rgmx_output_start;
         ifp->if_ioctl    = octeon_rgmx_ioctl;
-        /* Watchdog interface is now deprecated.
-        ifp->if_watchdog = octeon_rgmx_watchdog;
-        */
 	ifp->if_hwassist = CSUM_TCP | CSUM_UDP;
 	ifp->if_capabilities = IFCAP_HWCSUM;
 	ifp->if_capenable = ifp->if_capabilities;

Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.h
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*------------------------------------------------------------------
  * octeon_rgmx.h      RGMII Ethernet Interfaces
  *

Modified: head/sys/mips/cavium/driveid.h
==============================================================================
--- head/sys/mips/cavium/driveid.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/driveid.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,42 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
 
 /*
  * driveid.h

Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c
==============================================================================
--- head/sys/mips/cavium/octeon_ebt3000_cf.c	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/octeon_ebt3000_cf.c	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*
  *  octeon_ebt3000_cf.c
  *

Modified: head/sys/mips/cavium/octeon_ebt3000_cf.h
==============================================================================
--- head/sys/mips/cavium/octeon_ebt3000_cf.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/octeon_ebt3000_cf.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,43 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
+/* $FreeBSD$ */
+
 /*
  *  octeon_ebt3000_cf.h
  *

Modified: head/sys/mips/cavium/octeon_pcmap_regs.h
==============================================================================
--- head/sys/mips/cavium/octeon_pcmap_regs.h	Thu Jan 28 20:39:50 2010	(r203129)
+++ head/sys/mips/cavium/octeon_pcmap_regs.h	Thu Jan 28 20:46:40 2010	(r203130)
@@ -1,3 +1,41 @@
+/***********************license start***************
+ *  Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
+ *  reserved.
+ *
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials provided
+ *        with the distribution.
+ *
+ *      * Neither the name of Cavium Networks nor the names of
+ *        its contributors may be used to endorse or promote products
+ *        derived from this software without specific prior written
+ *        permission.
+ *
+ *  TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ *  AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+ *  OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+ *  RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+ *  REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+ *  DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+ *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+ *  PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+ *  POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
+ *  OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+ *
+ *
+ *  For any questions regarding licensing please contact marketing@caviumnetworks.com
+ *
+ ***********************license end**************************************/
+
 /*
  *    This product includes software developed by the University of
  *    California, Berkeley and its contributors."

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 21:14:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C1B81065670;
	Thu, 28 Jan 2010 21:14:13 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2AB638FC17;
	Thu, 28 Jan 2010 21:14:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SLED7J055049;
	Thu, 28 Jan 2010 21:14:13 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SLEDki055047;
	Thu, 28 Jan 2010 21:14:13 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001282114.o0SLEDki055047@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 28 Jan 2010 21:14:13 +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: r203131 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 21:14:13 -0000

Author: trasz
Date: Thu Jan 28 21:14:12 2010
New Revision: 203131
URL: http://svn.freebsd.org/changeset/base/203131

Log:
  Cosmetic fixes.

Modified:
  head/share/man/man9/locking.9

Modified: head/share/man/man9/locking.9
==============================================================================
--- head/share/man/man9/locking.9	Thu Jan 28 20:46:40 2010	(r203130)
+++ head/share/man/man9/locking.9	Thu Jan 28 21:14:12 2010	(r203131)
@@ -76,9 +76,9 @@ threads (including interrupt threads), a
 If the mutex cannot be acquired, the thread requesting it will sleep.
 Mutexes fully support priority propagation.
 .Pp
-See the
+See
 .Xr mutex 9
-page for more information.
+for details.
 .Ss Spin mutexes
 Spin mutexes are variation of basic mutexes; the main difference between
 the two is that spin mutexes never sleep - instead, they spin, waiting
@@ -100,9 +100,9 @@ a pool mutex, one uses address of the st
 not the mutex itself.
 Pool mutexes are seldom used.
 .Pp
-See the
+See
 .Xr mtx_pool 9
-page for more information.
+for details.
 .Ss Reader/writer locks
 Reader/writer locks allow shared access to protected data by multiple threads,
 or exclusive access by a single thread.
@@ -131,9 +131,9 @@ can recurse, but exclusive locks are not
 This ability should not be used lightly and 
 .Em may go away.
 .Pp
-See the
+See
 .Xr rwlock 9
-page for more information.
+for details.
 .Ss Read-mostly locks
 Mostly reader locks are similar to
 .Em reader/writer
@@ -144,9 +144,9 @@ using a lock user supplied
 .Em tracker
 data structure.
 .Pp
-See the
+See
 .Xr rmlock 9
-page for more information.
+for details.
 .Ss Shared/exclusive locks
 Shared/exclusive locks are similar to reader/writer locks; the main difference
 between them is that shared/exclusive locks may be held during unbounded sleep
@@ -158,9 +158,9 @@ They should be considered to be closely 
 In fact it could in some cases be 
 considered a conditional sleep.
 .Pp
-See the
+See
 .Xr sx 9
-page for more information.
+for details.
 .Ss Counting semaphores
 Counting semaphores provide a mechanism for synchronizing access
 to a pool of resources.
@@ -169,9 +169,9 @@ so they can be useful in situations wher
 to acquire a resource, and another thread needs to release it.
 They are largely deprecated.
 .Pp
-See the
+See
 .Xr sema 9
-page for more information.
+for details.
 .Ss Condition variables
 Condition variables are used in conjunction with mutexes to wait for
 conditions to occur.
@@ -182,9 +182,9 @@ When a thread waits on a condition, the 
 is atomically released before the thread is blocked, then reacquired
 before the function call returns.
 .Pp
-See the
+See
 .Xr condvar 9
-page for more information.
+for details.
 .Ss Giant
 Giant is an instance of a mutex, with some special characteristics:
 .Bl -enum
@@ -262,9 +262,9 @@ while the thread is suspended and will r
 .Va Giant
 mutex before the function returns.
 .Pp
-See the
+See
 .Xr sleep 9
-page for more information.
+for details.
 .Pp
 .Ss Lockmanager locks
 Shared/exclusive locks, used mostly in
@@ -276,9 +276,9 @@ They have features other lock types don'
 writer starvation avoidance, draining, and interlock mutex, but this makes them
 complicated to implement; for this reason, they are deprecated.
 .Pp
-See the
+See
 .Xr lock 9
-page for more information.
+for details.
 .Sh INTERACTIONS
 .Ss Bounded vs. unbounded sleep
 The following primitives perform bounded sleep: mutexes, pool mutexes,
@@ -325,7 +325,7 @@ one of the synchronization primitives di
 .Xc
 .It Ic spin mtx  Ta \&ok-1 Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no-3
 .It Ic mutex     Ta \&ok Ta \&ok-1 Ta \&no Ta \&ok Ta \&ok Ta \&no-3
-.It Ic sxlock    Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4
+.It Ic sx        Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4
 .It Ic rwlock    Ta \&ok Ta \&ok Ta \&no Ta \&ok-2 Ta \&ok Ta \&no-3
 .It Ic rmlock    Ta \&ok Ta \&ok Ta \&no Ta \&ok Ta \&ok-2 Ta \&no
 .El

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 21:55:56 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B027106566C;
	Thu, 28 Jan 2010 21:55:56 +0000 (UTC)
	(envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A0AB8FC16;
	Thu, 28 Jan 2010 21:55:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SLtuga064207;
	Thu, 28 Jan 2010 21:55:56 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SLtus5064205;
	Thu, 28 Jan 2010 21:55:56 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <201001282155.o0SLtus5064205@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Thu, 28 Jan 2010 21:55: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: r203132 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 21:55:56 -0000

Author: gonzo
Date: Thu Jan 28 21:55:56 2010
New Revision: 203132
URL: http://svn.freebsd.org/changeset/base/203132

Log:
  - Increase timeouts to 100 milliseconds, 1 millisecond is definitely not
      enough for PCI controller to get into shape
  
  Thanks to: adrian@

Modified:
  head/sys/mips/atheros/ar71xx_pci.c

Modified: head/sys/mips/atheros/ar71xx_pci.c
==============================================================================
--- head/sys/mips/atheros/ar71xx_pci.c	Thu Jan 28 21:14:12 2010	(r203131)
+++ head/sys/mips/atheros/ar71xx_pci.c	Thu Jan 28 21:55:56 2010	(r203132)
@@ -297,12 +297,12 @@ ar71xx_pci_attach(device_t dev)
 	reset |= (RST_RESET_PCI_CORE | RST_RESET_PCI_BUS);
 	ATH_WRITE_REG(AR71XX_RST_RESET, reset);
 	ATH_READ_REG(AR71XX_RST_RESET);
-	DELAY(1000);
+	DELAY(100000);
 
 	reset &= ~(RST_RESET_PCI_CORE | RST_RESET_PCI_BUS);
 	ATH_WRITE_REG(AR71XX_RST_RESET, reset);
 	ATH_READ_REG(AR71XX_RST_RESET);
-	DELAY(1000);
+	DELAY(100000);
 
 	/* Init PCI windows */
 	ATH_WRITE_REG(AR71XX_PCI_WINDOW0, PCI_WINDOW0_ADDR);
@@ -313,7 +313,7 @@ ar71xx_pci_attach(device_t dev)
 	ATH_WRITE_REG(AR71XX_PCI_WINDOW5, PCI_WINDOW5_ADDR);
 	ATH_WRITE_REG(AR71XX_PCI_WINDOW6, PCI_WINDOW6_ADDR);
 	ATH_WRITE_REG(AR71XX_PCI_WINDOW7, PCI_WINDOW7_CONF_ADDR);
-	DELAY(1000);
+	DELAY(100000);
 
 	ar71xx_pci_check_bus_error();
 

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 22:15:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B667C1065692;
	Thu, 28 Jan 2010 22:15:29 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A4A988FC0A;
	Thu, 28 Jan 2010 22:15:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SMFTFa068548;
	Thu, 28 Jan 2010 22:15:29 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SMFTNE068546;
	Thu, 28 Jan 2010 22:15:29 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201001282215.o0SMFTNE068546@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Thu, 28 Jan 2010 22:15:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203133 - stable/8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 22:15:29 -0000

Author: jilles
Date: Thu Jan 28 22:15:29 2010
New Revision: 203133
URL: http://svn.freebsd.org/changeset/base/203133

Log:
  MFC r202324: In 'make delete-old', use 'exec' to redirect an fd persistently
  
  That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in
  head in r199953, the latter also persisted, provided that fd 3 was not open
  before.  With newer sh or fd 3 open, it would not delete orphaned catpages.

Modified:
  stable/8/Makefile.inc1   (contents, props changed)

Modified: stable/8/Makefile.inc1
==============================================================================
--- stable/8/Makefile.inc1	Thu Jan 28 21:55:56 2010	(r203132)
+++ stable/8/Makefile.inc1	Thu Jan 28 22:15:29 2010	(r203133)
@@ -1248,7 +1248,7 @@ delete-old-files:
 		fi; \
 	done
 # Remove catpages without corresponding manpages.
-	@3<&0; \
+	@exec 3<&0; \
 	find ${DESTDIR}/usr/share/man/cat* ! -type d | \
 	sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
 	while read catpage; do \

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 22:24:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB9B71065696;
	Thu, 28 Jan 2010 22:24:54 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 965A28FC1E;
	Thu, 28 Jan 2010 22:24:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SMOsC3070780;
	Thu, 28 Jan 2010 22:24:54 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SMOsU8070773;
	Thu, 28 Jan 2010 22:24:54 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001282224.o0SMOsU8070773@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 28 Jan 2010 22:24:54 +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: r203134 - in head: share/man/man4 sys/conf
	sys/contrib/dev/run sys/dev/usb sys/dev/usb/wlan sys/modules
	sys/modules/runfw sys/modules/usb sys/modules/usb/run
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 22:24:54 -0000

Author: thompsa
Date: Thu Jan 28 22:24:54 2010
New Revision: 203134
URL: http://svn.freebsd.org/changeset/base/203134

Log:
  Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices.
  
  This driver was written for OpenBSD by Damien Bergamini and ported over by
  Akinori Furukoshi.

Added:
  head/share/man/man4/run.4   (contents, props changed)
  head/sys/contrib/dev/run/
  head/sys/contrib/dev/run/LICENSE
  head/sys/contrib/dev/run/run-rt2870   (contents, props changed)
  head/sys/dev/usb/wlan/if_run.c   (contents, props changed)
  head/sys/dev/usb/wlan/if_runreg.h   (contents, props changed)
  head/sys/dev/usb/wlan/if_runvar.h   (contents, props changed)
  head/sys/modules/runfw/
  head/sys/modules/runfw/Makefile   (contents, props changed)
  head/sys/modules/usb/run/
  head/sys/modules/usb/run/Makefile   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/usb/usbdevs
  head/sys/modules/Makefile
  head/sys/modules/usb/Makefile

Added: head/share/man/man4/run.4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man4/run.4	Thu Jan 28 22:24:54 2010	(r203134)
@@ -0,0 +1,219 @@
+.\" $OpenBSD: run.4,v 1.22 2009/11/23 06:16:32 jmc Exp $
+.\"
+.\" Copyright (c) 2008 Damien Bergamini 
+.\"
+.\" Permission to use, copy, modify, and 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 29, 2010
+.Os
+.Dt RUN 4
+.Sh NAME
+.Nm run
+.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device run"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_run_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless adapters based on the Ralink RT2700U,
+RT2800U and RT3000U chipsets.
+.Pp
+The RT2700U chipset consists of two integrated chips, an RT2770 MAC/BBP and
+an RT2720 (1T2R) or RT2750 (dual-band 1T2R) radio transceiver.
+.Pp
+The RT2800U chipset consists of two integrated chips, an RT2870 MAC/BBP and
+an RT2820 (2T3R) or RT2850 (dual-band 2T3R) radio transceiver.
+.Pp
+The RT3000U is a single-chip solution based on an RT3070 MAC/BBP and
+an RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio
+transceiver.
+.Pp
+These are the modes the
+.Nm
+driver can operate in:
+.Bl -tag -width "IBSS-masterXX"
+.It BSS mode
+Also known as
+.Em infrastructure
+mode, this is used when associating with an access point, through
+which all traffic passes.
+This mode is the default.
+.It monitor mode
+In this mode the driver is able to receive packets without
+associating with an access point.
+This disables the internal receive filter and enables the card to
+capture packets from networks which it wouldn't normally have access to,
+or to scan for access points.
+.El
+.Pp
+The
+.Nm
+driver can be configured to use
+Wired Equivalent Privacy (WEP) or
+Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
+WPA is the de facto encryption standard for wireless networks.
+It is strongly recommended that WEP
+not be used as the sole mechanism
+to secure wireless communication,
+due to serious weaknesses in it.
+The
+.Nm
+driver offloads both encryption and decryption of data frames to the
+hardware for the WEP40, WEP104, TKIP(+MIC) and CCMP ciphers.
+.Pp
+The
+.Nm
+driver can be configured at runtime with
+.Xr ifconfig 8
+or on boot with
+.Xr hostname.if 5 .
+.Sh HARDWARE
+The following adapters should work:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It Airlink101 AWLL6090
+.It ASUS USB-N11
+.It ASUS USB-N13
+.It ASUS WL-160N
+.It Belkin F5D8051 ver 3000
+.It Belkin F5D8053
+.It Belkin F5D8055
+.It Belkin F6D4050 ver 1
+.It Buffalo WLI-UC-AG300N
+.It Buffalo WLI-UC-G300N
+.It Buffalo WLI-UC-GN
+.It Corega CG-WLUSB2GNL
+.It Corega CG-WLUSB2GNR
+.It Corega CG-WLUSB300AGN
+.It Corega CG-WLUSB300GNM
+.It D-Link DWA-130 rev B1
+.It D-Link DWA-140
+.It DrayTek Vigor N61
+.It Edimax EW-7711UAn
+.It Edimax EW-7711UTn
+.It Edimax EW-7717Un
+.It Edimax EW-7718Un
+.It Gigabyte GN-WB30N
+.It Gigabyte GN-WB31N
+.It Gigabyte GN-WB32L
+.It Hawking HWDN1
+.It Hawking HWUN1
+.It Hawking HWUN2
+.It Hercules HWNU-300
+.It Linksys WUSB54GC v3
+.It Linksys WUSB600N
+.It Mvix Nubbin MS-811N
+.It Planex GW-USMicroN
+.It Planex GW-US300MiniS
+.It Sitecom WL-182
+.It Sitecom WL-188
+.It Sitecom WL-301
+.It Sitecom WL-302
+.It Sitecom WL-315
+.It SMC SMCWUSBS-N2
+.It Sweex LW303
+.It Sweex LW313
+.It Unex DNUR-81
+.It Unex DNUR-82
+.It ZyXEL NWD210N
+.It ZyXEL NWD270N
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Pp
+.Bd -literal -offset indent
+ifconfig wlan create wlandev run0 inet 192.168.0.20 \e
+    netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev run0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev run0 ssid my_net \e
+	wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev run0 wlanmode adhoc ssid my_net \e
+    wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "run%d: error %d, could not read firmware %s"
+For some reason, the driver was unable to read the microcode file from the
+filesystem.
+The file might be missing or corrupted.
+.It "run%d: could not load 8051 microcode"
+An error occurred while attempting to upload the microcode to the onboard 8051
+microcontroller unit.
+.It "run%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr ifconfig 8 ,
+.Xr hostapd 8 ,
+.Xr wpa_supplicant 8 .
+.Pp
+Ralink Technology:
+.Pa http://www.ralinktech.com/
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.5 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien@openbsd.org .
+.Sh CAVEATS
+The
+.Nm
+driver does not support any of the 802.11n capabilities offered by the
+RT2800 and RT3000 chipsets.

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Jan 28 22:15:29 2010	(r203133)
+++ head/sys/conf/files	Thu Jan 28 22:24:54 2010	(r203134)
@@ -1692,6 +1692,7 @@ dev/usb/net/uhso.c		optional uhso
 # USB WLAN drivers
 #
 dev/usb/wlan/if_rum.c		optional rum
+dev/usb/wlan/if_run.c		optional run
 dev/usb/wlan/if_uath.c		optional uath
 dev/usb/wlan/if_upgt.c		optional upgt
 dev/usb/wlan/if_ural.c		optional ural

Added: head/sys/contrib/dev/run/LICENSE
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/run/LICENSE	Thu Jan 28 22:24:54 2010	(r203134)
@@ -0,0 +1,39 @@
+Copyright (c) 2007, Ralink Technology Corporation 
+All rights reserved.
+
+Redistribution.  Redistribution and use in binary form, without 
+modification, are permitted provided that the following conditions are 
+met:
+
+* Redistributions must reproduce the above copyright notice and the 
+  following disclaimer in the documentation and/or other materials 
+  provided with the distribution. 
+* Neither the name of Ralink Technology Corporation nor the names of its
+  suppliers may be used to endorse or promote products derived from this
+  software without specific prior written permission. 
+* No reverse engineering, decompilation, or disassembly of this software 
+  is permitted.
+
+Limited patent license. Ralink Technology Corporation grants a world-wide, 
+royalty-free, non-exclusive license under patents it now or hereafter 
+owns or controls to make, have made, use, import, offer to sell and 
+sell ("Utilize") this software, but solely to the extent that any 
+such patent is necessary to Utilize the software alone, or in 
+combination with an operating system licensed under an approved Open 
+Source license as listed by the Open Source Initiative at 
+http://opensource.org/licenses.  The patent license shall not apply to 
+any other combinations which include this software.  No hardware per 
+se is licensed hereunder.
+
+DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
+DAMAGE.

Added: head/sys/contrib/dev/run/run-rt2870
==============================================================================
Binary file. No diff available.

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Jan 28 22:15:29 2010	(r203133)
+++ head/sys/dev/usb/usbdevs	Thu Jan 28 22:24:54 2010	(r203134)
@@ -524,6 +524,7 @@ vendor ELCON		0x0db7	ELCON Systemtechnik
 vendor NETAC		0x0dd8	Netac
 vendor SITECOMEU	0x0df6	Sitecom Europe
 vendor MOBILEACTION	0x0df7	Mobile Action
+vendor AMIGO		0x0e0b	Amigo Technology
 vendor SPEEDDRAGON	0x0e55	Speed Dragon Multimedia
 vendor HAWKING		0x0e66	Hawking
 vendor FOSSIL		0x0e67	Fossil, Inc
@@ -589,12 +590,14 @@ vendor NETGEAR3		0x1385	Netgear
 vendor BALTECH		0x13ad	Baltech
 vendor CISCOLINKSYS	0x13b1	Cisco-Linksys
 vendor SHARK		0x13d2	Shark
+vendor AZUREWAVE	0x13d3	AsureWave
 vendor EMTEC		0x13fe	Emtec
 vendor NOVATEL		0x1410	Novatel Wireless
 vendor MERLIN		0x1416	Merlin
 vendor WISTRONNEWEB	0x1435	Wistron NeWeb
 vendor RADIOSHACK	0x1453	Radio Shack
 vendor HUAWEI3COM	0x1472	Huawei-3Com
+vendor ABOCOM2		0x1482	AboCom Systems
 vendor SILICOM		0x1485	Silicom
 vendor RALINK		0x148f	Ralink Technology
 vendor IMAGINATION	0x149a	Imagination Technologies
@@ -610,6 +613,7 @@ vendor OQO		0x1557	OQO
 vendor UMEDIA		0x157e	U-MEDIA Communications
 vendor FIBERLINE	0x1582	Fiberline
 vendor SPARKLAN		0x15a9	SparkLAN
+vendor AMIT2		0x15c5	AMIT
 vendor SOHOWARE		0x15e8	SOHOware
 vendor UMAX		0x1606	UMAX Data Systems
 vendor INSIDEOUT	0x1608	Inside Out Networks
@@ -617,6 +621,7 @@ vendor AMOI		0x1614	Amoi Electronics
 vendor GOODWAY		0x1631	Good Way Technology
 vendor ENTREGA		0x1645	Entrega
 vendor ACTIONTEC	0x1668	Actiontec Electronics
+vendor CISCOLINKSYS2	0x167b  Cisco-Linksys
 vendor ATHEROS		0x168c	Atheros Communications
 vendor GIGASET		0x1690	Gigaset
 vendor GLOBALSUN	0x16ab	Global Sun Technology
@@ -626,6 +631,8 @@ vendor CMOTECH		0x16d8	C-motech
 vendor AXESSTEL		0x1726  Axesstel Co., Ltd.
 vendor LINKSYS4		0x1737	Linksys
 vendor SENAO		0x1740	Senao
+vendor ASUS2		0x1761	ASUS
+vendor SWEEX2		0x177f	Sweex
 vendor METAGEEK		0x1781	MetaGeek
 vendor AMIT		0x18c5	AMIT
 vendor QCOM		0x18e8	Qcom
@@ -637,11 +644,15 @@ vendor TCTMOBILE	0x1bbb  TCT Mobile
 vendor TELIT		0x1bc7  Telit
 vendor MPMAN		0x1cae	MpMan
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
+vendor PEGATRON		0x1d4d	Pegatron
 vendor QISDA		0x1da5  Qisda
 vendor ALINK		0x1e0e  Alink
+vendor AIRTIES		0x1eda	AirTies
 vendor DLINK		0x2001	D-Link
 vendor PLANEX2		0x2019	Planex Communications
 vendor TLAYTECH		0x20b9	Tlay Tech
+vendor ENCORE		0x203d	Encore
+vendor PARA		0x20b8	PARA Industrial
 vendor ERICSSON		0x2282	Ericsson
 vendor MOTOROLA2	0x22b8	Motorola
 vendor TRIPPLITE	0x2478	Tripp-Lite
@@ -667,6 +678,7 @@ vendor ZINWELL		0x5a57	Zinwell
 vendor SITECOM		0x6189	Sitecom
 vendor ARKMICRO		0x6547	Arkmicro Technologies Inc.
 vendor 3COM2		0x6891	3Com
+vendor EDIMAX		0x7392	Edimax
 vendor INTEL		0x8086	Intel
 vendor INTEL2		0x8087	Intel
 vendor SITECOM2		0x9016	Sitecom
@@ -701,6 +713,12 @@ product 3COMUSR USR56K		0x3021	U.S. Robo
 /* AboCom products */
 product ABOCOM XX1		0x110c	XX1
 product ABOCOM XX2		0x200c	XX2
+product ABOCOM RT2770		0x2770	RT2770
+product ABOCOM RT2870		0x2870	RT2870
+product ABOCOM RT3070		0x3070	RT3070
+product ABOCOM RT3071		0x3071	RT3071
+product ABOCOM RT3072		0x3072	RT3072
+product ABOCOM2 RT2870_1	0x3c09	RT2870
 product ABOCOM URE450		0x4000	URE450 Ethernet Adapter
 product ABOCOM UFE1000		0x4002	UFE1000 Fast Ethernet Adapter
 product ABOCOM DSB650TX_PNA	0x4003	1/10/100 Ethernet Adapter
@@ -731,6 +749,17 @@ product ACCTON SMCWUSBTG2_NF	0x4507	SMCW
 product ACCTON SMCWUSBTG2	0x4508	SMCWUSBT-G2
 product ACCTON PRISM_GT		0x4521	PrismGT USB 2.0 WLAN
 product ACCTON SS1001		0x5046	SpeedStream Ethernet Adapter
+product ACCTON RT2870_2		0x6618	RT2870
+product ACCTON RT3070		0x7511	RT3070
+product ACCTON RT2770		0x7512	RT2770
+product ACCTON RT2870_3		0x7522	RT2870
+product ACCTON RT2870_5		0x8522	RT2870
+product ACCTON RT3070_4		0xa512	RT3070
+product ACCTON RT2870_4		0xa618	RT2870
+product	ACCTON RT3070_1		0xa701	RT3070
+product	ACCTON RT3070_2		0xa702	RT3070
+product ACCTON RT2870_1		0xb522	RT2870
+product	ACCTON RT3070_3		0xc522	RT3070
 product ACCTON ZD1211B		0xe501	ZD1211B
 
 /* Aceeca products */
@@ -833,6 +862,9 @@ product AIRPLUS MCD650		0x3198	MCD650 mo
 /* AirPrime products */
 product AIRPRIME PC5220		0x0112	CDMA Wireless PC Card
 
+/* AirTies products */
+product AIRTIES RT3070		0x2310	RT3070
+
 /* AKS products */
 product AKS USBHASP		0x0001	USB-HASP 0.06
 
@@ -872,8 +904,20 @@ product APC UPS			0x0002	Uninterruptible
 product AMBIT WLAN		0x0302	WLAN
 product AMBIT NTL_250		0x6098	NTL 250 cable modem
 
+/* American Power Conversion products */
+product APC UPS			0x0002	Uninterruptible Power Supply
+
+/* Amigo Technology products */
+product AMIGO RT2870_1		0x9031	RT2870
+product AMIGO RT2870_2		0x9041	RT2870
+
 /* AMIT products */
 product AMIT CGWLUSB2GO		0x0002	CG-WLUSB2GO
+product AMIT CGWLUSB2GNR	0x0008	CG-WLUSB2GNR
+product AMIT RT2870_1		0x0012	RT2870
+
+/* AMIT(2) products */
+product AMIT2 RT2870		0x0008	RT2870
 
 /* Anchor products */
 product ANCHOR EZUSB		0x2131	EZUSB
@@ -933,6 +977,7 @@ product ASIX AX88772		0x7720	AX88772
 product ASIX AX88772A		0x772a	AX88772A USB 2.0 10/100 Ethernet
 
 /* ASUS products */
+product ASUS2 USBN11		0x0b05	USB-N11
 product ASUS WL167G		0x1707	WL-167g Wireless Adapter
 product ASUS WL159G		0x170c	WL-159g
 product ASUS A9T_WIFI		0x171b	A9T wireless
@@ -940,6 +985,12 @@ product ASUS P5B_WIFI		0x171d	P5B wirele
 product ASUS RT2573_1		0x1723	RT2573
 product ASUS RT2573_2		0x1724	RT2573
 product ASUS LCM		0x1726	LCM display
+product ASUS RT2870_1		0x1731	RT2870
+product ASUS RT2870_2		0x1732	RT2870
+product ASUS RT2870_3		0x1742	RT2870
+product ASUS RT2870_4		0x1760	RT2870
+product ASUS RT2870_5		0x1761	RT2870
+product	ASUS RT3070		0x1784	RT3070
 product ASUS P535		0x420f	ASUS P535 PDA
 product	ASUS GMSC		0x422f	ASUS Generic Mass Storage
 product ASUS RT2570		0x1706	RT2500USB Wireless Adapter
@@ -976,6 +1027,13 @@ product AVISION 1200U		0x0268	1200U scan
 /* Axesstel products */
 product AXESSTEL DATAMODEM	0x1000  Data Modem
 
+/* AsureWave products */
+product AZUREWAVE RT2870_1	0x3247	RT2870
+product AZUREWAVE RT2870_2	0x3262	RT2870
+product AZUREWAVE RT3070_1	0x3273	RT3070
+product	AZUREWAVE RT3070_2	0x3284	RT3070
+product	AZUREWAVE RT3070_3	0x3305	RT3070
+
 /* Baltech products */
 product BALTECH CARDREADER	0x9999	Card reader
 
@@ -1006,8 +1064,13 @@ product BELKIN F5D7050A		0x705a	F5D7050A
 /* Also sold as 'Ativa 802.11g wireless card' */
 product BELKIN F5D7050_V4000	0x705c	F5D7050 v4000 Wireless Adapter
 product BELKIN F5D7050E		0x705e	F5D7050E Wireless Adapter
+product BELKIN RT2870_1		0x8053	RT2870
+product BELKIN RT2870_2		0x805c	RT2870
+product BELKIN F5D8053V3	0x815c	F5D8053 v3
+product BELKIN F5D8055		0x825a	F5D8055
 product BELKIN F5D9050V3	0x905b	F5D9050 ver 3 Wireless Adapter
 product BELKIN2 F5U002		0x0002	F5U002 Parallel printer
+product BELKIN F6D4050V1	0x935a	F6D4050 v1
 
 /* Billionton products */
 product BILLIONTON USB100	0x0986	USB100N 10/100 FastEthernet
@@ -1084,6 +1147,7 @@ product CISCOLINKSYS HU200TS	0x001a	HU20
 product CISCOLINKSYS WUSB54GC	0x0020	WUSB54GC
 product CISCOLINKSYS WUSB54GR	0x0023	WUSB54GR
 product CISCOLINKSYS WUSBF54G	0x0024	WUSBF54G
+product	CISCOLINKSYS2	RT3070	0x4001	RT3070
 
 /* CMOTECH products */
 product CMOTECH CNU510		0x5141	CDMA Technologies USB modem
@@ -1110,6 +1174,15 @@ product CONCEPTRONIC AR5523_2	0x7811	AR5
 product CONCEPTRONIC AR5523_2_NF	0x7812	AR5523 (no firmware)
 product CONCEPTRONIC2 C54RU	0x3c02	C54RU WLAN
 product CONCEPTRONIC2 C54RU2	0x3c22	C54RU
+product CONCEPTRONIC2 VIGORN61	0x3c25	VIGORN61
+product CONCEPTRONIC2 RT2870_1	0x3c06	RT2870
+product CONCEPTRONIC2 RT2870_2	0x3c07	RT2870
+product CONCEPTRONIC2 RT2870_7	0x3c09	RT2870
+product CONCEPTRONIC2 RT2870_8	0x3c12	RT2870
+product CONCEPTRONIC2 RT2870_3	0x3c23	RT2870
+product CONCEPTRONIC2 RT2870_4	0x3c25	RT2870
+product CONCEPTRONIC2 RT2870_5	0x3c27	RT2870
+product CONCEPTRONIC2 RT2870_6	0x3c28	RT2870
 
 /* Connectix products */
 product CONNECTIX QUICKCAM	0x0001	QuickCam
@@ -1124,6 +1197,12 @@ product COREGA FETHER_USB2_TX	0x0017	FEt
 product COREGA WLUSB_11_KEY	0x001a	ULUSB-11 Key
 product COREGA CGWLUSB2GL	0x002d	CG-WLUSB2GL
 product COREGA CGWLUSB2GPX	0x002e	CG-WLUSB2GPX
+product COREGA RT2870_1		0x002f	RT2870
+product COREGA RT2870_2		0x003c	RT2870
+product COREGA RT2870_3		0x003f	RT2870
+product COREGA RT3070		0x0041	RT3070
+product COREGA CGWLUSB300GNM	0x0042	CG-WLUSB300GNM
+
 product COREGA WLUSB_11_STICK	0x7613	WLAN USB Stick 11
 product COREGA FETHER_USB_TXC	0x9601	FEther USB-TXC
 
@@ -1152,6 +1231,7 @@ product CYBERPOWER 1500CAVRLCD	0x0501	15
 
 /* CyberTAN Technology products */
 product CYBERTAN TG54USB	0x1666	TG54USB
+product CYBERTAN RT2870		0x1828	RT2870
 
 /* Cypress Semiconductor products */
 product CYPRESS MOUSE		0x0001	mouse
@@ -1229,6 +1309,8 @@ product DLINK DWLAG122		0x3a04	DWL-AG122
 product DLINK DWLAG122_NF	0x3a05	DWL-AG122 (no firmware)
 product DLINK DWLG122		0x3c00	DWL-G122 b1 Wireless Adapter
 product DLINK DUBE100B1		0x3c05	DUB-E100 rev B1
+product DLINK RT2870		0x3c09	RT2870
+product DLINK RT3072		0x3c0a	RT3072
 product DLINK DSB650C		0x4000	10Mbps Ethernet
 product DLINK DSB650TX1		0x4001	10/100 Ethernet
 product DLINK DSB650TX		0x4002	10/100 Ethernet
@@ -1241,7 +1323,15 @@ product DLINK2 DWA120_NF	0x3a0d	DWA-120 
 product DLINK2 DWLG122C1	0x3c03	DWL-G122 c1
 product DLINK2 WUA1340		0x3c04	WUA-1340
 product DLINK2 DWA111		0x3c06	DWA-111
+product DLINK2 RT2870_1		0x3c09	RT2870
 product DLINK2 DWA110		0x3c07	DWA-110
+product DLINK2 RT3072		0x3c0a	RT3072
+product DLINK2 RT3070_1		0x3c0d	RT3070
+product DLINK2 RT3070_2		0x3c0e	RT3070
+product DLINK2 RT3070_3		0x3c0f	RT3070
+product DLINK2 RT2870_2		0x3c11	RT2870
+product DLINK2 DWA130		0x3c13	DWA-130
+product DLINK2 RT3070_4		0x3c15	RT3070
 product DLINK3 DWM652		0x3e04	DWM-652
 
 /* DMI products */
@@ -1257,6 +1347,12 @@ product DRESDENELEKTRONIK WIRELESSHANDHE
 /* Dynastream Innovations */
 product DYNASTREAM ANTDEVBOARD	0x1003	ANT dev board
 
+/* Edimax products */
+product EDIMAX EW7318USG	0x7318	USB Wireless dongle
+product EDIMAX RT2870_1		0x7711	RT2870
+product EDIMAX EW7717		0x7717	EW-7717
+product EDIMAX EW7718		0x7718	EW-7718
+
 /* Eicon Networks */
 product EICON DIVA852		0x4905	Diva 852 ISDN TA
 
@@ -1285,6 +1381,11 @@ product ELSA USB2ETHERNET	0x3000	Microli
 /* EMS products */
 product EMS DUAL_SHOOTER	0x0003	PSX gun controller converter
 
+/* Encore products */
+product ENCORE RT3070_1		0x1480	RT3070
+product ENCORE RT3070_2		0x14a1	RT3070
+product ENCORE RT3070_3		0x14a9	RT3070
+
 /* Entrega products */
 product ENTREGA 1S		0x0001	1S serial
 product ENTREGA 2S		0x0002	2S serial
@@ -1429,6 +1530,11 @@ product GIGASET SMCWUSBTG_NF	0x0711	SMCW
 product GIGASET AR5523		0x0712	AR5523
 product GIGASET AR5523_NF	0x0713	AR5523 (no firmware)
 product GIGASET RT2573		0x0722	RT2573
+product GIGASET RT3070_1	0x0740	RT3070
+product GIGASET RT3070_2	0x0744	RT3070
+product GIGABYTE RT2870_1	0x800b	RT2870
+product GIGABYTE GNWB31N	0x800c	GN-WB31N
+product GIGABYTE GNWB32L	0x800d	GN-WB32L
 
 /* Global Sun Technology product */
 product GLOBALSUN AR5523_1	0x7801	AR5523
@@ -1464,6 +1570,7 @@ product GUILLEMOT DALEADER	0xa300	DA Lea
 product GUILLEMOT HWGUSB254	0xe000	HWGUSB2-54 WLAN
 product GUILLEMOT HWGUSB254LB	0xe010	HWGUSB2-54-LB
 product GUILLEMOT HWGUSB254V2AP	0xe020	HWGUSB2-54V2-AP
+product GUILLEMOT HWNU300	0xe030	HWNU-300
 
 /* Hagiwara products */
 product HAGIWARA FGSM		0x0002	FlashGate SmartMedia Card Reader
@@ -1482,6 +1589,10 @@ product HANDSPRING TREO600	0x0300	Handsp
 product HAUPPAUGE WINTV_USB_FM	0x4d12	WinTV USB FM
 
 /* Hawking Technologies products */
+product HAWKING RT2870_1	0x0001	RT2870
+product HAWKING RT2870_2	0x0003	RT2870
+product HAWKING HWUN2		0x0009	HWUN2
+product HAWKING RT3070		0x000b	RT3070
 product HAWKING UF100		0x400c	10/100 USB Ethernet
 
 /* Hitachi, Ltd. products */
@@ -1528,6 +1639,7 @@ product HP 2215			0x1016	iPAQ 22xx/Jorna
 product HP 568J			0x1116	Jornada 568
 product HP 930C			0x1204	DeskJet 930c
 product HP P2000U		0x1801	Inkjet P-2000U
+product HP HS2300		0x1e1d  HS2300 HSDPA (aka MC8775)
 product HP 640C			0x2004	DeskJet 640c
 product HP 4670V		0x3005	ScanJet 4670v
 product HP P1100		0x3102	Photosmart P1100
@@ -1655,6 +1767,10 @@ product IODATA USBETTXS		0x0913	USB ETTX
 product IODATA USBWNB11A	0x0919	USB WN-B11
 product IODATA USBWNB11		0x0922	USB Airport WN-B11
 product IODATA ETGUS2		0x0930	ETG-US2
+product IODATA RT3072_1		0x0944	RT3072
+product IODATA RT3072_2		0x0945	RT3072
+product IODATA RT3072_3		0x0947	RT3072
+product IODATA RT3072_4		0x0948	RT3072
 product IODATA USBRSAQ		0x0a03	Serial USB-RSAQ1
 product IODATA2 USB2SC		0x0a09	USB2.0-SCSI Bridge USB2-SC
 
@@ -1779,7 +1895,11 @@ product LINKSYS2 WUSB11		0x2219	WUSB11 W
 product LINKSYS2 USB200M	0x2226	USB 2.0 10/100 Ethernet
 product LINKSYS3 WUSB11v28	0x2233	WUSB11 v2.8 Wireless Adapter
 product LINKSYS4 USB1000	0x0039	USB1000
+product LINKSYS4 WUSB100	0x0070	WUSB100
+product LINKSYS4 WUSB600N	0x0071	WUSB600N
 product LINKSYS4 WUSB54GCV2	0x0073	WUSB54GC v2
+product LINKSYS4 WUSB54GCV3	0x0077	WUSB54GC v3
+product LINKSYS4 WUSB600NV2	0x0079	WUSB600N v2
 
 /* Logitech products */
 product LOGITECH M2452		0x0203	M2452 keyboard
@@ -1809,6 +1929,9 @@ product LOGITECH QUICKCAMPRO2	0xd001	Qui
 /* Logitec Corp. products */
 product LOGITEC LDR_H443SU2	0x0033	DVD Multi-plus unit LDR-H443SU2
 product LOGITEC LDR_H443U2	0x00b3	DVD Multi-plus unit LDR-H443U2
+product LOGITEC RT2870_1	0x0162	RT2870
+product LOGITEC RT2870_2	0x0163	RT2870
+product LOGITEC RT2870_3	0x0164	RT2870
 
 /* Lucent products */
 product LUCENT EVALKIT		0x1001	USS-720 evaluation kit
@@ -1846,7 +1969,10 @@ product MELCO PCOPRS1		0x00b3	PC-OP-RS1 
 product MELCO SG54HP		0x00d8	WLI-U2-SG54HP
 product MELCO G54HP		0x00d9	WLI-U2-G54HP
 product MELCO KG54L		0x00da	WLI-U2-KG54L
+product MELCO WLIUCG300N	0x00e8	WLI-UC-G300N
 product MELCO SG54HG		0x00f4	WLI-U2-SG54HG
+product MELCO WLIUCAG300N	0x012e	WLI-UC-AG300N
+product MELCO WLIUCGN		0x015d	WLI-UC-GN
 
 /* Merlin products */
 product MERLIN V620             0x1110  Merlin V620
@@ -1864,15 +1990,25 @@ product MGE UPS2		0xffff	MGE UPS SYSTEMS
 
 /* Micro Star International products */
 product MSI BT_DONGLE		0x1967	Bluetooth USB dongle
+product MSI RT3070_1		0x3820	RT3070
+product MSI RT3070_2		0x3821	RT3070
+product MSI RT3070_3		0x3870	RT3070
 product MSI UB11B		0x6823	UB11B
 product MSI RT2570		0x6861	RT2570
 product MSI RT2570_2		0x6865	RT2570
 product MSI RT2570_3		0x6869	RT2570
 product MSI RT2573_1		0x6874	RT2573
 product MSI RT2573_2		0x6877	RT2573
+product MSI RT3070_4		0x6899	RT3070
+product MSI RT3070_5		0x821a	RT3070
+product MSI RT3070_6		0x870a	RT3070
+product MSI RT3070_7		0x899a	RT3070
 product MSI RT2573_3		0xa861	RT2573
 product MSI RT2573_4		0xa874	RT2573
 
+/* Microdia products */
+product MICRODIA TWINKLECAM	0x600d	TwinkleCam USB camera
+
 /* Microsoft products */
 product MICROSOFT SIDEPREC	0x0008	SideWinder Precision Pro
 product MICROSOFT INTELLIMOUSE	0x0009	IntelliMouse
@@ -2021,8 +2157,12 @@ product NIKON D300		0x041a  Digital Came
 product NOVATECH NV902		0x9020	NovaTech NV-902W
 product NOVATECH RT2573		0x9021	RT2573
 
+/* Nokia products */
+product NOKIA N958GB		0x0070	Nokia N95 8GBc
+
 /* Novatel Wireless products */
 product NOVATEL V640		0x1100	Merlin V620
+product NOVATEL CDMA_MODEM	0x1110	Novatel Wireless Merlin CDMA
 product NOVATEL V620		0x1110	Merlin V620
 product NOVATEL V740		0x1120	Merlin V740
 product NOVATEL V720		0x1130	Merlin V720
@@ -2034,6 +2174,7 @@ product NOVATEL X950D		0x1450	Merlin X95
 product NOVATEL ES620		0x2100	Expedite ES620
 product NOVATEL E725		0x2120	Expedite E725
 product NOVATEL ES620_2		0x2130	Expedite ES620
+product NOVATEL ES620		0x2100	ES620 CDMA
 product NOVATEL U720		0x2110	Merlin U720
 product NOVATEL EU730		0x2400	Expedite EU730
 product NOVATEL EU740		0x2410	Expedite EU740
@@ -2140,6 +2281,14 @@ product PANASONIC KXLCB20AN	0x0d0a	CD-R 
 product PANASONIC KXLCB35AN	0x0d0e	DVD-ROM & CD-R/RW
 product PANASONIC SDCAAE	0x1b00	MultiMediaCard
 
+/* PARA Industrial products */
+product PARA RT3070		0x8888	RT3070
+ 	 
+/* Pegatron products */
+product PEGATRON RT2870		0x0002	RT2870
+product PEGATRON RT3070		0x000c	RT3070
+product PEGATRON RT3070_2	0x000e	RT3070
+
 /* Peracom products */
 product PERACOM SERIAL1		0x0001	Serial
 product PERACOM ENET		0x0002	Ethernet
@@ -2157,6 +2306,7 @@ product PHILIPS SPE3030CC	0x083a	USB 2.0
 product PHILIPS SNU5600		0x1236	SNU5600
 product PHILIPS UM10016		0x1552	ISP 1581 Hi-Speed USB MPEG2 Encoder Reference Kit
 product PHILIPS DIVAUSB		0x1801	DIVA USB mp3 player
+product PHILIPS RT2870		0x200f	RT2870
 
 /* Philips Semiconductor products */
 product PHILIPSSEMI HUB1122	0x1122	HUB
@@ -2172,11 +2322,15 @@ product PLANEX GW_US11H		0x14ea	GW-US11H
 product PLANEX2 GW_US11S	0x3220	GW-US11S WLAN
 product PLANEX2 GW_US54GXS	0x5303	GW-US54GXS WLAN
 product PLANEX2 GWUS54HP	0xab01	GW-US54HP
+product PLANEX2 GWUS300MINIS	0xab24	GW-US300MiniS
+product PLANEX2	RT3070		0xab25	RT3070
 product PLANEX2 GWUS54MINI2	0xab50	GW-US54Mini2
 product PLANEX2 GWUS54SG	0xc002	GW-US54SG
 product PLANEX2 GWUS54GZL	0xc007	GW-US54GZL
 product PLANEX2 GWUS54GD	0xed01	GW-US54GD
 product PLANEX2 GWUSMM		0xed02	GW-USMM
+product PLANEX2 RT2870		0xed06	RT2870
+product PLANEX2 GWUSMICRON	0xed14	GW-USMicroN
 product PLANEX3 GWUS54GZ	0xab10	GW-US54GZ
 product PLANEX3 GU1000T		0xab11	GU-1000T
 product PLANEX3 GWUS54MINI	0xab13	GW-US54Mini
@@ -2234,6 +2388,7 @@ product PUTERCOM UPA100		0x047e	USB-1284
 product QCOM RT2573		0x6196	RT2573
 product QCOM RT2573_2		0x6229	RT2573
 product QCOM RT2573_3		0x6238	RT2573
+product QCOM RT2870		0x6259	RT2870
 
 /* Qisda products */
 product QISDA H21_1		0x4512	3G modem
@@ -2320,6 +2475,8 @@ product QUALCOMMINC E2002	0x2002	3G mode
 product QUALCOMMINC E2003	0x2003	3G modem
 
 /* Quanta products */
+/* Quanta products */
+product QUANTA RT3070		0x0304	RT3070
 product QUANTA Q101		0xea02	HSDPA modem
 product QUANTA Q111		0xea03	HSDPA modem
 product QUANTA GLX		0xea04	HSDPA modem
@@ -2340,9 +2497,16 @@ product RAINBOW IKEY2000	0x1200	i-Key 20
 
 /* Ralink Technology products */
 product RALINK RT2570		0x1706	RT2500USB Wireless Adapter
+product RALINK RT2070		0x2070	RT2070
 product RALINK RT2570_2		0x2570	RT2500USB Wireless Adapter
 product RALINK RT2573		0x2573	RT2501USB Wireless Adapter
 product RALINK RT2671		0x2671	RT2601USB Wireless Adapter
+product RALINK RT2770		0x2770	RT2770
+product RALINK RT2870		0x2870	RT2870
+product RALINK RT3070		0x3070	RT3070
+product RALINK RT3071		0x3071	RT3071
+product RALINK RT3072		0x3072	RT3072
+product RALINK RT3572		0x3572	RT3572
 product RALINK RT2570_3		0x9020	RT2500USB Wireless Adapter
 product RALINK RT2573_2		0x9021	RT2501USB Wireless Adapter
 
@@ -2383,6 +2547,7 @@ product SAGEM XG76NA		0x0062	XG-76NA
 product SAMSUNG ML6060		0x3008	ML-6060 laser printer
 product SAMSUNG YP_U2		0x5050	YP-U2 MP3 Player
 product SAMSUNG I500		0x6601	I500 Palm USB Phone 
+product SAMSUNG2 RT2870_1	0x2018	RT2870
 
 /* Samsung Techwin products */
 product SAMSUNG_TECHWIN DIGIMAX_410	0x000a	Digimax 410
@@ -2406,7 +2571,18 @@ product SCANLOGIC SL11R		0x0002	SL11R ID
 product SCANLOGIC 336CX		0x0300	Phantom 336CX - C3 scanner
 
 /* Senao products */
+product SENAO RT2870_3		0x0605	RT2870
+product SENAO RT2870_4		0x0615	RT2870
 product SENAO NUB8301		0x2000	NUB-8301
+product SENAO RT2870_1		0x9701	RT2870
+product SENAO RT2870_2		0x9702	RT2870
+product SENAO RT3070		0x9703	RT3070
+product SENAO RT3071		0x9705	RT3071
+product SENAO RT3072_1		0x9706	RT3072
+product SENAO RT3072_2		0x9707	RT3072
+product SENAO RT3072_3		0x9708	RT3072
+product SENAO RT3072_4		0x9709	RT3072
+product SENAO RT3072_5		0x9801	RT3072
 
 /* ShanTou products */
 product SHANTOU ST268		0x0268	ST268
@@ -2453,7 +2629,9 @@ product SIEMENS3 X75		0x0004	X75
 product SIERRA EM5625		0x0017	EM5625
 product SIERRA MC5720_2		0x0018	MC5720
 product SIERRA MC5725		0x0020	MC5725
+product SIERRA AIRCARD580	0x0112	Sierra Wireless AirCard 580
 product SIERRA AIRCARD595	0x0019	Sierra Wireless AirCard 595
+product SIERRA AC595U		0x0120	Sierra Wireless AirCard 595U
 product SIERRA AC597E		0x0021	Sierra Wireless AirCard 597E
 product SIERRA EM5725		0x0022	EM5725
 product SIERRA C597		0x0023	Sierra Wireless Compass 597
@@ -2553,8 +2731,24 @@ product SITECOM SERIAL		0x2068	USB to se
 product SITECOM2 WL022		0x182d	WL-022
 
 /* Sitecom Europe products */
+product SITECOMEU RT2870_1	0x0017	RT2870
 product SITECOMEU WL168V1	0x000d	WL-168 v1
 product SITECOMEU WL168V4	0x0028	WL-168 v4
+product SITECOMEU RT2870_2	0x002b	RT2870
+product SITECOMEU RT2870_3	0x002c	RT2870
+product SITECOMEU RT2870_4	0x002d	RT2870
+product SITECOMEU RT2770	0x0039	RT2770
+product SITECOMEU RT3070_2	0x003b	RT3070
+product SITECOMEU RT3070_3	0x003c	RT3070
+product SITECOMEU RT3070_4	0x003d	RT3070
+product SITECOMEU RT3070	0x003e	RT3070
+product SITECOMEU WL608		0x003f	WL-608
+product SITECOMEU RT3072_1	0x0041	RT3072
+product SITECOMEU RT3072_2	0x0042	RT3072
+product SITECOMEU RT3072_3	0x0047	RT3072
+product SITECOMEU RT3072_4	0x0048	RT3072
+product SITECOMEU RT3072_5	0x004a	RT3072
+product SITECOMEU RT3072_6	0x004d	RT3072
 product SITECOMEU LN028		0x061c	LN-028
 product SITECOMEU WL113		0x9071	WL-113
 product SITECOMEU ZD1211B	0x9075	ZD1211B
@@ -2612,7 +2806,9 @@ product SOURCENEXT KEIKAI8	0x039f	Keikai
 product SOURCENEXT KEIKAI8_CHG	0x012e	KeikaiDenwa 8 with charger
 
 /* SparkLAN products */
-product SPARKLAN RT2573		0x0004	 RT2573
+product SPARKLAN RT2573		0x0004	RT2573
+product SPARKLAN RT2870_1	0x0006	RT2870
+product SPARKLAN RT3070		0x0010	RT3070
 
 /* Sphairon Access Systems GmbH products */
 product SPHAIRON UB801R		0x0110	UB801R
@@ -2682,6 +2878,8 @@ product SURECOM RT2573		0x31f3	RT2573
 
 /* Sweex products */
 product SWEEX ZD1211		0x1809	ZD1211
+product SWEEX2 LW303		0x0302	LW303
+product SWEEX2 LW313		0x0313	LW313
 
 /* System TALKS, Inc. */
 product SYSTEMTALKS SGCX2UL	0x1920	SGC-X2UL
@@ -2775,6 +2973,7 @@ product UMEDIA TEW444UBEU_NF	0x3007	TEW-
 product UMEDIA TEW429UB_A	0x300a	TEW-429UB_A
 product UMEDIA TEW429UB		0x300b	TEW-429UB
 product UMEDIA TEW429UBC1	0x300d	TEW-429UB C1
+product UMEDIA RT2870_1		0x300e	RT2870
 product UMEDIA ALL0298V2	0x3204	ALL0298 v2
 product UMEDIA AR5523_2		0x3205	AR5523
 product UMEDIA AR5523_2_NF	0x3206	AR5523 (no firmware)
@@ -2883,9 +3082,16 @@ product ZCOM AR5523		0x0012	AR5523
 product ZCOM AR5523_NF		0x0013	AR5523 driver (no firmware)
 product ZCOM XM142		0x0015	XM-142
 product ZCOM ZD1211B		0x001a	ZD1211B
+product ZCOM RT2870_1		0x0022	RT2870
+product ZCOM RT2870_2		0x0025	RT2870
 
 /* Zinwell products */
 product ZINWELL RT2570		0x0260	RT2570
+product ZINWELL RT2870_1	0x0280	RT2870
+product ZINWELL RT2870_2	0x0282	RT2870
+product ZINWELL RT3072_1	0x0283	RT3072
+product ZINWELL RT3072_2	0x0284	RT3072
+product ZINWELL RT3070		0x5257	RT3070
 
 /* Zoom Telephonics, Inc. products */
 product ZOOM 2986L		0x9700	2986L Fax modem
@@ -2906,3 +3112,4 @@ product ZYXEL AG225H		0x3409	AG-225H
 product ZYXEL M202		0x340a	M-202
 product ZYXEL G220V2		0x340f	G-220 v2
 product ZYXEL G202		0x3410	G-202
+product ZYXEL RT2870_1		0x3416	RT2870

Added: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/usb/wlan/if_run.c	Thu Jan 28 22:24:54 2010	(r203134)
@@ -0,0 +1,4143 @@
+/*	$FreeBSD$	*/
+
+/*-
+ * Copyright (c) 2008,2009 Damien Bergamini 
+ *	ported to FreeBSD by Akinori Furukoshi 
+ *
+ * Permission to use, copy, modify, and 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/* release date Jan. 09, 2010 */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+/*-
+ * Ralink Technology RT2700U/RT2800U/RT3000U chipset driver.
+ * http://www.ralinktech.com/
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include "usbdevs.h"
+
+#define USB_DEBUG_VAR run_debug
+#include 
+
+#include "if_runreg.h"		/* shared with ral(4) */
+#include "if_runvar.h"
+
+#define nitems(_a)      (sizeof((_a)) / sizeof((_a)[0]))
+
+#if	USB_DEBUG
+#define RUN_DEBUG
+#endif
+
+#ifdef	RUN_DEBUG
+int run_debug = 0;
+SYSCTL_NODE(_hw_usb, OID_AUTO, run, CTLFLAG_RW, 0, "USB run");
+SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, CTLFLAG_RW, &run_debug, 0,
+    "run debug level");
+#endif
+
+#define IEEE80211_HAS_ADDR4(wh) \
+	(((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
+
+static const struct usb_device_id run_devs[] = {
+    { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT2770) },
+    { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT2870) },
+    { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT3070) },
+    { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT3071) },
+    { USB_VP(USB_VENDOR_ABOCOM,		USB_PRODUCT_ABOCOM_RT3072) },
+    { USB_VP(USB_VENDOR_ABOCOM2,	USB_PRODUCT_ABOCOM2_RT2870_1) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT2770) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT2870_1) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT2870_2) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT2870_3) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT2870_4) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT2870_5) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT3070_1) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT3070_2) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT3070_3) },
+    { USB_VP(USB_VENDOR_ACCTON,		USB_PRODUCT_ACCTON_RT3070_4) },
+    { USB_VP(USB_VENDOR_AIRTIES,	USB_PRODUCT_AIRTIES_RT3070) },
+    { USB_VP(USB_VENDOR_AMIGO,		USB_PRODUCT_AMIGO_RT2870_1) },
+    { USB_VP(USB_VENDOR_AMIGO,		USB_PRODUCT_AMIGO_RT2870_2) },
+    { USB_VP(USB_VENDOR_AMIT,		USB_PRODUCT_AMIT_CGWLUSB2GNR) },
+    { USB_VP(USB_VENDOR_AMIT,		USB_PRODUCT_AMIT_RT2870_1) },
+    { USB_VP(USB_VENDOR_AMIT2,		USB_PRODUCT_AMIT2_RT2870) },
+    { USB_VP(USB_VENDOR_ASUS,		USB_PRODUCT_ASUS_RT2870_1) },
+    { USB_VP(USB_VENDOR_ASUS,		USB_PRODUCT_ASUS_RT2870_2) },
+    { USB_VP(USB_VENDOR_ASUS,		USB_PRODUCT_ASUS_RT2870_3) },
+    { USB_VP(USB_VENDOR_ASUS,		USB_PRODUCT_ASUS_RT2870_4) },
+    { USB_VP(USB_VENDOR_ASUS,		USB_PRODUCT_ASUS_RT2870_5) },
+    { USB_VP(USB_VENDOR_ASUS2,		USB_PRODUCT_ASUS2_USBN11) },
+    { USB_VP(USB_VENDOR_AZUREWAVE,	USB_PRODUCT_AZUREWAVE_RT2870_1) },
+    { USB_VP(USB_VENDOR_AZUREWAVE,	USB_PRODUCT_AZUREWAVE_RT2870_2) },
+    { USB_VP(USB_VENDOR_AZUREWAVE,	USB_PRODUCT_AZUREWAVE_RT3070_1) },

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 22:28:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71DFA1065672;
	Thu, 28 Jan 2010 22:28:02 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 479318FC14;
	Thu, 28 Jan 2010 22:28:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SMS2kf071471;
	Thu, 28 Jan 2010 22:28:02 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SMS2R7071469;
	Thu, 28 Jan 2010 22:28:02 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001282228.o0SMS2R7071469@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 28 Jan 2010 22:28:02 +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: r203135 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 22:28:02 -0000

Author: thompsa
Date: Thu Jan 28 22:28:01 2010
New Revision: 203135
URL: http://svn.freebsd.org/changeset/base/203135

Log:
  Hook run(4) to the build.

Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Thu Jan 28 22:24:54 2010	(r203134)
+++ head/share/man/man4/Makefile	Thu Jan 28 22:28:01 2010	(r203135)
@@ -328,6 +328,7 @@ MAN=	aac.4 \
 	rp.4 \
 	rue.4 \
 	rum.4 \
+	run.4 \
 	sa.4 \
 	safe.4 \
 	sbp.4 \

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 22:28:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD02F1065694;
	Thu, 28 Jan 2010 22:28:59 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9C4F38FC20;
	Thu, 28 Jan 2010 22:28:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SMSxrP071733;
	Thu, 28 Jan 2010 22:28:59 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SMSxQC071731;
	Thu, 28 Jan 2010 22:28:59 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001282228.o0SMSxQC071731@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 28 Jan 2010 22:28:59 +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: r203136 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 22:28:59 -0000

Author: thompsa
Date: Thu Jan 28 22:28:59 2010
New Revision: 203136
URL: http://svn.freebsd.org/changeset/base/203136

Log:
  Add run(4) to NOTES.

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Thu Jan 28 22:28:01 2010	(r203135)
+++ head/sys/conf/NOTES	Thu Jan 28 22:28:59 2010	(r203136)
@@ -2668,6 +2668,8 @@ device		uhso
 #
 # Ralink Technology RT2501USB/RT2601USB wireless driver
 device		rum
+# Ralink Technology RT2700U/RT2800U/RT3000U wireless driver
+device		run
 #
 # Atheros AR5523 wireless driver
 device		uath

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 22:46:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11DAE106566C;
	Thu, 28 Jan 2010 22:46:05 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 004588FC1D;
	Thu, 28 Jan 2010 22:46:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SMk4eY075505;
	Thu, 28 Jan 2010 22:46:04 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SMk4oZ075502;
	Thu, 28 Jan 2010 22:46:04 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001282246.o0SMk4oZ075502@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 28 Jan 2010 22:46: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: r203137 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 22:46:05 -0000

Author: thompsa
Date: Thu Jan 28 22:46:04 2010
New Revision: 203137
URL: http://svn.freebsd.org/changeset/base/203137

Log:
  Release the firmware after loading to the device.

Modified:
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_runvar.h

Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c	Thu Jan 28 22:28:59 2010	(r203136)
+++ head/sys/dev/usb/wlan/if_run.c	Thu Jan 28 22:46:04 2010	(r203137)
@@ -803,22 +803,25 @@ int
 run_load_microcode(struct run_softc *sc)
 {
 	usb_device_request_t req;
+	const struct firmware *fw;
 	const u_char *base;
 	uint32_t tmp;
 	int ntries, error;
 	const uint64_t *temp;
 	uint64_t bytes;
 
-	if((sc->fwp = firmware_get("runfw")) == NULL){
+	fw = firmware_get("runfw");
+	if(fw == NULL){
 		printf("%s: failed loadfirmware of file %s (error %d)\n",
 		    device_get_nameunit(sc->sc_dev), "runfw", ENOENT);
 		return ENOENT;
 	}
 
-	if (sc->fwp->datasize != 8192) {
+	if (fw->datasize != 8192) {
 		printf("%s: invalid firmware size (should be 8KB)\n",
 		    device_get_nameunit(sc->sc_dev));
-		return EINVAL;
+		error = EINVAL;
+		goto fail;
 	}
 
 	/*
@@ -827,7 +830,7 @@ run_load_microcode(struct run_softc *sc)
 	 * first half (4KB) is for rt2870,
 	 * last half is for rt3071.
 	 */
-	base = sc->fwp->data;
+	base = fw->data;
 	if ((sc->mac_rev >> 16) != 0x2860 &&
 	    (sc->mac_rev >> 16) != 0x2872 &&
 	    (sc->mac_rev >> 16) != 0x3070 &&
@@ -840,10 +843,14 @@ run_load_microcode(struct run_softc *sc)
 		    device_get_nameunit(sc->sc_dev));
 
 	/* cheap sanity check */
-	temp = sc->fwp->data;
+	temp = fw->data;
 	bytes = *temp;
-	if(bytes != be64toh(0xffffff0210280210))
-		return EINVAL;
+	if(bytes != be64toh(0xffffff0210280210)) {
+		printf("%s: firmware checksum failed\n",
+		    device_get_nameunit(sc->sc_dev));
+		error = EINVAL;
+		goto fail;
+	}
 
 	run_read(sc, RT2860_ASIC_VER_ID, &tmp);
 	/* write microcode image */
@@ -856,19 +863,23 @@ run_load_microcode(struct run_softc *sc)
 	USETW(req.wValue, 8);
 	USETW(req.wIndex, 0);
 	USETW(req.wLength, 0);
-	if ((error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)) != 0)
-		return error;
+	if ((error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)) != 0) {
+		printf("%s: firmware reset failed\n",
+		    device_get_nameunit(sc->sc_dev));
+		goto fail;
+	}
 
 	run_delay(sc, 10);
 
 	run_write(sc, RT2860_H2M_MAILBOX, 0);
 	if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_BOOT, 0)) != 0)
-		return error;
+		goto fail;
 
 	/* wait until microcontroller is ready */
 	for (ntries = 0; ntries < 1000; ntries++) {
-		if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0)
-			return error;
+		if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) {
+			goto fail;
+		}
 		if (tmp & RT2860_MCU_READY)
 			break;
 		run_delay(sc, 10);
@@ -876,11 +887,14 @@ run_load_microcode(struct run_softc *sc)
 	if (ntries == 1000) {
 		printf("%s: timeout waiting for MCU to initialize\n",
 		    device_get_nameunit(sc->sc_dev));
-		return ETIMEDOUT;
+		error = ETIMEDOUT;
+		goto fail;
 	}
 	DPRINTF("microcode successfully loaded after %d tries\n", ntries);
 
-	return 0;
+fail:
+	firmware_put(fw, FIRMWARE_UNLOAD);
+	return (error);
 }
 
 int

Modified: head/sys/dev/usb/wlan/if_runvar.h
==============================================================================
--- head/sys/dev/usb/wlan/if_runvar.h	Thu Jan 28 22:28:59 2010	(r203136)
+++ head/sys/dev/usb/wlan/if_runvar.h	Thu Jan 28 22:46:04 2010	(r203137)
@@ -154,8 +154,6 @@ struct run_softc {
 	int				(*sc_srom_read)(struct run_softc *,
 					    uint16_t, uint16_t *);
 
-	const struct firmware		*fwp;
-
 	uint32_t			mac_rev;
 	uint8_t				rf_rev;
 	uint8_t				freq;

From owner-svn-src-all@FreeBSD.ORG  Thu Jan 28 22:54:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8EA71106568F;
	Thu, 28 Jan 2010 22:54:01 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7D4F98FC1F;
	Thu, 28 Jan 2010 22:54:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0SMs1oY077253;
	Thu, 28 Jan 2010 22:54:01 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0SMs1MK077251;
	Thu, 28 Jan 2010 22:54:01 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001282254.o0SMs1MK077251@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 28 Jan 2010 22:54: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: r203138 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 28 Jan 2010 22:54:01 -0000

Author: thompsa
Date: Thu Jan 28 22:54:01 2010
New Revision: 203138
URL: http://svn.freebsd.org/changeset/base/203138

Log:
  Use device_printf rather than printf + device_get_nameunit.

Modified:
  head/sys/dev/usb/wlan/if_run.c

Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c	Thu Jan 28 22:46:04 2010	(r203137)
+++ head/sys/dev/usb/wlan/if_run.c	Thu Jan 28 22:54:01 2010	(r203138)
@@ -535,8 +535,8 @@ run_attach(device_t self)
 		run_delay(sc, 10);
 	}
 	if (ntries == 100) {
-		printf("%s: timeout waiting for NIC to initialize\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev,
+		    "timeout waiting for NIC to initialize\n");
 		RUN_UNLOCK(sc);
 		goto detach;
 	}
@@ -544,14 +544,13 @@ run_attach(device_t self)
 	/* retrieve RF rev. no and various other things from EEPROM */
 	run_read_eeprom(sc);
 
-	printf("%s: MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), "
-	    "address %s\n", device_get_nameunit(sc->sc_dev), sc->mac_rev >> 16,
-	    sc->mac_rev & 0xffff, run_get_rf(sc->rf_rev), sc->ntxchains,
-	    sc->nrxchains, ether_sprintf(sc->sc_bssid));
+	device_printf(sc->sc_dev,
+	    "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n",
+	    sc->mac_rev >> 16, sc->mac_rev & 0xffff, run_get_rf(sc->rf_rev),
+	    sc->ntxchains, sc->nrxchains, ether_sprintf(sc->sc_bssid));
 
 	if ((error = run_load_microcode(sc)) != 0) {
-		printf("%s: could not load 8051 microcode\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "could not load 8051 microcode\n");
 		RUN_UNLOCK(sc);
 		goto detach;
 	}
@@ -560,8 +559,7 @@ run_attach(device_t self)
 
 	ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211);
 	if(ifp == NULL){
-		printf("%s: can not if_alloc()\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "can not if_alloc()\n");
 		goto detach;
 	}
 	ic = ifp->if_l2com;
@@ -812,14 +810,14 @@ run_load_microcode(struct run_softc *sc)
 
 	fw = firmware_get("runfw");
 	if(fw == NULL){
-		printf("%s: failed loadfirmware of file %s (error %d)\n",
-		    device_get_nameunit(sc->sc_dev), "runfw", ENOENT);
+		device_printf(sc->sc_dev,
+		    "failed loadfirmware of file %s\n", "runfw");
 		return ENOENT;
 	}
 
 	if (fw->datasize != 8192) {
-		printf("%s: invalid firmware size (should be 8KB)\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev,
+		    "invalid firmware size (should be 8KB)\n");
 		error = EINVAL;
 		goto fail;
 	}
@@ -836,18 +834,15 @@ run_load_microcode(struct run_softc *sc)
 	    (sc->mac_rev >> 16) != 0x3070 &&
 	    (sc->mac_rev >> 16) != 0x3572){
 		base += 4096;
-		printf("%s: You are using firmware RT3071.\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "loading RT3071 firmware\n");
 	} else
-		printf("%s: You are using firmware RT2870.\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "loading RT2870 firmware\n");
 
 	/* cheap sanity check */
 	temp = fw->data;
 	bytes = *temp;
 	if(bytes != be64toh(0xffffff0210280210)) {
-		printf("%s: firmware checksum failed\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "firmware checksum failed\n");
 		error = EINVAL;
 		goto fail;
 	}
@@ -864,8 +859,7 @@ run_load_microcode(struct run_softc *sc)
 	USETW(req.wIndex, 0);
 	USETW(req.wLength, 0);
 	if ((error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)) != 0) {
-		printf("%s: firmware reset failed\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "firmware reset failed\n");
 		goto fail;
 	}
 
@@ -885,8 +879,8 @@ run_load_microcode(struct run_softc *sc)
 		run_delay(sc, 10);
 	}
 	if (ntries == 1000) {
-		printf("%s: timeout waiting for MCU to initialize\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev,
+		    "timeout waiting for MCU to initialize\n");
 		error = ETIMEDOUT;
 		goto fail;
 	}
@@ -3892,8 +3886,7 @@ run_init_locked(struct run_softc *sc)
 		run_delay(sc, 10);
 	}
 	if (ntries == 100) {
-		printf("%s: timeout waiting for DMA engine\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "timeout waiting for DMA engine\n");
 		goto fail;
 	}
 	tmp &= 0xff0;
@@ -3909,8 +3902,7 @@ run_init_locked(struct run_softc *sc)
 	run_write(sc, RT2860_USB_DMA_CFG, 0);
 
 	if (run_reset(sc) != 0) {
-		printf("%s: could not reset chipset\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "could not reset chipset\n");
 		goto fail;
 	}
 
@@ -3954,8 +3946,7 @@ run_init_locked(struct run_softc *sc)
 	run_delay(sc, 10);
 
 	if (run_bbp_init(sc) != 0) {
-		printf("%s: could not initialize BBP\n",
-		    device_get_nameunit(sc->sc_dev));
+		device_printf(sc->sc_dev, "could not initialize BBP\n");
 		goto fail;
 	}
 

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 01:27:55 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4FA5A1065670;
	Fri, 29 Jan 2010 01:27:55 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E6CF8FC1C;
	Fri, 29 Jan 2010 01:27:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T1Rs2w011273;
	Fri, 29 Jan 2010 01:27:54 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T1RsRE011271;
	Fri, 29 Jan 2010 01:27:54 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290127.o0T1RsRE011271@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 01:27:54 +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: r203139 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 01:27:55 -0000

Author: thompsa
Date: Fri Jan 29 01:27:54 2010
New Revision: 203139
URL: http://svn.freebsd.org/changeset/base/203139

Log:
  Add device ID.
  
  PR:		usb/142427

Modified:
  head/sys/dev/usb/wlan/if_rum.c

Modified: head/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rum.c	Thu Jan 28 22:54:01 2010	(r203138)
+++ head/sys/dev/usb/wlan/if_rum.c	Fri Jan 29 01:27:54 2010	(r203139)
@@ -104,6 +104,7 @@ static const struct usb_device_id rum_de
     RUM_DEV(COREGA, CGWLUSB2GPX),
     RUM_DEV(DICKSMITH, CWD854F),
     RUM_DEV(DICKSMITH, RT2573),
+    RUM_DEV(EDIMAX, EW7318USG),
     RUM_DEV(DLINK2, DWLG122C1),
     RUM_DEV(DLINK2, WUA1340),
     RUM_DEV(DLINK2, DWA111),

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 01:30:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB2DB1065670;
	Fri, 29 Jan 2010 01:30:13 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BA1B18FC0C;
	Fri, 29 Jan 2010 01:30:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T1UDBZ011798;
	Fri, 29 Jan 2010 01:30:13 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T1UDV4011796;
	Fri, 29 Jan 2010 01:30:13 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290130.o0T1UDV4011796@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 01:30:13 +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: r203140 - head/sys/dev/usb/controller
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 01:30:13 -0000

Author: thompsa
Date: Fri Jan 29 01:30:13 2010
New Revision: 203140
URL: http://svn.freebsd.org/changeset/base/203140

Log:
  Optimise EHCI ISOC HS done check.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/controller/ehci.c

Modified: head/sys/dev/usb/controller/ehci.c
==============================================================================
--- head/sys/dev/usb/controller/ehci.c	Fri Jan 29 01:27:54 2010	(r203139)
+++ head/sys/dev/usb/controller/ehci.c	Fri Jan 29 01:30:13 2010	(r203140)
@@ -1340,25 +1340,22 @@ ehci_check_transfer(struct usb_xfer *xfe
 		}
 	} else if (methods == &ehci_device_isoc_hs_methods) {
 		ehci_itd_t *td;
+		uint8_t n = (xfer->nframes & 7);
 
 		/* isochronous high speed transfer */
 
+		/* check last transfer */
 		td = xfer->td_transfer_last;
 		usb_pc_cpu_invalidate(td->page_cache);
-		status =
-		    td->itd_status[0] | td->itd_status[1] |
-		    td->itd_status[2] | td->itd_status[3] |
-		    td->itd_status[4] | td->itd_status[5] |
-		    td->itd_status[6] | td->itd_status[7];
+		if (n == 0)
+			status = td->itd_status[7];
+		else
+			status = td->itd_status[n-1];
 
 		/* also check first transfer */
 		td = xfer->td_transfer_first;
 		usb_pc_cpu_invalidate(td->page_cache);
-		status |=
-		    td->itd_status[0] | td->itd_status[1] |
-		    td->itd_status[2] | td->itd_status[3] |
-		    td->itd_status[4] | td->itd_status[5] |
-		    td->itd_status[6] | td->itd_status[7];
+		status |= td->itd_status[0];
 
 		/* if no transactions are active we continue */
 		if (!(status & htohc32(sc, EHCI_ITD_ACTIVE))) {

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:31:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 693FB106566B;
	Fri, 29 Jan 2010 02:31:34 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DFA3E8FC15;
	Fri, 29 Jan 2010 02:31:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2VXWM025229;
	Fri, 29 Jan 2010 02:31:33 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2VXaD025226;
	Fri, 29 Jan 2010 02:31:33 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290231.o0T2VXaD025226@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:31: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: r203141 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:31:34 -0000

Author: thompsa
Date: Fri Jan 29 02:31:33 2010
New Revision: 203141
URL: http://svn.freebsd.org/changeset/base/203141

Log:
  Attempt to recover on a TX error rather than stopping all transfers.
  
  Submitted by:	Hans Petter Selesky

Modified:
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_zyd.c

Modified: head/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rum.c	Fri Jan 29 01:30:13 2010	(r203140)
+++ head/sys/dev/usb/wlan/if_rum.c	Fri Jan 29 02:31:33 2010	(r203141)
@@ -845,13 +845,18 @@ tr_setup:
 			usbd_xfer_set_priv(xfer, NULL);
 		}
 
-		if (error == USB_ERR_STALLED) {
-			/* try to clear stall first */
+		if (error != USB_ERR_CANCELLED) {
+			if (error == USB_ERR_TIMEOUT)
+				device_printf(sc->sc_dev, "device timeout\n");
+
+			/*
+			 * Try to clear stall first, also if other
+			 * errors occur, hence clearing stall
+			 * introduces a 50 ms delay:
+			 */
 			usbd_xfer_set_stall(xfer);
 			goto tr_setup;
 		}
-		if (error == USB_ERR_TIMEOUT)
-			device_printf(sc->sc_dev, "device timeout\n");
 		break;
 	}
 }

Modified: head/sys/dev/usb/wlan/if_zyd.c
==============================================================================
--- head/sys/dev/usb/wlan/if_zyd.c	Fri Jan 29 01:30:13 2010	(r203140)
+++ head/sys/dev/usb/wlan/if_zyd.c	Fri Jan 29 02:31:33 2010	(r203141)
@@ -2449,13 +2449,18 @@ tr_setup:
 		if (data != NULL)
 			zyd_tx_free(data, error);
 
-		if (error == USB_ERR_STALLED) {
-			/* try to clear stall first */
+		if (error != USB_ERR_CANCELLED) {
+			if (error == USB_ERR_TIMEOUT)
+				device_printf(sc->sc_dev, "device timeout\n");
+
+			/*
+			 * Try to clear stall first, also if other
+			 * errors occur, hence clearing stall
+			 * introduces a 50 ms delay:
+			 */
 			usbd_xfer_set_stall(xfer);
 			goto tr_setup;
 		}
-		if (error == USB_ERR_TIMEOUT)
-			device_printf(sc->sc_dev, "device timeout\n");
 		break;
 	}
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:32:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C62B0106568D;
	Fri, 29 Jan 2010 02:32:18 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B56D88FC14;
	Fri, 29 Jan 2010 02:32:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2WIo4025433;
	Fri, 29 Jan 2010 02:32:18 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2WIjj025431;
	Fri, 29 Jan 2010 02:32:18 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290232.o0T2WIjj025431@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:32: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: r203142 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:32:18 -0000

Author: thompsa
Date: Fri Jan 29 02:32:18 2010
New Revision: 203142
URL: http://svn.freebsd.org/changeset/base/203142

Log:
  Sync usb products to perforce.

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Fri Jan 29 02:31:33 2010	(r203141)
+++ head/sys/dev/usb/usbdevs	Fri Jan 29 02:32:18 2010	(r203142)
@@ -1117,6 +1117,7 @@ product CCYU ED1064		0x2136	EasyDisk ED1
 
 /* Century products */
 product CENTURY EX35QUAT	0x011e	Century USB Disk Enclosure
+product CENTURY EX35SW4_SB4	0x011f	Century USB Disk Enclosure
 
 /* Cherry products */
 product CHERRY MY3000KBD	0x0001	My3000 keyboard
@@ -1336,6 +1337,7 @@ product DLINK3 DWM652		0x3e04	DWM-652
 
 /* DMI products */
 product DMI CFSM_RW		0xa109	CF/SM Reader/Writer
+product DMI DISK		0x2bcf	Generic Disk
 
 /* DrayTek products */
 product DRAYTEK VIGOR550	0x0550	Vigor550
@@ -2147,6 +2149,7 @@ product NETGEAR3 WG111T		0x4250	WG111T
 product NETGEAR3 WG111T_NF	0x4251	WG111T (no firmware)
 product NETGEAR3 WPN111		0x5f00	WPN111
 product NETGEAR3 WPN111_NF	0x5f01	WPN111 (no firmware)
+product NETGEAR3 WPN111_2	0x5f02	WPN111
 
 /* Nikon products */
 product NIKON E990		0x0102	Digital Camera E990

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:32:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A05131065693;
	Fri, 29 Jan 2010 02:32:46 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8F4B28FC16;
	Fri, 29 Jan 2010 02:32:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2WkPP025564;
	Fri, 29 Jan 2010 02:32:46 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2WkV3025562;
	Fri, 29 Jan 2010 02:32:46 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290232.o0T2WkV3025562@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:32:46 +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: r203143 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:32:46 -0000

Author: thompsa
Date: Fri Jan 29 02:32:46 2010
New Revision: 203143
URL: http://svn.freebsd.org/changeset/base/203143

Log:
  Add the Netgear WPN111

Modified:
  head/sys/dev/usb/wlan/if_uath.c

Modified: head/sys/dev/usb/wlan/if_uath.c
==============================================================================
--- head/sys/dev/usb/wlan/if_uath.c	Fri Jan 29 02:32:18 2010	(r203142)
+++ head/sys/dev/usb/wlan/if_uath.c	Fri Jan 29 02:32:46 2010	(r203143)
@@ -188,6 +188,7 @@ static const struct usb_device_id uath_d
 	UATH_DEV(NETGEAR,		WG111U),
 	UATH_DEV(NETGEAR3,		WG111T),
 	UATH_DEV(NETGEAR3,		WPN111),
+	UATH_DEV(NETGEAR3,		WPN111_2),
 	UATH_DEV(UMEDIA,		TEW444UBEU),
 	UATH_DEV(UMEDIA,		AR5523_2),
 	UATH_DEV(WISTRONNEWEB,		AR5523_1),

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:33:51 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1F7DA106566B;
	Fri, 29 Jan 2010 02:33:51 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0E3A58FC1D;
	Fri, 29 Jan 2010 02:33:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2Xo4w025844;
	Fri, 29 Jan 2010 02:33:50 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2XoaD025842;
	Fri, 29 Jan 2010 02:33:50 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290233.o0T2XoaD025842@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:33:50 +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: r203144 - head/sys/dev/usb/quirk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:33:51 -0000

Author: thompsa
Date: Fri Jan 29 02:33:50 2010
New Revision: 203144
URL: http://svn.freebsd.org/changeset/base/203144

Log:
  Add null check on quirk lookup and add a couple of umass quirks.
  
  Submitted by:	Hans Petter Selesky

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- head/sys/dev/usb/quirk/usb_quirk.c	Fri Jan 29 02:32:46 2010	(r203143)
+++ head/sys/dev/usb/quirk/usb_quirk.c	Fri Jan 29 02:33:50 2010	(r203144)
@@ -169,12 +169,14 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK(CENTURY, EX35QUAT, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
 	    UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+	USB_QUIRK(CENTURY, EX35SW4_SB4, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(CYPRESS, XX6830XX, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
 	    UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(DESKNOTE, UCR_61S2B, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI),
 	USB_QUIRK(DMI, CFSM_RW, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI,
 	    UQ_MSC_NO_GETMAXLUN),
+	USB_QUIRK(DMI, DISK, 0x000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(EPSON, STYLUS_875DC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
 	USB_QUIRK(EPSON, STYLUS_895, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
@@ -259,8 +261,6 @@ static struct usb_quirk_entry usb_quirks
 	    UQ_MSC_FORCE_PROTO_SCSI),
 	USB_QUIRK(MITSUMI, CDRRW, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI |
 	    UQ_MSC_FORCE_PROTO_ATAPI),
-	USB_QUIRK(MITSUMI, FDD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
-	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
 	USB_QUIRK(MOTOROLA2, E398, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
 	    UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_GETMAXLUN),
@@ -680,6 +680,10 @@ usb_quirk_ioctl(unsigned long cmd, caddr
 		mtx_lock(&usb_quirk_mtx);
 		pqe = usb_quirk_get_entry(pgq->vid, pgq->pid,
 		    pgq->bcdDeviceLow, pgq->bcdDeviceHigh, 1);
+		if (pqe == NULL) {
+			mtx_unlock(&usb_quirk_mtx);
+			return (EINVAL);
+		}
 		for (x = 0; x != USB_SUB_QUIRKS_MAX; x++) {
 			if (pqe->quirks[x] == UQ_NONE) {
 				pqe->quirks[x] = y;
@@ -714,6 +718,10 @@ usb_quirk_ioctl(unsigned long cmd, caddr
 		mtx_lock(&usb_quirk_mtx);
 		pqe = usb_quirk_get_entry(pgq->vid, pgq->pid,
 		    pgq->bcdDeviceLow, pgq->bcdDeviceHigh, 0);
+		if (pqe == NULL) {
+			mtx_unlock(&usb_quirk_mtx);
+			return (EINVAL);
+		}
 		for (x = 0; x != USB_SUB_QUIRKS_MAX; x++) {
 			if (pqe->quirks[x] == y) {
 				pqe->quirks[x] = UQ_NONE;

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:35:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6DA481065670;
	Fri, 29 Jan 2010 02:35:50 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5C72D8FC0C;
	Fri, 29 Jan 2010 02:35:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2ZoYp026311;
	Fri, 29 Jan 2010 02:35:50 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2Zo4E026309;
	Fri, 29 Jan 2010 02:35:50 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290235.o0T2Zo4E026309@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:35:50 +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: r203145 - head/sys/dev/usb/storage
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:35:50 -0000

Author: thompsa
Date: Fri Jan 29 02:35:50 2010
New Revision: 203145
URL: http://svn.freebsd.org/changeset/base/203145

Log:
  Simplify attach for UMASS_PROTO_CBI_I mode and change some switch() returns
  into breaks.
  
  Submitted by:	Hans Petter Selesky

Modified:
  head/sys/dev/usb/storage/umass.c

Modified: head/sys/dev/usb/storage/umass.c
==============================================================================
--- head/sys/dev/usb/storage/umass.c	Fri Jan 29 02:33:50 2010	(r203144)
+++ head/sys/dev/usb/storage/umass.c	Fri Jan 29 02:35:50 2010	(r203145)
@@ -671,7 +671,7 @@ static struct usb_config umass_cbi_confi
 		.type = UE_INTERRUPT,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
-		.flags = {.short_xfer_ok = 1,},
+		.flags = {.short_xfer_ok = 1,.no_pipe_ok = 1,},
 		.bufsize = sizeof(umass_cbi_sbl_t),
 		.callback = &umass_t_cbi_status_callback,
 		.timeout = 5000,	/* ms */
@@ -984,9 +984,7 @@ umass_attach(device_t dev)
 
 		err = usbd_transfer_setup(uaa->device,
 		    &uaa->info.bIfaceIndex, sc->sc_xfer, umass_cbi_config,
-		    (sc->sc_proto & UMASS_PROTO_CBI_I) ?
-		    UMASS_T_CBI_MAX : (UMASS_T_CBI_MAX - 2), sc,
-		    &sc->sc_mtx);
+		    UMASS_T_CBI_MAX, sc, &sc->sc_mtx);
 
 		/* skip reset first time */
 		sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND;
@@ -1676,7 +1674,7 @@ umass_t_cbi_reset1_callback(struct usb_x
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
 		umass_transfer_start(sc, UMASS_T_CBI_RESET2);
-		return;
+		break;
 
 	case USB_ST_SETUP:
 		/*
@@ -1723,11 +1721,14 @@ umass_t_cbi_reset1_callback(struct usb_x
 		usbd_xfer_set_frame_len(xfer, 1, sizeof(buf));
 		usbd_xfer_set_frames(xfer, 2);
 		usbd_transfer_submit(xfer);
-		return;
+		break;
 
 	default:			/* Error */
-		umass_tr_error(xfer, error);
-		return;
+		if (error == USB_ERR_CANCELLED)
+			umass_tr_error(xfer, error);
+		else
+			umass_transfer_start(sc, UMASS_T_CBI_RESET2);
+		break;
 
 	}
 }
@@ -1772,17 +1773,17 @@ tr_transferred:
 		} else {
 			umass_transfer_start(sc, next_xfer);
 		}
-		return;
+		break;
 
 	case USB_ST_SETUP:
 		if (usbd_clear_stall_callback(xfer, sc->sc_xfer[stall_xfer])) {
 			goto tr_transferred;	/* should not happen */
 		}
-		return;
+		break;
 
 	default:			/* Error */
 		umass_tr_error(xfer, error);
-		return;
+		break;
 
 	}
 }
@@ -1805,7 +1806,7 @@ umass_t_cbi_command_callback(struct usb_
 			    (sc, (sc->sc_transfer.dir == DIR_IN) ?
 			    UMASS_T_CBI_DATA_READ : UMASS_T_CBI_DATA_WRITE);
 		}
-		return;
+		break;
 
 	case USB_ST_SETUP:
 
@@ -1844,12 +1845,13 @@ umass_t_cbi_command_callback(struct usb_
 
 			usbd_transfer_submit(xfer);
 		}
-		return;
+		break;
 
 	default:			/* Error */
 		umass_tr_error(xfer, error);
-		return;
-
+		/* skip reset */
+		sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND;
+		break;
 	}
 }
 
@@ -1885,7 +1887,7 @@ umass_t_cbi_data_read_callback(struct us
 
 		if (sc->sc_transfer.data_rem == 0) {
 			umass_cbi_start_status(sc);
-			return;
+			break;
 		}
 		if (max_bulk > sc->sc_transfer.data_rem) {
 			max_bulk = sc->sc_transfer.data_rem;
@@ -1899,7 +1901,7 @@ umass_t_cbi_data_read_callback(struct us
 		usbd_xfer_set_frame_len(xfer, 0, max_bulk);
 #endif
 		usbd_transfer_submit(xfer);
-		return;
+		break;
 
 	default:			/* Error */
 		if ((error == USB_ERR_CANCELLED) ||
@@ -1908,7 +1910,7 @@ umass_t_cbi_data_read_callback(struct us
 		} else {
 			umass_transfer_start(sc, UMASS_T_CBI_DATA_RD_CS);
 		}
-		return;
+		break;
 
 	}
 }
@@ -1948,7 +1950,7 @@ umass_t_cbi_data_write_callback(struct u
 
 		if (sc->sc_transfer.data_rem == 0) {
 			umass_cbi_start_status(sc);
-			return;
+			break;
 		}
 		if (max_bulk > sc->sc_transfer.data_rem) {
 			max_bulk = sc->sc_transfer.data_rem;
@@ -1965,7 +1967,7 @@ umass_t_cbi_data_write_callback(struct u
 #endif
 
 		usbd_transfer_submit(xfer);
-		return;
+		break;
 
 	default:			/* Error */
 		if ((error == USB_ERR_CANCELLED) ||
@@ -1974,7 +1976,7 @@ umass_t_cbi_data_write_callback(struct u
 		} else {
 			umass_transfer_start(sc, UMASS_T_CBI_DATA_WR_CS);
 		}
-		return;
+		break;
 
 	}
 }
@@ -2035,7 +2037,7 @@ umass_t_cbi_status_callback(struct usb_x
 			(sc->sc_transfer.callback)
 			    (sc, ccb, residue, status);
 
-			return;
+			break;
 
 		} else {
 
@@ -2060,7 +2062,7 @@ umass_t_cbi_status_callback(struct usb_x
 				(sc->sc_transfer.callback)
 				    (sc, ccb, residue, status);
 
-				return;
+				break;
 			}
 		}
 
@@ -2070,13 +2072,13 @@ umass_t_cbi_status_callback(struct usb_x
 tr_setup:
 		usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer));
 		usbd_transfer_submit(xfer);
-		return;
+		break;
 
 	default:			/* Error */
 		DPRINTF(sc, UDMASS_CBI, "Failed to read CSW: %s\n",
 		    usbd_errstr(error));
 		umass_tr_error(xfer, error);
-		return;
+		break;
 
 	}
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:38:35 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1124B106566B;
	Fri, 29 Jan 2010 02:38:35 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 004F78FC16;
	Fri, 29 Jan 2010 02:38:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2cYTX026928;
	Fri, 29 Jan 2010 02:38:34 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2cYwB026926;
	Fri, 29 Jan 2010 02:38:34 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290238.o0T2cYwB026926@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:38:34 +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: r203146 - head/sys/dev/usb/storage
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:38:35 -0000

Author: thompsa
Date: Fri Jan 29 02:38:34 2010
New Revision: 203146
URL: http://svn.freebsd.org/changeset/base/203146

Log:
  Rework cam error handling to fix Mitsumi floppy drives.
  
  Submitted by:	mav

Modified:
  head/sys/dev/usb/storage/umass.c

Modified: head/sys/dev/usb/storage/umass.c
==============================================================================
--- head/sys/dev/usb/storage/umass.c	Fri Jan 29 02:35:50 2010	(r203145)
+++ head/sys/dev/usb/storage/umass.c	Fri Jan 29 02:38:34 2010	(r203146)
@@ -2594,11 +2594,19 @@ umass_cam_cb(struct umass_softc *sc, uni
 
 	default:
 		/*
-		 * the wire protocol failed and will have recovered
-		 * (hopefully).  We return an error to CAM and let CAM retry
-		 * the command if necessary.
+		 * The wire protocol failed and will hopefully have
+		 * recovered. We return an error to CAM and let CAM
+		 * retry the command if necessary. In case of SCSI IO
+		 * commands we ask the CAM layer to check the
+		 * condition first. This is a quick hack to make
+		 * certain devices work.
 		 */
-		ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+		if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
+			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
+			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
+		} else {
+			ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+		}
 		xpt_done(ccb);
 		break;
 	}

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 02:44:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB7C1106566C;
	Fri, 29 Jan 2010 02:44:06 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BA0388FC26;
	Fri, 29 Jan 2010 02:44:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T2i6Vc028181;
	Fri, 29 Jan 2010 02:44:06 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T2i6bF028175;
	Fri, 29 Jan 2010 02:44:06 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290244.o0T2i6bF028175@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 02:44:06 +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: r203147 - head/lib/libusb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 02:44:06 -0000

Author: thompsa
Date: Fri Jan 29 02:44:06 2010
New Revision: 203147
URL: http://svn.freebsd.org/changeset/base/203147

Log:
  Add a function to check if the usb devices is still connected.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/lib/libusb/libusb20.3
  head/lib/libusb/libusb20.c
  head/lib/libusb/libusb20.h
  head/lib/libusb/libusb20_int.h
  head/lib/libusb/libusb20_ugen20.c

Modified: head/lib/libusb/libusb20.3
==============================================================================
--- head/lib/libusb/libusb20.3	Fri Jan 29 02:38:34 2010	(r203146)
+++ head/lib/libusb/libusb20.3	Fri Jan 29 02:44:06 2010	(r203147)
@@ -143,6 +143,8 @@ USB access library (libusb -lusb)
 .Ft int
 .Fn libusb20_dev_reset "struct libusb20_device *pdev"
 .Ft int
+.Fn libusb20_dev_check_connected "struct libusb20_device *pdev"
+.Ft int
 .Fn libusb20_dev_set_power_mode "struct libusb20_device *pdev" "uint8_t power_mode"
 .Ft uint8_t
 .Fn libusb20_dev_get_power_mode "struct libusb20_device *pdev"
@@ -677,6 +679,15 @@ the last set USB configuration.
 This function returns zero on success else a LIBUSB20_ERROR value is
 returned.
 .
+.
+.Pp
+.
+.Fn libusb20_dev_check_connected
+will check if an opened USB device is still connected.
+.
+This function returns zero if the device is still connected else a LIBUSB20_ERROR value is returned.
+.
+.
 .Pp
 .
 .Fn libusb20_dev_set_power_mode

Modified: head/lib/libusb/libusb20.c
==============================================================================
--- head/lib/libusb/libusb20.c	Fri Jan 29 02:38:34 2010	(r203146)
+++ head/lib/libusb/libusb20.c	Fri Jan 29 02:44:06 2010	(r203147)
@@ -67,6 +67,7 @@ dummy_callback(struct libusb20_transfer 
 #define	dummy_set_config_index (void *)dummy_int
 #define	dummy_set_alt_index (void *)dummy_int
 #define	dummy_reset_device (void *)dummy_int
+#define	dummy_check_connected (void *)dummy_int
 #define	dummy_set_power_mode (void *)dummy_int
 #define	dummy_get_power_mode (void *)dummy_int
 #define	dummy_kernel_driver_active (void *)dummy_int
@@ -673,6 +674,15 @@ libusb20_dev_reset(struct libusb20_devic
 }
 
 int
+libusb20_dev_check_connected(struct libusb20_device *pdev)
+{
+	int error;
+
+	error = pdev->methods->check_connected(pdev);
+	return (error);
+}
+
+int
 libusb20_dev_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode)
 {
 	int error;

Modified: head/lib/libusb/libusb20.h
==============================================================================
--- head/lib/libusb/libusb20.h	Fri Jan 29 02:38:34 2010	(r203146)
+++ head/lib/libusb/libusb20.h	Fri Jan 29 02:44:06 2010	(r203147)
@@ -250,6 +250,7 @@ int	libusb20_dev_request_sync(struct lib
 int	libusb20_dev_req_string_sync(struct libusb20_device *pdev, uint8_t index, uint16_t langid, void *ptr, uint16_t len);
 int	libusb20_dev_req_string_simple_sync(struct libusb20_device *pdev, uint8_t index, void *ptr, uint16_t len);
 int	libusb20_dev_reset(struct libusb20_device *pdev);
+int	libusb20_dev_check_connected(struct libusb20_device *pdev);
 int	libusb20_dev_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode);
 uint8_t	libusb20_dev_get_power_mode(struct libusb20_device *pdev);
 int	libusb20_dev_set_alt_index(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index);

Modified: head/lib/libusb/libusb20_int.h
==============================================================================
--- head/lib/libusb/libusb20_int.h	Fri Jan 29 02:38:34 2010	(r203146)
+++ head/lib/libusb/libusb20_int.h	Fri Jan 29 02:44:06 2010	(r203147)
@@ -101,6 +101,7 @@ typedef int (libusb20_set_power_mode_t)(
 typedef int (libusb20_get_power_mode_t)(struct libusb20_device *pdev, uint8_t *power_mode);
 typedef int (libusb20_set_alt_index_t)(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index);
 typedef int (libusb20_set_config_index_t)(struct libusb20_device *pdev, uint8_t index);
+typedef int (libusb20_check_connected_t)(struct libusb20_device *pdev);
 
 /* USB transfer specific */
 typedef int (libusb20_tr_open_t)(struct libusb20_transfer *xfer, uint32_t MaxBufSize, uint32_t MaxFrameCount, uint8_t ep_no);
@@ -117,6 +118,7 @@ typedef void (libusb20_tr_cancel_async_t
   m(n, kernel_driver_active) \
   m(n, process) \
   m(n, reset_device) \
+  m(n, check_connected) \
   m(n, set_power_mode) \
   m(n, get_power_mode) \
   m(n, set_alt_index) \

Modified: head/lib/libusb/libusb20_ugen20.c
==============================================================================
--- head/lib/libusb/libusb20_ugen20.c	Fri Jan 29 02:38:34 2010	(r203146)
+++ head/lib/libusb/libusb20_ugen20.c	Fri Jan 29 02:44:06 2010	(r203147)
@@ -67,6 +67,7 @@ static libusb20_get_config_index_t ugen2
 static libusb20_set_config_index_t ugen20_set_config_index;
 static libusb20_set_alt_index_t ugen20_set_alt_index;
 static libusb20_reset_device_t ugen20_reset_device;
+static libusb20_check_connected_t ugen20_check_connected;
 static libusb20_set_power_mode_t ugen20_set_power_mode;
 static libusb20_get_power_mode_t ugen20_get_power_mode;
 static libusb20_kernel_driver_active_t ugen20_kernel_driver_active;
@@ -553,6 +554,25 @@ ugen20_reset_device(struct libusb20_devi
 }
 
 static int
+ugen20_check_connected(struct libusb20_device *pdev)
+{
+	uint32_t plugtime;
+	int error = 0;
+
+	if (ioctl(pdev->file_ctrl, USB_GET_PLUGTIME, &plugtime)) {
+		error = LIBUSB20_ERROR_NO_DEVICE;
+		goto done;
+	}
+
+	if (pdev->session_data.plugtime != plugtime) {
+		error = LIBUSB20_ERROR_NO_DEVICE;
+		goto done;
+	}
+done:
+	return (error);
+}
+
+static int
 ugen20_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode)
 {
 	int temp;

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 03:35:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83E0D106568B;
	Fri, 29 Jan 2010 03:35:05 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1B2958FC0C;
	Fri, 29 Jan 2010 03:35:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T3Z2nL039565;
	Fri, 29 Jan 2010 03:35:02 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T3Z2Ww039563;
	Fri, 29 Jan 2010 03:35:02 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201001290335.o0T3Z2Ww039563@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Jan 2010 03:35:02 +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: r203148 - in head/sys: contrib/dev/run modules/runfw
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 03:35:05 -0000

Author: thompsa
Date: Fri Jan 29 03:35:01 2010
New Revision: 203148
URL: http://svn.freebsd.org/changeset/base/203148

Log:
  Uuencode the rt2870 firmware into ascii like the other firmware blobs.

Added:
  head/sys/contrib/dev/run/rt2870.fw.uu
Deleted:
  head/sys/contrib/dev/run/run-rt2870
Modified:
  head/sys/modules/runfw/Makefile

Added: head/sys/contrib/dev/run/rt2870.fw.uu
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/run/rt2870.fw.uu	Fri Jan 29 03:35:01 2010	(r203148)
@@ -0,0 +1,225 @@
+# Copyright (c) 2007, Ralink Technology Corporation 
+# All rights reserved.
+# 
+# Redistribution.  Redistribution and use in binary form, without 
+# modification, are permitted provided that the following conditions are 
+# met:
+# 
+# * Redistributions must reproduce the above copyright notice and the 
+#   following disclaimer in the documentation and/or other materials 
+#   provided with the distribution. 
+# * Neither the name of Ralink Technology Corporation nor the names of its
+#   suppliers may be used to endorse or promote products derived from this
+#   software without specific prior written permission. 
+# * No reverse engineering, decompilation, or disassembly of this software 
+#   is permitted.
+# 
+# Limited patent license. Ralink Technology Corporation grants a world-wide, 
+# royalty-free, non-exclusive license under patents it now or hereafter 
+# owns or controls to make, have made, use, import, offer to sell and 
+# sell ("Utilize") this software, but solely to the extent that any 
+# such patent is necessary to Utilize the software alone, or in 
+# combination with an operating system licensed under an approved Open 
+# Source license as listed by the Open Source Initiative at 
+# http://opensource.org/licenses.  The patent license shall not apply to 
+# any other combinations which include this software.  No hardware per 
+# se is licensed hereunder.
+# 
+# DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
+# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
+# DAMAGE.
+begin 644 rt2870.fw
+M____`A`H`A`R`A!X`A)G`A)H`A*'`A*,$A*((@(620(7'P(3=P(2C3`%!B`-
+M`Q(7P2*0`8S@,.,;Y4PPX`1_0(`"?P"0$"_O\)`!C'0(\.20`:?PD`&,X##@
+M')`!@."T`A6CX+0!$)`!A."T@0F0`8QT`?`2#<@BD`04X"#G`P(29I!P$N#U
+M5I`$!.`2"IT0MS$0X%`1!%$1#5(1#5,1#5013E41?G`1J7$1UW(2'7,2/H``
+M`!)F(`(#,`,=?0*O5A(+D9`$%'2`\.20`D7?57D'`0X/]T1R57^,;OQI!P$>#_=$@E5_C&[\;D_:]6$@N1D`04
+M=(#PY)!P$_#E5O1P`P(29@(27^5'9`=@"^5'9`A@!>5'M`D(D'`1X%0/]3KE
+M1[0)".4ZM`,#Y/5&Y/VO5A(+D=($(I!P$.#^D'`1X/WM^.;U5_VO5A(+D9`$
+M%'2`\.20#][?6"CH/@]5?]KU82"Y&0
+M!!1T@/#DD'`3\.56]'`#`A)F`A)?D!`"X+1P'J/@M#`9D`4(X$0!\/V0!07@
+M5/OP1`3P[53^D`4(\.3U3O5/=3K_K5>O5A(+D9`$%'2`\.20!$`?`B(N53Y4=D!F`#`A-$@!OE2,14#_5#Y4K$5`_U
+M0N5,Q%0/]5[E1V0&<&930P^`885)0X5+0H5-7N5'9`9P4H`;Y4G$5`_U0^5+
+MQ%0/]4+E3<14#_5>Y4=D!G`UY4-4#T00]4.`*^5'M`0&4U[[=4()Y4>T!09#
+M7@1U0@GE1[0&$.5#5`]$,/5#@`;22X`"TDSD]27E0L14\/_E0U0/3_5?D'!$
+M\*/E7O"CY4KPH^5(\*/E3/"CY43PH^5"\*/E0_#28"+E1V`0),!P`Q(6*1(3
+MC,*OP@32KR+"KY`$%.!4#F`$TAB`".5.14\D_Y(8TJ^0!!3@HN22&70>\.5?
+M5`_U+>4E5?5##_OS`1Y25P!74E#(`"%272;-)M@`_E
+M7S#F!L)LTFV`!-)LPFWE1V0#<"$P2P;";-)M@!CE)7`#,$P1PDSE)7`%=24'
+M@`(5)=)LTFWE1[0)%.5$(.,+Y3ID`F`%Y3JT`P3";-)MD'!&Y2WP(&D'Y5X@
+MX`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)LD'!'Y2WP=2Y`(&D$HFB`)C!H!N5&
+MHN*`'>5>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG.2!4_O#E0\14#Q1@%"3^8",D`V`#`A88D`(HX#!'#X`'D`(HX"!'
+M!E3^\`(6&$0!\`(6&.5&,.($?P&``G\`D`(HX%3^3_`"%ACE1V0'8`_E1V0(
+M8`GE1V0)8`,"%ACD]2>0`BG@5/SPY3H48"T48"X48#8D_&!?)/E@'R0.<&GE
+M1A,35#]U\`.$K_`@1P1^`8`"?@#O;B3_@$6B1X!!Y48PX@/3@"?#@"3E1C#B
+M#50XPY0P4`9^`'\!@`1^`'\`($<$?0&``GT`[VU.)/^2.*)'LY(Y@!GE1C#B
+M`].``<.2.:)'LY(X@`>B1[.2.)(YD`(HX%3\12?PD'"4Z
+M\"+DD`(I\#!'!*]%@`3E1?3_D`(H[_`BCU#262*/5-)8(N3U8L*OY5$48$84
+M8&(D`F`#`A<#TEEU50&0`J+@5'_PH^`@YR*0!#3@M`(;H^"T`A:CX+0"$7\@
+M$A8_D!`$X%3S\'51`8!SY5!P!75B`X!JD!(`X%0#50<`*`1I`"H^`@YCN0!#?@9")P,Y`!BG1^\)`!EO"0$@1T"O"0$RC@
+M5/#PH^!4\/"CX%3Z\)`$`>!4^?!U8@%U50+D]5&`">50<`5U8@/U4>5B8!7"
+M`>3U4<)9K6*O0!(7C>5BM`,"T@/2KR+"KS`!$N20`9;P]5'"6<(!?0*O0!(7
+MC>52%&`)!'!,=5(!=54#D`0!X$0.\)`3*.!$#_"CX$0/\*/@1`7PD!($=`/P
+MD`*BX$3`\)`0!.!$#/#D]5+U53`""\("?0&O01(7C8`"P@/DD`&6\-*O(N_T
+M8"WD_G04+O6"Y#1P]8/@M/\9=!0N]8+D-'#U@^_P=!PN]8+D-'#U@^WP(@Z^
+M!-4B(B*0<"K@,.%-PJ^0<"C@D!`<\)!P*>"0$!WPD'`JX)`0'O"0$!S@]6*0
+M$![@(.'SD!``(29P(2:`(2AP(2C!(2B"("%DD"%Q\"$W<"$HTP!08@
+M#0,2%\$BD`&,X##C&^5,,.`$?T"``G\`D!`O[_"0`8QT"/#DD`&G\)`!C.`P
+MX!R0`8#@M`(5H^"T`1"0`83@M($)D`&,=`'P$@W=(I`$%.`@YP,"$F:0!D"&`(X&0@8`,"$F9U3@-U3R`BD'`1X"3_DD!4#_4Z
+MY4>T"0CE.K0#`^3U1N3]KU82"ZK2!"*0#][?CF]5?]KU82"ZJ0
+M!!1T@/#DD'`3\.56]'`#`A)F`A)?D'`0X/Z0WU@HZ#X/57_:]6$@NJ
+MD`04=(#PY)!P$_#E5O1P`P(29@(27Y`0`N"TO5A(+JI`$%'2`\.200<"7@1`'P(B+E4W`:,&`)LDTP300%
+M1L($Y4]%3F`(Y4\53W`"%4XB(L)"TR(BPDO"3.5$$@JV$J\`$T($$SX($QD0
+M$L,@$N-@$O2@```31(5(0X5*0H5,7N5'9`9@`P(31(`;Y4C$5`_U0^5*Q%0/
+M]4+E3,14#_5>Y4=D!G!F4T,/@&&%24.%2T*%35[E1V0&<%*`&^5)Q%0/]4/E
+M2\14#_5"Y4W$5`_U7N5'9`9P->5#5`]$$/5#@"OE1[0$!E->^W5"">5'M`4&
+M0UX$=4()Y4>T!A#E0U0/1##U0X`&TDN``M),Y/4EY4+$5/#_Y4-4#T_U7Y!P
+M1/"CY5[PH^5*\*/E2/"CY4SPH^5$\*/E0O"CY4/PTF`BY4=@$"3`<`,2%BD2
+M$XS"K\($TJ\BPJ^0!!3@5`Y@!-(8@`CE3D5/)/^2&-*OD`04X*+DDAET'O#E
+M7U0/]2WE)7`3,!@%Y5\@Y0LP&1GE7U0P_[\P$>4E<`5U)0R``A4ETFS2;8`/
+MY5\PY@;";-)M@`32;,)MY4=D`W`A,$L&PFS2;8`8Y25P`S!,$<),Y25P!74E
+M!X`"%272;-)MY4>T"13E1"#C"^4Z9`)@!>4ZM`,$PFS2;9!P1N4M\"!I!^5>
+M(.`"LF@@:P?E7B#A`K)J(&T'Y5X@X@*R;)!P1^4M\'4N0"!I!*)H@"8P:`;E
+M1J+B@!WE7B#B!'\!@`)_`.5&5/#^OO`$?@&``GX`[F\D_Y)SDG(@:P2B:H`F
+M,&H&Y4:BXH`=Y5X@X`1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^2=9)T(&T$
+MHFR`)C!L!N5&HN*`'>5>(.$$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG&2
+M<)`0`."0$"_PD!`#X,.4,$`4HG&2=Z)PDG;E+A,35#_U+L)WTG:0$"_E+O#E
+M1V0&<$R0`BG@5/[PY4/$5`\48!0D_F`C)`-@`P(6&)`"*.`P1P^`!Y`"*.`@
+M1P94_O`"%AA$`?`"%ACE1C#B!'\!@`)_`)`"*.!4_D_P`A88Y4=D!V`/Y4=D
+M"&`)Y4=D"6`#`A88Y/4GD`(IX%3\\.4Z%&`M%&`N%&`V)/Q@7R3Y8!\D#G!I
+MY483$U0_=?`#A*_P($<$?@&``GX`[VXD_X!%HD>`0>5&,.(#TX`GPX`DY48P
+MX@U4.,.4,%`&?@!_`8`$?@!_`"!'!'T!@`)]`.]M3B3_DCBB1[.2.8`9Y48P
+MX@/3@`'#DCFB1[.2.(`'HD>SDCB2.9`"*.!4_$4G\)!PG.4Z\*/E1_"0<$'E
+M.O`BY)`"*?`P1P2O18`$Y47T_Y`"*._P(H]0TEDBCU326"+D]6+"K^51%&!&
+M%&!B)`)@`P(7`])9=54!D`*BX%1_\*/@(.!$#O"0$RC@1`_PH^!$#_"CX$0%\)`2!'0#
+M\)`"HN!$P/"0$`3@1`SPY/52]54P`@O"`GT!KT$2%XV``L(#Y)`!EO#2KR+O
+M]&`MY/YT%"[U@N0TX"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@D'`J\#!*!Y!P).!$`?#"!=*O
+M(B(B````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````````"
+"F\``
+`
+end

Modified: head/sys/modules/runfw/Makefile
==============================================================================
--- head/sys/modules/runfw/Makefile	Fri Jan 29 02:44:06 2010	(r203147)
+++ head/sys/modules/runfw/Makefile	Fri Jan 29 03:35:01 2010	(r203148)
@@ -1,8 +1,11 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../contrib/dev/run
-
 KMOD=	runfw
-FIRMWS=	run-rt2870:runfw:1
+FIRMWS=	runfw:runfw:1
+
+CLEANFILES=	runfw
+
+runfw: ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu
+	uudecode -p ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu > ${.TARGET}
 
 .include 

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 04:03:36 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B031F106566C;
	Fri, 29 Jan 2010 04:03:36 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9FDBD8FC15;
	Fri, 29 Jan 2010 04:03:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T43ah2045819;
	Fri, 29 Jan 2010 04:03:36 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T43avo045817;
	Fri, 29 Jan 2010 04:03:36 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001290403.o0T43avo045817@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 29 Jan 2010 04:03: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: r203149 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 04:03:36 -0000

Author: rrs
Date: Fri Jan 29 04:03:36 2010
New Revision: 203149
URL: http://svn.freebsd.org/changeset/base/203149

Log:
  Move ID up into comment block.. per bsdimp

Modified:
  head/sys/mips/rmi/pic.h

Modified: head/sys/mips/rmi/pic.h
==============================================================================
--- head/sys/mips/rmi/pic.h	Fri Jan 29 03:35:01 2010	(r203148)
+++ head/sys/mips/rmi/pic.h	Fri Jan 29 04:03:36 2010	(r203149)
@@ -25,14 +25,15 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
+ * __FBSDID("$FreeBSD$");
  *
  * RMI_BSD */
 #ifndef _RMI_PIC_H_
 #define _RMI_PIC_H_
 #include 
-/*
-__FBSDID("$FreeBSD$");
-*/
+
+
+
 
 extern int rmi_spin_mutex_safe;
 

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 04:05:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1D32B1065672;
	Fri, 29 Jan 2010 04:05:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0CF888FC19;
	Fri, 29 Jan 2010 04:05:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T45HEr046258;
	Fri, 29 Jan 2010 04:05:17 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T45HfH046256;
	Fri, 29 Jan 2010 04:05:17 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001290405.o0T45HfH046256@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 29 Jan 2010 04:05:17 +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: r203150 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 04:05:18 -0000

Author: rrs
Date: Fri Jan 29 04:05:17 2010
New Revision: 203150
URL: http://svn.freebsd.org/changeset/base/203150

Log:
  Its possible that our RMI box has memory extending
  above 4Gig. If so when we add the base address with
  the size we will wrap. So for now we just ignore
  such memory and only use what we can. When we
  get 64 bit working then we will be much better ;->

Modified:
  head/sys/mips/rmi/xlr_machdep.c

Modified: head/sys/mips/rmi/xlr_machdep.c
==============================================================================
--- head/sys/mips/rmi/xlr_machdep.c	Fri Jan 29 04:03:36 2010	(r203149)
+++ head/sys/mips/rmi/xlr_machdep.c	Fri Jan 29 04:05:17 2010	(r203150)
@@ -456,6 +456,9 @@ platform_start(__register_t a0 __unused,
 				}
 				phys_avail[1] = boot_map->physmem_map[0].addr +
 				    boot_map->physmem_map[0].size;
+				printf("First segment: addr:%p -> %p \n",
+				       (void *)phys_avail[0], 
+				       (void *)phys_avail[1]);
 
 			} else {
 /*
@@ -467,9 +470,19 @@ platform_start(__register_t a0 __unused,
 				    boot_map->physmem_map[i].addr;
 				phys_avail[j + 1] = phys_avail[j] +
 				    boot_map->physmem_map[i].size;
-#if 0				/* FIXME TOD0 */
-				phys_avail[j] = phys_avail[j + 1] = 0;
-#endif
+				if (phys_avail[j + 1] < phys_avail[j] ) {
+					/* Houston we have an issue. Memory is
+					 * larger than possible. Its probably in
+					 * 64 bit > 4Gig and we are in 32 bit mode.
+					 */
+					phys_avail[j + 1] = 0xfffff000;
+					printf("boot map size was %llx\n", boot_map->physmem_map[i].size);
+					boot_map->physmem_map[i].size = phys_avail[j + 1] - phys_avail[j];
+					printf("reduced to %llx\n", boot_map->physmem_map[i].size);
+				}
+				printf("Next segment : addr:%p -> %p \n",
+				       (void *)phys_avail[j], 
+				       (void *)phys_avail[j+1]);
 			}
 			physsz += boot_map->physmem_map[i].size;
 		}

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 04:07:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 083FC1065670;
	Fri, 29 Jan 2010 04:07:39 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EBDBB8FC08;
	Fri, 29 Jan 2010 04:07:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T47cfO046785;
	Fri, 29 Jan 2010 04:07:38 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T47cC0046783;
	Fri, 29 Jan 2010 04:07:38 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001290407.o0T47cC0046783@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 29 Jan 2010 04:07:38 +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: r203151 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 04:07:39 -0000

Author: rrs
Date: Fri Jan 29 04:07:38 2010
New Revision: 203151
URL: http://svn.freebsd.org/changeset/base/203151

Log:
  For our memory re-mapping trick to work
  interrupts must be disabled through the
  page_zero's or copys etc. Note that the
  temporary mapping used by panic's may
  cause us pain since int's may not be disabled.
  When we get dumps working we may have to revist
  this. Note that with this fix the build got
  much much further.. until it hung on disk IO (I
  would imagine thats the rge/msgring driver acting
  up).

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Fri Jan 29 04:05:17 2010	(r203150)
+++ head/sys/mips/mips/pmap.c	Fri Jan 29 04:07:38 2010	(r203151)
@@ -2101,14 +2101,20 @@ pmap_kenter_temporary(vm_paddr_t pa, int
 	} else {
 		int cpu;
 		struct local_sysmaps *sysm;
-
+		/* If this is used other than for dumps, we may need to leave
+		 * interrupts disasbled on return. If crash dumps don't work when
+		 * we get to this point, we might want to consider this (leaving things
+		 * disabled as a starting point ;-)
+	 	 */
+		disableintr();
 		cpu = PCPU_GET(cpuid);
 		sysm = &sysmap_lmem[cpu];
 		/* Since this is for the debugger, no locks or any other fun */
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(pa) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
-		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		sysm->valid1 = 1;
+		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		va = (vm_offset_t)sysm->CADDR1;
+		enableintr();
 	}
 	return ((void *)va);
 }
@@ -2126,7 +2132,9 @@ pmap_kenter_temporary_free(vm_paddr_t pa
 	cpu = PCPU_GET(cpuid);
 	sysm = &sysmap_lmem[cpu];
 	if (sysm->valid1) {
+		disableintr();
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
+		enableintr();
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 	}
@@ -2272,11 +2280,13 @@ pmap_zero_page(vm_page_t m)
 		sysm = &sysmap_lmem[cpu];
 		PMAP_LGMEM_LOCK(sysm);
 		sched_pin();
+		disableintr();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
 		sysm->valid1 = 1;
 		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero(sysm->CADDR1, PAGE_SIZE);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
+		enableintr();
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 		sched_unpin();
@@ -2326,12 +2336,14 @@ pmap_zero_page_area(vm_page_t m, int off
 		cpu = PCPU_GET(cpuid);
 		sysm = &sysmap_lmem[cpu];
 		PMAP_LGMEM_LOCK(sysm);
+		disableintr();
 		sched_pin();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
-		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		sysm->valid1 = 1;
+		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero((char *)sysm->CADDR1 + off, size);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
+		enableintr();
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 		sched_unpin();
@@ -2365,12 +2377,14 @@ pmap_zero_page_idle(vm_page_t m)
 		cpu = PCPU_GET(cpuid);
 		sysm = &sysmap_lmem[cpu];
 		PMAP_LGMEM_LOCK(sysm);
+		disableintr();
 		sched_pin();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
-		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		sysm->valid1 = 1;
+		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero(sysm->CADDR1, PAGE_SIZE);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
+		enableintr();
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 		sched_unpin();
@@ -2441,6 +2455,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
 			sysm = &sysmap_lmem[cpu];
 			PMAP_LGMEM_LOCK(sysm);
 			sched_pin();
+			disableintr();
 			if (phy_src < MIPS_KSEG0_LARGEST_PHYS) {
 				/* one side needs mapping - dest */
 				va_src = MIPS_PHYS_TO_CACHED(phy_src);
@@ -2476,6 +2491,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
 				sysm->CMAP2 = 0;
 				sysm->valid2 = 0;
 			}
+			enableintr();
 			sched_unpin();
 			PMAP_LGMEM_UNLOCK(sysm);
 		}

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 05:16:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E68ED1065672;
	Fri, 29 Jan 2010 05:16:48 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153])
	by mx1.freebsd.org (Postfix) with ESMTP id 038C38FC0C;
	Fri, 29 Jan 2010 05:16:47 +0000 (UTC)
Received: by fg-out-1718.google.com with SMTP id e21so48481fga.13
	for ; Thu, 28 Jan 2010 21:16:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=SpDs3n06r31zzd0e/raMCvkioJMCVBjKCLWZzWRfHB4=;
	b=CMvzfYJyFNeXasWpoUZXFvy7qHiMxjEAodF/sjgGu39qubfyu4yjNHWXVv6gATUPsf
	u9TdHmXH7NjIWi2gQf2ijt83D+mveYrt4DqsarDSWGAdkhBGnOrqoqFWBxHt4AAydp6U
	aE5sHODyqZqYGqqpD7hbAb23hyPDod3FQvoRY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=cXzjFrspKeBAyqSnpVueE5lcQBTgja3AvBR5BQc/hOoqXbUNliHTKcS2DXqPAHPIln
	2NkIxyB/14m5foLhb/CfFwU4oCyIjty/ffb8p5iEH9d7q80QljL6dMceT7XfxTM5Qr/J
	uhJCAKjftWOuT5vcY9FZ59EcsYgkxYr1Gef+Y=
MIME-Version: 1.0
Received: by 10.102.222.7 with SMTP id u7mr158588mug.1.1264742206874; Thu, 28 
	Jan 2010 21:16:46 -0800 (PST)
In-Reply-To: <201001282224.o0SMOsU8070773@svn.freebsd.org>
References: <201001282224.o0SMOsU8070773@svn.freebsd.org>
Date: Fri, 29 Jan 2010 08:16:46 +0300
Message-ID: 
From: pluknet 
To: Andrew Thompson 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r203134 - in head: share/man/man4 sys/conf 
	sys/contrib/dev/run sys/dev/usb sys/dev/usb/wlan sys/modules 
	sys/modules/runfw sys/modules/usb sys/modules/usb/run
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 05:16:49 -0000

On 29 January 2010 01:24, Andrew Thompson  wrote:
> Author: thompsa
> Date: Thu Jan 28 22:24:54 2010
> New Revision: 203134
> URL: http://svn.freebsd.org/changeset/base/203134
>
> Log:
> =A0Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn =
devices.
>
> =A0This driver was written for OpenBSD by Damien Bergamini and ported ove=
r by
> =A0Akinori Furukoshi.
>
[...]

> Added: head/share/man/man4/run.4
[...]
> +The
> +.Nm
> +driver offloads both encryption and decryption of data frames to the
> +hardware for the WEP40, WEP104, TKIP(+MIC) and CCMP ciphers.
> +.Pp
> +The
> +.Nm
> +driver can be configured at runtime with
> +.Xr ifconfig 8
> +or on boot with
> +.Xr hostname.if 5 .

hostname.if(5) is something that only exists in OpenBSD.
I think the following would be better:
For more information on configuring this device, see
.Xr ifconfig 8 .

--=20
wbr,
pluknet

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 05:29:29 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C89C8106574C;
	Fri, 29 Jan 2010 05:29:29 +0000 (UTC)
	(envelope-from rrs@lakerest.net)
Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d])
	by mx1.freebsd.org (Postfix) with ESMTP id 6B93E8FC12;
	Fri, 29 Jan 2010 05:29:29 +0000 (UTC)
Received: from [192.168.2.175] (pool-96-249-204-75.snfcca.dsl-w.verizon.net
	[96.249.204.75]) (authenticated bits=0)
	by lakerest.net (8.14.3/8.14.3) with ESMTP id o0T5Svfe002324
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
	Fri, 29 Jan 2010 00:29:27 -0500 (EST)
	(envelope-from rrs@lakerest.net)
Message-Id: 
From: Randall Stewart 
To: Neel Natu 
In-Reply-To: 
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Thu, 28 Jan 2010 21:29:27 -0800
References: <201001290407.o0T47cC0046783@svn.freebsd.org>
	
X-Mailer: Apple Mail (2.936)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r203151 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 05:29:29 -0000

Good point ;-)

I will make some adjustments and fix it ;-)

R
On Jan 28, 2010, at 9:11 PM, Neel Natu wrote:

> Hi Randall,
>
> You should use restoreintr() instead of unconditionally enabling
> interrupts using enableintr().
>
> Otherwise these functions may end up inadvertently enabling interrupts
> if they are called with interrupts disabled to begin with.
>
> best
> Neel
>
> On Thu, Jan 28, 2010 at 8:07 PM, Randall Stewart   
> wrote:
>> Author: rrs
>> Date: Fri Jan 29 04:07:38 2010
>> New Revision: 203151
>> URL: http://svn.freebsd.org/changeset/base/203151
>>
>> Log:
>>  For our memory re-mapping trick to work
>>  interrupts must be disabled through the
>>  page_zero's or copys etc. Note that the
>>  temporary mapping used by panic's may
>>  cause us pain since int's may not be disabled.
>>  When we get dumps working we may have to revist
>>  this. Note that with this fix the build got
>>  much much further.. until it hung on disk IO (I
>>  would imagine thats the rge/msgring driver acting
>>  up).
>>
>> Modified:
>>  head/sys/mips/mips/pmap.c
>>
>> Modified: head/sys/mips/mips/pmap.c
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- head/sys/mips/mips/pmap.c   Fri Jan 29 04:05:17 2010         
>> (r203150)
>> +++ head/sys/mips/mips/pmap.c   Fri Jan 29 04:07:38 2010         
>> (r203151)
>> @@ -2101,14 +2101,20 @@ pmap_kenter_temporary(vm_paddr_t pa, int
>>        } else {
>>                int cpu;
>>                struct local_sysmaps *sysm;
>> -
>> +               /* If this is used other than for dumps, we may  
>> need to leave
>> +                * interrupts disasbled on return. If crash dumps  
>> don't work when
>> +                * we get to this point, we might want to consider  
>> this (leaving things
>> +                * disabled as a starting point ;-)
>> +                */
>> +               disableintr();
>>                cpu = PCPU_GET(cpuid);
>>                sysm = &sysmap_lmem[cpu];
>>                /* Since this is for the debugger, no locks or any  
>> other fun */
>>                sysm->CMAP1 = mips_paddr_to_tlbpfn(pa) | PTE_RW |  
>> PTE_V | PTE_G | PTE_W | PTE_CACHE;
>> -               pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                sysm->valid1 = 1;
>> +               pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                va = (vm_offset_t)sysm->CADDR1;
>> +               enableintr();
>>        }
>>        return ((void *)va);
>>  }
>> @@ -2126,7 +2132,9 @@ pmap_kenter_temporary_free(vm_paddr_t pa
>>        cpu = PCPU_GET(cpuid);
>>        sysm = &sysmap_lmem[cpu];
>>        if (sysm->valid1) {
>> +               disableintr();
>>                pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
>> +               enableintr();
>>                sysm->CMAP1 = 0;
>>                sysm->valid1 = 0;
>>        }
>> @@ -2272,11 +2280,13 @@ pmap_zero_page(vm_page_t m)
>>                sysm = &sysmap_lmem[cpu];
>>                PMAP_LGMEM_LOCK(sysm);
>>                sched_pin();
>> +               disableintr();
>>                sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW |  
>> PTE_V | PTE_G | PTE_W | PTE_CACHE;
>>                sysm->valid1 = 1;
>>                pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                bzero(sysm->CADDR1, PAGE_SIZE);
>>                pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
>> +               enableintr();
>>                sysm->CMAP1 = 0;
>>                sysm->valid1 = 0;
>>                sched_unpin();
>> @@ -2326,12 +2336,14 @@ pmap_zero_page_area(vm_page_t m, int off
>>                cpu = PCPU_GET(cpuid);
>>                sysm = &sysmap_lmem[cpu];
>>                PMAP_LGMEM_LOCK(sysm);
>> +               disableintr();
>>                sched_pin();
>>                sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW |  
>> PTE_V | PTE_G | PTE_W | PTE_CACHE;
>> -               pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                sysm->valid1 = 1;
>> +               pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                bzero((char *)sysm->CADDR1 + off, size);
>>                pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
>> +               enableintr();
>>                sysm->CMAP1 = 0;
>>                sysm->valid1 = 0;
>>                sched_unpin();
>> @@ -2365,12 +2377,14 @@ pmap_zero_page_idle(vm_page_t m)
>>                cpu = PCPU_GET(cpuid);
>>                sysm = &sysmap_lmem[cpu];
>>                PMAP_LGMEM_LOCK(sysm);
>> +               disableintr();
>>                sched_pin();
>>                sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW |  
>> PTE_V | PTE_G | PTE_W | PTE_CACHE;
>> -               pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                sysm->valid1 = 1;
>> +               pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1,  
>> sysm->CMAP1);
>>                bzero(sysm->CADDR1, PAGE_SIZE);
>>                pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
>> +               enableintr();
>>                sysm->CMAP1 = 0;
>>                sysm->valid1 = 0;
>>                sched_unpin();
>> @@ -2441,6 +2455,7 @@ pmap_copy_page(vm_page_t src, vm_page_t
>>                        sysm = &sysmap_lmem[cpu];
>>                        PMAP_LGMEM_LOCK(sysm);
>>                        sched_pin();
>> +                       disableintr();
>>                        if (phy_src < MIPS_KSEG0_LARGEST_PHYS) {
>>                                /* one side needs mapping - dest */
>>                                va_src = MIPS_PHYS_TO_CACHED(phy_src);
>> @@ -2476,6 +2491,7 @@ pmap_copy_page(vm_page_t src, vm_page_t
>>                                sysm->CMAP2 = 0;
>>                                sysm->valid2 = 0;
>>                        }
>> +                       enableintr();
>>                        sched_unpin();
>>                        PMAP_LGMEM_UNLOCK(sysm);
>>                }
>>
>

------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)


From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 05:36:53 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 919C6106566C;
	Fri, 29 Jan 2010 05:36:53 +0000 (UTC)
	(envelope-from neelnatu@gmail.com)
Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com
	[209.85.160.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 598EA8FC0C;
	Fri, 29 Jan 2010 05:36:53 +0000 (UTC)
Received: by pwi15 with SMTP id 15so1135081pwi.3
	for ; Thu, 28 Jan 2010 21:36:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=5k0cVmKv/pkkOw46oqpQWjanNNFKXxmNwTRSCyW3/Yw=;
	b=bgtcQCC+M4EyFNmTaqi54awnXj+ZY4tKGPYkSnCs5u4UjBx0UNaZf8SuOdGLquVtZb
	YOfIoMaWPUUggtJfvoZWpvKrQdb+VNdd+UV97U0GLbx1S5ZXTYqXQtkCPVUTrTPDYZSH
	aCemeKNH/53DuSOm2CjHICQa/RzFhR8+771DE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=TOALqBhGIu1Y00kd6QTa1wdKkisxZ2Swhr1+yS4I+t47cZER6xqvKNGHhAj/iVtpfO
	XcwsP3nkAFQv8YdZPjisYcwXCKDYsBwSeCKOkODFogOLMtj2DZHO5ErG1ME/rdvFzQ7s
	xDY+MLoXBrDyppCZD5wjrDK73+OSkVD7/4BRQ=
MIME-Version: 1.0
Received: by 10.143.27.23 with SMTP id e23mr268212wfj.31.1264741863082; Thu, 
	28 Jan 2010 21:11:03 -0800 (PST)
In-Reply-To: <201001290407.o0T47cC0046783@svn.freebsd.org>
References: <201001290407.o0T47cC0046783@svn.freebsd.org>
Date: Thu, 28 Jan 2010 21:11:03 -0800
Message-ID: 
From: Neel Natu 
To: Randall Stewart 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r203151 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 05:36:53 -0000

Hi Randall,

You should use restoreintr() instead of unconditionally enabling
interrupts using enableintr().

Otherwise these functions may end up inadvertently enabling interrupts
if they are called with interrupts disabled to begin with.

best
Neel

On Thu, Jan 28, 2010 at 8:07 PM, Randall Stewart  wrote:
> Author: rrs
> Date: Fri Jan 29 04:07:38 2010
> New Revision: 203151
> URL: http://svn.freebsd.org/changeset/base/203151
>
> Log:
> =A0For our memory re-mapping trick to work
> =A0interrupts must be disabled through the
> =A0page_zero's or copys etc. Note that the
> =A0temporary mapping used by panic's may
> =A0cause us pain since int's may not be disabled.
> =A0When we get dumps working we may have to revist
> =A0this. Note that with this fix the build got
> =A0much much further.. until it hung on disk IO (I
> =A0would imagine thats the rge/msgring driver acting
> =A0up).
>
> Modified:
> =A0head/sys/mips/mips/pmap.c
>
> Modified: head/sys/mips/mips/pmap.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/sys/mips/mips/pmap.c =A0 Fri Jan 29 04:05:17 2010 =A0 =A0 =A0 =
=A0(r203150)
> +++ head/sys/mips/mips/pmap.c =A0 Fri Jan 29 04:07:38 2010 =A0 =A0 =A0 =
=A0(r203151)
> @@ -2101,14 +2101,20 @@ pmap_kenter_temporary(vm_paddr_t pa, int
> =A0 =A0 =A0 =A0} else {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int cpu;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct local_sysmaps *sysm;
> -
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* If this is used other than for dumps, we=
 may need to leave
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* interrupts disasbled on return. If cra=
sh dumps don't work when
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* we get to this point, we might want to=
 consider this (leaving things
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* disabled as a starting point ;-)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 disableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpu =3D PCPU_GET(cpuid);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm =3D &sysmap_lmem[cpu];
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Since this is for the debugger, no lock=
s or any other fun */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D mips_paddr_to_tlbpfn(pa) |=
 PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmap_TLB_update_kernel((vm_offset_t)sysm->C=
ADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 1;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmap_TLB_update_kernel((vm_offset_t)sysm->C=
ADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0va =3D (vm_offset_t)sysm->CADDR1;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableintr();
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0return ((void *)va);
> =A0}
> @@ -2126,7 +2132,9 @@ pmap_kenter_temporary_free(vm_paddr_t pa
> =A0 =A0 =A0 =A0cpu =3D PCPU_GET(cpuid);
> =A0 =A0 =A0 =A0sysm =3D &sysmap_lmem[cpu];
> =A0 =A0 =A0 =A0if (sysm->valid1) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 disableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmap_TLB_invalidate_kernel((vm_offset_t)sy=
sm->CADDR1);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 0;
> =A0 =A0 =A0 =A0}
> @@ -2272,11 +2280,13 @@ pmap_zero_page(vm_page_t m)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm =3D &sysmap_lmem[cpu];
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PMAP_LGMEM_LOCK(sysm);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_pin();
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 disableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D mips_paddr_to_tlbpfn(phys)=
 | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 1;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmap_TLB_update_kernel((vm_offset_t)sysm->=
CADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bzero(sysm->CADDR1, PAGE_SIZE);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmap_TLB_invalidate_kernel((vm_offset_t)sy=
sm->CADDR1);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_unpin();
> @@ -2326,12 +2336,14 @@ pmap_zero_page_area(vm_page_t m, int off
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpu =3D PCPU_GET(cpuid);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm =3D &sysmap_lmem[cpu];
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PMAP_LGMEM_LOCK(sysm);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 disableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_pin();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D mips_paddr_to_tlbpfn(phys)=
 | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmap_TLB_update_kernel((vm_offset_t)sysm->C=
ADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 1;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmap_TLB_update_kernel((vm_offset_t)sysm->C=
ADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bzero((char *)sysm->CADDR1 + off, size);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmap_TLB_invalidate_kernel((vm_offset_t)sy=
sm->CADDR1);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_unpin();
> @@ -2365,12 +2377,14 @@ pmap_zero_page_idle(vm_page_t m)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpu =3D PCPU_GET(cpuid);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm =3D &sysmap_lmem[cpu];
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PMAP_LGMEM_LOCK(sysm);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 disableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_pin();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D mips_paddr_to_tlbpfn(phys)=
 | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmap_TLB_update_kernel((vm_offset_t)sysm->C=
ADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 1;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmap_TLB_update_kernel((vm_offset_t)sysm->C=
ADDR1, sysm->CMAP1);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bzero(sysm->CADDR1, PAGE_SIZE);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmap_TLB_invalidate_kernel((vm_offset_t)sy=
sm->CADDR1);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->valid1 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_unpin();
> @@ -2441,6 +2455,7 @@ pmap_copy_page(vm_page_t src, vm_page_t
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm =3D &sysmap_lmem[cpu]=
;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PMAP_LGMEM_LOCK(sysm);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_pin();
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 disableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (phy_src < MIPS_KSEG0_L=
ARGEST_PHYS) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* one sid=
e needs mapping - dest */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0va_src =3D=
 MIPS_PHYS_TO_CACHED(phy_src);
> @@ -2476,6 +2491,7 @@ pmap_copy_page(vm_page_t src, vm_page_t
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->CMAP=
2 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sysm->vali=
d2 =3D 0;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableintr();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sched_unpin();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PMAP_LGMEM_UNLOCK(sysm);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
>

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 05:38:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56BD1106568D;
	Fri, 29 Jan 2010 05:38:42 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 45CBB8FC17;
	Fri, 29 Jan 2010 05:38:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T5cgGE066665;
	Fri, 29 Jan 2010 05:38:42 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T5cg2s066663;
	Fri, 29 Jan 2010 05:38:42 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001290538.o0T5cg2s066663@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 29 Jan 2010 05:38: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: r203152 - head/sys/mips/mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 05:38:42 -0000

Author: rrs
Date: Fri Jan 29 05:38:41 2010
New Revision: 203152
URL: http://svn.freebsd.org/changeset/base/203152

Log:
  Follow Neel's suggestion and switch to using
  restoreint() in combination with saving off the
  old level. That way we don't blast out the old
  level.

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Fri Jan 29 04:07:38 2010	(r203151)
+++ head/sys/mips/mips/pmap.c	Fri Jan 29 05:38:41 2010	(r203152)
@@ -2085,7 +2085,7 @@ void *
 pmap_kenter_temporary(vm_paddr_t pa, int i)
 {
 	vm_offset_t va;
-
+	int int_level;
 	if (i != 0)
 		printf("%s: ERROR!!! More than one page of virtual address mapping not supported\n",
 		    __func__);
@@ -2106,7 +2106,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int
 		 * we get to this point, we might want to consider this (leaving things
 		 * disabled as a starting point ;-)
 	 	 */
-		disableintr();
+		int_level = disableintr();
 		cpu = PCPU_GET(cpuid);
 		sysm = &sysmap_lmem[cpu];
 		/* Since this is for the debugger, no locks or any other fun */
@@ -2114,7 +2114,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int
 		sysm->valid1 = 1;
 		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		va = (vm_offset_t)sysm->CADDR1;
-		enableintr();
+		restoreintr(int_level);
 	}
 	return ((void *)va);
 }
@@ -2123,6 +2123,7 @@ void
 pmap_kenter_temporary_free(vm_paddr_t pa)
 {
 	int cpu;
+	int int_level;
 	struct local_sysmaps *sysm;
 
 	if (pa < MIPS_KSEG0_LARGEST_PHYS) {
@@ -2132,9 +2133,9 @@ pmap_kenter_temporary_free(vm_paddr_t pa
 	cpu = PCPU_GET(cpuid);
 	sysm = &sysmap_lmem[cpu];
 	if (sysm->valid1) {
-		disableintr();
+		int_level = disableintr();
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
-		enableintr();
+		restoreintr(int_level);
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 	}
@@ -2245,7 +2246,7 @@ pmap_zero_page(vm_page_t m)
 {
 	vm_offset_t va;
 	vm_paddr_t phys = VM_PAGE_TO_PHYS(m);
-
+	int int_level;
 #ifdef VM_ALLOC_WIRED_TLB_PG_POOL
 	if (need_wired_tlb_page_pool) {
 		struct fpage *fp1;
@@ -2280,13 +2281,13 @@ pmap_zero_page(vm_page_t m)
 		sysm = &sysmap_lmem[cpu];
 		PMAP_LGMEM_LOCK(sysm);
 		sched_pin();
-		disableintr();
+		int_level = disableintr();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
 		sysm->valid1 = 1;
 		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero(sysm->CADDR1, PAGE_SIZE);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
-		enableintr();
+		restoreintr(int_level);
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 		sched_unpin();
@@ -2306,7 +2307,7 @@ pmap_zero_page_area(vm_page_t m, int off
 {
 	vm_offset_t va;
 	vm_paddr_t phys = VM_PAGE_TO_PHYS(m);
-
+	int int_level;
 #ifdef VM_ALLOC_WIRED_TLB_PG_POOL
 	if (need_wired_tlb_page_pool) {
 		struct fpage *fp1;
@@ -2336,14 +2337,14 @@ pmap_zero_page_area(vm_page_t m, int off
 		cpu = PCPU_GET(cpuid);
 		sysm = &sysmap_lmem[cpu];
 		PMAP_LGMEM_LOCK(sysm);
-		disableintr();
+		int_level = disableintr();
 		sched_pin();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
 		sysm->valid1 = 1;
 		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero((char *)sysm->CADDR1 + off, size);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
-		enableintr();
+		restoreintr(int_level);
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 		sched_unpin();
@@ -2356,7 +2357,7 @@ pmap_zero_page_idle(vm_page_t m)
 {
 	vm_offset_t va;
 	vm_paddr_t phys = VM_PAGE_TO_PHYS(m);
-
+	int int_level;
 #ifdef VM_ALLOC_WIRED_TLB_PG_POOL
 	if (need_wired_tlb_page_pool) {
 		sched_pin();
@@ -2377,14 +2378,14 @@ pmap_zero_page_idle(vm_page_t m)
 		cpu = PCPU_GET(cpuid);
 		sysm = &sysmap_lmem[cpu];
 		PMAP_LGMEM_LOCK(sysm);
-		disableintr();
+		int_level = disableintr();
 		sched_pin();
 		sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE;
 		sysm->valid1 = 1;
 		pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1);
 		bzero(sysm->CADDR1, PAGE_SIZE);
 		pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1);
-		enableintr();
+		restoreintr(int_level);
 		sysm->CMAP1 = 0;
 		sysm->valid1 = 0;
 		sched_unpin();
@@ -2405,7 +2406,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
 	vm_offset_t va_src, va_dst;
 	vm_paddr_t phy_src = VM_PAGE_TO_PHYS(src);
 	vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst);
-
+	int int_level;
 #ifdef VM_ALLOC_WIRED_TLB_PG_POOL
 	if (need_wired_tlb_page_pool) {
 		struct fpage *fp1, *fp2;
@@ -2455,7 +2456,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
 			sysm = &sysmap_lmem[cpu];
 			PMAP_LGMEM_LOCK(sysm);
 			sched_pin();
-			disableintr();
+			int_level = disableintr();
 			if (phy_src < MIPS_KSEG0_LARGEST_PHYS) {
 				/* one side needs mapping - dest */
 				va_src = MIPS_PHYS_TO_CACHED(phy_src);
@@ -2491,7 +2492,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
 				sysm->CMAP2 = 0;
 				sysm->valid2 = 0;
 			}
-			enableintr();
+			restoreintr(int_level);
 			sched_unpin();
 			PMAP_LGMEM_UNLOCK(sysm);
 		}

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:00:42 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89722106566C;
	Fri, 29 Jan 2010 10:00:42 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76D458FC14;
	Fri, 29 Jan 2010 10:00:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TA0goH024209;
	Fri, 29 Jan 2010 10:00:42 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TA0gbM024204;
	Fri, 29 Jan 2010 10:00:42 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201001291000.o0TA0gbM024204@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 29 Jan 2010 10:00: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: r203155 - head/sbin/restore
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:00:42 -0000

Author: jh
Date: Fri Jan 29 10:00:42 2010
New Revision: 203155
URL: http://svn.freebsd.org/changeset/base/203155

Log:
  - Cast time_t, int64_t and some int32_t values to intmax_t and use "%jd"
    in format strings.
  - Use (void) instead of (void *) when discarding strcat(3) return value.
  - Format string fixes to match variable types.
  - Change canon() len parameter and getcmd() size parameter type from
    int to size_t.
  - Style Makefile and increase WARNS to 2.
  
  PR:		bin/140061
  Submitted by:	uqs
  Approved by:	trasz (mentor)

Modified:
  head/sbin/restore/Makefile
  head/sbin/restore/dirs.c
  head/sbin/restore/extern.h
  head/sbin/restore/interactive.c
  head/sbin/restore/tape.c

Modified: head/sbin/restore/Makefile
==============================================================================
--- head/sbin/restore/Makefile	Fri Jan 29 06:39:57 2010	(r203154)
+++ head/sbin/restore/Makefile	Fri Jan 29 10:00:42 2010	(r203155)
@@ -5,11 +5,11 @@
 
 PROG=	restore
 LINKS=	${BINDIR}/restore ${BINDIR}/rrestore
-CFLAGS+=-DRRESTORE -D_ACL_PRIVATE
-WARNS?=	0
-SRCS=	main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c \
-	dumprmt.c
 MAN=	restore.8
 MLINKS=	restore.8 rrestore.8
+SRCS=	main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c \
+	dumprmt.c
+WARNS?=	2
+CFLAGS+= -DRRESTORE -D_ACL_PRIVATE
 
 .include 

Modified: head/sbin/restore/dirs.c
==============================================================================
--- head/sbin/restore/dirs.c	Fri Jan 29 06:39:57 2010	(r203154)
+++ head/sbin/restore/dirs.c	Fri Jan 29 10:00:42 2010	(r203155)
@@ -53,6 +53,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -139,9 +140,9 @@ extractdirs(int genmode)
 	vprintf(stdout, "Extract directories from tape\n");
 	if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0')
 		tmpdir = _PATH_TMP;
-	(void) sprintf(dirfile, "%s/rstdir%ld", tmpdir, dumpdate);
+	(void) sprintf(dirfile, "%s/rstdir%jd", tmpdir, (intmax_t)dumpdate);
 	if (command != 'r' && command != 'R') {
-		(void *) strcat(dirfile, "-XXXXXX");
+		(void) strcat(dirfile, "-XXXXXX");
 		fd = mkstemp(dirfile);
 	} else
 		fd = open(dirfile, O_RDWR|O_CREAT|O_EXCL, 0666);
@@ -152,9 +153,10 @@ extractdirs(int genmode)
 		done(1);
 	}
 	if (genmode != 0) {
-		(void) sprintf(modefile, "%s/rstmode%ld", tmpdir, dumpdate);
+		(void) sprintf(modefile, "%s/rstmode%jd", tmpdir,
+		    (intmax_t)dumpdate);
 		if (command != 'r' && command != 'R') {
-			(void *) strcat(modefile, "-XXXXXX");
+			(void) strcat(modefile, "-XXXXXX");
 			fd = mkstemp(modefile);
 		} else
 			fd = open(modefile, O_RDWR|O_CREAT|O_EXCL, 0666);
@@ -257,8 +259,8 @@ treescan(char *pname, ino_t ino, long (*
 	while (dp != NULL) {
 		locname[namelen] = '\0';
 		if (namelen + dp->d_namlen >= sizeof(locname)) {
-			fprintf(stderr, "%s%s: name exceeds %d char\n",
-				locname, dp->d_name, sizeof(locname) - 1);
+			fprintf(stderr, "%s%s: name exceeds %zu char\n",
+			    locname, dp->d_name, sizeof(locname) - 1);
 		} else {
 			(void)strlcat(locname, dp->d_name, sizeof(locname));
 			treescan(locname, dp->d_ino, todo);
@@ -354,7 +356,7 @@ putdir(char *buf, long size)
 				   "reclen not multiple of 4 ");
 			if (dp->d_reclen < DIRSIZ(0, dp))
 				vprintf(stdout,
-				   "reclen less than DIRSIZ (%d < %d) ",
+				   "reclen less than DIRSIZ (%d < %zu) ",
 				   dp->d_reclen, DIRSIZ(0, dp));
 #if NAME_MAX < 255
 			if (dp->d_namlen > NAME_MAX)
@@ -566,7 +568,8 @@ setdirmodes(int flags)
 	if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0')
 		tmpdir = _PATH_TMP;
 	if (command == 'r' || command == 'R')
-		(void) sprintf(modefile, "%s/rstmode%ld", tmpdir, dumpdate);
+		(void) sprintf(modefile, "%s/rstmode%jd", tmpdir,
+		    (intmax_t)dumpdate);
 	if (modefile[0] == '#') {
 		panic("modefile not defined\n");
 		fprintf(stderr, "directory mode, owner, and times not set\n");

Modified: head/sbin/restore/extern.h
==============================================================================
--- head/sbin/restore/extern.h	Fri Jan 29 06:39:57 2010	(r203154)
+++ head/sbin/restore/extern.h	Fri Jan 29 10:00:42 2010	(r203155)
@@ -34,7 +34,7 @@ struct entry	*addentry(char *, ino_t, in
 long		 addfile(char *, ino_t, int);
 int		 addwhiteout(char *);
 void		 badentry(struct entry *, char *);
-void	 	 canon(char *, char *, int);
+void	 	 canon(char *, char *, size_t);
 void		 checkrestore(void);
 void		 closemt(void);
 void		 createfiles(void);

Modified: head/sbin/restore/interactive.c
==============================================================================
--- head/sbin/restore/interactive.c	Fri Jan 29 06:39:57 2010	(r203154)
+++ head/sbin/restore/interactive.c	Fri Jan 29 10:00:42 2010	(r203155)
@@ -83,7 +83,7 @@ struct arglist {
 static char	*copynext(char *, char *);
 static int	 fcmp(const void *, const void *);
 static void	 formatf(struct afile *, int);
-static void	 getcmd(char *, char *, char *, int, struct arglist *);
+static void	 getcmd(char *, char *, char *, size_t, struct arglist *);
 struct dirent	*glob_readdir(void *);
 static int	 glob_stat(const char *, struct stat *);
 static void	 mkentry(char *, struct direct *, struct afile *);
@@ -301,7 +301,7 @@ loop:
  * eliminate any embedded ".." components.
  */
 static void
-getcmd(char *curdir, char *cmd, char *name, int size, struct arglist *ap)
+getcmd(char *curdir, char *cmd, char *name, size_t size, struct arglist *ap)
 {
 	char *cp;
 	static char input[BUFSIZ];
@@ -441,7 +441,7 @@ copynext(char *input, char *output)
  * remove any embedded "." and ".." components.
  */
 void
-canon(char *rawname, char *canonname, int len)
+canon(char *rawname, char *canonname, size_t len)
 {
 	char *cp, *np;
 

Modified: head/sbin/restore/tape.c
==============================================================================
--- head/sbin/restore/tape.c	Fri Jan 29 06:39:57 2010	(r203154)
+++ head/sbin/restore/tape.c	Fri Jan 29 10:00:42 2010	(r203155)
@@ -401,7 +401,7 @@ again:
 		char volno[sizeof("2147483647")];
 
 getpipecmdhdr:
-		(void)sprintf(volno, "%d", newvol);
+		(void)sprintf(volno, "%ld", newvol);
 		if (setenv("RESTORE_VOLUME", volno, 1) == -1) {
 			fprintf(stderr, "Cannot set $RESTORE_VOLUME: %s\n",
 			    strerror(errno));
@@ -433,7 +433,8 @@ gethdr:
 		goto again;
 	}
 	if (tmpbuf.c_volume != volno) {
-		fprintf(stderr, "Wrong volume (%ld)\n", tmpbuf.c_volume);
+		fprintf(stderr, "Wrong volume (%jd)\n",
+		    (intmax_t)tmpbuf.c_volume);
 		volno = 0;
 		goto again;
 	}
@@ -454,8 +455,8 @@ gethdr:
  	 * If coming to this volume at random, skip to the beginning
  	 * of the next record.
  	 */
-	dprintf(stdout, "last rec %qd, tape starts with %qd\n", prevtapea,
-	    tmpbuf.c_tapea);
+	dprintf(stdout, "last rec %jd, tape starts with %jd\n",
+	    (intmax_t)prevtapea, (intmax_t)tmpbuf.c_tapea);
  	if (tmpbuf.c_type == TS_TAPE) {
  		if (curfile.action != USING) {
 			/*
@@ -554,8 +555,8 @@ printdumpinfo(void)
 	    (spcl.c_ddate == 0) ? "the epoch\n" : ctime(&t));
 	if (spcl.c_host[0] == '\0')
 		return;
-	fprintf(stderr, "Level %ld dump of %s on %s:%s\n",
-		spcl.c_level, spcl.c_filesys, spcl.c_host, spcl.c_dev);
+	fprintf(stderr, "Level %jd dump of %s on %s:%s\n",
+	    (intmax_t)spcl.c_level, spcl.c_filesys, spcl.c_host, spcl.c_dev);
 	fprintf(stderr, "Label: %s\n", spcl.c_label);
 }
 
@@ -1282,7 +1283,7 @@ getmore:
 			return;
 		}
 		if (rd % TP_BSIZE != 0)
-			panic("partial block read: %d should be %d\n",
+			panic("partial block read: %ld should be %ld\n",
 				rd, ntrec * TP_BSIZE);
 		terminateinput();
 		memmove(&tapebuf[rd], &endoftapemark, (long)TP_BSIZE);
@@ -1465,8 +1466,8 @@ accthdr(struct s_spcl *header)
 	if (header->c_type == TS_TAPE) {
 		fprintf(stderr, "Volume header ");
  		if (header->c_firstrec)
- 			fprintf(stderr, "begins with record %qd",
- 				header->c_firstrec);
+ 			fprintf(stderr, "begins with record %jd",
+			    (intmax_t)header->c_firstrec);
  		fprintf(stderr, "\n");
 		previno = 0x7fffffff;
 		return;

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:02:51 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4521B1065676;
	Fri, 29 Jan 2010 10:02:51 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 333B28FC13;
	Fri, 29 Jan 2010 10:02:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TA2pFx024719;
	Fri, 29 Jan 2010 10:02:51 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TA2pUN024717;
	Fri, 29 Jan 2010 10:02:51 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201001291002.o0TA2pUN024717@svn.freebsd.org>
From: Rui Paulo 
Date: Fri, 29 Jan 2010 10:02: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: r203156 - head/sys/dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:02:51 -0000

Author: rpaulo
Date: Fri Jan 29 10:02:50 2010
New Revision: 203156
URL: http://svn.freebsd.org/changeset/base/203156

Log:
  Replace Id keyword with the FreeBSD keyword.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c	Fri Jan 29 10:00:42 2010	(r203155)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c	Fri Jan 29 10:02:50 2010	(r203156)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_power.c,v 1.6 2008/11/11 00:11:30 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:04:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5236E1065693;
	Fri, 29 Jan 2010 10:04:01 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 40F318FC13;
	Fri, 29 Jan 2010 10:04:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TA41Ox025047;
	Fri, 29 Jan 2010 10:04:01 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TA41SJ025045;
	Fri, 29 Jan 2010 10:04:01 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201001291004.o0TA41SJ025045@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 29 Jan 2010 10:04: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: r203157 - head/sbin/restore
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:04:01 -0000

Author: jh
Date: Fri Jan 29 10:04:00 2010
New Revision: 203157
URL: http://svn.freebsd.org/changeset/base/203157

Log:
  - Handle short reads when the -P option is used. Short reads must be
    handled when reading from pipes.
  - Remove dead code related to the -P option from getvol(). pipein and
    pipecmdin are never set at the same time.
  
  PR:		bin/121502
  Approved by:	trasz (mentor)
  MFC after:	2 weeks

Modified:
  head/sbin/restore/tape.c

Modified: head/sbin/restore/tape.c
==============================================================================
--- head/sbin/restore/tape.c	Fri Jan 29 10:02:50 2010	(r203156)
+++ head/sbin/restore/tape.c	Fri Jan 29 10:04:00 2010	(r203157)
@@ -333,10 +333,6 @@ getvol(long nextvol)
 		}
 		if (volno == 1)
 			return;
-		if (pipecmdin) {
-			closemt();
-			goto getpipecmdhdr;
-		}
 		goto gethdr;
 	}
 again:
@@ -400,7 +396,6 @@ again:
 	if (pipecmdin) {
 		char volno[sizeof("2147483647")];
 
-getpipecmdhdr:
 		(void)sprintf(volno, "%ld", newvol);
 		if (setenv("RESTORE_VOLUME", volno, 1) == -1) {
 			fprintf(stderr, "Cannot set $RESTORE_VOLUME: %s\n",
@@ -1205,17 +1200,17 @@ getmore:
 	 * Check for mid-tape short read error.
 	 * If found, skip rest of buffer and start with the next.
 	 */
-	if (!pipein && numtrec < ntrec && i > 0) {
+	if (!pipein && !pipecmdin && numtrec < ntrec && i > 0) {
 		dprintf(stdout, "mid-media short read error.\n");
 		numtrec = ntrec;
 	}
 	/*
 	 * Handle partial block read.
 	 */
-	if (pipein && i == 0 && rd > 0)
+	if ((pipein || pipecmdin) && i == 0 && rd > 0)
 		i = rd;
 	else if (i > 0 && i != ntrec * TP_BSIZE) {
-		if (pipein) {
+		if (pipein || pipecmdin) {
 			rd += i;
 			cnt -= i;
 			if (cnt > 0)

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:07:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A54D106566C;
	Fri, 29 Jan 2010 10:07:18 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 47EDA8FC22;
	Fri, 29 Jan 2010 10:07:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TA7Ic2025823;
	Fri, 29 Jan 2010 10:07:18 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TA7IaD025812;
	Fri, 29 Jan 2010 10:07:18 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201001291007.o0TA7IaD025812@svn.freebsd.org>
From: Rui Paulo 
Date: Fri, 29 Jan 2010 10:07: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: r203158 - head/sys/dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:07:18 -0000

Author: rpaulo
Date: Fri Jan 29 10:07:17 2010
New Revision: 203158
URL: http://svn.freebsd.org/changeset/base/203158

Log:
  Replace Id keyword with the FreeBSD keyword.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_beacon.c,v 1.8 2008/11/11 01:03:12 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_cal_adcdc.c,v 1.2 2008/11/11 17:43:23 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_cal_adcgain.c,v 1.2 2008/11/11 17:43:23 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_cal_iq.c,v 1.2 2008/11/11 17:43:23 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_eeprom.c,v 1.6 2008/11/10 04:08:04 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_keycache.c,v 1.3 2008/11/10 04:08:04 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_misc.c,v 1.12 2008/11/27 22:30:07 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_phy.c,v 1.4 2008/11/27 22:30:08 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_recv.c,v 1.7 2008/11/11 20:46:06 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h	Fri Jan 29 10:04:00 2010	(r203157)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h	Fri Jan 29 10:07:17 2010	(r203158)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416desc.h,v 1.7 2008/11/11 00:11:30 sam Exp $
+ * $FreeBSD$
  */
 #ifndef _ATH_AR5416_DESC_H_
 #define _ATH_AR5416_DESC_H

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:10:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7BEFD1065670;
	Fri, 29 Jan 2010 10:10:15 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 68A678FC18;
	Fri, 29 Jan 2010 10:10:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TAAFpa026556;
	Fri, 29 Jan 2010 10:10:15 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TAAFdD026543;
	Fri, 29 Jan 2010 10:10:15 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201001291010.o0TAAFdD026543@svn.freebsd.org>
From: Rui Paulo 
Date: Fri, 29 Jan 2010 10:10: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: r203159 - in head/sys: conf dev/ath/ath_hal
	dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:10:15 -0000

Author: rpaulo
Date: Fri Jan 29 10:10:14 2010
New Revision: 203159
URL: http://svn.freebsd.org/changeset/base/203159

Log:
  Add support for the AR9285 chipset, which is found on many netbooks
  available today.
  
  This card is a low power 802.11bgn that only does 11n rates up to MCS 7
  (that's 65 Mbps in 20Mhz mode and 135 in 40Mhz mode).
  802.11n is  not yet supported, but will be in the future.
  
  The driver still has a problem regarding to the setting of txpower on
  the card, so don't expect good performance yet. After fixing this
  problem, an MFC is possible.
  
  Special thanks to iXsystems and S Smirnov  for help
  with the purchase of a netbook with this card.
  
  Sponsored by:	iXsystems, Inc.

Added:
  head/sys/dev/ath/ath_hal/ar5416/ar9285.ini   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar5416/ar9285v2.ini   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
  head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c
  head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/conf/files	Fri Jan 29 10:10:14 2010	(r203159)
@@ -554,6 +554,9 @@ dev/ath/ath_hal/ah_eeprom_v3.c	optional 
 dev/ath/ath_hal/ah_eeprom_v14.c \
 	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
 	compile-with "${NORMAL_C} -I$S/dev/ath"
+dev/ath/ath_hal/ah_eeprom_v4k.c \
+	optional ath_hal | ath_ar9285 \
+	compile-with "${NORMAL_C} -I$S/dev/ath"
 dev/ath/ath_hal/ah_regdomain.c	optional ath \
 	compile-with "${NORMAL_C} -I$S/dev/ath"
 # ar5210
@@ -600,104 +603,119 @@ dev/ath/ath_hal/ar5211/ar5211_xmit.c		op
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 # ar5212
 dev/ath/ath_hal/ar5212/ar5212_ani.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_attach.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_beacon.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_eeprom.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_gpio.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_interrupts.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_keycache.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_misc.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_phy.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_power.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_recv.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_reset.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_rfgain.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5212/ar5212_xmit.c \
-	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 # ar5416 (depends on ar5212)
 dev/ath/ath_hal/ar5416/ar5416_ani.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_attach.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_beacon.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_cal.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_cal_iq.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_eeprom.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_gpio.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_interrupts.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_keycache.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_misc.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_phy.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_power.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_recv.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_reset.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar5416_xmit.c \
-	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \
+	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 # ar9160 (depends on ar5416)
 dev/ath/ath_hal/ar5416/ar9160_attach.c optional ath_hal | ath_ar9160 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
-# ar9280 (depends on ar5416)
-dev/ath/ath_hal/ar5416/ar9280_attach.c optional ath_hal | ath_ar9280 \
+# ar9280/ar9285 (depends on ar5416)
+dev/ath/ath_hal/ar5416/ar9280_attach.c optional ath_hal | ath_ar9280 | \
+	ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 # rf backends
 dev/ath/ath_hal/ar5212/ar2316.c	optional ath_rf2316 \
@@ -716,7 +734,7 @@ dev/ath/ath_hal/ar5212/ar5413.c	optional
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar5416/ar2133.c optional ath_hal | ath_ar5416 | ath_ar9160 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
-dev/ath/ath_hal/ar5416/ar9280.c optional ath_hal | ath_ar9280 \
+dev/ath/ath_hal/ar5416/ar9280.c optional ath_hal | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 # ath rate control algorithms
 dev/ath/ath_rate/amrr/amrr.c	optional ath_rate_amrr \

Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h	Fri Jan 29 10:10:14 2010	(r203159)
@@ -39,8 +39,6 @@
 #define AR5416_4K_NUM_CTLS              12
 #define AR5416_4K_NUM_BAND_EDGES       	4
 #define AR5416_4K_NUM_PD_GAINS         	2
-#define AR5416_4K_PD_GAINS_IN_MASK     	4
-#define AR5416_4K_PD_GAIN_ICEPTS        5
 #define AR5416_4K_MAX_CHAINS           	1
 
 /*
@@ -127,8 +125,8 @@ typedef struct CalCtlData4k {
 } __packed CAL_CTL_DATA_4K;
 
 typedef struct calDataPerFreq4k {
-	uint8_t		pwrPdg[AR5416_4K_NUM_PD_GAINS][AR5416_4K_PD_GAIN_ICEPTS];
-	uint8_t		vpdPdg[AR5416_4K_NUM_PD_GAINS][AR5416_4K_PD_GAIN_ICEPTS];
+	uint8_t		pwrPdg[AR5416_4K_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS];
+	uint8_t		vpdPdg[AR5416_4K_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS];
 } __packed CAL_DATA_PER_FREQ_4K;
 
 struct ar5416eeprom_4k {

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c	Fri Jan 29 10:10:14 2010	(r203159)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5212_power.c,v 1.4 2008/11/10 04:08:03 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 
@@ -38,8 +38,8 @@ static HAL_BOOL
 ar5212SetPowerModeAwake(struct ath_hal *ah, int setChip)
 {
 #define	AR_SCR_MASK \
-    (AR_SCR_SLDUR|AR_SCR_SLE|AR_SCR_SLE|AR_SCR_SLDTP|AR_SCR_SLDWP|\
-     AR_SCR_SLEPOL|AR_SCR_MIBIE)
+    (AR_SCR_SLDUR|AR_SCR_SLE|AR_SCR_SLDTP|AR_SCR_SLDWP|\
+     AR_SCR_SLEPOL|AR_SCR_MIBIE|AR_SCR_UNKNOWN)
 #define	POWER_UP_TIME	2000
 	uint32_t scr, val;
 	int i;

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h	Fri Jan 29 10:10:14 2010	(r203159)
@@ -700,6 +700,7 @@
 #define	AR_SCR_SLDWP		0x00080000 /* sleep duration write policy */
 #define	AR_SCR_SLEPOL		0x00100000 /* sleep policy mode */
 #define	AR_SCR_MIBIE		0x00200000 /* sleep perf cntrs MIB intr ena */
+#define	AR_SCR_UNKNOWN		0x00400000
 
 #define	AR_INTPEND_TRUE		0x00000001 /* interrupt pending */
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416.h	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h	Fri Jan 29 10:10:14 2010	(r203159)
@@ -44,6 +44,7 @@ typedef struct {
 #define	AR5416_CCA_MAX_GOOD_VALUE	-85
 #define	AR5416_CCA_MAX_HIGH_VALUE	-62
 #define	AR5416_CCA_MIN_BAD_VALUE	-140
+#define	AR9285_CCA_MAX_GOOD_VALUE	-118
 
 #define AR5416_SPUR_RSSI_THRESH		40
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c	Fri Jan 29 10:10:14 2010	(r203159)
@@ -183,7 +183,7 @@ ar5416AniControl(struct ath_hal *ah, HAL
 
 		if (level >= params->maxNoiseImmunityLevel) {
 			HALDEBUG(ah, HAL_DEBUG_ANY,
-			    "%s: level out of range (%u > %u)\n",
+			    "%s: immunity level out of range (%u > %u)\n",
 			    __func__, level, params->maxNoiseImmunityLevel);
 			return AH_FALSE;
 		}
@@ -267,7 +267,7 @@ ar5416AniControl(struct ath_hal *ah, HAL
 
 		if (level >= params->maxFirstepLevel) {
 			HALDEBUG(ah, HAL_DEBUG_ANY,
-			    "%s: level out of range (%u > %u)\n",
+			    "%s: firstep level out of range (%u > %u)\n",
 			    __func__, level, params->maxFirstepLevel);
 			return AH_FALSE;
 		}
@@ -285,7 +285,7 @@ ar5416AniControl(struct ath_hal *ah, HAL
 
 		if (level >= params->maxSpurImmunityLevel) {
 			HALDEBUG(ah, HAL_DEBUG_ANY,
-			    "%s: level out of range (%u > %u)\n",
+			    "%s: spur immunity level out of range (%u > %u)\n",
 			    __func__, level, params->maxSpurImmunityLevel);
 			return AH_FALSE;
 		}

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Fri Jan 29 10:10:14 2010	(r203159)
@@ -352,7 +352,7 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s
 	}
 
 	ar5416AniSetup(ah);			/* Anti Noise Immunity */
-	ar5416InitNfHistBuff(AH5416(ah)->ah_cal.nfCalHist);
+	ar5416InitNfHistBuff(ah, AH5416(ah)->ah_cal.nfCalHist);
 
 	HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__);
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Fri Jan 29 10:10:14 2010	(r203159)
@@ -173,7 +173,59 @@ ar5416InitCal(struct ath_hal *ah, const 
 	ichan = ath_hal_checkchannel(ah, chan);
 	HALASSERT(ichan != AH_NULL);
 
-	if (AR_SREV_MERLIN_10_OR_LATER(ah)) {
+	if (AR_SREV_KITE_12_OR_LATER(ah)) {
+		/* Clear the carrier leak cal bit */
+		OS_REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE);
+
+		if (IEEE80211_IS_CHAN_HT20(chan)) {
+			OS_REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL,
+			    AR_PHY_PARALLEL_CAL_ENABLE);
+			OS_REG_SET_BIT(ah, AR_PHY_TURBO, AR_PHY_FC_DYN2040_EN);
+			OS_REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL,
+			    AR_PHY_AGC_CONTROL_FLTR_CAL);
+			OS_REG_CLR_BIT(ah, AR_PHY_TPCRG1,
+			    AR_PHY_TPCRG1_PD_CAL_ENABLE);
+			OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
+			    AR_PHY_AGC_CONTROL_CAL);
+			/* Poll for offset calibration complete */
+			if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL,
+			    AR_PHY_AGC_CONTROL_CAL, 0)) {
+				HALDEBUG(ah, HAL_DEBUG_ANY,
+				    "%s: offset calibration failed to "
+				    "complete in 1ms; noisy environment?\n",
+				    __func__);
+				return AH_FALSE;
+			}
+			OS_REG_CLR_BIT(ah, AR_PHY_TURBO, AR_PHY_FC_DYN2040_EN);
+			OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL,
+			    AR_PHY_PARALLEL_CAL_ENABLE);
+		}
+		OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE);
+
+		/* Enable Rx Filter Cal */
+		OS_REG_CLR_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC);
+		OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
+		    AR_PHY_AGC_CONTROL_FLTR_CAL);
+		OS_REG_SET_BIT(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_CAL_ENABLE);
+
+		/* kick off the cal */
+		OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL);
+
+		/* Poll for offset calibration complete */
+		if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL,
+		    AR_PHY_AGC_CONTROL_CAL, 0)) {
+			HALDEBUG(ah, HAL_DEBUG_ANY,
+			    "%s: offset calibration did not complete in 1ms; "
+			    "noisy environment?\n", __func__);
+			return AH_FALSE;
+		}
+		/* Set the cl cal bit and rerun the cal a 2nd time */
+		/* Enable Rx Filter Cal */
+		OS_REG_SET_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC);
+		OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE);
+		OS_REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL,
+		    AR_PHY_AGC_CONTROL_FLTR_CAL);
+	} else if (AR_SREV_MERLIN_10_OR_LATER(ah)) {
 		/* Enable Rx Filter Cal */
 		OS_REG_CLR_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC);
 		OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
@@ -566,9 +618,15 @@ ar5416LoadNF(struct ath_hal *ah, const s
 }
 
 void
-ar5416InitNfHistBuff(struct ar5212NfCalHist *h)
+ar5416InitNfHistBuff(struct ath_hal *ah, struct ar5212NfCalHist *h)
 {
 	int i, j;
+	int16_t privNF;
+
+	if (AR_SREV_KITE(ah))
+		privNF = AR9285_CCA_MAX_GOOD_VALUE;
+	else
+		privNF = AR5416_CCA_MAX_GOOD_VALUE;
 
 	for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) {
 		h[i].currIndex = 0;

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h	Fri Jan 29 10:10:14 2010	(r203159)
@@ -116,5 +116,5 @@ void	ar5416AdcGainCalCollect(struct ath_
 void	ar5416AdcGainCalibration(struct ath_hal *ah, uint8_t numChains);
 void	ar5416AdcDcCalCollect(struct ath_hal *ah);
 void	ar5416AdcDcCalibration(struct ath_hal *ah, uint8_t numChains);
-void	ar5416InitNfHistBuff(struct ar5212NfCalHist *h);
+void	ar5416InitNfHistBuff(struct ath_hal *ah, struct ar5212NfCalHist *h);
 #endif /* _ATH_AR5416_CAL_H_ */

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c	Fri Jan 29 10:10:14 2010	(r203159)
@@ -146,7 +146,9 @@ ar5416GpioGet(struct ath_hal *ah, uint32
 	 * Read output value for all gpio's, shift it,
 	 * and verify whether the specific bit is set.
 	 */
-	if (AR_SREV_MERLIN_10_OR_LATER(ah))
+	if (AR_SREV_KITE_10_OR_LATER(ah))
+		bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR9285_GPIO_IN_VAL);
+	else if (AR_SREV_MERLIN_10_OR_LATER(ah))
 		bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR928X_GPIO_IN_VAL);
 	else
 		bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR_GPIO_IN_VAL);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri Jan 29 10:07:17 2010	(r203158)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri Jan 29 10:10:14 2010	(r203159)
@@ -23,6 +23,7 @@
 #include "ah_devid.h"
 
 #include "ah_eeprom_v14.h"
+#include "ah_eeprom_v4k.h"
 
 #include "ar5416/ar5416.h"
 #include "ar5416/ar5416reg.h"
@@ -59,15 +60,17 @@ static void ar5416InitPLL(struct ath_hal
 static HAL_BOOL ar5416SetBoardValues(struct ath_hal *, const struct ieee80211_channel *);
 static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah,
 	struct ar5416eeprom *pEepData, 
+	struct ar5416eeprom_4k *pEepData4k, 
 	const struct ieee80211_channel *chan, int16_t *ratesArray,
 	uint16_t cfgCtl, uint16_t AntennaReduction,
 	uint16_t twiceMaxRegulatoryPower, 
 	uint16_t powerLimit);
 static HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah,
 	struct ar5416eeprom *pEepData,
+	struct ar5416eeprom_4k *pEepData4k,
 	const struct ieee80211_channel *chan,
 	int16_t *pTxPowerIndexOffset);
-static uint16_t ar5416GetMaxEdgePower(uint16_t freq,
+static uint16_t ar5416GetMaxEdgePower(struct ath_hal *ah, uint16_t freq,
 	CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz);
 static void ar5416GetTargetPowers(struct ath_hal *ah, 
 	const struct ieee80211_channel *chan, CAL_TARGET_POWER_HT *powInfo,
@@ -83,6 +86,7 @@ static int16_t interpolate(uint16_t targ
 static void ar5416Set11nRegs(struct ath_hal *ah, const struct ieee80211_channel *chan);
 static void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, 
 	const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet,
+	CAL_DATA_PER_FREQ_4K *pRawDataSet4k,
 	uint8_t * bChans, uint16_t availPiers,
 	uint16_t tPdGainOverlap, int16_t *pMinCalPower,
 	uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues,
@@ -477,7 +481,12 @@ ar5416InitDMA(struct ath_hal *ah)
 	 * reduce the number of usable entries in PCU TXBUF to avoid
 	 * wrap around.
 	 */
-	OS_REG_WRITE(ah, AR_PCU_TXBUF_CTRL, AR_PCU_TXBUF_CTRL_USABLE_SIZE);
+	if (AR_SREV_KITE(ah))
+		OS_REG_WRITE(ah, AR_PCU_TXBUF_CTRL,
+		    AR_9285_PCU_TXBUF_CTRL_USABLE_SIZE);
+	else 
+		OS_REG_WRITE(ah, AR_PCU_TXBUF_CTRL,
+		    AR_PCU_TXBUF_CTRL_USABLE_SIZE);
 }
 
 static void
@@ -801,6 +810,7 @@ ar5416SetTransmitPower(struct ath_hal *a
 #define N(a)            (sizeof (a) / sizeof (a[0]))
 
     MODAL_EEP_HEADER	*pModal;
+    MODAL_EEP4K_HEADER	*pModal4k;
     struct ath_hal_5212 *ahp = AH5212(ah);
     int16_t		ratesArray[Ar5416RateSize];
     int16_t		txPowerIndexOffset = 0;
@@ -812,8 +822,10 @@ ar5416SetTransmitPower(struct ath_hal *a
     uint16_t		twiceAntennaReduction;
     uint16_t		twiceMaxRegulatoryPower;
     int16_t		maxPower;
-    HAL_EEPROM_v14 *ee = AH_PRIVATE(ah)->ah_eeprom;
-    struct ar5416eeprom	*pEepData = &ee->ee_base;
+    HAL_EEPROM_v14 *ee;
+    HAL_EEPROM_v4k *ee4k;
+    struct ar5416eeprom	*pEepData;
+    struct ar5416eeprom_4k *pEepData4k;
 
     HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1);
 
@@ -823,15 +835,32 @@ ar5416SetTransmitPower(struct ath_hal *a
     powerLimit = chan->ic_maxregpower * 2;
     twiceAntennaReduction = chan->ic_maxantgain;
     twiceMaxRegulatoryPower = AH_MIN(MAX_RATE_POWER, AH_PRIVATE(ah)->ah_powerLimit); 
-    pModal = &pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)];
+    if (AR_SREV_KITE(ah)) {
+        ee4k = AH_PRIVATE(ah)->ah_eeprom;
+	pEepData4k = &ee4k->ee_base;
+	pModal4k = &pEepData4k->modalHeader;
+	ee = NULL;
+	pEepData = NULL;
+	pModal = NULL;
+    } else {
+	ee = AH_PRIVATE(ah)->ah_eeprom;
+	pEepData = &ee->ee_base;
+	pModal = &pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)];
+	ee4k = NULL;
+	pEepData4k = NULL;
+	pModal4k = NULL;
+    }
     HALDEBUG(ah, HAL_DEBUG_RESET, "%s Channel=%u CfgCtl=%u\n",
 	__func__,chan->ic_freq, cfgCtl );      
   
     if (IS_EEP_MINOR_V2(ah)) {
-        ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc;
+	if (pModal)
+	    ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc;
+	else
+	    ht40PowerIncForPdadc = pModal4k->ht40PowerIncForPdadc;
     }
- 
-    if (!ar5416SetPowerPerRateTable(ah, pEepData,  chan,
+
+    if (!ar5416SetPowerPerRateTable(ah, pEepData, pEepData4k, chan,
                                     &ratesArray[0],cfgCtl,
                                     twiceAntennaReduction,
 				    twiceMaxRegulatoryPower, powerLimit)) {
@@ -840,7 +869,8 @@ ar5416SetTransmitPower(struct ath_hal *a
         return AH_FALSE;
     }
 
-    if (!ar5416SetPowerCalTable(ah,  pEepData, chan, &txPowerIndexOffset)) {
+    if (!ar5416SetPowerCalTable(ah, pEepData, pEepData4k, chan,
+	&txPowerIndexOffset)) {
         HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unable to set power table\n",
 	    __func__);
         return AH_FALSE;
@@ -947,10 +977,11 @@ ar5416SetTransmitPower(struct ath_hal *a
     }
 
     /* Write the Power subtraction for dynamic chain changing, for per-packet powertx */
-    OS_REG_WRITE(ah, AR_PHY_POWER_TX_SUB,
-        POW_SM(pModal->pwrDecreaseFor3Chain, 6)
-          | POW_SM(pModal->pwrDecreaseFor2Chain, 0)
-    );
+    if (pModal)
+	    OS_REG_WRITE(ah, AR_PHY_POWER_TX_SUB,
+		POW_SM(pModal->pwrDecreaseFor3Chain, 6)
+		  | POW_SM(pModal->pwrDecreaseFor2Chain, 0)
+	    );
     return AH_TRUE;
 #undef POW_SM
 #undef N
@@ -1188,23 +1219,42 @@ ar5416InitPLL(struct ath_hal *ah, const 
 static HAL_BOOL
 ar5416SetBoardValues(struct ath_hal *ah, const struct ieee80211_channel *chan)
 {
-    const HAL_EEPROM_v14 *ee = AH_PRIVATE(ah)->ah_eeprom;
-    const struct ar5416eeprom *eep = &ee->ee_base;
+    const HAL_EEPROM_v14 *ee;
+    const HAL_EEPROM_v4k *ee4k;
+    const struct ar5416eeprom *eep;
+    const struct ar5416eeprom_4k *eep4k;
     const MODAL_EEP_HEADER *pModal;
+    const MODAL_EEP4K_HEADER *pModal4k;
     int			i, regChainOffset;
     uint8_t		txRxAttenLocal;    /* workaround for eeprom versions <= 14.2 */
 
     HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1);
-    pModal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)];
+
+    if (AR_SREV_KITE(ah)) {
+	    ee4k = AH_PRIVATE(ah)->ah_eeprom;
+	    eep4k = &ee4k->ee_base;
+	    pModal4k = &eep4k->modalHeader;
+	    ee = NULL;
+	    eep = NULL;
+	    pModal = NULL;
+    } else {
+	    ee = AH_PRIVATE(ah)->ah_eeprom;
+	    eep = &ee->ee_base;
+	    pModal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)];
+	    ee4k = NULL;
+	    eep4k = NULL;
+	    pModal4k = NULL;
+    }
 
     /* NB: workaround for eeprom versions <= 14.2 */
     txRxAttenLocal = IEEE80211_IS_CHAN_2GHZ(chan) ? 23 : 44;
 
-    OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon);
+    OS_REG_WRITE(ah, AR_PHY_SWITCH_COM,
+	(pModal) ? pModal->antCtrlCommon :
+	pModal4k->antCtrlCommon);
     for (i = 0; i < AR5416_MAX_CHAINS; i++) { 
-	   if (AR_SREV_MERLIN(ah)) {
-		if (i >= 2) break;
-	   }
+	   if (AR_SREV_KITE(ah) && i >= 1) break;
+	   if (AR_SREV_MERLIN(ah) && i >= 2) break;
        	   if (AR_SREV_OWL_20_OR_LATER(ah) &&
             (AH5416(ah)->ah_rx_chainmask == 0x5 ||
 	     AH5416(ah)->ah_tx_chainmask == 0x5) && i != 0) {
@@ -1216,12 +1266,15 @@ ar5416SetBoardValues(struct ath_hal *ah,
             regChainOffset = i * 0x1000;
         }
 
-        OS_REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset, pModal->antCtrlChain[i]);
+        OS_REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset,
+	    (pModal) ? pModal->antCtrlChain[i] : pModal4k->antCtrlChain[i]);
         OS_REG_WRITE(ah, AR_PHY_TIMING_CTRL4 + regChainOffset, 
         	(OS_REG_READ(ah, AR_PHY_TIMING_CTRL4 + regChainOffset) &
         	~(AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF | AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF)) |
-        	SM(pModal->iqCalICh[i], AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) |
-        	SM(pModal->iqCalQCh[i], AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF));
+        	SM((pModal) ? pModal->iqCalICh[i] : pModal4k->iqCalICh[i],
+		    AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) |
+        	SM((pModal) ? pModal->iqCalQCh[i] : pModal4k->iqCalQCh[i],
+		    AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF));
 
         /*
          * Large signal upgrade.
@@ -1229,54 +1282,74 @@ ar5416SetBoardValues(struct ath_hal *ah,
          */
 
         if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) {
+	    int txRxAtten;
+	    if (IS_EEP_MINOR_V3(ah)) {
+		if (pModal) txRxAtten = pModal->txRxAttenCh[i];
+		else txRxAtten = pModal4k->txRxAttenCh[i];
+	    } else
+		txRxAtten = txRxAttenLocal;
+
             OS_REG_WRITE(ah, AR_PHY_RXGAIN + regChainOffset, 
 		(OS_REG_READ(ah, AR_PHY_RXGAIN + regChainOffset) & ~AR_PHY_RXGAIN_TXRX_ATTEN) |
-			SM(IS_EEP_MINOR_V3(ah)  ? pModal->txRxAttenCh[i] : txRxAttenLocal,
-				AR_PHY_RXGAIN_TXRX_ATTEN));
+			SM(txRxAtten, AR_PHY_RXGAIN_TXRX_ATTEN));
 
             OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset, 
 	    	(OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) & ~AR_PHY_GAIN_2GHZ_RXTX_MARGIN) |
-			SM(pModal->rxTxMarginCh[i], AR_PHY_GAIN_2GHZ_RXTX_MARGIN));
+			SM((pModal) ? pModal->rxTxMarginCh[i]: 
+			      pModal4k->rxTxMarginCh[i],
+			    AR_PHY_GAIN_2GHZ_RXTX_MARGIN));
         }
     }
 
-    OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, pModal->switchSettling);
-    OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, pModal->adcDesiredSize);
-    OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_PGA, pModal->pgaDesiredSize);
+    OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH,
+	(pModal) ? pModal->switchSettling : pModal4k->switchSettling);
+    OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC,
+	(pModal) ? pModal->adcDesiredSize : pModal4k->adcDesiredSize);
+    OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_PGA,
+	(pModal) ? pModal->pgaDesiredSize : pModal4k->pgaDesiredSize);
     OS_REG_WRITE(ah, AR_PHY_RF_CTL4,
-        SM(pModal->txEndToXpaOff, AR_PHY_RF_CTL4_TX_END_XPAA_OFF)
-        | SM(pModal->txEndToXpaOff, AR_PHY_RF_CTL4_TX_END_XPAB_OFF)
-        | SM(pModal->txFrameToXpaOn, AR_PHY_RF_CTL4_FRAME_XPAA_ON)
-        | SM(pModal->txFrameToXpaOn, AR_PHY_RF_CTL4_FRAME_XPAB_ON));
+                 SM((pModal) ? pModal->txEndToXpaOff : pModal4k->txEndToXpaOff,
+	             AR_PHY_RF_CTL4_TX_END_XPAA_OFF)
+               | SM((pModal) ? pModal->txEndToXpaOff : pModal4k->txEndToXpaOff,
+	             AR_PHY_RF_CTL4_TX_END_XPAB_OFF)
+               | SM((pModal) ? pModal->txFrameToXpaOn : pModal4k->txFrameToXpaOn,
+	             AR_PHY_RF_CTL4_FRAME_XPAA_ON)
+               | SM((pModal) ? pModal->txFrameToXpaOn : pModal4k->txFrameToXpaOn,
+	             AR_PHY_RF_CTL4_FRAME_XPAB_ON));
 
-    OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_A2_RX_ON, pModal->txEndToRxOn);
+    OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_A2_RX_ON,
+	            (pModal) ? pModal->txEndToRxOn : pModal4k->txEndToRxOn);
 
     if (AR_SREV_MERLIN_10_OR_LATER(ah)) {
 	OS_REG_RMW_FIELD(ah, AR_PHY_CCA, AR9280_PHY_CCA_THRESH62,
-	    pModal->thresh62);
+	    (pModal) ? pModal->thresh62 : pModal4k->thresh62);
 	OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62,
-	    pModal->thresh62);
+	    (pModal) ? pModal->thresh62 : pModal4k->thresh62);
     } else {
 	OS_REG_RMW_FIELD(ah, AR_PHY_CCA, AR_PHY_CCA_THRESH62,
-	    pModal->thresh62);
+	    (pModal) ? pModal->thresh62 : pModal4k->thresh62);
 	OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA_THRESH62,
-	    pModal->thresh62);
+	    (pModal) ? pModal->thresh62 : pModal4k->thresh62);
     }
     
     /* Minor Version Specific application */
     if (IS_EEP_MINOR_V2(ah)) {
-        OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2,  AR_PHY_TX_FRAME_TO_DATA_START, pModal->txFrameToDataStart);
-        OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2,  AR_PHY_TX_FRAME_TO_PA_ON, pModal->txFrameToPaOn);    
+        OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2,  AR_PHY_TX_FRAME_TO_DATA_START, 
+	                 (pModal) ? pModal->txFrameToDataStart : pModal4k->txFrameToDataStart);
+        OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2,  AR_PHY_TX_FRAME_TO_PA_ON,
+	                 (pModal) ? pModal->txFrameToPaOn : pModal4k->txFrameToPaOn);
     }	
     
     if (IS_EEP_MINOR_V3(ah)) {
 	if (IEEE80211_IS_CHAN_HT40(chan)) {
 		/* Overwrite switch settling with HT40 value */
-		OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, pModal->swSettleHt40);
+		OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH,
+		                 (pModal) ? pModal->swSettleHt40 : pModal4k->swSettleHt40);
 	}
 	
         if ((AR_SREV_OWL_20_OR_LATER(ah)) &&
             (  AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5)){
+            /* NB: no v4k EEPROM */
             /* Reg Offsets are swapped for logical mapping */
 		OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x1000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x1000) & ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) |
 			SM(pModal->bswMargin[2], AR_PHY_GAIN_2GHZ_BSW_MARGIN));
@@ -1288,16 +1361,22 @@ ar5416SetBoardValues(struct ath_hal *ah,
 			SM(pModal->bswAtten[1], AR_PHY_GAIN_2GHZ_BSW_ATTEN));
         } else {
 		OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x1000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x1000) & ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) |
-			SM(pModal->bswMargin[1], AR_PHY_GAIN_2GHZ_BSW_MARGIN));
+			SM((pModal) ? pModal->bswMargin[1] : 
+			  pModal4k->bswMargin[1], AR_PHY_GAIN_2GHZ_BSW_MARGIN));
 		OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x1000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x1000) & ~AR_PHY_GAIN_2GHZ_BSW_ATTEN) |
-			SM(pModal->bswAtten[1], AR_PHY_GAIN_2GHZ_BSW_ATTEN));
+			SM((pModal) ? pModal->bswAtten[1] :
+			  pModal4k->bswAtten[1], AR_PHY_GAIN_2GHZ_BSW_ATTEN));
 		OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x2000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x2000) & ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) |
-			SM(pModal->bswMargin[2],AR_PHY_GAIN_2GHZ_BSW_MARGIN));
+			SM((pModal) ? pModal->bswMargin[2] :
+			    pModal4k->bswMargin[2], AR_PHY_GAIN_2GHZ_BSW_MARGIN));
 		OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x2000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x2000) & ~AR_PHY_GAIN_2GHZ_BSW_ATTEN) |
-			SM(pModal->bswAtten[2], AR_PHY_GAIN_2GHZ_BSW_ATTEN));
+			SM((pModal) ? pModal->bswAtten[2] : 
+			  pModal4k->bswAtten[2], AR_PHY_GAIN_2GHZ_BSW_ATTEN));
         }
-        OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_MARGIN, pModal->bswMargin[0]);
-        OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_ATTEN, pModal->bswAtten[0]);
+        OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_MARGIN,
+	    (pModal) ? pModal->bswMargin[0] : pModal4k->bswMargin[0]);
+        OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_ATTEN,
+	    (pModal) ? pModal->bswAtten[0] : pModal4k->bswAtten[0]);
     }
     return AH_TRUE;
 }
@@ -1312,8 +1391,9 @@ ar5416SetBoardValues(struct ath_hal *ah,
  * Sets the transmit power in the baseband for the given
  * operating channel and mode.
  */
-static HAL_BOOL
+HAL_BOOL
 ar5416SetPowerPerRateTable(struct ath_hal *ah, struct ar5416eeprom *pEepData,
+    			   struct ar5416eeprom_4k *pEepData4k,
                            const struct ieee80211_channel *chan,
                            int16_t *ratesArray, uint16_t cfgCtl,
                            uint16_t AntennaReduction, 
@@ -1331,6 +1411,7 @@ ar5416SetPowerPerRateTable(struct ath_ha
 	int i;
 	int16_t  twiceLargestAntenna;
 	CAL_CTL_DATA *rep;
+	CAL_CTL_DATA_4K *rep4k;
 	CAL_TARGET_POWER_LEG targetPowerOfdm, targetPowerCck = {0, {0, 0, 0, 0}};
 	CAL_TARGET_POWER_LEG targetPowerOfdmExt = {0, {0, 0, 0, 0}}, targetPowerCckExt = {0, {0, 0, 0, 0}};
 	CAL_TARGET_POWER_HT  targetPowerHt20, targetPowerHt40 = {0, {0, 0, 0, 0}};
@@ -1347,15 +1428,22 @@ ar5416SetPowerPerRateTable(struct ath_ha
 	const uint16_t *pCtlMode;
 	uint16_t numCtlModes, ctlMode, freq;
 	CHAN_CENTERS centers;
+	int n2gcck, n2g20, n2g40, numctls;
 
 	ar5416GetChannelCenters(ah,  chan, ¢ers);
 
 	/* Compute TxPower reduction due to Antenna Gain */
 
-	twiceLargestAntenna = AH_MAX(AH_MAX(
-	    pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[0],
-	    pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[1]),
-	    pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[2]);
+	if (pEepData)
+		twiceLargestAntenna = AH_MAX(AH_MAX(
+		    pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[0],
+		    pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[1]),
+		    pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[2]);
+	else
+		twiceLargestAntenna = AH_MAX(AH_MAX(
+		    pEepData4k->modalHeader.antennaGainCh[0],
+		    pEepData4k->modalHeader.antennaGainCh[1]),
+		    pEepData4k->modalHeader.antennaGainCh[2]);
 #if 0
 	/* Turn it back on if we need to calculate per chain antenna gain reduction */
 	/* Use only if the expected gain > 6dbi */
@@ -1390,10 +1478,12 @@ ar5416SetPowerPerRateTable(struct ath_ha
 	case 1:
 		break;
 	case 2:
-		scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor2Chain;
+		if (pEepData)
+			scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor2Chain;
 		break;
 	case 3:
-		scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor3Chain;
+		if (pEepData)
+			scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor3Chain;
 		break;
 	default:
 		return AH_FALSE; /* Unsupported number of chains */
@@ -1401,36 +1491,56 @@ ar5416SetPowerPerRateTable(struct ath_ha
 
 	scaledPower = AH_MAX(0, scaledPower);
 
+	n2gcck = (pEepData) ? AR5416_NUM_2G_CCK_TARGET_POWERS :
+	    AR5416_4K_NUM_2G_CCK_TARGET_POWERS;
+	n2g20 = (pEepData) ? AR5416_NUM_2G_20_TARGET_POWERS :
+	    AR5416_4K_NUM_2G_20_TARGET_POWERS;
+	n2g40 = (pEepData) ? AR5416_NUM_2G_40_TARGET_POWERS :
+	    AR5416_4K_NUM_2G_40_TARGET_POWERS;
+
 	/* Get target powers from EEPROM - our baseline for TX Power */
 	if (IEEE80211_IS_CHAN_2GHZ(chan)) {
 		/* Setup for CTL modes */
 		numCtlModes = N(ctlModesFor11g) - SUB_NUM_CTL_MODES_AT_2G_40; /* CTL_11B, CTL_11G, CTL_2GHT20 */
 		pCtlMode = ctlModesFor11g;
 
-		ar5416GetTargetPowersLeg(ah,  chan, pEepData->calTargetPowerCck,
-				AR5416_NUM_2G_CCK_TARGET_POWERS, &targetPowerCck, 4, AH_FALSE);
-		ar5416GetTargetPowersLeg(ah,  chan, pEepData->calTargetPower2G,
-				AR5416_NUM_2G_20_TARGET_POWERS, &targetPowerOfdm, 4, AH_FALSE);
-		ar5416GetTargetPowers(ah,  chan, pEepData->calTargetPower2GHT20,
-				AR5416_NUM_2G_20_TARGET_POWERS, &targetPowerHt20, 8, AH_FALSE);
+		ar5416GetTargetPowersLeg(ah,  chan,
+		    (pEepData) ? pEepData->calTargetPowerCck :
+		        pEepData4k->calTargetPowerCck,
+		    n2gcck, &targetPowerCck, 4, AH_FALSE);
+		ar5416GetTargetPowersLeg(ah,  chan,
+		    (pEepData) ? pEepData->calTargetPower2G :
+		        pEepData4k->calTargetPower2G,
+		    n2g20, &targetPowerOfdm, 4, AH_FALSE);
+		ar5416GetTargetPowers(ah,  chan,
+		    (pEepData) ? pEepData->calTargetPower2GHT20 :
+		        pEepData4k->calTargetPower2GHT20,
+		    n2g20, &targetPowerHt20, 8, AH_FALSE);
 
 		if (IEEE80211_IS_CHAN_HT40(chan)) {
 			numCtlModes = N(ctlModesFor11g);    /* All 2G CTL's */
 
-			ar5416GetTargetPowers(ah,  chan, pEepData->calTargetPower2GHT40,
-				AR5416_NUM_2G_40_TARGET_POWERS, &targetPowerHt40, 8, AH_TRUE);
+			ar5416GetTargetPowers(ah, chan,
+			    (pEepData) ? pEepData->calTargetPower2GHT40 :
+			        pEepData4k->calTargetPower2GHT40,
+			    n2g40, &targetPowerHt40, 8, AH_TRUE);
 			/* Get target powers for extension channels */
-			ar5416GetTargetPowersLeg(ah,  chan, pEepData->calTargetPowerCck,
-				AR5416_NUM_2G_CCK_TARGET_POWERS, &targetPowerCckExt, 4, AH_TRUE);
-			ar5416GetTargetPowersLeg(ah,  chan, pEepData->calTargetPower2G,
-				AR5416_NUM_2G_20_TARGET_POWERS, &targetPowerOfdmExt, 4, AH_TRUE);
+			ar5416GetTargetPowersLeg(ah, chan,
+			    (pEepData) ? pEepData->calTargetPowerCck :
+			        pEepData4k->calTargetPowerCck,
+			    n2gcck, &targetPowerCckExt, 4, AH_TRUE);
+			ar5416GetTargetPowersLeg(ah, chan,
+			    (pEepData) ? pEepData->calTargetPower2G :
+			        pEepData4k->calTargetPower2G,
+			    n2g20, &targetPowerOfdmExt, 4, AH_TRUE);
 		}
 	} else {
 		/* Setup for CTL modes */
 		numCtlModes = N(ctlModesFor11a) - SUB_NUM_CTL_MODES_AT_5G_40; /* CTL_11A, CTL_5GHT20 */
 		pCtlMode = ctlModesFor11a;
 
-		ar5416GetTargetPowersLeg(ah,  chan, pEepData->calTargetPower5G,
+		/* NB: v4k EEPROM has no 5Ghz info */
+		ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower5G,
 				AR5416_NUM_5G_20_TARGET_POWERS, &targetPowerOfdm, 4, AH_FALSE);
 		ar5416GetTargetPowers(ah,  chan, pEepData->calTargetPower5GHT20,
 				AR5416_NUM_5G_20_TARGET_POWERS, &targetPowerHt20, 8, AH_FALSE);
@@ -1454,7 +1564,9 @@ ar5416SetPowerPerRateTable(struct ath_ha
 	 * The ctl value is encoded as [7:4] == test group, [3:0] == test mode.
 	 *
 	 */
+	numctls = (pEepData) ? AR5416_NUM_CTLS : AR5416_4K_NUM_CTLS;
 	for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) {
+		int ctlIndex;
 		HAL_BOOL isHt40CtlMode = (pCtlMode[ctlMode] == CTL_5GHT40) ||
 		    (pCtlMode[ctlMode] == CTL_2GHT40);
 		if (isHt40CtlMode) {
@@ -1465,18 +1577,34 @@ ar5416SetPowerPerRateTable(struct ath_ha
 			freq = centers.ctl_center;
 		}
 
+		ctlIndex = (pEepData) ? pEepData->ctlIndex[0] :
+		    pEepData4k->ctlIndex[0];
 		/* walk through each CTL index stored in EEPROM */
-		for (i = 0; (i < AR5416_NUM_CTLS) && pEepData->ctlIndex[i]; i++) {
+		for (i = 0; (i < numctls) && ctlIndex; i++) {
 			uint16_t twiceMinEdgePower;
+			CAL_CTL_EDGES *ctlEdge;
+
+			ctlIndex = (pEepData) ? pEepData->ctlIndex[i] :
+			    pEepData4k->ctlIndex[i];
 
 			/* compare test group from regulatory channel list with test mode from pCtlMode list */
-			if ((((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == pEepData->ctlIndex[i]) ||
+			if ((((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == ctlIndex) ||
 				(((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == 
-				 ((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))) {
-				rep = &(pEepData->ctlData[i]);
-				twiceMinEdgePower = ar5416GetMaxEdgePower(freq,
-							rep->ctlEdges[owl_get_ntxchains(AH5416(ah)->ah_tx_chainmask) - 1],
-							IEEE80211_IS_CHAN_2GHZ(chan));
+				 ((ctlIndex & CTL_MODE_M) | SD_NO_CTL))) {
+				if (pEepData) {
+					rep = &(pEepData->ctlData[i]);
+					ctlEdge = rep->ctlEdges[
+					    owl_get_ntxchains(
+						AH5416(ah)->ah_tx_chainmask) - 1];
+				} else {
+					rep4k = &(pEepData4k->ctlData[i]);
+					ctlEdge = rep4k->ctlEdges[
+					    owl_get_ntxchains(
+						AH5416(ah)->ah_tx_chainmask) - 1];
+				}
+				twiceMinEdgePower = ar5416GetMaxEdgePower(ah,
+				    freq, ctlEdge,
+				    IEEE80211_IS_CHAN_2GHZ(chan));
 				if ((cfgCtl & ~CTL_MODE_M) == SD_NO_CTL) {
 					/* Find the minimum of all CTL edge powers that apply to this channel */
 					twiceMaxEdgePower = AH_MIN(twiceMaxEdgePower, twiceMinEdgePower);
@@ -1590,13 +1718,19 @@ fbin2freq(uint8_t fbin, HAL_BOOL is2GHz)
  * Find the maximum conformance test limit for the given channel and CTL info
  */
 static uint16_t
-ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz)
+ar5416GetMaxEdgePower(struct ath_hal *ah,
+    uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz)
 {
     uint16_t twiceMaxEdgePower = AR5416_MAX_RATE_POWER;
-    int      i;
+    int      i, numBand;
+
+    if (AR_SREV_KITE(ah))
+	    numBand = AR5416_4K_NUM_BAND_EDGES;
+    else
+	    numBand = AR5416_NUM_BAND_EDGES;
 
     /* Get the edge power */
-    for (i = 0; (i < AR5416_NUM_BAND_EDGES) && (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED) ; i++) {
+    for (i = 0; (i < numBand) && (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED) ; i++) {
         /*
          * If there's an exact channel match or an inband flag set
          * on the lower channel use the given rdEdgePower
@@ -1743,11 +1877,13 @@ ar5416GetTargetPowersLeg(struct ath_hal 
  * points as well as from the nearest pier(s) to get a power detector
  * linear voltage to power level table.
  */
-static HAL_BOOL
+HAL_BOOL
 ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData,
+        struct ar5416eeprom_4k *pEepData4k,
 	const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset)
 {
-    CAL_DATA_PER_FREQ *pRawDataset;
+    CAL_DATA_PER_FREQ *pRawDataset = NULL;
+    CAL_DATA_PER_FREQ_4K *pRawDataset4k = NULL;
     uint8_t  *pCalBChans = AH_NULL;
     uint16_t pdGainOverlap_t2;
     static uint8_t  pdadcValues[AR5416_NUM_PDADC_VALUES];
@@ -1760,17 +1896,28 @@ ar5416SetPowerCalTable(struct ath_hal *a
 
     OS_MEMZERO(xpdGainValues, sizeof(xpdGainValues));
     
-    xpdMask = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].xpdGain;
+    if (pEepData)
+	    xpdMask = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].xpdGain;
+    else
+	    xpdMask = pEepData4k->modalHeader.xpdGain;
 
     if (IS_EEP_MINOR_V2(ah)) {
-        pdGainOverlap_t2 = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pdGainOverlap;
+	if (pEepData)
+		pdGainOverlap_t2 = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pdGainOverlap;
+	else
+		pdGainOverlap_t2 = pEepData4k->modalHeader.pdGainOverlap;
     } else { 
     	pdGainOverlap_t2 = (uint16_t)(MS(OS_REG_READ(ah, AR_PHY_TPCRG5), AR_PHY_TPCRG5_PD_GAIN_OVERLAP));
     }
 
     if (IEEE80211_IS_CHAN_2GHZ(chan)) {
-        pCalBChans = pEepData->calFreqPier2G;
-        numPiers = AR5416_NUM_2G_CAL_PIERS;
+	if (pEepData) {
+		pCalBChans = pEepData->calFreqPier2G;
+		numPiers = AR5416_NUM_2G_CAL_PIERS;
+	} else {
+		pCalBChans = pEepData4k->calFreqPier2G;
+		numPiers = AR5416_4K_NUM_2G_CAL_PIERS;
+	}
     } else {
         pCalBChans = pEepData->calFreqPier5G;
         numPiers = AR5416_NUM_5G_CAL_PIERS;
@@ -1796,7 +1943,7 @@ ar5416SetPowerCalTable(struct ath_hal *a
 	SM(xpdGainValues[1], AR_PHY_TPCRG1_PD_GAIN_2) | SM(xpdGainValues[2],  AR_PHY_TPCRG1_PD_GAIN_3));
 
     for (i = 0; i < AR5416_MAX_CHAINS; i++) {
-
+	    if (AR_SREV_KITE(ah) && i >= AR5416_4K_MAX_CHAINS) break;
             if (AR_SREV_OWL_20_OR_LATER(ah) && 
             ( AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5) && (i != 0)) {
             /* Regs are swapped from chain 2 to 1 for 5416 2_0 with 
@@ -1807,14 +1954,22 @@ ar5416SetPowerCalTable(struct ath_hal *a
             regChainOffset = i * 0x1000;
         }
 
-        if (pEepData->baseEepHeader.txMask & (1 << i)) {
+	int txMask;
+	txMask = (pEepData) ? pEepData->baseEepHeader.txMask :
+	    pEepData4k->baseEepHeader.txMask;
+
+        if (txMask & (1 << i)) {
             if (IEEE80211_IS_CHAN_2GHZ(chan)) {
-                pRawDataset = pEepData->calPierData2G[i];
+		if (pEepData)
+		    pRawDataset = pEepData->calPierData2G[i];
+		else
+		    pRawDataset4k = pEepData4k->calPierData2G[i];
             } else {
                 pRawDataset = pEepData->calPierData5G[i];
             }
 
-            ar5416GetGainBoundariesAndPdadcs(ah,  chan, pRawDataset,
+            ar5416GetGainBoundariesAndPdadcs(ah, chan, pRawDataset,
+					     pRawDataset4k,
                                              pCalBChans, numPiers,
                                              pdGainOverlap_t2,
                                              &tMinCalPower, gainBoundaries,
@@ -1872,8 +2027,10 @@ static void
 ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, 
                                  const struct ieee80211_channel *chan,
 				 CAL_DATA_PER_FREQ *pRawDataSet,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:20:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 329F71065676;
	Fri, 29 Jan 2010 10:20:12 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 212948FC15;
	Fri, 29 Jan 2010 10:20:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TAKC6U032001;
	Fri, 29 Jan 2010 10:20:12 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TAKB8c031998;
	Fri, 29 Jan 2010 10:20:11 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201001291020.o0TAKB8c031998@svn.freebsd.org>
From: Andriy Gapon 
Date: Fri, 29 Jan 2010 10:20: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: r203160 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:20:12 -0000

Author: avg
Date: Fri Jan 29 10:20:11 2010
New Revision: 203160
URL: http://svn.freebsd.org/changeset/base/203160

Log:
  add static qualifier to definition of a function already declared static
  
  This is for improving code readibility only.
  
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/msi.c
  head/sys/i386/i386/msi.c

Modified: head/sys/amd64/amd64/msi.c
==============================================================================
--- head/sys/amd64/amd64/msi.c	Fri Jan 29 10:10:14 2010	(r203159)
+++ head/sys/amd64/amd64/msi.c	Fri Jan 29 10:20:11 2010	(r203160)
@@ -288,7 +288,7 @@ msi_init(void)
 	mtx_init(&msi_lock, "msi", NULL, MTX_DEF);
 }
 
-void
+static void
 msi_create_source(void)
 {
 	struct msi_intsrc *msi;

Modified: head/sys/i386/i386/msi.c
==============================================================================
--- head/sys/i386/i386/msi.c	Fri Jan 29 10:10:14 2010	(r203159)
+++ head/sys/i386/i386/msi.c	Fri Jan 29 10:20:11 2010	(r203160)
@@ -288,7 +288,7 @@ msi_init(void)
 	mtx_init(&msi_lock, "msi", NULL, MTX_DEF);
 }
 
-void
+static void
 msi_create_source(void)
 {
 	struct msi_intsrc *msi;

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:32:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F302C106566C;
	Fri, 29 Jan 2010 10:32:01 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E17748FC19;
	Fri, 29 Jan 2010 10:32:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TAW1r5034592;
	Fri, 29 Jan 2010 10:32:01 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TAW1VZ034590;
	Fri, 29 Jan 2010 10:32:01 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <201001291032.o0TAW1VZ034590@svn.freebsd.org>
From: Robert Watson 
Date: Fri, 29 Jan 2010 10:32: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: r203161 - head/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:32:02 -0000

Author: rwatson
Date: Fri Jan 29 10:32:01 2010
New Revision: 203161
URL: http://svn.freebsd.org/changeset/base/203161

Log:
  You must include fcntl.h (in practice) to be able to do anything useful
  with shm_open(2), as otherwise the O_ flags are undefined.
  
  MFC after:	3 days

Modified:
  head/lib/libc/sys/shm_open.2

Modified: head/lib/libc/sys/shm_open.2
==============================================================================
--- head/lib/libc/sys/shm_open.2	Fri Jan 29 10:20:11 2010	(r203160)
+++ head/lib/libc/sys/shm_open.2	Fri Jan 29 10:32:01 2010	(r203161)
@@ -39,6 +39,7 @@
 .Sh SYNOPSIS
 .In sys/types.h
 .In sys/mman.h
+.In fcntl.h
 .Ft int
 .Fn shm_open "const char *path" "int flags" "mode_t mode"
 .Ft int

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 10:38:54 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 992CB106566C;
	Fri, 29 Jan 2010 10:38:54 +0000 (UTC)
	(envelope-from joerg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 872758FC12;
	Fri, 29 Jan 2010 10:38:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TAcsUE036197;
	Fri, 29 Jan 2010 10:38:54 GMT (envelope-from joerg@svn.freebsd.org)
Received: (from joerg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TAcsB1036195;
	Fri, 29 Jan 2010 10:38:54 GMT (envelope-from joerg@svn.freebsd.org)
Message-Id: <201001291038.o0TAcsB1036195@svn.freebsd.org>
From: Joerg Wunsch 
Date: Fri, 29 Jan 2010 10:38:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203162 - stable/8/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 10:38:54 -0000

Author: joerg
Date: Fri Jan 29 10:38:54 2010
New Revision: 203162
URL: http://svn.freebsd.org/changeset/base/203162

Log:
  MFC r203125: fix typo in .Xr.

Modified:
  stable/8/share/man/man4/gpib.4
Directory Properties:
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man4/de.4   (props changed)

Modified: stable/8/share/man/man4/gpib.4
==============================================================================
--- stable/8/share/man/man4/gpib.4	Fri Jan 29 10:32:01 2010	(r203161)
+++ stable/8/share/man/man4/gpib.4	Fri Jan 29 10:38:54 2010	(r203162)
@@ -55,7 +55,7 @@ bus in an unaddressed mode, for example 
 .El
 .Sh SEE ALSO
 .\" .Xr libgpib 3 ,
-.Xr gpib 4 ,
+.Xr pcii 4 ,
 .Xr tnt4882 4
 .Sh HISTORY
 The

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 11:30:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EE5491065670;
	Fri, 29 Jan 2010 11:30:40 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DCF568FC13;
	Fri, 29 Jan 2010 11:30:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TBUed3047761;
	Fri, 29 Jan 2010 11:30:40 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TBUepx047759;
	Fri, 29 Jan 2010 11:30:40 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001291130.o0TBUepx047759@svn.freebsd.org>
From: Edwin Groothuis 
Date: Fri, 29 Jan 2010 11:30:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203163 - stable/8/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 11:30:41 -0000

Author: edwin
Date: Fri Jan 29 11:30:40 2010
New Revision: 203163
URL: http://svn.freebsd.org/changeset/base/203163

Log:
  MFC of 203066, 203067
  
  Git has been added as port 9418:
  http://www.iana.org/assignments/port-numbers
  
  The Erlang Port Mapper Daemon (from ports/lang/erlang) has been
  assigned official port number 4369 by IANA.
  
  PR:		conf/143259 conf/113265
  Submitted by:	Denny Lin  Jimmy Olgeni 

Modified:
  stable/8/etc/services   (contents, props changed)

Modified: stable/8/etc/services
==============================================================================
--- stable/8/etc/services	Fri Jan 29 10:38:54 2010	(r203162)
+++ stable/8/etc/services	Fri Jan 29 11:30:40 2010	(r203163)
@@ -2227,6 +2227,8 @@ rwhois		4321/tcp   #Remote Who Is
 rwhois		4321/udp   #Remote Who Is
 unicall		4343/tcp
 unicall		4343/udp
+epmd		4369/tcp   #Erlang Port Mapper Daemon
+epmd		4369/udp   #Erlang Port Mapper Daemon
 krb524		4444/tcp
 krb524		4444/udp
 # PROBLEM krb524 assigned the port,
@@ -2372,6 +2374,8 @@ dlip		7201/udp
 ftp-proxy	8021/tcp   # FTP proxy
 natd		8668/divert # Network Address Translation
 jetdirect	9100/tcp   #HP JetDirect card
+git		9418/tcp   #git pack transfer service
+git		9418/udp   #git pack transfer service
 man		9535/tcp
 man		9535/udp
 sd		9876/tcp   #Session Director

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 12:09:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DD9C01065692;
	Fri, 29 Jan 2010 12:09:14 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CC5C58FC17;
	Fri, 29 Jan 2010 12:09:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TC9EWM056246;
	Fri, 29 Jan 2010 12:09:14 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TC9Ed1056243;
	Fri, 29 Jan 2010 12:09:14 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201001291209.o0TC9Ed1056243@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 29 Jan 2010 12:09:14 +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: r203164 - in head: share/man/man5 sys/fs/tmpfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 12:09:15 -0000

Author: jh
Date: Fri Jan 29 12:09:14 2010
New Revision: 203164
URL: http://svn.freebsd.org/changeset/base/203164

Log:
  Add "maxfilesize" mount option for tmpfs to allow specifying the
  maximum file size limit. Default is UINT64_MAX when the option is
  not specified. It was useless to set the limit to the total amount of
  memory and swap in the system.
  
  Use tmpfs_mem_info() rather than get_swpgtotal() in tmpfs_mount() to
  check if there is enough memory available.
  
  Remove now unused get_swpgtotal().
  
  Reviewed by:	Gleb Kurtsou
  Approved by:	trasz (mentor)

Modified:
  head/share/man/man5/tmpfs.5
  head/sys/fs/tmpfs/tmpfs_vfsops.c

Modified: head/share/man/man5/tmpfs.5
==============================================================================
--- head/share/man/man5/tmpfs.5	Fri Jan 29 11:30:40 2010	(r203163)
+++ head/share/man/man5/tmpfs.5	Fri Jan 29 12:09:14 2010	(r203164)
@@ -70,6 +70,8 @@ permissions in octal format.
 maximum number of inodes.
 .It Cm size
 maximum size (in bytes) for the file system.
+.It Cm maxfilesize
+maximum file size (in bytes).
 .El
 .Sh EXAMPLES
 To mount a

Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c
==============================================================================
--- head/sys/fs/tmpfs/tmpfs_vfsops.c	Fri Jan 29 11:30:40 2010	(r203163)
+++ head/sys/fs/tmpfs/tmpfs_vfsops.c	Fri Jan 29 12:09:14 2010	(r203164)
@@ -77,62 +77,12 @@ static int	tmpfs_statfs(struct mount *, 
 /* --------------------------------------------------------------------- */
 
 static const char *tmpfs_opts[] = {
-	"from", "size", "inodes", "uid", "gid", "mode", "export",
+	"from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export",
 	NULL
 };
 
 /* --------------------------------------------------------------------- */
 
-#define SWI_MAXMIB	3
-
-static u_int
-get_swpgtotal(void)
-{
-	struct xswdev xsd;
-	char *sname = "vm.swap_info";
-	int soid[SWI_MAXMIB], oid[2];
-	u_int unswdev, total, dmmax, nswapdev;
-	size_t mibi, len;
-
-	total = 0;
-
-	len = sizeof(dmmax);
-	if (kernel_sysctlbyname(curthread, "vm.dmmax", &dmmax, &len,
-				NULL, 0, NULL, 0) != 0)
-		return total;
-
-	len = sizeof(nswapdev);
-	if (kernel_sysctlbyname(curthread, "vm.nswapdev",
-				&nswapdev, &len,
-				NULL, 0, NULL, 0) != 0)
-		return total;
-
-	mibi = (SWI_MAXMIB - 1) * sizeof(int);
-	oid[0] = 0;
-	oid[1] = 3;
-
-	if (kernel_sysctl(curthread, oid, 2,
-			soid, &mibi, (void *)sname, strlen(sname),
-			NULL, 0) != 0)
-		return total;
-
-	mibi = (SWI_MAXMIB - 1);
-	for (unswdev = 0; unswdev < nswapdev; ++unswdev) {
-		soid[mibi] = unswdev;
-		len = sizeof(struct xswdev);
-		if (kernel_sysctl(curthread,
-				soid, mibi + 1, &xsd, &len, NULL, 0,
-				NULL, 0) != 0)
-			return total;
-		if (len == sizeof(struct xswdev))
-			total += (xsd.xsw_nblks - dmmax);
-	}
-
-	/* Not Reached */
-	return total;
-}
-
-/* --------------------------------------------------------------------- */
 static int
 tmpfs_node_ctor(void *mem, int size, void *arg, int flags)
 {
@@ -181,12 +131,12 @@ tmpfs_mount(struct mount *mp)
 {
 	struct tmpfs_mount *tmp;
 	struct tmpfs_node *root;
-	size_t pages, mem_size;
+	size_t pages;
 	uint32_t nodes;
 	int error;
 	/* Size counters. */
 	u_int nodes_max;
-	u_quad_t size_max;
+	u_quad_t size_max, maxfilesize;
 
 	/* Root node attributes. */
 	uid_t root_uid;
@@ -227,12 +177,13 @@ tmpfs_mount(struct mount *mp)
 		nodes_max = 0;
 	if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1)
 		size_max = 0;
+	if (vfs_scanopt(mp->mnt_optnew, "maxfilesize", "%qu",
+	    &maxfilesize) != 1)
+		maxfilesize = 0;
 
 	/* Do not allow mounts if we do not have enough memory to preserve
 	 * the minimum reserved pages. */
-	mem_size = cnt.v_free_count + cnt.v_inactive_count + get_swpgtotal();
-	mem_size -= mem_size > cnt.v_wire_count ? cnt.v_wire_count : mem_size;
-	if (mem_size < TMPFS_PAGES_RESERVED)
+	if (tmpfs_mem_info() < TMPFS_PAGES_RESERVED)
 		return ENOSPC;
 
 	/* Get the maximum number of memory pages this file system is
@@ -261,7 +212,7 @@ tmpfs_mount(struct mount *mp)
 	mtx_init(&tmp->allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF);
 	tmp->tm_nodes_max = nodes;
 	tmp->tm_nodes_inuse = 0;
-	tmp->tm_maxfilesize = (u_int64_t)(cnt.v_page_count + get_swpgtotal()) * PAGE_SIZE;
+	tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : UINT64_MAX;
 	LIST_INIT(&tmp->tm_nodes_used);
 
 	tmp->tm_pages_max = pages;

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 12:47:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E661E106566B;
	Fri, 29 Jan 2010 12:47:04 +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 BC7A88FC0C;
	Fri, 29 Jan 2010 12:47:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TCl4ue064665;
	Fri, 29 Jan 2010 12:47:04 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TCl4Ju064662;
	Fri, 29 Jan 2010 12:47:04 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201001291247.o0TCl4Ju064662@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 29 Jan 2010 12:47: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: r203165 - in head/sys/dev: ahci siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 12:47:05 -0000

Author: mav
Date: Fri Jan 29 12:47:04 2010
New Revision: 203165
URL: http://svn.freebsd.org/changeset/base/203165

Log:
  Reset port on disconnect event, to abort any running requests.

Modified:
  head/sys/dev/ahci/ahci.c
  head/sys/dev/siis/siis.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Fri Jan 29 12:09:14 2010	(r203164)
+++ head/sys/dev/ahci/ahci.c	Fri Jan 29 12:47:04 2010	(r203165)
@@ -1167,17 +1167,15 @@ ahci_phy_check_events(device_t dev, u_in
 		u_int32_t status = ATA_INL(ch->r_mem, AHCI_P_SSTS);
 		union ccb *ccb;
 
-		if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
-		    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
-		    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
-			if (bootverbose)
+		if (bootverbose) {
+			if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
+			    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
+			    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
 				device_printf(dev, "CONNECT requested\n");
-			ahci_reset(dev);
-		} else {
-			if (bootverbose)
+			} else
 				device_printf(dev, "DISCONNECT requested\n");
-			ch->devices = 0;
 		}
+		ahci_reset(dev);
 		if ((ccb = xpt_alloc_ccb_nowait()) == NULL)
 			return;
 		if (xpt_create_path(&ccb->ccb_h.path, NULL,

Modified: head/sys/dev/siis/siis.c
==============================================================================
--- head/sys/dev/siis/siis.c	Fri Jan 29 12:09:14 2010	(r203164)
+++ head/sys/dev/siis/siis.c	Fri Jan 29 12:47:04 2010	(r203165)
@@ -741,17 +741,15 @@ siis_phy_check_events(device_t dev)
 		u_int32_t status = ATA_INL(ch->r_mem, SIIS_P_SSTS);
 		union ccb *ccb;
 
-		if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
-		    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
-		    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
-			if (bootverbose)
+		if (bootverbose) {
+			if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) &&
+			    ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
+			    ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) {
 				device_printf(dev, "CONNECT requested\n");
-			siis_reset(dev);
-		} else {
-			if (bootverbose)
+			} else
 				device_printf(dev, "DISCONNECT requested\n");
-			ch->devices = 0;
 		}
+		siis_reset(dev);
 		if ((ccb = xpt_alloc_ccb_nowait()) == NULL)
 			return;
 		if (xpt_create_path(&ccb->ccb_h.path, NULL,

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 14:07:33 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BEE9A106568B;
	Fri, 29 Jan 2010 14:07:33 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au
	[211.29.132.186])
	by mx1.freebsd.org (Postfix) with ESMTP id 3BA1E8FC18;
	Fri, 29 Jan 2010 14:07:32 +0000 (UTC)
Received: from c122-106-174-165.carlnfd1.nsw.optusnet.com.au
	(c122-106-174-165.carlnfd1.nsw.optusnet.com.au [122.106.174.165])
	by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o0TE7TTH021835
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 30 Jan 2010 01:07:30 +1100
Date: Sat, 30 Jan 2010 01:07:29 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@delplex.bde.org
To: Robert Watson 
In-Reply-To: <201001291032.o0TAW1VZ034590@svn.freebsd.org>
Message-ID: <20100130005028.R77143@delplex.bde.org>
References: <201001291032.o0TAW1VZ034590@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r203161 - head/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 14:07:33 -0000

On Fri, 29 Jan 2010, Robert Watson wrote:

> Log:
>  You must include fcntl.h (in practice) to be able to do anything useful
>  with shm_open(2), as otherwise the O_ flags are undefined.

Only usually, not "in practice".  You can usefully call shm_open() with
flags obtained from a variable.

>  MFC after:	3 days

> Modified: head/lib/libc/sys/shm_open.2
> ==============================================================================
> --- head/lib/libc/sys/shm_open.2	Fri Jan 29 10:20:11 2010	(r203160)
> +++ head/lib/libc/sys/shm_open.2	Fri Jan 29 10:32:01 2010	(r203161)
> @@ -39,6 +39,7 @@
> .Sh SYNOPSIS
> .In sys/types.h
> .In sys/mman.h
> +.In fcntl.h
> .Ft int
> .Fn shm_open "const char *path" "int flags" "mode_t mode"
> .Ft int

This detail belongs in the description, not in the synopsis.  This is
correctly handled in POSIX.

POSIX also correctly specifies the include of  -- it wasn't
specified for shm_open() even in POSIX.1-1996 though it was specified for
some other functions then.  Now it isn't specified for any functions.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 14:11:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 532D0106566C;
	Fri, 29 Jan 2010 14:11:03 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4333E8FC0C;
	Fri, 29 Jan 2010 14:11:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TEB3Tb083066;
	Fri, 29 Jan 2010 14:11:03 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TEB38V083063;
	Fri, 29 Jan 2010 14:11:03 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201001291411.o0TEB38V083063@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 29 Jan 2010 14:11:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-svnadmin@freebsd.org
X-SVN-Group: svnadmin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203166 - svnadmin/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 14:11:03 -0000

Author: rrs
Date: Fri Jan 29 14:11:01 2010
New Revision: 203166
URL: http://svn.freebsd.org/changeset/base/203166

Log:
  (1) Bruce Cran
  (2) Will be working on SCTP and other bug busting fun ;-)
  (3) Mentor by me (rrs)
  
  Approved by: core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==============================================================================
--- svnadmin/conf/access	Fri Jan 29 12:47:04 2010	(r203165)
+++ svnadmin/conf/access	Fri Jan 29 14:11:01 2010	(r203166)
@@ -34,6 +34,7 @@ benno
 bms
 brian		freebsd-committers@Awfulhak.org
 brooks
+brucec
 brueffer
 bruno
 bushman

Modified: svnadmin/conf/mentors
==============================================================================
--- svnadmin/conf/mentors	Fri Jan 29 12:47:04 2010	(r203165)
+++ svnadmin/conf/mentors	Fri Jan 29 14:11:01 2010	(r203166)
@@ -11,6 +11,7 @@
 
 # Mentee	Mentor		Optional comment
 cbzimmer	sam
+brucec		rrs
 dchagin		kib
 eri		mlaier		Co-mentor: thompsa
 gavin		ed

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 14:23:47 2010
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7CB1E106566C;
	Fri, 29 Jan 2010 14:23:47 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au
	[211.29.132.190])
	by mx1.freebsd.org (Postfix) with ESMTP id EF3F08FC13;
	Fri, 29 Jan 2010 14:23:46 +0000 (UTC)
Received: from c122-106-174-165.carlnfd1.nsw.optusnet.com.au
	(c122-106-174-165.carlnfd1.nsw.optusnet.com.au [122.106.174.165])
	by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o0TENhv0014417
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 30 Jan 2010 01:23:44 +1100
Date: Sat, 30 Jan 2010 01:23:43 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@delplex.bde.org
To: Randall Stewart 
In-Reply-To: <201001290403.o0T43avo045817@svn.freebsd.org>
Message-ID: <20100130011335.R77171@delplex.bde.org>
References: <201001290403.o0T43avo045817@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r203149 - head/sys/mips/rmi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 14:23:47 -0000

On Fri, 29 Jan 2010, Randall Stewart wrote:

> Log:
>  Move ID up into comment block.. per bsdimp

Any chance of fixing the ~10 other style bugs visible in this patch?  There
are 6 new ones in this commit alone:

> Modified: head/sys/mips/rmi/pic.h
> ==============================================================================
> --- head/sys/mips/rmi/pic.h	Fri Jan 29 03:35:01 2010	(r203148)
> +++ head/sys/mips/rmi/pic.h	Fri Jan 29 04:03:36 2010	(r203149)
> @@ -25,14 +25,15 @@
>  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
>  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>  * SUCH DAMAGE.
> + * __FBSDID("$FreeBSD$");

1. Missing blank line before $FreeBSD$.
2. Using the __FBSDID() macro in a comment is nonsense.
3. Insertion sort error.  $FreeBSD$ goes last in the copyright comment.

>  *
>  * RMI_BSD */

4. Block comments are not formatted like this in KNF.

> #ifndef _RMI_PIC_H_
> #define _RMI_PIC_H_

5. Space instead of tab after #define.
6. Missing blank line before whatever follws the idempotency ifndef/def.

> #include 
> -/*
> -__FBSDID("$FreeBSD$");
> -*/
> +

7. Extra blank line.

> +

8. Extra blank line.

> +

9. Extra blank line.

>
> extern int rmi_spin_mutex_safe;

10. KNF would indent this using a tab or two.

>
>

The 6 new style bugs are 1-3 and 7-9.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 14:41:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5E0D2106566C;
	Fri, 29 Jan 2010 14:41:17 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 068498FC35;
	Fri, 29 Jan 2010 14:41:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TEfGZK089751;
	Fri, 29 Jan 2010 14:41:16 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TEfGbc089749;
	Fri, 29 Jan 2010 14:41:16 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201001291441.o0TEfGbc089749@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 29 Jan 2010 14:41:16 +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: r203167 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 14:41:17 -0000

Author: brucec
Date: Fri Jan 29 14:41:16 2010
New Revision: 203167
URL: http://svn.freebsd.org/changeset/base/203167

Log:
  Add my birthday.
  
  Approved by:	rrs (mentor)

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Fri Jan 29 14:11:01 2010	(r203166)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Fri Jan 29 14:41:16 2010	(r203167)
@@ -134,6 +134,7 @@
 05/11	Jesus Rodriguez  born in Barcelona, Spain, 1972
 05/11	Roman Kurakin  born in Moscow, USSR, 1979
 05/13	Pete Fritchman  born in Lansdale, Pennsylvania, United States, 1983
+05/14	Bruce Cran  born in Cambridge, United Kingdom, 1981
 05/14	Tatsumi Hosokawa  born in Tokyo, Japan, 1968
 05/14	Shigeyuku Fukushima  born in Osaka, Japan, 1974
 05/16	Johann Kois  born in Wolfsberg, Austria, 1975

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 14:44:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 59E74106566B;
	Fri, 29 Jan 2010 14:44:05 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 49D4F8FC28;
	Fri, 29 Jan 2010 14:44:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TEi5s7090390;
	Fri, 29 Jan 2010 14:44:05 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TEi5Ee090388;
	Fri, 29 Jan 2010 14:44:05 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201001291444.o0TEi5Ee090388@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 29 Jan 2010 14:44:05 +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: r203168 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 14:44:05 -0000

Author: brucec
Date: Fri Jan 29 14:44:05 2010
New Revision: 203168
URL: http://svn.freebsd.org/changeset/base/203168

Log:
  Add myself and show rrs@ as my mentor.
  
  Approved by:	rrs (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==============================================================================
--- head/share/misc/committers-src.dot	Fri Jan 29 14:41:16 2010	(r203167)
+++ head/share/misc/committers-src.dot	Fri Jan 29 14:44:05 2010	(r203168)
@@ -67,6 +67,7 @@ bmilekic [label="Bosko Milekic\nbmilekic
 bms [label="Bruce M Simpson\nbms@FreeBSD.org\n2003/08/06"]
 brian [label="Brian Somers\nbrian@FreeBSD.org\n1996/12/16"]
 brooks [label="Brooks Davis\nbrooks@FreeBSD.org\n2001/06/21"]
+brucec [label="Bruce Cran\nbrucec@FreeBSD.org\n2010/01/29"]
 brueffer [label="Christian Brueffer\nbrueffer@FreeBSD.org\n2006/02/28"]
 bruno [label="Bruno Ducrot\nbruno@FreeBSD.org\n2005/07/18"]
 bz [label="Bjoern A. Zeeb\nbz@FreeBSD.org\n2004/07/27"]
@@ -408,6 +409,7 @@ rgrimes -> markm
 
 rpaulo -> avg
 
+rrs -> brucec
 rrs -> tuexen
 
 ru -> ceri

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 15:11:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 88C13106566C;
	Fri, 29 Jan 2010 15:11:50 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F3E38FC18;
	Fri, 29 Jan 2010 15:11:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TFBo1x096562;
	Fri, 29 Jan 2010 15:11:50 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TFBoQQ096560;
	Fri, 29 Jan 2010 15:11:50 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201001291511.o0TFBoQQ096560@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 29 Jan 2010 15:11:50 +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: r203169 - head/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 15:11:50 -0000

Author: jh
Date: Fri Jan 29 15:11:50 2010
New Revision: 203169
URL: http://svn.freebsd.org/changeset/base/203169

Log:
  Bump .Dd for r203164.
  
  Approved by:	trasz (mentor)

Modified:
  head/share/man/man5/tmpfs.5

Modified: head/share/man/man5/tmpfs.5
==============================================================================
--- head/share/man/man5/tmpfs.5	Fri Jan 29 14:44:05 2010	(r203168)
+++ head/share/man/man5/tmpfs.5	Fri Jan 29 15:11:50 2010	(r203169)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 12, 2008
+.Dd January 29, 2010
 .Dt TMPFS 5
 .Os
 .Sh NAME

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 15:58:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 62D6A1065670;
	Fri, 29 Jan 2010 15:58:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 506418FC61;
	Fri, 29 Jan 2010 15:58:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TFwCPO006984;
	Fri, 29 Jan 2010 15:58:12 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TFwCLg006978;
	Fri, 29 Jan 2010 15:58:12 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201001291558.o0TFwCLg006978@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Jan 2010 15:58:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203170 - in stable/7: lib/libc/gen sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 15:58:12 -0000

Author: jhb
Date: Fri Jan 29 15:58:12 2010
New Revision: 203170
URL: http://svn.freebsd.org/changeset/base/203170

Log:
  MFC 197331, 197394:
  Add getpagesizes(3) function that returns either the number of page sizes
  supported by the system or a specified subset of the supported page sizes.
  
  Approved by:	re (kib)

Added:
  stable/7/lib/libc/gen/getpagesizes.3
     - copied, changed from r197331, head/lib/libc/gen/getpagesizes.3
  stable/7/lib/libc/gen/getpagesizes.c
     - copied unchanged from r197331, head/lib/libc/gen/getpagesizes.c
Modified:
  stable/7/lib/libc/gen/Makefile.inc
  stable/7/lib/libc/gen/Symbol.map
  stable/7/sys/sys/mman.h
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/lib/libc/gen/Makefile.inc
==============================================================================
--- stable/7/lib/libc/gen/Makefile.inc	Fri Jan 29 15:11:50 2010	(r203169)
+++ stable/7/lib/libc/gen/Makefile.inc	Fri Jan 29 15:58:12 2010	(r203170)
@@ -16,7 +16,7 @@ SRCS+=  __getosreldate.c __xuname.c \
 	getbootfile.c getbsize.c \
 	getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \
 	gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \
-	getosreldate.c getpagesize.c \
+	getosreldate.c getpagesize.c getpagesizes.c \
 	getpeereid.c getprogname.c getpwent.c getttyent.c \
 	getusershell.c getvfsbyname.c glob.c \
 	initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \
@@ -52,8 +52,8 @@ MAN+=	alarm.3 arc4random.3 \
 	getbootfile.3 getbsize.3 getcap.3 getcontext.3 getcwd.3 \
 	getdiskbyname.3 getdomainname.3 getfsent.3 \
 	getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \
-	getmntinfo.3 getnetgrent.3 getosreldate.3 \
-	getpagesize.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \
+	getmntinfo.3 getnetgrent.3 getosreldate.3 getpagesize.3 \
+	getpagesizes.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \
 	getttyent.3 getusershell.3 getvfsbyname.3 \
 	glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \
 	modf.3 msgctl.3 msgget.3 msgrcv.3 msgsnd.3 \

Modified: stable/7/lib/libc/gen/Symbol.map
==============================================================================
--- stable/7/lib/libc/gen/Symbol.map	Fri Jan 29 15:11:50 2010	(r203169)
+++ stable/7/lib/libc/gen/Symbol.map	Fri Jan 29 15:58:12 2010	(r203170)
@@ -341,6 +341,10 @@ FBSD_1.1 {
 	semctl;
 };
 
+FBSD_1.2 {
+	getpagesizes;
+};
+
 FBSDprivate_1.0 {
 	/* needed by thread libraries */
 	__thr_jtable;

Copied and modified: stable/7/lib/libc/gen/getpagesizes.3 (from r197331, head/lib/libc/gen/getpagesizes.3)
==============================================================================
--- head/lib/libc/gen/getpagesizes.3	Sat Sep 19 18:01:32 2009	(r197331, copy source)
+++ stable/7/lib/libc/gen/getpagesizes.3	Fri Jan 29 15:58:12 2010	(r203170)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 19, 2009
+.Dd September 21, 2009
 .Dt GETPAGESIZES 3
 .Os
 .Sh NAME
@@ -94,5 +94,6 @@ function first appeared in Solaris 9.
 This manual page was written in conjunction with a new but compatible
 implementation that was first released in
 .Fx 7.3 .
-.Sh AUTHOR
-.An Alan L. Cox Aq alc@cs.rice.edu
+.Sh AUTHORS
+This manual page was written by
+.An Alan L. Cox Aq alc@cs.rice.edu .

Copied: stable/7/lib/libc/gen/getpagesizes.c (from r197331, head/lib/libc/gen/getpagesizes.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/lib/libc/gen/getpagesizes.c	Fri Jan 29 15:58:12 2010	(r203170, copy of r197331, head/lib/libc/gen/getpagesizes.c)
@@ -0,0 +1,78 @@
+/*-
+ * Copyright (c) 2009 Alan L. Cox 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+
+#include 
+
+/*
+ * Retrieves page size information from the system.  Specifically, returns the
+ * number of distinct page sizes that are supported by the system, if
+ * "pagesize" is NULL and "nelem" is 0.  Otherwise, assigns up to "nelem" of
+ * the system-supported page sizes to consecutive elements of the array
+ * referenced by "pagesize", and returns the number of such page sizes that it
+ * assigned to the array.  These page sizes are expressed in bytes.
+ *
+ * The implementation of this function does not directly or indirectly call
+ * malloc(3) or any other dynamic memory allocator that may itself call this
+ * function.
+ */
+int
+getpagesizes(size_t pagesize[], int nelem)
+{
+	static u_long ps[MAXPAGESIZES];
+	static int nops;
+	size_t size;
+	int i; 
+
+	if (nelem < 0 || (nelem > 0 && pagesize == NULL)) {
+		errno = EINVAL;
+		return (-1);
+	}
+	/* Cache the result of the sysctl(2). */
+	if (nops == 0) {
+		size = sizeof(ps);
+		if (sysctlbyname("hw.pagesizes", ps, &size, NULL, 0) == -1)
+			return (-1);
+		/* Count the number of page sizes that are supported. */
+		nops = size / sizeof(ps[0]);
+		while (nops > 0 && ps[nops - 1] == 0)
+			nops--;
+	}
+	if (pagesize == NULL)
+		return (nops);
+	/* Return up to "nelem" page sizes from the cached result. */
+	if (nelem > nops)
+		nelem = nops;
+	for (i = 0; i < nelem; i++)
+		pagesize[i] = ps[i];
+	return (nelem);
+}

Modified: stable/7/sys/sys/mman.h
==============================================================================
--- stable/7/sys/sys/mman.h	Fri Jan 29 15:11:50 2010	(r203169)
+++ stable/7/sys/sys/mman.h	Fri Jan 29 15:58:12 2010	(r203170)
@@ -177,6 +177,7 @@ __BEGIN_DECLS
  * posix_typed_mem_open().
  */
 #if __BSD_VISIBLE
+int	getpagesizes(size_t *, int);
 int	madvise(void *, size_t, int);
 int	mincore(const void *, size_t, char *);
 int	minherit(void *, size_t, int);

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 16:14:35 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC3E3106566C;
	Fri, 29 Jan 2010 16:14:35 +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 CBAB78FC0A;
	Fri, 29 Jan 2010 16:14:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TGEZJW010663;
	Fri, 29 Jan 2010 16:14:35 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TGEZ7m010661;
	Fri, 29 Jan 2010 16:14:35 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201001291614.o0TGEZ7m010661@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Fri, 29 Jan 2010 16:14:35 +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: r203171 - head/sys/arm/arm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 16:14:36 -0000

Author: marcel
Date: Fri Jan 29 16:14:35 2010
New Revision: 203171
URL: http://svn.freebsd.org/changeset/base/203171

Log:
  When backtracing self, start with the current frame (i.e. the
  frame of db_trace_self()) and not the caller's frame. The use
  of builtin_frame_address(1) to get the caller's frame is not
  reliable and can cause panics.

Modified:
  head/sys/arm/arm/db_trace.c

Modified: head/sys/arm/arm/db_trace.c
==============================================================================
--- head/sys/arm/arm/db_trace.c	Fri Jan 29 15:58:12 2010	(r203170)
+++ head/sys/arm/arm/db_trace.c	Fri Jan 29 16:14:35 2010	(r203171)
@@ -206,6 +206,6 @@ db_trace_self(void)
 {
 	db_addr_t addr;
 
-	addr = (db_addr_t)__builtin_frame_address(1);
+	addr = (db_addr_t)__builtin_frame_address(0);
 	db_stack_trace_cmd(addr, -1);
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 18:18:18 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6D661065676;
	Fri, 29 Jan 2010 18:18:18 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A56798FC13;
	Fri, 29 Jan 2010 18:18:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TIIIqn037794;
	Fri, 29 Jan 2010 18:18:18 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TIIIls037792;
	Fri, 29 Jan 2010 18:18:18 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201001291818.o0TIIIls037792@svn.freebsd.org>
From: Rui Paulo 
Date: Fri, 29 Jan 2010 18:18:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203172 - stable/8/sys/net80211
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 18:18:18 -0000

Author: rpaulo
Date: Fri Jan 29 18:18:18 2010
New Revision: 203172
URL: http://svn.freebsd.org/changeset/base/203172

Log:
  MFC r202967:
     Call ieee80211_radiotap_rx, not ieee80211_radiotap_tx on sta_input()
  
     PR:		143163
     Submitted by:Alexander Egorenkov 

Modified:
  stable/8/sys/net80211/ieee80211_sta.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net80211/ieee80211_sta.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_sta.c	Fri Jan 29 16:14:35 2010	(r203171)
+++ stable/8/sys/net80211/ieee80211_sta.c	Fri Jan 29 18:18:18 2010	(r203172)
@@ -759,7 +759,7 @@ sta_input(struct ieee80211_node *ni, str
 
 		/* copy to listener after decrypt */
 		if (ieee80211_radiotap_active_vap(vap))
-			ieee80211_radiotap_tx(vap, m);
+			ieee80211_radiotap_rx(vap, m);
 		need_tap = 0;
 
 		/*

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 18:19:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A1FCD106568B;
	Fri, 29 Jan 2010 18:19:43 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9054D8FC08;
	Fri, 29 Jan 2010 18:19:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TIJhk7038141;
	Fri, 29 Jan 2010 18:19:43 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TIJhS2038138;
	Fri, 29 Jan 2010 18:19:43 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201001291819.o0TIJhS2038138@svn.freebsd.org>
From: Rui Paulo 
Date: Fri, 29 Jan 2010 18:19:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203173 - stable/8/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 18:19:43 -0000

Author: rpaulo
Date: Fri Jan 29 18:19:43 2010
New Revision: 203173
URL: http://svn.freebsd.org/changeset/base/203173

Log:
  MFC r202986:
    o add more notification strings in iwn_intr_str()
    o sync with OpenBSD code
  
    Submitted by:	Bernhard Schmidt 
    MFC after:	3 days

Modified:
  stable/8/sys/dev/iwn/if_iwn.c
  stable/8/sys/dev/iwn/if_iwnreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/8/sys/dev/iwn/if_iwn.c	Fri Jan 29 18:18:18 2010	(r203172)
+++ stable/8/sys/dev/iwn/if_iwn.c	Fri Jan 29 18:19:43 2010	(r203173)
@@ -1927,6 +1927,7 @@ iwn_rx_phy(struct iwn_softc *sc, struct 
 	struct iwn_rx_stat *stat = (struct iwn_rx_stat *)(desc + 1);
 
 	DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: received PHY stats\n", __func__);
+	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 
 	/* Save RX statistics, they will be used on MPDU_RX_DONE. */
 	memcpy(&sc->last_rx_stat, stat, sizeof (*stat));
@@ -2140,6 +2141,7 @@ iwn5000_rx_calib_results(struct iwn_soft
 	if (sc->sc_flags & IWN_FLAG_CALIB_DONE)
 		return;
 
+	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 	len = (le32toh(desc->len) & 0x3fff) - 4;
 
 	switch (calib->code) {
@@ -2202,6 +2204,7 @@ iwn_rx_statistics(struct iwn_softc *sc, 
 	    (ic->ic_flags & IEEE80211_F_SCAN))
 		return;
 
+	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 	DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: cmd %d\n", __func__, desc->type);
 	iwn_calib_reset(sc);	/* Reset TX power calibration timeout. */
 
@@ -2253,6 +2256,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st
 	    stat->btkillcnt, stat->rate, le16toh(stat->duration),
 	    le32toh(stat->status));
 
+	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 	iwn_tx_done(sc, desc, stat->ackfailcnt, le32toh(stat->status) & 0xff);
 }
 
@@ -2272,6 +2276,8 @@ iwn5000_tx_done(struct iwn_softc *sc, st
 	/* Reset TX scheduler slot. */
 	iwn5000_reset_sched(sc, desc->qid & 0xf, desc->idx);
 #endif
+
+	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 	iwn_tx_done(sc, desc, stat->ackfailcnt, le16toh(stat->status) & 0xff);
 }
 
@@ -2433,10 +2439,11 @@ iwn_notif_intr(struct iwn_softc *sc)
 		{
 			struct iwn_beacon_missed *miss =
 			    (struct iwn_beacon_missed *)(desc + 1);
-			int misses = le32toh(miss->consecutive);
+			int misses;
 
 			bus_dmamap_sync(sc->rxq.data_dmat, data->map,
 			    BUS_DMASYNC_POSTREAD);
+			misses = le32toh(miss->consecutive);
 
 			/* XXX not sure why we're notified w/ zero */
 			if (misses == 0)
@@ -4372,7 +4379,7 @@ iwn_send_sensitivity(struct iwn_softc *s
 	cmd.corr_barker      = htole16(190);
 	cmd.corr_barker_mrc  = htole16(390);
 
-	DPRINTF(sc, IWN_DEBUG_RESET,
+	DPRINTF(sc, IWN_DEBUG_CALIBRATE,
 	    "%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n", __func__,
 	    calib->ofdm_x1, calib->ofdm_mrc_x1, calib->ofdm_x4,
 	    calib->ofdm_mrc_x4, calib->cck_x4,
@@ -6388,10 +6395,14 @@ iwn_intr_str(uint8_t cmd)
 	case IWN_CMD_SET_LED:		return "IWN_CMD_SET_LED";
 	case IWN5000_CMD_WIMAX_COEX:	return "IWN5000_CMD_WIMAX_COEX";
 	case IWN5000_CMD_CALIB_CONFIG:	return "IWN5000_CMD_CALIB_CONFIG";
+	case IWN5000_CMD_CALIB_RESULT:	return "IWN5000_CMD_CALIB_RESULT";
+	case IWN5000_CMD_CALIB_COMPLETE: return "IWN5000_CMD_CALIB_COMPLETE";
 	case IWN_CMD_SET_POWER_MODE:	return "IWN_CMD_SET_POWER_MODE";
 	case IWN_CMD_SCAN:		return "IWN_CMD_SCAN";
+	case IWN_CMD_SCAN_RESULTS:	return "IWN_CMD_SCAN_RESULTS";
 	case IWN_CMD_TXPOWER:		return "IWN_CMD_TXPOWER";
 	case IWN_CMD_TXPOWER_DBM:	return "IWN_CMD_TXPOWER_DBM";
+	case IWN5000_CMD_TX_ANT_CONFIG:	return "IWN5000_CMD_TX_ANT_CONFIG";
 	case IWN_CMD_BT_COEX:		return "IWN_CMD_BT_COEX";
 	case IWN_CMD_SET_CRITICAL_TEMP:	return "IWN_CMD_SET_CRITICAL_TEMP";
 	case IWN_CMD_SET_SENSITIVITY:	return "IWN_CMD_SET_SENSITIVITY";

Modified: stable/8/sys/dev/iwn/if_iwnreg.h
==============================================================================
--- stable/8/sys/dev/iwn/if_iwnreg.h	Fri Jan 29 18:18:18 2010	(r203172)
+++ stable/8/sys/dev/iwn/if_iwnreg.h	Fri Jan 29 18:19:43 2010	(r203173)
@@ -421,8 +421,11 @@ struct iwn_tx_cmd {
 #define IWN_CMD_SET_LED			 72
 #define IWN5000_CMD_WIMAX_COEX		 90
 #define IWN5000_CMD_CALIB_CONFIG	101
+#define IWN5000_CMD_CALIB_RESULT	102
+#define IWN5000_CMD_CALIB_COMPLETE	103
 #define IWN_CMD_SET_POWER_MODE		119
 #define IWN_CMD_SCAN			128
+#define IWN_CMD_SCAN_RESULTS		131
 #define IWN_CMD_TXPOWER_DBM		149
 #define IWN_CMD_TXPOWER			151
 #define IWN5000_CMD_TX_ANT_CONFIG	152

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 18:33:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CFAF21065672;
	Fri, 29 Jan 2010 18:33:59 +0000 (UTC)
	(envelope-from gabor@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A54BB8FC0C;
	Fri, 29 Jan 2010 18:33:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TIXxn5041508;
	Fri, 29 Jan 2010 18:33:59 GMT (envelope-from gabor@svn.freebsd.org)
Received: (from gabor@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TIXxmI041506;
	Fri, 29 Jan 2010 18:33:59 GMT (envelope-from gabor@svn.freebsd.org)
Message-Id: <201001291833.o0TIXxmI041506@svn.freebsd.org>
From: Gabor Kovesdan 
Date: Fri, 29 Jan 2010 18:33:59 +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: r203174 - head/lib/libc/nls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 18:33:59 -0000

Author: gabor (doc,ports committer)
Date: Fri Jan 29 18:33:59 2010
New Revision: 203174
URL: http://svn.freebsd.org/changeset/base/203174

Log:
  - Fix some style(9) bugs
  
  Pointed out by:	bde

Modified:
  head/lib/libc/nls/msgcat.c

Modified: head/lib/libc/nls/msgcat.c
==============================================================================
--- head/lib/libc/nls/msgcat.c	Fri Jan 29 18:19:43 2010	(r203173)
+++ head/lib/libc/nls/msgcat.c	Fri Jan 29 18:33:59 2010	(r203174)
@@ -107,12 +107,12 @@ SLIST_HEAD(listhead, catentry) cache =
 nl_catd
 catopen(const char *name, int type)
 {
-	int		 spcleft, saverr;
-	char		 path[PATH_MAX];
-	char		*nlspath, *lang, *base, *cptr, *pathP, *tmpptr;
-	char		*cptr1, *plang, *pter, *pcode;
-	struct stat	 sbuf;
-	struct catentry	*np;
+	struct stat sbuf;
+	struct catentry *np;
+	char *base, *cptr, *cptr1, *lang, *nlspath, *pathP, *pcode;
+	char *plang, *pter, *tmpptr;
+	int saverr, spcleft;
+	char path[PATH_MAX];
 
 	if (name == NULL || *name == '\0')
 		NLRETERR(EINVAL);
@@ -247,10 +247,10 @@ catopen(const char *name, int type)
 char *
 catgets(nl_catd catd, int set_id, int msg_id, const char *s)
 {
-	struct _nls_cat_hdr	*cat_hdr;
-	struct _nls_set_hdr	*set_hdr;
-	struct _nls_msg_hdr	*msg_hdr;
-	int			 l, u, i, r;
+	struct _nls_cat_hdr *cat_hdr;
+	struct _nls_msg_hdr *msg_hdr;
+	struct _nls_set_hdr *set_hdr;
+	int i, l, r, u;
 
 	if (catd == NULL || catd == NLERR) {
 		errno = EBADF;
@@ -315,7 +315,7 @@ notfound:
 int
 catclose(nl_catd catd)
 {
-	struct catentry		*np;
+	struct catentry *np;
 
 	if (catd == NULL || catd == NLERR) {
 		errno = EBADF;
@@ -348,11 +348,11 @@ catclose(nl_catd catd)
 static nl_catd
 load_msgcat(const char *path, const char *name, const char *lang)
 {
-	struct stat	 st;
-	nl_catd		 catd;
-	struct catentry	*np;
-	void		*data;
-	int		 fd;
+	struct stat st;
+	nl_catd	catd;
+	struct catentry *np;
+	void *data;
+	int fd;
 
 	/* path/name will never be NULL here */
 
@@ -418,4 +418,3 @@ load_msgcat(const char *path, const char
 	UNLOCK;
 	return (catd);
 }
-

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 19:25:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F3F4B1065672;
	Fri, 29 Jan 2010 19:25:45 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E30A08FC15;
	Fri, 29 Jan 2010 19:25:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TJPjOR052952;
	Fri, 29 Jan 2010 19:25:45 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TJPj69052950;
	Fri, 29 Jan 2010 19:25:45 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201001291925.o0TJPj69052950@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 29 Jan 2010 19:25:45 +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: r203175 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 19:25:46 -0000

Author: kib
Date: Fri Jan 29 19:25:45 2010
New Revision: 203175
URL: http://svn.freebsd.org/changeset/base/203175

Log:
  The MAP_ENTRY_NEEDS_COPY flag belongs to protoeflags, cow variable
  uses different namespace.
  
  Reported by:	Jonathan Anderson 
  MFC after:	3 days

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Fri Jan 29 18:33:59 2010	(r203174)
+++ head/sys/vm/vm_map.c	Fri Jan 29 19:25:45 2010	(r203175)
@@ -1136,7 +1136,7 @@ vm_map_insert(vm_map_t map, vm_object_t 
 	    ((protoeflags & MAP_ENTRY_NEEDS_COPY) || object == NULL))) {
 		if (!(cow & MAP_ACC_CHARGED) && !swap_reserve(end - start))
 			return (KERN_RESOURCE_SHORTAGE);
-		KASSERT(object == NULL || (cow & MAP_ENTRY_NEEDS_COPY) ||
+		KASSERT(object == NULL || (protoeflags & MAP_ENTRY_NEEDS_COPY) ||
 		    object->uip == NULL,
 		    ("OVERCOMMIT: vm_map_insert o %p", object));
 		uip = curthread->td_ucred->cr_ruidinfo;

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 20:02:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 971631065670;
	Fri, 29 Jan 2010 20:02:28 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 848A68FC17;
	Fri, 29 Jan 2010 20:02:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TK2SpN060995;
	Fri, 29 Jan 2010 20:02:28 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TK2S0h060992;
	Fri, 29 Jan 2010 20:02:28 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201001292002.o0TK2S0h060992@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 29 Jan 2010 20:02:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203176 - in stable/8/sys: kern sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 20:02:28 -0000

Author: kib
Date: Fri Jan 29 20:02:28 2010
New Revision: 203176
URL: http://svn.freebsd.org/changeset/base/203176

Log:
  MFC r202692:
  Remove the signal from sigqueue before notifying the debugger for traced
  process, fixing the race between resuming from stopped state and other
  thread noting the old signal on the queue and acting.

Modified:
  stable/8/sys/kern/kern_sig.c
  stable/8/sys/sys/signalvar.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/kern_sig.c
==============================================================================
--- stable/8/sys/kern/kern_sig.c	Fri Jan 29 19:25:45 2010	(r203175)
+++ stable/8/sys/kern/kern_sig.c	Fri Jan 29 20:02:28 2010	(r203176)
@@ -353,7 +353,10 @@ sigqueue_add(sigqueue_t *sq, int signo, 
 
 	/* directly insert the ksi, don't copy it */
 	if (si->ksi_flags & KSI_INS) {
-		TAILQ_INSERT_TAIL(&sq->sq_list, si, ksi_link);
+		if (si->ksi_flags & KSI_HEAD)
+			TAILQ_INSERT_HEAD(&sq->sq_list, si, ksi_link);
+		else
+			TAILQ_INSERT_TAIL(&sq->sq_list, si, ksi_link);
 		si->ksi_sigq = sq;
 		goto out_set_bit;
 	}
@@ -374,7 +377,10 @@ sigqueue_add(sigqueue_t *sq, int signo, 
 			p->p_pendingcnt++;
 		ksiginfo_copy(si, ksi);
 		ksi->ksi_signo = signo;
-		TAILQ_INSERT_TAIL(&sq->sq_list, ksi, ksi_link);
+		if (si->ksi_flags & KSI_HEAD)
+			TAILQ_INSERT_HEAD(&sq->sq_list, ksi, ksi_link);
+		else
+			TAILQ_INSERT_TAIL(&sq->sq_list, ksi, ksi_link);
 		ksi->ksi_sigq = sq;
 	}
 
@@ -2488,6 +2494,7 @@ issignal(struct thread *td, int stop_all
 	struct sigacts *ps;
 	struct sigqueue *queue;
 	sigset_t sigpending;
+	ksiginfo_t ksi;
 	int sig, prop, newsig;
 
 	p = td->td_proc;
@@ -2525,24 +2532,22 @@ issignal(struct thread *td, int stop_all
 		if (p->p_flag & P_TRACED && (p->p_flag & P_PPWAIT) == 0) {
 			/*
 			 * If traced, always stop.
+			 * Remove old signal from queue before the stop.
+			 * XXX shrug off debugger, it causes siginfo to
+			 * be thrown away.
 			 */
+			queue = &td->td_sigqueue;
+			ksi.ksi_signo = 0;
+			if (sigqueue_get(queue, sig, &ksi) == 0) {
+				queue = &p->p_sigqueue;
+				sigqueue_get(queue, sig, &ksi);
+			}
+
 			mtx_unlock(&ps->ps_mtx);
 			newsig = ptracestop(td, sig);
 			mtx_lock(&ps->ps_mtx);
 
 			if (sig != newsig) {
-				ksiginfo_t ksi;
-
-				queue = &td->td_sigqueue;
-				/*
-				 * clear old signal.
-				 * XXX shrug off debugger, it causes siginfo to
-				 * be thrown away.
-				 */
-				if (sigqueue_get(queue, sig, &ksi) == 0) {
-					queue = &p->p_sigqueue;
-					sigqueue_get(queue, sig, &ksi);
-				}
 
 				/*
 				 * If parent wants us to take the signal,
@@ -2557,10 +2562,20 @@ issignal(struct thread *td, int stop_all
 				 * Put the new signal into td_sigqueue. If the
 				 * signal is being masked, look for other signals.
 				 */
-				SIGADDSET(queue->sq_signals, sig);
+				sigqueue_add(queue, sig, NULL);
 				if (SIGISMEMBER(td->td_sigmask, sig))
 					continue;
 				signotify(td);
+			} else {
+				if (ksi.ksi_signo != 0) {
+					ksi.ksi_flags |= KSI_HEAD;
+					if (sigqueue_add(&td->td_sigqueue, sig,
+					    &ksi) != 0)
+						ksi.ksi_signo = 0;
+				}
+				if (ksi.ksi_signo == 0)
+					sigqueue_add(&td->td_sigqueue, sig,
+					    NULL);
 			}
 
 			/*

Modified: stable/8/sys/sys/signalvar.h
==============================================================================
--- stable/8/sys/sys/signalvar.h	Fri Jan 29 19:25:45 2010	(r203175)
+++ stable/8/sys/sys/signalvar.h	Fri Jan 29 20:02:28 2010	(r203176)
@@ -234,6 +234,7 @@ typedef struct ksiginfo {
 #define	KSI_EXT		0x02	/* Externally managed ksi. */
 #define KSI_INS		0x04	/* Directly insert ksi, not the copy */
 #define	KSI_SIGQ	0x08	/* Generated by sigqueue, might ret EGAIN. */
+#define	KSI_HEAD	0x10	/* Insert into head, not tail. */
 #define	KSI_COPYMASK	(KSI_TRAP|KSI_SIGQ)
 
 #define	KSI_ONQ(ksi)	((ksi)->ksi_sigq != NULL)

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 20:37:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79E321065672;
	Fri, 29 Jan 2010 20:37:12 +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 4EA948FC13;
	Fri, 29 Jan 2010 20:37:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TKbCHb068613;
	Fri, 29 Jan 2010 20:37:12 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TKbC9Q068611;
	Fri, 29 Jan 2010 20:37:12 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201001292037.o0TKbC9Q068611@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Fri, 29 Jan 2010 20:37:12 +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: r203177 - head/sys/powerpc/mpc85xx
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 20:37:12 -0000

Author: marcel
Date: Fri Jan 29 20:37:12 2010
New Revision: 203177
URL: http://svn.freebsd.org/changeset/base/203177

Log:
  Don't check the device ID. Instead, check the class, subclass and
  programming I/F. New SoC designs have different device IDs, but
  don't need special treatment. Consequently, we fail to probe and
  attach for no other reason than not having added the device ID to
  the code.
  
  Bank on Freescale's sense of backward compatibility and assume
  that if we find a host controller, we know how work with it.
  
  This fixes detection of the PCI Express host controllers on
  Freescale's QorIQ family of processors (P1, P2 and P4).

Modified:
  head/sys/powerpc/mpc85xx/pci_ocp.c

Modified: head/sys/powerpc/mpc85xx/pci_ocp.c
==============================================================================
--- head/sys/powerpc/mpc85xx/pci_ocp.c	Fri Jan 29 20:02:28 2010	(r203176)
+++ head/sys/powerpc/mpc85xx/pci_ocp.c	Fri Jan 29 20:37:12 2010	(r203177)
@@ -297,7 +297,7 @@ pci_ocp_probe(device_t dev)
 {
 	char buf[128];
 	struct pci_ocp_softc *sc;
-	const char *mpcid, *type;
+	const char *type;
 	device_t parent;
 	u_long start, size;
 	uintptr_t devtype;
@@ -327,33 +327,18 @@ pci_ocp_probe(device_t dev)
 	cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_VENDOR, 2);
 	if (cfgreg != 0x1057 && cfgreg != 0x1957)
 		goto out;
-	cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_DEVICE, 2);
-	switch (cfgreg) {
-	case 0x000a:
-		mpcid = "8555E";
-		break;
-	case 0x0012:
-		mpcid = "8548E";
-		break;
-	case 0x0013:
-		mpcid = "8548";
-		break;
-	/*
-	 * Documentation from Freescale is incorrect.
-	 * Use right values after documentation is corrected.
-	 */
-	case 0x0030:
-		mpcid = "8544E";
-		break;
-	case 0x0031:
-		mpcid = "8544";
-		break;
-	case 0x0032:
-		mpcid = "8544";
-		break;
-	default:
+
+	cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CLASS, 1);
+	if (cfgreg != PCIC_PROCESSOR)
+		goto out;
+
+	cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_SUBCLASS, 1);
+	if (cfgreg != PCIS_PROCESSOR_POWERPC)
+		goto out;
+
+	cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_PROGIF, 1);
+	if (cfgreg != 0)	/* RC mode = 0, EP mode = 1 */
 		goto out;
-	}
 
 	type = "PCI";
 	cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CAP_PTR, 1);
@@ -376,7 +361,7 @@ pci_ocp_probe(device_t dev)
 		goto out;
 
 	snprintf(buf, sizeof(buf),
-	    "Freescale MPC%s %s host controller", mpcid, type);
+	    "Freescale on-chip %s host controller", type);
 	device_set_desc_copy(dev, buf);
 	error = BUS_PROBE_DEFAULT;
 

From owner-svn-src-all@FreeBSD.ORG  Fri Jan 29 20:42:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F30C6106568D;
	Fri, 29 Jan 2010 20:42:03 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E0C208FC13;
	Fri, 29 Jan 2010 20:42:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0TKg3xf069713;
	Fri, 29 Jan 2010 20:42:03 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0TKg3LF069711;
	Fri, 29 Jan 2010 20:42:03 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201001292042.o0TKg3LF069711@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 29 Jan 2010 20:42:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203178 - in stable/8/etc: . rc.d
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 29 Jan 2010 20:42:04 -0000

Author: kib
Date: Fri Jan 29 20:42:03 2010
New Revision: 203178
URL: http://svn.freebsd.org/changeset/base/203178

Log:
  MFC r202880:
  Do not check for existence of symlink source for the link action.

Modified:
  stable/8/etc/rc.d/devfs
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/etc/services   (props changed)

Modified: stable/8/etc/rc.d/devfs
==============================================================================
--- stable/8/etc/rc.d/devfs	Fri Jan 29 20:37:12 2010	(r203177)
+++ stable/8/etc/rc.d/devfs	Fri Jan 29 20:42:03 2010	(r203178)
@@ -44,7 +44,7 @@ read_devfs_conf()
 		while read action devicelist parameter; do
 			case "${action}" in
 			l*)	for device in ${devicelist}; do
-					if [ -c ${device} -a ! -e ${parameter} ]; then
+					if [ ! -e ${parameter} ]; then
 						ln -fs ${device} ${parameter}
 					fi
 				done

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 00:11:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 753201065672;
	Sat, 30 Jan 2010 00:11:45 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 63B9C8FC1A;
	Sat, 30 Jan 2010 00:11:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0U0BjKH026662;
	Sat, 30 Jan 2010 00:11:45 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0U0BjQm026661;
	Sat, 30 Jan 2010 00:11:45 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201001300011.o0U0BjQm026661@svn.freebsd.org>
From: Jack F Vogel 
Date: Sat, 30 Jan 2010 00:11:45 +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: r203179 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 00:11:45 -0000

Author: jfv
Date: Sat Jan 30 00:11:44 2010
New Revision: 203179
URL: http://svn.freebsd.org/changeset/base/203179

Log:
  Fix for kern/141646: when stacking pseudo drivers like
  lagg and vlan the vlan attach/detach event is not being
  handed down to em, this caused some init code not to run,
  and thus VLANs did not work. Ultimately having the event
  get propagated would be nice, but for now the solution is
  to have HWFILTER off by default, when this is the case
  VLANs will work, ifconfig can be used to turn it on and
  then get HW tag filtering.

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Fri Jan 29 20:42:03 2010	(r203178)
+++ head/sys/dev/e1000/if_em.c	Sat Jan 30 00:11:44 2010	(r203179)
@@ -94,7 +94,7 @@ int	em_display_debug_stats = 0;
 /*********************************************************************
  *  Driver version:
  *********************************************************************/
-char em_driver_version[] = "6.9.24";
+char em_driver_version[] = "6.9.25";
 
 
 /*********************************************************************
@@ -1287,6 +1287,12 @@ em_ioctl(struct ifnet *ifp, u_long comma
 			ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
 			reinit = 1;
 		}
+
+		if (mask & IFCAP_VLAN_HWFILTER) {
+			ifp->if_capenable ^= IFCAP_VLAN_HWFILTER;
+			reinit = 1;
+		}
+
 		if ((mask & IFCAP_WOL) &&
 		    (ifp->if_capabilities & IFCAP_WOL) != 0) {
 			if (mask & IFCAP_WOL_MCAST)
@@ -1294,6 +1300,7 @@ em_ioctl(struct ifnet *ifp, u_long comma
 			if (mask & IFCAP_WOL_MAGIC)
 				ifp->if_capenable ^= IFCAP_WOL_MAGIC;
 		}
+
 		if (reinit && (ifp->if_drv_flags & IFF_DRV_RUNNING))
 			em_init(adapter);
 #if __FreeBSD_version >= 700000
@@ -1420,18 +1427,17 @@ em_init_locked(struct adapter *adapter)
 
 	/* Setup VLAN support, basic and offload if available */
 	E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN);
-
-#if __FreeBSD_version < 700029
 	if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) {
-		u32 ctrl;
-		ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL);
-		ctrl |= E1000_CTRL_VME;
-		E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl);
+		if (ifp->if_capenable & IFCAP_VLAN_HWFILTER)
+			/* Use real VLAN Filter support */
+			em_setup_vlan_hw_support(adapter);
+		else {
+			u32 ctrl;
+			ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+			ctrl |= E1000_CTRL_VME;
+			E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl);
+		}
 	}
-#else
-	/* Use real VLAN Filter support */
-	em_setup_vlan_hw_support(adapter);
-#endif
 
 	/* Set hardware offload abilities */
 	ifp->if_hwassist = 0;
@@ -3123,13 +3129,23 @@ em_setup_interface(device_t dev, struct 
 	if (adapter->hw.mac.type >= e1000_82571)
 		ifp->if_capenable |= IFCAP_TSO4;
 #endif
-
 	/*
-	 * Tell the upper layer(s) we support long frames.
+	 * Tell the upper layer(s) we
+	 * support full VLAN capability
 	 */
 	ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
 	ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
-	ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
+	ifp->if_capenable |= (IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING);
+
+	/*
+	** Dont turn this on by default, if vlans are
+	** created on another pseudo device (eg. lagg)
+	** then vlan events are not passed thru, breaking
+	** operation, but with HW FILTER off it works. If
+	** using vlans directly on the em driver you can
+	** enable this and get full hardware tag filtering. 
+	*/
+	ifp->if_capabilities |= IFCAP_VLAN_HWFILTER;
 
 #ifdef DEVICE_POLLING
 	ifp->if_capabilities |= IFCAP_POLLING;

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 01:54:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DCF5106568D;
	Sat, 30 Jan 2010 01:54:30 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BF0A8FC13;
	Sat, 30 Jan 2010 01:54:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0U1sUIM049102;
	Sat, 30 Jan 2010 01:54:30 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0U1sU8r049095;
	Sat, 30 Jan 2010 01:54:30 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201001300154.o0U1sU8r049095@svn.freebsd.org>
From: Neel Natu 
Date: Sat, 30 Jan 2010 01:54:30 +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: r203180 - in head/sys/mips: include mips
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 01:54:30 -0000

Author: neel
Date: Sat Jan 30 01:54:29 2010
New Revision: 203180
URL: http://svn.freebsd.org/changeset/base/203180

Log:
  Provide access to pcpu structures for SMP kernels.
  
  The basic idea is to use a the same virtual address as a window onto
  distinct physical memory locations - one per processor. The physical
  address that you access through this mapping depends on which cpu you
  are currently executing on. We can now use the same virtual address
  on any processor to access its per-cpu area.
  
  The details are:
  
  - The virtual address for 'struct pcpu *pcpup' is obtained by
    stealing 2 pages worth of KVA in pmap_bootstrap().
  
  - The mapping from the constant virtual address to a distinct
    physical page is done in cpu_pcpu_init() through a wired TLB entry.
  
  - A side-effect of this is that we reserve 2 pages worth of memory
    for the pcpu but in reality it needs much less than that. The unused
    memory is now used as the boot stack for the BSP and APs.
  
  Remove SMP-specific bits from locore.S. The plan is to use a separate
  mpboot.S for AP bootstrap.
  
  Discussed on: freebsd-mips
  
  Approved by: imp (mentor)

Modified:
  head/sys/mips/include/cpu.h
  head/sys/mips/include/pcpu.h
  head/sys/mips/mips/genassym.c
  head/sys/mips/mips/locore.S
  head/sys/mips/mips/machdep.c
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/include/cpu.h
==============================================================================
--- head/sys/mips/include/cpu.h	Sat Jan 30 00:11:44 2010	(r203179)
+++ head/sys/mips/include/cpu.h	Sat Jan 30 01:54:29 2010	(r203180)
@@ -309,8 +309,16 @@
 
 /*
  * The first TLB entry that write random hits.
+ * TLB entry 0 maps the kernel stack of the currently running thread
+ * TLB entry 1 maps the pcpu area of processor (only for SMP builds)
  */
+#define	KSTACK_TLB_ENTRY	0
+#ifdef SMP
+#define	PCPU_TLB_ENTRY		1
+#define	VMWIRED_ENTRIES		2
+#else
 #define	VMWIRED_ENTRIES		1
+#endif	/* SMP */
 
 /*
  * The number of process id entries.

Modified: head/sys/mips/include/pcpu.h
==============================================================================
--- head/sys/mips/include/pcpu.h	Sat Jan 30 00:11:44 2010	(r203179)
+++ head/sys/mips/include/pcpu.h	Sat Jan 30 01:54:29 2010	(r203180)
@@ -38,35 +38,15 @@
 	struct	pmap	*pc_curpmap;		/* pmap of curthread */	\
 	u_int32_t	pc_next_asid;		/* next ASID to alloc */ \
 	u_int32_t	pc_asid_generation;	/* current ASID generation */ \
-	u_int		pc_pending_ipis;	/* the IPIs pending to this CPU */ \
-	void		*pc_boot_stack;
+	u_int		pc_pending_ipis;	/* IPIs pending to this CPU */
 
 #ifdef _KERNEL
 
-#ifdef SMP
-static __inline struct pcpu*
-get_pcpup(void)
-{
-	/*
-	 * FREEBSD_DEVELOPERS_FIXME
-	 * In multiprocessor case, store/retrieve the pcpu structure
-	 * address for current CPU in scratch register for fast access.
-	 *
-	 * In this routine, read the scratch register to retrieve the PCPU
-	 * structure for this CPU
-	 */
-	struct pcpu *ret;
-
-	/* ret should contain the pointer to the PCPU structure for this CPU */
-	return(ret);
-}
-
-#define	PCPUP	((struct pcpu *)get_pcpup())
-#else
-/* Uni processor systems */
+extern char pcpu_space[MAXCPU][PAGE_SIZE * 2];
+#define	PCPU_ADDR(cpu)		(struct pcpu *)(pcpu_space[(cpu)])
+
 extern struct pcpu *pcpup;
 #define	PCPUP	pcpup
-#endif /* SMP */
 
 #define	PCPU_ADD(member, value)	(PCPUP->pc_ ## member += (value))
 #define	PCPU_GET(member)	(PCPUP->pc_ ## member)

Modified: head/sys/mips/mips/genassym.c
==============================================================================
--- head/sys/mips/mips/genassym.c	Sat Jan 30 00:11:44 2010	(r203179)
+++ head/sys/mips/mips/genassym.c	Sat Jan 30 01:54:29 2010	(r203180)
@@ -82,7 +82,6 @@ ASSYM(PC_CURPCB, offsetof(struct pcpu, p
 ASSYM(PC_SEGBASE, offsetof(struct pcpu, pc_segbase));
 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
-ASSYM(PC_BOOT_STACK, offsetof(struct pcpu, pc_boot_stack));
 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
 

Modified: head/sys/mips/mips/locore.S
==============================================================================
--- head/sys/mips/mips/locore.S	Sat Jan 30 00:11:44 2010	(r203179)
+++ head/sys/mips/mips/locore.S	Sat Jan 30 01:54:29 2010	(r203180)
@@ -77,14 +77,9 @@
 GLOBAL(fenvp)
 	.space 4			# Assumes mips32?  Is that OK?
 #endif
-GLOBAL(stackspace)
-	.space NBPG /* Smaller than it should be since it's temp. */
-	.align 8
-GLOBAL(topstack)
 
-	
 	.set noreorder
-	
+
 	.text
 
 GLOBAL(btext)
@@ -133,6 +128,7 @@ VECTOR(_locore, unknown)
 	or	t2, t1
 	mtc0	t2, COP_0_STATUS_REG
 	COP0_SYNC
+
 	/* Make sure KSEG0 is cached */
 	li	t0, CFG_K0_CACHED
 	mtc0	t0, MIPS_COP_0_CONFIG
@@ -157,13 +153,6 @@ VECTOR(_locore, unknown)
 	sw	t0, _C_LABEL(cpu_id)
 	sw	t1, _C_LABEL(fpu_id)
 
-/*
- * Initialize stack and call machine startup.
- */
-	PTR_LA	sp, _C_LABEL(topstack) - START_FRAME
-	PTR_LA	gp, _C_LABEL(_gp)
-	sw	zero, START_FRAME - 4(sp)  # Zero out old ra for debugger
-
 	/*xxximp
 	 * now that we pass a0...a3 to the platform_init routine, do we need
 	 * to stash this stuff here?
@@ -174,58 +163,19 @@ VECTOR(_locore, unknown)
 #endif
 
 	/*
-	 * The following needs to be done differently for each platform and
-	 * there needs to be a good way to plug this in.
+	 * Initialize stack and call machine startup.
 	 */
-#if defined(SMP) && defined(CPU_XLR)
-/*
- * Block all the slave CPUs
- */
-	/* XXX a0, a1, a2 shouldn't be used here */
-	/*
-	 * Read the cpu id from the cp0 config register
-	 * cpuid[9:4], thrid[3: 0]
-	 */
-	mfc0	a0, COP_0_CONFIG, 7
-	srl	a1, a0, 4
-	andi	a1, a1, 0x3f
-	andi	a0, a0, 0xf
-
-	/* calculate linear cpuid */
-	sll     t0, a1, 2
-	addu    a2, t0, a0
-/* Initially, disable all hardware threads on each core except thread0 */
-	li	t1, VCPU_ID_0
-	li	t2, XLR_THREAD_ENABLE_IND
-	mtcr	t1, t2
-#endif
+	PTR_LA	sp, _C_LABEL(pcpu_space)
+	addiu	sp, (NBPG * 2) - START_FRAME
 
+	sw	zero, START_FRAME - 4(sp)	# Zero out old ra for debugger
+	sw	zero, START_FRAME - 8(sp)	# Zero out old fp for debugger
 
-#if defined(TARGET_OCTEON) /* Maybe this is mips32/64 generic? */
-	.set push
-	.set mips32r2
-	rdhwr	t0, $0
-	.set pop
-#else
-	move	t0, zero
-#endif
-
-	/* Stage the secondary cpu start until later */
-	bne	t0, zero, start_secondary
-	nop
-
-#ifdef SMP
-	PTR_LA	t0, _C_LABEL(__pcpu)
-	SET_CPU_PCPU(t0)
-	/* If not master cpu, jump... */
-/*XXX this assumes the above #if 0'd code runs */
-	bne    a2, zero, start_secondary
-	nop
-#endif
+	PTR_LA	gp, _C_LABEL(_gp)
 
 	/* Call the platform-specific startup code. */
 	jal	_C_LABEL(platform_start)
-	sw	zero, START_FRAME - 8(sp)	# Zero out old fp for debugger
+	nop
 
 	PTR_LA	sp, _C_LABEL(thread0)
 	lw      a0, TD_PCB(sp)
@@ -238,25 +188,4 @@ VECTOR(_locore, unknown)
 
 	PANIC("Startup failed!")
 
-#ifdef SMP
-start_secondary:
-	move	a0, a1
-2:
-	addiu	t0, PCPU_SIZE
-	subu	a1, 1
-	bne	a1, zero, 2b
-	nop
-	SET_CPU_PCPU(t0)
-smp_wait:
-	lw	sp, PC_BOOT_STACK(t0)
-	beqz	sp, smp_wait
-	nop
-	jal	_C_LABEL(smp_init_secondary)
-	nop
-#else
-start_secondary:
-	b	start_secondary
-	nop
-#endif
-
 VECTOR_END(_locore)

Modified: head/sys/mips/mips/machdep.c
==============================================================================
--- head/sys/mips/mips/machdep.c	Sat Jan 30 00:11:44 2010	(r203179)
+++ head/sys/mips/mips/machdep.c	Sat Jan 30 01:54:29 2010	(r203180)
@@ -115,12 +115,28 @@ int clocks_running = 0;
 
 vm_offset_t kstack0;
 
+/*
+ * Each entry in the pcpu_space[] array is laid out in the following manner:
+ * struct pcpu for cpu 'n'	pcpu_space[n]
+ * boot stack for cpu 'n'	pcpu_space[n] + PAGE_SIZE * 2 - START_FRAME
+ *
+ * Note that the boot stack grows downwards and we assume that we never
+ * use enough stack space to trample over the 'struct pcpu' that is at
+ * the beginning of the array.
+ *
+ * The array is aligned on a (PAGE_SIZE * 2) boundary so that the 'struct pcpu'
+ * is always in the even page frame of the wired TLB entry on SMP kernels.
+ *
+ * The array is in the .data section so that the stack does not get zeroed out
+ * when the .bss section is zeroed.
+ */
+char pcpu_space[MAXCPU][PAGE_SIZE * 2] \
+	__aligned(PAGE_SIZE * 2) __section(".data");
+
 #ifdef SMP
-struct pcpu __pcpu[MAXCPU];
-char pcpu_boot_stack[KSTACK_PAGES * PAGE_SIZE * MAXCPU]; 
+struct pcpu *pcpup = 0;		/* initialized in pmap_bootstrap() */
 #else
-struct pcpu pcpu;
-struct pcpu *pcpup = &pcpu;
+struct pcpu *pcpup = (struct pcpu *)pcpu_space;
 #endif
 
 vm_offset_t phys_avail[PHYS_AVAIL_ENTRIES + 2];
@@ -269,11 +285,7 @@ void
 mips_pcpu0_init()
 {
 	/* Initialize pcpu info of cpu-zero */
-#ifdef SMP
-	pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu));
-#else
-	pcpu_init(pcpup, 0, sizeof(struct pcpu));
-#endif
+	pcpu_init(PCPU_ADDR(0), 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 }
 
@@ -283,6 +295,10 @@ mips_pcpu0_init()
 void
 mips_proc0_init(void)
 {
+#ifdef SMP
+	if (platform_processor_id() != 0)
+		panic("BSP must be processor number 0");
+#endif
 	proc_linkup0(&proc0, &thread0);
 
 	KASSERT((kstack0 & PAGE_MASK) == 0,
@@ -410,12 +426,27 @@ void
 cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size)
 {
 #ifdef SMP
-	if (cpuid != 0)
-		pcpu->pc_boot_stack = (void *)(pcpu_boot_stack + cpuid *
-		    (KSTACK_PAGES * PAGE_SIZE));
+	vm_paddr_t pa;
+	struct tlb tlb;
+	int lobits;
 #endif
+
 	pcpu->pc_next_asid = 1;
 	pcpu->pc_asid_generation = 1;
+
+#ifdef SMP
+	/*
+	 * Map the pcpu structure at the virtual address 'pcpup'.
+	 * We use a wired tlb index to do this one-time mapping.
+	 */
+	memset(&tlb, 0, sizeof(tlb));
+	pa = vtophys(pcpu);
+	lobits = PTE_RW | PTE_V | PTE_G | PTE_CACHE;
+	tlb.tlb_hi = (vm_offset_t)pcpup;
+	tlb.tlb_lo0 = mips_paddr_to_tlbpfn(pa) | lobits;
+	tlb.tlb_lo1 = mips_paddr_to_tlbpfn(pa + PAGE_SIZE) | lobits;
+	Mips_TLBWriteIndexed(PCPU_TLB_ENTRY, &tlb);
+#endif
 }
 
 int

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Sat Jan 30 00:11:44 2010	(r203179)
+++ head/sys/mips/mips/pmap.c	Sat Jan 30 01:54:29 2010	(r203180)
@@ -355,6 +355,17 @@ again:
 	virtual_avail = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET;
 	virtual_end = VM_MAX_KERNEL_ADDRESS;
 
+#ifdef SMP
+	/*
+	 * Steal some virtual address space to map the pcpu area.
+	 */
+	virtual_avail = roundup2(virtual_avail, PAGE_SIZE * 2);
+	pcpup = (struct pcpu *)virtual_avail;
+	virtual_avail += PAGE_SIZE * 2;
+	if (bootverbose)
+		printf("pcpu is available at virtual address %p.\n", pcpup);
+#endif
+
 	/*
 	 * Steal some virtual space that will not be in kernel_segmap. This
 	 * va memory space will be used to map in kernel pages that are
@@ -428,8 +439,8 @@ again:
 	kernel_pmap->pm_segtab = kernel_segmap;
 	kernel_pmap->pm_active = ~0;
 	TAILQ_INIT(&kernel_pmap->pm_pvlist);
-	kernel_pmap->pm_asid[PCPU_GET(cpuid)].asid = PMAP_ASID_RESERVED;
-	kernel_pmap->pm_asid[PCPU_GET(cpuid)].gen = 0;
+	kernel_pmap->pm_asid[0].asid = PMAP_ASID_RESERVED;
+	kernel_pmap->pm_asid[0].gen = 0;
 	pmap_max_asid = VMNUM_PIDS;
 	MachSetPID(0);
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 04:24:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D1431065670;
	Sat, 30 Jan 2010 04:24:04 +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 1A96B8FC32;
	Sat, 30 Jan 2010 04:24:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0U4O3Xf082286;
	Sat, 30 Jan 2010 04:24:03 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0U4O370082276;
	Sat, 30 Jan 2010 04:24:03 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201001300424.o0U4O370082276@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 30 Jan 2010 04:24:03 +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: r203181 - in head/lib: . libefi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 04:24:04 -0000

Author: marcel
Date: Sat Jan 30 04:24:03 2010
New Revision: 203181
URL: http://svn.freebsd.org/changeset/base/203181

Log:
  Introduce libefi -- a library around EFI runtime services and protocols.
  This first commit brings 3 functions for enumerating, retrieving,
  adding, removing and modifying EFI variables. The immediate use of these
  include the insertion of a new boot option as part of the installation
  process.
  
  This library uses ioctl(2) requests implemented by io(4) to pass the
  requests down through the kernel to EFI. These ioctl requests are only
  implemented on ia64, so libefi is currently only enabled on ia64. The
  interface is generic and io(4) on mad64/i386 can easily be taught to
  handle these once EFI support has been added to the kernel there.

Added:
  head/lib/libefi/
  head/lib/libefi/Makefile   (contents, props changed)
  head/lib/libefi/efi_getvar.c   (contents, props changed)
  head/lib/libefi/efi_nextvarname.c   (contents, props changed)
  head/lib/libefi/efi_setvar.c   (contents, props changed)
  head/lib/libefi/libefi.3   (contents, props changed)
  head/lib/libefi/libefi.c   (contents, props changed)
  head/lib/libefi/libefi.h   (contents, props changed)
  head/lib/libefi/libefi_int.h   (contents, props changed)
Modified:
  head/lib/Makefile

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile	Sat Jan 30 01:54:29 2010	(r203180)
+++ head/lib/Makefile	Sat Jan 30 04:24:03 2010	(r203181)
@@ -33,8 +33,8 @@ SUBDIR=	${_csu} libc libbsm libauditd li
 	libtacplus libutil ${_libypclnt} libalias libarchive \
 	${_libatm} libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \
 	libcalendar libcam libcompat libdevinfo libdevstat libdisk \
-	libdwarf libedit libexpat libfetch libftpio libgeom ${_libgpib} \
-	${_libgssapi} ${_librpcsec_gss} libipsec \
+	libdwarf libedit ${_libefi} libexpat libfetch libftpio libgeom \
+	${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \
 	${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \
 	${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \
 	${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \
@@ -104,6 +104,7 @@ _libvgl=	libvgl
 .endif
 
 .if ${MACHINE_ARCH} == "ia64"
+_libefi=	libefi
 _libsmb=	libsmb
 .endif
 

Added: head/lib/libefi/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/Makefile	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+.include 
+
+LIB=	efi
+SHLIB_MAJOR= 1
+
+SRCS=	libefi.c \
+	efi_getvar.c \
+	efi_nextvarname.c \
+	efi_setvar.c
+
+CFLAGS+= -I${.CURDIR}
+
+INCS=	libefi.h
+
+MAN+=	libefi.3
+MLINKS+=libefi.3 efi_getvar.3 \
+	libefi.3 efi_nextvarname.3 \
+	libefi.3 efi_setvar.3
+
+.include 

Added: head/lib/libefi/efi_getvar.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/efi_getvar.c	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,68 @@
+/*-
+ * Copyright (c) 2010 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+#include "libefi_int.h"
+
+/*
+ * EFI_STATUS
+ * GetVariable(
+ *	IN CHAR16	*VariableName,
+ *	IN EFI_GUID	*VendorGuid,
+ *	OUT UINT32	*Attributes OPTIONAL,
+ *	IN OUT UINTN	*DataSize,
+ *	OUT VOID	*Data
+ *   );
+ */
+
+int
+efi_getvar(char *name, uuid_t *vendor, uint32_t *attrib, size_t *datasize,
+    void *data)
+{
+	struct iodev_efivar_req req;
+	int error;
+
+	req.namesize = 0;
+	error = libefi_utf8_to_ucs2(name, &req.namesize, &req.name);
+	if (error)
+		return (error);
+
+	req.vendor = *vendor;
+	req.datasize = *datasize;
+	req.data = data;
+	req.access = IODEV_EFIVAR_GETVAR;
+	error = libefi_efivar(&req);
+	*datasize = req.datasize;
+	if (!error && attrib != NULL)
+		*attrib = req.attrib;
+	free(req.name);
+	return (error);
+}

Added: head/lib/libefi/efi_nextvarname.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/efi_nextvarname.c	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 2010 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+#include "libefi_int.h"
+
+/*
+ * EFI_STATUS
+ * GetNextVariableName(
+ *	IN OUT UINTN	*VariableNameSize,
+ *	IN OUT CHAR16	*VariableName,
+ *	IN OUT EFI_GUID	*VendorGuid
+ *    );
+ */
+
+int
+efi_nextvarname(size_t *namesize, char *name, uuid_t *vendor)
+{
+	struct iodev_efivar_req req;
+	int error;
+
+	req.namesize = *namesize;
+	error = libefi_utf8_to_ucs2(name, &req.namesize, &req.name);
+	if (error)
+		return (error);
+
+	req.vendor = *vendor;
+	req.access = IODEV_EFIVAR_NEXTNAME;
+	error = libefi_efivar(&req);
+	*namesize = req.namesize;
+	if (!error) {
+		error = libefi_ucs2_to_utf8(req.name, namesize, name);
+		if (!error)
+			*vendor = req.vendor;
+	}
+	free(req.name);
+	return (error);
+}

Added: head/lib/libefi/efi_setvar.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/efi_setvar.c	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 2010 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+#include "libefi_int.h"
+
+/*
+ * EFI_STATUS
+ * SetVariable(
+ *	IN CHAR16	*VariableName,
+ *	IN EFI_GUID	*VendorGuid,
+ *	IN UINT32	Attributes,
+ *	IN UINTN	DataSize,
+ *	IN VOID		*Data
+ *    );
+ */
+
+int
+efi_setvar(char *name, uuid_t *vendor, uint32_t attrib, size_t datasize,
+    void *data)
+{
+	struct iodev_efivar_req req;
+	int error;
+
+	req.namesize = 0;
+	error = libefi_utf8_to_ucs2(name, &req.namesize, &req.name);
+	if (error)
+		return (error);
+
+	req.vendor = *vendor;
+	req.attrib = attrib;
+	req.datasize = datasize;
+	req.data = data;
+	req.access = IODEV_EFIVAR_SETVAR;
+	error = libefi_efivar(&req);
+	free(req.name);
+	return (error);
+}

Added: head/lib/libefi/libefi.3
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/libefi.3	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,136 @@
+.\"-
+.\" Copyright (c) 2010 Marcel Moolenaar
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Januari 29, 2010
+.Dt LIBEFI 3
+.Os
+.Sh NAME
+.Nm efi_getvar , efi_nextvarname , efi_setvar
+.Nd Interface for accessing the EFI variable services
+.Sh LIBRARY
+.Lb libefi
+.Sh SYNOPSIS
+.In libefi.h
+.Ft int
+.Fn efi_getvar "char *name" "uuid_t *vendor" "uint32_t *attrib" \
+        "size_t *datasize" "void *data"
+.Ft int
+.Fn efi_nextvarname "size_t *namesize" "char *name" "uuid_t *vendor"
+.Ft int
+.Fn efi_setvar "char *name" "uuid_t *vendor" "uint32_t attrib" \
+        "size_t datasize" "void *data"
+.Sh DESCRIPTION
+The
+.Nm libefi
+library provides access to a select set of the runtime services of the
+Extensible Firmware Interface (EFI).
+.Pp
+The
+.Fn efi_nextvarname
+function is used to enumerate the variables.
+The
+.Nm namesize
+parameter needs to be set to the size of the buffer pointed to by
+.Nm name .
+On return,
+.Nm namesize
+is set to the length of the variable name (including the terminating '\\0')
+irrespective of whether the buffer was big enough.
+The buffer pointed to by
+.Nm name
+contains the full or partial variable name on return.
+Only on successful completion of the request is the
+.Nm vendor
+updated.
+The values returned should be passed to successive calls to
+.Fn efi_nextvarname
+until all variables have been enumerated.
+.Pp
+The variable name and vendor as returned by
+.Fn efi_nextvarname
+can be passed to
+.Fn efi_getvar
+to obtain the value and attribute of the variable.
+The buffer that is to contain the value is specified by
+.Nm data
+and the size of the buffer is given by
+.Nm datasize .
+The attribute pointed to by
+.Nm attrib
+consists of the bit values defined by the EFI specification.
+.Pp
+Variables can be created, modified and deleted using the
+.Fn efi_setvar
+function.
+All new variables must be non-volatile and runtime accessable in
+order for the request to succeed.
+Note that for runtime accessable variables the boottime accessable bit must
+be set as well.
+To delete a variable, set
+.Nm datasize
+to 0.
+.Pp
+The vendor UUID is used to avoid collisions between variable names of
+different vendors.
+Variables created for use by FreeBSD should use the
+.Nm EFI_FREEBSD_VENDOR
+UUID as defined in the
+.Nm libefi
+header file.
+.Sh RETURN VALUES
+Upon successful completion, these functions return 0.
+Otherwise, the error number is returned.
+These functions will fail if:
+.Bl -tag -width Er
+.It Bq Er EACCES
+Insufficient permissions to access the EFI services.
+.It Bq Er EILSEQ
+The variable name is not in UTF-8.
+.It Bq Er EINVAL
+The request has invalid parameters.
+.It Bq Er ENOENT
+The variable does not exist or no more variables exist.
+.It Bq Er ENOMEM
+Temporary storage could not be allocated.
+.It Bq Er EOVERFLOW
+The variable name is too long or the data is too big to fit in
+the buffer provided.
+.El
+.Sh SEE ALSO
+.Xr errno 2 ,
+.Xr uuid 3
+.Sh HISTORY
+The
+.Nm libefi
+library first appeared in
+.Fx 9
+for the ia64 architecture.
+.Sh AUTHORS
+The
+.Nm libefi
+library and corresponding manual page were written by
+.An Marcel Moolenaar Aq marcel@FreeBSD.org .

Added: head/lib/libefi/libefi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/libefi.c	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,176 @@
+/*-
+ * Copyright (c) 2010 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "libefi_int.h"
+
+static int __iofd = -1;
+
+static void
+iodev_fd_close(void)
+{
+
+	close(__iofd);
+}
+
+static int
+iodev_fd(int *fd)
+{
+
+	*fd = __iofd;
+	if (__iofd != -1)
+		return (0);
+
+	__iofd = open("/dev/io", O_RDWR);
+	if (__iofd == -1)
+		return (errno);
+
+	atexit(iodev_fd_close);
+	*fd = __iofd;
+	return (0);
+}
+
+int
+libefi_ucs2_to_utf8(u_short *nm, size_t *szp, char *name)
+{
+	size_t len, sz;
+	u_short c;
+
+	len = 0;
+	sz = *szp;
+	while (*nm) {
+		c = *nm++;
+		if (c > 0x7ff) {
+			if (len++ < sz)
+				*name++ = 0xE0 | (c >> 12);
+			if (len++ < sz)
+				*name++ = 0x80 | ((c >> 6) & 0x3f);
+			if (len++ < sz)
+				*name++ = 0x80 | (c & 0x3f);
+		} else if (c > 0x7f) {
+			if (len++ < sz)
+				*name++ = 0xC0 | ((c >> 6) & 0x1f);
+			if (len++ < sz)
+				*name++ = 0x80 | (c & 0x3f);
+		} else {
+			if (len++ < sz)
+				*name++ = (c & 0x7f);
+		}
+	}
+	if (len++ < sz)
+		*name++ = 0;
+
+	*szp = len;
+	return ((len <= sz) ? 0 : EOVERFLOW);
+}
+
+int
+libefi_utf8_to_ucs2(char *name, size_t *szp, u_short **nmp)
+{
+	u_short *nm;
+	size_t sz;
+	uint32_t ucs4;
+	int c, bytes;
+
+	*szp = sz = (*szp == 0) ? strlen(name) * 2 + 2 : *szp;
+	*nmp = nm = malloc(sz);
+
+	ucs4 = 0;
+	bytes = 0;
+	while (sz > 1 && *name != '\0') {
+		c = *name++;
+		/*
+		 * Conditionalize on the two major character types:
+		 * initial and followup characters.
+		 */
+		if ((c & 0xc0) != 0x80) {
+			/* Initial characters. */
+			if (bytes != 0) {
+				free(nm);
+				return (EILSEQ);
+			}
+			if ((c & 0xf8) == 0xf0) {
+				ucs4 = c & 0x07;
+				bytes = 3;
+			} else if ((c & 0xf0) == 0xe0) {
+				ucs4 = c & 0x0f;
+				bytes = 2;
+			} else if ((c & 0xe0) == 0xc0) {
+				ucs4 = c & 0x1f;
+				bytes = 1;
+			} else {
+				ucs4 = c & 0x7f;
+				bytes = 0;
+			}
+		} else {
+			/* Followup characters. */
+			if (bytes > 0) {
+				ucs4 = (ucs4 << 6) + (c & 0x3f);
+				bytes--;
+			} else if (bytes == 0) {
+				free(nm);
+				return (EILSEQ);
+			}
+		}
+		if (bytes == 0) {
+			if (ucs4 > 0xffff) {
+				free(nm);
+				return (EILSEQ);
+			}
+			*nm++ = (u_short)ucs4;
+			sz -= 2;
+		}
+	}
+	if (sz < 2) {
+		free(nm);
+		return (EDOOFUS);
+	}
+	*nm = 0;
+	return (0);
+}
+
+int
+libefi_efivar(struct iodev_efivar_req *req)
+{
+	int error, fd;
+
+	error = iodev_fd(&fd);
+	if (!error)
+		error = (ioctl(fd, IODEV_EFIVAR, req) == -1) ? errno : 0;
+	if (!error)
+		error = req->result;
+	return (error);
+}

Added: head/lib/libefi/libefi.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/libefi.h	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,57 @@
+/*-
+ * Copyright (c) 2010 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LIBEFI_H_
+#define	_LIBEFI_H_
+
+#include 
+#include 
+#include 
+
+/* Attributes. */
+#define	EFI_ATTR_NV	0x0001	/* Variable stored in NVRAM. */
+#define	EFI_ATTR_BS	0x0002	/* Boot services accessable. */
+#define	EFI_ATTR_RT	0x0004	/* Runtime accessable. */
+#define	EFI_ATTR_HR	0x0008	/* Hardware error record. */
+#define	EFI_ATTR_WR	0x0010	/* Authenticated write access. */
+
+/* Vendor for architecturally defined variables. */
+#define	EFI_GLOBAL_VARIABLE	\
+	{0x8be4df61,0x93ca,0x11d2,0xaa,0x0d,{0x00,0xe0,0x98,0x03,0x2b,0x8c}}
+
+/* Vendor for FreeBSD-specific variables. */
+#define	EFI_FREEBSD_VARIABLE	\
+	{0x13c32014,0x0c9c,0x11df,0xa2,0x38,{0x00,0x17,0xa4,0xab,0x91,0x2d}}
+
+__BEGIN_DECLS
+int	efi_getvar	(char *, uuid_t *, uint32_t *, size_t *, void *);
+int	efi_nextvarname	(size_t *, char *, uuid_t *);
+int	efi_setvar	(char *, uuid_t *, uint32_t, size_t, void *);
+__END_DECLS
+
+#endif /* _LIBEFI_H_ */

Added: head/lib/libefi/libefi_int.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libefi/libefi_int.h	Sat Jan 30 04:24:03 2010	(r203181)
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2010 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LIBEFI_INT_H_
+#define	_LIBEFI_INT_H_
+
+#include 
+#include 
+
+int libefi_ucs2_to_utf8(u_short *, size_t *, char *);
+int libefi_utf8_to_ucs2(char *, size_t *, u_short **);
+
+int libefi_efivar(struct iodev_efivar_req *);
+
+#endif /* _LIBEFI_INT_H_ */

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 06:23:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DF945106566B;
	Sat, 30 Jan 2010 06:23:28 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CDFA68FC19;
	Sat, 30 Jan 2010 06:23:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0U6NSQn008512;
	Sat, 30 Jan 2010 06:23:28 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0U6NSD2008509;
	Sat, 30 Jan 2010 06:23:28 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201001300623.o0U6NSD2008509@svn.freebsd.org>
From: Alan Cox 
Date: Sat, 30 Jan 2010 06:23:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203182 - in stable/8/sys/i386: i386 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 06:23:29 -0000

Author: alc
Date: Sat Jan 30 06:23:28 2010
New Revision: 203182
URL: http://svn.freebsd.org/changeset/base/203182

Log:
  MFC r202894
    Handle a race between pmap_kextract() and pmap_promote_pde().

Modified:
  stable/8/sys/i386/i386/pmap.c
  stable/8/sys/i386/include/pmap.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/i386/i386/pmap.c
==============================================================================
--- stable/8/sys/i386/i386/pmap.c	Sat Jan 30 04:24:03 2010	(r203181)
+++ stable/8/sys/i386/i386/pmap.c	Sat Jan 30 06:23:28 2010	(r203182)
@@ -243,8 +243,9 @@ struct sysmaps {
 	caddr_t	CADDR2;
 };
 static struct sysmaps sysmaps_pcpu[MAXCPU];
-pt_entry_t *CMAP1 = 0;
+pt_entry_t *CMAP1 = 0, *KPTmap;
 static pt_entry_t *CMAP3;
+static pd_entry_t *KPTD;
 caddr_t CADDR1 = 0, ptvmmap = 0;
 static caddr_t CADDR3;
 struct msgbuf *msgbufp = 0;
@@ -440,6 +441,21 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 	SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE)))
 
 	/*
+	 * KPTmap is used by pmap_kextract().
+	 */
+	SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES)
+
+	for (i = 0; i < NKPT; i++)
+		KPTD[i] = (KPTphys + (i << PAGE_SHIFT)) | PG_RW | PG_V;
+
+	/*
+	 * Adjust the start of the KPTD and KPTmap so that the implementation
+	 * of pmap_kextract() and pmap_growkernel() can be made simpler.
+	 */
+	KPTD -= KPTDI;
+	KPTmap -= i386_btop(KPTDI << PDRSHIFT);
+
+	/*
 	 * ptemap is used for pmap_pte_quick
 	 */
 	SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1);
@@ -1829,6 +1845,7 @@ pmap_growkernel(vm_offset_t addr)
 	vm_page_t nkpg;
 	pd_entry_t newpdir;
 	pt_entry_t *pde;
+	boolean_t updated_PTD;
 
 	mtx_assert(&kernel_map->system_mtx, MA_OWNED);
 	if (kernel_vm_end == 0) {
@@ -1868,14 +1885,20 @@ pmap_growkernel(vm_offset_t addr)
 			pmap_zero_page(nkpg);
 		ptppaddr = VM_PAGE_TO_PHYS(nkpg);
 		newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M);
-		pdir_pde(PTD, kernel_vm_end) = newpdir;
+		pdir_pde(KPTD, kernel_vm_end) = newpdir;
 
+		updated_PTD = FALSE;
 		mtx_lock_spin(&allpmaps_lock);
 		LIST_FOREACH(pmap, &allpmaps, pm_list) {
+			if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] &
+			    PG_FRAME))
+				updated_PTD = TRUE;
 			pde = pmap_pde(pmap, kernel_vm_end);
 			pde_store(pde, newpdir);
 		}
 		mtx_unlock_spin(&allpmaps_lock);
+		KASSERT(updated_PTD,
+		    ("pmap_growkernel: current page table is not in allpmaps"));
 		kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
 		if (kernel_vm_end - 1 >= kernel_map->max_offset) {
 			kernel_vm_end = kernel_map->max_offset;

Modified: stable/8/sys/i386/include/pmap.h
==============================================================================
--- stable/8/sys/i386/include/pmap.h	Sat Jan 30 04:24:03 2010	(r203181)
+++ stable/8/sys/i386/include/pmap.h	Sat Jan 30 06:23:28 2010	(r203182)
@@ -265,6 +265,16 @@ pte_load_store_ma(pt_entry_t *ptep, pt_e
 #define	pde_store_ma(ptep, pte)	pte_load_store_ma((ptep), (pt_entry_t)pte)
 
 #elif !defined(XEN)
+
+/*
+ * KPTmap is a linear mapping of the kernel page table.  It differs from the
+ * recursive mapping in two ways: (1) it only provides access to kernel page
+ * table pages, and not user page table pages, and (2) it provides access to
+ * a kernel page table page after the corresponding virtual addresses have
+ * been promoted to a 2/4MB page mapping.
+ */
+extern pt_entry_t *KPTmap;
+
 /*
  *	Routine:	pmap_kextract
  *	Function:
@@ -279,10 +289,17 @@ pmap_kextract(vm_offset_t va)
 	if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) {
 		pa = (pa & PG_PS_FRAME) | (va & PDRMASK);
 	} else {
-		pa = *vtopte(va);
+		/*
+		 * Beware of a concurrent promotion that changes the PDE at
+		 * this point!  For example, vtopte() must not be used to
+		 * access the PTE because it would use the new PDE.  It is,
+		 * however, safe to use the old PDE because the page table
+		 * page is preserved by the promotion.
+		 */
+		pa = KPTmap[i386_btop(va)];
 		pa = (pa & PG_FRAME) | (va & PAGE_MASK);
 	}
-	return pa;
+	return (pa);
 }
 
 #define PT_UPDATES_FLUSH()

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 06:49:19 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12CCC1065670;
	Sat, 30 Jan 2010 06:49:19 +0000 (UTC)
	(envelope-from kientzle@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 01A0A8FC0C;
	Sat, 30 Jan 2010 06:49:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0U6nIjP014178;
	Sat, 30 Jan 2010 06:49:18 GMT
	(envelope-from kientzle@svn.freebsd.org)
Received: (from kientzle@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0U6nIRv014174;
	Sat, 30 Jan 2010 06:49:18 GMT
	(envelope-from kientzle@svn.freebsd.org)
Message-Id: <201001300649.o0U6nIRv014174@svn.freebsd.org>
From: Tim Kientzle 
Date: Sat, 30 Jan 2010 06:49: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: r203183 - head/usr.bin/cpio
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 06:49:19 -0000

Author: kientzle
Date: Sat Jan 30 06:49:18 2010
New Revision: 203183
URL: http://svn.freebsd.org/changeset/base/203183

Log:
  Support -V option to print a dot for each file processed.
  Also, change the existing -vi behavior to send the filenames to
  stderr rather than stdout, as GNU cpio does.
  
  PR:             bin/141175
  Submitted by:	Philip Kizer
  MFC after:	14 days

Modified:
  head/usr.bin/cpio/cmdline.c
  head/usr.bin/cpio/cpio.c
  head/usr.bin/cpio/cpio.h

Modified: head/usr.bin/cpio/cmdline.c
==============================================================================
--- head/usr.bin/cpio/cmdline.c	Sat Jan 30 06:23:28 2010	(r203182)
+++ head/usr.bin/cpio/cmdline.c	Sat Jan 30 06:49:18 2010	(r203183)
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
 /*
  * Short options for cpio.  Please keep this sorted.
  */
-static const char *short_options = "0AaBC:F:O:cdE:f:H:hijLlmnopR:rtuvW:yZz";
+static const char *short_options = "0AaBC:F:O:cdE:f:H:hijLlmnopR:rtuvVW:yZz";
 
 /*
  * Long options for cpio.  Please keep this sorted.
@@ -61,6 +61,7 @@ static const struct option {
 	int equivalent;	/* Equivalent short option. */
 } cpio_longopts[] = {
 	{ "create",			0, 'o' },
+	{ "dot",			0, 'V' },
 	{ "extract",			0, 'i' },
 	{ "file",			1, 'F' },
 	{ "format",             	1, 'H' },

Modified: head/usr.bin/cpio/cpio.c
==============================================================================
--- head/usr.bin/cpio/cpio.c	Sat Jan 30 06:23:28 2010	(r203182)
+++ head/usr.bin/cpio/cpio.c	Sat Jan 30 06:49:18 2010	(r203183)
@@ -278,6 +278,9 @@ main(int argc, char *argv[])
 		case 'v': /* POSIX 1997 */
 			cpio->verbose++;
 			break;
+		case 'V': /* GNU cpio */
+			cpio->dot++;
+			break;
 		case OPTION_VERSION: /* GNU convention */
 			version();
 			break;
@@ -331,6 +334,9 @@ main(int argc, char *argv[])
 	/* -l requires -p */
 	if (cpio->option_link && cpio->mode != 'p')
 		cpio_errc(1, 0, "Option -l requires -p");
+	/* -v overrides -V */
+	if (cpio->dot && cpio->verbose)
+		cpio->dot = 0;
 	/* TODO: Flag other nonsensical combinations. */
 
 	switch (cpio->mode) {
@@ -388,7 +394,7 @@ static const char *long_help_msg =
 	"First option must be a mode specifier:\n"
 	"  -i Input  -o Output  -p Pass\n"
 	"Common Options:\n"
-	"  -v    Verbose\n"
+	"  -v  Verbose filenames    -V  one dot per file\n"
 	"Create: %p -o [options]  < [list of files] > [archive]\n"
 #ifdef HAVE_BZLIB_H
 	"  -y  Compress archive with bzip2\n"
@@ -521,6 +527,8 @@ mode_out(struct cpio *cpio)
 	}
 
 	r = archive_write_close(cpio->archive);
+	if (cpio->dot)
+		fprintf(stderr, "\n");
 	if (r != ARCHIVE_OK)
 		cpio_errc(1, 0, archive_error_string(cpio->archive));
 
@@ -659,6 +667,8 @@ entry_to_archive(struct cpio *cpio, stru
 	/* Print out the destination name to the user. */
 	if (cpio->verbose)
 		fprintf(stderr,"%s", destpath);
+	if (cpio->dot)
+		fprintf(stderr, ".");
 
 	/*
 	 * Option_link only makes sense in pass mode and for
@@ -857,7 +867,9 @@ mode_in(struct cpio *cpio)
 		if (destpath == NULL)
 			continue;
 		if (cpio->verbose)
-			fprintf(stdout, "%s\n", destpath);
+			fprintf(stderr, "%s\n", destpath);
+		if (cpio->dot)
+			fprintf(stderr, ".");
 		if (cpio->uid_override >= 0)
 			archive_entry_set_uid(entry, cpio->uid_override);
 		if (cpio->gid_override >= 0)
@@ -872,6 +884,8 @@ mode_in(struct cpio *cpio)
 		}
 	}
 	r = archive_read_close(a);
+	if (cpio->dot)
+		fprintf(stderr, "\n");
 	if (r != ARCHIVE_OK)
 		cpio_errc(1, 0, archive_error_string(a));
 	r = archive_write_close(ext);
@@ -1078,6 +1092,8 @@ mode_pass(struct cpio *cpio, const char 
 
 	archive_entry_linkresolver_free(cpio->linkresolver);
 	r = archive_write_close(cpio->archive);
+	if (cpio->dot)
+		fprintf(stderr, "\n");
 	if (r != ARCHIVE_OK)
 		cpio_errc(1, 0, archive_error_string(cpio->archive));
 

Modified: head/usr.bin/cpio/cpio.h
==============================================================================
--- head/usr.bin/cpio/cpio.h	Sat Jan 30 06:23:28 2010	(r203182)
+++ head/usr.bin/cpio/cpio.h	Sat Jan 30 06:49:18 2010	(r203183)
@@ -52,6 +52,7 @@ struct cpio {
 	const char	 *format; /* -H format */
 	int		  bytes_per_block; /* -b block_size */
 	int		  verbose;   /* -v */
+	int		  dot;  /* -V */
 	int		  quiet;   /* --quiet */
 	int		  extract_flags; /* Flags for extract operation */
 	char		  symlink_mode; /* H or L, per BSD conventions */

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 12:11:22 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB68B106568B;
	Sat, 30 Jan 2010 12:11:22 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 958DB8FC16;
	Sat, 30 Jan 2010 12:11:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UCBMoh087762;
	Sat, 30 Jan 2010 12:11:22 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UCBMA0087733;
	Sat, 30 Jan 2010 12:11:22 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301211.o0UCBMA0087733@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 12:11:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203184 - in stable/8: bin/pkill lib/libc/gen
	lib/libgssapi lib/librpcsec_gss sbin/fsck_ffs
	sbin/ggate/ggated sbin/natd sbin/routed sys/boot/ofw/libofw
	sys/dev/ksyms sys/dev/led sys/dev...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 12:11:22 -0000

Author: antoine
Date: Sat Jan 30 12:11:21 2010
New Revision: 203184
URL: http://svn.freebsd.org/changeset/base/203184

Log:
  MFC r201145 to stable/8:
    (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
    Fix some wrong usages.
    Note: this does not affect generated binaries as this argument is not used.
  
    PR:		137213
    Submitted by:	Eygene Ryabinkin (initial version)

Modified:
  stable/8/bin/pkill/pkill.c
  stable/8/lib/libc/gen/sem.c
  stable/8/lib/libgssapi/gss_mech_switch.c
  stable/8/lib/librpcsec_gss/rpcsec_gss_conf.c
  stable/8/lib/librpcsec_gss/svc_rpcsec_gss.c
  stable/8/sbin/fsck_ffs/gjournal.c
  stable/8/sbin/ggate/ggated/ggated.c
  stable/8/sbin/natd/natd.c
  stable/8/sbin/routed/if.c
  stable/8/sys/boot/ofw/libofw/ofw_disk.c
  stable/8/sys/dev/ksyms/ksyms.c
  stable/8/sys/dev/led/led.c
  stable/8/sys/dev/md/md.c
  stable/8/sys/dev/sound/pcm/channel.c
  stable/8/sys/dev/sound/pcm/sndstat.c
  stable/8/sys/geom/gate/g_gate.c
  stable/8/sys/ia64/ia64/sscdisk.c
  stable/8/sys/kern/kern_conf.c
  stable/8/sys/kern/kern_jail.c
  stable/8/sys/kern/uipc_accf.c
  stable/8/sys/kern/vfs_mount.c
  stable/8/sys/netgraph/atm/uni/ng_uni.c
  stable/8/sys/netgraph/ng_base.c
  stable/8/sys/netinet/ip_encap.c
  stable/8/sys/netinet/libalias/alias_mod.c
  stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
  stable/8/sys/vm/uma_core.c
  stable/8/tools/regression/geom/ConfCmp/ConfCmp.c
  stable/8/usr.sbin/cpucontrol/cpucontrol.c
  stable/8/usr.sbin/pmcstat/pmcstat_log.c
Directory Properties:
  stable/8/bin/pkill/   (props changed)
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libgssapi/   (props changed)
  stable/8/lib/librpcsec_gss/   (props changed)
  stable/8/sbin/fsck_ffs/   (props changed)
  stable/8/sbin/ggate/   (props changed)
  stable/8/sbin/natd/   (props changed)
  stable/8/sbin/routed/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/tools/regression/geom/   (props changed)
  stable/8/usr.sbin/cpucontrol/   (props changed)
  stable/8/usr.sbin/pmcstat/   (props changed)

Modified: stable/8/bin/pkill/pkill.c
==============================================================================
--- stable/8/bin/pkill/pkill.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/bin/pkill/pkill.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -113,14 +113,14 @@ static int	cflags = REG_EXTENDED;
 static kvm_t	*kd;
 static pid_t	mypid;
 
-static struct listhead euidlist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead ruidlist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead rgidlist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead pgrplist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead ppidlist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead sidlist = SLIST_HEAD_INITIALIZER(list);
-static struct listhead jidlist = SLIST_HEAD_INITIALIZER(list);
+static struct listhead euidlist = SLIST_HEAD_INITIALIZER(euidlist);
+static struct listhead ruidlist = SLIST_HEAD_INITIALIZER(ruidlist);
+static struct listhead rgidlist = SLIST_HEAD_INITIALIZER(rgidlist);
+static struct listhead pgrplist = SLIST_HEAD_INITIALIZER(pgrplist);
+static struct listhead ppidlist = SLIST_HEAD_INITIALIZER(ppidlist);
+static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(tdevlist);
+static struct listhead sidlist = SLIST_HEAD_INITIALIZER(sidlist);
+static struct listhead jidlist = SLIST_HEAD_INITIALIZER(jidlist);
 
 static void	usage(void) __attribute__((__noreturn__));
 static int	killact(const struct kinfo_proc *);

Modified: stable/8/lib/libc/gen/sem.c
==============================================================================
--- stable/8/lib/libc/gen/sem.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/lib/libc/gen/sem.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -73,7 +73,7 @@
 static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem);
 static void  sem_free(sem_t sem);
 
-static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems);
+static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(named_sems);
 static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER;
 
 __weak_reference(__sem_init, sem_init);

Modified: stable/8/lib/libgssapi/gss_mech_switch.c
==============================================================================
--- stable/8/lib/libgssapi/gss_mech_switch.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/lib/libgssapi/gss_mech_switch.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -42,7 +42,7 @@
 #endif
 
 struct _gss_mech_switch_list _gss_mechs =
-	SLIST_HEAD_INITIALIZER(&_gss_mechs);
+	SLIST_HEAD_INITIALIZER(_gss_mechs);
 gss_OID_set _gss_mech_oids;
 
 /*

Modified: stable/8/lib/librpcsec_gss/rpcsec_gss_conf.c
==============================================================================
--- stable/8/lib/librpcsec_gss/rpcsec_gss_conf.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/lib/librpcsec_gss/rpcsec_gss_conf.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -55,7 +55,7 @@ struct mech_info {
 };
 SLIST_HEAD(mech_info_list, mech_info);
 
-static struct mech_info_list mechs = SLIST_HEAD_INITIALIZER(&mechs);
+static struct mech_info_list mechs = SLIST_HEAD_INITIALIZER(mechs);
 static const char **mech_names;
 
 struct qop_info {
@@ -66,7 +66,7 @@ struct qop_info {
 };
 SLIST_HEAD(qop_info_list, qop_info);
 
-static struct qop_info_list qops = SLIST_HEAD_INITIALIZER(&qops);
+static struct qop_info_list qops = SLIST_HEAD_INITIALIZER(qops);
 
 static int
 _rpc_gss_string_to_oid(const char* s, gss_OID oid)

Modified: stable/8/lib/librpcsec_gss/svc_rpcsec_gss.c
==============================================================================
--- stable/8/lib/librpcsec_gss/svc_rpcsec_gss.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/lib/librpcsec_gss/svc_rpcsec_gss.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -90,7 +90,7 @@ struct svc_rpc_gss_callback {
 	rpc_gss_callback_t	cb_callback;
 };
 static SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback)
-	svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_callbacks);
+	svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks);
 
 struct svc_rpc_gss_svc_name {
 	SLIST_ENTRY(svc_rpc_gss_svc_name) sn_link;
@@ -102,7 +102,7 @@ struct svc_rpc_gss_svc_name {
 	u_int			sn_version;
 };
 static SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name)
-	svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_svc_names);
+	svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names);
 
 enum svc_rpc_gss_client_state {
 	CLIENT_NEW,				/* still authenticating */

Modified: stable/8/sbin/fsck_ffs/gjournal.c
==============================================================================
--- stable/8/sbin/fsck_ffs/gjournal.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sbin/fsck_ffs/gjournal.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -86,7 +86,7 @@ struct cgchain {
 
 #define	MAX_CACHED_CGS	1024
 static unsigned ncgs = 0;
-static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIALIZER(&cglist);
+static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIALIZER(cglist);
 
 static const char *devnam;
 static struct uufsd *disk = NULL;

Modified: stable/8/sbin/ggate/ggated/ggated.c
==============================================================================
--- stable/8/sbin/ggate/ggated/ggated.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sbin/ggate/ggated/ggated.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -99,8 +99,8 @@ static TAILQ_HEAD(, ggd_request) outqueu
 pthread_mutex_t inqueue_mtx, outqueue_mtx;
 pthread_cond_t inqueue_cond, outqueue_cond;
 
-static SLIST_HEAD(, ggd_export) exports = SLIST_HEAD_INITIALIZER(&exports);
-static LIST_HEAD(, ggd_connection) connections = LIST_HEAD_INITIALIZER(&connection);
+static SLIST_HEAD(, ggd_export) exports = SLIST_HEAD_INITIALIZER(exports);
+static LIST_HEAD(, ggd_connection) connections = LIST_HEAD_INITIALIZER(connections);
 
 static void *recv_thread(void *arg);
 static void *disk_thread(void *arg);

Modified: stable/8/sbin/natd/natd.c
==============================================================================
--- stable/8/sbin/natd/natd.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sbin/natd/natd.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -68,7 +68,7 @@ struct instance {
 	int			divertInOut;
 };
 
-static LIST_HEAD(, instance) root = LIST_HEAD_INITIALIZER(&root);
+static LIST_HEAD(, instance) root = LIST_HEAD_INITIALIZER(root);
 
 struct libalias *mla;
 struct instance *mip;

Modified: stable/8/sbin/routed/if.c
==============================================================================
--- stable/8/sbin/routed/if.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sbin/routed/if.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -42,7 +42,7 @@ __RCSID("$Revision: 2.27 $");
 #endif
 
 struct ifhead ifnet = LIST_HEAD_INITIALIZER(ifnet);	/* all interfaces */
-struct ifhead remote_if = LIST_HEAD_INITIALIZER(ifnet);	/* remote interfaces */
+struct ifhead remote_if = LIST_HEAD_INITIALIZER(remote_if);	/* remote interfaces */
 
 /* hash table for all interfaces, big enough to tolerate ridiculous
  * numbers of IP aliases.  Crazy numbers of aliases such as 7000

Modified: stable/8/sys/boot/ofw/libofw/ofw_disk.c
==============================================================================
--- stable/8/sys/boot/ofw/libofw/ofw_disk.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/boot/ofw/libofw/ofw_disk.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -67,7 +67,7 @@ struct opened_dev {
 	SLIST_ENTRY(opened_dev)	link;
 };
 
-SLIST_HEAD(, opened_dev) opened_devs = SLIST_HEAD_INITIALIZER(opened_dev);
+SLIST_HEAD(, opened_dev) opened_devs = SLIST_HEAD_INITIALIZER(opened_devs);
 
 static int
 ofwd_init(void)

Modified: stable/8/sys/dev/ksyms/ksyms.c
==============================================================================
--- stable/8/sys/dev/ksyms/ksyms.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/dev/ksyms/ksyms.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -94,7 +94,7 @@ struct ksyms_softc {
 static struct mtx 		 ksyms_mtx;
 static struct cdev 		*ksyms_dev;
 static LIST_HEAD(, ksyms_softc)	 ksyms_list = 
-	LIST_HEAD_INITIALIZER(&ksyms_list);
+	LIST_HEAD_INITIALIZER(ksyms_list);
 
 static const char 	ksyms_shstrtab[] = 
 	"\0" STR_SYMTAB "\0" STR_STRTAB "\0" STR_SHSTRTAB "\0";

Modified: stable/8/sys/dev/led/led.c
==============================================================================
--- stable/8/sys/dev/led/led.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/dev/led/led.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -40,7 +40,7 @@ struct ledsc {
 static struct unrhdr *led_unit;
 static struct mtx led_mtx;
 static struct sx led_sx;
-static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(&led_list);
+static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(led_list);
 static struct callout led_ch;
 
 static MALLOC_DEFINE(M_LED, "LED", "LED driver");

Modified: stable/8/sys/dev/md/md.c
==============================================================================
--- stable/8/sys/dev/md/md.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/dev/md/md.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -152,7 +152,7 @@ struct g_class g_md_class = {
 DECLARE_GEOM_CLASS(g_md_class, g_md);
 
 
-static LIST_HEAD(, md_s) md_softc_list = LIST_HEAD_INITIALIZER(&md_softc_list);
+static LIST_HEAD(, md_s) md_softc_list = LIST_HEAD_INITIALIZER(md_softc_list);
 
 #define NINDIR	(PAGE_SIZE / sizeof(uintptr_t))
 #define NMASK	(NINDIR-1)

Modified: stable/8/sys/dev/sound/pcm/channel.c
==============================================================================
--- stable/8/sys/dev/sound/pcm/channel.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/dev/sound/pcm/channel.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -220,7 +220,7 @@ MTX_SYSINIT(pcm_syncgroup, &snd_pcm_sync
  *
  * See SNDCTL_DSP_SYNCGROUP for more information.
  */
-struct pcm_synclist snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(head);
+struct pcm_synclist snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(snd_pcm_syncgroups);
 
 static void
 chn_lockinit(struct pcm_channel *c, int dir)

Modified: stable/8/sys/dev/sound/pcm/sndstat.c
==============================================================================
--- stable/8/sys/dev/sound/pcm/sndstat.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/dev/sound/pcm/sndstat.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -79,7 +79,7 @@ static int sndstat_files = 0;
 	}								\
 } while (0)
 
-static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(none);
+static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(sndstat_devlist);
 
 int snd_verbose = 0;
 TUNABLE_INT("hw.snd.verbose", &snd_verbose);

Modified: stable/8/sys/geom/gate/g_gate.c
==============================================================================
--- stable/8/sys/geom/gate/g_gate.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/geom/gate/g_gate.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -72,7 +72,7 @@ static struct cdevsw g_gate_cdevsw = {
 
 
 static LIST_HEAD(, g_gate_softc) g_gate_list =
-    LIST_HEAD_INITIALIZER(&g_gate_list);
+    LIST_HEAD_INITIALIZER(g_gate_list);
 static struct mtx g_gate_list_mtx;
 
 

Modified: stable/8/sys/ia64/ia64/sscdisk.c
==============================================================================
--- stable/8/sys/ia64/ia64/sscdisk.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/ia64/ia64/sscdisk.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -76,7 +76,7 @@ MALLOC_DEFINE(M_SSC, "ssc_disk", "Simula
 
 static d_strategy_t sscstrategy;
 
-static LIST_HEAD(, ssc_s) ssc_softc_list = LIST_HEAD_INITIALIZER(&ssc_softc_list);
+static LIST_HEAD(, ssc_s) ssc_softc_list = LIST_HEAD_INITIALIZER(ssc_softc_list);
 
 struct ssc_s {
 	int unit;

Modified: stable/8/sys/kern/kern_conf.c
==============================================================================
--- stable/8/sys/kern/kern_conf.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/kern/kern_conf.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -63,7 +63,7 @@ static struct cdev *make_dev_credv(int f
 static struct cdev_priv_list cdevp_free_list =
     TAILQ_HEAD_INITIALIZER(cdevp_free_list);
 static SLIST_HEAD(free_cdevsw, cdevsw) cdevsw_gt_post_list =
-    SLIST_HEAD_INITIALIZER();
+    SLIST_HEAD_INITIALIZER(cdevsw_gt_post_list);
 
 void
 dev_lock(void)

Modified: stable/8/sys/kern/kern_jail.c
==============================================================================
--- stable/8/sys/kern/kern_jail.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/kern/kern_jail.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -102,7 +102,7 @@ struct prison prison0 = {
 	.pr_securelevel	= -1,
 	.pr_childmax	= JAIL_MAX,
 	.pr_hostuuid	= DEFAULT_HOSTUUID,
-	.pr_children	= LIST_HEAD_INITIALIZER(&prison0.pr_children),
+	.pr_children	= LIST_HEAD_INITIALIZER(prison0.pr_children),
 #ifdef VIMAGE
 	.pr_flags	= PR_HOST|PR_VNET|_PR_IP_SADDRSEL,
 #else

Modified: stable/8/sys/kern/uipc_accf.c
==============================================================================
--- stable/8/sys/kern/uipc_accf.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/kern/uipc_accf.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -54,7 +54,7 @@ MTX_SYSINIT(accept_filter, &accept_filte
 #define	ACCEPT_FILTER_UNLOCK()	mtx_unlock(&accept_filter_mtx)
 
 static SLIST_HEAD(, accept_filter) accept_filtlsthd =
-	SLIST_HEAD_INITIALIZER(&accept_filtlsthd);
+	SLIST_HEAD_INITIALIZER(accept_filtlsthd);
 
 MALLOC_DEFINE(M_ACCF, "accf", "accept filter data");
 

Modified: stable/8/sys/kern/vfs_mount.c
==============================================================================
--- stable/8/sys/kern/vfs_mount.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/kern/vfs_mount.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -1354,7 +1354,7 @@ struct root_hold_token {
 };
 
 static LIST_HEAD(, root_hold_token)	root_holds =
-    LIST_HEAD_INITIALIZER(&root_holds);
+    LIST_HEAD_INITIALIZER(root_holds);
 
 static int root_mount_complete;
 

Modified: stable/8/sys/netgraph/atm/uni/ng_uni.c
==============================================================================
--- stable/8/sys/netgraph/atm/uni/ng_uni.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/netgraph/atm/uni/ng_uni.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -771,18 +771,18 @@ struct unimem_debug {
 LIST_HEAD(unimem_debug_list, unimem_debug);
 
 static struct unimem_debug_list nguni_freemem[UNIMEM_TYPES] = {
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
+    LIST_HEAD_INITIALIZER(nguni_freemem[0]),
+    LIST_HEAD_INITIALIZER(nguni_freemem[1]),
+    LIST_HEAD_INITIALIZER(nguni_freemem[2]),
+    LIST_HEAD_INITIALIZER(nguni_freemem[3]),
+    LIST_HEAD_INITIALIZER(nguni_freemem[4]),
 };
 static struct unimem_debug_list nguni_usedmem[UNIMEM_TYPES] = {
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
-    LIST_HEAD_INITIALIZER(unimem_debug),
+    LIST_HEAD_INITIALIZER(nguni_usedmem[0]),
+    LIST_HEAD_INITIALIZER(nguni_usedmem[1]),
+    LIST_HEAD_INITIALIZER(nguni_usedmem[2]),
+    LIST_HEAD_INITIALIZER(nguni_usedmem[3]),
+    LIST_HEAD_INITIALIZER(nguni_usedmem[4]),
 };
 
 static struct mtx nguni_unilist_mtx;

Modified: stable/8/sys/netgraph/ng_base.c
==============================================================================
--- stable/8/sys/netgraph/ng_base.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/netgraph/ng_base.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -120,7 +120,7 @@ struct ng_node ng_deadnode = {
 	0,	/* numhooks */
 	NULL,	/* private */
 	0,	/* ID */
-	LIST_HEAD_INITIALIZER(ng_deadnode.hooks),
+	LIST_HEAD_INITIALIZER(ng_deadnode.nd_hooks),
 	{},	/* all_nodes list entry */
 	{},	/* id hashtable list entry */
 	{	0,

Modified: stable/8/sys/netinet/ip_encap.c
==============================================================================
--- stable/8/sys/netinet/ip_encap.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/netinet/ip_encap.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -103,7 +103,7 @@ static void encap_fillarg(struct mbuf *,
  */
 static struct mtx encapmtx;
 MTX_SYSINIT(encapmtx, &encapmtx, "encapmtx", MTX_DEF);
-LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(&encaptab);
+LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(encaptab);
 
 /*
  * We currently keey encap_init() for source code compatibility reasons --

Modified: stable/8/sys/netinet/libalias/alias_mod.c
==============================================================================
--- stable/8/sys/netinet/libalias/alias_mod.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/netinet/libalias/alias_mod.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$");
 #endif
 
 /* Protocol and userland module handlers chains. */
-LIST_HEAD(handler_chain, proto_handler) handler_chain = LIST_HEAD_INITIALIZER(foo);
+LIST_HEAD(handler_chain, proto_handler) handler_chain = LIST_HEAD_INITIALIZER(handler_chain);
 #ifdef _KERNEL
 struct rwlock   handler_rw;
 #endif
-SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(foo); 
+SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(dll_chain); 
 
 #ifdef _KERNEL
 

Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==============================================================================
--- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -100,7 +100,7 @@ struct svc_rpc_gss_callback {
 	rpc_gss_callback_t	cb_callback;
 };
 static SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback)
-	svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_callbacks);
+	svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks);
 
 struct svc_rpc_gss_svc_name {
 	SLIST_ENTRY(svc_rpc_gss_svc_name) sn_link;
@@ -112,7 +112,7 @@ struct svc_rpc_gss_svc_name {
 	u_int			sn_version;
 };
 static SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name)
-	svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_svc_names);
+	svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names);
 
 enum svc_rpc_gss_client_state {
 	CLIENT_NEW,				/* still authenticating */

Modified: stable/8/sys/vm/uma_core.c
==============================================================================
--- stable/8/sys/vm/uma_core.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/sys/vm/uma_core.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -122,14 +122,14 @@ static MALLOC_DEFINE(M_UMAHASH, "UMAHash
 static int bucketdisable = 1;
 
 /* Linked list of all kegs in the system */
-static LIST_HEAD(,uma_keg) uma_kegs = LIST_HEAD_INITIALIZER(&uma_kegs);
+static LIST_HEAD(,uma_keg) uma_kegs = LIST_HEAD_INITIALIZER(uma_kegs);
 
 /* This mutex protects the keg list */
 static struct mtx uma_mtx;
 
 /* Linked list of boot time pages */
 static LIST_HEAD(,uma_slab) uma_boot_pages =
-    LIST_HEAD_INITIALIZER(&uma_boot_pages);
+    LIST_HEAD_INITIALIZER(uma_boot_pages);
 
 /* This mutex protects the boot time pages list */
 static struct mtx uma_boot_pages_mtx;

Modified: stable/8/tools/regression/geom/ConfCmp/ConfCmp.c
==============================================================================
--- stable/8/tools/regression/geom/ConfCmp/ConfCmp.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/tools/regression/geom/ConfCmp/ConfCmp.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -74,7 +74,7 @@ struct ref {
 	char			*k2;
 };
 
-LIST_HEAD(, ref)		refs = LIST_HEAD_INITIALIZER(&refs);
+LIST_HEAD(, ref)		refs = LIST_HEAD_INITIALIZER(refs);
 
 static struct node *
 new_node(void)

Modified: stable/8/usr.sbin/cpucontrol/cpucontrol.c
==============================================================================
--- stable/8/usr.sbin/cpucontrol/cpucontrol.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/usr.sbin/cpucontrol/cpucontrol.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -83,7 +83,7 @@ struct datadir {
 	const char		*path;
 	SLIST_ENTRY(datadir)	next;
 };
-static SLIST_HEAD(, datadir) datadirs = SLIST_HEAD_INITIALIZER(&datadirs);
+static SLIST_HEAD(, datadir) datadirs = SLIST_HEAD_INITIALIZER(datadirs);
 
 struct ucode_handler {
 	ucode_probe_t *probe;

Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcstat_log.c	Sat Jan 30 06:49:18 2010	(r203183)
+++ stable/8/usr.sbin/pmcstat/pmcstat_log.c	Sat Jan 30 12:11:21 2010	(r203184)
@@ -141,7 +141,7 @@ struct pmcstat_pmcrecord {
 };
 
 static LIST_HEAD(,pmcstat_pmcrecord)	pmcstat_pmcs =
-	LIST_HEAD_INITIALIZER(&pmcstat_pmcs);
+	LIST_HEAD_INITIALIZER(pmcstat_pmcs);
 
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 12:14:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 119F3106566B;
	Sat, 30 Jan 2010 12:14:27 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211])
	by mx1.freebsd.org (Postfix) with ESMTP id A61098FC12;
	Sat, 30 Jan 2010 12:14:26 +0000 (UTC)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id A2C6C1CEDF; Sat, 30 Jan 2010 13:14:25 +0100 (CET)
Date: Sat, 30 Jan 2010 13:14:25 +0100
From: Ed Schouten 
To: Antoine Brodin 
Message-ID: <20100130121425.GD77705@hoeg.nl>
References: <201001301211.o0UCBMA0087733@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="eqq5Le9VNi5o1NaU"
Content-Disposition: inline
In-Reply-To: <201001301211.o0UCBMA0087733@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r203184 - in stable/8: bin/pkill lib/libc/gen
 lib/libgssapi lib/librpcsec_gss sbin/fsck_ffs sbin/ggate/ggated sbin/natd
 sbin/routed sys/boot/ofw/libofw sys/dev/ksyms sys/dev/led sys/dev...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 12:14:27 -0000


--eqq5Le9VNi5o1NaU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Antoine Brodin  wrote:
> Note: this does not affect generated binaries as this argument is not use=
d.

Too bad the queue macros are used outside FreeBSD as well. Otherwise we
should have just removed the argument.

--=20
 Ed Schouten 
 WWW: http://80386.nl/

--eqq5Le9VNi5o1NaU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAktkIqEACgkQ52SDGA2eCwVKDgCfTtSWQ2a9d1cYXKlSOQp3xFS6
/N0AnRkQGL94c070IX0UxW3+qDaXVudE
=utLU
-----END PGP SIGNATURE-----

--eqq5Le9VNi5o1NaU--

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 12:18:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 32344106566B;
	Sat, 30 Jan 2010 12:18:24 +0000 (UTC)
	(envelope-from antoine.brodin.freebsd@gmail.com)
Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com
	[209.85.220.227])
	by mx1.freebsd.org (Postfix) with ESMTP id 920B78FC0C;
	Sat, 30 Jan 2010 12:18:22 +0000 (UTC)
Received: by fxm27 with SMTP id 27so1098469fxm.3
	for ; Sat, 30 Jan 2010 04:18:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=aGprbHEVAwEmfTds9hS3s4IuqwJnpUnyQ2EZWAVS+3M=;
	b=SWygT6BHQy/pFA15QpKtV2Rrm5RkYICgBQJ164xE4yomJZy6j2JQFKFCnTZLzrYShg
	/GAP3VWjKPIbOe2Ub+UM2fsL/NrjwSxbBF79kPSVUnlNmBinrzsmNGZbu7t4qul8lT5W
	wma4eWDei76vkqvNYlFY06n2Ik1rBVzBOT8Lw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=KSYJIX+a6TpWYxt1qT2f6MB4uET359I+0iiW7NMF1off+wZ2N/iruTgCoTHRdXYcYY
	fIncJDdzFy3u+UFsTLV9ujtUQpMHw199JWfgD3K+arJNhMMGhAKS4T85ihw/0uhR97tY
	ZAOan4lB/LQCmX/OAkoavBencYq4H4QvdNEWA=
MIME-Version: 1.0
Sender: antoine.brodin.freebsd@gmail.com
Received: by 10.239.188.84 with SMTP id o20mr232927hbh.81.1264853901832; Sat, 
	30 Jan 2010 04:18:21 -0800 (PST)
In-Reply-To: <20100130121425.GD77705@hoeg.nl>
References: <201001301211.o0UCBMA0087733@svn.freebsd.org>
	<20100130121425.GD77705@hoeg.nl>
Date: Sat, 30 Jan 2010 13:18:21 +0100
X-Google-Sender-Auth: b79c7dbb13838eb6
Message-ID: 
From: Antoine Brodin 
To: Ed Schouten 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r203184 - in stable/8: bin/pkill lib/libc/gen 
	lib/libgssapi lib/librpcsec_gss sbin/fsck_ffs sbin/ggate/ggated
	sbin/natd 
	sbin/routed sys/boot/ofw/libofw sys/dev/ksyms sys/dev/led sys/dev...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 12:18:24 -0000

On Sat, Jan 30, 2010 at 1:14 PM, Ed Schouten  wrote:
> * Antoine Brodin  wrote:
>> Note: this does not affect generated binaries as this argument is not used.
>
> Too bad the queue macros are used outside FreeBSD as well. Otherwise we
> should have just removed the argument.

I think this argument is here for consistency with
(S)TAILQ_HEAD_INITIALIZER, where the argument is used.

Cheers,

Antoine

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:04:21 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 65FFA1065679;
	Sat, 30 Jan 2010 14:04:21 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 533B38FC14;
	Sat, 30 Jan 2010 14:04:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UE4Lb1012611;
	Sat, 30 Jan 2010 14:04:21 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UE4L7r012608;
	Sat, 30 Jan 2010 14:04:21 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201001301404.o0UE4L7r012608@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 30 Jan 2010 14:04:21 +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: r203185 - head/sys/sparc64/sparc64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:04:21 -0000

Author: marius
Date: Sat Jan 30 14:04:21 2010
New Revision: 203185
URL: http://svn.freebsd.org/changeset/base/203185

Log:
  Implement handling of the third argument of cpu_switch(). This unbreaks
  sparc64 after r202889.
  
  PR:		143215
  MFC after:	1 week

Modified:
  head/sys/sparc64/sparc64/genassym.c
  head/sys/sparc64/sparc64/swtch.S

Modified: head/sys/sparc64/sparc64/genassym.c
==============================================================================
--- head/sys/sparc64/sparc64/genassym.c	Sat Jan 30 12:11:21 2010	(r203184)
+++ head/sys/sparc64/sparc64/genassym.c	Sat Jan 30 14:04:21 2010	(r203185)
@@ -239,6 +239,7 @@ ASSYM(P_VMSPACE, offsetof(struct proc, p
 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
 ASSYM(TD_FRAME, offsetof(struct thread, td_frame));
 ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack));
+ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
 ASSYM(TD_MD, offsetof(struct thread, td_md));

Modified: head/sys/sparc64/sparc64/swtch.S
==============================================================================
--- head/sys/sparc64/sparc64/swtch.S	Sat Jan 30 12:11:21 2010	(r203184)
+++ head/sys/sparc64/sparc64/swtch.S	Sat Jan 30 14:04:21 2010	(r203185)
@@ -46,15 +46,14 @@ ENTRY(cpu_throw)
 	save	%sp, -CCFSZ, %sp
 	flushw
 	ba	%xcc, .Lsw1
-	 mov	%i1, %i0
+	 mov	%g0, %i2
 END(cpu_throw)
 
 /*
- * void cpu_switch(struct thread *old, struct thread *new)
+ * void cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx)
  */
 ENTRY(cpu_switch)
 	save	%sp, -CCFSZ, %sp
-	mov	%i1, %i0
 
 	/*
 	 * If the current thread was using floating point in the kernel, save
@@ -63,7 +62,7 @@ ENTRY(cpu_switch)
 	 */
 	rd	%fprs, %l2
 	andcc	%l2, FPRS_FEF, %g0
-	bz,a,pt %xcc, 1f
+	bz,a,pt	%xcc, 1f
 	 nop
 	call	savefpctx
 	 add	PCB_REG, PCB_KFP, %o0
@@ -104,24 +103,24 @@ ENTRY(cpu_switch)
 .Lsw1:
 #if KTR_COMPILE & KTR_PROC
 	CATR(KTR_PROC, "cpu_switch: new td=%p pc=%#lx fp=%#lx"
-	    , %g1, %g2, %g3, 7, 8, 9)
-	stx	%i0, [%g1 + KTR_PARM1]
-	ldx	[%i0 + TD_PCB], %g2
+	    , %g1, %g2, %g3, 8, 9, 10)
+	stx	%i1, [%g1 + KTR_PARM1]
+	ldx	[%i1 + TD_PCB], %g2
 	ldx	[%g2 + PCB_PC], %g3
 	stx	%g3, [%g1 + KTR_PARM2]
 	ldx	[%g2 + PCB_SP], %g3
 	stx	%g3, [%g1 + KTR_PARM3]
-9:
+10:
 #endif
-	ldx	[%i0 + TD_PCB], %i1
+	ldx	[%i1 + TD_PCB], %l0
 
-	stx	%i0, [PCPU(CURTHREAD)]
-	stx	%i1, [PCPU(CURPCB)]
+	stx	%i1, [PCPU(CURTHREAD)]
+	stx	%l0, [PCPU(CURPCB)]
 
 	wrpr	%g0, PSTATE_NORMAL, %pstate
-	mov	%i1, PCB_REG
+	mov	%l0, PCB_REG
 	wrpr	%g0, PSTATE_ALT, %pstate
-	mov	%i1, PCB_REG
+	mov	%l0, PCB_REG
 	wrpr	%g0, PSTATE_KERNEL, %pstate
 
 	ldx	[PCB_REG + PCB_SP], %fp
@@ -132,24 +131,24 @@ ENTRY(cpu_switch)
 	 * Point to the pmaps of the new process, and of the last non-kernel
 	 * process to run.
 	 */
-	ldx	[%i0 + TD_PROC], %i2
+	ldx	[%i1 + TD_PROC], %l1
 	ldx	[PCPU(PMAP)], %l2
-	ldx	[%i2 + P_VMSPACE], %i5
-	add	%i5, VM_PMAP, %i2
+	ldx	[%l1 + P_VMSPACE], %i5
+	add	%i5, VM_PMAP, %l1
 
 #if KTR_COMPILE & KTR_PROC
 	CATR(KTR_PROC, "cpu_switch: new pmap=%p old pmap=%p"
-	    , %g1, %g2, %g3, 7, 8, 9)
-	stx	%i2, [%g1 + KTR_PARM1]
+	    , %g1, %g2, %g3, 8, 9, 10)
+	stx	%l1, [%g1 + KTR_PARM1]
 	stx	%l2, [%g1 + KTR_PARM2]
-9:
+10:
 #endif
 
 	/*
 	 * If they are the same we are done.
 	 */
-	cmp	%l2, %i2
-	be,a,pn %xcc, 5f
+	cmp	%l2, %l1
+	be,a,pn	%xcc, 7f
 	 nop
 
 	/*
@@ -158,21 +157,20 @@ ENTRY(cpu_switch)
 	 */
 	SET(vmspace0, %i4, %i3)
 	cmp	%i5, %i3
-	be,a,pn %xcc, 5f
+	be,a,pn	%xcc, 7f
 	 nop
 
 	/*
 	 * If there was no non-kernel pmap, don't try to deactivate it.
 	 */
-	brz,a,pn %l2, 3f
-	 nop
+	brz,pn	%l2, 3f
+	 lduw	[PCPU(CPUMASK)], %l4
 
 	/*
 	 * Mark the pmap of the last non-kernel vmspace to run as no longer
 	 * active on this CPU.
 	 */
 	lduw	[%l2 + PM_ACTIVE], %l3
-	lduw	[PCPU(CPUMASK)], %l4
 	andn	%l3, %l4, %l3
 	stw	%l3, [%l2 + PM_ACTIVE]
 
@@ -185,25 +183,28 @@ ENTRY(cpu_switch)
 	mov	-1, %l5
 	stw	%l5, [%l3 + %l4]
 
+3:	cmp	%i2, %g0
+	be,pn	%xcc, 4f
+	 lduw	[PCPU(TLB_CTX_MAX)], %i4
+	stx	%i2, [%i0 + TD_LOCK]
+
 	/*
 	 * Find a new TLB context.  If we've run out we have to flush all
 	 * user mappings from the TLB and reset the context numbers.
 	 */
-3:	lduw	[PCPU(TLB_CTX)], %i3
-	lduw	[PCPU(TLB_CTX_MAX)], %i4
+4:	lduw	[PCPU(TLB_CTX)], %i3
 	cmp	%i3, %i4
-	bne,a,pt %xcc, 4f
+	bne,a,pt %xcc, 5f
 	 nop
 	SET(tlb_flush_user, %i5, %i4)
 	ldx	[%i4], %i5
 	call	%i5
-	 nop
-	lduw	[PCPU(TLB_CTX_MIN)], %i3
+	 lduw	[PCPU(TLB_CTX_MIN)], %i3
 
 	/*
 	 * Advance next free context.
 	 */
-4:	add	%i3, 1, %i4
+5:	add	%i3, 1, %i4
 	stw	%i4, [PCPU(TLB_CTX)]
 
 	/*
@@ -211,36 +212,36 @@ ENTRY(cpu_switch)
 	 */
 	lduw	[PCPU(CPUID)], %i4
 	sllx	%i4, INT_SHIFT, %i4
-	add	%i2, PM_CONTEXT, %i5
+	add	%l1, PM_CONTEXT, %i5
 	stw	%i3, [%i4 + %i5]
 
 	/*
 	 * Mark the pmap as active on this CPU.
 	 */
-	lduw	[%i2 + PM_ACTIVE], %i4
+	lduw	[%l1 + PM_ACTIVE], %i4
 	lduw	[PCPU(CPUMASK)], %i5
 	or	%i4, %i5, %i4
-	stw	%i4, [%i2 + PM_ACTIVE]
+	stw	%i4, [%l1 + PM_ACTIVE]
 
 	/*
 	 * Make note of the change in pmap.
 	 */
-	stx	%i2, [PCPU(PMAP)]
+	stx	%l1, [PCPU(PMAP)]
 
 	/*
 	 * Fiddle the hardware bits.  Set the TSB registers and install the
 	 * new context number in the CPU.
 	 */
-	ldx	[%i2 + PM_TSB], %i4
+	ldx	[%l1 + PM_TSB], %i4
 	mov	AA_DMMU_TSB, %i5
 	stxa	%i4, [%i5] ASI_DMMU
 	mov	AA_IMMU_TSB, %i5
 	stxa	%i4, [%i5] ASI_IMMU
 	setx	TLB_PCXR_PGSZ_MASK, %i5, %i4
 	mov	AA_DMMU_PCXR, %i5
-	ldxa	[%i5] ASI_DMMU, %i2
-	and	%i2, %i4, %i2
-	or	%i3, %i2, %i3
+	ldxa	[%i5] ASI_DMMU, %l1
+	and	%l1, %i4, %l1
+	or	%i3, %l1, %i3
 	sethi	%hi(KERNBASE), %i4
 	stxa	%i3, [%i5] ASI_DMMU
 	flush	%i4
@@ -248,7 +249,15 @@ ENTRY(cpu_switch)
 	/*
 	 * Done, return and load the new process's window from the stack.
 	 */
-5:	ret
+
+6:	ret
+	 restore
+
+7:	cmp	%i2, %g0
+	be,a,pn	%xcc, 6b
+	 nop
+	stx	%i2, [%i0 + TD_LOCK]
+	ret
 	 restore
 END(cpu_switch)
 

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:40:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF63D106566C;
	Sat, 30 Jan 2010 14:40:39 +0000 (UTC)
	(envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214])
	by mx1.freebsd.org (Postfix) with ESMTP id 1B60D8FC08;
	Sat, 30 Jan 2010 14:40:38 +0000 (UTC)
Received: from alchemy.franken.de (localhost [127.0.0.1])
	by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id
	o0UEeaiI098983; Sat, 30 Jan 2010 15:40:37 +0100 (CET)
	(envelope-from marius@alchemy.franken.de)
Received: (from marius@localhost)
	by alchemy.franken.de (8.14.3/8.14.3/Submit) id o0UEeauP098982;
	Sat, 30 Jan 2010 15:40:36 +0100 (CET) (envelope-from marius)
Date: Sat, 30 Jan 2010 15:40:36 +0100
From: Marius Strobl 
To: Attilio Rao 
Message-ID: <20100130144036.GA77522@alchemy.franken.de>
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	
	<3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com>
	<20100127215904.GF40779@alchemy.franken.de>
	<3bbf2fe11001280216p705ed94ev61abc4be654f8cc1@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <3bbf2fe11001280216p705ed94ev61abc4be654f8cc1@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Rob Farmer , src-committers@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:40:39 -0000

On Thu, Jan 28, 2010 at 11:16:55AM +0100, Attilio Rao wrote:
> 2010/1/27 Marius Strobl :
> > On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote:
> >> 2010/1/26 Rob Farmer :
> >> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao  wrote:
> >> >> Author: attilio
> >> >> Date: Sat Jan 23 15:54:21 2010
> >> >> New Revision: 202889
> >> >> URL: http://svn.freebsd.org/changeset/base/202889
> >> >>
> >> >> Log:
> >> >>  - Fix a race in sched_switch() of sched_4bsd.
> >> >>    In the case of the thread being on a sleepqueue or a turnstile, the
> >> >>    sched_lock was acquired (without the aid of the td_lock interface) and
> >> >>    the td_lock was dropped. This was going to break locking rules on other
> >> >>    threads willing to access to the thread (via the td_lock interface) and
> >> >>    modify his flags (allowed as long as the container lock was different
> >> >>    by the one used in sched_switch).
> >> >>    In order to prevent this situation, while sched_lock is acquired there
> >> >>    the td_lock gets blocked. [0]
> >> >>  - Merge the ULE's internal function thread_block_switch() into the global
> >> >>    thread_lock_block() and make the former semantic as the default for
> >> >>    thread_lock_block(). This means that thread_lock_block() will not
> >> >>    disable interrupts when called (and consequently thread_unlock_block()
> >> >>    will not re-enabled them when called). This should be done manually
> >> >>    when necessary.
> >> >>    Note, however, that ULE's thread_unblock_switch() is not reaped
> >> >>    because it does reflect a difference in semantic due in ULE (the
> >> >>    td_lock may not be necessarilly still blocked_lock when calling this).
> >> >>    While asymmetric, it does describe a remarkable difference in semantic
> >> >>    that is good to keep in mind.
> >> >>
> >> >>  [0] Reported by:      Kohji Okuno
> >> >>                        
> >> >>  Tested by:            Giovanni Trematerra
> >> >>                        
> >> >>  MFC:                  2 weeks
> >> >>
> >> >> Modified:
> >> >>  head/sys/kern/kern_mutex.c
> >> >>  head/sys/kern/sched_4bsd.c
> >> >>  head/sys/kern/sched_ule.c
> >> >
> >> > Hi,
> >> >
> >> > This commit seems to be causing me a kernel panic on sparc64 - details
> >> > are in PR 143215. Could you take a look before MFCing this?
> >>
> >> I think that the bug may be in cpu_switch() where the mutex parameter
> >> for sched_4bsd is not handled correctly.
> >> Does sparc64 support ULE? I don't think it does and I think that it
> >> simply ignores the third argument of cpu_switch() which is vital now
> >> for for sched_4bsd too (what needs to happen is to take the passed
> >> mutex and to set the TD_LOCK of old thread to be the third argument).
> >> Unluckilly, I can't do that in sparc64 asm right now, but it should
> >> not be too difficult to cope with it.
> >>
> >
> > The following patch adds handling of the mutex parameter to the
> > sparc64 cpu_switch():
> > http://people.freebsd.org/~marius/sparc64_cpu_switch_mtx.diff
> > This patch works fine with r202888. With r202889 it allows the
> > machine to boot again, however putting some load on the machine
> > causes it to issue a reset without a chance to debug. I've also
> > tried with some variations like duplicating the old cpu_switch()
> > for cpu_throw() so the altered cpu_switch() doesn't need to
> > distinguish between the to cases and only assigning old->td_lock
> > right before return but nothing made a difference. Given that
> > this leaves little room for a bug in the cpu_switch() changes I
> > suspect r202889 also breaks additional assumptions. For example
> > the sparc64 pmap code used sched_lock, does that need to change
> > to be td_lock now maybe? Is there anything else that comes to
> > your mind in this regard?
> 
> Sorry for being lame with sparc64 assembly (so that I can't make much
> more productive help here), but the required patch, sched_4bsd only,
> should simply save the extra-argument of cpu_switch() (and cpu_throw()
> is not involved, so I'm not sure what is changing there) and move in
> TD_LOCK(%oldthreadreg) when it is safe to do (just after the oldthread
> switched out completely). It doesn't even require a memory barrier.
> This patch seems a bit too big and I wonder what else it does (or I'm
> entirely wrong and that's just what I asked here), maybe adding the
> ULE support as well?

Actually it just adds old->td_lock = mtx in a non-atomic fashion
as soon as we're done with the old thread. It's "big" as I had to
reshuffle the register usage in order to preserve %i0 (old) and
%i2 (mtx) and in order to distinguish between cpu_switch() and
cpu_throw() (no mtx and old maybe be NULL in that case). As it
turns out it also works just fine, the problems I were seeing
were due to another change in that tree. Sorry for the noise.

My understanding is that for ULE, mtx should be assigned to
old->td_lock atomically, is that correct?

> 
> Said that, all the code, including MD parts should always use
> td_lock() and not doing explicit acquisitions/drops of sched_lock, if
> they want to support ULE (but probabilly even if they do not want),
> unless there is a big compelling reason (that I expect to be justified
> in comments at least).

I think the idea behind using sched_lock in the sparc64 code is
to piggyback on it for protecting the pmap and take advantage of
the fact that it's held across cpu_switch() anyway. If that's
correct it should be possible to replace it with a separate
spinlock dedicated to protecting the pmap or given that due to
the macro madness involved in mtx_{,un}lock_spin() it's hard to
properly call these from asm by calling spinlock_{enter,exit}()
directly.

Marius


From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:40:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 140251065672;
	Sat, 30 Jan 2010 14:40:43 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DBE368FC0C;
	Sat, 30 Jan 2010 14:40:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEeg2g020653;
	Sat, 30 Jan 2010 14:40:42 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEeg1u020651;
	Sat, 30 Jan 2010 14:40:42 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301440.o0UEeg1u020651@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:40:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203186 - stable/8/bin/chmod
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:40:43 -0000

Author: trasz
Date: Sat Jan 30 14:40:42 2010
New Revision: 203186
URL: http://svn.freebsd.org/changeset/base/203186

Log:
  MFC r196711:
  
  Make the code more readable and fix chmod(1) on symlinks with
  NFSv4 enabled.

Modified:
  stable/8/bin/chmod/chmod.c
Directory Properties:
  stable/8/bin/chmod/   (props changed)

Modified: stable/8/bin/chmod/chmod.c
==============================================================================
--- stable/8/bin/chmod/chmod.c	Sat Jan 30 14:04:21 2010	(r203185)
+++ stable/8/bin/chmod/chmod.c	Sat Jan 30 14:40:42 2010	(r203186)
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)chmod.c	8.8 
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 
 #include 
@@ -54,7 +55,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 static void usage(void);
-static int may_have_nfs4acl(const FTSENT *ent);
+static int may_have_nfs4acl(const FTSENT *ent, int hflag);
 
 int
 main(int argc, char *argv[])
@@ -62,11 +63,10 @@ main(int argc, char *argv[])
 	FTS *ftsp;
 	FTSENT *p;
 	mode_t *set;
-	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval;
+	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, error;
 	int vflag;
 	char *mode;
 	mode_t newmode;
-	int (*change_mode)(const char *, mode_t);
 
 	set = NULL;
 	Hflag = Lflag = Rflag = fflag = hflag = vflag = 0;
@@ -140,11 +140,6 @@ done:	argv += optind;
 	} else
 		fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL;
 
-	if (hflag)
-		change_mode = lchmod;
-	else
-		change_mode = chmod;
-
 	mode = *argv;
 	if ((set = setmode(mode)) == NULL)
 		errx(1, "invalid file mode: %s", mode);
@@ -186,10 +181,14 @@ done:	argv += optind;
 		 * identical to the one computed from an ACL will change
 		 * that ACL.
 		 */
-		if (may_have_nfs4acl(p) == 0 &&
+		if (may_have_nfs4acl(p, hflag) == 0 &&
 		    (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS))
 				continue;
-		if ((*change_mode)(p->fts_accpath, newmode) && !fflag) {
+		if (hflag)
+			error = lchmod(p->fts_accpath, newmode);
+		else
+			error = chmod(p->fts_accpath, newmode);
+		if (error && !fflag) {
 			warn("%s", p->fts_path);
 			rval = 1;
 		} else {
@@ -228,17 +227,20 @@ usage(void)
 }
 
 static int
-may_have_nfs4acl(const FTSENT *ent)
+may_have_nfs4acl(const FTSENT *ent, int hflag)
 {
 	int ret;
-	static dev_t previous_dev = (dev_t)-1;
+	static dev_t previous_dev = NODEV;
 	static int supports_acls = -1;
 
 	if (previous_dev != ent->fts_statp->st_dev) {
 		previous_dev = ent->fts_statp->st_dev;
 		supports_acls = 0;
 
-		ret = pathconf(ent->fts_accpath, _PC_ACL_NFS4);
+		if (hflag)
+			ret = lpathconf(ent->fts_accpath, _PC_ACL_NFS4);
+		else
+			ret = pathconf(ent->fts_accpath, _PC_ACL_NFS4);
 		if (ret > 0)
 			supports_acls = 1;
 		else if (ret < 0 && errno != EINVAL)

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:44:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D794D106568B;
	Sat, 30 Jan 2010 14:44:32 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C4FE08FC17;
	Sat, 30 Jan 2010 14:44:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEiWh5021614;
	Sat, 30 Jan 2010 14:44:32 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEiWIr021612;
	Sat, 30 Jan 2010 14:44:32 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301444.o0UEiWIr021612@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:44:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203187 - stable/8/bin/ls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:44:33 -0000

Author: trasz
Date: Sat Jan 30 14:44:32 2010
New Revision: 203187
URL: http://svn.freebsd.org/changeset/base/203187

Log:
  MFC r196712:
  
  Add NFSv4 ACL support to ls(1).
  
  MFC r196773:
  
  Fix regression introduced in r196712 - the 'name' string needs
  to be rewritten for each file we want to check ACL on.  Without
  this change, ls(1) would check only the ACL on the first file
  to list.

Modified:
  stable/8/bin/ls/print.c
Directory Properties:
  stable/8/bin/ls/   (props changed)

Modified: stable/8/bin/ls/print.c
==============================================================================
--- stable/8/bin/ls/print.c	Sat Jan 30 14:40:42 2010	(r203186)
+++ stable/8/bin/ls/print.c	Sat Jan 30 14:44:32 2010	(r203187)
@@ -70,7 +70,7 @@ static void	printsize(size_t, off_t);
 static void	endcolor(int);
 static int	colortype(mode_t);
 #endif
-static void	aclmode(char *, const FTSENT *, int *);
+static void	aclmode(char *, const FTSENT *);
 
 #define	IS_NOPRINT(p)	((p)->fts_number == NO_PRINT)
 
@@ -139,16 +139,12 @@ printlong(const DISPLAY *dp)
 #ifdef COLORLS
 	int color_printed = 0;
 #endif
-	int haveacls;
-	dev_t prevdev;
 
 	if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) &&
 	    (f_longform || f_size)) {
 		(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
 	}
 
-	haveacls = 1;
-	prevdev = (dev_t)-1;
 	for (p = dp->list; p; p = p->fts_link) {
 		if (IS_NOPRINT(p))
 			continue;
@@ -159,14 +155,7 @@ printlong(const DISPLAY *dp)
 			(void)printf("%*jd ",
 			    dp->s_block, howmany(sp->st_blocks, blocksize));
 		strmode(sp->st_mode, buf);
-		/*
-		 * Cache whether or not the filesystem supports ACL's to
-		 * avoid expensive syscalls. Try again when we change devices.
-		 */
-		if (haveacls || sp->st_dev != prevdev) {
-			aclmode(buf, p, &haveacls);
-			prevdev = sp->st_dev;
-		}
+		aclmode(buf, p);
 		np = p->fts_pointer;
 		(void)printf("%s %*u %-*s  %-*s  ", buf, dp->s_nlink,
 		    sp->st_nlink, dp->s_user, np->user, dp->s_group,
@@ -612,56 +601,73 @@ printsize(size_t width, off_t bytes)
 		(void)printf("%*jd ", (u_int)width, bytes);
 }
 
+/*
+ * Add a + after the standard rwxrwxrwx mode if the file has an
+ * ACL. strmode() reserves space at the end of the string.
+ */
 static void
-aclmode(char *buf, const FTSENT *p, int *haveacls)
+aclmode(char *buf, const FTSENT *p)
 {
 	char name[MAXPATHLEN + 1];
-	int entries, ret;
+	int ret, trivial;
+	static dev_t previous_dev = NODEV;
+	static int supports_acls = -1;
+	static int type = ACL_TYPE_ACCESS;
 	acl_t facl;
-	acl_entry_t ae;
 
 	/*
-	 * Add a + after the standard rwxrwxrwx mode if the file has an
-	 * extended ACL. strmode() reserves space at the end of the string.
+	 * XXX: ACLs are not supported on whiteouts and device files
+	 * residing on UFS.
 	 */
+	if (S_ISCHR(p->fts_statp->st_mode) || S_ISBLK(p->fts_statp->st_mode) ||
+	    S_ISWHT(p->fts_statp->st_mode))
+		return;
+
+	if (previous_dev == p->fts_statp->st_dev && supports_acls == 0)
+		return;
+
 	if (p->fts_level == FTS_ROOTLEVEL)
 		snprintf(name, sizeof(name), "%s", p->fts_name);
 	else
 		snprintf(name, sizeof(name), "%s/%s",
 		    p->fts_parent->fts_accpath, p->fts_name);
-	/*
-	 * We have no way to tell whether a symbolic link has an ACL since
-	 * pathconf() and acl_get_file() both follow them.  They also don't
-	 * support whiteouts.
-	 */
-	if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) {
-		*haveacls = 1;
-		return;
-	}
-	if ((ret = pathconf(name, _PC_ACL_EXTENDED)) <= 0) {
-		if (ret < 0 && errno != EINVAL)
+
+	if (previous_dev != p->fts_statp->st_dev) {
+		previous_dev = p->fts_statp->st_dev;
+		supports_acls = 0;
+
+		ret = lpathconf(name, _PC_ACL_NFS4);
+		if (ret > 0) {
+			type = ACL_TYPE_NFS4;
+			supports_acls = 1;
+		} else if (ret < 0 && errno != EINVAL) {
 			warn("%s", name);
-		else
-			*haveacls = 0;
+			return;
+		}
+		if (supports_acls == 0) {
+			ret = lpathconf(name, _PC_ACL_EXTENDED);
+			if (ret > 0) {
+				type = ACL_TYPE_ACCESS;
+				supports_acls = 1;
+			} else if (ret < 0 && errno != EINVAL) {
+				warn("%s", name);
+				return;
+			}
+		}
+	}
+	if (supports_acls == 0)
+		return;
+	facl = acl_get_link_np(name, type);
+	if (facl == NULL) {
+		warn("%s", name);
 		return;
 	}
-	*haveacls = 1;
-	if ((facl = acl_get_file(name, ACL_TYPE_ACCESS)) != NULL) {
-		if (acl_get_entry(facl, ACL_FIRST_ENTRY, &ae) == 1) {
-			entries = 1;
-			while (acl_get_entry(facl, ACL_NEXT_ENTRY, &ae) == 1)
-				if (++entries > 3)
-					break;
-			/*
-			 * POSIX.1e requires that ACLs of type ACL_TYPE_ACCESS
-			 * must have at least three entries (owner, group,
-			 * and other). So anything with more than 3 ACLs looks
-			 * interesting to us.
-			 */
-			if (entries > 3)
-				buf[10] = '+';
-		}
+	if (acl_is_trivial_np(facl, &trivial)) {
 		acl_free(facl);
-	} else
 		warn("%s", name);
+		return;
+	}
+	if (!trivial)
+		buf[10] = '+';
+	acl_free(facl);
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:47:23 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E2040106566C;
	Sat, 30 Jan 2010 14:47:23 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B679E8FC1A;
	Sat, 30 Jan 2010 14:47:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UElNFw022378;
	Sat, 30 Jan 2010 14:47:23 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UElNH0022376;
	Sat, 30 Jan 2010 14:47:23 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301447.o0UElNH0022376@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:47:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203188 - stable/8/bin/chmod
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:47:24 -0000

Author: trasz
Date: Sat Jan 30 14:47:23 2010
New Revision: 203188
URL: http://svn.freebsd.org/changeset/base/203188

Log:
  MFC r196753:
  
  - Don't include both  and 
  
  - Keep variables sorted
  
  - Fix logic error with -f and -v options - don't print
    the usual -v output if there was an error, whether or not
    we were passed -f
  
  - Don't call free(3) just before exit(2)
  
  - Whitespace fixes
  
  Submitted by:	bde

Modified:
  stable/8/bin/chmod/chmod.c
Directory Properties:
  stable/8/bin/chmod/   (props changed)

Modified: stable/8/bin/chmod/chmod.c
==============================================================================
--- stable/8/bin/chmod/chmod.c	Sat Jan 30 14:44:32 2010	(r203187)
+++ stable/8/bin/chmod/chmod.c	Sat Jan 30 14:47:23 2010	(r203188)
@@ -41,7 +41,6 @@ static char sccsid[] = "@(#)chmod.c	8.8 
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
 #include 
 #include 
 
@@ -63,7 +62,7 @@ main(int argc, char *argv[])
 	FTS *ftsp;
 	FTSENT *p;
 	mode_t *set;
-	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, error;
+	int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval;
 	int vflag;
 	char *mode;
 	mode_t newmode;
@@ -170,7 +169,6 @@ done:	argv += optind;
 			 */
 			if (!hflag)
 				continue;
-			/* else */
 			/* FALLTHROUGH */
 		default:
 			break;
@@ -188,9 +186,11 @@ done:	argv += optind;
 			error = lchmod(p->fts_accpath, newmode);
 		else
 			error = chmod(p->fts_accpath, newmode);
-		if (error && !fflag) {
-			warn("%s", p->fts_path);
-			rval = 1;
+		if (error) {
+			if (!fflag) {
+				warn("%s", p->fts_path);
+				rval = 1;
+			}
 		} else {
 			if (vflag) {
 				(void)printf("%s", p->fts_path);
@@ -201,7 +201,6 @@ done:	argv += optind;
 					strmode(p->fts_statp->st_mode, m1);
 					strmode((p->fts_statp->st_mode &
 					    S_IFMT) | newmode, m2);
-
 					(void)printf(": 0%o [%s] -> 0%o [%s]",
 					    p->fts_statp->st_mode, m1,
 					    (p->fts_statp->st_mode & S_IFMT) |
@@ -209,12 +208,10 @@ done:	argv += optind;
 				}
 				(void)printf("\n");
 			}
-
 		}
 	}
 	if (errno)
 		err(1, "fts_read");
-	free(set);
 	exit(rval);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:49:17 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A514F106566B;
	Sat, 30 Jan 2010 14:49:17 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9236F8FC12;
	Sat, 30 Jan 2010 14:49:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEnHIm022837;
	Sat, 30 Jan 2010 14:49:17 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEnHxR022835;
	Sat, 30 Jan 2010 14:49:17 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301449.o0UEnHxR022835@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:49:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203189 - stable/8/bin/cp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:49:17 -0000

Author: trasz
Date: Sat Jan 30 14:49:17 2010
New Revision: 203189
URL: http://svn.freebsd.org/changeset/base/203189

Log:
  MFC r196754:
  
  Add NFSv4 ACL support to cp(1) and fix a few memory leaks.
  
  Note that this changes error reporting behaviour somewhat - before,
  no error was reported if ACL couldn't be copied because the target
  filesystem doesn't support ACLs.  Now, it will be reported - of course,
  only if there actually is an ACL to copy.
  
  Reviewed by:	rwatson

Modified:
  stable/8/bin/cp/utils.c
Directory Properties:
  stable/8/bin/cp/   (props changed)

Modified: stable/8/bin/cp/utils.c
==============================================================================
--- stable/8/bin/cp/utils.c	Sat Jan 30 14:47:23 2010	(r203188)
+++ stable/8/bin/cp/utils.c	Sat Jan 30 14:49:17 2010	(r203189)
@@ -377,24 +377,52 @@ setfile(struct stat *fs, int fd)
 int
 preserve_fd_acls(int source_fd, int dest_fd)
 {
-	struct acl *aclp;
 	acl_t acl;
+	acl_type_t acl_type;
+	int acl_supported = 0, ret, trivial;
 
-	if (fpathconf(source_fd, _PC_ACL_EXTENDED) != 1 ||
-	    fpathconf(dest_fd, _PC_ACL_EXTENDED) != 1)
+	ret = fpathconf(source_fd, _PC_ACL_NFS4);
+	if (ret > 0 ) {
+		acl_supported = 1;
+		acl_type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", to.p_path);
+		return (1);
+	}
+	if (acl_supported == 0) {
+		ret = fpathconf(source_fd, _PC_ACL_EXTENDED);
+		if (ret > 0 ) {
+			acl_supported = 1;
+			acl_type = ACL_TYPE_ACCESS;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s",
+			    to.p_path);
+			return (1);
+		}
+	}
+	if (acl_supported == 0)
 		return (0);
-	acl = acl_get_fd(source_fd);
+
+	acl = acl_get_fd_np(source_fd, acl_type);
 	if (acl == NULL) {
 		warn("failed to get acl entries while setting %s", to.p_path);
 		return (1);
 	}
-	aclp = &acl->ats_acl;
-	if (aclp->acl_cnt == 3)
+	if (acl_is_trivial_np(acl, &trivial)) {
+		warn("acl_is_trivial() failed for %s", to.p_path);
+		acl_free(acl);
+		return (1);
+	}
+	if (trivial) {
+		acl_free(acl);
 		return (0);
-	if (acl_set_fd(dest_fd, acl) < 0) {
+	}
+	if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) {
 		warn("failed to set acl entries for %s", to.p_path);
+		acl_free(acl);
 		return (1);
 	}
+	acl_free(acl);
 	return (0);
 }
 
@@ -405,10 +433,31 @@ preserve_dir_acls(struct stat *fs, char 
 	int (*aclsetf)(const char *, acl_type_t, acl_t);
 	struct acl *aclp;
 	acl_t acl;
+	acl_type_t acl_type;
+	int acl_supported = 0, ret, trivial;
 
-	if (pathconf(source_dir, _PC_ACL_EXTENDED) != 1 ||
-	    pathconf(dest_dir, _PC_ACL_EXTENDED) != 1)
+	ret = pathconf(source_dir, _PC_ACL_NFS4);
+	if (ret > 0) {
+		acl_supported = 1;
+		acl_type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", source_dir);
+		return (1);
+	}
+	if (acl_supported == 0) {
+		ret = pathconf(source_dir, _PC_ACL_EXTENDED);
+		if (ret > 0) {
+			acl_supported = 1;
+			acl_type = ACL_TYPE_ACCESS;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s",
+			    source_dir);
+			return (1);
+		}
+	}
+	if (acl_supported == 0)
 		return (0);
+
 	/*
 	 * If the file is a link we will not follow it
 	 */
@@ -419,34 +468,48 @@ preserve_dir_acls(struct stat *fs, char 
 		aclgetf = acl_get_file;
 		aclsetf = acl_set_file;
 	}
-	/*
-	 * Even if there is no ACL_TYPE_DEFAULT entry here, a zero
-	 * size ACL will be returned. So it is not safe to simply
-	 * check the pointer to see if the default ACL is present.
-	 */
-	acl = aclgetf(source_dir, ACL_TYPE_DEFAULT);
+	if (acl_type == ACL_TYPE_ACCESS) {
+		/*
+		 * Even if there is no ACL_TYPE_DEFAULT entry here, a zero
+		 * size ACL will be returned. So it is not safe to simply
+		 * check the pointer to see if the default ACL is present.
+		 */
+		acl = aclgetf(source_dir, ACL_TYPE_DEFAULT);
+		if (acl == NULL) {
+			warn("failed to get default acl entries on %s",
+			    source_dir);
+			return (1);
+		}
+		aclp = &acl->ats_acl;
+		if (aclp->acl_cnt != 0 && aclsetf(dest_dir,
+		    ACL_TYPE_DEFAULT, acl) < 0) {
+			warn("failed to set default acl entries on %s",
+			    dest_dir);
+			acl_free(acl);
+			return (1);
+		}
+		acl_free(acl);
+	}
+	acl = aclgetf(source_dir, acl_type);
 	if (acl == NULL) {
-		warn("failed to get default acl entries on %s",
-		    source_dir);
+		warn("failed to get acl entries on %s", source_dir);
 		return (1);
 	}
-	aclp = &acl->ats_acl;
-	if (aclp->acl_cnt != 0 && aclsetf(dest_dir,
-	    ACL_TYPE_DEFAULT, acl) < 0) {
-		warn("failed to set default acl entries on %s",
-		    dest_dir);
+	if (acl_is_trivial_np(acl, &trivial)) {
+		warn("acl_is_trivial() failed on %s", source_dir);
+		acl_free(acl);
 		return (1);
 	}
-	acl = aclgetf(source_dir, ACL_TYPE_ACCESS);
-	if (acl == NULL) {
-		warn("failed to get acl entries on %s", source_dir);
-		return (1);
+	if (trivial) {
+		acl_free(acl);
+		return (0);
 	}
-	aclp = &acl->ats_acl;
-	if (aclsetf(dest_dir, ACL_TYPE_ACCESS, acl) < 0) {
+	if (aclsetf(dest_dir, acl_type, acl) < 0) {
 		warn("failed to set acl entries on %s", dest_dir);
+		acl_free(acl);
 		return (1);
 	}
+	acl_free(acl);
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:51:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0D5A8106566B;
	Sat, 30 Jan 2010 14:51:25 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EE18C8FC14;
	Sat, 30 Jan 2010 14:51:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEpOM8023371;
	Sat, 30 Jan 2010 14:51:24 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEpOWv023368;
	Sat, 30 Jan 2010 14:51:24 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301451.o0UEpOWv023368@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:51:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203190 - stable/8/bin/getfacl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:51:25 -0000

Author: trasz
Date: Sat Jan 30 14:51:24 2010
New Revision: 203190
URL: http://svn.freebsd.org/changeset/base/203190

Log:
  MFC r196827:
  
  Add NFSv4 ACL support to getfacl(1).

Modified:
  stable/8/bin/getfacl/getfacl.1
  stable/8/bin/getfacl/getfacl.c
Directory Properties:
  stable/8/bin/getfacl/   (props changed)

Modified: stable/8/bin/getfacl/getfacl.1
==============================================================================
--- stable/8/bin/getfacl/getfacl.1	Sat Jan 30 14:49:17 2010	(r203189)
+++ stable/8/bin/getfacl/getfacl.1	Sat Jan 30 14:51:24 2010	(r203190)
@@ -30,7 +30,7 @@
 .\" Developed by the TrustedBSD Project.
 .\" Support for POSIX.1e access control lists.
 .\"
-.Dd March 13, 2006
+.Dd September 04, 2009
 .Dt GETFACL 1
 .Os
 .Sh NAME
@@ -38,7 +38,7 @@
 .Nd get ACL information
 .Sh SYNOPSIS
 .Nm
-.Op Fl dhq
+.Op Fl dhinqv
 .Op Ar
 .Sh DESCRIPTION
 The
@@ -61,13 +61,25 @@ The operation applies to the default ACL
 access ACL.
 An error is generated if a default ACL cannot be associated with
 .Ar file .
+This option is not valid for NFSv4 ACLs.
 .It Fl h
 If the target of the operation is a symbolic link, return the ACL from
 the symbolic link itself rather than following the link.
+.It Fl i
+For NFSv4 ACLs, append numerical ID at the end of each entry containing
+user or group name.
+Ignored for POSIX.1e ACLs.
+.It Fl n
+Display user and group IDs numerically rather than converting to
+a user or group name.
+Ignored for POSIX.1e ACLs.
 .It Fl q
 Do not write commented information about file name and ownership.
 This is
 useful when dealing with filenames with unprintable characters.
+.It Fl v
+For NFSv4 ACLs, display access mask and flags in a verbose form.
+Ignored for POSIX.1e ACLs.
 .El
 .Pp
 The following operand is available:

Modified: stable/8/bin/getfacl/getfacl.c
==============================================================================
--- stable/8/bin/getfacl/getfacl.c	Sat Jan 30 14:49:17 2010	(r203189)
+++ stable/8/bin/getfacl/getfacl.c	Sat Jan 30 14:51:24 2010	(r203190)
@@ -54,7 +54,7 @@ static void
 usage(void)
 {
 
-	fprintf(stderr, "getfacl [-dhq] [file ...]\n");
+	fprintf(stderr, "getfacl [-dhnqv] [file ...]\n");
 }
 
 static char *
@@ -175,22 +175,39 @@ acl_from_stat(struct stat sb)
 }
 
 static int
-print_acl(char *path, acl_type_t type, int hflag, int qflag)
+print_acl(char *path, acl_type_t type, int hflag, int iflag, int nflag,
+    int qflag, int vflag)
 {
 	struct stat	sb;
 	acl_t	acl;
 	char	*acl_text;
-	int	error;
+	int	error, flags = 0, ret;
 
 	if (hflag)
 		error = lstat(path, &sb);
 	else
 		error = stat(path, &sb);
 	if (error == -1) {
-		warn("%s", path);
+		warn("%s: stat() failed", path);
 		return(-1);
 	}
 
+	if (hflag)
+		ret = lpathconf(path, _PC_ACL_NFS4);
+	else
+		ret = pathconf(path, _PC_ACL_NFS4);
+	if (ret > 0) {
+		if (type == ACL_TYPE_DEFAULT) {
+			warnx("%s: there are no default entries in NFSv4 ACLs",
+			    path);
+			return (-1);
+		}
+		type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("%s: pathconf(..., _PC_ACL_NFS4) failed", path);
+		return (-1);
+	}
+
 	if (more_than_one)
 		printf("\n");
 	else
@@ -210,18 +227,27 @@ print_acl(char *path, acl_type_t type, i
 			return(-1);
 		}
 		errno = 0;
-		if (type != ACL_TYPE_ACCESS)
+		if (type == ACL_TYPE_DEFAULT)
 			return(0);
 		acl = acl_from_stat(sb);
 		if (!acl) {
-			warn("acl_from_stat()");
+			warn("%s: acl_from_stat() failed", path);
 			return(-1);
 		}
 	}
 
-	acl_text = acl_to_text(acl, 0);
+	if (iflag)
+		flags |= ACL_TEXT_APPEND_ID;
+
+	if (nflag)
+		flags |= ACL_TEXT_NUMERIC_IDS;
+
+	if (vflag)
+		flags |= ACL_TEXT_VERBOSE;
+
+	acl_text = acl_to_text_np(acl, 0, flags);
 	if (!acl_text) {
-		warn("%s", path);
+		warn("%s: acl_to_text_np() failed", path);
 		return(-1);
 	}
 
@@ -234,7 +260,8 @@ print_acl(char *path, acl_type_t type, i
 }
 
 static int
-print_acl_from_stdin(acl_type_t type, int hflag, int qflag)
+print_acl_from_stdin(acl_type_t type, int hflag, int iflag, int nflag,
+    int qflag, int vflag)
 {
 	char	*p, pathname[PATH_MAX];
 	int	carried_error = 0;
@@ -242,7 +269,8 @@ print_acl_from_stdin(acl_type_t type, in
 	while (fgets(pathname, (int)sizeof(pathname), stdin)) {
 		if ((p = strchr(pathname, '\n')) != NULL)
 			*p = '\0';
-		if (print_acl(pathname, type, hflag, qflag) == -1) {
+		if (print_acl(pathname, type, hflag, iflag, nflag,
+		    qflag, vflag) == -1) {
 			carried_error = -1;
 		}
 	}
@@ -256,11 +284,14 @@ main(int argc, char *argv[])
 	acl_type_t	type = ACL_TYPE_ACCESS;
 	int	carried_error = 0;
 	int	ch, error, i;
-	int	hflag, qflag;
+	int	hflag, iflag, qflag, nflag, vflag;
 
 	hflag = 0;
+	iflag = 0;
 	qflag = 0;
-	while ((ch = getopt(argc, argv, "dhq")) != -1)
+	nflag = 0;
+	vflag = 0;
+	while ((ch = getopt(argc, argv, "dhinqv")) != -1)
 		switch(ch) {
 		case 'd':
 			type = ACL_TYPE_DEFAULT;
@@ -268,9 +299,18 @@ main(int argc, char *argv[])
 		case 'h':
 			hflag = 1;
 			break;
+		case 'i':
+			iflag = 1;
+			break;
+		case 'n':
+			nflag = 1;
+			break;
 		case 'q':
 			qflag = 1;
 			break;
+		case 'v':
+			vflag = 1;
+			break;
 		default:
 			usage();
 			return(-1);
@@ -279,17 +319,20 @@ main(int argc, char *argv[])
 	argv += optind;
 
 	if (argc == 0) {
-		error = print_acl_from_stdin(type, hflag, qflag);
+		error = print_acl_from_stdin(type, hflag, iflag, nflag,
+		    qflag, vflag);
 		return(error ? 1 : 0);
 	}
 
 	for (i = 0; i < argc; i++) {
 		if (!strcmp(argv[i], "-")) {
-			error = print_acl_from_stdin(type, hflag, qflag);
+			error = print_acl_from_stdin(type, hflag, iflag, nflag,
+			    qflag, vflag);
 			if (error == -1)
 				carried_error = -1;
 		} else {
-			error = print_acl(argv[i], type, hflag, qflag);
+			error = print_acl(argv[i], type, hflag, iflag, nflag,
+			    qflag, vflag);
 			if (error == -1)
 				carried_error = -1;
 		}

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:54:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3918A1065670;
	Sat, 30 Jan 2010 14:54:13 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D1928FC1A;
	Sat, 30 Jan 2010 14:54:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEsCmK024059;
	Sat, 30 Jan 2010 14:54:12 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEsCDb024057;
	Sat, 30 Jan 2010 14:54:12 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301454.o0UEsCDb024057@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:54:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203191 - stable/8/usr.bin/find
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:54:13 -0000

Author: trasz
Date: Sat Jan 30 14:54:12 2010
New Revision: 203191
URL: http://svn.freebsd.org/changeset/base/203191

Log:
  MFC r196839:
  
  Add NFSv4 ACL support to find(1).

Modified:
  stable/8/usr.bin/find/function.c
Directory Properties:
  stable/8/usr.bin/find/   (props changed)

Modified: stable/8/usr.bin/find/function.c
==============================================================================
--- stable/8/usr.bin/find/function.c	Sat Jan 30 14:51:24 2010	(r203190)
+++ stable/8/usr.bin/find/function.c	Sat Jan 30 14:54:12 2010	(r203191)
@@ -371,38 +371,48 @@ c_mXXdepth(OPTION *option, char ***argvp
 int
 f_acl(PLAN *plan __unused, FTSENT *entry)
 {
-	int match, entries;
-	acl_entry_t ae;
 	acl_t facl;
+	acl_type_t acl_type;
+	int acl_supported = 0, ret, trivial;
 
 	if (S_ISLNK(entry->fts_statp->st_mode))
 		return 0;
-	if ((match = pathconf(entry->fts_accpath, _PC_ACL_EXTENDED)) <= 0) {
-		if (match < 0 && errno != EINVAL)
-			warn("%s", entry->fts_accpath);
-	else
-		return 0;
+	ret = pathconf(entry->fts_accpath, _PC_ACL_NFS4);
+	if (ret > 0) {
+		acl_supported = 1;
+		acl_type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("%s", entry->fts_accpath);
+		return (0);
 	}
-	match = 0;
-	if ((facl = acl_get_file(entry->fts_accpath,ACL_TYPE_ACCESS)) != NULL) {
-		if (acl_get_entry(facl, ACL_FIRST_ENTRY, &ae) == 1) {
-			/*
-			 * POSIX.1e requires that ACLs of type ACL_TYPE_ACCESS
-			 * must have at least three entries (owner, group,
-			 * other).
-			 */
-			entries = 1;
-			while (acl_get_entry(facl, ACL_NEXT_ENTRY, &ae) == 1) {
-				if (++entries > 3) {
-					match = 1;
-					break;
-				}
-			}
+	if (acl_supported == 0) {
+		ret = pathconf(entry->fts_accpath, _PC_ACL_EXTENDED);
+		if (ret > 0) {
+			acl_supported = 1;
+			acl_type = ACL_TYPE_ACCESS;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("%s", entry->fts_accpath);
+			return (0);
 		}
-		acl_free(facl);
-	} else
+	}
+	if (acl_supported == 0)
+		return (0);
+
+	facl = acl_get_file(entry->fts_accpath, acl_type);
+	if (facl == NULL) {
 		warn("%s", entry->fts_accpath);
-	return match;
+		return (0);
+	}
+	ret = acl_is_trivial_np(facl, &trivial);
+	acl_free(facl);
+	if (ret) {
+		warn("%s", entry->fts_accpath);
+		acl_free(facl);
+		return (0);
+	}
+	if (trivial)
+		return (0);
+	return (1);
 }
 
 PLAN *

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:56:13 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 58EA91065676;
	Sat, 30 Jan 2010 14:56:13 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4661D8FC14;
	Sat, 30 Jan 2010 14:56:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEuDFS024558;
	Sat, 30 Jan 2010 14:56:13 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEuDYU024556;
	Sat, 30 Jan 2010 14:56:13 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301456.o0UEuDYU024556@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:56:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203192 - stable/8/bin/mv
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:56:13 -0000

Author: trasz
Date: Sat Jan 30 14:56:13 2010
New Revision: 203192
URL: http://svn.freebsd.org/changeset/base/203192

Log:
  MFC r196841:
  
  Add NFSv4 ACL support to mv(1).

Modified:
  stable/8/bin/mv/mv.c
Directory Properties:
  stable/8/bin/mv/   (props changed)

Modified: stable/8/bin/mv/mv.c
==============================================================================
--- stable/8/bin/mv/mv.c	Sat Jan 30 14:54:12 2010	(r203191)
+++ stable/8/bin/mv/mv.c	Sat Jan 30 14:56:13 2010	(r203192)
@@ -74,6 +74,8 @@ static int	copy(const char *, const char
 static int	do_move(const char *, const char *);
 static int	fastcopy(const char *, const char *, struct stat *);
 static void	usage(void);
+static void	preserve_fd_acls(int source_fd, int dest_fd, const char *source_path,
+		    const char *dest_path);
 
 int
 main(int argc, char *argv[])
@@ -260,7 +262,6 @@ fastcopy(const char *from, const char *t
 	struct timeval tval[2];
 	static u_int blen;
 	static char *bp;
-	acl_t acl;
 	mode_t oldmode;
 	int nread, from_fd, to_fd;
 
@@ -311,23 +312,15 @@ err:		if (unlink(to))
 			sbp->st_mode &= ~(S_ISUID | S_ISGID);
 		}
 	}
+	if (fchmod(to_fd, sbp->st_mode))
+		warn("%s: set mode (was: 0%03o)", to, oldmode);
 	/*
 	 * POSIX 1003.2c states that if _POSIX_ACL_EXTENDED is in effect
 	 * for dest_file, then its ACLs shall reflect the ACLs of the
 	 * source_file.
 	 */
-	if (fpathconf(to_fd, _PC_ACL_EXTENDED) == 1 &&
-	    fpathconf(from_fd, _PC_ACL_EXTENDED) == 1) {
-		acl = acl_get_fd(from_fd);
-		if (acl == NULL)
-			warn("failed to get acl entries while setting %s",
-			    from);
-		else if (acl_set_fd(to_fd, acl) < 0)
-			warn("failed to set acl entries for %s", to);
-	}
+	preserve_fd_acls(from_fd, to_fd, from, to);
 	(void)close(from_fd);
-	if (fchmod(to_fd, sbp->st_mode))
-		warn("%s: set mode (was: 0%03o)", to, oldmode);
 	/*
 	 * XXX
 	 * NFS doesn't support chflags; ignore errors unless there's reason
@@ -439,6 +432,59 @@ copy(const char *from, const char *to)
 }
 
 static void
+preserve_fd_acls(int source_fd, int dest_fd, const char *source_path,
+    const char *dest_path)
+{
+	acl_t acl;
+	acl_type_t acl_type;
+	int acl_supported = 0, ret, trivial;
+
+	ret = fpathconf(source_fd, _PC_ACL_NFS4);
+	if (ret > 0 ) {
+		acl_supported = 1;
+		acl_type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("fpathconf(..., _PC_ACL_NFS4) failed for %s",
+		    source_path);
+		return;
+	}
+	if (acl_supported == 0) {
+		ret = fpathconf(source_fd, _PC_ACL_EXTENDED);
+		if (ret > 0 ) {
+			acl_supported = 1;
+			acl_type = ACL_TYPE_ACCESS;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s",
+			    source_path);
+			return;
+		}
+	}
+	if (acl_supported == 0)
+		return;
+
+	acl = acl_get_fd_np(source_fd, acl_type);
+	if (acl == NULL) {
+		warn("failed to get acl entries for %s", source_path);
+		return;
+	}
+	if (acl_is_trivial_np(acl, &trivial)) {
+		warn("acl_is_trivial() failed for %s", source_path);
+		acl_free(acl);
+		return;
+	}
+	if (trivial) {
+		acl_free(acl);
+		return;
+	}
+	if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) {
+		warn("failed to set acl entries for %s", dest_path);
+		acl_free(acl);
+		return;
+	}
+	acl_free(acl);
+}
+
+static void
 usage(void)
 {
 

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 14:58:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 392AE106568D;
	Sat, 30 Jan 2010 14:58:26 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 251548FC12;
	Sat, 30 Jan 2010 14:58:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UEwQpj025118;
	Sat, 30 Jan 2010 14:58:26 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UEwPTD025111;
	Sat, 30 Jan 2010 14:58:25 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301458.o0UEwPTD025111@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 14:58:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203193 - stable/8/bin/setfacl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 14:58:26 -0000

Author: trasz
Date: Sat Jan 30 14:58:25 2010
New Revision: 203193
URL: http://svn.freebsd.org/changeset/base/203193

Log:
  MFC r196936:
  
  Add NFSv4 support to setfacl(1).

Modified:
  stable/8/bin/setfacl/mask.c
  stable/8/bin/setfacl/merge.c
  stable/8/bin/setfacl/remove.c
  stable/8/bin/setfacl/setfacl.1
  stable/8/bin/setfacl/setfacl.c
  stable/8/bin/setfacl/setfacl.h
Directory Properties:
  stable/8/bin/setfacl/   (props changed)

Modified: stable/8/bin/setfacl/mask.c
==============================================================================
--- stable/8/bin/setfacl/mask.c	Sat Jan 30 14:56:13 2010	(r203192)
+++ stable/8/bin/setfacl/mask.c	Sat Jan 30 14:58:25 2010	(r203193)
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
 
 /* set the appropriate mask the given ACL's */
 int
-set_acl_mask(acl_t *prev_acl)
+set_acl_mask(acl_t *prev_acl, const char *filename)
 {
 	acl_entry_t entry;
 	acl_t acl;
@@ -59,7 +59,7 @@ set_acl_mask(acl_t *prev_acl)
 
 	acl = acl_dup(*prev_acl);
 	if (acl == NULL)
-		err(1, "acl_dup() failed");
+		err(1, "%s: acl_dup() failed", filename);
 
 	if (n_flag == 0) {
 		/*
@@ -70,7 +70,7 @@ set_acl_mask(acl_t *prev_acl)
 		 * class in the resulting ACL
 		 */
 		if (acl_calc_mask(&acl)) {
-			warn("acl_calc_mask() failed");
+			warn("%s: acl_calc_mask() failed", filename);
 			acl_free(acl);
 			return (-1);
 		}
@@ -86,7 +86,8 @@ set_acl_mask(acl_t *prev_acl)
 		while (acl_get_entry(acl, entry_id, &entry) == 1) {
 			entry_id = ACL_NEXT_ENTRY;
 			if (acl_get_tag_type(entry, &tag) == -1)
-				err(1, "acl_get_tag_type() failed");
+				err(1, "%s: acl_get_tag_type() failed",
+				    filename);
 
 			if (tag == ACL_MASK) {
 				acl_free(acl);
@@ -100,7 +101,7 @@ set_acl_mask(acl_t *prev_acl)
 		 * file, then write an error message to standard error and
 		 * continue with the next file.
 		 */
-		warnx("warning: no mask entry");
+		warnx("%s: warning: no mask entry", filename);
 		acl_free(acl);
 		return (0);
 	}

Modified: stable/8/bin/setfacl/merge.c
==============================================================================
--- stable/8/bin/setfacl/merge.c	Sat Jan 30 14:56:13 2010	(r203192)
+++ stable/8/bin/setfacl/merge.c	Sat Jan 30 14:58:25 2010	(r203193)
@@ -36,12 +36,15 @@ __FBSDID("$FreeBSD$");
 
 #include "setfacl.h"
 
-static int merge_user_group(acl_entry_t *entry, acl_entry_t *entry_new);
+static int merge_user_group(acl_entry_t *entry, acl_entry_t *entry_new,
+    int acl_brand);
 
 static int
-merge_user_group(acl_entry_t *entry, acl_entry_t *entry_new)
+merge_user_group(acl_entry_t *entry, acl_entry_t *entry_new, int acl_brand)
 {
 	acl_permset_t permset;
+	acl_entry_type_t entry_type;
+	acl_flagset_t flagset;
 	int have_entry;
 	uid_t *id, *id_new;
 
@@ -59,6 +62,18 @@ merge_user_group(acl_entry_t *entry, acl
 			err(1, "acl_get_permset() failed");
 		if (acl_set_permset(*entry_new, permset) == -1)
 			err(1, "acl_set_permset() failed");
+
+		if (acl_brand == ACL_BRAND_NFS4) {
+			if (acl_get_entry_type_np(*entry, &entry_type))
+				err(1, "acl_get_entry_type_np() failed");
+			if (acl_set_entry_type_np(*entry_new, entry_type))
+				err(1, "acl_set_entry_type_np() failed");
+			if (acl_get_flagset_np(*entry, &flagset))
+				err(1, "acl_get_flagset_np() failed");
+			if (acl_set_flagset_np(*entry_new, flagset))
+				err(1, "acl_set_flagset_np() failed");
+		}
+
 		have_entry = 1;
 	}
 	acl_free(id);
@@ -71,20 +86,31 @@ merge_user_group(acl_entry_t *entry, acl
  * merge an ACL into existing file's ACL
  */
 int
-merge_acl(acl_t acl, acl_t *prev_acl)
+merge_acl(acl_t acl, acl_t *prev_acl, const char *filename)
 {
 	acl_entry_t entry, entry_new;
 	acl_permset_t permset;
 	acl_t acl_new;
 	acl_tag_t tag, tag_new;
-	int entry_id, entry_id_new, have_entry;
+	acl_entry_type_t entry_type, entry_type_new;
+	acl_flagset_t flagset;
+	int entry_id, entry_id_new, have_entry, entry_number = 0;
+	int acl_brand, prev_acl_brand;
+
+	acl_get_brand_np(acl, &acl_brand);
+	acl_get_brand_np(*prev_acl, &prev_acl_brand);
+
+	if (acl_brand != prev_acl_brand) {
+		warnx("%s: branding mismatch; existing ACL is %s, "
+		    "entry to be merged is %s", filename,
+		    prev_acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e",
+		    acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e");
+		return (-1);
+	}
 
-	if (acl_type == ACL_TYPE_ACCESS)
-		acl_new = acl_dup(prev_acl[ACCESS_ACL]);
-	else
-		acl_new = acl_dup(prev_acl[DEFAULT_ACL]);
+	acl_new = acl_dup(*prev_acl);
 	if (acl_new == NULL)
-		err(1, "acl_dup() failed");
+		err(1, "%s: acl_dup() failed", filename);
 
 	entry_id = ACL_FIRST_ENTRY;
 
@@ -94,28 +120,45 @@ merge_acl(acl_t acl, acl_t *prev_acl)
 
 		/* keep track of existing ACL_MASK entries */
 		if (acl_get_tag_type(entry, &tag) == -1)
-			err(1, "acl_get_tag_type() failed - invalid ACL entry");
+			err(1, "%s: acl_get_tag_type() failed - "
+			    "invalid ACL entry", filename);
 		if (tag == ACL_MASK)
 			have_mask = 1;
 
 		/* check against the existing ACL entries */
 		entry_id_new = ACL_FIRST_ENTRY;
-		while (have_entry == 0 &&
-		    acl_get_entry(acl_new, entry_id_new, &entry_new) == 1) {
+		while (acl_get_entry(acl_new, entry_id_new, &entry_new) == 1) {
 			entry_id_new = ACL_NEXT_ENTRY;
 
 			if (acl_get_tag_type(entry, &tag) == -1)
-				err(1, "acl_get_tag_type() failed");
+				err(1, "%s: acl_get_tag_type() failed",
+				    filename);
 			if (acl_get_tag_type(entry_new, &tag_new) == -1)
-				err(1, "acl_get_tag_type() failed");
+				err(1, "%s: acl_get_tag_type() failed",
+				    filename);
 			if (tag != tag_new)
 				continue;
 
+			/*
+			 * For NFSv4, in addition to "tag" and "id" we also
+			 * compare "entry_type".
+			 */
+			if (acl_brand == ACL_BRAND_NFS4) {
+				if (acl_get_entry_type_np(entry, &entry_type))
+					err(1, "%s: acl_get_entry_type_np() "
+					    "failed", filename);
+				if (acl_get_entry_type_np(entry_new, &entry_type_new))
+					err(1, "%s: acl_get_entry_type_np() "
+					    "failed", filename);
+				if (entry_type != entry_type_new)
+					continue;
+			}
+		
 			switch(tag) {
 			case ACL_USER:
 			case ACL_GROUP:
 				have_entry = merge_user_group(&entry,
-				    &entry_new);
+				    &entry_new, acl_brand);
 				if (have_entry == 0)
 					break;
 				/* FALLTHROUGH */
@@ -123,37 +166,127 @@ merge_acl(acl_t acl, acl_t *prev_acl)
 			case ACL_GROUP_OBJ:
 			case ACL_OTHER:
 			case ACL_MASK:
+			case ACL_EVERYONE:
 				if (acl_get_permset(entry, &permset) == -1)
-					err(1, "acl_get_permset() failed");
+					err(1, "%s: acl_get_permset() failed",
+					    filename);
 				if (acl_set_permset(entry_new, permset) == -1)
-					err(1, "acl_set_permset() failed");
+					err(1, "%s: acl_set_permset() failed",
+					    filename);
+
+				if (acl_brand == ACL_BRAND_NFS4) {
+					if (acl_get_entry_type_np(entry, &entry_type))
+						err(1, "%s: acl_get_entry_type_np() failed",
+						    filename);
+					if (acl_set_entry_type_np(entry_new, entry_type))
+						err(1, "%s: acl_set_entry_type_np() failed",
+						    filename);
+					if (acl_get_flagset_np(entry, &flagset))
+						err(1, "%s: acl_get_flagset_np() failed",
+						    filename);
+					if (acl_set_flagset_np(entry_new, flagset))
+						err(1, "%s: acl_set_flagset_np() failed",
+						    filename);
+				}
 				have_entry = 1;
 				break;
 			default:
 				/* should never be here */
-				errx(1, "Invalid tag type: %i", tag);
+				errx(1, "%s: invalid tag type: %i", filename, tag);
 				break;
 			}
 		}
 
 		/* if this entry has not been found, it must be new */
 		if (have_entry == 0) {
-			if (acl_create_entry(&acl_new, &entry_new) == -1) {
-				acl_free(acl_new);
-				return (-1);
+
+			/*
+			 * NFSv4 ACL entries must be prepended to the ACL.
+			 * Appending them at the end makes no sense, since
+			 * in most cases they wouldn't even get evaluated.
+			 */
+			if (acl_brand == ACL_BRAND_NFS4) {
+				if (acl_create_entry_np(&acl_new, &entry_new, entry_number) == -1) {
+					warn("%s: acl_create_entry_np() failed", filename); 
+					acl_free(acl_new);
+					return (-1);
+				}
+				/*
+				 * Without this increment, adding several
+				 * entries at once, for example
+				 * "setfacl -m user:1:r:allow,user:2:r:allow",
+				 * would make them appear in reverse order.
+				 */
+				entry_number++;
+			} else {
+				if (acl_create_entry(&acl_new, &entry_new) == -1) {
+					warn("%s: acl_create_entry() failed", filename); 
+					acl_free(acl_new);
+					return (-1);
+				}
 			}
 			if (acl_copy_entry(entry_new, entry) == -1)
-				err(1, "acl_copy_entry() failed");
+				err(1, "%s: acl_copy_entry() failed", filename);
 		}
 	}
 
-	if (acl_type == ACL_TYPE_ACCESS) {
-		acl_free(prev_acl[ACCESS_ACL]);
-		prev_acl[ACCESS_ACL] = acl_new;
-	} else {
-		acl_free(prev_acl[DEFAULT_ACL]);
-		prev_acl[DEFAULT_ACL] = acl_new;
+	acl_free(*prev_acl);
+	*prev_acl = acl_new;
+
+	return (0);
+}
+
+int
+add_acl(acl_t acl, uint entry_number, acl_t *prev_acl, const char *filename)
+{
+	acl_entry_t entry, entry_new;
+	acl_t acl_new;
+	int entry_id, acl_brand, prev_acl_brand;
+
+	acl_get_brand_np(acl, &acl_brand);
+	acl_get_brand_np(*prev_acl, &prev_acl_brand);
+
+	if (prev_acl_brand != ACL_BRAND_NFS4) {
+		warnx("%s: the '-a' option is only applicable to NFSv4 ACLs",
+		    filename);
+		return (-1);
+	}
+
+	if (acl_brand != ACL_BRAND_NFS4) {
+		warnx("%s: branding mismatch; existing ACL is NFSv4, "
+		    "entry to be added is POSIX.1e", filename);
+		return (-1);
+	}
+
+	acl_new = acl_dup(*prev_acl);
+	if (acl_new == NULL)
+		err(1, "%s: acl_dup() failed", filename);
+
+	entry_id = ACL_FIRST_ENTRY;
+
+	while (acl_get_entry(acl, entry_id, &entry) == 1) {
+		entry_id = ACL_NEXT_ENTRY;
+
+		if (acl_create_entry_np(&acl_new, &entry_new, entry_number) == -1) {
+			warn("%s: acl_create_entry_np() failed", filename); 
+			acl_free(acl_new);
+			return (-1);
+		}
+
+		/*
+		 * Without this increment, adding several
+		 * entries at once, for example
+		 * "setfacl -m user:1:r:allow,user:2:r:allow",
+		 * would make them appear in reverse order.
+		 */
+		entry_number++;
+
+		if (acl_copy_entry(entry_new, entry) == -1)
+			err(1, "%s: acl_copy_entry() failed", filename);
 	}
 
+	acl_free(*prev_acl);
+	*prev_acl = acl_new;
+
 	return (0);
 }

Modified: stable/8/bin/setfacl/remove.c
==============================================================================
--- stable/8/bin/setfacl/remove.c	Sat Jan 30 14:56:13 2010	(r203192)
+++ stable/8/bin/setfacl/remove.c	Sat Jan 30 14:58:25 2010	(r203193)
@@ -41,21 +41,31 @@ __FBSDID("$FreeBSD$");
  * remove ACL entries from an ACL
  */
 int
-remove_acl(acl_t acl, acl_t *prev_acl)
+remove_acl(acl_t acl, acl_t *prev_acl, const char *filename)
 {
 	acl_entry_t	entry;
 	acl_t		acl_new;
 	acl_tag_t	tag;
-	int		carried_error, entry_id;
+	int		carried_error, entry_id, acl_brand, prev_acl_brand;
+
+	carried_error = 0;
+
+	acl_get_brand_np(acl, &acl_brand);
+	acl_get_brand_np(*prev_acl, &prev_acl_brand);
+
+	if (acl_brand != prev_acl_brand) {
+		warnx("%s: branding mismatch; existing ACL is %s, "
+		    "entry to be removed is %s", filename,
+		    prev_acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e",
+		    acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e");
+		return (-1);
+	}
 
 	carried_error = 0;
 
-	if (acl_type == ACL_TYPE_ACCESS)
-		acl_new = acl_dup(prev_acl[ACCESS_ACL]);
-	else
-		acl_new = acl_dup(prev_acl[DEFAULT_ACL]);
+	acl_new = acl_dup(*prev_acl);
 	if (acl_new == NULL)
-		err(1, "acl_dup() failed");
+		err(1, "%s: acl_dup() failed", filename);
 
 	tag = ACL_UNDEFINED_TAG;
 
@@ -64,23 +74,68 @@ remove_acl(acl_t acl, acl_t *prev_acl)
 	while (acl_get_entry(acl, entry_id, &entry) == 1) {
 		entry_id = ACL_NEXT_ENTRY;
 		if (acl_get_tag_type(entry, &tag) == -1)
-			err(1, "acl_get_tag_type() failed");
+			err(1, "%s: acl_get_tag_type() failed", filename);
 		if (tag == ACL_MASK)
 			have_mask++;
 		if (acl_delete_entry(acl_new, entry) == -1) {
 			carried_error++;
-			warnx("cannot remove non-existent acl entry");
+			warnx("%s: cannot remove non-existent ACL entry",
+			    filename);
 		}
 	}
 
-	if (acl_type == ACL_TYPE_ACCESS) {
-		acl_free(prev_acl[ACCESS_ACL]);
-		prev_acl[ACCESS_ACL] = acl_new;
-	} else {
-		acl_free(prev_acl[DEFAULT_ACL]);
-		prev_acl[DEFAULT_ACL] = acl_new;
+	acl_free(*prev_acl);
+	*prev_acl = acl_new;
+
+	if (carried_error)
+		return (-1);
+
+	return (0);
+}
+
+int
+remove_by_number(uint entry_number, acl_t *prev_acl, const char *filename)
+{
+	acl_entry_t	entry;
+	acl_t		acl_new;
+	acl_tag_t	tag;
+	int		carried_error, entry_id;
+	uint		i;
+
+	carried_error = 0;
+
+	acl_new = acl_dup(*prev_acl);
+	if (acl_new == NULL)
+		err(1, "%s: acl_dup() failed", filename);
+
+	tag = ACL_UNDEFINED_TAG;
+
+	/*
+	 * Find out whether we're removing the mask entry,
+	 * to behave the same as the routine above.
+	 *
+	 * XXX: Is this loop actually needed?
+	 */
+	entry_id = ACL_FIRST_ENTRY;
+	i = 0;
+	while (acl_get_entry(acl_new, entry_id, &entry) == 1) {
+		entry_id = ACL_NEXT_ENTRY;
+		if (i != entry_number)
+			continue;
+		if (acl_get_tag_type(entry, &tag) == -1)
+			err(1, "%s: acl_get_tag_type() failed", filename);
+		if (tag == ACL_MASK)
+			have_mask++;
+	}
+
+	if (acl_delete_entry_np(acl_new, entry_number) == -1) {
+		carried_error++;
+		warn("%s: acl_delete_entry_np() failed", filename);
 	}
 
+	acl_free(*prev_acl);
+	*prev_acl = acl_new;
+
 	if (carried_error)
 		return (-1);
 
@@ -91,18 +146,14 @@ remove_acl(acl_t acl, acl_t *prev_acl)
  * remove default entries
  */
 int
-remove_default(acl_t *prev_acl)
+remove_default(acl_t *prev_acl, const char *filename)
 {
 
-	if (prev_acl[1]) {
-		acl_free(prev_acl[1]);
-		prev_acl[1] = acl_init(ACL_MAX_ENTRIES);
-		if (prev_acl[1] == NULL)
-			err(1, "acl_init() failed");
-	} else {
-		warn("cannot remove default ACL");
-		return (-1);
-	}
+	acl_free(*prev_acl);
+	*prev_acl = acl_init(ACL_MAX_ENTRIES);
+	if (*prev_acl == NULL)
+		err(1, "%s: acl_init() failed", filename);
+
 	return (0);
 }
 
@@ -110,71 +161,14 @@ remove_default(acl_t *prev_acl)
  * remove extended entries
  */
 void
-remove_ext(acl_t *prev_acl)
+remove_ext(acl_t *prev_acl, const char *filename)
 {
-	acl_t acl_new, acl_old;
-	acl_entry_t entry, entry_new;
-	acl_permset_t perm;
-	acl_tag_t tag;
-	int entry_id, have_mask_entry;
-
-	if (acl_type == ACL_TYPE_ACCESS)
-		acl_old = acl_dup(prev_acl[ACCESS_ACL]);
-	else
-		acl_old = acl_dup(prev_acl[DEFAULT_ACL]);
-	if (acl_old == NULL)
-		err(1, "acl_dup() failed");
+	acl_t acl_new;
 
-	have_mask_entry = 0;
-	acl_new = acl_init(ACL_MAX_ENTRIES);
+	acl_new = acl_strip_np(*prev_acl, !n_flag);
 	if (acl_new == NULL)
-		err(1, "acl_init() failed");
-	tag = ACL_UNDEFINED_TAG;
-
-	/* only save the default user/group/other entries */
-	entry_id = ACL_FIRST_ENTRY;
-	while (acl_get_entry(acl_old, entry_id, &entry) == 1) {
-		entry_id = ACL_NEXT_ENTRY;
-
-		if (acl_get_tag_type(entry, &tag) == -1)
-			err(1, "acl_get_tag_type() failed");
-
-		switch(tag) {
-		case ACL_USER_OBJ:
-		case ACL_GROUP_OBJ:
-		case ACL_OTHER:
-			if (acl_get_tag_type(entry, &tag) == -1)
-				err(1, "acl_get_tag_type() failed");
-			if (acl_get_permset(entry, &perm) == -1)
-				err(1, "acl_get_permset() failed");
-			if (acl_create_entry(&acl_new, &entry_new) == -1)
-				err(1, "acl_create_entry() failed");
-			if (acl_set_tag_type(entry_new, tag) == -1)
-				err(1, "acl_set_tag_type() failed");
-			if (acl_set_permset(entry_new, perm) == -1)
-				err(1, "acl_get_permset() failed");
-			if (acl_copy_entry(entry_new, entry) == -1)
-				err(1, "acl_copy_entry() failed");
-			break;
-		case ACL_MASK:
-			have_mask_entry = 1;
-			break;
-		default:
-			break;
-		}
-	}
-	if (have_mask_entry && n_flag == 0) {
-		if (acl_calc_mask(&acl_new) == -1)
-			err(1, "acl_calc_mask() failed");
-	} else {
-		have_mask = 1;
-	}
+		err(1, "%s: acl_strip_np() failed", filename);
 
-	if (acl_type == ACL_TYPE_ACCESS) {
-		acl_free(prev_acl[ACCESS_ACL]);
-		prev_acl[ACCESS_ACL] = acl_new;
-	} else {
-		acl_free(prev_acl[DEFAULT_ACL]);
-		prev_acl[DEFAULT_ACL] = acl_new;
-	}
+	acl_free(*prev_acl);
+	*prev_acl = acl_new;
 }

Modified: stable/8/bin/setfacl/setfacl.1
==============================================================================
--- stable/8/bin/setfacl/setfacl.1	Sat Jan 30 14:56:13 2010	(r203192)
+++ stable/8/bin/setfacl/setfacl.1	Sat Jan 30 14:58:25 2010	(r203193)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 7, 2001
+.Dd September 5, 2009
 .Dt SETFACL 1
 .Os
 .Sh NAME
@@ -34,9 +34,10 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl bdhkn
+.Op Fl a Ar position entries
 .Op Fl m Ar entries
 .Op Fl M Ar file
-.Op Fl x Ar entries
+.Op Fl x Ar entries | position
 .Op Fl X Ar file
 .Op Ar
 .Sh DESCRIPTION
@@ -50,9 +51,19 @@ the file names are taken from the standa
 .Pp
 The following options are available:
 .Bl -tag -width indent
+.It Fl a Ar position entries
+Modify the ACL on the specified files by inserting new
+ACL entries
+specified in
+.Ar entries ,
+starting at position
+.Ar position ,
+counting from zero.
+This option is only applicable to NFSv4 ACLs.
 .It Fl b
-Remove all ACL entries except for the three required entries.
-If the ACL contains a
+Remove all ACL entries except for the three required entries
+(POSIX.1e ACLs) or six "canonical" entries (NFSv4 ACLs).
+If the POSIX.1e ACL contains a
 .Dq Li mask
 entry, the permissions of the
 .Dq Li group
@@ -66,7 +77,7 @@ entries of the current ACL.
 The operations apply to the default ACL entries instead of
 access ACL entries.
 Currently only directories may have
-default ACL's.
+default ACL's.  This option is not applicable to NFSv4 ACLs.
 .It Fl h
 If the target of the operation is a symbolic link, perform the operation
 on the symbolic link itself, rather than following the link.
@@ -77,7 +88,7 @@ is not considered an error if the specif
 any default ACL entries.
 An error will be reported if any of
 the specified files cannot have a default entry (i.e.\&
-non-directories).
+non-directories).  This option is not applicable to NFSv4 ACLs.
 .It Fl m Ar entries
 Modify the ACL entries on the specified files by adding new
 entries and modifying existing ACL entries with the ACL entries
@@ -95,11 +106,15 @@ is
 the input is taken from stdin.
 .It Fl n
 Do not recalculate the permissions associated with the ACL
-mask entry.
-.It Fl x Ar entries
-Remove the ACL entries specified in
+mask entry.  This option is not applicable to NFSv4 ACLs.
+.It Fl x Ar entries | position
+If
 .Ar entries
+is specified, remove the ACL entries specified there
 from the access or default ACL of the specified files.
+Otherwise, remove entry at index
+.Ar position ,
+counting from zero.
 .It Fl X Ar file
 Remove the ACL entries specified in the file
 .Ar file
@@ -108,8 +123,8 @@ from the access or default ACL of the sp
 .Pp
 The above options are evaluated in the order specified
 on the command-line.
-.Sh ACL ENTRIES
-An ACL entry contains three colon-separated fields:
+.Sh POSIX.1e ACL ENTRIES
+A POSIX.1E ACL entry contains three colon-separated fields:
 an ACL tag, an ACL qualifier, and discretionary access
 permissions:
 .Bl -tag -width indent
@@ -223,7 +238,7 @@ previously specified; whitespace is igno
 .Ql #
 is ignored (comments).
 .Pp
-When ACL entries are evaluated, the access check algorithm checks
+When POSIX.1e ACL entries are evaluated, the access check algorithm checks
 the ACL entries in the following order: file owner,
 .Dq Li user
 ACL entries, file owning group,
@@ -243,13 +258,135 @@ ACL entries for user, group, other and m
 For more details see the examples below.
 Default ACLs can be created by using
 .Fl d .
+.Sh NFSv4 ACL ENTRIES
+An NFSv4 ACL entry contains four or five colon-separated fields: an ACL tag,
+an ACL qualifier (only for
+.Dq Li user
+and
+.Dq Li group
+tags), discretionary access permissions, ACL inheritance flags, and ACL type:
+.Bl -tag -width indent
+.It Ar "ACL tag"
+The ACL tag specifies the ACL entry type and consists of
+one of the following:
+.Dq Li user
+or
+.Ql u
+specifying the access
+granted to the specified user;
+.Dq Li group
+or
+.Ql g
+specifying the access granted to the specified group;
+.Dq Li owner@
+specifying the access granted to the owner of the file;
+.Dq Li group@
+specifying the access granted to the file owning group;
+.Dq Li everyone@
+specifying everyone.  Note that
+.Dq Li everyone@
+is not the same as traditional Unix
+.Dq Li other
+- it means,
+literally, everyone, including file owner and owning group.
+.It Ar "ACL qualifier"
+The ACL qualifier field describes the user or group associated with
+the ACL entry.
+It may consist of one of the following: uid or
+user name, or gid or group name.  In entries whose tag type is
+one of 
+.Dq Li owner@ ,
+.Dq Li group@ ,
+or
+.Dq Li everyone@ ,
+this field is ommited altogether, including the trailing comma.
+.It Ar "access permissions"
+Access permissions may be specified in either short or long form.
+Short and long forms may not be mixed.
+Permissions in long form are separated by the
+.Ql /
+character; in short form, they are concatenated together.
+Valid permissions are:
+.Bl -tag -width ".Dv short"
+.It Short
+Long
+.It r
+read_data
+.It w
+write_data
+.It x
+execute
+.It p
+append_data
+.It d
+delete_child
+.It D
+delete
+.It a
+read_attributes
+.It A
+write_attributes
+.It R
+read_xattr
+.It W
+write_xattr
+.It c
+read_acl
+.It C
+write_acl
+.It o
+write_owner
+.It S
+synchronize
+.El
+.It Ar "ACL inheritance flags"
+Inheritance flags may be specified in either short or long form.
+Short and long forms may not be mixed.
+Access flags in long form are separated by the
+.Ql /
+character; in short form, they are concatenated together.
+Valid inheritance flags are:
+.Bl -tag -width ".Dv short"
+.It Short
+Long
+.It f
+file_inherit
+.It d
+dir_inherit
+.It i
+inherit_only
+.It n
+no_propagate
+.El
+.Pp
+Inheritance flags may be only set on directories.
+.It Ar "ACL type"
+The ACL type field is either
+.Dq Li allow
+or
+.Dq Li deny .
+.El
+.Pp
+ACL entries applied from a file using the
+.Fl M
+or
+.Fl X
+options shall be of the following form: one ACL entry per line, as
+previously specified; whitespace is ignored; any text after a
+.Ql #
+is ignored (comments).
+.Pp
+NFSv4 ACL entries are evaluated in their visible order.
+.Pp
+Multiple ACL entries specified on the command line are
+separated by commas.
 .Sh EXIT STATUS
 .Ex -std
 .Sh EXAMPLES
 .Dl setfacl -d -m u::rwx,g::rx,o::rx,mask::rwx dir
 .Dl setfacl -d -m g:admins:rwx dir
 .Pp
-The first command sets the mandatory elements of the default ACL.
+The first command sets the mandatory elements of the POSIX.1e default ACL.
 The second command specifies that users in group admins can have read, write, and execute
 permissions for directory named "dir".
 It should be noted that any files or directories created underneath "dir" will
@@ -259,9 +396,13 @@ inherit these default ACLs upon creation
 .Pp
 Sets read, write, and execute permissions for the
 .Pa file
-owner's ACL entry and read and write permissions for group mail on
+owner's POSIX.1e ACL entry and read and write permissions for group mail on
 .Pa file .
 .Pp
+.Dl setfacl -m owner@:rwxp::allow,g:mail:rwp::allow file
+.Pp
+Semantically equal to the example above, but for NFSv4 ACL.
+.Pp
 .Dl setfacl -M file1 file2
 .Pp
 Sets/updates the ACL entries contained in
@@ -271,10 +412,15 @@ on
 .Pp
 .Dl setfacl -x g:mail:rw file
 .Pp
-Remove the group mail ACL entry containing read/write permissions
+Remove the group mail POSIX.1e ACL entry containing read/write permissions
 from
 .Pa file .
 .Pp
+.Dl setfacl -x0 file
+.Pp
+Remove the first entry from the NFSv4 ACL from
+.Pa file .
+.Pp
 .Dl setfacl -bn file
 .Pp
 Remove all

Modified: stable/8/bin/setfacl/setfacl.c
==============================================================================
--- stable/8/bin/setfacl/setfacl.c	Sat Jan 30 14:56:13 2010	(r203192)
+++ stable/8/bin/setfacl/setfacl.c	Sat Jan 30 14:58:25 2010	(r203193)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,9 +42,8 @@ __FBSDID("$FreeBSD$");
 
 #include "setfacl.h"
 
-static void   add_filename(const char *filename);
-static acl_t *get_file_acls(const char *filename);
-static void   usage(void);
+static void	add_filename(const char *filename);
+static void	usage(void);
 
 static void
 add_filename(const char *filename)
@@ -59,57 +59,28 @@ add_filename(const char *filename)
 	TAILQ_INSERT_TAIL(&filelist, file, next);
 }
 
-static acl_t *
-get_file_acls(const char *filename)
-{
-	acl_t *acl;
-	struct stat sb;
-
-	if (stat(filename, &sb) == -1) {
-		warn("stat() of %s failed", filename);
-		return (NULL);
-	}
-
-	acl = zmalloc(sizeof(acl_t) * 2);
-	if (h_flag)
-		acl[ACCESS_ACL] = acl_get_link_np(filename, ACL_TYPE_ACCESS);
-	else
-		acl[ACCESS_ACL] = acl_get_file(filename, ACL_TYPE_ACCESS);
-	if (acl[ACCESS_ACL] == NULL)
-		err(1, "acl_get_file() failed");
-	if (S_ISDIR(sb.st_mode)) {
-		if (h_flag)
-			acl[DEFAULT_ACL] = acl_get_link_np(filename,
-			    ACL_TYPE_DEFAULT);
-		else
-			acl[DEFAULT_ACL] = acl_get_file(filename,
-			    ACL_TYPE_DEFAULT);
-		if (acl[DEFAULT_ACL] == NULL)
-			err(1, "acl_get_file() failed");
-	} else
-		acl[DEFAULT_ACL] = NULL;
-
-	return (acl);
-}
-
 static void
 usage(void)
 {
 
-	fprintf(stderr, "usage: setfacl [-bdhkn] [-m entries] [-M file] "
-	    "[-x entries] [-X file] [file ...]\n");
+	fprintf(stderr, "usage: setfacl [-bdhkn] [-a position entries] "
+	    "[-m entries] [-M file] [-x entries] [-X file] [file ...]\n");
 	exit(1);
 }
 
 int
 main(int argc, char *argv[])
 {
-	acl_t *acl, final_acl;
+	acl_t acl;
+	acl_type_t acl_type;
 	char filename[PATH_MAX];
-	int local_error, carried_error, ch, i;
+	int local_error, carried_error, ch, i, entry_number, ret;
+	int h_flag;
 	struct sf_file *file;
 	struct sf_entry *entry;
 	const char *fn_dup;
+	char *end;
+	struct stat sb;
 
 	acl_type = ACL_TYPE_ACCESS;
 	carried_error = local_error = 0;
@@ -118,13 +89,13 @@ main(int argc, char *argv[])
 	TAILQ_INIT(&entrylist);
 	TAILQ_INIT(&filelist);
 
-	while ((ch = getopt(argc, argv, "M:X:bdhkm:nx:")) != -1)
+	while ((ch = getopt(argc, argv, "M:X:a:bdhkm:nx:")) != -1)
 		switch(ch) {
 		case 'M':
 			entry = zmalloc(sizeof(struct sf_entry));
 			entry->acl = get_acl_from_file(optarg);
 			if (entry->acl == NULL)
-				err(1, "get_acl_from_file() failed");
+				err(1, "%s: get_acl_from_file() failed", optarg);
 			entry->op = OP_MERGE_ACL;
 			TAILQ_INSERT_TAIL(&entrylist, entry, next);
 			break;
@@ -134,6 +105,25 @@ main(int argc, char *argv[])
 			entry->op = OP_REMOVE_ACL;
 			TAILQ_INSERT_TAIL(&entrylist, entry, next);
 			break;
+		case 'a':
+			entry = zmalloc(sizeof(struct sf_entry));
+
+			entry_number = strtol(optarg, &end, 10);
+			if (end - optarg != (int)strlen(optarg))
+				errx(1, "%s: invalid entry number", optarg);
+			if (entry_number < 0)
+				errx(1, "%s: entry number cannot be less than zero", optarg);
+			entry->entry_number = entry_number;
+
+			if (argv[optind] == NULL)
+				errx(1, "missing ACL");
+			entry->acl = acl_from_text(argv[optind]);
+			if (entry->acl == NULL)
+				err(1, "%s", argv[optind]);
+			optind++;
+			entry->op = OP_ADD_ACL;
+			TAILQ_INSERT_TAIL(&entrylist, entry, next);
+			break;
 		case 'b':
 			entry = zmalloc(sizeof(struct sf_entry));
 			entry->op = OP_REMOVE_EXT;
@@ -163,10 +153,18 @@ main(int argc, char *argv[])
 			break;
 		case 'x':
 			entry = zmalloc(sizeof(struct sf_entry));
-			entry->acl = acl_from_text(optarg);
-			if (entry->acl == NULL)
-				err(1, "%s", optarg);
-			entry->op = OP_REMOVE_ACL;
+			entry_number = strtol(optarg, &end, 10);
+			if (end - optarg == (int)strlen(optarg)) {
+				if (entry_number < 0)
+					errx(1, "%s: entry number cannot be less than zero", optarg);
+				entry->entry_number = entry_number;
+				entry->op = OP_REMOVE_BY_NUMBER;
+			} else {
+				entry->acl = acl_from_text(optarg);
+				if (entry->acl == NULL)
+					err(1, "%s", optarg);
+				entry->op = OP_REMOVE_ACL;
+			}
 			TAILQ_INSERT_TAIL(&entrylist, entry, next);
 			break;
 		default:
@@ -199,16 +197,51 @@ main(int argc, char *argv[])
 
 	/* cycle through each file */
 	TAILQ_FOREACH(file, &filelist, next) {
-		/* get our initial access and default ACL's */
-		acl = get_file_acls(file->filename);
-		if (acl == NULL)
+		local_error = 0;
+
+		if (stat(file->filename, &sb) == -1) {
+			warn("%s: stat() failed", file->filename);
 			continue;
-		if ((acl_type == ACL_TYPE_DEFAULT) && !acl[1]) {
-			warnx("Default ACL not valid for %s", file->filename);
+		}
+
+		if (acl_type == ACL_TYPE_DEFAULT && S_ISDIR(sb.st_mode) == 0) {
+			warnx("%s: default ACL may only be set on a directory",
+			    file->filename);
 			continue;
 		}
 
-		local_error = 0;
+		if (h_flag)
+			ret = lpathconf(file->filename, _PC_ACL_NFS4);
+		else
+			ret = pathconf(file->filename, _PC_ACL_NFS4);
+		if (ret > 0) {
+			if (acl_type == ACL_TYPE_DEFAULT) {
+				warnx("%s: there are no default entries "
+			           "in NFSv4 ACLs", file->filename);
+				continue;
+			}
+			acl_type = ACL_TYPE_NFS4;
+		} else if (ret == 0) {
+			if (acl_type == ACL_TYPE_NFS4)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:00:34 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B69E106566B;
	Sat, 30 Jan 2010 15:00:34 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 392AF8FC0C;
	Sat, 30 Jan 2010 15:00:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UF0YNf025649;
	Sat, 30 Jan 2010 15:00:34 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UF0Ybu025647;
	Sat, 30 Jan 2010 15:00:34 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201001301500.o0UF0Ybu025647@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 30 Jan 2010 15:00:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203194 - stable/7/etc/rc.d
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:00:34 -0000

Author: kib
Date: Sat Jan 30 15:00:33 2010
New Revision: 203194
URL: http://svn.freebsd.org/changeset/base/203194

Log:
  MFC r202880:
  Do not check for existence of symlink source for the link action.
  
  Approved by:	re (bz)

Modified:
  stable/7/etc/rc.d/devfs
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/rc.d/devfs
==============================================================================
--- stable/7/etc/rc.d/devfs	Sat Jan 30 14:58:25 2010	(r203193)
+++ stable/7/etc/rc.d/devfs	Sat Jan 30 15:00:33 2010	(r203194)
@@ -44,7 +44,7 @@ read_devfs_conf()
 		while read action devicelist parameter; do
 			case "${action}" in
 			l*)	for device in ${devicelist}; do
-					if [ -c ${device} -a ! -e ${parameter} ]; then
+					if [ ! -e ${parameter} ]; then
 						ln -fs ${device} ${parameter}
 					fi
 				done

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:22:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E84AA106566B;
	Sat, 30 Jan 2010 15:22:48 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-iw0-f189.google.com (mail-iw0-f189.google.com
	[209.85.223.189])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A9078FC08;
	Sat, 30 Jan 2010 15:22:48 +0000 (UTC)
Received: by iwn27 with SMTP id 27so1134iwn.8
	for ; Sat, 30 Jan 2010 07:22:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=Exo6nAKJis+XsWck7C/pjlFPVShRRbpJ5Bx+F+grw2g=;
	b=hE74W+LwFXLtHFYZBk1Km/8kcYvRA4VDZkbA8dLa0NaDd2UNAxpfakInSZXCDlEJDs
	xFt1yE8QiBreyqacELcEQYR46/oVeGZTsPSYVSask4qRHCi2U3lQZek3S07i7ndSU9GE
	ObxfMJewxK909D35A1Fjq4w3WmtI1FsQtoDYA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=Z0SDu2YAXGuU9gBSTEZg/B6zJRz9a730lD97zWQCBoynYH2nJxmdKvd7DE/f+15rGf
	GjVs1cfP36H8PyHA+pFy5GFJJ+hBaeCY7AOqurUMMTRtWXbx2mbnyZYpHVJYjVByMo6E
	tVQkYMR/NeHotWbmGzj7clS5izZmLOJhWxArE=
MIME-Version: 1.0
Sender: asmrookie@gmail.com
Received: by 10.231.147.70 with SMTP id k6mr3379580ibv.55.1264864967695; Sat, 
	30 Jan 2010 07:22:47 -0800 (PST)
In-Reply-To: <20100130144036.GA77522@alchemy.franken.de>
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	
	<3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com>
	<20100127215904.GF40779@alchemy.franken.de>
	<3bbf2fe11001280216p705ed94ev61abc4be654f8cc1@mail.gmail.com>
	<20100130144036.GA77522@alchemy.franken.de>
Date: Sat, 30 Jan 2010 16:22:47 +0100
X-Google-Sender-Auth: 70beb3ff25f1483f
Message-ID: <3bbf2fe11001300722v7dc4e53cvc94cddd60997c79b@mail.gmail.com>
From: Attilio Rao 
To: Marius Strobl 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Rob Farmer , src-committers@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:22:49 -0000

2010/1/30 Marius Strobl :
> On Thu, Jan 28, 2010 at 11:16:55AM +0100, Attilio Rao wrote:
>> 2010/1/27 Marius Strobl :
>> > On Tue, Jan 26, 2010 at 08:10:25AM +0100, Attilio Rao wrote:
>> >> 2010/1/26 Rob Farmer :
>> >> > On Sat, Jan 23, 2010 at 7:54 AM, Attilio Rao  =
wrote:
>> >> >> Author: attilio
>> >> >> Date: Sat Jan 23 15:54:21 2010
>> >> >> New Revision: 202889
>> >> >> URL: http://svn.freebsd.org/changeset/base/202889
>> >> >>
>> >> >> Log:
>> >> >> =C2=A0- Fix a race in sched_switch() of sched_4bsd.
>> >> >> =C2=A0 =C2=A0In the case of the thread being on a sleepqueue or a =
turnstile, the
>> >> >> =C2=A0 =C2=A0sched_lock was acquired (without the aid of the td_lo=
ck interface) and
>> >> >> =C2=A0 =C2=A0the td_lock was dropped. This was going to break lock=
ing rules on other
>> >> >> =C2=A0 =C2=A0threads willing to access to the thread (via the td_l=
ock interface) and
>> >> >> =C2=A0 =C2=A0modify his flags (allowed as long as the container lo=
ck was different
>> >> >> =C2=A0 =C2=A0by the one used in sched_switch).
>> >> >> =C2=A0 =C2=A0In order to prevent this situation, while sched_lock =
is acquired there
>> >> >> =C2=A0 =C2=A0the td_lock gets blocked. [0]
>> >> >> =C2=A0- Merge the ULE's internal function thread_block_switch() in=
to the global
>> >> >> =C2=A0 =C2=A0thread_lock_block() and make the former semantic as t=
he default for
>> >> >> =C2=A0 =C2=A0thread_lock_block(). This means that thread_lock_bloc=
k() will not
>> >> >> =C2=A0 =C2=A0disable interrupts when called (and consequently thre=
ad_unlock_block()
>> >> >> =C2=A0 =C2=A0will not re-enabled them when called). This should be=
 done manually
>> >> >> =C2=A0 =C2=A0when necessary.
>> >> >> =C2=A0 =C2=A0Note, however, that ULE's thread_unblock_switch() is =
not reaped
>> >> >> =C2=A0 =C2=A0because it does reflect a difference in semantic due =
in ULE (the
>> >> >> =C2=A0 =C2=A0td_lock may not be necessarilly still blocked_lock wh=
en calling this).
>> >> >> =C2=A0 =C2=A0While asymmetric, it does describe a remarkable diffe=
rence in semantic
>> >> >> =C2=A0 =C2=A0that is good to keep in mind.
>> >> >>
>> >> >> =C2=A0[0] Reported by: =C2=A0 =C2=A0 =C2=A0Kohji Okuno
>> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0
>> >> >> =C2=A0Tested by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Giovanni=
 Trematerra
>> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0
>> >> >> =C2=A0MFC: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A02 weeks
>> >> >>
>> >> >> Modified:
>> >> >> =C2=A0head/sys/kern/kern_mutex.c
>> >> >> =C2=A0head/sys/kern/sched_4bsd.c
>> >> >> =C2=A0head/sys/kern/sched_ule.c
>> >> >
>> >> > Hi,
>> >> >
>> >> > This commit seems to be causing me a kernel panic on sparc64 - deta=
ils
>> >> > are in PR 143215. Could you take a look before MFCing this?
>> >>
>> >> I think that the bug may be in cpu_switch() where the mutex parameter
>> >> for sched_4bsd is not handled correctly.
>> >> Does sparc64 support ULE? I don't think it does and I think that it
>> >> simply ignores the third argument of cpu_switch() which is vital now
>> >> for for sched_4bsd too (what needs to happen is to take the passed
>> >> mutex and to set the TD_LOCK of old thread to be the third argument).
>> >> Unluckilly, I can't do that in sparc64 asm right now, but it should
>> >> not be too difficult to cope with it.
>> >>
>> >
>> > The following patch adds handling of the mutex parameter to the
>> > sparc64 cpu_switch():
>> > http://people.freebsd.org/~marius/sparc64_cpu_switch_mtx.diff
>> > This patch works fine with r202888. With r202889 it allows the
>> > machine to boot again, however putting some load on the machine
>> > causes it to issue a reset without a chance to debug. I've also
>> > tried with some variations like duplicating the old cpu_switch()
>> > for cpu_throw() so the altered cpu_switch() doesn't need to
>> > distinguish between the to cases and only assigning old->td_lock
>> > right before return but nothing made a difference. Given that
>> > this leaves little room for a bug in the cpu_switch() changes I
>> > suspect r202889 also breaks additional assumptions. For example
>> > the sparc64 pmap code used sched_lock, does that need to change
>> > to be td_lock now maybe? Is there anything else that comes to
>> > your mind in this regard?
>>
>> Sorry for being lame with sparc64 assembly (so that I can't make much
>> more productive help here), but the required patch, sched_4bsd only,
>> should simply save the extra-argument of cpu_switch() (and cpu_throw()
>> is not involved, so I'm not sure what is changing there) and move in
>> TD_LOCK(%oldthreadreg) when it is safe to do (just after the oldthread
>> switched out completely). It doesn't even require a memory barrier.
>> This patch seems a bit too big and I wonder what else it does (or I'm
>> entirely wrong and that's just what I asked here), maybe adding the
>> ULE support as well?
>
> Actually it just adds old->td_lock =3D mtx in a non-atomic fashion
> as soon as we're done with the old thread. It's "big" as I had to
> reshuffle the register usage in order to preserve %i0 (old) and
> %i2 (mtx) and in order to distinguish between cpu_switch() and
> cpu_throw() (no mtx and old maybe be NULL in that case). As it
> turns out it also works just fine, the problems I were seeing
> were due to another change in that tree. Sorry for the noise.
>
> My understanding is that for ULE, mtx should be assigned to
> old->td_lock atomically, is that correct?

More precisely what needs to happen is to use a memory barrier. If you
can emulate that without an atomic instruction (in sparc64) that's
fine as well.

>> Said that, all the code, including MD parts should always use
>> td_lock() and not doing explicit acquisitions/drops of sched_lock, if
>> they want to support ULE (but probabilly even if they do not want),
>> unless there is a big compelling reason (that I expect to be justified
>> in comments at least).
>
> I think the idea behind using sched_lock in the sparc64 code is
> to piggyback on it for protecting the pmap and take advantage of
> the fact that it's held across cpu_switch() anyway. If that's
> correct it should be possible to replace it with a separate
> spinlock dedicated to protecting the pmap or given that due to
> the macro madness involved in mtx_{,un}lock_spin() it's hard to
> properly call these from asm by calling spinlock_{enter,exit}()
> directly.

Even if that is the case there is no reason to not call
thread_lock()/thread_unlock() (which will acquire the correct
sched_lock or do the handover in the sched_4bsd in the right way) and
keep an unified spinlock in order to keep cpu_switch() simple and
still offering pmap protection over context switches.

Attilio


--=20
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:28:14 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A0B77106566C;
	Sat, 30 Jan 2010 15:28:14 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8E54F8FC14;
	Sat, 30 Jan 2010 15:28:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UFSEtS031811;
	Sat, 30 Jan 2010 15:28:14 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UFSEgl031809;
	Sat, 30 Jan 2010 15:28:14 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301528.o0UFSEgl031809@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 15:28:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203195 - stable/8/sys/modules
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:28:14 -0000

Author: antoine
Date: Sat Jan 30 15:28:14 2010
New Revision: 203195
URL: http://svn.freebsd.org/changeset/base/203195

Log:
  MFC r202448 to stable/8:
    Do not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf
    Submitted by:	bf

Modified:
  stable/8/sys/modules/Makefile
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/modules/Makefile
==============================================================================
--- stable/8/sys/modules/Makefile	Sat Jan 30 15:00:33 2010	(r203194)
+++ stable/8/sys/modules/Makefile	Sat Jan 30 15:28:14 2010	(r203195)
@@ -191,7 +191,7 @@ SUBDIR=	${_3dfx} \
 	${_ncp} \
 	${_ncv} \
 	${_ndis} \
-	netgraph \
+	${_netgraph} \
 	${_nfe} \
 	nfscl \
 	nfsclient \
@@ -324,6 +324,10 @@ _random=	random
 _ipfilter=	ipfilter
 .endif
 
+.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
+_netgraph=	netgraph
+.endif
+
 .if ${MK_PF} != "no" || defined(ALL_MODULES)
 _pf=		pf
 _pflog=		pflog

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:40:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04FDD106566B;
	Sat, 30 Jan 2010 15:40:01 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E63778FC13;
	Sat, 30 Jan 2010 15:40:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UFe0da034414;
	Sat, 30 Jan 2010 15:40:00 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UFe03T034411;
	Sat, 30 Jan 2010 15:40:00 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301540.o0UFe03T034411@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 15:40:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203196 - in stable/8: share/mk usr.sbin/ppp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:40:01 -0000

Author: antoine
Date: Sat Jan 30 15:40:00 2010
New Revision: 203196
URL: http://svn.freebsd.org/changeset/base/203196

Log:
  MFC r202440 to stable/8:
    Unbreak world WITHOUT_NETGRAPH.
  
    PR:		137487
    Submitted by:	bf (previous version)
    No objections:	net@

Modified:
  stable/8/share/mk/bsd.own.mk
  stable/8/usr.sbin/ppp/Makefile
Directory Properties:
  stable/8/share/mk/   (props changed)
  stable/8/usr.sbin/ppp/   (props changed)

Modified: stable/8/share/mk/bsd.own.mk
==============================================================================
--- stable/8/share/mk/bsd.own.mk	Sat Jan 30 15:28:14 2010	(r203195)
+++ stable/8/share/mk/bsd.own.mk	Sat Jan 30 15:40:00 2010	(r203196)
@@ -468,6 +468,11 @@ MK_MAILWRAPPER:= no
 MK_SENDMAIL:=	no
 .endif
 
+.if ${MK_NETGRAPH} == "no"
+MK_ATM:=	no
+MK_BLUETOOTH:=	no
+.endif
+
 .if ${MK_OPENSSL} == "no"
 MK_OPENSSH:=	no
 MK_KERBEROS:=	no

Modified: stable/8/usr.sbin/ppp/Makefile
==============================================================================
--- stable/8/usr.sbin/ppp/Makefile	Sat Jan 30 15:28:14 2010	(r203195)
+++ stable/8/usr.sbin/ppp/Makefile	Sat Jan 30 15:40:00 2010	(r203196)
@@ -25,6 +25,9 @@ PPP_NO_SUID=
 .if ${MK_ATM} == "no"
 PPP_NO_ATM=
 .endif
+.if ${MK_NETGRAPH} == "no"
+PPP_NO_NETGRAPH=
+.endif
 .if ${MK_PAM_SUPPORT} == "no"
 PPP_NO_PAM=
 .endif

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:42:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB3B41065676;
	Sat, 30 Jan 2010 15:42:06 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 970408FC14;
	Sat, 30 Jan 2010 15:42:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UFg6Yv034916;
	Sat, 30 Jan 2010 15:42:06 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UFg654034914;
	Sat, 30 Jan 2010 15:42:06 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301542.o0UFg654034914@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 15:42:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203197 - stable/8/share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:42:06 -0000

Author: antoine
Date: Sat Jan 30 15:42:06 2010
New Revision: 203197
URL: http://svn.freebsd.org/changeset/base/203197

Log:
  Regenerate.

Modified:
  stable/8/share/man/man5/src.conf.5

Modified: stable/8/share/man/man5/src.conf.5
==============================================================================
--- stable/8/share/man/man5/src.conf.5	Sat Jan 30 15:40:00 2010	(r203196)
+++ stable/8/share/man/man5/src.conf.5	Sat Jan 30 15:42:06 2010	(r203197)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm
+.\" from FreeBSD: stable/8/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm
 .\" $FreeBSD$
-.Dd June  1, 2009
+.Dd January 30, 2010
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -78,51 +78,51 @@ The following list provides a name and s
 that can be used for source builds.
 .Bl -tag -width indent
 .It Va WITHOUT_ACCT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ACCT 183242 2008-09-21 22:02:26Z sam
 Set to not build process accounting tools such as
 .Xr ac 8 
 and
 .Xr accton 8 .
 .It Va WITHOUT_ACPI
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr acpiconf 8 ,
 .Xr acpidump 8
 and related programs.
 .It Va WITHOUT_AMD
-.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr amd 8 ,
 and related programs.
 .It Va WITHOUT_APM
-.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr apm 8 ,
 .Xr apmd 8
 and related programs.
 .It Va WITHOUT_ASSERT_DEBUG
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru
 Set to compile programs and libraries without the
 .Xr assert 3
 checks.
 .It Va WITHOUT_AT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr at 1
 and related utilities.
 .It Va WITHOUT_ATM
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru
 Set to not build
 programs and libraries related to ATM networking.
 .It Va WITHOUT_AUDIT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru
 Set to not build audit support into system programs.
 .It Va WITHOUT_AUTHPF
-.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr authpf 8 .
 .It Va WITHOUT_BIND
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND 156932 2006-03-21 07:50:50Z ru
 Setting this variable will prevent any part of BIND from being built.
 When set, it also enforces the following options:
 .Pp
@@ -141,31 +141,31 @@ When set, it also enforces the following
 .Va WITHOUT_BIND_UTILS
 .El
 .It Va WITHOUT_BIND_DNSSEC
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_DNSSEC 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND_DNSSEC 156932 2006-03-21 07:50:50Z ru
 Set to avoid building or installing the DNSSEC related binaries,
 .Xr dnssec-keygen 8
 and
 .Xr dnssec-signzone 8 .
 .It Va WITHOUT_BIND_ETC
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_ETC 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND_ETC 156932 2006-03-21 07:50:50Z ru
 Set to avoid installing the default files to
 .Pa /var/named/etc/namedb .
 .It Va WITH_BIND_IDN
-.\" from FreeBSD: head/tools/build/options/WITH_BIND_IDN 193280 2009-06-01 21:58:59Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITH_BIND_IDN 193280 2009-06-01 21:58:59Z dougb
 Set to enable IDN support for dig, host, and nslookup.
 This requires ports/dns/idnkit to be installed in /usr/local.
 .It Va WITH_BIND_LARGE_FILE
-.\" from FreeBSD: head/tools/build/options/WITH_BIND_LARGE_FILE 193280 2009-06-01 21:58:59Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITH_BIND_LARGE_FILE 193280 2009-06-01 21:58:59Z dougb
 Set to enable 64-bit file support.
 .It Va WITH_BIND_LIBS
-.\" from FreeBSD: head/tools/build/options/WITH_BIND_LIBS 193280 2009-06-01 21:58:59Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITH_BIND_LIBS 193280 2009-06-01 21:58:59Z dougb
 Set to install BIND libraries and include files.
 .It Va WITHOUT_BIND_LIBS_LWRES
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_LIBS_LWRES 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND_LIBS_LWRES 156932 2006-03-21 07:50:50Z ru
 Set to avoid installing the lightweight resolver library in
 .Pa /usr/lib .
 .It Va WITHOUT_BIND_MTREE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_MTREE 157717 2006-04-13 10:37:29Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND_MTREE 157717 2006-04-13 10:37:29Z ru
 Set to avoid running
 .Xr mtree 8
 to create the chroot directory structure under
@@ -180,7 +180,7 @@ When set, it also enforces the following
 .Va WITHOUT_BIND_ETC
 .El
 .It Va WITHOUT_BIND_NAMED
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_NAMED 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND_NAMED 156932 2006-03-21 07:50:50Z ru
 Set to avoid building or installing
 .Xr named 8 ,
 .Xr named.reload 8 ,
@@ -190,10 +190,10 @@ Set to avoid building or installing
 and
 .Xr rndc-confgen 8 .
 .It Va WITH_BIND_SIGCHASE
-.\" from FreeBSD: head/tools/build/options/WITH_BIND_SIGCHASE 193280 2009-06-01 21:58:59Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITH_BIND_SIGCHASE 193280 2009-06-01 21:58:59Z dougb
 Set to enable DNSSEC validation support for dig, host, and nslookup.
 .It Va WITHOUT_BIND_UTILS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_UTILS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BIND_UTILS 156932 2006-03-21 07:50:50Z ru
 Set to avoid building or installing the BIND userland utilities,
 .Xr dig 1 ,
 .Xr host 1 ,
@@ -201,26 +201,26 @@ Set to avoid building or installing the 
 and
 .Xr nsupdate 8 .
 .It Va WITH_BIND_XML
-.\" from FreeBSD: head/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb
 Set to enable the http statistics interface for named.
 This requires ports/textproc/libxml2 to be installed in /usr/local.
 .It Va WITHOUT_BLUETOOTH
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru
 Set to not build Bluetooth related kernel modules, programs and libraries.
 .It Va WITHOUT_BOOT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru
 Set to not build the boot blocks and loader.
 .It Va WITHOUT_BSD_CPIO
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb
 Set to not build the BSD licensed version of cpio based on
 .Xr libarchive 3 .
 .It Va WITHOUT_BSNMP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam
 Set to not build or install
 .Xr bsnmpd 1
 and related libraries and data files.
 .It Va WITHOUT_BZIP2
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru
 Set to not build contributed bzip2 software as a part of the base system.
 .Bf -symbolic
 The option has no effect yet.
@@ -232,14 +232,14 @@ When set, it also enforces the following
 .Va WITHOUT_BZIP2_SUPPORT
 .El
 .It Va WITHOUT_BZIP2_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij
 Set to build some programs without optional bzip2 support.
 .It Va WITHOUT_CALENDAR
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr calendar 1 .
 .It Va WITHOUT_CDDL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb
 Set to not build code licensed under Sun's CDDL.
 When set, it also enforces the following options:
 .Pp
@@ -248,11 +248,11 @@ When set, it also enforces the following
 .Va WITHOUT_ZFS
 .El
 .It Va WITHOUT_CPP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr cpp 1 .
 .It Va WITHOUT_CRYPT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru
 Set to not build any crypto code.
 When set, it also enforces the following options:
 .Pp
@@ -271,62 +271,62 @@ When set, it also enforces the following
 .Va WITHOUT_OPENSSL
 .El
 .It Va WITHOUT_CTM
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr ctm 1
 and related utilities.
 .It Va WITHOUT_CVS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru
 Set to not build CVS.
 .It Va WITHOUT_CXX
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_CXX 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr g++ 1
 and related libraries.
 .It Va WITHOUT_DICT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru
 Set to not build the Webster dictionary files.
 .It Va WITHOUT_DYNAMICROOT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru
 Set this if you do not want to link
 .Pa /bin
 and
 .Pa /sbin
 dynamically.
 .It Va WITHOUT_EXAMPLES
-.\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru
 Set to avoid installing examples to
 .Pa /usr/share/examples/ .
 .It Va WITHOUT_FLOPPY
-.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 183306 2008-09-23 16:15:42Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_FLOPPY 183306 2008-09-23 16:15:42Z sam
 Set to not build or install programs 
 for operating floppy disk driver.
 .It Va WITHOUT_FORTH
-.\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru
 Set to build bootloaders without Forth support.
 .It Va WITHOUT_FP_LIBC
-.\" from FreeBSD: head/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru
 Set to build
 .Nm libc
 without floating-point support.
 .It Va WITHOUT_FREEBSD_UPDATE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr freebsd-update 8 .
 .It Va WITHOUT_GAMES
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru
 Set to not build games.
 .It Va WITHOUT_GCOV
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru
 Set to not build the
 .Xr gcov 1
 tool.
 .It Va WITHOUT_GDB
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr gdb 1 .
 .It Va WITHOUT_GNU
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru
 Set to not build contributed GNU software as a part of the base system.
 This option can be useful if the system built must not contain any code
 covered by the GNU Public License due to legal reasons.
@@ -340,43 +340,43 @@ When set, it also enforces the following
 .Va WITHOUT_GNU_SUPPORT
 .El
 .It Va WITH_GNU_CPIO
-.\" from FreeBSD: head/tools/build/options/WITH_GNU_CPIO 179813 2008-06-16 05:48:15Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITH_GNU_CPIO 179813 2008-06-16 05:48:15Z dougb
 Set to build GNU cpio as a part of the base system,
 and symlink
 .Pa /usr/bin/cpio
 to this version.
 (This will override the symlink to the BSD version.)
 .It Va WITHOUT_GNU_GREP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP 179813 2008-06-16 05:48:15Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GNU_GREP 179813 2008-06-16 05:48:15Z dougb
 Set to not build GNU grep as a part of the base system.
 .It Va WITHOUT_GNU_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build some programs without optional GNU support.
 .It Va WITHOUT_GPIB
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru
 Set to not build GPIB bus support.
 .It Va WITHOUT_GROFF
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GROFF 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr groff 1 .
 .It Va WITHOUT_GSSAPI
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru
 Set to not build libgssapi.
 .It Va WITH_HESIOD
-.\" from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru
 Set to build Hesiod support.
 .It Va WITHOUT_HTML
-.\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru
 Set to not build HTML docs.
 .It Va WITH_IDEA
-.\" from FreeBSD: head/tools/build/options/WITH_IDEA 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITH_IDEA 156932 2006-03-21 07:50:50Z ru
 Set to build the IDEA encryption code.
 This code is patented in the USA and many European countries.
 It is
 .Em "YOUR RESPONSIBILITY"
 to determine if you can legally use IDEA.
 .It Va WITHOUT_INET6
-.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru
 Set to not build
 programs and libraries related to IPv6 networking.
 When set, it also enforces the following options:
@@ -386,27 +386,27 @@ When set, it also enforces the following
 .Va WITHOUT_INET6_SUPPORT
 .El
 .It Va WITHOUT_INET6_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build libraries, programs, and kernel modules without IPv6 support.
 .It Va WITHOUT_INFO
-.\" from FreeBSD: head/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru
 Set to not make or install
 .Xr info 5
 files.
 .It Va WITHOUT_INSTALLLIB
-.\" from FreeBSD: head/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_INSTALLLIB 174497 2007-12-09 21:56:21Z dougb
 Set this if you do not want to install optional libraries.
 For example when creating a
 .Xr nanobsd 8
 image.
 .It Va WITHOUT_IPFILTER
-.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru
 Set to not build IP Filter package.
 .It Va WITHOUT_IPFW
-.\" from FreeBSD: head/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam
 Set to not build IPFW tools.
 .It Va WITHOUT_IPX
-.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_IPX 156932 2006-03-21 07:50:50Z ru
 Set to not build programs and libraries related to IPX networking.
 When set, it also enforces the following options:
 .Pp
@@ -417,14 +417,14 @@ When set, it also enforces the following
 .Va WITHOUT_NCP
 .El
 .It Va WITHOUT_IPX_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build some programs without IPX support.
 .It Va WITHOUT_JAIL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam
 Set to not build tools for the support of jails; e.g.
 .Xr jail 8 .
 .It Va WITHOUT_KERBEROS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru
 Set this if you do not want to build Kerberos 5 (KTH Heimdal).
 When set, it also enforces the following options:
 .Pp
@@ -437,7 +437,7 @@ When set, it also enforces the following
 .Va WITHOUT_KERBEROS_SUPPORT
 .El
 .It Va WITHOUT_KERBEROS_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build some programs without Kerberos support, like
 .Xr cvs 1 ,
 .Xr ssh 1 ,
@@ -446,7 +446,7 @@ Set to build some programs without Kerbe
 and
 .Xr telnetd 8 .
 .It Va WITHOUT_KVM
-.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru
 Set to not build the
 .Nm libkvm
 library as a part of the base system.
@@ -460,23 +460,23 @@ When set, it also enforces the following
 .Va WITHOUT_KVM_SUPPORT
 .El
 .It Va WITHOUT_KVM_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin
 Set to build some programs without optional
 .Nm libkvm
 support.
 .It Va WITHOUT_LEGACY_CONSOLE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LEGACY_CONSOLE 183242 2008-09-21 22:02:26Z sam
 Set to not build programs that support a legacy PC console; e.g.
 .Xr kbdcontrol 8
 and
 .Xr vidcontrol 8 .
 .It Va WITHOUT_LIB32
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru
 On amd64, set to not build 32-bit library set and a
 .Nm ld-elf32.so.1
 runtime linker.
 .It Va WITHOUT_LIBPTHREAD
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm
 Set to not build the
 .Nm libpthread
 providing library,
@@ -502,7 +502,7 @@ When set, it also enforces the following
 .Va WITHOUT_LIBTHR
 .El
 .It Va WITHOUT_LIBTHR
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru
 Set to not build the
 .Nm libthr
 (1:1 threading)
@@ -526,21 +526,21 @@ When set, it also enforces the following
 .Va WITHOUT_BIND_UTILS
 .El
 .It Va WITHOUT_LOCALES
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru
 Set to not build localization files; see
 .Xr locale 1 .
 .It Va WITHOUT_LOCATE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr locate 1
 and related programs.
 .It Va WITHOUT_LPR
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr lpr 1
 and related programs.
 .It Va WITHOUT_MAIL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam
 Set to not build any mail support (MUA or MTA).
 When set, it also enforces the following options:
 .Pp
@@ -551,46 +551,50 @@ When set, it also enforces the following
 .Va WITHOUT_SENDMAIL
 .El
 .It Va WITHOUT_MAILWRAPPER
-.\" from FreeBSD: head/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru
 Set to not build the
 .Xr mailwrapper 8
 MTA selector.
 .It Va WITHOUT_MAKE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam
 Set to not install
 .Xr make 1
 and related support files.
 .It Va WITHOUT_MAN
-.\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru
 Set to not build manual pages.
 .It Va WITHOUT_NCP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NCP 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NCP 156932 2006-03-21 07:50:50Z ru
 Set to not build programs, libraries, and kernel modules
 related to NetWare Core protocol.
 .It Va WITHOUT_NDIS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam
 Set to not build programs and libraries
 related to NDIS emulation support.
 .It Va WITHOUT_NETCAT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr nc 1
 utility.
 .It Va WITHOUT_NETGRAPH
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam
 Set to not build applications to support
 .Xr netgraph 4 .
 When set, it also enforces the following options:
 .Pp
 .Bl -item -compact
 .It
+.Va WITHOUT_ATM
+.It
+.Va WITHOUT_BLUETOOTH
+.It
 .Va WITHOUT_NETGRAPH_SUPPORT
 .El
 .It Va WITHOUT_NETGRAPH_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam
 Set to build libraries, programs, and kernel modules without netgraph support.
 .It Va WITHOUT_NIS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr NIS 8
 support and related programs.
@@ -600,14 +604,14 @@ and remove
 .Sq nis
 entries.
 .It Va WITHOUT_NLS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru
 Set to not build NLS catalogs.
 .It Va WITHOUT_NLS_CATALOGS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru
 Set to not build NLS catalog support for
 .Xr csh 1 .
 .It Va WITHOUT_NS_CACHING
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru
 Set to disable name caching in the
 .Pa nsswitch
 subsystem.
@@ -615,18 +619,18 @@ The generic caching daemon,
 .Xr nscd 8 ,
 will not be built either if this option is set.
 .It Va WITHOUT_NTP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr ntpd 8
 and related programs.
 .It Va WITHOUT_OBJC
-.\" from FreeBSD: head/tools/build/options/WITHOUT_OBJC 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OBJC 156932 2006-03-21 07:50:50Z ru
 Set to not build Objective C support.
 .It Va WITHOUT_OPENSSH
-.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru
 Set to not build OpenSSH.
 .It Va WITHOUT_OPENSSL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru
 Set to not build OpenSSL.
 When set, it also enforces the following options:
 .Pp
@@ -643,7 +647,7 @@ When set, it also enforces the following
 .Va WITHOUT_OPENSSH
 .El
 .It Va WITHOUT_PAM
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru
 Set to not build PAM library and modules.
 .Bf -symbolic
 This option is deprecated and does nothing.
@@ -655,13 +659,13 @@ When set, it also enforces the following
 .Va WITHOUT_PAM_SUPPORT
 .El
 .It Va WITHOUT_PAM_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build some programs without PAM support, particularly
 .Xr ftpd 8
 and
 .Xr ppp 8 .
 .It Va WITHOUT_PF
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru
 Set to not build PF firewall package.
 When set, it also enforces the following options:
 .Pp
@@ -670,35 +674,35 @@ When set, it also enforces the following
 .Va WITHOUT_AUTHPF
 .El
 .It Va WITHOUT_PKGTOOLS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr pkg_add 8
 and related programs.
 .It Va WITHOUT_PMC
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr pmccontrol 8
 and related programs.
 .It Va WITHOUT_PORTSNAP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam
 Set to not build or install
 .Xr portsnap 8
 and related files.
 .It Va WITHOUT_PPP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr ppp 8
 and related programs.
 .It Va WITHOUT_PROFILE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PROFILE 156932 2006-03-21 07:50:50Z ru
 Set to avoid compiling profiled libraries.
 .It Va WITHOUT_QUOTAS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr quota 8
 and related programs.
 .It Va WITHOUT_RCMDS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru
 Disable building of the
 .Bx
 r-commands.
@@ -707,63 +711,63 @@ This includes
 .Xr rsh 1 ,
 etc.
 .It Va WITHOUT_RCS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_RCS 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr rcs 1
 and related utilities.
 .It Va WITHOUT_RESCUE
-.\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr rescue 8 .
 .It Va WITHOUT_ROUTED
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr routed 8
 utility.
 .It Va WITHOUT_SENDMAIL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr sendmail 8
 and related programs.
 .It Va WITHOUT_SETUID_LOGIN
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SETUID_LOGIN 156932 2006-03-21 07:50:50Z ru
 Set this to disable the installation of
 .Xr login 1
 as a set-user-ID root program.
 .It Va WITHOUT_SHAREDOCS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SHAREDOCS 156932 2006-03-21 07:50:50Z ru
 Set to not build the
 .Bx 4.4
 legacy docs.
 .It Va WITHOUT_SSP
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru
 Set to not build world with propolice stack smashing protection.
 .It Va WITHOUT_SYMVER
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen
 Set to disable symbol versioning when building shared libraries.
 .It Va WITHOUT_SYSCONS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru
 Set to not build
 .Xr syscons 4
 support files such as keyboard maps, fonts, and screen output maps.
 .It Va WITHOUT_SYSINSTALL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr sysinstall 8
 and related programs.
 .It Va WITHOUT_TCSH
-.\" from FreeBSD: head/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru
 Set to not build and install
 .Pa /bin/csh
 (which is
 .Xr tcsh 1 ) .
 .It Va WITHOUT_TELNET
-.\" from FreeBSD: head/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam
 Set to not build
 .Xr telnet 8
 and related programs.
 .It Va WITHOUT_TEXTPROC
-.\" from FreeBSD: head/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam
 Set to not build
 programs used for text processing.
 When set, it also enforces the following options:
@@ -773,7 +777,7 @@ When set, it also enforces the following
 .Va WITHOUT_GROFF
 .El
 .It Va WITHOUT_TOOLCHAIN
-.\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru
 Set to not install
 programs used for program development,
 compilers, debuggers etc.
@@ -787,10 +791,10 @@ When set, it also enforces the following
 .Va WITHOUT_GDB
 .El
 .It Va WITHOUT_USB
-.\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru
 Set to not build USB-related programs and libraries.
 .It Va WITHOUT_WIRELESS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam
 Set to not build programs used for 802.11 wireless networks; especially
 .Xr wpa_supplicant 8
 and
@@ -802,21 +806,21 @@ When set, it also enforces the following
 .Va WITHOUT_WIRELESS_SUPPORT
 .El
 .It Va WITHOUT_WIRELESS_SUPPORT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_WIRELESS_SUPPORT 183305 2008-09-23 16:11:15Z sam
 Set to build libraries, programs, and kernel modules without
 802.11 wireless support.
 .It Va WITHOUT_WPA_SUPPLICANT_EAPOL
-.\" from FreeBSD: head/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_WPA_SUPPLICANT_EAPOL 156932 2006-03-21 07:50:50Z ru
 Build
 .Xr wpa_supplicant 8
 without support for the IEEE 802.1X protocol and without
 support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS
 protocols (usable only via 802.1X).
 .It Va WITHOUT_ZFS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd
 Set to not build ZFS file system.
 .It Va WITHOUT_ZONEINFO
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko
 Set to not build the timezone database
 .El
 .Sh FILES

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:50:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 986BC1065672;
	Sat, 30 Jan 2010 15:50:01 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 85AFF8FC12;
	Sat, 30 Jan 2010 15:50:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UFo1F0036803;
	Sat, 30 Jan 2010 15:50:01 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UFo1Uh036797;
	Sat, 30 Jan 2010 15:50:01 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301550.o0UFo1Uh036797@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 15:50:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203198 - stable/8/bin/setfacl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:50:01 -0000

Author: trasz
Date: Sat Jan 30 15:50:01 2010
New Revision: 203198
URL: http://svn.freebsd.org/changeset/base/203198

Log:
  MFC r201016:
  
  Improve ACL branding mismatch detection and reporting in some rare cases,
  such as "setfacl -m ''".

Modified:
  stable/8/bin/setfacl/merge.c
  stable/8/bin/setfacl/remove.c
  stable/8/bin/setfacl/setfacl.h
  stable/8/bin/setfacl/util.c
Directory Properties:
  stable/8/bin/setfacl/   (props changed)

Modified: stable/8/bin/setfacl/merge.c
==============================================================================
--- stable/8/bin/setfacl/merge.c	Sat Jan 30 15:42:06 2010	(r203197)
+++ stable/8/bin/setfacl/merge.c	Sat Jan 30 15:50:01 2010	(r203198)
@@ -100,11 +100,10 @@ merge_acl(acl_t acl, acl_t *prev_acl, co
 	acl_get_brand_np(acl, &acl_brand);
 	acl_get_brand_np(*prev_acl, &prev_acl_brand);
 
-	if (acl_brand != prev_acl_brand) {
+	if (branding_mismatch(acl_brand, prev_acl_brand)) {
 		warnx("%s: branding mismatch; existing ACL is %s, "
 		    "entry to be merged is %s", filename,
-		    prev_acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e",
-		    acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e");
+		    brand_name(prev_acl_brand), brand_name(acl_brand));
 		return (-1);
 	}
 
@@ -252,9 +251,10 @@ add_acl(acl_t acl, uint entry_number, ac
 		return (-1);
 	}
 
-	if (acl_brand != ACL_BRAND_NFS4) {
+	if (branding_mismatch(acl_brand, ACL_BRAND_NFS4)) {
 		warnx("%s: branding mismatch; existing ACL is NFSv4, "
-		    "entry to be added is POSIX.1e", filename);
+		    "entry to be added is %s", filename,
+		    brand_name(acl_brand));
 		return (-1);
 	}
 

Modified: stable/8/bin/setfacl/remove.c
==============================================================================
--- stable/8/bin/setfacl/remove.c	Sat Jan 30 15:42:06 2010	(r203197)
+++ stable/8/bin/setfacl/remove.c	Sat Jan 30 15:50:01 2010	(r203198)
@@ -53,11 +53,10 @@ remove_acl(acl_t acl, acl_t *prev_acl, c
 	acl_get_brand_np(acl, &acl_brand);
 	acl_get_brand_np(*prev_acl, &prev_acl_brand);
 
-	if (acl_brand != prev_acl_brand) {
+	if (branding_mismatch(acl_brand, prev_acl_brand)) {
 		warnx("%s: branding mismatch; existing ACL is %s, "
 		    "entry to be removed is %s", filename,
-		    prev_acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e",
-		    acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e");
+		    brand_name(prev_acl_brand), brand_name(acl_brand));
 		return (-1);
 	}
 

Modified: stable/8/bin/setfacl/setfacl.h
==============================================================================
--- stable/8/bin/setfacl/setfacl.h	Sat Jan 30 15:42:06 2010	(r203197)
+++ stable/8/bin/setfacl/setfacl.h	Sat Jan 30 15:50:01 2010	(r203198)
@@ -71,6 +71,8 @@ void   remove_ext(acl_t *prev_acl, const
 int    set_acl_mask(acl_t *prev_acl, const char *filename);
 /* util.c */
 void  *zmalloc(size_t size);
+const char *brand_name(int brand);
+int    branding_mismatch(int brand1, int brand2);
 
 uint       have_mask;
 uint       need_mask;

Modified: stable/8/bin/setfacl/util.c
==============================================================================
--- stable/8/bin/setfacl/util.c	Sat Jan 30 15:42:06 2010	(r203197)
+++ stable/8/bin/setfacl/util.c	Sat Jan 30 15:50:01 2010	(r203198)
@@ -43,3 +43,26 @@ zmalloc(size_t size)
 		err(1, "calloc() failed");
 	return (ptr);
 }
+
+const char *
+brand_name(int brand)
+{
+	switch (brand) {
+	case ACL_BRAND_NFS4:
+		return "NFSv4";
+	case ACL_BRAND_POSIX:
+		return "POSIX.1e";
+	default:
+		return "unknown";
+	}
+}
+
+int
+branding_mismatch(int brand1, int brand2)
+{
+	if (brand1 == ACL_BRAND_UNKNOWN || brand2 == ACL_BRAND_UNKNOWN)
+		return (0);
+	if (brand1 != brand2)
+		return (1);
+	return (1);
+}

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 15:53:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B295F106568D;
	Sat, 30 Jan 2010 15:53:32 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A04568FC18;
	Sat, 30 Jan 2010 15:53:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UFrWWQ037620;
	Sat, 30 Jan 2010 15:53:32 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UFrWp1037618;
	Sat, 30 Jan 2010 15:53:32 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201001301553.o0UFrWp1037618@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Sat, 30 Jan 2010 15:53:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203199 - stable/8/bin/setfacl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 15:53:32 -0000

Author: trasz
Date: Sat Jan 30 15:53:32 2010
New Revision: 203199
URL: http://svn.freebsd.org/changeset/base/203199

Log:
  MFC r201018:
  
  Fix breakage introduced in last commit.

Modified:
  stable/8/bin/setfacl/util.c
Directory Properties:
  stable/8/bin/setfacl/   (props changed)

Modified: stable/8/bin/setfacl/util.c
==============================================================================
--- stable/8/bin/setfacl/util.c	Sat Jan 30 15:50:01 2010	(r203198)
+++ stable/8/bin/setfacl/util.c	Sat Jan 30 15:53:32 2010	(r203199)
@@ -64,5 +64,5 @@ branding_mismatch(int brand1, int brand2
 		return (0);
 	if (brand1 != brand2)
 		return (1);
-	return (1);
+	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 16:12:33 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99D46106568D;
	Sat, 30 Jan 2010 16:12:33 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au
	[211.29.132.189])
	by mx1.freebsd.org (Postfix) with ESMTP id 17C368FC1A;
	Sat, 30 Jan 2010 16:12:32 +0000 (UTC)
Received: from besplex.bde.org (c122-106-174-165.carlnfd1.nsw.optusnet.com.au
	[122.106.174.165])
	by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o0UGCSwj004060
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sun, 31 Jan 2010 03:12:29 +1100
Date: Sun, 31 Jan 2010 03:12:28 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Gabor Kovesdan 
In-Reply-To: <201001291833.o0TIXxmI041506@svn.freebsd.org>
Message-ID: <20100131031214.A1511@besplex.bde.org>
References: <201001291833.o0TIXxmI041506@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r203174 - head/lib/libc/nls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 16:12:33 -0000

On Fri, 29 Jan 2010, Gabor Kovesdan wrote:

> Log:
>  - Fix some style(9) bugs
>
>  Pointed out by:	bde

Thanks.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 16:34:52 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7FC35106566C;
	Sat, 30 Jan 2010 16:34:52 +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 6EA968FC12;
	Sat, 30 Jan 2010 16:34:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UGYqL5046691;
	Sat, 30 Jan 2010 16:34:52 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UGYqhS046689;
	Sat, 30 Jan 2010 16:34:52 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <201001301634.o0UGYqhS046689@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Sat, 30 Jan 2010 16:34:52 +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: r203200 - head/etc/rc.d
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 16:34:52 -0000

Author: ume
Date: Sat Jan 30 16:34:52 2010
New Revision: 203200
URL: http://svn.freebsd.org/changeset/base/203200

Log:
  Allow use of -6 option to "server" and "peer" in ntp.conf.
  
  MFC after:	1 week

Modified:
  head/etc/rc.d/ntpdate

Modified: head/etc/rc.d/ntpdate
==============================================================================
--- head/etc/rc.d/ntpdate	Sat Jan 30 15:53:32 2010	(r203199)
+++ head/etc/rc.d/ntpdate	Sat Jan 30 16:34:52 2010	(r203200)
@@ -19,7 +19,9 @@ ntpdate_start()
 	if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then
 		ntpdate_hosts=`awk '
 			/^server[ \t]*127.127/      {next}
-			/^(server|peer)/            {print $2}
+			/^(server|peer)/            {
+			    if ($2 ~/^-/)           {print $3}
+			    else                    {print $2}}
 		' < ${ntpdate_config}`
 	fi
 	if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 16:41:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 81E331065692;
	Sat, 30 Jan 2010 16:41:47 +0000 (UTC)
	(envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A1568FC19;
	Sat, 30 Jan 2010 16:41:46 +0000 (UTC)
Received: from alchemy.franken.de (localhost [127.0.0.1])
	by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id
	o0UGfjI9000320; Sat, 30 Jan 2010 17:41:45 +0100 (CET)
	(envelope-from marius@alchemy.franken.de)
Received: (from marius@localhost)
	by alchemy.franken.de (8.14.3/8.14.3/Submit) id o0UGfjMY000319;
	Sat, 30 Jan 2010 17:41:45 +0100 (CET) (envelope-from marius)
Date: Sat, 30 Jan 2010 17:41:45 +0100
From: Marius Strobl 
To: Attilio Rao 
Message-ID: <20100130164145.GB77522@alchemy.franken.de>
References: <201001231554.o0NFsMbx049837@svn.freebsd.org>
	
	<3bbf2fe11001252310r408a6be4j9bc42618394b3e3d@mail.gmail.com>
	<20100127215904.GF40779@alchemy.franken.de>
	<3bbf2fe11001280216p705ed94ev61abc4be654f8cc1@mail.gmail.com>
	<20100130144036.GA77522@alchemy.franken.de>
	<3bbf2fe11001300722v7dc4e53cvc94cddd60997c79b@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3bbf2fe11001300722v7dc4e53cvc94cddd60997c79b@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Rob Farmer , src-committers@freebsd.org
Subject: Re: svn commit: r202889 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 16:41:47 -0000

On Sat, Jan 30, 2010 at 04:22:47PM +0100, Attilio Rao wrote:
> 2010/1/30 Marius Strobl :
> >
> > I think the idea behind using sched_lock in the sparc64 code is
> > to piggyback on it for protecting the pmap and take advantage of
> > the fact that it's held across cpu_switch() anyway. If that's
> > correct it should be possible to replace it with a separate
> > spinlock dedicated to protecting the pmap or given that due to
> > the macro madness involved in mtx_{,un}lock_spin() it's hard to
> > properly call these from asm by calling spinlock_{enter,exit}()
> > directly.
> 
> Even if that is the case there is no reason to not call
> thread_lock()/thread_unlock() (which will acquire the correct
> sched_lock or do the handover in the sched_4bsd in the right way) and
> keep an unified spinlock in order to keep cpu_switch() simple and
> still offering pmap protection over context switches.
> 

It's not clear to me what threads to use in order to get this
to work the right way, for pmap_release() I'd use curthread and
for pmap_activate() I'd just pass td on to thread_{,un}lock()?
Whould the general approach of using thread_{,un}lock() for pmap
protection also do the right thing in case of ULE?

Marius


From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 18:17:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 756DF1065676;
	Sat, 30 Jan 2010 18:17:43 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 64C888FC12;
	Sat, 30 Jan 2010 18:17:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UIHhNV069460;
	Sat, 30 Jan 2010 18:17:43 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UIHh2K069457;
	Sat, 30 Jan 2010 18:17:43 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201001301817.o0UIHh2K069457@svn.freebsd.org>
From: Alan Cox 
Date: Sat, 30 Jan 2010 18:17:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203208 - in stable/7/sys/i386: i386 include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 18:17:43 -0000

Author: alc
Date: Sat Jan 30 18:17:43 2010
New Revision: 203208
URL: http://svn.freebsd.org/changeset/base/203208

Log:
  MFC r202894
    Handle a race between pmap_kextract() and pmap_promote_pde().
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/i386/i386/pmap.c
  stable/7/sys/i386/include/pmap.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/i386/i386/pmap.c
==============================================================================
--- stable/7/sys/i386/i386/pmap.c	Sat Jan 30 18:16:57 2010	(r203207)
+++ stable/7/sys/i386/i386/pmap.c	Sat Jan 30 18:17:43 2010	(r203208)
@@ -241,8 +241,9 @@ struct sysmaps {
 	caddr_t	CADDR2;
 };
 static struct sysmaps sysmaps_pcpu[MAXCPU];
-pt_entry_t *CMAP1 = 0;
+pt_entry_t *CMAP1 = 0, *KPTmap;
 static pt_entry_t *CMAP3;
+static pd_entry_t *KPTD;
 caddr_t CADDR1 = 0, ptvmmap = 0;
 static caddr_t CADDR3;
 struct msgbuf *msgbufp = 0;
@@ -437,6 +438,21 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 	SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE)))
 
 	/*
+	 * KPTmap is used by pmap_kextract().
+	 */
+	SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES)
+
+	for (i = 0; i < NKPT; i++)
+		KPTD[i] = (KPTphys + (i << PAGE_SHIFT)) | PG_RW | PG_V;
+
+	/*
+	 * Adjust the start of the KPTD and KPTmap so that the implementation
+	 * of pmap_kextract() and pmap_growkernel() can be made simpler.
+	 */
+	KPTD -= KPTDI;
+	KPTmap -= i386_btop(KPTDI << PDRSHIFT);
+
+	/*
 	 * ptemap is used for pmap_pte_quick
 	 */
 	SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1);
@@ -1820,6 +1836,7 @@ pmap_growkernel(vm_offset_t addr)
 	vm_page_t nkpg;
 	pd_entry_t newpdir;
 	pt_entry_t *pde;
+	boolean_t updated_PTD;
 
 	mtx_assert(&kernel_map->system_mtx, MA_OWNED);
 	if (kernel_vm_end == 0) {
@@ -1859,14 +1876,20 @@ pmap_growkernel(vm_offset_t addr)
 			pmap_zero_page(nkpg);
 		ptppaddr = VM_PAGE_TO_PHYS(nkpg);
 		newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M);
-		pdir_pde(PTD, kernel_vm_end) = newpdir;
+		pdir_pde(KPTD, kernel_vm_end) = newpdir;
 
+		updated_PTD = FALSE;
 		mtx_lock_spin(&allpmaps_lock);
 		LIST_FOREACH(pmap, &allpmaps, pm_list) {
+			if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] &
+			    PG_FRAME))
+				updated_PTD = TRUE;
 			pde = pmap_pde(pmap, kernel_vm_end);
 			pde_store(pde, newpdir);
 		}
 		mtx_unlock_spin(&allpmaps_lock);
+		KASSERT(updated_PTD,
+		    ("pmap_growkernel: current page table is not in allpmaps"));
 		kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
 		if (kernel_vm_end - 1 >= kernel_map->max_offset) {
 			kernel_vm_end = kernel_map->max_offset;

Modified: stable/7/sys/i386/include/pmap.h
==============================================================================
--- stable/7/sys/i386/include/pmap.h	Sat Jan 30 18:16:57 2010	(r203207)
+++ stable/7/sys/i386/include/pmap.h	Sat Jan 30 18:17:43 2010	(r203208)
@@ -201,6 +201,16 @@ extern pd_entry_t *IdlePTD;	/* physical 
 #define	vtopte(va)	(PTmap + i386_btop(va))
 #define	vtophys(va)	pmap_kextract((vm_offset_t)(va))
 
+
+/*
+ * KPTmap is a linear mapping of the kernel page table.  It differs from the
+ * recursive mapping in two ways: (1) it only provides access to kernel page
+ * table pages, and not user page table pages, and (2) it provides access to
+ * a kernel page table page after the corresponding virtual addresses have
+ * been promoted to a 2/4MB page mapping.
+ */
+extern pt_entry_t *KPTmap;
+
 /*
  *	Routine:	pmap_kextract
  *	Function:
@@ -215,10 +225,17 @@ pmap_kextract(vm_offset_t va)
 	if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) {
 		pa = (pa & PG_PS_FRAME) | (va & PDRMASK);
 	} else {
-		pa = *vtopte(va);
+		/*
+		 * Beware of a concurrent promotion that changes the PDE at
+		 * this point!  For example, vtopte() must not be used to
+		 * access the PTE because it would use the new PDE.  It is,
+		 * however, safe to use the old PDE because the page table
+		 * page is preserved by the promotion.
+		 */
+		pa = KPTmap[i386_btop(va)];
 		pa = (pa & PG_FRAME) | (va & PAGE_MASK);
 	}
-	return pa;
+	return (pa);
 }
 
 #ifdef PAE

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 19:26:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C9DB1065679;
	Sat, 30 Jan 2010 19:26:28 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D1CC8FC1F;
	Sat, 30 Jan 2010 19:26:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UJQSZX085131;
	Sat, 30 Jan 2010 19:26:28 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UJQSPX085129;
	Sat, 30 Jan 2010 19:26:28 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301926.o0UJQSPX085129@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 19:26: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: r203221 - head/tools/build/mk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 19:26:28 -0000

Author: antoine
Date: Sat Jan 30 19:26:28 2010
New Revision: 203221
URL: http://svn.freebsd.org/changeset/base/203221

Log:
  Add files to remove when MK_FLOPPY=no.

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:25:18 2010	(r203220)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:26:28 2010	(r203221)
@@ -691,6 +691,17 @@ OLD_FILES+=usr/share/dict/words
 # to be filled in
 #.endif
 
+.if ${MK_FLOPPY} == no
+OLD_FILES+=usr/sbin/fdcontrol
+OLD_FILES+=usr/sbin/fdformat
+OLD_FILES+=usr/sbin/fdread
+OLD_FILES+=usr/sbin/fdwrite
+OLD_FILES+=usr/share/man/man1/fdformat.1.gz
+OLD_FILES+=usr/share/man/man1/fdread.1.gz
+OLD_FILES+=usr/share/man/man1/fdwrite.1.gz
+OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz
+.endif
+
 #.if ${MK_GAMES} == no
 # to be filled in
 #.endif

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 19:29:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6620106566B;
	Sat, 30 Jan 2010 19:29:02 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A6AF58FC1B;
	Sat, 30 Jan 2010 19:29:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UJT2DA085790;
	Sat, 30 Jan 2010 19:29:02 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UJT2m0085788;
	Sat, 30 Jan 2010 19:29:02 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301929.o0UJT2m0085788@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 19:29:02 +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: r203224 - head/tools/build/mk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 19:29:02 -0000

Author: antoine
Date: Sat Jan 30 19:29:02 2010
New Revision: 203224
URL: http://svn.freebsd.org/changeset/base/203224

Log:
  Add files to remove when MK_FREEBSD_UPDATE=no.

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:28:07 2010	(r203223)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:29:02 2010	(r203224)
@@ -702,6 +702,13 @@ OLD_FILES+=usr/share/man/man1/fdwrite.1.
 OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz
 .endif
 
+.if ${MK_FREEBSD_UPDATE} == no
+OLD_FILES+=etc/freebsd-update.conf
+OLD_FILES+=usr/sbin/freebsd-update
+OLD_FILES+=usr/share/examples/etc/freebsd-update.conf
+OLD_FILES+=usr/share/man/man8/freebsd-update.8.gz
+.endif
+
 #.if ${MK_GAMES} == no
 # to be filled in
 #.endif

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 19:32:02 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1587E1065676;
	Sat, 30 Jan 2010 19:32:02 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E05EE8FC14;
	Sat, 30 Jan 2010 19:32:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UJW1He086524;
	Sat, 30 Jan 2010 19:32:01 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UJW1IW086522;
	Sat, 30 Jan 2010 19:32:01 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301932.o0UJW1IW086522@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 19:32: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: r203226 - head/tools/build/mk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 19:32:02 -0000

Author: antoine
Date: Sat Jan 30 19:32:01 2010
New Revision: 203226
URL: http://svn.freebsd.org/changeset/base/203226

Log:
  Add files to remove when MK_GAMES=no.

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:29:53 2010	(r203225)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:32:01 2010	(r203226)
@@ -709,9 +709,54 @@ OLD_FILES+=usr/share/examples/etc/freebs
 OLD_FILES+=usr/share/man/man8/freebsd-update.8.gz
 .endif
 
-#.if ${MK_GAMES} == no
-# to be filled in
-#.endif
+.if ${MK_GAMES} == no
+OLD_FILES+=usr/games/bcd
+OLD_FILES+=usr/games/caesar
+OLD_FILES+=usr/games/factor
+OLD_FILES+=usr/games/fortune
+OLD_FILES+=usr/games/grdc
+OLD_FILES+=usr/games/morse
+OLD_FILES+=usr/games/number
+OLD_FILES+=usr/games/pom
+OLD_FILES+=usr/games/ppt
+OLD_FILES+=usr/games/primes
+OLD_FILES+=usr/games/random
+OLD_FILES+=usr/games/rot13
+OLD_FILES+=usr/games/strfile
+OLD_FILES+=usr/games/unstr
+OLD_FILES+=usr/share/games/fortune/fortunes
+OLD_FILES+=usr/share/games/fortune/fortunes-o
+OLD_FILES+=usr/share/games/fortune/fortunes-o.dat
+OLD_FILES+=usr/share/games/fortune/fortunes.dat
+OLD_FILES+=usr/share/games/fortune/freebsd-tips
+OLD_FILES+=usr/share/games/fortune/freebsd-tips.dat
+OLD_FILES+=usr/share/games/fortune/gerrold.limerick
+OLD_FILES+=usr/share/games/fortune/gerrold.limerick.dat
+OLD_FILES+=usr/share/games/fortune/limerick
+OLD_FILES+=usr/share/games/fortune/limerick.dat
+OLD_FILES+=usr/share/games/fortune/murphy
+OLD_FILES+=usr/share/games/fortune/murphy-o
+OLD_FILES+=usr/share/games/fortune/murphy-o.dat
+OLD_FILES+=usr/share/games/fortune/murphy.dat
+OLD_FILES+=usr/share/games/fortune/startrek
+OLD_FILES+=usr/share/games/fortune/startrek.dat
+OLD_FILES+=usr/share/games/fortune/zippy
+OLD_FILES+=usr/share/games/fortune/zippy.dat
+OLD_FILES+=usr/share/man/man6/bcd.6.gz
+OLD_FILES+=usr/share/man/man6/caesar.6.gz
+OLD_FILES+=usr/share/man/man6/factor.6.gz
+OLD_FILES+=usr/share/man/man6/fortune.6.gz
+OLD_FILES+=usr/share/man/man6/grdc.6.gz
+OLD_FILES+=usr/share/man/man6/morse.6.gz
+OLD_FILES+=usr/share/man/man6/number.6.gz
+OLD_FILES+=usr/share/man/man6/pom.6.gz
+OLD_FILES+=usr/share/man/man6/ppt.6.gz
+OLD_FILES+=usr/share/man/man6/primes.6.gz
+OLD_FILES+=usr/share/man/man6/random.6.gz
+OLD_FILES+=usr/share/man/man6/rot13.6.gz
+OLD_FILES+=usr/share/man/man8/strfile.8.gz
+OLD_FILES+=usr/share/man/man8/unstr.8.gz
+.endif
 
 .if ${MK_GCOV} == no
 OLD_FILES+=usr/bin/gcov

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 19:33:45 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D49061065672;
	Sat, 30 Jan 2010 19:33:45 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C532E8FC14;
	Sat, 30 Jan 2010 19:33:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UJXjcN087017;
	Sat, 30 Jan 2010 19:33:45 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UJXj4k087015;
	Sat, 30 Jan 2010 19:33:45 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301933.o0UJXj4k087015@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 19:33:45 +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: r203228 - head/tools/build/mk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 19:33:45 -0000

Author: antoine
Date: Sat Jan 30 19:33:45 2010
New Revision: 203228
URL: http://svn.freebsd.org/changeset/base/203228

Log:
  Add files to remove when MK_GDB=no.

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:32:11 2010	(r203227)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:33:45 2010	(r203228)
@@ -763,9 +763,18 @@ OLD_FILES+=usr/bin/gcov
 OLD_FILES+=usr/share/man/man1/gcov.1.gz
 .endif
 
-#.if ${MK_GDB} == no
-# to be filled in
-#.endif
+.if ${MK_GDB} == no
+OLD_FILES+=usr/bin/gdb
+OLD_FILES+=usr/bin/gdbserver
+OLD_FILES+=usr/bin/gdbtui
+OLD_FILES+=usr/bin/kgdb
+OLD_FILES+=usr/share/info/gdb.info.gz
+OLD_FILES+=usr/share/info/gdbint.info.gz
+OLD_FILES+=usr/share/info/stabs.info.gz
+OLD_FILES+=usr/share/man/man1/gdb.1.gz
+OLD_FILES+=usr/share/man/man1/gdbserver.1.gz
+OLD_FILES+=usr/share/man/man1/kgdb.1.gz
+.endif
 
 .if ${MK_GNU_CPIO} == no
 OLD_FILES+=usr/bin/gcpio

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 19:36:55 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A053B106566C;
	Sat, 30 Jan 2010 19:36:55 +0000 (UTC)
	(envelope-from antoine@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 90D208FC1A;
	Sat, 30 Jan 2010 19:36:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UJatjK087839;
	Sat, 30 Jan 2010 19:36:55 GMT (envelope-from antoine@svn.freebsd.org)
Received: (from antoine@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UJatvJ087837;
	Sat, 30 Jan 2010 19:36:55 GMT (envelope-from antoine@svn.freebsd.org)
Message-Id: <201001301936.o0UJatvJ087837@svn.freebsd.org>
From: Antoine Brodin 
Date: Sat, 30 Jan 2010 19:36:55 +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: r203231 - head/tools/build/mk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 19:36:55 -0000

Author: antoine
Date: Sat Jan 30 19:36:55 2010
New Revision: 203231
URL: http://svn.freebsd.org/changeset/base/203231

Log:
  Add files to remove when MK_GPIB=no.

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:36:29 2010	(r203230)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Sat Jan 30 19:36:55 2010	(r203231)
@@ -782,9 +782,22 @@ OLD_FILES+=usr/share/info/cpio.info.gz
 OLD_FILES+=usr/share/man/man1/gcpio.1.gz
 .endif
 
-#.if ${MK_GPIB} == no
-# none
-#.endif
+.if ${MK_GPIB} == no
+OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h
+OLD_FILES+=usr/include/dev/ieee488/ugpib.h
+OLD_FILES+=usr/include/dev/ieee488/upd7210.h
+OLD_FILES+=usr/include/gpib/gpib.h
+OLD_FILES+=usr/lib/libgpib.a
+OLD_FILES+=usr/lib/libgpib.so
+OLD_LIBS+=usr/lib/libgpib.so.3
+OLD_FILES+=usr/lib/libgpib_p.a
+.if ${TARGET_ARCH} == "amd64"
+OLD_FILES+=usr/lib32/libgpib.a
+OLD_FILES+=usr/lib32/libgpib.so
+OLD_LIBS+=usr/lib32/libgpib.so.3
+OLD_FILES+=usr/lib32/libgpib_p.a
+.endif
+.endif
 
 #.if ${MK_GROFF} == no
 # to be filled in

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 21:55:44 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C66E1065679;
	Sat, 30 Jan 2010 21:55:44 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B16D8FC08;
	Sat, 30 Jan 2010 21:55:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ULtiqq019543;
	Sat, 30 Jan 2010 21:55:44 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ULtiWM019541;
	Sat, 30 Jan 2010 21:55:44 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201001302155.o0ULtiWM019541@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sat, 30 Jan 2010 21:55:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r203260 - stable/7/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 21:55:44 -0000

Author: edwin
Date: Sat Jan 30 21:55:43 2010
New Revision: 203260
URL: http://svn.freebsd.org/changeset/base/203260

Log:
  MFC of 203066, 203067
  
  Git has been added as port 9418:
  http://www.iana.org/assignments/port-numbers
  
  The Erlang Port Mapper Daemon (from ports/lang/erlang) has been
  assigned official port number 4369 by IANA.
  
  PR:           conf/143259 conf/113265
  Submitted by: Denny Lin , Jimmy Olgeni 
  Approved by:	re (kib)

Modified:
  stable/7/etc/services
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/services
==============================================================================
--- stable/7/etc/services	Sat Jan 30 21:44:19 2010	(r203259)
+++ stable/7/etc/services	Sat Jan 30 21:55:43 2010	(r203260)
@@ -2227,6 +2227,8 @@ rwhois		4321/tcp   #Remote Who Is
 rwhois		4321/udp   #Remote Who Is
 unicall		4343/tcp
 unicall		4343/udp
+epmd		4369/tcp   #Erlang Port Mapper Daemon
+epmd		4369/udp   #Erlang Port Mapper Daemon
 krb524		4444/tcp
 krb524		4444/udp
 # PROBLEM krb524 assigned the port,
@@ -2372,6 +2374,8 @@ dlip		7201/udp
 ftp-proxy	8021/tcp   # FTP proxy
 natd		8668/divert # Network Address Translation
 jetdirect	9100/tcp   #HP JetDirect card
+git		9418/tcp   #git pack transfer service
+git		9418/udp   #git pack transfer service
 man		9535/tcp
 man		9535/udp
 sd		9876/tcp   #Session Director

From owner-svn-src-all@FreeBSD.ORG  Sat Jan 30 23:13:20 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B21910656A6;
	Sat, 30 Jan 2010 23:13:20 +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 39FF58FC22;
	Sat, 30 Jan 2010 23:13:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UNDK2h036608;
	Sat, 30 Jan 2010 23:13:20 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0UNDKgB036607;
	Sat, 30 Jan 2010 23:13:20 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201001302313.o0UNDKgB036607@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 30 Jan 2010 23:13:20 +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: r203261 - head/sys/geom/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 30 Jan 2010 23:13:20 -0000

Author: marcel
Date: Sat Jan 30 23:13:19 2010
New Revision: 203261
URL: http://svn.freebsd.org/changeset/base/203261

Log:
  Export the UUID of the partition in the XML. The partition UUID is used
  by EFI's device path to identify a partition. In order for FreeBSD to
  add EFI boot options, proper device paths need to be constructed.

Modified:
  head/sys/geom/part/g_part_gpt.c

Modified: head/sys/geom/part/g_part_gpt.c
==============================================================================
--- head/sys/geom/part/g_part_gpt.c	Sat Jan 30 21:55:43 2010	(r203260)
+++ head/sys/geom/part/g_part_gpt.c	Sat Jan 30 23:13:19 2010	(r203261)
@@ -513,6 +513,9 @@ g_part_gpt_dumpconf(struct g_part_table 
 		sbuf_printf(sb, "%s", indent);
 		sbuf_printf_uuid(sb, &entry->ent.ent_type);
 		sbuf_printf(sb, "\n");
+		sbuf_printf(sb, "%s", indent);
+		sbuf_printf_uuid(sb, &entry->ent.ent_uuid);
+		sbuf_printf(sb, "\n");
 	} else {
 		/* confxml: scheme information */
 	}