From owner-svn-src-stable-7@FreeBSD.ORG Mon Feb 28 21:25:35 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 AD5CF106564A; Mon, 28 Feb 2011 21:25:35 +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 9AF3F8FC0A; Mon, 28 Feb 2011 21:25:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1SLPZqO052354; Mon, 28 Feb 2011 21:25:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1SLPZhx052351; Mon, 28 Feb 2011 21:25:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201102282125.p1SLPZhx052351@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 28 Feb 2011 21:25: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: r219105 - in stable/7/sys: dev/re 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: Mon, 28 Feb 2011 21:25:35 -0000 Author: yongari Date: Mon Feb 28 21:25:35 2011 New Revision: 219105 URL: http://svn.freebsd.org/changeset/base/219105 Log: MFC r217857: Prefer MSI-X to MSI on controllers that support MSI-X. All recent PCIe controllers(RTL8102E or later and RTL8168/8111C or later) supports either 2 or 4 MSI-X messages. Unfortunately vendor did not publicly release RSS related information yet. However switching to MSI-X is one-step forward to support RSS. Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Mon Feb 28 21:21:24 2011 (r219104) +++ stable/7/sys/dev/re/if_re.c Mon Feb 28 21:25:35 2011 (r219105) @@ -159,6 +159,8 @@ MODULE_DEPEND(re, miibus, 1, 1, 1); /* Tunables. */ static int msi_disable = 0; TUNABLE_INT("hw.re.msi_disable", &msi_disable); +static int msix_disable = 0; +TUNABLE_INT("hw.re.msix_disable", &msix_disable); static int prefer_iomap = 0; TUNABLE_INT("hw.re.prefer_iomap", &prefer_iomap); @@ -1177,7 +1179,7 @@ re_attach(device_t dev) int hwrev; u_int16_t devid, re_did = 0; int error = 0, i, phy, rid; - int msic, reg; + int msic, msixc, reg; uint8_t cfg; sc = device_get_softc(dev); @@ -1227,18 +1229,51 @@ re_attach(device_t dev) sc->rl_btag = rman_get_bustag(sc->rl_res); sc->rl_bhandle = rman_get_bushandle(sc->rl_res); - msic = 0; - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + msic = pci_msi_count(dev); + msixc = pci_msix_count(dev); + if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) sc->rl_flags |= RL_FLAG_PCIE; - msic = pci_msi_count(dev); - if (bootverbose) - device_printf(dev, "MSI count : %d\n", msic); + if (bootverbose) { + device_printf(dev, "MSI count : %d\n", msic); + device_printf(dev, "MSI-X count : %d\n", msixc); + } + if (msix_disable > 0) + msixc = 0; + if (msi_disable > 0) + msic = 0; + /* Prefer MSI-X to MSI. */ + if (msixc > 0) { + msixc = 1; + rid = PCIR_BAR(4); + sc->rl_res_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE); + if (sc->rl_res_pba == NULL) { + device_printf(sc->rl_dev, + "could not allocate MSI-X PBA resource\n"); + } + if (sc->rl_res_pba != NULL && + pci_alloc_msix(dev, &msixc) == 0) { + if (msixc == 1) { + device_printf(dev, "Using %d MSI-X message\n", + msixc); + sc->rl_flags |= RL_FLAG_MSIX; + } else + pci_release_msi(dev); + } + if ((sc->rl_flags & RL_FLAG_MSIX) == 0) { + if (sc->rl_res_pba != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, rid, + sc->rl_res_pba); + sc->rl_res_pba = NULL; + msixc = 0; + } } - if (msic > 0 && msi_disable == 0) { + /* Prefer MSI to INTx. */ + if (msixc == 0 && msic > 0) { msic = 1; if (pci_alloc_msi(dev, &msic) == 0) { if (msic == RL_MSI_MESSAGES) { - device_printf(dev, "Using %d MSI messages\n", + device_printf(dev, "Using %d MSI message\n", msic); sc->rl_flags |= RL_FLAG_MSI; /* Explicitly set MSI enable bit. */ @@ -1250,10 +1285,12 @@ re_attach(device_t dev) } else pci_release_msi(dev); } + if ((sc->rl_flags & RL_FLAG_MSI) == 0) + msic = 0; } /* Allocate interrupt */ - if ((sc->rl_flags & RL_FLAG_MSI) == 0) { + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) { rid = 0; sc->rl_irq[0] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -1540,7 +1577,7 @@ re_attach(device_t dev) #endif /* Hook interrupt last to avoid having to lock softc */ - if ((sc->rl_flags & RL_FLAG_MSI) == 0) + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) error = bus_setup_intr(dev, sc->rl_irq[0], INTR_TYPE_NET | INTR_MPSAFE, re_intr, NULL, sc, &sc->rl_intrhand[0]); @@ -1632,7 +1669,7 @@ re_detach(device_t dev) } if (ifp != NULL) if_free(ifp); - if ((sc->rl_flags & RL_FLAG_MSI) == 0) { + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) { if (sc->rl_irq[0] != NULL) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq[0]); @@ -1648,6 +1685,10 @@ re_detach(device_t dev) } pci_release_msi(dev); } + if (sc->rl_res_pba) { + rid = PCIR_BAR(4); + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->rl_res_pba); + } if (sc->rl_res) bus_release_resource(dev, sc->rl_res_type, sc->rl_res_id, sc->rl_res); Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Mon Feb 28 21:21:24 2011 (r219104) +++ stable/7/sys/pci/if_rlreg.h Mon Feb 28 21:25:35 2011 (r219105) @@ -864,6 +864,7 @@ struct rl_softc { struct resource *rl_res; int rl_res_id; int rl_res_type; + struct resource *rl_res_pba; struct resource *rl_irq[RL_MSI_MESSAGES]; void *rl_intrhand[RL_MSI_MESSAGES]; device_t rl_miibus; @@ -908,6 +909,7 @@ struct rl_softc { #define RL_FLAG_FASTETHER 0x0100 #define RL_FLAG_CMDSTOP 0x0200 #define RL_FLAG_MACRESET 0x0400 +#define RL_FLAG_MSIX 0x0800 #define RL_FLAG_WOLRXENB 0x1000 #define RL_FLAG_MACSLEEP 0x2000 #define RL_FLAG_PCIE 0x4000 From owner-svn-src-stable-7@FreeBSD.ORG Mon Feb 28 23:37:38 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 E73BD106566B; Mon, 28 Feb 2011 23:37:38 +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 D4F468FC0A; Mon, 28 Feb 2011 23:37:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1SNbcjd060684; Mon, 28 Feb 2011 23:37:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1SNbcRO060681; Mon, 28 Feb 2011 23:37:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201102282337.p1SNbcRO060681@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 28 Feb 2011 23:37:38 +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: r219109 - in stable/7/sys: dev/re 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: Mon, 28 Feb 2011 23:37:39 -0000 Author: yongari Date: Mon Feb 28 23:37:38 2011 New Revision: 219109 URL: http://svn.freebsd.org/changeset/base/219109 Log: MFC r217868: Remove TX taskqueue and directly invoke re_start in interrupt task. Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Mon Feb 28 23:36:03 2011 (r219108) +++ stable/7/sys/dev/re/if_re.c Mon Feb 28 23:37:38 2011 (r219109) @@ -254,9 +254,9 @@ static void re_poll_locked (struct ifnet #endif static int re_intr (void *); static void re_tick (void *); -static void re_tx_task (void *, int); static void re_int_task (void *, int); static void re_start (struct ifnet *); +static void re_start_locked (struct ifnet *); static int re_ioctl (struct ifnet *, u_long, caddr_t); static void re_init (void *); static void re_init_locked (struct rl_softc *); @@ -1525,7 +1525,6 @@ re_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = RL_IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - TASK_INIT(&sc->rl_txtask, 1, re_tx_task, ifp); TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc); /* @@ -1635,7 +1634,6 @@ re_detach(device_t dev) RL_UNLOCK(sc); callout_drain(&sc->rl_stat_callout); taskqueue_drain(taskqueue_fast, &sc->rl_inttask); - taskqueue_drain(taskqueue_fast, &sc->rl_txtask); /* * Force off the IFF_UP flag here, in case someone * still had a BPF descriptor attached to this @@ -2360,7 +2358,7 @@ re_poll_locked(struct ifnet *ifp, enum p re_txeof(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); + re_start_locked(ifp); if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */ u_int16_t status; @@ -2462,7 +2460,7 @@ re_int_task(void *arg, int npending) } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); + re_start_locked(ifp); RL_UNLOCK(sc); @@ -2667,19 +2665,21 @@ re_encap(struct rl_softc *sc, struct mbu } static void -re_tx_task(void *arg, int npending) +re_start(struct ifnet *ifp) { - struct ifnet *ifp; + struct rl_softc *sc; - ifp = arg; - re_start(ifp); + sc = ifp->if_softc; + RL_LOCK(sc); + re_start_locked(ifp); + RL_UNLOCK(sc); } /* * Main transmit routine for C+ and gigE NICs. */ static void -re_start(struct ifnet *ifp) +re_start_locked(struct ifnet *ifp) { struct rl_softc *sc; struct mbuf *m_head; @@ -2687,13 +2687,9 @@ re_start(struct ifnet *ifp) sc = ifp->if_softc; - RL_LOCK(sc); - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || (sc->rl_flags & RL_FLAG_LINK) == 0) { - RL_UNLOCK(sc); + IFF_DRV_RUNNING || (sc->rl_flags & RL_FLAG_LINK) == 0) return; - } for (queued = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd) && sc->rl_ldata.rl_tx_free > 1;) { @@ -2723,7 +2719,6 @@ re_start(struct ifnet *ifp) if (sc->rl_ldata.rl_tx_free != sc->rl_ldata.rl_tx_desc_cnt) CSR_WRITE_4(sc, RL_TIMERCNT, 1); #endif - RL_UNLOCK(sc); return; } @@ -2751,8 +2746,6 @@ re_start(struct ifnet *ifp) * Set a timeout in case the chip goes out to lunch. */ sc->rl_watchdog_timer = 5; - - RL_UNLOCK(sc); } static void @@ -3272,7 +3265,7 @@ re_watchdog(struct rl_softc *sc) if_printf(ifp, "watchdog timeout (missed Tx interrupts) " "-- recovering\n"); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); + re_start_locked(ifp); return; } @@ -3283,7 +3276,7 @@ re_watchdog(struct rl_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_RUNNING; re_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); + re_start_locked(ifp); } /* Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Mon Feb 28 23:36:03 2011 (r219108) +++ stable/7/sys/pci/if_rlreg.h Mon Feb 28 23:37:38 2011 (r219109) @@ -893,7 +893,6 @@ struct rl_softc { int rxcycles; #endif - struct task rl_txtask; struct task rl_inttask; int rl_txstart; From owner-svn-src-stable-7@FreeBSD.ORG Mon Feb 28 23:46:59 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 9A263106564A; Mon, 28 Feb 2011 23:46:59 +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 8711E8FC14; Mon, 28 Feb 2011 23:46:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1SNkx1b061456; Mon, 28 Feb 2011 23:46:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1SNkxPf061452; Mon, 28 Feb 2011 23:46:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201102282346.p1SNkxPf061452@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 28 Feb 2011 23:46:59 +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: r219111 - in stable/7/sys: dev/re 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: Mon, 28 Feb 2011 23:46:59 -0000 Author: yongari Date: Mon Feb 28 23:46:59 2011 New Revision: 219111 URL: http://svn.freebsd.org/changeset/base/219111 Log: MFC r217902: Do not use interrupt taskqueue on controllers with MSI/MSI-X capability. One of reason using interrupt taskqueue in re(4) was to reduce number of TX/RX interrupts under load because re(4) controllers have no good TX/RX interrupt moderation mechanism. Basic TX interrupt moderation is done by hardware for most controllers but RX interrupt moderation through undocumented register showed poor RX performance so it was disabled in r215025. Using taskqueue to handle RX interrupt greatly reduced number of interrupts but re(4) consumed all available CPU cycles to run the taskqueue under high TX/RX network load. This can happen even with RTL810x fast ethernet controller and I believe this is not acceptable for most systems. To mitigate the issue, use one-shot timer register to moderate RX interrupts. The timer register provides programmable one-shot timer and can be used to suppress interrupt generation. The timer runs at 125MHZ on PCIe controllers so the minimum time allowed for the timer is 8ns. Data sheet says the register is 32 bits but experimentation shows only lower 13 bits are valid so maximum time that can be programmed is 65.528us. This yields theoretical maximum number of RX interrupts that could be generated per second is about 15260. Combined with TX completion interrupts re(4) shall generate less than 20k interrupts. This number is still slightly high compared to other intelligent ethernet controllers but system is very responsive even under high network load. Introduce sysctl variable dev.re.%d.int_rx_mod that controls amount of time to delay RX interrupt processing in units of us. Value 0 completely disables RX interrupt moderation. To provide old behavior for controllers that have MSI/MSI-X capability, introduce a new tunable hw.re.intr_filter. If the tunable is set to non-zero value, driver will use interrupt taskqueue. The default value of the tunable is 0. This tunable has no effect on controllers that has no MSI/MSI-X capability or if MSI/MSI-X is explicitly disabled by administrator. While I'm here cleanup interrupt setup/teardown since re(4) uses single MSI/MSI-X message at this moment. Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Mon Feb 28 23:41:27 2011 (r219110) +++ stable/7/sys/dev/re/if_re.c Mon Feb 28 23:46:59 2011 (r219111) @@ -157,6 +157,8 @@ MODULE_DEPEND(re, miibus, 1, 1, 1); #include "miibus_if.h" /* Tunables. */ +static int intr_filter = 0; +TUNABLE_INT("hw.re.intr_filter", &intr_filter); static int msi_disable = 0; TUNABLE_INT("hw.re.msi_disable", &msi_disable); static int msix_disable = 0; @@ -253,6 +255,7 @@ static void re_poll (struct ifnet *, en static void re_poll_locked (struct ifnet *, enum poll_cmd, int); #endif static int re_intr (void *); +static void re_intr_msi (void *); static void re_tick (void *); static void re_int_task (void *, int); static void re_start (struct ifnet *); @@ -290,6 +293,8 @@ static int re_diag (struct rl_softc *); static void re_add_sysctls (struct rl_softc *); static int re_sysctl_stats (SYSCTL_HANDLER_ARGS); +static int sysctl_int_range (SYSCTL_HANDLER_ARGS, int, int); +static int sysctl_hw_re_int_mod (SYSCTL_HANDLER_ARGS); static device_method_t re_methods[] = { /* Device interface */ @@ -1575,19 +1580,19 @@ re_attach(device_t dev) } #endif +#ifdef RE_TX_MODERATION + intr_filter = 1; +#endif /* Hook interrupt last to avoid having to lock softc */ - if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) != 0 && + intr_filter == 0) { + error = bus_setup_intr(dev, sc->rl_irq[0], + INTR_TYPE_NET | INTR_MPSAFE, NULL, re_intr_msi, sc, + &sc->rl_intrhand[0]); + } else { error = bus_setup_intr(dev, sc->rl_irq[0], INTR_TYPE_NET | INTR_MPSAFE, re_intr, NULL, sc, &sc->rl_intrhand[0]); - else { - for (i = 0; i < RL_MSI_MESSAGES; i++) { - error = bus_setup_intr(dev, sc->rl_irq[i], - INTR_TYPE_NET | INTR_MPSAFE, re_intr, NULL, sc, - &sc->rl_intrhand[i]); - if (error != 0) - break; - } } if (error) { device_printf(dev, "couldn't set up irq\n"); @@ -1658,31 +1663,22 @@ re_detach(device_t dev) * stopped here. */ - for (i = 0; i < RL_MSI_MESSAGES; i++) { - if (sc->rl_intrhand[i] != NULL) { - bus_teardown_intr(dev, sc->rl_irq[i], - sc->rl_intrhand[i]); - sc->rl_intrhand[i] = NULL; - } + if (sc->rl_intrhand[0] != NULL) { + bus_teardown_intr(dev, sc->rl_irq[0], sc->rl_intrhand[0]); + sc->rl_intrhand[0] = NULL; } if (ifp != NULL) if_free(ifp); - if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) { - if (sc->rl_irq[0] != NULL) { - bus_release_resource(dev, SYS_RES_IRQ, 0, - sc->rl_irq[0]); - sc->rl_irq[0] = NULL; - } - } else { - for (i = 0, rid = 1; i < RL_MSI_MESSAGES; i++, rid++) { - if (sc->rl_irq[i] != NULL) { - bus_release_resource(dev, SYS_RES_IRQ, rid, - sc->rl_irq[i]); - sc->rl_irq[i] = NULL; - } - } - pci_release_msi(dev); + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) + rid = 0; + else + rid = 1; + if (sc->rl_irq[0] != NULL) { + bus_release_resource(dev, SYS_RES_IRQ, rid, sc->rl_irq[0]); + sc->rl_irq[0] = NULL; } + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) != 0) + pci_release_msi(dev); if (sc->rl_res_pba) { rid = PCIR_BAR(4); bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->rl_res_pba); @@ -1971,6 +1967,7 @@ re_rx_list_init(struct rl_softc *sc) sc->rl_ldata.rl_rx_prodidx = 0; sc->rl_head = sc->rl_tail = NULL; + sc->rl_int_rx_act = 0; return (0); } @@ -1994,6 +1991,7 @@ re_jrx_list_init(struct rl_softc *sc) sc->rl_ldata.rl_rx_prodidx = 0; sc->rl_head = sc->rl_tail = NULL; + sc->rl_int_rx_act = 0; return (0); } @@ -2472,6 +2470,87 @@ re_int_task(void *arg, int npending) CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS); } +static void +re_intr_msi(void *xsc) +{ + struct rl_softc *sc; + struct ifnet *ifp; + uint16_t intrs, status; + + sc = xsc; + RL_LOCK(sc); + + ifp = sc->rl_ifp; +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) { + RL_UNLOCK(sc); + return; + } +#endif + /* Disable interrupts. */ + CSR_WRITE_2(sc, RL_IMR, 0); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + RL_UNLOCK(sc); + return; + } + + intrs = RL_INTRS_CPLUS; + status = CSR_READ_2(sc, RL_ISR); + CSR_WRITE_2(sc, RL_ISR, status); + if (sc->rl_int_rx_act > 0) { + intrs &= ~(RL_ISR_RX_OK | RL_ISR_RX_ERR | RL_ISR_FIFO_OFLOW | + RL_ISR_RX_OVERRUN); + status &= ~(RL_ISR_RX_OK | RL_ISR_RX_ERR | RL_ISR_FIFO_OFLOW | + RL_ISR_RX_OVERRUN); + } + + if (status & (RL_ISR_TIMEOUT_EXPIRED | RL_ISR_RX_OK | RL_ISR_RX_ERR | + RL_ISR_FIFO_OFLOW | RL_ISR_RX_OVERRUN)) { + re_rxeof(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + if (sc->rl_int_rx_mod != 0 && + (status & (RL_ISR_RX_OK | RL_ISR_RX_ERR | + RL_ISR_FIFO_OFLOW | RL_ISR_RX_OVERRUN)) != 0) { + /* Rearm one-shot timer. */ + CSR_WRITE_4(sc, RL_TIMERCNT, 1); + intrs &= ~(RL_ISR_RX_OK | RL_ISR_RX_ERR | + RL_ISR_FIFO_OFLOW | RL_ISR_RX_OVERRUN); + sc->rl_int_rx_act = 1; + } else { + intrs |= RL_ISR_RX_OK | RL_ISR_RX_ERR | + RL_ISR_FIFO_OFLOW | RL_ISR_RX_OVERRUN; + sc->rl_int_rx_act = 0; + } + } + } + + /* + * Some chips will ignore a second TX request issued + * while an existing transmission is in progress. If + * the transmitter goes idle but there are still + * packets waiting to be sent, we need to restart the + * channel here to flush them out. This only seems to + * be required with the PCIe devices. + */ + if ((status & (RL_ISR_TX_OK | RL_ISR_TX_DESC_UNAVAIL)) && + (sc->rl_flags & RL_FLAG_PCIE)) + CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); + if (status & (RL_ISR_TX_OK | RL_ISR_TX_ERR | RL_ISR_TX_DESC_UNAVAIL)) + re_txeof(sc); + + if (status & RL_ISR_SYSTEM_ERR) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + re_init_locked(sc); + } + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + re_start_locked(ifp); + CSR_WRITE_2(sc, RL_IMR, intrs); + } + RL_UNLOCK(sc); +} + static int re_encap(struct rl_softc *sc, struct mbuf **m_head) { @@ -3001,18 +3080,35 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); #endif -#ifdef RE_TX_MODERATION /* * Initialize the timer interrupt register so that * a timer interrupt will be generated once the timer * reaches a certain number of ticks. The timer is - * reloaded on each transmit. This gives us TX interrupt + * reloaded on each transmit. + */ +#ifdef RE_TX_MODERATION + /* + * Use timer interrupt register to moderate TX interrupt * moderation, which dramatically improves TX frame rate. */ if (sc->rl_type == RL_8169) CSR_WRITE_4(sc, RL_TIMERINT_8169, 0x800); else CSR_WRITE_4(sc, RL_TIMERINT, 0x400); +#else + /* + * Use timer interrupt register to moderate RX interrupt + * moderation. + */ + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) != 0 && + intr_filter == 0) { + if (sc->rl_type == RL_8169) + CSR_WRITE_4(sc, RL_TIMERINT_8169, + RL_USECS(sc->rl_int_rx_mod)); + } else { + if (sc->rl_type == RL_8169) + CSR_WRITE_4(sc, RL_TIMERINT_8169, RL_USECS(0)); + } #endif /* @@ -3529,6 +3625,7 @@ re_add_sysctls(struct rl_softc *sc) { struct sysctl_ctx_list *ctx; struct sysctl_oid_list *children; + int error; ctx = device_get_sysctl_ctx(sc->rl_dev); children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->rl_dev)); @@ -3536,6 +3633,26 @@ re_add_sysctls(struct rl_softc *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "stats", CTLTYPE_INT | CTLFLAG_RW, sc, 0, re_sysctl_stats, "I", "Statistics Information"); + if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) + return; + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "int_rx_mod", + CTLTYPE_INT | CTLFLAG_RW, &sc->rl_int_rx_mod, 0, + sysctl_hw_re_int_mod, "I", "re RX interrupt moderation"); + /* Pull in device tunables. */ + sc->rl_int_rx_mod = RL_TIMER_DEFAULT; + error = resource_int_value(device_get_name(sc->rl_dev), + device_get_unit(sc->rl_dev), "int_rx_mod", &sc->rl_int_rx_mod); + if (error == 0) { + if (sc->rl_int_rx_mod < RL_TIMER_MIN || + sc->rl_int_rx_mod > RL_TIMER_MAX) { + device_printf(sc->rl_dev, "int_rx_mod value out of " + "range; using default: %d\n", + RL_TIMER_DEFAULT); + sc->rl_int_rx_mod = RL_TIMER_DEFAULT; + } + } + } static int @@ -3613,3 +3730,29 @@ done: return (error); } + +static int +sysctl_int_range(SYSCTL_HANDLER_ARGS, int low, int high) +{ + int error, value; + + if (arg1 == NULL) + return (EINVAL); + value = *(int *)arg1; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error || req->newptr == NULL) + return (error); + if (value < low || value > high) + return (EINVAL); + *(int *)arg1 = value; + + return (0); +} + +static int +sysctl_hw_re_int_mod(SYSCTL_HANDLER_ARGS) +{ + + return (sysctl_int_range(oidp, arg1, arg2, req, RL_TIMER_MIN, + RL_TIMER_MAX)); +} Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Mon Feb 28 23:41:27 2011 (r219110) +++ stable/7/sys/pci/if_rlreg.h Mon Feb 28 23:46:59 2011 (r219111) @@ -497,6 +497,14 @@ #define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ +/* Timer interrupt register */ +#define RL_TIMERINT_8169_VAL 0x00001FFF +#define RL_TIMER_MIN 0 +#define RL_TIMER_MAX 65 /* 65.528us */ +#define RL_TIMER_DEFAULT RL_TIMER_MAX +#define RL_TIMER_PCIE_CLK 125 /* 125MHZ */ +#define RL_USECS(x) ((x) * RL_TIMER_PCIE_CLK) + /* * Gigabit PHY access register (8169 only) */ @@ -896,6 +904,8 @@ struct rl_softc { struct task rl_inttask; int rl_txstart; + int rl_int_rx_act; + int rl_int_rx_mod; uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 #define RL_FLAG_AUTOPAD 0x0002 From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 1 00:02:46 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 CD60B106566B; Tue, 1 Mar 2011 00:02:46 +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 B12E48FC21; Tue, 1 Mar 2011 00:02:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2102kZw062766; Tue, 1 Mar 2011 00:02:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2102kFN062763; Tue, 1 Mar 2011 00:02:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103010002.p2102kFN062763@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 1 Mar 2011 00:02:46 +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: r219113 - in stable/7/sys: dev/re 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: Tue, 01 Mar 2011 00:02:47 -0000 Author: yongari Date: Tue Mar 1 00:02:46 2011 New Revision: 219113 URL: http://svn.freebsd.org/changeset/base/219113 Log: MFC r217911: Add support for RTL8105E PCIe Fast Ethernet controller. It seems the controller has a kind of embedded controller/memory and vendor applies a large set of magic code via undocumented PHY registers in device initialization stage. I guess it's a firmware image for the embedded controller in RTL8105E since the code is too big compared to other DSP fixups. However I have no idea what that magic code does and what's purpose of the embedded controller. Fortunately driver seems to still work without loading the firmware. While I'm here change device description of RTL810xE controller. H/W donated by: Realtek Semiconductor Corp. Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Mar 1 00:01:34 2011 (r219112) +++ stable/7/sys/dev/re/if_re.c Tue Mar 1 00:02:46 2011 (r219113) @@ -177,7 +177,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8139, 0, "RealTek 8139C+ 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8101E, 0, - "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, + "RealTek 810xE PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, @@ -217,6 +217,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8102EL, RL_8169, "8102EL", RL_MTU }, { RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL", RL_MTU }, { RL_HWREV_8103E, RL_8169, "8103E", RL_MTU }, + { RL_HWREV_8105E, RL_8169, "8105E", RL_MTU }, { RL_HWREV_8168B_SPIN2, RL_8169, "8168", RL_JUMBO_MTU }, { RL_HWREV_8168B_SPIN3, RL_8169, "8168", RL_JUMBO_MTU }, { RL_HWREV_8168C, RL_8169, "8168C/8111C", RL_JUMBO_MTU_6K }, @@ -1377,6 +1378,11 @@ re_attach(device_t dev) RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_MACSLEEP; break; + case RL_HWREV_8105E: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; + break; case RL_HWREV_8168B_SPIN1: case RL_HWREV_8168B_SPIN2: sc->rl_flags |= RL_FLAG_WOLRXENB; Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Tue Mar 1 00:01:34 2011 (r219112) +++ stable/7/sys/pci/if_rlreg.h Tue Mar 1 00:02:46 2011 (r219113) @@ -176,6 +176,7 @@ #define RL_HWREV_8168C 0x3C000000 #define RL_HWREV_8168C_SPIN2 0x3C400000 #define RL_HWREV_8168CP 0x3C800000 +#define RL_HWREV_8105E 0x40800000 #define RL_HWREV_8139 0x60000000 #define RL_HWREV_8139A 0x70000000 #define RL_HWREV_8139AG 0x70800000 From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 1 00:05:47 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 312DE106564A; Tue, 1 Mar 2011 00:05:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05BA48FC19; Tue, 1 Mar 2011 00:05:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2105kMH063089; Tue, 1 Mar 2011 00:05:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2105kRh063087; Tue, 1 Mar 2011 00:05:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103010005.p2105kRh063087@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 1 Mar 2011 00:05:46 +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: r219115 - stable/7/sys/dev/re 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, 01 Mar 2011 00:05:47 -0000 Author: yongari Date: Tue Mar 1 00:05:46 2011 New Revision: 219115 URL: http://svn.freebsd.org/changeset/base/219115 Log: MFC r218289: Disable TX IP checksum offloading for RTL8168C controllers. The controller in question generates frames with bad IP checksum value if packets contain IP options. For instance, packets generated by ping(8) with record route option have wrong IP checksum value. The controller correctly computes checksum for normal TCP/UDP packets though. There are two known RTL8168/8111C variants in market and the issue I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure RL_HWREV_8168C also has the same issue but it would be better to assume it has the same issue since they shall share same core. RTL8102E which is supposed to be released at the time of RTL8168/8111C announcement does not have the issue. Tested by: Konstantin V. Krotov ( kkv <> insysnet dot ru ) Modified: stable/7/sys/dev/re/if_re.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Mar 1 00:04:34 2011 (r219114) +++ stable/7/sys/dev/re/if_re.c Tue Mar 1 00:05:46 2011 (r219115) @@ -1528,7 +1528,16 @@ re_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = re_ioctl; ifp->if_start = re_start; - ifp->if_hwassist = RE_CSUM_FEATURES | CSUM_TSO; + /* + * RTL8168/8111C generates wrong IP checksummed frame if the + * packet has IP options so disable TX IP checksum offloading. + */ + if (sc->rl_hwrev->rl_rev == RL_HWREV_8168C || + sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2) + ifp->if_hwassist = CSUM_TCP | CSUM_UDP; + else + ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP; + ifp->if_hwassist |= CSUM_TSO; ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; ifp->if_capenable = ifp->if_capabilities; ifp->if_init = re_init; @@ -3203,6 +3212,7 @@ re_ioctl(struct ifnet *ifp, u_long comma struct rl_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; + uint32_t rev; int error = 0; switch (command) { @@ -3288,9 +3298,14 @@ re_ioctl(struct ifnet *ifp, u_long comma 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 |= RE_CSUM_FEATURES; - else + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) { + rev = sc->rl_hwrev->rl_rev; + if (rev == RL_HWREV_8168C || + rev == RL_HWREV_8168C_SPIN2) + ifp->if_hwassist |= CSUM_TCP | CSUM_UDP; + else + ifp->if_hwassist |= RE_CSUM_FEATURES; + } else ifp->if_hwassist &= ~RE_CSUM_FEATURES; reinit = 1; } From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 1 00:08:50 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 18435106566C; Tue, 1 Mar 2011 00:08:50 +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 E0B5A8FC1E; Tue, 1 Mar 2011 00:08:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2108nYm063399; Tue, 1 Mar 2011 00:08:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2108nM2063396; Tue, 1 Mar 2011 00:08:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103010008.p2108nM2063396@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 1 Mar 2011 00:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219117 - in stable/7/sys: dev/re 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: Tue, 01 Mar 2011 00:08:50 -0000 Author: yongari Date: Tue Mar 1 00:08:49 2011 New Revision: 219117 URL: http://svn.freebsd.org/changeset/base/219117 Log: MFC r218760: Add initial support for RTL8401E PCIe Fast Ethernet. PR: 154789 Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Mar 1 00:07:38 2011 (r219116) +++ stable/7/sys/dev/re/if_re.c Tue Mar 1 00:08:49 2011 (r219117) @@ -217,6 +217,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8102EL, RL_8169, "8102EL", RL_MTU }, { RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL", RL_MTU }, { RL_HWREV_8103E, RL_8169, "8103E", RL_MTU }, + { RL_HWREV_8401E, RL_8169, "8401E", RL_MTU }, { RL_HWREV_8105E, RL_8169, "8105E", RL_MTU }, { RL_HWREV_8168B_SPIN2, RL_8169, "8168", RL_JUMBO_MTU }, { RL_HWREV_8168B_SPIN3, RL_8169, "8168", RL_JUMBO_MTU }, @@ -1378,6 +1379,7 @@ re_attach(device_t dev) RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_MACSLEEP; break; + case RL_HWREV_8401E: case RL_HWREV_8105E: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | @@ -1503,8 +1505,11 @@ re_attach(device_t dev) } /* Take PHY out of power down mode. */ - if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) { CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80); + if (hw_rev->rl_rev == RL_HWREV_8401E) + CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) & ~0x08); + } if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) { re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Tue Mar 1 00:07:38 2011 (r219116) +++ stable/7/sys/pci/if_rlreg.h Tue Mar 1 00:08:49 2011 (r219117) @@ -160,6 +160,7 @@ #define RL_HWREV_8110S 0x04000000 #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 +#define RL_HWREV_8401E 0x24000000 #define RL_HWREV_8102EL 0x24800000 #define RL_HWREV_8102EL_SPIN1 0x24C00000 #define RL_HWREV_8168D 0x28000000 From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 1 00:13:51 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 49E80106566C; Tue, 1 Mar 2011 00:13:51 +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 1E20C8FC1A; Tue, 1 Mar 2011 00:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p210Dps5063886; Tue, 1 Mar 2011 00:13:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p210DpUL063884; Tue, 1 Mar 2011 00:13:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103010013.p210DpUL063884@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 1 Mar 2011 00:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219119 - stable/7/share/man/man4 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, 01 Mar 2011 00:13:51 -0000 Author: yongari Date: Tue Mar 1 00:13:50 2011 New Revision: 219119 URL: http://svn.freebsd.org/changeset/base/219119 Log: MFC r217914: Document newly added tunables. hw.re.intr_filter hw.re.msix_disable dev.re.%d.int_rx_mod Modified: stable/7/share/man/man4/re.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/re.4 ============================================================================== --- stable/7/share/man/man4/re.4 Tue Mar 1 00:11:44 2011 (r219118) +++ stable/7/share/man/man4/re.4 Tue Mar 1 00:13:50 2011 (r219119) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2011 +.Dd January 26, 2011 .Dt RE 4 .Os .Sh NAME @@ -175,15 +175,39 @@ Tunables can be set at the prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width "xxxxxx" +.It Va hw.re.intr_filter +This tunable makes driver use interrupt filter handler on +controllers that support MSI/MSI-X capability. +If MSI/MSI-X is disabled by administrator this tunable has no +effect and driver will use interrupt filter handler. +The default value is 0 to use interrupt thread handler. .It Va hw.re.msi_disable This tunable disables MSI support on the Ethernet hardware. The default value is 0. +.It Va hw.re.msix_disable +This tunable disables MSI-X support on the Ethernet hardware. +The default value is 0. .It Va hw.re.prefer_iomap This tunable controls which register mapping should be used on the specified device. A non-zero value enables I/O space register mapping. The default value is 0 to use memory space register mapping. .El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.re.%d.int_rx_mod +Maximum amount of time to delay receive interrupt processing in +units of 1us. +The accepted range is 0 to 65, the default is 65(65us). +Value 0 completely disables the interrupt moderation. +The interface need to be brought down and up again before a change +takes effect. +.El .Sh DIAGNOSTICS .Bl -diag .It "re%d: couldn't map memory" From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 1 18:05:58 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 4BA9B1065674; Tue, 1 Mar 2011 18:05:58 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39EFC8FC15; Tue, 1 Mar 2011 18:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p21I5wX5046867; Tue, 1 Mar 2011 18:05:58 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p21I5w53046865; Tue, 1 Mar 2011 18:05:58 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103011805.p21I5w53046865@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 1 Mar 2011 18:05:58 +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: r219142 - 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: Tue, 01 Mar 2011 18:05:58 -0000 Author: jh Date: Tue Mar 1 18:05:57 2011 New Revision: 219142 URL: http://svn.freebsd.org/changeset/base/219142 Log: MFC r187105 by obrien: Fix issue where ata_atapicmd() can never really return EBUSY which is expected in acd_fixate(). This should fix various problems folks are having with 'burncd' reporting "burncd: ioctl(CDRIOCFIXATE): Input/output error" during the fixate phase when "fixate" is issued together with the "data" command. PR: 95979 Modified: stable/7/sys/dev/ata/ata-queue.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/ata/ata-queue.c ============================================================================== --- stable/7/sys/dev/ata/ata-queue.c Tue Mar 1 17:39:27 2011 (r219141) +++ stable/7/sys/dev/ata/ata-queue.c Tue Mar 1 18:05:57 2011 (r219142) @@ -443,7 +443,8 @@ ata_completed(void *context, int dummy) printf("\n"); } - if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ? + if (!request->result && + (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ? request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : request->error)) request->result = EIO; From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 1 21:29:09 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 5CB1C1065787; Tue, 1 Mar 2011 21:29:09 +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 42C4F8FC17; Tue, 1 Mar 2011 21:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p21LT962061476; Tue, 1 Mar 2011 21:29:09 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p21LT9hu061473; Tue, 1 Mar 2011 21:29:09 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201103012129.p21LT9hu061473@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 1 Mar 2011 21:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219151 - 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, 01 Mar 2011 21:29:09 -0000 Author: edwin Date: Tue Mar 1 21:29:08 2011 New Revision: 219151 URL: http://svn.freebsd.org/changeset/base/219151 Log: MFC of 219149, tzdata2011b: USA/Mercer County, North Dakota - Moved from Mountain time to Central time. Modified: stable/7/share/zoneinfo/northamerica stable/7/share/zoneinfo/zone.tab Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Tue Mar 1 21:29:00 2011 (r219150) +++ stable/7/share/zoneinfo/northamerica Tue Mar 1 21:29:08 2011 (r219151) @@ -1,5 +1,5 @@ #
-# %W%
+# @(#)northamerica	8.40
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,6 +346,27 @@ Zone America/North_Dakota/New_Salem -6:4
 			-7:00	US	M%sT	2003 Oct 26 02:00
 			-6:00	US	C%sT
 
