From owner-svn-src-stable-8@FreeBSD.ORG Mon Jun 17 04:42:02 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C40F29FC; Mon, 17 Jun 2013 04:42:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B60ED1AA1; Mon, 17 Jun 2013 04:42:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5H4g2EK024994; Mon, 17 Jun 2013 04:42:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5H4g2eW024993; Mon, 17 Jun 2013 04:42:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201306170442.r5H4g2eW024993@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 17 Jun 2013 04:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251830 - stable/8/sys/dev/fxp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 04:42:02 -0000 Author: yongari Date: Mon Jun 17 04:42:02 2013 New Revision: 251830 URL: http://svnweb.freebsd.org/changeset/base/251830 Log: MFC r251600: Avoid unnecessary controller reinitialization by checking driver running state. fxp(4) requires controller reinitialization for the following cases. o RX lockup condition on i82557 o promiscuous mode change o multicast filter change o WOL configuration o TSO/VLAN hardware tagging/checksum offloading configuration o MAC reprogramming after speed/duplex/flow-control resolution o Any events that result in MAC reprogramming(link UP/DOWN, remote link partner's restart of auto-negotiation etc) o Microcode loading/unloading Apart from above cases which come from hardware limitation, upper stack also blindly reinitializes controller whenever an IP address is assigned. After r194573, fxp(4) no longer needs to reinitialize the controller to program multicast filter after upping the interface. So keeping track of driver running state should remove all unnecessary controller reinitializations. This change will also address endless controller reinitialization triggered by dhclient(8). Modified: stable/8/sys/dev/fxp/if_fxp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/fxp/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Mon Jun 17 04:40:27 2013 (r251829) +++ stable/8/sys/dev/fxp/if_fxp.c Mon Jun 17 04:42:02 2013 (r251830) @@ -1074,7 +1074,8 @@ fxp_suspend(device_t dev) pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; sc->flags |= FXP_FLAG_WOL; /* Reconfigure hardware to accept magic frames. */ - fxp_init_body(sc, 1); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + fxp_init_body(sc, 0); } pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2); } @@ -2140,8 +2141,10 @@ fxp_tick(void *xsc) */ if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) { sc->rx_idle_secs = 0; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 1); + } return; } /* @@ -2239,6 +2242,7 @@ fxp_watchdog(struct fxp_softc *sc) device_printf(sc->dev, "device timeout\n"); sc->ifp->if_oerrors++; + sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 1); } @@ -2273,6 +2277,10 @@ fxp_init_body(struct fxp_softc *sc, int int i, prm; FXP_LOCK_ASSERT(sc, MA_OWNED); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + /* * Cancel any pending I/O */ @@ -2812,6 +2820,7 @@ fxp_miibus_statchg(device_t dev) */ if (sc->revision == FXP_REV_82557) return; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); } @@ -2835,9 +2844,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm if (ifp->if_flags & IFF_UP) { if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) && ((ifp->if_flags ^ sc->if_flags) & - (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) + (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); - else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) fxp_init_body(sc, 1); } else { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) @@ -2850,8 +2860,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: FXP_LOCK(sc); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); + } FXP_UNLOCK(sc); break; @@ -2941,8 +2953,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm ~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM); reinit++; } - if (reinit > 0 && ifp->if_flags & IFF_UP) + if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); + } FXP_UNLOCK(sc); VLAN_CAPABILITIES(ifp); break; From owner-svn-src-stable-8@FreeBSD.ORG Mon Jun 17 14:56:50 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8B29D318; Mon, 17 Jun 2013 14:56:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 646B61C24; Mon, 17 Jun 2013 14:56:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5HEuolp021612; Mon, 17 Jun 2013 14:56:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5HEuoNv021611; Mon, 17 Jun 2013 14:56:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201306171456.r5HEuoNv021611@svn.freebsd.org> From: Alexander Motin Date: Mon, 17 Jun 2013 14:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251851 - stable/8/sys/dev/mvs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 14:56:50 -0000 Author: mav Date: Mon Jun 17 14:56:49 2013 New Revision: 251851 URL: http://svnweb.freebsd.org/changeset/base/251851 Log: MFC r251661: Replicate r242422 from ata(4) to mvs(4): Only four specific ATA PIO commands transfer several sectors per DRQ block (interrupt). All other ATA PIO commands transfer one sector or 512 bytes at one time. Hardcode these exceptions in mvs(4). This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`. Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`. Modified: stable/8/sys/dev/mvs/mvs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mvs/ (props changed) Modified: stable/8/sys/dev/mvs/mvs.c ============================================================================== --- stable/8/sys/dev/mvs/mvs.c Mon Jun 17 14:55:02 2013 (r251850) +++ stable/8/sys/dev/mvs/mvs.c Mon Jun 17 14:56:49 2013 (r251851) @@ -893,7 +893,7 @@ mvs_legacy_intr(device_t dev, int poll) if (ccb->ataio.dxfer_len > ch->donecount) { /* Set this transfer size according to HW capabilities */ ch->transfersize = min(ccb->ataio.dxfer_len - ch->donecount, - ch->curr[ccb->ccb_h.target_id].bytecount); + ch->transfersize); /* If data write command - put them */ if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) { if (mvs_wait(dev, ATA_S_DRQ, ATA_S_BUSY, 1000) < 0) { @@ -1343,8 +1343,14 @@ mvs_legacy_execute_transaction(struct mv return; } ch->donecount = 0; - ch->transfersize = min(ccb->ataio.dxfer_len, - ch->curr[port].bytecount); + if (ccb->ataio.cmd.command == ATA_READ_MUL || + ccb->ataio.cmd.command == ATA_READ_MUL48 || + ccb->ataio.cmd.command == ATA_WRITE_MUL || + ccb->ataio.cmd.command == ATA_WRITE_MUL48) { + ch->transfersize = min(ccb->ataio.dxfer_len, + ch->curr[port].bytecount); + } else + ch->transfersize = min(ccb->ataio.dxfer_len, 512); if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) ch->fake_busy = 1; /* If data write command - output the data */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Jun 17 15:01:41 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 617CF91E; Mon, 17 Jun 2013 15:01:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 53D9C1C6F; Mon, 17 Jun 2013 15:01:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5HF1fnh024473; Mon, 17 Jun 2013 15:01:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5HF1fDf024472; Mon, 17 Jun 2013 15:01:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201306171501.r5HF1fDf024472@svn.freebsd.org> From: Alexander Motin Date: Mon, 17 Jun 2013 15:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251853 - stable/8/sbin/camcontrol X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 15:01:41 -0000 Author: mav Date: Mon Jun 17 15:01:40 2013 New Revision: 251853 URL: http://svnweb.freebsd.org/changeset/base/251853 Log: MFC r251659: Use CAM_DIR_NONE for requests without data. Wrong values there confuse some drivers. Modified: stable/8/sbin/camcontrol/camcontrol.c Directory Properties: stable/8/sbin/camcontrol/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Mon Jun 17 14:59:23 2013 (r251852) +++ stable/8/sbin/camcontrol/camcontrol.c Mon Jun 17 15:01:40 2013 (r251853) @@ -1716,7 +1716,7 @@ ata_read_native_max(struct cam_device *d error = ata_do_cmd(device, ccb, retry_count, - /*flags*/CAM_DIR_IN, + /*flags*/CAM_DIR_NONE, /*protocol*/protocol, /*ata_flags*/AP_FLAG_CHK_COND, /*tag_action*/MSG_SIMPLE_Q_TAG, @@ -1760,7 +1760,7 @@ atahpa_set_max(struct cam_device *device error = ata_do_cmd(device, ccb, retry_count, - /*flags*/CAM_DIR_OUT, + /*flags*/CAM_DIR_NONE, /*protocol*/protocol, /*ata_flags*/AP_FLAG_CHK_COND, /*tag_action*/MSG_SIMPLE_Q_TAG, @@ -1827,7 +1827,7 @@ atahpa_lock(struct cam_device *device, i error = ata_do_cmd(device, ccb, retry_count, - /*flags*/CAM_DIR_OUT, + /*flags*/CAM_DIR_NONE, /*protocol*/protocol, /*ata_flags*/AP_FLAG_CHK_COND, /*tag_action*/MSG_SIMPLE_Q_TAG, @@ -1894,7 +1894,7 @@ atahpa_freeze_lock(struct cam_device *de error = ata_do_cmd(device, ccb, retry_count, - /*flags*/CAM_DIR_OUT, + /*flags*/CAM_DIR_NONE, /*protocol*/protocol, /*ata_flags*/AP_FLAG_CHK_COND, /*tag_action*/MSG_SIMPLE_Q_TAG, From owner-svn-src-stable-8@FreeBSD.ORG Mon Jun 17 20:18:12 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D0613BA7; Mon, 17 Jun 2013 20:18:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C2C601D51; Mon, 17 Jun 2013 20:18:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5HKICq6026194; Mon, 17 Jun 2013 20:18:12 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5HKICY0026193; Mon, 17 Jun 2013 20:18:12 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201306172018.r5HKICY0026193@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 17 Jun 2013 20:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251865 - stable/8/share/man/man4 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 20:18:12 -0000 Author: ae Date: Mon Jun 17 20:18:12 2013 New Revision: 251865 URL: http://svnweb.freebsd.org/changeset/base/251865 Log: MFC r249252: Remove reference to the nonexistent sysctl node net.inet6.mld.stats. Also add cross reference to the icmp6(4). PR: 177696 Modified: stable/8/share/man/man4/mld.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/mld.4 ============================================================================== --- stable/8/share/man/man4/mld.4 Mon Jun 17 20:17:56 2013 (r251864) +++ stable/8/share/man/man4/mld.4 Mon Jun 17 20:18:12 2013 (r251865) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2009 +.Dd April 8, 2013 .Dt MLD 4 .Os .Sh NAME @@ -69,11 +69,6 @@ to the protocol. .Pp .Bl -tag -width indent .\" -.It net.inet6.mld.stats -This opaque read-only variable exposes the stack-wide MLDv2 -protocol statistics to -.Xr netstat 1 . -.\" .It net.inet6.mld.ifinfo This opaque read-only variable exposes the per-link MLDv2 status to .Xr ifmcstat 8 . @@ -95,6 +90,7 @@ This sysctl is normally enabled by defau .\" .El .Sh SEE ALSO +.Xr icmp6 4 , .Xr ifmcstat 8 , .Xr inet 4 , .Xr multicast 4 , From owner-svn-src-stable-8@FreeBSD.ORG Tue Jun 18 04:04:16 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 19A98D9D; Tue, 18 Jun 2013 04:04:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA88169A; Tue, 18 Jun 2013 04:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5I44F4G077560; Tue, 18 Jun 2013 04:04:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5I44FmE077558; Tue, 18 Jun 2013 04:04:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201306180404.r5I44FmE077558@svn.freebsd.org> From: Xin LI Date: Tue, 18 Jun 2013 04:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251890 - stable/8/sys/dev/mpt X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 04:04:16 -0000 Author: delphij Date: Tue Jun 18 04:04:15 2013 New Revision: 251890 URL: http://svnweb.freebsd.org/changeset/base/251890 Log: MFC r251187: Explicitly use a pair of parentheses to ensure correct evaluation ordering for bitwise operation. Submitted by: swildner (DragonFly) Modified: stable/8/sys/dev/mpt/mpt_raid.c stable/8/sys/dev/mpt/mpt_user.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mpt/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_raid.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_raid.c Tue Jun 18 04:03:12 2013 (r251889) +++ stable/8/sys/dev/mpt/mpt_raid.c Tue Jun 18 04:04:15 2013 (r251890) @@ -605,7 +605,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | - write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); + (write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST))); se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | raid_handler_id); Modified: stable/8/sys/dev/mpt/mpt_user.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_user.c Tue Jun 18 04:03:12 2013 (r251889) +++ stable/8/sys/dev/mpt/mpt_user.c Tue Jun 18 04:04:15 2013 (r251890) @@ -548,8 +548,8 @@ mpt_user_raid_action(struct mpt_softc *m MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | - raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC : - MPI_SGE_FLAGS_IOC_TO_HOST)); + (raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC : + MPI_SGE_FLAGS_IOC_TO_HOST))); } se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | user_handler_id); From owner-svn-src-stable-8@FreeBSD.ORG Tue Jun 18 04:06:13 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0671113B; Tue, 18 Jun 2013 04:06:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ECD0F16C2; Tue, 18 Jun 2013 04:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5I46CNA078026; Tue, 18 Jun 2013 04:06:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5I46C4w078024; Tue, 18 Jun 2013 04:06:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201306180406.r5I46C4w078024@svn.freebsd.org> From: Xin LI Date: Tue, 18 Jun 2013 04:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251892 - stable/8/lib/libcam X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 04:06:13 -0000 Author: delphij Date: Tue Jun 18 04:06:12 2013 New Revision: 251892 URL: http://svnweb.freebsd.org/changeset/base/251892 Log: MFC r251349: Fix a typo: XPORT_SPI should be tested against transport, nor protocol. Submitted by: Sascha Wildner Reviewed by: mjacob Modified: stable/8/lib/libcam/camlib.c Directory Properties: stable/8/lib/libcam/ (props changed) Modified: stable/8/lib/libcam/camlib.c ============================================================================== --- stable/8/lib/libcam/camlib.c Tue Jun 18 04:05:37 2013 (r251891) +++ stable/8/lib/libcam/camlib.c Tue Jun 18 04:06:12 2013 (r251892) @@ -686,7 +686,7 @@ cam_real_open_device(const char *path, i "%s: %s", func_name, func_name, strerror(errno)); goto crod_bailout; } - if (ccb.cts.protocol == XPORT_SPI) { + if (ccb.cts.transport == XPORT_SPI) { struct ccb_trans_settings_spi *spi = &ccb.cts.xport_specific.spi; device->sync_period = spi->sync_period; From owner-svn-src-stable-8@FreeBSD.ORG Tue Jun 18 09:36:02 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 22906171; Tue, 18 Jun 2013 09:36:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EF09D1B48; Tue, 18 Jun 2013 09:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5I9a1bD087490; Tue, 18 Jun 2013 09:36:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5I9a1lQ087485; Tue, 18 Jun 2013 09:36:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201306180936.r5I9a1lQ087485@svn.freebsd.org> From: Alexander Motin Date: Tue, 18 Jun 2013 09:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251923 - in stable/8/sys/geom: gate nop raid X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 09:36:02 -0000 Author: mav Date: Tue Jun 18 09:36:01 2013 New Revision: 251923 URL: http://svnweb.freebsd.org/changeset/base/251923 Log: MFC r248720: Remove extra bio_data and bio_length copying to child request after calling g_clone_bio(), that already copied them. Modified: stable/8/sys/geom/gate/g_gate.c stable/8/sys/geom/nop/g_nop.c stable/8/sys/geom/raid/tr_raid1e.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/gate/g_gate.c ============================================================================== --- stable/8/sys/geom/gate/g_gate.c Tue Jun 18 09:34:36 2013 (r251922) +++ stable/8/sys/geom/gate/g_gate.c Tue Jun 18 09:36:01 2013 (r251923) @@ -242,8 +242,6 @@ g_gate_start(struct bio *pbp) } cbp->bio_done = g_gate_done; cbp->bio_offset = pbp->bio_offset + sc->sc_readoffset; - cbp->bio_data = pbp->bio_data; - cbp->bio_length = pbp->bio_length; cbp->bio_to = sc->sc_readcons->provider; g_io_request(cbp, sc->sc_readcons); return; Modified: stable/8/sys/geom/nop/g_nop.c ============================================================================== --- stable/8/sys/geom/nop/g_nop.c Tue Jun 18 09:34:36 2013 (r251922) +++ stable/8/sys/geom/nop/g_nop.c Tue Jun 18 09:36:01 2013 (r251923) @@ -111,8 +111,6 @@ g_nop_start(struct bio *bp) } cbp->bio_done = g_std_done; cbp->bio_offset = bp->bio_offset + sc->sc_offset; - cbp->bio_data = bp->bio_data; - cbp->bio_length = bp->bio_length; pp = LIST_FIRST(&gp->provider); KASSERT(pp != NULL, ("NULL pp")); cbp->bio_to = pp; Modified: stable/8/sys/geom/raid/tr_raid1e.c ============================================================================== --- stable/8/sys/geom/raid/tr_raid1e.c Tue Jun 18 09:34:36 2013 (r251922) +++ stable/8/sys/geom/raid/tr_raid1e.c Tue Jun 18 09:36:01 2013 (r251923) @@ -1076,8 +1076,6 @@ rebuild_round_done: offset += vol->v_strip_size; } cbp->bio_offset = offset + start; - cbp->bio_length = bp->bio_length; - cbp->bio_data = bp->bio_data; cbp->bio_cmd = BIO_WRITE; cbp->bio_cflags = G_RAID_BIO_FLAG_REMAP; cbp->bio_caller2 = (void *)mask; From owner-svn-src-stable-8@FreeBSD.ORG Tue Jun 18 09:48:56 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9CA7D2C2; Tue, 18 Jun 2013 09:48:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8F93C1C67; Tue, 18 Jun 2013 09:48:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5I9mu1W092235; Tue, 18 Jun 2013 09:48:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5I9muvP092234; Tue, 18 Jun 2013 09:48:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201306180948.r5I9muvP092234@svn.freebsd.org> From: Alexander Motin Date: Tue, 18 Jun 2013 09:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251932 - stable/8/sys/geom X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 09:48:56 -0000 Author: mav Date: Tue Jun 18 09:48:56 2013 New Revision: 251932 URL: http://svnweb.freebsd.org/changeset/base/251932 Log: MFC r251616: Don't update provider properties and don't set DISKFLAG_OPEN if d_open() disk method call returned error. GEOM considers devices in such case as still closed, and won't call symmetric d_close() for them. Modified: stable/8/sys/geom/geom_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom_disk.c ============================================================================== --- stable/8/sys/geom/geom_disk.c Tue Jun 18 09:47:56 2013 (r251931) +++ stable/8/sys/geom/geom_disk.c Tue Jun 18 09:48:56 2013 (r251932) @@ -151,6 +151,8 @@ g_disk_access(struct g_provider *pp, int printf("Opened disk %s -> %d\n", pp->name, error); g_disk_unlock_giant(dp); + if (error != 0) + return (error); } pp->mediasize = dp->d_mediasize; pp->sectorsize = dp->d_sectorsize; From owner-svn-src-stable-8@FreeBSD.ORG Wed Jun 19 18:01:38 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EF9C6F06; Wed, 19 Jun 2013 18:01:37 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC31A15D2; Wed, 19 Jun 2013 18:01:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5JI1bUZ015547; Wed, 19 Jun 2013 18:01:37 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5JI1bu8015546; Wed, 19 Jun 2013 18:01:37 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201306191801.r5JI1bu8015546@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 19 Jun 2013 18:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251999 - stable/8/sbin/mount X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jun 2013 18:01:38 -0000 Author: jh Date: Wed Jun 19 18:01:37 2013 New Revision: 251999 URL: http://svnweb.freebsd.org/changeset/base/251999 Log: MFC r251485: Revert r238399. The "failok" option doesn't have any effect at all unless specified in fstab(5) and combined with the -a flag. The "failok" option is already documented in fstab(5). PR: 177630 Modified: stable/8/sbin/mount/mount.8 Directory Properties: stable/8/sbin/mount/ (props changed) Modified: stable/8/sbin/mount/mount.8 ============================================================================== --- stable/8/sbin/mount/mount.8 Wed Jun 19 18:00:00 2013 (r251998) +++ stable/8/sbin/mount/mount.8 Wed Jun 19 18:01:37 2013 (r251999) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd July 12, 2012 +.Dd June 6, 2011 .Dt MOUNT 8 .Os .Sh NAME @@ -145,11 +145,6 @@ When used with the .Fl u flag, this is the same as specifying the options currently in effect for the mounted file system. -.It Cm failok -If this option is specified, -.Nm -will return 0 even if an error occurs -during the mount of the filesystem. .It Cm force The same as .Fl f ; From owner-svn-src-stable-8@FreeBSD.ORG Thu Jun 20 16:50:06 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3264786F; Thu, 20 Jun 2013 16:50:06 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0904C1672; Thu, 20 Jun 2013 16:50:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KGo5Zv094217; Thu, 20 Jun 2013 16:50:05 GMT (envelope-from gahr@svn.freebsd.org) Received: (from gahr@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KGo5oF094216; Thu, 20 Jun 2013 16:50:05 GMT (envelope-from gahr@svn.freebsd.org) Message-Id: <201306201650.r5KGo5oF094216@svn.freebsd.org> From: Pietro Cerutti Date: Thu, 20 Jun 2013 16:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252034 - stable/8/usr.bin/at X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 16:50:06 -0000 Author: gahr (ports committer) Date: Thu Jun 20 16:50:05 2013 New Revision: 252034 URL: http://svnweb.freebsd.org/changeset/base/252034 Log: MFC: r249406 - Do not bail out if stat(2) fails with ENOENT in the spool directory. This happens if another atrm process removes a job while we're scanning through the directory. - While at it, optimize a bit the directory scanning, so that we quit looping as soon as all jobs specified in argv have been dealt with. Approved by: cognet Modified: stable/8/usr.bin/at/at.c Directory Properties: stable/8/usr.bin/at/ (props changed) Modified: stable/8/usr.bin/at/at.c ============================================================================== --- stable/8/usr.bin/at/at.c Thu Jun 20 14:30:16 2013 (r252033) +++ stable/8/usr.bin/at/at.c Thu Jun 20 16:50:05 2013 (r252034) @@ -533,6 +533,10 @@ process_jobs(int argc, char **argv, int /* Delete every argument (job - ID) given */ int i; + int rc; + int nofJobs; + int nofDone; + int statErrno; struct stat buf; DIR *spool; struct dirent *dirent; @@ -540,6 +544,9 @@ process_jobs(int argc, char **argv, int char queue; long jobno; + nofJobs = argc - optind; + nofDone = 0; + PRIV_START if (chdir(ATJOB_DIR) != 0) @@ -555,9 +562,20 @@ process_jobs(int argc, char **argv, int while((dirent = readdir(spool)) != NULL) { PRIV_START - if (stat(dirent->d_name, &buf) != 0) - perr("cannot stat in " ATJOB_DIR); + rc = stat(dirent->d_name, &buf); + statErrno = errno; PRIV_END + /* There's a race condition between readdir above and stat here: + * another atrm process could have removed the file from the spool + * directory under our nose. If this happens, stat will set errno to + * ENOENT, which we shouldn't treat as fatal. + */ + if (rc != 0) { + if (statErrno == ENOENT) + continue; + else + perr("cannot stat in " ATJOB_DIR); + } if(sscanf(dirent->d_name, "%c%5lx%8lx", &queue, &jobno, &ctm)!=3) continue; @@ -603,9 +621,15 @@ process_jobs(int argc, char **argv, int errx(EXIT_FAILURE, "internal error, process_jobs = %d", what); } + + /* All arguments have been processed + */ + if (++nofDone == nofJobs) + goto end; } } } +end: closedir(spool); } /* delete_jobs */ From owner-svn-src-stable-8@FreeBSD.ORG Fri Jun 21 15:30:18 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E7118C63; Fri, 21 Jun 2013 15:30:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D997816D1; Fri, 21 Jun 2013 15:30:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5LFUIVt029263; Fri, 21 Jun 2013 15:30:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5LFUIvZ029261; Fri, 21 Jun 2013 15:30:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201306211530.r5LFUIvZ029261@svn.freebsd.org> From: John Baldwin Date: Fri, 21 Jun 2013 15:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252058 - in stable/8/sys/boot: i386/libi386 pc98/libpc98 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 15:30:19 -0000 Author: jhb Date: Fri Jun 21 15:30:18 2013 New Revision: 252058 URL: http://svnweb.freebsd.org/changeset/base/252058 Log: MFC 250333: Don't pad disk partition sizes with leading zeros. Modified: stable/8/sys/boot/i386/libi386/biosdisk.c stable/8/sys/boot/pc98/libpc98/biosdisk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- stable/8/sys/boot/i386/libi386/biosdisk.c Fri Jun 21 15:17:44 2013 (r252057) +++ stable/8/sys/boot/i386/libi386/biosdisk.c Fri Jun 21 15:30:18 2013 (r252058) @@ -349,7 +349,7 @@ display_size(uint64_t size) size /= 1024; unit = 'M'; } - sprintf(buf, "%.6ld%cB", (long)size, unit); + sprintf(buf, "%6ld%cB", (long)size, unit); return (buf); } Modified: stable/8/sys/boot/pc98/libpc98/biosdisk.c ============================================================================== --- stable/8/sys/boot/pc98/libpc98/biosdisk.c Fri Jun 21 15:17:44 2013 (r252057) +++ stable/8/sys/boot/pc98/libpc98/biosdisk.c Fri Jun 21 15:30:18 2013 (r252058) @@ -296,7 +296,7 @@ display_size(uint64_t size) size /= 1024; unit = 'M'; } - sprintf(buf, "%.6ld%cB", (long)size, unit); + sprintf(buf, "%6ld%cB", (long)size, unit); return (buf); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Jun 21 19:30:33 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 33454135; Fri, 21 Jun 2013 19:30:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0B52C1132; Fri, 21 Jun 2013 19:30:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5LJUWpv007110; Fri, 21 Jun 2013 19:30:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5LJUWIv007109; Fri, 21 Jun 2013 19:30:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201306211930.r5LJUWIv007109@svn.freebsd.org> From: John Baldwin Date: Fri, 21 Jun 2013 19:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252066 - stable/8/usr.bin/procstat X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 19:30:33 -0000 Author: jhb Date: Fri Jun 21 19:30:32 2013 New Revision: 252066 URL: http://svnweb.freebsd.org/changeset/base/252066 Log: MFC 251637: Borrow the algorithm from kvm_getprocs() to fix procstat(1) to handle the case where the process tables grows in between the calls to fetch the size and fetch the table. Note that this is not a true MFC as the libprocstat library doesn't exist in 8.x and the relevant code is in the procstat binary instead. Modified: stable/8/usr.bin/procstat/procstat.c Modified: stable/8/usr.bin/procstat/procstat.c ============================================================================== --- stable/8/usr.bin/procstat/procstat.c Fri Jun 21 19:28:58 2013 (r252065) +++ stable/8/usr.bin/procstat/procstat.c Fri Jun 21 19:30:32 2013 (r252066) @@ -107,7 +107,7 @@ main(int argc, char *argv[]) int ch, interval, name[4], tmp; unsigned int i; struct kinfo_proc *kipp; - size_t len; + size_t len, olen; long l; pid_t pid; char *dummy; @@ -204,13 +204,21 @@ main(int argc, char *argv[]) if (sysctl(name, 3, NULL, &len, NULL, 0) < 0) err(-1, "sysctl: kern.proc.all"); - kipp = malloc(len); - if (kipp == NULL) - err(-1, "malloc"); - - if (sysctl(name, 3, kipp, &len, NULL, 0) < 0) { - free(kipp); - err(-1, "sysctl: kern.proc.all"); + kipp = NULL; + for (;;) { + len += len / 10; + kipp = reallocf(kipp, len); + if (kipp == NULL) + err(-1, "malloc"); + + olen = len; + if (sysctl(name, 3, kipp, &len, NULL, 0) < 0) { + if (errno == ENOMEM && olen == len) + continue; + free(kipp); + err(-1, "sysctl: kern.proc.all"); + } + break; } if (len % sizeof(*kipp) != 0) err(-1, "kinfo_proc mismatch"); @@ -242,13 +250,22 @@ main(int argc, char *argv[]) if (sysctl(name, 4, NULL, &len, NULL, 0) < 0) err(-1, "sysctl: kern.proc.pid: %d", pid); - kipp = malloc(len); - if (kipp == NULL) - err(-1, "malloc"); - - if (sysctl(name, 4, kipp, &len, NULL, 0) < 0) { - free(kipp); - err(-1, "sysctl: kern.proc.pid: %d", pid); + kipp = NULL; + for (;;) { + len += len / 10; + kipp = reallocf(kipp, len); + if (kipp == NULL) + err(-1, "malloc"); + + olen = len; + if (sysctl(name, 4, kipp, &len, NULL, 0) < 0) { + if (errno == ENOMEM && olen == len) + continue; + free(kipp); + err(-1, "sysctl: kern.proc.pid: %d", + pid); + } + break; } if (len != sizeof(*kipp)) err(-1, "kinfo_proc mismatch"); From owner-svn-src-stable-8@FreeBSD.ORG Fri Jun 21 21:59:58 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E50C61D0; Fri, 21 Jun 2013 21:59:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BC29E1BCD; Fri, 21 Jun 2013 21:59:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5LLxwsB054217; Fri, 21 Jun 2013 21:59:58 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5LLxwUj054216; Fri, 21 Jun 2013 21:59:58 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306212159.r5LLxwUj054216@svn.freebsd.org> From: Devin Teske Date: Fri, 21 Jun 2013 21:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252071 - stable/8/usr.sbin/sysinstall X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 21:59:59 -0000 Author: dteske Date: Fri Jun 21 21:59:58 2013 New Revision: 252071 URL: http://svnweb.freebsd.org/changeset/base/252071 Log: MFS9->8 r249822: Update error messages when processing the INDEX file to display the given path rather than a static string. This makes the error messages consistent with the rest of the functions which already do the same thing (assumed to be an oversight of r47055, 13+ years ago). A direct commit to stable/9. This is a direct commit to stable/8. Reviewed by: eadler Modified: stable/8/usr.sbin/sysinstall/index.c Modified: stable/8/usr.sbin/sysinstall/index.c ============================================================================== --- stable/8/usr.sbin/sysinstall/index.c Fri Jun 21 21:38:48 2013 (r252070) +++ stable/8/usr.sbin/sysinstall/index.c Fri Jun 21 21:59:58 2013 (r252071) @@ -865,11 +865,11 @@ index_initialize(char *path) msgNotify("Attempting to fetch %s file from selected media.", path); fp = DEVICE_GET(mediaDevice, path, TRUE); if (!fp) { - msgConfirm("Unable to get packages/INDEX file from selected media.\n\n" + msgConfirm("Unable to get %s file from selected media.\n\n" "This may be because the packages collection is not available\n" "on the distribution media you've chosen, most likely an FTP site\n" "without the packages collection mirrored. Please verify that\n" - "your media, or your path to the media, is correct and try again."); + "your media, or your path to the media, is correct and try again.", path); DEVICE_SHUTDOWN(mediaDevice); restorescr(w); return DITEM_FAILURE; @@ -878,8 +878,9 @@ index_initialize(char *path) msgNotify("Located INDEX, now reading package data from it..."); index_init(&Top, &Plist); if (index_read(fp, &Top)) { - msgConfirm("I/O or format error on packages/INDEX file.\n" - "Please verify media (or path to media) and try again."); + msgConfirm("I/O or format error on %s file.\n" + "Please verify media (or path to media) and try again.", + path); fclose(fp); restorescr(w); return DITEM_FAILURE; From owner-svn-src-stable-8@FreeBSD.ORG Fri Jun 21 22:45:04 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E89718ED; Fri, 21 Jun 2013 22:45:04 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D92561D43; Fri, 21 Jun 2013 22:45:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5LMj4BM069836; Fri, 21 Jun 2013 22:45:04 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5LMj3uF069827; Fri, 21 Jun 2013 22:45:03 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201306212245.r5LMj3uF069827@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 21 Jun 2013 22:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252073 - in stable/8: . share/mk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 22:45:05 -0000 Author: sjg Date: Fri Jun 21 22:45:03 2013 New Revision: 252073 URL: http://svnweb.freebsd.org/changeset/base/252073 Log: share/mk: merge: r241298,243393,249057,251506 from head for bmake support. merge: r252048 from stable/9 Makefile: merge: r252048 from stable/9 for bmake support. Reviewed by: obrien Modified: stable/8/Makefile stable/8/share/mk/bsd.dep.mk stable/8/share/mk/bsd.obj.mk stable/8/share/mk/bsd.own.mk stable/8/share/mk/bsd.subdir.mk stable/8/share/mk/bsd.sys.mk stable/8/share/mk/sys.mk Directory Properties: stable/8/ (props changed) stable/8/share/ (props changed) stable/8/share/mk/ (props changed) Modified: stable/8/Makefile ============================================================================== --- stable/8/Makefile Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/Makefile Fri Jun 21 22:45:03 2013 (r252073) @@ -117,7 +117,13 @@ MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/ BINMAKE= \ `if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \ -m ${.CURDIR}/share/mk + +.if defined(.PARSEDIR) +# don't pass -J to fmake +_MAKE= PATH=${PATH} MAKEFLAGS="${MAKEFLAGS:N-J:N1*,1*}" ${BINMAKE} -f Makefile.inc1 +.else _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1 +.endif # # Make sure we have an up-to-date make(1). Only world and buildworld @@ -175,7 +181,7 @@ ${TGTS}: .MAIN: all STARTTIME!= LC_ALL=C date -CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s +CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s; echo .if !empty(CHECK_TIME) .error check your date/time: ${STARTTIME} .endif Modified: stable/8/share/mk/bsd.dep.mk ============================================================================== --- stable/8/share/mk/bsd.dep.mk Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/share/mk/bsd.dep.mk Fri Jun 21 22:45:03 2013 (r252073) @@ -123,6 +123,9 @@ ${_YC:R}.o: ${_YC} .if defined(SRCS) depend: beforedepend ${DEPENDFILE} afterdepend +# Tell bmake not to look for generated files via .PATH +.NOPATH: ${DEPENDFILE} + # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. .if ${CC} == "icc" Modified: stable/8/share/mk/bsd.obj.mk ============================================================================== --- stable/8/share/mk/bsd.obj.mk Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/share/mk/bsd.obj.mk Fri Jun 21 22:45:03 2013 (r252073) @@ -44,6 +44,8 @@ ____: .if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:=${MAKEOBJDIR} .else CANONICALOBJDIR:=/usr/obj${.CURDIR} .endif @@ -116,6 +118,11 @@ cleanobj: clean cleandepend .endif @if [ -L ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi +# Tell bmake not to look for generated files via .PATH +.if !empty(CLEANFILES) +.NOPATH: ${CLEANFILES} +.endif + .if !target(clean) clean: .if defined(CLEANFILES) && !empty(CLEANFILES) Modified: stable/8/share/mk/bsd.own.mk ============================================================================== --- stable/8/share/mk/bsd.own.mk Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/share/mk/bsd.own.mk Fri Jun 21 22:45:03 2013 (r252073) @@ -573,6 +573,8 @@ MK_${vv:H}:= ${MK_${vv:T}} .if ${MK_CTF} != "no" CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.elif defined(.PARSEDIR) || ${MAKE_VERSION} >= 9201210220 +CTFCONVERT_CMD= .else CTFCONVERT_CMD= @: .endif Modified: stable/8/share/mk/bsd.subdir.mk ============================================================================== --- stable/8/share/mk/bsd.subdir.mk Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/share/mk/bsd.subdir.mk Fri Jun 21 22:45:03 2013 (r252073) @@ -42,7 +42,7 @@ distribute: _SUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR}; do \ + @${_+_}set -e; for entry in ${SUBDIR}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ edir=$${entry}.${MACHINE_ARCH}; \ @@ -80,7 +80,7 @@ ${__stage}${__target}: _SUBDIR .endif .endfor ${__target}: - ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} + ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} .endfor .if !target(install) Modified: stable/8/share/mk/bsd.sys.mk ============================================================================== --- stable/8/share/mk/bsd.sys.mk Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/share/mk/bsd.sys.mk Fri Jun 21 22:45:03 2013 (r252073) @@ -87,3 +87,18 @@ CFLAGS += ${SSP_CFLAGS} # Allow user-specified additional warning flags CFLAGS += ${CWARNFLAGS} + + +# Tell bmake not to mistake standard targets for things to be searched for +# or expect to ever be up-to-date. +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ + beforelinking build build-tools buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanobj configure \ + depend dependall distclean distribute exe extract fetch \ + html includes install installfiles installincludes lint \ + obj objlink objs objwarn patch realall realdepend \ + realinstall regress subdir-all subdir-depend subdir-install \ + tags whereobj + +.PHONY: ${PHONY_NOTMAIN} +.NOTMAIN: ${PHONY_NOTMAIN} Modified: stable/8/share/mk/sys.mk ============================================================================== --- stable/8/share/mk/sys.mk Fri Jun 21 22:26:18 2013 (r252072) +++ stable/8/share/mk/sys.mk Fri Jun 21 22:45:03 2013 (r252073) @@ -4,6 +4,10 @@ unix ?= We run FreeBSD, not UNIX. .FreeBSD ?= true +# Set any local definitions first. Place this early, but it needs +# MACHINE_CPUARCH to be defined. +.sinclude + # If the special target .POSIX appears (without prerequisites or # commands) before the first noncomment line in the makefile, make shall # process the makefile as specified by the Posix 1003.2 specification. @@ -304,8 +308,22 @@ SHELL= ${__MAKE_SHELL} # XXX hint for bsd.port.mk OBJFORMAT?= elf +# Tell bmake to expand -V VAR by default +.MAKE.EXPAND_VARIABLES= yes + +# Tell bmake the makefile preference +.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile + +.if !defined(.PARSEDIR) +# We are not bmake, which is more aggressive about searching .PATH +# It is sometime necessary to curb its enthusiasm with .NOPATH +# The following allows us to quietly ignore .NOPATH when not using bmake. +.NOTMAIN: .NOPATH +.NOPATH: + # Toggle on warnings .WARN: dirsyntax +.endif .endif From owner-svn-src-stable-8@FreeBSD.ORG Sat Jun 22 04:04:34 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CEC97781; Sat, 22 Jun 2013 04:04:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C0C941A2F; Sat, 22 Jun 2013 04:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5M44Y4Q067854; Sat, 22 Jun 2013 04:04:34 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5M44YI4067853; Sat, 22 Jun 2013 04:04:34 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201306220404.r5M44YI4067853@svn.freebsd.org> From: Mark Johnston Date: Sat, 22 Jun 2013 04:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252088 - stable/8/share/man/man9 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 04:04:34 -0000 Author: markj Date: Sat Jun 22 04:04:34 2013 New Revision: 252088 URL: http://svnweb.freebsd.org/changeset/base/252088 Log: MFC r251723: The functions are called pci_{msi,msix}_count(), not pci_count_{msi,msix}(). Modified: stable/8/share/man/man9/pci.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/pci.9 ============================================================================== --- stable/8/share/man/man9/pci.9 Sat Jun 22 04:03:57 2013 (r252087) +++ stable/8/share/man/man9/pci.9 Sat Jun 22 04:04:34 2013 (r252088) @@ -436,13 +436,13 @@ A driver is only allowed to use either M but not both. .Pp The -.Fn pci_count_msi +.Fn pci_msi_count function returns the maximum number of MSI messages supported by the device .Fa dev . If the device does not support MSI, then -.Fn pci_count_msi +.Fn pci_msi_count returns zero. .Pp The @@ -489,13 +489,13 @@ The function returns zero on success and an error on failure. .Pp The -.Fn pci_count_msix +.Fn pci_msix_count function returns the maximum number of MSI-X messages supported by the device .Fa dev . If the device does not support MSI-X, then -.Fn pci_count_msix +.Fn pci_msix_count returns zero. .Pp The From owner-svn-src-stable-8@FreeBSD.ORG Sat Jun 22 04:52:12 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DBAA82BC; Sat, 22 Jun 2013 04:52:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CE7481C1C; Sat, 22 Jun 2013 04:52:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5M4qCRj080333; Sat, 22 Jun 2013 04:52:12 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5M4qCje080332; Sat, 22 Jun 2013 04:52:12 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201306220452.r5M4qCje080332@svn.freebsd.org> From: Mark Johnston Date: Sat, 22 Jun 2013 04:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252090 - stable/8/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 04:52:12 -0000 Author: markj Date: Sat Jun 22 04:52:12 2013 New Revision: 252090 URL: http://svnweb.freebsd.org/changeset/base/252090 Log: MFC r251166: Add macros which allow one to define SDT probes with six or seven arguments; they are needed when porting some of the Solaris providers (ip, iscsi, and tcp in particular). dtrace_probe() only takes five arguments from the probe site, so we need to add the appropriate cast to allow for more than five arguments. The extra arguments are later copied out of dtrace_probe()'s stack frame by dtrace_getarg() (or the provider-specific getarg method) as needed. Modified: stable/8/sys/sys/sdt.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/sys/sdt.h ============================================================================== --- stable/8/sys/sys/sdt.h Sat Jun 22 04:50:25 2013 (r252089) +++ stable/8/sys/sys/sdt.h Sat Jun 22 04:52:12 2013 (r252090) @@ -91,6 +91,10 @@ #define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, arg1, arg2) #define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3) #define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE_DEFINE6(prov, mod, func, name, snamp, arg0, arg1, arg2, \ + arg3, arg4, arg5) +#define SDT_PROBE_DEFINE7(prov, mod, func, name, snamp, arg0, arg1, arg2, \ + arg3, arg4, arg5, arg6) #define SDT_PROBE0(prov, mod, func, name) #define SDT_PROBE1(prov, mod, func, name, arg0) @@ -98,6 +102,9 @@ #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ + arg6) #else @@ -232,6 +239,27 @@ struct sdt_provider { SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4) +#define SDT_PROBE_DEFINE6(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ + arg4, arg5) \ + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); + +#define SDT_PROBE_DEFINE7(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ + arg4, arg5, arg6) \ + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 6, arg6); + #define SDT_PROBE0(prov, mod, func, name) \ SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) #define SDT_PROBE1(prov, mod, func, name, arg0) \ @@ -244,6 +272,27 @@ struct sdt_provider { SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0) #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \ + do { \ + if (sdt_##prov##_##mod##_##func##_##name->id) \ + (*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \ + uintptr_t, uintptr_t, uintptr_t))sdt_probe_func)( \ + sdt_##prov##_##mod##_##func##_##name->id, \ + (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ + (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\ + } while (0) +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ + arg6) \ + do { \ + if (sdt_##prov##_##mod##_##func##_##name->id) \ + (*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \ + uintptr_t, uintptr_t, uintptr_t, uintptr_t)) \ + sdt_probe_func)( \ + sdt_##prov##_##mod##_##func##_##name->id, \ + (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ + (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \ + (uintptr_t)arg6); \ + } while (0) typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *); typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *); From owner-svn-src-stable-8@FreeBSD.ORG Sat Jun 22 05:25:13 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 637CC6CA; Sat, 22 Jun 2013 05:25:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7341CC8; Sat, 22 Jun 2013 05:25:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5M5PDk0088246; Sat, 22 Jun 2013 05:25:13 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5M5PDDG088245; Sat, 22 Jun 2013 05:25:13 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201306220525.r5M5PDDG088245@svn.freebsd.org> From: Mark Johnston Date: Sat, 22 Jun 2013 05:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252092 - stable/8/sys/dev/coretemp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 05:25:13 -0000 Author: markj Date: Sat Jun 22 05:25:12 2013 New Revision: 252092 URL: http://svnweb.freebsd.org/changeset/base/252092 Log: MFC r246951: Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held unnecessarily by a user thread waiting to run on a specific CPU after calling sched_bind(). Modified: stable/8/sys/dev/coretemp/coretemp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/coretemp/ (props changed) Modified: stable/8/sys/dev/coretemp/coretemp.c ============================================================================== --- stable/8/sys/dev/coretemp/coretemp.c Sat Jun 22 05:24:29 2013 (r252091) +++ stable/8/sys/dev/coretemp/coretemp.c Sat Jun 22 05:25:12 2013 (r252092) @@ -274,23 +274,23 @@ coretemp_attach(device_t dev) * Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), - OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, dev, - CORETEMP_TEMP, coretemp_get_val_sysctl, "IK", + OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, CORETEMP_TEMP, coretemp_get_val_sysctl, "IK", "Current temperature"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "delta", - CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_DELTA, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_DELTA, coretemp_get_val_sysctl, "I", "Delta between TCC activation and current temperature"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "resolution", - CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_RESOLUTION, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_RESOLUTION, coretemp_get_val_sysctl, "I", "Resolution of CPU thermal sensor"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "tjmax", - CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_TJMAX, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_TJMAX, coretemp_get_val_sysctl, "IK", "TCC activation temperature"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "throttle_log", CTLTYPE_INT | CTLFLAG_RW, dev, 0, + "throttle_log", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, 0, coretemp_throttle_log_sysctl, "I", "Set to 1 if the thermal sensor has tripped"); From owner-svn-src-stable-8@FreeBSD.ORG Sat Jun 22 05:32:46 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8571DBC7; Sat, 22 Jun 2013 05:32:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 77DA31D0C; Sat, 22 Jun 2013 05:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5M5WkPl090292; Sat, 22 Jun 2013 05:32:46 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5M5Wkv0090291; Sat, 22 Jun 2013 05:32:46 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201306220532.r5M5Wkv0090291@svn.freebsd.org> From: Mark Johnston Date: Sat, 22 Jun 2013 05:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252094 - stable/8/usr.sbin/mfiutil X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 05:32:46 -0000 Author: markj Date: Sat Jun 22 05:32:45 2013 New Revision: 252094 URL: http://svnweb.freebsd.org/changeset/base/252094 Log: MFC r250599: Add a remark to the effect that a manually started relearn will always result in the battery being completely drained, even in transparent learning mode. Modified: stable/8/usr.sbin/mfiutil/mfiutil.8 Directory Properties: stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- stable/8/usr.sbin/mfiutil/mfiutil.8 Sat Jun 22 05:32:11 2013 (r252093) +++ stable/8/usr.sbin/mfiutil/mfiutil.8 Sat Jun 22 05:32:45 2013 (r252094) @@ -573,6 +573,10 @@ Updates the flash on the controller with A reboot is required for the new firmware to take effect. .It Cm start learn Start a battery relearn. +Note that this seems to always result in the battery being completely drained, +regardless of the BBU mode. +In particular, the controller write cache will be disabled during the relearn +even if transparent learning mode is enabled. .It Cm bbu Ar setting Ar value Update battery backup unit (BBU) properties related to battery relearning. The following settings are configurable: