From owner-svn-src-stable-7@FreeBSD.ORG Sun Apr 24 22:12:01 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DA9E106564A; Sun, 24 Apr 2011 22:12:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E14E8FC12; Sun, 24 Apr 2011 22:12: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 p3OMC1IK049167; Sun, 24 Apr 2011 22:12:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OMC0AK049165; Sun, 24 Apr 2011 22:12:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242212.p3OMC0AK049165@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 22:12:00 +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: r221000 - stable/7/lib/libc/rpc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 22:12:01 -0000 Author: rmacklem Date: Sun Apr 24 22:12:00 2011 New Revision: 221000 URL: http://svn.freebsd.org/changeset/base/221000 Log: MFC: r220519 Fix a bug in the userland rpc library, where it would use a negative return value from write to update its position in a buffer. The patch, courtesy of Andrey Simonenko, also simplifies a conditional by removing the "i != cnt" clause, since it is always true at this point in the code. The bug caused problems for mountd, when it generated a large reply to an exports RPC request. Modified: stable/7/lib/libc/rpc/svc_vc.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/rpc/svc_vc.c ============================================================================== --- stable/7/lib/libc/rpc/svc_vc.c Sun Apr 24 21:27:29 2011 (r220999) +++ stable/7/lib/libc/rpc/svc_vc.c Sun Apr 24 22:12:00 2011 (r221000) @@ -550,7 +550,7 @@ write_vc(xprtp, buf, len) cd->strm_stat = XPRT_DIED; return (-1); } - if (cd->nonblock && i != cnt) { + if (cd->nonblock) { /* * For non-blocking connections, do not * take more than 2 seconds writing the @@ -564,6 +564,7 @@ write_vc(xprtp, buf, len) return (-1); } } + i = 0; } } From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 25 04:33:43 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E105106566B; Mon, 25 Apr 2011 04:33:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5DF48FC15; Mon, 25 Apr 2011 04:33: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 p3P4Xg3T060630; Mon, 25 Apr 2011 04:33:42 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4XgwU060628; Mon, 25 Apr 2011 04:33:42 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104250433.p3P4XgwU060628@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 25 Apr 2011 04:33:42 +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: r221004 - stable/7/sys/netgraph X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 04:33:43 -0000 Author: ae Date: Mon Apr 25 04:33:42 2011 New Revision: 221004 URL: http://svn.freebsd.org/changeset/base/221004 Log: MFC r220767: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius Modified: stable/7/sys/netgraph/ng_patch.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netgraph/ng_patch.c ============================================================================== --- stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:13 2011 (r221003) +++ stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:42 2011 (r221004) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 25 21:27:56 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0C961065781; Mon, 25 Apr 2011 21:27:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5F48FC16; Mon, 25 Apr 2011 21:27:56 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0F64E46B9C; Mon, 25 Apr 2011 17:27:56 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 999038A027; Mon, 25 Apr 2011 17:27:55 -0400 (EDT) From: John Baldwin To: Andre Albsmeier Date: Mon, 25 Apr 2011 17:03:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104190920.25924.jhb@freebsd.org> <20110420053226.GA22854@curry.mchp.siemens.de> In-Reply-To: <20110420053226.GA22854@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104251703.18518.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 25 Apr 2011 17:27:55 -0400 (EDT) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 21:27:56 -0000 On Wednesday, April 20, 2011 1:32:26 am Andre Albsmeier wrote: > On Tue, 19-Apr-2011 at 15:20:25 +0200, John Baldwin wrote: > > On Tuesday, April 19, 2011 8:56:48 am Andre Albsmeier wrote: > > > On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > > > > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > > > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > > > > Author: jhb > > > > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > > > > New Revision: 218277 > > > > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > > > > > > > Log: > > > > > > > > MFC 217075: > > > > > > > > Retire PCONFIG and leave the priority of thread0 alone when waiting for > > > > > > > > interrupt config hooks to execute. > > > > > > > > > > > > > > > > To preserve the KBI, I did not renumber priorities but simply removed > > > > > > > > PCONFIG. > > > > > > > > > > > > > > > > Modified: > > > > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > > > > stable/7/sys/sys/priority.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/kern/subr_autoconf.c > > > > > > > > > > > > > > ============================================================================== > > > > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 2011 > > > > > > (r218276) > > > > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 2011 > > > > > > (r218277) > > > > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > > > > warned = 0; > > > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > > EWOULDBLOCK) { > > > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > > > warned++; > > > > > > > > > > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12) > > > > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > > > > their boot device anymore. What they all got in common is: > > > > > > > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > > > > - one SCSI CDROM drive (cd0) > > > > > > > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > > > > detected at all. Other machines with a similar configuration > > > > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > > > > machines in question and they all booted again. > > > > > > > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > > > > above change, they worked with the CDROM again. I have cross- > > > > > > > checked it 3 times. No idea what's happening here... > > > > > > > > > > > > > > -Andre > > > > > > > > > > > > > > (*) To be honest, I use this patch so I had to modify only one file: > > > > > > > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 +0100 > > > > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 +0200 > > > > > > > @@ -108,7 +108,7 @@ > > > > > > > warned = 0; > > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > EWOULDBLOCK) { > > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > > warned++; > > > > > > > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? A verbose > > > > > > dmesg might be nice to look at if possible. > > > > > > > > > > OK, I have set up a machine for testing. In my other mail > > > > > I was wrong saying that the pass devices appear when using > > > > > the problematic kernel... > > > > > > > > > > Here are the dmesgs: > > > > > > > > > > - dmesg_bad is the original kernel as of Friday > > > > > - dmesg_ok is the patched kernel (see above) as of Friday > > > > > - dmesg.diff is the diff between both > > > > > > > > > > If you want me to try something just tell me... > > > > > > > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail the > > > > mount and drop into ddb and then get 'ps' output? > > > > > > As soon as I include the debugger into the kernel the problem > > > is gone. I have double-checked it two times now: With debugger > > > the drives are detected, without debugger mostly (but not always) > > > not. > > > > > > I currently have it running in an endless rebooting loop hoping, > > > that it fails eventually... > > > > Hummm. This seems like it is a timing related race. :( > > Success! Sometimes at night it finally panic'ed even with the > debugger in the kernel. Here is the output of 'ps' and some other > commands I remembered (no idea if any of these make sense in this > context :-)). It is still in this state with the serial console > attached so just tell me what to type ;-). > > > KDB: enter: manual escape to debugger > [thread pid 1 tid 100001 ] > Stopped at kdb_enter_why+0x3b: xorl %eax,%eax > db> ps > pid ppid pgrp uid state wmesg wchan cmd > 35 0 0 0 RL [softdepflush] > 34 0 0 0 RL [syncer] > 33 0 0 0 RL [vnlru] > 32 0 0 0 RL [bufdaemon] > 31 0 0 0 RL [pagezero] > 30 0 0 0 RL [idlepoll] > 29 0 0 0 RL [vmdaemon] > 28 0 0 0 RL [pagedaemon] > 27 0 0 0 WL [irq1: atkbd0] > 26 0 0 0 WL [swi0: uart uart] > 25 0 0 0 SL - 0xc182a63c [fdc0] > 24 0 0 0 SL idle 0xc1829600 [aic_recovery0] > 23 0 0 0 WL [irq11: ahc0] > 22 0 0 0 SL idle 0xc1829600 [aic_recovery0] > 21 0 0 0 WL [irq10: fxp0] > 20 0 0 0 WL [irq9: acpi0 intsmb0] > 19 0 0 0 SL - 0xc181b800 [kqueue taskq] > 18 0 0 0 WL [swi6: task queue] > 17 0 0 0 WL [swi6: Giant taskq] > --More-- 9 0 0 0 RL [thread taskq] > 16 0 0 0 WL [swi5: Fast task queue] > 15 0 0 0 WL [swi2: cambio] > 8 0 0 0 SL ccb_scan 0xc0766714 [xpt_thrd] > 7 0 0 0 SL - 0xc181bd80 [acpi_task_2] > 6 0 0 0 SL - 0xc181bd80 [acpi_task_1] > 5 0 0 0 SL - 0xc181bd80 [acpi_task_0] > 14 0 0 0 SL - 0xc077be54 [yarrow] > 4 0 0 0 SL - 0xc077942c [g_down] > 3 0 0 0 SL - 0xc0779428 [g_up] > 2 0 0 0 SL - 0xc0779420 [g_event] > 13 0 0 0 WL [swi3: vm] > 12 0 0 0 LL *Giant 0xc1821dc0 [swi4: clock] > 11 0 0 0 WL [swi1: net] > 10 0 0 0 RL [idle] > 1 0 0 0 RL CPU 0 [swapper] > 0 0 0 0 SLs sched 0xc07794c0 [swapper] Hummm, I don't see any "important" threads in a runnable state that I would think were denied the ability to run by the priority change. I wonder what callout swi4 is trying to run (or what other callouts might be stuck waiting for Giant). I'd be tempted to add some KTR traces or debugging printfs to try to figure out what sequence of events is happening when (e.g., when the xpt thread kicks off each scan CCB, when xpt_rescan_done() is called, and probably some events in the ahc driver). -- John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 26 05:52:06 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 646F2106566B; Tue, 26 Apr 2011 05:52:06 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.freebsd.org (Postfix) with ESMTP id D8A128FC08; Tue, 26 Apr 2011 05:52:05 +0000 (UTC) Received: from mail2.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p3Q5q4L0018787; Tue, 26 Apr 2011 07:52:04 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail2.siemens.de (8.13.6/8.13.6) with ESMTP id p3Q5q4Yo005703; Tue, 26 Apr 2011 07:52:04 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p3Q5q4Qs039552; Date: Tue, 26 Apr 2011 07:52:04 +0200 From: Andre Albsmeier To: John Baldwin Message-ID: <20110426055204.GA59975@curry.mchp.siemens.de> References: <201102041444.p14EixJP087709@svn.freebsd.org> <201104190920.25924.jhb@freebsd.org> <20110420053226.GA22854@curry.mchp.siemens.de> <201104251703.18518.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104251703.18518.jhb@freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable-7@freebsd.org" , "scsi@freebsd.org" Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 05:52:06 -0000 On Mon, 25-Apr-2011 at 23:03:18 +0200, John Baldwin wrote: > On Wednesday, April 20, 2011 1:32:26 am Andre Albsmeier wrote: > > On Tue, 19-Apr-2011 at 15:20:25 +0200, John Baldwin wrote: > > > On Tuesday, April 19, 2011 8:56:48 am Andre Albsmeier wrote: > > > > On Mon, 18-Apr-2011 at 15:18:25 +0200, John Baldwin wrote: > > > > > On Monday, April 18, 2011 7:36:57 am Andre Albsmeier wrote: > > > > > > On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote: > > > > > > > On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote: > > > > > > > > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote: > > > > > > > > > Author: jhb > > > > > > > > > Date: Fri Feb 4 14:44:59 2011 > > > > > > > > > New Revision: 218277 > > > > > > > > > URL: http://svn.freebsd.org/changeset/base/218277 > > > > > > > > > > > > > > > > > > Log: > > > > > > > > > MFC 217075: > > > > > > > > > Retire PCONFIG and leave the priority of thread0 alone when > waiting for > > > > > > > > > interrupt config hooks to execute. > > > > > > > > > > > > > > > > > > To preserve the KBI, I did not renumber priorities but > simply removed > > > > > > > > > PCONFIG. > > > > > > > > > > > > > > > > > > Modified: > > > > > > > > > stable/7/sys/kern/subr_autoconf.c > > > > > > > > > stable/7/sys/sys/priority.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/kern/subr_autoconf.c > > > > > > > > > > > > > > > > > ============================================================================== > > > > > > > > > --- stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:42 > 2011 > > > > > > > (r218276) > > > > > > > > > +++ stable/7/sys/kern/subr_autoconf.c Fri Feb 4 14:44:59 > 2011 > > > > > > > (r218277) > > > > > > > > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy) > > > > > > > > > warned = 0; > > > > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > > > > if (msleep(&intr_config_hook_list, > &intr_config_hook_lock, > > > > > > > > > - PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > > > + 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > > > EWOULDBLOCK) { > > > > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > > > > warned++; > > > > > > > > > > > > > > > > > > > > > > > > This broke several of my machines in a somewhat strange way: > > > > > > > > > > > > > > > > After upgrading them (17) to a recent 7-STABLE (as of > 2011-04-12) > > > > > > > > I noticed that some (4) of them didn't start. All 4 didn't find > > > > > > > > their boot device anymore. What they all got in common is: > > > > > > > > > > > > > > > > - an Adaptec 2940 Ultra SCSI adapter > > > > > > > > - two SCSI harddisks (da0 and da1) of various brands > > > > > > > > - one SCSI CDROM drive (cd0) > > > > > > > > > > > > > > > > To be exact, none of the three devices (da0, da1, cd0) were > > > > > > > > detected at all. Other machines with a similar configuration > > > > > > > > (2940 and da0/da1) but _without_ the CDROM drive didn't have > > > > > > > > any problems. So I simply removed the CDROM drives on the 4 > > > > > > > > machines in question and they all booted again. > > > > > > > > > > > > > > > > Today I decided to dig into this and after reverting(*) the > > > > > > > > above change, they worked with the CDROM again. I have cross- > > > > > > > > checked it 3 times. No idea what's happening here... > > > > > > > > > > > > > > > > -Andre > > > > > > > > > > > > > > > > (*) To be honest, I use this patch so I had to modify only one > file: > > > > > > > > > > > > > > > > --- sys/kern/subr_autoconf.c.ORI 2011-02-05 13:14:11.000000000 > +0100 > > > > > > > > +++ sys/kern/subr_autoconf.c 2011-04-15 14:34:31.000000000 > +0200 > > > > > > > > @@ -108,7 +108,7 @@ > > > > > > > > warned = 0; > > > > > > > > while (!TAILQ_EMPTY(&intr_config_hook_list)) { > > > > > > > > if (msleep(&intr_config_hook_list, &intr_config_hook_lock, > > > > > > > > - 0, "conifhk", WARNING_INTERVAL_SECS * hz) == > > > > > > > > + PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * > hz) == > > > > > > > > EWOULDBLOCK) { > > > > > > > > mtx_unlock(&intr_config_hook_lock); > > > > > > > > warned++; > > > > > > > > > > > > > > Do you get any warnings about CAM timeouts, etc. when these probe? > A verbose > > > > > > > dmesg might be nice to look at if possible. > > > > > > > > > > > > OK, I have set up a machine for testing. In my other mail > > > > > > I was wrong saying that the pass devices appear when using > > > > > > the problematic kernel... > > > > > > > > > > > > Here are the dmesgs: > > > > > > > > > > > > - dmesg_bad is the original kernel as of Friday > > > > > > - dmesg_ok is the patched kernel (see above) as of Friday > > > > > > - dmesg.diff is the diff between both > > > > > > > > > > > > If you want me to try something just tell me... > > > > > > > > > > Hmmm, what if you make SCSI_DELAY larger? Also, can you let it fail > the > > > > > mount and drop into ddb and then get 'ps' output? > > > > > > > > As soon as I include the debugger into the kernel the problem > > > > is gone. I have double-checked it two times now: With debugger > > > > the drives are detected, without debugger mostly (but not always) > > > > not. > > > > > > > > I currently have it running in an endless rebooting loop hoping, > > > > that it fails eventually... > > > > > > Hummm. This seems like it is a timing related race. :( > > > > Success! Sometimes at night it finally panic'ed even with the > > debugger in the kernel. Here is the output of 'ps' and some other > > commands I remembered (no idea if any of these make sense in this > > context :-)). It is still in this state with the serial console > > attached so just tell me what to type ;-). > > > > > > KDB: enter: manual escape to debugger > > [thread pid 1 tid 100001 ] > > Stopped at kdb_enter_why+0x3b: xorl %eax,%eax > > db> ps > > pid ppid pgrp uid state wmesg wchan cmd > > 35 0 0 0 RL [softdepflush] > > 34 0 0 0 RL [syncer] > > 33 0 0 0 RL [vnlru] > > 32 0 0 0 RL [bufdaemon] > > 31 0 0 0 RL [pagezero] > > 30 0 0 0 RL [idlepoll] > > 29 0 0 0 RL [vmdaemon] > > 28 0 0 0 RL [pagedaemon] > > 27 0 0 0 WL [irq1: atkbd0] > > 26 0 0 0 WL [swi0: uart uart] > > 25 0 0 0 SL - 0xc182a63c [fdc0] > > 24 0 0 0 SL idle 0xc1829600 [aic_recovery0] > > 23 0 0 0 WL [irq11: ahc0] > > 22 0 0 0 SL idle 0xc1829600 [aic_recovery0] > > 21 0 0 0 WL [irq10: fxp0] > > 20 0 0 0 WL [irq9: acpi0 intsmb0] > > 19 0 0 0 SL - 0xc181b800 [kqueue taskq] > > 18 0 0 0 WL [swi6: task queue] > > 17 0 0 0 WL [swi6: Giant taskq] > > --More-- 9 0 0 0 RL [thread > taskq] > > 16 0 0 0 WL [swi5: Fast task queue] > > 15 0 0 0 WL [swi2: cambio] > > 8 0 0 0 SL ccb_scan 0xc0766714 [xpt_thrd] > > 7 0 0 0 SL - 0xc181bd80 [acpi_task_2] > > 6 0 0 0 SL - 0xc181bd80 [acpi_task_1] > > 5 0 0 0 SL - 0xc181bd80 [acpi_task_0] > > 14 0 0 0 SL - 0xc077be54 [yarrow] > > 4 0 0 0 SL - 0xc077942c [g_down] > > 3 0 0 0 SL - 0xc0779428 [g_up] > > 2 0 0 0 SL - 0xc0779420 [g_event] > > 13 0 0 0 WL [swi3: vm] > > 12 0 0 0 LL *Giant 0xc1821dc0 [swi4: clock] > > 11 0 0 0 WL [swi1: net] > > 10 0 0 0 RL [idle] > > 1 0 0 0 RL CPU 0 [swapper] > > 0 0 0 0 SLs sched 0xc07794c0 [swapper] > > Hummm, I don't see any "important" threads in a runnable state that I > would think were denied the ability to run by the priority change. I wonder > what callout swi4 is trying to run (or what other callouts might be > stuck waiting for Giant). I'd be tempted to add some KTR traces or > debugging printfs to try to figure out what sequence of events is > happening when (e.g., when the xpt thread kicks off each scan CCB, when > xpt_rescan_done() is called, and probably some events in the ahc driver). I am happy to try whatever you suggest ;-) But I don't want to steel too much of your time -- it seems that by reverting the initial commit everythings runs fine for me and I can easily live with that... Thanks, -Andre > > -- > John Baldwin -- UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a bootsector virus. From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 26 13:09:55 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EE36106564A; Tue, 26 Apr 2011 13:09:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F5B58FC12; Tue, 26 Apr 2011 13:09: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 p3QD9tdv023759; Tue, 26 Apr 2011 13:09:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QD9tHn023757; Tue, 26 Apr 2011 13:09:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201104261309.p3QD9tHn023757@svn.freebsd.org> From: Glen Barber Date: Tue, 26 Apr 2011 13:09: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: r221065 - stable/7/lib/libc/sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 13:09:55 -0000 Author: gjb (doc committer) Date: Tue Apr 26 13:09:54 2011 New Revision: 221065 URL: http://svn.freebsd.org/changeset/base/221065 Log: MFC 220975: - Clarification on kld_file_stat.size - While here, remove a few C comments that don't seem to contribute anything additional to the man page. PR: 146047 Modified: stable/7/lib/libc/sys/kldstat.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/kldstat.2 ============================================================================== --- stable/7/lib/libc/sys/kldstat.2 Tue Apr 26 13:09:19 2011 (r221064) +++ stable/7/lib/libc/sys/kldstat.2 Tue Apr 26 13:09:54 2011 (r221065) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 1999 +.Dd April 23, 2011 .Dt KLDSTAT 2 .Os .Sh NAME @@ -51,8 +51,8 @@ struct kld_file_stat { char name[MAXPATHLEN]; int refs; int id; - caddr_t address; /* load address */ - size_t size; /* size in bytes */ + caddr_t address; + size_t size; }; .Ed .Pp @@ -76,7 +76,7 @@ The id of the file specified in .It address The load address of the kld file. .It size -The size of the file. +The amount of memory in bytes allocated by the file. .El .Sh RETURN VALUES .Rv -std kldstat From owner-svn-src-stable-7@FreeBSD.ORG Tue Apr 26 22:16:23 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3450B106564A; Tue, 26 Apr 2011 22:16:23 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B27F8FC18; Tue, 26 Apr 2011 22:16:23 +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 p3QMGMtS041119; Tue, 26 Apr 2011 22:16:22 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMGMfi041115; Tue, 26 Apr 2011 22:16:22 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201104262216.p3QMGMfi041115@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 26 Apr 2011 22:16:22 +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: r221094 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 22:16:23 -0000 Author: edwin Date: Tue Apr 26 22:16:22 2011 New Revision: 221094 URL: http://svn.freebsd.org/changeset/base/221094 Log: MFC of 221092, tzdata2011g - Egypt has cancelled the move to DST for now. Modified: stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/southamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Tue Apr 26 22:15:32 2011 (r221093) +++ stable/7/share/zoneinfo/africa Tue Apr 26 22:16:22 2011 (r221094) @@ -1,5 +1,5 @@ #
-# @(#)africa	8.30
+# @(#)africa	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@ Rule	Egypt	1989	only	-	May	 6	1:00	1:00	
 Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule	Egypt	1995	max	-	Apr	lastFri	 0:00s	1:00	S
