From owner-svn-src-head@FreeBSD.ORG Sun Jan 24 00:09:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 01:06:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 02:59:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 03:10:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 10:22:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 10:35:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 10:50:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 11:54:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 12:13:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 13:30:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:04:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:06:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:09:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:13:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:29:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:44:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 14:57:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 15:07:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 15:12:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 16:17:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 18:05:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 18:16:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 19:11:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 19:17:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 19:23:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Jan 24 20:19:08 2010 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Mon Jan 25 00:44:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 04:42:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 06:18:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 06:37:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 07:52:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 12:23:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 13:44:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 14:17:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 16:09:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 16:10:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 16:44:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 16:55:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 16:55:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 16:58:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 17:00:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 17:06:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 18:35:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 18:50:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 18:52:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 19:01:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 19:25:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 19:27:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 19:29:41 2010 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 19:36:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 19:56:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 20:51:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 20:59:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 22:03:31 2010 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 23:37:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Jan 25 23:44:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Tue Jan 26 02:26:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 02:39:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 03:24:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 03:29:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 03:39:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 03:42:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 04:41:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 04:44:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 04:45:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 05:07:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 05:10:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 05:11:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 05:14:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 05:17:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 06:10:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 06:52:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 07:10:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 08:58:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 10:00:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Tue Jan 26 11:12:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 11:33:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 11:39:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 13:00:34 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 13:15:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 13:23:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 14:00:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 14:28:03 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 14:33:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 14:49:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 14:51:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 14:57:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:03:34 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:06:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:25:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:28:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:29:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:30:27 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 15:37:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 16:05:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 16:12:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 16:18:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 17:05:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 17:21:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 18:39:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 19:17:14 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 19:48:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:02:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:12:27 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:15:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:26:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:27:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:38:24 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:39:27 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:48:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:50:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 20:52:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 21:20:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 21:36:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 22:17:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 22:32:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 22:38:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Tue Jan 26 23:04:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 00:30:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 00:34:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 02:32:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 02:38:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 06:28:16 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 07:37:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 08:26:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 09:28:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 09:34:08 2010
Return-Path: 
Delivered-To: svn-src-head@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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 09:59:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 10:17:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 11:08:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 11:23:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 11:54:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 14:43:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 15:22:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 16:15:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 16:21:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 16:47:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 17:00:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 17:15:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 17:35:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 17:49:27 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 18:00:24 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 18:33:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 19:30:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 19:43:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 20:12:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 20:30:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 20:32:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 21:01:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 21:06:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Wed Jan 27 21:59:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 01:47:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 04:50:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 08:41:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 10:16:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 14:01:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 14:01:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 14:03:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 14:09:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 14:59:16 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 16:17:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 17:09:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 17:54:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 18:15:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 18:19:51 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 19:12:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 19:12:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 19:41:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 19:57:24 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 20:38:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 20:39:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 20:46:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 21:14:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 21:55:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 22:24:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 22:28:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 22:28:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 22:46:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Thu Jan 28 22:54:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 01:27:55 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 01:30:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:31:34 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:32:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:32:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:33:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:35:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:38:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 02:44:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 03:35:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 04:03:36 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 04:05:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 04:07:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 05:16:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 05:29:29 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 05:36:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 05:38:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:00:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:02:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:04:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:07:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:10:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:20:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 10:32:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 12:09:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 12:47:04 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 14:07:33 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 14:23:47 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 14:41:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 14:44:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 15:11:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 16:14:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 18:33:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 19:25:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Fri Jan 29 20:37:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 00:11:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 01:54:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 04:24:04 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 06:49:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 14:04:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 14:40:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 15:22:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 16:12:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 16:34:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 16:41:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 19:26:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 19:29:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 19:32:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 19:33:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 19:36:55 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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-head@FreeBSD.ORG  Sat Jan 30 23:13:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: 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 */
 	}