From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 17:54:33 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC633106567B; Fri, 30 Dec 2011 17:54:33 +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 BA8078FC13; Fri, 30 Dec 2011 17:54:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUHsXSH023421; Fri, 30 Dec 2011 17:54:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUHsXTj023419; Fri, 30 Dec 2011 17:54:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301754.pBUHsXTj023419@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 17:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229005 - stable/9/sys/fs/procfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 17:54:33 -0000 Author: kib Date: Fri Dec 30 17:54:33 2011 New Revision: 229005 URL: http://svn.freebsd.org/changeset/base/229005 Log: MFC r227104: Fix typo. Modified: stable/9/sys/fs/procfs/procfs_status.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 17:18:09 2011 (r229004) +++ stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 17:54:33 2011 (r229005) @@ -175,7 +175,7 @@ procfs_doproccmdline(PFS_FILL_ARGS) /* * If we are using the ps/cmdline caching, use that. Otherwise * revert back to the old way which only implements full cmdline - * for the currept process and just p->p_comm for all other + * for the current process and just p->p_comm for all other * processes. * Note that if the argv is no longer available, we deliberately * don't fall back on p->p_comm or return an error: the authentic From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 18:02:15 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330DB10656D1; Fri, 30 Dec 2011 18:02:15 +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 D021D8FC18; Fri, 30 Dec 2011 18:02:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUI2EAB023798; Fri, 30 Dec 2011 18:02:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUI2EGM023796; Fri, 30 Dec 2011 18:02:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301802.pBUI2EGM023796@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229006 - stable/8/sys/fs/procfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 18:02:15 -0000 Author: kib Date: Fri Dec 30 18:02:14 2011 New Revision: 229006 URL: http://svn.freebsd.org/changeset/base/229006 Log: MFC r227104: Fix typo. Modified: stable/8/sys/fs/procfs/procfs_status.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 17:54:33 2011 (r229005) +++ stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 18:02:14 2011 (r229006) @@ -175,7 +175,7 @@ procfs_doproccmdline(PFS_FILL_ARGS) /* * If we are using the ps/cmdline caching, use that. Otherwise * revert back to the old way which only implements full cmdline - * for the currept process and just p->p_comm for all other + * for the current process and just p->p_comm for all other * processes. * Note that if the argv is no longer available, we deliberately * don't fall back on p->p_comm or return an error: the authentic From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 18:18:06 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F801065672; Fri, 30 Dec 2011 18:18:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CB998FC14; Fri, 30 Dec 2011 18:18:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUII6ae024422; Fri, 30 Dec 2011 18:18:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUII6l8024419; Fri, 30 Dec 2011 18:18:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301818.pBUII6l8024419@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229008 - stable/9/lib/libc/amd64/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 18:18:06 -0000 Author: kib Date: Fri Dec 30 18:18:06 2011 New Revision: 229008 URL: http://svn.freebsd.org/changeset/base/229008 Log: MFC r227023: Make sure that stack is 16-byte aligned before calling a function, as it is required by amd64 ABI. Add a comment for the places were the stack is accidentally properly aligned already. PR: amd64/162214 Modified: stable/9/lib/libc/amd64/gen/setjmp.S stable/9/lib/libc/amd64/gen/sigsetjmp.S Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/amd64/gen/setjmp.S ============================================================================== --- stable/9/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:16:15 2011 (r229007) +++ stable/9/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:18:06 2011 (r229008) @@ -54,6 +54,7 @@ ENTRY(setjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi movq %rdi,%rcx @@ -81,7 +82,9 @@ ENTRY(__longjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ movq %rdi,%rdx Modified: stable/9/lib/libc/amd64/gen/sigsetjmp.S ============================================================================== --- stable/9/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:16:15 2011 (r229007) +++ stable/9/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:18:06 2011 (r229008) @@ -62,6 +62,7 @@ ENTRY(sigsetjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10 (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi 2: movq %rdi,%rcx @@ -90,7 +91,9 @@ ENTRY(__siglongjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ 2: movq %rdi,%rdx From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 18:20:45 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38979106564A; Fri, 30 Dec 2011 18:20: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 0C8488FC14; Fri, 30 Dec 2011 18:20:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIKiOH024552; Fri, 30 Dec 2011 18:20:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIKici024549; Fri, 30 Dec 2011 18:20:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301820.pBUIKici024549@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229009 - stable/9/lib/libc/i386/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 18:20:45 -0000 Author: kib Date: Fri Dec 30 18:20:44 2011 New Revision: 229009 URL: http://svn.freebsd.org/changeset/base/229009 Log: MFC r227024: Despite official i386 ABI does not mandate any stack alignment besides the word alignment, some versions of gcc do require 16-byte alignment. Make sure the stack is 16-byte aligned before calling a subroutine. Modified: stable/9/lib/libc/i386/gen/setjmp.S stable/9/lib/libc/i386/gen/sigsetjmp.S Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/i386/gen/setjmp.S ============================================================================== --- stable/9/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:18:06 2011 (r229008) +++ stable/9/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:20:44 2011 (r229009) @@ -51,12 +51,19 @@ __FBSDID("$FreeBSD$"); ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx movl 0(%esp),%edx @@ -76,12 +83,19 @@ END(setjmp) ENTRY(__longjmp) movl 4(%esp),%edx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx movl 8(%esp),%eax Modified: stable/9/lib/libc/i386/gen/sigsetjmp.S ============================================================================== --- stable/9/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:18:06 2011 (r229008) +++ stable/9/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:20:44 2011 (r229009) @@ -60,12 +60,19 @@ ENTRY(sigsetjmp) testl %eax,%eax jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx 2: movl 0(%esp),%edx @@ -87,12 +94,19 @@ ENTRY(__siglongjmp) cmpl $0,44(%edx) jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx 2: movl 8(%esp),%eax From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 18:22:35 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FFE1106566C; Fri, 30 Dec 2011 18:22:35 +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 63DBA8FC0A; Fri, 30 Dec 2011 18:22:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIMZnd024729; Fri, 30 Dec 2011 18:22:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIMZCl024726; Fri, 30 Dec 2011 18:22:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301822.pBUIMZCl024726@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229010 - stable/8/lib/libc/amd64/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 18:22:35 -0000 Author: kib Date: Fri Dec 30 18:22:34 2011 New Revision: 229010 URL: http://svn.freebsd.org/changeset/base/229010 Log: MFC r227023: Make sure that stack is 16-byte aligned before calling a function, as it is required by amd64 ABI. Add a comment for the places were the stack is accidentally properly aligned already. PR: amd64/162214 Modified: stable/8/lib/libc/amd64/gen/setjmp.S stable/8/lib/libc/amd64/gen/sigsetjmp.S Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/amd64/gen/setjmp.S ============================================================================== --- stable/8/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:20:44 2011 (r229009) +++ stable/8/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:22:34 2011 (r229010) @@ -54,6 +54,7 @@ ENTRY(setjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi movq %rdi,%rcx @@ -81,7 +82,9 @@ ENTRY(__longjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ movq %rdi,%rdx Modified: stable/8/lib/libc/amd64/gen/sigsetjmp.S ============================================================================== --- stable/8/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:20:44 2011 (r229009) +++ stable/8/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:22:34 2011 (r229010) @@ -62,6 +62,7 @@ ENTRY(sigsetjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10 (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi 2: movq %rdi,%rcx @@ -90,7 +91,9 @@ ENTRY(__siglongjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ 2: movq %rdi,%rdx From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 18:29:09 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2097106566C; Fri, 30 Dec 2011 18:29:09 +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 A5CBE8FC12; Fri, 30 Dec 2011 18:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIT9xR024966; Fri, 30 Dec 2011 18:29:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIT9Cv024963; Fri, 30 Dec 2011 18:29:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301829.pBUIT9Cv024963@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229011 - stable/8/lib/libc/i386/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 18:29:09 -0000 Author: kib Date: Fri Dec 30 18:29:09 2011 New Revision: 229011 URL: http://svn.freebsd.org/changeset/base/229011 Log: MFC r227024: Despite official i386 ABI does not mandate any stack alignment besides the word alignment, some versions of gcc do require 16-byte alignment. Make sure the stack is 16-byte aligned before calling a subroutine. Modified: stable/8/lib/libc/i386/gen/setjmp.S stable/8/lib/libc/i386/gen/sigsetjmp.S Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/i386/gen/setjmp.S ============================================================================== --- stable/8/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:22:34 2011 (r229010) +++ stable/8/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:29:09 2011 (r229011) @@ -51,12 +51,19 @@ __FBSDID("$FreeBSD$"); ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx movl 0(%esp),%edx @@ -76,12 +83,19 @@ END(setjmp) ENTRY(__longjmp) movl 4(%esp),%edx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx movl 8(%esp),%eax Modified: stable/8/lib/libc/i386/gen/sigsetjmp.S ============================================================================== --- stable/8/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:22:34 2011 (r229010) +++ stable/8/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:29:09 2011 (r229011) @@ -60,12 +60,19 @@ ENTRY(sigsetjmp) testl %eax,%eax jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx 2: movl 0(%esp),%edx @@ -87,12 +94,19 @@ ENTRY(__siglongjmp) cmpl $0,44(%edx) jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx 2: movl 8(%esp),%eax From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 18:58:43 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A482106566C; Fri, 30 Dec 2011 18:58:43 +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 286E88FC13; Fri, 30 Dec 2011 18:58:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIwhbk025869; Fri, 30 Dec 2011 18:58:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIwgt5025867; Fri, 30 Dec 2011 18:58:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301858.pBUIwgt5025867@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229012 - stable/9/sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 18:58:43 -0000 Author: kib Date: Fri Dec 30 18:58:42 2011 New Revision: 229012 URL: http://svn.freebsd.org/changeset/base/229012 Log: MFC r228432: Fix printf. Modified: stable/9/sys/vm/swap_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Fri Dec 30 18:29:09 2011 (r229011) +++ stable/9/sys/vm/swap_pager.c Fri Dec 30 18:58:42 2011 (r229012) @@ -233,7 +233,7 @@ swap_reserve_by_cred(vm_ooffset_t incr, } if (!res && ppsratecheck(&lastfail, &curfail, 1)) { printf("uid %d, pid %d: swap reservation for %jd bytes failed\n", - curproc->p_pid, uip->ui_uid, incr); + uip->ui_uid, curproc->p_pid, incr); } #ifdef RACCT From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 19:04:12 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E38161065673; Fri, 30 Dec 2011 19:04:12 +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 D1C4C8FC13; Fri, 30 Dec 2011 19:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJ4Chp026102; Fri, 30 Dec 2011 19:04:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJ4CCD026100; Fri, 30 Dec 2011 19:04:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301904.pBUJ4CCD026100@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229013 - stable/8/sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 19:04:13 -0000 Author: kib Date: Fri Dec 30 19:04:12 2011 New Revision: 229013 URL: http://svn.freebsd.org/changeset/base/229013 Log: MFC r228432: Fix printf. Modified: stable/8/sys/vm/swap_pager.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/vm/swap_pager.c ============================================================================== --- stable/8/sys/vm/swap_pager.c Fri Dec 30 18:58:42 2011 (r229012) +++ stable/8/sys/vm/swap_pager.c Fri Dec 30 19:04:12 2011 (r229013) @@ -216,7 +216,7 @@ swap_reserve_by_uid(vm_ooffset_t incr, s } if (!res && ppsratecheck(&lastfail, &curfail, 1)) { printf("uid %d, pid %d: swap reservation for %jd bytes failed\n", - curproc->p_pid, uip->ui_uid, incr); + uip->ui_uid, curproc->p_pid, incr); } return (res); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 19:18:13 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0DDB106566C; Fri, 30 Dec 2011 19:18:13 +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 DF3AC8FC0A; Fri, 30 Dec 2011 19:18:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJIDIe026559; Fri, 30 Dec 2011 19:18:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJID1H026557; Fri, 30 Dec 2011 19:18:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301918.pBUJID1H026557@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229014 - stable/9/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 19:18:14 -0000 Author: kib Date: Fri Dec 30 19:18:13 2011 New Revision: 229014 URL: http://svn.freebsd.org/changeset/base/229014 Log: MFC r227392: Assert that _PRELE() is done for the held process. Modified: stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Fri Dec 30 19:04:12 2011 (r229013) +++ stable/9/sys/sys/proc.h Fri Dec 30 19:18:13 2011 (r229014) @@ -755,6 +755,7 @@ MALLOC_DECLARE(M_SUBPROC); } while (0) #define _PRELE(p) do { \ PROC_LOCK_ASSERT((p), MA_OWNED); \ + PROC_ASSERT_HELD(p); \ (--(p)->p_lock); \ if (((p)->p_flag & P_WEXIT) && (p)->p_lock == 0) \ wakeup(&(p)->p_lock); \ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 19:24:53 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE02D106566C; Fri, 30 Dec 2011 19:24:53 +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 CC3748FC0C; Fri, 30 Dec 2011 19:24:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJOrSH026811; Fri, 30 Dec 2011 19:24:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJOre7026809; Fri, 30 Dec 2011 19:24:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301924.pBUJOre7026809@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229015 - stable/8/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 19:24:54 -0000 Author: kib Date: Fri Dec 30 19:24:53 2011 New Revision: 229015 URL: http://svn.freebsd.org/changeset/base/229015 Log: MFC r227392: Assert that _PRELE() is done for the held process. Modified: stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Fri Dec 30 19:18:13 2011 (r229014) +++ stable/8/sys/sys/proc.h Fri Dec 30 19:24:53 2011 (r229015) @@ -747,6 +747,7 @@ MALLOC_DECLARE(M_SUBPROC); } while (0) #define _PRELE(p) do { \ PROC_LOCK_ASSERT((p), MA_OWNED); \ + PROC_ASSERT_HELD(p); \ (--(p)->p_lock); \ if (((p)->p_flag & P_WEXIT) && (p)->p_lock == 0) \ wakeup(&(p)->p_lock); \ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 19:58:06 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E66D5106566C; Fri, 30 Dec 2011 19:58:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE1048FC25; Fri, 30 Dec 2011 19:58:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJw6IV027805; Fri, 30 Dec 2011 19:58:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJw6q0027803; Fri, 30 Dec 2011 19:58:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301958.pBUJw6q0027803@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229016 - stable/9/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 19:58:07 -0000 Author: kib Date: Fri Dec 30 19:58:06 2011 New Revision: 229016 URL: http://svn.freebsd.org/changeset/base/229016 Log: MFC r228178: If alloc_unr() call in the pipe_create() failed, then pipe->pipe_ino is -1. But, because ino_t is unsigned, this case was not covered by the test ino > 0 in pipeclose(), leading to the free_unr(-1). Fix it by explicitely comparing with 0 and -1. Do no access freed memory, the inode number was cached to prevent access to cpipe after it possibly was freed, but I failed to commit the right patch. Modified: stable/9/sys/kern/sys_pipe.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sys_pipe.c ============================================================================== --- stable/9/sys/kern/sys_pipe.c Fri Dec 30 19:24:53 2011 (r229015) +++ stable/9/sys/kern/sys_pipe.c Fri Dec 30 19:58:06 2011 (r229016) @@ -1554,8 +1554,8 @@ pipeclose(cpipe) } else PIPE_UNLOCK(cpipe); - if (ino > 0) - free_unr(pipeino_unr, cpipe->pipe_ino); + if (ino != 0 && ino != (ino_t)-1) + free_unr(pipeino_unr, ino); } /*ARGSUSED*/ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 19:59:54 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA0051065672; Fri, 30 Dec 2011 19:59:54 +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 D86E18FC0C; Fri, 30 Dec 2011 19:59:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJxswu027902; Fri, 30 Dec 2011 19:59:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJxsaL027900; Fri, 30 Dec 2011 19:59:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301959.pBUJxsaL027900@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229017 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 19:59:55 -0000 Author: kib Date: Fri Dec 30 19:59:54 2011 New Revision: 229017 URL: http://svn.freebsd.org/changeset/base/229017 Log: MFC r228375: Typo. Modified: stable/9/libexec/rtld-elf/rtld.h Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Fri Dec 30 19:58:06 2011 (r229016) +++ stable/9/libexec/rtld-elf/rtld.h Fri Dec 30 19:59:54 2011 (r229017) @@ -246,7 +246,7 @@ typedef struct Struct_Obj_Entry { /* Flags to be passed into symlook_ family of functions. */ #define SYMLOOK_IN_PLT 0x01 /* Lookup for PLT symbol */ -#define SYMLOOK_DLSYM 0x02 /* Return newes versioned symbol. Used by +#define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by dlsym. */ /* Flags for load_object(). */ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:01:26 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D944910656D3; Fri, 30 Dec 2011 20:01:26 +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 C76BF8FC1B; Fri, 30 Dec 2011 20:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUK1Qkq028021; Fri, 30 Dec 2011 20:01:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUK1QxG028019; Fri, 30 Dec 2011 20:01:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302001.pBUK1QxG028019@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229018 - stable/8/libexec/rtld-elf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:01:27 -0000 Author: kib Date: Fri Dec 30 20:01:26 2011 New Revision: 229018 URL: http://svn.freebsd.org/changeset/base/229018 Log: MFC r228375: Typo. Modified: stable/8/libexec/rtld-elf/rtld.h Directory Properties: stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/libexec/rtld-elf/rtld.h ============================================================================== --- stable/8/libexec/rtld-elf/rtld.h Fri Dec 30 19:59:54 2011 (r229017) +++ stable/8/libexec/rtld-elf/rtld.h Fri Dec 30 20:01:26 2011 (r229018) @@ -239,7 +239,7 @@ typedef struct Struct_Obj_Entry { /* Flags to be passed into symlook_ family of functions. */ #define SYMLOOK_IN_PLT 0x01 /* Lookup for PLT symbol */ -#define SYMLOOK_DLSYM 0x02 /* Return newes versioned symbol. Used by +#define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by dlsym. */ /* Flags for load_object(). */ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:06:44 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA94106566C; Fri, 30 Dec 2011 20:06:44 +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 5D00B8FC18; Fri, 30 Dec 2011 20:06:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUK6i87028233; Fri, 30 Dec 2011 20:06:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUK6iB8028231; Fri, 30 Dec 2011 20:06:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302006.pBUK6iB8028231@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229019 - stable/9/sys/ddb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:06:44 -0000 Author: kib Date: Fri Dec 30 20:06:43 2011 New Revision: 229019 URL: http://svn.freebsd.org/changeset/base/229019 Log: MFC r228376: Typo. Modified: stable/9/sys/ddb/db_thread.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ddb/db_thread.c ============================================================================== --- stable/9/sys/ddb/db_thread.c Fri Dec 30 20:01:26 2011 (r229018) +++ stable/9/sys/ddb/db_thread.c Fri Dec 30 20:06:43 2011 (r229019) @@ -109,7 +109,7 @@ db_show_threads(db_expr_t addr, boolean_ * Lookup a thread based on a db expression address. We assume that the * address was parsed in hexadecimal. We reparse the address in decimal * first and try to treat it as a thread ID to find an associated thread. - * If that fails and check_pid is true, we terat the decimal value as a + * If that fails and check_pid is true, we treat the decimal value as a * PID. If that matches a process, we return the first thread in that * process. Otherwise, we treat the addr as a pointer to a thread. */ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:12:51 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E1C5106564A; Fri, 30 Dec 2011 20:12:51 +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 F05AD8FC13; Fri, 30 Dec 2011 20:12:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKCoRM028467; Fri, 30 Dec 2011 20:12:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKCopa028465; Fri, 30 Dec 2011 20:12:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302012.pBUKCopa028465@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229020 - stable/8/sys/ddb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:12:51 -0000 Author: kib Date: Fri Dec 30 20:12:50 2011 New Revision: 229020 URL: http://svn.freebsd.org/changeset/base/229020 Log: MFC r228376: Typo. Modified: stable/8/sys/ddb/db_thread.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ddb/db_thread.c ============================================================================== --- stable/8/sys/ddb/db_thread.c Fri Dec 30 20:06:43 2011 (r229019) +++ stable/8/sys/ddb/db_thread.c Fri Dec 30 20:12:50 2011 (r229020) @@ -109,7 +109,7 @@ db_show_threads(db_expr_t addr, boolean_ * Lookup a thread based on a db expression address. We assume that the * address was parsed in hexadecimal. We reparse the address in decimal * first and try to treat it as a thread ID to find an associated thread. - * If that fails and check_pid is true, we terat the decimal value as a + * If that fails and check_pid is true, we treat the decimal value as a * PID. If that matches a process, we return the first thread in that * process. Otherwise, we treat the addr as a pointer to a thread. */ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:21:54 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABBE106566C; Fri, 30 Dec 2011 20:21:54 +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 38DA58FC12; Fri, 30 Dec 2011 20:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKLsnh028783; Fri, 30 Dec 2011 20:21:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKLsXY028781; Fri, 30 Dec 2011 20:21:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302021.pBUKLsXY028781@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229021 - stable/9/sys/fs/procfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:21:54 -0000 Author: kib Date: Fri Dec 30 20:21:53 2011 New Revision: 229021 URL: http://svn.freebsd.org/changeset/base/229021 Log: MFC r227393: Lock the thread lock around block that retrieves td_wmesg. Otherwise, procfs could see a thread with assigned td_wchan but still NULL td_wmesg. Modified: stable/9/sys/fs/procfs/procfs_status.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 20:12:50 2011 (r229020) +++ stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 20:21:53 2011 (r229021) @@ -113,12 +113,14 @@ procfs_doprocstatus(PFS_FILL_ARGS) } tdfirst = FIRST_THREAD_IN_PROC(p); + thread_lock(tdfirst); if (tdfirst->td_wchan != NULL) { KASSERT(tdfirst->td_wmesg != NULL, ("wchan %p has no wmesg", tdfirst->td_wchan)); wmesg = tdfirst->td_wmesg; } else wmesg = "nochan"; + thread_unlock(tdfirst); if (p->p_flag & P_INMEM) { struct timeval start, ut, st; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:24:53 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41B1F106566C; Fri, 30 Dec 2011 20:24:53 +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 2FE418FC16; Fri, 30 Dec 2011 20:24:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKOrAB028929; Fri, 30 Dec 2011 20:24:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKOqha028927; Fri, 30 Dec 2011 20:24:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302024.pBUKOqha028927@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229022 - stable/8/sys/fs/procfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:24:53 -0000 Author: kib Date: Fri Dec 30 20:24:52 2011 New Revision: 229022 URL: http://svn.freebsd.org/changeset/base/229022 Log: MFC r227393: Lock the thread lock around block that retrieves td_wmesg. Otherwise, procfs could see a thread with assigned td_wchan but still NULL td_wmesg. Modified: stable/8/sys/fs/procfs/procfs_status.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 20:21:53 2011 (r229021) +++ stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 20:24:52 2011 (r229022) @@ -113,12 +113,14 @@ procfs_doprocstatus(PFS_FILL_ARGS) } tdfirst = FIRST_THREAD_IN_PROC(p); + thread_lock(tdfirst); if (tdfirst->td_wchan != NULL) { KASSERT(tdfirst->td_wmesg != NULL, ("wchan %p has no wmesg", tdfirst->td_wchan)); wmesg = tdfirst->td_wmesg; } else wmesg = "nochan"; + thread_unlock(tdfirst); if (p->p_flag & P_INMEM) { struct timeval start, ut, st; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:35:14 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 741EF106564A; Fri, 30 Dec 2011 20:35:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 611108FC08; Fri, 30 Dec 2011 20:35:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKZEhn029366; Fri, 30 Dec 2011 20:35:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKZErK029359; Fri, 30 Dec 2011 20:35:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302035.pBUKZErK029359@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229023 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:35:14 -0000 Author: kib Date: Fri Dec 30 20:35:13 2011 New Revision: 229023 URL: http://svn.freebsd.org/changeset/base/229023 Log: MFC r227399: Attempt to improve formatting and content of several comments for amd64 and i386 MD code. Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/amd64/include/signal.h stable/9/sys/amd64/include/ucontext.h stable/9/sys/i386/i386/trap.c stable/9/sys/i386/include/signal.h stable/9/sys/i386/include/ucontext.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/amd64/amd64/trap.c Fri Dec 30 20:35:13 2011 (r229023) @@ -900,9 +900,9 @@ cpu_fetch_syscall_args(struct thread *td #include "../../kern/subr_syscall.c" /* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. + * System call handler for native binaries. The trap frame is already + * set up by the assembler trampoline and a pointer to it is saved in + * td_frame. */ void amd64_syscall(struct thread *td, int traced) Modified: stable/9/sys/amd64/include/signal.h ============================================================================== --- stable/9/sys/amd64/include/signal.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/amd64/include/signal.h Fri Dec 30 20:35:13 2011 (r229023) @@ -47,18 +47,14 @@ typedef long sig_atomic_t; #include /* codes for SIGILL, SIGFPE */ /* - * Only the kernel should need these old type definitions. - */ -/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available * to the handler to allow it to restore state properly if * a non-standard exit is performed. - */ -/* - * The sequence of the fields/registers in struct sigcontext should match - * those in mcontext_t. + * + * The sequence of the fields/registers after sc_mask in struct + * sigcontext must match those in mcontext_t and struct trapframe. */ struct sigcontext { struct __sigset sc_mask; /* signal mask to restore */ @@ -93,8 +89,8 @@ struct sigcontext { long sc_ss; long sc_len; /* sizeof(mcontext_t) */ /* - * XXX - See and for - * the following fields. + * See and for the following + * fields. */ long sc_fpformat; long sc_ownedfp; Modified: stable/9/sys/amd64/include/ucontext.h ============================================================================== --- stable/9/sys/amd64/include/ucontext.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/amd64/include/ucontext.h Fri Dec 30 20:35:13 2011 (r229023) @@ -41,12 +41,13 @@ typedef struct __mcontext { /* - * The first 24 fields must match the definition of - * sigcontext. So that we can support sigcontext - * and ucontext_t at the same time. + * The definition of mcontext_t must match the layout of + * struct sigcontext after the sc_mask member. This is so + * that we can support sigcontext and ucontext_t at the same + * time. */ - __register_t mc_onstack; /* XXX - sigcontext compat. */ - __register_t mc_rdi; /* machine state (struct trapframe) */ + __register_t mc_onstack; /* XXX - sigcontext compat. */ + __register_t mc_rdi; /* machine state (struct trapframe) */ __register_t mc_rsi; __register_t mc_rdx; __register_t mc_rcx; Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/i386/i386/trap.c Fri Dec 30 20:35:13 2011 (r229023) @@ -1065,9 +1065,8 @@ cpu_fetch_syscall_args(struct thread *td #include "../../kern/subr_syscall.c" /* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. + * syscall - system call request C handler. A system call is + * essentially treated as a trap by reusing the frame layout. */ void syscall(struct trapframe *frame) Modified: stable/9/sys/i386/include/signal.h ============================================================================== --- stable/9/sys/i386/include/signal.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/i386/include/signal.h Fri Dec 30 20:35:13 2011 (r229023) @@ -46,16 +46,17 @@ typedef int sig_atomic_t; #include /* codes for SIGILL, SIGFPE */ /* - * Only the kernel should need these old type definitions. - */ -#if defined(_KERNEL) && defined(COMPAT_43) -/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available * to the handler to allow it to restore state properly if * a non-standard exit is performed. */ + +#if defined(_KERNEL) && defined(COMPAT_43) +/* + * Only the kernel should need these old type definitions. + */ struct osigcontext { int sc_onstack; /* sigstack state to restore */ osigset_t sc_mask; /* signal mask to restore */ @@ -83,7 +84,7 @@ struct osigcontext { /* * The sequence of the fields/registers in struct sigcontext should match - * those in mcontext_t. + * those in mcontext_t and struct trapframe. */ struct sigcontext { struct __sigset sc_mask; /* signal mask to restore */ @@ -109,8 +110,8 @@ struct sigcontext { int sc_ss; int sc_len; /* sizeof(mcontext_t) */ /* - * XXX - See and for - * the following fields. + * See and for + * the following fields. */ int sc_fpformat; int sc_ownedfp; Modified: stable/9/sys/i386/include/ucontext.h ============================================================================== --- stable/9/sys/i386/include/ucontext.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/i386/include/ucontext.h Fri Dec 30 20:35:13 2011 (r229023) @@ -33,9 +33,9 @@ typedef struct __mcontext { /* - * The first 20 fields must match the definition of - * sigcontext. So that we can support sigcontext - * and ucontext_t at the same time. + * The definition of mcontext_t shall match the layout of + * struct sigcontext after the sc_mask member. So that we can + * support sigcontext and ucontext_t at the same time. */ __register_t mc_onstack; /* XXX - sigcontext compat. */ __register_t mc_gs; /* machine state (struct trapframe) */ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:45:40 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA0C1106566C; Fri, 30 Dec 2011 20:45:40 +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 A85D18FC08; Fri, 30 Dec 2011 20:45:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKjeV8029765; Fri, 30 Dec 2011 20:45:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKjeQT029763; Fri, 30 Dec 2011 20:45:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302045.pBUKjeQT029763@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229025 - stable/9/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:45:40 -0000 Author: kib Date: Fri Dec 30 20:45:40 2011 New Revision: 229025 URL: http://svn.freebsd.org/changeset/base/229025 Log: MFC r227443: Guard against the unlikely case of the alias path containing the '%' symbols. Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Fri Dec 30 20:41:24 2011 (r229024) +++ stable/9/sys/kern/kern_conf.c Fri Dec 30 20:45:40 2011 (r229025) @@ -1016,7 +1016,7 @@ make_dev_physpath_alias(int flags, struc old_alias = NULL; ret = 0; } else { - ret = make_dev_alias_p(flags, cdev, pdev, devfspath); + ret = make_dev_alias_p(flags, cdev, pdev, "%s", devfspath); } out: if (old_alias != NULL) From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:52:57 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0014A106564A; Fri, 30 Dec 2011 20:52:56 +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 E29AA8FC12; Fri, 30 Dec 2011 20:52:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKquFw030029; Fri, 30 Dec 2011 20:52:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKqumr030027; Fri, 30 Dec 2011 20:52:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302052.pBUKqumr030027@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229026 - stable/9/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:52:57 -0000 Author: kib Date: Fri Dec 30 20:52:56 2011 New Revision: 229026 URL: http://svn.freebsd.org/changeset/base/229026 Log: MFC r227444: Style. Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Fri Dec 30 20:45:40 2011 (r229025) +++ stable/9/sys/kern/kern_conf.c Fri Dec 30 20:52:56 2011 (r229026) @@ -1009,8 +1009,7 @@ make_dev_physpath_alias(int flags, struc } sprintf(devfspath, "%s/%s", physpath, pdev->si_name); - if (old_alias != NULL - && strcmp(old_alias->si_name, devfspath) == 0) { + if (old_alias != NULL && strcmp(old_alias->si_name, devfspath) == 0) { /* Retain the existing alias. */ *cdev = old_alias; old_alias = NULL; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:55:39 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC54106566C; Fri, 30 Dec 2011 20:55:39 +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 F10918FC0A; Fri, 30 Dec 2011 20:55:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKtcie030170; Fri, 30 Dec 2011 20:55:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKtciK030168; Fri, 30 Dec 2011 20:55:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302055.pBUKtciK030168@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229027 - stable/9/lib/libc/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:55:39 -0000 Author: kib Date: Fri Dec 30 20:55:38 2011 New Revision: 229027 URL: http://svn.freebsd.org/changeset/base/229027 Log: MFC r227622: Fix typo. Modified: stable/9/lib/libc/sys/stat.2 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/sys/stat.2 ============================================================================== --- stable/9/lib/libc/sys/stat.2 Fri Dec 30 20:52:56 2011 (r229026) +++ stable/9/lib/libc/sys/stat.2 Fri Dec 30 20:55:38 2011 (r229027) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd March 28, 2010 +.Dd November 17, 2011 .Dt STAT 2 .Os .Sh NAME @@ -411,7 +411,7 @@ and system calls are expected to conform to .St -p1003.1-90 . The -.Fn fchownat +.Fn fstatat system call follows The Open Group Extended API Set 2 specification. .Sh HISTORY The From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 20:57:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AACE7106566C; Fri, 30 Dec 2011 20:57:36 +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 98EC58FC15; Fri, 30 Dec 2011 20:57:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKvaiu030275; Fri, 30 Dec 2011 20:57:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKva75030273; Fri, 30 Dec 2011 20:57:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302057.pBUKva75030273@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229028 - stable/8/lib/libc/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:57:36 -0000 Author: kib Date: Fri Dec 30 20:57:36 2011 New Revision: 229028 URL: http://svn.freebsd.org/changeset/base/229028 Log: MFC r227622: Fix typo. Modified: stable/8/lib/libc/sys/stat.2 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/sys/stat.2 ============================================================================== --- stable/8/lib/libc/sys/stat.2 Fri Dec 30 20:55:38 2011 (r229027) +++ stable/8/lib/libc/sys/stat.2 Fri Dec 30 20:57:36 2011 (r229028) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd November 17, 2011 .Dt STAT 2 .Os .Sh NAME @@ -405,7 +405,7 @@ and system calls are expected to conform to .St -p1003.1-90 . The -.Fn fchownat +.Fn fstatat system call follows The Open Group Extended API Set 2 specification. .Sh HISTORY The From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:00:03 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D0C4106564A; Fri, 30 Dec 2011 21:00:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 378C18FC08; Fri, 30 Dec 2011 21:00:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUL03DP030425; Fri, 30 Dec 2011 21:00:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUL02Rt030423; Fri, 30 Dec 2011 21:00:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302100.pBUL02Rt030423@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 21:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229029 - stable/9 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:00:03 -0000 Author: dim Date: Fri Dec 30 21:00:02 2011 New Revision: 229029 URL: http://svn.freebsd.org/changeset/base/229029 Log: MFC r227120: Make it possible to set CC and CXX (and optionally, AS and LD) in make.conf(5), while allowing the build32 stage on 64-bit architectures to still override them, so that stage can successfully build 32-bit compatibility libraries. Explanation: 1) The build32 stage sets environment variables CC, CXX, AS and LD for its sub-make, to add 32-bit specific flags (-m32 and such). 2) The sub-make reads sys.mk, encounters CC?= and CXX?= assignments, so does not alter them. 3) After some other stuff, sys.mk reads /etc/make.conf. When you have "CC=xxx" and "CXX=yyy" statements in there, they will *override* the build32-supplied CC/CXX values, nullifying the 32-bit specific flags. 4) Thus all objects get built as 64-bit anyway, and since LD is usually not set in make.conf, it still has the 32-bit flags! 5) Now, whenever something is linked, you will get a "ld: Relocatable linking with relocations from format elf64-x86-64-freebsd (foo.o) to format elf32-i386-freebsd (bar.o) is not supported" error. Fix this by adding "-ECC -ECXX -EAS -ELD" to the build32 sub-make invocation, which forces those environment variables to always override any assignment in makefiles. Thus making it possible to simply set: CC=my-cc CXX=my-c++ in your make.conf, or specify a path, even: CC=/usr/local/bin/other-cc CXX=/usr/local/bin/other-c++ Note this was never a problem on i386, since it has no build32 stage. Silence from: current@ Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Fri Dec 30 20:57:36 2011 (r229028) +++ stable/9/Makefile.inc1 Fri Dec 30 21:00:02 2011 (r229029) @@ -313,7 +313,8 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ + DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:01:15 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42D1E1065675; Fri, 30 Dec 2011 21:01:15 +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 EC30D8FC1F; Fri, 30 Dec 2011 21:01:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUL1Evi030500; Fri, 30 Dec 2011 21:01:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUL1Ech030498; Fri, 30 Dec 2011 21:01:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302101.pBUL1Ech030498@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 21:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229030 - stable/9/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:01:15 -0000 Author: kib Date: Fri Dec 30 21:01:14 2011 New Revision: 229030 URL: http://svn.freebsd.org/changeset/base/229030 Log: MFC r227816: Remove the wrong comment about ufs not being loadable. Note that only root filesystem module needs to be available before root is mounted. Modified: stable/9/sys/conf/NOTES Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Fri Dec 30 21:00:02 2011 (r229029) +++ stable/9/sys/conf/NOTES Fri Dec 30 21:01:14 2011 (r229030) @@ -965,11 +965,10 @@ options ZERO_COPY_SOCKETS # FILESYSTEM OPTIONS # -# Only the root, /usr, and /tmp filesystems need be statically -# compiled; everything else will be automatically loaded at mount -# time. (Exception: the UFS family--- FFS --- cannot -# currently be demand-loaded.) Some people still prefer to statically -# compile other filesystems as well. +# Only the root filesystem needs to be statically compiled or preloaded +# as module; everything else will be automatically loaded at mount +# time. Some people still prefer to statically compile other +# filesystems as well. # # NB: The PORTAL filesystem is known to be buggy, and WILL panic your # system if you attempt to do anything with it. It is included here From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:02:32 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEB811065670; Fri, 30 Dec 2011 21:02:32 +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 AD0638FC0C; Fri, 30 Dec 2011 21:02:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUL2WPY030587; Fri, 30 Dec 2011 21:02:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUL2WnN030585; Fri, 30 Dec 2011 21:02:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302102.pBUL2WnN030585@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 21:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229031 - stable/8/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:02:32 -0000 Author: kib Date: Fri Dec 30 21:02:32 2011 New Revision: 229031 URL: http://svn.freebsd.org/changeset/base/229031 Log: MFC r227816: Remove the wrong comment about ufs not being loadable. Note that only root filesystem module needs to be available before root is mounted. Modified: stable/8/sys/conf/NOTES Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Fri Dec 30 21:01:14 2011 (r229030) +++ stable/8/sys/conf/NOTES Fri Dec 30 21:02:32 2011 (r229031) @@ -947,11 +947,10 @@ options ZERO_COPY_SOCKETS # FILESYSTEM OPTIONS # -# Only the root, /usr, and /tmp filesystems need be statically -# compiled; everything else will be automatically loaded at mount -# time. (Exception: the UFS family--- FFS --- cannot -# currently be demand-loaded.) Some people still prefer to statically -# compile other filesystems as well. +# Only the root filesystem needs to be statically compiled or preloaded +# as module; everything else will be automatically loaded at mount +# time. Some people still prefer to statically compile other +# filesystems as well. # # NB: The PORTAL filesystem is known to be buggy, and WILL panic your # system if you attempt to do anything with it. It is included here From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:27:52 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DCE106566C; Fri, 30 Dec 2011 21:27:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60F658FC08; Fri, 30 Dec 2011 21:27:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULRq85031411; Fri, 30 Dec 2011 21:27:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULRqOY031409; Fri, 30 Dec 2011 21:27:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302127.pBULRqOY031409@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229033 - stable/9/usr.bin/make X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:27:52 -0000 Author: jilles Date: Fri Dec 30 21:27:51 2011 New Revision: 229033 URL: http://svn.freebsd.org/changeset/base/229033 Log: MFC r227121: make(1): obj dirs are physical paths so write `pwd -P` rather than `pwd`. Regular pwd may return a pathname containing symlinks, but make does not use such pathnames. Modified: stable/9/usr.bin/make/make.1 Directory Properties: stable/9/usr.bin/make/ (props changed) Modified: stable/9/usr.bin/make/make.1 ============================================================================== --- stable/9/usr.bin/make/make.1 Fri Dec 30 21:22:10 2011 (r229032) +++ stable/9/usr.bin/make/make.1 Fri Dec 30 21:27:51 2011 (r229033) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 29, 2008 +.Dd November 5, 2011 .Dt MAKE 1 .Os .Sh NAME @@ -631,7 +631,7 @@ The following directories are tried in o .Pp .Bl -enum -compact .It -${MAKEOBJDIRPREFIX}/`pwd` +${MAKEOBJDIRPREFIX}/`pwd -P` .It ${MAKEOBJDIR} .It @@ -639,7 +639,7 @@ obj.${MACHINE} .It obj .It -/usr/obj/`pwd` +/usr/obj/`pwd -P` .El .Pp The first directory that From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:33:20 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DE90106564A; Fri, 30 Dec 2011 21:33:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C1698FC12; Fri, 30 Dec 2011 21:33:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULXKuo031631; Fri, 30 Dec 2011 21:33:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULXKpH031629; Fri, 30 Dec 2011 21:33:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302133.pBULXKpH031629@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229034 - stable/8/usr.bin/make X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:33:20 -0000 Author: jilles Date: Fri Dec 30 21:33:19 2011 New Revision: 229034 URL: http://svn.freebsd.org/changeset/base/229034 Log: MFC r227121: make(1): obj dirs are physical paths so write `pwd -P` rather than `pwd`. Regular pwd may return a pathname containing symlinks, but make does not use such pathnames. Modified: stable/8/usr.bin/make/make.1 Directory Properties: stable/8/usr.bin/make/ (props changed) Modified: stable/8/usr.bin/make/make.1 ============================================================================== --- stable/8/usr.bin/make/make.1 Fri Dec 30 21:27:51 2011 (r229033) +++ stable/8/usr.bin/make/make.1 Fri Dec 30 21:33:19 2011 (r229034) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 29, 2008 +.Dd November 5, 2011 .Dt MAKE 1 .Os .Sh NAME @@ -601,7 +601,7 @@ The following directories are tried in o .Pp .Bl -enum -compact .It -${MAKEOBJDIRPREFIX}/`pwd` +${MAKEOBJDIRPREFIX}/`pwd -P` .It ${MAKEOBJDIR} .It @@ -609,7 +609,7 @@ obj.${MACHINE} .It obj .It -/usr/obj/`pwd` +/usr/obj/`pwd -P` .El .Pp The first directory that From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:46:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB56A106564A; Fri, 30 Dec 2011 21:46:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D96808FC0A; Fri, 30 Dec 2011 21:46:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULkU66032130; Fri, 30 Dec 2011 21:46:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULkUeK032128; Fri, 30 Dec 2011 21:46:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302146.pBULkUeK032128@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229035 - stable/7/usr.bin/make X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:46:31 -0000 Author: jilles Date: Fri Dec 30 21:46:30 2011 New Revision: 229035 URL: http://svn.freebsd.org/changeset/base/229035 Log: MFC r227121: make(1): obj dirs are physical paths so write `pwd -P` rather than `pwd`. Regular pwd may return a pathname containing symlinks, but make does not use such pathnames. Modified: stable/7/usr.bin/make/make.1 Directory Properties: stable/7/usr.bin/make/ (props changed) Modified: stable/7/usr.bin/make/make.1 ============================================================================== --- stable/7/usr.bin/make/make.1 Fri Dec 30 21:33:19 2011 (r229034) +++ stable/7/usr.bin/make/make.1 Fri Dec 30 21:46:30 2011 (r229035) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 29, 2008 +.Dd November 5, 2011 .Dt MAKE 1 .Os .Sh NAME @@ -601,7 +601,7 @@ The following directories are tried in o .Pp .Bl -enum -compact .It -${MAKEOBJDIRPREFIX}/`pwd` +${MAKEOBJDIRPREFIX}/`pwd -P` .It ${MAKEOBJDIR} .It @@ -609,7 +609,7 @@ obj.${MACHINE} .It obj .It -/usr/obj/`pwd` +/usr/obj/`pwd -P` .El .Pp The first directory that From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 21:50:17 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E0FF106566C; Fri, 30 Dec 2011 21:50:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 016818FC13; Fri, 30 Dec 2011 21:50:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULoGME032285; Fri, 30 Dec 2011 21:50:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULoGCo032283; Fri, 30 Dec 2011 21:50:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302150.pBULoGCo032283@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229036 - stable/9/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 21:50:17 -0000 Author: jilles Date: Fri Dec 30 21:50:16 2011 New Revision: 229036 URL: http://svn.freebsd.org/changeset/base/229036 Log: MFC r227122: sh(1): Improve documentation of field splitting. This describes the POSIX-compliant splitting algorithm that first appeared in 8.0. Modified: stable/9/bin/sh/sh.1 Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/sh.1 ============================================================================== --- stable/9/bin/sh/sh.1 Fri Dec 30 21:46:30 2011 (r229035) +++ stable/9/bin/sh/sh.1 Fri Dec 30 21:50:16 2011 (r229036) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 10, 2011 +.Dd November 5, 2011 .Dt SH 1 .Os .Sh NAME @@ -1160,6 +1160,11 @@ of alphabetics, numerics, and underscore The first letter of a variable name must not be numeric. A parameter can also be denoted by a number or a special character as explained below. +.Pp +Assignments are expanded differently from other words: +tilde expansion is also performed after the equals sign and after any colon +and usernames are also terminated by colons, +and field splitting and pathname expansion are not performed. .Ss Positional Parameters A positional parameter is a parameter denoted by a number greater than zero. The shell sets these initially to the values of its command line @@ -1273,11 +1278,15 @@ used in tilde expansion and as a default built-in. .It Va IFS Input Field Separators. -This is normally set to +The default value is .Aq space , .Aq tab , and -.Aq newline . +.Aq newline +in that order. +This default also applies if +.Va IFS +is unset, but not if it is set to the empty string. See the .Sx White Space Splitting section for more details. @@ -1423,12 +1432,12 @@ part of the name. If a parameter expansion occurs inside double-quotes: .Bl -enum .It -Pathname expansion is not performed on the results of the -expansion. -.It Field splitting is not performed on the results of the expansion, with the exception of the special parameter .Va @ . +.It +Pathname expansion is not performed on the results of the +expansion. .El .Pp In addition, a parameter expansion can be modified by using one of the @@ -1641,16 +1650,51 @@ and contain integer constants. .Pp The result of the expression is substituted in decimal. .Ss White Space Splitting (Field Splitting) -After parameter expansion, command substitution, and +In certain contexts, +after parameter expansion, command substitution, and arithmetic expansion the shell scans the results of expansions and substitutions that did not occur in double-quotes for field splitting and multiple fields can result. .Pp -The shell treats each character of the +Characters in +.Va IFS +that are whitespace +.Po +.Aq space , +.Aq tab , +and +.Aq newline +.Pc +are treated differently from other characters in +.Va IFS . +.Pp +Whitespace in +.Va IFS +at the beginning or end of a word is discarded. +.Pp +Subsequently, a field is delimited by either +.Bl -enum +.It +a non-whitespace character in +.Va IFS +with any whitespace in +.Va IFS +surrounding it, or +.It +one or more whitespace characters in +.Va IFS . +.El +.Pp +If a word ends with a non-whitespace character in +.Va IFS , +there is no empty field after this character. +.Pp +If no field is delimited, the word is discarded. +In particular, if a word consists solely of an unquoted substitution +and the result of the substitution is null, +it is removed by field splitting even if .Va IFS -variable as a delimiter and uses -the delimiters to split the results of parameter expansion and command -substitution into fields. +is null. .Ss Pathname Expansion (File Name Generation) Unless the .Fl f From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:07:05 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61CE2106566C; Fri, 30 Dec 2011 22:07:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F12F8FC15; Fri, 30 Dec 2011 22:07:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUM75qs032907; Fri, 30 Dec 2011 22:07:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUM75PQ032903; Fri, 30 Dec 2011 22:07:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302207.pBUM75PQ032903@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229037 - in stable/9: gnu/lib/libstdc++ lib/clang/include/llvm/Config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:07:05 -0000 Author: dim Date: Fri Dec 30 22:07:04 2011 New Revision: 229037 URL: http://svn.freebsd.org/changeset/base/229037 Log: MFC r227215: When one attempts to compile the tree with -march=i386, which also used to be gcc's default before r198344, calls to atomic builtins will not be expanded inline. Instead, they will be generated as calls to external functions (e.g. __sync_fetch_and_add_N), leading to linking errors later on. Put in a seatbelt that disables use of atomic builtins in libstdc++ and llvm, when tuning specifically for the real i386 CPU. This does not protect against all possible issues, but it is better than nothing. MFC r227538: LLVM uses atomic operations, which are not supported on i386 and GCC emits calls for them, rather than expanding them inline. Older FreeBSD versions compile for i386 by default and as such we end up with unresolved symbols when we build LLVM's TableGen utility as a build tool on them. Add the functions that GCC emits here, but don't bother to make them atomic. Such is not needed. Submitted by: marcel MFC r227636: Revert r227538, since it doesn't compile with clang at all (it doesn't allow the built-in operations to be redefined, at least not without excessive force). Instead, just disable LLVM's support for atomic operations for now. Nothing in either clang or the tablegen tools currently depends on it. This still allows users of head built before r198344 to upgrade to top-of-head seamlessly. Modified: stable/9/gnu/lib/libstdc++/config.h stable/9/lib/clang/include/llvm/Config/config.h stable/9/lib/clang/include/llvm/Config/llvm-config.h Directory Properties: stable/9/gnu/lib/ (props changed) stable/9/lib/clang/ (props changed) stable/9/tools/ (props changed) Modified: stable/9/gnu/lib/libstdc++/config.h ============================================================================== --- stable/9/gnu/lib/libstdc++/config.h Fri Dec 30 21:50:16 2011 (r229036) +++ stable/9/gnu/lib/libstdc++/config.h Fri Dec 30 22:07:04 2011 (r229037) @@ -671,7 +671,7 @@ /* #undef VERSION */ /* Define if builtin atomic operations are supported on this host. */ -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(__tune_i386__)) #define _GLIBCXX_ATOMIC_BUILTINS 1 #endif Modified: stable/9/lib/clang/include/llvm/Config/config.h ============================================================================== --- stable/9/lib/clang/include/llvm/Config/config.h Fri Dec 30 21:50:16 2011 (r229036) +++ stable/9/lib/clang/include/llvm/Config/config.h Fri Dec 30 22:07:04 2011 (r229037) @@ -552,7 +552,7 @@ /* #undef LLVM_ETCDIR */ /* Has gcc/MSVC atomic intrinsics */ -#define LLVM_HAS_ATOMICS 1 +#define LLVM_HAS_ATOMICS 0 /* Host triple we were built on */ /* #undef LLVM_HOSTTRIPLE */ Modified: stable/9/lib/clang/include/llvm/Config/llvm-config.h ============================================================================== --- stable/9/lib/clang/include/llvm/Config/llvm-config.h Fri Dec 30 21:50:16 2011 (r229036) +++ stable/9/lib/clang/include/llvm/Config/llvm-config.h Fri Dec 30 22:07:04 2011 (r229037) @@ -34,7 +34,7 @@ /* #undef LLVM_ETCDIR */ /* Has gcc/MSVC atomic intrinsics */ -#define LLVM_HAS_ATOMICS 1 +#define LLVM_HAS_ATOMICS 0 /* Host triple we were built on */ /* #undef LLVM_HOSTTRIPLE */ From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:07:16 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FEBA106564A; Fri, 30 Dec 2011 22:07:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7399E8FC08; Fri, 30 Dec 2011 22:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUM7GcE032948; Fri, 30 Dec 2011 22:07:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUM7GG6032946; Fri, 30 Dec 2011 22:07:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302207.pBUM7GG6032946@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 22:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229038 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:07:16 -0000 Author: jilles Date: Fri Dec 30 22:07:15 2011 New Revision: 229038 URL: http://svn.freebsd.org/changeset/base/229038 Log: MFC r227122: sh(1): Improve documentation of field splitting. This describes the POSIX-compliant splitting algorithm that first appeared in 8.0. Modified: stable/8/bin/sh/sh.1 Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/sh.1 ============================================================================== --- stable/8/bin/sh/sh.1 Fri Dec 30 22:07:04 2011 (r229037) +++ stable/8/bin/sh/sh.1 Fri Dec 30 22:07:15 2011 (r229038) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 24, 2011 +.Dd November 5, 2011 .Dt SH 1 .Os .Sh NAME @@ -1045,6 +1045,11 @@ of alphabetics, numerics, and underscore The first letter of a variable name must not be numeric. A parameter can also be denoted by a number or a special character as explained below. +.Pp +Assignments are expanded differently from other words: +tilde expansion is also performed after the equals sign and after any colon +and usernames are also terminated by colons, +and field splitting and pathname expansion are not performed. .Ss Positional Parameters A positional parameter is a parameter denoted by a number greater than zero. The shell sets these initially to the values of its command line @@ -1154,11 +1159,15 @@ used in tilde expansion and as a default built-in. .It Va IFS Input Field Separators. -This is normally set to +The default value is .Aq space , .Aq tab , and -.Aq newline . +.Aq newline +in that order. +This default also applies if +.Va IFS +is unset, but not if it is set to the empty string. See the .Sx White Space Splitting section for more details. @@ -1291,12 +1300,12 @@ part of the name. If a parameter expansion occurs inside double-quotes: .Bl -enum .It -Pathname expansion is not performed on the results of the -expansion. -.It Field splitting is not performed on the results of the expansion, with the exception of the special parameter .Va @ . +.It +Pathname expansion is not performed on the results of the +expansion. .El .Pp In addition, a parameter expansion can be modified by using one of the @@ -1495,16 +1504,51 @@ This is a bug. .Pp The result of the expression is substituted in decimal. .Ss White Space Splitting (Field Splitting) -After parameter expansion, command substitution, and +In certain contexts, +after parameter expansion, command substitution, and arithmetic expansion the shell scans the results of expansions and substitutions that did not occur in double-quotes for field splitting and multiple fields can result. .Pp -The shell treats each character of the +Characters in +.Va IFS +that are whitespace +.Po +.Aq space , +.Aq tab , +and +.Aq newline +.Pc +are treated differently from other characters in +.Va IFS . +.Pp +Whitespace in +.Va IFS +at the beginning or end of a word is discarded. +.Pp +Subsequently, a field is delimited by either +.Bl -enum +.It +a non-whitespace character in +.Va IFS +with any whitespace in +.Va IFS +surrounding it, or +.It +one or more whitespace characters in +.Va IFS . +.El +.Pp +If a word ends with a non-whitespace character in +.Va IFS , +there is no empty field after this character. +.Pp +If no field is delimited, the word is discarded. +In particular, if a word consists solely of an unquoted substitution +and the result of the substitution is null, +it is removed by field splitting even if .Va IFS -variable as a delimiter and uses -the delimiters to split the results of parameter expansion and command -substitution into fields. +is null. .Ss Pathname Expansion (File Name Generation) Unless the .Fl f From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:17:11 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C9111065670; Fri, 30 Dec 2011 22:17:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC9A8FC08; Fri, 30 Dec 2011 22:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMHBwt033305; Fri, 30 Dec 2011 22:17:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMHAT8033302; Fri, 30 Dec 2011 22:17:10 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302217.pBUMHAT8033302@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229039 - in stable/9/contrib/llvm/tools/clang: include/clang/Basic lib/Sema X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:17:11 -0000 Author: dim Date: Fri Dec 30 22:17:10 2011 New Revision: 229039 URL: http://svn.freebsd.org/changeset/base/229039 Log: MFC r227735: Pull in r144110 from upstream clang trunk: Mark the overloaded atomic builtins as having custom type checking, which they do. This avoids all of the default argument promotions that we (1) don't want, and (2) undo during that custom type checking, and makes sure that we don't run into trouble during template instantiation. Fixes llvm/clang PR11320. Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:07:15 2011 (r229038) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:17:10 2011 (r229039) @@ -480,111 +480,111 @@ BUILTIN(__builtin_alloca, "v*z" , "n") // FIXME: These assume that char -> i8, short -> i16, int -> i32, // long long -> i64. -BUILTIN(__sync_fetch_and_add, "v.", "") -BUILTIN(__sync_fetch_and_add_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_add_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_add_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_add_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_add_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_sub, "v.", "") -BUILTIN(__sync_fetch_and_sub_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_sub_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_sub_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_sub_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_or, "v.", "") -BUILTIN(__sync_fetch_and_or_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_or_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_or_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_or_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_or_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_and, "v.", "") -BUILTIN(__sync_fetch_and_and_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_and_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_and_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_and_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_and_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_xor, "v.", "") -BUILTIN(__sync_fetch_and_xor_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_xor_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_xor_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_xor_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLiD*LLLi.", "n") - - -BUILTIN(__sync_add_and_fetch, "v.", "") -BUILTIN(__sync_add_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_add_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_add_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_add_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_add_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_sub_and_fetch, "v.", "") -BUILTIN(__sync_sub_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_sub_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_sub_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_sub_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_or_and_fetch, "v.", "") -BUILTIN(__sync_or_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_or_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_or_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_or_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_or_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_and_and_fetch, "v.", "") -BUILTIN(__sync_and_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_and_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_and_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_and_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_and_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_xor_and_fetch, "v.", "") -BUILTIN(__sync_xor_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_xor_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_xor_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_xor_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_bool_compare_and_swap, "v.", "") -BUILTIN(__sync_bool_compare_and_swap_1, "bcD*cc.", "n") -BUILTIN(__sync_bool_compare_and_swap_2, "bsD*ss.", "n") -BUILTIN(__sync_bool_compare_and_swap_4, "biD*ii.", "n") -BUILTIN(__sync_bool_compare_and_swap_8, "bLLiD*LLiLLi.", "n") -BUILTIN(__sync_bool_compare_and_swap_16, "bLLLiD*LLLiLLLi.", "n") - -BUILTIN(__sync_val_compare_and_swap, "v.", "") -BUILTIN(__sync_val_compare_and_swap_1, "ccD*cc.", "n") -BUILTIN(__sync_val_compare_and_swap_2, "ssD*ss.", "n") -BUILTIN(__sync_val_compare_and_swap_4, "iiD*ii.", "n") -BUILTIN(__sync_val_compare_and_swap_8, "LLiLLiD*LLiLLi.", "n") -BUILTIN(__sync_val_compare_and_swap_16, "LLLiLLLiD*LLLiLLLi.", "n") - -BUILTIN(__sync_lock_test_and_set, "v.", "") -BUILTIN(__sync_lock_test_and_set_1, "ccD*c.", "n") -BUILTIN(__sync_lock_test_and_set_2, "ssD*s.", "n") -BUILTIN(__sync_lock_test_and_set_4, "iiD*i.", "n") -BUILTIN(__sync_lock_test_and_set_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_lock_release, "v.", "") -BUILTIN(__sync_lock_release_1, "vcD*.", "n") -BUILTIN(__sync_lock_release_2, "vsD*.", "n") -BUILTIN(__sync_lock_release_4, "viD*.", "n") -BUILTIN(__sync_lock_release_8, "vLLiD*.", "n") -BUILTIN(__sync_lock_release_16, "vLLLiD*.", "n") - -BUILTIN(__sync_swap, "v.", "") -BUILTIN(__sync_swap_1, "ccD*c.", "n") -BUILTIN(__sync_swap_2, "ssD*s.", "n") -BUILTIN(__sync_swap_4, "iiD*i.", "n") -BUILTIN(__sync_swap_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_swap_16, "LLLiLLLiD*LLLi.", "n") +BUILTIN(__sync_fetch_and_add, "v.", "t") +BUILTIN(__sync_fetch_and_add_1, "ccD*c.", "nt") +BUILTIN(__sync_fetch_and_add_2, "ssD*s.", "nt") +BUILTIN(__sync_fetch_and_add_4, "iiD*i.", "nt") +BUILTIN(__sync_fetch_and_add_8, "LLiLLiD*LLi.", "nt") +BUILTIN(__sync_fetch_and_add_16, "LLLiLLLiD*LLLi.", "nt") + +BUILTIN(__sync_fetch_and_sub, "v.", "t") +BUILTIN(__sync_fetch_and_sub_1, "ccD*c.", "nt") +BUILTIN(__sync_fetch_and_sub_2, "ssD*s.", "nt") +BUILTIN(__sync_fetch_and_sub_4, "iiD*i.", "nt") +BUILTIN(__sync_fetch_and_sub_8, "LLiLLiD*LLi.", "nt") +BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLiD*LLLi.", "nt") + +BUILTIN(__sync_fetch_and_or, "v.", "t") +BUILTIN(__sync_fetch_and_or_1, "ccD*c.", "nt") +BUILTIN(__sync_fetch_and_or_2, "ssD*s.", "nt") +BUILTIN(__sync_fetch_and_or_4, "iiD*i.", "nt") +BUILTIN(__sync_fetch_and_or_8, "LLiLLiD*LLi.", "nt") +BUILTIN(__sync_fetch_and_or_16, "LLLiLLLiD*LLLi.", "nt") + +BUILTIN(__sync_fetch_and_and, "v.", "t") +BUILTIN(__sync_fetch_and_and_1, "ccD*c.", "tn") +BUILTIN(__sync_fetch_and_and_2, "ssD*s.", "tn") +BUILTIN(__sync_fetch_and_and_4, "iiD*i.", "tn") +BUILTIN(__sync_fetch_and_and_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_fetch_and_and_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_fetch_and_xor, "v.", "t") +BUILTIN(__sync_fetch_and_xor_1, "ccD*c.", "tn") +BUILTIN(__sync_fetch_and_xor_2, "ssD*s.", "tn") +BUILTIN(__sync_fetch_and_xor_4, "iiD*i.", "tn") +BUILTIN(__sync_fetch_and_xor_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLiD*LLLi.", "tn") + + +BUILTIN(__sync_add_and_fetch, "v.", "t") +BUILTIN(__sync_add_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_add_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_add_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_add_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_add_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_sub_and_fetch, "v.", "t") +BUILTIN(__sync_sub_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_sub_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_sub_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_sub_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_or_and_fetch, "v.", "t") +BUILTIN(__sync_or_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_or_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_or_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_or_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_or_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_and_and_fetch, "v.", "t") +BUILTIN(__sync_and_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_and_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_and_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_and_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_and_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_xor_and_fetch, "v.", "t") +BUILTIN(__sync_xor_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_xor_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_xor_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_xor_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_bool_compare_and_swap, "v.", "t") +BUILTIN(__sync_bool_compare_and_swap_1, "bcD*cc.", "tn") +BUILTIN(__sync_bool_compare_and_swap_2, "bsD*ss.", "tn") +BUILTIN(__sync_bool_compare_and_swap_4, "biD*ii.", "tn") +BUILTIN(__sync_bool_compare_and_swap_8, "bLLiD*LLiLLi.", "tn") +BUILTIN(__sync_bool_compare_and_swap_16, "bLLLiD*LLLiLLLi.", "tn") + +BUILTIN(__sync_val_compare_and_swap, "v.", "t") +BUILTIN(__sync_val_compare_and_swap_1, "ccD*cc.", "tn") +BUILTIN(__sync_val_compare_and_swap_2, "ssD*ss.", "tn") +BUILTIN(__sync_val_compare_and_swap_4, "iiD*ii.", "tn") +BUILTIN(__sync_val_compare_and_swap_8, "LLiLLiD*LLiLLi.", "tn") +BUILTIN(__sync_val_compare_and_swap_16, "LLLiLLLiD*LLLiLLLi.", "tn") + +BUILTIN(__sync_lock_test_and_set, "v.", "t") +BUILTIN(__sync_lock_test_and_set_1, "ccD*c.", "tn") +BUILTIN(__sync_lock_test_and_set_2, "ssD*s.", "tn") +BUILTIN(__sync_lock_test_and_set_4, "iiD*i.", "tn") +BUILTIN(__sync_lock_test_and_set_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_lock_release, "v.", "t") +BUILTIN(__sync_lock_release_1, "vcD*.", "tn") +BUILTIN(__sync_lock_release_2, "vsD*.", "tn") +BUILTIN(__sync_lock_release_4, "viD*.", "tn") +BUILTIN(__sync_lock_release_8, "vLLiD*.", "tn") +BUILTIN(__sync_lock_release_16, "vLLLiD*.", "tn") + +BUILTIN(__sync_swap, "v.", "t") +BUILTIN(__sync_swap_1, "ccD*c.", "tn") +BUILTIN(__sync_swap_2, "ssD*s.", "tn") +BUILTIN(__sync_swap_4, "iiD*i.", "tn") +BUILTIN(__sync_swap_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_swap_16, "LLLiLLLiD*LLLi.", "tn") BUILTIN(__atomic_load, "v.", "t") BUILTIN(__atomic_store, "v.", "t") Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Fri Dec 30 22:07:15 2011 (r229038) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Fri Dec 30 22:17:10 2011 (r229039) @@ -803,14 +803,6 @@ Sema::SemaBuiltinAtomicOverloaded(ExprRe for (unsigned i = 0; i != NumFixed; ++i) { ExprResult Arg = TheCall->getArg(i+1); - // If the argument is an implicit cast, then there was a promotion due to - // "...", just remove it now. - if (ImplicitCastExpr *ICE = dyn_cast(Arg.get())) { - Arg = ICE->getSubExpr(); - ICE->setSubExpr(0); - TheCall->setArg(i+1, Arg.get()); - } - // GCC does an implicit conversion to the pointer or integer ValType. This // can fail in some cases (1i -> int**), check for this error case now. // Initialize the argument. From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:27:26 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC088106564A; Fri, 30 Dec 2011 22:27:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A97488FC08; Fri, 30 Dec 2011 22:27:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMRQ33033705; Fri, 30 Dec 2011 22:27:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMRQfc033703; Fri, 30 Dec 2011 22:27:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302227.pBUMRQfc033703@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229040 - stable/9/contrib/llvm/tools/clang/include/clang/Basic X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:27:26 -0000 Author: dim Date: Fri Dec 30 22:27:26 2011 New Revision: 229040 URL: http://svn.freebsd.org/changeset/base/229040 Log: MFC r227736: Pull in r144237 from upstream clang trunk: Fix the signature of __sigsetjmp and sigsetjmp. This eliminates incorrect warnings about the prototypes of these functions. Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:17:10 2011 (r229039) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:27:26 2011 (r229040) @@ -679,9 +679,9 @@ LIBBUILTIN(vfork, "i", "fj", // it here to avoid having two identical LIBBUILTIN entries. #undef setjmp LIBBUILTIN(_setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) -LIBBUILTIN(__sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES) +LIBBUILTIN(__sigsetjmp, "iSJi", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) -LIBBUILTIN(sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES) +LIBBUILTIN(sigsetjmp, "iSJi", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(setjmp_syscall, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(savectx, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(qsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:30:21 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8D35106564A; Fri, 30 Dec 2011 22:30:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D40758FC14; Fri, 30 Dec 2011 22:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMULRs033861; Fri, 30 Dec 2011 22:30:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMULC6033851; Fri, 30 Dec 2011 22:30:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302230.pBUMULC6033851@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229041 - in stable/9/contrib/llvm/tools/clang: include/clang/AST include/clang/Basic include/clang/Serialization lib/AST lib/Sema lib/Serialization X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:30:22 -0000 Author: dim Date: Fri Dec 30 22:30:21 2011 New Revision: 229041 URL: http://svn.freebsd.org/changeset/base/229041 Log: MFC r227737: Pull in r144505 from upstream clang trunk: Fix the signature of the getcontext builtin, eliminating incorrect warnings about its prototype. This also adds a -W(no-)builtin-requires-header option, which can be used to enable or disable warnings of this kind. Modified: stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h Fri Dec 30 22:30:21 2011 (r229041) @@ -229,6 +229,9 @@ class ASTContext : public llvm::RefCount /// \brief The type for the C sigjmp_buf type. TypeDecl *sigjmp_bufDecl; + /// \brief The type for the C ucontext_t type. + TypeDecl *ucontext_tDecl; + /// \brief Type for the Block descriptor for Blocks CodeGen. /// /// Since this is only used for generation of debug info, it is not @@ -955,6 +958,18 @@ public: return QualType(); } + /// \brief Set the type for the C ucontext_t type. + void setucontext_tDecl(TypeDecl *ucontext_tDecl) { + this->ucontext_tDecl = ucontext_tDecl; + } + + /// \brief Retrieve the C ucontext_t type. + QualType getucontext_tType() const { + if (ucontext_tDecl) + return getTypeDeclType(ucontext_tDecl); + return QualType(); + } + /// \brief The result type of logical operations, '<', '>', '!=', etc. QualType getLogicalOperationType() const { return getLangOptions().CPlusPlus ? BoolTy : IntTy; @@ -1099,7 +1114,8 @@ public: enum GetBuiltinTypeError { GE_None, //< No error GE_Missing_stdio, //< Missing a type from - GE_Missing_setjmp //< Missing a type from + GE_Missing_setjmp, //< Missing a type from + GE_Missing_ucontext //< Missing a type from }; /// GetBuiltinType - Return the type for the specified builtin. If Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:30:21 2011 (r229041) @@ -39,6 +39,7 @@ // P -> FILE // J -> jmp_buf // SJ -> sigjmp_buf +// K -> ucontext_t // . -> "...". This may only occur at the end of the function list. // // Types may be prefixed with the following modifiers: @@ -685,7 +686,7 @@ LIBBUILTIN(sigsetjmp, "iSJi", "fj", LIBBUILTIN(setjmp_syscall, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(savectx, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(qsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) -LIBBUILTIN(getcontext, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) +LIBBUILTIN(getcontext, "iK*", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(_longjmp, "vJi", "fr", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(siglongjmp, "vSJi", "fr", "setjmp.h", ALL_LANGUAGES) Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td Fri Dec 30 22:30:21 2011 (r229041) @@ -26,6 +26,7 @@ def : DiagGroup<"attributes">; def : DiagGroup<"bad-function-cast">; def Availability : DiagGroup<"availability">; def BoolConversions : DiagGroup<"bool-conversions">; +def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">; def CXXCompat: DiagGroup<"c++-compat">; def CastAlign : DiagGroup<"cast-align">; def : DiagGroup<"cast-qual">; Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Dec 30 22:30:21 2011 (r229041) @@ -254,10 +254,16 @@ def note_please_include_header : Note< def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">; def warn_implicit_decl_requires_stdio : Warning< "declaration of built-in function '%0' requires inclusion of the header " - "">; + "">, + InGroup; def warn_implicit_decl_requires_setjmp : Warning< "declaration of built-in function '%0' requires inclusion of the header " - "">; + "">, + InGroup; +def warn_implicit_decl_requires_ucontext : Warning< + "declaration of built-in function '%0' requires inclusion of the header " + "">, + InGroup; def warn_redecl_library_builtin : Warning< "incompatible redeclaration of library function %0">; def err_builtin_definition : Error<"definition of builtin function %0">; Modified: stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h Fri Dec 30 22:30:21 2011 (r229041) @@ -677,7 +677,9 @@ namespace clang { /// \brief Objective-C "Class" redefinition type SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 7, /// \brief Objective-C "SEL" redefinition type - SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 8 + SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 8, + /// \brief C ucontext_t typedef type + SPECIAL_TYPE_UCONTEXT_T = 9 }; /// \brief The number of special type IDs. Modified: stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -227,8 +227,9 @@ ASTContext::ASTContext(LangOptions& LOpt ObjCIdDecl(0), ObjCSelDecl(0), ObjCClassDecl(0), CFConstantStringTypeDecl(0), ObjCInstanceTypeDecl(0), FILEDecl(0), - jmp_bufDecl(0), sigjmp_bufDecl(0), BlockDescriptorType(0), - BlockDescriptorExtendedType(0), cudaConfigureCallDecl(0), + jmp_bufDecl(0), sigjmp_bufDecl(0), ucontext_tDecl(0), + BlockDescriptorType(0), BlockDescriptorExtendedType(0), + cudaConfigureCallDecl(0), NullTypeSourceInfo(QualType()), SourceMgr(SM), LangOpts(LOpts), AddrSpaceMap(0), Target(t), PrintingPolicy(LOpts), @@ -6293,6 +6294,15 @@ static QualType DecodeTypeFromStr(const return QualType(); } break; + case 'K': + assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'K'!"); + Type = Context.getucontext_tType(); + + if (Type.isNull()) { + Error = ASTContext::GE_Missing_ucontext; + return QualType(); + } + break; } // If there are modifiers and if we're allowed to parse them, go for it. Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -1305,6 +1305,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(Ide Diag(Loc, diag::warn_implicit_decl_requires_setjmp) << Context.BuiltinInfo.GetName(BID); return 0; + + case ASTContext::GE_Missing_ucontext: + if (ForRedeclaration) + Diag(Loc, diag::warn_implicit_decl_requires_ucontext) + << Context.BuiltinInfo.GetName(BID); + return 0; } if (!ForRedeclaration && Context.BuiltinInfo.isPredefinedLibFunction(BID)) { @@ -3635,6 +3641,8 @@ Sema::ActOnTypedefNameDecl(Scope *S, Dec Context.setjmp_bufDecl(NewTD); else if (II->isStr("sigjmp_buf")) Context.setsigjmp_bufDecl(NewTD); + else if (II->isStr("ucontext_t")) + Context.setucontext_tDecl(NewTD); else if (II->isStr("__builtin_va_list")) Context.setBuiltinVaListType(Context.getTypedefType(NewTD)); } Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -2659,6 +2659,24 @@ void ASTReader::InitializeContext() { if (Context.ObjCSelRedefinitionType.isNull()) Context.ObjCSelRedefinitionType = GetType(ObjCSelRedef); } + + if (unsigned Ucontext_t = SpecialTypes[SPECIAL_TYPE_UCONTEXT_T]) { + QualType Ucontext_tType = GetType(Ucontext_t); + if (Ucontext_tType.isNull()) { + Error("ucontext_t type is NULL"); + return; + } + + if (!Context.ucontext_tDecl) { + if (const TypedefType *Typedef = Ucontext_tType->getAs()) + Context.setucontext_tDecl(Typedef->getDecl()); + else { + const TagType *Tag = Ucontext_tType->getAs(); + assert(Tag && "Invalid ucontext_t type in AST file"); + Context.setucontext_tDecl(Tag->getDecl()); + } + } + } } ReadPragmaDiagnosticMappings(Context.getDiagnostics()); Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -2994,6 +2994,7 @@ void ASTWriter::WriteASTCore(Sema &SemaR AddTypeRef(Context.ObjCIdRedefinitionType, SpecialTypes); AddTypeRef(Context.ObjCClassRedefinitionType, SpecialTypes); AddTypeRef(Context.ObjCSelRedefinitionType, SpecialTypes); + AddTypeRef(Context.getucontext_tType(), SpecialTypes); // Keep writing types and declarations until all types and // declarations have been written. From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:40:18 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035BB1065673; Fri, 30 Dec 2011 22:40:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1B268FC08; Fri, 30 Dec 2011 22:40:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMeHiE034244; Fri, 30 Dec 2011 22:40:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMeHSI034226; Fri, 30 Dec 2011 22:40:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302240.pBUMeHSI034226@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229042 - in stable/9: contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/Target/ARM contrib/llvm/lib/Target/CppBackend ... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:40:18 -0000 Author: dim Date: Fri Dec 30 22:40:17 2011 New Revision: 229042 URL: http://svn.freebsd.org/changeset/base/229042 Log: MFC r228379: Upgrade our copy of llvm/clang to 3.0 release. Release notes can be found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html MFC r228383: Use the correct upstream revision number for llvm/clang 3.0 release. The r145546 revision is from branches/release_30, the r145349 revision is from tags/RELEASE_30/final. Added: stable/9/lib/clang/include/MipsGenCodeEmitter.inc - copied unchanged from r228379, head/lib/clang/include/MipsGenCodeEmitter.inc Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/9/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/9/lib/clang/include/clang/Basic/Version.inc stable/9/lib/clang/libllvmmipscodegen/Makefile Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/lib/clang/ (props changed) Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -527,18 +527,20 @@ bool CompileUnit::addConstantValue(DIE * // Get the raw data form of the large APInt. const APInt Val = CI->getValue(); - const char *Ptr = (const char*)Val.getRawData(); + const uint64_t *Ptr64 = Val.getRawData(); int NumBytes = Val.getBitWidth() / 8; // 8 bits per byte. bool LittleEndian = Asm->getTargetData().isLittleEndian(); - int Incr = (LittleEndian ? 1 : -1); - int Start = (LittleEndian ? 0 : NumBytes - 1); - int Stop = (LittleEndian ? NumBytes : -1); // Output the constant to DWARF one byte at a time. - for (; Start != Stop; Start += Incr) - addUInt(Block, 0, dwarf::DW_FORM_data1, - (unsigned char)0xFF & Ptr[Start]); + for (int i = 0; i < NumBytes; i++) { + uint8_t c; + if (LittleEndian) + c = Ptr64[i / 8] >> (8 * (i & 7)); + else + c = Ptr64[(NumBytes - 1 - i) / 8] >> (8 * ((NumBytes - 1 - i) & 7)); + addUInt(Block, 0, dwarf::DW_FORM_data1, c); + } addBlock(Die, dwarf::DW_AT_const_value, 0, Block); return true; Modified: stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -119,7 +119,8 @@ LLVMTargetMachine::LLVMTargetMachine(con // we'll crash later. // Provide the user with a useful error message about what's wrong. assert(AsmInfo && "MCAsmInfo not initialized." - "Make sure you include the correct TargetSelect.h!"); + "Make sure you include the correct TargetSelect.h" + "and that InitializeAllTargetMCs() is being invoked!"); } bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -2034,14 +2034,17 @@ bool SelectionDAGBuilder::handleJTSwitch return false; APInt Range = ComputeRange(First, Last); - double Density = TSize.roundToDouble() / Range.roundToDouble(); - if (Density < 0.4) + // The density is TSize / Range. Require at least 40%. + // It should not be possible for IntTSize to saturate for sane code, but make + // sure we handle Range saturation correctly. + uint64_t IntRange = Range.getLimitedValue(UINT64_MAX/10); + uint64_t IntTSize = TSize.getLimitedValue(UINT64_MAX/10); + if (IntTSize * 10 < IntRange * 4) return false; DEBUG(dbgs() << "Lowering jump table\n" << "First entry: " << First << ". Last entry: " << Last << '\n' - << "Range: " << Range - << ". Size: " << TSize << ". Density: " << Density << "\n\n"); + << "Range: " << Range << ". Size: " << TSize << ".\n\n"); // Get the MachineFunction which holds the current MBB. This is used when // inserting any additional MBBs necessary to represent the switch. Modified: stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -506,7 +506,9 @@ getExprForDwarfGlobalReference(const Glo // Add information about the stub reference to MachOMMI so that the stub // gets emitted by the asmprinter. MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym); + MachineModuleInfoImpl::StubValueTy &StubSym = + GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) : + MachOMMI.getGVStubEntry(SSym); if (StubSym.getPointer() == 0) { MCSymbol *Sym = Mang->getSymbol(GV); StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage()); @@ -534,7 +536,9 @@ getCFIPersonalitySymbol(const GlobalValu // Add information about the stub reference to MachOMMI so that the stub // gets emitted by the asmprinter. MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym); + MachineModuleInfoImpl::StubValueTy &StubSym = + GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) : + MachOMMI.getGVStubEntry(SSym); if (StubSym.getPointer() == 0) { MCSymbol *Sym = Mang->getSymbol(GV); StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage()); Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -63,6 +63,13 @@ ARMBaseRegisterInfo::ARMBaseRegisterInfo const unsigned* ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + bool ghcCall = false; + + if (MF) { + const Function *F = MF->getFunction(); + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); + } + static const unsigned CalleeSavedRegs[] = { ARM::LR, ARM::R11, ARM::R10, ARM::R9, ARM::R8, ARM::R7, ARM::R6, ARM::R5, ARM::R4, @@ -82,7 +89,13 @@ ARMBaseRegisterInfo::getCalleeSavedRegs( ARM::D11, ARM::D10, ARM::D9, ARM::D8, 0 }; - return STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs; + + static const unsigned GhcCalleeSavedRegs[] = { + 0 + }; + + return ghcCall ? GhcCalleeSavedRegs : + STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs; } BitVector ARMBaseRegisterInfo:: Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td Fri Dec 30 22:40:17 2011 (r229042) @@ -82,6 +82,25 @@ def RetFastCC_ARM_APCS : CallingConv<[ CCDelegateTo ]>; +//===----------------------------------------------------------------------===// +// ARM APCS Calling Convention for GHC +//===----------------------------------------------------------------------===// + +def CC_ARM_APCS_GHC : CallingConv<[ + // Handle all vector types as either f64 or v2f64. + CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>, + CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType>, + + CCIfType<[v2f64], CCAssignToReg<[Q4, Q5]>>, + CCIfType<[f64], CCAssignToReg<[D8, D9, D10, D11]>>, + CCIfType<[f32], CCAssignToReg<[S16, S17, S18, S19, S20, S21, S22, S23]>>, + + // Promote i8/i16 arguments to i32. + CCIfType<[i8, i16], CCPromoteToType>, + + // Pass in STG registers: Base, Sp, Hp, R1, R2, R3, R4, SpLim + CCIfType<[i32], CCAssignToReg<[R4, R5, R6, R7, R8, R9, R10, R11]>> +]>; //===----------------------------------------------------------------------===// // ARM AAPCS (EABI) Calling Convention, common parts Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -1548,6 +1548,11 @@ CCAssignFn *ARMFastISel::CCAssignFnForCa return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS); case CallingConv::ARM_APCS: return (Return ? RetCC_ARM_APCS: CC_ARM_APCS); + case CallingConv::GHC: + if (Return) + llvm_unreachable("Can't return in GHC call convention"); + else + return CC_ARM_APCS_GHC; } } Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -15,6 +15,8 @@ #include "ARMBaseInstrInfo.h" #include "ARMBaseRegisterInfo.h" #include "ARMMachineFunctionInfo.h" +#include "llvm/CallingConv.h" +#include "llvm/Function.h" #include "MCTargetDesc/ARMAddressingModes.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" @@ -139,6 +141,10 @@ void ARMFrameLowering::emitPrologue(Mach unsigned GPRCS1Size = 0, GPRCS2Size = 0, DPRCSSize = 0; int FramePtrSpillFI = 0; + // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. + if (MF.getFunction()->getCallingConv() == CallingConv::GHC) + return; + // Allocate the vararg register save area. This is not counted in NumBytes. if (VARegSaveSize) emitSPUpdate(isARM, MBB, MBBI, dl, TII, -VARegSaveSize, @@ -326,6 +332,10 @@ void ARMFrameLowering::emitEpilogue(Mach int NumBytes = (int)MFI->getStackSize(); unsigned FramePtr = RegInfo->getFrameRegister(MF); + // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. + if (MF.getFunction()->getCallingConv() == CallingConv::GHC) + return; + if (!AFI->hasStackFrame()) { if (NumBytes != 0) emitSPUpdate(isARM, MBB, MBBI, dl, TII, NumBytes); Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -1091,6 +1091,8 @@ CCAssignFn *ARMTargetLowering::CCAssignF return (Return ? RetCC_ARM_AAPCS : CC_ARM_AAPCS); case CallingConv::ARM_APCS: return (Return ? RetCC_ARM_APCS : CC_ARM_APCS); + case CallingConv::GHC: + return (Return ? RetCC_ARM_APCS : CC_ARM_APCS_GHC); } } Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td Fri Dec 30 22:40:17 2011 (r229042) @@ -1538,8 +1538,7 @@ multiclass thumb2_ld_multgetName()); Out << "\", " << (load->isVolatile() ? "true" : "false" ) << ", " << bbname << ");"; + if (load->getAlignment()) + nl(Out) << iName << "->setAlignment(" + << load->getAlignment() << ");"; + if (load->isAtomic()) { + StringRef Ordering = ConvertAtomicOrdering(load->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(load->getSynchScope()); + nl(Out) << iName << "->setAtomic(" + << Ordering << ", " << CrossThread << ");"; + } break; } case Instruction::Store: { const StoreInst* store = cast(I); - Out << " new StoreInst(" + Out << "StoreInst* " << iName << " = new StoreInst(" << opNames[0] << ", " << opNames[1] << ", " << (store->isVolatile() ? "true" : "false") << ", " << bbname << ");"; + if (store->getAlignment()) + nl(Out) << iName << "->setAlignment(" + << store->getAlignment() << ");"; + if (store->isAtomic()) { + StringRef Ordering = ConvertAtomicOrdering(store->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(store->getSynchScope()); + nl(Out) << iName << "->setAtomic(" + << Ordering << ", " << CrossThread << ");"; + } break; } case Instruction::GetElementPtr: { @@ -1447,6 +1486,60 @@ void CppWriter::printInstruction(const I Out << "\", " << bbname << ");"; break; } + case Instruction::Fence: { + const FenceInst *fi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(fi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope()); + Out << "FenceInst* " << iName + << " = new FenceInst(mod->getContext(), " + << Ordering << ", " << CrossThread << ", " << bbname + << ");"; + break; + } + case Instruction::AtomicCmpXchg: { + const AtomicCmpXchgInst *cxi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(cxi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(cxi->getSynchScope()); + Out << "AtomicCmpXchgInst* " << iName + << " = new AtomicCmpXchgInst(" + << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", " + << Ordering << ", " << CrossThread << ", " << bbname + << ");"; + nl(Out) << iName << "->setName(\""; + printEscapedString(cxi->getName()); + Out << "\");"; + break; + } + case Instruction::AtomicRMW: { + const AtomicRMWInst *rmwi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(rmwi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(rmwi->getSynchScope()); + StringRef Operation; + switch (rmwi->getOperation()) { + case AtomicRMWInst::Xchg: Operation = "AtomicRMWInst::Xchg"; break; + case AtomicRMWInst::Add: Operation = "AtomicRMWInst::Add"; break; + case AtomicRMWInst::Sub: Operation = "AtomicRMWInst::Sub"; break; + case AtomicRMWInst::And: Operation = "AtomicRMWInst::And"; break; + case AtomicRMWInst::Nand: Operation = "AtomicRMWInst::Nand"; break; + case AtomicRMWInst::Or: Operation = "AtomicRMWInst::Or"; break; + case AtomicRMWInst::Xor: Operation = "AtomicRMWInst::Xor"; break; + case AtomicRMWInst::Max: Operation = "AtomicRMWInst::Max"; break; + case AtomicRMWInst::Min: Operation = "AtomicRMWInst::Min"; break; + case AtomicRMWInst::UMax: Operation = "AtomicRMWInst::UMax"; break; + case AtomicRMWInst::UMin: Operation = "AtomicRMWInst::UMin"; break; + case AtomicRMWInst::BAD_BINOP: llvm_unreachable("Bad atomic operation"); + } + Out << "AtomicRMWInst* " << iName + << " = new AtomicRMWInst(" + << Operation << ", " + << opNames[0] << ", " << opNames[1] << ", " + << Ordering << ", " << CrossThread << ", " << bbname + << ");"; + nl(Out) << iName << "->setName(\""; + printEscapedString(rmwi->getName()); + Out << "\");"; + break; + } } DefinedValues.insert(I); nl(Out); @@ -1623,7 +1716,9 @@ void CppWriter::printFunctionBody(const Out << "Value* " << getCppName(AI) << " = args++;"; nl(Out); if (AI->hasName()) { - Out << getCppName(AI) << "->setName(\"" << AI->getName() << "\");"; + Out << getCppName(AI) << "->setName(\""; + printEscapedString(AI->getName()); + Out << "\");"; nl(Out); } } Modified: stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Fri Dec 30 22:40:17 2011 (r229042) @@ -39,51 +39,51 @@ def imm32_63 : ImmLeaf func, bits<5> _rs, string instr_asm, SDNode OpNode, PatFrag PF>: - FR<0x00, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$b, shamt_64:$c), - !strconcat(instr_asm, "\t$dst, $b, $c"), - [(set CPU64Regs:$dst, (OpNode CPU64Regs:$b, (i64 PF:$c)))], + FR<0x00, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rt, shamt_64:$shamt), + !strconcat(instr_asm, "\t$rd, $rt, $shamt"), + [(set CPU64Regs:$rd, (OpNode CPU64Regs:$rt, (i64 PF:$shamt)))], IIAlu> { let rs = _rs; } class LogicR_shift_rotate_reg64 func, bits<5> _shamt, string instr_asm, SDNode OpNode>: - FR<0x00, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$c, CPU64Regs:$b), - !strconcat(instr_asm, "\t$dst, $b, $c"), - [(set CPU64Regs:$dst, (OpNode CPU64Regs:$b, CPU64Regs:$c))], IIAlu> { + FR<0x00, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rs, CPU64Regs:$rt), + !strconcat(instr_asm, "\t$rd, $rt, $rs"), + [(set CPU64Regs:$rd, (OpNode CPU64Regs:$rt, CPU64Regs:$rs))], IIAlu> { let shamt = _shamt; } // Mul, Div -let Defs = [HI64, LO64] in { +let rd = 0, shamt = 0, Defs = [HI64, LO64] in { let isCommutable = 1 in class Mul64 func, string instr_asm, InstrItinClass itin>: - FR<0x00, func, (outs), (ins CPU64Regs:$a, CPU64Regs:$b), - !strconcat(instr_asm, "\t$a, $b"), [], itin>; + FR<0x00, func, (outs), (ins CPU64Regs:$rs, CPU64Regs:$rt), + !strconcat(instr_asm, "\t$rs, $rt"), [], itin>; class Div64 func, string instr_asm, InstrItinClass itin>: - FR<0x00, func, (outs), (ins CPU64Regs:$a, CPU64Regs:$b), - !strconcat(instr_asm, "\t$$zero, $a, $b"), - [(op CPU64Regs:$a, CPU64Regs:$b)], itin>; + FR<0x00, func, (outs), (ins CPU64Regs:$rs, CPU64Regs:$rt), + !strconcat(instr_asm, "\t$$zero, $rs, $rt"), + [(op CPU64Regs:$rs, CPU64Regs:$rt)], itin>; } // Move from Hi/Lo let shamt = 0 in { let rs = 0, rt = 0 in class MoveFromLOHI64 func, string instr_asm>: - FR<0x00, func, (outs CPU64Regs:$dst), (ins), - !strconcat(instr_asm, "\t$dst"), [], IIHiLo>; + FR<0x00, func, (outs CPU64Regs:$rd), (ins), + !strconcat(instr_asm, "\t$rd"), [], IIHiLo>; let rt = 0, rd = 0 in class MoveToLOHI64 func, string instr_asm>: - FR<0x00, func, (outs), (ins CPU64Regs:$src), - !strconcat(instr_asm, "\t$src"), [], IIHiLo>; + FR<0x00, func, (outs), (ins CPU64Regs:$rs), + !strconcat(instr_asm, "\t$rs"), [], IIHiLo>; } // Count Leading Ones/Zeros in Word class CountLeading64 func, string instr_asm, list pattern>: - FR<0x1c, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$src), - !strconcat(instr_asm, "\t$dst, $src"), pattern, IIAlu>, + FR<0x1c, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rs), + !strconcat(instr_asm, "\t$rd, $rs"), pattern, IIAlu>, Requires<[HasBitCount]> { let shamt = 0; let rt = rd; @@ -180,9 +180,9 @@ let Uses = [LO64] in /// Count Leading def DCLZ : CountLeading64<0x24, "dclz", - [(set CPU64Regs:$dst, (ctlz CPU64Regs:$src))]>; + [(set CPU64Regs:$rd, (ctlz CPU64Regs:$rs))]>; def DCLO : CountLeading64<0x25, "dclo", - [(set CPU64Regs:$dst, (ctlz (not CPU64Regs:$src)))]>; + [(set CPU64Regs:$rd, (ctlz (not CPU64Regs:$rs)))]>; //===----------------------------------------------------------------------===// // Arbitrary patterns that map to one or more instructions Modified: stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -105,6 +105,9 @@ class MipsCodeEmitter : public MachineFu unsigned getRelocation(const MachineInstr &MI, const MachineOperand &MO) const; + unsigned getMemEncoding(const MachineInstr &MI, unsigned OpNo) const; + unsigned getSizeExtEncoding(const MachineInstr &MI, unsigned OpNo) const; + unsigned getSizeInsEncoding(const MachineInstr &MI, unsigned OpNo) const; }; } @@ -153,6 +156,28 @@ unsigned MipsCodeEmitter::getRelocation( return Mips::reloc_mips_lo; } +unsigned MipsCodeEmitter::getMemEncoding(const MachineInstr &MI, + unsigned OpNo) const { + // Base register is encoded in bits 20-16, offset is encoded in bits 15-0. + assert(MI.getOperand(OpNo).isReg()); + unsigned RegBits = getMachineOpValue(MI, MI.getOperand(OpNo)) << 16; + return + (getMachineOpValue(MI, MI.getOperand(OpNo+1)) & 0xFFFF) | RegBits; +} + +unsigned MipsCodeEmitter::getSizeExtEncoding(const MachineInstr &MI, + unsigned OpNo) const { + // size is encoded as size-1. + return getMachineOpValue(MI, MI.getOperand(OpNo)) - 1; +} + +unsigned MipsCodeEmitter::getSizeInsEncoding(const MachineInstr &MI, + unsigned OpNo) const { + // size is encoded as pos+size-1. + return getMachineOpValue(MI, MI.getOperand(OpNo-1)) + + getMachineOpValue(MI, MI.getOperand(OpNo)) - 1; +} + /// getMachineOpValue - Return binary encoding of operand. If the machine /// operand requires relocation, record the relocation and return zero. unsigned MipsCodeEmitter::getMachineOpValue(const MachineInstr &MI, @@ -238,8 +263,4 @@ FunctionPass *llvm::createMipsJITCodeEmi return new MipsCodeEmitter(TM, JCE); } -unsigned MipsCodeEmitter::getBinaryCodeForInstr(const MachineInstr &MI) const { - // this function will be automatically generated by the CodeEmitterGenerator - // using TableGen - return 0; -} +#include "MipsGenCodeEmitter.inc" Modified: stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td Fri Dec 30 22:40:17 2011 (r229042) @@ -76,14 +76,16 @@ def IsNotSingleFloat : Predicate<"!Subta // FP load. class FPLoad op, string opstr, PatFrag FOp, RegisterClass RC, Operand MemOpnd>: - FFI; + FMem; // FP store. class FPStore op, string opstr, PatFrag FOp, RegisterClass RC, Operand MemOpnd>: - FFI; + FMem; // Instructions that convert an FP value to 32-bit fixed point. multiclass FFR1_W_M funct, string opstr> { @@ -158,22 +160,28 @@ defm FSQRT : FFR1P_M<0x4, "sqrt", fsqr // stores, and moves between floating-point and integer registers. // When defining instructions, we reference all 32-bit registers, // regardless of register aliasing. -let fd = 0 in { - /// Move Control Registers From/To CPU Registers - def CFC1 : FFR<0x11, 0x0, 0x2, (outs CPURegs:$rt), (ins CCR:$fs), + +class FFRGPR _fmt, dag outs, dag ins, string asmstr, list pattern>: + FFR<0x11, 0x0, _fmt, outs, ins, asmstr, pattern> { + bits<5> rt; + let ft = rt; + let fd = 0; +} + +/// Move Control Registers From/To CPU Registers +def CFC1 : FFRGPR<0x2, (outs CPURegs:$rt), (ins CCR:$fs), "cfc1\t$rt, $fs", []>; - def CTC1 : FFR<0x11, 0x0, 0x6, (outs CCR:$rt), (ins CPURegs:$fs), - "ctc1\t$fs, $rt", []>; +def CTC1 : FFRGPR<0x6, (outs CCR:$fs), (ins CPURegs:$rt), + "ctc1\t$rt, $fs", []>; - def MFC1 : FFR<0x11, 0x00, 0x00, (outs CPURegs:$rt), (ins FGR32:$fs), +def MFC1 : FFRGPR<0x00, (outs CPURegs:$rt), (ins FGR32:$fs), "mfc1\t$rt, $fs", [(set CPURegs:$rt, (bitconvert FGR32:$fs))]>; - def MTC1 : FFR<0x11, 0x00, 0x04, (outs FGR32:$fs), (ins CPURegs:$rt), +def MTC1 : FFRGPR<0x04, (outs FGR32:$fs), (ins CPURegs:$rt), "mtc1\t$rt, $fs", [(set FGR32:$fs, (bitconvert CPURegs:$rt))]>; -} def FMOV_S : FFR1<0x6, 16, "mov", "s", FGR32, FGR32>; def FMOV_D32 : FFR1<0x6, 17, "mov", "d", AFGR64, AFGR64>, @@ -203,7 +211,7 @@ let Predicates = [NotN64] in { } /// Floating-point Aritmetic -defm FADD : FFR2P_M<0x10, "add", fadd, 1>; +defm FADD : FFR2P_M<0x00, "add", fadd, 1>; defm FDIV : FFR2P_M<0x03, "div", fdiv>; defm FMUL : FFR2P_M<0x02, "mul", fmul, 1>; defm FSUB : FFR2P_M<0x01, "sub", fsub>; @@ -218,12 +226,16 @@ def MIPS_BRANCH_T : PatLeaf<(i32 1)>; /// Floating Point Branch of False/True (Likely) let isBranch=1, isTerminator=1, hasDelaySlot=1, base=0x8, Uses=[FCR31] in - class FBRANCH : FFI<0x11, (outs), - (ins brtarget:$dst), !strconcat(asmstr, "\t$dst"), - [(MipsFPBrcond op, bb:$dst)]>; + class FBRANCH nd, bits<1> tf, PatLeaf op, string asmstr> : + FFI<0x11, (outs), (ins brtarget:$dst), !strconcat(asmstr, "\t$dst"), + [(MipsFPBrcond op, bb:$dst)]> { + let Inst{20-18} = 0; + let Inst{17} = nd; + let Inst{16} = tf; +} -def BC1F : FBRANCH; -def BC1T : FBRANCH; +def BC1F : FBRANCH<0, 0, MIPS_BRANCH_F, "bc1f">; +def BC1T : FBRANCH<0, 1, MIPS_BRANCH_T, "bc1t">; //===----------------------------------------------------------------------===// // Floating Point Flag Conditions @@ -249,11 +261,11 @@ def MIPS_FCOND_NGT : PatLeaf<(i32 15)>; /// Floating Point Compare let Defs=[FCR31] in { - def FCMP_S32 : FCC<0x0, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc), + def FCMP_S32 : FCC<0x10, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc), "c.$cc.s\t$fs, $ft", [(MipsFPCmp FGR32:$fs, FGR32:$ft, imm:$cc)]>; - def FCMP_D32 : FCC<0x1, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc), + def FCMP_D32 : FCC<0x11, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc), "c.$cc.d\t$fs, $ft", [(MipsFPCmp AFGR64:$fs, AFGR64:$ft, imm:$cc)]>, Requires<[NotFP64bit]>; @@ -287,7 +299,8 @@ let Predicates = [NotFP64bit] in { defm : MovnPats; } -let usesCustomInserter = 1, Uses = [FCR31], Constraints = "$F = $dst" in { +let cc = 0, usesCustomInserter = 1, Uses = [FCR31], + Constraints = "$F = $dst" in { // flag:float, data:int class CondMovFPInt tf, string instr_asm> : FCMOV [(set CPURegs:$dst, (cmov CPURegs:$T, CPURegs:$F))]>; // flag:float, data:float +let cc = 0 in class CondMovFPFP fmt, bits<1> tf, string instr_asm> : FFCMOV val> { + bits<4> Value = val; +} + +def Pseudo : Format<0>; +def FrmR : Format<1>; +def FrmI : Format<2>; +def FrmJ : Format<3>; +def FrmFR : Format<4>; +def FrmFI : Format<5>; +def FrmOther : Format<6>; // Instruction w/ a custom format + // Generic Mips Format class MipsInst pattern, - InstrItinClass itin>: Instruction + InstrItinClass itin, Format f>: Instruction { field bits<32> Inst; + Format Form = f; let Namespace = "Mips"; - bits<6> opcode; + bits<6> Opcode = 0; - // Top 5 bits are the 'opcode' field - let Inst{31-26} = opcode; + // Top 6 bits are the 'opcode' field + let Inst{31-26} = Opcode; - dag OutOperandList = outs; - dag InOperandList = ins; + let OutOperandList = outs; + let InOperandList = ins; let AsmString = asmstr; let Pattern = pattern; let Itinerary = itin; + + // + // Attributes specific to Mips instructions... + // + bits<4> FormBits = Form.Value; + + // TSFlags layout should be kept in sync with MipsInstrInfo.h. + let TSFlags{3-0} = FormBits; } // Mips Pseudo Instructions Format class MipsPseudo pattern>: - MipsInst { + MipsInst { + let isCodeGenOnly = 1; let isPseudo = 1; } @@ -54,7 +79,7 @@ class MipsPseudo op, bits<6> _funct, dag outs, dag ins, string asmstr, list pattern, InstrItinClass itin>: - MipsInst + MipsInst { bits<5> rd; bits<5> rs; @@ -62,7 +87,7 @@ class FR op, bits<6> _funct, dag bits<5> shamt; bits<6> funct; - let opcode = op; + let Opcode = op; let funct = _funct; let Inst{25-21} = rs; @@ -77,13 +102,13 @@ class FR op, bits<6> _funct, dag //===----------------------------------------------------------------------===// class FI op, dag outs, dag ins, string asmstr, list pattern, - InstrItinClass itin>: MipsInst + InstrItinClass itin>: MipsInst { bits<5> rt; bits<5> rs; bits<16> imm16; - let opcode = op; + let Opcode = op; let Inst{25-21} = rs; let Inst{20-16} = rt; @@ -92,13 +117,13 @@ class FI op, dag outs, dag ins, class CBranchBase op, dag outs, dag ins, string asmstr, list pattern, InstrItinClass itin>: - MipsInst + MipsInst { bits<5> rs; bits<5> rt; bits<16> imm16; - let opcode = op; + let Opcode = op; let Inst{25-21} = rs; let Inst{20-16} = rt; @@ -110,11 +135,11 @@ class CBranchBase op, dag outs, //===----------------------------------------------------------------------===// class FJ op, dag outs, dag ins, string asmstr, list pattern, - InstrItinClass itin>: MipsInst + InstrItinClass itin>: MipsInst { bits<26> addr; - let opcode = op; + let Opcode = op; let Inst{25-0} = addr; } @@ -138,7 +163,7 @@ class FJ op, dag outs, dag ins, class FFR op, bits<6> _funct, bits<5> _fmt, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> fd; bits<5> fs; @@ -146,7 +171,7 @@ class FFR op, bits<6> _funct, bi bits<5> fmt; bits<6> funct; - let opcode = op; + let Opcode = op; let funct = _funct; let fmt = _fmt; @@ -162,13 +187,13 @@ class FFR op, bits<6> _funct, bi //===----------------------------------------------------------------------===// class FFI op, dag outs, dag ins, string asmstr, list pattern>: - MipsInst + MipsInst { bits<5> ft; bits<5> base; bits<16> imm16; - let opcode = op; + let Opcode = op; let Inst{25-21} = base; let Inst{20-16} = ft; @@ -180,14 +205,14 @@ class FFI op, dag outs, dag ins, //===----------------------------------------------------------------------===// class FCC _fmt, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> fs; bits<5> ft; bits<4> cc; bits<5> fmt; - let opcode = 0x11; + let Opcode = 0x11; let fmt = _fmt; let Inst{25-21} = fmt; @@ -201,18 +226,18 @@ class FCC _fmt, dag outs, dag in class FCMOV _tf, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> rd; bits<5> rs; - bits<3> N; + bits<3> cc; bits<1> tf; - let opcode = 0; + let Opcode = 0; let tf = _tf; let Inst{25-21} = rs; - let Inst{20-18} = N; + let Inst{20-18} = cc; let Inst{17} = 0; let Inst{16} = tf; let Inst{15-11} = rd; @@ -222,20 +247,20 @@ class FCMOV _tf, dag outs, dag i class FFCMOV _fmt, bits<1> _tf, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> fd; bits<5> fs; - bits<3> N; + bits<3> cc; bits<5> fmt; bits<1> tf; - let opcode = 17; + let Opcode = 17; let fmt = _fmt; let tf = _tf; let Inst{25-21} = fmt; - let Inst{20-18} = N; + let Inst{20-18} = cc; let Inst{17} = 0; let Inst{16} = tf; let Inst{15-11} = fs; Modified: stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td Fri Dec 30 22:40:17 2011 (r229042) @@ -153,6 +153,7 @@ def uimm16 : Operand { def mem : Operand { let PrintMethod = "printMemOperand"; let MIOperandInfo = (ops CPURegs, simm16); + let EncoderMethod = "getMemEncoding"; } def mem64 : Operand { @@ -163,6 +164,17 @@ def mem64 : Operand { def mem_ea : Operand { let PrintMethod = "printMemOperandEA"; let MIOperandInfo = (ops CPURegs, simm16); + let EncoderMethod = "getMemEncoding"; +} + +// size operand of ext instruction +def size_ext : Operand { + let EncoderMethod = "getSizeExtEncoding"; +} + +// size operand of ins instruction +def size_ins : Operand { + let EncoderMethod = "getSizeInsEncoding"; } // Transformation Function - get the lower 16 bits. @@ -271,14 +283,14 @@ class ArithOverflowR op, bits<6> // Arithmetic and logical instructions with 2 register operands. class ArithLogicI op, string instr_asm, SDNode OpNode, Operand Od, PatLeaf imm_type, RegisterClass RC> : - FI; + FI; class ArithOverflowI op, string instr_asm, SDNode OpNode, Operand Od, PatLeaf imm_type, RegisterClass RC> : - FI; + FI; // Arithmetic Multiply ADD/SUB let rd = 0, shamt = 0, Defs = [HI, LO], Uses = [HI, LO] in @@ -319,16 +331,23 @@ class LogicR_shift_rotate_reg fu // Load Upper Imediate class LoadUpper op, string instr_asm>: - FI { + FI { let rs = 0; } +class FMem op, dag outs, dag ins, string asmstr, list pattern, + InstrItinClass itin>: FFI { + bits<21> addr; + let Inst{25-21} = addr{20-16}; + let Inst{15-0} = addr{15-0}; +} + // Memory Load/Store let canFoldAsLoad = 1 in class LoadM op, string instr_asm, PatFrag OpNode, RegisterClass RC, Operand MemOpnd, bit Pseudo>: - FI { let isPseudo = Pseudo; @@ -336,7 +355,7 @@ class LoadM op, string instr_asm class StoreM op, string instr_asm, PatFrag OpNode, RegisterClass RC, Operand MemOpnd, bit Pseudo>: - FI { let isPseudo = Pseudo; @@ -380,9 +399,9 @@ multiclass StoreM64 op, string i // Conditional Branch class CBranch op, string instr_asm, PatFrag cond_op, RegisterClass RC>: - CBranchBase { + CBranchBase { let isBranch = 1; let isTerminator = 1; let hasDelaySlot = 1; @@ -390,9 +409,9 @@ class CBranch op, string instr_a class CBranchZero op, bits<5> _rt, string instr_asm, PatFrag cond_op, RegisterClass RC>: - CBranchBase { + CBranchBase { let rt = _rt; let isBranch = 1; let isTerminator = 1; @@ -411,9 +430,9 @@ class SetCC_R op, bits<6> func, class SetCC_I op, string instr_asm, PatFrag cond_op, Operand Od, PatLeaf imm_type, RegisterClass RC>: - FI; // Unconditional branch @@ -450,10 +469,8 @@ let isCall=1, hasDelaySlot=1, } class BranchLink: - FI<0x1, (outs), (ins CPURegs:$rs, brtarget:$target, variable_ops), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:42:22 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630A61065670; Fri, 30 Dec 2011 22:42:22 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 514C28FC0A; Fri, 30 Dec 2011 22:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMgMen034354; Fri, 30 Dec 2011 22:42:22 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMgMO5034352; Fri, 30 Dec 2011 22:42:22 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112302242.pBUMgMO5034352@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 30 Dec 2011 22:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229043 - stable/9/sys/cam/scsi X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:42:22 -0000 Author: mdf Date: Fri Dec 30 22:42:22 2011 New Revision: 229043 URL: http://svn.freebsd.org/changeset/base/229043 Log: MFC r228442: Do not use the sometimes-reserved word 'bool' for a variable name. Modified: stable/9/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_xpt.c Fri Dec 30 22:40:17 2011 (r229042) +++ stable/9/sys/cam/scsi/scsi_xpt.c Fri Dec 30 22:42:22 2011 (r229043) @@ -1811,14 +1811,14 @@ scsi_find_quirk(struct cam_ed *device) static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS) { - int error, bool; + int error, val; - bool = cam_srch_hi; - error = sysctl_handle_int(oidp, &bool, 0, req); + val = cam_srch_hi; + error = sysctl_handle_int(oidp, &val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (bool == 0 || bool == 1) { - cam_srch_hi = bool; + if (val == 0 || val == 1) { + cam_srch_hi = val; return (0); } else { return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:54:20 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ADBF106566C; Fri, 30 Dec 2011 22:54:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4DD8FC15; Fri, 30 Dec 2011 22:54:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMsKmk034816; Fri, 30 Dec 2011 22:54:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMsK6p034814; Fri, 30 Dec 2011 22:54:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302254.pBUMsK6p034814@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229045 - stable/9/tools/build/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:54:20 -0000 Author: dim Date: Fri Dec 30 22:54:19 2011 New Revision: 229045 URL: http://svn.freebsd.org/changeset/base/229045 Log: MFC r228409: Add more files to cleanup with 'make delete-old' when WITHOUT_CLANG is in effect. Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/tools/ (props changed) Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Dec 30 22:50:16 2011 (r229044) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Dec 30 22:54:19 2011 (r229045) @@ -627,6 +627,8 @@ OLD_FILES+=usr/share/man/man8/zpool.8.gz .if ${MK_CLANG} == no OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ +OLD_FILES+=usr/bin/clang-cpp +OLD_FILES+=usr/bin/clang-tblgen OLD_FILES+=usr/bin/tblgen OLD_FILES+=usr/include/clang/2.8/emmintrin.h OLD_FILES+=usr/include/clang/2.8/mm_malloc.h @@ -634,6 +636,39 @@ OLD_FILES+=usr/include/clang/2.8/mmintri OLD_FILES+=usr/include/clang/2.8/pmmintrin.h OLD_FILES+=usr/include/clang/2.8/tmmintrin.h OLD_FILES+=usr/include/clang/2.8/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.8 +OLD_FILES+=usr/include/clang/2.9/emmintrin.h +OLD_FILES+=usr/include/clang/2.9/mm_malloc.h +OLD_FILES+=usr/include/clang/2.9/mmintrin.h +OLD_FILES+=usr/include/clang/2.9/pmmintrin.h +OLD_FILES+=usr/include/clang/2.9/tmmintrin.h +OLD_FILES+=usr/include/clang/2.9/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.9 +OLD_FILES+=usr/include/clang/3.0/altivec.h +OLD_FILES+=usr/include/clang/3.0/avxintrin.h +OLD_FILES+=usr/include/clang/3.0/emmintrin.h +OLD_FILES+=usr/include/clang/3.0/immintrin.h +OLD_FILES+=usr/include/clang/3.0/mm3dnow.h +OLD_FILES+=usr/include/clang/3.0/mm_malloc.h +OLD_FILES+=usr/include/clang/3.0/mmintrin.h +OLD_FILES+=usr/include/clang/3.0/nmmintrin.h +OLD_FILES+=usr/include/clang/3.0/pmmintrin.h +OLD_FILES+=usr/include/clang/3.0/smmintrin.h +OLD_FILES+=usr/include/clang/3.0/tmmintrin.h +OLD_FILES+=usr/include/clang/3.0/wmmintrin.h +OLD_FILES+=usr/include/clang/3.0/x86intrin.h +OLD_FILES+=usr/include/clang/3.0/xmmintrin.h +OLD_DIRS+=usr/include/clang/3.0 +OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT +OLD_DIRS+=usr/share/doc/llvm/clang +OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex +OLD_FILES+=usr/share/doc/llvm/LICENSE.TXT +OLD_DIRS+=usr/share/doc/llvm +OLD_FILES+=usr/share/man/man1/clang.1.gz +OLD_FILES+=usr/share/man/man1/clang++.1.gz +OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz +OLD_FILES+=usr/share/man/man1/tblgen.1.gz .endif .if ${MK_CPP} == no From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 22:59:00 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3ED4106564A; Fri, 30 Dec 2011 22:59:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9800D8FC16; Fri, 30 Dec 2011 22:59:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMx0sw034999; Fri, 30 Dec 2011 22:59:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMx01Q034996; Fri, 30 Dec 2011 22:59:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302259.pBUMx01Q034996@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229046 - stable/9/contrib/libstdc++/include/debug X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 22:59:00 -0000 Author: dim Date: Fri Dec 30 22:59:00 2011 New Revision: 229046 URL: http://svn.freebsd.org/changeset/base/229046 Log: MFC r228328: Make it possible to use the debug versions of std::map and std::multimap with clang, by removing two unneeded using declarations. Otherwise, you would get errors similar to: /usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename' using _Base::value_compare; ^ N.B.: Take care when you actually use the debug versions of any libstdc++ header. They are more likely to contain problems, because they are exercised far less often, and since the standard library complexity guarantees don't always apply anymore, compile times can drastically increase. Modified: stable/9/contrib/libstdc++/include/debug/map.h stable/9/contrib/libstdc++/include/debug/multimap.h Directory Properties: stable/9/contrib/libstdc++/ (props changed) Modified: stable/9/contrib/libstdc++/include/debug/map.h ============================================================================== --- stable/9/contrib/libstdc++/include/debug/map.h Fri Dec 30 22:54:19 2011 (r229045) +++ stable/9/contrib/libstdc++/include/debug/map.h Fri Dec 30 22:59:00 2011 (r229046) @@ -74,8 +74,6 @@ namespace __debug typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; - using _Base::value_compare; - // 23.3.1.1 construct/copy/destroy: explicit map(const _Compare& __comp = _Compare(), const _Allocator& __a = _Allocator()) Modified: stable/9/contrib/libstdc++/include/debug/multimap.h ============================================================================== --- stable/9/contrib/libstdc++/include/debug/multimap.h Fri Dec 30 22:54:19 2011 (r229045) +++ stable/9/contrib/libstdc++/include/debug/multimap.h Fri Dec 30 22:59:00 2011 (r229046) @@ -74,8 +74,6 @@ namespace __debug typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; - using _Base::value_compare; - // 23.3.1.1 construct/copy/destroy: explicit multimap(const _Compare& __comp = _Compare(), const _Allocator& __a = _Allocator()) From owner-svn-src-stable@FreeBSD.ORG Fri Dec 30 23:41:24 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C48106566B; Fri, 30 Dec 2011 23:41:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88BEF8FC0C; Fri, 30 Dec 2011 23:41:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUNfOG8036441; Fri, 30 Dec 2011 23:41:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUNfOVK036438; Fri, 30 Dec 2011 23:41:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302341.pBUNfOVK036438@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 23:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229047 - in stable/9/lib/libthr/arch: amd64/include i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 23:41:24 -0000 Author: dim Date: Fri Dec 30 23:41:24 2011 New Revision: 229047 URL: http://svn.freebsd.org/changeset/base/229047 Log: MFC r228536: The TCB_GET32() and TCB_GET64() macros in the i386 and amd64-specific versions of pthread_md.h have a special case of dereferencing a null pointer. Clang warns about this with: In file included from lib/libthr/arch/i386/i386/pthread_md.c:36: lib/libthr/arch/i386/include/pthread_md.h:96:10: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference] return (TCB_GET32(tcb_self)); ^~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:73:13: note: expanded from: : "m" (*(u_int *)(__tcb_offset(name)))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:96:10: note: consider using __builtin_trap() or qualifying pointer with 'volatile' Since this indirection is done relative to the fs or gs segment, to retrieve thread-specific data, it is an exception to the rule. Therefore, add a volatile qualifier to tell the compiler we really want to dereference a zero address. Modified: stable/9/lib/libthr/arch/amd64/include/pthread_md.h stable/9/lib/libthr/arch/i386/include/pthread_md.h Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/arch/amd64/include/pthread_md.h ============================================================================== --- stable/9/lib/libthr/arch/amd64/include/pthread_md.h Fri Dec 30 22:59:00 2011 (r229046) +++ stable/9/lib/libthr/arch/amd64/include/pthread_md.h Fri Dec 30 23:41:24 2011 (r229047) @@ -71,7 +71,7 @@ struct tcb { u_long __i; \ __asm __volatile("movq %%fs:%1, %0" \ : "=r" (__i) \ - : "m" (*(u_long *)(__tcb_offset(name)))); \ + : "m" (*(volatile u_long *)(__tcb_offset(name)))); \ __result = (__tcb_type(name))__i; \ \ __result; \ Modified: stable/9/lib/libthr/arch/i386/include/pthread_md.h ============================================================================== --- stable/9/lib/libthr/arch/i386/include/pthread_md.h Fri Dec 30 22:59:00 2011 (r229046) +++ stable/9/lib/libthr/arch/i386/include/pthread_md.h Fri Dec 30 23:41:24 2011 (r229047) @@ -70,7 +70,7 @@ struct tcb { u_int __i; \ __asm __volatile("movl %%gs:%1, %0" \ : "=r" (__i) \ - : "m" (*(u_int *)(__tcb_offset(name)))); \ + : "m" (*(volatile u_int *)(__tcb_offset(name)))); \ __result = (__tcb_type(name))__i; \ \ __result; \ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 00:44:11 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDECD106564A; Sat, 31 Dec 2011 00:44:11 +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 DB1E78FC0A; Sat, 31 Dec 2011 00:44:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV0iBHQ038608; Sat, 31 Dec 2011 00:44:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV0iBVG038605; Sat, 31 Dec 2011 00:44:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310044.pBV0iBVG038605@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 00:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229052 - stable/9/sys/dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 00:44:12 -0000 Author: yongari Date: Sat Dec 31 00:44:11 2011 New Revision: 229052 URL: http://svn.freebsd.org/changeset/base/229052 Log: MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Modified: stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bce/if_bcereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Sat Dec 31 00:35:11 2011 (r229051) +++ stable/9/sys/dev/bce/if_bce.c Sat Dec 31 00:44:11 2011 (r229052) @@ -1112,8 +1112,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI " "interrupt.\n", __FUNCTION__); sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc->bce_irq_rid = 1; sc->bce_intr = bce_intr; @@ -1730,8 +1729,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1783,8 +1781,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2469,8 +2466,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->bce_flash_info = &flash_5709; goto bce_init_nvram_get_flash_size; } @@ -3224,8 +3220,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( @@ -3564,8 +3559,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc->stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc->ctx_pages == 0) sc->ctx_pages = 1; @@ -4206,8 +4200,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -4305,8 +4298,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4403,8 +4395,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TPAT_b09FwReleaseMajor; fw.ver_minor = bce_TPAT_b09FwReleaseMinor; fw.ver_fix = bce_TPAT_b09FwReleaseFix; @@ -4501,8 +4492,7 @@ bce_init_cp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_CP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_CP_b09FwReleaseMajor; fw.ver_minor = bce_CP_b09FwReleaseMinor; fw.ver_fix = bce_CP_b09FwReleaseFix; @@ -4599,8 +4589,7 @@ bce_init_com_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_COM_b09FwReleaseMajor; fw.ver_minor = bce_COM_b09FwReleaseMinor; fw.ver_fix = bce_COM_b09FwReleaseFix; @@ -4683,8 +4672,7 @@ bce_init_cpus(struct bce_softc *sc) { DBENTER(BCE_VERBOSE_RESET); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(sc) == BCE_CHIP_REV_Ax)) { bce_load_rv2p_fw(sc, bce_xi90_rv2p_proc1, @@ -4732,8 +4720,7 @@ bce_init_ctx(struct bce_softc *sc) rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4960,8 +4947,7 @@ bce_reset(struct bce_softc *sc, u32 rese DELAY(5); /* Disable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val &= ~BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4983,8 +4969,7 @@ bce_reset(struct bce_softc *sc, u32 rese val = REG_RD(sc, BCE_MISC_ID); /* Chip reset. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_MISC_COMMAND, BCE_MISC_COMMAND_SW_RESET); REG_RD(sc, BCE_MISC_COMMAND); DELAY(5); @@ -5113,8 +5098,7 @@ bce_chipinit(struct bce_softc *sc) val |= BCE_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; /* Enable bins used on the 5709. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val |= BCE_MQ_CONFIG_BIN_MQ_MODE; if (BCE_CHIP_ID(sc) == BCE_CHIP_ID_5709_A1) val |= BCE_MQ_CONFIG_HALT_DIS; @@ -5268,8 +5252,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val |= BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -5293,8 +5276,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable all remaining blocks in the MAC. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MISC_ENABLE_SET_BITS, BCE_MISC_ENABLE_DEFAULT_XI); else @@ -5565,8 +5547,7 @@ bce_init_tx_context(struct bce_softc *sc DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_SEND | BCE_VERBOSE_CTX); /* Initialize the context ID for an L2 TX chain. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Set the CID type to support an L2 connection. */ val = BCE_L2CTX_TX_TYPE_TYPE_L2_XI | BCE_L2CTX_TX_TYPE_SIZE_L2_XI; @@ -5729,8 +5710,7 @@ bce_init_rx_context(struct bce_softc *sc * when pause frames can be stopped (the high * watermark). */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { u32 lo_water, hi_water; if (sc->bce_flags & BCE_USING_TX_FLOW_CONTROL) { @@ -5764,8 +5744,7 @@ bce_init_rx_context(struct bce_softc *sc CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_CTX_TYPE, val); /* Setup the MQ BIN mapping for l2_ctx_host_bseq. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MQ_MAP_L2_5); REG_WR(sc, BCE_MQ_MAP_L2_5, val | BCE_MQ_MAP_L2_5_ARM); } @@ -5983,8 +5962,7 @@ bce_init_pg_chain(struct bce_softc *sc) } /* Setup the MQ BIN mapping for host_pg_bidx. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MQ_MAP_L2_3, BCE_MQ_MAP_L2_3_DEFAULT); CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_PG_BUF_SIZE, 0); @@ -9912,8 +9890,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 c "consumer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_RX_NX_PG_BDIDX)); } else if (cid == TX_CID) { - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { BCE_PRINTF(" 0x%08X - (L2CTX_TX_TYPE_XI) ctx type\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_TX_TYPE_XI)); @@ -10175,8 +10152,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); @@ -10209,8 +10185,7 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Input queue to the RV2P Command Scheduler */ cmd = REG_RD(sc, BCE_RV2PCSR_FTQ_CMD); ctl = REG_RD(sc, BCE_RV2PCSR_FTQ_CTL); Modified: stable/9/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/9/sys/dev/bce/if_bcereg.h Sat Dec 31 00:35:11 2011 (r229051) +++ stable/9/sys/dev/bce/if_bcereg.h Sat Dec 31 00:44:11 2011 (r229052) @@ -576,7 +576,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_NUM_5706 0x57060000 #define BCE_CHIP_NUM_5708 0x57080000 #define BCE_CHIP_NUM_5709 0x57090000 -#define BCE_CHIP_NUM_5716 0x57160000 #define BCE_CHIP_REV(sc) (((sc)->bce_chipid) & 0x0000f000) #define BCE_CHIP_REV_Ax 0x00000000 @@ -601,7 +600,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_ID_5709_B1 0x57091010 #define BCE_CHIP_ID_5709_B2 0x57091020 #define BCE_CHIP_ID_5709_C0 0x57092000 -#define BCE_CHIP_ID_5716_C0 0x57162000 #define BCE_CHIP_BOND_ID(sc) (((sc)->bce_chipid) & 0xf) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 00:46:07 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B4A9106566C; Sat, 31 Dec 2011 00:46:07 +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 5849B8FC12; Sat, 31 Dec 2011 00:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV0k76A038704; Sat, 31 Dec 2011 00:46:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV0k7rj038701; Sat, 31 Dec 2011 00:46:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310046.pBV0k7rj038701@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 00:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229053 - in stable/8/sys: conf dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 00:46:07 -0000 Author: yongari Date: Sat Dec 31 00:46:06 2011 New Revision: 229053 URL: http://svn.freebsd.org/changeset/base/229053 Log: MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Sat Dec 31 00:44:11 2011 (r229052) +++ stable/8/sys/dev/bce/if_bce.c Sat Dec 31 00:46:06 2011 (r229053) @@ -796,8 +796,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI " "interrupt.\n", __FUNCTION__); sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc->bce_irq_rid = 1; sc->bce_intr = bce_intr; @@ -1450,8 +1449,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1503,8 +1501,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2189,8 +2186,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->bce_flash_info = &flash_5709; goto bce_init_nvram_get_flash_size; } @@ -2892,8 +2888,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( @@ -3232,8 +3227,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc->stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc->ctx_pages == 0) sc->ctx_pages = 1; @@ -3876,8 +3870,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -3975,8 +3968,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4073,8 +4065,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TPAT_b09FwReleaseMajor; fw.ver_minor = bce_TPAT_b09FwReleaseMinor; fw.ver_fix = bce_TPAT_b09FwReleaseFix; @@ -4171,8 +4162,7 @@ bce_init_cp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_CP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_CP_b09FwReleaseMajor; fw.ver_minor = bce_CP_b09FwReleaseMinor; fw.ver_fix = bce_CP_b09FwReleaseFix; @@ -4269,8 +4259,7 @@ bce_init_com_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_COM_b09FwReleaseMajor; fw.ver_minor = bce_COM_b09FwReleaseMinor; fw.ver_fix = bce_COM_b09FwReleaseFix; @@ -4353,8 +4342,7 @@ bce_init_cpus(struct bce_softc *sc) { DBENTER(BCE_VERBOSE_RESET); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(sc) == BCE_CHIP_REV_Ax)) { bce_load_rv2p_fw(sc, bce_xi90_rv2p_proc1, @@ -4402,8 +4390,7 @@ bce_init_ctx(struct bce_softc *sc) rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4630,8 +4617,7 @@ bce_reset(struct bce_softc *sc, u32 rese DELAY(5); /* Disable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val &= ~BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4653,8 +4639,7 @@ bce_reset(struct bce_softc *sc, u32 rese val = REG_RD(sc, BCE_MISC_ID); /* Chip reset. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_MISC_COMMAND, BCE_MISC_COMMAND_SW_RESET); REG_RD(sc, BCE_MISC_COMMAND); DELAY(5); @@ -4783,8 +4768,7 @@ bce_chipinit(struct bce_softc *sc) val |= BCE_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; /* Enable bins used on the 5709. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val |= BCE_MQ_CONFIG_BIN_MQ_MODE; if (BCE_CHIP_ID(sc) == BCE_CHIP_ID_5709_A1) val |= BCE_MQ_CONFIG_HALT_DIS; @@ -4938,8 +4922,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val |= BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4963,8 +4946,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable all remaining blocks in the MAC. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MISC_ENABLE_SET_BITS, BCE_MISC_ENABLE_DEFAULT_XI); else @@ -5241,8 +5223,7 @@ bce_init_tx_context(struct bce_softc *sc DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_SEND | BCE_VERBOSE_CTX); /* Initialize the context ID for an L2 TX chain. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Set the CID type to support an L2 connection. */ val = BCE_L2CTX_TX_TYPE_TYPE_L2_XI | BCE_L2CTX_TX_TYPE_SIZE_L2_XI; @@ -5403,8 +5384,7 @@ bce_init_rx_context(struct bce_softc *sc * when pause frames can be stopped (the high * watermark). */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { u32 lo_water, hi_water; if (sc->bce_flags && BCE_USING_TX_FLOW_CONTROL) { @@ -5438,8 +5418,7 @@ bce_init_rx_context(struct bce_softc *sc CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_CTX_TYPE, val); /* Setup the MQ BIN mapping for l2_ctx_host_bseq. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MQ_MAP_L2_5); REG_WR(sc, BCE_MQ_MAP_L2_5, val | BCE_MQ_MAP_L2_5_ARM); } @@ -5655,8 +5634,7 @@ bce_init_pg_chain(struct bce_softc *sc) } /* Setup the MQ BIN mapping for host_pg_bidx. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MQ_MAP_L2_3, BCE_MQ_MAP_L2_3_DEFAULT); CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_PG_BUF_SIZE, 0); @@ -9476,8 +9454,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 c "consumer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_RX_NX_PG_BDIDX)); } else if (cid == TX_CID) { - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { BCE_PRINTF(" 0x%08X - (L2CTX_TX_TYPE_XI) ctx type\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_TX_TYPE_XI)); @@ -9739,8 +9716,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); @@ -9773,8 +9749,7 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Input queue to the RV2P Command Scheduler */ cmd = REG_RD(sc, BCE_RV2PCSR_FTQ_CMD); ctl = REG_RD(sc, BCE_RV2PCSR_FTQ_CTL); Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Sat Dec 31 00:44:11 2011 (r229052) +++ stable/8/sys/dev/bce/if_bcereg.h Sat Dec 31 00:46:06 2011 (r229053) @@ -576,7 +576,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_NUM_5706 0x57060000 #define BCE_CHIP_NUM_5708 0x57080000 #define BCE_CHIP_NUM_5709 0x57090000 -#define BCE_CHIP_NUM_5716 0x57160000 #define BCE_CHIP_REV(sc) (((sc)->bce_chipid) & 0x0000f000) #define BCE_CHIP_REV_Ax 0x00000000 @@ -601,7 +600,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_ID_5709_B1 0x57091010 #define BCE_CHIP_ID_5709_B2 0x57091020 #define BCE_CHIP_ID_5709_C0 0x57092000 -#define BCE_CHIP_ID_5716_C0 0x57162000 #define BCE_CHIP_BOND_ID(sc) (((sc)->bce_chipid) & 0xf) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 00:47:55 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FF92106564A; Sat, 31 Dec 2011 00:47:55 +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 0D0DB8FC1A; Sat, 31 Dec 2011 00:47:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV0lsik038784; Sat, 31 Dec 2011 00:47:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV0lsKU038781; Sat, 31 Dec 2011 00:47:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310047.pBV0lsKU038781@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 00:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229054 - stable/7/sys/dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 00:47:55 -0000 Author: yongari Date: Sat Dec 31 00:47:54 2011 New Revision: 229054 URL: http://svn.freebsd.org/changeset/base/229054 Log: MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Sat Dec 31 00:46:06 2011 (r229053) +++ stable/7/sys/dev/bce/if_bce.c Sat Dec 31 00:47:54 2011 (r229054) @@ -796,8 +796,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI " "interrupt.\n", __FUNCTION__); sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc->bce_irq_rid = 1; sc->bce_intr = bce_intr; @@ -1450,8 +1449,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1503,8 +1501,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2189,8 +2186,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->bce_flash_info = &flash_5709; goto bce_init_nvram_get_flash_size; } @@ -2892,8 +2888,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( @@ -3232,8 +3227,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc->stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc->ctx_pages == 0) sc->ctx_pages = 1; @@ -3876,8 +3870,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -3975,8 +3968,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4073,8 +4065,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TPAT_b09FwReleaseMajor; fw.ver_minor = bce_TPAT_b09FwReleaseMinor; fw.ver_fix = bce_TPAT_b09FwReleaseFix; @@ -4171,8 +4162,7 @@ bce_init_cp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_CP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_CP_b09FwReleaseMajor; fw.ver_minor = bce_CP_b09FwReleaseMinor; fw.ver_fix = bce_CP_b09FwReleaseFix; @@ -4269,8 +4259,7 @@ bce_init_com_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_COM_b09FwReleaseMajor; fw.ver_minor = bce_COM_b09FwReleaseMinor; fw.ver_fix = bce_COM_b09FwReleaseFix; @@ -4353,8 +4342,7 @@ bce_init_cpus(struct bce_softc *sc) { DBENTER(BCE_VERBOSE_RESET); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(sc) == BCE_CHIP_REV_Ax)) { bce_load_rv2p_fw(sc, bce_xi90_rv2p_proc1, @@ -4402,8 +4390,7 @@ bce_init_ctx(struct bce_softc *sc) rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4630,8 +4617,7 @@ bce_reset(struct bce_softc *sc, u32 rese DELAY(5); /* Disable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val &= ~BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4653,8 +4639,7 @@ bce_reset(struct bce_softc *sc, u32 rese val = REG_RD(sc, BCE_MISC_ID); /* Chip reset. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_MISC_COMMAND, BCE_MISC_COMMAND_SW_RESET); REG_RD(sc, BCE_MISC_COMMAND); DELAY(5); @@ -4783,8 +4768,7 @@ bce_chipinit(struct bce_softc *sc) val |= BCE_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; /* Enable bins used on the 5709. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val |= BCE_MQ_CONFIG_BIN_MQ_MODE; if (BCE_CHIP_ID(sc) == BCE_CHIP_ID_5709_A1) val |= BCE_MQ_CONFIG_HALT_DIS; @@ -4938,8 +4922,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val |= BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4963,8 +4946,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable all remaining blocks in the MAC. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MISC_ENABLE_SET_BITS, BCE_MISC_ENABLE_DEFAULT_XI); else @@ -5241,8 +5223,7 @@ bce_init_tx_context(struct bce_softc *sc DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_SEND | BCE_VERBOSE_CTX); /* Initialize the context ID for an L2 TX chain. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Set the CID type to support an L2 connection. */ val = BCE_L2CTX_TX_TYPE_TYPE_L2_XI | BCE_L2CTX_TX_TYPE_SIZE_L2_XI; @@ -5403,8 +5384,7 @@ bce_init_rx_context(struct bce_softc *sc * when pause frames can be stopped (the high * watermark). */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { u32 lo_water, hi_water; if (sc->bce_flags && BCE_USING_TX_FLOW_CONTROL) { @@ -5438,8 +5418,7 @@ bce_init_rx_context(struct bce_softc *sc CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_CTX_TYPE, val); /* Setup the MQ BIN mapping for l2_ctx_host_bseq. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MQ_MAP_L2_5); REG_WR(sc, BCE_MQ_MAP_L2_5, val | BCE_MQ_MAP_L2_5_ARM); } @@ -5655,8 +5634,7 @@ bce_init_pg_chain(struct bce_softc *sc) } /* Setup the MQ BIN mapping for host_pg_bidx. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MQ_MAP_L2_3, BCE_MQ_MAP_L2_3_DEFAULT); CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_PG_BUF_SIZE, 0); @@ -9476,8 +9454,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 c "consumer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_RX_NX_PG_BDIDX)); } else if (cid == TX_CID) { - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { BCE_PRINTF(" 0x%08X - (L2CTX_TX_TYPE_XI) ctx type\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_TX_TYPE_XI)); @@ -9739,8 +9716,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); @@ -9773,8 +9749,7 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Input queue to the RV2P Command Scheduler */ cmd = REG_RD(sc, BCE_RV2PCSR_FTQ_CMD); ctl = REG_RD(sc, BCE_RV2PCSR_FTQ_CTL); Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Sat Dec 31 00:46:06 2011 (r229053) +++ stable/7/sys/dev/bce/if_bcereg.h Sat Dec 31 00:47:54 2011 (r229054) @@ -573,7 +573,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_NUM_5706 0x57060000 #define BCE_CHIP_NUM_5708 0x57080000 #define BCE_CHIP_NUM_5709 0x57090000 -#define BCE_CHIP_NUM_5716 0x57160000 #define BCE_CHIP_REV(sc) (((sc)->bce_chipid) & 0x0000f000) #define BCE_CHIP_REV_Ax 0x00000000 @@ -598,7 +597,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_ID_5709_B1 0x57091010 #define BCE_CHIP_ID_5709_B2 0x57091020 #define BCE_CHIP_ID_5709_C0 0x57092000 -#define BCE_CHIP_ID_5716_C0 0x57162000 #define BCE_CHIP_BOND_ID(sc) (((sc)->bce_chipid) & 0xf) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:07:02 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588EE106567D; Sat, 31 Dec 2011 01:07:02 +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 3D1038FC20; Sat, 31 Dec 2011 01:07:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1720i039505; Sat, 31 Dec 2011 01:07:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV171xp039486; Sat, 31 Dec 2011 01:07:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310107.pBV171xp039486@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229057 - in stable/9/sys: dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte mips/atheros mips/idt pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:07:02 -0000 Author: yongari Date: Sat Dec 31 01:07:01 2011 New Revision: 229057 URL: http://svn.freebsd.org/changeset/base/229057 Log: MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/9/sys/dev/age/if_age.c stable/9/sys/dev/alc/if_alc.c stable/9/sys/dev/ale/if_ale.c stable/9/sys/dev/lge/if_lge.c stable/9/sys/dev/msk/if_msk.c stable/9/sys/dev/nfe/if_nfe.c stable/9/sys/dev/nge/if_nge.c stable/9/sys/dev/nve/if_nve.c stable/9/sys/dev/re/if_re.c stable/9/sys/dev/sge/if_sge.c stable/9/sys/dev/sis/if_sis.c stable/9/sys/dev/vge/if_vge.c stable/9/sys/dev/vr/if_vr.c stable/9/sys/dev/vte/if_vte.c stable/9/sys/mips/atheros/if_arge.c stable/9/sys/mips/idt/if_kr.c stable/9/sys/pci/if_rl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/age/if_age.c ============================================================================== --- stable/9/sys/dev/age/if_age.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/age/if_age.c Sat Dec 31 01:07:01 2011 (r229057) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: stable/9/sys/dev/alc/if_alc.c ============================================================================== --- stable/9/sys/dev/alc/if_alc.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/alc/if_alc.c Sat Dec 31 01:07:01 2011 (r229057) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: stable/9/sys/dev/ale/if_ale.c ============================================================================== --- stable/9/sys/dev/ale/if_ale.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/ale/if_ale.c Sat Dec 31 01:07:01 2011 (r229057) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: stable/9/sys/dev/lge/if_lge.c ============================================================================== --- stable/9/sys/dev/lge/if_lge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/lge/if_lge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1430,9 +1430,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: stable/9/sys/dev/msk/if_msk.c ============================================================================== --- stable/9/sys/dev/msk/if_msk.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/msk/if_msk.c Sat Dec 31 01:07:01 2011 (r229057) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: stable/9/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/9/sys/dev/nfe/if_nfe.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/nfe/if_nfe.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2952,10 +2952,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: stable/9/sys/dev/nge/if_nge.c ============================================================================== --- stable/9/sys/dev/nge/if_nge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/nge/if_nge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2281,9 +2281,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: stable/9/sys/dev/nve/if_nve.c ============================================================================== --- stable/9/sys/dev/nve/if_nve.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/nve/if_nve.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1202,10 +1202,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/re/if_re.c Sat Dec 31 01:07:01 2011 (r229057) @@ -3214,9 +3214,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: stable/9/sys/dev/sge/if_sge.c ============================================================================== --- stable/9/sys/dev/sge/if_sge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/sge/if_sge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: stable/9/sys/dev/sis/if_sis.c ============================================================================== --- stable/9/sys/dev/sis/if_sis.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/sis/if_sis.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2109,9 +2109,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: stable/9/sys/dev/vge/if_vge.c ============================================================================== --- stable/9/sys/dev/vge/if_vge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/vge/if_vge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2173,9 +2173,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: stable/9/sys/dev/vr/if_vr.c ============================================================================== --- stable/9/sys/dev/vr/if_vr.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/vr/if_vr.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2155,9 +2155,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: stable/9/sys/dev/vte/if_vte.c ============================================================================== --- stable/9/sys/dev/vte/if_vte.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/vte/if_vte.c Sat Dec 31 01:07:01 2011 (r229057) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: stable/9/sys/mips/atheros/if_arge.c ============================================================================== --- stable/9/sys/mips/atheros/if_arge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/mips/atheros/if_arge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1199,9 +1199,9 @@ arge_ifmedia_sts(struct ifnet *ifp, stru mii = device_get_softc(sc->arge_miibus); ARGE_LOCK(sc); mii_pollstat(mii); - ARGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ARGE_UNLOCK(sc); } struct arge_dmamap_arg { Modified: stable/9/sys/mips/idt/if_kr.c ============================================================================== --- stable/9/sys/mips/idt/if_kr.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/mips/idt/if_kr.c Sat Dec 31 01:07:01 2011 (r229057) @@ -945,9 +945,9 @@ kr_ifmedia_sts(struct ifnet *ifp, struct mii = device_get_softc(sc->kr_miibus); KR_LOCK(sc); mii_pollstat(mii); - KR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + KR_UNLOCK(sc); } struct kr_dmamap_arg { Modified: stable/9/sys/pci/if_rl.c ============================================================================== --- stable/9/sys/pci/if_rl.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/pci/if_rl.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1797,9 +1797,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:08:31 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCDA7106566C; Sat, 31 Dec 2011 01:08:31 +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 B781E8FC14; Sat, 31 Dec 2011 01:08:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV18VaK039602; Sat, 31 Dec 2011 01:08:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV18VB2039584; Sat, 31 Dec 2011 01:08:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310108.pBV18VB2039584@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229058 - in stable/8/sys: conf dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte mips/atheros mips/idt pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:08:32 -0000 Author: yongari Date: Sat Dec 31 01:08:31 2011 New Revision: 229058 URL: http://svn.freebsd.org/changeset/base/229058 Log: MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/8/sys/dev/age/if_age.c stable/8/sys/dev/alc/if_alc.c stable/8/sys/dev/ale/if_ale.c stable/8/sys/dev/lge/if_lge.c stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/nfe/if_nfe.c stable/8/sys/dev/nge/if_nge.c stable/8/sys/dev/nve/if_nve.c stable/8/sys/dev/re/if_re.c stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sis/if_sis.c stable/8/sys/dev/vge/if_vge.c stable/8/sys/dev/vr/if_vr.c stable/8/sys/dev/vte/if_vte.c stable/8/sys/mips/atheros/if_arge.c stable/8/sys/mips/idt/if_kr.c stable/8/sys/pci/if_rl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/age/if_age.c ============================================================================== --- stable/8/sys/dev/age/if_age.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/age/if_age.c Sat Dec 31 01:08:31 2011 (r229058) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: stable/8/sys/dev/alc/if_alc.c ============================================================================== --- stable/8/sys/dev/alc/if_alc.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/alc/if_alc.c Sat Dec 31 01:08:31 2011 (r229058) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: stable/8/sys/dev/ale/if_ale.c ============================================================================== --- stable/8/sys/dev/ale/if_ale.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/ale/if_ale.c Sat Dec 31 01:08:31 2011 (r229058) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: stable/8/sys/dev/lge/if_lge.c ============================================================================== --- stable/8/sys/dev/lge/if_lge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/lge/if_lge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1430,9 +1430,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/msk/if_msk.c Sat Dec 31 01:08:31 2011 (r229058) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: stable/8/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/8/sys/dev/nfe/if_nfe.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/nfe/if_nfe.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2952,10 +2952,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: stable/8/sys/dev/nge/if_nge.c ============================================================================== --- stable/8/sys/dev/nge/if_nge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/nge/if_nge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2281,9 +2281,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: stable/8/sys/dev/nve/if_nve.c ============================================================================== --- stable/8/sys/dev/nve/if_nve.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/nve/if_nve.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1202,10 +1202,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/re/if_re.c Sat Dec 31 01:08:31 2011 (r229058) @@ -3214,9 +3214,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/sge/if_sge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: stable/8/sys/dev/sis/if_sis.c ============================================================================== --- stable/8/sys/dev/sis/if_sis.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/sis/if_sis.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2112,9 +2112,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: stable/8/sys/dev/vge/if_vge.c ============================================================================== --- stable/8/sys/dev/vge/if_vge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/vge/if_vge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2173,9 +2173,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: stable/8/sys/dev/vr/if_vr.c ============================================================================== --- stable/8/sys/dev/vr/if_vr.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/vr/if_vr.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2155,9 +2155,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: stable/8/sys/dev/vte/if_vte.c ============================================================================== --- stable/8/sys/dev/vte/if_vte.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/vte/if_vte.c Sat Dec 31 01:08:31 2011 (r229058) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: stable/8/sys/mips/atheros/if_arge.c ============================================================================== --- stable/8/sys/mips/atheros/if_arge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/mips/atheros/if_arge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1112,9 +1112,9 @@ arge_ifmedia_sts(struct ifnet *ifp, stru mii = device_get_softc(sc->arge_miibus); ARGE_LOCK(sc); mii_pollstat(mii); - ARGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ARGE_UNLOCK(sc); } struct arge_dmamap_arg { Modified: stable/8/sys/mips/idt/if_kr.c ============================================================================== --- stable/8/sys/mips/idt/if_kr.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/mips/idt/if_kr.c Sat Dec 31 01:08:31 2011 (r229058) @@ -945,9 +945,9 @@ kr_ifmedia_sts(struct ifnet *ifp, struct mii = device_get_softc(sc->kr_miibus); KR_LOCK(sc); mii_pollstat(mii); - KR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + KR_UNLOCK(sc); } struct kr_dmamap_arg { Modified: stable/8/sys/pci/if_rl.c ============================================================================== --- stable/8/sys/pci/if_rl.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/pci/if_rl.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1797,9 +1797,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:10:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C8501065677; Sat, 31 Dec 2011 01:10:30 +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 77C378FC1A; Sat, 31 Dec 2011 01:10:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1AU87039713; Sat, 31 Dec 2011 01:10:30 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1AUeA039697; Sat, 31 Dec 2011 01:10:30 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310110.pBV1AUeA039697@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229059 - in stable/7/sys: dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:10:30 -0000 Author: yongari Date: Sat Dec 31 01:10:29 2011 New Revision: 229059 URL: http://svn.freebsd.org/changeset/base/229059 Log: MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/7/sys/dev/age/if_age.c stable/7/sys/dev/alc/if_alc.c stable/7/sys/dev/ale/if_ale.c stable/7/sys/dev/lge/if_lge.c stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/nfe/if_nfe.c stable/7/sys/dev/nge/if_nge.c stable/7/sys/dev/nve/if_nve.c stable/7/sys/dev/re/if_re.c stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sis/if_sis.c stable/7/sys/dev/vge/if_vge.c stable/7/sys/dev/vr/if_vr.c stable/7/sys/dev/vte/if_vte.c stable/7/sys/pci/if_rl.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/age/if_age.c ============================================================================== --- stable/7/sys/dev/age/if_age.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/age/if_age.c Sat Dec 31 01:10:29 2011 (r229059) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: stable/7/sys/dev/alc/if_alc.c ============================================================================== --- stable/7/sys/dev/alc/if_alc.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/alc/if_alc.c Sat Dec 31 01:10:29 2011 (r229059) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: stable/7/sys/dev/ale/if_ale.c ============================================================================== --- stable/7/sys/dev/ale/if_ale.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/ale/if_ale.c Sat Dec 31 01:10:29 2011 (r229059) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: stable/7/sys/dev/lge/if_lge.c ============================================================================== --- stable/7/sys/dev/lge/if_lge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/lge/if_lge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1433,9 +1433,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/msk/if_msk.c Sat Dec 31 01:10:29 2011 (r229059) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: stable/7/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/7/sys/dev/nfe/if_nfe.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/nfe/if_nfe.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2943,10 +2943,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: stable/7/sys/dev/nge/if_nge.c ============================================================================== --- stable/7/sys/dev/nge/if_nge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/nge/if_nge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2276,9 +2276,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: stable/7/sys/dev/nve/if_nve.c ============================================================================== --- stable/7/sys/dev/nve/if_nve.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/nve/if_nve.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1203,10 +1203,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/re/if_re.c Sat Dec 31 01:10:29 2011 (r229059) @@ -3208,9 +3208,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/sge/if_sge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: stable/7/sys/dev/sis/if_sis.c ============================================================================== --- stable/7/sys/dev/sis/if_sis.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/sis/if_sis.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2108,9 +2108,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: stable/7/sys/dev/vge/if_vge.c ============================================================================== --- stable/7/sys/dev/vge/if_vge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/vge/if_vge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2174,9 +2174,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: stable/7/sys/dev/vr/if_vr.c ============================================================================== --- stable/7/sys/dev/vr/if_vr.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/vr/if_vr.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2147,9 +2147,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: stable/7/sys/dev/vte/if_vte.c ============================================================================== --- stable/7/sys/dev/vte/if_vte.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/vte/if_vte.c Sat Dec 31 01:10:29 2011 (r229059) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: stable/7/sys/pci/if_rl.c ============================================================================== --- stable/7/sys/pci/if_rl.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/pci/if_rl.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1925,9 +1925,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:22:17 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644581065670; Sat, 31 Dec 2011 01:22:17 +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 47ACC8FC08; Sat, 31 Dec 2011 01:22:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1MH01040136; Sat, 31 Dec 2011 01:22:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1MHT6040130; Sat, 31 Dec 2011 01:22:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310122.pBV1MHT6040130@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229060 - stable/9/sys/dev/usb/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:22:17 -0000 Author: yongari Date: Sat Dec 31 01:22:16 2011 New Revision: 229060 URL: http://svn.freebsd.org/changeset/base/229060 Log: MFC r226479: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/9/sys/dev/usb/net/if_aue.c stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_mos.c stable/9/sys/dev/usb/net/if_rue.c stable/9/sys/dev/usb/net/if_udav.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_aue.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_aue.c Sat Dec 31 01:22:16 2011 (r229060) @@ -1032,9 +1032,9 @@ aue_ifmedia_sts(struct ifnet *ifp, struc AUE_LOCK(sc); mii_pollstat(mii); - AUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AUE_UNLOCK(sc); } /* Modified: stable/9/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 01:22:16 2011 (r229060) @@ -452,9 +452,9 @@ axe_ifmedia_sts(struct ifnet *ifp, struc AXE_LOCK(sc); mii_pollstat(mii); - AXE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AXE_UNLOCK(sc); } static void Modified: stable/9/sys/dev/usb/net/if_mos.c ============================================================================== --- stable/9/sys/dev/usb/net/if_mos.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_mos.c Sat Dec 31 01:22:16 2011 (r229060) @@ -551,10 +551,10 @@ mos_ifmedia_sts(struct ifnet *ifp, struc MOS_LOCK(sc); mii_pollstat(mii); - MOS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MOS_UNLOCK(sc); } static void Modified: stable/9/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_rue.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_rue.c Sat Dec 31 01:22:16 2011 (r229060) @@ -889,9 +889,9 @@ rue_ifmedia_sts(struct ifnet *ifp, struc RUE_LOCK(sc); mii_pollstat(mii); - RUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RUE_UNLOCK(sc); } static void Modified: stable/9/sys/dev/usb/net/if_udav.c ============================================================================== --- stable/9/sys/dev/usb/net/if_udav.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_udav.c Sat Dec 31 01:22:16 2011 (r229060) @@ -751,9 +751,9 @@ udav_ifmedia_status(struct ifnet *ifp, s UDAV_LOCK(sc); mii_pollstat(mii); - UDAV_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + UDAV_UNLOCK(sc); } static void From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:30:43 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6C47106564A; Sat, 31 Dec 2011 01:30:43 +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 950698FC19; Sat, 31 Dec 2011 01:30:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1UhY5040473; Sat, 31 Dec 2011 01:30:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1Uhf7040471; Sat, 31 Dec 2011 01:30:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310130.pBV1Uhf7040471@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229061 - stable/9/sys/dev/et X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:30:43 -0000 Author: yongari Date: Sat Dec 31 01:30:43 2011 New Revision: 229061 URL: http://svn.freebsd.org/changeset/base/229061 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/9/sys/dev/et/if_et.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/et/if_et.c ============================================================================== --- stable/9/sys/dev/et/if_et.c Sat Dec 31 01:22:16 2011 (r229060) +++ stable/9/sys/dev/et/if_et.c Sat Dec 31 01:30:43 2011 (r229061) @@ -518,9 +518,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) PHY_RESET(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -542,9 +540,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:32:06 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA88E106566C; Sat, 31 Dec 2011 01:32:06 +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 A88048FC16; Sat, 31 Dec 2011 01:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1W6Xf040552; Sat, 31 Dec 2011 01:32:06 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1W6m4040550; Sat, 31 Dec 2011 01:32:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310132.pBV1W6m4040550@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229062 - in stable/8/sys: conf dev/et X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:32:06 -0000 Author: yongari Date: Sat Dec 31 01:32:06 2011 New Revision: 229062 URL: http://svn.freebsd.org/changeset/base/229062 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/8/sys/dev/et/if_et.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/et/if_et.c ============================================================================== --- stable/8/sys/dev/et/if_et.c Sat Dec 31 01:30:43 2011 (r229061) +++ stable/8/sys/dev/et/if_et.c Sat Dec 31 01:32:06 2011 (r229062) @@ -519,9 +519,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -543,9 +541,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 01:33:25 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7527B106564A; Sat, 31 Dec 2011 01:33:25 +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 636068FC14; Sat, 31 Dec 2011 01:33:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1XP0W040636; Sat, 31 Dec 2011 01:33:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1XPiU040634; Sat, 31 Dec 2011 01:33:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310133.pBV1XPiU040634@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229063 - stable/7/sys/dev/et X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 01:33:25 -0000 Author: yongari Date: Sat Dec 31 01:33:25 2011 New Revision: 229063 URL: http://svn.freebsd.org/changeset/base/229063 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/7/sys/dev/et/if_et.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/et/if_et.c ============================================================================== --- stable/7/sys/dev/et/if_et.c Sat Dec 31 01:32:06 2011 (r229062) +++ stable/7/sys/dev/et/if_et.c Sat Dec 31 01:33:25 2011 (r229063) @@ -519,9 +519,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -543,9 +541,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 03:03:00 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46FD71065672; Sat, 31 Dec 2011 03:03:00 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34EEE8FC14; Sat, 31 Dec 2011 03:03:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV330GN043580; Sat, 31 Dec 2011 03:03:00 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV330IG043578; Sat, 31 Dec 2011 03:03:00 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112310303.pBV330IG043578@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 03:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229065 - stable/8/sys/cam/scsi X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 03:03:00 -0000 Author: mdf Date: Sat Dec 31 03:02:59 2011 New Revision: 229065 URL: http://svn.freebsd.org/changeset/base/229065 Log: MFC r228442: Do not use the sometimes-reserved word 'bool' for a variable name. Modified: stable/8/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_xpt.c Sat Dec 31 02:08:51 2011 (r229064) +++ stable/8/sys/cam/scsi/scsi_xpt.c Sat Dec 31 03:02:59 2011 (r229065) @@ -1462,14 +1462,14 @@ scsi_find_quirk(struct cam_ed *device) static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS) { - int error, bool; + int error, val; - bool = cam_srch_hi; - error = sysctl_handle_int(oidp, &bool, 0, req); + val = cam_srch_hi; + error = sysctl_handle_int(oidp, &val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (bool == 0 || bool == 1) { - cam_srch_hi = bool; + if (val == 0 || val == 1) { + cam_srch_hi = val; return (0); } else { return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 04:42:17 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1CE2106564A; Sat, 31 Dec 2011 04:42:17 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF90C8FC17; Sat, 31 Dec 2011 04:42:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV4gHwD046917; Sat, 31 Dec 2011 04:42:17 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV4gHeQ046914; Sat, 31 Dec 2011 04:42:17 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112310442.pBV4gHeQ046914@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 31 Dec 2011 04:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229068 - in stable/9: . sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 04:42:18 -0000 Author: obrien Date: Sat Dec 31 04:42:17 2011 New Revision: 229068 URL: http://svn.freebsd.org/changeset/base/229068 Log: MFC 229067: Happy 2012 to FreeBSD users in Samoa. Modified: stable/9/COPYRIGHT stable/9/sys/sys/copyright.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/COPYRIGHT ============================================================================== --- stable/9/COPYRIGHT Sat Dec 31 04:38:04 2011 (r229067) +++ stable/9/COPYRIGHT Sat Dec 31 04:42:17 2011 (r229068) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/9/sys/sys/copyright.h ============================================================================== --- stable/9/sys/sys/copyright.h Sat Dec 31 04:38:04 2011 (r229067) +++ stable/9/sys/sys/copyright.h Sat Dec 31 04:42:17 2011 (r229068) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 04:47:01 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E542106566C; Sat, 31 Dec 2011 04:47:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C34F8FC0C; Sat, 31 Dec 2011 04:47:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV4l1UN047152; Sat, 31 Dec 2011 04:47:01 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV4l0PO047149; Sat, 31 Dec 2011 04:47:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112310447.pBV4l0PO047149@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 31 Dec 2011 04:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229069 - in stable/8: . sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 04:47:01 -0000 Author: obrien Date: Sat Dec 31 04:47:00 2011 New Revision: 229069 URL: http://svn.freebsd.org/changeset/base/229069 Log: MF9 r229068: Happy 2012 to FreeBSD users in Samoa. Modified: stable/8/COPYRIGHT (contents, props changed) stable/8/sys/sys/copyright.h Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/COPYRIGHT ============================================================================== --- stable/8/COPYRIGHT Sat Dec 31 04:42:17 2011 (r229068) +++ stable/8/COPYRIGHT Sat Dec 31 04:47:00 2011 (r229069) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/8/sys/sys/copyright.h ============================================================================== --- stable/8/sys/sys/copyright.h Sat Dec 31 04:42:17 2011 (r229068) +++ stable/8/sys/sys/copyright.h Sat Dec 31 04:47:00 2011 (r229069) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 11:43:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E441065672; Sat, 31 Dec 2011 11:43:36 +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 1BBC08FC1B; Sat, 31 Dec 2011 11:43:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVBhZU1061077; Sat, 31 Dec 2011 11:43:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVBhZJk061074; Sat, 31 Dec 2011 11:43:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201112311143.pBVBhZJk061074@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 31 Dec 2011 11:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229074 - in stable/7: . sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 11:43:36 -0000 Author: bz Date: Sat Dec 31 11:43:35 2011 New Revision: 229074 URL: http://svn.freebsd.org/changeset/base/229074 Log: MFC r229067 (by obrien): Happy 2012 to FreeBSD users in Samoa. Modified: stable/7/COPYRIGHT (contents, props changed) stable/7/sys/sys/copyright.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/COPYRIGHT ============================================================================== --- stable/7/COPYRIGHT Sat Dec 31 07:21:28 2011 (r229073) +++ stable/7/COPYRIGHT Sat Dec 31 11:43:35 2011 (r229074) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/7/sys/sys/copyright.h ============================================================================== --- stable/7/sys/sys/copyright.h Sat Dec 31 07:21:28 2011 (r229073) +++ stable/7/sys/sys/copyright.h Sat Dec 31 11:43:35 2011 (r229074) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 12:45:43 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D76611065680; Sat, 31 Dec 2011 12:45:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1FD78FC13; Sat, 31 Dec 2011 12:45:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCjhe8063249; Sat, 31 Dec 2011 12:45:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCjh3W063247; Sat, 31 Dec 2011 12:45:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311245.pBVCjh3W063247@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229077 - stable/9/lib/libc/resolv X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 12:45:43 -0000 Author: dim Date: Sat Dec 31 12:45:43 2011 New Revision: 229077 URL: http://svn.freebsd.org/changeset/base/229077 Log: MFC r228537: Remove meaningless self-assignment in res_send.c, otherwise clang will warn about it. I guess this was originally done to silence a bogus warning by an older version of gcc, but I could not reproduce it with any version of gcc that I have access to. Modified: stable/9/lib/libc/resolv/res_send.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/resolv/res_send.c ============================================================================== --- stable/9/lib/libc/resolv/res_send.c Sat Dec 31 12:37:07 2011 (r229076) +++ stable/9/lib/libc/resolv/res_send.c Sat Dec 31 12:45:43 2011 (r229077) @@ -1102,8 +1102,6 @@ Aerror(const res_state statp, FILE *file char hbuf[NI_MAXHOST]; char sbuf[NI_MAXSERV]; - alen = alen; - if ((statp->options & RES_DEBUG) != 0U) { if (getnameinfo(address, alen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), niflags)) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 12:52:19 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28011106564A; Sat, 31 Dec 2011 12:52:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 122C98FC0A; Sat, 31 Dec 2011 12:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCqISS063502; Sat, 31 Dec 2011 12:52:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCqIEF063500; Sat, 31 Dec 2011 12:52:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311252.pBVCqIEF063500@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229078 - stable/9/lib/libc/rpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 12:52:19 -0000 Author: dim Date: Sat Dec 31 12:52:18 2011 New Revision: 229078 URL: http://svn.freebsd.org/changeset/base/229078 Log: MFC r228538: In lib/libc/rpc/crypt_client.c, fix a clang warning about an implicit conversion between enum desdir/desmode from include/rpc/des.h, and enum desdir/desmode from include/rpcsvc/crypt.x. These are actually different enums, with different value names, but by accident the integer representation of the enum values happened to be the same. Modified: stable/9/lib/libc/rpc/crypt_client.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/crypt_client.c ============================================================================== --- stable/9/lib/libc/rpc/crypt_client.c Sat Dec 31 12:45:43 2011 (r229077) +++ stable/9/lib/libc/rpc/crypt_client.c Sat Dec 31 12:52:18 2011 (r229078) @@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms) des_crypt_1_arg.desbuf.desbuf_len = len; des_crypt_1_arg.desbuf.desbuf_val = buf; - des_crypt_1_arg.des_dir = dparms->des_dir; - des_crypt_1_arg.des_mode = dparms->des_mode; + des_crypt_1_arg.des_dir = (dparms->des_dir == ENCRYPT) ? ENCRYPT_DES : DECRYPT_DES; + des_crypt_1_arg.des_mode = (dparms->des_mode == CBC) ? CBC_DES : ECB_DES; bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8); bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 12:58:22 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 635D1106564A; Sat, 31 Dec 2011 12:58:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D12F8FC13; Sat, 31 Dec 2011 12:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCwM52063737; Sat, 31 Dec 2011 12:58:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCwMGW063735; Sat, 31 Dec 2011 12:58:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311258.pBVCwMGW063735@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229079 - stable/9/lib/libc/stdlib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 12:58:22 -0000 Author: dim Date: Sat Dec 31 12:58:21 2011 New Revision: 229079 URL: http://svn.freebsd.org/changeset/base/229079 Log: MFC r228540: Since clang does not support the tls_model attribute used in malloc.c yet (see LLVM PR 9788), and warns about it, rub it out for now. When clang grows support for this attribute, I will revert this again. Modified: stable/9/lib/libc/stdlib/malloc.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/malloc.c ============================================================================== --- stable/9/lib/libc/stdlib/malloc.c Sat Dec 31 12:52:18 2011 (r229078) +++ stable/9/lib/libc/stdlib/malloc.c Sat Dec 31 12:58:21 2011 (r229079) @@ -219,7 +219,11 @@ __FBSDID("$FreeBSD$"); # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 2 # define CPU_SPINWAIT __asm__ volatile("pause") -# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# ifdef __clang__ +# define TLS_MODEL /* clang does not support tls_model yet */ +# else +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# endif #endif #ifdef __ia64__ # define LG_QUANTUM 4 @@ -240,7 +244,11 @@ __FBSDID("$FreeBSD$"); # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 3 # define CPU_SPINWAIT __asm__ volatile("pause") -# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# ifdef __clang__ +# define TLS_MODEL /* clang does not support tls_model yet */ +# else +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# endif #endif #ifdef __arm__ # define LG_QUANTUM 3 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:07:10 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 822341065670; Sat, 31 Dec 2011 13:07:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 697338FC13; Sat, 31 Dec 2011 13:07:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVD7AkJ064177; Sat, 31 Dec 2011 13:07:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVD79ZL064148; Sat, 31 Dec 2011 13:07:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311307.pBVD79ZL064148@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229080 - in stable/9/sys/dev/usb: . controller net serial storage template wlan X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:07:10 -0000 Author: hselasky Date: Sat Dec 31 13:07:09 2011 New Revision: 229080 URL: http://svn.freebsd.org/changeset/base/229080 Log: MFC r227461: Style change. Use memxxx() functions instead of bxxx() functions. Modified: stable/9/sys/dev/usb/controller/at91dci.c stable/9/sys/dev/usb/controller/avr32dci.c stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/ohci.c stable/9/sys/dev/usb/controller/uhci.c stable/9/sys/dev/usb/net/if_kue.c stable/9/sys/dev/usb/net/uhso.c stable/9/sys/dev/usb/serial/ufoma.c stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/serial/umodem.c stable/9/sys/dev/usb/serial/uplcom.c stable/9/sys/dev/usb/serial/uvisor.c stable/9/sys/dev/usb/storage/umass.c stable/9/sys/dev/usb/storage/urio.c stable/9/sys/dev/usb/storage/ustorage_fs.c stable/9/sys/dev/usb/template/usb_template.c stable/9/sys/dev/usb/usb_busdma.c stable/9/sys/dev/usb/usb_compat_linux.c stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_generic.c stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/usb_request.c stable/9/sys/dev/usb/usb_transfer.c stable/9/sys/dev/usb/wlan/if_uath.c stable/9/sys/dev/usb/wlan/if_upgt.c stable/9/sys/dev/usb/wlan/if_urtw.c stable/9/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/controller/at91dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -2123,7 +2123,7 @@ tr_handle_get_port_status: if (sc->sc_flags.status_vbus && sc->sc_flags.status_bus_reset) { /* reset endpoint flags */ - bzero(sc->sc_ep_flags, sizeof(sc->sc_ep_flags)); + memset(sc->sc_ep_flags, 0, sizeof(sc->sc_ep_flags)); } } if (sc->sc_flags.change_suspend) { Modified: stable/9/sys/dev/usb/controller/avr32dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -415,12 +415,11 @@ repeat: buf_res.length = count; } /* receive data */ - bcopy(sc->physdata + + memcpy(buf_res.buffer, sc->physdata + (AVR32_EPTSTA_CURRENT_BANK(temp) << td->bank_shift) + - (td->ep_no << 16) + (td->offset % td->max_packet_size), - buf_res.buffer, buf_res.length) + (td->ep_no << 16) + (td->offset % td->max_packet_size), buf_res.length); /* update counters */ - count -= buf_res.length; + count -= buf_res.length; td->offset += buf_res.length; td->remainder -= buf_res.length; } @@ -491,12 +490,12 @@ repeat: buf_res.length = count; } /* transmit data */ - bcopy(buf_res.buffer, sc->physdata + + memcpy(sc->physdata + (AVR32_EPTSTA_CURRENT_BANK(temp) << td->bank_shift) + (td->ep_no << 16) + (td->offset % td->max_packet_size), - buf_res.length) + buf_res.buffer, buf_res.length); /* update counters */ - count -= buf_res.length; + count -= buf_res.length; td->offset += buf_res.length; td->remainder -= buf_res.length; } Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -3369,7 +3369,7 @@ ehci_roothub_exec(struct usb_device *ude break; case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): DPRINTFN(9, "get port status i=%d\n", Modified: stable/9/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/ohci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -2347,7 +2347,7 @@ ohci_roothub_exec(struct usb_device *ude case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): DPRINTFN(9, "get port status i=%d\n", Modified: stable/9/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/uhci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -2702,7 +2702,7 @@ uhci_roothub_exec(struct usb_device *ude break; case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): if (index == 1) Modified: stable/9/sys/dev/usb/net/if_kue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_kue.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/net/if_kue.c Sat Dec 31 13:07:09 2011 (r229080) @@ -380,8 +380,9 @@ kue_setmulti(struct usb_ether *ue) */ if (i == KUE_MCFILTCNT(sc)) break; - bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - KUE_MCFILT(sc, i), ETHER_ADDR_LEN); + memcpy(KUE_MCFILT(sc, i), + LLADDR((struct sockaddr_dl *)ifma->ifma_addr), + ETHER_ADDR_LEN); i++; } if_maddr_runlock(ifp); Modified: stable/9/sys/dev/usb/net/uhso.c ============================================================================== --- stable/9/sys/dev/usb/net/uhso.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/net/uhso.c Sat Dec 31 13:07:09 2011 (r229080) @@ -1153,7 +1153,7 @@ uhso_mux_read_callback(struct usb_xfer * /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - bzero(&req, sizeof(struct usb_device_request)); + memset(&req, 0, sizeof(struct usb_device_request)); req.bmRequestType = UT_READ_CLASS_INTERFACE; req.bRequest = UCDC_GET_ENCAPSULATED_RESPONSE; USETW(req.wValue, 0); @@ -1206,7 +1206,7 @@ uhso_mux_write_callback(struct usb_xfer usbd_get_page(pc, 0, &res); - bzero(&req, sizeof(struct usb_device_request)); + memset(&req, 0, sizeof(struct usb_device_request)); req.bmRequestType = UT_WRITE_CLASS_INTERFACE; req.bRequest = UCDC_SEND_ENCAPSULATED_COMMAND; USETW(req.wValue, 0); @@ -1731,7 +1731,7 @@ uhso_if_rxflush(void *arg) * copy the IP-packet into it. */ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - bcopy(mtod(m0, uint8_t *), mtod(m, uint8_t *), iplen); + memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen); m->m_pkthdr.len = m->m_len = iplen; /* Adjust the size of the original mbuf */ Modified: stable/9/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/9/sys/dev/usb/serial/ufoma.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/ufoma.c Sat Dec 31 13:07:09 2011 (r229080) @@ -438,7 +438,7 @@ ufoma_attach(device_t dev) goto detach; } sc->sc_modetable[0] = (elements + 1); - bcopy(mad->bMode, &sc->sc_modetable[1], elements); + memcpy(&sc->sc_modetable[1], mad->bMode, elements); sc->sc_currentmode = UMCPC_ACM_MODE_UNLINKED; sc->sc_modetoactivate = mad->bMode[0]; @@ -968,7 +968,7 @@ ufoma_cfg_param(struct ucom_softc *ucom, } DPRINTF("\n"); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/9/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/9/sys/dev/usb/serial/uftdi.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/uftdi.c Sat Dec 31 13:07:09 2011 (r229080) @@ -560,7 +560,7 @@ static int uftdi_set_parm_soft(struct termios *t, struct uftdi_param_config *cfg, uint8_t type) { - bzero(cfg, sizeof(*cfg)); + memset(cfg, 0, sizeof(*cfg)); switch (type) { case UFTDI_TYPE_SIO: Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 13:07:09 2011 (r229080) @@ -536,7 +536,7 @@ umodem_cfg_param(struct ucom_softc *ucom DPRINTF("sc=%p\n", sc); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/9/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uplcom.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/uplcom.c Sat Dec 31 13:07:09 2011 (r229080) @@ -659,7 +659,7 @@ uplcom_cfg_param(struct ucom_softc *ucom DPRINTF("sc = %p\n", sc); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/9/sys/dev/usb/serial/uvisor.c ============================================================================== --- stable/9/sys/dev/usb/serial/uvisor.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/uvisor.c Sat Dec 31 13:07:09 2011 (r229080) @@ -311,8 +311,9 @@ uvisor_attach(device_t dev) int error; DPRINTF("sc=%p\n", sc); - bcopy(uvisor_config, uvisor_config_copy, + memcpy(uvisor_config_copy, uvisor_config, sizeof(uvisor_config_copy)); + device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uvisor", NULL, MTX_DEF); Modified: stable/9/sys/dev/usb/storage/umass.c ============================================================================== --- stable/9/sys/dev/usb/storage/umass.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/storage/umass.c Sat Dec 31 13:07:09 2011 (r229080) @@ -891,7 +891,7 @@ umass_attach(device_t dev) int32_t err; /* - * NOTE: the softc struct is bzero-ed in device_set_driver. + * NOTE: the softc struct is cleared in device_set_driver. * We can safely call umass_detach without specifically * initializing the struct. */ @@ -1305,11 +1305,13 @@ umass_t_bbb_command_callback(struct usb_ } sc->cbw.bCDBLength = sc->sc_transfer.cmd_len; - bcopy(sc->sc_transfer.cmd_data, sc->cbw.CBWCDB, + memcpy(sc->cbw.CBWCDB, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len); - bzero(sc->sc_transfer.cmd_data + sc->sc_transfer.cmd_len, - sizeof(sc->cbw.CBWCDB) - sc->sc_transfer.cmd_len); + memset(sc->sc_transfer.cmd_data + + sc->sc_transfer.cmd_len, 0, + sizeof(sc->cbw.CBWCDB) - + sc->sc_transfer.cmd_len); DIF(UDMASS_BBB, umass_bbb_dump_cbw(sc, &sc->cbw)); @@ -1480,9 +1482,9 @@ umass_t_bbb_status_callback(struct usb_x /* Zero missing parts of the CSW: */ - if (actlen < sizeof(sc->csw)) { - bzero(&sc->csw, sizeof(sc->csw)); - } + if (actlen < sizeof(sc->csw)) + memset(&sc->csw, 0, sizeof(sc->csw)); + pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &sc->csw, actlen); @@ -2755,7 +2757,7 @@ umass_scsi_transform(struct umass_softc if (sc->sc_quirks & NO_TEST_UNIT_READY) { DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); - bzero(sc->sc_transfer.cmd_data, cmd_len); + memset(sc->sc_transfer.cmd_data, 0, cmd_len); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; return (1); @@ -2768,14 +2770,14 @@ umass_scsi_transform(struct umass_softc * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; return (1); } break; } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); } @@ -2810,10 +2812,11 @@ umass_rbc_transform(struct umass_softc * case REQUEST_SENSE: case PREVENT_ALLOW: - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); if ((sc->sc_quirks & RBC_PAD_TO_12) && (cmd_len < 12)) { - bzero(sc->sc_transfer.cmd_data + cmd_len, 12 - cmd_len); + memset(sc->sc_transfer.cmd_data + cmd_len, + 0, 12 - cmd_len); cmd_len = 12; } sc->sc_transfer.cmd_len = cmd_len; @@ -2841,7 +2844,7 @@ umass_ufi_transform(struct umass_softc * sc->sc_transfer.cmd_len = UFI_COMMAND_LENGTH; /* Zero the command data */ - bzero(sc->sc_transfer.cmd_data, UFI_COMMAND_LENGTH); + memset(sc->sc_transfer.cmd_data, 0, UFI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* @@ -2898,7 +2901,7 @@ umass_ufi_transform(struct umass_softc * return (0); /* failure */ } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); /* success */ } @@ -2919,7 +2922,7 @@ umass_atapi_transform(struct umass_softc sc->sc_transfer.cmd_len = ATAPI_COMMAND_LENGTH; /* Zero the command data */ - bzero(sc->sc_transfer.cmd_data, ATAPI_COMMAND_LENGTH); + memset(sc->sc_transfer.cmd_data, 0, ATAPI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* @@ -2933,7 +2936,7 @@ umass_atapi_transform(struct umass_softc * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; return (1); @@ -2994,7 +2997,7 @@ umass_atapi_transform(struct umass_softc break; } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); /* success */ } Modified: stable/9/sys/dev/usb/storage/urio.c ============================================================================== --- stable/9/sys/dev/usb/storage/urio.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/storage/urio.c Sat Dec 31 13:07:09 2011 (r229080) @@ -440,7 +440,7 @@ urio_ioctl(struct usb_fifo *fifo, u_long error = EPERM; goto done; } - bzero(&ur, sizeof(ur)); + memset(&ur, 0, sizeof(ur)); rio_cmd = addr; ur.ucr_request.bmRequestType = rio_cmd->requesttype | UT_READ_VENDOR_DEVICE; @@ -451,7 +451,7 @@ urio_ioctl(struct usb_fifo *fifo, u_long error = EPERM; goto done; } - bzero(&ur, sizeof(ur)); + memset(&ur, 0, sizeof(ur)); rio_cmd = addr; ur.ucr_request.bmRequestType = rio_cmd->requesttype | UT_WRITE_VENDOR_DEVICE; Modified: stable/9/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 13:07:09 2011 (r229080) @@ -355,7 +355,7 @@ ustorage_fs_attach(device_t dev) int unit; /* - * NOTE: the softc struct is bzero-ed in device_set_driver. + * NOTE: the softc struct is cleared in device_set_driver. * We can safely call ustorage_fs_detach without specifically * initializing the struct. */ @@ -371,7 +371,9 @@ ustorage_fs_attach(device_t dev) * further */ ustorage_fs_ramdisk = - malloc(USTORAGE_FS_RAM_SECT << 9, M_USB, M_ZERO | M_WAITOK); + malloc(USTORAGE_FS_RAM_SECT << 9, M_USB, + M_ZERO | M_WAITOK); + if (ustorage_fs_ramdisk == NULL) { return (ENOMEM); } Modified: stable/9/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 13:07:09 2011 (r229080) @@ -913,7 +913,7 @@ usb_hw_ep_resolve(struct usb_device *ude } ues = udev->bus->scratch[0].hw_ep_scratch; - bzero(ues, sizeof(*ues)); + memset(ues, 0, sizeof(*ues)); ues->ep_max = ues->ep; ues->cd = (void *)desc; @@ -1240,7 +1240,7 @@ usb_temp_setup(struct usb_device *udev, } uts = udev->bus->scratch[0].temp_setup; - bzero(uts, sizeof(*uts)); + memset(uts, 0, sizeof(*uts)); uts->usb_speed = udev->speed; uts->self_powered = udev->flags.self_powered; Modified: stable/9/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/9/sys/dev/usb/usb_busdma.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_busdma.c Sat Dec 31 13:07:09 2011 (r229080) @@ -80,9 +80,9 @@ void usbd_get_page(struct usb_page_cache *pc, usb_frlength_t offset, struct usb_page_search *res) { +#if USB_HAVE_BUSDMA struct usb_page *page; -#if USB_HAVE_BUSDMA if (pc->page_start) { /* Case 1 - something has been loaded into DMA */ @@ -145,7 +145,7 @@ usbd_copy_in(struct usb_page_cache *cach if (buf_res.length > len) { buf_res.length = len; } - bcopy(ptr, buf_res.buffer, buf_res.length); + memcpy(buf_res.buffer, ptr, buf_res.length); offset += buf_res.length; len -= buf_res.length; @@ -267,7 +267,7 @@ usbd_copy_out(struct usb_page_cache *cac if (res.length > len) { res.length = len; } - bcopy(res.buffer, ptr, res.length); + memcpy(ptr, res.buffer, res.length); offset += res.length; len -= res.length; @@ -325,7 +325,7 @@ usbd_frame_zero(struct usb_page_cache *c if (res.length > len) { res.length = len; } - bzero(res.buffer, res.length); + memset(res.buffer, 0, res.length); offset += res.length; len -= res.length; @@ -560,7 +560,7 @@ usb_pc_alloc_mem(struct usb_page_cache * bus_dmamem_free(utag->tag, ptr, map); goto error; } - bzero(ptr, size); + memset(ptr, 0, size); usb_pc_cpu_flush(pc); @@ -797,7 +797,7 @@ usb_dma_tag_setup(struct usb_dma_parent_ struct mtx *mtx, usb_dma_callback_t *func, uint8_t ndmabits, uint8_t nudt) { - bzero(udpt, sizeof(*udpt)); + memset(udpt, 0, sizeof(*udpt)); /* sanity checking */ if ((nudt == 0) || @@ -818,7 +818,7 @@ usb_dma_tag_setup(struct usb_dma_parent_ udpt->dma_bits = ndmabits; while (nudt--) { - bzero(udt, sizeof(*udt)); + memset(udt, 0, sizeof(*udt)); udt->tag_parent = udpt; udt++; } Modified: stable/9/sys/dev/usb/usb_compat_linux.c ============================================================================== --- stable/9/sys/dev/usb/usb_compat_linux.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_compat_linux.c Sat Dec 31 13:07:09 2011 (r229080) @@ -564,7 +564,7 @@ usb_clear_halt(struct usb_device *dev, s type = uhe->desc.bmAttributes & UE_XFERTYPE; addr = uhe->desc.bEndpointAddress; - bzero(cfg, sizeof(cfg)); + memset(cfg, 0, sizeof(cfg)); cfg[0].type = type; cfg[0].endpoint = addr & UE_ADDR; @@ -709,12 +709,12 @@ usb_control_msg(struct usb_device *dev, urb->dev = dev; urb->endpoint = uhe; - bcopy(&req, urb->setup_packet, sizeof(req)); + memcpy(urb->setup_packet, &req, sizeof(req)); if (size && (!(req.bmRequestType & UT_READ))) { /* move the data to a real buffer */ - bcopy(data, USB_ADD_BYTES(urb->setup_packet, - sizeof(req)), size); + memcpy(USB_ADD_BYTES(urb->setup_packet, sizeof(req)), + data, size); } err = usb_start_wait_urb(urb, timeout, &actlen); @@ -789,7 +789,7 @@ usb_setup_endpoint(struct usb_device *de if (bufsize == 0) { return (0); } - bzero(cfg, sizeof(cfg)); + memset(cfg, 0, sizeof(cfg)); if (type == UE_ISOCHRONOUS) { @@ -1251,7 +1251,7 @@ usb_init_urb(struct urb *urb) if (urb == NULL) { return; } - bzero(urb, sizeof(*urb)); + memset(urb, 0, sizeof(*urb)); } /*------------------------------------------------------------------------* Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_dev.c Sat Dec 31 13:07:09 2011 (r229080) @@ -1809,8 +1809,8 @@ usb_fifo_free_buffer(struct usb_fifo *f) } /* reset queues */ - bzero(&f->free_q, sizeof(f->free_q)); - bzero(&f->used_q, sizeof(f->used_q)); + memset(&f->free_q, 0, sizeof(f->free_q)); + memset(&f->used_q, 0, sizeof(f->used_q)); } void @@ -1909,7 +1909,7 @@ usb_fifo_put_data_linear(struct usb_fifo io_len = MIN(len, m->cur_data_len); - bcopy(ptr, m->cur_data_ptr, io_len); + memcpy(m->cur_data_ptr, ptr, io_len); m->cur_data_len = io_len; ptr = USB_ADD_BYTES(ptr, io_len); @@ -2052,7 +2052,7 @@ usb_fifo_get_data_linear(struct usb_fifo io_len = MIN(len, m->cur_data_len); - bcopy(m->cur_data_ptr, ptr, io_len); + memcpy(ptr, m->cur_data_ptr, io_len); len -= io_len; ptr = USB_ADD_BYTES(ptr, io_len); Modified: stable/9/sys/dev/usb/usb_generic.c ============================================================================== --- stable/9/sys/dev/usb/usb_generic.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_generic.c Sat Dec 31 13:07:09 2011 (r229080) @@ -240,7 +240,7 @@ ugen_open_pipe_write(struct usb_fifo *f) /* transfers are already opened */ return (0); } - bzero(usb_config, sizeof(usb_config)); + memset(usb_config, 0, sizeof(usb_config)); usb_config[1].type = UE_CONTROL; usb_config[1].endpoint = 0; @@ -308,7 +308,7 @@ ugen_open_pipe_read(struct usb_fifo *f) /* transfers are already opened */ return (0); } - bzero(usb_config, sizeof(usb_config)); + memset(usb_config, 0, sizeof(usb_config)); usb_config[1].type = UE_CONTROL; usb_config[1].endpoint = 0; Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 13:07:09 2011 (r229080) @@ -475,8 +475,8 @@ bbb_command_start(struct bbb_transfer *s sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; sc->cmd_len = cmd_len; - bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); - bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); + memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); + memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); Modified: stable/9/sys/dev/usb/usb_request.c ============================================================================== --- stable/9/sys/dev/usb/usb_request.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_request.c Sat Dec 31 13:07:09 2011 (r229080) @@ -517,7 +517,7 @@ usbd_do_request_flags(struct usb_device } } else #endif - bcopy(desc, data, length); + memcpy(data, desc, length); } goto done; /* success */ } Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_transfer.c Sat Dec 31 13:07:09 2011 (r229080) @@ -858,7 +858,7 @@ usbd_transfer_setup(struct usb_device *u if (parm.err) { goto done; } - bzero(&parm, sizeof(parm)); + memset(&parm, 0, sizeof(parm)); parm.udev = udev; parm.speed = usbd_get_speed(udev); @@ -982,7 +982,7 @@ usbd_transfer_setup(struct usb_device *u * memory: */ xfer = &dummy; - bzero(&dummy, sizeof(dummy)); + memset(&dummy, 0, sizeof(dummy)); refcount++; } Modified: stable/9/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_uath.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_uath.c Sat Dec 31 13:07:09 2011 (r229080) @@ -710,12 +710,12 @@ uath_cmdsend(struct uath_softc *sc, uint cmd->buflen = roundup2(sizeof(struct uath_cmd_hdr) + ilen, 4); hdr = (struct uath_cmd_hdr *)cmd->buf; - bzero(hdr, sizeof (struct uath_cmd_hdr)); /* XXX not needed */ + memset(hdr, 0, sizeof(struct uath_cmd_hdr)); hdr->len = htobe32(cmd->buflen); hdr->code = htobe32(code); hdr->msgid = cmd->msgid; /* don't care about endianness */ hdr->magic = htobe32((cmd->flags & UATH_CMD_FLAG_MAGIC) ? 1 << 24 : 0); - bcopy(idata, (uint8_t *)(hdr + 1), ilen); + memcpy((uint8_t *)(hdr + 1), idata, ilen); #ifdef UATH_DEBUG if (sc->sc_debug & UATH_DEBUG_CMDS) { @@ -1403,7 +1403,7 @@ uath_dataflush(struct uath_softc *sc) chunk->flags = UATH_CFLAGS_FINAL; chunk->length = htobe16(sizeof (struct uath_tx_desc)); - bzero(desc, sizeof(struct uath_tx_desc)); + memset(desc, 0, sizeof(struct uath_tx_desc)); desc->msglen = htobe32(sizeof(struct uath_tx_desc)); desc->msgid = (sc->sc_msgid++) + 1; /* don't care about endianness */ desc->type = htobe32(WDCMSG_FLUSH); @@ -1482,7 +1482,7 @@ uath_set_chan(struct uath_softc *sc, str #endif struct uath_cmd_reset reset; - bzero(&reset, sizeof reset); + memset(&reset, 0, sizeof(reset)); if (IEEE80211_IS_CHAN_2GHZ(c)) reset.flags |= htobe32(UATH_CHAN_2GHZ); if (IEEE80211_IS_CHAN_5GHZ(c)) @@ -1971,7 +1971,7 @@ uath_create_connection(struct uath_softc struct uath_cmd_create_connection create; ni = ieee80211_ref_node(vap->iv_bss); - bzero(&create, sizeof create); + memset(&create, 0, sizeof(create)); create.connid = htobe32(connid); create.bssid = htobe32(0); /* XXX packed or not? */ @@ -2000,7 +2000,7 @@ uath_set_rates(struct uath_softc *sc, co { struct uath_cmd_rates rates; - bzero(&rates, sizeof rates); + memset(&rates, 0, sizeof(rates)); rates.connid = htobe32(UATH_ID_BSS); /* XXX */ rates.size = htobe32(sizeof(struct uath_cmd_rateset)); /* XXX bounds check rs->rs_nrates */ @@ -2022,7 +2022,7 @@ uath_write_associd(struct uath_softc *sc struct uath_cmd_set_associd associd; ni = ieee80211_ref_node(vap->iv_bss); - bzero(&associd, sizeof associd); + memset(&associd, 0, sizeof(associd)); associd.defaultrateix = htobe32(1); /* XXX */ associd.associd = htobe32(ni->ni_associd); associd.timoffset = htobe32(0x3b); /* XXX */ @@ -2168,7 +2168,7 @@ uath_set_key(struct uath_softc *sc, cons struct uath_cmd_crypto crypto; int i; - bzero(&crypto, sizeof crypto); + memset(&crypto, 0, sizeof(crypto)); crypto.keyidx = htobe32(index); crypto.magic1 = htobe32(1); crypto.size = htobe32(368); @@ -2176,7 +2176,7 @@ uath_set_key(struct uath_softc *sc, cons crypto.flags = htobe32(0x80000068); if (index != UATH_DEFAULT_KEY) crypto.flags |= htobe32(index << 16); - memset(crypto.magic2, 0xff, sizeof crypto.magic2); + memset(crypto.magic2, 0xff, sizeof(crypto.magic2)); /* * Each byte of the key must be XOR'ed with 10101010 before being Modified: stable/9/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_upgt.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_upgt.c Sat Dec 31 13:07:09 2011 (r229080) @@ -432,7 +432,7 @@ upgt_get_stats(struct upgt_softc *sc) /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -540,7 +540,7 @@ upgt_set_led(struct upgt_softc *sc, int /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -670,7 +670,7 @@ upgt_set_macfilter(struct upgt_softc *sc /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -785,11 +785,11 @@ upgt_setup_rates(struct ieee80211vap *va * will pickup a rate. */ if (ic->ic_curmode == IEEE80211_MODE_11B) - bcopy(rateset_auto_11b, sc->sc_cur_rateset, + memcpy(sc->sc_cur_rateset, rateset_auto_11b, sizeof(sc->sc_cur_rateset)); if (ic->ic_curmode == IEEE80211_MODE_11G || ic->ic_curmode == IEEE80211_MODE_AUTO) - bcopy(rateset_auto_11g, sc->sc_cur_rateset, + memcpy(sc->sc_cur_rateset, rateset_auto_11g, sizeof(sc->sc_cur_rateset)); } else { /* set a fixed rate */ @@ -975,7 +975,7 @@ upgt_set_chan(struct upgt_softc *sc, str /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -998,11 +998,11 @@ upgt_set_chan(struct upgt_softc *sc, str chan->settings = sc->sc_eeprom_freq6_settings; chan->unknown3 = UPGT_CHANNEL_UNKNOWN3; - bcopy(&sc->sc_eeprom_freq3[channel].data, chan->freq3_1, + memcpy(chan->freq3_1, &sc->sc_eeprom_freq3[channel].data, sizeof(chan->freq3_1)); - bcopy(&sc->sc_eeprom_freq4[channel], chan->freq4, + memcpy(chan->freq4, &sc->sc_eeprom_freq4[channel], sizeof(sc->sc_eeprom_freq4[channel])); - bcopy(&sc->sc_eeprom_freq3[channel].data, chan->freq3_2, + memcpy(chan->freq3_2, &sc->sc_eeprom_freq3[channel].data, sizeof(chan->freq3_2)); data_cmd->buflen = sizeof(*mem) + sizeof(*chan); @@ -1331,7 +1331,7 @@ upgt_eeprom_read(struct upgt_softc *sc) /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -1423,8 +1423,9 @@ upgt_rxeof(struct usb_xfer *xfer, struct "received EEPROM block (offset=%d, len=%d)\n", eeprom_offset, eeprom_len); - bcopy(data->buf + sizeof(struct upgt_lmac_eeprom) + 4, - sc->sc_eeprom + eeprom_offset, eeprom_len); + memcpy(sc->sc_eeprom + eeprom_offset, + data->buf + sizeof(struct upgt_lmac_eeprom) + 4, + eeprom_len); /* EEPROM data has arrived in time, wakeup. */ wakeup(sc); @@ -1498,7 +1499,7 @@ upgt_rx(struct upgt_softc *sc, uint8_t * return (NULL); } m_adj(m, ETHER_ALIGN); - bcopy(rxdesc->data, mtod(m, char *), pkglen); + memcpy(mtod(m, char *), rxdesc->data, pkglen); /* trim FCS */ m->m_len = m->m_pkthdr.len = pkglen - IEEE80211_CRC_LEN; m->m_pkthdr.rcvif = ifp; @@ -1620,7 +1621,7 @@ upgt_fw_load(struct upgt_softc *sc) goto fail; } data_cmd->buflen = sizeof(start_fwload_cmd); - bcopy(start_fwload_cmd, data_cmd->buf, data_cmd->buflen); + memcpy(data_cmd->buf, start_fwload_cmd, data_cmd->buflen); upgt_bulk_tx(sc, data_cmd); /* send X2 header */ @@ -1631,7 +1632,7 @@ upgt_fw_load(struct upgt_softc *sc) } data_cmd->buflen = sizeof(struct upgt_fw_x2_header); x2 = (struct upgt_fw_x2_header *)data_cmd->buf; - bcopy(UPGT_X2_SIGNATURE, x2->signature, UPGT_X2_SIGNATURE_SIZE); + memcpy(x2->signature, UPGT_X2_SIGNATURE, UPGT_X2_SIGNATURE_SIZE); x2->startaddr = htole32(UPGT_MEMADDR_FIRMWARE_START); x2->len = htole32(fw->datasize); x2->crc = upgt_crc32_le((uint8_t *)data_cmd->buf + @@ -1925,7 +1926,7 @@ upgt_device_reset(struct upgt_softc *sc) UPGT_UNLOCK(sc); return (ENOBUFS); } - bcopy(init_cmd, data->buf, sizeof(init_cmd)); + memcpy(data->buf, init_cmd, sizeof(init_cmd)); data->buflen = sizeof(init_cmd); upgt_bulk_tx(sc, data); usb_pause_mtx(&sc->sc_mtx, 100); @@ -2178,7 +2179,7 @@ upgt_tx_start(struct upgt_softc *sc, str } /* Transmit the URB containing the TX data. */ - bzero(data->buf, MCLBYTES); + memset(data->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data->buf; mem->addr = htole32(data->addr); txdesc = (struct upgt_lmac_tx_desc *)(mem + 1); @@ -2192,7 +2193,7 @@ upgt_tx_start(struct upgt_softc *sc, str } else { /* data frames */ txdesc->header1.flags = UPGT_H1_FLAGS_TX_DATA; - bcopy(sc->sc_cur_rateset, txdesc->rates, sizeof(txdesc->rates)); + memcpy(txdesc->rates, sc->sc_cur_rateset, sizeof(txdesc->rates)); } txdesc->header1.type = UPGT_H1_TYPE_TX_DATA; txdesc->header1.len = htole16(m->m_pkthdr.len); Modified: stable/9/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 13:07:09 2011 (r229080) @@ -1745,7 +1745,7 @@ urtw_tx_start(struct urtw_softc *sc, str if ((0 == xferlen % 64) || (0 == xferlen % 512)) xferlen += 1; - bzero(data->buf, URTW_TX_MAXSIZE); + memset(data->buf, 0, URTW_TX_MAXSIZE); flags = m0->m_pkthdr.len & 0xfff; flags |= URTW_TX_FLAG_NO_ENC; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && Modified: stable/9/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 13:07:09 2011 (r229080) @@ -683,7 +683,7 @@ zyd_intr_read_callback(struct usb_xfer * if (i != cnt) continue; /* copy answer into caller-supplied buffer */ - bcopy(cmd->data, rqp->odata, rqp->olen); + memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", rqp, rqp->olen, rqp->odata, ":"); @@ -783,7 +783,7 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c return (EINVAL); cmd.code = htole16(code); - bcopy(idata, cmd.data, ilen); + memcpy(cmd.data, idata, ilen); DPRINTF(sc, ZYD_DEBUG_CMD, "sending cmd %p = %*D\n", &rq, ilen, idata, ":"); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:12:11 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7996F106566B; Sat, 31 Dec 2011 13:12:11 +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 597688FC12; Sat, 31 Dec 2011 13:12:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDCBx6064480; Sat, 31 Dec 2011 13:12:11 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDCBja064475; Sat, 31 Dec 2011 13:12:11 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112311312.pBVDCBja064475@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 31 Dec 2011 13:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:12:11 -0000 Author: gabor Date: Sat Dec 31 13:12:10 2011 New Revision: 229081 URL: http://svn.freebsd.org/changeset/base/229081 Log: MFC r228099: - Create links to the xz and lzma versions even if BSD grep is not the default. Nor GNU nor liblzma in base provides such functionality so it may be useful. MFC r228319: - Match GNU behavior of exit code - Rename variable that has a different meaning now Modified: stable/9/usr.bin/grep/Makefile stable/9/usr.bin/grep/grep.c stable/9/usr.bin/grep/grep.h stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/Makefile ============================================================================== --- stable/9/usr.bin/grep/Makefile Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/Makefile Sat Dec 31 13:12:10 2011 (r229081) @@ -25,13 +25,7 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/xzgrep \ - ${BINDIR}/grep ${BINDIR}/xzegrep \ - ${BINDIR}/grep ${BINDIR}/xzfgrep \ - ${BINDIR}/grep ${BINDIR}/lzgrep \ - ${BINDIR}/grep ${BINDIR}/lzegrep \ - ${BINDIR}/grep ${BINDIR}/lzfgrep + ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ @@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzfgrep + LDADD= -lz -llzma DPADD= ${LIBZ} ${LIBLZMA} Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/grep.c Sat Dec 31 13:12:10 2011 (r229081) @@ -148,7 +148,7 @@ static inline const char *init_color(con bool first = true; /* flag whether we are processing the first match */ bool prev; /* flag whether or not the previous line matched */ int tail; /* lines left to print */ -bool notfound; /* file not found */ +bool file_err; /* file reading error */ /* * Prints usage information and returns 2. @@ -728,5 +728,5 @@ main(int argc, char *argv[]) /* Find out the correct return value according to the results and the command line option. */ - exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); + exit(c ? (file_err ? (qflag ? 0 : 2) : 0) : (file_err ? 2 : 1)); } Modified: stable/9/usr.bin/grep/grep.h ============================================================================== --- stable/9/usr.bin/grep/grep.h Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/grep.h Sat Dec 31 13:12:10 2011 (r229081) @@ -119,7 +119,7 @@ extern char *label; extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; -extern bool first, matchall, notfound, prev; +extern bool file_err, first, matchall, prev; extern int tail; extern unsigned int dpatterns, fpatterns, patterns; extern struct pat *pattern; Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/util.c Sat Dec 31 13:12:10 2011 (r229081) @@ -130,7 +130,7 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - notfound = true; + file_err = true; if(!sflag) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; @@ -195,10 +195,9 @@ procfile(const char *fn) f = grep_open(fn); } if (f == NULL) { + file_err = true; if (!sflag) warn("%s", fn); - if (errno == ENOENT) - notfound = true; return (0); } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:12:29 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9013D106564A; Sat, 31 Dec 2011 13:12:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78BFE8FC08; Sat, 31 Dec 2011 13:12:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDCTgY064526; Sat, 31 Dec 2011 13:12:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDCT8A064522; Sat, 31 Dec 2011 13:12:29 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311312.pBVDCT8A064522@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229082 - in stable/9/sys/dev/usb: . serial X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:12:29 -0000 Author: hselasky Date: Sat Dec 31 13:12:29 2011 New Revision: 229082 URL: http://svn.freebsd.org/changeset/base/229082 Log: MFC r227463, r227383 and r227108: Add support for modem control lines. Add support for GPIO pins. PR: usb/162307 Submitted by: JD Louw Modified: stable/9/sys/dev/usb/serial/uslcom.c stable/9/sys/dev/usb/usb_ioctl.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/serial/uslcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uslcom.c Sat Dec 31 13:12:10 2011 (r229081) +++ stable/9/sys/dev/usb/serial/uslcom.c Sat Dec 31 13:12:29 2011 (r229082) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "usbdevs.h" #define USB_DEBUG_VAR uslcom_debug @@ -63,49 +64,72 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb #define USLCOM_SET_DATA_BITS(x) ((x) << 8) +/* Request types */ #define USLCOM_WRITE 0x41 #define USLCOM_READ 0xc1 +/* Request codes */ #define USLCOM_UART 0x00 #define USLCOM_BAUD_RATE 0x01 #define USLCOM_DATA 0x03 #define USLCOM_BREAK 0x05 #define USLCOM_CTRL 0x07 +#define USLCOM_RCTRL 0x08 +#define USLCOM_SET_FLOWCTRL 0x13 +#define USLCOM_VENDOR_SPECIFIC 0xff +/* USLCOM_UART values */ #define USLCOM_UART_DISABLE 0x00 #define USLCOM_UART_ENABLE 0x01 +/* USLCOM_CTRL/USLCOM_RCTRL values */ #define USLCOM_CTRL_DTR_ON 0x0001 #define USLCOM_CTRL_DTR_SET 0x0100 #define USLCOM_CTRL_RTS_ON 0x0002 #define USLCOM_CTRL_RTS_SET 0x0200 #define USLCOM_CTRL_CTS 0x0010 #define USLCOM_CTRL_DSR 0x0020 +#define USLCOM_CTRL_RI 0x0040 #define USLCOM_CTRL_DCD 0x0080 +/* USLCOM_BAUD_RATE values */ #define USLCOM_BAUD_REF 0x384000 +/* USLCOM_DATA values */ #define USLCOM_STOP_BITS_1 0x00 #define USLCOM_STOP_BITS_2 0x02 - #define USLCOM_PARITY_NONE 0x00 #define USLCOM_PARITY_ODD 0x10 #define USLCOM_PARITY_EVEN 0x20 -#define USLCOM_PORT_NO 0xFFFF /* XXX think this should be 0 --hps */ +#define USLCOM_PORT_NO 0x0000 +/* USLCOM_BREAK values */ #define USLCOM_BREAK_OFF 0x00 #define USLCOM_BREAK_ON 0x01 +/* USLCOM_SET_FLOWCTRL values - 1st word */ +#define USLCOM_FLOW_DTR_ON 0x00000001 /* DTR static active */ +#define USLCOM_FLOW_CTS_HS 0x00000008 /* CTS handshake */ +/* USLCOM_SET_FLOWCTRL values - 2nd word */ +#define USLCOM_FLOW_RTS_ON 0x00000040 /* RTS static active */ +#define USLCOM_FLOW_RTS_HS 0x00000080 /* RTS handshake */ + +/* USLCOM_VENDOR_SPECIFIC values */ +#define USLCOM_WRITE_LATCH 0x37E1 +#define USLCOM_READ_LATCH 0x00C2 + enum { USLCOM_BULK_DT_WR, USLCOM_BULK_DT_RD, + USLCOM_CTRL_DT_RD, USLCOM_N_TRANSFER, }; struct uslcom_softc { struct ucom_super_softc sc_super_ucom; struct ucom_softc sc_ucom; + struct usb_callout sc_watchdog; struct usb_xfer *sc_xfer[USLCOM_N_TRANSFER]; struct usb_device *sc_udev; @@ -121,12 +145,15 @@ static device_detach_t uslcom_detach; static usb_callback_t uslcom_write_callback; static usb_callback_t uslcom_read_callback; +static usb_callback_t uslcom_control_callback; static void uslcom_open(struct ucom_softc *); static void uslcom_close(struct ucom_softc *); static void uslcom_set_dtr(struct ucom_softc *, uint8_t); static void uslcom_set_rts(struct ucom_softc *, uint8_t); static void uslcom_set_break(struct ucom_softc *, uint8_t); +static int uslcom_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); static int uslcom_pre_param(struct ucom_softc *, struct termios *); static void uslcom_param(struct ucom_softc *, struct termios *); static void uslcom_get_status(struct ucom_softc *, uint8_t *, uint8_t *); @@ -143,7 +170,7 @@ static const struct usb_config uslcom_co .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = USLCOM_BULK_BUF_SIZE, - .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .flags = {.pipe_bof = 1,}, .callback = &uslcom_write_callback, }, @@ -155,6 +182,15 @@ static const struct usb_config uslcom_co .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uslcom_read_callback, }, + [USLCOM_CTRL_DT_RD] = { + .type = UE_CONTROL, + .endpoint = 0x00, + .direction = UE_DIR_ANY, + .bufsize = sizeof(struct usb_device_request) + 8, + .flags = {.pipe_bof = 1,}, + .callback = &uslcom_control_callback, + .timeout = 1000, /* 1 second timeout */ + }, }; static struct ucom_callback uslcom_callback = { @@ -164,6 +200,7 @@ static struct ucom_callback uslcom_callb .ucom_cfg_set_dtr = &uslcom_set_dtr, .ucom_cfg_set_rts = &uslcom_set_rts, .ucom_cfg_set_break = &uslcom_set_break, + .ucom_ioctl = &uslcom_ioctl, .ucom_cfg_param = &uslcom_param, .ucom_pre_param = &uslcom_pre_param, .ucom_start_read = &uslcom_start_read, @@ -280,6 +317,19 @@ MODULE_DEPEND(uslcom, ucom, 1, 1, 1); MODULE_DEPEND(uslcom, usb, 1, 1, 1); MODULE_VERSION(uslcom, 1); +static void +uslcom_watchdog(void *arg) +{ + struct uslcom_softc *sc = arg; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + usbd_transfer_start(sc->sc_xfer[USLCOM_CTRL_DT_RD]); + + usb_callout_reset(&sc->sc_watchdog, + hz / 4, &uslcom_watchdog, sc); +} + static int uslcom_probe(device_t dev) { @@ -310,6 +360,7 @@ uslcom_attach(device_t dev) device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uslcom", NULL, MTX_DEF); + usb_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); sc->sc_udev = uaa->device; @@ -350,6 +401,8 @@ uslcom_detach(device_t dev) ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, USLCOM_N_TRANSFER); + + usb_callout_drain(&sc->sc_watchdog); mtx_destroy(&sc->sc_mtx); return (0); @@ -371,6 +424,9 @@ uslcom_open(struct ucom_softc *ucom) &req, NULL, 0, 1000)) { DPRINTF("UART enable failed (ignored)\n"); } + + /* start polling status */ + uslcom_watchdog(sc); } static void @@ -379,13 +435,16 @@ uslcom_close(struct ucom_softc *ucom) struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; + /* stop polling status */ + usb_callout_stop(&sc->sc_watchdog); + req.bmRequestType = USLCOM_WRITE; req.bRequest = USLCOM_UART; USETW(req.wValue, USLCOM_UART_DISABLE); USETW(req.wIndex, USLCOM_PORT_NO); USETW(req.wLength, 0); - if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000)) { DPRINTF("UART disable failed (ignored)\n"); } @@ -452,6 +511,7 @@ uslcom_param(struct ucom_softc *ucom, st { struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; + uint32_t flowctrl[4]; uint16_t data; DPRINTF("\n"); @@ -503,7 +563,28 @@ uslcom_param(struct ucom_softc *ucom, st &req, NULL, 0, 1000)) { DPRINTF("Set format failed (ignored)\n"); } - return; + + if (t->c_cflag & CRTSCTS) { + flowctrl[0] = htole32(USLCOM_FLOW_DTR_ON | USLCOM_FLOW_CTS_HS); + flowctrl[1] = htole32(USLCOM_FLOW_RTS_HS); + flowctrl[2] = 0; + flowctrl[3] = 0; + } else { + flowctrl[0] = htole32(USLCOM_FLOW_DTR_ON); + flowctrl[1] = htole32(USLCOM_FLOW_RTS_ON); + flowctrl[2] = 0; + flowctrl[3] = 0; + } + req.bmRequestType = USLCOM_WRITE; + req.bRequest = USLCOM_SET_FLOWCTRL; + USETW(req.wValue, 0); + USETW(req.wIndex, USLCOM_PORT_NO); + USETW(req.wLength, sizeof(flowctrl)); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, flowctrl, 0, 1000)) { + DPRINTF("Set flowcontrol failed (ignored)\n"); + } } static void @@ -536,6 +617,55 @@ uslcom_set_break(struct ucom_softc *ucom } } +static int +uslcom_ioctl(struct ucom_softc *ucom, uint32_t cmd, caddr_t data, + int flag, struct thread *td) +{ + struct uslcom_softc *sc = ucom->sc_parent; + struct usb_device_request req; + int error = 0; + uint8_t latch; + + DPRINTF("cmd=0x%08x\n", cmd); + + switch (cmd) { + case USB_GET_GPIO: + req.bmRequestType = USLCOM_READ; + req.bRequest = USLCOM_VENDOR_SPECIFIC; + USETW(req.wValue, USLCOM_READ_LATCH); + USETW(req.wIndex, 0); + USETW(req.wLength, sizeof(latch)); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, &latch, 0, 1000)) { + DPRINTF("Get LATCH failed\n"); + error = EIO; + } + *(int *)data = latch; + break; + + case USB_SET_GPIO: + req.bmRequestType = USLCOM_WRITE; + req.bRequest = USLCOM_VENDOR_SPECIFIC; + USETW(req.wValue, USLCOM_WRITE_LATCH); + USETW(req.wIndex, (*(int *)data)); + USETW(req.wLength, 0); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, NULL, 0, 1000)) { + DPRINTF("Set LATCH failed\n"); + error = EIO; + } + break; + + default: + DPRINTF("Unknown IOCTL\n"); + error = ENOIOCTL; + break; + } + return (error); +} + static void uslcom_write_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -599,6 +729,59 @@ tr_setup: } static void +uslcom_control_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uslcom_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + struct usb_device_request req; + uint8_t msr = 0; + uint8_t buf; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + pc = usbd_xfer_get_frame(xfer, 1); + usbd_copy_out(pc, 0, &buf, sizeof(buf)); + if (buf & USLCOM_CTRL_CTS) + msr |= SER_CTS; + if (buf & USLCOM_CTRL_DSR) + msr |= SER_DSR; + if (buf & USLCOM_CTRL_RI) + msr |= SER_RI; + if (buf & USLCOM_CTRL_DCD) + msr |= SER_DCD; + + if (msr != sc->sc_msr) { + DPRINTF("status change msr=0x%02x " + "(was 0x%02x)\n", msr, sc->sc_msr); + sc->sc_msr = msr; + ucom_status_change(&sc->sc_ucom); + } + break; + + case USB_ST_SETUP: + req.bmRequestType = USLCOM_READ; + req.bRequest = USLCOM_RCTRL; + USETW(req.wValue, 0); + USETW(req.wIndex, USLCOM_PORT_NO); + USETW(req.wLength, sizeof(buf)); + + usbd_xfer_set_frames(xfer, 2); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 1, sizeof(buf)); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_transfer_submit(xfer); + break; + + default: /* error */ + if (error != USB_ERR_CANCELLED) + DPRINTF("error=%s\n", usbd_errstr(error)); + break; + } +} + +static void uslcom_start_read(struct ucom_softc *ucom) { struct uslcom_softc *sc = ucom->sc_parent; Modified: stable/9/sys/dev/usb/usb_ioctl.h ============================================================================== --- stable/9/sys/dev/usb/usb_ioctl.h Sat Dec 31 13:12:10 2011 (r229081) +++ stable/9/sys/dev/usb/usb_ioctl.h Sat Dec 31 13:12:29 2011 (r229082) @@ -289,6 +289,10 @@ struct usb_gen_quirk { #define USB_GET_CM_OVER_DATA _IOR ('U', 180, int) #define USB_SET_CM_OVER_DATA _IOW ('U', 181, int) +/* GPIO control */ +#define USB_GET_GPIO _IOR ('U', 182, int) +#define USB_SET_GPIO _IOW ('U', 183, int) + /* USB file system interface */ #define USB_FS_START _IOW ('U', 192, struct usb_fs_start) #define USB_FS_STOP _IOW ('U', 193, struct usb_fs_stop) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:13:42 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED539106566B; Sat, 31 Dec 2011 13:13:42 +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 D41D88FC1D; Sat, 31 Dec 2011 13:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDDg9T064604; Sat, 31 Dec 2011 13:13:42 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDDgmw064602; Sat, 31 Dec 2011 13:13:42 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112311313.pBVDDgmw064602@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 31 Dec 2011 13:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229083 - stable/9/usr.bin/mkesdb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:13:43 -0000 Author: gabor Date: Sat Dec 31 13:13:42 2011 New Revision: 229083 URL: http://svn.freebsd.org/changeset/base/229083 Log: MFC r228766: - Remove a GCC-specific compiler flag that was added before to eliminate some warnings but at the moment does not seem to be necessary. Modified: stable/9/usr.bin/mkesdb/Makefile.inc Directory Properties: stable/9/usr.bin/mkesdb/ (props changed) Modified: stable/9/usr.bin/mkesdb/Makefile.inc ============================================================================== --- stable/9/usr.bin/mkesdb/Makefile.inc Sat Dec 31 13:12:29 2011 (r229082) +++ stable/9/usr.bin/mkesdb/Makefile.inc Sat Dec 31 13:13:42 2011 (r229083) @@ -2,5 +2,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \ - -I${.CURDIR}/../../lib/libc/iconv \ - --param max-inline-insns-single=64 + -I${.CURDIR}/../../lib/libc/iconv From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:23:05 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E4AE106566B; Sat, 31 Dec 2011 13:23:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06BDB8FC0A; Sat, 31 Dec 2011 13:23:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDN4jg064945; Sat, 31 Dec 2011 13:23:04 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDN49w064941; Sat, 31 Dec 2011 13:23:04 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311323.pBVDN49w064941@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229084 - in stable/9/sys/dev/usb: . controller X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:23:05 -0000 Author: hselasky Date: Sat Dec 31 13:23:04 2011 New Revision: 229084 URL: http://svn.freebsd.org/changeset/base/229084 Log: MFC r227396, r227401, r227541, r227654 and r228493: Relax XHCI timeouts which should fix enumeration issues. Fix definition of XHCI port power bit. Correct size of some USB 3.0 descriptor fields. Reported by: Kohji Okuno, Jan Henrik Sylvester Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhcireg.h stable/9/sys/dev/usb/usb.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Sat Dec 31 13:13:42 2011 (r229083) +++ stable/9/sys/dev/usb/controller/xhci.c Sat Dec 31 13:23:04 2011 (r229084) @@ -292,7 +292,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBCMD) & (XHCI_CMD_HCRST | XHCI_STS_CNR); if (!temp) @@ -453,7 +453,7 @@ xhci_start_controller(struct xhci_softc XHCI_CMD_INTE | XHCI_CMD_HSEE); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; if (!temp) break; @@ -487,7 +487,7 @@ xhci_halt_controller(struct xhci_softc * XWRITE4(sc, oper, XHCI_USBCMD, 0); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; if (temp) break; @@ -1110,7 +1110,7 @@ xhci_cmd_nop(struct xhci_softc *sc) trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } #endif @@ -1127,7 +1127,7 @@ xhci_cmd_enable_slot(struct xhci_softc * trb.dwTrb2 = 0; trb.dwTrb3 = htole32(XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_ENABLE_SLOT)); - err = xhci_do_command(sc, &trb, 50 /* ms */); + err = xhci_do_command(sc, &trb, 100 /* ms */); if (err) goto done; @@ -1154,7 +1154,7 @@ xhci_cmd_disable_slot(struct xhci_softc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1310,7 +1310,7 @@ xhci_cmd_configure_ep(struct xhci_softc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1328,7 +1328,7 @@ xhci_cmd_evaluate_ctx(struct xhci_softc XHCI_TRB_3_SLOT_SET(slot_id); trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1351,7 +1351,7 @@ xhci_cmd_reset_ep(struct xhci_softc *sc, trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1373,7 +1373,7 @@ xhci_cmd_set_tr_dequeue_ptr(struct xhci_ XHCI_TRB_3_EP_SET(ep_id); trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1396,7 +1396,7 @@ xhci_cmd_stop_ep(struct xhci_softc *sc, trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1414,7 +1414,7 @@ xhci_cmd_reset_dev(struct xhci_softc *sc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } /*------------------------------------------------------------------------* @@ -2831,7 +2831,7 @@ struct xhci_bos_desc xhci_bosd = { .bLength = sizeof(xhci_bosd.usb2extd), .bDescriptorType = 1, .bDevCapabilityType = 2, - .bmAttributes = 2, + .bmAttributes[0] = 2, }, .usbdcd = { .bLength = sizeof(xhci_bosd.usbdcd), @@ -2841,7 +2841,8 @@ struct xhci_bos_desc xhci_bosd = { HSETW(.wSpeedsSupported, 0x000C), .bFunctionalitySupport = 8, .bU1DevExitLat = 255, /* dummy - not used */ - .bU2DevExitLat = 255, /* dummy - not used */ + .wU2DevExitLat[0] = 0x00, + .wU2DevExitLat[1] = 0x08, }, .cidd = { .bLength = sizeof(xhci_bosd.cidd), Modified: stable/9/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhcireg.h Sat Dec 31 13:13:42 2011 (r229083) +++ stable/9/sys/dev/usb/controller/xhcireg.h Sat Dec 31 13:23:04 2011 (r229084) @@ -115,7 +115,7 @@ #define XHCI_PS_PR 0x00000010 /* RW - port reset */ #define XHCI_PS_PLS_GET(x) (((x) >> 5) & 0xF) /* RW - port link state */ #define XHCI_PS_PLS_SET(x) (((x) & 0xF) << 5) /* RW - port link state */ -#define XHCI_PS_PP 0x00000100 /* RW - port power */ +#define XHCI_PS_PP 0x00000200 /* RW - port power */ #define XHCI_PS_SPEED_GET(x) (((x) >> 10) & 0xF) /* RO - port speed */ #define XHCI_PS_PIC_GET(x) (((x) >> 14) & 0x3) /* RW - port indicator */ #define XHCI_PS_PIC_SET(x) (((x) & 0x3) << 14) /* RW - port indicator */ Modified: stable/9/sys/dev/usb/usb.h ============================================================================== --- stable/9/sys/dev/usb/usb.h Sat Dec 31 13:13:42 2011 (r229083) +++ stable/9/sys/dev/usb/usb.h Sat Dec 31 13:23:04 2011 (r229084) @@ -323,7 +323,7 @@ struct usb_devcap_usb2ext_descriptor { uByte bLength; uByte bDescriptorType; uByte bDevCapabilityType; - uByte bmAttributes; + uDWord bmAttributes; #define USB_V2EXT_LPM 0x02 } __packed; typedef struct usb_devcap_usb2ext_descriptor usb_devcap_usb2ext_descriptor_t; @@ -336,7 +336,7 @@ struct usb_devcap_ss_descriptor { uWord wSpeedsSupported; uByte bFunctionalitySupport; uByte bU1DevExitLat; - uByte bU2DevExitLat; + uWord wU2DevExitLat; } __packed; typedef struct usb_devcap_ss_descriptor usb_devcap_ss_descriptor_t; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:37:26 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196A8106564A; Sat, 31 Dec 2011 13:37:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDE1B8FC13; Sat, 31 Dec 2011 13:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDbPjh065480; Sat, 31 Dec 2011 13:37:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDbPE8065478; Sat, 31 Dec 2011 13:37:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311337.pBVDbPE8065478@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 13:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229087 - stable/9/share/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:37:26 -0000 Author: dim Date: Sat Dec 31 13:37:25 2011 New Revision: 229087 URL: http://svn.freebsd.org/changeset/base/229087 Log: MFC r228546: Clang has more warnings enabled by default, and when using -Wall, so if WARNS is set to low values, some of them have to be disabled explicitly. MFC r228551: Disable one more clang warning when WARNS <= 3. MFC r228606: Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang, to selectively work around warnings in programs that don't use flexible array members, but instead define arrays of length 1 at the end of the struct, and then access those beyond their declared bounds. MFC r228617: Disable yet another clang warning when WARNS <= 3. MFC r228675: Disable yet another clang warning (-Wconversion) when WARNS <= 3. MFC r228677: Disable another clang warning (-Wempty-body) when WARNS <= 2. Modified: stable/9/share/mk/bsd.sys.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Sat Dec 31 13:34:42 2011 (r229086) +++ stable/9/share/mk/bsd.sys.mk Sat Dec 31 13:37:25 2011 (r229087) @@ -57,6 +57,24 @@ CWARNFLAGS += -Wchar-subscripts -Winline CWARNFLAGS += -Wno-uninitialized . endif CWARNFLAGS += -Wno-pointer-sign +# Clang has more warnings enabled by default, and when using -Wall, so if WARNS +# is set to low values, these have to be disabled explicitly. +. if ${CC:T:Mclang} == "clang" +. if ${WARNS} <= 3 +CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ + -Wno-parentheses-equality -Wno-unused-function\ + -Wno-conversion +. endif +. if ${WARNS} <= 2 +CWARNFLAGS += -Wno-switch-enum -Wno-empty-body +. endif +. if ${WARNS} <= 1 +CWARNFLAGS += -Wno-parentheses +. endif +. if defined(NO_WARRAY_BOUNDS) +CWARNFLAGS += -Wno-array-bounds +. endif +. endif . endif . if defined(FORMAT_AUDIT) From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:43:51 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE2F6106564A; Sat, 31 Dec 2011 13:43:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A71EF8FC08; Sat, 31 Dec 2011 13:43:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDhpcp065744; Sat, 31 Dec 2011 13:43:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDhp67065741; Sat, 31 Dec 2011 13:43:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311343.pBVDhp67065741@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 13:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229088 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:43:51 -0000 Author: dim Date: Sat Dec 31 13:43:51 2011 New Revision: 229088 URL: http://svn.freebsd.org/changeset/base/229088 Log: MFC r228547: Cast away a clang alignment warning in drti.c's fixsymbol() function. This code only runs on i386 and amd64, so there should be no problems if buf + sec->dofs_offset is not aligned (which is unlikely anyway). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Dec 31 13:37:25 2011 (r229087) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Dec 31 13:43:51 2011 (r229088) @@ -102,7 +102,7 @@ fixsymbol(Elf *e, Elf_Data *data, size_t int ndx; while (gelf_getsym(data, j++, &sym) != NULL) { - prb = (dof_probe_t *)(buf + sec->dofs_offset); + prb = (dof_probe_t *)(void *)(buf + sec->dofs_offset); for (ndx = nprobes; ndx; ndx--, prb += 1) { funcname = dofstrtab + prb->dofpr_func; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 13:56:32 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C09E8106564A; Sat, 31 Dec 2011 13:56:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA9958FC08; Sat, 31 Dec 2011 13:56:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDuWW8066235; Sat, 31 Dec 2011 13:56:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDuWkF066233; Sat, 31 Dec 2011 13:56:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311356.pBVDuWkF066233@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 13:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229090 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:56:32 -0000 Author: dim Date: Sat Dec 31 13:56:32 2011 New Revision: 229090 URL: http://svn.freebsd.org/changeset/base/229090 Log: MFC r228548: In cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c, use the correct printf format for an unsigned long. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Sat Dec 31 13:44:10 2011 (r229089) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Sat Dec 31 13:56:32 2011 (r229090) @@ -436,7 +436,7 @@ dt_pid_create_glob_offset_probes(struct char name[sizeof (i) * 2 + 1]; for (i = 0; i < end; i += size) { - (void) snprintf(name, sizeof (name), "%x", i); + (void) snprintf(name, sizeof (name), "%lx", i); if (gmatch(name, pattern)) ftp->ftps_offs[ftp->ftps_noffs++] = i; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:02:16 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B94631065672; Sat, 31 Dec 2011 14:02:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99BAF8FC14; Sat, 31 Dec 2011 14:02:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVE2G6s066490; Sat, 31 Dec 2011 14:02:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVE2G9s066488; Sat, 31 Dec 2011 14:02:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311402.pBVE2G9s066488@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229091 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:02:16 -0000 Author: dim Date: Sat Dec 31 14:02:16 2011 New Revision: 229091 URL: http://svn.freebsd.org/changeset/base/229091 Log: MFC r228549: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c, use the correct printf format for a key_t (aka long). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Dec 31 13:56:32 2011 (r229090) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Dec 31 14:02:16 2011 (r229091) @@ -1106,7 +1106,7 @@ process_obj(dtrace_hdl_t *dtp, const cha static const char dt_prefix[] = "__dtrace"; static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; - static const char dt_symfmt[] = "%s%d.%s"; + static const char dt_symfmt[] = "%s%ld.%s"; int fd, i, ndx, eprobe, mod = 0; Elf *elf = NULL; GElf_Ehdr ehdr; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:04:54 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5293106564A; Sat, 31 Dec 2011 14:04:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EE258FC0A; Sat, 31 Dec 2011 14:04:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVE4srX066619; Sat, 31 Dec 2011 14:04:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVE4sei066617; Sat, 31 Dec 2011 14:04:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311404.pBVE4sei066617@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229092 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:04:54 -0000 Author: dim Date: Sat Dec 31 14:04:54 2011 New Revision: 229092 URL: http://svn.freebsd.org/changeset/base/229092 Log: MFC r228550: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c, the dt_popc() function assumes that either _ILP32 or _LP64 is defined, otherwise it has no suitable implementation. However, the _ILP32 and _LP64 macros come from isa_defs.h, which is not included in this file. Add the include now, to get the macros defined. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Sat Dec 31 14:02:16 2011 (r229091) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Sat Dec 31 14:04:54 2011 (r229092) @@ -27,6 +27,7 @@ #if defined(sun) #include #endif +#include #include #include From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:12:14 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CC9D106566C; Sat, 31 Dec 2011 14:12:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 317B38FC14; Sat, 31 Dec 2011 14:12:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVECEAU067027; Sat, 31 Dec 2011 14:12:14 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVECDLl066966; Sat, 31 Dec 2011 14:12:13 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311412.pBVECDLl066966@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229093 - in stable/9/sys: amd64/amd64 arm/econa arm/mv arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 dev/aac dev/acpi_support dev/acpica dev/amr dev/arcmsr dev/bce dev/bfe dev/... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:12:14 -0000 Author: hselasky Date: Sat Dec 31 14:12:12 2011 New Revision: 229093 URL: http://svn.freebsd.org/changeset/base/229093 Log: MFC r226173, r227843, r227848 and r227908: Use DEVMETHOD_END to mark end of device methods. Remove superfluous device methods. Add some missing __FBSBID() macros. Modified: stable/9/sys/amd64/amd64/legacy.c stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/arm/mv/mv_pci.c stable/9/sys/arm/xscale/i80321/i80321_pci.c stable/9/sys/arm/xscale/i8134x/i81342_pci.c stable/9/sys/arm/xscale/ixp425/ixp425_pci.c stable/9/sys/dev/aac/aac_pci.c stable/9/sys/dev/acpi_support/acpi_wmi.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_isab.c stable/9/sys/dev/acpica/acpi_pcib_acpi.c stable/9/sys/dev/amr/amr_pci.c stable/9/sys/dev/arcmsr/arcmsr.c stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bfe/if_bfe.c stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bm/if_bm.c stable/9/sys/dev/bwn/if_bwn.c stable/9/sys/dev/bxe/if_bxe.c stable/9/sys/dev/cas/if_cas.c stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/dc/dcphy.c stable/9/sys/dev/dc/if_dc.c stable/9/sys/dev/dc/pnphy.c stable/9/sys/dev/eisa/eisaconf.c stable/9/sys/dev/esp/esp_pci.c stable/9/sys/dev/esp/esp_sbus.c stable/9/sys/dev/et/if_et.c stable/9/sys/dev/fb/fb.c stable/9/sys/dev/firewire/firewire.c stable/9/sys/dev/firewire/fwohci_pci.c stable/9/sys/dev/gem/if_gem_pci.c stable/9/sys/dev/gem/if_gem_sbus.c stable/9/sys/dev/gpio/gpiobus.c stable/9/sys/dev/hifn/hifn7751.c stable/9/sys/dev/hme/if_hme_pci.c stable/9/sys/dev/hme/if_hme_sbus.c stable/9/sys/dev/ichsmb/ichsmb_pci.c stable/9/sys/dev/ida/ida_pci.c stable/9/sys/dev/if_ndis/if_ndis_usb.c stable/9/sys/dev/iicbus/iicbus.c stable/9/sys/dev/iicbus/iicsmb.c stable/9/sys/dev/lge/if_lge.c stable/9/sys/dev/mca/mca_bus.c stable/9/sys/dev/mfi/mfi_pci.c stable/9/sys/dev/mii/acphy.c stable/9/sys/dev/mii/amphy.c stable/9/sys/dev/mii/atphy.c stable/9/sys/dev/mii/axphy.c stable/9/sys/dev/mii/bmtphy.c stable/9/sys/dev/mii/brgphy.c stable/9/sys/dev/mii/ciphy.c stable/9/sys/dev/mii/e1000phy.c stable/9/sys/dev/mii/gentbi.c stable/9/sys/dev/mii/icsphy.c stable/9/sys/dev/mii/ip1000phy.c stable/9/sys/dev/mii/jmphy.c stable/9/sys/dev/mii/lxtphy.c stable/9/sys/dev/mii/mii.c stable/9/sys/dev/mii/mlphy.c stable/9/sys/dev/mii/nsgphy.c stable/9/sys/dev/mii/nsphy.c stable/9/sys/dev/mii/nsphyter.c stable/9/sys/dev/mii/pnaphy.c stable/9/sys/dev/mii/qsphy.c stable/9/sys/dev/mii/rdcphy.c stable/9/sys/dev/mii/rgephy.c stable/9/sys/dev/mii/rlphy.c stable/9/sys/dev/mii/rlswitch.c stable/9/sys/dev/mii/smcphy.c stable/9/sys/dev/mii/tdkphy.c stable/9/sys/dev/mii/tlphy.c stable/9/sys/dev/mii/truephy.c stable/9/sys/dev/mii/ukphy.c stable/9/sys/dev/mii/xmphy.c stable/9/sys/dev/mlx/mlx_pci.c stable/9/sys/dev/mps/mps_pci.c stable/9/sys/dev/msk/if_msk.c stable/9/sys/dev/nfe/if_nfe.c stable/9/sys/dev/nge/if_nge.c stable/9/sys/dev/nve/if_nve.c stable/9/sys/dev/ofw/ofw_iicbus.c stable/9/sys/dev/pccbb/pccbb_isa.c stable/9/sys/dev/pccbb/pccbb_pci.c stable/9/sys/dev/pci/eisa_pci.c stable/9/sys/dev/pci/isa_pci.c stable/9/sys/dev/pci/pci_pci.c stable/9/sys/dev/pcn/if_pcn.c stable/9/sys/dev/ppbus/lpbb.c stable/9/sys/dev/puc/puc_pccard.c stable/9/sys/dev/puc/puc_pci.c stable/9/sys/dev/quicc/quicc_bfe_fdt.c stable/9/sys/dev/re/if_re.c stable/9/sys/dev/rt/if_rt.c stable/9/sys/dev/safe/safe.c stable/9/sys/dev/scc/scc_bfe_ebus.c stable/9/sys/dev/scc/scc_bfe_macio.c stable/9/sys/dev/scc/scc_bfe_quicc.c stable/9/sys/dev/scc/scc_bfe_sbus.c stable/9/sys/dev/sec/sec.c stable/9/sys/dev/sf/if_sf.c stable/9/sys/dev/sfxge/sfxge.c stable/9/sys/dev/sge/if_sge.c stable/9/sys/dev/siba/siba.c stable/9/sys/dev/siba/siba_bwn.c stable/9/sys/dev/siba/siba_cc.c stable/9/sys/dev/siba/siba_pcib.c stable/9/sys/dev/sis/if_sis.c stable/9/sys/dev/sk/if_sk.c stable/9/sys/dev/smbus/smbus.c stable/9/sys/dev/sound/isa/gusc.c stable/9/sys/dev/sound/isa/sbc.c stable/9/sys/dev/sound/pci/csa.c stable/9/sys/dev/sound/pci/fm801.c stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/spibus/spibus.c stable/9/sys/dev/ste/if_ste.c stable/9/sys/dev/stge/if_stge.c stable/9/sys/dev/tl/if_tl.c stable/9/sys/dev/tsec/if_tsec_fdt.c stable/9/sys/dev/twa/tw_osl_freebsd.c stable/9/sys/dev/twe/twe_freebsd.c stable/9/sys/dev/tws/tws.c stable/9/sys/dev/ubsec/ubsec.c stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/net/if_aue.c stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_mos.c stable/9/sys/dev/usb/net/if_rue.c stable/9/sys/dev/usb/net/if_udav.c stable/9/sys/dev/usb/net/ruephy.c stable/9/sys/dev/vge/if_vge.c stable/9/sys/dev/vr/if_vr.c stable/9/sys/dev/vte/if_vte.c stable/9/sys/dev/wb/if_wb.c stable/9/sys/dev/xen/pcifront/pcifront.c stable/9/sys/dev/xl/if_xl.c stable/9/sys/dev/xl/xlphy.c stable/9/sys/i386/i386/legacy.c stable/9/sys/isa/vga_isa.c stable/9/sys/mips/adm5120/admpci.c stable/9/sys/mips/atheros/apb.c stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/atheros/ar71xx_pci.c stable/9/sys/mips/atheros/ar724x_pci.c stable/9/sys/mips/atheros/if_arge.c stable/9/sys/mips/cavium/octopci.c stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/idt/idtpci.c stable/9/sys/mips/idt/if_kr.c stable/9/sys/mips/malta/gt.c stable/9/sys/mips/malta/gt_pci.c stable/9/sys/mips/nlm/xlp_pci.c stable/9/sys/mips/rmi/dev/nlge/if_nlge.c stable/9/sys/mips/rmi/dev/sec/rmisec.c stable/9/sys/mips/rmi/xlr_pci.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/pci/if_rl.c stable/9/sys/pci/intpm.c stable/9/sys/pci/viapm.c stable/9/sys/powerpc/aim/nexus.c stable/9/sys/powerpc/mambo/mambo.c stable/9/sys/powerpc/mpc85xx/nexus.c stable/9/sys/powerpc/mpc85xx/pci_fdt.c stable/9/sys/powerpc/ofw/ofw_cpu.c stable/9/sys/powerpc/ofw/ofw_pcib_pci.c stable/9/sys/powerpc/powermac/cpcht.c stable/9/sys/powerpc/powermac/cuda.c stable/9/sys/powerpc/powermac/grackle.c stable/9/sys/powerpc/powermac/pmu.c stable/9/sys/powerpc/powermac/uninorthpci.c stable/9/sys/powerpc/ps3/ehci_ps3.c stable/9/sys/powerpc/ps3/ohci_ps3.c stable/9/sys/powerpc/ps3/ps3bus.c stable/9/sys/sparc64/central/central.c stable/9/sys/sparc64/ebus/ebus.c stable/9/sys/sparc64/ebus/epic.c stable/9/sys/sparc64/fhc/fhc.c stable/9/sys/sparc64/pci/apb.c stable/9/sys/sparc64/pci/fire.c stable/9/sys/sparc64/pci/ofw_pcib.c stable/9/sys/sparc64/pci/ofw_pcibus.c stable/9/sys/sparc64/pci/psycho.c stable/9/sys/sparc64/pci/sbbc.c stable/9/sys/sparc64/pci/schizo.c stable/9/sys/sparc64/sbus/dma_sbus.c stable/9/sys/sparc64/sbus/sbus.c stable/9/sys/sparc64/sparc64/eeprom.c stable/9/sys/sparc64/sparc64/jbusppm.c stable/9/sys/sparc64/sparc64/nexus.c stable/9/sys/sparc64/sparc64/rtc.c stable/9/sys/sparc64/sparc64/sc_machdep.c stable/9/sys/sparc64/sparc64/schppm.c stable/9/sys/sparc64/sparc64/ssm.c stable/9/sys/sparc64/sparc64/upa.c stable/9/sys/x86/pci/pci_bus.c stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mptable_pci.c stable/9/sys/xen/xenstore/xenstore.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/amd64/amd64/legacy.c ============================================================================== --- stable/9/sys/amd64/amd64/legacy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/amd64/amd64/legacy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -237,19 +237,17 @@ static device_method_t cpu_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, cpu_add_child), DEVMETHOD(bus_read_ivar, cpu_read_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_get_resource_list, cpu_get_rlist), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t cpu_driver = { Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -281,10 +281,7 @@ static device_method_t ehci_methods[] = DEVMETHOD(device_resume, ehci_ebus_resume), DEVMETHOD(device_shutdown, ehci_ebus_shutdown), - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - - {0, 0} + DEVMETHOD_END }; static driver_t ehci_driver = { Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:12:12 2011 (r229093) @@ -222,10 +222,7 @@ static device_method_t ohci_methods[] = DEVMETHOD(device_detach, ohci_ec_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - - {0, 0} + DEVMETHOD_END }; static driver_t ohci_driver = { Modified: stable/9/sys/arm/mv/mv_pci.c ============================================================================== --- stable/9/sys/arm/mv/mv_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/mv/mv_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -171,7 +171,6 @@ static device_method_t mv_pcib_methods[] DEVMETHOD(device_attach, mv_pcib_attach), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, mv_pcib_read_ivar), DEVMETHOD(bus_write_ivar, mv_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, mv_pcib_alloc_resource), @@ -194,7 +193,7 @@ static device_method_t mv_pcib_methods[] DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - { 0, 0 } + DEVMETHOD_END }; static driver_t mv_pcib_driver = { Modified: stable/9/sys/arm/xscale/i80321/i80321_pci.c ============================================================================== --- stable/9/sys/arm/xscale/i80321/i80321_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/xscale/i80321/i80321_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -373,7 +373,6 @@ static device_method_t i80321_pci_method DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, i80321_read_ivar), DEVMETHOD(bus_write_ivar, i80321_write_ivar), DEVMETHOD(bus_alloc_resource, i80321_pci_alloc_resource), @@ -389,7 +388,7 @@ static device_method_t i80321_pci_method DEVMETHOD(pcib_write_config, i80321_pci_write_config), DEVMETHOD(pcib_route_interrupt, machdep_pci_route_interrupt), - {0, 0} + DEVMETHOD_END }; static driver_t i80321_pci_driver = { Modified: stable/9/sys/arm/xscale/i8134x/i81342_pci.c ============================================================================== --- stable/9/sys/arm/xscale/i8134x/i81342_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/xscale/i8134x/i81342_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -516,7 +516,6 @@ static device_method_t i81342_pci_method DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, i81342_read_ivar), DEVMETHOD(bus_write_ivar, i81342_write_ivar), DEVMETHOD(bus_alloc_resource, i81342_pci_alloc_resource), @@ -532,7 +531,7 @@ static device_method_t i81342_pci_method DEVMETHOD(pcib_write_config, i81342_pci_write_config), DEVMETHOD(pcib_route_interrupt, i81342_pci_route_interrupt), - {0, 0} + DEVMETHOD_END }; static driver_t i81342_pci_driver = { Modified: stable/9/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- stable/9/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -445,7 +445,6 @@ static device_method_t ixppcib_methods[] DEVMETHOD(device_attach, ixppcib_attach), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, ixppcib_read_ivar), DEVMETHOD(bus_write_ivar, ixppcib_write_ivar), DEVMETHOD(bus_setup_intr, ixppcib_setup_intr), @@ -462,7 +461,7 @@ static device_method_t ixppcib_methods[] DEVMETHOD(pcib_write_config, ixppcib_write_config), DEVMETHOD(pcib_route_interrupt, ixppcib_route_interrupt), - {0, 0}, + DEVMETHOD_END }; static driver_t ixppcib_driver = { Modified: stable/9/sys/dev/aac/aac_pci.c ============================================================================== --- stable/9/sys/dev/aac/aac_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/aac/aac_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -68,9 +68,7 @@ static device_method_t aac_methods[] = { DEVMETHOD(device_suspend, aac_suspend), DEVMETHOD(device_resume, aac_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + DEVMETHOD_END }; static driver_t aac_pci_driver = { Modified: stable/9/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- stable/9/sys/dev/acpi_support/acpi_wmi.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpi_support/acpi_wmi.c Sat Dec 31 14:12:12 2011 (r229093) @@ -175,7 +175,6 @@ static device_method_t acpi_wmi_methods[ /* bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* acpi_wmi interface */ DEVMETHOD(acpi_wmi_provides_guid_string, @@ -189,7 +188,7 @@ static device_method_t acpi_wmi_methods[ DEVMETHOD(acpi_wmi_get_block, acpi_wmi_get_block_method), DEVMETHOD(acpi_wmi_set_block, acpi_wmi_set_block_method), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_wmi_driver = { Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpica/acpi_cpu.c Sat Dec 31 14:12:12 2011 (r229093) @@ -187,13 +187,12 @@ static device_method_t acpi_cpu_methods[ DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_cpu_driver = { Modified: stable/9/sys/dev/acpica/acpi_isab.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_isab.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpica/acpi_isab.c Sat Dec 31 14:12:12 2011 (r229093) @@ -68,7 +68,6 @@ static device_method_t acpi_isab_methods DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, acpi_isab_read_ivar), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), @@ -77,7 +76,7 @@ static device_method_t acpi_isab_methods DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_isab_driver = { Modified: stable/9/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_pcib_acpi.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpica/acpi_pcib_acpi.c Sat Dec 31 14:12:12 2011 (r229093) @@ -106,7 +106,6 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), @@ -133,7 +132,7 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(pcib_map_msi, acpi_pcib_map_msi), DEVMETHOD(pcib_power_for_sleep, acpi_pcib_power_for_sleep), - {0, 0} + DEVMETHOD_END }; static devclass_t pcib_devclass; Modified: stable/9/sys/dev/amr/amr_pci.c ============================================================================== --- stable/9/sys/dev/amr/amr_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/amr/amr_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -106,9 +106,7 @@ static device_method_t amr_methods[] = { DEVMETHOD(device_suspend, amr_pci_suspend), DEVMETHOD(device_resume, amr_pci_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + DEVMETHOD_END }; static driver_t amr_pci_driver = { Modified: stable/9/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/9/sys/dev/arcmsr/arcmsr.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/arcmsr/arcmsr.c Sat Dec 31 14:12:12 2011 (r229093) @@ -70,8 +70,11 @@ ** 1.20.00.21 03/03/2011 Ching Huang if a command timeout, then wait its ccb back before free it ** 1.20.00.22 07/04/2011 Ching Huang Fixed multiple MTX panic ****************************************************************************************** -* $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); + #if 0 #define ARCMSR_DEBUG1 1 #endif @@ -223,9 +226,8 @@ static device_method_t arcmsr_methods[]= DEVMETHOD(device_shutdown, arcmsr_shutdown), DEVMETHOD(device_suspend, arcmsr_suspend), DEVMETHOD(device_resume, arcmsr_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + + DEVMETHOD_END }; static driver_t arcmsr_driver={ Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bce/if_bce.c Sat Dec 31 14:12:12 2011 (r229093) @@ -455,10 +455,6 @@ static device_method_t bce_methods[] = { /* DEVMETHOD(device_resume, bce_resume), */ /* DEVMETHOD(device_quiesce, bce_quiesce), */ - /* Bus interface (bus_if.h) */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface (miibus_if.h) */ DEVMETHOD(miibus_readreg, bce_miibus_read_reg), DEVMETHOD(miibus_writereg, bce_miibus_write_reg), @@ -467,7 +463,7 @@ static device_method_t bce_methods[] = { /* DEVMETHOD(miibus_linkchg, bce_miibus_linkchg), */ /* DEVMETHOD(miibus_mediainit, bce_miibus_mediainit), */ - { 0, 0 } + DEVMETHOD_END }; static driver_t bce_driver = { Modified: stable/9/sys/dev/bfe/if_bfe.c ============================================================================== --- stable/9/sys/dev/bfe/if_bfe.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bfe/if_bfe.c Sat Dec 31 14:12:12 2011 (r229093) @@ -137,16 +137,12 @@ static device_method_t bfe_methods[] = { DEVMETHOD(device_suspend, bfe_suspend), DEVMETHOD(device_resume, bfe_resume), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, bfe_miibus_readreg), DEVMETHOD(miibus_writereg, bfe_miibus_writereg), DEVMETHOD(miibus_statchg, bfe_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t bfe_driver = { Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bge/if_bge.c Sat Dec 31 14:12:12 2011 (r229093) @@ -490,16 +490,12 @@ static device_method_t bge_methods[] = { DEVMETHOD(device_suspend, bge_suspend), DEVMETHOD(device_resume, bge_resume), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, bge_miibus_readreg), DEVMETHOD(miibus_writereg, bge_miibus_writereg), DEVMETHOD(miibus_statchg, bge_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t bge_driver = { Modified: stable/9/sys/dev/bm/if_bm.c ============================================================================== --- stable/9/sys/dev/bm/if_bm.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bm/if_bm.c Sat Dec 31 14:12:12 2011 (r229093) @@ -135,15 +135,12 @@ static device_method_t bm_methods[] = { DEVMETHOD(device_detach, bm_detach), DEVMETHOD(device_shutdown, bm_shutdown), - /* bus interface, for miibus */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, bm_miibus_readreg), DEVMETHOD(miibus_writereg, bm_miibus_writereg), DEVMETHOD(miibus_statchg, bm_miibus_statchg), - { 0, 0 } + + DEVMETHOD_END }; static driver_t bm_macio_driver = { Modified: stable/9/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/9/sys/dev/bwn/if_bwn.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bwn/if_bwn.c Sat Dec 31 14:12:12 2011 (r229093) @@ -14225,7 +14225,7 @@ static device_method_t bwn_methods[] = { DEVMETHOD(device_detach, bwn_detach), DEVMETHOD(device_suspend, bwn_suspend), DEVMETHOD(device_resume, bwn_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t bwn_driver = { "bwn", Modified: stable/9/sys/dev/bxe/if_bxe.c ============================================================================== --- stable/9/sys/dev/bxe/if_bxe.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bxe/if_bxe.c Sat Dec 31 14:12:12 2011 (r229093) @@ -400,11 +400,7 @@ static device_method_t bxe_methods[] = { DEVMETHOD(device_detach, bxe_detach), DEVMETHOD(device_shutdown, bxe_shutdown), - /* Bus interface (bus_if.h) */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - - KOBJMETHOD_END + DEVMETHOD_END }; Modified: stable/9/sys/dev/cas/if_cas.c ============================================================================== --- stable/9/sys/dev/cas/if_cas.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/cas/if_cas.c Sat Dec 31 14:12:12 2011 (r229093) @@ -2600,16 +2600,12 @@ static device_method_t cas_pci_methods[] /* Use the suspend handler here, it is all that is required. */ DEVMETHOD(device_shutdown, cas_pci_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, cas_mii_readreg), DEVMETHOD(miibus_writereg, cas_mii_writereg), DEVMETHOD(miibus_statchg, cas_mii_statchg), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t cas_pci_driver = { Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sat Dec 31 14:12:12 2011 (r229093) @@ -129,11 +129,7 @@ static device_method_t cxgb_controller_m DEVMETHOD(device_attach, cxgb_controller_attach), DEVMETHOD(device_detach, cxgb_controller_detach), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - - { 0, 0 } + DEVMETHOD_END }; static driver_t cxgb_controller_driver = { Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/cxgbe/t4_main.c Sat Dec 31 14:12:12 2011 (r229093) @@ -73,11 +73,7 @@ static device_method_t t4_methods[] = { DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - - { 0, 0 } + DEVMETHOD_END }; static driver_t t4_driver = { "t4nex", Modified: stable/9/sys/dev/dc/dcphy.c ============================================================================== --- stable/9/sys/dev/dc/dcphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/dc/dcphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -95,7 +95,7 @@ static device_method_t dcphy_methods[] = DEVMETHOD(device_attach, dcphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t dcphy_devclass; Modified: stable/9/sys/dev/dc/if_dc.c ============================================================================== --- stable/9/sys/dev/dc/if_dc.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/dc/if_dc.c Sat Dec 31 14:12:12 2011 (r229093) @@ -331,17 +331,13 @@ static device_method_t dc_methods[] = { DEVMETHOD(device_resume, dc_resume), DEVMETHOD(device_shutdown, dc_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, dc_miibus_readreg), DEVMETHOD(miibus_writereg, dc_miibus_writereg), DEVMETHOD(miibus_statchg, dc_miibus_statchg), DEVMETHOD(miibus_mediainit, dc_miibus_mediainit), - { 0, 0 } + DEVMETHOD_END }; static driver_t dc_driver = { Modified: stable/9/sys/dev/dc/pnphy.c ============================================================================== --- stable/9/sys/dev/dc/pnphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/dc/pnphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -74,7 +74,7 @@ static device_method_t pnphy_methods[] = DEVMETHOD(device_attach, pnphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t pnphy_devclass; Modified: stable/9/sys/dev/eisa/eisaconf.c ============================================================================== --- stable/9/sys/dev/eisa/eisaconf.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/eisa/eisaconf.c Sat Dec 31 14:12:12 2011 (r229093) @@ -557,7 +557,6 @@ static device_method_t eisa_methods[] = DEVMETHOD(bus_probe_nomatch, eisa_probe_nomatch), DEVMETHOD(bus_read_ivar, eisa_read_ivar), DEVMETHOD(bus_write_ivar, eisa_write_ivar), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_alloc_resource, eisa_alloc_resource), DEVMETHOD(bus_release_resource, eisa_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), @@ -570,7 +569,7 @@ static device_method_t eisa_methods[] = DEVMETHOD(eisa_add_iospace, eisa_add_iospace_m), DEVMETHOD(eisa_add_mspace, eisa_add_mspace_m), - { 0, 0 } + DEVMETHOD_END }; static driver_t eisa_driver = { Modified: stable/9/sys/dev/esp/esp_pci.c ============================================================================== --- stable/9/sys/dev/esp/esp_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/esp/esp_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -146,7 +146,7 @@ static device_method_t esp_pci_methods[] DEVMETHOD(device_suspend, esp_pci_suspend), DEVMETHOD(device_resume, esp_pci_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t esp_pci_driver = { Modified: stable/9/sys/dev/esp/esp_sbus.c ============================================================================== --- stable/9/sys/dev/esp/esp_sbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/esp/esp_sbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -117,7 +117,7 @@ static device_method_t esp_dma_methods[] DEVMETHOD(device_suspend, esp_suspend), DEVMETHOD(device_resume, esp_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t esp_dma_driver = { @@ -136,7 +136,7 @@ static device_method_t esp_sbus_methods[ DEVMETHOD(device_suspend, esp_suspend), DEVMETHOD(device_resume, esp_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t esp_sbus_driver = { Modified: stable/9/sys/dev/et/if_et.c ============================================================================== --- stable/9/sys/dev/et/if_et.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/et/if_et.c Sat Dec 31 14:12:12 2011 (r229093) @@ -170,14 +170,11 @@ static device_method_t et_methods[] = { DEVMETHOD(device_detach, et_detach), DEVMETHOD(device_shutdown, et_shutdown), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - DEVMETHOD(miibus_readreg, et_miibus_readreg), DEVMETHOD(miibus_writereg, et_miibus_writereg), DEVMETHOD(miibus_statchg, et_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t et_driver = { Modified: stable/9/sys/dev/fb/fb.c ============================================================================== --- stable/9/sys/dev/fb/fb.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/fb/fb.c Sat Dec 31 14:12:12 2011 (r229093) @@ -315,8 +315,7 @@ static device_method_t fb_methods[] = { DEVMETHOD(device_probe, fbprobe), DEVMETHOD(device_attach, fbattach), - DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } + DEVMETHOD_END }; static driver_t fb_driver = { Modified: stable/9/sys/dev/firewire/firewire.c ============================================================================== --- stable/9/sys/dev/firewire/firewire.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/firewire/firewire.c Sat Dec 31 14:12:12 2011 (r229093) @@ -30,11 +30,11 @@ * 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$ - * */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -128,9 +128,8 @@ static device_method_t firewire_methods[ /* Bus interface */ DEVMETHOD(bus_add_child, firewire_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } + DEVMETHOD_END }; char *linkspeed[] = { "S100", "S200", "S400", "S800", Modified: stable/9/sys/dev/firewire/fwohci_pci.c ============================================================================== --- stable/9/sys/dev/firewire/fwohci_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/firewire/fwohci_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -30,10 +30,11 @@ * 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$ */ +#include +__FBSDID("$FreeBSD$"); + #define BOUNCE_BUFFER_TEST 0 #include @@ -536,9 +537,8 @@ static device_method_t fwohci_methods[] /* Bus interface */ DEVMETHOD(bus_add_child, fwohci_pci_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } + DEVMETHOD_END }; static driver_t fwohci_driver = { Modified: stable/9/sys/dev/gem/if_gem_pci.c ============================================================================== --- stable/9/sys/dev/gem/if_gem_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/gem/if_gem_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -82,16 +82,12 @@ static device_method_t gem_pci_methods[] /* Use the suspend handler here, it is all that is required. */ DEVMETHOD(device_shutdown, gem_pci_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, gem_mii_readreg), DEVMETHOD(miibus_writereg, gem_mii_writereg), DEVMETHOD(miibus_statchg, gem_mii_statchg), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t gem_pci_driver = { Modified: stable/9/sys/dev/gem/if_gem_sbus.c ============================================================================== --- stable/9/sys/dev/gem/if_gem_sbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/gem/if_gem_sbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -78,16 +78,12 @@ static device_method_t gem_sbus_methods[ /* Use the suspend handler here, it is all that is required. */ DEVMETHOD(device_shutdown, gem_sbus_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, gem_mii_readreg), DEVMETHOD(miibus_writereg, gem_mii_writereg), DEVMETHOD(miibus_statchg, gem_mii_statchg), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t gem_sbus_driver = { Modified: stable/9/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -461,7 +461,6 @@ static device_method_t gpiobus_methods[] /* Bus interface */ DEVMETHOD(bus_add_child, gpiobus_add_child), DEVMETHOD(bus_print_child, gpiobus_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_child_pnpinfo_str, gpiobus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, gpiobus_child_location_str), DEVMETHOD(bus_hinted_child, gpiobus_hinted_child), @@ -478,7 +477,7 @@ static device_method_t gpiobus_methods[] DEVMETHOD(gpiobus_pin_set, gpiobus_pin_set), DEVMETHOD(gpiobus_pin_toggle, gpiobus_pin_toggle), - { 0, 0 } + DEVMETHOD_END }; driver_t gpiobus_driver = { Modified: stable/9/sys/dev/hifn/hifn7751.c ============================================================================== --- stable/9/sys/dev/hifn/hifn7751.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/hifn/hifn7751.c Sat Dec 31 14:12:12 2011 (r229093) @@ -113,16 +113,12 @@ static device_method_t hifn_methods[] = DEVMETHOD(device_resume, hifn_resume), DEVMETHOD(device_shutdown, hifn_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* crypto device methods */ DEVMETHOD(cryptodev_newsession, hifn_newsession), DEVMETHOD(cryptodev_freesession,hifn_freesession), DEVMETHOD(cryptodev_process, hifn_process), - { 0, 0 } + DEVMETHOD_END }; static driver_t hifn_driver = { "hifn", Modified: stable/9/sys/dev/hme/if_hme_pci.c ============================================================================== --- stable/9/sys/dev/hme/if_hme_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/hme/if_hme_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -93,16 +93,12 @@ static device_method_t hme_pci_methods[] /* Can just use the suspend method here. */ DEVMETHOD(device_shutdown, hme_pci_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, hme_mii_readreg), DEVMETHOD(miibus_writereg, hme_mii_writereg), DEVMETHOD(miibus_statchg, hme_mii_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t hme_pci_driver = { Modified: stable/9/sys/dev/hme/if_hme_sbus.c ============================================================================== --- stable/9/sys/dev/hme/if_hme_sbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/hme/if_hme_sbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -95,16 +95,12 @@ static device_method_t hme_sbus_methods[ /* Can just use the suspend method here. */ DEVMETHOD(device_shutdown, hme_sbus_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, hme_mii_readreg), DEVMETHOD(miibus_writereg, hme_mii_writereg), DEVMETHOD(miibus_statchg, hme_mii_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t hme_sbus_driver = { Modified: stable/9/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -103,9 +103,6 @@ static device_method_t ichsmb_pci_method DEVMETHOD(device_attach, ichsmb_pci_attach), DEVMETHOD(device_detach, ichsmb_detach), - /* Bus methods */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - /* SMBus methods */ DEVMETHOD(smbus_callback, ichsmb_callback), DEVMETHOD(smbus_quick, ichsmb_quick), @@ -118,7 +115,8 @@ static device_method_t ichsmb_pci_method DEVMETHOD(smbus_pcall, ichsmb_pcall), DEVMETHOD(smbus_bwrite, ichsmb_bwrite), DEVMETHOD(smbus_bread, ichsmb_bread), - { 0, 0 } + + DEVMETHOD_END }; static driver_t ichsmb_pci_driver = { Modified: stable/9/sys/dev/ida/ida_pci.c ============================================================================== --- stable/9/sys/dev/ida/ida_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/ida/ida_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -188,9 +188,7 @@ static device_method_t ida_pci_methods[] DEVMETHOD(device_attach, ida_pci_attach), DEVMETHOD(device_detach, ida_detach), - DEVMETHOD(bus_print_child, bus_generic_print_child), - - { 0, 0 } + DEVMETHOD_END }; static driver_t ida_pci_driver = { Modified: stable/9/sys/dev/if_ndis/if_ndis_usb.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis_usb.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/if_ndis/if_ndis_usb.c Sat Dec 31 14:12:12 2011 (r229093) @@ -91,11 +91,9 @@ static device_method_t ndis_methods[] = DEVMETHOD(device_shutdown, ndis_shutdown), /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_get_resource_list, ndis_get_resource_list), - { 0, 0 } + DEVMETHOD_END }; static driver_t ndis_driver = { Modified: stable/9/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/9/sys/dev/iicbus/iicbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/iicbus/iicbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -245,7 +245,6 @@ static device_method_t iicbus_methods[] /* bus interface */ DEVMETHOD(bus_add_child, iicbus_add_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), @@ -256,7 +255,7 @@ static device_method_t iicbus_methods[] /* iicbus interface */ DEVMETHOD(iicbus_transfer, iicbus_transfer), - { 0, 0 } + DEVMETHOD_END }; driver_t iicbus_driver = { Modified: stable/9/sys/dev/iicbus/iicsmb.c ============================================================================== --- stable/9/sys/dev/iicbus/iicsmb.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/iicbus/iicsmb.c Sat Dec 31 14:12:12 2011 (r229093) @@ -22,11 +22,11 @@ * 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$ - * */ +#include +__FBSDID("$FreeBSD$"); + /* * I2C to SMB bridge * @@ -106,10 +106,6 @@ static device_method_t iicsmb_methods[] DEVMETHOD(device_attach, iicsmb_attach), DEVMETHOD(device_detach, iicsmb_detach), - /* bus interface */ - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - DEVMETHOD(bus_print_child, bus_generic_print_child), - /* iicbus interface */ DEVMETHOD(iicbus_intr, iicsmb_intr), @@ -125,8 +121,8 @@ static device_method_t iicsmb_methods[] DEVMETHOD(smbus_pcall, iicsmb_pcall), DEVMETHOD(smbus_bwrite, iicsmb_bwrite), DEVMETHOD(smbus_bread, iicsmb_bread), - - { 0, 0 } + + DEVMETHOD_END }; static driver_t iicsmb_driver = { Modified: stable/9/sys/dev/lge/if_lge.c ============================================================================== --- stable/9/sys/dev/lge/if_lge.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/lge/if_lge.c Sat Dec 31 14:12:12 2011 (r229093) @@ -170,16 +170,12 @@ static device_method_t lge_methods[] = { DEVMETHOD(device_detach, lge_detach), DEVMETHOD(device_shutdown, lge_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, lge_miibus_readreg), DEVMETHOD(miibus_writereg, lge_miibus_writereg), DEVMETHOD(miibus_statchg, lge_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t lge_driver = { Modified: stable/9/sys/dev/mca/mca_bus.c ============================================================================== --- stable/9/sys/dev/mca/mca_bus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mca/mca_bus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -507,7 +507,6 @@ static device_method_t mca_methods[] = { DEVMETHOD(bus_probe_nomatch, mca_probe_nomatch), DEVMETHOD(bus_read_ivar, mca_read_ivar), DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), @@ -520,7 +519,7 @@ static device_method_t mca_methods[] = { DEVMETHOD(bus_activate_resource,bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - { 0, 0 } + DEVMETHOD_END }; static driver_t mca_driver = { Modified: stable/9/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mfi/mfi_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -92,9 +92,8 @@ static device_method_t mfi_methods[] = { DEVMETHOD(device_detach, mfi_pci_detach), DEVMETHOD(device_suspend, mfi_pci_suspend), DEVMETHOD(device_resume, mfi_pci_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + + DEVMETHOD_END }; static driver_t mfi_pci_driver = { Modified: stable/9/sys/dev/mii/acphy.c ============================================================================== --- stable/9/sys/dev/mii/acphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/acphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -87,7 +87,7 @@ static device_method_t acphy_methods[] = DEVMETHOD(device_attach, acphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t acphy_devclass; Modified: stable/9/sys/dev/mii/amphy.c ============================================================================== --- stable/9/sys/dev/mii/amphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/amphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -66,7 +66,7 @@ static device_method_t amphy_methods[] = DEVMETHOD(device_attach, amphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t amphy_devclass; Modified: stable/9/sys/dev/mii/atphy.c ============================================================================== --- stable/9/sys/dev/mii/atphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/atphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -59,7 +59,7 @@ static device_method_t atphy_methods[] = DEVMETHOD(device_attach, atphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { NULL, NULL } + DEVMETHOD_END }; static devclass_t atphy_devclass; Modified: stable/9/sys/dev/mii/axphy.c ============================================================================== --- stable/9/sys/dev/mii/axphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/axphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -56,7 +56,7 @@ static device_method_t axphy_methods[] = DEVMETHOD(device_attach, axphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t axphy_devclass; Modified: stable/9/sys/dev/mii/bmtphy.c ============================================================================== --- stable/9/sys/dev/mii/bmtphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/bmtphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -91,8 +91,7 @@ static device_method_t bmtphy_methods[] DEVMETHOD(device_attach, bmtphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - - { 0, 0 } + DEVMETHOD_END }; static devclass_t bmtphy_devclass; Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/brgphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -82,7 +82,7 @@ static device_method_t brgphy_methods[] DEVMETHOD(device_attach, brgphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t brgphy_devclass; Modified: stable/9/sys/dev/mii/ciphy.c ============================================================================== --- stable/9/sys/dev/mii/ciphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/ciphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -67,7 +67,7 @@ static device_method_t ciphy_methods[] = DEVMETHOD(device_attach, ciphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t ciphy_devclass; Modified: stable/9/sys/dev/mii/e1000phy.c ============================================================================== --- stable/9/sys/dev/mii/e1000phy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/e1000phy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -71,7 +71,7 @@ static device_method_t e1000phy_methods[ DEVMETHOD(device_attach, e1000phy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t e1000phy_devclass; Modified: stable/9/sys/dev/mii/gentbi.c ============================================================================== --- stable/9/sys/dev/mii/gentbi.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/gentbi.c Sat Dec 31 14:12:12 2011 (r229093) @@ -95,7 +95,7 @@ static device_method_t gentbi_methods[] DEVMETHOD(device_attach, gentbi_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - {0, 0} + DEVMETHOD_END }; static devclass_t gentbi_devclass; Modified: stable/9/sys/dev/mii/icsphy.c ============================================================================== --- stable/9/sys/dev/mii/icsphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/icsphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -89,7 +89,7 @@ static device_method_t icsphy_methods[] DEVMETHOD(device_attach, icsphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t icsphy_devclass; Modified: stable/9/sys/dev/mii/ip1000phy.c ============================================================================== --- stable/9/sys/dev/mii/ip1000phy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/ip1000phy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -63,7 +63,7 @@ static device_method_t ip1000phy_methods DEVMETHOD(device_attach, ip1000phy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t ip1000phy_devclass; Modified: stable/9/sys/dev/mii/jmphy.c ============================================================================== --- stable/9/sys/dev/mii/jmphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/jmphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -62,7 +62,7 @@ static device_method_t jmphy_methods[] = DEVMETHOD(device_attach, jmphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { NULL, NULL } + DEVMETHOD_END *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:13:11 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E641065677; Sat, 31 Dec 2011 14:13:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF30A8FC13; Sat, 31 Dec 2011 14:13:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEDBvB067118; Sat, 31 Dec 2011 14:13:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEDB01067116; Sat, 31 Dec 2011 14:13:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311413.pBVEDB01067116@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229094 - stable/9/lib/libipsec X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:13:11 -0000 Author: dim Date: Sat Dec 31 14:13:11 2011 New Revision: 229094 URL: http://svn.freebsd.org/changeset/base/229094 Log: MFC r228552: Define YY_NO_INPUT in lib/libipsec/policy_token.l, so lex's input() function does not get defined needlessly. MFC r228555: In lib/libipsec/policy_token.l, use lex's standard "%option noinput" instead of hand-defining the YY_NO_INPUT macro. Modified: stable/9/lib/libipsec/policy_token.l Directory Properties: stable/9/lib/libipsec/ (props changed) Modified: stable/9/lib/libipsec/policy_token.l ============================================================================== --- stable/9/lib/libipsec/policy_token.l Sat Dec 31 14:12:12 2011 (r229093) +++ stable/9/lib/libipsec/policy_token.l Sat Dec 31 14:13:11 2011 (r229094) @@ -54,6 +54,7 @@ int yylex(void); %option noyywrap %option nounput +%option noinput /* common section */ nl \n From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:21:42 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C772F1065670; Sat, 31 Dec 2011 14:21:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B18528FC14; Sat, 31 Dec 2011 14:21:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVELfYY067449; Sat, 31 Dec 2011 14:21:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVELf2H067447; Sat, 31 Dec 2011 14:21:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311421.pBVELf2H067447@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229095 - stable/9/contrib/file X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:21:42 -0000 Author: dim Date: Sat Dec 31 14:21:41 2011 New Revision: 229095 URL: http://svn.freebsd.org/changeset/base/229095 Log: MFC r228553: In contrib/file/softmagic.c, fix a potential format string security problem. (This fix has already been applied upstream, but we do not have the latest version of file in the tree at the moment.) Modified: stable/9/contrib/file/softmagic.c Directory Properties: stable/9/contrib/file/ (props changed) Modified: stable/9/contrib/file/softmagic.c ============================================================================== --- stable/9/contrib/file/softmagic.c Sat Dec 31 14:13:11 2011 (r229094) +++ stable/9/contrib/file/softmagic.c Sat Dec 31 14:21:41 2011 (r229095) @@ -1582,7 +1582,7 @@ mget(struct magic_set *ms, const unsigne case FILE_INDIRECT: if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 && - file_printf(ms, m->desc) == -1) + file_printf(ms, "%s", m->desc) == -1) return -1; if (nbytes < offset) return 0; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:22:03 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E8471065675; Sat, 31 Dec 2011 14:22:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF518FC0C; Sat, 31 Dec 2011 14:22:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEM3Cx067520; Sat, 31 Dec 2011 14:22:03 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEM2KX067506; Sat, 31 Dec 2011 14:22:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311422.pBVEM2KX067506@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229096 - in stable/9/sys: arm/econa dev/usb dev/usb/controller mips/atheros mips/cavium/usb mips/rmi mips/rt305x modules/usb modules/usb/avr32dci powerpc/ps3 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:22:03 -0000 Author: hselasky Date: Sat Dec 31 14:22:02 2011 New Revision: 229096 URL: http://svn.freebsd.org/changeset/base/229096 Log: MFC r229086, r228483 and r228640: Implement better support for USB controller suspend and resume. Fix some build issues in avr32dci.c Added: stable/9/sys/modules/usb/avr32dci/ - copied from r228483, head/sys/modules/usb/avr32dci/ Modified: stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/dev/usb/controller/at91dci.c stable/9/sys/dev/usb/controller/at91dci.h stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci.c stable/9/sys/dev/usb/controller/atmegadci.h stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/avr32dci.c stable/9/sys/dev/usb/controller/avr32dci.h stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/ehci.h stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg.c stable/9/sys/dev/usb/controller/musb_otg.h stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci.c stable/9/sys/dev/usb/controller/ohci.h stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci.c stable/9/sys/dev/usb/controller/uhci.h stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/controller/uss820dci.c stable/9/sys/dev/usb/controller/uss820dci.h stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usb_bus.h stable/9/sys/dev/usb/usb_controller.h stable/9/sys/dev/usb/usb_if.m stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/cavium/usb/octusb.c stable/9/sys/mips/cavium/usb/octusb.h stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/modules/usb/Makefile stable/9/sys/powerpc/ps3/ehci_ps3.c stable/9/sys/powerpc/ps3/ohci_ps3.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:22:02 2011 (r229096) @@ -75,10 +75,6 @@ __FBSDID("$FreeBSD$"); static device_attach_t ehci_ebus_attach; static device_detach_t ehci_ebus_detach; -static device_shutdown_t ehci_ebus_shutdown; -static device_suspend_t ehci_ebus_suspend; -static device_resume_t ehci_ebus_resume; - static void *ih_err; @@ -86,45 +82,6 @@ static void *ih_err; #define USB_BRIDGE_INTR_MASK 0x214 static int -ehci_ebus_suspend(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - int err; - - err = bus_generic_suspend(self); - if (err) - return (err); - ehci_suspend(sc); - return (0); -} - -static int -ehci_ebus_resume(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - - ehci_resume(sc); - - bus_generic_resume(self); - - return (0); -} - -static int -ehci_ebus_shutdown(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - int err; - - err = bus_generic_shutdown(self); - if (err) - return (err); - ehci_shutdown(sc); - - return (0); -} - -static int ehci_ebus_probe(device_t self) { @@ -277,17 +234,17 @@ static device_method_t ehci_methods[] = DEVMETHOD(device_probe, ehci_ebus_probe), DEVMETHOD(device_attach, ehci_ebus_attach), DEVMETHOD(device_detach, ehci_ebus_detach), - DEVMETHOD(device_suspend, ehci_ebus_suspend), - DEVMETHOD(device_resume, ehci_ebus_resume), - DEVMETHOD(device_shutdown, ehci_ebus_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t ehci_driver = { - "ehci", - ehci_methods, - sizeof(ehci_softc_t), + .name = "ehci", + .methods = ehci_methods, + .size = sizeof(ehci_softc_t), }; static devclass_t ehci_devclass; Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:22:02 2011 (r229096) @@ -220,15 +220,17 @@ static device_method_t ohci_methods[] = DEVMETHOD(device_probe, ohci_ec_probe), DEVMETHOD(device_attach, ohci_ec_attach), DEVMETHOD(device_detach, ohci_ec_detach), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t ohci_driver = { - "ohci", - ohci_methods, - sizeof(struct ec_ohci_softc), + .name = "ohci", + .methods = ohci_methods, + .size = sizeof(struct ec_ohci_softc), }; static devclass_t ohci_devclass; Modified: stable/9/sys/dev/usb/controller/at91dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -1461,16 +1461,16 @@ at91dci_uninit(struct at91dci_softc *sc) USB_BUS_UNLOCK(&sc->sc_bus); } -void +static void at91dci_suspend(struct at91dci_softc *sc) { - return; + /* TODO */ } -void +static void at91dci_resume(struct at91dci_softc *sc) { - return; + /* TODO */ } static void @@ -2306,6 +2306,26 @@ at91dci_ep_init(struct usb_device *udev, } } +static void +at91dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + at91dci_suspend(sc); + break; + case USB_HW_POWER_SHUTDOWN: + at91dci_uninit(sc); + break; + case USB_HW_POWER_RESUME: + at91dci_resume(sc); + break; + default: + break; + } +} + struct usb_bus_methods at91dci_bus_methods = { .endpoint_init = &at91dci_ep_init, @@ -2316,4 +2336,5 @@ struct usb_bus_methods at91dci_bus_metho .clear_stall = &at91dci_clear_stall, .roothub_exec = &at91dci_roothub_exec, .xfer_poll = &at91dci_do_poll, + .set_hw_power_sleep = &at91dci_set_hw_power_sleep, }; Modified: stable/9/sys/dev/usb/controller/at91dci.h ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/at91dci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -235,8 +235,6 @@ struct at91dci_softc { usb_error_t at91dci_init(struct at91dci_softc *sc); void at91dci_uninit(struct at91dci_softc *sc); -void at91dci_suspend(struct at91dci_softc *sc); -void at91dci_resume(struct at91dci_softc *sc); void at91dci_interrupt(struct at91dci_softc *sc); void at91dci_vbus_interrupt(struct at91dci_softc *sc, uint8_t is_on); Modified: stable/9/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 14:22:02 2011 (r229096) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); static device_probe_t at91_udp_probe; static device_attach_t at91_udp_attach; static device_detach_t at91_udp_detach; -static device_shutdown_t at91_udp_shutdown; struct at91_udp_softc { struct at91dci_softc sc_dci; /* must be first */ @@ -324,35 +323,22 @@ at91_udp_detach(device_t dev) return (0); } -static int -at91_udp_shutdown(device_t dev) -{ - struct at91_udp_softc *sc = device_get_softc(dev); - int err; - - err = bus_generic_shutdown(dev); - if (err) - return (err); - - at91dci_uninit(&sc->sc_dci); - - return (0); -} - static device_method_t at91_udp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, at91_udp_probe), DEVMETHOD(device_attach, at91_udp_attach), DEVMETHOD(device_detach, at91_udp_detach), - DEVMETHOD(device_shutdown, at91_udp_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t at91_udp_driver = { - "at91_udp", - at91_udp_methods, - sizeof(struct at91_udp_softc), + .name = "at91_udp", + .methods = at91_udp_methods, + .size = sizeof(struct at91_udp_softc), }; static devclass_t at91_udp_devclass; Modified: stable/9/sys/dev/usb/controller/atmegadci.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/atmegadci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -1351,16 +1351,16 @@ atmegadci_uninit(struct atmegadci_softc USB_BUS_UNLOCK(&sc->sc_bus); } -void +static void atmegadci_suspend(struct atmegadci_softc *sc) { - return; + /* TODO */ } -void +static void atmegadci_resume(struct atmegadci_softc *sc) { - return; + /* TODO */ } static void @@ -2125,6 +2125,26 @@ atmegadci_ep_init(struct usb_device *ude } } +static void +atmegadci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct atmegadci_softc *sc = ATMEGA_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + atmegadci_suspend(sc); + break; + case USB_HW_POWER_SHUTDOWN: + atmegadci_uninit(sc); + break; + case USB_HW_POWER_RESUME: + atmegadci_resume(sc); + break; + default: + break; + } +} + struct usb_bus_methods atmegadci_bus_methods = { .endpoint_init = &atmegadci_ep_init, @@ -2135,4 +2155,5 @@ struct usb_bus_methods atmegadci_bus_met .clear_stall = &atmegadci_clear_stall, .roothub_exec = &atmegadci_roothub_exec, .xfer_poll = &atmegadci_do_poll, + .set_hw_power_sleep = &atmegadci_set_hw_power_sleep, }; Modified: stable/9/sys/dev/usb/controller/atmegadci.h ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/atmegadci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -278,8 +278,6 @@ struct atmegadci_softc { usb_error_t atmegadci_init(struct atmegadci_softc *sc); void atmegadci_uninit(struct atmegadci_softc *sc); -void atmegadci_suspend(struct atmegadci_softc *sc); -void atmegadci_resume(struct atmegadci_softc *sc); void atmegadci_interrupt(struct atmegadci_softc *sc); #endif /* _ATMEGADCI_H_ */ Modified: stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 14:22:02 2011 (r229096) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); static device_probe_t atmegadci_probe; static device_attach_t atmegadci_attach; static device_detach_t atmegadci_detach; -static device_shutdown_t atmegadci_shutdown; struct atmegadci_super_softc { struct atmegadci_softc sc_otg; /* must be first */ @@ -193,35 +192,22 @@ atmegadci_detach(device_t dev) return (0); } -static int -atmegadci_shutdown(device_t dev) -{ - struct atmegadci_super_softc *sc = device_get_softc(dev); - int err; - - err = bus_generic_shutdown(dev); - if (err) - return (err); - - atmegadci_uninit(&sc->sc_otg); - - return (0); -} - static device_method_t atmegadci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atmegadci_probe), DEVMETHOD(device_attach, atmegadci_attach), DEVMETHOD(device_detach, atmegadci_detach), - DEVMETHOD(device_shutdown, atmegadci_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t atmegadci_driver = { - "atmegadci", - atmegadci_methods, - sizeof(struct atmegadci_super_softc), + .name = "atmegadci", + .methods = atmegadci_methods, + .size = sizeof(struct atmegadci_super_softc), }; static devclass_t atmegadci_devclass; Modified: stable/9/sys/dev/usb/controller/avr32dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -265,7 +265,7 @@ avr32dci_set_address(struct avr32dci_sof { DPRINTFN(5, "addr=%d\n", addr); - avr32dci_mod_ctrl(sc, AVR32_UDADDR_ADDEN | addr, 0); + avr32dci_mod_ctrl(sc, AVR32_CTRL_DEV_FADDR_EN | addr, 0); } static uint8_t @@ -501,7 +501,7 @@ repeat: } /* allocate FIFO bank */ - AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(td->ep_no), AVR32_EPTSTA_TX_BK_RDY); + AVR32_WRITE_4(sc, AVR32_EPTCTL(td->ep_no), AVR32_EPTCTL_TX_PK_RDY); /* check remainder */ if (td->remainder == 0) { @@ -754,7 +754,7 @@ avr32dci_setup_standard_chain(struct usb uint8_t need_sync; DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->address, UE_GET_ADDR(xfer->endpointno), xfer->sumlen, usbd_get_speed(xfer->xroot->udev)); temp.max_frame_size = xfer->max_frame_size; @@ -773,7 +773,7 @@ avr32dci_setup_standard_chain(struct usb temp.did_stall = !xfer->flags_int.control_stall; sc = AVR32_BUS2SC(xfer->xroot->bus); - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* check if we should prepend a setup message */ @@ -798,7 +798,7 @@ avr32dci_setup_standard_chain(struct usb } if (x != xfer->nframes) { - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &avr32dci_data_tx; need_sync = 1; } else { @@ -872,7 +872,7 @@ avr32dci_setup_standard_chain(struct usb * Send a DATA1 message and invert the current * endpoint direction. */ - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &avr32dci_data_rx; need_sync = 0; } else { @@ -913,7 +913,8 @@ avr32dci_start_standard_chain(struct usb /* poll one time - will turn on interrupts */ if (avr32dci_xfer_do_fifo(xfer)) { - uint8_t ep_no = xfer->endpoint & UE_ADDR_MASK; + uint8_t ep_no = xfer->endpointno & UE_ADDR; + struct avr32dci_softc *sc = AVR32_BUS2SC(xfer->xroot->bus); avr32dci_mod_ien(sc, AVR32_INT_EPT_INT(ep_no), 0); @@ -1012,7 +1013,7 @@ avr32dci_standard_done(struct usb_xfer * usb_error_t err = 0; DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + xfer, xfer->endpoint); /* reset scanner */ @@ -1064,10 +1065,10 @@ avr32dci_device_done(struct usb_xfer *xf USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); DPRINTFN(9, "xfer=%p, pipe=%p, error=%d\n", - xfer, xfer->pipe, error); + xfer, xfer->endpoint, error); if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* disable endpoint interrupt */ avr32dci_mod_ien(sc, 0, AVR32_INT_EPT_INT(ep_no)); @@ -1080,7 +1081,7 @@ avr32dci_device_done(struct usb_xfer *xf static void avr32dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, - struct usb_endpoint *ep, uint8_t *did_stall) + struct usb_endpoint *pipe, uint8_t *did_stall) { struct avr32dci_softc *sc; uint8_t ep_no; @@ -1166,7 +1167,7 @@ avr32dci_clear_stall_sub(struct avr32dci } static void -avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) +avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *pipe) { struct avr32dci_softc *sc; struct usb_endpoint_descriptor *ed; @@ -1226,8 +1227,7 @@ avr32dci_init(struct avr32dci_softc *sc) AVR32_INT_ENDRESET, 0); /* reset all endpoints */ -/**INDENT** Warning@1207: Extra ) */ - AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1)); + AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1); /* disable all endpoints */ for (n = 0; n != AVR32_EP_MAX; n++) { @@ -1262,8 +1262,7 @@ avr32dci_uninit(struct avr32dci_softc *s avr32dci_mod_ien(sc, 0, 0xFFFFFFFF); /* reset all endpoints */ -/**INDENT** Warning@1242: Extra ) */ - AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1)); + AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1); /* disable all endpoints */ for (n = 0; n != AVR32_EP_MAX; n++) { @@ -1284,16 +1283,16 @@ avr32dci_uninit(struct avr32dci_softc *s USB_BUS_UNLOCK(&sc->sc_bus); } -void +static void avr32dci_suspend(struct avr32dci_softc *sc) { - return; + /* TODO */ } -void +static void avr32dci_resume(struct avr32dci_softc *sc) { - return; + /* TODO */ } static void @@ -1369,10 +1368,10 @@ avr32dci_device_isoc_fs_enter(struct usb uint8_t ep_no; DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", - xfer, xfer->pipe->isoc_next, xfer->nframes); + xfer, xfer->endpoint->isoc_next, xfer->nframes); /* get the current frame index */ - ep_no = xfer->endpoint & UE_ADDR_MASK; + ep_no = xfer->endpointno & UE_ADDR; nframes = (AVR32_READ_4(sc, AVR32_FNUM) / 8); nframes &= AVR32_FRAME_MASK; @@ -1381,9 +1380,9 @@ avr32dci_device_isoc_fs_enter(struct usb * check if the frame index is within the window where the frames * will be inserted */ - temp = (nframes - xfer->pipe->isoc_next) & AVR32_FRAME_MASK; + temp = (nframes - xfer->endpoint->isoc_next) & AVR32_FRAME_MASK; - if ((xfer->pipe->is_synced == 0) || + if ((xfer->endpoint->is_synced == 0) || (temp < xfer->nframes)) { /* * If there is data underflow or the pipe queue is @@ -1391,15 +1390,15 @@ avr32dci_device_isoc_fs_enter(struct usb * of the current frame position. Else two isochronous * transfers might overlap. */ - xfer->pipe->isoc_next = (nframes + 3) & AVR32_FRAME_MASK; - xfer->pipe->is_synced = 1; - DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); + xfer->endpoint->isoc_next = (nframes + 3) & AVR32_FRAME_MASK; + xfer->endpoint->is_synced = 1; + DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the * current frame position: */ - temp = (xfer->pipe->isoc_next - nframes) & AVR32_FRAME_MASK; + temp = (xfer->endpoint->isoc_next - nframes) & AVR32_FRAME_MASK; /* * pre-compute when the isochronous transfer will be finished: @@ -1409,7 +1408,7 @@ avr32dci_device_isoc_fs_enter(struct usb xfer->nframes; /* compute frame number for next insertion */ - xfer->pipe->isoc_next += xfer->nframes; + xfer->endpoint->isoc_next += xfer->nframes; /* setup TDs */ avr32dci_setup_standard_chain(xfer); @@ -1832,7 +1831,7 @@ tr_handle_clear_port_feature: AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(0), AVR32_EPTSTA_FRCESTALL); /* configure */ - AVR32_WRITE_4(sc, AVR32_EPTCFG(0), AVR32_EPTCFG_TYPE_CONTROL | + AVR32_WRITE_4(sc, AVR32_EPTCFG(0), AVR32_EPTCFG_TYPE_CTRL | AVR32_EPTCFG_NBANK(1) | AVR32_EPTCFG_EPSIZE(6)); temp = AVR32_READ_4(sc, AVR32_EPTCFG(0)); @@ -1974,7 +1973,7 @@ avr32dci_xfer_setup(struct usb_setup_par /* * compute maximum number of TDs */ - if ((xfer->pipe->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) { + if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) { ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */ + 1 /* SYNC 2 */ ; @@ -1997,7 +1996,7 @@ avr32dci_xfer_setup(struct usb_setup_par /* * get profile stuff */ - ep_no = xfer->endpoint & UE_ADDR; + ep_no = xfer->endpointno & UE_ADDR; avr32dci_get_hw_ep_profile(parm->udev, &pf, ep_no); if (pf == NULL) { @@ -2045,7 +2044,7 @@ avr32dci_xfer_unsetup(struct usb_xfer *x static void avr32dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, - struct usb_endpoint *ep) + struct usb_endpoint *pipe) { struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus); @@ -2072,6 +2071,26 @@ avr32dci_ep_init(struct usb_device *udev } } +static void +avr32dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct avr32dci_softc *sc = AVR32_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + avr32dci_suspend(sc); + break; + case USB_HW_POWER_SHUTDOWN: + avr32dci_uninit(sc); + break; + case USB_HW_POWER_RESUME: + avr32dci_resume(sc); + break; + default: + break; + } +} + struct usb_bus_methods avr32dci_bus_methods = { .endpoint_init = &avr32dci_ep_init, @@ -2082,4 +2101,5 @@ struct usb_bus_methods avr32dci_bus_meth .clear_stall = &avr32dci_clear_stall, .roothub_exec = &avr32dci_roothub_exec, .xfer_poll = &avr32dci_do_poll, + .set_hw_power_sleep = &avr32dci_set_hw_power_sleep, }; Modified: stable/9/sys/dev/usb/controller/avr32dci.h ============================================================================== --- stable/9/sys/dev/usb/controller/avr32dci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/avr32dci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -166,6 +166,7 @@ struct avr32dci_td { uint32_t offset; uint32_t remainder; uint16_t max_packet_size; + uint8_t bank_shift; uint8_t error:1; uint8_t alt_next:1; uint8_t short_pkt:1; @@ -246,8 +247,6 @@ struct avr32dci_softc { usb_error_t avr32dci_init(struct avr32dci_softc *sc); void avr32dci_uninit(struct avr32dci_softc *sc); -void avr32dci_suspend(struct avr32dci_softc *sc); -void avr32dci_resume(struct avr32dci_softc *sc); void avr32dci_interrupt(struct avr32dci_softc *sc); void avr32dci_vbus_interrupt(struct avr32dci_softc *sc, uint8_t is_on); Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -188,7 +188,7 @@ ehci_reset(ehci_softc_t *sc) EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); for (i = 0; i < 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 128); hcr = EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_HCRESET; if (!hcr) { if (sc->sc_flags & (EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEMMIO)) { @@ -212,7 +212,7 @@ ehci_reset(ehci_softc_t *sc) return (0); } } - device_printf(sc->sc_bus.bdev, "reset timeout\n"); + device_printf(sc->sc_bus.bdev, "Reset timeout\n"); return (USB_ERR_IOERROR); } @@ -224,7 +224,7 @@ ehci_hcreset(ehci_softc_t *sc) EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ for (i = 0; i < 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 128); hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; if (hcr) break; @@ -237,7 +237,60 @@ ehci_hcreset(ehci_softc_t *sc) */ device_printf(sc->sc_bus.bdev, "stop timeout\n"); - return ehci_reset(sc); + return (ehci_reset(sc)); +} + +static int +ehci_init_sub(struct ehci_softc *sc) +{ + struct usb_page_search buf_res; + uint32_t cparams; + uint32_t hcr; + uint8_t i; + + cparams = EREAD4(sc, EHCI_HCCPARAMS); + + DPRINTF("cparams=0x%x\n", cparams); + + if (EHCI_HCC_64BIT(cparams)) { + DPRINTF("HCC uses 64-bit structures\n"); + + /* MUST clear segment register if 64 bit capable */ + EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); + } + + usbd_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res); + EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); + + usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); + EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); + + /* enable interrupts */ + EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); + + /* turn on controller */ + EOWRITE4(sc, EHCI_USBCMD, + EHCI_CMD_ITC_1 | /* 1 microframes interrupt delay */ + (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_FLS_M) | + EHCI_CMD_ASE | + EHCI_CMD_PSE | + EHCI_CMD_RS); + + /* Take over port ownership */ + EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); + + for (i = 0; i < 100; i++) { + usb_pause_mtx(NULL, hz / 128); + hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; + if (!hcr) { + break; + } + } + if (hcr) { + device_printf(sc->sc_bus.bdev, "Run timeout\n"); + return (USB_ERR_IOERROR); + } + return (USB_ERR_NORMAL_COMPLETION); } usb_error_t @@ -246,8 +299,6 @@ ehci_init(ehci_softc_t *sc) struct usb_page_search buf_res; uint32_t version; uint32_t sparams; - uint32_t cparams; - uint32_t hcr; uint16_t i; uint16_t x; uint16_t y; @@ -279,15 +330,6 @@ ehci_init(ehci_softc_t *sc) DPRINTF("sparams=0x%x\n", sparams); sc->sc_noport = EHCI_HCS_N_PORTS(sparams); - cparams = EREAD4(sc, EHCI_HCCPARAMS); - DPRINTF("cparams=0x%x\n", cparams); - - if (EHCI_HCC_64BIT(cparams)) { - DPRINTF("HCC uses 64-bit structures\n"); - - /* MUST clear segment register if 64 bit capable */ - EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); - } sc->sc_bus.usbrev = USB_REV_2_0; /* Reset the controller */ @@ -464,9 +506,6 @@ ehci_init(ehci_softc_t *sc) [i & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1)]->itd_self; } } - /* setup sync list pointer */ - EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); - usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); if (1) { @@ -511,35 +550,8 @@ ehci_init(ehci_softc_t *sc) } #endif - /* setup async list pointer */ - EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); - - - /* enable interrupts */ - EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); - - /* turn on controller */ - EOWRITE4(sc, EHCI_USBCMD, - EHCI_CMD_ITC_1 | /* 1 microframes interrupt delay */ - (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_FLS_M) | - EHCI_CMD_ASE | - EHCI_CMD_PSE | - EHCI_CMD_RS); - - /* Take over port ownership */ - EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); - - for (i = 0; i < 100; i++) { - usb_pause_mtx(NULL, hz / 1000); - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (!hcr) { - break; - } - } - if (hcr) { - device_printf(sc->sc_bus.bdev, "run timeout\n"); - return (USB_ERR_IOERROR); - } + /* finial setup */ + err = ehci_init_sub(sc); if (!err) { /* catch any lost interrupts */ @@ -573,137 +585,28 @@ ehci_detach(ehci_softc_t *sc) usb_callout_drain(&sc->sc_tmo_poll); } -void +static void ehci_suspend(ehci_softc_t *sc) { - uint32_t cmd; - uint32_t hcr; - uint8_t i; - - USB_BUS_LOCK(&sc->sc_bus); - - for (i = 1; i <= sc->sc_noport; i++) { - cmd = EOREAD4(sc, EHCI_PORTSC(i)); - if (((cmd & EHCI_PS_PO) == 0) && - ((cmd & EHCI_PS_PE) == EHCI_PS_PE)) { - EOWRITE4(sc, EHCI_PORTSC(i), - cmd | EHCI_PS_SUSP); - } - } - - sc->sc_cmd = EOREAD4(sc, EHCI_USBCMD); - - cmd = sc->sc_cmd & ~(EHCI_CMD_ASE | EHCI_CMD_PSE); - EOWRITE4(sc, EHCI_USBCMD, cmd); - - for (i = 0; i < 100; i++) { - hcr = EOREAD4(sc, EHCI_USBSTS) & - (EHCI_STS_ASS | EHCI_STS_PSS); - - if (hcr == 0) { - break; - } - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); - } - - if (hcr != 0) { - device_printf(sc->sc_bus.bdev, "reset timeout\n"); - } - cmd &= ~EHCI_CMD_RS; - EOWRITE4(sc, EHCI_USBCMD, cmd); - - for (i = 0; i < 100; i++) { - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (hcr == EHCI_STS_HCH) { - break; - } - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); - } + DPRINTF("stopping the HC\n"); - if (hcr != EHCI_STS_HCH) { - device_printf(sc->sc_bus.bdev, - "config timeout\n"); - } - USB_BUS_UNLOCK(&sc->sc_bus); + /* reset HC */ + ehci_hcreset(sc); } -void +static void ehci_resume(ehci_softc_t *sc) { - struct usb_page_search buf_res; - uint32_t cmd; - uint32_t hcr; - uint8_t i; - - USB_BUS_LOCK(&sc->sc_bus); + /* reset HC */ + ehci_hcreset(sc); - /* restore things in case the bios doesn't */ - EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); - - usbd_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res); - EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); - - usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); - EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); - - EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); - - hcr = 0; - for (i = 1; i <= sc->sc_noport; i++) { - cmd = EOREAD4(sc, EHCI_PORTSC(i)); - if (((cmd & EHCI_PS_PO) == 0) && - ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) { - EOWRITE4(sc, EHCI_PORTSC(i), - cmd | EHCI_PS_FPR); - hcr = 1; - } - } - - if (hcr) { - usb_pause_mtx(&sc->sc_bus.bus_mtx, - USB_MS_TO_TICKS(USB_RESUME_WAIT)); - - for (i = 1; i <= sc->sc_noport; i++) { - cmd = EOREAD4(sc, EHCI_PORTSC(i)); - if (((cmd & EHCI_PS_PO) == 0) && - ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) { - EOWRITE4(sc, EHCI_PORTSC(i), - cmd & ~EHCI_PS_FPR); - } - } - } - EOWRITE4(sc, EHCI_USBCMD, sc->sc_cmd); - - for (i = 0; i < 100; i++) { - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (hcr != EHCI_STS_HCH) { - break; - } - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); - } - if (hcr == EHCI_STS_HCH) { - device_printf(sc->sc_bus.bdev, "config timeout\n"); - } - - USB_BUS_UNLOCK(&sc->sc_bus); - - usb_pause_mtx(NULL, - USB_MS_TO_TICKS(USB_RESUME_WAIT)); + /* setup HC */ + ehci_init_sub(sc); /* catch any lost interrupts */ ehci_do_poll(&sc->sc_bus); } -void -ehci_shutdown(ehci_softc_t *sc) -{ - DPRINTF("stopping the HC\n"); - - if (ehci_hcreset(sc)) { - DPRINTF("reset failed!\n"); - } -} - #ifdef USB_DEBUG static void ehci_dump_regs(ehci_softc_t *sc) @@ -3908,8 +3811,24 @@ ehci_device_suspend(struct usb_device *u } USB_BUS_UNLOCK(udev->bus); +} - return; +static void +ehci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct ehci_softc *sc = EHCI_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + case USB_HW_POWER_SHUTDOWN: + ehci_suspend(sc); + break; + case USB_HW_POWER_RESUME: + ehci_resume(sc); + break; + default: + break; + } } static void @@ -3955,6 +3874,7 @@ struct usb_bus_methods ehci_bus_methods .device_resume = ehci_device_resume, .device_suspend = ehci_device_suspend, .set_hw_power = ehci_set_hw_power, + .set_hw_power_sleep = ehci_set_hw_power_sleep, .roothub_exec = ehci_roothub_exec, .xfer_poll = ehci_do_poll, }; Modified: stable/9/sys/dev/usb/controller/ehci.h ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/ehci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -333,8 +333,6 @@ typedef struct ehci_softc { uint32_t sc_terminate_self; /* TD short packet termination pointer */ uint32_t sc_eintrs; - uint32_t sc_cmd; /* shadow of cmd register during - * suspend */ uint16_t sc_intr_stat[EHCI_VIRTUAL_FRAMELIST_COUNT]; uint16_t sc_id_vendor; /* vendor ID for root hub */ @@ -445,9 +443,6 @@ usb_bus_mem_cb_t ehci_iterate_hw_softc; usb_error_t ehci_reset(ehci_softc_t *sc); usb_error_t ehci_init(ehci_softc_t *sc); void ehci_detach(struct ehci_softc *sc); -void ehci_suspend(struct ehci_softc *sc); -void ehci_resume(struct ehci_softc *sc); -void ehci_shutdown(ehci_softc_t *sc); void ehci_interrupt(ehci_softc_t *sc); #endif /* _EHCI_H_ */ Modified: stable/9/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Sat Dec 31 14:21:41 2011 (r229095) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:22:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3499B106566C; Sat, 31 Dec 2011 14:22:36 +0000 (UTC) (envelope-from gabor@t-hosting.hu) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id D72FF8FC0A; Sat, 31 Dec 2011 14:22:35 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 470EA14E699B; Sat, 31 Dec 2011 15:06:34 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id W9TXfgNmSUn6; Sat, 31 Dec 2011 15:06:32 +0100 (CET) Received: from [192.168.1.117] (catv-80-98-232-12.catv.broadband.hu [80.98.232.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 0D9FE14E697D; Sat, 31 Dec 2011 15:06:31 +0100 (CET) Message-ID: <4EFF16E0.7000206@t-hosting.hu> Date: Sat, 31 Dec 2011 15:06:24 +0100 From: =?UTF-8?B?R8OhYm9yIEvDtnZlc2TDoW4=?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a2) Gecko/20111122 Thunderbird/10.0a2 MIME-Version: 1.0 To: Gleb Kurtsou References: <201112311312.pBVDCBja064475@svn.freebsd.org> <20111231140027.GA3487@reks> In-Reply-To: <20111231140027.GA3487@reks> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan , svn-src-stable-9@freebsd.org Subject: Re: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:22:36 -0000 On 2011.12.31. 15:00, Gleb Kurtsou wrote: >> ${BINDIR}/grep ${BINDIR}/fgrep \ >> > ${BINDIR}/grep ${BINDIR}/zgrep \ >> > ${BINDIR}/grep ${BINDIR}/zegrep \ >> > - ${BINDIR}/grep ${BINDIR}/zfgrep \ >> > - ${BINDIR}/grep ${BINDIR}/xzgrep \ >> > - ${BINDIR}/grep ${BINDIR}/xzegrep \ >> > - ${BINDIR}/grep ${BINDIR}/xzfgrep \ >> > - ${BINDIR}/grep ${BINDIR}/lzgrep \ >> > - ${BINDIR}/grep ${BINDIR}/lzegrep \ >> > - ${BINDIR}/grep ${BINDIR}/lzfgrep >> > + ${BINDIR}/grep ${BINDIR}/zfgrep > Is there a reason we need all this mess is the first place? 12 grep links under > /usr/bin. Why not to make zgrep handle all compression types. Tranparent > compression handling in tar was a great success. > 1, xzgrep comes from archivers/xz so scripts may be using it 2, the rest to follow the naming convention 3, auto-detection is not always trivial Gabor From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:24:22 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEFFC106566C; Sat, 31 Dec 2011 14:24:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8FA78FC08; Sat, 31 Dec 2011 14:24:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEOMWF067656; Sat, 31 Dec 2011 14:24:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEOMws067654; Sat, 31 Dec 2011 14:24:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311424.pBVEOMws067654@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229097 - stable/9/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:24:23 -0000 Author: hselasky Date: Sat Dec 31 14:24:22 2011 New Revision: 229097 URL: http://svn.freebsd.org/changeset/base/229097 Log: MFC r228758: Fix for race against user-space applications trying to change the configuration on USB HUBs. PR: kern/163091 Modified: stable/9/sys/dev/usb/usb_hub.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usb_hub.c ============================================================================== --- stable/9/sys/dev/usb/usb_hub.c Sat Dec 31 14:22:02 2011 (r229096) +++ stable/9/sys/dev/usb/usb_hub.c Sat Dec 31 14:24:22 2011 (r229097) @@ -707,6 +707,13 @@ uhub_explore(struct usb_device *udev) DPRINTF("Device is suspended!\n"); return (0); } + + /* + * Make sure we don't race against user-space applications + * like LibUSB: + */ + usbd_enum_lock(udev); + for (x = 0; x != hub->nports; x++) { up = hub->ports + x; portno = x + 1; @@ -784,6 +791,8 @@ uhub_explore(struct usb_device *udev) up->restartcnt = 0; } + usbd_enum_unlock(udev); + /* initial status checked */ sc->sc_flags |= UHUB_FLAG_DID_EXPLORE; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:27:27 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800DD106566B; Sat, 31 Dec 2011 14:27:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687F28FC13; Sat, 31 Dec 2011 14:27:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVERRWl067807; Sat, 31 Dec 2011 14:27:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVERR6x067805; Sat, 31 Dec 2011 14:27:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311427.pBVERR6x067805@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229098 - stable/9/sys/contrib/ngatm/netnatm/msg X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:27:27 -0000 Author: dim Date: Sat Dec 31 14:27:26 2011 New Revision: 229098 URL: http://svn.freebsd.org/changeset/base/229098 Log: MFC r228554: In sys/contrib/ngatm/netnatm/msg/uni_ie.c, use a more appropriate way to tell the compiler some parameters are purposefully unused. Modified: stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c ============================================================================== --- stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c Sat Dec 31 14:24:22 2011 (r229097) +++ stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c Sat Dec 31 14:27:26 2011 (r229098) @@ -47,6 +47,8 @@ #include #include +#define UNUSED(_p) do { (void)(_p); } while (0) + /* * Define internal functions. */ @@ -1321,7 +1323,7 @@ check_cause(struct uni_ie_cause *ie, str return (-1); } if (ie->h.present & UNI_CAUSE_PARAM_P) { - cx = cx; + UNUSED(cx); } return (0); @@ -1656,7 +1658,7 @@ DEF_IE_PRINT(itu, callstate) DEF_IE_CHECK(itu, callstate) { - cx = cx; + UNUSED(cx); switch(ie->state) { default: @@ -1742,7 +1744,7 @@ DEF_IE_PRINT(itu, facility) DEF_IE_CHECK(itu, facility) { - cx = cx; + UNUSED(cx); if(ie->len > UNI_FACILITY_MAXAPDU) return -1; @@ -1811,7 +1813,7 @@ DEF_IE_PRINT(itu, notify) DEF_IE_CHECK(itu, notify) { - cx = cx; + UNUSED(cx); if(ie->len > UNI_NOTIFY_MAXLEN) return -1; @@ -1904,7 +1906,7 @@ DEF_IE_PRINT(net, eetd) DEF_IE_CHECK(itu, eetd) { - cx = cx; + UNUSED(cx); if (!(ie->h.present & UNI_EETD_CUM_P)) return (-1); @@ -2298,7 +2300,7 @@ DEF_IE_PRINT(itu, called) DEF_IE_CHECK(itu, called) { - cx = cx; + UNUSED(cx); if (check_addr(&ie->addr)) return (-1); @@ -2345,7 +2347,7 @@ DEF_IE_PRINT(itu, calledsub) DEF_IE_CHECK(itu, calledsub) { - cx = cx; + UNUSED(cx); if(check_subaddr(&ie->addr)) return -1; @@ -2396,7 +2398,7 @@ DEF_IE_PRINT(itu, calling) DEF_IE_CHECK(itu, calling) { - cx = cx; + UNUSED(cx); if(check_addr(&ie->addr)) return -1; @@ -2459,7 +2461,7 @@ DEF_IE_PRINT(itu, callingsub) DEF_IE_CHECK(itu, callingsub) { - cx = cx; + UNUSED(cx); if(check_subaddr(&ie->addr)) return -1; @@ -2510,7 +2512,7 @@ DEF_IE_PRINT(itu, conned) DEF_IE_CHECK(itu, conned) { - cx = cx; + UNUSED(cx); if(check_addr(&ie->addr)) return -1; @@ -2573,7 +2575,7 @@ DEF_IE_PRINT(itu, connedsub) DEF_IE_CHECK(itu, connedsub) { - cx = cx; + UNUSED(cx); if(check_subaddr(&ie->addr)) return -1; @@ -2627,7 +2629,7 @@ DEF_IE_PRINT(itu, epref) DEF_IE_CHECK(itu, epref) { - cx = cx; + UNUSED(cx); if(ie->epref >= (2<<15)) return -1; @@ -2702,7 +2704,7 @@ DEF_IE_PRINT(itu, epstate) DEF_IE_CHECK(itu, epstate) { - cx = cx; + UNUSED(cx); switch(ie->state) { default: @@ -2895,7 +2897,7 @@ DEF_IE_PRINT(itu, aal) DEF_IE_CHECK(itu, aal) { - cx = cx; + UNUSED(cx); if(ie->type == UNI_AAL_0) { ; @@ -3784,7 +3786,7 @@ DEF_IE_CHECK(itu, mintraffic) { u_int abr; u_int xbr; - cx = cx; + UNUSED(cx); abr = ie->h.present & (UNI_MINTRAFFIC_FABR1_P|UNI_MINTRAFFIC_BABR1_P); xbr = ie->h.present & (UNI_MINTRAFFIC_FPCR0_P|UNI_MINTRAFFIC_BPCR0_P| @@ -3869,7 +3871,7 @@ DEF_IE_PRINT(net, mdcr) DEF_IE_CHECK(net, mdcr) { - cx = cx; + UNUSED(cx); if ((ie->origin != UNI_MDCR_ORIGIN_USER && ie->origin != UNI_MDCR_ORIGIN_NET) || @@ -3965,7 +3967,7 @@ DEF_IE_PRINT(itu, connid) DEF_IE_CHECK(itu, connid) { - cx = cx; + UNUSED(cx); switch(ie->type) { default: return -1; @@ -4075,7 +4077,7 @@ DEF_IE_PRINT(net, qos) DEF_IE_CHECK(itu, qos) { - cx = cx; + UNUSED(cx); switch(ie->fwd) { default: @@ -4096,7 +4098,7 @@ DEF_IE_CHECK(itu, qos) DEF_IE_CHECK(net, qos) { - cx = cx; + UNUSED(cx); switch(ie->fwd) { default: @@ -4205,7 +4207,7 @@ DEF_IE_PRINT(itu, bhli) DEF_IE_CHECK(itu, bhli) { - cx = cx; + UNUSED(cx); switch(ie->type) { default: @@ -4357,7 +4359,7 @@ DEF_IE_PRINT(itu, bearer) #define QTYPE0(C) ((UNI_BEARER_##C << 8) | (1 << 16)) DEF_IE_CHECK(itu, bearer) { - cx = cx; + UNUSED(cx); switch((ie->bclass << 8) | ((ie->h.present & UNI_BEARER_ATC_P) == 0 @@ -4656,7 +4658,7 @@ DEF_IE_PRINT(itu, blli) DEF_IE_CHECK(itu, blli) { - cx = cx; + UNUSED(cx); /* if(ie->h.present & UNI_BLLI_L1_P) ; @@ -5171,7 +5173,7 @@ DEF_IE_PRINT(itu, lshift) DEF_IE_CHECK(itu, lshift) { - cx = cx; ie = ie; + UNUSED(cx); UNUSED(ie); return -1; } @@ -5212,7 +5214,7 @@ DEF_IE_PRINT(itu, nlshift) DEF_IE_CHECK(itu, nlshift) { - cx = cx; ie = ie; + UNUSED(cx); UNUSED(ie); return -1; } @@ -5261,7 +5263,7 @@ DEF_IE_PRINT(itu, scompl) DEF_IE_CHECK(itu, scompl) { - ie = ie; cx = cx; + UNUSED(ie); UNUSED(cx); return 0; } @@ -5398,7 +5400,7 @@ DEF_IE_CHECK(itu, tns) { u_int i; - cx = cx; + UNUSED(cx); if(ie->len == 0 || ie->len > UNI_TNS_MAXLEN) return -1; @@ -5466,7 +5468,7 @@ DEF_IE_PRINT(itu, restart) DEF_IE_CHECK(itu, restart) { - cx = cx; + UNUSED(cx); switch(ie->rclass) { default: @@ -5535,7 +5537,7 @@ DEF_IE_PRINT(itu, uu) DEF_IE_CHECK(itu, uu) { - cx = cx; + UNUSED(cx); if(ie->len > UNI_UU_MAXLEN) return -1; @@ -5754,8 +5756,8 @@ DEF_IE_PRINT(net, abradd) DEF_IE_CHECK(net, abradd) { - cx = cx; - ie = ie; + UNUSED(cx); + UNUSED(ie); return 0; } @@ -6015,7 +6017,7 @@ DEF_IE_PRINT(itu, report) DEF_IE_CHECK(itu, report) { - cx = cx; + UNUSED(cx); switch(ie->report) { @@ -6098,7 +6100,7 @@ DEF_IE_PRINT(net, called_soft) DEF_IE_CHECK(net, calling_soft) { - cx = cx; + UNUSED(cx); if(ie->vpi >= 1 << 12) return -1; @@ -6107,7 +6109,7 @@ DEF_IE_CHECK(net, calling_soft) DEF_IE_CHECK(net, called_soft) { - cx = cx; + UNUSED(cx); switch(ie->sel) { @@ -6357,7 +6359,7 @@ DEF_IE_PRINT(net, crankback) DEF_IE_CHECK(net, crankback) { - cx = cx; + UNUSED(cx); if(ie->level > 104) return -1; @@ -6595,7 +6597,7 @@ DEF_IE_CHECK(net, dtl) { u_int i; - cx = cx; + UNUSED(cx); if(ie->ptr % UNI_DTL_LOGNP_SIZE != 0) return -1; @@ -6703,7 +6705,7 @@ DEF_IE_PRINT(net, lij_callid) DEF_IE_CHECK(net, lij_callid) { - cx = cx; + UNUSED(cx); switch(ie->type) { @@ -6761,7 +6763,7 @@ DEF_IE_PRINT(net, lij_param) DEF_IE_CHECK(net, lij_param) { - cx = cx; + UNUSED(cx); switch(ie->screen) { @@ -6809,7 +6811,7 @@ DEF_IE_PRINT(net, lij_seqno) DEF_IE_CHECK(net, lij_seqno) { - cx = cx; ie = ie; + UNUSED(cx); UNUSED(ie); return 0; } @@ -6888,7 +6890,7 @@ DEF_IE_PRINT(net, cscope) DEF_IE_CHECK(net, cscope) { - cx = cx; + UNUSED(cx); switch(ie->type) { @@ -7018,7 +7020,7 @@ DEF_IE_PRINT(net, exqos) DEF_IE_CHECK(net, exqos) { - cx = cx; + UNUSED(cx); switch(ie->origin) { case UNI_EXQOS_USER: @@ -7130,7 +7132,7 @@ DEF_IE_PRINT(itu, unrec) DEF_IE_CHECK(itu, unrec) { - cx = cx; + UNUSED(cx); if (ie->len > sizeof(ie->data)) return (-1); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:29:01 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A08C2106564A; Sat, 31 Dec 2011 14:29:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5F88FC18; Sat, 31 Dec 2011 14:29:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVET1hM067915; Sat, 31 Dec 2011 14:29:01 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVET15o067913; Sat, 31 Dec 2011 14:29:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311429.pBVET15o067913@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229099 - stable/9/sys/dev/usb/serial X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:29:01 -0000 Author: hselasky Date: Sat Dec 31 14:29:01 2011 New Revision: 229099 URL: http://svn.freebsd.org/changeset/base/229099 Log: MFC r227285: Add support for new USB modem protocol. PR: usb/159919 Modified: stable/9/sys/dev/usb/serial/umodem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 14:27:26 2011 (r229098) +++ stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 14:29:01 2011 (r229099) @@ -127,7 +127,11 @@ static const STRUCT_USB_HOST_ID umodem_d /* Generic Modem class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), - USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, + USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, + /* Huawei Modem class match */ + {USB_IFACE_CLASS(UICLASS_CDC), + USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), + USB_IFACE_PROTOCOL(0xFF)}, /* Kyocera AH-K3001V */ {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:30:39 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65BD2106566B; Sat, 31 Dec 2011 14:30:39 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 748738FC1C; Sat, 31 Dec 2011 14:30:37 +0000 (UTC) Received: by lahl5 with SMTP id l5so7880382lah.13 for ; Sat, 31 Dec 2011 06:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ezng8Mw8gawui6Qzo7/Xo2W2CV395B8rIKVhY1zJ+pU=; b=VBEk5qk7tWlIHWNWSn3ezdaXu6LL/IwWoXyya2V6j6fHxbggU4p5NTpsLkGLr0kmEV 57rZjsxvkEAemZXP5S+2NHcAamEapZ41Hkz6lzAtdG/cK9vgjtSwDrdwNci1q8TtjJub Lq/GYu5HEKD0GqIpeWA6ANmrSC0yoz2e3pZPg= Received: by 10.152.128.103 with SMTP id nn7mr34755516lab.48.1325340017382; Sat, 31 Dec 2011 06:00:17 -0800 (PST) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id mg13sm16205448lab.5.2011.12.31.06.00.16 (version=SSLv3 cipher=OTHER); Sat, 31 Dec 2011 06:00:16 -0800 (PST) Date: Sat, 31 Dec 2011 16:00:27 +0200 From: Gleb Kurtsou To: Gabor Kovesdan Message-ID: <20111231140027.GA3487@reks> References: <201112311312.pBVDCBja064475@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201112311312.pBVDCBja064475@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:30:39 -0000 On (31/12/2011 13:12), Gabor Kovesdan wrote: > Author: gabor > Date: Sat Dec 31 13:12:10 2011 > New Revision: 229081 > URL: http://svn.freebsd.org/changeset/base/229081 > > Log: > MFC r228099: > - Create links to the xz and lzma versions even if BSD grep is not the > default. Nor GNU nor liblzma in base provides such functionality so > it may be useful. > > MFC r228319: > - Match GNU behavior of exit code > - Rename variable that has a different meaning now > > Modified: > stable/9/usr.bin/grep/Makefile > stable/9/usr.bin/grep/grep.c > stable/9/usr.bin/grep/grep.h > stable/9/usr.bin/grep/util.c > Directory Properties: > stable/9/usr.bin/grep/ (props changed) > > Modified: stable/9/usr.bin/grep/Makefile > ============================================================================== > --- stable/9/usr.bin/grep/Makefile Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/Makefile Sat Dec 31 13:12:10 2011 (r229081) > @@ -25,13 +25,7 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ > ${BINDIR}/grep ${BINDIR}/fgrep \ > ${BINDIR}/grep ${BINDIR}/zgrep \ > ${BINDIR}/grep ${BINDIR}/zegrep \ > - ${BINDIR}/grep ${BINDIR}/zfgrep \ > - ${BINDIR}/grep ${BINDIR}/xzgrep \ > - ${BINDIR}/grep ${BINDIR}/xzegrep \ > - ${BINDIR}/grep ${BINDIR}/xzfgrep \ > - ${BINDIR}/grep ${BINDIR}/lzgrep \ > - ${BINDIR}/grep ${BINDIR}/lzegrep \ > - ${BINDIR}/grep ${BINDIR}/lzfgrep > + ${BINDIR}/grep ${BINDIR}/zfgrep Is there a reason we need all this mess is the first place? 12 grep links under /usr/bin. Why not to make zgrep handle all compression types. Tranparent compression handling in tar was a great success. Thanks, Gleb. > > MLINKS= grep.1 egrep.1 \ > grep.1 fgrep.1 \ > @@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \ > grep.1 lzfgrep.1 > .endif > > +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ > + ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ > + ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ > + ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ > + ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ > + ${BINDIR}/${PROG} ${BINDIR}/lzfgrep > + > LDADD= -lz -llzma > DPADD= ${LIBZ} ${LIBLZMA} > > > Modified: stable/9/usr.bin/grep/grep.c > ============================================================================== > --- stable/9/usr.bin/grep/grep.c Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/grep.c Sat Dec 31 13:12:10 2011 (r229081) > @@ -148,7 +148,7 @@ static inline const char *init_color(con > bool first = true; /* flag whether we are processing the first match */ > bool prev; /* flag whether or not the previous line matched */ > int tail; /* lines left to print */ > -bool notfound; /* file not found */ > +bool file_err; /* file reading error */ > > /* > * Prints usage information and returns 2. > @@ -728,5 +728,5 @@ main(int argc, char *argv[]) > > /* Find out the correct return value according to the > results and the command line option. */ > - exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); > + exit(c ? (file_err ? (qflag ? 0 : 2) : 0) : (file_err ? 2 : 1)); > } > > Modified: stable/9/usr.bin/grep/grep.h > ============================================================================== > --- stable/9/usr.bin/grep/grep.h Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/grep.h Sat Dec 31 13:12:10 2011 (r229081) > @@ -119,7 +119,7 @@ extern char *label; > extern const char *color; > extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; > > -extern bool first, matchall, notfound, prev; > +extern bool file_err, first, matchall, prev; > extern int tail; > extern unsigned int dpatterns, fpatterns, patterns; > extern struct pat *pattern; > > Modified: stable/9/usr.bin/grep/util.c > ============================================================================== > --- stable/9/usr.bin/grep/util.c Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/util.c Sat Dec 31 13:12:10 2011 (r229081) > @@ -130,7 +130,7 @@ grep_tree(char **argv) > case FTS_DNR: > /* FALLTHROUGH */ > case FTS_ERR: > - notfound = true; > + file_err = true; > if(!sflag) > warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); > break; > @@ -195,10 +195,9 @@ procfile(const char *fn) > f = grep_open(fn); > } > if (f == NULL) { > + file_err = true; > if (!sflag) > warn("%s", fn); > - if (errno == ENOENT) > - notfound = true; > return (0); > } > From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:33:16 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66D03106566B; Sat, 31 Dec 2011 14:33:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46CDE8FC0A; Sat, 31 Dec 2011 14:33:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEXGbP068114; Sat, 31 Dec 2011 14:33:16 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEXGOj068112; Sat, 31 Dec 2011 14:33:16 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311433.pBVEXGOj068112@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229100 - stable/9/sys/dev/usb/controller X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:33:16 -0000 Author: hselasky Date: Sat Dec 31 14:33:15 2011 New Revision: 229100 URL: http://svn.freebsd.org/changeset/base/229100 Log: MFC r228709, r228711 and r228723: - Add missing unlock of USB controller's lock, when doing shutdown, suspend and resume. - Add code to wait for USB shutdown to be executed at system shutdown. - Add sysctl which can be used to skip this waiting. Modified: stable/9/sys/dev/usb/controller/usb_controller.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Sat Dec 31 14:29:01 2011 (r229099) +++ stable/9/sys/dev/usb/controller/usb_controller.c Sat Dec 31 14:33:15 2011 (r229100) @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug static int usb_no_boot_wait = 0; TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, - "No device enumerate waiting at boot."); + "No USB device enumerate waiting at boot."); + +static int usb_no_shutdown_wait = 0; +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, &usb_no_shutdown_wait, 0, + "No USB device waiting at system shutdown."); static devclass_t usb_devclass; @@ -277,11 +282,20 @@ usb_shutdown(device_t dev) return (0); } + device_printf(bus->bdev, "Controller shutdown\n"); + USB_BUS_LOCK(bus); usb_proc_msignal(&bus->explore_proc, &bus->shutdown_msg[0], &bus->shutdown_msg[1]); + if (usb_no_shutdown_wait == 0) { + /* wait for shutdown callback to be executed */ + usb_proc_mwait(&bus->explore_proc, + &bus->shutdown_msg[0], &bus->shutdown_msg[1]); + } USB_BUS_UNLOCK(bus); + device_printf(bus->bdev, "Controller shutdown complete\n"); + return (0); } @@ -390,6 +404,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); @@ -410,6 +426,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SUSPEND); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /*------------------------------------------------------------------------* @@ -430,6 +448,8 @@ usb_bus_resume(struct usb_proc_msg *pm) if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + usbd_enum_lock(udev); #if 0 DEVMETHOD(usb_take_controller, NULL); /* dummy */ @@ -457,6 +477,8 @@ usb_bus_resume(struct usb_proc_msg *pm) device_printf(bus->bdev, "Could not configure root HUB\n"); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /*------------------------------------------------------------------------* @@ -477,6 +499,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); @@ -497,6 +521,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SHUTDOWN); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } static void From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:34:07 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E96CB106564A; Sat, 31 Dec 2011 14:34:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D29238FC14; Sat, 31 Dec 2011 14:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEY7vg068182; Sat, 31 Dec 2011 14:34:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEY7ph068179; Sat, 31 Dec 2011 14:34:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311434.pBVEY7ph068179@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229101 - stable/9/sys/dev/aic7xxx/aicasm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:34:08 -0000 Author: dim Date: Sat Dec 31 14:34:07 2011 New Revision: 229101 URL: http://svn.freebsd.org/changeset/base/229101 Log: MFC r228556: Add "%option noinput" to aicasm_scan.l and aicasm_macro_scan.l, so no unneeded input functions will be emitted. Spotted by: arundel Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l ============================================================================== --- stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Sat Dec 31 14:33:15 2011 (r229100) +++ stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Sat Dec 31 14:34:07 2011 (r229101) @@ -66,6 +66,8 @@ static char msgbuf[255]; extern int mmlex(void); %} +%option noinput + WORD [A-Za-z_][-A-Za-z_0-9]* SPACE [ \t]+ MCARG [^(), \t]+ Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l ============================================================================== --- stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l Sat Dec 31 14:33:15 2011 (r229100) +++ stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l Sat Dec 31 14:34:07 2011 (r229101) @@ -72,6 +72,8 @@ extern void mm_switch_to_buffer(YY_BUFFE extern void mm_delete_buffer(YY_BUFFER_STATE); %} +%option noinput + PATH ([/]*[-A-Za-z0-9_.])+ WORD [A-Za-z_][-A-Za-z_0-9]* SPACE [ \t]+ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:36:51 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD61106564A; Sat, 31 Dec 2011 14:36:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D50828FC19; Sat, 31 Dec 2011 14:36:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEapBN068340; Sat, 31 Dec 2011 14:36:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEapqI068338; Sat, 31 Dec 2011 14:36:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311436.pBVEapqI068338@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229102 - stable/9/lib/libpmc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:36:52 -0000 Author: dim Date: Sat Dec 31 14:36:51 2011 New Revision: 229102 URL: http://svn.freebsd.org/changeset/base/229102 Log: MFC r228557: In lib/libpmc/libpmc.c, struct pmc_cputype_map's pm_cputype field should be of type 'enum pmc_cputype', not 'enum pmc_class'. Modified: stable/9/lib/libpmc/libpmc.c Directory Properties: stable/9/lib/libpmc/ (props changed) Modified: stable/9/lib/libpmc/libpmc.c ============================================================================== --- stable/9/lib/libpmc/libpmc.c Sat Dec 31 14:34:07 2011 (r229101) +++ stable/9/lib/libpmc/libpmc.c Sat Dec 31 14:36:51 2011 (r229102) @@ -289,7 +289,7 @@ static const char * pmc_class_names[] = }; struct pmc_cputype_map { - enum pmc_class pm_cputype; + enum pmc_cputype pm_cputype; const char *pm_name; }; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:37:52 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D256106566B; Sat, 31 Dec 2011 14:37:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA438FC14; Sat, 31 Dec 2011 14:37:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEbqVL068419; Sat, 31 Dec 2011 14:37:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEbqcl068414; Sat, 31 Dec 2011 14:37:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311437.pBVEbqcl068414@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229103 - stable/9/sys/dev/usb/template X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:37:52 -0000 Author: hselasky Date: Sat Dec 31 14:37:51 2011 New Revision: 229103 URL: http://svn.freebsd.org/changeset/base/229103 Log: MFC 228304: Correct some bInterval USB template descriptor values. Modified: stable/9/sys/dev/usb/template/usb_template.c stable/9/sys/dev/usb/template/usb_template_kbd.c stable/9/sys/dev/usb/template/usb_template_modem.c stable/9/sys/dev/usb/template/usb_template_mouse.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 14:37:51 2011 (r229103) @@ -260,7 +260,7 @@ usb_make_endpoint_desc(struct usb_temp_s ed->bInterval = 1; /* 1 ms */ break; default: - ed->bInterval = 8; /* 8*125 us */ + ed->bInterval = 4; /* 1 ms */ break; } break; Modified: stable/9/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template_kbd.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template_kbd.c Sat Dec 31 14:37:51 2011 (r229103) @@ -89,9 +89,9 @@ static const struct usb_temp_packet_size }; static const struct usb_temp_interval keyboard_intr_interval = { - .bInterval[USB_SPEED_LOW] = 2, /* ms */ - .bInterval[USB_SPEED_FULL] = 2, - .bInterval[USB_SPEED_HIGH] = 2 * 8, + .bInterval[USB_SPEED_LOW] = 2, /* 2 ms */ + .bInterval[USB_SPEED_FULL] = 2, /* 2 ms */ + .bInterval[USB_SPEED_HIGH] = 5, /* 2 ms */ }; /* The following HID descriptor was dumped from a HP keyboard. */ Modified: stable/9/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template_modem.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template_modem.c Sat Dec 31 14:37:51 2011 (r229103) @@ -98,9 +98,9 @@ static const struct usb_temp_packet_size }; static const struct usb_temp_interval modem_intr_interval = { - .bInterval[USB_SPEED_LOW] = 10, - .bInterval[USB_SPEED_FULL] = 10, - .bInterval[USB_SPEED_HIGH] = 10 * 8, + .bInterval[USB_SPEED_LOW] = 8, /* 8ms */ + .bInterval[USB_SPEED_FULL] = 8, /* 8ms */ + .bInterval[USB_SPEED_HIGH] = 7, /* 8ms */ }; static const struct usb_temp_endpoint_desc modem_ep_0 = { Modified: stable/9/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template_mouse.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template_mouse.c Sat Dec 31 14:37:51 2011 (r229103) @@ -101,9 +101,9 @@ static const struct usb_temp_packet_size }; static const struct usb_temp_interval mouse_intr_interval = { - .bInterval[USB_SPEED_LOW] = 2, - .bInterval[USB_SPEED_FULL] = 2, - .bInterval[USB_SPEED_HIGH] = 2 * 8, + .bInterval[USB_SPEED_LOW] = 2, /* 2ms */ + .bInterval[USB_SPEED_FULL] = 2, /* 2ms */ + .bInterval[USB_SPEED_HIGH] = 5, /* 2ms */ }; static const struct usb_temp_endpoint_desc mouse_ep_0 = { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:45:44 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 850C11065670; Sat, 31 Dec 2011 14:45:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1EF8FC1F; Sat, 31 Dec 2011 14:45:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEjiRG068853; Sat, 31 Dec 2011 14:45:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEji0n068850; Sat, 31 Dec 2011 14:45:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311445.pBVEji0n068850@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229105 - stable/9/sys/dev/usb/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:45:44 -0000 Author: hselasky Date: Sat Dec 31 14:45:43 2011 New Revision: 229105 URL: http://svn.freebsd.org/changeset/base/229105 Log: MFC r226709: Allow USB ethernet drivers to define a driver specific attach handler so that a USB ethernet driver can announce interface capabilities and do its own MII attach. Modified: stable/9/sys/dev/usb/net/usb_ethernet.c stable/9/sys/dev/usb/net/usb_ethernet.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- stable/9/sys/dev/usb/net/usb_ethernet.c Sat Dec 31 14:44:42 2011 (r229104) +++ stable/9/sys/dev/usb/net/usb_ethernet.c Sat Dec 31 14:45:43 2011 (r229105) @@ -24,24 +24,32 @@ * SUCH DAMAGE. */ -#include -#include +#include +__FBSDID("$FreeBSD$"); + #include -#include -#include #include -#include #include -#include +#include +#include #include +#include +#include +#include #include -#include +#include +#include #include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -197,42 +205,53 @@ ue_attach_post_task(struct usb_proc_msg usb_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0); sysctl_ctx_init(&ue->ue_sysctl_ctx); + error = 0; ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(ue->ue_dev, "could not allocate ifnet\n"); - goto error; + goto fail; } ifp->if_softc = ue; if_initname(ifp, "ue", ue->ue_unit); - ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - if (ue->ue_methods->ue_ioctl != NULL) - ifp->if_ioctl = ue->ue_methods->ue_ioctl; - else - ifp->if_ioctl = uether_ioctl; - ifp->if_start = ue_start; - ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; - IFQ_SET_READY(&ifp->if_snd); - ue->ue_ifp = ifp; - - if (ue->ue_methods->ue_mii_upd != NULL && - ue->ue_methods->ue_mii_sts != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ - error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, - ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); - mtx_unlock(&Giant); - if (error) { - device_printf(ue->ue_dev, "attaching PHYs failed\n"); - goto error; + if (ue->ue_methods->ue_attach_post_sub != NULL) { + ue->ue_ifp = ifp; + error = ue->ue_methods->ue_attach_post_sub(ue); + } else { + ifp->if_mtu = ETHERMTU; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + if (ue->ue_methods->ue_ioctl != NULL) + ifp->if_ioctl = ue->ue_methods->ue_ioctl; + else + ifp->if_ioctl = uether_ioctl; + ifp->if_start = ue_start; + ifp->if_init = ue_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + ue->ue_ifp = ifp; + + if (ue->ue_methods->ue_mii_upd != NULL && + ue->ue_methods->ue_mii_sts != NULL) { + /* device_xxx() depends on this */ + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + mtx_unlock(&Giant); } } + if (error) { + device_printf(ue->ue_dev, "attaching PHYs failed\n"); + goto fail; + } + if_printf(ifp, " on %s\n", device_get_nameunit(ue->ue_dev)); ether_ifattach(ifp, ue->ue_eaddr); + /* Tell upper layer we support VLAN oversized frames. */ + if (ifp->if_capabilities & IFCAP_VLAN_MTU) + ifp->if_hdrlen = sizeof(struct ether_vlan_header); snprintf(num, sizeof(num), "%u", ue->ue_unit); ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, @@ -246,7 +265,7 @@ ue_attach_post_task(struct usb_proc_msg UE_LOCK(ue); return; -error: +fail: free_unr(ueunit, ue->ue_unit); if (ue->ue_ifp != NULL) { if_free(ue->ue_ifp); @@ -307,6 +326,13 @@ uether_is_gone(struct usb_ether *ue) return (usb_proc_is_gone(&ue->ue_tq)); } +void +uether_init(void *arg) +{ + + ue_init(arg); +} + static void ue_init(void *arg) { @@ -352,6 +378,13 @@ ue_stop_task(struct usb_proc_msg *_task) ue->ue_methods->ue_stop(ue); } +void +uether_start(struct ifnet *ifp) +{ + + ue_start(ifp); +} + static void ue_start(struct ifnet *ifp) { @@ -385,6 +418,13 @@ ue_setmulti_task(struct usb_proc_msg *_t ue->ue_methods->ue_setmulti(ue); } +int +uether_ifmedia_upd(struct ifnet *ifp) +{ + + return (ue_ifmedia_upd(ifp)); +} + static int ue_ifmedia_upd(struct ifnet *ifp) { Modified: stable/9/sys/dev/usb/net/usb_ethernet.h ============================================================================== --- stable/9/sys/dev/usb/net/usb_ethernet.h Sat Dec 31 14:44:42 2011 (r229104) +++ stable/9/sys/dev/usb/net/usb_ethernet.h Sat Dec 31 14:45:43 2011 (r229105) @@ -22,6 +22,8 @@ * 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 _USB_ETHERNET_H_ @@ -66,7 +68,7 @@ struct usb_ether_methods { void (*ue_mii_sts)(struct ifnet *, struct ifmediareq *); int (*ue_ioctl)(struct ifnet *, u_long, caddr_t); - + int (*ue_attach_post_sub)(struct usb_ether *); }; struct usb_ether_cfg_task { @@ -110,6 +112,8 @@ struct mii_data *uether_getmii(struct us void *uether_getsc(struct usb_ether *); int uether_ifattach(struct usb_ether *); void uether_ifdetach(struct usb_ether *); +int uether_ifmedia_upd(struct ifnet *); +void uether_init(void *); int uether_ioctl(struct ifnet *, u_long, caddr_t); struct mbuf *uether_newbuf(void); int uether_rxmbuf(struct usb_ether *, struct mbuf *, @@ -119,4 +123,5 @@ int uether_rxbuf(struct usb_ether *, unsigned int, unsigned int); void uether_rxflush(struct usb_ether *); uint8_t uether_is_gone(struct usb_ether *); +void uether_start(struct ifnet *); #endif /* _USB_ETHERNET_H_ */ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:47:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9E7106564A; Sat, 31 Dec 2011 14:47:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 160748FC14; Sat, 31 Dec 2011 14:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVElawr068973; Sat, 31 Dec 2011 14:47:36 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVElZ0W068970; Sat, 31 Dec 2011 14:47:35 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311447.pBVElZ0W068970@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229106 - stable/9/sys/dev/usb/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:47:36 -0000 Author: hselasky Date: Sat Dec 31 14:47:35 2011 New Revision: 229106 URL: http://svn.freebsd.org/changeset/base/229106 Log: MFC r226743: Implement TX/RX checksum offloading support for ASIX AX88772B controller. Modified: stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_axereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 14:45:43 2011 (r229105) +++ stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 14:47:35 2011 (r229106) @@ -76,24 +76,30 @@ __FBSDID("$FreeBSD$"); * http://www.asix.com.tw/FrootAttach/datasheet/AX88772_datasheet_Rev10.pdf */ -#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 @@ -122,6 +128,8 @@ __FBSDID("$FreeBSD$"); */ #define AXE_178_MAX_FRAME_BURST 1 +#define AXE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + #ifdef USB_DEBUG static int axe_debug = 0; @@ -186,6 +194,7 @@ static uether_fn_t axe_tick; static uether_fn_t axe_setmulti; static uether_fn_t axe_setpromisc; +static int axe_attach_post_sub(struct usb_ether *); static int axe_ifmedia_upd(struct ifnet *); static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int axe_cmd(struct axe_softc *, int, int, int, void *); @@ -195,6 +204,11 @@ static void axe_ax88772_phywake(struct a static void axe_ax88772a_init(struct axe_softc *); static void axe_ax88772b_init(struct axe_softc *); static int axe_get_phyno(struct axe_softc *, int); +static int axe_ioctl(struct ifnet *, u_long, caddr_t); +static int axe_rx_frame(struct usb_ether *, struct usb_page_cache *, int); +static int axe_rxeof(struct usb_ether *, struct usb_page_cache *, + unsigned int offset, unsigned int, struct axe_csum_hdr *); +static void axe_csum_cfg(struct usb_ether *); static const struct usb_config axe_config[AXE_N_TRANSFER] = { @@ -263,6 +277,7 @@ MODULE_VERSION(axe, 1); static const struct usb_ether_methods axe_ue_methods = { .ue_attach_post = axe_attach_post, + .ue_attach_post_sub = axe_attach_post_sub, .ue_start = axe_start, .ue_init = axe_init, .ue_stop = axe_stop, @@ -301,9 +316,6 @@ axe_miibus_readreg(device_t dev, int phy uint16_t val; int locked; - if (sc->sc_phyno != phy) - return (0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) AXE_LOCK(sc); @@ -335,10 +347,6 @@ axe_miibus_writereg(device_t dev, int ph int locked; val = htole32(val); - - if (sc->sc_phyno != phy) - return (0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) AXE_LOCK(sc); @@ -369,7 +377,7 @@ axe_miibus_statchg(device_t dev) if (mii == NULL || ifp == NULL || (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) goto done; - + sc->sc_flags &= ~AXE_FLAG_LINK; if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == (IFM_ACTIVE | IFM_AVALID)) { @@ -387,14 +395,23 @@ axe_miibus_statchg(device_t dev) break; } } - + /* Lost link, do nothing. */ if ((sc->sc_flags & AXE_FLAG_LINK) == 0) goto done; - + val = 0; - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { val |= AXE_MEDIA_FULL_DUPLEX; + if (AXE_IS_178_FAMILY(sc)) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_TXPAUSE) != 0) + val |= AXE_178_MEDIA_TXFLOW_CONTROL_EN; + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) + val |= AXE_178_MEDIA_RXFLOW_CONTROL_EN; + } + } if (AXE_IS_178_FAMILY(sc)) { val |= AXE_178_MEDIA_RX_EN | AXE_178_MEDIA_MAGIC; if ((sc->sc_flags & AXE_FLAG_178) != 0) @@ -842,6 +859,53 @@ axe_attach_post(struct usb_ether *ue) axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, sc->sc_ipgs); } +static int +axe_attach_post_sub(struct usb_ether *ue) +{ + struct axe_softc *sc; + struct ifnet *ifp; + u_int adv_pause; + int error; + + sc = uether_getsc(ue); + ifp = ue->ue_ifp; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = uether_start; + ifp->if_ioctl = axe_ioctl; + ifp->if_init = uether_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + + if (AXE_IS_178_FAMILY(sc)) + ifp->if_capabilities |= IFCAP_VLAN_MTU; + if (sc->sc_flags & AXE_FLAG_772B) { + ifp->if_capabilities |= IFCAP_TXCSUM | IFCAP_RXCSUM; + ifp->if_hwassist = AXE_CSUM_FEATURES; + /* + * Checksum offloading of AX88772B also works with VLAN + * tagged frames but there is no way to take advantage + * of the feature because vlan(4) assumes + * IFCAP_VLAN_HWTAGGING is prerequisite condition to + * support checksum offloading with VLAN. VLAN hardware + * tagging support of AX88772B is very limited so it's + * not possible to announce IFCAP_VLAN_HWTAGGING. + */ + } + ifp->if_capenable = ifp->if_capabilities; + if (sc->sc_flags & (AXE_FLAG_772A | AXE_FLAG_772B | AXE_FLAG_178)) + adv_pause = MIIF_DOPAUSE; + else + adv_pause = 0; + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, adv_pause); + mtx_unlock(&Giant); + + return (error); +} + /* * Probe for a AX88172 chip. */ @@ -927,52 +991,15 @@ axe_bulk_read_callback(struct usb_xfer * { struct axe_softc *sc = usbd_xfer_softc(xfer); struct usb_ether *ue = &sc->sc_ue; - struct ifnet *ifp = uether_getifp(ue); - struct axe_sframe_hdr hdr; struct usb_page_cache *pc; - int err, pos, len; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - pos = 0; - len = 0; - err = 0; - pc = usbd_xfer_get_frame(xfer, 0); - if (AXE_IS_178_FAMILY(sc)) { - while (pos < actlen) { - if ((pos + sizeof(hdr)) > actlen) { - /* too little data */ - err = EINVAL; - break; - } - usbd_copy_out(pc, pos, &hdr, sizeof(hdr)); - - if ((hdr.len ^ hdr.ilen) != 0xFFFF) { - /* we lost sync */ - err = EINVAL; - break; - } - pos += sizeof(hdr); - - len = le16toh(hdr.len); - if ((pos + len) > actlen) { - /* invalid length */ - err = EINVAL; - break; - } - uether_rxbuf(ue, pc, pos, len); - - pos += len + (len % 2); - } - } else - uether_rxbuf(ue, pc, 0, actlen); - - if (err != 0) - ifp->if_ierrors++; + axe_rx_frame(ue, pc, actlen); /* FALLTHROUGH */ case USB_ST_SETUP: @@ -995,6 +1022,131 @@ tr_setup: } } +static int +axe_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) +{ + struct axe_softc *sc; + struct axe_sframe_hdr hdr; + struct axe_csum_hdr csum_hdr; + int error, len, pos; + + sc = uether_getsc(ue); + pos = 0; + len = 0; + error = 0; + if ((sc->sc_flags & AXE_FLAG_STD_FRAME) != 0) { + while (pos < actlen) { + if ((pos + sizeof(hdr)) > actlen) { + /* too little data */ + error = EINVAL; + break; + } + usbd_copy_out(pc, pos, &hdr, sizeof(hdr)); + + if ((hdr.len ^ hdr.ilen) != sc->sc_lenmask) { + /* we lost sync */ + error = EINVAL; + break; + } + pos += sizeof(hdr); + len = le16toh(hdr.len); + if (pos + len > actlen) { + /* invalid length */ + error = EINVAL; + break; + } + axe_rxeof(ue, pc, pos, len, NULL); + pos += len + (len % 2); + } + } else if ((sc->sc_flags & AXE_FLAG_CSUM_FRAME) != 0) { + while (pos < actlen) { + if ((pos + sizeof(csum_hdr)) > actlen) { + /* too little data */ + error = EINVAL; + break; + } + usbd_copy_out(pc, pos, &csum_hdr, sizeof(csum_hdr)); + + csum_hdr.len = le16toh(csum_hdr.len); + csum_hdr.ilen = le16toh(csum_hdr.ilen); + csum_hdr.cstatus = le16toh(csum_hdr.cstatus); + if ((AXE_CSUM_RXBYTES(csum_hdr.len) ^ + AXE_CSUM_RXBYTES(csum_hdr.ilen)) != + sc->sc_lenmask) { + /* we lost sync */ + error = EINVAL; + break; + } + /* + * Get total transferred frame length including + * checksum header. The length should be multiple + * of 4. + */ + len = sizeof(csum_hdr) + AXE_CSUM_RXBYTES(csum_hdr.len); + len = (len + 3) & ~3; + if (pos + len > actlen) { + /* invalid length */ + error = EINVAL; + break; + } + axe_rxeof(ue, pc, pos + sizeof(csum_hdr), + AXE_CSUM_RXBYTES(csum_hdr.len), &csum_hdr); + pos += len; + } + } else + axe_rxeof(ue, pc, 0, actlen, NULL); + + if (error != 0) + ue->ue_ifp->if_ierrors++; + return (error); +} + +static int +axe_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, unsigned int offset, + unsigned int len, struct axe_csum_hdr *csum_hdr) +{ + struct ifnet *ifp = ue->ue_ifp; + struct mbuf *m; + + if (len < ETHER_HDR_LEN || len > MCLBYTES - ETHER_ALIGN) { + ifp->if_ierrors++; + return (EINVAL); + } + + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + ifp->if_iqdrops++; + return (ENOMEM); + } + m->m_len = m->m_pkthdr.len = MCLBYTES; + m_adj(m, ETHER_ALIGN); + + usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); + + ifp->if_ipackets++; + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = m->m_len = len; + + if (csum_hdr != NULL && csum_hdr->cstatus & AXE_CSUM_HDR_L3_TYPE_IPV4) { + if ((csum_hdr->cstatus & (AXE_CSUM_HDR_L4_CSUM_ERR | + AXE_CSUM_HDR_L3_CSUM_ERR)) == 0) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | + CSUM_IP_VALID; + if ((csum_hdr->cstatus & AXE_CSUM_HDR_L4_TYPE_MASK) == + AXE_CSUM_HDR_L4_TYPE_TCP || + (csum_hdr->cstatus & AXE_CSUM_HDR_L4_TYPE_MASK) == + AXE_CSUM_HDR_L4_TYPE_UDP) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + } + } + + _IF_ENQUEUE(&ue->ue_rxq, m); + return (0); +} + #if ((AXE_BULK_BUF_SIZE >= 0x10000) || (AXE_BULK_BUF_SIZE < (MCLBYTES+4))) #error "Please update axe_bulk_write_callback()!" #endif @@ -1037,6 +1189,21 @@ tr_setup: if (AXE_IS_178_FAMILY(sc)) { hdr.len = htole16(m->m_pkthdr.len); hdr.ilen = ~hdr.len; + /* + * If upper stack computed checksum, driver + * should tell controller not to insert + * computed checksum for checksum offloading + * enabled controller. + */ + if (ifp->if_capabilities & IFCAP_TXCSUM) { + if ((m->m_pkthdr.csum_flags & + AXE_CSUM_FEATURES) != 0) + hdr.len |= htole16( + AXE_TX_CSUM_PSEUDO_HDR); + else + hdr.len |= htole16( + AXE_TX_CSUM_DIS); + } usbd_copy_in(pc, pos, &hdr, sizeof(hdr)); pos += sizeof(hdr); usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); @@ -1128,6 +1295,34 @@ axe_start(struct usb_ether *ue) } static void +axe_csum_cfg(struct usb_ether *ue) +{ + struct axe_softc *sc; + struct ifnet *ifp; + uint16_t csum1, csum2; + + sc = uether_getsc(ue); + AXE_LOCK_ASSERT(sc, MA_OWNED); + + if ((sc->sc_flags & AXE_FLAG_772B) != 0) { + ifp = uether_getifp(ue); + csum1 = 0; + csum2 = 0; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + csum1 |= AXE_TXCSUM_IP | AXE_TXCSUM_TCP | + AXE_TXCSUM_UDP; + axe_cmd(sc, AXE_772B_CMD_WRITE_TXCSUM, csum2, csum1, NULL); + csum1 = 0; + csum2 = 0; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + csum1 |= AXE_RXCSUM_IP | AXE_RXCSUM_IPVE | + AXE_RXCSUM_TCP | AXE_RXCSUM_UDP | AXE_RXCSUM_ICMP | + AXE_RXCSUM_IGMP; + axe_cmd(sc, AXE_772B_CMD_WRITE_RXCSUM, csum2, csum1, NULL); + } +} + +static void axe_init(struct usb_ether *ue) { struct axe_softc *sc = uether_getsc(ue); @@ -1144,27 +1339,40 @@ axe_init(struct usb_ether *ue) axe_reset(sc); - /* Set MAC address. */ - if (AXE_IS_178_FAMILY(sc)) + /* Set MAC address and transmitter IPG values. */ + if (AXE_IS_178_FAMILY(sc)) { axe_cmd(sc, AXE_178_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); - else - axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); - - /* Set transmitter IPG values */ - if (AXE_IS_178_FAMILY(sc)) axe_cmd(sc, AXE_178_CMD_WRITE_IPG012, sc->sc_ipgs[2], (sc->sc_ipgs[1] << 8) | (sc->sc_ipgs[0]), NULL); - else { + } else { + axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); axe_cmd(sc, AXE_172_CMD_WRITE_IPG0, 0, sc->sc_ipgs[0], NULL); axe_cmd(sc, AXE_172_CMD_WRITE_IPG1, 0, sc->sc_ipgs[1], NULL); axe_cmd(sc, AXE_172_CMD_WRITE_IPG2, 0, sc->sc_ipgs[2], NULL); } - /* AX88772B uses different maximum frame burst configuration. */ - if (sc->sc_flags & AXE_FLAG_772B) + if (AXE_IS_178_FAMILY(sc)) { + sc->sc_flags &= ~(AXE_FLAG_STD_FRAME | AXE_FLAG_CSUM_FRAME); + if ((sc->sc_flags & AXE_FLAG_772B) != 0) + sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK; + else + sc->sc_lenmask = AXE_HDR_LEN_MASK; + if ((sc->sc_flags & AXE_FLAG_772B) != 0 && + (ifp->if_capenable & IFCAP_RXCSUM) != 0) + sc->sc_flags |= AXE_FLAG_CSUM_FRAME; + else + sc->sc_flags |= AXE_FLAG_STD_FRAME; + } + + /* Configure TX/RX checksum offloading. */ + axe_csum_cfg(ue); + + if (sc->sc_flags & AXE_FLAG_772B) { + /* AX88772B uses different maximum frame burst configuration. */ axe_cmd(sc, AXE_772B_CMD_RXCTL_WRITE_CFG, ax88772b_mfb_table[AX88772B_MFB_16K].threshold, ax88772b_mfb_table[AX88772B_MFB_16K].byte_cnt, NULL); + } /* Enable receiver, set RX mode. */ rxmode = (AXE_RXCMD_MULTICAST | AXE_RXCMD_ENABLE); @@ -1172,11 +1380,17 @@ axe_init(struct usb_ether *ue) if (sc->sc_flags & AXE_FLAG_772B) { /* * Select RX header format type 1. Aligning IP - * header on 4 byte boundary is not needed + * header on 4 byte boundary is not needed when + * checksum offloading feature is not used * because we always copy the received frame in - * RX handler. + * RX handler. When RX checksum offloading is + * active, aligning IP header is required to + * reflect actual frame length including RX + * header size. */ rxmode |= AXE_772B_RXCMD_HDR_TYPE_1; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + rxmode |= AXE_772B_RXCMD_IPHDR_ALIGN; } else { /* * Default Rx buffer size is too small to get @@ -1205,7 +1419,6 @@ axe_init(struct usb_ether *ue) ifp->if_drv_flags |= IFF_DRV_RUNNING; /* Switch to selected media. */ axe_ifmedia_upd(ifp); - axe_start(ue); } static void @@ -1247,3 +1460,45 @@ axe_stop(struct usb_ether *ue) usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_WR]); usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_RD]); } + +static int +axe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + struct usb_ether *ue = ifp->if_softc; + struct axe_softc *sc; + struct ifreq *ifr; + int error, mask, reinit; + + sc = uether_getsc(ue); + ifr = (struct ifreq *)data; + error = 0; + reinit = 0; + if (cmd == SIOCSIFCAP) { + AXE_LOCK(sc); + mask = ifr->ifr_reqcap ^ ifp->if_capenable; + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= AXE_CSUM_FEATURES; + else + ifp->if_hwassist &= ~AXE_CSUM_FEATURES; + reinit++; + } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; + reinit++; + } + if (reinit > 0 && ifp->if_drv_flags & IFF_DRV_RUNNING) + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + else + reinit = 0; + AXE_UNLOCK(sc); + if (reinit > 0) + uether_init(ue); + } else + error = uether_ioctl(ifp, cmd, data); + + return (error); +} Modified: stable/9/sys/dev/usb/net/if_axereg.h ============================================================================== --- stable/9/sys/dev/usb/net/if_axereg.h Sat Dec 31 14:45:43 2011 (r229105) +++ stable/9/sys/dev/usb/net/if_axereg.h Sat Dec 31 14:47:35 2011 (r229106) @@ -97,6 +97,10 @@ #define AXE_CMD_WRITE_VLAN_CTRL 0x4028 #define AXE_772B_CMD_RXCTL_WRITE_CFG 0x012A +#define AXE_772B_CMD_READ_RXCSUM 0x002B +#define AXE_772B_CMD_WRITE_RXCSUM 0x012C +#define AXE_772B_CMD_READ_TXCSUM 0x002D +#define AXE_772B_CMD_WRITE_TXCSUM 0x012E #define AXE_SW_RESET_CLEAR 0x00 #define AXE_SW_RESET_RR 0x01 @@ -199,6 +203,40 @@ #define AXE_VLAN_CTRL_VID1_MASK 0x00000FFF #define AXE_VLAN_CTRL_VID2_MASK 0x0FFF0000 +#define AXE_RXCSUM_IP 0x0001 +#define AXE_RXCSUM_IPVE 0x0002 +#define AXE_RXCSUM_IPV6E 0x0004 +#define AXE_RXCSUM_TCP 0x0008 +#define AXE_RXCSUM_UDP 0x0010 +#define AXE_RXCSUM_ICMP 0x0020 +#define AXE_RXCSUM_IGMP 0x0040 +#define AXE_RXCSUM_ICMP6 0x0080 +#define AXE_RXCSUM_TCPV6 0x0100 +#define AXE_RXCSUM_UDPV6 0x0200 +#define AXE_RXCSUM_ICMPV6 0x0400 +#define AXE_RXCSUM_IGMPV6 0x0800 +#define AXE_RXCSUM_ICMP6V6 0x1000 +#define AXE_RXCSUM_FOPC 0x8000 + +#define AXE_RXCSUM_64TE 0x0100 +#define AXE_RXCSUM_PPPOE 0x0200 +#define AXE_RXCSUM_RPCE 0x8000 + +#define AXE_TXCSUM_IP 0x0001 +#define AXE_TXCSUM_TCP 0x0002 +#define AXE_TXCSUM_UDP 0x0004 +#define AXE_TXCSUM_ICMP 0x0008 +#define AXE_TXCSUM_IGMP 0x0010 +#define AXE_TXCSUM_ICMP6 0x0020 +#define AXE_TXCSUM_TCPV6 0x0100 +#define AXE_TXCSUM_UDPV6 0x0200 +#define AXE_TXCSUM_ICMPV6 0x0400 +#define AXE_TXCSUM_IGMPV6 0x0800 +#define AXE_TXCSUM_ICMP6V6 0x1000 + +#define AXE_TXCSUM_64TE 0x0001 +#define AXE_TXCSUM_PPPOE 0x0002 + #define AXE_BULK_BUF_SIZE 16384 /* bytes */ #define AXE_CTL_READ 0x01 @@ -227,9 +265,62 @@ struct ax88772b_mfb { struct axe_sframe_hdr { uint16_t len; +#define AXE_HDR_LEN_MASK 0xFFFF + uint16_t ilen; +} __packed; + +#define AXE_TX_CSUM_PSEUDO_HDR 0x4000 +#define AXE_TX_CSUM_DIS 0x8000 + +/* + * When RX checksum offloading is enabled, AX88772B uses new RX header + * format and it's not compatible with previous RX header format. In + * addition, IP header align option should be enabled to get correct + * frame size including RX header. Total transferred size including + * the RX header is multiple of 4 and controller will pad necessary + * bytes if the length is not multiple of 4. + * This driver does not enable partial checksum feature which will + * compute 16bit checksum from 14th byte to the end of the frame. If + * this feature is enabled, computed checksum value is embedded into + * RX header which in turn means it uses different RX header format. + */ +struct axe_csum_hdr { + uint16_t len; +#define AXE_CSUM_HDR_LEN_MASK 0x07FF +#define AXE_CSUM_HDR_CRC_ERR 0x1000 +#define AXE_CSUM_HDR_MII_ERR 0x2000 +#define AXE_CSUM_HDR_RUNT 0x4000 +#define AXE_CSUM_HDR_BMCAST 0x8000 uint16_t ilen; + uint16_t cstatus; +#define AXE_CSUM_HDR_VLAN_MASK 0x0007 +#define AXE_CSUM_HDR_VLAN_STRIP 0x0008 +#define AXE_CSUM_HDR_VLAN_PRI_MASK 0x0070 +#define AXE_CSUM_HDR_L4_CSUM_ERR 0x0100 +#define AXE_CSUM_HDR_L3_CSUM_ERR 0x0200 +#define AXE_CSUM_HDR_L4_TYPE_UDP 0x0400 +#define AXE_CSUM_HDR_L4_TYPE_ICMP 0x0800 +#define AXE_CSUM_HDR_L4_TYPE_IGMP 0x0C00 +#define AXE_CSUM_HDR_L4_TYPE_TCP 0x1000 +#define AXE_CSUM_HDR_L4_TYPE_TCPV6 0x1400 +#define AXE_CSUM_HDR_L4_TYPE_MASK 0x1C00 +#define AXE_CSUM_HDR_L3_TYPE_IPV4 0x2000 +#define AXE_CSUM_HDR_L3_TYPE_IPV6 0x4000 + +#ifdef AXE_APPEND_PARTIAL_CSUM + /* + * These members present only when partial checksum + * offloading is enabled. The checksum value is simple + * 16bit sum of received frame starting at offset 14 of + * the frame to the end of the frame excluding FCS bytes. + */ + uint16_t csum_value; + uint16_t dummy; +#endif } __packed; +#define AXE_CSUM_RXBYTES(x) ((x) & AXE_CSUM_HDR_LEN_MASK) + #define GET_MII(sc) uether_getmii(&(sc)->sc_ue) /* The interrupt endpoint is currently unused by the ASIX part. */ @@ -247,6 +338,8 @@ struct axe_softc { int sc_flags; #define AXE_FLAG_LINK 0x0001 +#define AXE_FLAG_STD_FRAME 0x0010 +#define AXE_FLAG_CSUM_FRAME 0x0020 #define AXE_FLAG_772 0x1000 /* AX88772 */ #define AXE_FLAG_772A 0x2000 /* AX88772A */ #define AXE_FLAG_772B 0x4000 /* AX88772B */ @@ -255,6 +348,7 @@ struct axe_softc { uint8_t sc_ipgs[3]; uint8_t sc_phyaddrs[2]; uint16_t sc_pwrcfg; + uint16_t sc_lenmask; int sc_tx_bufsz; }; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:50:38 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B34CD106564A; Sat, 31 Dec 2011 14:50:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2618FC17; Sat, 31 Dec 2011 14:50:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEocp3069117; Sat, 31 Dec 2011 14:50:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEocMK069115; Sat, 31 Dec 2011 14:50:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311450.pBVEocMK069115@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229107 - stable/9/sys/dev/usb/storage X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:50:38 -0000 Author: hselasky Date: Sat Dec 31 14:50:38 2011 New Revision: 229107 URL: http://svn.freebsd.org/changeset/base/229107 Log: MFC r227462: Enable power save mode for the USB storage device driver. Modified: stable/9/sys/dev/usb/storage/ustorage_fs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 14:47:35 2011 (r229106) +++ stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 14:50:38 2011 (r229107) @@ -364,6 +364,9 @@ ustorage_fs_attach(device_t dev) sc->sc_udev = uaa->device; unit = device_get_unit(dev); + /* enable power saving mode */ + usbd_set_power_mode(uaa->device, USB_POWER_MODE_SAVE); + if (unit == 0) { if (ustorage_fs_ramdisk == NULL) { /* From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:54:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B80B81065673; Sat, 31 Dec 2011 14:54:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A11258FC08; Sat, 31 Dec 2011 14:54:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEsU7O069285; Sat, 31 Dec 2011 14:54:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEsUMu069283; Sat, 31 Dec 2011 14:54:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311454.pBVEsUMu069283@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229108 - stable/9/sys/dev/usb/wlan X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:54:30 -0000 Author: hselasky Date: Sat Dec 31 14:54:30 2011 New Revision: 229108 URL: http://svn.freebsd.org/changeset/base/229108 Log: MFC r228494, r228508: Fix for random USB transfer time out. Modified: stable/9/sys/dev/usb/wlan/if_run.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 14:50:38 2011 (r229107) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 14:54:30 2011 (r229108) @@ -2718,7 +2718,6 @@ run_bulk_tx_callbackN(struct usb_xfer *x struct run_endpoint_queue *pq = &sc->sc_epq[index]; struct mbuf *m; usb_frlength_t size; - unsigned int len; int actlen; int sumlen; @@ -2748,7 +2747,8 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; - if (m->m_pkthdr.len > RUN_MAX_TXSZ) { + if ((m->m_pkthdr.len + + sizeof(data->desc) + 3 + 8) > RUN_MAX_TXSZ) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -2763,6 +2763,14 @@ tr_setup: size = sizeof(data->desc); usbd_copy_in(pc, 0, &data->desc, size); usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); + size += m->m_pkthdr.len; + /* + * Align end on a 4-byte boundary, pad 8 bytes (CRC + + * 4-byte padding), and be sure to zero those trailing + * bytes: + */ + usbd_frame_zero(pc, size, ((-size) & 3) + 8); + size += ((-size) & 3) + 8; vap = data->ni->ni_vap; if (ieee80211_radiotap_active_vap(vap)) { @@ -2781,13 +2789,10 @@ tr_setup: ieee80211_radiotap_tx(vap, m); } - /* align end on a 4-bytes boundary */ - len = (size + IEEE80211_CRC_LEN + m->m_pkthdr.len + 3) & ~3; - - DPRINTFN(11, "sending frame len=%u xferlen=%u @ index %d\n", - m->m_pkthdr.len, len, index); + DPRINTFN(11, "sending frame len=%u/%u @ index %d\n", + m->m_pkthdr.len, size, index); - usbd_xfer_set_frame_len(xfer, 0, len); + usbd_xfer_set_frame_len(xfer, 0, size); usbd_xfer_set_priv(xfer, data); usbd_transfer_submit(xfer); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 14:57:52 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1F60106566B; Sat, 31 Dec 2011 14:57:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B13BE8FC0C; Sat, 31 Dec 2011 14:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEvqdZ069578; Sat, 31 Dec 2011 14:57:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEvq6G069576; Sat, 31 Dec 2011 14:57:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311457.pBVEvq6G069576@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229111 - stable/9/sys/dev/usb/wlan X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 14:57:53 -0000 Author: hselasky Date: Sat Dec 31 14:57:52 2011 New Revision: 229111 URL: http://svn.freebsd.org/changeset/base/229111 Log: MFC r226465 and r226467: Fix an issue with 11g beacon frames which looks to be a limitation on the largest multi-write size. Modified: stable/9/sys/dev/usb/wlan/if_rum.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_rum.c Sat Dec 31 14:56:26 2011 (r229110) +++ stable/9/sys/dev/usb/wlan/if_rum.c Sat Dec 31 14:57:52 2011 (r229111) @@ -1407,20 +1407,27 @@ rum_write_multi(struct rum_softc *sc, ui { struct usb_device_request req; usb_error_t error; + int offset; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RT2573_WRITE_MULTI_MAC; USETW(req.wValue, 0); - USETW(req.wIndex, reg); - USETW(req.wLength, len); - error = rum_do_request(sc, &req, buf); - if (error != 0) { - device_printf(sc->sc_dev, - "could not multi write MAC register: %s\n", - usbd_errstr(error)); + /* write at most 64 bytes at a time */ + for (offset = 0; offset < len; offset += 64) { + USETW(req.wIndex, reg + offset); + USETW(req.wLength, MIN(len - offset, 64)); + + error = rum_do_request(sc, &req, (char *)buf + offset); + if (error != 0) { + device_printf(sc->sc_dev, + "could not multi write MAC register: %s\n", + usbd_errstr(error)); + return (error); + } } - return (error); + + return (USB_ERR_NORMAL_COMPLETION); } static void From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:03:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65EAC106566C; Sat, 31 Dec 2011 15:03:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451848FC08; Sat, 31 Dec 2011 15:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVF3UQS069824; Sat, 31 Dec 2011 15:03:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVF3UHu069818; Sat, 31 Dec 2011 15:03:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311503.pBVF3UHu069818@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 15:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229112 - in stable/9: lib/libsm libexec/mail.local libexec/smrsh usr.bin/vacation usr.sbin/sendmail X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:03:30 -0000 Author: dim Date: Sat Dec 31 15:03:29 2011 New Revision: 229112 URL: http://svn.freebsd.org/changeset/base/229112 Log: MFC r228558, r228585, r228588, r228652, r228707: Unfortunately, clang gives warnings about sendmail code that cannot be turned off yet. Since this is contrib code, and we don't really care about the warnings, just make them non-fatal for now. MFC r228590: Fix typos in the comments about clang warnings in several sendmail-related Makefiles. Spotted by: arundel MFC r228708: In usr.bin/vacation/Makefile, fix a typo in the comment about clang warnings. Spotted by: arundel Modified: stable/9/lib/libsm/Makefile stable/9/libexec/mail.local/Makefile stable/9/libexec/smrsh/Makefile stable/9/usr.bin/vacation/Makefile stable/9/usr.sbin/sendmail/Makefile Directory Properties: stable/9/lib/libsm/ (props changed) stable/9/libexec/mail.local/ (props changed) stable/9/libexec/smrsh/ (props changed) stable/9/usr.bin/vacation/ (props changed) stable/9/usr.sbin/sendmail/ (props changed) Modified: stable/9/lib/libsm/Makefile ============================================================================== --- stable/9/lib/libsm/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/lib/libsm/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -18,6 +18,13 @@ CFLAGS+=${SENDMAIL_CFLAGS} WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + LIB= sm SRCS+= sm_os.h Modified: stable/9/libexec/mail.local/Makefile ============================================================================== --- stable/9/libexec/mail.local/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/libexec/mail.local/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -12,6 +12,13 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I. WARNS?= 2 WFORMAT=0 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/libexec/smrsh/Makefile ============================================================================== --- stable/9/libexec/smrsh/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/libexec/smrsh/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -17,6 +17,13 @@ LDADD= ${LIBSM} WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: stable/9/usr.bin/vacation/Makefile ============================================================================== --- stable/9/usr.bin/vacation/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/usr.bin/vacation/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -11,6 +11,13 @@ CFLAGS+=-D_FFR_LISTDB -D_FFR_DEBUG WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/usr.sbin/sendmail/Makefile ============================================================================== --- stable/9/usr.sbin/sendmail/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/usr.sbin/sendmail/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -45,6 +45,13 @@ CFLAGS+= -DNETINET6 WARNS?= 1 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:08:34 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C34E1065672; Sat, 31 Dec 2011 15:08:34 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458488FC15; Sat, 31 Dec 2011 15:08:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVF8YOV070045; Sat, 31 Dec 2011 15:08:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVF8Y4I070041; Sat, 31 Dec 2011 15:08:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112311508.pBVF8Y4I070041@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Dec 2011 15:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229113 - in stable/9/libexec/rtld-elf: powerpc powerpc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:08:34 -0000 Author: nwhitehorn Date: Sat Dec 31 15:08:33 2011 New Revision: 229113 URL: http://svn.freebsd.org/changeset/base/229113 Log: MFC r228646: Additional icache paranoia: non-PLT relocations can modify the text segment. It is then important to make sure the icache is synchronized again to prevent (rare) random seg faults and illegal instructions. Modified: stable/9/libexec/rtld-elf/powerpc/reloc.c stable/9/libexec/rtld-elf/powerpc64/reloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc/reloc.c Sat Dec 31 15:03:29 2011 (r229112) +++ stable/9/libexec/rtld-elf/powerpc/reloc.c Sat Dec 31 15:08:33 2011 (r229113) @@ -317,6 +317,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry done: if (cache != NULL) free(cache); + + /* Synchronize icache for text seg in case we made any changes */ + __syncicache(obj->mapbase, obj->textsize); + return (r); } Modified: stable/9/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc64/reloc.c Sat Dec 31 15:03:29 2011 (r229112) +++ stable/9/libexec/rtld-elf/powerpc64/reloc.c Sat Dec 31 15:08:33 2011 (r229113) @@ -313,9 +313,12 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry } r = 0; done: - if (cache) { + if (cache) munmap(cache, bytes); - } + + /* Synchronize icache for text seg in case we made any changes */ + __syncicache(obj->mapbase, obj->textsize); + return (r); } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:11:47 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6AF9106566B; Sat, 31 Dec 2011 15:11:47 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FC4A8FC14; Sat, 31 Dec 2011 15:11:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFBlYv070221; Sat, 31 Dec 2011 15:11:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFBlco070215; Sat, 31 Dec 2011 15:11:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112311511.pBVFBlco070215@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Dec 2011 15:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229114 - stable/9/sys/powerpc/ps3 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:11:47 -0000 Author: nwhitehorn Date: Sat Dec 31 15:11:47 2011 New Revision: 229114 URL: http://svn.freebsd.org/changeset/base/229114 Log: MFC r228688,228689: Support infrastructure for X11 on PS3. Submitted by: geoffrey dot levand at mail dot ru Modified: stable/9/sys/powerpc/ps3/ps3-hv-asm.awk stable/9/sys/powerpc/ps3/ps3-hvcall.S stable/9/sys/powerpc/ps3/ps3-hvcall.h stable/9/sys/powerpc/ps3/ps3-hvcall.master stable/9/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/ps3/ps3-hv-asm.awk ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hv-asm.awk Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hv-asm.awk Sat Dec 31 15:11:47 2011 (r229114) @@ -9,6 +9,7 @@ # $FreeBSD$ BEGIN { + printf("/* $FreeBSD$ */\n\n"); printf("#include \n\n"); printf("#define hc .long 0x44000022\n\n"); } Modified: stable/9/sys/powerpc/ps3/ps3-hvcall.S ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hvcall.S Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hvcall.S Sat Dec 31 15:11:47 2011 (r229114) @@ -1081,13 +1081,25 @@ ASENTRY(lv1_gpu_memory_free) ASENTRY(lv1_gpu_context_allocate) mflr %r0 std %r0,16(%r1) - stdu %r1,-56(%r1) + stdu %r1,-88(%r1) std %r5,48(%r1) + std %r6,56(%r1) + std %r7,64(%r1) + std %r8,72(%r1) + std %r9,80(%r1) li %r11,217 hc extsw %r3,%r3 ld %r11,48(%r1) std %r4,0(%r11) + ld %r11,56(%r1) + std %r5,0(%r11) + ld %r11,64(%r1) + std %r6,0(%r11) + ld %r11,72(%r1) + std %r7,0(%r11) + ld %r11,80(%r1) + std %r8,0(%r11) ld %r1,0(%r1) ld %r0,16(%r1) mtlr %r0 @@ -1144,6 +1156,18 @@ ASENTRY(lv1_gpu_context_intr) mtlr %r0 blr +ASENTRY(lv1_gpu_attribute) + mflr %r0 + std %r0,16(%r1) + stdu %r1,-48(%r1) + li %r11,228 + hc + extsw %r3,%r3 + ld %r1,0(%r1) + ld %r0,16(%r1) + mtlr %r0 + blr + ASENTRY(lv1_get_rtc) mflr %r0 std %r0,16(%r1) Modified: stable/9/sys/powerpc/ps3/ps3-hvcall.h ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hvcall.h Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hvcall.h Sat Dec 31 15:11:47 2011 (r229114) @@ -124,11 +124,12 @@ int lv1_gpu_device_map(uint64_t dev, uin int lv1_gpu_device_unmap(uint64_t dev); int lv1_gpu_memory_allocate(uint64_t ddr_size, uint64_t zero1, uint64_t zero2, uint64_t zero3, uint64_t zero4, uint64_t *handle, uint64_t *ddr_lpar); int lv1_gpu_memory_free(uint64_t handle); -int lv1_gpu_context_allocate(uint64_t handle, uint64_t , uint64_t *zero); +int lv1_gpu_context_allocate(uint64_t handle, uint64_t flags, uint64_t *chandle, uint64_t *lpar_dma_control, uint64_t *lpar_driver_info, uint64_t *lpar_reports, uint64_t *lpar_reports_size); int lv1_gpu_context_free(uint64_t chandle); int lv1_gpu_context_iomap(uint64_t changle, uint64_t gpu_ioif, uint64_t xdr_lpar, uint64_t fbsize, uint64_t ioflags); int lv1_gpu_context_attribute(uint64_t chandle, uint64_t op, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4); int lv1_gpu_context_intr(uint64_t chandle, uint64_t *v1); +int lv1_gpu_attribute(uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5); int lv1_get_rtc(uint64_t *rtc_val, uint64_t *timebase); int lv1_storage_read(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag); int lv1_storage_write(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag); Modified: stable/9/sys/powerpc/ps3/ps3-hvcall.master ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hvcall.master Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hvcall.master Sat Dec 31 15:11:47 2011 (r229114) @@ -125,11 +125,12 @@ HVCALL 212 lv1_gpu_device_map dev l HVCALL 213 lv1_gpu_device_unmap dev HVCALL 214 lv1_gpu_memory_allocate ddr_size,zero1,zero2,zero3,zero4 handle,ddr_lpar HVCALL 216 lv1_gpu_memory_free handle -HVCALL 217 lv1_gpu_context_allocate handle, zero chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size +HVCALL 217 lv1_gpu_context_allocate handle,flags chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size HVCALL 218 lv1_gpu_context_free chandle HVCALL 221 lv1_gpu_context_iomap changle,gpu_ioif,xdr_lpar,fbsize,ioflags HVCALL 225 lv1_gpu_context_attribute chandle,op,p1,p2,p3,p4 HVCALL 227 lv1_gpu_context_intr chandle v1 +HVCALL 228 lv1_gpu_attribute p1,p2,p3,p4,p5 HVCALL 232 lv1_get_rtc UNUSED rtc_val,timebase HVCALL 245 lv1_storage_read dev,region,sector,nsectors,flags,buf dma_tag HVCALL 246 lv1_storage_write dev,region,sector,nsectors,flags,buf dma_tag Modified: stable/9/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/9/sys/powerpc/ps3/ps3_syscons.c Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3_syscons.c Sat Dec 31 15:11:47 2011 (r229114) @@ -121,6 +121,13 @@ struct ps3fb_softc { u_char *sc_font; int sc_font_height; + + uint64_t sc_fbhandle; + uint64_t sc_fbcontext; + uint64_t sc_dma_control; + uint64_t sc_driver_info; + uint64_t sc_reports; + uint64_t sc_reports_size; }; static video_switch_t ps3fbvidsw = { @@ -276,8 +283,10 @@ ps3fb_configure(int flags) void ps3fb_remap(void) { + struct ps3fb_softc *sc; vm_offset_t va, fb_paddr; - uint64_t fbhandle, fbcontext; + + sc = &ps3fb_softc; lv1_gpu_close(); lv1_gpu_open(0); @@ -290,12 +299,13 @@ ps3fb_remap(void) 0,L1GPU_DISPLAY_SYNC_VSYNC,0,0); lv1_gpu_context_attribute(0, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, 1,L1GPU_DISPLAY_SYNC_VSYNC,0,0); - lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &fbhandle, &fb_paddr); - lv1_gpu_context_allocate(fbhandle, 0, &fbcontext); + lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, &fb_paddr); + lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, &sc->sc_dma_control, + &sc->sc_driver_info, &sc->sc_reports, &sc->sc_reports_size); - lv1_gpu_context_attribute(fbcontext, + lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); - lv1_gpu_context_attribute(fbcontext, + lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) @@ -405,6 +415,11 @@ ps3fb_set_mode(video_adapter_t *adp, int ps3fb_blank_display(&sc->sc_va, V_DISPLAY_ON); + lv1_gpu_context_attribute(sc->sc_fbcontext, + L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); + lv1_gpu_context_attribute(sc->sc_fbcontext, + L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); + return (0); } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:14:08 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BBDD106566B; Sat, 31 Dec 2011 15:14:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD4E8FC0A; Sat, 31 Dec 2011 15:14:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFE8w2070332; Sat, 31 Dec 2011 15:14:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFE8bQ070329; Sat, 31 Dec 2011 15:14:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311514.pBVFE8bQ070329@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229115 - in stable/9/sys/dev/usb: . wlan X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:14:08 -0000 Author: hselasky Date: Sat Dec 31 15:14:07 2011 New Revision: 229115 URL: http://svn.freebsd.org/changeset/base/229115 Log: MFC r227781: Add new USB IDs. PR: usb/162712, usb/163732 Modified: stable/9/sys/dev/usb/usbdevs stable/9/sys/dev/usb/wlan/if_run.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:11:47 2011 (r229114) +++ stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:14:07 2011 (r229115) @@ -2084,6 +2084,7 @@ product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ +product LOGITECH LANW300NU2 0x0166 LAN-W300N/U2 product LOGITECH M2452 0x0203 M2452 keyboard product LOGITECH M4848 0x0301 M4848 mouse product LOGITECH PAGESCAN 0x040f PageScan @@ -2179,6 +2180,7 @@ product MELCO RT2870_1 0x0148 RT2870 product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N +product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 15:11:47 2011 (r229114) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 15:14:07 2011 (r229115) @@ -208,12 +208,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, RT2870_1), RUN_DEV(LOGITEC, RT2870_2), RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(LOGITECH, LANW300NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MELCO, WLIUCGNM), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), RUN_DEV(MSI, RT3070_1), From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:15:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACCD11065679; Sat, 31 Dec 2011 15:15:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9602F8FC13; Sat, 31 Dec 2011 15:15:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFFUhP070425; Sat, 31 Dec 2011 15:15:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFFUhG070422; Sat, 31 Dec 2011 15:15:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311515.pBVFFUhG070422@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229116 - in stable/9/sys/dev/usb: . net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:15:30 -0000 Author: hselasky Date: Sat Dec 31 15:15:30 2011 New Revision: 229116 URL: http://svn.freebsd.org/changeset/base/229116 Log: MFC r228637: Add new USB ID. Modified: stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 15:14:07 2011 (r229115) +++ stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 15:15:30 2011 (r229116) @@ -151,6 +151,7 @@ static const STRUCT_USB_HOST_ID axe_devs AXE_DEV(ASIX, AX88772, AXE_FLAG_772), AXE_DEV(ASIX, AX88772A, AXE_FLAG_772A), AXE_DEV(ASIX, AX88772B, AXE_FLAG_772B), + AXE_DEV(ASIX, AX88772B_1, AXE_FLAG_772B), AXE_DEV(ATEN, UC210T, 0), AXE_DEV(BELKIN, F5D5055, AXE_FLAG_178), AXE_DEV(BILLIONTON, USB2AR, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:14:07 2011 (r229115) +++ stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:15:30 2011 (r229116) @@ -1047,6 +1047,7 @@ product ASIX AX88178 0x1780 AX88178 product ASIX AX88772 0x7720 AX88772 product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100 Ethernet product ASIX AX88772B 0x772b AX88772B USB 2.0 10/100 Ethernet +product ASIX AX88772B_1 0x7e2b AX88772B USB 2.0 10/100 Ethernet /* ASUS products */ product ASUS2 USBN11 0x0b05 USB-N11 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:18:52 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7839C106566C; Sat, 31 Dec 2011 15:18:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 619EA8FC13; Sat, 31 Dec 2011 15:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFIqcP070570; Sat, 31 Dec 2011 15:18:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFIp9Z070567; Sat, 31 Dec 2011 15:18:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311518.pBVFIp9Z070567@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229117 - in stable/9/sys/dev/usb: . quirk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:18:52 -0000 Author: hselasky Date: Sat Dec 31 15:18:51 2011 New Revision: 229117 URL: http://svn.freebsd.org/changeset/base/229117 Log: MFC r227610 and r228243: Add more quirks for USB mass storage devices. Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Sat Dec 31 15:15:30 2011 (r229116) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Sat Dec 31 15:18:51 2011 (r229117) @@ -148,10 +148,6 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(AIPTEK, POCKETCAM3M, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), - USB_QUIRK(ALCOR, SDCR_6335, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(ALCOR, SDCR_6362, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ALCOR, UMCR_9361, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, @@ -252,6 +248,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROTECH, DPCM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP), + USB_QUIRK(MICRON, REALSSD, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(MICROTECH, SCSIDB25, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(MICROTECH, SCSIHD50, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -462,6 +459,7 @@ static struct usb_quirk_entry usb_quirks * Quirks for manufacturers which USB devices does not respond * after issuing non-supported commands: */ + USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:15:30 2011 (r229116) +++ stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:18:51 2011 (r229117) @@ -317,6 +317,7 @@ vendor ACTLABS 0x061c Act Labs vendor ALARIS 0x0620 Alaris vendor APEX 0x0624 Apex vendor CREATIVE3 0x062a Creative Labs +vendor MICRON 0x0634 Micron Technology vendor VIVITAR 0x0636 Vivitar vendor GUNZE 0x0637 Gunze Electronics USA vendor AVISION 0x0638 Avision @@ -915,8 +916,10 @@ product ALCATEL OT535 0x02df One Touch /* Alcor Micro, Inc. products */ product ALCOR2 KBD_HUB 0x2802 Kbd Hub +product ALCOR DUMMY 0x0000 Dummy product product ALCOR SDCR_6335 0x6335 SD/MMC Card Reader product ALCOR SDCR_6362 0x6362 SD/MMC Card Reader +product ALCOR SDCR_6366 0x6366 SD/MMC Card Reader product ALCOR TRANSCEND 0x6387 Transcend JetFlash Drive product ALCOR MA_KBD_HUB 0x9213 MacAlly Kbd Hub product ALCOR AU9814 0x9215 AU9814 Hub @@ -2224,6 +2227,9 @@ product MSI RT3070_7 0x899a RT3070 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 +/* Micron products */ +product MICRON REALSSD 0x0655 Real SSD eUSB + /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:31:35 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90670106566C; Sat, 31 Dec 2011 15:31:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 761EE8FC0A; Sat, 31 Dec 2011 15:31:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFVZhk071034; Sat, 31 Dec 2011 15:31:35 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFVYgw070999; Sat, 31 Dec 2011 15:31:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311531.pBVFVYgw070999@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229118 - in stable/9/sys: arm/econa arm/xscale/ixp425 dev/ahci dev/ata dev/gpio dev/mvs dev/ppbus dev/ppc dev/siba dev/siis dev/usb dev/usb/controller kern mips/atheros mips/cavium/usb... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:31:35 -0000 Author: hselasky Date: Sat Dec 31 15:31:34 2011 New Revision: 229118 URL: http://svn.freebsd.org/changeset/base/229118 Log: MFC r227701, r227847 and r227849: Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Rename device_delete_all_children() into device_delete_children(). Identify a few other places where it makes sense to use device_delete_children(). Modified: stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/arm/xscale/ixp425/avila_ata.c stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ata/ata-disk.c stable/9/sys/dev/ata/ata-pci.c stable/9/sys/dev/gpio/gpiobus.c stable/9/sys/dev/mvs/mvs_pci.c stable/9/sys/dev/mvs/mvs_soc.c stable/9/sys/dev/ppbus/ppbconf.c stable/9/sys/dev/ppc/ppc.c stable/9/sys/dev/siba/siba_core.c stable/9/sys/dev/siis/siis.c stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usb_util.c stable/9/sys/dev/usb/usb_util.h stable/9/sys/kern/subr_bus.c stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/sys/bus.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 15:31:34 2011 (r229118) @@ -192,7 +192,7 @@ ehci_ebus_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); /* * disable interrupts that might have been switched on in Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 15:31:34 2011 (r229118) @@ -185,7 +185,7 @@ ohci_ec_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); bus_space_write_4(sc->sc_ohci.sc_io_tag, sc->sc_ohci.sc_io_hdl, OHCI_CONTROL, 0); Modified: stable/9/sys/arm/xscale/ixp425/avila_ata.c ============================================================================== --- stable/9/sys/arm/xscale/ixp425/avila_ata.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/arm/xscale/ixp425/avila_ata.c Sat Dec 31 15:31:34 2011 (r229118) @@ -259,17 +259,11 @@ static int ata_avila_detach(device_t dev) { struct ata_avila_softc *sc = device_get_softc(dev); - device_t *children; - int nc; /* XXX quiesce gpio? */ /* detach & delete all children */ - if (device_get_children(dev, &children, &nc) == 0) { - if (nc > 0) - device_delete_child(dev, children[0]); - free(children, M_TEMP); - } + device_delete_children(dev); bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih); bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid, sc->sc_irq); Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ahci/ahci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -514,15 +514,11 @@ static int ahci_detach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; + int i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupts. */ for (i = 0; i < ctlr->numirqs; i++) { if (ctlr->irqs[i].r_irq) { Modified: stable/9/sys/dev/ata/ata-disk.c ============================================================================== --- stable/9/sys/dev/ata/ata-disk.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ata/ata-disk.c Sat Dec 31 15:31:34 2011 (r229118) @@ -172,8 +172,6 @@ ad_detach(device_t dev) { struct ad_softc *adp = device_get_ivars(dev); struct ata_device *atadev = device_get_softc(dev); - device_t *children; - int nchildren, i; /* check that we have a valid disk to detach */ if (!device_get_ivars(dev)) @@ -183,12 +181,7 @@ ad_detach(device_t dev) callout_drain(&atadev->spindown_timer); /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); /* destroy disk from the system so we don't get any further requests */ disk_destroy(adp->disk); Modified: stable/9/sys/dev/ata/ata-pci.c ============================================================================== --- stable/9/sys/dev/ata/ata-pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ata/ata-pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -136,15 +136,10 @@ int ata_pci_detach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + if (ctlr->r_irq) { bus_teardown_intr(dev, ctlr->r_irq, ctlr->handle); bus_release_resource(dev, SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); Modified: stable/9/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 15:31:34 2011 (r229118) @@ -219,8 +219,7 @@ static int gpiobus_detach(device_t dev) { struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); - int err, ndevs, i; - device_t *devlist; + int err; KASSERT(mtx_initialized(&sc->sc_mtx), ("gpiobus mutex not initialized")); @@ -228,16 +227,14 @@ gpiobus_detach(device_t dev) if ((err = bus_generic_detach(dev)) != 0) return (err); - if ((err = device_get_children(dev, &devlist, &ndevs)) != 0) - return (err); - for (i = 0; i < ndevs; i++) - device_delete_child(dev, devlist[i]); + + /* detach and delete all children */ + device_delete_children(dev); if (sc->sc_pins_mapped) { free(sc->sc_pins_mapped, M_DEVBUF); sc->sc_pins_mapped = NULL; } - free(devlist, M_TEMP); return (0); } Modified: stable/9/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/mvs/mvs_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -177,15 +177,10 @@ static int mvs_detach(device_t dev) { struct mvs_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupt. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, Modified: stable/9/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_soc.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/mvs/mvs_soc.c Sat Dec 31 15:31:34 2011 (r229118) @@ -173,15 +173,10 @@ static int mvs_detach(device_t dev) { struct mvs_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupt. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, Modified: stable/9/sys/dev/ppbus/ppbconf.c ============================================================================== --- stable/9/sys/dev/ppbus/ppbconf.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ppbus/ppbconf.c Sat Dec 31 15:31:34 2011 (r229118) @@ -422,20 +422,14 @@ ppbus_attach(device_t dev) static int ppbus_detach(device_t dev) { - device_t *children; - int error, nchildren, i; + int error; error = bus_generic_detach(dev); if (error) return (error); /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); return (0); } Modified: stable/9/sys/dev/ppc/ppc.c ============================================================================== --- stable/9/sys/dev/ppc/ppc.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ppc/ppc.c Sat Dec 31 15:31:34 2011 (r229118) @@ -1851,20 +1851,13 @@ int ppc_detach(device_t dev) { struct ppc_data *ppc = DEVTOSOFTC(dev); - device_t *children; - int nchildren, i; if (ppc->res_irq == 0) { return (ENXIO); } /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); if (ppc->res_irq != 0) { bus_teardown_intr(dev, ppc->res_irq, ppc->intr_cookie); Modified: stable/9/sys/dev/siba/siba_core.c ============================================================================== --- stable/9/sys/dev/siba/siba_core.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/siba/siba_core.c Sat Dec 31 15:31:34 2011 (r229118) @@ -214,16 +214,8 @@ siba_core_attach(struct siba_softc *siba int siba_core_detach(struct siba_softc *siba) { - device_t *devlistp; - int devcnt, error = 0, i; - - error = device_get_children(siba->siba_dev, &devlistp, &devcnt); - if (error != 0) - return (0); - - for ( i = 0 ; i < devcnt ; i++) - device_delete_child(siba->siba_dev, devlistp[i]); - free(devlistp, M_TEMP); + /* detach & delete all children */ + device_delete_children(siba->siba_dev); return (0); } Modified: stable/9/sys/dev/siis/siis.c ============================================================================== --- stable/9/sys/dev/siis/siis.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/siis/siis.c Sat Dec 31 15:31:34 2011 (r229118) @@ -205,15 +205,10 @@ static int siis_detach(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupts. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, Modified: stable/9/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -270,7 +270,7 @@ at91_udp_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* disable Transceiver */ AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_TXVC, AT91_UDP_TXVC_DIS); Modified: stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -163,7 +163,7 @@ atmegadci_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Sat Dec 31 15:31:34 2011 (r229118) @@ -215,7 +215,7 @@ ehci_ixp_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_mv.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ehci_mv.c Sat Dec 31 15:31:34 2011 (r229118) @@ -247,7 +247,7 @@ mv_ehci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); /* * disable interrupts that might have been switched on in mv_ehci_attach Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -455,7 +455,7 @@ ehci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -188,7 +188,7 @@ musbotg_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ohci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -174,7 +174,7 @@ ohci_atmelarm_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* * Put the controller into reset, then disable clocks and do Modified: stable/9/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ohci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -331,7 +331,7 @@ ohci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_s3c24x0.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ohci_s3c24x0.c Sat Dec 31 15:31:34 2011 (r229118) @@ -156,7 +156,7 @@ ohci_s3c24x0_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* * Put the controller into reset, then disable clocks and do Modified: stable/9/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/uhci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -387,7 +387,7 @@ uhci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); /* * disable interrupts that might have been switched on in Modified: stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -177,7 +177,7 @@ uss820_atmelarm_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_irq_res && sc->sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -202,7 +202,7 @@ xhci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/usb_util.c ============================================================================== --- stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:31:34 2011 (r229118) @@ -58,31 +58,6 @@ #include /*------------------------------------------------------------------------* - * device_delete_all_children - delete all children of a device - *------------------------------------------------------------------------*/ -#ifndef device_delete_all_children -int -device_delete_all_children(device_t dev) -{ - device_t *devlist; - int devcount; - int error; - - error = device_get_children(dev, &devlist, &devcount); - if (error == 0) { - while (devcount-- > 0) { - error = device_delete_child(dev, devlist[devcount]); - if (error) { - break; - } - } - free(devlist, M_TEMP); - } - return (error); -} -#endif - -/*------------------------------------------------------------------------* * device_set_usb_desc * * This function can be called at probe or attach to set the USB Modified: stable/9/sys/dev/usb/usb_util.h ============================================================================== --- stable/9/sys/dev/usb/usb_util.h Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/usb_util.h Sat Dec 31 15:31:34 2011 (r229118) @@ -27,7 +27,6 @@ #ifndef _USB_UTIL_H_ #define _USB_UTIL_H_ -int device_delete_all_children(device_t dev); uint8_t usb_make_str_desc(void *ptr, uint16_t max_len, const char *s); void usb_printbcd(char *p, uint16_t p_len, uint16_t bcd); void usb_trim_spaces(char *p); Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/kern/subr_bus.c Sat Dec 31 15:31:34 2011 (r229118) @@ -1862,7 +1862,7 @@ device_delete_child(device_t dev, device PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); /* remove children first */ - while ( (grandchild = TAILQ_FIRST(&child->children)) ) { + while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) { error = device_delete_child(child, grandchild); if (error) return (error); @@ -1881,6 +1881,39 @@ device_delete_child(device_t dev, device } /** + * @brief Delete all children devices of the given device, if any. + * + * This function deletes all children devices of the given device, if + * any, using the device_delete_child() function for each device it + * finds. If a child device cannot be deleted, this function will + * return an error code. + * + * @param dev the parent device + * + * @retval 0 success + * @retval non-zero a device would not detach + */ +int +device_delete_children(device_t dev) +{ + device_t child; + int error; + + PDEBUG(("Deleting all children of %s", DEVICENAME(dev))); + + error = 0; + + while ((child = TAILQ_FIRST(&dev->children)) != NULL) { + error = device_delete_child(dev, child); + if (error) { + PDEBUG(("Failed deleting %s", DEVICENAME(child))); + break; + } + } + return (error); +} + +/** * @brief Find a device given a unit number * * This is similar to devclass_get_devices() but only searches for Modified: stable/9/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_ehci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/atheros/ar71xx_ehci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -202,7 +202,7 @@ ar71xx_ehci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { /* Modified: stable/9/sys/mips/atheros/ar71xx_ohci.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_ohci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/atheros/ar71xx_ohci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -150,7 +150,7 @@ ar71xx_ohci_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* * Put the controller into reset, then disable clocks and do Modified: stable/9/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- stable/9/sys/mips/cavium/usb/octusb_octeon.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/cavium/usb/octusb_octeon.c Sat Dec 31 15:31:34 2011 (r229118) @@ -159,7 +159,7 @@ octusb_octeon_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_dci.sc_irq_res && sc->sc_dci.sc_intr_hdl) { /* Modified: stable/9/sys/mips/rmi/xls_ehci.c ============================================================================== --- stable/9/sys/mips/rmi/xls_ehci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/rmi/xls_ehci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -172,7 +172,7 @@ ehci_xls_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { ehci_detach(sc); Modified: stable/9/sys/mips/rt305x/rt305x_dotg.c ============================================================================== --- stable/9/sys/mips/rt305x/rt305x_dotg.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/rt305x/rt305x_dotg.c Sat Dec 31 15:31:34 2011 (r229118) @@ -175,7 +175,7 @@ dotg_obio_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_dci.sc_irq_res && sc->sc_dci.sc_intr_hdl) { /* Modified: stable/9/sys/sys/bus.h ============================================================================== --- stable/9/sys/sys/bus.h Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/sys/bus.h Sat Dec 31 15:31:34 2011 (r229118) @@ -424,6 +424,7 @@ device_t device_add_child_ordered(device const char *name, int unit); void device_busy(device_t dev); int device_delete_child(device_t dev, device_t child); +int device_delete_children(device_t dev); int device_attach(device_t dev); int device_detach(device_t dev); void device_disable(device_t dev); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:37:32 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513BE106566C; Sat, 31 Dec 2011 15:37:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 304A88FC12; Sat, 31 Dec 2011 15:37:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFbW89071252; Sat, 31 Dec 2011 15:37:32 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFbVRb071249; Sat, 31 Dec 2011 15:37:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311537.pBVFbVRb071249@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229119 - in stable/9/sys: dev/usb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:37:32 -0000 Author: hselasky Date: Sat Dec 31 15:37:31 2011 New Revision: 229119 URL: http://svn.freebsd.org/changeset/base/229119 Log: MFC r227706, r227748, r227749 and r228234: Simplify the usb_pause_mtx() function by factoring out the generic parts to the kernel's pause() function. The pause() function can now be used when cold != 0. Also assert that the timeout in system ticks must be greater or equal to zero. Modified: stable/9/sys/dev/usb/usb_util.c stable/9/sys/kern/kern_synch.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usb_util.c ============================================================================== --- stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:31:34 2011 (r229118) +++ stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:37:31 2011 (r229119) @@ -115,33 +115,21 @@ device_set_usb_desc(device_t dev) * * This function will delay the code by the passed number of system * ticks. The passed mutex "mtx" will be dropped while waiting, if - * "mtx" is not NULL. + * "mtx" is different from NULL. *------------------------------------------------------------------------*/ void -usb_pause_mtx(struct mtx *mtx, int _ticks) +usb_pause_mtx(struct mtx *mtx, int timo) { if (mtx != NULL) mtx_unlock(mtx); - if (cold) { - /* convert to milliseconds */ - _ticks = (_ticks * 1000) / hz; - /* convert to microseconds, rounded up */ - _ticks = (_ticks + 1) * 1000; - DELAY(_ticks); - - } else { - - /* - * Add one to the number of ticks so that we don't return - * too early! - */ - _ticks++; - - if (pause("USBWAIT", _ticks)) { - /* ignore */ - } - } + /* + * Add one tick to the timeout so that we don't return too + * early! Note that pause() will assert that the passed + * timeout is positive and non-zero! + */ + pause("USBWAIT", timo + 1); + if (mtx != NULL) mtx_lock(mtx); } Modified: stable/9/sys/kern/kern_synch.c ============================================================================== --- stable/9/sys/kern/kern_synch.c Sat Dec 31 15:31:34 2011 (r229118) +++ stable/9/sys/kern/kern_synch.c Sat Dec 31 15:37:31 2011 (r229119) @@ -325,16 +325,34 @@ msleep_spin(void *ident, struct mtx *mtx } /* - * pause() is like tsleep() except that the intention is to not be - * explicitly woken up by another thread. Instead, the current thread - * simply wishes to sleep until the timeout expires. It is - * implemented using a dummy wait channel. + * pause() delays the calling thread by the given number of system ticks. + * During cold bootup, pause() uses the DELAY() function instead of + * the tsleep() function to do the waiting. The "timo" argument must be + * greater than or equal to zero. A "timo" value of zero is equivalent + * to a "timo" value of one. */ int pause(const char *wmesg, int timo) { + KASSERT(timo >= 0, ("pause: timo must be >= 0")); - KASSERT(timo != 0, ("pause: timeout required")); + /* silently convert invalid timeouts */ + if (timo < 1) + timo = 1; + + if (cold) { + /* + * We delay one HZ at a time to avoid overflowing the + * system specific DELAY() function(s): + */ + while (timo >= hz) { + DELAY(1000000); + timo -= hz; + } + if (timo > 0) + DELAY(timo * tick); + return (0); + } return (tsleep(&pause_wchan, 0, wmesg, timo)); } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:42:06 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F57D106564A; Sat, 31 Dec 2011 15:42:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D29B88FC08; Sat, 31 Dec 2011 15:42:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFg5FZ071442; Sat, 31 Dec 2011 15:42:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFg5uM071439; Sat, 31 Dec 2011 15:42:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311542.pBVFg5uM071439@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229120 - in stable/9/sys/dev/usb: . wlan X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:42:06 -0000 Author: hselasky Date: Sat Dec 31 15:42:05 2011 New Revision: 229120 URL: http://svn.freebsd.org/changeset/base/229120 Log: MFC r228232 and r228303: Fix clang compile warnings. Modified: stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 15:37:31 2011 (r229119) +++ stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 15:42:05 2011 (r229120) @@ -477,7 +477,7 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); Modified: stable/9/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 15:37:31 2011 (r229119) +++ stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 15:42:05 2011 (r229120) @@ -686,7 +686,7 @@ zyd_intr_read_callback(struct usb_xfer * memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", - rqp, rqp->olen, rqp->odata, ":"); + rqp, rqp->olen, (char *)rqp->odata, ":"); wakeup(rqp); /* wakeup caller */ break; } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:43:55 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95DFE106564A; Sat, 31 Dec 2011 15:43:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2128FC12; Sat, 31 Dec 2011 15:43:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFhtFs071542; Sat, 31 Dec 2011 15:43:55 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFht6P071540; Sat, 31 Dec 2011 15:43:55 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311543.pBVFht6P071540@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229121 - stable/9/sys/dev/usb/wlan X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:43:55 -0000 Author: hselasky Date: Sat Dec 31 15:43:55 2011 New Revision: 229121 URL: http://svn.freebsd.org/changeset/base/229121 Log: MFC r228195: Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list(). Modified: stable/9/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 15:42:05 2011 (r229120) +++ stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 15:43:55 2011 (r229121) @@ -1053,10 +1053,10 @@ urtw_init_locked(void *arg) if (!(sc->sc_flags & URTW_INIT_ONCE)) { ret = urtw_alloc_rx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; ret = urtw_alloc_tx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; sc->sc_flags |= URTW_INIT_ONCE; } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:46:37 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F2F81065678; Sat, 31 Dec 2011 15:46:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB3008FC27; Sat, 31 Dec 2011 15:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFkaF3071685; Sat, 31 Dec 2011 15:46:36 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFkaQs071678; Sat, 31 Dec 2011 15:46:36 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311546.pBVFkaQs071678@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229122 - stable/9/lib/libusb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:46:37 -0000 Author: hselasky Date: Sat Dec 31 15:46:36 2011 New Revision: 229122 URL: http://svn.freebsd.org/changeset/base/229122 Log: MFC r227404: Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0. Some header file parts of this patch were taken from a patch submitted by Maya Erez to the LibUSB developers list. Modified: stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10_desc.c stable/9/lib/libusb/libusb20_desc.c stable/9/lib/libusb/libusb20_desc.h Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/Makefile ============================================================================== --- stable/9/lib/libusb/Makefile Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/Makefile Sat Dec 31 15:46:36 2011 (r229122) @@ -74,6 +74,10 @@ MLINKS += libusb.3 libusb_get_config_des MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 +MLINKS += libusb.3 libusb_parse_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_free_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_parse_bos_descriptor.3 +MLINKS += libusb.3 libusb_free_bos_descriptor.3 MLINKS += libusb.3 libusb_alloc_transfer.3 MLINKS += libusb.3 libusb_free_transfer.3 MLINKS += libusb.3 libusb_submit_transfer.3 Modified: stable/9/lib/libusb/libusb.3 ============================================================================== --- stable/9/lib/libusb/libusb.3 Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb.3 Sat Dec 31 15:46:36 2011 (r229122) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2011 +.Dd November 9, 2011 .Dt LIBUSB 3 .Os .Sh NAME @@ -316,6 +316,40 @@ Retrieve a string descriptor in C style Returns the positive number of bytes in the resulting ASCII string on success and a LIBUSB_ERROR code on failure. .Pp +.Ft int +.Fn libusb_parse_ss_endpoint_comp "const void *buf" "int len" "libusb_ss_endpoint_companion_descriptor **ep_comp" +This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +Typically these arguments are the extra and extra_length fields of the +endpoint descriptor. +On success the pointer to resulting descriptor is stored at the location given by +.Fa ep_comp. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed USB 3.0 endpoint companion descriptor must be +freed using the libusb_free_ss_endpoint_comp function. +.Pp +.Ft void +.Fn libusb_free_ss_endpoint_comp "libusb_ss_endpoint_companion_descriptor *ep_comp" +This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor. +.Pp +.Ft int +.Fn libusb_parse_bos_descriptor "const void *buf" "int len" "libusb_bos_descriptor **bos" +This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +On success the pointer to resulting descriptor is stored at the location given by +.Fa bos. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed BOS descriptor must be freed using the +libusb_free_bos_descriptor function. +.Pp +.Ft void +.Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" +This function is NULL safe and frees a parsed BOS descriptor. +.Pp .Sh USB ASYNCHRONOUS I/O .Pp .Ft struct libusb_transfer * Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb.h Sat Dec 31 15:46:36 2011 (r229122) @@ -63,6 +63,16 @@ enum libusb_descriptor_type { LIBUSB_DT_REPORT = 0x22, LIBUSB_DT_PHYSICAL = 0x23, LIBUSB_DT_HUB = 0x29, + LIBUSB_DT_BOS = 0x0f, + LIBUSB_DT_DEVICE_CAPABILITY = 0x10, + LIBUSB_DT_SS_ENDPOINT_COMPANION = 0x30, +}; + +enum libusb_device_capability_type { + LIBUSB_WIRELESS_USB_DEVICE_CAPABILITY = 0x1, + LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY = 0x2, + LIBUSB_SS_USB_DEVICE_CAPABILITY = 0x3, + LIBUSB_CONTAINER_ID_DEVICE_CAPABILITY = 0x4, }; #define LIBUSB_DT_DEVICE_SIZE 18 @@ -71,6 +81,10 @@ enum libusb_descriptor_type { #define LIBUSB_DT_ENDPOINT_SIZE 7 #define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 #define LIBUSB_DT_HUB_NONVAR_SIZE 7 +#define LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE 6 +#define LIBUSB_DT_BOS_SIZE 5 +#define LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 +#define LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f #define LIBUSB_ENDPOINT_DIR_MASK 0x80 @@ -230,6 +244,14 @@ typedef struct libusb_endpoint_descripto int extra_length; } libusb_endpoint_descriptor __aligned(sizeof(void *)); +typedef struct libusb_ss_endpoint_companion_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bMaxBurst; + uint8_t bmAttributes; + uint16_t wBytesPerInterval; +} libusb_ss_endpoint_companion_descriptor __aligned(sizeof(void *)); + typedef struct libusb_interface_descriptor { uint8_t bLength; uint8_t bDescriptorType; @@ -264,6 +286,39 @@ typedef struct libusb_config_descriptor int extra_length; } libusb_config_descriptor __aligned(sizeof(void *)); +typedef struct libusb_usb_2_0_device_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint32_t bmAttributes; +#define LIBUSB_USB_2_0_CAPABILITY_LPM_SUPPORT (1 << 1) +} libusb_usb_2_0_device_capability_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_ss_usb_device_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint8_t bmAttributes; +#define LIBUSB_SS_USB_CAPABILITY_LPM_SUPPORT (1 << 1) + uint16_t wSpeedSupported; +#define LIBUSB_CAPABILITY_LOW_SPEED_OPERATION (1) +#define LIBUSB_CAPABILITY_FULL_SPEED_OPERATION (1 << 1) +#define LIBUSB_CAPABILITY_HIGH_SPEED_OPERATION (1 << 2) +#define LIBUSB_CAPABILITY_5GBPS_OPERATION (1 << 3) + uint8_t bFunctionalitySupport; + uint8_t bU1DevExitLat; + uint16_t wU2DevExitLat; +} libusb_ss_usb_device_capability_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_bos_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint16_t wTotalLength; + uint8_t bNumDeviceCapabilities; + struct libusb_usb_2_0_device_capability_descriptor *usb_2_0_ext_cap; + struct libusb_ss_usb_device_capability_descriptor *ss_usb_cap; +} libusb_bos_descriptor __aligned(sizeof(void *)); + typedef struct libusb_control_setup { uint8_t bmRequestType; uint8_t bRequest; @@ -345,6 +400,10 @@ int libusb_get_config_descriptor_by_valu void libusb_free_config_descriptor(struct libusb_config_descriptor *config); int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); +int libusb_parse_ss_endpoint_comp(const void *buf, int len, struct libusb_ss_endpoint_companion_descriptor **ep_comp); +void libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp); +int libusb_parse_bos_descriptor(const void *buf, int len, struct libusb_bos_descriptor **bos); +void libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos); /* Asynchronous device I/O */ Modified: stable/9/lib/libusb/libusb10_desc.c ============================================================================== --- stable/9/lib/libusb/libusb10_desc.c Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb10_desc.c Sat Dec 31 15:46:36 2011 (r229122) @@ -298,7 +298,7 @@ libusb_get_string_descriptor_ascii(libus uint8_t desc_index, unsigned char *data, int length) { if (pdev == NULL || data == NULL || length < 1) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); if (length > 65535) length = 65535; @@ -318,7 +318,7 @@ libusb_get_descriptor(libusb_device_hand uint8_t desc_index, uint8_t *data, int length) { if (devh == NULL || data == NULL || length < 1) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); if (length > 65535) length = 65535; @@ -327,3 +327,172 @@ libusb_get_descriptor(libusb_device_hand LIBUSB_REQUEST_GET_DESCRIPTOR, (desc_type << 8) | desc_index, 0, data, length, 1000)); } + +int +libusb_parse_ss_endpoint_comp(const void *buf, int len, + struct libusb_ss_endpoint_companion_descriptor **ep_comp) +{ + if (buf == NULL || ep_comp == NULL || len < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (len > 65535) + len = 65535; + + *ep_comp = NULL; + + while (len != 0) { + uint8_t dlen; + uint8_t dtype; + + dlen = ((const uint8_t *)buf)[0]; + dtype = ((const uint8_t *)buf)[1]; + + if (dlen < 2 || dlen > len) + break; + + if (dlen >= LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE && + dtype == LIBUSB_DT_SS_ENDPOINT_COMPANION) { + struct libusb_ss_endpoint_companion_descriptor *ptr; + + ptr = malloc(sizeof(*ptr)); + if (ptr == NULL) + return (LIBUSB_ERROR_NO_MEM); + + ptr->bLength = LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE; + ptr->bDescriptorType = dtype; + ptr->bMaxBurst = ((const uint8_t *)buf)[2]; + ptr->bmAttributes = ((const uint8_t *)buf)[3]; + ptr->wBytesPerInterval = ((const uint8_t *)buf)[4] | + (((const uint8_t *)buf)[5] << 8); + + *ep_comp = ptr; + + return (0); /* success */ + } + + buf = ((const uint8_t *)buf) + dlen; + len -= dlen; + } + return (LIBUSB_ERROR_IO); +} + +void +libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp) +{ + if (ep_comp == NULL) + return; + + free(ep_comp); +} + +int +libusb_parse_bos_descriptor(const void *buf, int len, + struct libusb_bos_descriptor **bos) +{ + struct libusb_bos_descriptor *ptr; + struct libusb_usb_2_0_device_capability_descriptor *dcap_20; + struct libusb_ss_usb_device_capability_descriptor *ss_cap; + + if (buf == NULL || bos == NULL || len < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (len > 65535) + len = 65535; + + *bos = ptr = NULL; + + while (len != 0) { + uint8_t dlen; + uint8_t dtype; + + dlen = ((const uint8_t *)buf)[0]; + dtype = ((const uint8_t *)buf)[1]; + + if (dlen < 2 || dlen > len) + break; + + if (dlen >= LIBUSB_DT_BOS_SIZE && + dtype == LIBUSB_DT_BOS) { + + ptr = malloc(sizeof(*ptr) + sizeof(*dcap_20) + + sizeof(*ss_cap)); + + if (ptr == NULL) + return (LIBUSB_ERROR_NO_MEM); + + *bos = ptr; + + ptr->bLength = LIBUSB_DT_BOS_SIZE; + ptr->bDescriptorType = dtype; + ptr->wTotalLength = ((const uint8_t *)buf)[2] | + (((const uint8_t *)buf)[3] << 8); + ptr->bNumDeviceCapabilities = ((const uint8_t *)buf)[4]; + ptr->usb_2_0_ext_cap = NULL; + ptr->ss_usb_cap = NULL; + + dcap_20 = (void *)(ptr + 1); + ss_cap = (void *)(dcap_20 + 1); + } + if (dlen >= 3 && + ptr != NULL && + dtype == LIBUSB_DT_DEVICE_CAPABILITY) { + switch (((const uint8_t *)buf)[2]) { + case LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY: + if (ptr->usb_2_0_ext_cap != NULL) + break; + if (dlen < LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE) + break; + + ptr->usb_2_0_ext_cap = dcap_20; + + dcap_20->bLength = LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE; + dcap_20->bDescriptorType = dtype; + dcap_20->bDevCapabilityType = ((const uint8_t *)buf)[2]; + dcap_20->bmAttributes = ((const uint8_t *)buf)[3] | + (((const uint8_t *)buf)[4] << 8) | + (((const uint8_t *)buf)[5] << 16) | + (((const uint8_t *)buf)[6] << 24); + break; + + case LIBUSB_SS_USB_DEVICE_CAPABILITY: + if (ptr->ss_usb_cap != NULL) + break; + if (dlen < LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE) + break; + + ptr->ss_usb_cap = ss_cap; + + ss_cap->bLength = LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE; + ss_cap->bDescriptorType = dtype; + ss_cap->bDevCapabilityType = ((const uint8_t *)buf)[2]; + ss_cap->bmAttributes = ((const uint8_t *)buf)[3]; + ss_cap->wSpeedSupported = ((const uint8_t *)buf)[4] | + (((const uint8_t *)buf)[5] << 8); + ss_cap->bFunctionalitySupport = ((const uint8_t *)buf)[6]; + ss_cap->bU1DevExitLat = ((const uint8_t *)buf)[7]; + ss_cap->wU2DevExitLat = ((const uint8_t *)buf)[8] | + (((const uint8_t *)buf)[9] << 8); + break; + + default: + break; + } + } + + buf = ((const uint8_t *)buf) + dlen; + len -= dlen; + } + if (ptr != NULL) + return (0); /* success */ + + return (LIBUSB_ERROR_IO); +} + +void +libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos) +{ + if (bos == NULL) + return; + + free(bos); +} Modified: stable/9/lib/libusb/libusb20_desc.c ============================================================================== --- stable/9/lib/libusb/libusb20_desc.c Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb20_desc.c Sat Dec 31 15:46:36 2011 (r229122) @@ -41,6 +41,10 @@ LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_END LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_INTERFACE_DESC); LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_CONFIG_DESC); LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_CONTROL_SETUP); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_SS_ENDPT_COMP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_USB_20_DEVCAP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_SS_USB_DEVCAP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_BOS_DESCRIPTOR); /*------------------------------------------------------------------------* * libusb20_parse_config_desc Modified: stable/9/lib/libusb/libusb20_desc.h ============================================================================== --- stable/9/lib/libusb/libusb20_desc.h Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb20_desc.h Sat Dec 31 15:46:36 2011 (r229122) @@ -264,6 +264,43 @@ LIBUSB20_MAKE_STRUCT(LIBUSB20_CONFIG_DES LIBUSB20_MAKE_STRUCT(LIBUSB20_CONTROL_SETUP); +#define LIBUSB20_SS_ENDPT_COMP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bMaxBurst, ) \ + m(n, UINT8_T, bmAttributes, ) \ + m(n, UINT16_T, wBytesPerInterval, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_SS_ENDPT_COMP_DESC); + +#define LIBUSB20_USB_20_DEVCAP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bDevCapabilityType, ) \ + m(n, UINT32_T, bmAttributes, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_USB_20_DEVCAP_DESC); + +#define LIBUSB20_SS_USB_DEVCAP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bDevCapabilityType, ) \ + m(n, UINT8_T, bmAttributes, ) \ + m(n, UINT16_T, wSpeedSupported, ) \ + m(n, UINT8_T, bFunctionalitySupport, ) \ + m(n, UINT8_T, bU1DevExitLat, ) \ + m(n, UINT16_T, wU2DevExitLat, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_SS_USB_DEVCAP_DESC); + +#define LIBUSB20_BOS_DESCRIPTOR(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT16_T, wTotalLength, ) \ + m(n, UINT8_T, bNumDeviceCapabilities, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_BOS_DESCRIPTOR); + /* standard USB stuff */ /** \ingroup desc @@ -333,6 +370,24 @@ enum libusb20_descriptor_type { /** Hub descriptor */ LIBUSB20_DT_HUB = 0x29, + + /** Binary Object Store, BOS */ + LIBUSB20_DT_BOS = 0x0f, + + /** Device Capability */ + LIBUSB20_DT_DEVICE_CAPABILITY = 0x10, + + /** SuperSpeed endpoint companion */ + LIBUSB20_DT_SS_ENDPOINT_COMPANION = 0x30, +}; + +/** \ingroup desc + * Device capability types as defined by the USB specification. */ +enum libusb20_device_capability_type { + LIBUSB20_WIRELESS_USB_DEVICE_CAPABILITY = 0x1, + LIBUSB20_USB_2_0_EXTENSION_DEVICE_CAPABILITY = 0x2, + LIBUSB20_SS_USB_DEVICE_CAPABILITY = 0x3, + LIBUSB20_CONTAINER_ID_DEVICE_CAPABILITY = 0x4, }; /* Descriptor sizes per descriptor type */ @@ -342,6 +397,10 @@ enum libusb20_descriptor_type { #define LIBUSB20_DT_ENDPOINT_SIZE 7 #define LIBUSB20_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ #define LIBUSB20_DT_HUB_NONVAR_SIZE 7 +#define LIBUSB20_DT_SS_ENDPOINT_COMPANION_SIZE 6 +#define LIBUSB20_DT_BOS_SIZE 5 +#define LIBUSB20_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 +#define LIBUSB20_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB20_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ #define LIBUSB20_ENDPOINT_DIR_MASK 0x80 From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:49:04 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB01F1065673; Sat, 31 Dec 2011 15:49:04 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF0048FC0C; Sat, 31 Dec 2011 15:49:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFn4t0071816; Sat, 31 Dec 2011 15:49:04 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFn4pl071814; Sat, 31 Dec 2011 15:49:04 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201112311549.pBVFn4pl071814@svn.freebsd.org> From: Stefan Farfeleder Date: Sat, 31 Dec 2011 15:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229123 - stable/9/contrib/gcc/config/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:49:04 -0000 Author: stefanf Date: Sat Dec 31 15:49:04 2011 New Revision: 229123 URL: http://svn.freebsd.org/changeset/base/229123 Log: MFC r226430: Adjust posix_memalign() prototype to match what we define in stdlib.h for C++ compilation. Modified: stable/9/contrib/gcc/config/i386/pmm_malloc.h Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/config/i386/pmm_malloc.h ============================================================================== --- stable/9/contrib/gcc/config/i386/pmm_malloc.h Sat Dec 31 15:46:36 2011 (r229122) +++ stable/9/contrib/gcc/config/i386/pmm_malloc.h Sat Dec 31 15:49:04 2011 (r229123) @@ -34,7 +34,7 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else -extern "C" int posix_memalign (void **, size_t, size_t) throw (); +extern "C" int posix_memalign (void **, size_t, size_t); #endif static __inline void * From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 15:49:08 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54FF21065672; Sat, 31 Dec 2011 15:49:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0C48FC08; Sat, 31 Dec 2011 15:49:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFn8CG071853; Sat, 31 Dec 2011 15:49:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFn8oc071851; Sat, 31 Dec 2011 15:49:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311549.pBVFn8oc071851@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229124 - stable/9/lib/libusb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 15:49:08 -0000 Author: hselasky Date: Sat Dec 31 15:49:07 2011 New Revision: 229124 URL: http://svn.freebsd.org/changeset/base/229124 Log: MFC r228235 and r228236: Minor code simplification. No functional change. Modified: stable/9/lib/libusb/libusb10.c Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb10.c ============================================================================== --- stable/9/lib/libusb/libusb10.c Sat Dec 31 15:49:04 2011 (r229123) +++ stable/9/lib/libusb/libusb10.c Sat Dec 31 15:49:07 2011 (r229124) @@ -417,9 +417,12 @@ libusb_open_device_with_vid_pid(libusb_c if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); + pdev = NULL; for (j = 0; j < i; j++) { - pdev = devs[j]->os_priv; - pdesc = libusb20_dev_get_device_desc(pdev); + struct libusb20_device *tdev; + + tdev = devs[j]->os_priv; + pdesc = libusb20_dev_get_device_desc(tdev); /* * NOTE: The USB library will automatically swap the * fields in the device descriptor to be of host @@ -427,13 +430,10 @@ libusb_open_device_with_vid_pid(libusb_c */ if (pdesc->idVendor == vendor_id && pdesc->idProduct == product_id) { - if (libusb_open(devs[j], &pdev) < 0) - pdev = NULL; + libusb_open(devs[j], &pdev); break; } } - if (j == i) - pdev = NULL; libusb_free_device_list(devs, 1); DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 16:12:43 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69447106566B; Sat, 31 Dec 2011 16:12:43 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 0393E8FC18; Sat, 31 Dec 2011 16:12:42 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 095722A28E52; Sat, 31 Dec 2011 17:12:42 +0100 (CET) Date: Sat, 31 Dec 2011 17:12:41 +0100 From: Ed Schouten To: Gleb Kurtsou Message-ID: <20111231161241.GX1895@hoeg.nl> References: <201112311312.pBVDCBja064475@svn.freebsd.org> <20111231140027.GA3487@reks> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8f0Rp8CLSOFvlIcd" Content-Disposition: inline In-Reply-To: <20111231140027.GA3487@reks> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan , svn-src-stable-9@freebsd.org Subject: Re: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 16:12:43 -0000 --8f0Rp8CLSOFvlIcd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Gleb Kurtsou , 20111231 15:00: > Is there a reason we need all this mess is the first place? 12 grep links= under > /usr/bin. Why not to make zgrep handle all compression types. Tranparent > compression handling in tar was a great success. +1. --=20 Ed Schouten WWW: http://80386.nl/ --8f0Rp8CLSOFvlIcd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/zR5AAoJEG5e2P40kaK7xxMP/0RhUZuRPpcBq/eVrAhCB685 J2PxBMZUGXvJ+ChTEyJ2uVtH5qsseFbf1h33mq/MmymGPQ4mpLkmVowEw2fGAB0W FeamJkSmofA9Lq7v1jC5r5Xe53LRhPPCjQyVNQx+vsCv0ha85hd6p6cQhDYyr5C8 Q8Uh+2yzH/MUoHbbR70gT4GA/Zui13rECaAj38pGjg5C9iulF6U39MoyCfvSe8C3 NqZ2g8dH0jk0oQqll+Yp/R0cHD3cPC6z1JfTFkk89CXiJOVUQ5OYLL8B8gpvrBP8 86JNG3LM1lUvpoEoit3SiGxdtn1oj5wXjruS6PcKZvgdDDMbcep5NzkIZSEmz3s3 VgRo/TerRK8iiH7RFRjL0LE4K90XUkuTXqBOVMVJnhbspSCKCglmoBNVzxrFLydQ X5e5VhU2ciH99cLOrU2KybIVZwDzDElMLQ5ztby0zhMt6kzWdX/6waQb3BCoftSU MHP2QSHUMj6breLBp6z71iJX1RCndRu7TEYn7bcf9Hm1u99ekSM6Lw4lMEX6L4IU A+4TIjlekkLjOELWRwNC10U9tu/So53yErAguAF1GxiVJfyCzTa902PbjhX+luVP KV2sVOjc+l6l3/4C+EyYsZ3XP7yPMDIGRQ93JWTjCc277fez1l1sNUK6n5FZGktn cRXUCd2FR6eR5RSS4nbW =jr6j -----END PGP SIGNATURE----- --8f0Rp8CLSOFvlIcd-- From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 16:32:27 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09FBF106564A; Sat, 31 Dec 2011 16:32:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5AA48FC13; Sat, 31 Dec 2011 16:32:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVGWQUL073338; Sat, 31 Dec 2011 16:32:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVGWQtC073336; Sat, 31 Dec 2011 16:32:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311632.pBVGWQtC073336@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 16:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229128 - stable/9/contrib/telnet/libtelnet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 16:32:27 -0000 Author: dim Date: Sat Dec 31 16:32:26 2011 New Revision: 229128 URL: http://svn.freebsd.org/changeset/base/229128 Log: MFC r228559: In contrib/telnet/libtelnet/sra.c, use the correct number of bytes to zero the password buffer. Modified: stable/9/contrib/telnet/libtelnet/sra.c Directory Properties: stable/9/contrib/telnet/ (props changed) Modified: stable/9/contrib/telnet/libtelnet/sra.c ============================================================================== --- stable/9/contrib/telnet/libtelnet/sra.c Sat Dec 31 16:19:22 2011 (r229127) +++ stable/9/contrib/telnet/libtelnet/sra.c Sat Dec 31 16:32:26 2011 (r229128) @@ -303,7 +303,7 @@ sra_reply(Authenticator *ap, unsigned ch goto enc_user; } /* encode password */ - memset(pass,0,sizeof(pass)); + memset(pass,0,256); telnet_gets("Password: ",pass,255,0); pk_encode(pass,xpass,&ck); /* send it off */ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 17:14:56 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C0F106564A; Sat, 31 Dec 2011 17:14:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2F938FC17; Sat, 31 Dec 2011 17:14:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVHEumE074692; Sat, 31 Dec 2011 17:14:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVHEuFR074690; Sat, 31 Dec 2011 17:14:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311714.pBVHEuFR074690@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 17:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229129 - stable/9/lib/libthread_db X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 17:14:57 -0000 Author: dim Date: Sat Dec 31 17:14:56 2011 New Revision: 229129 URL: http://svn.freebsd.org/changeset/base/229129 Log: MFC r228578 In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrect warnings about alignment, so turn -Wcast-align off for now. Modified: stable/9/lib/libthread_db/Makefile Directory Properties: stable/9/lib/libthread_db/ (props changed) Modified: stable/9/lib/libthread_db/Makefile ============================================================================== --- stable/9/lib/libthread_db/Makefile Sat Dec 31 16:32:26 2011 (r229128) +++ stable/9/lib/libthread_db/Makefile Sat Dec 31 17:14:56 2011 (r229129) @@ -16,4 +16,10 @@ SYM_MAPS+=${.CURDIR}/Symbol.map SYMBOL_MAPS=${SYM_MAPS} VERSION_DEF=${.CURDIR}/../libc/Versions.def +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives an incorrect warning about alignment in +# arch/i386/libpthread_md.c, so turn that off for now. +NO_WCAST_ALIGN= +.endif + .include From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 17:56:06 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4915D106564A; Sat, 31 Dec 2011 17:56:06 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 332D08FC08; Sat, 31 Dec 2011 17:56:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVHu68c075892; Sat, 31 Dec 2011 17:56:06 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVHu5N3075890; Sat, 31 Dec 2011 17:56:06 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201112311756.pBVHu5N3075890@svn.freebsd.org> From: Peter Holm Date: Sat, 31 Dec 2011 17:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229130 - stable/9/sys/fs/tmpfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 17:56:06 -0000 Author: pho Date: Sat Dec 31 17:56:05 2011 New Revision: 229130 URL: http://svn.freebsd.org/changeset/base/229130 Log: MFC: r226987 Added missing cache purge of from argument for rename(). Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_vnops.c Sat Dec 31 17:14:56 2011 (r229129) +++ stable/9/sys/fs/tmpfs/tmpfs_vnops.c Sat Dec 31 17:56:05 2011 (r229130) @@ -1138,6 +1138,7 @@ tmpfs_rename(struct vop_rename_args *v) * really reclaimed. */ tmpfs_free_dirent(VFS_TO_TMPFS(tvp->v_mount), de, TRUE); } + cache_purge(fvp); error = 0; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 18:09:32 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FBF4106566C; Sat, 31 Dec 2011 18:09:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78F748FC08; Sat, 31 Dec 2011 18:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVI9W7k076430; Sat, 31 Dec 2011 18:09:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVI9Wgu076427; Sat, 31 Dec 2011 18:09:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112311809.pBVI9Wgu076427@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Dec 2011 18:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229131 - in stable/9: lib/clang share/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 18:09:32 -0000 Author: nwhitehorn Date: Sat Dec 31 18:09:31 2011 New Revision: 229131 URL: http://svn.freebsd.org/changeset/base/229131 Log: MFC r227775: Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50 import, it works without issue. Modified: stable/9/lib/clang/clang.build.mk stable/9/share/mk/bsd.own.mk Directory Properties: stable/9/lib/clang/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Sat Dec 31 17:56:05 2011 (r229130) +++ stable/9/lib/clang/clang.build.mk Sat Dec 31 18:09:31 2011 (r229131) @@ -9,7 +9,7 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG # Correct for gcc miscompilation when compiling on PPC with -O2 -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -O1 .endif Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Sat Dec 31 17:56:05 2011 (r229130) +++ stable/9/share/mk/bsd.own.mk Sat Dec 31 18:09:31 2011 (r229131) @@ -428,14 +428,14 @@ __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif -# Clang is only for x86 and 32-bit powerpc right now, by default. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc" +# Clang is only for x86 and powerpc right now, by default. +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG .endif -# FDT is needed only for arm and powerpc (and not powerpc64) -.if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc" +# FDT is needed only for arm and powerpc +.if ${__T:Marm*} || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 18:41:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62B091065672; Sat, 31 Dec 2011 18:41:30 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 495E48FC1C; Sat, 31 Dec 2011 18:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVIfUju077425; Sat, 31 Dec 2011 18:41:30 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVIfUsl077423; Sat, 31 Dec 2011 18:41:30 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311841.pBVIfUsl077423@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 18:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229132 - stable/7/sys/cam X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 18:41:30 -0000 Author: mdf Date: Sat Dec 31 18:41:29 2011 New Revision: 229132 URL: http://svn.freebsd.org/changeset/base/229132 Log: MFC r228442: Do not use the sometimes-reserved word 'bool' for a variable name. This is a direct commit since the file name has changed. Modified: stable/7/sys/cam/cam_xpt.c Modified: stable/7/sys/cam/cam_xpt.c ============================================================================== --- stable/7/sys/cam/cam_xpt.c Sat Dec 31 18:09:31 2011 (r229131) +++ stable/7/sys/cam/cam_xpt.c Sat Dec 31 18:41:29 2011 (r229132) @@ -6439,14 +6439,14 @@ xpt_find_quirk(struct cam_ed *device) static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS) { - int error, bool; + int error, val; - bool = cam_srch_hi; - error = sysctl_handle_int(oidp, &bool, 0, req); + val = cam_srch_hi; + error = sysctl_handle_int(oidp, &val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (bool == 0 || bool == 1) { - cam_srch_hi = bool; + if (val == 0 || val == 1) { + cam_srch_hi = val; return (0); } else { return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 18:49:46 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEF85106564A; Sat, 31 Dec 2011 18:49:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7C918FC13; Sat, 31 Dec 2011 18:49:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVInk5r077713; Sat, 31 Dec 2011 18:49:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVInkw3077711; Sat, 31 Dec 2011 18:49:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311849.pBVInkw3077711@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 18:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229133 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 18:49:46 -0000 Author: dim Date: Sat Dec 31 18:49:46 2011 New Revision: 229133 URL: http://svn.freebsd.org/changeset/base/229133 Log: MFC r228579: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c, some uint64_t values are snprintf'd using %llx. On amd64, uint64_t is typedef'd as unsigned long, so cast the values to u_longlong_t, as is done similarly in the rest of the file. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Dec 31 18:41:29 2011 (r229132) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Dec 31 18:49:46 2011 (r229133) @@ -873,7 +873,7 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE * if (pc > sym.st_value) { (void) snprintf(c, sizeof (c), "%s`%s+0x%llx", dts.dts_object, dts.dts_name, - pc - sym.st_value); + (u_longlong_t)(pc - sym.st_value)); } else { (void) snprintf(c, sizeof (c), "%s`%s", dts.dts_object, dts.dts_name); @@ -886,9 +886,10 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE * */ if (dtrace_lookup_by_addr(dtp, pc, NULL, &dts) == 0) { (void) snprintf(c, sizeof (c), "%s`0x%llx", - dts.dts_object, pc); + dts.dts_object, (u_longlong_t)pc); } else { - (void) snprintf(c, sizeof (c), "0x%llx", pc); + (void) snprintf(c, sizeof (c), "0x%llx", + (u_longlong_t)pc); } } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 18:53:11 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC7E8106566C; Sat, 31 Dec 2011 18:53:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5A318FC0C; Sat, 31 Dec 2011 18:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVIrBOx077864; Sat, 31 Dec 2011 18:53:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVIrBFK077862; Sat, 31 Dec 2011 18:53:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311853.pBVIrBFK077862@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 18:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229134 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 18:53:11 -0000 Author: dim Date: Sat Dec 31 18:53:11 2011 New Revision: 229134 URL: http://svn.freebsd.org/changeset/base/229134 Log: MFC r228580: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c, some uint64_t values are snprintf'd using %llx. On amd64, uint64_t is typedef'd as unsigned long, so cast the values to u_longlong_t, as is done similarly in the rest of the file. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Dec 31 18:49:46 2011 (r229133) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Dec 31 18:53:11 2011 (r229134) @@ -335,7 +335,8 @@ dt_handle_cpudrop(dtrace_hdl_t *dtp, pro } (void) snprintf(s, size, "%llu %sdrop%s on CPU %d\n", - howmany, what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ", + (u_longlong_t)howmany, + what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ", howmany > 1 ? "s" : "", cpu); if (dtp->dt_drophdlr == NULL) @@ -427,7 +428,8 @@ dt_handle_status(dtrace_hdl_t *dtp, dtra size = sizeof (str); } - (void) snprintf(s, size, "%llu %s%s%s\n", nval - oval, + (void) snprintf(s, size, "%llu %s%s%s\n", + (u_longlong_t)(nval - oval), _dt_droptab[i].dtdrt_str, (nval - oval > 1) ? "s" : "", _dt_droptab[i].dtdrt_msg != NULL ? _dt_droptab[i].dtdrt_msg : ""); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:19:19 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9448106566B; Sat, 31 Dec 2011 19:19:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C36678FC1F; Sat, 31 Dec 2011 19:19:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJJJX9078770; Sat, 31 Dec 2011 19:19:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJJJ4E078768; Sat, 31 Dec 2011 19:19:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311919.pBVJJJ4E078768@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229136 - stable/9/libexec/bootpd/bootpgw X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:19:20 -0000 Author: dim Date: Sat Dec 31 19:19:19 2011 New Revision: 229136 URL: http://svn.freebsd.org/changeset/base/229136 Log: MFC r228581: In libexec/bootpd/bootpgw/bootpgw.c, add a cast for the remaining minutes of activity, to avoid a warning on platforms where time_t is a 32-bit integer. Modified: stable/9/libexec/bootpd/bootpgw/bootpgw.c Directory Properties: stable/9/libexec/bootpd/ (props changed) Modified: stable/9/libexec/bootpd/bootpgw/bootpgw.c ============================================================================== --- stable/9/libexec/bootpd/bootpgw/bootpgw.c Sat Dec 31 19:01:48 2011 (r229135) +++ stable/9/libexec/bootpd/bootpgw/bootpgw.c Sat Dec 31 19:19:19 2011 (r229136) @@ -452,7 +452,7 @@ main(argc, argv) } if (!(readfds & (1 << s))) { report(LOG_INFO, "exiting after %ld minutes of inactivity", - actualtimeout.tv_sec / 60); + (long)(actualtimeout.tv_sec / 60)); exit(0); } ra_len = sizeof(recv_addr); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:26:24 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD7BB106566C; Sat, 31 Dec 2011 19:26:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6DB98FC1B; Sat, 31 Dec 2011 19:26:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJQONq079025; Sat, 31 Dec 2011 19:26:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJQOOo079023; Sat, 31 Dec 2011 19:26:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311926.pBVJQOOo079023@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229137 - stable/9/libexec/getty X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:26:24 -0000 Author: dim Date: Sat Dec 31 19:26:24 2011 New Revision: 229137 URL: http://svn.freebsd.org/changeset/base/229137 Log: MFC r228582: In libexec/getty/chat.c, replace && with & in chat_send(). The intent is to test if the CHATDEBUG_SEND bit is set in the chat_debug global. Modified: stable/9/libexec/getty/chat.c Directory Properties: stable/9/libexec/getty/ (props changed) Modified: stable/9/libexec/getty/chat.c ============================================================================== --- stable/9/libexec/getty/chat.c Sat Dec 31 19:19:19 2011 (r229136) +++ stable/9/libexec/getty/chat.c Sat Dec 31 19:26:24 2011 (r229137) @@ -388,7 +388,7 @@ chat_send(char const *str) { int r = 0; - if (chat_debug && CHATDEBUG_SEND) + if (chat_debug & CHATDEBUG_SEND) syslog(LOG_DEBUG, "chat_send '%s'", cleanstr(str, strlen(str))); if (*str) { From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:28:55 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EE2C106564A; Sat, 31 Dec 2011 19:28:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC9D28FC0A; Sat, 31 Dec 2011 19:28:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJSseQ079139; Sat, 31 Dec 2011 19:28:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJSsW7079137; Sat, 31 Dec 2011 19:28:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311928.pBVJSsW7079137@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229138 - stable/9/libexec/bootpd/tools/bootptest X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:28:55 -0000 Author: dim Date: Sat Dec 31 19:28:54 2011 New Revision: 229138 URL: http://svn.freebsd.org/changeset/base/229138 Log: MFC r228584: In libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf length modifier for the difference between two pointers. Modified: stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Directory Properties: stable/9/libexec/bootpd/ (props changed) Modified: stable/9/libexec/bootpd/tools/bootptest/print-bootp.c ============================================================================== --- stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Sat Dec 31 19:26:24 2011 (r229137) +++ stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Sat Dec 31 19:28:54 2011 (r229138) @@ -310,7 +310,7 @@ rfc1048_print(bp, length) len = *bp++; if (bp + len > ep) { /* truncated option */ - printf(" |(%d>%d)", len, ep - bp); + printf(" |(%d>%td)", len, ep - bp); return; } /* Print the option value(s). */ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:34:26 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E4F3106566B; Sat, 31 Dec 2011 19:34:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2865C8FC12; Sat, 31 Dec 2011 19:34:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJYQQQ079363; Sat, 31 Dec 2011 19:34:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJYPeA079361; Sat, 31 Dec 2011 19:34:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311934.pBVJYPeA079361@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229139 - stable/9/libexec/pppoed X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:34:26 -0000 Author: dim Date: Sat Dec 31 19:34:25 2011 New Revision: 229139 URL: http://svn.freebsd.org/changeset/base/229139 Log: MFC r228586: In libexec/pppoed/pppoed.c, use the correct printf length modifier for a size_t. Modified: stable/9/libexec/pppoed/pppoed.c Directory Properties: stable/9/libexec/pppoed/ (props changed) Modified: stable/9/libexec/pppoed/pppoed.c ============================================================================== --- stable/9/libexec/pppoed/pppoed.c Sat Dec 31 19:28:54 2011 (r229138) +++ stable/9/libexec/pppoed/pppoed.c Sat Dec 31 19:34:25 2011 (r229139) @@ -570,8 +570,8 @@ main(int argc, char *argv[]) } exec = (char *)alloca(sizeof DEFAULT_EXEC_PREFIX + strlen(label)); if (exec == NULL) { - fprintf(stderr, "%s: Cannot allocate %d bytes\n", prog, - (int)(sizeof DEFAULT_EXEC_PREFIX) + strlen(label)); + fprintf(stderr, "%s: Cannot allocate %zu bytes\n", prog, + sizeof DEFAULT_EXEC_PREFIX + strlen(label)); return EX_OSERR; } strcpy(exec, DEFAULT_EXEC_PREFIX); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:36:12 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15F8F106566B; Sat, 31 Dec 2011 19:36:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3B3B8FC19; Sat, 31 Dec 2011 19:36:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJaBb6079464; Sat, 31 Dec 2011 19:36:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJaB4N079462; Sat, 31 Dec 2011 19:36:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311936.pBVJaB4N079462@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229140 - stable/9/libexec/rbootd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:36:12 -0000 Author: dim Date: Sat Dec 31 19:36:11 2011 New Revision: 229140 URL: http://svn.freebsd.org/changeset/base/229140 Log: MFC r228587: In libexec/rbootd/utils.c, use the correct printf length modifiers for u_int32_t and size_t. Modified: stable/9/libexec/rbootd/utils.c Directory Properties: stable/9/libexec/rbootd/ (props changed) Modified: stable/9/libexec/rbootd/utils.c ============================================================================== --- stable/9/libexec/rbootd/utils.c Sat Dec 31 19:34:25 2011 (r229139) +++ stable/9/libexec/rbootd/utils.c Sat Dec 31 19:36:11 2011 (r229140) @@ -82,8 +82,8 @@ static const char rcsid[] = void DispPkt(RMPCONN *rconn, int direct) { - static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u"; - static const char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n"; + static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%x SessID:%x Vers:%u"; + static const char ReadFmt[] = "\t\tRetCode:%u Offset:%x SessID:%x\n"; struct tm *tmp; struct rmp_packet *rmp; @@ -166,7 +166,7 @@ DispPkt(RMPCONN *rconn, int direct) GETWORD(rmp->r_rrpl.rmp_offset, t); (void) fprintf(DbgFp, ReadFmt, rmp->r_rrpl.rmp_retcode, t, ntohs(rmp->r_rrpl.rmp_session)); - (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %d\n", + (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %zu\n", rconn->rmplen - RMPREADSIZE(0)); break; case RMP_BOOT_DONE: /* boot complete */ From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:42:53 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D74106566B; Sat, 31 Dec 2011 19:42:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF0A8FC1B; Sat, 31 Dec 2011 19:42:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJgrMN079689; Sat, 31 Dec 2011 19:42:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJgrY0079687; Sat, 31 Dec 2011 19:42:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311942.pBVJgrY0079687@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229141 - stable/9/contrib/telnet/telnetd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:42:53 -0000 Author: dim Date: Sat Dec 31 19:42:52 2011 New Revision: 229141 URL: http://svn.freebsd.org/changeset/base/229141 Log: MFC r228589: In contrib/telnet/telnetd/utility.c, fix a few warnings about format strings not being literals. Modified: stable/9/contrib/telnet/telnetd/utility.c Directory Properties: stable/9/contrib/telnet/ (props changed) Modified: stable/9/contrib/telnet/telnetd/utility.c ============================================================================== --- stable/9/contrib/telnet/telnetd/utility.c Sat Dec 31 19:36:11 2011 (r229140) +++ stable/9/contrib/telnet/telnetd/utility.c Sat Dec 31 19:42:52 2011 (r229141) @@ -847,22 +847,22 @@ printsub(char direction, unsigned char * for (i = 2; i < length; i++ ) { switch (pointer[i]) { case NEW_ENV_VAR: - output_data("\" VAR " + noquote); + output_data("%s", "\" VAR " + noquote); noquote = 2; break; case NEW_ENV_VALUE: - output_data("\" VALUE " + noquote); + output_data("%s", "\" VALUE " + noquote); noquote = 2; break; case ENV_ESC: - output_data("\" ESC " + noquote); + output_data("%s", "\" ESC " + noquote); noquote = 2; break; case ENV_USERVAR: - output_data("\" USERVAR " + noquote); + output_data("%s", "\" USERVAR " + noquote); noquote = 2; break; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:46:07 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA00106566C; Sat, 31 Dec 2011 19:46:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07B2E8FC08; Sat, 31 Dec 2011 19:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJk6pr079895; Sat, 31 Dec 2011 19:46:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJk6uO079891; Sat, 31 Dec 2011 19:46:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311946.pBVJk6uO079891@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229142 - stable/9/libexec/ypxfr X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:46:07 -0000 Author: dim Date: Sat Dec 31 19:46:06 2011 New Revision: 229142 URL: http://svn.freebsd.org/changeset/base/229142 Log: MFC r228600: Fix the incompatible enum conversions in libexec/ypxfr in another, more messy way, so as to not disrupt other yp programs: just add casts to convert the incompatible enums, as the numerical values are the same (either by accident, design, or the phase of the moon at that time). Modified: stable/9/libexec/ypxfr/ypxfr_getmap.c stable/9/libexec/ypxfr/ypxfr_main.c stable/9/libexec/ypxfr/ypxfr_misc.c Directory Properties: stable/9/libexec/ypxfr/ (props changed) Modified: stable/9/libexec/ypxfr/ypxfr_getmap.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_getmap.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_getmap.c Sat Dec 31 19:46:06 2011 (r229142) @@ -73,7 +73,7 @@ ypxfr_get_map(char *map, char *domain, c if ((clnt = clnt_create(host, YPPROG, YPVERS, "tcp")) == NULL) { yp_error("%s", clnt_spcreateerror("failed to \ create tcp handle")); - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; return(1); } @@ -91,7 +91,7 @@ create tcp handle")); return(0); if (status != YP_TRUE) { - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; return(1); } Modified: stable/9/libexec/ypxfr/ypxfr_main.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_main.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_main.c Sat Dec 31 19:46:06 2011 (r229142) @@ -88,7 +88,7 @@ ypxfr_exit(ypxfrstat retval, char *temp) exit(1); } - ypxfr_resp.status = retval; + ypxfr_resp.status = (yppush_status)retval; if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) { yp_error("%s", clnt_sperror(clnt, "callback failed")); @@ -329,7 +329,7 @@ the local domain name isn't set"); ypxfr_use_yplib)) == NULL) { yp_error("failed to find master of %s in domain %s: %s", ypxfr_mapname, ypxfr_source_domain, - ypxfrerr_string(yp_errno)); + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_MADDR,NULL); } } @@ -358,7 +358,8 @@ the local domain name isn't set"); ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? - "map has order 0" : ypxfrerr_string(yp_errno)); + "map has order 0" : + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,NULL); } @@ -533,7 +534,8 @@ leave: ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? - "map has order 0" : ypxfrerr_string(yp_errno)); + "map has order 0" : + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); } Modified: stable/9/libexec/ypxfr/ypxfr_misc.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_misc.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_misc.c Sat Dec 31 19:46:06 2011 (r229142) @@ -130,14 +130,14 @@ ypxfr_get_master(char *domain, char *map if ((res = yp_master(domain, map, &master))) { switch (res) { case YPERR_DOMAIN: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YPERR_MAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YPERR_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(NULL); @@ -154,7 +154,7 @@ ypxfr_get_master(char *domain, char *map if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) { yp_error("%s",clnt_spcreateerror("failed to \ create udp handle to ypserv")); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(NULL); } @@ -164,21 +164,21 @@ create udp handle to ypserv")); yp_error("%s",clnt_sperror(clnt,"YPPROC_MASTER \ failed")); clnt_destroy(clnt); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(NULL); } clnt_destroy(clnt); if (resp->stat != YP_TRUE) { switch (resp->stat) { case YP_NODOM: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YP_NOMAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YP_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(NULL); @@ -198,14 +198,14 @@ ypxfr_get_order(char *domain, char *map, if ((res = yp_order(domain, map, &order))) { switch (res) { case YPERR_DOMAIN: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YPERR_MAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YPERR_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(0); @@ -219,7 +219,7 @@ ypxfr_get_order(char *domain, char *map, if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) { yp_error("%s",clnt_spcreateerror("couldn't create \ udp handle to ypserv")); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(0); } req.map = map; @@ -228,21 +228,21 @@ udp handle to ypserv")); yp_error("%s", clnt_sperror(clnt, "YPPROC_ORDER \ failed")); clnt_destroy(clnt); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(0); } clnt_destroy(clnt); if (resp->stat != YP_TRUE) { switch (resp->stat) { case YP_NODOM: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YP_NOMAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YP_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(0); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:48:05 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCB33106566B; Sat, 31 Dec 2011 19:48:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634FE8FC08; Sat, 31 Dec 2011 19:48:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJm5nQ079997; Sat, 31 Dec 2011 19:48:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJm5Qs079994; Sat, 31 Dec 2011 19:48:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311948.pBVJm5Qs079994@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229143 - stable/9/bin/ed X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:48:05 -0000 Author: dim Date: Sat Dec 31 19:48:04 2011 New Revision: 229143 URL: http://svn.freebsd.org/changeset/base/229143 Log: MFC r228595: Fix some obtuse fprintf tricks in bin/ed. Modified: stable/9/bin/ed/io.c stable/9/bin/ed/main.c Directory Properties: stable/9/bin/ed/ (props changed) Modified: stable/9/bin/ed/io.c ============================================================================== --- stable/9/bin/ed/io.c Sat Dec 31 19:46:06 2011 (r229142) +++ stable/9/bin/ed/io.c Sat Dec 31 19:48:04 2011 (r229143) @@ -53,7 +53,8 @@ read_file(char *fn, long n) errmsg = "cannot close input file"; return ERR; } - fprintf(stdout, !scripted ? "%lu\n" : "", size); + if (!scripted) + fprintf(stdout, "%lu\n", size); return current_addr - n; } @@ -161,7 +162,8 @@ write_file(char *fn, const char *mode, l errmsg = "cannot close output file"; return ERR; } - fprintf(stdout, !scripted ? "%lu\n" : "", size); + if (!scripted) + fprintf(stdout, "%lu\n", size); return n ? m - n + 1 : 0; } Modified: stable/9/bin/ed/main.c ============================================================================== --- stable/9/bin/ed/main.c Sat Dec 31 19:46:06 2011 (r229142) +++ stable/9/bin/ed/main.c Sat Dec 31 19:48:04 2011 (r229143) @@ -192,9 +192,10 @@ top: fputs("?\n", stderr); errmsg = "warning: file modified"; if (!isatty(0)) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : - "", lineno, errmsg); + if (garrulous) + fprintf(stderr, + "script, line %d: %s\n", + lineno, errmsg); quit(2); } clearerr(stdin); @@ -225,27 +226,26 @@ top: fputs("?\n", stderr); /* give warning */ errmsg = "warning: file modified"; if (!isatty(0)) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : - "", lineno, errmsg); + if (garrulous) + fprintf(stderr, "script, line %d: %s\n", + lineno, errmsg); quit(2); } break; case FATAL: - if (!isatty(0)) - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : "", - lineno, errmsg); - else - fprintf(stderr, garrulous ? "%s\n" : "", - errmsg); + if (!isatty(0)) { + if (garrulous) + fprintf(stderr, "script, line %d: %s\n", + lineno, errmsg); + } else if (garrulous) + fprintf(stderr, "%s\n", errmsg); quit(3); default: fputs("?\n", stderr); if (!isatty(0)) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : "", - lineno, errmsg); + if (garrulous) + fprintf(stderr, "script, line %d: %s\n", + lineno, errmsg); quit(2); } break; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:50:52 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9DC81065675; Sat, 31 Dec 2011 19:50:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 909208FC14; Sat, 31 Dec 2011 19:50:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJoqWk080128; Sat, 31 Dec 2011 19:50:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJoqfD080126; Sat, 31 Dec 2011 19:50:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311950.pBVJoqfD080126@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229144 - stable/9/games/factor X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:50:52 -0000 Author: dim Date: Sat Dec 31 19:50:52 2011 New Revision: 229144 URL: http://svn.freebsd.org/changeset/base/229144 Log: MFC r228596: In games/factor/factor.c, fix a warning about a format string not being a literal. Modified: stable/9/games/factor/factor.c Directory Properties: stable/9/games/factor/ (props changed) Modified: stable/9/games/factor/factor.c ============================================================================== --- stable/9/games/factor/factor.c Sat Dec 31 19:48:04 2011 (r229143) +++ stable/9/games/factor/factor.c Sat Dec 31 19:50:52 2011 (r229144) @@ -322,7 +322,7 @@ BN_print_dec_fp(FILE *fp, const BIGNUM * buf = BN_bn2dec(num); if (buf == NULL) return; /* XXX do anything here? */ - fprintf(fp, buf); + fprintf(fp, "%s", buf); free(buf); } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:50:56 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7321065670; Sat, 31 Dec 2011 19:50:55 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B8D8FC16; Sat, 31 Dec 2011 19:50:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJotCg080168; Sat, 31 Dec 2011 19:50:55 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJotmk080164; Sat, 31 Dec 2011 19:50:55 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311950.pBVJotmk080164@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 19:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229145 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:50:56 -0000 Author: mdf Date: Sat Dec 31 19:50:55 2011 New Revision: 229145 URL: http://svn.freebsd.org/changeset/base/229145 Log: MFC r228441: Consistently use types in e1000 driver code: - Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist. Modified: stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_osdep.h stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:50:55 2011 (r229145) @@ -889,13 +889,13 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_vf { Modified: stable/9/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:50:55 2011 (r229145) @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/if_igb.c Sat Dec 31 19:50:55 2011 (r229145) @@ -225,7 +225,7 @@ static __inline void igb_rx_input(struct static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -348,7 +348,7 @@ SYSCTL_INT(_hw_igb, OID_AUTO, max_interr ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); SYSCTL_INT(_hw_igb, OID_AUTO, header_split, CTLFLAG_RDTUN, &igb_header_split, 0, "Enable receive mbuf header split"); @@ -3396,7 +3396,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:53:00 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFDFA106564A; Sat, 31 Dec 2011 19:53:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8DC18FC0A; Sat, 31 Dec 2011 19:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJr0lS080296; Sat, 31 Dec 2011 19:53:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJr09C080294; Sat, 31 Dec 2011 19:53:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311953.pBVJr09C080294@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229146 - stable/9/cddl/contrib/opensolaris/tools/ctf/cvt X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:53:00 -0000 Author: dim Date: Sat Dec 31 19:53:00 2011 New Revision: 229146 URL: http://svn.freebsd.org/changeset/base/229146 Log: MFC r228597: In cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c, a size_t is passed to fprintf as a field width. It should be an int instead, so cast it. Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c Sat Dec 31 19:50:55 2011 (r229145) +++ stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c Sat Dec 31 19:53:00 2011 (r229146) @@ -228,7 +228,7 @@ usage(void) "\n" " Note: if -L labelenv is specified and labelenv is not set in\n" " the environment, a default value is used.\n", - progname, progname, strlen(progname), " ", + progname, progname, (int)strlen(progname), " ", progname, progname); } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:55:20 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32CD9106564A; Sat, 31 Dec 2011 19:55:20 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C90B8FC15; Sat, 31 Dec 2011 19:55:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJtJGB080430; Sat, 31 Dec 2011 19:55:19 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJtJDp080426; Sat, 31 Dec 2011 19:55:19 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311955.pBVJtJDp080426@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 19:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229147 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:55:20 -0000 Author: mdf Date: Sat Dec 31 19:55:19 2011 New Revision: 229147 URL: http://svn.freebsd.org/changeset/base/229147 Log: MFC r228441: Consistently use types in e1000 driver code: - Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist. Modified: stable/8/sys/dev/e1000/e1000_hw.h stable/8/sys/dev/e1000/e1000_osdep.h stable/8/sys/dev/e1000/if_igb.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/8/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:53:00 2011 (r229146) +++ stable/8/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:55:19 2011 (r229147) @@ -889,13 +889,13 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_vf { Modified: stable/8/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/8/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:53:00 2011 (r229146) +++ stable/8/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:55:19 2011 (r229147) @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Sat Dec 31 19:53:00 2011 (r229146) +++ stable/8/sys/dev/e1000/if_igb.c Sat Dec 31 19:55:19 2011 (r229147) @@ -224,7 +224,7 @@ static __inline void igb_rx_input(struct static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -334,7 +334,7 @@ TUNABLE_INT("hw.igb.max_interrupt_rate", ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); /* @@ -3361,7 +3361,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:56:26 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AADD1065672; Sat, 31 Dec 2011 19:56:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23FE98FC0C; Sat, 31 Dec 2011 19:56:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJuPp8080504; Sat, 31 Dec 2011 19:56:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJuPTG080502; Sat, 31 Dec 2011 19:56:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311956.pBVJuPTG080502@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229148 - stable/9/cddl/contrib/opensolaris/cmd/dtrace X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:56:26 -0000 Author: dim Date: Sat Dec 31 19:56:25 2011 New Revision: 229148 URL: http://svn.freebsd.org/changeset/base/229148 Log: MFC r228598: In cddl/contrib/opensolaris/cmd/dtrace/dtrace.c, fix some obtuse snprintf tricks. Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Dec 31 19:55:19 2011 (r229147) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Dec 31 19:56:25 2011 (r229148) @@ -671,9 +671,12 @@ link_prog(dtrace_cmd_t *dcp) p[0] = '\0'; /* strip .d suffix */ (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), "%s.o", basename(dcp->dc_arg)); + } else if (g_cmdc > 1) { + (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), + "d.out.%td", dcp - g_cmdv); } else { (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), - g_cmdc > 1 ? "%s.%d" : "%s", "d.out", (int)(dcp - g_cmdv)); + "d.out"); } if (dtrace_program_link(g_dtp, dcp->dc_prog, DTRACE_D_PROBES, From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 19:58:25 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A21BB106566C; Sat, 31 Dec 2011 19:58:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CAF18FC0C; Sat, 31 Dec 2011 19:58:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJwPH6080617; Sat, 31 Dec 2011 19:58:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJwPHI080615; Sat, 31 Dec 2011 19:58:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311958.pBVJwPHI080615@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229149 - stable/9/gnu/usr.bin/binutils/libbinutils X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:58:25 -0000 Author: dim Date: Sat Dec 31 19:58:25 2011 New Revision: 229149 URL: http://svn.freebsd.org/changeset/base/229149 Log: MFC r228601: Define YY_NO_INPUT when building libbinutils, to prevent warnings about unused input() functions emitted by lex. Modified: stable/9/gnu/usr.bin/binutils/libbinutils/Makefile Directory Properties: stable/9/gnu/usr.bin/binutils/libbinutils/ (props changed) Modified: stable/9/gnu/usr.bin/binutils/libbinutils/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/libbinutils/Makefile Sat Dec 31 19:56:25 2011 (r229148) +++ stable/9/gnu/usr.bin/binutils/libbinutils/Makefile Sat Dec 31 19:58:25 2011 (r229149) @@ -25,6 +25,7 @@ SRCS+= arlex.l \ CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" CFLAGS+= -D_GNU_SOURCE +CFLAGS+= -DYY_NO_INPUT CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd INTERNALLIB= From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:01:10 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43514106564A; Sat, 31 Dec 2011 20:01:10 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF528FC12; Sat, 31 Dec 2011 20:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVK1AOK080771; Sat, 31 Dec 2011 20:01:10 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVK1924080767; Sat, 31 Dec 2011 20:01:09 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312001.pBVK1924080767@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229150 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:01:10 -0000 Author: mdf Date: Sat Dec 31 20:01:09 2011 New Revision: 229150 URL: http://svn.freebsd.org/changeset/base/229150 Log: MFC r228441: Consistently use types in e1000 driver code: - Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist. Modified: stable/7/sys/dev/e1000/e1000_hw.h stable/7/sys/dev/e1000/e1000_osdep.h stable/7/sys/dev/e1000/if_igb.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/7/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:58:25 2011 (r229149) +++ stable/7/sys/dev/e1000/e1000_hw.h Sat Dec 31 20:01:09 2011 (r229150) @@ -880,7 +880,7 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { Modified: stable/7/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/7/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:58:25 2011 (r229149) +++ stable/7/sys/dev/e1000/e1000_osdep.h Sat Dec 31 20:01:09 2011 (r229150) @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 Modified: stable/7/sys/dev/e1000/if_igb.c ============================================================================== --- stable/7/sys/dev/e1000/if_igb.c Sat Dec 31 19:58:25 2011 (r229149) +++ stable/7/sys/dev/e1000/if_igb.c Sat Dec 31 20:01:09 2011 (r229150) @@ -205,7 +205,7 @@ static __inline void igb_rx_input(struct static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -315,7 +315,7 @@ TUNABLE_INT("hw.igb.max_interrupt_rate", ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); /* @@ -3107,7 +3107,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:01:41 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C1491065670; Sat, 31 Dec 2011 20:01:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B1C58FC18; Sat, 31 Dec 2011 20:01:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVK1eqZ080822; Sat, 31 Dec 2011 20:01:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVK1eGm080820; Sat, 31 Dec 2011 20:01:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112312001.pBVK1eGm080820@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 20:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229151 - stable/9/sbin/camcontrol X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:01:41 -0000 Author: dim Date: Sat Dec 31 20:01:40 2011 New Revision: 229151 URL: http://svn.freebsd.org/changeset/base/229151 Log: MFC r228602: In sbin/camcontrol/camcontrol.c, fix a few warnings about format strings not being literals. Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Sat Dec 31 20:01:09 2011 (r229150) +++ stable/9/sbin/camcontrol/camcontrol.c Sat Dec 31 20:01:40 2011 (r229151) @@ -2506,7 +2506,7 @@ scsicmd(struct cam_device *device, int a if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4469,7 +4469,7 @@ smpcmd(struct cam_device *device, int ar if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4587,7 +4587,7 @@ try_long: if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4892,7 +4892,7 @@ smpphycontrol(struct cam_device *device, if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4974,7 +4974,7 @@ smpmaninfo(struct cam_device *device, in if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -5371,7 +5371,7 @@ smpphylist(struct cam_device *device, in if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -5451,7 +5451,7 @@ smpphylist(struct cam_device *device, in if (((retval = cam_send_ccb(device, ccb)) < 0) || (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && (disresponse->function_result != SMP_FR_PHY_VACANT))) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:06:39 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69B2A1065673; Sat, 31 Dec 2011 20:06:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535B28FC13; Sat, 31 Dec 2011 20:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVK6dIq081029; Sat, 31 Dec 2011 20:06:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVK6dNp081027; Sat, 31 Dec 2011 20:06:39 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112312006.pBVK6dNp081027@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 20:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229152 - stable/9/sbin/fsdb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:06:39 -0000 Author: dim Date: Sat Dec 31 20:06:38 2011 New Revision: 229152 URL: http://svn.freebsd.org/changeset/base/229152 Log: MFC r228603: In sbin/fsdb/fsdbutil.c, work around a clang false positive with printf format warnings and conditional operators. (See LLVM PR 11313 for more information.) MFC r228693: Revert r228603, and add the workaround to sbin/fsdb/Makefile instead. Modified: stable/9/sbin/fsdb/Makefile Directory Properties: stable/9/sbin/fsdb/ (props changed) Modified: stable/9/sbin/fsdb/Makefile ============================================================================== --- stable/9/sbin/fsdb/Makefile Sat Dec 31 20:01:40 2011 (r229151) +++ stable/9/sbin/fsdb/Makefile Sat Dec 31 20:06:38 2011 (r229152) @@ -9,6 +9,10 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Work around a problem with format string warnings and ntohs macros. +NO_WFORMAT= +.endif LDADD= -ledit -ltermcap DPADD= ${LIBEDIT} ${LIBTERMCAP} .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:12:27 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226FA1065670; Sat, 31 Dec 2011 20:12:27 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 028EF8FC0A; Sat, 31 Dec 2011 20:12:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKCQPF081272; Sat, 31 Dec 2011 20:12:26 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKCQoL081268; Sat, 31 Dec 2011 20:12:26 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312012.pBVKCQoL081268@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229153 - stable/9/sys/dev/ixgbe X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:12:27 -0000 Author: mdf Date: Sat Dec 31 20:12:26 2011 New Revision: 229153 URL: http://svn.freebsd.org/changeset/base/229153 Log: MFC r228440: Consistently use types in ixgbe driver code: - {ixgbe,ixv}_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - {ixgbe,ixv}_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - {ixgbe,ixv}_tso_setup() returns a bool, so declare it bool, not boolean_t. - {ixgbe,ixv}_txeof() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool if the symbol already exists. Modified: stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixgbe_osdep.h stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:06:38 2011 (r229152) +++ stable/9/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:12:26 2011 (r229153) @@ -265,7 +265,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixgbe_header_split = FALSE; +static int ixgbe_header_split = FALSE; TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); /* @@ -3017,7 +3017,7 @@ ixgbe_free_transmit_buffers(struct tx_ri * **********************************************************************/ -static boolean_t +static bool ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -3135,7 +3135,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -3299,7 +3299,7 @@ ixgbe_atr(struct tx_ring *txr, struct mb * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixgbe_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; Modified: stable/9/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:06:38 2011 (r229152) +++ stable/9/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:12:26 2011 (r229153) @@ -95,7 +95,9 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define le16_to_cpu Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Sat Dec 31 20:06:38 2011 (r229152) +++ stable/9/sys/dev/ixgbe/ixv.c Sat Dec 31 20:12:26 2011 (r229153) @@ -207,7 +207,7 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_ * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixv_header_split = FALSE; +static int ixv_header_split = FALSE; TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split); /* @@ -2374,7 +2374,7 @@ ixv_free_transmit_buffers(struct tx_ring * **********************************************************************/ -static boolean_t +static bool ixv_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -2497,7 +2497,7 @@ ixv_tx_ctx_setup(struct tx_ring *txr, st * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixv_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -2586,7 +2586,7 @@ ixv_tso_setup(struct tx_ring *txr, struc * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixv_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:15:47 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01BB01065675; Sat, 31 Dec 2011 20:15:47 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6A398FC08; Sat, 31 Dec 2011 20:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKFkXR081431; Sat, 31 Dec 2011 20:15:46 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKFkpd081427; Sat, 31 Dec 2011 20:15:46 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312015.pBVKFkpd081427@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229154 - stable/8/sys/dev/ixgbe X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:15:47 -0000 Author: mdf Date: Sat Dec 31 20:15:46 2011 New Revision: 229154 URL: http://svn.freebsd.org/changeset/base/229154 Log: MFC r228440: Consistently use types in ixgbe driver code: - {ixgbe,ixv}_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - {ixgbe,ixv}_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - {ixgbe,ixv}_tso_setup() returns a bool, so declare it bool, not boolean_t. - {ixgbe,ixv}_txeof() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool if the symbol already exists. Modified: stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/ixgbe/ixgbe_osdep.h stable/8/sys/dev/ixgbe/ixv.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:12:26 2011 (r229153) +++ stable/8/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:15:46 2011 (r229154) @@ -264,7 +264,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixgbe_header_split = FALSE; +static int ixgbe_header_split = FALSE; TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); /* @@ -2990,7 +2990,7 @@ ixgbe_free_transmit_buffers(struct tx_ri * **********************************************************************/ -static boolean_t +static bool ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -3108,7 +3108,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -3272,7 +3272,7 @@ ixgbe_atr(struct tx_ring *txr, struct mb * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixgbe_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; Modified: stable/8/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:12:26 2011 (r229153) +++ stable/8/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:15:46 2011 (r229154) @@ -95,7 +95,9 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define le16_to_cpu Modified: stable/8/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixv.c Sat Dec 31 20:12:26 2011 (r229153) +++ stable/8/sys/dev/ixgbe/ixv.c Sat Dec 31 20:15:46 2011 (r229154) @@ -206,7 +206,7 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_ * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixv_header_split = FALSE; +static int ixv_header_split = FALSE; TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split); /* @@ -2336,7 +2336,7 @@ ixv_free_transmit_buffers(struct tx_ring * **********************************************************************/ -static boolean_t +static bool ixv_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -2459,7 +2459,7 @@ ixv_tx_ctx_setup(struct tx_ring *txr, st * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixv_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -2548,7 +2548,7 @@ ixv_tso_setup(struct tx_ring *txr, struc * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixv_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:26:06 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D9D1106566C; Sat, 31 Dec 2011 20:26:06 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0CA18FC08; Sat, 31 Dec 2011 20:26:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKQ5V9081826; Sat, 31 Dec 2011 20:26:05 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKQ5TF081823; Sat, 31 Dec 2011 20:26:05 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312026.pBVKQ5TF081823@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229155 - stable/7/sys/dev/ixgbe X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:26:06 -0000 Author: mdf Date: Sat Dec 31 20:26:05 2011 New Revision: 229155 URL: http://svn.freebsd.org/changeset/base/229155 Log: MFC r228440: Consistently use types in ixgbe driver code: - ixgbe_tso_setup() returns a bool, so declare it bool, not boolean_t. - ixgbe_txeof() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool if the symbol already exists. Note this is a partial MFC since ixgbe_tx_ctx_setup() returns more than TRUE/FALSE on stable/7 and ixgbe_header_split tunable does not exist. Modified: stable/7/sys/dev/ixgbe/ixgbe.c stable/7/sys/dev/ixgbe/ixgbe_osdep.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/7/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:15:46 2011 (r229154) +++ stable/7/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:26:05 2011 (r229155) @@ -152,7 +152,7 @@ static void ixgbe_dma_free(struct ad static void ixgbe_add_rx_process_limit(struct adapter *, const char *, const char *, int *, int); static int ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); -static boolean_t ixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *); +static bool ixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void ixgbe_set_ivar(struct adapter *, u16, u8, s8); static void ixgbe_configure_ivars(struct adapter *); static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); @@ -3043,7 +3043,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -3126,7 +3126,7 @@ ixgbe_tso_setup(struct tx_ring *txr, str #else /* For 6.2 RELEASE */ /* This makes it easy to keep the code common */ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { return (FALSE); @@ -3140,7 +3140,7 @@ ixgbe_tso_setup(struct tx_ring *txr, str * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixgbe_txeof(struct tx_ring *txr) { struct adapter * adapter = txr->adapter; Modified: stable/7/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/7/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:15:46 2011 (r229154) +++ stable/7/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:26:05 2011 (r229155) @@ -92,7 +92,9 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define le16_to_cpu From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:27:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 930F7106564A; Sat, 31 Dec 2011 20:27:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8408FC0C; Sat, 31 Dec 2011 20:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKRaNL081918; Sat, 31 Dec 2011 20:27:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKRa01081916; Sat, 31 Dec 2011 20:27:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112312027.pBVKRa01081916@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 20:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229156 - stable/9/sbin/routed/rtquery X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:27:36 -0000 Author: dim Date: Sat Dec 31 20:27:36 2011 New Revision: 229156 URL: http://svn.freebsd.org/changeset/base/229156 Log: MFC r228607: Use NO_WARRAY_BOUNDS for sbin/routed/rtquery. Modified: stable/9/sbin/routed/rtquery/Makefile Directory Properties: stable/9/sbin/routed/rtquery/ (props changed) Modified: stable/9/sbin/routed/rtquery/Makefile ============================================================================== --- stable/9/sbin/routed/rtquery/Makefile Sat Dec 31 20:26:05 2011 (r229155) +++ stable/9/sbin/routed/rtquery/Makefile Sat Dec 31 20:27:36 2011 (r229156) @@ -7,5 +7,6 @@ MAN= rtquery.8 LDADD= -lmd DPADD= ${LIBMD} WARNS?= 3 +NO_WARRAY_BOUNDS= .include From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:42:34 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7810106566B; Sat, 31 Dec 2011 20:42:34 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B877C8FC0C; Sat, 31 Dec 2011 20:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKgY31082435; Sat, 31 Dec 2011 20:42:34 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKgYZ1082428; Sat, 31 Dec 2011 20:42:34 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312042.pBVKgYZ1082428@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229157 - in stable/9/sys: dev/cxgbe dev/drm dev/speaker dev/tws dev/vxge ofed/include/linux X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:42:35 -0000 Author: mdf Date: Sat Dec 31 20:42:34 2011 New Revision: 229157 URL: http://svn.freebsd.org/changeset/base/229157 Log: MFC r228443: Do not define bool/true/false if the symbols already exist. Modified: stable/9/sys/dev/cxgbe/osdep.h stable/9/sys/dev/drm/i915_drv.h stable/9/sys/dev/speaker/spkr.c stable/9/sys/dev/tws/tws.h stable/9/sys/dev/vxge/vxge-osdep.h stable/9/sys/ofed/include/linux/types.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/9/sys/dev/cxgbe/osdep.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/cxgbe/osdep.h Sat Dec 31 20:42:34 2011 (r229157) @@ -70,9 +70,11 @@ typedef uint64_t __be64; #error "Must set BYTE_ORDER" #endif +#ifndef __bool_true_false_are_defined typedef boolean_t bool; #define false FALSE #define true TRUE +#endif #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) Modified: stable/9/sys/dev/drm/i915_drv.h ============================================================================== --- stable/9/sys/dev/drm/i915_drv.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/drm/i915_drv.h Sat Dec 31 20:42:34 2011 (r229157) @@ -560,7 +560,7 @@ extern void opregion_enable_asle(struct LOCK_TEST_WITH_RETURN(dev, file_priv); \ } while (0) -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) && !defined(__bool_true_false_are_defined) typedef boolean_t bool; #endif Modified: stable/9/sys/dev/speaker/spkr.c ============================================================================== --- stable/9/sys/dev/speaker/spkr.c Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/speaker/spkr.c Sat Dec 31 20:42:34 2011 (r229157) @@ -130,7 +130,9 @@ rest(int centisecs) * except possibly at physical block boundaries. */ +#ifndef __bool_true_false_are_defined typedef int bool; +#endif #define TRUE 1 #define FALSE 0 Modified: stable/9/sys/dev/tws/tws.h ============================================================================== --- stable/9/sys/dev/tws/tws.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/tws/tws.h Sat Dec 31 20:42:34 2011 (r229157) @@ -205,7 +205,11 @@ struct tws_init_connect_info { /* ------------ boolean types ------------------- */ +#ifndef __bool_true_false_are_defined typedef enum _boolean { false, true } boolean; +#else +#define boolean bool +#endif enum err { SUCCESS, FAILURE }; /* ----------- per instance data ---------------- */ Modified: stable/9/sys/dev/vxge/vxge-osdep.h ============================================================================== --- stable/9/sys/dev/vxge/vxge-osdep.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/vxge/vxge-osdep.h Sat Dec 31 20:42:34 2011 (r229157) @@ -161,7 +161,9 @@ typedef uint16_t u16; typedef int32_t s32; typedef uint32_t u32; typedef unsigned long long int u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif typedef bus_addr_t dma_addr_t; typedef struct mtx spinlock_t; typedef struct resource *pci_irq_h; Modified: stable/9/sys/ofed/include/linux/types.h ============================================================================== --- stable/9/sys/ofed/include/linux/types.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/ofed/include/linux/types.h Sat Dec 31 20:42:34 2011 (r229157) @@ -39,9 +39,11 @@ typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; +#ifndef __bool_true_false_are_defined typedef _Bool bool; #define true TRUE #define false FALSE +#endif typedef unsigned long kernel_ulong_t; typedef unsigned int uint; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 31 20:46:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A29D5106564A; Sat, 31 Dec 2011 20:46:36 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 715708FC08; Sat, 31 Dec 2011 20:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKkauP082678; Sat, 31 Dec 2011 20:46:36 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKkaQp082673; Sat, 31 Dec 2011 20:46:36 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312046.pBVKkaQp082673@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229158 - in stable/8/sys/dev: cxgbe drm speaker tws X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 20:46:36 -0000 Author: mdf Date: Sat Dec 31 20:46:35 2011 New Revision: 229158 URL: http://svn.freebsd.org/changeset/base/229158 Log: MFC r228443: Do not define bool/true/false if the symbols already exist. Note that the ofed and dev/vxge parts of r228443 are not in stable/8. Modified: stable/8/sys/dev/cxgbe/osdep.h stable/8/sys/dev/drm/i915_drv.h stable/8/sys/dev/speaker/spkr.c stable/8/sys/dev/tws/tws.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/8/sys/dev/cxgbe/osdep.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/cxgbe/osdep.h Sat Dec 31 20:46:35 2011 (r229158) @@ -70,9 +70,11 @@ typedef uint64_t __be64; #error "Must set BYTE_ORDER" #endif +#ifndef __bool_true_false_are_defined typedef boolean_t bool; #define false FALSE #define true TRUE +#endif #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) Modified: stable/8/sys/dev/drm/i915_drv.h ============================================================================== --- stable/8/sys/dev/drm/i915_drv.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/drm/i915_drv.h Sat Dec 31 20:46:35 2011 (r229158) @@ -560,7 +560,7 @@ extern void opregion_enable_asle(struct LOCK_TEST_WITH_RETURN(dev, file_priv); \ } while (0) -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) && !defined(__bool_true_false_are_defined) typedef boolean_t bool; #endif Modified: stable/8/sys/dev/speaker/spkr.c ============================================================================== --- stable/8/sys/dev/speaker/spkr.c Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/speaker/spkr.c Sat Dec 31 20:46:35 2011 (r229158) @@ -130,7 +130,9 @@ rest(int centisecs) * except possibly at physical block boundaries. */ +#ifndef __bool_true_false_are_defined typedef int bool; +#endif #define TRUE 1 #define FALSE 0 Modified: stable/8/sys/dev/tws/tws.h ============================================================================== --- stable/8/sys/dev/tws/tws.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/tws/tws.h Sat Dec 31 20:46:35 2011 (r229158) @@ -205,7 +205,11 @@ struct tws_init_connect_info { /* ------------ boolean types ------------------- */ +#ifndef __bool_true_false_are_defined typedef enum _boolean { false, true } boolean; +#else +#define boolean bool +#endif enum err { SUCCESS, FAILURE }; /* ----------- per instance data ---------------- */