+# From Josh Findley (2011-01-21):
+# ...it appears that Mercer County, North Dakota, changed from the
+# mountain time zone to the central time zone at the last transition from
+# daylight-saving to standard time (on Nov. 7, 2010):
+# 
+# http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
+# 
+# 
+# http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html
+# 
+
+# From Andy Lipscomb (2011-01-24):
+# ...according to the Census Bureau, the largest city is Beulah (although
+# it's commonly referred to as Beulah-Hazen, with Hazen being the next
+# largest city in Mercer County).  Google Maps places Beulah's city hall
+# at 4715'51" north, 10146'40" west, which yields an offset of 6h47'07".
+
+Zone America/North_Dakota/Beulah -6:47:07 - LMT 1883 Nov 18 12:12:53
+			-7:00	US	M%sT	2010 Nov  7 2:00
+			-6:00	US	C%sT
+
 # US mountain time, represented by Denver
 #
 # Colorado, far western Kansas, Montana, western

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Mar  1 21:29:00 2011	(r219150)
+++ stable/7/share/zoneinfo/zone.tab	Tue Mar  1 21:29:08 2011	(r219151)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.38
+# @(#)zone.tab	8.40
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -211,8 +211,8 @@ HT	+1832-07220	America/Port-au-Prince
 HU	+4730+01905	Europe/Budapest
 ID	-0610+10648	Asia/Jakarta	Java & Sumatra
 ID	-0002+10920	Asia/Pontianak	west & central Borneo