+
+# From Alexander Krivenyshev (2011-04-20):
+# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation."
+#
+# Egypt to cancel daylight saving time
+# 
+# http://www.almasryalyoum.com/en/node/407168
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# 
+Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@ Rule	Egypt	2008	only	-	Aug	lastThu	23:00
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
-Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Tue Apr 26 22:15:32 2011	(r221093)
+++ stable/7/share/zoneinfo/europe	Tue Apr 26 22:16:22 2011	(r221094)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.31
+# @(#)europe	8.32
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -146,7 +146,7 @@
 # A monument to Willett was unveiled on 1927-05-21, in an open space in
 # a 45-acre wood near Chislehurst, Kent that was purchased by popular
 # subscription and open to the public.  On the south face of the monolith,
-# designed by G. W. Miller, is the the William Willett Memorial Sundial,
+# designed by G. W. Miller, is the...William Willett Memorial Sundial,
 # which is permanently set to Summer Time.
 
 # From Winston Churchill (1934-04-28):
@@ -1786,7 +1786,7 @@ Zone	Europe/Oslo	0:43:00 -	LMT	1895 Jan 
 #
 # All these events predate our cutoff date of 1970.  Unless we can
 # come up with more definitive info about the timekeeping during the
-# war years it's probably best just do do the following for now:
+# war years it's probably best just do...the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Tue Apr 26 22:15:32 2011	(r221093)
+++ stable/7/share/zoneinfo/southamerica	Tue Apr 26 22:16:22 2011	(r221094)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.48
+# @(#)southamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -745,7 +745,7 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # As a result of the above Decree I believe the America/Rio_Branco
 # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
-# be created to represent the the west side of the Para State. I
+# be created to represent the...west side of the Para State. I
 # suggest this new timezone be called Santarem as the most
 # important/populated city in the affected area.
 #

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Apr 27 21:13:41 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6B461106564A;
	Wed, 27 Apr 2011 21:13:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5860D8FC12;
	Wed, 27 Apr 2011 21:13: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 p3RLDfox090523;
	Wed, 27 Apr 2011 21:13:41 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLDfPe090517;
	Wed, 27 Apr 2011 21:13:41 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104272113.p3RLDfPe090517@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 21:13:41 +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: r221141 - in stable/7/sys/dev: acpica pci
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 27 Apr 2011 21:13:41 -0000

Author: jhb
Date: Wed Apr 27 21:13:40 2011
New Revision: 221141
URL: http://svn.freebsd.org/changeset/base/221141

Log:
  MFC 210864:
  - Retire acpi_pcib_resume().  It is has just been an alias for
    bus_generic_resume() since the pci_link(4) driver was added.
  - Change the ACPI PCI-PCI bridge driver to inherit most of its methods
    from the generic PCI-PCI bridge driver.
  - This also exposes the generic PCI-PCI bridge driver as pcib_driver so
    other drivers can inherit from it.

Modified:
  stable/7/sys/dev/acpica/acpi_pcib.c
  stable/7/sys/dev/acpica/acpi_pcib_acpi.c
  stable/7/sys/dev/acpica/acpi_pcib_pci.c
  stable/7/sys/dev/acpica/acpi_pcibvar.h
  stable/7/sys/dev/pci/pcib_private.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/acpica/acpi_pcib.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcib.c	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcib.c	Wed Apr 27 21:13:40 2011	(r221141)