-ID	-0507+11924	Asia/Makassar	east & south Borneo, Celebes, Bali, Nusa Tengarra, west Timor
-ID	-0232+14042	Asia/Jayapura	Irian Jaya & the Moluccas
+ID	-0507+11924	Asia/Makassar	east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
+ID	-0232+14042	Asia/Jayapura	west New Guinea (Irian Jaya) & Malukus (Moluccas)
 IE	+5320-00615	Europe/Dublin
 IL	+3146+03514	Asia/Jerusalem
 IM	+5409-00428	Europe/Isle_of_Man
@@ -404,6 +404,7 @@ US	+411745-0863730	America/Indiana/Knox	
 US	+450628-0873651	America/Menominee	Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
 US	+470659-1011757	America/North_Dakota/Center	Central Time - North Dakota - Oliver County
 US	+465042-1012439	America/North_Dakota/New_Salem	Central Time - North Dakota - Morton County (except Mandan area)
+US	+471551-1014640	America/North_Dakota/Beulah	Central Time - North Dakota - Mercer County
 US	+394421-1045903	America/Denver	Mountain Time
 US	+433649-1161209	America/Boise	Mountain Time - south Idaho & east Oregon
 US	+364708-1084111	America/Shiprock	Mountain Time - Navajo

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Mar  2 19:29:36 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 25583106566B;
	Wed,  2 Mar 2011 19:29:36 +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 13DC88FC16;
	Wed,  2 Mar 2011 19:29:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p22JTZ1a040639;
	Wed, 2 Mar 2011 19:29:35 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p22JTZYC040637;
	Wed, 2 Mar 2011 19:29:35 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103021929.p22JTZYC040637@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 2 Mar 2011 19:29:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219190 - stable/7/contrib/csup
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, 02 Mar 2011 19:29:36 -0000