@@ -170,13 +170,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFF
     return_VALUE (bus_generic_attach(dev));
 }
 
-int
-acpi_pcib_resume(device_t dev)
-{
-
-    return (bus_generic_resume(dev));
-}
-
 static void
 prt_lookup_device(ACPI_PCI_ROUTING_TABLE *entry, void *arg)
 {

Modified: stable/7/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 27 21:13:40 2011	(r221141)
@@ -63,7 +63,6 @@ struct acpi_hpcib_softc {
 
 static int		acpi_pcib_acpi_probe(device_t bus);
 static int		acpi_pcib_acpi_attach(device_t bus);
-static int		acpi_pcib_acpi_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_write_ivar(device_t dev, device_t child,
@@ -91,7 +90,7 @@ static device_method_t acpi_pcib_acpi_me
     DEVMETHOD(device_attach,		acpi_pcib_acpi_attach),
     DEVMETHOD(device_shutdown,		bus_generic_shutdown),
     DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_acpi_resume),
+    DEVMETHOD(device_resume,		bus_generic_resume),
 
     /* Bus interface */
     DEVMETHOD(bus_print_child,		bus_generic_print_child),
@@ -250,13 +249,6 @@ acpi_pcib_acpi_attach(device_t dev)
     return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
 }
 
-static int
-acpi_pcib_acpi_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
 /*
  * Support for standard PCI bridge ivars.
  */

Modified: stable/7/sys/dev/acpica/acpi_pcib_pci.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcib_pci.c	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcib_pci.c	Wed Apr 27 21:13:40 2011	(r221141)
@@ -63,7 +63,6 @@ struct acpi_pcib_lookup_info {
 
 static int		acpi_pcib_pci_probe(device_t bus);
 static int		acpi_pcib_pci_attach(device_t bus);
-static int		acpi_pcib_pci_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_pci_route_interrupt(device_t pcib,
@@ -73,39 +72,20 @@ static device_method_t acpi_pcib_pci_met
     /* Device interface */
     DEVMETHOD(device_probe,		acpi_pcib_pci_probe),
     DEVMETHOD(device_attach,		acpi_pcib_pci_attach),
-    DEVMETHOD(device_shutdown,		bus_generic_shutdown),
-    DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_pci_resume),
 
     /* Bus interface */
-    DEVMETHOD(bus_print_child,		bus_generic_print_child),
     DEVMETHOD(bus_read_ivar,		acpi_pcib_read_ivar),
-    DEVMETHOD(bus_write_ivar,		pcib_write_ivar),
-    DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-    DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-    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),
 
     /* pcib interface */
-    DEVMETHOD(pcib_maxslots,		pcib_maxslots),
-    DEVMETHOD(pcib_read_config,		pcib_read_config),
-    DEVMETHOD(pcib_write_config,	pcib_write_config),
     DEVMETHOD(pcib_route_interrupt,	acpi_pcib_pci_route_interrupt),
-    DEVMETHOD(pcib_alloc_msi,		pcib_alloc_msi),
-    DEVMETHOD(pcib_release_msi,		pcib_release_msi),
-    DEVMETHOD(pcib_alloc_msix,		pcib_alloc_msix),
-    DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-    DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
     {0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
-    sizeof(struct acpi_pcib_softc));
+DEFINE_CLASS_1(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
+    sizeof(struct acpi_pcib_softc), pcib_driver);
 DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0);
 MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
 
@@ -140,13 +120,6 @@ acpi_pcib_pci_attach(device_t dev)
 }
 
 static int
-acpi_pcib_pci_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
-static int
 acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
 {
     struct acpi_pcib_softc *sc = device_get_softc(dev);

Modified: stable/7/sys/dev/acpica/acpi_pcibvar.h
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcibvar.h	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcibvar.h	Wed Apr 27 21:13:40 2011	(r221141)
@@ -31,13 +31,14 @@
 #define	_ACPI_PCIBVAR_H_
 
 #ifdef _KERNEL
+
 void	acpi_pci_link_add_reference(device_t dev, int index, device_t pcib,
     int slot, int pin);
 int	acpi_pci_link_route_interrupt(device_t dev, int index);
 int	acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno);
 int	acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
     ACPI_BUFFER *prtbuf);
-int	acpi_pcib_resume(device_t dev);
+
 #endif /* _KERNEL */
 
 #endif /* !_ACPI_PCIBVAR_H_ */

Modified: stable/7/sys/dev/pci/pcib_private.h
==============================================================================
--- stable/7/sys/dev/pci/pcib_private.h	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/pci/pcib_private.h	Wed Apr 27 21:13:40 2011	(r221141)
@@ -37,6 +37,7 @@
  * Export portions of generic PCI:PCI bridge support so that it can be
  * used by subclasses.
  */
+DECLARE_CLASS(pcib_driver);
 
 /*
  * Bridge-specific data.

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Apr 28 14:42:56 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 06E271065697;
	Thu, 28 Apr 2011 14:42:56 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E8C438FC16;
	Thu, 28 Apr 2011 14:42: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 p3SEgtWv027449;
	Thu, 28 Apr 2011 14:42:55 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEgtIx027447;
	Thu, 28 Apr 2011 14:42:55 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <201104281442.p3SEgtIx027447@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 28 Apr 2011 14:42:55 +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: r221169 - stable/7/sys/dev/mxge
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 28 Apr 2011 14:42:56 -0000

Author: gallatin
Date: Thu Apr 28 14:42:55 2011
New Revision: 221169
URL: http://svn.freebsd.org/changeset/base/221169

Log:
  MFC r220385: Implement mxge_init()
  
    This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
    did not bring the interface into a RUNNING state, like it does on
    most (all?) other FreeBSD NIC drivers.
  
    Thanks to gnn for mentioning the bug, and yongari for pointing out that
    ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.

Modified:
  stable/7/sys/dev/mxge/if_mxge.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/mxge/if_mxge.c
==============================================================================
--- stable/7/sys/dev/mxge/if_mxge.c	Thu Apr 28 14:42:42 2011	(r221168)
+++ stable/7/sys/dev/mxge/if_mxge.c	Thu Apr 28 14:42:55 2011	(r221169)
@@ -2867,6 +2867,14 @@ mxge_intr(void *arg)
 static void
 mxge_init(void *arg)
 {
+	mxge_softc_t *sc = arg;
+	struct ifnet *ifp = sc->ifp;
+
+
+	mtx_lock(&sc->driver_mtx);
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+		(void) mxge_open(sc);
+	mtx_unlock(&sc->driver_mtx);
 }
 
 

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Apr 28 14:55:43 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DFF5A1065768;
	Thu, 28 Apr 2011 14:55:43 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2BAEF8FC0C;
	Thu, 28 Apr 2011 14:55: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 p3SEtgfh028069;
	Thu, 28 Apr 2011 14:55:42 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEtgOM028068;
	Thu, 28 Apr 2011 14:55:42 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <201104281455.p3SEtgOM028068@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 28 Apr 2011 14:55:42 +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: r221172 - stable/7/sys/dev/mxge
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 28 Apr 2011 14:55:44 -0000

Author: gallatin
Date: Thu Apr 28 14:55:41 2011
New Revision: 221172
URL: http://svn.freebsd.org/changeset/base/221172

Log:
  MFC r220424:
    Fix a bug in mxge's LRO which can cause dup acks to
    get aggregated & hence prevent TCP from entering
    fast retransmit.
  
    Pointed out by: jeff
    Reviewed by: gnn

Modified:
  stable/7/sys/dev/mxge/mxge_lro.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/mxge/mxge_lro.c
==============================================================================
--- stable/7/sys/dev/mxge/mxge_lro.c	Thu Apr 28 14:55:34 2011	(r221171)
+++ stable/7/sys/dev/mxge/mxge_lro.c	Thu Apr 28 14:55:41 2011	(r221172)
@@ -234,8 +234,10 @@ mxge_lro_rx(struct mxge_slice_state *ss,
 		    lro->dest_ip == ip->ip_dst.s_addr) {
 			/* Try to append it */
 