Author: jhb
Date: Wed Mar  2 19:29:35 2011
New Revision: 219190
URL: http://svn.freebsd.org/changeset/base/219190

Log:
  MFC 217858: Remove dead code.

Modified:
  stable/7/contrib/csup/updater.c
Directory Properties:
  stable/7/contrib/csup/   (props changed)

Modified: stable/7/contrib/csup/updater.c
==============================================================================
--- stable/7/contrib/csup/updater.c	Wed Mar  2 19:29:24 2011	(r219189)
+++ stable/7/contrib/csup/updater.c	Wed Mar  2 19:29:35 2011	(r219190)
@@ -770,7 +770,6 @@ updater_docoll(struct updater *up, struc
 			if (sr->sr_serverattr == NULL)
 				return (UPDATER_ERR_PROTO);
 
-			error = 0;
 			error = updater_rcsedit(up, fup, name, rcsopt);
 			if (error)
 				return (error);

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Mar  2 21:51:22 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 C538F1065783;
	Wed,  2 Mar 2011 21:51:22 +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 B3E178FC12;
	Wed,  2 Mar 2011 21:51:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p22LpM0o056512;
	Wed, 2 Mar 2011 21:51:22 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p22LpMGt056510;
	Wed, 2 Mar 2011 21:51:22 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103022151.p22LpMGt056510@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 2 Mar 2011 21:51: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: r219208 - stable/7/sys/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: Wed, 02 Mar 2011 21:51:22 -0000

Author: jhb
Date: Wed Mar  2 21:51:22 2011
New Revision: 219208
URL: http://svn.freebsd.org/changeset/base/219208

Log:
  MFC 217239:
  Add a nested include of  to make the sysctl(9) manpage
  accurate.   is one of the very few headers similar to
   for which nested includes is allowed.

Modified:
  stable/7/sys/sys/sysctl.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/sys/sysctl.h
==============================================================================
--- stable/7/sys/sys/sysctl.h	Wed Mar  2 21:50:59 2011	(r219207)
+++ stable/7/sys/sys/sysctl.h	Wed Mar  2 21:51:22 2011	(r219208)
@@ -113,6 +113,8 @@ struct ctlname {
 #define CTL_AUTO_START	0x100
 
 #ifdef _KERNEL
+#include 
+
 #define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, int arg2, \
 	struct sysctl_req *req
 

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 16:59:20 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 8FFE1106591C;
	Thu,  3 Mar 2011 16:59:20 +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 7EAA38FC18;
	Thu,  3 Mar 2011 16:59:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23GxK6x053368;
	Thu, 3 Mar 2011 16:59:20 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23GxKra053366;
	Thu, 3 Mar 2011 16:59:20 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103031659.p23GxKra053366@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 16:59:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219232 - stable/7/sys/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: Thu, 03 Mar 2011 16:59:20 -0000

Author: jhb
Date: Thu Mar  3 16:59:20 2011
New Revision: 219232
URL: http://svn.freebsd.org/changeset/base/219232

Log:
  MFC 218270:
  Use M_WAITOK rather than M_NOWAIT when creating taskqueues via the
  TASKQUEUE_DEFINE macros.  All the places that use these macros to create
  taskqueues assume that the operation succeeds.

Modified:
  stable/7/sys/sys/taskqueue.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/sys/taskqueue.h
==============================================================================
--- stable/7/sys/sys/taskqueue.h	Thu Mar  3 16:58:58 2011	(r219231)
+++ stable/7/sys/sys/taskqueue.h	Thu Mar  3 16:59:20 2011	(r219232)
@@ -96,7 +96,7 @@ static void								\
 taskqueue_define_##name(void *arg)					\
 {									\
 	taskqueue_##name =						\
-	    taskqueue_create(#name, M_NOWAIT, (enqueue), (context));	\
+	    taskqueue_create(#name, M_WAITOK, (enqueue), (context));	\
 	init;								\
 }									\
 									\
@@ -120,7 +120,7 @@ static void								\
 taskqueue_define_##name(void *arg)					\
 {									\
 	taskqueue_##name =						\
-	    taskqueue_create_fast(#name, M_NOWAIT, (enqueue),		\
+	    taskqueue_create_fast(#name, M_WAITOK, (enqueue),		\
 	    (context));							\
 	init;								\
 }									\

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 17:04:45 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 974151065674;
	Thu,  3 Mar 2011 17:04:45 +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 85ACC8FC0A;
	Thu,  3 Mar 2011 17:04:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23H4jsq053847;
	Thu, 3 Mar 2011 17:04:45 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23H4jcf053845;
	Thu, 3 Mar 2011 17:04:45 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103031704.p23H4jcf053845@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 17:04:45 +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: r219233 - stable/7/sys/kern
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, 03 Mar 2011 17:04:45 -0000

Author: jhb
Date: Thu Mar  3 17:04:45 2011
New Revision: 219233
URL: http://svn.freebsd.org/changeset/base/219233

Log:
  MFC 200761,218272:
  Always assert that the turnstile chain lock is held in turnstile_wait()
  and remove a duplicate hash lookup.

Modified:
  stable/7/sys/kern/subr_turnstile.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/kern/subr_turnstile.c
==============================================================================
--- stable/7/sys/kern/subr_turnstile.c	Thu Mar  3 16:59:20 2011	(r219232)
+++ stable/7/sys/kern/subr_turnstile.c	Thu Mar  3 17:04:45 2011	(r219233)
@@ -687,8 +687,8 @@ turnstile_wait(struct turnstile *ts, str
 	 * turnstile already in use by this lock.
 	 */
 	tc = TC_LOOKUP(ts->ts_lockobj);
-	if (ts == td->td_turnstile) {
 	mtx_assert(&tc->tc_lock, MA_OWNED);
+	if (ts == td->td_turnstile) {
 #ifdef TURNSTILE_PROFILING
 		tc->tc_depth++;
 		if (tc->tc_depth > tc->tc_max_depth) {
@@ -697,7 +697,6 @@ turnstile_wait(struct turnstile *ts, str
 				turnstile_max_depth = tc->tc_max_depth;
 		}
 #endif
-		tc = TC_LOOKUP(ts->ts_lockobj);
 		LIST_INSERT_HEAD(&tc->tc_turnstiles, ts, ts_hash);
 		KASSERT(TAILQ_EMPTY(&ts->ts_pending),
 		    ("thread's turnstile has pending threads"));

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 17:11:12 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 0FECC1065679;
	Thu,  3 Mar 2011 17:11:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F2D3D8FC0C;
	Thu,  3 Mar 2011 17:11:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23HBBtg054711;
	Thu, 3 Mar 2011 17:11:11 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23HBBHL054709;
	Thu, 3 Mar 2011 17:11:11 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103031711.p23HBBHL054709@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 17:11:11 +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: r219236 - stable/7/sys/conf
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, 03 Mar 2011 17:11:12 -0000

Author: jhb
Date: Thu Mar  3 17:11:11 2011
New Revision: 219236
URL: http://svn.freebsd.org/changeset/base/219236

Log:
  MFC 218290: Correct include path.

Modified:
  stable/7/sys/conf/files
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/conf/files
==============================================================================
--- stable/7/sys/conf/files	Thu Mar  3 17:10:48 2011	(r219235)
+++ stable/7/sys/conf/files	Thu Mar  3 17:11:11 2011	(r219236)
@@ -799,7 +799,7 @@ dev/e1000/e1000_82543.c		optional em | i
 dev/e1000/e1000_82571.c		optional em | igb \
 	compile-with "${NORMAL_C} -I$S/dev/e1000"
 dev/e1000/e1000_82575.c		optional em | igb \
-	 compile-with "${NORMAL_C} -I$S/dev/igb"
+	compile-with "${NORMAL_C} -I$S/dev/e1000"
 dev/e1000/e1000_ich8lan.c	optional em | igb \
 	compile-with "${NORMAL_C} -I$S/dev/e1000"
 dev/e1000/e1000_api.c		optional em | igb \

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 19:55:25 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 8DD7C1065767;
	Thu,  3 Mar 2011 19:55:23 +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 33DDD8FC19;
	Thu,  3 Mar 2011 19:55:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23JtNjB067896;
	Thu, 3 Mar 2011 19:55:23 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23JtNCW067894;
	Thu, 3 Mar 2011 19:55:23 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103031955.p23JtNCW067894@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 19:55:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219247 - stable/7/usr.bin/truss
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, 03 Mar 2011 19:55:25 -0000

Author: jhb
Date: Thu Mar  3 19:55:22 2011
New Revision: 219247
URL: http://svn.freebsd.org/changeset/base/219247

Log:
  MFC 218707: Properly check for errors from waitpid().

Modified:
  stable/7/usr.bin/truss/setup.c
Directory Properties:
  stable/7/usr.bin/truss/   (props changed)

Modified: stable/7/usr.bin/truss/setup.c
==============================================================================
--- stable/7/usr.bin/truss/setup.c	Thu Mar  3 19:55:15 2011	(r219246)
+++ stable/7/usr.bin/truss/setup.c	Thu Mar  3 19:55:22 2011	(r219247)
@@ -83,7 +83,7 @@ setup_and_wait(char *command[])
 	}
 	
 	/* Only in the parent here */
-	if (waitpid(pid, &waitval, 0) < -1) {
+	if (waitpid(pid, &waitval, 0) < 0) {
 		err(1, "unexpect stop in waitpid");
 		return 0;
 	}
@@ -114,7 +114,7 @@ start_tracing(int pid)
 		err(1, "can not attach to target process");
 
 	child_pid = pid;	
-	if (waitpid(pid, &waitval, 0) < -1) 
+	if (waitpid(pid, &waitval, 0) < 0) 
 		err(1, "Unexpect stop in waitpid");
 
 	return (0);
@@ -133,7 +133,7 @@ restore_proc(int signo __unused)
 
 	/* stop the child so that we can detach */	
 	kill(child_pid, SIGSTOP);
-	if (waitpid(child_pid, &waitval, 0) < -1)
+	if (waitpid(child_pid, &waitval, 0) < 0)
 		err(1, "Unexpected stop in waitpid");
 
 	if (ptrace(PT_DETACH, child_pid, (caddr_t)1, 0) < 0)
@@ -183,7 +183,7 @@ waitevent(struct trussinfo *info)
 	ptrace(PT_SYSCALL, info->pid, (caddr_t)1, pending_signal);
 	pending_signal = 0;
 
-	if (waitpid(info->pid, &waitval, 0) < -1) {
+	if (waitpid(info->pid, &waitval, 0) < 0) {
 		err(1, "Unexpected stop in waitpid");
 	}
 	

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 19:57:50 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 632AC1065781;
	Thu,  3 Mar 2011 19:57:50 +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 381468FC18;
	Thu,  3 Mar 2011 19:57:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23Jvovm068425;
	Thu, 3 Mar 2011 19:57:50 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23JvonL068423;
	Thu, 3 Mar 2011 19:57:50 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103031957.p23JvonL068423@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 19:57:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219249 - stable/7/usr.sbin/nfsd
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, 03 Mar 2011 19:57:50 -0000

Author: jhb
Date: Thu Mar  3 19:57:49 2011
New Revision: 219249
URL: http://svn.freebsd.org/changeset/base/219249

Log:
  MFC 218777:
  Save a copy of errno before invoking syslog() if accept() or select() fail.
  syslog() can trash the errno value causing nfsd to exit for non-fatal
  errors like ECONNABORTED from accept().

Modified:
  stable/7/usr.sbin/nfsd/nfsd.c
Directory Properties:
  stable/7/usr.sbin/nfsd/   (props changed)

Modified: stable/7/usr.sbin/nfsd/nfsd.c
==============================================================================
--- stable/7/usr.sbin/nfsd/nfsd.c	Thu Mar  3 19:57:38 2011	(r219248)
+++ stable/7/usr.sbin/nfsd/nfsd.c	Thu Mar  3 19:57:49 2011	(r219249)
@@ -128,7 +128,7 @@ main(int argc, char **argv)
 	socklen_t len;
 	int on = 1, unregister, reregister, sock;
 	int tcp6sock, ip6flag, tcpflag, tcpsock;
-	int udpflag, ecode, s, srvcnt;
+	int udpflag, ecode, error, s, srvcnt;
 	int bindhostc, bindanyflag, rpcbreg, rpcbregcnt;
 	char **bindhost = NULL;
 	pid_t pid;
@@ -652,8 +652,9 @@ main(int argc, char **argv)
 		if (connect_type_cnt > 1) {
 			if (select(maxsock + 1,
 			    &ready, NULL, NULL, NULL) < 1) {
+				error = errno;
 				syslog(LOG_ERR, "select failed: %m");
-				if (errno == EINTR)
+				if (error == EINTR)
 					continue;
 				nfsd_exit(1);
 			}
@@ -664,9 +665,10 @@ main(int argc, char **argv)
 					len = sizeof(inetpeer);
 					if ((msgsock = accept(tcpsock,
 					    (struct sockaddr *)&inetpeer, &len)) < 0) {
+						error = errno;
 						syslog(LOG_ERR, "accept failed: %m");
-						if (errno == ECONNABORTED ||
-						    errno == EINTR)
+						if (error == ECONNABORTED ||
+						    error == EINTR)
 							continue;
 						nfsd_exit(1);
 					}
@@ -686,10 +688,11 @@ main(int argc, char **argv)
 					if ((msgsock = accept(tcpsock,
 					    (struct sockaddr *)&inet6peer,
 					    &len)) < 0) {
+						error = errno;
 						syslog(LOG_ERR,
 						     "accept failed: %m");
-						if (errno == ECONNABORTED ||
-						    errno == EINTR)
+						if (error == ECONNABORTED ||
+						    error == EINTR)
 							continue;
 						nfsd_exit(1);
 					}

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 20:14:00 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 CD62A10656D8;
	Thu,  3 Mar 2011 20:14:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A6F818FC12;
	Thu,  3 Mar 2011 20:14:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23KE0ui070339;
	Thu, 3 Mar 2011 20:14:00 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23KE0P7070337;
	Thu, 3 Mar 2011 20:14:00 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103032014.p23KE0P7070337@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 20:14: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: r219251 - stable/7/sys/dev/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: Thu, 03 Mar 2011 20:14:00 -0000

Author: jhb
Date: Thu Mar  3 20:14:00 2011
New Revision: 219251
URL: http://svn.freebsd.org/changeset/base/219251

Log:
  MFC 218968:
  Properly handle BARs bigger than 4G.  The '1' was treated as an int
  causing the size calculation to be truncated to the size of an int
  (32-bits on all current architectures).

Modified:
  stable/7/sys/dev/pci/pci.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/pci/pci.c
==============================================================================
--- stable/7/sys/dev/pci/pci.c	Thu Mar  3 20:13:44 2011	(r219250)
+++ stable/7/sys/dev/pci/pci.c	Thu Mar  3 20:14:00 2011	(r219251)
@@ -2469,13 +2469,13 @@ pci_add_map(device_t bus, device_t dev, 
 			return (barlen);
 	}
 
-	count = 1 << mapsize;
+	count = (pci_addr_t)1 << mapsize;
 	if (basezero || base == pci_mapbase(testval)) {
 		start = 0;	/* Let the parent decide. */
 		end = ~0ULL;
 	} else {
 		start = base;
-		end = base + (1 << mapsize) - 1;
+		end = base + count - 1;
 	}
 	resource_list_add(rl, type, reg, start, end, count);
 
@@ -3524,7 +3524,7 @@ pci_alloc_map(device_t dev, device_t chi
 	 * another driver, which won't work.
 	 */
 	mapsize = pci_mapsize(testval);
-	count = 1UL << mapsize;
+	count = (pci_addr_t)1 << mapsize;
 	if (RF_ALIGNMENT(flags) < mapsize)
 		flags = (flags & ~RF_ALIGNMENT_MASK) | RF_ALIGNMENT_LOG2(mapsize);
 	if (PCI_BAR_MEM(testval) && (testval & PCIM_BAR_MEM_PREFETCH))

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Mar  3 22:09:10 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 81B771065694;
	Thu,  3 Mar 2011 22:09:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F4018FC1A;
	Thu,  3 Mar 2011 22:09:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23M9Abi082193;
	Thu, 3 Mar 2011 22:09:10 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23M9Amr082190;
	Thu, 3 Mar 2011 22:09:10 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103032209.p23M9Amr082190@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 3 Mar 2011 22:09:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219255 - 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: Thu, 03 Mar 2011 22:09:10 -0000

Author: jhb
Date: Thu Mar  3 22:09:10 2011
New Revision: 219255
URL: http://svn.freebsd.org/changeset/base/219255

Log:
  MFC 218969:
  Expose the umtx_key structure and API to the rest of the kernel.

Modified:
  stable/7/sys/kern/kern_umtx.c
  stable/7/sys/sys/umtx.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/kern_umtx.c
==============================================================================
--- stable/7/sys/kern/kern_umtx.c	Thu Mar  3 22:08:51 2011	(r219254)
+++ stable/7/sys/kern/kern_umtx.c	Thu Mar  3 22:09:10 2011	(r219255)
@@ -58,38 +58,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
-#define TYPE_SIMPLE_WAIT	0
-#define TYPE_CV			1
-#define TYPE_SIMPLE_LOCK	2
-#define TYPE_NORMAL_UMUTEX	3
-#define TYPE_PI_UMUTEX		4
-#define TYPE_PP_UMUTEX		5
-#define TYPE_RWLOCK		6
-
 #define _UMUTEX_TRY		1
 #define _UMUTEX_WAIT		2
 
-/* Key to represent a unique userland synchronous object */
-struct umtx_key {
-	int	hash;
-	int	type;
-	int	shared;
-	union {
-		struct {
-			vm_object_t	object;
-			uintptr_t	offset;
-		} shared;
-		struct {
-			struct vmspace	*vs;
-			uintptr_t	addr;
-		} private;
-		struct {
-			void		*a;
-			uintptr_t	b;
-		} both;
-	} info;
-};
-
 /* Priority inheritance mutex info. */
 struct umtx_pi {
 	/* Owner thread */
@@ -185,10 +156,6 @@ struct umtxq_chain {
 #define	UMTX_CHAINS		128
 #define	UMTX_SHIFTS		(__WORD_BIT - 7)
 
-#define THREAD_SHARE		0
-#define PROCESS_SHARE		1
-#define AUTO_SHARE		2
-
 #define	GET_SHARE(flags)	\
     (((flags) & USYNC_PROCESS_SHARED) == 0 ? THREAD_SHARE : PROCESS_SHARE)
 
@@ -214,10 +181,6 @@ static void umtxq_insert_queue(struct um
 static void umtxq_remove_queue(struct umtx_q *uq, int q);
 static int umtxq_sleep(struct umtx_q *uq, const char *wmesg, int timo);
 static int umtxq_count(struct umtx_key *key);
-static int umtx_key_match(const struct umtx_key *k1, const struct umtx_key *k2);
-static int umtx_key_get(void *addr, int type, int share,
-	struct umtx_key *key);
-static void umtx_key_release(struct umtx_key *key);
 static struct umtx_pi *umtx_pi_alloc(int);
 static void umtx_pi_free(struct umtx_pi *pi);
 static void umtx_pi_adjust_locked(struct thread *td, u_char oldpri);
@@ -280,14 +243,6 @@ umtxq_hash(struct umtx_key *key)
 	key->hash = ((n * GOLDEN_RATIO_PRIME) >> UMTX_SHIFTS) % UMTX_CHAINS;
 }
 
-static inline int
-umtx_key_match(const struct umtx_key *k1, const struct umtx_key *k2)
-{
-	return (k1->type == k2->type &&
-		k1->info.both.a == k2->info.both.a &&
-	        k1->info.both.b == k2->info.both.b);
-}
-
 static inline struct umtxq_chain *
 umtxq_getchain(struct umtx_key *key)
 {
@@ -500,7 +455,7 @@ umtxq_sleep(struct umtx_q *uq, const cha
 /*
  * Convert userspace address into unique logical address.
  */
-static int
+int
 umtx_key_get(void *addr, int type, int share, struct umtx_key *key)
 {
 	struct thread *td = curthread;
@@ -546,7 +501,7 @@ umtx_key_get(void *addr, int type, int s
 /*
  * Release key.
  */
-static inline void
+void
 umtx_key_release(struct umtx_key *key)
 {
 	if (key->shared)

Modified: stable/7/sys/sys/umtx.h
==============================================================================
--- stable/7/sys/sys/umtx.h	Thu Mar  3 22:08:51 2011	(r219254)
+++ stable/7/sys/sys/umtx.h	Thu Mar  3 22:09:10 2011	(r219255)
@@ -190,8 +190,58 @@ umtx_wake(u_long *p, int nr_wakeup)
 
 #else
 
+/*
+ * The umtx_key structure is used by both the Linux futex code and the
+ * umtx implementation to map userland addresses to unique keys.
+ */
+
+enum {
+	TYPE_SIMPLE_WAIT,
+	TYPE_CV,
+	TYPE_SIMPLE_LOCK,
+	TYPE_NORMAL_UMUTEX,
+	TYPE_PI_UMUTEX,
+	TYPE_PP_UMUTEX,
+	TYPE_RWLOCK,
+};
+
+/* Key to represent a unique userland synchronous object */
+struct umtx_key {
+	int	hash;
+	int	type;
+	int	shared;
+	union {
+		struct {
+			struct vm_object *object;
+			uintptr_t	offset;
+		} shared;
+		struct {
+			struct vmspace	*vs;
+			uintptr_t	addr;
+		} private;
+		struct {
+			void		*a;
+			uintptr_t	b;
+		} both;
+	} info;
+};
+
+#define THREAD_SHARE		0
+#define PROCESS_SHARE		1
+#define AUTO_SHARE		2
+
 struct thread;
 
+static inline int
+umtx_key_match(const struct umtx_key *k1, const struct umtx_key *k2)
+{
+	return (k1->type == k2->type &&
+		k1->info.both.a == k2->info.both.a &&
+	        k1->info.both.b == k2->info.both.b);
+}
+
+int umtx_key_get(void *, int, int, struct umtx_key *);
+void umtx_key_release(struct umtx_key *);
 struct umtx_q *umtxq_alloc(void);
 void umtxq_free(struct umtx_q *);
 int kern_umtx_wake(struct thread *, void *, int, int);

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Mar  4 12:20:14 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 9A4BC106564A;
	Fri,  4 Mar 2011 12:20:14 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 888508FC17;
	Fri,  4 Mar 2011 12:20:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p24CKExW031303;
	Fri, 4 Mar 2011 12:20:14 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p24CKEM6031301;
	Fri, 4 Mar 2011 12:20:14 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201103041220.p24CKEM6031301@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Fri, 4 Mar 2011 12:20:14 +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: r219264 - stable/7/usr.sbin/mfiutil
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, 04 Mar 2011 12:20:14 -0000

Author: pluknet
Date: Fri Mar  4 12:20:14 2011
New Revision: 219264
URL: http://svn.freebsd.org/changeset/base/219264

Log:
  MFC r219031:
  
   Fix division by zero, causing floating point exception in a drive progress
   command.
  
  Approved by:	avg (mentor), kib (mentor)

Modified:
  stable/7/usr.sbin/mfiutil/mfi_cmd.c
Directory Properties:
  stable/7/usr.sbin/mfiutil/   (props changed)

Modified: stable/7/usr.sbin/mfiutil/mfi_cmd.c
==============================================================================
--- stable/7/usr.sbin/mfiutil/mfi_cmd.c	Fri Mar  4 12:18:50 2011	(r219263)
+++ stable/7/usr.sbin/mfiutil/mfi_cmd.c	Fri Mar  4 12:20:14 2011	(r219264)
@@ -316,7 +316,7 @@ mfi_display_progress(const char *label, 
 
 	printf("%s: %.2f%% complete, after %ds", label,
 	    (float)prog->progress * 100 / 0xffff, prog->elapsed_seconds);
-	if (prog->elapsed_seconds > 10) {
+	if (prog->progress != 0 && prog->elapsed_seconds > 10) {
 		printf(" finished in ");
 		seconds = (0x10000 * (uint32_t)prog->elapsed_seconds) /
 		    prog->progress - prog->elapsed_seconds;

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Mar  4 20:30:18 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 D05D7106566C;
	Fri,  4 Mar 2011 20:30:18 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A50928FC08;
	Fri,  4 Mar 2011 20:30:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p24KUI5V053312;
	Fri, 4 Mar 2011 20:30:18 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p24KUIrA053309;
	Fri, 4 Mar 2011 20:30:18 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201103042030.p24KUIrA053309@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 4 Mar 2011 20:30:18 +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: r219274 - stable/7/sys/vm
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, 04 Mar 2011 20:30:18 -0000

Author: brucec
Date: Fri Mar  4 20:30:18 2011
New Revision: 219274
URL: http://svn.freebsd.org/changeset/base/219274

Log:
  MFC r218966, r219124:
  
  Change the return type of vmspace_swap_count to a long to match the other
  vmspace_*_count functions.
  
  While here, clean up some style(9) issues.
  
  PR:   kern/152200

Modified:
  stable/7/sys/vm/swap_pager.c
  stable/7/sys/vm/vm_map.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/vm/swap_pager.c
==============================================================================
--- stable/7/sys/vm/swap_pager.c	Fri Mar  4 20:26:35 2011	(r219273)
+++ stable/7/sys/vm/swap_pager.c	Fri Mar  4 20:30:18 2011	(r219274)
@@ -2266,23 +2266,24 @@ SYSCTL_NODE(_vm, OID_AUTO, swap_info, CT
  *	if the VM object has any swap use at all the associated map entries
  *	count for at least 1 swap page.
  */
-int
+long
 vmspace_swap_count(struct vmspace *vmspace)
 {
-	vm_map_t map = &vmspace->vm_map;
+	vm_map_t map;
 	vm_map_entry_t cur;
-	int count = 0;
+	vm_object_t object;
+	long count, n;
 
-	for (cur = map->header.next; cur != &map->header; cur = cur->next) {
-		vm_object_t object;
+	map = &vmspace->vm_map;
+	count = 0;
 
+	for (cur = map->header.next; cur != &map->header; cur = cur->next) {
 		if ((cur->eflags & MAP_ENTRY_IS_SUB_MAP) == 0 &&
 		    (object = cur->object.vm_object) != NULL) {
 			VM_OBJECT_LOCK(object);
 			if (object->type == OBJT_SWAP &&
 			    object->un_pager.swp.swp_bcount != 0) {
-				int n = (cur->end - cur->start) / PAGE_SIZE;
-
+				n = (cur->end - cur->start) / PAGE_SIZE;
 				count += object->un_pager.swp.swp_bcount *
 				    SWAP_META_PAGES * n / object->size + 1;
 			}

Modified: stable/7/sys/vm/vm_map.h
==============================================================================
--- stable/7/sys/vm/vm_map.h	Fri Mar  4 20:26:35 2011	(r219273)
+++ stable/7/sys/vm/vm_map.h	Fri Mar  4 20:30:18 2011	(r219274)
@@ -376,6 +376,6 @@ int vm_map_unwire(vm_map_t map, vm_offse
     int flags);
 int vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
     int flags);
-int vmspace_swap_count (struct vmspace *vmspace);
+long vmspace_swap_count(struct vmspace *vmspace);
 #endif				/* _KERNEL */
 #endif				/* _VM_MAP_ */

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Mar  4 23:12: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 473C91065672;
	Fri,  4 Mar 2011 23:12:15 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1AB0C8FC17;
	Fri,  4 Mar 2011 23:12:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p24NCFjX069058;
	Fri, 4 Mar 2011 23:12:15 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p24NCEfE069056;
	Fri, 4 Mar 2011 23:12:14 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201103042312.p24NCEfE069056@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 4 Mar 2011 23:12:14 +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: r219278 - stable/7/sys/dev/acpica
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, 04 Mar 2011 23:12:15 -0000

Author: jkim
Date: Fri Mar  4 23:12:14 2011
New Revision: 219278
URL: http://svn.freebsd.org/changeset/base/219278

Log:
  MFC:	r218685, r218687
  
  Copy just enough data for the resource type.

Modified:
  stable/7/sys/dev/acpica/acpi_resource.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/acpica/acpi_resource.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_resource.c	Fri Mar  4 22:59:14 2011	(r219277)
+++ stable/7/sys/dev/acpica/acpi_resource.c	Fri Mar  4 23:12:14 2011	(r219278)
@@ -58,32 +58,35 @@ static ACPI_STATUS
 acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *context)
 {
     struct lookup_irq_request *req;
+    size_t len;
     u_int irqnum, irq;
 
     switch (res->Type) {
     case ACPI_RESOURCE_TYPE_IRQ:
+	irqnum = res->Data.Irq.InterruptCount;
+	irq = res->Data.Irq.Interrupts[0];
+	len = ACPI_RS_SIZE(ACPI_RESOURCE_IRQ);
+	break;
     case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
-	if (res->Type == ACPI_RESOURCE_TYPE_IRQ) {
-	    irqnum = res->Data.Irq.InterruptCount;
-	    irq = res->Data.Irq.Interrupts[0];
-	} else {
-	    irqnum = res->Data.ExtendedIrq.InterruptCount;
-	    irq = res->Data.ExtendedIrq.Interrupts[0];
-	}
-	if (irqnum != 1)
-	    break;
-	req = (struct lookup_irq_request *)context;
-	if (req->counter != req->rid) {
-	    req->counter++;
-	    break;
-	}
-	req->found = 1;
-	KASSERT(irq == rman_get_start(req->res),
-	    ("IRQ resources do not match"));
-	bcopy(res, req->acpi_res, sizeof(ACPI_RESOURCE));
-	return (AE_CTRL_TERMINATE);
+	irqnum = res->Data.ExtendedIrq.InterruptCount;
+	irq = res->Data.ExtendedIrq.Interrupts[0];
+	len = ACPI_RS_SIZE(ACPI_RESOURCE_EXTENDED_IRQ);
+	break;
+    default:
+	return (AE_OK);
+    }
+    if (irqnum != 1)
+	return (AE_OK);
+    req = (struct lookup_irq_request *)context;
+    if (req->counter != req->rid) {
+	req->counter++;
+	return (AE_OK);
     }
-    return (AE_OK);
+    req->found = 1;
+    KASSERT(irq == rman_get_start(req->res),
+	("IRQ resources do not match"));
+    bcopy(res, req->acpi_res, len);
+    return (AE_CTRL_TERMINATE);
 }
 
 ACPI_STATUS

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Mar  4 23:43:10 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 AC1CC106566C;
	Fri,  4 Mar 2011 23:43:10 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9A9C48FC1D;
	Fri,  4 Mar 2011 23:43:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p24NhAqg072573;
	Fri, 4 Mar 2011 23:43:10 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p24NhAe9072571;
	Fri, 4 Mar 2011 23:43:10 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201103042343.p24NhAe9072571@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 4 Mar 2011 23:43:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219279 - stable/7/sys/i386/cpufreq
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, 04 Mar 2011 23:43:10 -0000

Author: jkim
Date: Fri Mar  4 23:43:10 2011
New Revision: 219279
URL: http://svn.freebsd.org/changeset/base/219279

Log:
  MFC:	r219046
  
  Set C1 "I/O then Halt" capability bit for Intel EIST.  Some broken BIOSes
  refuse to load external SSDTs if this bit is unset for _PDC.

Modified:
  stable/7/sys/i386/cpufreq/est.c

Modified: stable/7/sys/i386/cpufreq/est.c
==============================================================================
--- stable/7/sys/i386/cpufreq/est.c	Fri Mar  4 23:12:14 2011	(r219278)
+++ stable/7/sys/i386/cpufreq/est.c	Fri Mar  4 23:43:10 2011	(r219279)
@@ -942,8 +942,11 @@ static int
 est_features(driver_t *driver, u_int *features)
 {
 
-	/* Notify the ACPI CPU that we support direct access to MSRs */
-	*features = ACPI_CAP_PERF_MSRS;
+	/*
+	 * Notify the ACPI CPU that we support direct access to MSRs.
+	 * XXX C1 "I/O then Halt" seems necessary for some broken BIOS.
+	 */
+	*features = ACPI_CAP_PERF_MSRS | ACPI_CAP_C1_IO_HALT;
 	return (0);
 }
 

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Mar  5 02:12:36 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 7B4141065673;
	Sat,  5 Mar 2011 02:12:36 +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 6062D8FC13;
	Sat,  5 Mar 2011 02:12:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p252CaPP089916;
	Sat, 5 Mar 2011 02:12:36 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p252CakQ089913;
	Sat, 5 Mar 2011 02:12:36 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201103050212.p252CakQ089913@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 5 Mar 2011 02:12:36 +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: r219284 - in stable/7/etc: periodic/daily 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: Sat, 05 Mar 2011 02:12:36 -0000

Author: dougb
Date: Sat Mar  5 02:12:36 2011
New Revision: 219284
URL: http://svn.freebsd.org/changeset/base/219284

Log:
  MFC r218961:
  
  Update how accounting log files are rotated, clean up the rc.d script
  a bit.
  
  MFC r218986:
  
  The new accounting file needs to be 644 so that unprivileged users
  can use lastcomm(1)

Modified:
  stable/7/etc/periodic/daily/310.accounting
  stable/7/etc/rc.d/accounting
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/periodic/daily/310.accounting
==============================================================================
--- stable/7/etc/periodic/daily/310.accounting	Sat Mar  5 02:11:23 2011	(r219283)
+++ stable/7/etc/periodic/daily/310.accounting	Sat Mar  5 02:12:36 2011	(r219284)
@@ -41,13 +41,16 @@ case "$daily_accounting_enable" in
 		m=$n
 		n=$(($n - 1))
 	    done
-	    cp -pf acct acct.0 || rc=3
-	    sa -s $daily_accounting_flags || rc=3
+
+	    /etc/rc.d/accounting rotate_log || rc=3
 
 	    case "$daily_accounting_compress" in
 		[Yy][Ee][Ss])
-		    gzip -f acct.0 || rc=3;;
+		    gzip --keep -f acct.0 || rc=3;;
 	    esac
+
+	    sa -s $daily_accounting_flags /var/account/acct.0 &&
+		unlink acct.0 || rc=3
 	fi;;
 
     *)  rc=0;;

Modified: stable/7/etc/rc.d/accounting
==============================================================================
--- stable/7/etc/rc.d/accounting	Sat Mar  5 02:11:23 2011	(r219283)
+++ stable/7/etc/rc.d/accounting	Sat Mar  5 02:12:36 2011	(r219284)
@@ -14,28 +14,31 @@ name="accounting"
 rcvar=`set_rcvar`
 accounting_command="/usr/sbin/accton"
 accounting_file="/var/account/acct"
+
+extra_commands="rotate_log"
+
 start_cmd="accounting_start"
 stop_cmd="accounting_stop"
+rotate_log_cmd="accounting_rotate_log"
 
 accounting_start()
 {
 	local _dir
 
-	_dir=`dirname "$accounting_file"`
-	if [ ! -d `dirname "$_dir"` ]; then
+	_dir="${accounting_file%/*}"
+	if [ ! -d "$_dir" ]; then
 		if ! mkdir -p "$_dir"; then
-			warn "Could not create $_dir."
-			return 1
+			err 1 "Could not create $_dir."
 		fi
 	fi
+
 	if [ ! -e "$accounting_file" ]; then
+		echo -n "Creating accounting file ${accounting_file}"
 		touch "$accounting_file"
+		echo '.'
 	fi
+	chmod 644 "$accounting_file"
 
-	if [ ! -f ${accounting_file} ]; then
-		echo "Creating accounting file ${accounting_file}"
-		( umask 022 ; > ${accounting_file} )
-	fi
 	echo "Turning on accounting."
 	${accounting_command} ${accounting_file}
 }
@@ -46,5 +49,27 @@ accounting_stop()
 	${accounting_command}
 }
 
+accounting_rotate_log()
+{
+	local _dir _file
+
+	_dir="${accounting_file%/*}"
+	cd $_dir
+
+	if checkyesno accounting_enable; then
+		_file=`mktemp newacct-XXXXX`
+		chmod 644 $_file
+		${accounting_command} ${_dir}/${_file}
+	fi
+
+	mv ${accounting_file} ${accounting_file}.0
+
+	if checkyesno accounting_enable; then
+		ln $_file ${accounting_file##*/}
+		${accounting_command} ${accounting_file}
+		unlink $_file
+	fi
+}
+
 load_rc_config $name
 run_rc_command "$1"

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Mar  5 04:08:07 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 985991065670;
	Sat,  5 Mar 2011 04:08:07 +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 859428FC16;
	Sat,  5 Mar 2011 04:08:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p25487PD004161;
	Sat, 5 Mar 2011 04:08:07 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p254875B004159;
	Sat, 5 Mar 2011 04:08:07 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201103050408.p254875B004159@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 5 Mar 2011 04:08:07 +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: r219295 - stable/7/usr.bin/stat
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: Sat, 05 Mar 2011 04:08:07 -0000

Author: dougb
Date: Sat Mar  5 04:08:07 2011
New Revision: 219295
URL: http://svn.freebsd.org/changeset/base/219295

Log:
  MFC r218535:
  
  Synthesize the change from NetBSD's 1.33:
  
  "Do not crash if a date cannot be represented (localtime returning
  NULL), use the Epoch value instead."
  
  Obtained from:  njoly@NetBSD.org

Modified:
  stable/7/usr.bin/stat/stat.c
Directory Properties:
  stable/7/usr.bin/stat/   (props changed)

Modified: stable/7/usr.bin/stat/stat.c
==============================================================================
--- stable/7/usr.bin/stat/stat.c	Sat Mar  5 04:06:12 2011	(r219294)
+++ stable/7/usr.bin/stat/stat.c	Sat Mar  5 04:08:07 2011	(r219295)
@@ -30,7 +30,7 @@
 #include 
 #if 0
 #ifndef lint
-__RCSID("$NetBSD: stat.c,v 1.31 2010/12/16 05:30:16 dholland Exp $"
+__RCSID("$NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $"
 "$OpenBSD: stat.c,v 1.14 2009/06/24 09:44:25 sobrado Exp $");
 #endif
 #endif
@@ -724,6 +724,10 @@ format1(const struct stat *st,
 		small = (sizeof(ts.tv_sec) == 4);
 		data = ts.tv_sec;
 		tm = localtime(&ts.tv_sec);
+		if (tm == NULL) {
+			ts.tv_sec = 0;
+			tm = localtime(&ts.tv_sec);
+		}
 		(void)strftime(path, sizeof(path), timefmt, tm);
 		sdata = path;
 		formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX |

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Mar  5 04:11:07 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 27A01106566C;
	Sat,  5 Mar 2011 04:11:07 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 112CB8FC1A;
	Sat,  5 Mar 2011 04:11:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p254B6J1004527;
	Sat, 5 Mar 2011 04:11:06 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p254B6FW004516;
	Sat, 5 Mar 2011 04:11:06 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201103050411.p254B6FW004516@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 5 Mar 2011 04:11:06 +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: r219296 - in stable/7: lib/libc/yp lib/libkse/thread
	libexec/talkd share/man/man7 sys/boot/i386/cdboot
	sys/boot/pc98/cdboot sys/dev/ti sys/i386/isa usr.bin/checknr
	usr.bin/xlint/lint1
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: Sat, 05 Mar 2011 04:11:07 -0000

Author: brucec
Date: Sat Mar  5 04:11:06 2011
New Revision: 219296
URL: http://svn.freebsd.org/changeset/base/219296

Log:
  MFC r177626, r219096, r219126:
  
  Fix some "in in" typos in comments.
  
  PR:		121490
  Submitted by:	Anatoly Borodin 

Modified:
  stable/7/lib/libc/yp/xdryp.c
  stable/7/lib/libkse/thread/thr_sig.c
  stable/7/libexec/talkd/announce.c
  stable/7/share/man/man7/security.7
  stable/7/sys/boot/i386/cdboot/cdboot.s
  stable/7/sys/boot/pc98/cdboot/cdboot.s
  stable/7/sys/dev/ti/if_ti.c
  stable/7/sys/i386/isa/vesa.c
  stable/7/usr.bin/checknr/checknr.c
  stable/7/usr.bin/xlint/lint1/lint1.h
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)
  stable/7/lib/libkse/   (props changed)
  stable/7/libexec/talkd/   (props changed)
  stable/7/share/man/man7/   (props changed)
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/usr.bin/checknr/   (props changed)
  stable/7/usr.bin/xlint/   (props changed)

Modified: stable/7/lib/libc/yp/xdryp.c
==============================================================================
--- stable/7/lib/libc/yp/xdryp.c	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/lib/libc/yp/xdryp.c	Sat Mar  5 04:11:06 2011	(r219296)
@@ -42,7 +42,7 @@ extern void *ypresp_data;
  * I'm leaving the xdr_datum() function in purely for backwards
  * compatibility. yplib.c doesn't actually use it, but it's listed
  * in yp_prot.h as being available, so it's probably a good idea to
- * leave it in in case somebody goes looking for it.
+ * leave it in case somebody goes looking for it.
  */
 typedef struct {
 	char *dptr;

Modified: stable/7/lib/libkse/thread/thr_sig.c
==============================================================================
--- stable/7/lib/libkse/thread/thr_sig.c	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/lib/libkse/thread/thr_sig.c	Sat Mar  5 04:11:06 2011	(r219296)
@@ -663,7 +663,7 @@ thr_sig_find(struct kse *curkse, int sig
 	 * Enter a loop to look for threads that have the signal
 	 * unmasked.  POSIX specifies that a thread in a sigwait
 	 * will get the signal over any other threads.  Second
-	 * preference will be threads in in a sigsuspend.  Third
+	 * preference will be threads in a sigsuspend.  Third
 	 * preference will be the current thread.  If none of the
 	 * above, then the signal is delivered to the first thread
 	 * that is found.  Note that if a custom handler is not

Modified: stable/7/libexec/talkd/announce.c
==============================================================================
--- stable/7/libexec/talkd/announce.c	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/libexec/talkd/announce.c	Sat Mar  5 04:11:06 2011	(r219296)
@@ -91,7 +91,7 @@ announce(CTL_MSG *request, const char *r
  * Build a block of characters containing the message.
  * It is sent blank filled and in a single block to
  * try to keep the message in one piece if the recipient
- * in in vi at the time
+ * in vi at the time
  */
 int
 print_mesg(const char *tty, CTL_MSG *request,

Modified: stable/7/share/man/man7/security.7
==============================================================================
--- stable/7/share/man/man7/security.7	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/share/man/man7/security.7	Sat Mar  5 04:11:06 2011	(r219296)
@@ -138,7 +138,7 @@ This gives you a convenient way to detec
 Making
 it impossible for an attacker to install a backdoor may actually be detrimental
 to your security because it will not close off the hole the attacker used to
-break in in the first place.
+break in originally.
 .Pp
 Security remedies should always be implemented with a multi-layered
 .Dq onion peel

Modified: stable/7/sys/boot/i386/cdboot/cdboot.s
==============================================================================
--- stable/7/sys/boot/i386/cdboot/cdboot.s	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/sys/boot/i386/cdboot/cdboot.s	Sat Mar  5 04:11:06 2011	(r219296)
@@ -174,7 +174,7 @@ lookup_path:	push %si			# Save file name
 lookup_found:					# Found a loader file
 #
 # Load the binary into the buffer.  Due to real mode addressing limitations
-# we have to read it in in 64k chunks.
+# we have to read it in 64k chunks.
 #
 		mov DIR_SIZE(%bx),%eax		# Read file length
 		add $SECTOR_SIZE-1,%eax		# Convert length to sectors

Modified: stable/7/sys/boot/pc98/cdboot/cdboot.s
==============================================================================
--- stable/7/sys/boot/pc98/cdboot/cdboot.s	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/sys/boot/pc98/cdboot/cdboot.s	Sat Mar  5 04:11:06 2011	(r219296)
@@ -415,7 +415,7 @@ lookup_path:	push %si			# Save file name
 lookup_found:					# Found a loader file
 #
 # Load the binary into the buffer.  Due to real mode addressing limitations
-# we have to read it in in 64k chunks.
+# we have to read it in 64k chunks.
 #
 		mov %es:DIR_SIZE(%bx),%eax	# Read file length
 		add $SECTOR_SIZE-1,%eax		# Convert length to sectors

Modified: stable/7/sys/dev/ti/if_ti.c
==============================================================================
--- stable/7/sys/dev/ti/if_ti.c	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/sys/dev/ti/if_ti.c	Sat Mar  5 04:11:06 2011	(r219296)
@@ -3685,7 +3685,7 @@ ti_ioctl2(struct cdev *dev, u_long cmd, 
 		 * to the Tigon board you're interested in.  This seems
 		 * like a not-so-good way to do things, since unless you
 		 * subsequently specify the unit number of the device
-		 * you're interested in in every ioctl, you'll only be
+		 * you're interested in every ioctl, you'll only be
 		 * able to debug one board at a time.
 		 */
 		error = 0;

Modified: stable/7/sys/i386/isa/vesa.c
==============================================================================
--- stable/7/sys/i386/isa/vesa.c	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/sys/i386/isa/vesa.c	Sat Mar  5 04:11:06 2011	(r219296)
@@ -1392,7 +1392,7 @@ get_palette(video_adapter_t *adp, int ba
 	}
 	free(r, M_DEVBUF);
 
-	/* if error && bits != 6 at this point, we are in in trouble... XXX */
+	/* if error && bits != 6 at this point, we are in trouble... XXX */
 	return error;
 }
 

Modified: stable/7/usr.bin/checknr/checknr.c
==============================================================================
--- stable/7/usr.bin/checknr/checknr.c	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/usr.bin/checknr/checknr.c	Sat Mar  5 04:11:06 2011	(r219296)
@@ -83,7 +83,7 @@ struct stkstr {
 	int opno;	/* number of opening bracket */
 	int pl;		/* '+', '-', ' ' for \s, 1 for \f, 0 for .ft */
 	int parm;	/* parm to size, font, etc */
-	int lno;	/* line number the thing came in in */
+	int lno;	/* line number */
 } stk[MAXSTK];
 int stktop;
 

Modified: stable/7/usr.bin/xlint/lint1/lint1.h
==============================================================================
--- stable/7/usr.bin/xlint/lint1/lint1.h	Sat Mar  5 04:08:07 2011	(r219295)
+++ stable/7/usr.bin/xlint/lint1/lint1.h	Sat Mar  5 04:11:06 2011	(r219296)
@@ -325,7 +325,7 @@ typedef	struct dinfo {
 	u_int	d_mscl : 1;	/* multiple storage classes */
 	u_int	d_terr : 1;	/* invalid type combination */
 	u_int	d_nedecl : 1;	/* 1 if at least a tag is declared */
-	u_int	d_vararg : 1;	/* ... in in current function decl. */
+	u_int	d_vararg : 1;	/* ... in current function decl. */
 	u_int	d_proto : 1;	/* current funct. decl. is prototype */
 	u_int	d_notyp : 1;	/* set if no type specifier was present */
 	u_int	d_asm : 1;	/* set if d_ctx == AUTO and asm() present */

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Mar  5 04:18:29 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 76508106564A;
	Sat,  5 Mar 2011 04:18:29 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 632018FC12;
	Sat,  5 Mar 2011 04:18:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p254ITTT005364;
	Sat, 5 Mar 2011 04:18:29 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p254ITht005362;
	Sat, 5 Mar 2011 04:18:29 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201103050418.p254ITht005362@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 5 Mar 2011 04:18:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219298 - stable/7/contrib/lukemftp/src
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: Sat, 05 Mar 2011 04:18:29 -0000

Author: brucec
Date: Sat Mar  5 04:18:29 2011
New Revision: 219298
URL: http://svn.freebsd.org/changeset/base/219298

Log:
  MFC r219081:
  
  Merge fix from r1.108 of NetBSD's usr.bin/ftp/main.c:
  
  Only attempt to el_parse() a command unknown by the default parser
  if editing is enabled.
  
  PR:           bin/100089

Modified:
  stable/7/contrib/lukemftp/src/main.c
Directory Properties:
  stable/7/contrib/lukemftp/   (props changed)

Modified: stable/7/contrib/lukemftp/src/main.c
==============================================================================
--- stable/7/contrib/lukemftp/src/main.c	Sat Mar  5 04:15:46 2011	(r219297)
+++ stable/7/contrib/lukemftp/src/main.c	Sat Mar  5 04:18:29 2011	(r219298)
@@ -707,6 +707,7 @@ cmdscanner(void)
 			 * such commands as invalid.
 			 */
 			if (strchr(margv[0], ':') != NULL ||
+			    !editing ||
 			    el_parse(el, margc, (const char **)margv) != 0)
 #endif /* !NO_EDITCOMPLETE */
 				fputs("?Invalid command.\n", ttyout);

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Mar  5 04:33:42 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 A6AFC106566B;
	Sat,  5 Mar 2011 04:33:42 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 921408FC12;
	Sat,  5 Mar 2011 04:33:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p254Xgvq007254;
	Sat, 5 Mar 2011 04:33:42 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p254XgGx007248;
	Sat, 5 Mar 2011 04:33:42 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201103050433.p254XgGx007248@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 5 Mar 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: r219301 - in stable/7: lib/libc/rpc/PSD.doc sbin/growfs
	share/doc/papers/devfs sys/fs/nullfs usr.bin/tip/tip
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: Sat, 05 Mar 2011 04:33:42 -0000

Author: brucec
Date: Sat Mar  5 04:33:42 2011
New Revision: 219301
URL: http://svn.freebsd.org/changeset/base/219301

Log:
  MFC r218965, r219055:
  
  Fix typos - remove duplicate "is".
  
  PR:           docs/154934
  Submitted by: Eitan Adler 

Modified:
  stable/7/lib/libc/rpc/PSD.doc/rpc.prog.ms
  stable/7/sbin/growfs/growfs.c
  stable/7/share/doc/papers/devfs/paper.me
  stable/7/sys/fs/nullfs/null_vnops.c
  stable/7/usr.bin/tip/tip/tip.h
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)
  stable/7/sbin/growfs/   (props changed)
  stable/7/share/doc/papers/devfs/   (props changed)
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/usr.bin/tip/   (props changed)

Modified: stable/7/lib/libc/rpc/PSD.doc/rpc.prog.ms
==============================================================================
--- stable/7/lib/libc/rpc/PSD.doc/rpc.prog.ms	Sat Mar  5 04:27:02 2011	(r219300)
+++ stable/7/lib/libc/rpc/PSD.doc/rpc.prog.ms	Sat Mar  5 04:33:42 2011	(r219301)
@@ -71,7 +71,7 @@ manual page.
 .I "The Highest Layer:"
 .IX RPC "The Highest Layer"
 The highest layer is totally transparent to the operating system,
-machine and network upon which is is run.  It's probably best to
+machine and network upon which it is run.  It's probably best to
 think of this level as a way of
 .I using
 RPC, rather than as

Modified: stable/7/sbin/growfs/growfs.c
==============================================================================
--- stable/7/sbin/growfs/growfs.c	Sat Mar  5 04:27:02 2011	(r219300)
+++ stable/7/sbin/growfs/growfs.c	Sat Mar  5 04:33:42 2011	(r219301)
@@ -646,7 +646,7 @@ cond_bl_upd(ufs2_daddr_t *block, struct 
 		/*
 		 * Copy the block back immediately.
 		 *
-		 * XXX	If src is is from an indirect block we have
+		 * XXX	If src is from an indirect block we have
 		 *	to implement copy on write here in case of
 		 *	active snapshots.
 		 */

Modified: stable/7/share/doc/papers/devfs/paper.me
==============================================================================
--- stable/7/share/doc/papers/devfs/paper.me	Sat Mar  5 04:27:02 2011	(r219300)
+++ stable/7/share/doc/papers/devfs/paper.me	Sat Mar  5 04:33:42 2011	(r219301)
@@ -779,7 +779,7 @@ The entry points to the device driver ar
 structure, removing the need for the devsw[] array and allowing
 device drivers to use separate entrypoints for various minor numbers.
 .lp
-This is is very convenient for devices which have a ``control''
+This is very convenient for devices which have a ``control''
 device for management and tuning.  The control device, almost always
 have entirely separate open/close/ioctl implementations [MD.C].
 .lp

Modified: stable/7/sys/fs/nullfs/null_vnops.c
==============================================================================
--- stable/7/sys/fs/nullfs/null_vnops.c	Sat Mar  5 04:27:02 2011	(r219300)
+++ stable/7/sys/fs/nullfs/null_vnops.c	Sat Mar  5 04:33:42 2011	(r219301)
@@ -631,7 +631,7 @@ null_islocked(struct vop_islocked_args *
  * as soon as possible.
  *
  * Note, we can't release any resources nor remove vnode from hash before 
- * appropriate VXLOCK stuff is is done because other process can find this
+ * appropriate VXLOCK stuff is done because other process can find this
  * vnode in hash during inactivation and may be sitting in vget() and waiting
  * for null_inactive to unlock vnode. Thus we will do all those in VOP_RECLAIM.
  */

Modified: stable/7/usr.bin/tip/tip/tip.h
==============================================================================
--- stable/7/usr.bin/tip/tip/tip.h	Sat Mar  5 04:27:02 2011	(r219300)
+++ stable/7/usr.bin/tip/tip/tip.h	Sat Mar  5 04:33:42 2011	(r219301)
@@ -259,7 +259,7 @@ int	intflag;		/* recognized interrupt */
 int	stoprompt;		/* for interrupting a prompt session */
 int	timedout;		/* ~> transfer timedout */
 int	cumode;			/* simulating the "cu" program */
-int	bits8;			/* terminal is is 8-bit mode */
+int	bits8;			/* terminal is 8-bit mode */
 #define STRIP_PAR	(bits8 ? 0377 : 0177)
 
 char	fname[PATH_MAX];	/* file name buffer for ~< */