-			if (__predict_false(seq != lro->next_seq)) {
-				/* out of order packet */
+			if (__predict_false(seq != lro->next_seq ||
+				    (tcp_data_len == 0 &&
+				     lro->ack_seq == tcp->th_ack))) {
+				/* out of order packet or dup ack */
 				SLIST_REMOVE(&ss->lro_active, lro,
 					     lro_entry, next);
 				mxge_lro_flush(ss, lro);

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Apr 28 19:00:48 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DAB6B1065673;
	Thu, 28 Apr 2011 19:00:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C87728FC1F;
	Thu, 28 Apr 2011 19:00:48 +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 p3SJ0ms8049192;
	Thu, 28 Apr 2011 19:00:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SJ0mOR049189;
	Thu, 28 Apr 2011 19:00:48 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281900.p3SJ0mOR049189@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 19:00:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221180 - stable/7/sys/dev/ata
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 28 Apr 2011 19:00:49 -0000

Author: jhb
Date: Thu Apr 28 19:00:48 2011
New Revision: 221180
URL: http://svn.freebsd.org/changeset/base/221180

Log:
  MFC 191897:
  Add ID of one more SII3132 revision found on adaptec aar-1225sa rev a2.

Modified:
  stable/7/sys/dev/ata/ata-chipset.c
  stable/7/sys/dev/ata/ata-pci.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/ata/ata-chipset.c
==============================================================================
--- stable/7/sys/dev/ata/ata-chipset.c	Thu Apr 28 17:59:33 2011	(r221179)
+++ stable/7/sys/dev/ata/ata-chipset.c	Thu Apr 28 19:00:48 2011	(r221180)
@@ -4623,6 +4623,7 @@ ata_sii_ident(device_t dev)
      { ATA_SII3124,   0x00, SIIPRBIO, SII4CH,    ATA_SA300, "SiI 3124" },
      { ATA_SII3132,   0x00, SIIPRBIO, 0,         ATA_SA300, "SiI 3132" },
      { ATA_SII3132_1, 0x00, SIIPRBIO, 0,         ATA_SA300, "SiI 3132" },
+     { ATA_SII3132_2, 0x00, SIIPRBIO, 0,         ATA_SA300, "SiI 3132" },
      { ATA_SII0680,   0x00, SIIMEMIO, SIISETCLK, ATA_UDMA6, "SiI 0680" },
      { ATA_CMD649,    0x00, 0,        SIIINTR,   ATA_UDMA5, "CMD 649" },
      { ATA_CMD648,    0x00, 0,        SIIINTR,   ATA_UDMA4, "CMD 648" },

Modified: stable/7/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/7/sys/dev/ata/ata-pci.h	Thu Apr 28 17:59:33 2011	(r221179)
+++ stable/7/sys/dev/ata/ata-pci.h	Thu Apr 28 19:00:48 2011	(r221180)
@@ -343,6 +343,7 @@ struct ata_connect_task {
 #define ATA_SII3124		0x31241095
 #define ATA_SII3132		0x31321095
 #define ATA_SII3132_1		0x02421095
+#define ATA_SII3132_2		0x02441095
 #define ATA_SII0680             0x06801095
 #define ATA_CMD646              0x06461095
 #define ATA_CMD648              0x06481095

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Apr 28 19:08:31 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ECDA3106566C;
	Thu, 28 Apr 2011 19:08:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DAA1E8FC0A;
	Thu, 28 Apr 2011 19: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 p3SJ8V84050444;
	Thu, 28 Apr 2011 19:08:31 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SJ8Vdq050442;
	Thu, 28 Apr 2011 19:08:31 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281908.p3SJ8Vdq050442@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 19:08:31 +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: r221181 - stable/7/sys/dev/puc
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 28 Apr 2011 19:08:32 -0000

Author: jhb
Date: Thu Apr 28 19:08:31 2011
New Revision: 221181
URL: http://svn.freebsd.org/changeset/base/221181

Log:
  MFC 186520:
  Add support for the Oxford OX16PCI958-based card.

Modified:
  stable/7/sys/dev/puc/pucdata.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/puc/pucdata.c
==============================================================================
--- stable/7/sys/dev/puc/pucdata.c	Thu Apr 28 19:00:48 2011	(r221180)
+++ stable/7/sys/dev/puc/pucdata.c	Thu Apr 28 19:08:31 2011	(r221181)
@@ -632,6 +632,12 @@ const struct puc_cfg puc_pci_devices[] =
 	    PUC_PORT_2S, 0x10, 4, 0,
 	},
 
+	{   0x1415, 0x9538, 0xffff, 0,
+	    "Oxford Semiconductor OX16PCI958 UARTs",
+	    DEFAULT_RCLK * 10,
+	    PUC_PORT_8S, 0x18, 0, 8,
+	},
+
 	/*
 	 * Perle boards use Oxford Semiconductor chips, but they store the
 	 * Oxford Semiconductor device ID as a subvendor device ID and use

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 29 05:00:48 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 969551065674;
	Fri, 29 Apr 2011 05:00:48 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 795138FC1F;
	Fri, 29 Apr 2011 05:00:48 +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 p3T50mLI084314;
	Fri, 29 Apr 2011 05:00:48 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T50mGX084312;
	Fri, 29 Apr 2011 05:00:48 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <201104290500.p3T50mGX084312@svn.freebsd.org>
From: Takahashi Yoshihiro 
Date: Fri, 29 Apr 2011 05:00:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221197 - stable/7/sys/pc98/pc98
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 29 Apr 2011 05:00:48 -0000

Author: nyan
Date: Fri Apr 29 05:00:48 2011
New Revision: 221197
URL: http://svn.freebsd.org/changeset/base/221197

Log:
  MFC: revision 218390
  
    Clear the padding when returning context to the usermode, for
    MI ucontext_t and x86 MD parts.

Modified:
  stable/7/sys/pc98/pc98/machdep.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/pc98/pc98/machdep.c
==============================================================================
--- stable/7/sys/pc98/pc98/machdep.c	Fri Apr 29 03:20:51 2011	(r221196)
+++ stable/7/sys/pc98/pc98/machdep.c	Fri Apr 29 05:00:48 2011	(r221197)
@@ -309,12 +309,14 @@ osendsig(sig_t catcher, ksiginfo_t *ksi,
 	/* Build the argument list for the signal handler. */
 	sf.sf_signum = sig;
 	sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc;
+	bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo));
 	if (SIGISMEMBER(psp->ps_siginfo, sig)) {
 		/* Signal handler installed with SA_SIGINFO. */
 		sf.sf_arg2 = (register_t)&fp->sf_siginfo;
 		sf.sf_siginfo.si_signo = sig;
 		sf.sf_siginfo.si_code = ksi->ksi_code;
 		sf.sf_ahu.sf_action = (__osiginfohandler_t *)catcher;
+		sf.sf_addr = 0;
 	} else {
 		/* Old FreeBSD-style arguments. */
 		sf.sf_arg2 = ksi->ksi_code;
@@ -428,6 +430,11 @@ freebsd4_sendsig(sig_t catcher, ksiginfo
 	sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
 	sf.sf_uc.uc_mcontext.mc_gs = rgs();
 	bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs));
+	bzero(sf.sf_uc.uc_mcontext.mc_fpregs,
+	    sizeof(sf.sf_uc.uc_mcontext.mc_fpregs));
+	bzero(sf.sf_uc.uc_mcontext.__spare__,
+	    sizeof(sf.sf_uc.uc_mcontext.__spare__));
+	bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
 	/* Allocate space for the signal handler context. */
 	if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
@@ -447,6 +454,7 @@ freebsd4_sendsig(sig_t catcher, ksiginfo
 	/* Build the argument list for the signal handler. */
 	sf.sf_signum = sig;
 	sf.sf_ucontext = (register_t)&sfp->sf_uc;
+	bzero(&sf.sf_si, sizeof(sf.sf_si));
 	if (SIGISMEMBER(psp->ps_siginfo, sig)) {
 		/* Signal handler installed with SA_SIGINFO. */
 		sf.sf_siginfo = (register_t)&sfp->sf_si;
@@ -563,6 +571,11 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */
 	get_fpcontext(td, &sf.sf_uc.uc_mcontext);
 	fpstate_drop(td);
+	bzero(sf.sf_uc.uc_mcontext.mc_spare1,
+	    sizeof(sf.sf_uc.uc_mcontext.mc_spare1));
+	bzero(sf.sf_uc.uc_mcontext.mc_spare2,
+	    sizeof(sf.sf_uc.uc_mcontext.mc_spare2));
+	bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
 	/* Allocate space for the signal handler context. */
 	if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
@@ -584,6 +597,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	/* Build the argument list for the signal handler. */
 	sf.sf_signum = sig;
 	sf.sf_ucontext = (register_t)&sfp->sf_uc;
+	bzero(&sf.sf_si, sizeof(sf.sf_si));
 	if (SIGISMEMBER(psp->ps_siginfo, sig)) {
 		/* Signal handler installed with SA_SIGINFO. */
 		sf.sf_siginfo = (register_t)&sfp->sf_si;
@@ -2163,7 +2177,7 @@ init386(first)
 	_udatasel = GSEL(GUDATA_SEL, SEL_UPL);
 
 	/* setup proc 0's pcb */
-	thread0.td_pcb->pcb_flags = 0; /* XXXKSE */
+	thread0.td_pcb->pcb_flags = 0;
 	thread0.td_pcb->pcb_cr3 = (int)IdlePTD;
 	thread0.td_pcb->pcb_ext = 0;
 	thread0.td_frame = &proc0_tf;
@@ -2455,6 +2469,8 @@ get_mcontext(struct thread *td, mcontext
 	mcp->mc_ss = tp->tf_ss;
 	mcp->mc_len = sizeof(*mcp);
 	get_fpcontext(td, mcp);
+	bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1));
+	bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2));
 	return (0);
 }
 
@@ -2502,6 +2518,7 @@ get_fpcontext(struct thread *td, mcontex
 #ifndef DEV_NPX
 	mcp->mc_fpformat = _MC_FPFMT_NODEV;
 	mcp->mc_ownedfp = _MC_FPOWNED_NONE;
+	bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate));
 #else
 	union savefpu *addr;
 

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 29 10:33:55 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5303A106566C;
	Fri, 29 Apr 2011 10:33:55 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 421378FC08;
	Fri, 29 Apr 2011 10:33: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 p3TAXtsL095573;
	Fri, 29 Apr 2011 10:33:55 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TAXt5L095571;
	Fri, 29 Apr 2011 10:33:55 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201104291033.p3TAXt5L095571@svn.freebsd.org>
From: Gavin Atkinson 
Date: Fri, 29 Apr 2011 10:33:55 +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: r221204 - stable/7/sys/geom/part
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 29 Apr 2011 10:33:55 -0000

Author: gavin
Date: Fri Apr 29 10:33:54 2011
New Revision: 221204
URL: http://svn.freebsd.org/changeset/base/221204

Log:
  Merge r220652 from head:
  
    Remove an incorrect be16toh() that prevented geom_part_apm from working on
    little-endian machines.

Modified:
  stable/7/sys/geom/part/g_part_apm.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/geom/part/g_part_apm.c
==============================================================================
--- stable/7/sys/geom/part/g_part_apm.c	Fri Apr 29 10:28:55 2011	(r221203)
+++ stable/7/sys/geom/part/g_part_apm.c	Fri Apr 29 10:33:54 2011	(r221204)
@@ -343,7 +343,7 @@ g_part_apm_probe(struct g_part_table *ba
 	buf = g_read_data(cp, 0L, pp->sectorsize, &error);
 	if (buf == NULL)
 		return (error);
-	if (be16dec(buf) == be16toh(APM_DDR_SIG)) {
+	if (be16dec(buf) == APM_DDR_SIG) {
 		/* Normal Apple DDR */
 		table->ddr.ddr_sig = be16dec(buf);
 		table->ddr.ddr_blksize = be16dec(buf + 2);

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 29 20:44:40 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FC671065672;
	Fri, 29 Apr 2011 20:44:40 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E3548FC19;
	Fri, 29 Apr 2011 20:44: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 p3TKierO014692;
	Fri, 29 Apr 2011 20:44:40 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TKieag014687;
	Fri, 29 Apr 2011 20:44:40 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292044.p3TKieag014687@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 20:44:40 +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: r221222 - in stable/7/etc: . defaults rc.d
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 29 Apr 2011 20:44:40 -0000

Author: dougb
Date: Fri Apr 29 20:44:39 2011
New Revision: 221222
URL: http://svn.freebsd.org/changeset/base/221222

Log:
  MFC r216744 for rc.d/devd:
  
  Add pidfile [1]
  
  While I'm here, don't run the sysctl frob unconditionally, and
  s/sysctl/$SYSCTL/
  
  MFC r220962:
  
  Introduce to rc.subr get_pidfile_from_conf(). It does just what it sounds
  like, determines the path to a pid file as it is specified in a conf file.
  
  Use the new feature for rc.d/named and rc.d/devd, the 2 services in the
  base that list their pid files in their conf files.
  
  Remove the now-obsolete named_pidfile, and warn users if they have it set.
  
  MFC r220963:
  
  Improve the error handling for the new get_pidfile_from_conf()

Modified:
  stable/7/etc/defaults/rc.conf
  stable/7/etc/rc.d/devd
  stable/7/etc/rc.d/named
  stable/7/etc/rc.subr
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/defaults/rc.conf
==============================================================================
--- stable/7/etc/defaults/rc.conf	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/defaults/rc.conf	Fri Apr 29 20:44:39 2011	(r221222)
@@ -247,7 +247,6 @@ named_enable="NO"		# Run named, the DNS 
 named_program="/usr/sbin/named" # Path to named, if you want a different one.
 named_conf="/etc/namedb/named.conf" 	# Path to the configuration file
 #named_flags=""			# Use this for flags OTHER than -u and -c
-named_pidfile="/var/run/named/pid" # Must set this in named.conf as well
 named_uid="bind" 		# User to run named as
 named_chrootdir="/var/named"	# Chroot directory (or "" not to auto-chroot it)
 named_chroot_autoupdate="YES"	# Automatically install/update chrooted

Modified: stable/7/etc/rc.d/devd
==============================================================================
--- stable/7/etc/rc.d/devd	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/rc.d/devd	Fri Apr 29 20:44:39 2011	(r221222)
@@ -14,10 +14,27 @@ name="devd"
 rcvar=`set_rcvar`
 command="/sbin/${name}"
 
+start_precmd=${name}_prestart
+stop_precmd=find_pidfile
+
+find_pidfile()
+{
+	if get_pidfile_from_conf pid-file /etc/devd.conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/${name}.pid"
+	fi
+}
+
+devd_prestart ()
+{
+	find_pidfile
+
+	# If devd is disabled, turn it off in the kernel to avoid memory leaks.
+	if ! checkyesno ${rcvar}; then
+	    $SYSCTL hw.bus.devctl_disable=1
+	fi
+}
+
 load_rc_config $name
 run_rc_command "$1"
-
-# If devd is disabled, turn it off in the kernel to avoid memory leaks.
-if ! checkyesno ${rcvar}; then
-    sysctl hw.bus.devctl_disable=1
-fi

Modified: stable/7/etc/rc.d/named
==============================================================================
--- stable/7/etc/rc.d/named	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/rc.d/named	Fri Apr 29 20:44:39 2011	(r221222)
@@ -112,8 +112,19 @@ named_reload()
 	${command%/named}/rndc reload
 }
 
+find_pidfile()
+{
+	if get_pidfile_from_conf pid-file $named_conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/named/pid"
+	fi
+}
+
 named_stop()
 {
+	find_pidfile
+
 	# This duplicates an undesirably large amount of code from the stop
 	# routine in rc.subr in order to use rndc to shut down the process,
 	# and to give it a second chance in case rndc fails.
@@ -156,6 +167,12 @@ create_file () {
 
 named_prestart()
 {
+	find_pidfile
+
+	if [ -n "$named_pidfile" ]; then
+		warn 'named_pidfile: now determined from the conf file'
+	fi
+
 	command_args="-u ${named_uid:=root}"
 
 	if [ ! "$named_conf" = '/etc/namedb/named.conf' ]; then
@@ -279,7 +296,6 @@ load_rc_config $name
 #
 required_dirs="$named_chrootdir"	# if it is set, it must exist
 
-pidfile="${named_pidfile:-/var/run/named/pid}"
 named_confdir="${named_chrootdir}${named_conf%/*}"
 
 run_rc_command "$1"

Modified: stable/7/etc/rc.subr
==============================================================================
--- stable/7/etc/rc.subr	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/rc.subr	Fri Apr 29 20:44:39 2011	(r221222)
@@ -372,6 +372,48 @@ wait_for_pids()
 }
 
 #
+# get_pidfile_from_conf string file
+#
+#	Takes a string to search for in the specified file.
+#	Ignores lines with traditional comment characters.
+#
+# Example:
+#
+# if get_pidfile_from_conf string file; then
+#	pidfile="$_pidfile_from_conf"
+# else
+#	pidfile='appropriate default'
+# fi
+#
+get_pidfile_from_conf()
+{
+	if [ -z "$1" -o -z "$2" ]; then
+		err 3 "USAGE: get_pidfile_from_conf string file ($name)"
+	fi
+
+	local string file line
+
+	string="$1" ; file="$2"
+
+	if [ ! -s "$file" ]; then
+		err 3 "get_pidfile_from_conf: $file does not exist ($name)"
+	fi
+
+	while read line; do
+		case "$line" in
+		*[#\;]*${string}*)	continue ;;
+		*${string}*)		break ;;
+		esac
+	done < $file
+
+	if [ -n "$line" ]; then
+		line=${line#*/}
+		_pidfile_from_conf="/${line%%[\"\;]*}"
+	else
+		return 1
+	fi
+}
+
 # run_rc_command argument
 #	Search for argument in the list of supported commands, which is:
 #		"start stop restart rcvar status poll ${extra_commands}"

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 29 20:55:15 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D9EDF106564A;
	Fri, 29 Apr 2011 20:55:15 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C94838FC12;
	Fri, 29 Apr 2011 20:55:15 +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 p3TKtFxU015145;
	Fri, 29 Apr 2011 20:55:15 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TKtFUN015143;
	Fri, 29 Apr 2011 20:55:15 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292055.p3TKtFUN015143@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 20:55:15 +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: r221224 - stable/7/etc/rc.d
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 29 Apr 2011 20:55:16 -0000

Author: dougb
Date: Fri Apr 29 20:55:15 2011
New Revision: 221224
URL: http://svn.freebsd.org/changeset/base/221224

Log:
  MFC r192246:
  
  do not create and mount new file systems on top of the old ones on every
  invocation of this script once we already have one
  (in case tmpmfs="YES").
  
  MFC r221007:
  
  Create a function for the code from r192246 so that it can be used both
  times mount is called.
  
  Limit the automatic behavior to when AUTO is specified (as it is in
  etc/defaults/rc.conf) and for everything else take advantage of all
  of the goodness in checkyesno.

Modified:
  stable/7/etc/rc.d/tmp
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/rc.d/tmp
==============================================================================
--- stable/7/etc/rc.d/tmp	Fri Apr 29 20:46:09 2011	(r221223)
+++ stable/7/etc/rc.d/tmp	Fri Apr 29 20:55:15 2011	(r221224)
@@ -37,18 +37,20 @@ stop_cmd=':'
 
 load_rc_config $name
 
+mount_tmpmfs ()
+{
+	if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then
+		mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
+		chmod 01777 /tmp
+	fi
+}
+
 # If we do not have a writable /tmp, create a memory
 # filesystem for /tmp.  If /tmp is a symlink (e.g. to /var/tmp,
 # then it should already be writable).
 #
 case "${tmpmfs}" in
-[Yy][Ee][Ss])
-	mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-	chmod 01777 /tmp
-	;;
-[Nn][Oo])
-	;;
-*)
+[Aa][Uu][Tt][Oo])
 	if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
 		rmdir ${_tmpdir}
 	else
@@ -57,9 +59,13 @@ case "${tmpmfs}" in
 			echo "dropping into shell, ^D to continue anyway."
 			/bin/sh
 		else
-			mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-			chmod 01777 /tmp
+			mount_tmpmfs
 		fi
 	fi
 	;;
+*)
+	if checkyesno tmpmfs; then
+		mount_tmpmfs
+	fi
+	;;
 esac